BisInspWrwxRgstrWgDao.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  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.BisInspWrwxRgstrWgDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspWrwxRgstrWg" id="bisInspWrwxRgstrWgResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="isRunBuild" column="IS_RUN_BUILD"/>
  8. <result property="noItemName" column="NO_ITEM_NAME"/>
  9. <result property="isCntAss" column="IS_CNT_ASS"/>
  10. <result property="noCntAssRprt" column="NO_CNT_ASS_RPRT"/>
  11. <result property="isLgt" column="IS_LGT"/>
  12. <result property="noLgtNote" column="NO_LGT_NOTE"/>
  13. <result property="isUvrApp" column="IS_UVR_APP"/>
  14. <result property="noUvrName" column="NO_UVR_NAME"/>
  15. <result property="isChgApp" column="IS_CHG_APP"/>
  16. <result property="noChgAppName" column="NO_CHG_APP_NAME"/>
  17. <result property="rvLcpNum" column="RV_LCP_NUM"/>
  18. <result property="msuNum" column="MSU_NUM"/>
  19. <result property="wtDepNum" column="WT_DEP_NUM"/>
  20. <result property="buldMsuNum" column="BULD_MSU_NUM"/>
  21. <result property="isClltFullPay" column="IS_CLLT_FULL_PAY"/>
  22. <result property="noFullPayName" column="NO_FULL_PAY_NAME"/>
  23. <result property="isClltTmPay" column="IS_CLLT_TM_PAY"/>
  24. <result property="noWtuName" column="NO_WTU_NAME"/>
  25. <result property="isWtuBook" column="IS_WTU_BOOK"/>
  26. <result property="persId" column="PERS_ID"/>
  27. <result property="intm" column="INTM"/>
  28. <result property="uptm" column="UPTM"/>
  29. <result property="state" column="STATE"/>
  30. <result property="dataStat" column="DATA_STAT"/>
  31. </resultMap>
  32. <sql id="table_columns">
  33. ID,
  34. RGSTR_ID,
  35. IS_RUN_BUILD,
  36. NO_ITEM_NAME,
  37. IS_CNT_ASS,
  38. NO_CNT_ASS_RPRT,
  39. IS_LGT,
  40. NO_LGT_NOTE,
  41. IS_UVR_APP,
  42. NO_UVR_NAME,
  43. IS_CHG_APP,
  44. NO_CHG_APP_NAME,
  45. RV_LCP_NUM,
  46. MSU_NUM,
  47. WT_DEP_NUM,
  48. BULD_MSU_NUM,
  49. IS_CLLT_FULL_PAY,
  50. NO_FULL_PAY_NAME,
  51. IS_CLLT_TM_PAY,
  52. NO_WTU_NAME,
  53. IS_WTU_BOOK,
  54. PERS_ID,
  55. INTM,
  56. UPTM,
  57. STATE,
  58. DATA_STAT
  59. </sql>
  60. <sql id="entity_properties">
  61. #{id},
  62. #{rgstrId},
  63. #{isRunBuild},
  64. #{noItemName},
  65. #{isCntAss},
  66. #{noCntAssRprt},
  67. #{isLgt},
  68. #{noLgtNote},
  69. #{isUvrApp},
  70. #{noUvrName},
  71. #{isChgApp},
  72. #{noChgAppName},
  73. #{rvLcpNum},
  74. #{msuNum},
  75. #{wtDepNum},
  76. #{buldMsuNum},
  77. #{isClltFullPay},
  78. #{noFullPayName},
  79. #{isClltTmPay},
  80. #{noWtuName},
  81. #{isWtuBook},
  82. #{persId},
  83. #{intm},
  84. #{uptm},
  85. #{state},
  86. #{dataStat}
  87. </sql>
  88. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  89. <sql id="page_where">
  90. <trim prefix="where" prefixOverrides="and | or ">
  91. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  92. <if test="isRunBuild != null and isRunBuild != ''">and IS_RUN_BUILD = #{isRunBuild}</if>
  93. <if test="noItemName != null and noItemName != ''">and NO_ITEM_NAME = #{noItemName}</if>
  94. <if test="isCntAss != null and isCntAss != ''">and IS_CNT_ASS = #{isCntAss}</if>
  95. <if test="noCntAssRprt != null and noCntAssRprt != ''">and NO_CNT_ASS_RPRT = #{noCntAssRprt}</if>
  96. <if test="isLgt != null and isLgt != ''">and IS_LGT = #{isLgt}</if>
  97. <if test="noLgtNote != null and noLgtNote != ''">and NO_LGT_NOTE = #{noLgtNote}</if>
  98. <if test="isUvrApp != null and isUvrApp != ''">and IS_UVR_APP = #{isUvrApp}</if>
  99. <if test="noUvrName != null and noUvrName != ''">and NO_UVR_NAME = #{noUvrName}</if>
  100. <if test="isChgApp != null and isChgApp != ''">and IS_CHG_APP = #{isChgApp}</if>
  101. <if test="noChgAppName != null and noChgAppName != ''">and NO_CHG_APP_NAME = #{noChgAppName}</if>
  102. <if test="rvLcpNum != null and rvLcpNum != ''">and RV_LCP_NUM = #{rvLcpNum}</if>
  103. <if test="msuNum != null and msuNum != ''">and MSU_NUM = #{msuNum}</if>
  104. <if test="wtDepNum != null and wtDepNum != ''">and WT_DEP_NUM = #{wtDepNum}</if>
  105. <if test="buldMsuNum != null and buldMsuNum != ''">and BULD_MSU_NUM = #{buldMsuNum}</if>
  106. <if test="isClltFullPay != null and isClltFullPay != ''">and IS_CLLT_FULL_PAY = #{isClltFullPay}</if>
  107. <if test="noFullPayName != null and noFullPayName != ''">and NO_FULL_PAY_NAME = #{noFullPayName}</if>
  108. <if test="isClltTmPay != null and isClltTmPay != ''">and IS_CLLT_TM_PAY = #{isClltTmPay}</if>
  109. <if test="noWtuName != null and noWtuName != ''">and NO_WTU_NAME = #{noWtuName}</if>
  110. <if test="isWtuBook != null and isWtuBook != ''">and IS_WTU_BOOK = #{isWtuBook}</if>
  111. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  112. <if test="intm != null">and INTM = #{intm}</if>
  113. <if test="uptm != null">and UPTM = #{uptm}</if>
  114. <if test="state != null and state != ''">and STATE = #{state}</if>
  115. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  116. and DATA_STAT='0'
  117. </trim>
  118. </sql>
  119. <select id="get" resultMap="bisInspWrwxRgstrWgResultMap" parameterType="String" >
  120. select <include refid="table_columns" /> from BIS_INSP_WRWX_RGSTR_WG where RGSTR_ID = #{id}
  121. </select>
  122. <select id="getBy" resultMap="bisInspWrwxRgstrWgResultMap">
  123. select <include refid="table_columns" /> from BIS_INSP_WRWX_RGSTR_WG <include refid="page_where" />
  124. </select>
  125. <select id="findAll" resultMap="bisInspWrwxRgstrWgResultMap">
  126. select <include refid="table_columns" /> from BIS_INSP_WRWX_RGSTR_WG
  127. </select>
  128. <select id="findList" resultMap="bisInspWrwxRgstrWgResultMap">
  129. select <include refid="table_columns" /> from BIS_INSP_WRWX_RGSTR_WG <include refid="page_where" />
  130. </select>
  131. <select id="selectCount" resultType="int" >
  132. select count(ID) from BIS_INSP_WRWX_RGSTR_WG <include refid="page_where" />
  133. </select>
  134. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspWrwxRgstrWg">
  135. insert into BIS_INSP_WRWX_RGSTR_WG( <include refid="table_columns" /> )
  136. values ( <include refid="entity_properties" /> )
  137. </insert>
  138. <delete id="delete" parameterType="java.lang.String">
  139. update BIS_INSP_WRWX_RGSTR_WG set DATA_STAT='9' where ID = #{id}
  140. </delete>
  141. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWrwxRgstrWg">
  142. update BIS_INSP_WRWX_RGSTR_WG set DATA_STAT='9' <include refid="page_where" />
  143. </delete>
  144. <update id="deleteInFlag" parameterType="java.lang.String">
  145. update BIS_INSP_WRWX_RGSTR_WG set DATA_STAT = '9' where ID = #{id}
  146. </update>
  147. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspWrwxRgstrWg">
  148. update BIS_INSP_WRWX_RGSTR_WG
  149. <trim prefix="set" suffixOverrides=",">
  150. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  151. <if test="isRunBuild != null and isRunBuild != ''">IS_RUN_BUILD = #{isRunBuild},</if>
  152. <if test="noItemName != null and noItemName != ''">NO_ITEM_NAME = #{noItemName},</if>
  153. <if test="isCntAss != null and isCntAss != ''">IS_CNT_ASS = #{isCntAss},</if>
  154. <if test="noCntAssRprt != null and noCntAssRprt != ''">NO_CNT_ASS_RPRT = #{noCntAssRprt},</if>
  155. <if test="isLgt != null and isLgt != ''">IS_LGT = #{isLgt},</if>
  156. <if test="noLgtNote != null and noLgtNote != ''">NO_LGT_NOTE = #{noLgtNote},</if>
  157. <if test="isUvrApp != null and isUvrApp != ''">IS_UVR_APP = #{isUvrApp},</if>
  158. <if test="noUvrName != null and noUvrName != ''">NO_UVR_NAME = #{noUvrName},</if>
  159. <if test="isChgApp != null and isChgApp != ''">IS_CHG_APP = #{isChgApp},</if>
  160. <if test="noChgAppName != null and noChgAppName != ''">NO_CHG_APP_NAME = #{noChgAppName},</if>
  161. <if test="rvLcpNum != null and rvLcpNum != ''">RV_LCP_NUM = #{rvLcpNum},</if>
  162. <if test="msuNum != null and msuNum != ''">MSU_NUM = #{msuNum},</if>
  163. <if test="wtDepNum != null and wtDepNum != ''">WT_DEP_NUM = #{wtDepNum},</if>
  164. <if test="buldMsuNum != null and buldMsuNum != ''">BULD_MSU_NUM = #{buldMsuNum},</if>
  165. <if test="isClltFullPay != null and isClltFullPay != ''">IS_CLLT_FULL_PAY = #{isClltFullPay},</if>
  166. <if test="noFullPayName != null and noFullPayName != ''">NO_FULL_PAY_NAME = #{noFullPayName},</if>
  167. <if test="isClltTmPay != null and isClltTmPay != ''">IS_CLLT_TM_PAY = #{isClltTmPay},</if>
  168. <if test="noWtuName != null and noWtuName != ''">NO_WTU_NAME = #{noWtuName},</if>
  169. <if test="isWtuBook != null and isWtuBook != ''">IS_WTU_BOOK = #{isWtuBook},</if>
  170. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  171. <if test="intm != null">INTM = #{intm},</if>
  172. <if test="uptm != null">UPTM = #{uptm},</if>
  173. <if test="state != null and state != ''">STATE = #{state},</if>
  174. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  175. </trim>
  176. <where>ID = #{id}</where>
  177. </update>
  178. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWrwxRgstrWg">
  179. update BIS_INSP_WRWX_RGSTR_WG
  180. <trim prefix="set" suffixOverrides=",">
  181. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  182. <if test="isRunBuild != null and isRunBuild != ''">IS_RUN_BUILD = #{isRunBuild},</if>
  183. <if test="noItemName != null and noItemName != ''">NO_ITEM_NAME = #{noItemName},</if>
  184. <if test="isCntAss != null and isCntAss != ''">IS_CNT_ASS = #{isCntAss},</if>
  185. <if test="noCntAssRprt != null and noCntAssRprt != ''">NO_CNT_ASS_RPRT = #{noCntAssRprt},</if>
  186. <if test="isLgt != null and isLgt != ''">IS_LGT = #{isLgt},</if>
  187. <if test="noLgtNote != null and noLgtNote != ''">NO_LGT_NOTE = #{noLgtNote},</if>
  188. <if test="isUvrApp != null and isUvrApp != ''">IS_UVR_APP = #{isUvrApp},</if>
  189. <if test="noUvrName != null and noUvrName != ''">NO_UVR_NAME = #{noUvrName},</if>
  190. <if test="isChgApp != null and isChgApp != ''">IS_CHG_APP = #{isChgApp},</if>
  191. <if test="noChgAppName != null and noChgAppName != ''">NO_CHG_APP_NAME = #{noChgAppName},</if>
  192. <if test="rvLcpNum != null and rvLcpNum != ''">RV_LCP_NUM = #{rvLcpNum},</if>
  193. <if test="msuNum != null and msuNum != ''">MSU_NUM = #{msuNum},</if>
  194. <if test="wtDepNum != null and wtDepNum != ''">WT_DEP_NUM = #{wtDepNum},</if>
  195. <if test="buldMsuNum != null and buldMsuNum != ''">BULD_MSU_NUM = #{buldMsuNum},</if>
  196. <if test="isClltFullPay != null and isClltFullPay != ''">IS_CLLT_FULL_PAY = #{isClltFullPay},</if>
  197. <if test="noFullPayName != null and noFullPayName != ''">NO_FULL_PAY_NAME = #{noFullPayName},</if>
  198. <if test="isClltTmPay != null and isClltTmPay != ''">IS_CLLT_TM_PAY = #{isClltTmPay},</if>
  199. <if test="noWtuName != null and noWtuName != ''">NO_WTU_NAME = #{noWtuName},</if>
  200. <if test="isWtuBook != null and isWtuBook != ''">IS_WTU_BOOK = #{isWtuBook},</if>
  201. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  202. <if test="intm != null">INTM = #{intm},</if>
  203. <if test="uptm != null">UPTM = #{uptm},</if>
  204. <if test="state != null and state != ''">STATE = #{state},</if>
  205. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  206. </trim>
  207. <include refid="page_where" />
  208. </update>
  209. <!-- 其他自定义SQL -->
  210. </mapper>