3d8c418190cd93ee5b3d714d901a8aec3becde2b.svn-base 13 KB

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