BisInspRssfdrRgstrBuildDao.xml 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  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.BisInspRssfdrRgstrBuildDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspRssfdrRgstrBuild" id="bisInspRssfdrRgstrBuildResultMap">
  5. <result property="buildUnit" column="BUILD_UNIT" />
  6. <result property="buildStat" column="BUILD_STAT" />
  7. <result property="isFlrpra" column="IS_FLRPRA" />
  8. <result property="pblmIsOver" column="PBLM_IS_OVER" />
  9. <result property="rectIsCmit" column="RECT_IS_CMIT" />
  10. <result property="isCrwttl" column="IS_CRWTTL" />
  11. <result property="isCa" column="IS_CA" />
  12. <result property="note" column="NOTE" />
  13. <result property="fillUnit" column="FILL_UNIT" />
  14. <result property="fillPers" column="FILL_PERS" />
  15. <result property="fillChkPers" column="FILL_CHK_PERS" />
  16. <result property="fillTel" column="FILL_TEL" />
  17. <result property="fillTm" column="FILL_TM" />
  18. <result property="status" column="STATUS"/>
  19. <result property="recPersId" column="REC_PERS_ID" />
  20. <result property="intm" column="INTM" />
  21. <result property="uptm" column="UPTM" />
  22. <result property="id" column="ID" />
  23. <result property="rgstrId" column="RGSTR_ID" />
  24. </resultMap>
  25. <sql id="table_columns">
  26. BUILD_UNIT,
  27. BUILD_STAT,
  28. IS_FLRPRA,
  29. PBLM_IS_OVER,
  30. RECT_IS_CMIT,
  31. IS_CRWTTL,
  32. IS_CA,
  33. NOTE,
  34. FILL_UNIT,
  35. FILL_PERS,
  36. FILL_CHK_PERS,
  37. FILL_TEL,
  38. FILL_TM,
  39. STATUS,
  40. REC_PERS_ID,
  41. INTM,
  42. UPTM,
  43. ID,
  44. RGSTR_ID
  45. </sql>
  46. <sql id="entity_properties">
  47. #{buildUnit},
  48. #{buildStat},
  49. #{isFlrpra},
  50. #{pblmIsOver},
  51. #{rectIsCmit},
  52. #{isCrwttl},
  53. #{isCa},
  54. #{note},
  55. #{fillUnit},
  56. #{fillPers},
  57. #{fillChkPers},
  58. #{fillTel},
  59. #{fillTm},
  60. #{status},
  61. #{recPersId},
  62. #{intm},
  63. #{uptm},
  64. #{id},
  65. #{rgstrId}
  66. </sql>
  67. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  68. <sql id="page_where">
  69. <trim prefix="where" prefixOverrides="and | or ">
  70. <if test="buildStat != null and buildStat != ''">and BUILD_STAT = #{buildStat}</if>
  71. <if test="isFlrpra != null and isFlrpra != ''">and IS_FLRPRA = #{isFlrpra}</if>
  72. <if test="pblmIsOver != null and pblmIsOver != ''">and PBLM_IS_OVER = #{pblmIsOver}</if>
  73. <if test="rectIsCmit != null and rectIsCmit != ''">and RECT_IS_CMIT = #{rectIsCmit}</if>
  74. <if test="isCrwttl != null and isCrwttl != ''">and IS_CRWTTL = #{isCrwttl}</if>
  75. <if test="isCa != null and isCa != ''">and IS_CA = #{isCa}</if>
  76. <if test="note != null and note != ''">and NOTE = #{note}</if>
  77. <if test="fillUnit != null and fillUnit != ''">and FILL_UNIT = #{fillUnit}</if>
  78. <if test="fillPers != null and fillPers != ''">and FILL_PERS = #{fillPers}</if>
  79. <if test="fillChkPers != null and fillChkPers != ''">and FILL_CHK_PERS = #{fillChkPers}</if>
  80. <if test="fillTel != null and fillTel != ''">and FILL_TEL = #{fillTel}</if>
  81. <if test="fillTm != null">and FILL_TM = #{fillTm}</if>
  82. <if test="status != null and status != ''">and STATUS = #{status}</if>
  83. <if test="recPersId != null and recPersId != ''">and REC_PERS_ID = #{recPersId}</if>
  84. <if test="intm != null">and INTM = #{intm}</if>
  85. <if test="uptm != null">and UPTM = #{uptm}</if>
  86. <if test="id != null and id != ''">and ID = #{id}</if>
  87. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  88. </trim>
  89. </sql>
  90. <select id="get" resultMap="bisInspRssfdrRgstrBuildResultMap" parameterType="String" >
  91. select <include refid="table_columns" /> from BIS_INSP_RSSFDR_RGSTR_BUILD where ID = #{id}
  92. </select>
  93. <select id="getBy" resultMap="bisInspRssfdrRgstrBuildResultMap">
  94. select <include refid="table_columns" /> from BIS_INSP_RSSFDR_RGSTR_BUILD <include refid="page_where" />
  95. </select>
  96. <select id="findAll" resultMap="bisInspRssfdrRgstrBuildResultMap">
  97. select <include refid="table_columns" /> from BIS_INSP_RSSFDR_RGSTR_BUILD
  98. </select>
  99. <select id="findList" resultMap="bisInspRssfdrRgstrBuildResultMap">
  100. select <include refid="table_columns" /> from BIS_INSP_RSSFDR_RGSTR_BUILD <include refid="page_where" />
  101. </select>
  102. <select id="selectCount" resultType="int" >
  103. select count(ID) from BIS_INSP_RSSFDR_RGSTR_BUILD <include refid="page_where" />
  104. </select>
  105. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspRssfdrRgstrBuild">
  106. insert into BIS_INSP_RSSFDR_RGSTR_BUILD( <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_RSSFDR_RGSTR_BUILD where ID = #{id}
  111. </delete>
  112. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRssfdrRgstrBuild">
  113. delete from BIS_INSP_RSSFDR_RGSTR_BUILD <include refid="page_where" />
  114. </delete>
  115. <update id="deleteInFlag" parameterType="java.lang.String">
  116. update BIS_INSP_RSSFDR_RGSTR_BUILD set flag_valid = 0 where>ID = #{id}
  117. </update>
  118. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspRssfdrRgstrBuild">
  119. update BIS_INSP_RSSFDR_RGSTR_BUILD
  120. <trim prefix="set" suffixOverrides=",">
  121. <if test="buildStat != null and buildStat != ''">BUILD_STAT = #{buildStat},</if>
  122. <if test="isFlrpra != null and isFlrpra != ''">IS_FLRPRA = #{isFlrpra},</if>
  123. <if test="pblmIsOver != null and pblmIsOver != ''">PBLM_IS_OVER = #{pblmIsOver},</if>
  124. <if test="rectIsCmit != null and rectIsCmit != ''">RECT_IS_CMIT = #{rectIsCmit},</if>
  125. <if test="isCrwttl != null and isCrwttl != ''">IS_CRWTTL = #{isCrwttl},</if>
  126. <if test="isCa != null and isCa != ''">IS_CA = #{isCa},</if>
  127. <if test="note != null and note != ''">NOTE = #{note},</if>
  128. <if test="fillUnit != null and fillUnit != ''">FILL_UNIT = #{fillUnit},</if>
  129. <if test="fillPers != null and fillPers != ''">FILL_PERS = #{fillPers},</if>
  130. <if test="fillChkPers != null and fillChkPers != ''">FILL_CHK_PERS = #{fillChkPers},</if>
  131. <if test="fillTel != null and fillTel != ''">FILL_TEL = #{fillTel},</if>
  132. <if test="fillTm != null">FILL_TM = #{fillTm},</if>
  133. <if test="status != null and status != ''">STATUS = #{status},</if>
  134. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  135. <if test="intm != null">INTM = #{intm},</if>
  136. <if test="uptm != null">UPTM = #{uptm},</if>
  137. <if test="id != null and id != ''">ID = #{id},</if>
  138. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  139. </trim>
  140. <where>ID = #{id}</where>
  141. </update>
  142. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRssfdrRgstrBuild">
  143. update BIS_INSP_RSSFDR_RGSTR_BUILD
  144. <trim prefix="set" suffixOverrides=",">
  145. <if test="buildStat != null and buildStat != ''">BUILD_STAT = #{buildStat},</if>
  146. <if test="isFlrpra != null and isFlrpra != ''">IS_FLRPRA = #{isFlrpra},</if>
  147. <if test="pblmIsOver != null and pblmIsOver != ''">PBLM_IS_OVER = #{pblmIsOver},</if>
  148. <if test="rectIsCmit != null and rectIsCmit != ''">RECT_IS_CMIT = #{rectIsCmit},</if>
  149. <if test="isCrwttl != null and isCrwttl != ''">IS_CRWTTL = #{isCrwttl},</if>
  150. <if test="isCa != null and isCa != ''">IS_CA = #{isCa},</if>
  151. <if test="note != null and note != ''">NOTE = #{note},</if>
  152. <if test="fillUnit != null and fillUnit != ''">FILL_UNIT = #{fillUnit},</if>
  153. <if test="fillPers != null and fillPers != ''">FILL_PERS = #{fillPers},</if>
  154. <if test="fillChkPers != null and fillChkPers != ''">FILL_CHK_PERS = #{fillChkPers},</if>
  155. <if test="fillTel != null and fillTel != ''">FILL_TEL = #{fillTel},</if>
  156. <if test="fillTm != null">FILL_TM = #{fillTm},</if>
  157. <if test="status != null and status != ''">STATUS = #{status},</if>
  158. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  159. <if test="intm != null">INTM = #{intm},</if>
  160. <if test="uptm != null">UPTM = #{uptm},</if>
  161. <if test="id != null and id != ''">ID = #{id},</if>
  162. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  163. </trim>
  164. <include refid="page_where" />
  165. </update>
  166. <!-- 其他自定义SQL -->
  167. </mapper>