AttEngHystDao.xml 16 KB

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