BisInspWiujsWtrcrDao.xml 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  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.BisInspWiujsWtrcrDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspWiujsWtrcr" id="bisInspWiujsWtrcrResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="persId" column="PERS_ID"/>
  8. <result property="intm" column="INTM"/>
  9. <result property="uptm" column="UPTM"/>
  10. <result property="dataStat" column="DATA_STAT"/>
  11. <result property="getWtrcrTm" column="GET_WTRCR_TM"/>
  12. <result property="isAppdDept" column="IS_APPD_DEPT"/>
  13. <result property="isReview" column="IS_REVIEW"/>
  14. <result property="lastRvwTm" column="LAST_RVW_TM"/>
  15. <result property="isComPer" column="IS_COM_PER"/>
  16. <result property="isNotice" column="IS_NOTICE"/>
  17. <result property="isAdvt" column="IS_ADVT"/>
  18. <result property="isTest" column="IS_TEST"/>
  19. <result property="isObsEqpt" column="IS_OBS_EQPT"/>
  20. <result property="isDrip" column="IS_DRIP"/>
  21. <result property="isRecy" column="IS_RECY"/>
  22. <result property="uncnvWaterUse" column="UNCNV_WATER_USE"/>
  23. <result property="isBuildSys" column="IS_BUILD_SYS"/>
  24. </resultMap>
  25. <sql id="table_columns">
  26. ID,
  27. RGSTR_ID,
  28. PERS_ID,
  29. INTM,
  30. UPTM,
  31. DATA_STAT,
  32. GET_WTRCR_TM,
  33. IS_APPD_DEPT,
  34. IS_REVIEW,
  35. LAST_RVW_TM,
  36. IS_COM_PER,
  37. IS_NOTICE,
  38. IS_ADVT,
  39. IS_TEST,
  40. IS_OBS_EQPT,
  41. IS_DRIP,
  42. IS_RECY,
  43. UNCNV_WATER_USE,
  44. IS_BUILD_SYS
  45. </sql>
  46. <sql id="entity_properties">
  47. #{id},
  48. #{rgstrId},
  49. #{persId},
  50. #{intm},
  51. #{uptm},
  52. #{dataStat},
  53. #{getWtrcrTm},
  54. #{isAppdDept},
  55. #{isReview},
  56. #{lastRvwTm},
  57. #{isComPer},
  58. #{isNotice},
  59. #{isAdvt},
  60. #{isTest},
  61. #{isObsEqpt},
  62. #{isDrip},
  63. #{isRecy},
  64. #{uncnvWaterUse},
  65. #{isBuildSys}
  66. </sql>
  67. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  68. <sql id="page_where">
  69. <trim prefix="where" prefixOverrides="and | or ">
  70. <if test="isBuildSys != null and isBuildSys != ''">and IS_BUILD_SYS = #{isBuildSys}</if>
  71. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  72. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  73. <if test="intm != null">and INTM = #{intm}</if>
  74. <if test="uptm != null">and UPTM = #{uptm}</if>
  75. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  76. <if test="getWtrcrTm != null">and GET_WTRCR_TM = #{getWtrcrTm}</if>
  77. <if test="isAppdDept != null and isAppdDept != ''">and IS_APPD_DEPT = #{isAppdDept}</if>
  78. <if test="isReview != null and isReview != ''">and IS_REVIEW = #{isReview}</if>
  79. <if test="lastRvwTm != null">and LAST_RVW_TM = #{lastRvwTm}</if>
  80. <if test="isComPer != null and isComPer != ''">and IS_COM_PER = #{isComPer}</if>
  81. <if test="isNotice != null and isNotice != ''">and IS_NOTICE = #{isNotice}</if>
  82. <if test="isAdvt != null and isAdvt != ''">and IS_ADVT = #{isAdvt}</if>
  83. <if test="isTest != null and isTest != ''">and IS_TEST = #{isTest}</if>
  84. <if test="isObsEqpt != null and isObsEqpt != ''">and IS_OBS_EQPT = #{isObsEqpt}</if>
  85. <if test="isDrip != null and isDrip != ''">and IS_DRIP = #{isDrip}</if>
  86. <if test="isRecy != null and isRecy != ''">and IS_RECY = #{isRecy}</if>
  87. <if test="uncnvWaterUse != null and uncnvWaterUse != ''">and UNCNV_WATER_USE = #{uncnvWaterUse}</if>
  88. and DATA_STAT='0'
  89. </trim>
  90. </sql>
  91. <select id="get" resultMap="bisInspWiujsWtrcrResultMap" parameterType="String">
  92. select
  93. <include refid="table_columns"/>
  94. from BIS_INSP_WIUJS_WTRCR where RGSTR_ID = #{id}
  95. </select>
  96. <select id="getBy" resultMap="bisInspWiujsWtrcrResultMap">
  97. select
  98. <include refid="table_columns"/>
  99. from BIS_INSP_WIUJS_WTRCR
  100. <include refid="page_where"/>
  101. </select>
  102. <select id="findAll" resultMap="bisInspWiujsWtrcrResultMap">
  103. select
  104. <include refid="table_columns"/>
  105. from BIS_INSP_WIUJS_WTRCR
  106. </select>
  107. <select id="findList" resultMap="bisInspWiujsWtrcrResultMap">
  108. select
  109. <include refid="table_columns"/>
  110. from BIS_INSP_WIUJS_WTRCR
  111. <include refid="page_where"/>
  112. </select>
  113. <select id="selectCount" resultType="int">
  114. select count(ID) from BIS_INSP_WIUJS_WTRCR
  115. <include refid="page_where"/>
  116. </select>
  117. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspWiujsWtrcr">
  118. insert into BIS_INSP_WIUJS_WTRCR(
  119. <include refid="table_columns"/>
  120. )
  121. values (
  122. <include refid="entity_properties"/>
  123. )
  124. </insert>
  125. <delete id="delete" parameterType="java.lang.String">
  126. update BIS_INSP_WIUJS_WTRCR set DATA_STAT='9' where ID = #{id}
  127. </delete>
  128. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWiujsWtrcr">
  129. update BIS_INSP_WIUJS_WTRCR set DATA_STAT='9'
  130. <include refid="page_where"/>
  131. </delete>
  132. <update id="deleteInFlag" parameterType="java.lang.String">
  133. update BIS_INSP_WIUJS_WTRCR set DATA_STAT = '9' where ID = #{id}
  134. </update>
  135. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspWiujsWtrcr">
  136. update BIS_INSP_WIUJS_WTRCR
  137. <trim prefix="set" suffixOverrides=",">
  138. <if test="isBuildSys != null and isBuildSys != ''">IS_BUILD_SYS = #{isBuildSys},</if>
  139. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  140. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  141. <if test="intm != null">INTM = #{intm},</if>
  142. <if test="uptm != null">UPTM = #{uptm},</if>
  143. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  144. <if test="getWtrcrTm != null">GET_WTRCR_TM = #{getWtrcrTm},</if>
  145. <if test="isAppdDept != null and isAppdDept != ''">IS_APPD_DEPT = #{isAppdDept},</if>
  146. <if test="isReview != null and isReview != ''">IS_REVIEW = #{isReview},</if>
  147. <if test="lastRvwTm != null">LAST_RVW_TM = #{lastRvwTm},</if>
  148. <if test="isComPer != null and isComPer != ''">IS_COM_PER = #{isComPer},</if>
  149. <if test="isNotice != null and isNotice != ''">IS_NOTICE = #{isNotice},</if>
  150. <if test="isAdvt != null and isAdvt != ''">IS_ADVT = #{isAdvt},</if>
  151. <if test="isTest != null and isTest != ''">IS_TEST = #{isTest},</if>
  152. <if test="isObsEqpt != null and isObsEqpt != ''">IS_OBS_EQPT = #{isObsEqpt},</if>
  153. <if test="isDrip != null and isDrip != ''">IS_DRIP = #{isDrip},</if>
  154. <if test="isRecy != null and isRecy != ''">IS_RECY = #{isRecy},</if>
  155. <if test="uncnvWaterUse != null and uncnvWaterUse != ''">UNCNV_WATER_USE = #{uncnvWaterUse},</if>
  156. </trim>
  157. <where>ID = #{id}</where>
  158. </update>
  159. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWiujsWtrcr">
  160. update BIS_INSP_WIUJS_WTRCR
  161. <trim prefix="set" suffixOverrides=",">
  162. <if test="isBuildSys != null and isBuildSys != ''">IS_BUILD_SYS = #{isBuildSys},</if>
  163. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  164. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  165. <if test="intm != null">INTM = #{intm},</if>
  166. <if test="uptm != null">UPTM = #{uptm},</if>
  167. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  168. <if test="getWtrcrTm != null">GET_WTRCR_TM = #{getWtrcrTm},</if>
  169. <if test="isAppdDept != null and isAppdDept != ''">IS_APPD_DEPT = #{isAppdDept},</if>
  170. <if test="isReview != null and isReview != ''">IS_REVIEW = #{isReview},</if>
  171. <if test="lastRvwTm != null">LAST_RVW_TM = #{lastRvwTm},</if>
  172. <if test="isComPer != null and isComPer != ''">IS_COM_PER = #{isComPer},</if>
  173. <if test="isNotice != null and isNotice != ''">IS_NOTICE = #{isNotice},</if>
  174. <if test="isAdvt != null and isAdvt != ''">IS_ADVT = #{isAdvt},</if>
  175. <if test="isTest != null and isTest != ''">IS_TEST = #{isTest},</if>
  176. <if test="isObsEqpt != null and isObsEqpt != ''">IS_OBS_EQPT = #{isObsEqpt},</if>
  177. <if test="isDrip != null and isDrip != ''">IS_DRIP = #{isDrip},</if>
  178. <if test="isRecy != null and isRecy != ''">IS_RECY = #{isRecy},</if>
  179. <if test="uncnvWaterUse != null and uncnvWaterUse != ''">UNCNV_WATER_USE = #{uncnvWaterUse},</if>
  180. </trim>
  181. <include refid="page_where"/>
  182. </update>
  183. <!-- 其他自定义SQL -->
  184. </mapper>