BisInspWrwsRgstrWtutDao.xml 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  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.BisInspWrwsRgstrWtutDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspWrwsRgstrWtut" id="bisInspWrwsRgstrWtutResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="isBuldRptFit" column="IS_BULD_RPT_FIT"/>
  8. <result property="isCmpBook" column="IS_CMP_BOOK"/>
  9. <result property="isEqualCity" column="IS_EQUAL_CITY"/>
  10. <result property="isAllIn" column="IS_ALL_IN"/>
  11. <result property="noInNum" column="NO_IN_NUM"/>
  12. <result property="noInNote" column="NO_IN_NOTE"/>
  13. <result property="isFitBook" column="IS_FIT_BOOK"/>
  14. <result property="noFitNum" column="NO_FIT_NUM"/>
  15. <result property="noFitNote" column="NO_FIT_NOTE"/>
  16. <result property="persId" column="PERS_ID"/>
  17. <result property="intm" column="INTM"/>
  18. <result property="uptm" column="UPTM"/>
  19. <result property="state" column="STATE"/>
  20. <result property="dataStat" column="DATA_STAT"/>
  21. <result property="isInDir" column="IS_IN_DIR"/>
  22. <result property="isAllRgstr" column="IS_ALL_RGSTR"/>
  23. </resultMap>
  24. <sql id="table_columns">
  25. ID,
  26. RGSTR_ID,
  27. IS_BULD_RPT_FIT,
  28. IS_CMP_BOOK,
  29. IS_EQUAL_CITY,
  30. IS_ALL_IN,
  31. NO_IN_NUM,
  32. NO_IN_NOTE,
  33. IS_FIT_BOOK,
  34. NO_FIT_NUM,
  35. NO_FIT_NOTE,
  36. PERS_ID,
  37. INTM,
  38. UPTM,
  39. STATE,
  40. IS_IN_DIR,
  41. IS_ALL_RGSTR,
  42. DATA_STAT
  43. </sql>
  44. <sql id="entity_properties">
  45. #{id},
  46. #{rgstrId},
  47. #{isBuldRptFit},
  48. #{isCmpBook},
  49. #{isEqualCity},
  50. #{isAllIn},
  51. #{noInNum},
  52. #{noInNote},
  53. #{isFitBook},
  54. #{noFitNum},
  55. #{noFitNote},
  56. #{persId},
  57. #{intm},
  58. #{uptm},
  59. #{state},
  60. #{isInDir},
  61. #{isAllRgstr},
  62. #{dataStat}
  63. </sql>
  64. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  65. <sql id="page_where">
  66. <trim prefix="where" prefixOverrides="and | or ">
  67. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  68. <if test="isBuldRptFit != null and isBuldRptFit != ''">and IS_BULD_RPT_FIT = #{isBuldRptFit}</if>
  69. <if test="isCmpBook != null and isCmpBook != ''">and IS_CMP_BOOK = #{isCmpBook}</if>
  70. <if test="isEqualCity != null and isEqualCity != ''">and IS_EQUAL_CITY = #{isEqualCity}</if>
  71. <if test="isAllIn != null and isAllIn != ''">and IS_ALL_IN = #{isAllIn}</if>
  72. <if test="noInNum != null and noInNum != ''">and NO_IN_NUM = #{noInNum}</if>
  73. <if test="noInNote != null and noInNote != ''">and NO_IN_NOTE = #{noInNote}</if>
  74. <if test="isFitBook != null and isFitBook != ''">and IS_FIT_BOOK = #{isFitBook}</if>
  75. <if test="noFitNum != null and noFitNum != ''">and NO_FIT_NUM = #{noFitNum}</if>
  76. <if test="noFitNote != null and noFitNote != ''">and NO_FIT_NOTE = #{noFitNote}</if>
  77. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  78. <if test="intm != null">and INTM = #{intm}</if>
  79. <if test="uptm != null">and UPTM = #{uptm}</if>
  80. <if test="state != null and state != ''">and STATE = #{state}</if>
  81. <if test="isInDir != null and isInDir != ''">and IS_IN_DIR = #{isInDir}</if>
  82. <if test="isAllRgstr != null and isAllRgstr != ''">and IS_ALL_RGSTR = #{isAllRgstr}</if>
  83. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  84. and DATA_STAT='0'
  85. </trim>
  86. </sql>
  87. <select id="get" resultMap="bisInspWrwsRgstrWtutResultMap" parameterType="String" >
  88. select <include refid="table_columns" /> from BIS_INSP_WRWS_RGSTR_WTUT where RGSTR_ID = #{id}
  89. </select>
  90. <select id="getBy" resultMap="bisInspWrwsRgstrWtutResultMap">
  91. select <include refid="table_columns" /> from BIS_INSP_WRWS_RGSTR_WTUT <include refid="page_where" />
  92. </select>
  93. <select id="findAll" resultMap="bisInspWrwsRgstrWtutResultMap">
  94. select <include refid="table_columns" /> from BIS_INSP_WRWS_RGSTR_WTUT
  95. </select>
  96. <select id="findList" resultMap="bisInspWrwsRgstrWtutResultMap">
  97. select <include refid="table_columns" /> from BIS_INSP_WRWS_RGSTR_WTUT <include refid="page_where" />
  98. </select>
  99. <select id="selectCount" resultType="int" >
  100. select count(ID) from BIS_INSP_WRWS_RGSTR_WTUT <include refid="page_where" />
  101. </select>
  102. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspWrwsRgstrWtut">
  103. insert into BIS_INSP_WRWS_RGSTR_WTUT( <include refid="table_columns" /> )
  104. values ( <include refid="entity_properties" /> )
  105. </insert>
  106. <delete id="delete" parameterType="java.lang.String">
  107. update BIS_INSP_WRWS_RGSTR_WTUT set DATA_STAT='9' where ID = #{id}
  108. </delete>
  109. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWrwsRgstrWtut">
  110. update BIS_INSP_WRWS_RGSTR_WTUT set DATA_STAT='9' <include refid="page_where" />
  111. </delete>
  112. <update id="deleteInFlag" parameterType="java.lang.String">
  113. update BIS_INSP_WRWS_RGSTR_WTUT set DATA_STAT = '9' where ID = #{id}
  114. </update>
  115. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspWrwsRgstrWtut">
  116. update BIS_INSP_WRWS_RGSTR_WTUT
  117. <trim prefix="set" suffixOverrides=",">
  118. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  119. <if test="isBuldRptFit != null and isBuldRptFit != ''">IS_BULD_RPT_FIT = #{isBuldRptFit},</if>
  120. <if test="isCmpBook != null and isCmpBook != ''">IS_CMP_BOOK = #{isCmpBook},</if>
  121. <if test="isEqualCity != null and isEqualCity != ''">IS_EQUAL_CITY = #{isEqualCity},</if>
  122. <if test="isAllIn != null and isAllIn != ''">IS_ALL_IN = #{isAllIn},</if>
  123. <if test="noInNum != null and noInNum != ''">NO_IN_NUM = #{noInNum},</if>
  124. <if test="noInNote != null and noInNote != ''">NO_IN_NOTE = #{noInNote},</if>
  125. <if test="isFitBook != null and isFitBook != ''">IS_FIT_BOOK = #{isFitBook},</if>
  126. <if test="noFitNum != null and noFitNum != ''">NO_FIT_NUM = #{noFitNum},</if>
  127. <if test="noFitNote != null and noFitNote != ''">NO_FIT_NOTE = #{noFitNote},</if>
  128. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  129. <if test="intm != null">INTM = #{intm},</if>
  130. <if test="uptm != null">UPTM = #{uptm},</if>
  131. <if test="state != null and state != ''">STATE = #{state},</if>
  132. <if test="isInDir != null and isInDir != ''">IS_IN_DIR = #{isInDir},</if>
  133. <if test="isAllRgstr != null and isAllRgstr != ''">IS_ALL_RGSTR = #{isAllRgstr},</if>
  134. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  135. </trim>
  136. <where>ID = #{id}</where>
  137. </update>
  138. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWrwsRgstrWtut">
  139. update BIS_INSP_WRWS_RGSTR_WTUT
  140. <trim prefix="set" suffixOverrides=",">
  141. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  142. <if test="isBuldRptFit != null and isBuldRptFit != ''">IS_BULD_RPT_FIT = #{isBuldRptFit},</if>
  143. <if test="isCmpBook != null and isCmpBook != ''">IS_CMP_BOOK = #{isCmpBook},</if>
  144. <if test="isEqualCity != null and isEqualCity != ''">IS_EQUAL_CITY = #{isEqualCity},</if>
  145. <if test="isAllIn != null and isAllIn != ''">IS_ALL_IN = #{isAllIn},</if>
  146. <if test="noInNum != null and noInNum != ''">NO_IN_NUM = #{noInNum},</if>
  147. <if test="noInNote != null and noInNote != ''">NO_IN_NOTE = #{noInNote},</if>
  148. <if test="isFitBook != null and isFitBook != ''">IS_FIT_BOOK = #{isFitBook},</if>
  149. <if test="noFitNum != null and noFitNum != ''">NO_FIT_NUM = #{noFitNum},</if>
  150. <if test="noFitNote != null and noFitNote != ''">NO_FIT_NOTE = #{noFitNote},</if>
  151. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  152. <if test="intm != null">INTM = #{intm},</if>
  153. <if test="uptm != null">UPTM = #{uptm},</if>
  154. <if test="state != null and state != ''">STATE = #{state},</if>
  155. <if test="isInDir != null and isInDir != ''">IS_IN_DIR = #{isInDir},</if>
  156. <if test="isAllRgstr != null and isAllRgstr != ''">IS_ALL_RGSTR = #{isAllRgstr},</if>
  157. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  158. </trim>
  159. <include refid="page_where" />
  160. </update>
  161. <!-- 其他自定义SQL -->
  162. </mapper>