BisInspSvwtWuntRgstrWsuswDao.xml 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  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.BisInspSvwtWuntRgstrWsuswDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspSvwtWuntRgstrWsusw" id="bisInspSvwtWuntRgstrWsuswResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="gtWsuDt" column="GT_WSU_DT"/>
  8. <result property="isWsuDtRev" column="IS_WSU_DT_REV"/>
  9. <result property="wsuDtRevDt" column="WSU_DT_REV_DT"/>
  10. <result property="isBuldWcms" column="IS_BULD_WCMS"/>
  11. <result property="isExpWmp" column="IS_EXP_WMP"/>
  12. <result property="isPutWsphwsss" column="IS_PUT_WSPHWSSS"/>
  13. <result property="isOalWcpea" column="IS_OAL_WCPEA"/>
  14. <result property="isWbt" column="IS_WBT"/>
  15. <result property="isHasSdeWea" column="IS_HAS_SDE_WEA"/>
  16. <result property="isHasRad" column="IS_HAS_RAD"/>
  17. <result property="isHasRcauWrorf" column="IS_HAS_RCAU_WRORF"/>
  18. <result property="oth" column="OTH"/>
  19. <result property="persId" column="PERS_ID"/>
  20. <result property="inTm" column="IN_TM"/>
  21. <result property="upTm" column="UP_TM"/>
  22. <result property="dataStat" column="DATA_STAT"/>
  23. <result property="wsuRa" column="WSU_RA"/>
  24. </resultMap>
  25. <sql id="table_columns">
  26. ID,
  27. RGSTR_ID,
  28. GT_WSU_DT,
  29. IS_WSU_DT_REV,
  30. WSU_DT_REV_DT,
  31. IS_BULD_WCMS,
  32. IS_EXP_WMP,
  33. IS_PUT_WSPHWSSS,
  34. IS_OAL_WCPEA,
  35. IS_WBT,
  36. IS_HAS_SDE_WEA,
  37. IS_HAS_RAD,
  38. IS_HAS_RCAU_WRORF,
  39. OTH,
  40. PERS_ID,
  41. IN_TM,
  42. UP_TM,
  43. DATA_STAT,
  44. WSU_RA
  45. </sql>
  46. <sql id="entity_properties">
  47. #{id},
  48. #{rgstrId},
  49. #{gtWsuDt},
  50. #{isWsuDtRev},
  51. #{wsuDtRevDt},
  52. #{isBuldWcms},
  53. #{isExpWmp},
  54. #{isPutWsphwsss},
  55. #{isOalWcpea},
  56. #{isWbt},
  57. #{isHasSdeWea},
  58. #{isHasRad},
  59. #{isHasRcauWrorf},
  60. #{oth},
  61. #{persId},
  62. #{inTm},
  63. #{upTm},
  64. #{dataStat},
  65. #{wsuRa}
  66. </sql>
  67. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  68. <sql id="page_where">
  69. <trim prefix="where" prefixOverrides="and | or ">
  70. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  71. <if test="gtWsuDt != null">and GT_WSU_DT = #{gtWsuDt}</if>
  72. <if test="isWsuDtRev != null and isWsuDtRev != ''">and IS_WSU_DT_REV = #{isWsuDtRev}</if>
  73. <if test="wsuDtRevDt != null">and WSU_DT_REV_DT = #{wsuDtRevDt}</if>
  74. <if test="isBuldWcms != null and isBuldWcms != ''">and IS_BULD_WCMS = #{isBuldWcms}</if>
  75. <if test="isExpWmp != null and isExpWmp != ''">and IS_EXP_WMP = #{isExpWmp}</if>
  76. <if test="isPutWsphwsss != null and isPutWsphwsss != ''">and IS_PUT_WSPHWSSS = #{isPutWsphwsss}</if>
  77. <if test="isOalWcpea != null and isOalWcpea != ''">and IS_OAL_WCPEA = #{isOalWcpea}</if>
  78. <if test="isWbt != null and isWbt != ''">and IS_WBT = #{isWbt}</if>
  79. <if test="isHasSdeWea != null and isHasSdeWea != ''">and IS_HAS_SDE_WEA = #{isHasSdeWea}</if>
  80. <if test="isHasRad != null and isHasRad != ''">and IS_HAS_RAD = #{isHasRad}</if>
  81. <if test="isHasRcauWrorf != null and isHasRcauWrorf != ''">and IS_HAS_RCAU_WRORF = #{isHasRcauWrorf}</if>
  82. <if test="oth != null and oth != ''">and OTH = #{oth}</if>
  83. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  84. <if test="inTm != null">and IN_TM = #{inTm}</if>
  85. <if test="upTm != null">and UP_TM = #{upTm}</if>
  86. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  87. <if test="wsuRa != null and wsuRa != ''">and WSU_RA = #{wsuRa}</if>
  88. </trim>
  89. </sql>
  90. <select id="get" resultMap="bisInspSvwtWuntRgstrWsuswResultMap" parameterType="String" >
  91. select <include refid="table_columns" /> from BIS_INSP_SVWT_WUNT_RGSTR_WSUSW where ID = #{id}
  92. </select>
  93. <select id="getBy" resultMap="bisInspSvwtWuntRgstrWsuswResultMap">
  94. select <include refid="table_columns" /> from BIS_INSP_SVWT_WUNT_RGSTR_WSUSW <include refid="page_where" />
  95. </select>
  96. <select id="findAll" resultMap="bisInspSvwtWuntRgstrWsuswResultMap">
  97. select <include refid="table_columns" /> from BIS_INSP_SVWT_WUNT_RGSTR_WSUSW
  98. </select>
  99. <select id="findList" resultMap="bisInspSvwtWuntRgstrWsuswResultMap">
  100. select <include refid="table_columns" /> from BIS_INSP_SVWT_WUNT_RGSTR_WSUSW <include refid="page_where" />
  101. </select>
  102. <select id="selectCount" resultType="int" >
  103. select count(ID) from BIS_INSP_SVWT_WUNT_RGSTR_WSUSW <include refid="page_where" />
  104. </select>
  105. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspSvwtWuntRgstrWsusw">
  106. insert into BIS_INSP_SVWT_WUNT_RGSTR_WSUSW( <include refid="table_columns" /> )
  107. values ( <include refid="entity_properties" /> )
  108. </insert>
  109. <delete id="delete" parameterType="java.lang.String">
  110. delete from BIS_INSP_SVWT_WUNT_RGSTR_WSUSW where ID = #{id}
  111. </delete>
  112. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspSvwtWuntRgstrWsusw">
  113. delete from BIS_INSP_SVWT_WUNT_RGSTR_WSUSW <include refid="page_where" />
  114. </delete>
  115. <update id="deleteInFlag" parameterType="java.lang.String">
  116. update BIS_INSP_SVWT_WUNT_RGSTR_WSUSW set flag_valid = 0 where ID = #{id}
  117. </update>
  118. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspSvwtWuntRgstrWsusw">
  119. update BIS_INSP_SVWT_WUNT_RGSTR_WSUSW
  120. <trim prefix="set" suffixOverrides=",">
  121. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  122. <if test="gtWsuDt != null">GT_WSU_DT = #{gtWsuDt},</if>
  123. <if test="isWsuDtRev != null and isWsuDtRev != ''">IS_WSU_DT_REV = #{isWsuDtRev},</if>
  124. <if test="wsuDtRevDt != null">WSU_DT_REV_DT = #{wsuDtRevDt},</if>
  125. <if test="isBuldWcms != null and isBuldWcms != ''">IS_BULD_WCMS = #{isBuldWcms},</if>
  126. <if test="isExpWmp != null and isExpWmp != ''">IS_EXP_WMP = #{isExpWmp},</if>
  127. <if test="isPutWsphwsss != null and isPutWsphwsss != ''">IS_PUT_WSPHWSSS = #{isPutWsphwsss},</if>
  128. <if test="isOalWcpea != null and isOalWcpea != ''">IS_OAL_WCPEA = #{isOalWcpea},</if>
  129. <if test="isWbt != null and isWbt != ''">IS_WBT = #{isWbt},</if>
  130. <if test="isHasSdeWea != null and isHasSdeWea != ''">IS_HAS_SDE_WEA = #{isHasSdeWea},</if>
  131. <if test="isHasRad != null and isHasRad != ''">IS_HAS_RAD = #{isHasRad},</if>
  132. <if test="isHasRcauWrorf != null and isHasRcauWrorf != ''">IS_HAS_RCAU_WRORF = #{isHasRcauWrorf},</if>
  133. <if test="oth != null">OTH = #{oth},</if>
  134. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  135. <if test="inTm != null">IN_TM = #{inTm},</if>
  136. <if test="upTm != null">UP_TM = #{upTm},</if>
  137. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  138. <if test="wsuRa != null and wsuRa != ''">WSU_RA = #{wsuRa},</if>
  139. </trim>
  140. <where>ID = #{id}</where>
  141. </update>
  142. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspSvwtWuntRgstrWsusw">
  143. update BIS_INSP_SVWT_WUNT_RGSTR_WSUSW
  144. <trim prefix="set" suffixOverrides=",">
  145. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  146. <if test="gtWsuDt != null">GT_WSU_DT = #{gtWsuDt},</if>
  147. <if test="isWsuDtRev != null and isWsuDtRev != ''">IS_WSU_DT_REV = #{isWsuDtRev},</if>
  148. <if test="wsuDtRevDt != null">WSU_DT_REV_DT = #{wsuDtRevDt},</if>
  149. <if test="isBuldWcms != null and isBuldWcms != ''">IS_BULD_WCMS = #{isBuldWcms},</if>
  150. <if test="isExpWmp != null and isExpWmp != ''">IS_EXP_WMP = #{isExpWmp},</if>
  151. <if test="isPutWsphwsss != null and isPutWsphwsss != ''">IS_PUT_WSPHWSSS = #{isPutWsphwsss},</if>
  152. <if test="isOalWcpea != null and isOalWcpea != ''">IS_OAL_WCPEA = #{isOalWcpea},</if>
  153. <if test="isWbt != null and isWbt != ''">IS_WBT = #{isWbt},</if>
  154. <if test="isHasSdeWea != null and isHasSdeWea != ''">IS_HAS_SDE_WEA = #{isHasSdeWea},</if>
  155. <if test="isHasRad != null and isHasRad != ''">IS_HAS_RAD = #{isHasRad},</if>
  156. <if test="isHasRcauWrorf != null and isHasRcauWrorf != ''">IS_HAS_RCAU_WRORF = #{isHasRcauWrorf},</if>
  157. <if test="oth != null">OTH = #{oth},</if>
  158. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  159. <if test="inTm != null">IN_TM = #{inTm},</if>
  160. <if test="upTm != null">UP_TM = #{upTm},</if>
  161. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  162. <if test="wsuRa != null and wsuRa != ''">WSU_RA = #{wsuRa},</if>
  163. </trim>
  164. <include refid="page_where" />
  165. </update>
  166. <!-- 其他自定义SQL -->
  167. </mapper>