BisInspWtgtRgstrPayDao.xml 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  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.BisInspWtgtRgstrPayDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspWtgtRgstrPay" id="bisInspWtgtRgstrPayResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="isExpiry" column="IS_EXPIRY"/>
  8. <result property="isConform" column="IS_CONFORM"/>
  9. <result property="isMsrNoml" column="IS_MSR_NOML"/>
  10. <result property="isCmpRgstr" column="IS_CMP_RGSTR"/>
  11. <result property="isRunNoml" column="IS_RUN_NOML"/>
  12. <result property="isCmpChk" column="IS_CMP_CHK"/>
  13. <result property="isInRange" column="IS_IN_RANGE"/>
  14. <result property="isMwrFit" column="IS_MWR_FIT"/>
  15. <result property="isWtrPay" column="IS_WTR_PAY"/>
  16. <result property="isSysSend" column="IS_SYS_SEND"/>
  17. <result property="isOutPlan" column="IS_OUT_PLAN"/>
  18. <result property="isOutPlanAlarm" column="IS_OUT_PLAN_ALARM"/>
  19. <result property="isOplanPay" column="IS_OPLAN_PAY"/>
  20. <result property="persId" column="PERS_ID"/>
  21. <result property="intm" column="INTM"/>
  22. <result property="uptm" column="UPTM"/>
  23. <result property="groupId" column="GROUP_ID"/>
  24. <result property="dataStat" column="DATA_STAT"/>
  25. </resultMap>
  26. <sql id="table_columns">
  27. ID,
  28. RGSTR_ID,
  29. IS_EXPIRY,
  30. IS_CONFORM,
  31. IS_MSR_NOML,
  32. IS_CMP_RGSTR,
  33. IS_RUN_NOML,
  34. IS_CMP_CHK,
  35. IS_IN_RANGE,
  36. IS_MWR_FIT,
  37. IS_WTR_PAY,
  38. IS_SYS_SEND,
  39. IS_OUT_PLAN,
  40. IS_OUT_PLAN_ALARM,
  41. IS_OPLAN_PAY,
  42. PERS_ID,
  43. INTM,
  44. UPTM,
  45. GROUP_ID,
  46. DATA_STAT
  47. </sql>
  48. <sql id="entity_properties">
  49. #{id},
  50. #{rgstrId},
  51. #{isExpiry},
  52. #{isConform},
  53. #{isMsrNoml},
  54. #{isCmpRgstr},
  55. #{isRunNoml},
  56. #{isCmpChk},
  57. #{isInRange},
  58. #{isMwrFit},
  59. #{isWtrPay},
  60. #{isSysSend},
  61. #{isOutPlan},
  62. #{isOutPlanAlarm},
  63. #{isOplanPay},
  64. #{persId},
  65. #{intm},
  66. #{uptm},
  67. #{groupId},
  68. #{dataStat}
  69. </sql>
  70. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  71. <sql id="page_where">
  72. <trim prefix="where" prefixOverrides="and | or ">
  73. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  74. <if test="isExpiry != null and isExpiry != ''">and IS_EXPIRY = #{isExpiry}</if>
  75. <if test="isConform != null and isConform != ''">and IS_CONFORM = #{isConform}</if>
  76. <if test="isMsrNoml != null and isMsrNoml != ''">and IS_MSR_NOML = #{isMsrNoml}</if>
  77. <if test="isCmpRgstr != null and isCmpRgstr != ''">and IS_CMP_RGSTR = #{isCmpRgstr}</if>
  78. <if test="isRunNoml != null and isRunNoml != ''">and IS_RUN_NOML = #{isRunNoml}</if>
  79. <if test="isCmpChk != null and isCmpChk != ''">and IS_CMP_CHK = #{isCmpChk}</if>
  80. <if test="isInRange != null and isInRange != ''">and IS_IN_RANGE = #{isInRange}</if>
  81. <if test="isMwrFit != null and isMwrFit != ''">and IS_MWR_FIT = #{isMwrFit}</if>
  82. <if test="isWtrPay != null and isWtrPay != ''">and IS_WTR_PAY = #{isWtrPay}</if>
  83. <if test="isSysSend != null and isSysSend != ''">and IS_SYS_SEND = #{isSysSend}</if>
  84. <if test="isOutPlan != null and isOutPlan != ''">and IS_OUT_PLAN = #{isOutPlan}</if>
  85. <if test="isOutPlanAlarm != null and isOutPlanAlarm != ''">and IS_OUT_PLAN_ALARM = #{isOutPlanAlarm}</if>
  86. <if test="isOplanPay != null and isOplanPay != ''">and IS_OPLAN_PAY = #{isOplanPay}</if>
  87. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  88. <if test="intm != null">and INTM = #{intm}</if>
  89. <if test="uptm != null">and UPTM = #{uptm}</if>
  90. <if test="groupId != null and groupId != ''">and GROUP_ID = #{groupId}</if>
  91. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  92. and DATA_STAT='0'
  93. </trim>
  94. </sql>
  95. <select id="get" resultMap="bisInspWtgtRgstrPayResultMap" parameterType="String" >
  96. select <include refid="table_columns" /> from BIS_INSP_WTGT_RGSTR_PAY where RGSTR_ID = #{id}
  97. </select>
  98. <select id="getBy" resultMap="bisInspWtgtRgstrPayResultMap">
  99. select <include refid="table_columns" /> from BIS_INSP_WTGT_RGSTR_PAY <include refid="page_where" />
  100. </select>
  101. <select id="findAll" resultMap="bisInspWtgtRgstrPayResultMap">
  102. select <include refid="table_columns" /> from BIS_INSP_WTGT_RGSTR_PAY
  103. </select>
  104. <select id="findList" resultMap="bisInspWtgtRgstrPayResultMap">
  105. select <include refid="table_columns" /> from BIS_INSP_WTGT_RGSTR_PAY <include refid="page_where" />
  106. </select>
  107. <select id="selectCount" resultType="int" >
  108. select count(ID) from BIS_INSP_WTGT_RGSTR_PAY <include refid="page_where" />
  109. </select>
  110. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspWtgtRgstrPay">
  111. insert into BIS_INSP_WTGT_RGSTR_PAY( <include refid="table_columns" /> )
  112. values ( <include refid="entity_properties" /> )
  113. </insert>
  114. <delete id="delete" parameterType="java.lang.String">
  115. update BIS_INSP_WTGT_RGSTR_PAY set DATA_STAT='9' where ID = #{id}
  116. </delete>
  117. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWtgtRgstrPay">
  118. update BIS_INSP_WTGT_RGSTR_PAY set DATA_STAT='9' <include refid="page_where" />
  119. </delete>
  120. <update id="deleteInFlag" parameterType="java.lang.String">
  121. update BIS_INSP_WTGT_RGSTR_PAY set DATA_STAT = '9' where ID = #{id}
  122. </update>
  123. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspWtgtRgstrPay">
  124. update BIS_INSP_WTGT_RGSTR_PAY
  125. <trim prefix="set" suffixOverrides=",">
  126. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  127. <if test="isExpiry != null and isExpiry != ''">IS_EXPIRY = #{isExpiry},</if>
  128. <if test="isConform != null and isConform != ''">IS_CONFORM = #{isConform},</if>
  129. <if test="isMsrNoml != null and isMsrNoml != ''">IS_MSR_NOML = #{isMsrNoml},</if>
  130. <if test="isCmpRgstr != null and isCmpRgstr != ''">IS_CMP_RGSTR = #{isCmpRgstr},</if>
  131. <if test="isRunNoml != null and isRunNoml != ''">IS_RUN_NOML = #{isRunNoml},</if>
  132. <if test="isCmpChk != null and isCmpChk != ''">IS_CMP_CHK = #{isCmpChk},</if>
  133. <if test="isInRange != null and isInRange != ''">IS_IN_RANGE = #{isInRange},</if>
  134. <if test="isMwrFit != null and isMwrFit != ''">IS_MWR_FIT = #{isMwrFit},</if>
  135. <if test="isWtrPay != null and isWtrPay != ''">IS_WTR_PAY = #{isWtrPay},</if>
  136. <if test="isSysSend != null and isSysSend != ''">IS_SYS_SEND = #{isSysSend},</if>
  137. <if test="isOutPlan != null and isOutPlan != ''">IS_OUT_PLAN = #{isOutPlan},</if>
  138. <if test="isOutPlanAlarm != null and isOutPlanAlarm != ''">IS_OUT_PLAN_ALARM = #{isOutPlanAlarm},</if>
  139. <if test="isOplanPay != null and isOplanPay != ''">IS_OPLAN_PAY = #{isOplanPay},</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="groupId != null and groupId != ''">GROUP_ID = #{groupId},</if>
  144. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  145. </trim>
  146. <where>ID = #{id}</where>
  147. </update>
  148. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWtgtRgstrPay">
  149. update BIS_INSP_WTGT_RGSTR_PAY
  150. <trim prefix="set" suffixOverrides=",">
  151. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  152. <if test="isExpiry != null and isExpiry != ''">IS_EXPIRY = #{isExpiry},</if>
  153. <if test="isConform != null and isConform != ''">IS_CONFORM = #{isConform},</if>
  154. <if test="isMsrNoml != null and isMsrNoml != ''">IS_MSR_NOML = #{isMsrNoml},</if>
  155. <if test="isCmpRgstr != null and isCmpRgstr != ''">IS_CMP_RGSTR = #{isCmpRgstr},</if>
  156. <if test="isRunNoml != null and isRunNoml != ''">IS_RUN_NOML = #{isRunNoml},</if>
  157. <if test="isCmpChk != null and isCmpChk != ''">IS_CMP_CHK = #{isCmpChk},</if>
  158. <if test="isInRange != null and isInRange != ''">IS_IN_RANGE = #{isInRange},</if>
  159. <if test="isMwrFit != null and isMwrFit != ''">IS_MWR_FIT = #{isMwrFit},</if>
  160. <if test="isWtrPay != null and isWtrPay != ''">IS_WTR_PAY = #{isWtrPay},</if>
  161. <if test="isSysSend != null and isSysSend != ''">IS_SYS_SEND = #{isSysSend},</if>
  162. <if test="isOutPlan != null and isOutPlan != ''">IS_OUT_PLAN = #{isOutPlan},</if>
  163. <if test="isOutPlanAlarm != null and isOutPlanAlarm != ''">IS_OUT_PLAN_ALARM = #{isOutPlanAlarm},</if>
  164. <if test="isOplanPay != null and isOplanPay != ''">IS_OPLAN_PAY = #{isOplanPay},</if>
  165. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  166. <if test="intm != null">INTM = #{intm},</if>
  167. <if test="uptm != null">UPTM = #{uptm},</if>
  168. <if test="groupId != null and groupId != ''">GROUP_ID = #{groupId},</if>
  169. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  170. </trim>
  171. <include refid="page_where" />
  172. </update>
  173. <!-- 其他自定义SQL -->
  174. </mapper>