TacPawpRgstrDao.xml 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437
  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.TacPawpRgstrDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.TacPawpRgstr" id="tacPawpRgstrResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="objId" column="OBJ_ID"/>
  7. <result property="name" column="NAME"/>
  8. <result property="admOrg" column="ADM_ORG"/>
  9. <result property="adCode" column="AD_CODE"/>
  10. <result property="location" column="LOCATION"/>
  11. <result property="type" column="TYPE"/>
  12. <result property="itmeDesc" column="ITME_DESC"/>
  13. <result property="itmeEval" column="ITME_EVAL"/>
  14. <result property="katalog" column="KATALOG"/>
  15. <result property="spcltYm" column="SPCLT_YM"/>
  16. <result property="revOpin" column="REV_OPIN"/>
  17. <result property="revTm" column="REV_TM"/>
  18. <result property="centerX" column="CENTER_X"/>
  19. <result property="centerY" column="CENTER_Y"/>
  20. <result property="gdX" column="GD_X"/>
  21. <result property="gdY" column="GD_Y"/>
  22. <result property="note" column="NOTE"/>
  23. <result property="state" column="STATE"/>
  24. <result property="dataStat" column="DATA_STAT"/>
  25. <result property="pdbstStat" column="PDBST_STAT"/>
  26. <result property="bstocmPlprsStat" column="BSTOCM_PLPRS_STAT"/>
  27. <result property="bstocmTsopbfpStat" column="BSTOCM_TSOPBFP_STAT"/>
  28. <result property="bstocmCpssStat" column="BSTOCM_CPSS_STAT"/>
  29. <result property="bstocmCmsStat" column="BSTOCM_CMS_STAT"/>
  30. <result property="raiobisStat" column="RAIOBIS_STAT"/>
  31. <result property="biofuamStat" column="BIOFUAM_STAT"/>
  32. <result property="bitopqQmsStat" column="BITOPQ_QMS_STAT"/>
  33. <result property="bitopqPeqaaStat" column="BITOPQ_PEQAA_STAT"/>
  34. <result property="bioesPeStat" column="BIOES_PE_STAT"/>
  35. <result property="bioesRwunitStat" column="BIOES_RWUNIT_STAT"/>
  36. <result property="persId" column="PERS_ID"/>
  37. <result property="groupId" column="GROUP_ID"/>
  38. <result property="intm" column="INTM"/>
  39. <result property="uptm" column="UPTM"/>
  40. <result property="adName" column="AD_NAME"/>
  41. <result property="isPoverty" column="IS_POVERTY"/>
  42. <result property="province" column="PROVINCE"/>
  43. <result property="taskId" column="TASK_ID"/>
  44. </resultMap>
  45. <sql id="table_columns">
  46. ID,TASK_ID,
  47. OBJ_ID,
  48. NAME,
  49. ADM_ORG,
  50. AD_CODE,
  51. LOCATION,
  52. TYPE,
  53. ITME_DESC,
  54. ITME_EVAL,
  55. KATALOG,
  56. SPCLT_YM,
  57. REV_OPIN,
  58. REV_TM,
  59. CENTER_X,
  60. CENTER_Y,
  61. GD_X,
  62. GD_Y,
  63. NOTE,
  64. STATE,
  65. DATA_STAT,
  66. PDBST_STAT,
  67. BSTOCM_PLPRS_STAT,
  68. BSTOCM_TSOPBFP_STAT,
  69. BSTOCM_CPSS_STAT,
  70. BSTOCM_CMS_STAT,
  71. RAIOBIS_STAT,
  72. BIOFUAM_STAT,
  73. BITOPQ_QMS_STAT,
  74. BITOPQ_PEQAA_STAT,
  75. BIOES_PE_STAT,
  76. BIOES_RWUNIT_STAT,
  77. PERS_ID,
  78. GROUP_ID,
  79. INTM,
  80. UPTM,AD_NAME,IS_POVERTY,PROVINCE
  81. </sql>
  82. <sql id="entity_properties">
  83. #{id},#{taskId},
  84. #{objId},
  85. #{name},
  86. #{admOrg},
  87. #{adCode},
  88. #{location},
  89. #{type},
  90. #{itmeDesc},
  91. #{itmeEval},
  92. #{katalog},
  93. #{spcltYm},
  94. #{revOpin},
  95. #{revTm},
  96. #{centerX},
  97. #{centerY},
  98. #{gdX},
  99. #{gdY},
  100. #{note},
  101. #{state},
  102. #{dataStat},
  103. #{pdbstStat},
  104. #{bstocmPlprsStat},
  105. #{bstocmTsopbfpStat},
  106. #{bstocmCpssStat},
  107. #{bstocmCmsStat},
  108. #{raiobisStat},
  109. #{biofuamStat},
  110. #{bitopqQmsStat},
  111. #{bitopqPeqaaStat},
  112. #{bioesPeStat},
  113. #{bioesRwunitStat},
  114. #{persId},
  115. #{groupId},
  116. #{intm},
  117. #{uptm},#{adName},#{isPoverty},#{province}
  118. </sql>
  119. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  120. <sql id="page_where">
  121. <trim prefix="where" prefixOverrides="and | or ">
  122. <if test="objId != null and objId != ''">and OBJ_ID = #{objId}</if>
  123. <if test="name != null and name != ''">and NAME like '%${name}%'</if>
  124. <if test="admOrg != null and admOrg != ''">and ADM_ORG like '%${admOrg}%'</if>
  125. <if test="adCode != null and adCode != ''">and AD_CODE = #{adCode}</if>
  126. <if test="location != null and location != ''">and LOCATION like '%${location}%'</if>
  127. <if test="type != null and type != ''">and TYPE like '%${type}%' #{type}</if>
  128. <if test="itmeDesc != null and itmeDesc != ''">and ITME_DESC like '%${itmeDesc}%'</if>
  129. <if test="itmeEval != null and itmeEval != ''">and ITME_EVAL like '%${itmeEval}%'</if>
  130. <if test="katalog != null and katalog != ''">and KATALOG like '%${katalog}%'</if>
  131. <if test="spcltYm != null">and SPCLT_YM = #{spcltYm}</if>
  132. <if test="revOpin != null and revOpin != ''">and REV_OPIN like '%${revOpin}%'</if>
  133. <if test="revTm != null">and REV_TM = #{revTm}</if>
  134. <if test="centerX != null and centerX != ''">and CENTER_X = #{centerX}</if>
  135. <if test="centerY != null and centerY != ''">and CENTER_Y = #{centerY}</if>
  136. <if test="gdX != null and gdX != ''">and GD_X = #{gdX}</if>
  137. <if test="gdY != null and gdY != ''">and GD_Y = #{gdY}</if>
  138. <if test="note != null and note != ''">and NOTE like '%${note}%'</if>
  139. <if test="state != null and state != ''">and STATE = #{state}</if>
  140. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  141. <if test="pdbstStat != null and pdbstStat != ''">and PDBST_STAT = #{pdbstStat}</if>
  142. <if test="bstocmPlprsStat != null and bstocmPlprsStat != ''">and BSTOCM_PLPRS_STAT = #{bstocmPlprsStat}</if>
  143. <if test="bstocmTsopbfpStat != null and bstocmTsopbfpStat != ''">and BSTOCM_TSOPBFP_STAT =
  144. #{bstocmTsopbfpStat}
  145. </if>
  146. <if test="bstocmCpssStat != null and bstocmCpssStat != ''">and BSTOCM_CPSS_STAT = #{bstocmCpssStat}</if>
  147. <if test="bstocmCmsStat != null and bstocmCmsStat != ''">and BSTOCM_CMS_STAT = #{bstocmCmsStat}</if>
  148. <if test="raiobisStat != null and raiobisStat != ''">and RAIOBIS_STAT = #{raiobisStat}</if>
  149. <if test="biofuamStat != null and biofuamStat != ''">and BIOFUAM_STAT = #{biofuamStat}</if>
  150. <if test="bitopqQmsStat != null and bitopqQmsStat != ''">and BITOPQ_QMS_STAT = #{bitopqQmsStat}</if>
  151. <if test="bitopqPeqaaStat != null and bitopqPeqaaStat != ''">and BITOPQ_PEQAA_STAT = #{bitopqPeqaaStat}</if>
  152. <if test="bioesPeStat != null and bioesPeStat != ''">and BIOES_PE_STAT = #{bioesPeStat}</if>
  153. <if test="bioesRwunitStat != null and bioesRwunitStat != ''">and BIOES_RWUNIT_STAT = #{bioesRwunitStat}</if>
  154. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  155. <if test="groupId != null and groupId != ''">and GROUP_ID = #{groupId}</if>
  156. <if test="intm != null">and INTM = #{intm}</if>
  157. <if test="uptm != null">and UPTM = #{uptm}</if>
  158. <if test="isPoverty != null">and IS_POVERTY = #{isPoverty}</if>
  159. <if test="adName != null">and AD_NAME = #{adName}</if>
  160. <include refid="choseSql"/>
  161. </trim>
  162. </sql>
  163. <sql id="choseSql" >
  164. <choose>
  165. <when test="province !=null and province !=''">
  166. and t.province=#{province}
  167. </when>
  168. <otherwise>
  169. and t.province is null
  170. </otherwise>
  171. </choose>
  172. </sql>
  173. <select id="get" resultMap="tacPawpRgstrResultMap" parameterType="String">
  174. select
  175. <include refid="table_columns"/>
  176. from TAC_PAWP_RGSTR where ID = #{id}
  177. </select>
  178. <select id="getBy" resultMap="tacPawpRgstrResultMap">
  179. select
  180. <include refid="table_columns"/>
  181. from TAC_PAWP_RGSTR t
  182. <include refid="page_where"/>
  183. </select>
  184. <select id="findAll" resultMap="tacPawpRgstrResultMap">
  185. select
  186. <include refid="table_columns"/>
  187. from TAC_PAWP_RGSTR t where 1=1
  188. <include refid="choseSql"/>
  189. </select>
  190. <select id="findList" resultMap="tacPawpRgstrResultMap">
  191. select
  192. <include refid="table_columns"/>
  193. from TAC_PAWP_RGSTR t
  194. <include refid="page_where"/>
  195. </select>
  196. <select id="selectCount" resultType="int">
  197. select count(ID) from TAC_PAWP_RGSTR t
  198. <include refid="page_where"/>
  199. </select>
  200. <!--获取助理数据-->
  201. <select id="findZhuli" resultType="String">
  202. select n.persid from bis_insp_all_rlation n where n.id in(
  203. select o.id from tac_pawp_rgstr r,bis_insp_all_obj o where r.obj_id=o.obj_id and r.id=#{regstrId} ) and
  204. n.pertype=19
  205. </select>
  206. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.TacPawpRgstr">
  207. insert into TAC_PAWP_RGSTR(
  208. <include refid="table_columns"/>
  209. )
  210. values (
  211. <include refid="entity_properties"/>
  212. )
  213. </insert>
  214. <delete id="delete" parameterType="java.lang.String">
  215. delete from TAC_PAWP_RGSTR where ID = #{id}
  216. </delete>
  217. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.TacPawpRgstr">
  218. delete from TAC_PAWP_RGSTR t
  219. <include refid="page_where"/>
  220. </delete>
  221. <update id="deleteInFlag" parameterType="java.lang.String">
  222. update TAC_PAWP_RGSTR set flag_valid = 0 where ID = #{id}
  223. </update>
  224. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.TacPawpRgstr">
  225. update TAC_PAWP_RGSTR
  226. <trim prefix="set" suffixOverrides=",">
  227. <if test="objId != null and objId != ''">OBJ_ID = #{objId},</if>
  228. <if test="taskId != null and taskId != ''">TASK_ID = #{taskId},</if>
  229. <if test="name != null and name != ''">NAME = #{name},</if>
  230. <if test="admOrg != null">ADM_ORG = #{admOrg},</if>
  231. <if test="adCode != null">AD_CODE = #{adCode},</if>
  232. <if test="location != null">LOCATION = #{location},</if>
  233. <if test="isPoverty != null">IS_POVERTY = #{isPoverty},</if>
  234. <if test="adName != null">AD_NAME = #{adName},</if>
  235. <if test="type != null">TYPE = #{type},</if>
  236. <if test="itmeDesc != null">ITME_DESC = #{itmeDesc},</if>
  237. <if test="itmeEval != null">ITME_EVAL = #{itmeEval},</if>
  238. <if test="katalog != null">KATALOG = #{katalog},</if>
  239. <if test="spcltYm != null">SPCLT_YM = #{spcltYm},</if>
  240. <if test="revOpin != null">REV_OPIN = #{revOpin},</if>
  241. <if test="revTm != null">REV_TM = #{revTm},</if>
  242. <if test="centerX != null">CENTER_X = #{centerX},</if>
  243. <if test="centerY != null">CENTER_Y = #{centerY},</if>
  244. <if test="gdX != null">GD_X = #{gdX},</if>
  245. <if test="gdY != null">GD_Y = #{gdY},</if>
  246. <if test="note != null">NOTE = #{note},</if>
  247. <if test="state != null and state != ''">STATE = #{state},</if>
  248. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  249. <if test="pdbstStat != null and pdbstStat != ''">PDBST_STAT = #{pdbstStat},</if>
  250. <if test="bstocmPlprsStat != null and bstocmPlprsStat != ''">BSTOCM_PLPRS_STAT = #{bstocmPlprsStat},</if>
  251. <if test="bstocmTsopbfpStat != null and bstocmTsopbfpStat != ''">BSTOCM_TSOPBFP_STAT =
  252. #{bstocmTsopbfpStat},
  253. </if>
  254. <if test="bstocmCpssStat != null and bstocmCpssStat != ''">BSTOCM_CPSS_STAT = #{bstocmCpssStat},</if>
  255. <if test="bstocmCmsStat != null and bstocmCmsStat != ''">BSTOCM_CMS_STAT = #{bstocmCmsStat},</if>
  256. <if test="raiobisStat != null and raiobisStat != ''">RAIOBIS_STAT = #{raiobisStat},</if>
  257. <if test="biofuamStat != null and biofuamStat != ''">BIOFUAM_STAT = #{biofuamStat},</if>
  258. <if test="bitopqQmsStat != null and bitopqQmsStat != ''">BITOPQ_QMS_STAT = #{bitopqQmsStat},</if>
  259. <if test="bitopqPeqaaStat != null and bitopqPeqaaStat != ''">BITOPQ_PEQAA_STAT = #{bitopqPeqaaStat},</if>
  260. <if test="bioesPeStat != null and bioesPeStat != ''">BIOES_PE_STAT = #{bioesPeStat},</if>
  261. <if test="bioesRwunitStat != null and bioesRwunitStat != ''">BIOES_RWUNIT_STAT = #{bioesRwunitStat},</if>
  262. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  263. <if test="groupId != null and groupId != ''">GROUP_ID = #{groupId},</if>
  264. <if test="intm != null">INTM = #{intm},</if>
  265. <if test="uptm != null">UPTM = #{uptm},</if>
  266. <if test="province != null and province">PROVINCE = #{province},</if>
  267. </trim>
  268. <where>ID = #{id}</where>
  269. </update>
  270. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.TacPawpRgstr">
  271. update TAC_PAWP_RGSTR
  272. <trim prefix="set" suffixOverrides=",">
  273. <if test="objId != null and objId != ''">OBJ_ID = #{objId},</if>
  274. <if test="taskId != null and taskId != ''">TASK_ID = #{taskId},</if>
  275. <if test="name != null and name != ''">NAME = #{name},</if>
  276. <if test="isPoverty != null">IS_POVERTY = #{isPoverty},</if>
  277. <if test="adName != null">AD_NAME = #{adName},</if>
  278. <if test="admOrg != null">ADM_ORG = #{admOrg},</if>
  279. <if test="adCode != null">AD_CODE = #{adCode},</if>
  280. <if test="location != null">LOCATION = #{location},</if>
  281. <if test="type != null">TYPE = #{type},</if>
  282. <if test="itmeDesc != null">ITME_DESC = #{itmeDesc},</if>
  283. <if test="itmeEval != null">ITME_EVAL = #{itmeEval},</if>
  284. <if test="katalog != null">KATALOG = #{katalog},</if>
  285. <if test="spcltYm != null">SPCLT_YM = #{spcltYm},</if>
  286. <if test="revOpin != null">REV_OPIN = #{revOpin},</if>
  287. <if test="revTm != null">REV_TM = #{revTm},</if>
  288. <if test="centerX != null">CENTER_X = #{centerX},</if>
  289. <if test="centerY != null">CENTER_Y = #{centerY},</if>
  290. <if test="gdX != null">GD_X = #{gdX},</if>
  291. <if test="gdY != null">GD_Y = #{gdY},</if>
  292. <if test="note != null">NOTE = #{note},</if>
  293. <if test="state != null and state != ''">STATE = #{state},</if>
  294. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  295. <if test="pdbstStat != null and pdbstStat != ''">PDBST_STAT = #{pdbstStat},</if>
  296. <if test="bstocmPlprsStat != null and bstocmPlprsStat != ''">BSTOCM_PLPRS_STAT = #{bstocmPlprsStat},</if>
  297. <if test="bstocmTsopbfpStat != null and bstocmTsopbfpStat != ''">BSTOCM_TSOPBFP_STAT =
  298. #{bstocmTsopbfpStat},
  299. </if>
  300. <if test="bstocmCpssStat != null and bstocmCpssStat != ''">BSTOCM_CPSS_STAT = #{bstocmCpssStat},</if>
  301. <if test="bstocmCmsStat != null and bstocmCmsStat != ''">BSTOCM_CMS_STAT = #{bstocmCmsStat},</if>
  302. <if test="raiobisStat != null and raiobisStat != ''">RAIOBIS_STAT = #{raiobisStat},</if>
  303. <if test="biofuamStat != null and biofuamStat != ''">BIOFUAM_STAT = #{biofuamStat},</if>
  304. <if test="bitopqQmsStat != null and bitopqQmsStat != ''">BITOPQ_QMS_STAT = #{bitopqQmsStat},</if>
  305. <if test="bitopqPeqaaStat != null and bitopqPeqaaStat != ''">BITOPQ_PEQAA_STAT = #{bitopqPeqaaStat},</if>
  306. <if test="bioesPeStat != null and bioesPeStat != ''">BIOES_PE_STAT = #{bioesPeStat},</if>
  307. <if test="bioesRwunitStat != null and bioesRwunitStat != ''">BIOES_RWUNIT_STAT = #{bioesRwunitStat},</if>
  308. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  309. <if test="groupId != null and groupId != ''">GROUP_ID = #{groupId},</if>
  310. <if test="intm != null">INTM = #{intm},</if>
  311. <if test="uptm != null">UPTM = #{uptm},</if>
  312. <if test="province != null and province">PROVINCE = #{province},</if>
  313. </trim>
  314. <include refid="page_where"/>
  315. </update>
  316. <!-- 其他自定义SQL -->
  317. <!--获取稽察项目督查任务列表-->
  318. <select id="findPawpPage" parameterType="cn.com.goldenwater.dcproj.param.TypeParam"
  319. resultType="cn.com.goldenwater.dcproj.dto.TacPawpRgstrDto">
  320. SELECT *
  321. FROM (SELECT A.CODE,
  322. (CASE
  323. WHEN R.NAME IS NULL THEN
  324. A.NM
  325. ELSE
  326. R.NAME
  327. END) NM,
  328. A.ID,
  329. A.PTYPE,
  330. A.LGTD,
  331. A.LTTD,
  332. A.OBJ_INTM,
  333. A.OBJ_ID,
  334. A.IS_SET_OBJ,
  335. CASE
  336. WHEN R.STATE IS NULL THEN
  337. '0'
  338. ELSE
  339. R.STATE
  340. END AS WTDSTSTATE,
  341. (CASE
  342. WHEN R.LOCATION IS NULL THEN
  343. E.LOCATION
  344. ELSE
  345. R.LOCATION
  346. END) AS LOCATION,
  347. (CASE
  348. WHEN R.Adm_Org IS NULL THEN
  349. E.Adm_Org
  350. ELSE
  351. R.Adm_Org
  352. END) AS Adm_Org,
  353. R.AD_CODE,
  354. R.TYPE,
  355. R.NAME,
  356. R.CENTER_X,
  357. R.CENTER_Y,
  358. R.GD_X,
  359. R.GD_Y,
  360. R.PDBST_STAT,
  361. R.BSTOCM_PLPRS_STAT,
  362. R.BSTOCM_TSOPBFP_STAT,
  363. R.BSTOCM_CPSS_STAT,
  364. R.BSTOCM_CMS_STAT,
  365. R.RAIOBIS_STAT,
  366. R.BIOFUAM_STAT,
  367. R.BITOPQ_QMS_STAT,
  368. R.BITOPQ_PEQAA_STAT,
  369. R.BIOES_PE_STAT,
  370. R.BIOES_RWUNIT_STAT,
  371. R.ID AS RGSTRID,
  372. R.GROUP_ID,
  373. R.PROVINCE,
  374. R.INTM,
  375. R.AD_NAME,
  376. R.IS_POVERTY
  377. FROM BIS_INSP_ALL_OBJ A
  378. LEFT JOIN TAC_PAWP_RGSTR R
  379. ON A.OBJ_ID = R.OBJ_ID
  380. LEFT JOIN TAC_ATT_PAWP_BASE E
  381. ON A.CODE = E.ID
  382. WHERE A.PTYPE = '8' and
  383. A.id in (${inIdsSql})) a where 1=1
  384. <include refid="choseSqlR"/>
  385. <if test="plnaId !=null and plnaId !=''">
  386. and a.id like '${plnaId}%'
  387. </if>
  388. <if test="rsName !=null and rsName !=''">
  389. and a.nm like '${rsName}%'
  390. </if>
  391. <if test="state !=null and state !=''">
  392. and wtdstState =#{state}
  393. </if>
  394. <if test="code !=null and code !=''">
  395. and code like '${code}%'
  396. </if>
  397. order by wtdstState asc
  398. <if test="orderBy != null and orderBy != ''">
  399. <!-- ,${orderBy}-->
  400. ,CONVERT( nm USING gbk ) COLLATE gbk_chinese_ci ASC
  401. </if>
  402. </select>
  403. <sql id="choseSqlR" >
  404. <choose>
  405. <when test="province !=null and province !=''">
  406. and a.province=#{province}
  407. </when>
  408. <otherwise>
  409. and a.province is null
  410. </otherwise>
  411. </choose>
  412. </sql>
  413. <!--根据批次Id 获取下面的所有督查项目 -->
  414. <select id="getRgstrListByBatch" resultType="cn.com.goldenwater.dcproj.model.TacPawpRgstr">
  415. select B.* from TAC_INSP_YEAR_BATCH_OBJ A
  416. JOIN TAC_PAWP_RGSTR B ON A.ID=B.OBJ_ID
  417. WHERE B.STATE=#{state} and a.year=#{year} and A.BATCH=#{batch} and b.ad_code like '${orgId}%'
  418. </select>
  419. </mapper>