BisInspHystpDutyDao.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  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.BisInspHystpDutyDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspHystpDuty" id="bisInspHystpDutyResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="isMakDuty" column="IS_MAK_DUTY"/>
  8. <result property="makDutyName" column="MAK_DUTY_NAME"/>
  9. <result property="makDutyTel" column="MAK_DUTY_TEL"/>
  10. <result property="isDutyPub" column="IS_DUTY_PUB"/>
  11. <result property="isDutyNote" column="IS_DUTY_NOTE"/>
  12. <result property="isRglDuty" column="IS_RGL_DUTY"/>
  13. <result property="rglDutyDep" column="RGL_DUTY_DEP"/>
  14. <result property="rglDutyName" column="RGL_DUTY_NAME"/>
  15. <result property="rglDutyTel" column="RGL_DUTY_TEL"/>
  16. <result property="isRglPub" column="IS_RGL_PUB"/>
  17. <result property="isRglNote" column="IS_RGL_NOTE"/>
  18. <result property="isAdmDuty" column="IS_ADM_DUTY"/>
  19. <result property="admDutyDep" column="ADM_DUTY_DEP"/>
  20. <result property="admDutyName" column="ADM_DUTY_NAME"/>
  21. <result property="admDutyPost" column="ADM_DUTY_POST"/>
  22. <result property="rglDutyPost" column="RGL_DUTY_POST"/>
  23. <result property="admDutyTel" column="ADM_DUTY_TEL"/>
  24. <result property="isAdmPub" column="IS_ADM_PUB"/>
  25. <result property="isAdmNote" column="IS_ADM_NOTE"/>
  26. <result property="persId" column="PERS_ID"/>
  27. <result property="intm" column="INTM"/>
  28. <result property="uptm" column="UPTM"/>
  29. <result property="note" column="NOTE"/>
  30. <result property="dataStat" column="DATA_STAT"/>
  31. <result property="state" column="STATE"/>
  32. </resultMap>
  33. <sql id="table_columns">
  34. ID,
  35. RGSTR_ID,
  36. IS_MAK_DUTY,
  37. MAK_DUTY_NAME,
  38. MAK_DUTY_TEL,
  39. IS_DUTY_PUB,
  40. IS_DUTY_NOTE,
  41. IS_RGL_DUTY,
  42. RGL_DUTY_DEP,
  43. RGL_DUTY_NAME,
  44. RGL_DUTY_TEL,
  45. IS_RGL_PUB,
  46. IS_RGL_NOTE,
  47. IS_ADM_DUTY,
  48. ADM_DUTY_DEP,
  49. ADM_DUTY_NAME,
  50. ADM_DUTY_POST,
  51. RGL_DUTY_POST,
  52. ADM_DUTY_TEL,
  53. IS_ADM_PUB,
  54. IS_ADM_NOTE,
  55. PERS_ID,
  56. INTM,
  57. UPTM,
  58. NOTE,
  59. DATA_STAT,
  60. STATE
  61. </sql>
  62. <sql id="entity_properties">
  63. #{id},
  64. #{rgstrId},
  65. #{isMakDuty},
  66. #{makDutyName},
  67. #{makDutyTel},
  68. #{isDutyPub},
  69. #{isDutyNote},
  70. #{isRglDuty},
  71. #{rglDutyDep},
  72. #{rglDutyName},
  73. #{rglDutyTel},
  74. #{isRglPub},
  75. #{isRglNote},
  76. #{isAdmDuty},
  77. #{admDutyDep},
  78. #{admDutyName},
  79. #{admDutyPost},
  80. #{rglDutyPost},
  81. #{admDutyTel},
  82. #{isAdmPub},
  83. #{isAdmNote},
  84. #{persId},
  85. #{intm},
  86. #{uptm},
  87. #{note},
  88. #{dataStat},
  89. #{state}
  90. </sql>
  91. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  92. <sql id="page_where">
  93. <trim prefix="where" prefixOverrides="and | or ">
  94. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  95. <if test="isMakDuty != null and isMakDuty != ''">and IS_MAK_DUTY = #{isMakDuty}</if>
  96. <if test="makDutyName != null and makDutyName != ''">and MAK_DUTY_NAME = #{makDutyName}</if>
  97. <if test="makDutyTel != null and makDutyTel != ''">and MAK_DUTY_TEL = #{makDutyTel}</if>
  98. <if test="isDutyPub != null and isDutyPub != ''">and IS_DUTY_PUB = #{isDutyPub}</if>
  99. <if test="isDutyNote != null and isDutyNote != ''">and IS_DUTY_NOTE = #{isDutyNote}</if>
  100. <if test="isRglDuty != null and isRglDuty != ''">and IS_RGL_DUTY = #{isRglDuty}</if>
  101. <if test="rglDutyDep != null and rglDutyDep != ''">and RGL_DUTY_DEP = #{rglDutyDep}</if>
  102. <if test="rglDutyName != null and rglDutyName != ''">and RGL_DUTY_NAME = #{rglDutyName}</if>
  103. <if test="rglDutyPost != null and rglDutyPost != ''">and RGL_DUTY_POST = #{rglDutyPost}</if>
  104. <if test="rglDutyTel != null and rglDutyTel != ''">and RGL_DUTY_TEL = #{rglDutyTel}</if>
  105. <if test="isRglPub != null and isRglPub != ''">and IS_RGL_PUB = #{isRglPub}</if>
  106. <if test="isRglNote != null and isRglNote != ''">and IS_RGL_NOTE = #{isRglNote}</if>
  107. <if test="isAdmDuty != null and isAdmDuty != ''">and IS_ADM_DUTY = #{isAdmDuty}</if>
  108. <if test="admDutyDep != null and admDutyDep != ''">and ADM_DUTY_DEP = #{admDutyDep}</if>
  109. <if test="admDutyName != null and admDutyName != ''">and ADM_DUTY_NAME = #{admDutyName}</if>
  110. <if test="admDutyPost != null and admDutyPost != ''">and ADM_DUTY_POST = #{admDutyPost}</if>
  111. <if test="admDutyTel != null and admDutyTel != ''">and ADM_DUTY_TEL = #{admDutyTel}</if>
  112. <if test="isAdmPub != null and isAdmPub != ''">and IS_ADM_PUB = #{isAdmPub}</if>
  113. <if test="isAdmNote != null and isAdmNote != ''">and IS_ADM_NOTE = #{isAdmNote}</if>
  114. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  115. <if test="intm != null">and INTM = #{intm}</if>
  116. <if test="uptm != null">and UPTM = #{uptm}</if>
  117. <if test="note != null and note != ''">and NOTE = #{note}</if>
  118. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  119. <if test="state != null and state != ''">and STATE = #{state}</if>
  120. </trim>
  121. </sql>
  122. <select id="get" resultMap="bisInspHystpDutyResultMap" parameterType="String" >
  123. select <include refid="table_columns" /> from BIS_INSP_HYSTP_DUTY where RGSTR_ID = #{id}
  124. </select>
  125. <select id="getBy" resultMap="bisInspHystpDutyResultMap">
  126. select <include refid="table_columns" /> from BIS_INSP_HYSTP_DUTY <include refid="page_where" />
  127. </select>
  128. <select id="findAll" resultMap="bisInspHystpDutyResultMap">
  129. select <include refid="table_columns" /> from BIS_INSP_HYSTP_DUTY
  130. </select>
  131. <select id="findList" resultMap="bisInspHystpDutyResultMap">
  132. select <include refid="table_columns" /> from BIS_INSP_HYSTP_DUTY <include refid="page_where" />
  133. </select>
  134. <select id="selectCount" resultType="int" >
  135. select count(ID) from BIS_INSP_HYSTP_DUTY <include refid="page_where" />
  136. </select>
  137. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspHystpDuty">
  138. insert into BIS_INSP_HYSTP_DUTY( <include refid="table_columns" /> )
  139. values ( <include refid="entity_properties" /> )
  140. </insert>
  141. <delete id="delete" parameterType="java.lang.String">
  142. update BIS_INSP_HYSTP_DUTY set DATA_STAT='9' where ID = #{id}
  143. </delete>
  144. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspHystpDuty">
  145. delete from BIS_INSP_HYSTP_DUTY <include refid="page_where" />
  146. </delete>
  147. <update id="deleteInFlag" parameterType="java.lang.String">
  148. update BIS_INSP_HYSTP_DUTY set flag_valid = 0 where ID = #{id}
  149. </update>
  150. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspHystpDuty">
  151. update BIS_INSP_HYSTP_DUTY
  152. <trim prefix="set" suffixOverrides=",">
  153. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  154. <if test="isMakDuty != null and isMakDuty != ''">IS_MAK_DUTY = #{isMakDuty},</if>
  155. <if test="makDutyName != null and makDutyName != ''">MAK_DUTY_NAME = #{makDutyName},</if>
  156. <if test="makDutyTel != null and makDutyTel != ''">MAK_DUTY_TEL = #{makDutyTel},</if>
  157. <if test="isDutyPub != null and isDutyPub != ''">IS_DUTY_PUB = #{isDutyPub},</if>
  158. <if test="isDutyNote != null and isDutyNote != ''">IS_DUTY_NOTE = #{isDutyNote},</if>
  159. <if test="isRglDuty != null and isRglDuty != ''">IS_RGL_DUTY = #{isRglDuty},</if>
  160. <if test="rglDutyDep != null and rglDutyDep != ''">RGL_DUTY_DEP = #{rglDutyDep},</if>
  161. <if test="rglDutyName != null and rglDutyName != ''">RGL_DUTY_NAME = #{rglDutyName},</if>
  162. <if test="rglDutyPost != null and rglDutyPost != ''">RGL_DUTY_POST = #{rglDutyPost},</if>
  163. <if test="rglDutyTel != null and rglDutyTel != ''">RGL_DUTY_TEL = #{rglDutyTel},</if>
  164. <if test="isRglPub != null and isRglPub != ''">IS_RGL_PUB = #{isRglPub},</if>
  165. <if test="isRglNote != null and isRglNote != ''">IS_RGL_NOTE = #{isRglNote},</if>
  166. <if test="isAdmDuty != null and isAdmDuty != ''">IS_ADM_DUTY = #{isAdmDuty},</if>
  167. <if test="admDutyDep != null and admDutyDep != ''">ADM_DUTY_DEP = #{admDutyDep},</if>
  168. <if test="admDutyName != null and admDutyName != ''">ADM_DUTY_NAME = #{admDutyName},</if>
  169. <if test="admDutyPost != null and admDutyPost != ''">ADM_DUTY_POST = #{admDutyPost},</if>
  170. <if test="admDutyTel != null and admDutyTel != ''">ADM_DUTY_TEL = #{admDutyTel},</if>
  171. <if test="isAdmPub != null and isAdmPub != ''">IS_ADM_PUB = #{isAdmPub},</if>
  172. <if test="isAdmNote != null and isAdmNote != ''">IS_ADM_NOTE = #{isAdmNote},</if>
  173. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  174. <if test="intm != null">INTM = #{intm},</if>
  175. <if test="uptm != null">UPTM = #{uptm},</if>
  176. <if test="note != null and note != ''">NOTE = #{note},</if>
  177. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  178. <if test="state != null and state != ''">STATE = #{state},</if>
  179. </trim>
  180. <where>ID = #{id}</where>
  181. </update>
  182. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspHystpDuty">
  183. update BIS_INSP_HYSTP_DUTY
  184. <trim prefix="set" suffixOverrides=",">
  185. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  186. <if test="isMakDuty != null and isMakDuty != ''">IS_MAK_DUTY = #{isMakDuty},</if>
  187. <if test="makDutyName != null and makDutyName != ''">MAK_DUTY_NAME = #{makDutyName},</if>
  188. <if test="makDutyTel != null and makDutyTel != ''">MAK_DUTY_TEL = #{makDutyTel},</if>
  189. <if test="isDutyPub != null and isDutyPub != ''">IS_DUTY_PUB = #{isDutyPub},</if>
  190. <if test="isDutyNote != null and isDutyNote != ''">IS_DUTY_NOTE = #{isDutyNote},</if>
  191. <if test="isRglDuty != null and isRglDuty != ''">IS_RGL_DUTY = #{isRglDuty},</if>
  192. <if test="rglDutyDep != null and rglDutyDep != ''">RGL_DUTY_DEP = #{rglDutyDep},</if>
  193. <if test="rglDutyName != null and rglDutyName != ''">RGL_DUTY_NAME = #{rglDutyName},</if>
  194. <if test="rglDutyPost != null and rglDutyPost != ''">RGL_DUTY_POST = #{rglDutyPost},</if>
  195. <if test="rglDutyTel != null and rglDutyTel != ''">RGL_DUTY_TEL = #{rglDutyTel},</if>
  196. <if test="isRglPub != null and isRglPub != ''">IS_RGL_PUB = #{isRglPub},</if>
  197. <if test="isRglNote != null and isRglNote != ''">IS_RGL_NOTE = #{isRglNote},</if>
  198. <if test="isAdmDuty != null and isAdmDuty != ''">IS_ADM_DUTY = #{isAdmDuty},</if>
  199. <if test="admDutyDep != null and admDutyDep != ''">ADM_DUTY_DEP = #{admDutyDep},</if>
  200. <if test="admDutyName != null and admDutyName != ''">ADM_DUTY_NAME = #{admDutyName},</if>
  201. <if test="admDutyPost != null and admDutyPost != ''">ADM_DUTY_POST = #{admDutyPost},</if>
  202. <if test="admDutyTel != null and admDutyTel != ''">ADM_DUTY_TEL = #{admDutyTel},</if>
  203. <if test="isAdmPub != null and isAdmPub != ''">IS_ADM_PUB = #{isAdmPub},</if>
  204. <if test="isAdmNote != null and isAdmNote != ''">IS_ADM_NOTE = #{isAdmNote},</if>
  205. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  206. <if test="intm != null">INTM = #{intm},</if>
  207. <if test="uptm != null">UPTM = #{uptm},</if>
  208. <if test="note != null and note != ''">NOTE = #{note},</if>
  209. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  210. <if test="state != null and state != ''">STATE = #{state},</if>
  211. </trim>
  212. <include refid="page_where" />
  213. </update>
  214. <!-- 其他自定义SQL -->
  215. </mapper>