c8d6b074b30055e21036a4e3d89d007280b80ca5.svn-base 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  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.BisInspWrwsRgstrWtupDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspWrwsRgstrWtup" id="bisInspWrwsRgstrWtupResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="isWtuIn" column="IS_WTU_IN"/>
  8. <result property="isPlanWt" column="IS_PLAN_WT"/>
  9. <result property="planWtNum" column="PLAN_WT_NUM"/>
  10. <result property="planWtNote" column="PLAN_WT_NOTE"/>
  11. <result property="isNorm" column="IS_NORM"/>
  12. <result property="noNormNum" column="NO_NORM_NUM"/>
  13. <result property="noNormNote" column="NO_NORM_NOTE"/>
  14. <result property="isOplanPay" column="IS_OPLAN_PAY"/>
  15. <result property="oplanNum" column="OPLAN_NUM"/>
  16. <result property="oplanNote" column="OPLAN_NOTE"/>
  17. <result property="isBuldPwt" column="IS_BULD_PWT"/>
  18. <result property="isPubWtpl" column="IS_PUB_WTPL"/>
  19. <result property="isPubPlan" column="IS_PUB_PLAN"/>
  20. <result property="noPubNum" column="NO_PUB_NUM"/>
  21. <result property="noPubNote" column="NO_PUB_NOTE"/>
  22. <result property="isOplanApay" column="IS_OPLAN_APAY"/>
  23. <result property="noOplanNum" column="NO_OPLAN_NUM"/>
  24. <result property="noOplanNote" column="NO_OPLAN_NOTE"/>
  25. <result property="isPipeLowc" column="IS_PIPE_LOWC"/>
  26. <result property="isNwtInc" column="IS_NWT_INC"/>
  27. <result property="isAddWt" column="IS_ADD_WT"/>
  28. <result property="persId" column="PERS_ID"/>
  29. <result property="intm" column="INTM"/>
  30. <result property="uptm" column="UPTM"/>
  31. <result property="state" column="STATE"/>
  32. <result property="dataStat" column="DATA_STAT"/>
  33. </resultMap>
  34. <sql id="table_columns">
  35. ID,
  36. RGSTR_ID,
  37. IS_WTU_IN,
  38. IS_PLAN_WT,
  39. PLAN_WT_NUM,
  40. PLAN_WT_NOTE,
  41. IS_NORM,
  42. NO_NORM_NUM,
  43. NO_NORM_NOTE,
  44. IS_OPLAN_PAY,
  45. OPLAN_NUM,
  46. OPLAN_NOTE,
  47. IS_BULD_PWT,
  48. IS_PUB_WTPL,
  49. IS_PUB_PLAN,
  50. NO_PUB_NUM,
  51. NO_PUB_NOTE,
  52. IS_OPLAN_APAY,
  53. NO_OPLAN_NUM,
  54. NO_OPLAN_NOTE,
  55. IS_PIPE_LOWC,
  56. IS_NWT_INC,
  57. IS_ADD_WT,
  58. PERS_ID,
  59. INTM,
  60. UPTM,
  61. STATE,
  62. DATA_STAT
  63. </sql>
  64. <sql id="entity_properties">
  65. #{id},
  66. #{rgstrId},
  67. #{isWtuIn},
  68. #{isPlanWt},
  69. #{planWtNum},
  70. #{planWtNote},
  71. #{isNorm},
  72. #{noNormNum},
  73. #{noNormNote},
  74. #{isOplanPay},
  75. #{oplanNum},
  76. #{oplanNote},
  77. #{isBuldPwt},
  78. #{isPubWtpl},
  79. #{isPubPlan},
  80. #{noPubNum},
  81. #{noPubNote},
  82. #{isOplanApay},
  83. #{noOplanNum},
  84. #{noOplanNote},
  85. #{isPipeLowc},
  86. #{isNwtInc},
  87. #{isAddWt},
  88. #{persId},
  89. #{intm},
  90. #{uptm},
  91. #{state},
  92. #{dataStat}
  93. </sql>
  94. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  95. <sql id="page_where">
  96. <trim prefix="where" prefixOverrides="and | or ">
  97. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  98. <if test="isWtuIn != null and isWtuIn != ''">and IS_WTU_IN = #{isWtuIn}</if>
  99. <if test="isPlanWt != null and isPlanWt != ''">and IS_PLAN_WT = #{isPlanWt}</if>
  100. <if test="planWtNum != null and planWtNum != ''">and PLAN_WT_NUM = #{planWtNum}</if>
  101. <if test="planWtNote != null and planWtNote != ''">and PLAN_WT_NOTE = #{planWtNote}</if>
  102. <if test="isNorm != null and isNorm != ''">and IS_NORM = #{isNorm}</if>
  103. <if test="noNormNum != null and noNormNum != ''">and NO_NORM_NUM = #{noNormNum}</if>
  104. <if test="noNormNote != null and noNormNote != ''">and NO_NORM_NOTE = #{noNormNote}</if>
  105. <if test="isOplanPay != null and isOplanPay != ''">and IS_OPLAN_PAY = #{isOplanPay}</if>
  106. <if test="oplanNum != null and oplanNum != ''">and OPLAN_NUM = #{oplanNum}</if>
  107. <if test="oplanNote != null and oplanNote != ''">and OPLAN_NOTE = #{oplanNote}</if>
  108. <if test="isBuldPwt != null and isBuldPwt != ''">and IS_BULD_PWT = #{isBuldPwt}</if>
  109. <if test="isPubWtpl != null and isPubWtpl != ''">and IS_PUB_WTPL = #{isPubWtpl}</if>
  110. <if test="isPubPlan != null and isPubPlan != ''">and IS_PUB_PLAN = #{isPubPlan}</if>
  111. <if test="noPubNum != null and noPubNum != ''">and NO_PUB_NUM = #{noPubNum}</if>
  112. <if test="noPubNote != null and noPubNote != ''">and NO_PUB_NOTE = #{noPubNote}</if>
  113. <if test="isOplanApay != null and isOplanApay != ''">and IS_OPLAN_APAY = #{isOplanApay}</if>
  114. <if test="noOplanNum != null and noOplanNum != ''">and NO_OPLAN_NUM = #{noOplanNum}</if>
  115. <if test="noOplanNote != null and noOplanNote != ''">and NO_OPLAN_NOTE = #{noOplanNote}</if>
  116. <if test="isPipeLowc != null and isPipeLowc != ''">and IS_PIPE_LOWC = #{isPipeLowc}</if>
  117. <if test="isNwtInc != null and isNwtInc != ''">and IS_NWT_INC = #{isNwtInc}</if>
  118. <if test="isAddWt != null and isAddWt != ''">and IS_ADD_WT = #{isAddWt}</if>
  119. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  120. <if test="intm != null">and INTM = #{intm}</if>
  121. <if test="uptm != null">and UPTM = #{uptm}</if>
  122. <if test="state != null and state != ''">and STATE = #{state}</if>
  123. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  124. and DATA_STAT='0'
  125. </trim>
  126. </sql>
  127. <select id="get" resultMap="bisInspWrwsRgstrWtupResultMap" parameterType="String" >
  128. select <include refid="table_columns" /> from BIS_INSP_WRWS_RGSTR_WTUP where RGSTR_ID = #{id}
  129. </select>
  130. <select id="getBy" resultMap="bisInspWrwsRgstrWtupResultMap">
  131. select <include refid="table_columns" /> from BIS_INSP_WRWS_RGSTR_WTUP <include refid="page_where" />
  132. </select>
  133. <select id="findAll" resultMap="bisInspWrwsRgstrWtupResultMap">
  134. select <include refid="table_columns" /> from BIS_INSP_WRWS_RGSTR_WTUP
  135. </select>
  136. <select id="findList" resultMap="bisInspWrwsRgstrWtupResultMap">
  137. select <include refid="table_columns" /> from BIS_INSP_WRWS_RGSTR_WTUP <include refid="page_where" />
  138. </select>
  139. <select id="selectCount" resultType="int" >
  140. select count(ID) from BIS_INSP_WRWS_RGSTR_WTUP <include refid="page_where" />
  141. </select>
  142. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspWrwsRgstrWtup">
  143. insert into BIS_INSP_WRWS_RGSTR_WTUP( <include refid="table_columns" /> )
  144. values ( <include refid="entity_properties" /> )
  145. </insert>
  146. <delete id="delete" parameterType="java.lang.String">
  147. update BIS_INSP_WRWS_RGSTR_WTUP set DATA_STAT='9' where ID = #{id}
  148. </delete>
  149. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWrwsRgstrWtup">
  150. update BIS_INSP_WRWS_RGSTR_WTUP set DATA_STAT='9' <include refid="page_where" />
  151. </delete>
  152. <update id="deleteInFlag" parameterType="java.lang.String">
  153. update BIS_INSP_WRWS_RGSTR_WTUP set DATA_STAT = '9' where ID = #{id}
  154. </update>
  155. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspWrwsRgstrWtup">
  156. update BIS_INSP_WRWS_RGSTR_WTUP
  157. <trim prefix="set" suffixOverrides=",">
  158. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  159. <if test="isWtuIn != null and isWtuIn != ''">IS_WTU_IN = #{isWtuIn},</if>
  160. <if test="isPlanWt != null and isPlanWt != ''">IS_PLAN_WT = #{isPlanWt},</if>
  161. <if test="planWtNum != null and planWtNum != ''">PLAN_WT_NUM = #{planWtNum},</if>
  162. <if test="planWtNote != null and planWtNote != ''">PLAN_WT_NOTE = #{planWtNote},</if>
  163. <if test="isNorm != null and isNorm != ''">IS_NORM = #{isNorm},</if>
  164. <if test="noNormNum != null and noNormNum != ''">NO_NORM_NUM = #{noNormNum},</if>
  165. <if test="noNormNote != null and noNormNote != ''">NO_NORM_NOTE = #{noNormNote},</if>
  166. <if test="isOplanPay != null and isOplanPay != ''">IS_OPLAN_PAY = #{isOplanPay},</if>
  167. <if test="oplanNum != null and oplanNum != ''">OPLAN_NUM = #{oplanNum},</if>
  168. <if test="oplanNote != null and oplanNote != ''">OPLAN_NOTE = #{oplanNote},</if>
  169. <if test="isBuldPwt != null and isBuldPwt != ''">IS_BULD_PWT = #{isBuldPwt},</if>
  170. <if test="isPubWtpl != null and isPubWtpl != ''">IS_PUB_WTPL = #{isPubWtpl},</if>
  171. <if test="isPubPlan != null and isPubPlan != ''">IS_PUB_PLAN = #{isPubPlan},</if>
  172. <if test="noPubNum != null and noPubNum != ''">NO_PUB_NUM = #{noPubNum},</if>
  173. <if test="noPubNote != null and noPubNote != ''">NO_PUB_NOTE = #{noPubNote},</if>
  174. <if test="isOplanApay != null and isOplanApay != ''">IS_OPLAN_APAY = #{isOplanApay},</if>
  175. <if test="noOplanNum != null and noOplanNum != ''">NO_OPLAN_NUM = #{noOplanNum},</if>
  176. <if test="noOplanNote != null and noOplanNote != ''">NO_OPLAN_NOTE = #{noOplanNote},</if>
  177. <if test="isPipeLowc != null and isPipeLowc != ''">IS_PIPE_LOWC = #{isPipeLowc},</if>
  178. <if test="isNwtInc != null and isNwtInc != ''">IS_NWT_INC = #{isNwtInc},</if>
  179. <if test="isAddWt != null and isAddWt != ''">IS_ADD_WT = #{isAddWt},</if>
  180. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  181. <if test="intm != null">INTM = #{intm},</if>
  182. <if test="uptm != null">UPTM = #{uptm},</if>
  183. <if test="state != null and state != ''">STATE = #{state},</if>
  184. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  185. </trim>
  186. <where>ID = #{id}</where>
  187. </update>
  188. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWrwsRgstrWtup">
  189. update BIS_INSP_WRWS_RGSTR_WTUP
  190. <trim prefix="set" suffixOverrides=",">
  191. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  192. <if test="isWtuIn != null and isWtuIn != ''">IS_WTU_IN = #{isWtuIn},</if>
  193. <if test="isPlanWt != null and isPlanWt != ''">IS_PLAN_WT = #{isPlanWt},</if>
  194. <if test="planWtNum != null and planWtNum != ''">PLAN_WT_NUM = #{planWtNum},</if>
  195. <if test="planWtNote != null and planWtNote != ''">PLAN_WT_NOTE = #{planWtNote},</if>
  196. <if test="isNorm != null and isNorm != ''">IS_NORM = #{isNorm},</if>
  197. <if test="noNormNum != null and noNormNum != ''">NO_NORM_NUM = #{noNormNum},</if>
  198. <if test="noNormNote != null and noNormNote != ''">NO_NORM_NOTE = #{noNormNote},</if>
  199. <if test="isOplanPay != null and isOplanPay != ''">IS_OPLAN_PAY = #{isOplanPay},</if>
  200. <if test="oplanNum != null and oplanNum != ''">OPLAN_NUM = #{oplanNum},</if>
  201. <if test="oplanNote != null and oplanNote != ''">OPLAN_NOTE = #{oplanNote},</if>
  202. <if test="isBuldPwt != null and isBuldPwt != ''">IS_BULD_PWT = #{isBuldPwt},</if>
  203. <if test="isPubWtpl != null and isPubWtpl != ''">IS_PUB_WTPL = #{isPubWtpl},</if>
  204. <if test="isPubPlan != null and isPubPlan != ''">IS_PUB_PLAN = #{isPubPlan},</if>
  205. <if test="noPubNum != null and noPubNum != ''">NO_PUB_NUM = #{noPubNum},</if>
  206. <if test="noPubNote != null and noPubNote != ''">NO_PUB_NOTE = #{noPubNote},</if>
  207. <if test="isOplanApay != null and isOplanApay != ''">IS_OPLAN_APAY = #{isOplanApay},</if>
  208. <if test="noOplanNum != null and noOplanNum != ''">NO_OPLAN_NUM = #{noOplanNum},</if>
  209. <if test="noOplanNote != null and noOplanNote != ''">NO_OPLAN_NOTE = #{noOplanNote},</if>
  210. <if test="isPipeLowc != null and isPipeLowc != ''">IS_PIPE_LOWC = #{isPipeLowc},</if>
  211. <if test="isNwtInc != null and isNwtInc != ''">IS_NWT_INC = #{isNwtInc},</if>
  212. <if test="isAddWt != null and isAddWt != ''">IS_ADD_WT = #{isAddWt},</if>
  213. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  214. <if test="intm != null">INTM = #{intm},</if>
  215. <if test="uptm != null">UPTM = #{uptm},</if>
  216. <if test="state != null and state != ''">STATE = #{state},</if>
  217. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  218. </trim>
  219. <include refid="page_where" />
  220. </update>
  221. <!-- 其他自定义SQL -->
  222. </mapper>