AttCwsBaseDao.xml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442
  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.AttCwsBaseDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.AttCwsBase" id="attCwsBaseResultMap">
  5. <result property="edtrPesr" column="EDTR_PESR"/>
  6. <result property="uptm" column="UPTM"/>
  7. <result property="centerXGd" column="CENTER_X_GD"/>
  8. <result property="centerYGd" column="CENTER_Y_GD"/>
  9. <result property="addvcd" column="ADDVCD"/>
  10. <result property="guid" column="GUID"/>
  11. <result property="cwsCode" column="CWS_CODE"/>
  12. <result property="cwsName" column="CWS_NAME"/>
  13. <result property="cwsLong" column="CWS_LONG"/>
  14. <result property="cwsLat" column="CWS_LAT"/>
  15. <result property="cwsLoc" column="CWS_LOC"/>
  16. <result property="engType" column="ENG_TYPE"/>
  17. <result property="wasuType" column="WASU_TYPE"/>
  18. <result property="wasuRang" column="WASU_RANG"/>
  19. <result property="desWasuScal" column="DES_WASU_SCAL"/>
  20. <result property="desWasuPop" column="DES_WASU_POP"/>
  21. <result property="engStat" column="ENG_STAT"/>
  22. <result property="startDate" column="START_DATE"/>
  23. <result property="compDate" column="COMP_DATE"/>
  24. <result property="note" column="NOTE"/>
  25. <result property="effDate" column="EFF_DATE"/>
  26. <result property="exprDate" column="EXPR_DATE"/>
  27. <result property="compYear" column="COMP_YEAR"/>
  28. <result property="provincial" column="PROVINCIAL"/>
  29. </resultMap>
  30. <sql id="table_columns">
  31. EDTR_PESR ,
  32. TO_CHAR(UPTM,'YYYY-MM-DD HH24:MI:SS') UPTM,
  33. CENTER_X_GD ,
  34. CENTER_Y_GD ,
  35. ADDVCD ,
  36. GUID ,
  37. CWS_CODE ,
  38. CWS_NAME ,
  39. CWS_LONG ,
  40. CWS_LAT ,
  41. CWS_LOC ,
  42. ENG_TYPE ,
  43. WASU_TYPE ,
  44. WASU_RANG ,
  45. DES_WASU_SCAL ,
  46. DES_WASU_POP ,
  47. ENG_STAT ,
  48. START_DATE ,
  49. TO_CHAR(COMP_DATE,'YYYY-MM-DD') COMP_DATE,
  50. TO_CHAR(COMP_DATE,'YYYY') COMP_YEAR,
  51. NOTE ,
  52. TO_CHAR(EFF_DATE,'YYYY-MM-DD HH24:MI:SS') EFF_DATE,
  53. TO_CHAR(EXPR_DATE,'YYYY-MM-DD HH24:MI:SS') EXPR_DATE,
  54. PROVINCIAL
  55. </sql>
  56. <sql id="table_columns2">
  57. EDTR_PESR ,
  58. UPTM ,
  59. CENTER_X_GD ,
  60. CENTER_Y_GD ,
  61. ADDVCD ,
  62. GUID ,
  63. CWS_CODE ,
  64. CWS_NAME ,
  65. CWS_LONG ,
  66. CWS_LAT ,
  67. CWS_LOC ,
  68. ENG_TYPE ,
  69. WASU_TYPE ,
  70. WASU_RANG ,
  71. DES_WASU_SCAL ,
  72. DES_WASU_POP ,
  73. ENG_STAT ,
  74. START_DATE ,
  75. COMP_DATE ,
  76. NOTE ,
  77. EFF_DATE ,
  78. EXPR_DATE,
  79. PROVINCIAL
  80. </sql>
  81. <sql id="entity_properties">
  82. #{edtrPesr},
  83. TO_DATE(#{uptm},'YYYY-MM-DD HH24:MI:SS') ,
  84. #{centerXGd},
  85. #{centerYGd},
  86. #{addvcd},
  87. #{guid},
  88. #{cwsCode},
  89. #{cwsName},
  90. #{cwsLong},
  91. #{cwsLat},
  92. #{cwsLoc},
  93. #{engType},
  94. #{wasuType},
  95. #{wasuRang},
  96. #{desWasuScal},
  97. #{desWasuPop},
  98. #{engStat},
  99. #{startDate},
  100. TO_DATE(#{compDate},'YYYY-MM-DD'),
  101. #{note},
  102. TO_DATE(#{effDate},'YYYY-MM-DD HH24:MI:SS') ,
  103. TO_DATE(#{exprDate},'YYYY-MM-DD HH24:MI:SS'),
  104. #{provincial}
  105. </sql>
  106. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  107. <sql id="page_where">
  108. <trim prefix="where" prefixOverrides="and | or ">
  109. <if test="edtrPesr != null and edtrPesr != ''">and EDTR_PESR = #{edtrPesr}</if>
  110. <if test="uptm != null and uptm != ''">and UPTM = TO_DATE(#{uptm},'YYYY-MM-DD HH24:MI:SS')</if>
  111. <if test="centerXGd != null and centerXGd != ''">and CENTER_X_GD = #{centerXGd}</if>
  112. <if test="centerYGd != null and centerYGd != ''">and CENTER_Y_GD = #{centerYGd}</if>
  113. <if test="addvcd != null and addvcd != ''">and ADDVCD LIKE #{addvcd}||'%'</if>
  114. <if test="guid != null and guid != ''">and GUID = #{guid}</if>
  115. <if test="cwsCode != null and cwsCode != ''">and CWS_CODE = #{cwsCode}</if>
  116. <if test="cwsName != null and cwsName != ''">and CWS_NAME LIKE '%'||#{cwsName}||'%'</if>
  117. <if test="cwsLong != null and cwsLong != ''">and CWS_LONG = #{cwsLong}</if>
  118. <if test="cwsLat != null and cwsLat != ''">and CWS_LAT = #{cwsLat}</if>
  119. <if test="cwsLoc != null and cwsLoc != ''">and CWS_LOC = #{cwsLoc}</if>
  120. <if test="engType != null and engType != ''">and ENG_TYPE = #{engType}</if>
  121. <if test="wasuType != null and wasuType != ''">and WASU_TYPE = #{wasuType}</if>
  122. <if test="wasuRang != null and wasuRang != ''">and WASU_RANG = #{wasuRang}</if>
  123. <if test="desWasuScal != null and desWasuScal != ''">and DES_WASU_SCAL = #{desWasuScal}</if>
  124. <if test="desWasuPop != null and desWasuPop != ''">and DES_WASU_POP = #{desWasuPop}</if>
  125. <if test="engStat != null and engStat != ''">and ENG_STAT = #{engStat}</if>
  126. <if test="startDate != null and startDate != ''">and START_DATE = #{startDate}</if>
  127. <if test="compDate != null and compDate != ''">and COMP_DATE = TO_DATE(#{compDate},'YYYY-MM-DD')</if>
  128. <if test="note != null and note != ''">and NOTE = #{note}</if>
  129. <if test="effDate != null and effDate != ''">and EFF_DATE = TO_DATE(#{effDate},'YYYY-MM-DD HH24:MI:SS')</if>
  130. <if test="exprDate != null and exprDate != ''">and EXPR_DATE = TO_DATE(#{exprDate},'YYYY-MM-DD
  131. HH24:MI:SS')
  132. </if>
  133. <if test="province != null and province != ''">and cws_code LIKE '${province}%'</if>
  134. <if test="provincial != null and provincial != ''">and PROVINCIAL = #{provincial}</if>
  135. AND EXPR_DATE IS NULL
  136. </trim>
  137. </sql>
  138. <select id="get" resultMap="attCwsBaseResultMap" parameterType="String">
  139. select
  140. <include refid="table_columns"/>
  141. from att_cws_base where CWS_CODE = #{id} AND EXPR_DATE IS NULL
  142. </select>
  143. <select id="getBy" resultMap="attCwsBaseResultMap">
  144. select
  145. <include refid="table_columns"/>
  146. from att_cws_base
  147. <include refid="page_where"/>
  148. </select>
  149. <select id="findAll" resultMap="attCwsBaseResultMap">
  150. select
  151. <include refid="table_columns"/>
  152. from att_cws_base
  153. </select>
  154. <select id="findList" resultMap="attCwsBaseResultMap">
  155. select
  156. <include refid="table_columns"/>
  157. from att_cws_base
  158. <include refid="page_where"/>
  159. ORDER BY EFF_DATE desc
  160. </select>
  161. <select id="selectCount" resultType="int">
  162. select count(GUID) from att_cws_base
  163. <include refid="page_where"/>
  164. </select>
  165. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttCwsBase">
  166. insert into att_cws_base(
  167. <include refid="table_columns2"/>
  168. )
  169. values (
  170. <include refid="entity_properties"/>
  171. )
  172. </insert>
  173. <delete id="delete" parameterType="java.lang.String">
  174. delete from att_cws_base where GUID = #{id}
  175. </delete>
  176. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttCwsBase">
  177. delete from att_cws_base
  178. <include refid="page_where"/>
  179. </delete>
  180. <update id="deleteInFlag" parameterType="java.lang.String">
  181. update att_cws_base set flag_valid = 0 where GUID = #{id}
  182. </update>
  183. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttCwsBase">
  184. update att_cws_base
  185. <trim prefix="set" suffixOverrides=",">
  186. <if test="edtrPesr != null and edtrPesr != ''">EDTR_PESR = #{edtrPesr},</if>
  187. <if test="uptm != null and uptm != ''">UPTM = TO_DATE(#{uptm},'YYYY-MM-DD HH24:MI:SS'),</if>
  188. <if test="centerXGd != null and centerXGd != ''">CENTER_X_GD = #{centerXGd},</if>
  189. <if test="centerYGd != null and centerYGd != ''">CENTER_Y_GD = #{centerYGd},</if>
  190. <if test="addvcd != null and addvcd != ''">ADDVCD = #{addvcd},</if>
  191. <if test="guid != null and guid != ''">GUID = #{guid},</if>
  192. <if test="cwsCode != null and cwsCode != ''">CWS_CODE = #{cwsCode},</if>
  193. <if test="cwsName != null and cwsName != ''">CWS_NAME = #{cwsName},</if>
  194. <if test="cwsLong != null and cwsLong != ''">CWS_LONG = #{cwsLong},</if>
  195. <if test="cwsLat != null and cwsLat != ''">CWS_LAT = #{cwsLat},</if>
  196. <if test="cwsLoc != null and cwsLoc != ''">CWS_LOC = #{cwsLoc},</if>
  197. <if test="engType != null and engType != ''">ENG_TYPE = #{engType},</if>
  198. <if test="wasuType != null and wasuType != ''">WASU_TYPE = #{wasuType},</if>
  199. <if test="wasuRang != null and wasuRang != ''">WASU_RANG = #{wasuRang},</if>
  200. <if test="desWasuScal != null and desWasuScal != ''">DES_WASU_SCAL = #{desWasuScal},</if>
  201. <if test="desWasuPop != null and desWasuPop != ''">DES_WASU_POP = #{desWasuPop},</if>
  202. <if test="engStat != null and engStat != ''">ENG_STAT = #{engStat},</if>
  203. <if test="startDate != null and startDate != ''">START_DATE = #{startDate},</if>
  204. <if test="compDate != null and compDate != ''">COMP_DATE = TO_DATE(#{compDate},'YYYY-MM-DD'),</if>
  205. <if test="note != null and note != ''">NOTE = #{note},</if>
  206. <if test="provincial != null and provincial != ''">PROVINCIAL = #{provincial},</if>
  207. <if test="effDate != null and effDate != ''">EFF_DATE = TO_DATE(#{effDate},'YYYY-MM-DD HH24:MI:SS'),</if>
  208. <if test="exprDate != null and exprDate != ''">EXPR_DATE = TO_DATE(#{exprDate},'YYYY-MM-DD HH24:MI:SS'),
  209. </if>
  210. </trim>
  211. <where>GUID = #{guid}</where>
  212. </update>
  213. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.AttCwsBase">
  214. update att_cws_base
  215. <trim prefix="set" suffixOverrides=",">
  216. <if test="edtrPesr != null and edtrPesr != ''">EDTR_PESR = #{edtrPesr},</if>
  217. <if test="uptm != null and uptm != ''">UPTM = TO_DATE(#{uptm},'YYYY-MM-DD HH24:MI:SS'),</if>
  218. <if test="centerXGd != null and centerXGd != ''">CENTER_X_GD = #{centerXGd},</if>
  219. <if test="centerYGd != null and centerYGd != ''">CENTER_Y_GD = #{centerYGd},</if>
  220. <if test="addvcd != null and addvcd != ''">ADDVCD = #{addvcd},</if>
  221. <if test="guid != null and guid != ''">GUID = #{guid},</if>
  222. <if test="cwsCode != null and cwsCode != ''">CWS_CODE = #{cwsCode},</if>
  223. <if test="cwsName != null and cwsName != ''">CWS_NAME = #{cwsName},</if>
  224. <if test="cwsLong != null and cwsLong != ''">CWS_LONG = #{cwsLong},</if>
  225. <if test="cwsLat != null and cwsLat != ''">CWS_LAT = #{cwsLat},</if>
  226. <if test="cwsLoc != null and cwsLoc != ''">CWS_LOC = #{cwsLoc},</if>
  227. <if test="engType != null and engType != ''">ENG_TYPE = #{engType},</if>
  228. <if test="wasuType != null and wasuType != ''">WASU_TYPE = #{wasuType},</if>
  229. <if test="wasuRang != null and wasuRang != ''">WASU_RANG = #{wasuRang},</if>
  230. <if test="desWasuScal != null and desWasuScal != ''">DES_WASU_SCAL = #{desWasuScal},</if>
  231. <if test="desWasuPop != null and desWasuPop != ''">DES_WASU_POP = #{desWasuPop},</if>
  232. <if test="engStat != null and engStat != ''">ENG_STAT = #{engStat},</if>
  233. <if test="startDate != null and startDate != ''">START_DATE = #{startDate},</if>
  234. <if test="compDate != null and compDate != ''">COMP_DATE = TO_DATE(#{compDate},'YYYY-MM-DD'),</if>
  235. <if test="note != null and note != ''">NOTE = #{note},</if>
  236. <if test="provincial != null and provincial != ''">PROVINCIAL = #{provincial},</if>
  237. <if test="effDate != null and effDate != ''">EFF_DATE = TO_DATE(#{effDate},'YYYY-MM-DD HH24:MI:SS'),</if>
  238. <if test="exprDate != null and exprDate != ''">EXPR_DATE = TO_DATE(#{exprDate},'YYYY-MM-DD HH24:MI:SS'),
  239. </if>
  240. </trim>
  241. <include refid="page_where"/>
  242. </update>
  243. <!-- 其他自定义SQL -->
  244. <select id="queryListByObjId" resultMap="attCwsBaseResultMap" parameterType="string">
  245. SELECT A.EDTR_PESR ,
  246. TO_CHAR(A.UPTM,'YYYY-MM-DD HH24:MI:SS') UPTM,
  247. A.CENTER_X_GD ,
  248. A.CENTER_Y_GD ,
  249. A.ADDVCD ,
  250. A.GUID ,
  251. A.CWS_CODE ,
  252. A.CWS_NAME ,
  253. A.CWS_LONG ,
  254. A.CWS_LAT ,
  255. A.CWS_LOC ,
  256. A.ENG_TYPE ,
  257. A.WASU_TYPE ,
  258. A.WASU_RANG ,
  259. A.DES_WASU_SCAL ,
  260. A.DES_WASU_POP ,
  261. A.ENG_STAT ,
  262. A.START_DATE ,
  263. TO_CHAR(COMP_DATE,'YYYY-MM-DD') COMP_DATE,
  264. TO_CHAR(COMP_DATE,'YYYY') COMP_YEAR,
  265. A.NOTE ,
  266. TO_CHAR(A.EFF_DATE,'YYYY-MM-DD HH24:MI:SS') EFF_DATE,
  267. TO_CHAR(A.EXPR_DATE,'YYYY-MM-DD HH24:MI:SS') EXPR_DATE,
  268. A.PROVINCIAL
  269. FROM ATT_CWS_BASE A
  270. RIGHT JOIN BIS_INSP_VLGDRINK_PROJ_MANAGE B
  271. ON A.CWS_CODE=B.CWS_CODE WHERE
  272. B.ENG_ID=#{engId} AND A.ADDVCD=#{adCode} AND A.EXPR_DATE IS NULL
  273. <if test="name !=null and name !=''">
  274. AND A.CWS_NAME LIKE '%'||#{name}||'%'
  275. </if>
  276. ORDER BY A.GUID
  277. </select>
  278. <select id="queryListByObjIdNotDC" resultMap="attCwsBaseResultMap" parameterType="string">
  279. SELECT A.EDTR_PESR ,
  280. TO_CHAR(A.UPTM,'YYYY-MM-DD HH24:MI:SS') UPTM,
  281. A.CENTER_X_GD ,
  282. A.CENTER_Y_GD ,
  283. A.ADDVCD ,
  284. A.GUID ,
  285. A.CWS_CODE ,
  286. A.CWS_NAME ,
  287. A.CWS_LONG ,
  288. A.CWS_LAT ,
  289. A.CWS_LOC ,
  290. A.ENG_TYPE ,
  291. A.WASU_TYPE ,
  292. A.WASU_RANG ,
  293. A.DES_WASU_SCAL ,
  294. A.DES_WASU_POP ,
  295. A.ENG_STAT ,
  296. A.START_DATE ,
  297. TO_CHAR(COMP_DATE,'YYYY-MM-DD') COMP_DATE,
  298. TO_CHAR(COMP_DATE,'YYYY') COMP_YEAR,
  299. A.NOTE ,
  300. TO_CHAR(A.EFF_DATE,'YYYY-MM-DD HH24:MI:SS') EFF_DATE,
  301. TO_CHAR(A.EXPR_DATE,'YYYY-MM-DD HH24:MI:SS') EXPR_DATE,
  302. A.PROVINCIAL
  303. FROM ATT_CWS_BASE A
  304. left JOIN BIS_INSP_VLGDRINK_PROJ_MANAGE B
  305. ON A.CWS_CODE=B.CWS_CODE WHERE
  306. ( B.ENG_ID!=#{engId} OR B.ENG_ID IS NULL)
  307. AND A.ADDVCD=#{adCode} AND A.EXPR_DATE IS NULL
  308. <if test="name !=null and name !=''">
  309. AND A.CWS_NAME LIKE '%'||#{name}||'%'
  310. </if>
  311. ORDER BY A.GUID
  312. </select>
  313. <select id="getMaxCwsCode" parameterType="string" resultType="string">
  314. SELECT MAX(CWS_CODE) FROM att_cws_base WHERE ADDVCD=#{adCode}
  315. </select>
  316. <select id="queryListWithStatus" resultType="cn.com.goldenwater.dcproj.dto.AttCwsBaseDto" parameterType="string">
  317. SELECT A.EDTR_PESR ,
  318. TO_CHAR(A.UPTM,'YYYY-MM-DD HH24:MI:SS') UPTM,
  319. A.CENTER_X_GD ,
  320. A.CENTER_Y_GD ,
  321. A.ADDVCD ,
  322. A.GUID ,
  323. A.CWS_CODE ,
  324. A.CWS_NAME ,
  325. A.CWS_LONG ,
  326. A.CWS_LAT ,
  327. A.CWS_LOC ,
  328. A.ENG_TYPE ,
  329. A.WASU_TYPE ,
  330. A.WASU_RANG ,
  331. A.DES_WASU_SCAL ,
  332. A.DES_WASU_POP ,
  333. A.ENG_STAT ,
  334. A.START_DATE ,
  335. TO_CHAR(COMP_DATE,'YYYY-MM-DD') COMP_DATE,
  336. TO_CHAR(COMP_DATE,'YYYY') COMP_YEAR,
  337. A.NOTE ,
  338. A.PROVINCIAL ,
  339. TO_CHAR(A.EFF_DATE,'YYYY-MM-DD HH24:MI:SS') EFF_DATE,
  340. TO_CHAR(A.EXPR_DATE,'YYYY-MM-DD HH24:MI:SS') EXPR_DATE,
  341. CASE WHEN B.ENG_ID = #{engId} THEN 1 ELSE 0 end STATUS
  342. FROM att_cws_base A
  343. LEFT JOIN BIS_INSP_VLGDRINK_PROJ_MANAGE B
  344. ON A.CWS_CODE = B.CWS_CODE
  345. WHERE A.ADDVCD = #{adCode} AND A.EXPR_DATE IS NULL
  346. <if test="name !=null and name !=''">
  347. AND A.CWS_NAME LIKE '%'||#{name}||'%'
  348. </if>
  349. order by status desc,A.EFF_DATE DESC
  350. </select>
  351. <select id="queryListByRegstrIdNotDC" resultType="cn.com.goldenwater.dcproj.model.AttCwsBase"
  352. parameterType="cn.com.goldenwater.dcproj.param.CwsParam">
  353. SELECT *
  354. FROM ATT_CWS_BASE S
  355. WHERE
  356. CWS_CODE NOT IN (SELECT CWS_CODE FROM
  357. <choose>
  358. <when test="type=='25'.toString()">
  359. BIS_NEW_COUNTRY_FEE WHERE STATUS = '0' OR STATUS IS NULL
  360. </when>
  361. <when test="type=='71'.toString()">
  362. (SELECT PRJ_ID AS CWS_CODE FROM BIS_INSP_VILLQH_FEE WHERE DATA_STAT = '0')
  363. </when>
  364. <when test="type=='97'.toString()">
  365. BIS_INSP_VILL2021_CWS WHERE DATA_STAT = '0' AND RGSTR_ID = #{regstrId}
  366. </when>
  367. <otherwise>
  368. BIS_ZHEJIANG_COUNTRY_FEE WHERE STATUS = '0' OR STATUS IS NULL
  369. </otherwise>
  370. </choose>
  371. )
  372. <if test="name !=null and name !=''">
  373. AND S.CWS_NAME LIKE '%${name}%'
  374. </if>
  375. <if test="adCode !=null and adCode !=''">
  376. AND S.ADDVCD LIKE '${adCode}%'
  377. </if>
  378. <if test="engType !=null and engType !=''">
  379. AND S.ENG_TYPE =#{engType}
  380. </if>
  381. <if test="engStat !=null and engStat !=''">
  382. AND S.ENG_STAT IN (${engStat})
  383. </if>
  384. </select>
  385. <select id="queryListByRegstrIdNotDCByType" resultType="cn.com.goldenwater.dcproj.model.AttCwsBase"
  386. parameterType="cn.com.goldenwater.dcproj.param.CwsParam">
  387. SELECT * FROM (
  388. SELECT
  389. E.*,
  390. (CASE WHEN F.STATUS IS NULL THEN '0' ELSE F.STATUS END) AS STATUS
  391. FROM ATT_CWS_BASE E
  392. LEFT JOIN
  393. <if test='type = "37"'>
  394. (select f.prj_id as cws_code,f.status from BIS_BIS_RDWSP_RGSTR_FEE f)
  395. </if>
  396. f on e.cws_code=f.cws_code
  397. ) s where s.status='0'
  398. <if test="name !=null and name !=''">
  399. and s.cws_name like '%${name}%'
  400. </if>
  401. <if test="adCode !=null and adCode !=''">
  402. and s.addvcd like '${adCode}%'
  403. </if>
  404. <if test="engType !=null and engType !=''">
  405. and s.eng_type IN (${engType})
  406. </if>
  407. </select>
  408. <update id="updateBatchProvincial" parameterType="cn.com.goldenwater.dcproj.param.AttCwsBaseParam">
  409. update ATT_CWS_BASE set PROVINCIAL = #{provincial}
  410. where CWS_CODE in
  411. <foreach item="cwsCode" collection="cwsCodes" open="(" separator="," close=")">
  412. #{cwsCode}
  413. </foreach>
  414. </update>
  415. </mapper>