AttWiuWatLicDao.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  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.AttWiuWatLicDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.AttWiuWatLic" id="attWiuWatLicResultMap">
  5. <result property="certCond" column="CERT_COND"/>
  6. <result property="chkIntMet" column="CHK_INT_MET"/>
  7. <result property="intUse" column="INT_USE"/>
  8. <result property="chkSourTp" column="CHK_SOUR_TP"/>
  9. <result property="bkWw" column="BK_WW"/>
  10. <result property="rwAddr" column="RW_ADDR"/>
  11. <result property="rwTp" column="RW_TP"/>
  12. <result property="rwW" column="RW_W"/>
  13. <result property="rwWqReq" column="RW_WQ_REQ"/>
  14. <result property="apprOrgCd" column="APPR_ORG_CD"/>
  15. <result property="apprDt" column="APPR_DT"/>
  16. <result property="apprOrgName" column="APPR_ORG_NAME"/>
  17. <result property="id" column="ID"/>
  18. <result property="wiuId" column="WIU_ID"/>
  19. <result property="qsxkspqklx" column="QSXKSPQKLX"/>
  20. <result property="watLicCode" column="WAT_LIC_CODE"/>
  21. <result property="apprOrg" column="APPR_ORG"/>
  22. <result property="wiuBd" column="WIU_BD"/>
  23. <result property="wiuDl" column="WIU_DL"/>
  24. <result property="wrpNm" column="WRP_NM"/>
  25. <result property="wiuWw" column="WIU_WW"/>
  26. <result property="replSn" column="REPL_SN"/>
  27. <result property="applNm" column="APPL_NM"/>
  28. <result property="intBd" column="INT_BD"/>
  29. <result property="intDl" column="INT_DL"/>
  30. <result property="apprWw" column="APPR_WW"/>
  31. <result property="ftafawdp" column="FTAFAWDP"/>
  32. <result property="inTm" column="IN_TM"/>
  33. <result property="upTm" column="UP_TM"/>
  34. <result property="wintCode" column="WINT_CODE"/>
  35. <result property="wiuCode" column="WIU_CODE"/>
  36. <result property="wintPos" column="WINT_POS"/>
  37. <result property="name" column="NAME"/>
  38. <result property="manOrgCd" column="MAN_ORG_CD"/>
  39. <result property="manOrgName" column="MAN_ORG_NAME"/>
  40. </resultMap>
  41. <sql id="table_columns">
  42. CERT_COND,MAN_ORG_CD,MAN_ORG_NAME,
  43. CHK_INT_MET,
  44. INT_USE,
  45. CHK_SOUR_TP,
  46. BK_WW,
  47. RW_ADDR,
  48. RW_TP,
  49. RW_W,
  50. RW_WQ_REQ,
  51. APPR_ORG_CD,
  52. APPR_DT,
  53. APPR_ORG_NAME,
  54. ID,
  55. WIU_ID,
  56. QSXKSPQKLX,
  57. WAT_LIC_CODE,
  58. APPR_ORG,
  59. WIU_BD,
  60. WIU_DL,
  61. WRP_NM,
  62. WIU_WW,
  63. REPL_SN,
  64. APPL_NM,
  65. INT_BD,
  66. INT_DL,
  67. APPR_WW,
  68. FTAFAWDP,
  69. IN_TM,
  70. UP_TM
  71. </sql>
  72. <sql id="entity_properties">
  73. #{certCond},#{manOrgCd},#{manOrgName},
  74. #{chkIntMet},
  75. #{intUse},
  76. #{chkSourTp},
  77. #{bkWw},
  78. #{rwAddr},
  79. #{rwTp},
  80. #{rwW},
  81. #{rwWqReq},
  82. #{apprOrgCd},
  83. #{apprDt},
  84. #{apprOrgName},
  85. #{id},
  86. #{wiuId},
  87. #{qsxkspqklx},
  88. #{watLicCode},
  89. #{apprOrg},
  90. #{wiuBd},
  91. #{wiuDl},
  92. #{wrpNm},
  93. #{wiuWw},
  94. #{replSn},
  95. #{applNm},
  96. #{intBd},
  97. #{intDl},
  98. #{apprWw},
  99. #{ftafawdp},
  100. #{inTm},
  101. #{upTm}
  102. </sql>
  103. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  104. <sql id="page_where">
  105. <trim prefix="where" prefixOverrides="and | or ">
  106. <if test="chkIntMet != null and chkIntMet != ''">and CHK_INT_MET like '%${chkIntMet}%'</if>
  107. <if test="intUse != null and intUse != ''">and INT_USE like '%${intUse}%'</if>
  108. <if test="chkSourTp != null and chkSourTp != ''">and CHK_SOUR_TP = #{chkSourTp}</if>
  109. <if test="bkWw != null and bkWw != ''">and BK_WW = #{bkWw}</if>
  110. <if test="rwAddr != null and rwAddr != ''">and RW_ADDR = #{rwAddr}</if>
  111. <if test="rwTp != null and rwTp != ''">and RW_TP = #{rwTp}</if>
  112. <if test="rwW != null and rwW != ''">and RW_W = #{rwW}</if>
  113. <if test="rwWqReq != null and rwWqReq != ''">and RW_WQ_REQ = #{rwWqReq}</if>
  114. <if test="apprOrgCd != null and apprOrgCd != ''">and APPR_ORG_CD = #{apprOrgCd}</if>
  115. <if test="apprDt != null">and APPR_DT = #{apprDt}</if>
  116. <if test="apprOrgName != null and apprOrgName != ''">and APPR_ORG_NAME = #{apprOrgName}</if>
  117. <if test="wiuId != null and wiuId != ''">and WIU_ID = #{wiuId}</if>
  118. <if test="qsxkspqklx != null and qsxkspqklx != ''">and QSXKSPQKLX = #{qsxkspqklx}</if>
  119. <if test="watLicCode != null and watLicCode != ''">and WAT_LIC_CODE like '%${watLicCode}%'</if>
  120. <if test="apprOrg != null and apprOrg != ''">and APPR_ORG = #{apprOrg}</if>
  121. <if test="wiuBd != null">and WIU_BD = #{wiuBd}</if>
  122. <if test="wiuDl != null">and WIU_DL = #{wiuDl}</if>
  123. <if test="wrpNm != null and wrpNm != ''">and WRP_NM like '%${wrpNm}%'</if>
  124. <if test="wiuWw != null and wiuWw != ''">and WIU_WW = #{wiuWw}</if>
  125. <if test="replSn != null and replSn != ''">and REPL_SN = #{replSn}</if>
  126. <if test="applNm != null and applNm != ''">and APPL_NM = #{applNm}</if>
  127. <if test="intBd != null">and INT_BD = #{intBd}</if>
  128. <if test="intDl != null">and INT_DL = #{intDl}</if>
  129. <if test="apprWw != null and apprWw != ''">and APPR_WW = #{apprWw}</if>
  130. <if test="ftafawdp != null and ftafawdp != ''">and FTAFAWDP = #{ftafawdp}</if>
  131. <if test="inTm != null">and IN_TM = #{inTm}</if>
  132. <if test="upTm != null">and UP_TM = #{upTm}</if>
  133. <if test="certCond != null and certCond !=''">and CERT_COND = #{certCond}</if>
  134. <if test="manOrgCd != null and manOrgCd !=''">and MAN_ORG_CD = #{manOrgCd}</if>
  135. <if test="manOrgName != null and manOrgName !=''">and MAN_ORG_NAME = #{manOrgName}</if>
  136. </trim>
  137. </sql>
  138. <select id="get" resultMap="attWiuWatLicResultMap" parameterType="String" >
  139. select l.*,w.name,w.wiu_code,a.wint_code,a.wint_pos from att_wiu_wat_lic l, att_wiu_base w,att_wint_base_b a where l.wiu_id=w.id and w.wint_code=a.id
  140. and l.id=#{id}
  141. </select>
  142. <select id="getBy" resultMap="attWiuWatLicResultMap">
  143. select <include refid="table_columns" /> from ATT_WIU_WAT_LIC <include refid="page_where" />
  144. </select>
  145. <select id="findNotNull" resultMap="attWiuWatLicResultMap">
  146. select * from att_wiu_wat_lic l where l.cert_Cond is not null
  147. </select>
  148. <select id="findISNull" resultMap="attWiuWatLicResultMap">
  149. select * from att_wiu_wat_lic l where l.cert_Cond is null
  150. </select>
  151. <select id="findAll" resultMap="attWiuWatLicResultMap">
  152. select <include refid="table_columns" /> from ATT_WIU_WAT_LIC
  153. </select>
  154. <select id="findList" resultMap="attWiuWatLicResultMap">
  155. select <include refid="table_columns" /> from ATT_WIU_WAT_LIC <include refid="page_where" />
  156. </select>
  157. <select id="selectCount" resultType="int" >
  158. select count(ID) from ATT_WIU_WAT_LIC <include refid="page_where" />
  159. </select>
  160. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttWiuWatLic">
  161. insert into ATT_WIU_WAT_LIC( <include refid="table_columns" /> )
  162. values ( <include refid="entity_properties" /> )
  163. </insert>
  164. <delete id="delete" parameterType="java.lang.String">
  165. delete from ATT_WIU_WAT_LIC where ID = #{id}
  166. </delete>
  167. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttWiuWatLic">
  168. delete from ATT_WIU_WAT_LIC <include refid="page_where" />
  169. </delete>
  170. <update id="deleteInFlag" parameterType="java.lang.String">
  171. update ATT_WIU_WAT_LIC set flag_valid = 0 where ID = #{id}
  172. </update>
  173. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttWiuWatLic">
  174. update ATT_WIU_WAT_LIC
  175. <trim prefix="set" suffixOverrides=",">
  176. <if test="chkIntMet != null and chkIntMet != ''">CHK_INT_MET = #{chkIntMet},</if>
  177. <if test="intUse != null and intUse != ''">INT_USE = #{intUse},</if>
  178. <if test="chkSourTp != null and chkSourTp != ''">CHK_SOUR_TP = #{chkSourTp},</if>
  179. <if test="bkWw != null and bkWw != ''">BK_WW = #{bkWw},</if>
  180. <if test="rwAddr != null and rwAddr != ''">RW_ADDR = #{rwAddr},</if>
  181. <if test="rwTp != null and rwTp != ''">RW_TP = #{rwTp},</if>
  182. <if test="rwW != null and rwW != ''">RW_W = #{rwW},</if>
  183. <if test="rwWqReq != null and rwWqReq != ''">RW_WQ_REQ = #{rwWqReq},</if>
  184. <if test="apprOrgCd != null and apprOrgCd != ''">APPR_ORG_CD = #{apprOrgCd},</if>
  185. <if test="apprDt != null">APPR_DT = #{apprDt},</if>
  186. <if test="apprOrgName != null and apprOrgName != ''">APPR_ORG_NAME = #{apprOrgName},</if>
  187. <if test="wiuId != null and wiuId != ''">WIU_ID = #{wiuId},</if>
  188. <if test="qsxkspqklx != null and qsxkspqklx != ''">QSXKSPQKLX = #{qsxkspqklx},</if>
  189. <if test="watLicCode != null and watLicCode != ''">WAT_LIC_CODE = #{watLicCode},</if>
  190. <if test="apprOrg != null and apprOrg != ''">APPR_ORG = #{apprOrg},</if>
  191. <if test="wiuBd != null">WIU_BD = #{wiuBd},</if>
  192. <if test="wiuDl != null">WIU_DL = #{wiuDl},</if>
  193. <if test="wrpNm != null and wrpNm != ''">WRP_NM = #{wrpNm},</if>
  194. <if test="wiuWw != null and wiuWw != ''">WIU_WW = #{wiuWw},</if>
  195. <if test="replSn != null and replSn != ''">REPL_SN = #{replSn},</if>
  196. <if test="applNm != null and applNm != ''">APPL_NM = #{applNm},</if>
  197. <if test="certCond != null"> CERT_COND = #{certCond},</if>
  198. <if test="intBd != null">INT_BD = #{intBd},</if>
  199. <if test="intDl != null">INT_DL = #{intDl},</if>
  200. <if test="apprWw != null and apprWw != ''">APPR_WW = #{apprWw},</if>
  201. <if test="ftafawdp != null and ftafawdp != ''">FTAFAWDP = #{ftafawdp},</if>
  202. <if test="inTm != null">IN_TM = #{inTm},</if>
  203. <if test="manOrgCd != null and manOrgCd !=''"> MAN_ORG_CD = #{manOrgCd},</if>
  204. <if test="manOrgName != null and manOrgName !=''"> MAN_ORG_NAME = #{manOrgName},</if>
  205. <if test="upTm != null">UP_TM = #{upTm},</if>
  206. </trim>
  207. <where>ID = #{id}</where>
  208. </update>
  209. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.AttWiuWatLic">
  210. update ATT_WIU_WAT_LIC
  211. <trim prefix="set" suffixOverrides=",">
  212. <if test="chkIntMet != null and chkIntMet != ''">CHK_INT_MET = #{chkIntMet},</if>
  213. <if test="intUse != null and intUse != ''">INT_USE = #{intUse},</if>
  214. <if test="chkSourTp != null and chkSourTp != ''">CHK_SOUR_TP = #{chkSourTp},</if>
  215. <if test="bkWw != null and bkWw != ''">BK_WW = #{bkWw},</if>
  216. <if test="rwAddr != null and rwAddr != ''">RW_ADDR = #{rwAddr},</if>
  217. <if test="rwTp != null and rwTp != ''">RW_TP = #{rwTp},</if>
  218. <if test="rwW != null and rwW != ''">RW_W = #{rwW},</if>
  219. <if test="rwWqReq != null and rwWqReq != ''">RW_WQ_REQ = #{rwWqReq},</if>
  220. <if test="apprOrgCd != null and apprOrgCd != ''">APPR_ORG_CD = #{apprOrgCd},</if>
  221. <if test="apprDt != null">APPR_DT = #{apprDt},</if>
  222. <if test="apprOrgName != null and apprOrgName != ''">APPR_ORG_NAME = #{apprOrgName},</if>
  223. <if test="wiuId != null and wiuId != ''">WIU_ID = #{wiuId},</if>
  224. <if test="qsxkspqklx != null and qsxkspqklx != ''">QSXKSPQKLX = #{qsxkspqklx},</if>
  225. <if test="watLicCode != null and watLicCode != ''">WAT_LIC_CODE = #{watLicCode},</if>
  226. <if test="apprOrg != null and apprOrg != ''">APPR_ORG = #{apprOrg},</if>
  227. <if test="wiuBd != null">WIU_BD = #{wiuBd},</if>
  228. <if test="wiuDl != null">WIU_DL = #{wiuDl},</if>
  229. <if test="manOrgCd != null and manOrgCd !=''"> MAN_ORG_CD = #{manOrgCd},</if>
  230. <if test="manOrgName != null and manOrgName !=''"> MAN_ORG_NAME = #{manOrgName},</if>
  231. <if test="wrpNm != null and wrpNm != ''">WRP_NM = #{wrpNm},</if>
  232. <if test="wiuWw != null and wiuWw != ''">WIU_WW = #{wiuWw},</if>
  233. <if test="replSn != null and replSn != ''">REPL_SN = #{replSn},</if>
  234. <if test="applNm != null and applNm != ''">APPL_NM = #{applNm},</if>
  235. <if test="intBd != null">INT_BD = #{intBd},</if>
  236. <if test="intDl != null">INT_DL = #{intDl},</if>
  237. <if test="apprWw != null and apprWw != ''">APPR_WW = #{apprWw},</if>
  238. <if test="ftafawdp != null and ftafawdp != ''">FTAFAWDP = #{ftafawdp},</if>
  239. <if test="inTm != null">IN_TM = #{inTm},</if>
  240. <if test="upTm != null">UP_TM = #{upTm},</if>
  241. </trim>
  242. <include refid="page_where" />
  243. </update>
  244. <!-- 其他自定义SQL -->
  245. </mapper>