BisInspWiujsWtruDao.xml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  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.BisInspWiujsWtruDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspWiujsWtru" id="bisInspWiujsWtruResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="intm" column="INTM"/>
  8. <result property="uptm" column="UPTM"/>
  9. <result property="dataStat" column="DATA_STAT"/>
  10. <result property="isPlan" column="IS_PLAN"/>
  11. <result property="planWater" column="PLAN_WATER"/>
  12. <result property="isReport" column="IS_REPORT"/>
  13. <result property="isAdjPlan" column="IS_ADJ_PLAN"/>
  14. <result property="isYmadj" column="IS_YMADJ"/>
  15. <result property="actualWater" column="ACTUAL_WATER"/>
  16. <result property="isByndPlan" column="IS_BYND_PLAN"/>
  17. <result property="isPayBynd" column="IS_PAY_BYND"/>
  18. <result property="mainProd" column="MAIN_PROD"/>
  19. <result property="mainStandard" column="MAIN_STANDARD"/>
  20. <result property="isByndQuota" column="IS_BYND_QUOTA"/>
  21. <result property="isInstall" column="IS_INSTALL"/>
  22. <result property="isNrmlEqpt" column="IS_NRML_EQPT"/>
  23. <result property="isCheck" column="IS_CHECK"/>
  24. <result property="isBuildRta" column="IS_BUILD_RTA"/>
  25. <result property="isRecord" column="IS_RECORD"/>
  26. <result property="isNwtrEqpt" column="IS_NWTR_EQPT"/>
  27. <result property="isSndMchnsm" column="IS_SND_MCHNSM"/>
  28. <result property="isTest" column="IS_TEST"/>
  29. <result property="isAudit" column="IS_AUDIT"/>
  30. <result property="isBuildSvi" column="IS_BUILD_SVI"/>
  31. <result property="isWaterEffect" column="IS_WATER_EFFECT"/>
  32. <result property="isTechRnvtn" column="IS_TECH_RNVTN"/>
  33. <result property="isUncnvWater" column="IS_UNCNV_WATER"/>
  34. <result property="isWaterSys" column="IS_WATER_SYS"/>
  35. <result property="isSavAdvr" column="IS_SAV_ADVR"/>
  36. <result property="isNnvtWork" column="IS_NNVT_WORK"/>
  37. </resultMap>
  38. <sql id="table_columns">
  39. ID,
  40. RGSTR_ID,
  41. INTM,
  42. UPTM,
  43. DATA_STAT,
  44. IS_PLAN,
  45. PLAN_WATER,
  46. IS_REPORT,
  47. IS_ADJ_PLAN,
  48. IS_YMADJ,
  49. ACTUAL_WATER,
  50. IS_BYND_PLAN,
  51. IS_PAY_BYND,
  52. MAIN_PROD,
  53. MAIN_STANDARD,
  54. IS_BYND_QUOTA,
  55. IS_INSTALL,
  56. IS_NRML_EQPT,
  57. IS_CHECK,
  58. IS_BUILD_RTA,
  59. IS_RECORD,
  60. IS_NWTR_EQPT,
  61. IS_SND_MCHNSM,
  62. IS_TEST,
  63. IS_AUDIT,
  64. IS_BUILD_SVI,
  65. IS_WATER_EFFECT,
  66. IS_TECH_RNVTN,
  67. IS_UNCNV_WATER,
  68. IS_WATER_SYS,
  69. IS_SAV_ADVR,
  70. IS_NNVT_WORK
  71. </sql>
  72. <sql id="entity_properties">
  73. #{id},
  74. #{rgstrId},
  75. #{intm},
  76. #{uptm},
  77. #{dataStat},
  78. #{isPlan},
  79. #{planWater},
  80. #{isReport},
  81. #{isAdjPlan},
  82. #{isYmadj},
  83. #{actualWater},
  84. #{isByndPlan},
  85. #{isPayBynd},
  86. #{mainProd},
  87. #{mainStandard},
  88. #{isByndQuota},
  89. #{isInstall},
  90. #{isNrmlEqpt},
  91. #{isCheck},
  92. #{isBuildRta},
  93. #{isRecord},
  94. #{isNwtrEqpt},
  95. #{isSndMchnsm},
  96. #{isTest},
  97. #{isAudit},
  98. #{isBuildSvi},
  99. #{isWaterEffect},
  100. #{isTechRnvtn},
  101. #{isUncnvWater},
  102. #{isWaterSys},
  103. #{isSavAdvr},
  104. #{isNnvtWork}
  105. </sql>
  106. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  107. <sql id="page_where">
  108. <trim prefix="where" prefixOverrides="and | or ">
  109. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  110. <if test="intm != null">and INTM = #{intm}</if>
  111. <if test="uptm != null">and UPTM = #{uptm}</if>
  112. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  113. <if test="isPlan != null and isPlan != ''">and IS_PLAN = #{isPlan}</if>
  114. <if test="planWater != null and planWater != ''">and PLAN_WATER = #{planWater}</if>
  115. <if test="isReport != null and isReport != ''">and IS_REPORT = #{isReport}</if>
  116. <if test="isAdjPlan != null and isAdjPlan != ''">and IS_ADJ_PLAN = #{isAdjPlan}</if>
  117. <if test="isYmadj != null and isYmadj != ''">and IS_YMADJ = #{isYmadj}</if>
  118. <if test="actualWater != null and actualWater != ''">and ACTUAL_WATER = #{actualWater}</if>
  119. <if test="isByndPlan != null and isByndPlan != ''">and IS_BYND_PLAN = #{isByndPlan}</if>
  120. <if test="isPayBynd != null and isPayBynd != ''">and IS_PAY_BYND = #{isPayBynd}</if>
  121. <if test="mainProd != null and mainProd != ''">and MAIN_PROD = #{mainProd}</if>
  122. <if test="mainStandard != null and mainStandard != ''">and MAIN_STANDARD = #{mainStandard}</if>
  123. <if test="isByndQuota != null and isByndQuota != ''">and IS_BYND_QUOTA = #{isByndQuota}</if>
  124. <if test="isInstall != null and isInstall != ''">and IS_INSTALL = #{isInstall}</if>
  125. <if test="isNrmlEqpt != null and isNrmlEqpt != ''">and IS_NRML_EQPT = #{isNrmlEqpt}</if>
  126. <if test="isCheck != null and isCheck != ''">and IS_CHECK = #{isCheck}</if>
  127. <if test="isBuildRta != null and isBuildRta != ''">and IS_BUILD_RTA = #{isBuildRta}</if>
  128. <if test="isRecord != null and isRecord != ''">and IS_RECORD = #{isRecord}</if>
  129. <if test="isNwtrEqpt != null and isNwtrEqpt != ''">and IS_NWTR_EQPT = #{isNwtrEqpt}</if>
  130. <if test="isSndMchnsm != null and isSndMchnsm != ''">and IS_SND_MCHNSM = #{isSndMchnsm}</if>
  131. <if test="isTest != null and isTest != ''">and IS_TEST = #{isTest}</if>
  132. <if test="isAudit != null and isAudit != ''">and IS_AUDIT = #{isAudit}</if>
  133. <if test="isBuildSvi != null and isBuildSvi != ''">and IS_BUILD_SVI = #{isBuildSvi}</if>
  134. <if test="isWaterEffect != null and isWaterEffect != ''">and IS_WATER_EFFECT = #{isWaterEffect}</if>
  135. <if test="isTechRnvtn != null and isTechRnvtn != ''">and IS_TECH_RNVTN = #{isTechRnvtn}</if>
  136. <if test="isUncnvWater != null and isUncnvWater != ''">and IS_UNCNV_WATER = #{isUncnvWater}</if>
  137. <if test="isWaterSys != null and isWaterSys != ''">and IS_WATER_SYS = #{isWaterSys}</if>
  138. <if test="isSavAdvr != null and isSavAdvr != ''">and IS_SAV_ADVR = #{isSavAdvr}</if>
  139. <if test="isNnvtWork != null and isNnvtWork != ''">and IS_NNVT_WORK = #{isNnvtWork}</if>
  140. and DATA_STAT='0'
  141. </trim>
  142. </sql>
  143. <select id="get" resultMap="bisInspWiujsWtruResultMap" parameterType="String">
  144. select
  145. <include refid="table_columns"/>
  146. from BIS_INSP_WIUJS_WTRU where RGSTR_ID = #{id}
  147. </select>
  148. <select id="getBy" resultMap="bisInspWiujsWtruResultMap">
  149. select
  150. <include refid="table_columns"/>
  151. from BIS_INSP_WIUJS_WTRU
  152. <include refid="page_where"/>
  153. </select>
  154. <select id="findAll" resultMap="bisInspWiujsWtruResultMap">
  155. select
  156. <include refid="table_columns"/>
  157. from BIS_INSP_WIUJS_WTRU
  158. </select>
  159. <select id="findList" resultMap="bisInspWiujsWtruResultMap">
  160. select
  161. <include refid="table_columns"/>
  162. from BIS_INSP_WIUJS_WTRU
  163. <include refid="page_where"/>
  164. </select>
  165. <select id="selectCount" resultType="int">
  166. select count(ID) from BIS_INSP_WIUJS_WTRU
  167. <include refid="page_where"/>
  168. </select>
  169. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspWiujsWtru">
  170. insert into BIS_INSP_WIUJS_WTRU(
  171. <include refid="table_columns"/>
  172. )
  173. values (
  174. <include refid="entity_properties"/>
  175. )
  176. </insert>
  177. <delete id="delete" parameterType="java.lang.String">
  178. update BIS_INSP_WIUJS_WTRU set DATA_STAT='9' where ID = #{id}
  179. </delete>
  180. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWiujsWtru">
  181. update BIS_INSP_WIUJS_WTRU set DATA_STAT='9'
  182. <include refid="page_where"/>
  183. </delete>
  184. <update id="deleteInFlag" parameterType="java.lang.String">
  185. update BIS_INSP_WIUJS_WTRU set DATA_STAT = '9' where ID = #{id}
  186. </update>
  187. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspWiujsWtru">
  188. update BIS_INSP_WIUJS_WTRU
  189. <trim prefix="set" suffixOverrides=",">
  190. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  191. <if test="intm != null">INTM = #{intm},</if>
  192. <if test="uptm != null">UPTM = #{uptm},</if>
  193. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  194. <if test="isPlan != null and isPlan != ''">IS_PLAN = #{isPlan},</if>
  195. <if test="planWater != null and planWater != ''">PLAN_WATER = #{planWater},</if>
  196. <if test="isReport != null and isReport != ''">IS_REPORT = #{isReport},</if>
  197. <if test="isAdjPlan != null and isAdjPlan != ''">IS_ADJ_PLAN = #{isAdjPlan},</if>
  198. <if test="isYmadj != null and isYmadj != ''">IS_YMADJ = #{isYmadj},</if>
  199. <if test="actualWater != null and actualWater != ''">ACTUAL_WATER = #{actualWater},</if>
  200. <if test="isByndPlan != null and isByndPlan != ''">IS_BYND_PLAN = #{isByndPlan},</if>
  201. <if test="isPayBynd != null and isPayBynd != ''">IS_PAY_BYND = #{isPayBynd},</if>
  202. <if test="mainProd != null and mainProd != ''">MAIN_PROD = #{mainProd},</if>
  203. <if test="mainStandard != null and mainStandard != ''">MAIN_STANDARD = #{mainStandard},</if>
  204. <if test="isByndQuota != null and isByndQuota != ''">IS_BYND_QUOTA = #{isByndQuota},</if>
  205. <if test="isInstall != null and isInstall != ''">IS_INSTALL = #{isInstall},</if>
  206. <if test="isNrmlEqpt != null and isNrmlEqpt != ''">IS_NRML_EQPT = #{isNrmlEqpt},</if>
  207. <if test="isCheck != null and isCheck != ''">IS_CHECK = #{isCheck},</if>
  208. <if test="isBuildRta != null and isBuildRta != ''">IS_BUILD_RTA = #{isBuildRta},</if>
  209. <if test="isRecord != null and isRecord != ''">IS_RECORD = #{isRecord},</if>
  210. <if test="isNwtrEqpt != null and isNwtrEqpt != ''">IS_NWTR_EQPT = #{isNwtrEqpt},</if>
  211. <if test="isSndMchnsm != null and isSndMchnsm != ''">IS_SND_MCHNSM = #{isSndMchnsm},</if>
  212. <if test="isTest != null and isTest != ''">IS_TEST = #{isTest},</if>
  213. <if test="isAudit != null and isAudit != ''">IS_AUDIT = #{isAudit},</if>
  214. <if test="isBuildSvi != null and isBuildSvi != ''">IS_BUILD_SVI = #{isBuildSvi},</if>
  215. <if test="isWaterEffect != null and isWaterEffect != ''">IS_WATER_EFFECT = #{isWaterEffect},</if>
  216. <if test="isTechRnvtn != null and isTechRnvtn != ''">IS_TECH_RNVTN = #{isTechRnvtn},</if>
  217. <if test="isUncnvWater != null and isUncnvWater != ''">IS_UNCNV_WATER = #{isUncnvWater},</if>
  218. <if test="isWaterSys != null and isWaterSys != ''">IS_WATER_SYS = #{isWaterSys},</if>
  219. <if test="isSavAdvr != null and isSavAdvr != ''">IS_SAV_ADVR = #{isSavAdvr},</if>
  220. <if test="isNnvtWork != null and isNnvtWork != ''">IS_NNVT_WORK = #{isNnvtWork},</if>
  221. </trim>
  222. <where>ID = #{id}</where>
  223. </update>
  224. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWiujsWtru">
  225. update BIS_INSP_WIUJS_WTRU
  226. <trim prefix="set" suffixOverrides=",">
  227. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  228. <if test="intm != null">INTM = #{intm},</if>
  229. <if test="uptm != null">UPTM = #{uptm},</if>
  230. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  231. <if test="isPlan != null and isPlan != ''">IS_PLAN = #{isPlan},</if>
  232. <if test="planWater != null and planWater != ''">PLAN_WATER = #{planWater},</if>
  233. <if test="isReport != null and isReport != ''">IS_REPORT = #{isReport},</if>
  234. <if test="isAdjPlan != null and isAdjPlan != ''">IS_ADJ_PLAN = #{isAdjPlan},</if>
  235. <if test="isYmadj != null and isYmadj != ''">IS_YMADJ = #{isYmadj},</if>
  236. <if test="actualWater != null and actualWater != ''">ACTUAL_WATER = #{actualWater},</if>
  237. <if test="isByndPlan != null and isByndPlan != ''">IS_BYND_PLAN = #{isByndPlan},</if>
  238. <if test="isPayBynd != null and isPayBynd != ''">IS_PAY_BYND = #{isPayBynd},</if>
  239. <if test="mainProd != null and mainProd != ''">MAIN_PROD = #{mainProd},</if>
  240. <if test="mainStandard != null and mainStandard != ''">MAIN_STANDARD = #{mainStandard},</if>
  241. <if test="isByndQuota != null and isByndQuota != ''">IS_BYND_QUOTA = #{isByndQuota},</if>
  242. <if test="isInstall != null and isInstall != ''">IS_INSTALL = #{isInstall},</if>
  243. <if test="isNrmlEqpt != null and isNrmlEqpt != ''">IS_NRML_EQPT = #{isNrmlEqpt},</if>
  244. <if test="isCheck != null and isCheck != ''">IS_CHECK = #{isCheck},</if>
  245. <if test="isBuildRta != null and isBuildRta != ''">IS_BUILD_RTA = #{isBuildRta},</if>
  246. <if test="isRecord != null and isRecord != ''">IS_RECORD = #{isRecord},</if>
  247. <if test="isNwtrEqpt != null and isNwtrEqpt != ''">IS_NWTR_EQPT = #{isNwtrEqpt},</if>
  248. <if test="isSndMchnsm != null and isSndMchnsm != ''">IS_SND_MCHNSM = #{isSndMchnsm},</if>
  249. <if test="isTest != null and isTest != ''">IS_TEST = #{isTest},</if>
  250. <if test="isAudit != null and isAudit != ''">IS_AUDIT = #{isAudit},</if>
  251. <if test="isBuildSvi != null and isBuildSvi != ''">IS_BUILD_SVI = #{isBuildSvi},</if>
  252. <if test="isWaterEffect != null and isWaterEffect != ''">IS_WATER_EFFECT = #{isWaterEffect},</if>
  253. <if test="isTechRnvtn != null and isTechRnvtn != ''">IS_TECH_RNVTN = #{isTechRnvtn},</if>
  254. <if test="isUncnvWater != null and isUncnvWater != ''">IS_UNCNV_WATER = #{isUncnvWater},</if>
  255. <if test="isWaterSys != null and isWaterSys != ''">IS_WATER_SYS = #{isWaterSys},</if>
  256. <if test="isSavAdvr != null and isSavAdvr != ''">IS_SAV_ADVR = #{isSavAdvr},</if>
  257. <if test="isNnvtWork != null and isNnvtWork != ''">IS_NNVT_WORK = #{isNnvtWork},</if>
  258. </trim>
  259. <include refid="page_where"/>
  260. </update>
  261. <!-- 其他自定义SQL -->
  262. </mapper>