bfb5e6833a8e719bfd77e69f54c1df30334c4be3.svn-base 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="cn.com.goldenwater.dcproj.dao.AttEngWagaDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.AttEngWaga" id="attEngWagaResultMap">
  5. <result property="guid" column="GUID"/>
  6. <result property="pGuid" column="P_GUID"/>
  7. <result property="engName" column="ENG_NAME"/>
  8. <result property="engGuid" column="ENG_GUID"/>
  9. <result property="impoGrad" column="IMPO_GRAD"/>
  10. <result property="apprBudg" column="APPR_BUDG"/>
  11. <result property="startDate" column="START_DATE"/>
  12. <result property="compDate" column="COMP_DATE"/>
  13. <result property="engStat" column="ENG_STAT"/>
  14. <result property="orgGuid" column="ORG_GUID"/>
  15. <result property="oflpCode" column="OFLP_CODE"/>
  16. <result property="ifReinForce" column="IF_REIN_FORCE"/>
  17. <result property="projGuid" column="PROJ_GUID"/>
  18. <result property="stat" column="STAT"/>
  19. <result property="wagaCode" column="WAGA_CODE"/>
  20. <result property="cenLong" column="CEN_LONG"/>
  21. <result property="cenLat" column="CEN_LAT"/>
  22. <result property="wagaLoc" column="WAGA_LOC"/>
  23. <result property="adGuid" column="AD_GUID"/>
  24. <result property="rvGuid" column="RV_GUID"/>
  25. <result property="lkGuid" column="LK_GUID"/>
  26. <result property="wagaType" column="WAGA_TYPE"/>
  27. <result property="gaorNum" column="GAOR_NUM"/>
  28. <result property="engGrad" column="ENG_GRAD"/>
  29. <result property="engScal" column="ENG_SCAL"/>
  30. <result property="lockDisc" column="LOCK_DISC"/>
  31. <result property="enerDiss" column="ENER_DISS"/>
  32. <result property="desFlSta" column="DES_FL_STA"/>
  33. <result property="collTime" column="COLL_TIME"/>
  34. <result property="updTime" column="UPD_TIME"/>
  35. <result property="recPers" column="REC_PERS"/>
  36. <result property="note" column="NOTE"/>
  37. <result property="engReinForceGuid" column="ENG_REIN_FORCE_GUID"/>
  38. </resultMap>
  39. <sql id="table_columns">
  40. GUID,
  41. P_GUID,
  42. ENG_NAME,
  43. ENG_GUID,
  44. IMPO_GRAD,
  45. APPR_BUDG,
  46. START_DATE,
  47. COMP_DATE,
  48. ENG_STAT,
  49. ORG_GUID,
  50. OFLP_CODE,
  51. IF_REIN_FORCE,
  52. PROJ_GUID,
  53. STAT,
  54. WAGA_CODE,
  55. CEN_LONG,
  56. CEN_LAT,
  57. WAGA_LOC,
  58. AD_GUID,
  59. RV_GUID,
  60. LK_GUID,
  61. WAGA_TYPE,
  62. GAOR_NUM,
  63. ENG_GRAD,
  64. ENG_SCAL,
  65. LOCK_DISC,
  66. ENER_DISS,
  67. DES_FL_STA,
  68. COLL_TIME,
  69. UPD_TIME,
  70. REC_PERS,
  71. NOTE,
  72. ENG_REIN_FORCE_GUID
  73. </sql>
  74. <sql id="entity_properties">
  75. #{guid},
  76. #{pGuid},
  77. #{engName},
  78. #{engGuid},
  79. #{impoGrad},
  80. #{apprBudg},
  81. #{startDate},
  82. #{compDate},
  83. #{engStat},
  84. #{orgGuid},
  85. #{oflpCode},
  86. #{ifReinForce},
  87. #{projGuid},
  88. #{stat},
  89. #{wagaCode},
  90. #{cenLong},
  91. #{cenLat},
  92. #{wagaLoc},
  93. #{adGuid},
  94. #{rvGuid},
  95. #{lkGuid},
  96. #{wagaType},
  97. #{gaorNum},
  98. #{engGrad},
  99. #{engScal},
  100. #{lockDisc},
  101. #{enerDiss},
  102. #{desFlSta},
  103. #{collTime},
  104. #{updTime},
  105. #{recPers},
  106. #{note},
  107. #{engReinForceGuid}
  108. </sql>
  109. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  110. <sql id="page_where">
  111. <trim prefix="where" prefixOverrides="and | or ">
  112. <if test="pGuid != null and pGuid != ''">and P_GUID = #{pGuid}</if>
  113. <if test="engName != null and engName != ''">and ENG_NAME = #{engName}</if>
  114. <if test="engGuid != null and engGuid != ''">and ENG_GUID = #{engGuid}</if>
  115. <if test="impoGrad != null and impoGrad != ''">and IMPO_GRAD = #{impoGrad}</if>
  116. <if test="apprBudg != null and apprBudg != ''">and APPR_BUDG = #{apprBudg}</if>
  117. <if test="startDate != null">and START_DATE = #{startDate}</if>
  118. <if test="compDate != null">and COMP_DATE = #{compDate}</if>
  119. <if test="engStat != null and engStat != ''">and ENG_STAT = #{engStat}</if>
  120. <if test="orgGuid != null and orgGuid != ''">and ORG_GUID = #{orgGuid}</if>
  121. <if test="oflpCode != null and oflpCode != ''">and OFLP_CODE = #{oflpCode}</if>
  122. <if test="ifReinForce != null and ifReinForce != ''">and IF_REIN_FORCE = #{ifReinForce}</if>
  123. <if test="projGuid != null and projGuid != ''">and PROJ_GUID = #{projGuid}</if>
  124. <if test="stat != null and stat != ''">and STAT = #{stat}</if>
  125. <if test="wagaCode != null and wagaCode != ''">and WAGA_CODE = #{wagaCode}</if>
  126. <if test="cenLong != null and cenLong != ''">and CEN_LONG = #{cenLong}</if>
  127. <if test="cenLat != null and cenLat != ''">and CEN_LAT = #{cenLat}</if>
  128. <if test="wagaLoc != null and wagaLoc != ''">and WAGA_LOC = #{wagaLoc}</if>
  129. <if test="adGuid != null and adGuid != ''">and AD_GUID = #{adGuid}</if>
  130. <if test="rvGuid != null and rvGuid != ''">and RV_GUID = #{rvGuid}</if>
  131. <if test="lkGuid != null and lkGuid != ''">and LK_GUID = #{lkGuid}</if>
  132. <if test="wagaType != null and wagaType != ''">and WAGA_TYPE = #{wagaType}</if>
  133. <if test="gaorNum != null and gaorNum != ''">and GAOR_NUM = #{gaorNum}</if>
  134. <if test="engGrad != null and engGrad != ''">and ENG_GRAD = #{engGrad}</if>
  135. <if test="engScal != null and engScal != ''">and ENG_SCAL = #{engScal}</if>
  136. <if test="lockDisc != null and lockDisc != ''">and LOCK_DISC = #{lockDisc}</if>
  137. <if test="enerDiss != null and enerDiss != ''">and ENER_DISS = #{enerDiss}</if>
  138. <if test="desFlSta != null and desFlSta != ''">and DES_FL_STA = #{desFlSta}</if>
  139. <if test="collTime != null">and COLL_TIME = #{collTime}</if>
  140. <if test="updTime != null">and UPD_TIME = #{updTime}</if>
  141. <if test="recPers != null and recPers != ''">and REC_PERS = #{recPers}</if>
  142. <if test="note != null and note != ''">and NOTE = #{note}</if>
  143. <if test="engReinForceGuid != null and engReinForceGuid != ''">and ENG_REIN_FORCE_GUID =
  144. #{engReinForceGuid}
  145. </if>
  146. </trim>
  147. </sql>
  148. <select id="get" resultMap="attEngWagaResultMap" parameterType="String">
  149. select
  150. <include refid="table_columns"/>
  151. from att_eng_waga where GUID = #{id}
  152. </select>
  153. <select id="getBy" resultMap="attEngWagaResultMap">
  154. select
  155. <include refid="table_columns"/>
  156. from att_eng_waga
  157. <include refid="page_where"/>
  158. </select>
  159. <select id="findAll" resultMap="attEngWagaResultMap">
  160. select
  161. <include refid="table_columns"/>
  162. from att_eng_waga
  163. </select>
  164. <select id="findList" resultMap="attEngWagaResultMap">
  165. select
  166. <include refid="table_columns"/>
  167. from att_eng_waga
  168. <include refid="page_where"/>
  169. </select>
  170. <select id="selectCount" resultType="int">
  171. select count(GUID) from att_eng_waga
  172. <include refid="page_where"/>
  173. </select>
  174. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttEngWaga">
  175. insert into att_eng_waga(
  176. <include refid="table_columns"/>
  177. )
  178. values (
  179. <include refid="entity_properties"/>
  180. )
  181. </insert>
  182. <delete id="delete" parameterType="java.lang.String">
  183. delete from att_eng_waga where GUID = #{id}
  184. </delete>
  185. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttEngWaga">
  186. delete from att_eng_waga
  187. <include refid="page_where"/>
  188. </delete>
  189. <update id="deleteInFlag" parameterType="java.lang.String">
  190. update att_eng_waga set flag_valid = 0 where GUID = #{id}
  191. </update>
  192. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttEngWaga">
  193. update att_eng_waga
  194. <trim prefix="set" suffixOverrides=",">
  195. <if test="pGuid != null and pGuid != ''">P_GUID = #{pGuid},</if>
  196. <if test="engName != null and engName != ''">ENG_NAME = #{engName},</if>
  197. <if test="engGuid != null and engGuid != ''">ENG_GUID = #{engGuid},</if>
  198. <if test="impoGrad != null and impoGrad != ''">IMPO_GRAD = #{impoGrad},</if>
  199. <if test="apprBudg != null and apprBudg != ''">APPR_BUDG = #{apprBudg},</if>
  200. <if test="startDate != null">START_DATE = #{startDate},</if>
  201. <if test="compDate != null">COMP_DATE = #{compDate},</if>
  202. <if test="engStat != null and engStat != ''">ENG_STAT = #{engStat},</if>
  203. <if test="orgGuid != null and orgGuid != ''">ORG_GUID = #{orgGuid},</if>
  204. <if test="oflpCode != null and oflpCode != ''">OFLP_CODE = #{oflpCode},</if>
  205. <if test="ifReinForce != null and ifReinForce != ''">IF_REIN_FORCE = #{ifReinForce},</if>
  206. <if test="projGuid != null and projGuid != ''">PROJ_GUID = #{projGuid},</if>
  207. <if test="stat != null and stat != ''">STAT = #{stat},</if>
  208. <if test="wagaCode != null and wagaCode != ''">WAGA_CODE = #{wagaCode},</if>
  209. <if test="cenLong != null and cenLong != ''">CEN_LONG = #{cenLong},</if>
  210. <if test="cenLat != null and cenLat != ''">CEN_LAT = #{cenLat},</if>
  211. <if test="wagaLoc != null and wagaLoc != ''">WAGA_LOC = #{wagaLoc},</if>
  212. <if test="adGuid != null and adGuid != ''">AD_GUID = #{adGuid},</if>
  213. <if test="rvGuid != null and rvGuid != ''">RV_GUID = #{rvGuid},</if>
  214. <if test="lkGuid != null and lkGuid != ''">LK_GUID = #{lkGuid},</if>
  215. <if test="wagaType != null and wagaType != ''">WAGA_TYPE = #{wagaType},</if>
  216. <if test="gaorNum != null and gaorNum != ''">GAOR_NUM = #{gaorNum},</if>
  217. <if test="engGrad != null and engGrad != ''">ENG_GRAD = #{engGrad},</if>
  218. <if test="engScal != null and engScal != ''">ENG_SCAL = #{engScal},</if>
  219. <if test="lockDisc != null and lockDisc != ''">LOCK_DISC = #{lockDisc},</if>
  220. <if test="enerDiss != null and enerDiss != ''">ENER_DISS = #{enerDiss},</if>
  221. <if test="desFlSta != null and desFlSta != ''">DES_FL_STA = #{desFlSta},</if>
  222. <if test="collTime != null">COLL_TIME = #{collTime},</if>
  223. <if test="updTime != null">UPD_TIME = #{updTime},</if>
  224. <if test="recPers != null and recPers != ''">REC_PERS = #{recPers},</if>
  225. <if test="note != null and note != ''">NOTE = #{note},</if>
  226. <if test="engReinForceGuid != null and engReinForceGuid != ''">ENG_REIN_FORCE_GUID = #{engReinForceGuid},
  227. </if>
  228. </trim>
  229. <where>GUID = #{id}</where>
  230. </update>
  231. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.AttEngWaga">
  232. update att_eng_waga
  233. <trim prefix="set" suffixOverrides=",">
  234. <if test="pGuid != null and pGuid != ''">P_GUID = #{pGuid},</if>
  235. <if test="engName != null and engName != ''">ENG_NAME = #{engName},</if>
  236. <if test="engGuid != null and engGuid != ''">ENG_GUID = #{engGuid},</if>
  237. <if test="impoGrad != null and impoGrad != ''">IMPO_GRAD = #{impoGrad},</if>
  238. <if test="apprBudg != null and apprBudg != ''">APPR_BUDG = #{apprBudg},</if>
  239. <if test="startDate != null">START_DATE = #{startDate},</if>
  240. <if test="compDate != null">COMP_DATE = #{compDate},</if>
  241. <if test="engStat != null and engStat != ''">ENG_STAT = #{engStat},</if>
  242. <if test="orgGuid != null and orgGuid != ''">ORG_GUID = #{orgGuid},</if>
  243. <if test="oflpCode != null and oflpCode != ''">OFLP_CODE = #{oflpCode},</if>
  244. <if test="ifReinForce != null and ifReinForce != ''">IF_REIN_FORCE = #{ifReinForce},</if>
  245. <if test="projGuid != null and projGuid != ''">PROJ_GUID = #{projGuid},</if>
  246. <if test="stat != null and stat != ''">STAT = #{stat},</if>
  247. <if test="wagaCode != null and wagaCode != ''">WAGA_CODE = #{wagaCode},</if>
  248. <if test="cenLong != null and cenLong != ''">CEN_LONG = #{cenLong},</if>
  249. <if test="cenLat != null and cenLat != ''">CEN_LAT = #{cenLat},</if>
  250. <if test="wagaLoc != null and wagaLoc != ''">WAGA_LOC = #{wagaLoc},</if>
  251. <if test="adGuid != null and adGuid != ''">AD_GUID = #{adGuid},</if>
  252. <if test="rvGuid != null and rvGuid != ''">RV_GUID = #{rvGuid},</if>
  253. <if test="lkGuid != null and lkGuid != ''">LK_GUID = #{lkGuid},</if>
  254. <if test="wagaType != null and wagaType != ''">WAGA_TYPE = #{wagaType},</if>
  255. <if test="gaorNum != null and gaorNum != ''">GAOR_NUM = #{gaorNum},</if>
  256. <if test="engGrad != null and engGrad != ''">ENG_GRAD = #{engGrad},</if>
  257. <if test="engScal != null and engScal != ''">ENG_SCAL = #{engScal},</if>
  258. <if test="lockDisc != null and lockDisc != ''">LOCK_DISC = #{lockDisc},</if>
  259. <if test="enerDiss != null and enerDiss != ''">ENER_DISS = #{enerDiss},</if>
  260. <if test="desFlSta != null and desFlSta != ''">DES_FL_STA = #{desFlSta},</if>
  261. <if test="collTime != null">COLL_TIME = #{collTime},</if>
  262. <if test="updTime != null">UPD_TIME = #{updTime},</if>
  263. <if test="recPers != null and recPers != ''">REC_PERS = #{recPers},</if>
  264. <if test="note != null and note != ''">NOTE = #{note},</if>
  265. <if test="engReinForceGuid != null and engReinForceGuid != ''">ENG_REIN_FORCE_GUID = #{engReinForceGuid},
  266. </if>
  267. </trim>
  268. <include refid="page_where"/>
  269. </update>
  270. <!-- 其他自定义SQL -->
  271. </mapper>