BisInspRsmlRgstrPresDao.xml 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  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.BisInspRsmlRgstrPresDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspRsmlRgstrPres" id="bisInspRsmlRgstrPresResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="isClearPers" column="IS_CLEAR_PERS"/>
  8. <result property="wiunWaoLegPers" column="WIUN_WAO_LEG_PERS"/>
  9. <result property="wiunWaoLegPersTel" column="WIUN_WAO_LEG_PERS_TEL"/>
  10. <result property="wiunWaoLegPersDuty" column="WIUN_WAO_LEG_PERS_DUTY"/>
  11. <result property="techPers" column="TECH_PERS"/>
  12. <result property="techPersTel" column="TECH_PERS_TEL"/>
  13. <result property="techPersDuty" column="TECH_PERS_DUTY"/>
  14. <result property="patrolPers" column="PATROL_PERS"/>
  15. <result property="patrolPersTel" column="PATROL_PERS_TEL"/>
  16. <result property="patrolPersDuty" column="PATROL_PERS_DUTY"/>
  17. <result property="isSetCard" column="IS_SET_CARD"/>
  18. <result property="persResu" column="PERS_RESU"/>
  19. <result property="recPersId" column="REC_PERS_ID"/>
  20. <result property="recPers2" column="REC_PERS2"/>
  21. <result property="recPersTel" column="REC_PERS_TEL"/>
  22. <result property="intm" column="INTM"/>
  23. <result property="uptm" column="UPTM"/>
  24. <result property="status" column="STATUS"/>
  25. </resultMap>
  26. <sql id="table_columns">
  27. ID,
  28. RGSTR_ID,
  29. IS_CLEAR_PERS,
  30. WIUN_WAO_LEG_PERS,
  31. WIUN_WAO_LEG_PERS_TEL,
  32. WIUN_WAO_LEG_PERS_DUTY,
  33. TECH_PERS,
  34. TECH_PERS_TEL,
  35. TECH_PERS_DUTY,
  36. PATROL_PERS,
  37. PATROL_PERS_TEL,
  38. PATROL_PERS_DUTY,
  39. IS_SET_CARD,
  40. PERS_RESU,
  41. REC_PERS_ID,
  42. REC_PERS2,
  43. REC_PERS_TEL,
  44. INTM,
  45. UPTM,
  46. STATUS
  47. </sql>
  48. <sql id="entity_properties">
  49. #{id},
  50. #{rgstrId},
  51. #{isClearPers},
  52. #{wiunWaoLegPers},
  53. #{wiunWaoLegPersTel},
  54. #{wiunWaoLegPersDuty},
  55. #{techPers},
  56. #{techPersTel},
  57. #{techPersDuty},
  58. #{patrolPers},
  59. #{patrolPersTel},
  60. #{patrolPersDuty},
  61. #{isSetCard},
  62. #{persResu},
  63. #{recPersId},
  64. #{recPers2},
  65. #{recPersTel},
  66. #{intm},
  67. #{uptm},
  68. #{status}
  69. </sql>
  70. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  71. <sql id="page_where">
  72. <trim prefix="where" prefixOverrides="and | or ">
  73. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  74. <if test="isClearPers != null and isClearPers != ''">and IS_CLEAR_PERS = #{isClearPers}</if>
  75. <if test="wiunWaoLegPers != null and wiunWaoLegPers != ''">and WIUN_WAO_LEG_PERS = #{wiunWaoLegPers}</if>
  76. <if test="wiunWaoLegPersTel != null and wiunWaoLegPersTel != ''">and WIUN_WAO_LEG_PERS_TEL = #{wiunWaoLegPersTel}</if>
  77. <if test="wiunWaoLegPersDuty != null and wiunWaoLegPersDuty != ''">and WIUN_WAO_LEG_PERS_DUTY = #{wiunWaoLegPersDuty}</if>
  78. <if test="techPers != null and techPers != ''">and TECH_PERS = #{techPers}</if>
  79. <if test="techPersTel != null and techPersTel != ''">and TECH_PERS_TEL = #{techPersTel}</if>
  80. <if test="techPersDuty != null and techPersDuty != ''">and TECH_PERS_DUTY = #{techPersDuty}</if>
  81. <if test="patrolPers != null and patrolPers != ''">and PATROL_PERS = #{patrolPers}</if>
  82. <if test="patrolPersTel != null and patrolPersTel != ''">and PATROL_PERS_TEL = #{patrolPersTel}</if>
  83. <if test="patrolPersDuty != null and patrolPersDuty != ''">and PATROL_PERS_DUTY = #{patrolPersDuty}</if>
  84. <if test="isSetCard != null and isSetCard != ''">and IS_SET_CARD = #{isSetCard}</if>
  85. <if test="persResu != null and persResu != ''">and PERS_RESU = #{persResu}</if>
  86. <if test="recPersId != null and recPersId != ''">and REC_PERS_ID = #{recPersId}</if>
  87. <if test="recPers2 != null and recPers2 != ''">and REC_PERS2 = #{recPers2}</if>
  88. <if test="recPersTel != null and recPersTel != ''">and REC_PERS_TEL = #{recPersTel}</if>
  89. <if test="intm != null">and INTM = #{intm}</if>
  90. <if test="uptm != null">and UPTM = #{uptm}</if>
  91. <if test="status != null and status != ''">and STATUS = #{status}</if>
  92. </trim>
  93. </sql>
  94. <select id="get" resultMap="bisInspRsmlRgstrPresResultMap" parameterType="String" >
  95. select <include refid="table_columns" /> from BIS_INSP_RSML_RGSTR_PRES where ID = #{id}
  96. </select>
  97. <select id="getBy" resultMap="bisInspRsmlRgstrPresResultMap">
  98. select <include refid="table_columns" /> from BIS_INSP_RSML_RGSTR_PRES <include refid="page_where" />
  99. </select>
  100. <select id="findAll" resultMap="bisInspRsmlRgstrPresResultMap">
  101. select <include refid="table_columns" /> from BIS_INSP_RSML_RGSTR_PRES
  102. </select>
  103. <select id="findList" resultMap="bisInspRsmlRgstrPresResultMap">
  104. select <include refid="table_columns" /> from BIS_INSP_RSML_RGSTR_PRES <include refid="page_where" />
  105. </select>
  106. <select id="selectCount" resultType="int" >
  107. select count(ID) from BIS_INSP_RSML_RGSTR_PRES <include refid="page_where" />
  108. </select>
  109. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsmlRgstrPres">
  110. insert into BIS_INSP_RSML_RGSTR_PRES( <include refid="table_columns" /> )
  111. values ( <include refid="entity_properties" /> )
  112. </insert>
  113. <delete id="delete" parameterType="java.lang.String">
  114. delete from BIS_INSP_RSML_RGSTR_PRES where ID = #{id}
  115. </delete>
  116. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsmlRgstrPres">
  117. delete from BIS_INSP_RSML_RGSTR_PRES <include refid="page_where" />
  118. </delete>
  119. <update id="deleteInFlag" parameterType="java.lang.String">
  120. update BIS_INSP_RSML_RGSTR_PRES set flag_valid = 0 where ID = #{id}
  121. </update>
  122. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsmlRgstrPres">
  123. update BIS_INSP_RSML_RGSTR_PRES
  124. <trim prefix="set" suffixOverrides=",">
  125. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  126. <if test="isClearPers != null and isClearPers != ''">IS_CLEAR_PERS = #{isClearPers},</if>
  127. <if test="wiunWaoLegPers != null and wiunWaoLegPers != ''">WIUN_WAO_LEG_PERS = #{wiunWaoLegPers},</if>
  128. <if test="wiunWaoLegPersTel != null and wiunWaoLegPersTel != ''">WIUN_WAO_LEG_PERS_TEL = #{wiunWaoLegPersTel},</if>
  129. <if test="wiunWaoLegPersDuty != null and wiunWaoLegPersDuty != ''">WIUN_WAO_LEG_PERS_DUTY = #{wiunWaoLegPersDuty},</if>
  130. <if test="techPers != null and techPers != ''">TECH_PERS = #{techPers},</if>
  131. <if test="techPersTel != null and techPersTel != ''">TECH_PERS_TEL = #{techPersTel},</if>
  132. <if test="techPersDuty != null and techPersDuty != ''">TECH_PERS_DUTY = #{techPersDuty},</if>
  133. <if test="patrolPers != null and patrolPers != ''">PATROL_PERS = #{patrolPers},</if>
  134. <if test="patrolPersTel != null and patrolPersTel != ''">PATROL_PERS_TEL = #{patrolPersTel},</if>
  135. <if test="patrolPersDuty != null and patrolPersDuty != ''">PATROL_PERS_DUTY = #{patrolPersDuty},</if>
  136. <if test="isSetCard != null and isSetCard != ''">IS_SET_CARD = #{isSetCard},</if>
  137. <if test="persResu != null and persResu != ''">PERS_RESU = #{persResu},</if>
  138. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  139. <if test="recPers2 != null and recPers2 != ''">REC_PERS2 = #{recPers2},</if>
  140. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
  141. <if test="intm != null">INTM = #{intm},</if>
  142. <if test="uptm != null">UPTM = #{uptm},</if>
  143. <if test="status != null and status != ''">STATUS = #{status},</if>
  144. </trim>
  145. <where>ID = #{id}</where>
  146. </update>
  147. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsmlRgstrPres">
  148. update BIS_INSP_RSML_RGSTR_PRES
  149. <trim prefix="set" suffixOverrides=",">
  150. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  151. <if test="isClearPers != null and isClearPers != ''">IS_CLEAR_PERS = #{isClearPers},</if>
  152. <if test="wiunWaoLegPers != null and wiunWaoLegPers != ''">WIUN_WAO_LEG_PERS = #{wiunWaoLegPers},</if>
  153. <if test="wiunWaoLegPersTel != null and wiunWaoLegPersTel != ''">WIUN_WAO_LEG_PERS_TEL = #{wiunWaoLegPersTel},</if>
  154. <if test="wiunWaoLegPersDuty != null and wiunWaoLegPersDuty != ''">WIUN_WAO_LEG_PERS_DUTY = #{wiunWaoLegPersDuty},</if>
  155. <if test="techPers != null and techPers != ''">TECH_PERS = #{techPers},</if>
  156. <if test="techPersTel != null and techPersTel != ''">TECH_PERS_TEL = #{techPersTel},</if>
  157. <if test="techPersDuty != null and techPersDuty != ''">TECH_PERS_DUTY = #{techPersDuty},</if>
  158. <if test="patrolPers != null and patrolPers != ''">PATROL_PERS = #{patrolPers},</if>
  159. <if test="patrolPersTel != null and patrolPersTel != ''">PATROL_PERS_TEL = #{patrolPersTel},</if>
  160. <if test="patrolPersDuty != null and patrolPersDuty != ''">PATROL_PERS_DUTY = #{patrolPersDuty},</if>
  161. <if test="isSetCard != null and isSetCard != ''">IS_SET_CARD = #{isSetCard},</if>
  162. <if test="persResu != null and persResu != ''">PERS_RESU = #{persResu},</if>
  163. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  164. <if test="recPers2 != null and recPers2 != ''">REC_PERS2 = #{recPers2},</if>
  165. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
  166. <if test="intm != null">INTM = #{intm},</if>
  167. <if test="uptm != null">UPTM = #{uptm},</if>
  168. <if test="status != null and status != ''">STATUS = #{status},</if>
  169. </trim>
  170. <include refid="page_where" />
  171. </update>
  172. <!-- 其他自定义SQL -->
  173. </mapper>