BisInspPblmPlistDao.xml 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650
  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.BisInspPblmPlistDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspPblmPlist" id="bisInspPblmPlistResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="dutyName" column="DUTY_NAME"/>
  7. <result property="pblmClassify" column="PBLM_CLASSIFY"/>
  8. <result property="pblmNub" column="PBLM_NUB"/>
  9. <result property="pblmNubName" column="PBLM_NUB_NAME"/>
  10. <result property="pblmId" column="PBLM_ID"/>
  11. <result property="pblmNo" column="PBLM_NO"/>
  12. <result property="objType" column="OBJ_TYPE"/>
  13. <result property="pblmNameBz" column="PBLM_NAME_BZ"/>
  14. <result property="checkPointBz" column="CHECK_POINT_BZ"/>
  15. <result property="pblmDescBz" column="PBLM_DESC_BZ"/>
  16. <result property="inspPblmCate" column="INSP_PBLM_CATE"/>
  17. <result property="inspPblmDesc" column="INSP_PBLM_DESC"/>
  18. <result property="objName" column="OBJ_NAME"/>
  19. <result property="objCode" column="OBJ_CODE"/>
  20. <result property="objAdCode" column="OBJ_AD_CODE"/>
  21. <result property="pblmAdName" column="PBLM_AD_NAME"/>
  22. <result property="pblmTm" column="PBLM_TM"/>
  23. <result property="pblmReason" column="PBLM_REASON"/>
  24. <result property="pblmCrtm" column="PBLM_CRTM"/>
  25. <result property="isRect" column="IS_RECT"/>
  26. <result property="pblmPltm" column="PBLM_PLTM"/>
  27. <result property="pblmActm" column="PBLM_ACTM"/>
  28. <result property="crtState" column="CRT_STATE"/>
  29. <result property="crtInfo" column="CRT_INFO"/>
  30. <result property="crtNote" column="CRT_NOTE"/>
  31. <result property="pblmState" column="PBLM_STATE"/>
  32. <result property="pblmOut" column="PBLM_OUT"/>
  33. <result property="sendOrgId" column="SEND_ORG_ID"/>
  34. <result property="sendOrgName" column="SEND_ORG_NAME"/>
  35. <result property="recvOrgId" column="RECV_ORG_ID"/>
  36. <result property="recvOrgName" column="RECV_ORG_NAME"/>
  37. <result property="tranOrgId" column="TRAN_ORG_ID"/>
  38. <result property="tranOrgName" column="TRAN_ORG_NAME"/>
  39. <result property="persId" column="PERS_ID"/>
  40. <result property="persName" column="PERS_NAME"/>
  41. <result property="intm" column="INTM"/>
  42. <result property="uptm" column="UPTM"/>
  43. <result property="dataStat" column="DATA_STAT"/>
  44. <result property="isStart" column="IS_START"/>
  45. <result property="impSource" column="IMP_SOURCE"/>
  46. <result property="isSite" column="IS_SITE"/>
  47. <result property="chkDept" column="CHK_DEPT"/>
  48. <result property="dcBatch" column="DC_BATCH"/>
  49. <result property="provincial" column="PROVINCIAL"/>
  50. <result property="belongOrgId" column="BELONG_ORG_ID"/>
  51. <result property="belongAdCode" column="BELONG_AD_CODE"/>
  52. <result property="selfInspProcessState" column="SELF_INSP_PROCESS_STATE"/>
  53. <result property="damRegCode" column="DAM_REG_CODE"/>
  54. <result property="reviewStat" column="REVIEW_STAT"/>
  55. <result property="reviewResult" column="REVIEW_RESULT"/>
  56. <result property="reviewNote" column="REVIEW_NOTE"/>
  57. <result property="reviewTm" column="REVIEW_TM"/>
  58. </resultMap>
  59. <sql id="table_columns">
  60. ID,
  61. DUTY_NAME,
  62. PBLM_CLASSIFY,
  63. PBLM_NUB,
  64. PBLM_NUB_NAME,
  65. PBLM_ID,
  66. PBLM_NO,
  67. OBJ_TYPE,
  68. PBLM_NAME_BZ,
  69. CHECK_POINT_BZ,
  70. PBLM_DESC_BZ,
  71. INSP_PBLM_CATE,
  72. INSP_PBLM_DESC,
  73. OBJ_NAME,
  74. OBJ_CODE,
  75. OBJ_AD_CODE,
  76. PBLM_AD_NAME,
  77. PBLM_TM,
  78. PBLM_REASON,
  79. PBLM_CRTM,
  80. IS_RECT,
  81. PBLM_PLTM,
  82. PBLM_ACTM,
  83. CRT_STATE,
  84. CRT_INFO,
  85. CRT_NOTE,
  86. PBLM_STATE,
  87. PBLM_OUT,
  88. SEND_ORG_ID,
  89. SEND_ORG_NAME,
  90. RECV_ORG_ID,
  91. RECV_ORG_NAME,
  92. TRAN_ORG_ID,
  93. TRAN_ORG_NAME,
  94. PERS_ID,
  95. PERS_NAME,
  96. INTM,
  97. UPTM,
  98. DATA_STAT,
  99. IS_START,
  100. IMP_SOURCE,
  101. IS_SITE,
  102. CHK_DEPT,
  103. DC_BATCH,
  104. PROVINCIAL,
  105. BELONG_ORG_ID,
  106. BELONG_AD_CODE,
  107. SELF_INSP_PROCESS_STATE,
  108. DAM_REG_CODE,
  109. REVIEW_STAT,
  110. REVIEW_RESULT,
  111. REVIEW_NOTE,
  112. REVIEW_TM
  113. </sql>
  114. <sql id="entity_properties">
  115. #{id},
  116. #{dutyName},
  117. #{pblmClassify},
  118. #{pblmNub},
  119. #{pblmNubName},
  120. #{pblmId},
  121. #{pblmNo},
  122. #{objType},
  123. #{pblmNameBz},
  124. #{checkPointBz},
  125. #{pblmDescBz},
  126. #{inspPblmCate},
  127. #{inspPblmDesc},
  128. #{objName},
  129. #{objCode},
  130. #{objAdCode},
  131. #{pblmAdName},
  132. #{pblmTm},
  133. #{pblmReason},
  134. #{pblmCrtm},
  135. #{isRect},
  136. #{pblmPltm},
  137. #{pblmActm},
  138. #{crtState},
  139. #{crtInfo},
  140. #{crtNote},
  141. #{pblmState},
  142. #{pblmOut},
  143. #{sendOrgId},
  144. #{sendOrgName},
  145. #{recvOrgId},
  146. #{recvOrgName},
  147. #{tranOrgId},
  148. #{tranOrgName},
  149. #{persId},
  150. #{persName},
  151. #{intm},
  152. #{uptm},
  153. #{dataStat},
  154. #{isStart},
  155. #{impSource},
  156. #{isSite},
  157. #{chkDept},
  158. #{dcBatch},
  159. #{provincial},
  160. #{belongOrgId},
  161. #{belongAdCode},
  162. #{selfInspProcessState},
  163. #{damRegCode},
  164. #{reviewStat},
  165. #{reviewResult},
  166. #{reviewNote},
  167. #{reviewTm}
  168. </sql>
  169. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  170. <sql id="page_where">
  171. <trim prefix="where" prefixOverrides="and | or ">
  172. <if test="chkDept != null and chkDept != ''">and CHK_DEPT LIKE CONCAT('%',CONCAT(#{chkDept},'%'))</if>
  173. <if test="dcBatch != null and dcBatch != ''">and DC_BATCH LIKE CONCAT('%',CONCAT(#{dcBatch},'%'))</if>
  174. <if test="dutyName != null and dutyName != ''">and DUTY_NAME = #{dutyName}</if>
  175. <if test="impSource != null and impSource != ''">and IMP_SOURCE = #{impSource}</if>
  176. <if test="pblmClassify != null and pblmClassify != ''">and PBLM_CLASSIFY = #{pblmClassify}</if>
  177. <if test="pblmNub != null and pblmNub != ''">and PBLM_NUB = #{pblmNub}</if>
  178. <if test="pblmNubName != null and pblmNubName != ''">and PBLM_NUB_NAME = #{pblmNubName}</if>
  179. <if test="pblmId != null and pblmId != ''">and PBLM_ID = #{pblmId}</if>
  180. <if test="pblmNo != null and pblmNo != ''">and PBLM_NO = #{pblmNo}</if>
  181. <if test="objType != null and objType != ''">and OBJ_TYPE = #{objType}</if>
  182. <if test="pblmNameBz != null and pblmNameBz != ''">and PBLM_NAME_BZ = #{pblmNameBz}</if>
  183. <if test="checkPointBz != null and checkPointBz != ''">and CHECK_POINT_BZ = #{checkPointBz}</if>
  184. <if test="pblmDescBz != null and pblmDescBz != ''">and PBLM_DESC_BZ = #{pblmDescBz}</if>
  185. <if test="inspPblmCate != null and inspPblmCate != ''">and INSP_PBLM_CATE = #{inspPblmCate}</if>
  186. <if test="inspPblmDesc != null and inspPblmDesc != ''">and INSP_PBLM_DESC = #{inspPblmDesc}</if>
  187. <if test="objName != null and objName != ''">and OBJ_NAME = #{objName}</if>
  188. <if test="objCode != null and objCode != ''">and OBJ_CODE = #{objCode}</if>
  189. <if test="objAdCode != null and objAdCode != ''">and OBJ_AD_CODE like concat(#{objAdCode},'%')</if>
  190. <if test="pblmAdName != null and pblmAdName != ''">and PBLM_AD_NAME = #{pblmAdName}</if>
  191. <if test="pblmTm != null">and PBLM_TM = #{pblmTm}</if>
  192. <if test="pblmReason != null">and PBLM_REASON= #{pblmReason}</if>
  193. <if test="pblmCrtm != null">and PBLM_CRTM = #{pblmCrtm}</if>
  194. <if test="isRect != null and isRect != ''">and IS_RECT = #{isRect}</if>
  195. <if test="pblmPltm != null">and PBLM_PLTM = #{pblmPltm}</if>
  196. <if test="pblmActm != null">and PBLM_ACTM = #{pblmActm}</if>
  197. <if test="crtState != null and crtState != ''">and CRT_STATE = #{crtState}</if>
  198. <if test="crtInfo != null and crtInfo != ''">and CRT_INFO = #{crtInfo}</if>
  199. <if test="crtNote != null and crtNote != ''">and CRT_NOTE = #{crtNote}</if>
  200. <if test="pblmState != null and pblmState != ''">and PBLM_STATE = #{pblmState}</if>
  201. <if test="pblmOut != null and pblmOut != ''">and PBLM_OUT = #{pblmOut}</if>
  202. <if test="sendOrgId != null and sendOrgId != ''">and SEND_ORG_ID = #{sendOrgId}</if>
  203. <if test="sendOrgName != null and sendOrgName != ''">and SEND_ORG_NAME = #{sendOrgName}</if>
  204. <if test="recvOrgId != null and recvOrgId != ''">and RECV_ORG_ID = #{recvOrgId}</if>
  205. <if test="recvOrgName != null and recvOrgName != ''">and RECV_ORG_NAME = #{recvOrgName}</if>
  206. <if test="tranOrgId != null and tranOrgId != ''">and TRAN_ORG_ID = #{tranOrgId}</if>
  207. <if test="tranOrgName != null and tranOrgName != ''">and TRAN_ORG_NAME = #{tranOrgName}</if>
  208. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  209. <if test="persName != null and persName != ''">and PERS_NAME = #{persName}</if>
  210. <if test="intm != null">and INTM = #{intm}</if>
  211. <if test="uptm != null">and UPTM = #{uptm}</if>
  212. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  213. <if test="isStart != null and isStart != ''">and IS_START = #{isStart}</if>
  214. <if test="isSite != null and isSite != ''">and IS_SITE = #{isSite}</if>
  215. <if test="provincial != null and provincial != ''">and PROVINCIAL = #{provincial}</if>
  216. <if test="belongOrgId != null and belongOrgId != ''">and BELONG_ORG_ID = #{belongOrgId}</if>
  217. <if test="belongAdCode != null and belongAdCode != ''">and BELONG_AD_CODE LIKE CONCAT(#{belongAdCode},'%') </if>
  218. <if test="selfInspProcessState != null and selfInspProcessState != ''">and SELF_INSP_PROCESS_STATE = #{selfInspProcessState}</if>
  219. <if test='damRegCode != null and damRegCode != ""'>and DAM_REG_CODE LIKE CONCAT('%',CONCAT(#{damRegCode},'%')) </if>
  220. <if test='reviewStat != null and reviewStat != ""'>and REVIEW_STAT = #{reviewStat}</if>
  221. <if test='reviewResult != null and reviewResult != ""'>and REVIEW_RESULT = #{reviewResult}</if>
  222. <if test="reviewTm != null">and TO_CHAR(REVIEW_TM,'yyyy-MM-dd') = TO_CHAR(#{reviewTm},'yyyy-MM-dd')</if>
  223. </trim>
  224. </sql>
  225. <select id="get" resultMap="bisInspPblmPlistResultMap" parameterType="String">
  226. select
  227. <include refid="table_columns"/>
  228. from BIS_INSP_PBLM_PLIST where ID = #{id}
  229. </select>
  230. <select id="getBy" resultMap="bisInspPblmPlistResultMap">
  231. select
  232. <include refid="table_columns"/>
  233. from BIS_INSP_PBLM_PLIST
  234. <include refid="page_where"/>
  235. </select>
  236. <select id="findAll" resultMap="bisInspPblmPlistResultMap">
  237. select
  238. <include refid="table_columns"/>
  239. from BIS_INSP_PBLM_PLIST
  240. </select>
  241. <select id="findList" resultMap="bisInspPblmPlistResultMap">
  242. select
  243. <include refid="table_columns"/>
  244. from BIS_INSP_PBLM_PLIST
  245. <include refid="page_where"/>
  246. </select>
  247. <!-- 四川省 水库大坝 根据注册登记号 查询整改台账-->
  248. <select id="findListByDamRegCode" resultType="cn.com.goldenwater.dcproj.model.BisInspPblmPlist">
  249. select * from BIS_INSP_PBLM_PLIST
  250. where DAM_REG_CODE = #{damRegCode} and DATA_STAT='0'
  251. </select>
  252. <select id="selectCount" resultType="int">
  253. select count(ID) from BIS_INSP_PBLM_PLIST
  254. <include refid="page_where"/>
  255. </select>
  256. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspPblmPlist">
  257. insert into BIS_INSP_PBLM_PLIST(
  258. <include refid="table_columns"/>
  259. )
  260. values (
  261. <include refid="entity_properties"/>
  262. )
  263. </insert>
  264. <delete id="delete" parameterType="java.lang.String">
  265. update BIS_INSP_PBLM_PLIST set DATA_STAT='9' where ID = #{id}
  266. </delete>
  267. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspPblmPlist">
  268. delete from BIS_INSP_PBLM_PLIST
  269. <include refid="page_where"/>
  270. </delete>
  271. <update id="deleteInFlag" parameterType="java.lang.String">
  272. update BIS_INSP_PBLM_PLIST set DATA_STAT = 0 where ID = #{id}
  273. </update>
  274. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspPblmPlist">
  275. update BIS_INSP_PBLM_PLIST
  276. <trim prefix="set" suffixOverrides=",">
  277. <if test="chkDept != null and chkDept != ''">CHK_DEPT = #{chkDept},</if>
  278. <if test="dcBatch != null and dcBatch != ''">DC_BATCH = #{dcBatch},</if>
  279. <if test="impSource != null and impSource != ''">IMP_SOURCE = #{impSource},</if>
  280. <if test="dutyName != null and dutyName != ''">DUTY_NAME = #{dutyName},</if>
  281. <if test="pblmClassify != null and pblmClassify != ''">PBLM_CLASSIFY = #{pblmClassify},</if>
  282. <if test="pblmNub != null and pblmNub != ''">PBLM_NUB = #{pblmNub},</if>
  283. <if test="pblmNubName != null and pblmNubName != ''">PBLM_NUB_NAME = #{pblmNubName},</if>
  284. <if test="pblmId != null and pblmId != ''">PBLM_ID = #{pblmId},</if>
  285. <if test="pblmNo != null and pblmNo != ''">PBLM_NO = #{pblmNo},</if>
  286. <if test="objType != null and objType != ''">OBJ_TYPE = #{objType},</if>
  287. <if test="pblmNameBz != null and pblmNameBz != ''">PBLM_NAME_BZ = #{pblmNameBz},</if>
  288. <if test="checkPointBz != null and checkPointBz != ''">CHECK_POINT_BZ = #{checkPointBz},</if>
  289. <if test="pblmDescBz != null and pblmDescBz != ''">PBLM_DESC_BZ = #{pblmDescBz},</if>
  290. <if test="inspPblmCate != null and inspPblmCate != ''">INSP_PBLM_CATE = #{inspPblmCate},</if>
  291. <if test="inspPblmDesc != null and inspPblmDesc != ''">INSP_PBLM_DESC = #{inspPblmDesc},</if>
  292. <if test="objName != null and objName != ''">OBJ_NAME = #{objName},</if>
  293. <if test="objCode != null and objCode != ''">OBJ_CODE = #{objCode},</if>
  294. <if test="objAdCode != null and objAdCode != ''">OBJ_AD_CODE = #{objAdCode},</if>
  295. <if test="pblmAdName != null and pblmAdName != ''">PBLM_AD_NAME = #{pblmAdName},</if>
  296. <if test="pblmTm != null">PBLM_TM = #{pblmTm},</if>
  297. <if test="pblmReason != null">PBLM_REASON = #{pblmReason},</if>
  298. <if test="pblmCrtm != null">PBLM_CRTM = #{pblmCrtm},</if>
  299. <if test="isRect != null and isRect != ''">IS_RECT = #{isRect},</if>
  300. <if test="pblmPltm != null">PBLM_PLTM = #{pblmPltm},</if>
  301. <if test="pblmActm != null">PBLM_ACTM = #{pblmActm},</if>
  302. <if test="crtState != null and crtState != ''">CRT_STATE = #{crtState},</if>
  303. <if test="crtInfo != null and crtInfo != ''">CRT_INFO = #{crtInfo},</if>
  304. <if test="crtNote != null and crtNote != ''">CRT_NOTE = #{crtNote},</if>
  305. <if test="pblmState != null and pblmState != ''">PBLM_STATE = #{pblmState},</if>
  306. <if test="pblmOut != null and pblmOut != ''">PBLM_OUT = #{pblmOut},</if>
  307. <if test="sendOrgId != null and sendOrgId != ''">SEND_ORG_ID = #{sendOrgId},</if>
  308. <if test="sendOrgName != null and sendOrgName != ''">SEND_ORG_NAME = #{sendOrgName},</if>
  309. <if test="recvOrgId != null and recvOrgId != ''">RECV_ORG_ID = #{recvOrgId},</if>
  310. <if test="recvOrgName != null and recvOrgName != ''">RECV_ORG_NAME = #{recvOrgName},</if>
  311. <if test="tranOrgId != null and tranOrgId != ''">TRAN_ORG_ID = #{tranOrgId},</if>
  312. <if test="tranOrgName != null and tranOrgName != ''">TRAN_ORG_NAME = #{tranOrgName},</if>
  313. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  314. <if test="persName != null and persName != ''">PERS_NAME = #{persName},</if>
  315. <if test="intm != null">INTM = #{intm},</if>
  316. <if test="uptm != null">UPTM = #{uptm},</if>
  317. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  318. <if test="isStart != null and isStart != ''">IS_START = #{isStart},</if>
  319. <if test="isSite != null and isSite != ''">IS_SITE = #{isSite},</if>
  320. <if test='damRegCode != null and damRegCode != ""'>DAM_REG_CODE = #{damRegCode},</if>
  321. <if test='reviewStat != null and reviewStat != ""'>REVIEW_STAT = #{reviewStat},</if>
  322. <if test='reviewResult != null and reviewResult != ""'>REVIEW_RESULT = #{reviewResult},</if>
  323. <if test='reviewNote != null and reviewNote != ""'>REVIEW_NOTE = #{reviewNote},</if>
  324. <if test='reviewTm != null '>REVIEW_TM = #{reviewTm},</if>
  325. </trim>
  326. <where>ID = #{id}</where>
  327. </update>
  328. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspPblmPlist">
  329. update BIS_INSP_PBLM_PLIST
  330. <trim prefix="set" suffixOverrides=",">
  331. <if test="chkDept != null and chkDept != ''">CHK_DEPT = #{chkDept},</if>
  332. <if test="dcBatch != null and dcBatch != ''">DC_BATCH = #{dcBatch},</if>
  333. <if test="impSource != null and impSource != ''">IMP_SOURCE = #{impSource},</if>
  334. <if test="dutyName != null and dutyName != ''">DUTY_NAME = #{dutyName},</if>
  335. <if test="pblmClassify != null and pblmClassify != ''">PBLM_CLASSIFY = #{pblmClassify},</if>
  336. <if test="pblmNub != null and pblmNub != ''">PBLM_NUB = #{pblmNub},</if>
  337. <if test="pblmNubName != null and pblmNubName != ''">PBLM_NUB_NAME = #{pblmNubName},</if>
  338. <if test="pblmId != null and pblmId != ''">PBLM_ID = #{pblmId},</if>
  339. <if test="pblmNo != null and pblmNo != ''">PBLM_NO = #{pblmNo},</if>
  340. <if test="objType != null and objType != ''">OBJ_TYPE = #{objType},</if>
  341. <if test="pblmNameBz != null and pblmNameBz != ''">PBLM_NAME_BZ = #{pblmNameBz},</if>
  342. <if test="checkPointBz != null and checkPointBz != ''">CHECK_POINT_BZ = #{checkPointBz},</if>
  343. <if test="pblmDescBz != null and pblmDescBz != ''">PBLM_DESC_BZ = #{pblmDescBz},</if>
  344. <if test="inspPblmCate != null and inspPblmCate != ''">INSP_PBLM_CATE = #{inspPblmCate},</if>
  345. <if test="inspPblmDesc != null and inspPblmDesc != ''">INSP_PBLM_DESC = #{inspPblmDesc},</if>
  346. <if test="objName != null and objName != ''">OBJ_NAME = #{objName},</if>
  347. <if test="objCode != null and objCode != ''">OBJ_CODE = #{objCode},</if>
  348. <if test="objAdCode != null and objAdCode != ''">OBJ_AD_CODE = #{objAdCode},</if>
  349. <if test="pblmAdName != null and pblmAdName != ''">PBLM_AD_NAME = #{pblmAdName},</if>
  350. <if test="pblmTm != null">PBLM_TM = #{pblmTm},</if>
  351. <if test="pblmReason != null">PBLM_REASON = #{pblmReason},</if>
  352. <if test="pblmCrtm != null">PBLM_CRTM = #{pblmCrtm},</if>
  353. <if test="isRect != null and isRect != ''">IS_RECT = #{isRect},</if>
  354. <if test="pblmPltm != null">PBLM_PLTM = #{pblmPltm},</if>
  355. <if test="pblmActm != null">PBLM_ACTM = #{pblmActm},</if>
  356. <if test="crtState != null and crtState != ''">CRT_STATE = #{crtState},</if>
  357. <if test="crtInfo != null and crtInfo != ''">CRT_INFO = #{crtInfo},</if>
  358. <if test="crtNote != null and crtNote != ''">CRT_NOTE = #{crtNote},</if>
  359. <if test="pblmState != null and pblmState != ''">PBLM_STATE = #{pblmState},</if>
  360. <if test="pblmOut != null and pblmOut != ''">PBLM_OUT = #{pblmOut},</if>
  361. <if test="sendOrgId != null and sendOrgId != ''">SEND_ORG_ID = #{sendOrgId},</if>
  362. <if test="sendOrgName != null and sendOrgName != ''">SEND_ORG_NAME = #{sendOrgName},</if>
  363. <if test="recvOrgId != null and recvOrgId != ''">RECV_ORG_ID = #{recvOrgId},</if>
  364. <if test="recvOrgName != null and recvOrgName != ''">RECV_ORG_NAME = #{recvOrgName},</if>
  365. <if test="tranOrgId != null and tranOrgId != ''">TRAN_ORG_ID = #{tranOrgId},</if>
  366. <if test="tranOrgName != null and tranOrgName != ''">TRAN_ORG_NAME = #{tranOrgName},</if>
  367. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  368. <if test="persName != null and persName != ''">PERS_NAME = #{persName},</if>
  369. <if test="intm != null">INTM = #{intm},</if>
  370. <if test="uptm != null">UPTM = #{uptm},</if>
  371. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  372. <if test="isStart != null and isStart != ''">IS_START = #{isStart},</if>
  373. <if test="isSite != null and isSite != ''">IS_SITE = #{isSite},</if>
  374. <if test='damRegCode != null and damRegCode != ""'>DAM_REG_CODE = #{damRegCode},</if>
  375. <if test='reviewStat != null and reviewStat != ""'>REVIEW_STAT = #{reviewStat},</if>
  376. <if test='reviewResult != null and reviewResult != ""'>REVIEW_RESULT = #{reviewResult},</if>
  377. <if test='reviewNote != null and reviewNote != ""'>REVIEW_NOTE = #{reviewNote},</if>
  378. <if test='reviewTm != null '>REVIEW_TM = #{reviewTm},</if>
  379. </trim>
  380. <include refid="page_where"/>
  381. </update>
  382. <!-- 市、县自查 更新 整改问题 的 问题状态 -->
  383. <update id="updateSelfInspStateById" parameterType="cn.com.goldenwater.dcproj.param.BisInspPblmPlistParam">
  384. update BIS_INSP_PBLM_PLIST
  385. set SELF_INSP_PROCESS_STATE = #{selfInspProcessState}
  386. <!-- 是否启动 下发是更新状态为 1-->
  387. <if test='isStart != null and "" != isStart '>,IS_START = #{isStart}</if>
  388. <!-- 是否反馈 -->
  389. <if test='isRect != null and "" != isRect '>,IS_RECT = #{isRect}</if>
  390. <if test="pblmPltm != null">,PBLM_PLTM = #{pblmPltm}</if>
  391. <if test="pblmActm != null">,PBLM_ACTM = #{pblmActm}</if>
  392. <if test="pblmTm != null">,PBLM_TM = #{pblmTm}</if>
  393. <if test="pblmReason != null">,PBLM_REASON = #{pblmReason}</if>
  394. <if test="pblmCrtm != null">,PBLM_CRTM = #{pblmCrtm}</if>
  395. <!-- 问题整改状态 -->
  396. <if test='crtState != null and "" != crtState '>,CRT_STATE = #{crtState}</if>
  397. <if test='crtInfo != null and "" != crtInfo '>,CRT_INFO = #{crtInfo}</if>
  398. <if test='crtNote != null and "" != crtNote ' >, CRT_NOTE = #{crtNote}</if>
  399. <!-- 是否销号 -->
  400. <if test=' null != pblmOut and "" != pblmOut '>,PBLM_OUT = #{pblmOut}</if>
  401. <!-- 是否到现场复核 -->
  402. <if test='isSite != null and "" != isSite '>,IS_SITE = #{isSite}</if>
  403. <if test='chkDept != null and "" != chkDept '>,CHK_DEPT = #{chkDept}</if>
  404. <if test='dcBatch != null and "" != dcBatch '>,DC_BATCH = #{dcBatch}</if>
  405. <if test="uptm != null">,UPTM = #{uptm}</if>
  406. where ID = #{id}
  407. </update>
  408. <!-- 其他自定义SQL -->
  409. <select id="getList" resultType="cn.com.goldenwater.dcproj.model.BisInspPblmPlist">
  410. select * from BIS_INSP_PBLM_PLIST A
  411. where PBLM_STATE IN ('1','2','3','4','5','6','7','8','9','10','11')
  412. and DATA_STAT='0'
  413. <if test="year != null and year != ''">
  414. and to_char(PBLM_TM,'yyyy') =#{year}
  415. </if>
  416. <if test="objAdCode != null and objAdCode != ''">
  417. and obj_Ad_Code like concat(#{objAdCode},'%')
  418. </if>
  419. <if test="objType != null and objType != ''">
  420. and obj_type =#{objType}
  421. </if>
  422. <if test="crtState != null and crtState != ''">
  423. and CRT_STATE =#{crtState}
  424. </if>
  425. <if test="objName != null and objName != ''">
  426. and OBJ_NAME like concat(#{objName},'%')
  427. </if>
  428. <if test="pblmState != null and pblmState != ''">
  429. and PBLM_STATE =#{pblmState}
  430. </if>
  431. <if test="pblmNameBz != null and pblmNameBz != ''">
  432. and PBLM_NAME_BZ like concat(#{pblmNameBz},'%')
  433. </if>
  434. order by intm desc
  435. </select>
  436. <select id="sendOrgGetList" resultType="cn.com.goldenwater.dcproj.model.BisInspPblmPlist">
  437. select * from (select * from BIS_INSP_PBLM_PLIST
  438. where DATA_STAT='0'
  439. <if test="province !=null and province.length() ==2">
  440. and pblm_classify in (
  441. select pblm_classify from bis_insp_pblm_mend_pri where MAND_PERS_ID =#{persId} and DATA_STAT='0'
  442. )
  443. union
  444. (
  445. select * from BIS_INSP_PBLM_PLIST
  446. where DATA_STAT = '0' and pers_id =#{persId}
  447. )
  448. </if>
  449. ) pl
  450. left join BIS_INSP_PBLM p ON pl.PBLM_ID = p.PBLM_ID
  451. left join BIS_INSP_ALL_OBJ J ON P.OBJ_ID = J.OBJ_ID
  452. left join BIS_INSP_ALL L ON L.ID = J.ID
  453. where 1=1
  454. <if test=' null != isSys and "" != isSys and "1" == isSys.toString() '>AND pl.PBLM_ID is not null</if>
  455. <if test=' null != isSys and "" != isSys and "1" != isSys.toString() '>AND pl.PBLM_ID is null</if>
  456. <if test="depm != null and depm.length > 0 ">
  457. AND pl.obj_type IN (SELECT TO_NUMBER(PTYPE) FROM ATT_INSP_TYPE_DUTY where DUTY_DEP IN
  458. <foreach item="item" index="index" collection="depm" open="(" separator="," close=")">
  459. '${item}'
  460. </foreach>
  461. )
  462. </if>
  463. <if test="sttm != null">AND pl.PBLM_TM &gt;= #{sttm}</if>
  464. <if test="entm != null">AND pl.PBLM_TM &lt; #{entm} + 1</if>
  465. <if test="chkDept != null and chkDept != ''">and pl.CHK_DEPT LIKE CONCAT('%',CONCAT(#{chkDept},'%'))</if>
  466. <if test="dcBatch != null and dcBatch != ''">and pl.DC_BATCH LIKE CONCAT('%',CONCAT(#{dcBatch},'%'))</if>
  467. <if test="year != null and year != ''">and to_char(pl.PBLM_TM,'yyyy') =#{year}</if>
  468. <if test="objAdCode != null and objAdCode != ''">and pl.obj_Ad_Code like concat(#{objAdCode},'%')</if>
  469. <if test="pblmAdName != null and pblmAdName != ''">and pl.PBLM_AD_NAME like '%${pblmAdName}%'</if>
  470. <if test="province != null and province != ''">AND pl.OBJ_AD_CODE LIKE CONCAT(#{province},'%')</if>
  471. <if test="objType != null and objType != ''">and pl.obj_type = TO_NUMBER(#{objType})</if>
  472. <if test="crtState != null and crtState != ''">and pl.CRT_STATE =#{crtState}</if>
  473. <if test="objName != null and objName != ''">and pl.OBJ_NAME like concat(#{objName},'%')</if>
  474. <if test="pblmState != null and pblmState != ''">and pl.PBLM_STATE =#{pblmState}</if>
  475. <if test="pblmNameBz != null and pblmNameBz != ''">and pl.PBLM_NAME_BZ like concat(#{pblmNameBz},'%')</if>
  476. <if test="pblmClassify != null and pblmClassify != ''">and pl.PBLM_CLASSIFY like '%${pblmClassify}%'</if>
  477. <if test="persName != null and persName != ''">and pl.PERS_NAME like '%${persName}%'</if>
  478. <if test="isStart != null and isStart != ''">and pl.IS_START =#{isStart}</if>
  479. <if test="pblmOut != null and pblmOut != ''">
  480. <if test="pblmOut =='1'.toString()">
  481. and pl.PBLM_OUT =#{pblmOut}
  482. </if>
  483. <if test="pblmOut =='0'.toString()">
  484. and (pl.PBLM_OUT =#{pblmOut} or PBLM_OUT is null)
  485. </if>
  486. </if>
  487. <if test="impSource != null and impSource != ''">AND pl.IMP_SOURCE IN (${impSource})</if>
  488. <if test="isSite != null and isSite != ''">AND pl.IS_SITE =#{isSite}</if>
  489. <if test="pblmNub != null and pblmNub != ''">and pl.PBLM_NUB = #{pblmNub}</if>
  490. <if test="provincialLevel == 2">AND pl.is_start = '1'</if>
  491. <!-- 整改问题 归属 各级查看 本级 -->
  492. <if test='belongOrgId != null and belongOrgId != "" and null == adGrad and null == orgType '>and pl.BELONG_ORG_ID = #{belongOrgId} </if>
  493. <!-- 省 查看 市/县 -->
  494. <if test='belongOrgId != null and belongOrgId != "" and "2" == adGrad and null != orgType'>and pl.BELONG_ORG_ID in (${belongOrgId}) </if>
  495. <!-- 市 查看 县 -->
  496. <if test='belongOrgId != null and belongOrgId != "" and "3" == adGrad and "county" == orgType'>and pl.BELONG_ORG_ID in (${belongOrgId}) </if>
  497. <!-- 市 查看 省级下发 -->
  498. <if test='belongOrgId != null and belongOrgId != "" and "3" == adGrad and "province" == orgType'>and pl.BELONG_ORG_ID = #{belongOrgId} </if>
  499. <!-- 县 查看 市级下发 -->
  500. <if test='belongOrgId != null and belongOrgId != "" and "4" == adGrad and "city" == orgType'>and pl.BELONG_ORG_ID = #{belongOrgId} and nvl(SELF_INSP_PROCESS_STATE,'1') &lt;&gt; '1' </if>
  501. <!-- 县 查看 省级下发给市、市下发给县的 -->
  502. <if test='belongOrgId != null and belongOrgId != "" and "4" == adGrad and "province" == orgType'>and pl.BELONG_ORG_ID = #{belongOrgId} </if>
  503. <!-- 市、县自查 流程状态 -->
  504. <if test='selfInspProcessState != null and selfInspProcessState != "" '>and pl.SELF_INSP_PROCESS_STATE = #{selfInspProcessState} </if>
  505. <!-- 严重程度 lxf 2022/11/21 -->
  506. <if test='inspPblmCate != null and inspPblmCate != "" '>AND pl.INSP_PBLM_CATE =#{inspPblmCate}</if>
  507. <!-- 四川省 注册登记号 复核状态 复核结果 lxf 2023/05/09 -->
  508. <if test='damRegCode != null and damRegCode != ""'>and pl.DAM_REG_CODE LIKE CONCAT('%',CONCAT(#{damRegCode},'%')) </if>
  509. <if test='reviewStat != null and reviewStat != ""'>and pl.REVIEW_STAT = #{reviewStat}</if>
  510. <if test='reviewResult != null and reviewResult != ""'>and pl.REVIEW_RESULT = #{reviewResult}</if>
  511. <!-- 福建省 督查整改台账增加查询条件 -->
  512. <if test="ifCasePblm != null and ifCasePblm != ''">and p.IF_CASE_PBLM = #{ifCasePblm}</if>
  513. <if test="hasVedio != null and hasVedio != ''">and p.HAS_VEDIO = #{hasVedio}</if>
  514. <if test="startTime != null and startTime != ''">and p.COLL_TIME &gt;= TO_DATE(#{startTime},'YYYY-MM-DD')</if>
  515. <if test="endTime != null and endTime != ''">and p.COLL_TIME &lt; TO_DATE(#{endTime},'YYYY-MM-DD')+1</if>
  516. <if test="orgNm != null and orgNm != ''">and L.PNM like '%${orgNm}%'</if>
  517. <if test="leadDep !=null and leadDep != ''">and L.lead_dep LIKE CONCAT('%', CONCAT(#{leadDep}, '%') ) </if>
  518. ORDER BY pl.OBJ_AD_CODE, pl.OBJ_TYPE, pl.OBJ_NAME
  519. </select>
  520. <select id="recvGetList" resultType="cn.com.goldenwater.dcproj.model.BisInspPblmPlist">
  521. select * from BIS_INSP_PBLM_PLIST
  522. where DATA_STAT='0'
  523. <if test="year != null and year != ''">
  524. and to_char(PBLM_TM,'yyyy') =#{year}
  525. </if>
  526. <if test="objAdCode != null and objAdCode != ''">
  527. and obj_Ad_Code like concat(#{objAdCode},'%')
  528. </if>
  529. <if test="objType != null and objType != ''">
  530. and obj_type =#{objType}
  531. </if>
  532. <if test="crtState != null and crtState != ''">
  533. and CRT_STATE =#{crtState}
  534. </if>
  535. <if test="objName != null and objName != ''">
  536. and OBJ_NAME like concat(#{objName},'%')
  537. </if>
  538. <if test="pblmState != null and pblmState != ''">
  539. and PBLM_STATE =#{pblmState}
  540. </if>
  541. <if test="pblmNameBz != null and pblmNameBz != ''">
  542. and PBLM_NAME_BZ like concat(#{pblmNameBz},'%')
  543. </if>
  544. order by intm desc
  545. </select>
  546. <select id="recvCountyGetList" resultType="cn.com.goldenwater.dcproj.model.BisInspPblmPlist">
  547. select * from BIS_INSP_PBLM_PLIST
  548. where
  549. DATA_STAT='0'
  550. <if test="year != null and year != ''">
  551. and to_char(PBLM_TM,'yyyy') =#{year}
  552. </if>
  553. <if test="objAdCode != null and objAdCode != ''">
  554. and obj_Ad_Code like concat(#{objAdCode},'%')
  555. </if>
  556. <if test="objType != null and objType != ''">
  557. and obj_type =#{objType}
  558. </if>
  559. <if test="crtState != null and crtState != ''">
  560. and CRT_STATE =#{crtState}
  561. </if>
  562. <if test="objName != null and objName != ''">
  563. and OBJ_NAME like concat(#{objName},'%')
  564. </if>
  565. <if test="pblmState != null and pblmState != ''">
  566. and PBLM_STATE =#{pblmState}
  567. </if>
  568. <if test="pblmNameBz != null and pblmNameBz != ''">
  569. and PBLM_NAME_BZ like concat(#{pblmNameBz},'%')
  570. </if>
  571. order by intm desc
  572. </select>
  573. <select id="getBpmDataId" resultType="java.util.Map">
  574. SELECT
  575. a.TASK_INST_ID AS "taskInstId",
  576. a.PROC_INST_ID AS "procInstId",
  577. b.BPM_PROC_TYPE_NM AS "procTypeName"
  578. FROM
  579. <choose>
  580. <when test="province.substring(0,2)=='35'">T_BPM_TASK_INS</when>
  581. <when test='orgId == "053"'>T_BPM_TASK_INS</when>
  582. <when test='orgId == "034"'>T_BPM_TASK_INS</when>
  583. <otherwise>BPM.T_BPM_TASK_INS</otherwise>
  584. </choose>
  585. a
  586. JOIN
  587. <choose>
  588. <when test="province.substring(0,2)=='35'">T_BPM_PROC_INS</when>
  589. <when test='orgId == "053"'>T_BPM_PROC_INS</when>
  590. <when test='orgId == "034"'>T_BPM_PROC_INS</when>
  591. <otherwise>BPM.T_BPM_PROC_INS</otherwise>
  592. </choose>
  593. b ON b.PROC_INST_ID = a.PROC_INST_ID
  594. where BIZ_KEY = #{id}
  595. order by a.CRD_TIME DESC
  596. </select>
  597. <select id="getAllClassType" resultType="java.lang.String">
  598. select distinct pblm_classify from BIS_INSP_PBLM_PLIST t where pblm_classify is not null and length(pblm_classify)>1
  599. <if test="adCode != null and adCode != ''">
  600. and OBJ_AD_CODE like concat(#{adCode},'%')
  601. </if>
  602. order by pblm_classify
  603. </select>
  604. <!-- 查询PblmClassify -->
  605. <select id="getPblmClassifyMap" parameterType="java.util.List" resultMap="bisInspPblmClassifyResultMap">
  606. select id as businessKey,PBLM_CLASSIFY from BIS_INSP_PBLM_PLIST where ID in (
  607. <foreach collection="list" separator="," item="item">
  608. #{item}
  609. </foreach>
  610. )
  611. UNION ALL
  612. SELECT ID AS businessKey,'稽察整改' PBLM_CLASSIFY FROM TAC_PROVINCE_PBLM_MEND_INFO WHERE ID IN (
  613. <foreach collection="list" separator="," item="item">
  614. #{item}
  615. </foreach>
  616. )
  617. </select>
  618. <resultMap id="bisInspPblmClassifyResultMap" type="cn.com.goldenwater.dcproj.model.BisInspPblmClassify">
  619. <result property="businessKey" column="businessKey"/>
  620. <result property="PBLM_CLASSIFY" column="pblmClassify"/>
  621. </resultMap>
  622. <update id="updateDamRegCodeByRsCode" parameterType="cn.com.goldenwater.dcproj.model.BisInspPblmPlist">
  623. update BIS_INSP_PBLM_PLIST set DAM_REG_CODE = #{damRegCode},UPTM = #{uptm}
  624. where OBJ_CODE = #{objCode}
  625. </update>
  626. </mapper>