AttEngPustDao.xml 14 KB

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