TacObjPblmstbDao.xml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414
  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.TacObjPblmstbDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.TacObjPblmstb" id="tacObjPblmstbResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="spfsnlType" column="SPFSNL_TYPE"/>
  7. <result property="pblmType" column="pblm_type"/>
  8. <result property="class1" column="CLASS1"/>
  9. <result property="class1Name" column="CLASS1_NAME"/>
  10. <result property="class2" column="CLASS2"/>
  11. <result property="class2Name" column="CLASS2_NAME"/>
  12. <result property="sn" column="SN"/>
  13. <result property="pblmsDesc" column="PBLMS_DESC"/>
  14. <result property="relativeLaw" column="RELATIVE_LAW"/>
  15. <result property="lawContent" column="LAW_CONTENT"/>
  16. <result property="cate0" column="CATE0"/>
  17. <result property="cate1" column="CATE1"/>
  18. <result property="cate2" column="CATE2"/>
  19. <result property="cate0Desc" column="CATE0_DESC"/>
  20. <result property="cate1Desc" column="CATE1_DESC"/>
  21. <result property="cate2Desc" column="CATE2_DESC"/>
  22. <result property="subjectIds" column="SUBJECT_IDS"/>
  23. <result property="note" column="NOTE"/>
  24. <result property="intm" column="INTM"/>
  25. <result property="uptm" column="UPTM"/>
  26. <result property="subName" column="sub_name"/>
  27. <result property="pblmChType" column="PBLM_CH_TYPE"/>
  28. <result property="dataStat" column="DATA_STAT"/>
  29. <result property="sortNo" column="SORT_NO"/>
  30. <result property="persId" column="PERS_ID"/>
  31. <result property="pblmTypeDesc" column="PBLM_TYPE_DESC"/>
  32. <result property="pblmTypeDesc2" column="PBLM_TYPE_DESC2"/>
  33. <result property="year" column="YEAR"/>
  34. <result property="isNew" column="IS_NEW"/>
  35. </resultMap>
  36. <sql id="table_columns">
  37. ID,pblm_type,PBLM_TYPE_DESC,PBLM_TYPE_DESC2,
  38. SPFSNL_TYPE,
  39. CLASS1,
  40. CLASS1_NAME,
  41. CLASS2,
  42. CLASS2_NAME,
  43. SN,
  44. PBLMS_DESC,
  45. RELATIVE_LAW,
  46. LAW_CONTENT,
  47. CATE0,
  48. CATE1,
  49. CATE2,
  50. CATE0_DESC,
  51. CATE1_DESC,
  52. CATE2_DESC,
  53. SUBJECT_IDS,
  54. NOTE,
  55. INTM,
  56. UPTM,PBLM_CH_TYPE,DATA_STAT,SORT_NO,PERS_ID,YEAR, IS_NEW
  57. </sql>
  58. <sql id="table_columns1">
  59. ID,pblm_type,pblm_Type_Desc,pblm_Type_Desc2,
  60. SPFSNL_TYPE,
  61. CLASS1,
  62. CLASS1_NAME,
  63. CLASS2,
  64. CLASS2_NAME,
  65. SN,
  66. PBLMS_DESC,
  67. RELATIVE_LAW,
  68. LAW_CONTENT,
  69. CATE0,
  70. CATE1,
  71. CATE2,
  72. CATE0_DESC,
  73. CATE1_DESC,
  74. CATE2_DESC,
  75. SUBJECT_IDS,
  76. NOTE,
  77. INTM,
  78. UPTM,PBLM_CH_TYPE,DATA_STAT,SORT_NO,PERS_ID,YEAR, IS_NEW
  79. </sql>
  80. <sql id="entity_properties">
  81. #{id},#{pblmType},#{pblmTypeDesc},#{pblmTypeDesc2},
  82. #{spfsnlType},
  83. #{class1},
  84. #{class1Name},
  85. #{class2},
  86. #{class2Name},
  87. #{sn},
  88. #{pblmsDesc},
  89. #{relativeLaw},
  90. #{lawContent},
  91. #{cate0},
  92. #{cate1},
  93. #{cate2},
  94. #{cate0Desc},
  95. #{cate1Desc},
  96. #{cate2Desc},
  97. #{subjectIds},
  98. #{note},
  99. #{intm},
  100. #{uptm},#{pblmChType},#{dataStat},#{sortNo},#{persId},#{year},#{isNew}
  101. </sql>
  102. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  103. <sql id="page_where">
  104. <trim prefix="where" prefixOverrides="and | or ">
  105. <if test="spfsnlType != null and spfsnlType != ''">and SPFSNL_TYPE like
  106. concat('%',concat(#{spfsnlType},'%'))
  107. </if>
  108. <if test="pblmTypeDesc != null and pblmTypeDesc != ''">and pblm_Type_Desc = #{pblmTypeDesc}</if>
  109. <if test="year != null and year != ''">and YEAR = #{year}</if>
  110. <if test="isNew != null and isNew != ''">and IS_NEW = #{isNew}</if>
  111. <if test="pblmTypeDesc2 != null and pblmTypeDesc2 != ''">and pblm_Type_Desc2 = #{pblmTypeDesc2}</if>
  112. <if test="class1 != null and class1 != ''">and CLASS1 like concat('%',concat(#{class1},'%'))</if>
  113. <if test="class1Name != null and class1Name != ''">and (CLASS1_NAME like '%${class1Name}%' OR CLASS2_NAME
  114. like '%${class1Name}%' OR PBLMS_DESC like '%${class1Name}%' OR RELATIVE_LAW like '%${class1Name}%')
  115. </if>
  116. <if test="class2 != null and class2 != ''">and CLASS2 like '%${class2}%'</if>
  117. <if test="class2Name != null and class2Name != ''">and CLASS2_NAME like '%${class2Name}%'</if>
  118. <if test="sn != null and sn != ''">and SN like '${sn}%' </if>
  119. <if test="pblmsDesc != null and pblmsDesc != ''">and PBLMS_DESC like '%${pblmsDesc}%'</if>
  120. <if test="relativeLaw != null and relativeLaw != ''">and RELATIVE_LAW like '%${relativeLaw}%'</if>
  121. <if test="lawContent != null and lawContent != ''">and LAW_CONTENT like '%${lawContent}%'</if>
  122. <if test="cate0 != null and cate0 != ''">and CATE0 = #{cate0}</if>
  123. <if test="sortNo != null and sortNo != ''">and SORT_NO = #{sortNo}</if>
  124. <if test="pblmType != null and pblmType != ''">and pblm_type = #{pblmType}</if>
  125. <if test="cate1 != null and cate1 != ''">and CATE1 = #{cate1}</if>
  126. <if test="cate2 != null and cate2 != ''">and CATE2 = #{cate2}</if>
  127. <if test="cate0Desc != null and cate0Desc != ''">and CATE0_DESC = #{cate0Desc}</if>
  128. <if test="cate1Desc != null and cate1Desc != ''">and CATE1_DESC = #{cate1Desc}</if>
  129. <if test="cate2Desc != null and cate2Desc != ''">and CATE2_DESC = #{cate2Desc}</if>
  130. <if test="subjectIds != null and subjectIds != ''">and SUBJECT_IDS = #{subjectIds}</if>
  131. <if test="note != null and note != ''">and NOTE = #{note}</if>
  132. <if test="intm != null">and INTM = #{intm}</if>
  133. <if test="uptm != null">and UPTM = #{uptm}</if>
  134. <if test="pblmChType != null and pblmChType !=''">and PBLM_CH_TYPE = #{pblmChType}</if>
  135. <if test="dataStat != null and dataStat != '' and persId != null and persId !=''">and (PERS_ID = #{persId} or DATA_STAT = #{dataStat})</if>
  136. </trim>
  137. </sql>
  138. <sql id="page_where_new">
  139. <trim prefix="where" prefixOverrides="and | or ">
  140. <if test="spfsnlType != null and spfsnlType != ''">and SPFSNL_TYPE =#{spfsnlType}
  141. </if>
  142. <if test="class1 != null and class1 != ''">and CLASS1 =#{class1}</if>
  143. <if test="year != null and year != ''">and YEAR = #{year}</if>
  144. <if test="isNew != null and isNew != ''">and IS_NEW = #{isNew}</if>
  145. <if test="class1Name != null and class1Name != ''">
  146. and class1_name =#{class1Name}
  147. </if>
  148. <if test="pblmTypeDesc != null and pblmTypeDesc != ''">and pblm_Type_Desc = #{pblmTypeDesc}</if>
  149. <if test="class2 != null and class2 != ''">and CLASS2 =#{class2}</if>
  150. <if test="class2Name != null and class2Name != ''">and CLASS2_NAME = #{class2Name}</if>
  151. <if test="sn != null and sn != ''">and SN = #{sn}</if>
  152. <if test="pblmsDesc != null ">and PBLMS_DESC =#{pblmsDesc}</if>
  153. <if test="relativeLaw != null and relativeLaw != ''">and RELATIVE_LAW like '%${relativeLaw}%'</if>
  154. <if test="lawContent != null and lawContent != ''">and LAW_CONTENT like '%${lawContent}%'</if>
  155. <if test="cate0 != null and cate0 != ''">and CATE0 = #{cate0}</if>
  156. <if test="pblmType != null and pblmType != ''">and pblm_type = #{pblmType}</if>
  157. <if test="sortNo != null and sortNo != ''">and SORT_NO = #{sortNo}</if>
  158. <if test="cate1 != null and cate1 != ''">and CATE1 = #{cate1}</if>
  159. <if test="cate2 != null and cate2 != ''">and CATE2 = #{cate2}</if>
  160. <if test="cate0Desc != null and cate0Desc != ''">and CATE0_DESC = #{cate0Desc}</if>
  161. <if test="cate1Desc != null and cate1Desc != ''">and CATE1_DESC = #{cate1Desc}</if>
  162. <if test="cate2Desc != null and cate2Desc != ''">and CATE2_DESC = #{cate2Desc}</if>
  163. <if test="subjectIds != null and subjectIds != ''">and SUBJECT_IDS = #{subjectIds}</if>
  164. <if test="pblmChType != null and pblmChType !=''">and PBLM_CH_TYPE = #{pblmChType}</if>
  165. <if test="dataStat != null and dataStat !=''">and (PERS_ID = #{persId} or DATA_STAT = #{dataStat})</if>
  166. <if test="persId != null and persId !=''">and (PERS_ID = #{persId} or DATA_STAT = #{dataStat})</if>
  167. </trim>
  168. </sql>
  169. <select id="get" resultMap="tacObjPblmstbResultMap" parameterType="String">
  170. select
  171. <include refid="table_columns"/>
  172. from TAC_OBJ_PBLMSTB where ID = #{id}
  173. </select>
  174. <select id="getOne" resultMap="tacObjPblmstbResultMap">
  175. select
  176. <include refid="table_columns"/>
  177. from TAC_OBJ_PBLMSTB
  178. <include refid="page_where_new"/>
  179. </select>
  180. <select id="findSpfsnlType" resultType="cn.com.goldenwater.dcproj.dto.TacObjPblmstbDto">
  181. select distinct * from (
  182. select distinct b.spfsnl_type as class1_name,b.pblm_type,b.pblm_ch_type as class1 from tac_obj_pblmstb b
  183. where b.data_stat='1' and b.pblm_ch_type is not null
  184. <if test="year != null and year != ''">and b.year = #{year}</if>
  185. <if test="persId !=null and persId !=''">
  186. union all
  187. select distinct b.spfsnl_type as class1_name,b.pblm_type,b.pblm_ch_type as class1 from tac_obj_pblmstb b
  188. where b.pers_id=#{persId} and b.data_stat='0' and b.pblm_ch_type is not null
  189. <if test="year != null and year != ''">and b.year = #{year}</if>
  190. </if>
  191. ) b order by b.class1 asc
  192. </select>
  193. <select id="findClass1ByType" resultType="cn.com.goldenwater.dcproj.dto.TacObjPblmstbClass">
  194. select distinct * from (
  195. select distinct b.class1,b.class1_name from tac_obj_pblmstb b where b.pblm_ch_type=#{pblmChType}
  196. and b.data_stat='1' and b.class1 is not null
  197. <if test="year != null and year != ''">and b.year = #{year}</if>
  198. <if test="persId !=null and persId !=''">
  199. union all
  200. select distinct b.class1,b.class1_name from tac_obj_pblmstb b where b.pblm_ch_type=#{pblmChType}
  201. and b.class1 is not null and b.data_stat='0'
  202. and b.pers_id=#{persId}
  203. <if test="year != null and year != ''">and b.year = #{year}</if>
  204. </if>
  205. ) b order by b.class1
  206. </select>
  207. <select id="findClass2ByClass1" resultType="cn.com.goldenwater.dcproj.dto.TacObjPblmstbClass2">
  208. select distinct * from (
  209. select distinct b.class2 as class1,b.class2_name as class1_name from tac_obj_pblmstb b where b.pblm_ch_type=#{pblmChType}
  210. and b.class1=#{class1} and b.data_stat='1'
  211. and b.class2 is not null <if test="year != null and year != ''">and b.year = #{year}</if>
  212. <if test="persId !=null and persId !=''">
  213. union all
  214. select distinct b.class2 as class1,b.class2_name as class1_name from tac_obj_pblmstb b where b.pblm_ch_type=#{pblmChType}
  215. and b.class1=#{class1}
  216. and b.class2 is not null and b.data_stat='0'
  217. and b.pers_id=#{persId} <if test="year != null and year != ''">and b.year = #{year}</if>
  218. </if>
  219. ) b order by b.class1
  220. </select>
  221. <select id="findClass3ByTypeClass1Class2" resultType="cn.com.goldenwater.dcproj.dto.TacPblmsSn">
  222. select * from (
  223. select b.id, b.sn as class1,b.pblms_desc as class1_name,b.sort_no from tac_obj_pblmstb b where b.pblm_ch_type=#{pblmChType}
  224. and b.class1=#{class1} and b.class2=#{class2} and b.data_stat='1' and b.sn is not null
  225. and b.class1 is not null <if test="year != null and year != ''">and b.year = #{year}</if>
  226. <if test="persId !=null and persId !=''">
  227. union all
  228. select b.id, b.sn as class1,b.pblms_desc as class1_name,b.sort_no from tac_obj_pblmstb b where b.pblm_ch_type=#{pblmChType}
  229. and b.class1=#{class1} and b.class2=#{class2} and b.data_stat='0' and b.sn is not null
  230. and b.class1 is not null
  231. and b.pers_id=#{persId} <if test="year != null and year != ''">and b.year = #{year}</if>
  232. </if>
  233. ) w
  234. order by to_number(w.sort_no)
  235. </select>
  236. <select id="getBy" resultMap="tacObjPblmstbResultMap">
  237. select
  238. <include refid="table_columns"/>
  239. from TAC_OBJ_PBLMSTB
  240. <include refid="page_where"/>
  241. </select>
  242. <select id="findAll" resultMap="tacObjPblmstbResultMap">
  243. select
  244. <include refid="table_columns1"/>
  245. from TAC_OBJ_PBLMSTB
  246. </select>
  247. <select id="findList" resultMap="tacObjPblmstbResultMap">
  248. select
  249. <include refid="table_columns1"/>
  250. from TAC_OBJ_PBLMSTB
  251. <include refid="page_where"/>
  252. </select>
  253. <select id="findPblmstbList" resultMap="tacObjPblmstbResultMap">
  254. select b.ID,pblm_type, SPFSNL_TYPE, CLASS1, CLASS1_NAME, CLASS2, CLASS2_NAME, SN,
  255. PBLMS_DESC, RELATIVE_LAW, LAW_CONTENT, CATE0, CATE1, CATE2, CATE0_DESC, CATE1_DESC, CATE2_DESC,
  256. SUBJECT_IDS, b.NOTE,t.sub_name,b.intm,b.PBLM_CH_TYPE,b.DATA_STAT,b.PERS_ID from (
  257. select * from TAC_OBJ_PBLMSTB p where p.SPFSNL_TYPE is not null
  258. ) b left join tac_obj_subject t on b.subject_ids =t.id
  259. <include refid="page_where"/>
  260. order by to_number(pblm_type) asc,data_stat desc,to_number(sort_no) asc
  261. </select>
  262. <select id="findPblmstbList_bak" resultMap="tacObjPblmstbResultMap">
  263. select b.ID,pblm_type, SPFSNL_TYPE, CLASS1, CLASS1_NAME, CLASS2, CLASS2_NAME, SN,
  264. PBLMS_DESC, RELATIVE_LAW, LAW_CONTENT, CATE0, CATE1, CATE2, CATE0_DESC, CATE1_DESC, CATE2_DESC,
  265. SUBJECT_IDS, b.NOTE,t.sub_name,b.intm,b.PBLM_CH_TYPE,b.DATA_STAT,b.PERS_ID from (
  266. select * from TAC_OBJ_PBLMSTB p where p.data_stat='0' and p.SPFSNL_TYPE is not null
  267. ) b left join tac_obj_subject t on b.subject_ids =t.id
  268. <include refid="page_where"/>
  269. order by to_number(pblm_type) asc,to_number(sort_no) asc
  270. </select>
  271. <select id="selectCount" resultType="int">
  272. select count(ID) from TAC_OBJ_PBLMSTB
  273. <include refid="page_where"/>
  274. </select>
  275. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.TacObjPblmstb">
  276. insert into TAC_OBJ_PBLMSTB(
  277. <include refid="table_columns"/>
  278. )
  279. values (
  280. <include refid="entity_properties"/>
  281. )
  282. </insert>
  283. <delete id="delete" parameterType="java.lang.String">
  284. delete from TAC_OBJ_PBLMSTB where ID = #{id}
  285. </delete>
  286. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.TacObjPblmstb">
  287. delete from TAC_OBJ_PBLMSTB
  288. <include refid="page_where"/>
  289. </delete>
  290. <update id="deleteInFlag" parameterType="java.lang.String">
  291. update TAC_OBJ_PBLMSTB set flag_valid = 0 where ID = #{id}
  292. </update>
  293. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.TacObjPblmstb">
  294. update TAC_OBJ_PBLMSTB
  295. <trim prefix="set" suffixOverrides=",">
  296. <if test="year != null and year != ''">YEAR = #{year},</if>
  297. <if test="isNew != null and isNew != ''">IS_NEW = #{isNew},</if>
  298. <if test="spfsnlType != null and spfsnlType != ''">SPFSNL_TYPE = #{spfsnlType},</if>
  299. <if test="class1 != null and class1 != ''">CLASS1 = #{class1},</if>
  300. <if test="class1Name != null and class1Name != ''">CLASS1_NAME = #{class1Name},</if>
  301. <if test="pblmType != null and pblmType != ''">pblm_type = #{pblmType},</if>
  302. <if test="pblmTypeDesc != null and pblmTypeDesc != ''">pblm_Type_Desc = #{pblmTypeDesc},</if>
  303. <if test="pblmTypeDesc2 != null and pblmTypeDesc2 != ''"> pblm_Type_Desc2 = #{pblmTypeDesc2},</if>
  304. <if test="class2 != null and class2 != ''">CLASS2 = #{class2},</if>
  305. <if test="class2Name != null and class2Name != ''">CLASS2_NAME = #{class2Name},</if>
  306. <if test="sn != null and sn != ''">SN = #{sn},</if>
  307. <if test="pblmsDesc != null and pblmsDesc != ''">PBLMS_DESC = #{pblmsDesc},</if>
  308. <if test="relativeLaw != null and relativeLaw != ''">RELATIVE_LAW = #{relativeLaw},</if>
  309. <if test="lawContent != null and lawContent != ''">LAW_CONTENT = #{lawContent},</if>
  310. <if test="cate0 != null and cate0 != ''">CATE0 = #{cate0},</if>
  311. <if test="cate1 != null and cate1 != ''">CATE1 = #{cate1},</if>
  312. <if test="cate2 != null and cate2 != ''">CATE2 = #{cate2},</if>
  313. <if test="sortNo != null and sortNo != ''">SORT_NO = #{sortNo},</if>
  314. <if test="cate0Desc != null and cate0Desc != ''">CATE0_DESC = #{cate0Desc},</if>
  315. <if test="cate1Desc != null and cate1Desc != ''">CATE1_DESC = #{cate1Desc},</if>
  316. <if test="cate2Desc != null and cate2Desc != ''">CATE2_DESC = #{cate2Desc},</if>
  317. <if test="subjectIds != null and subjectIds != ''">SUBJECT_IDS = #{subjectIds},</if>
  318. <if test="note != null and note != ''">NOTE = #{note},</if>
  319. <if test="intm != null">INTM = #{intm},</if>
  320. <if test="uptm != null">UPTM = #{uptm},</if>
  321. <if test="pblmChType != null and pblmChType !=''"> PBLM_CH_TYPE = #{pblmChType},</if>
  322. <if test="dataStat != null and dataStat !=''"> DATA_STAT = #{dataStat},</if>
  323. <if test="persId != null and persId !=''"> PERS_ID = #{persId},</if>
  324. </trim>
  325. <where>ID = #{id}</where>
  326. </update>
  327. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.TacObjPblmstb">
  328. update TAC_OBJ_PBLMSTB
  329. <trim prefix="set" suffixOverrides=",">
  330. <if test="year != null and year != ''">YEAR = #{year},</if>
  331. <if test="isNew != null and isNew != ''">IS_NEW = #{isNew},</if>
  332. <if test="spfsnlType != null and spfsnlType != ''">SPFSNL_TYPE = #{spfsnlType},</if>
  333. <if test="pblmType != null and pblmType != ''">pblm_type = #{pblmType},</if>
  334. <if test="pblmChType != null"> PBLM_CH_TYPE = #{pblmChType},</if>
  335. <if test="pblmTypeDesc != null and pblmTypeDesc != ''">pblm_Type_Desc = #{pblmTypeDesc},</if>
  336. <if test="pblmTypeDesc2 != null and pblmTypeDesc2 != ''"> pblm_Type_Desc2 = #{pblmTypeDesc2},</if>
  337. <if test="class1 != null and class1 != ''">CLASS1 = #{class1},</if>
  338. <if test="class1Name != null and class1Name != ''">CLASS1_NAME = #{class1Name},</if>
  339. <if test="class2 != null and class2 != ''">CLASS2 = #{class2},</if>
  340. <if test="class2Name != null and class2Name != ''">CLASS2_NAME = #{class2Name},</if>
  341. <if test="sn != null and sn != ''">SN = #{sn},</if>
  342. <if test="pblmsDesc != null and pblmsDesc != ''">PBLMS_DESC = #{pblmsDesc},</if>
  343. <if test="relativeLaw != null and relativeLaw != ''">RELATIVE_LAW = #{relativeLaw},</if>
  344. <if test="lawContent != null and lawContent != ''">LAW_CONTENT = #{lawContent},</if>
  345. <if test="cate0 != null and cate0 != ''">CATE0 = #{cate0},</if>
  346. <if test="cate1 != null and cate1 != ''">CATE1 = #{cate1},</if>
  347. <if test="sortNo != null and sortNo != ''">SORT_NO = #{sortNo},</if>
  348. <if test="cate2 != null and cate2 != ''">CATE2 = #{cate2},</if>
  349. <if test="subjectIds != null and subjectIds != ''">SUBJECT_IDS = #{subjectIds},</if>
  350. <if test="note != null and note != ''">NOTE = #{note},</if>
  351. <if test="intm != null">INTM = #{intm},</if>
  352. <if test="uptm != null">UPTM = #{uptm},</if>
  353. <if test="dataStat != null and dataStat !=''"> DATA_STAT = #{dataStat},</if>
  354. <if test="persId != null and persId !=''"> PERS_ID = #{persId},</if>
  355. </trim>
  356. <include refid="page_where"/>
  357. </update>
  358. <!-- 其他自定义SQL -->
  359. <delete id="delList">
  360. DELETE FROM TAC_OBJ_PBLMSTB
  361. WHERE ID IN
  362. <foreach item="id" collection="ids" open="(" separator="," close=")">
  363. #{id,jdbcType=VARCHAR}
  364. </foreach>
  365. </delete>
  366. <update id="updateList" parameterType="cn.com.goldenwater.dcproj.param.TacPblmClassParam">
  367. update TAC_OBJ_PBLMSTB
  368. <trim prefix="set" suffixOverrides=",">
  369. <if test="class1 != null and class1 != ''">CLASS1 = #{class1},</if>
  370. <if test="class1Name != null and class1Name != ''">CLASS1_NAME = #{class1Name},</if>
  371. <if test="class2 != null and class2 != ''">CLASS2 = #{class2},</if>
  372. <if test="class2Name != null and class2Name != ''">CLASS2_NAME = #{class2Name},</if>
  373. </trim>
  374. WHERE ID IN
  375. <foreach item="id" collection="ids" open="(" separator="," close=")">
  376. #{id,jdbcType=VARCHAR}
  377. </foreach>
  378. </update>
  379. <update id="updateStb" parameterType="cn.com.goldenwater.dcproj.model.TacObjPblmstb">
  380. update TAC_OBJ_PBLMSTB
  381. set cate0 = #{cate0},cate1=#{cate1},cate2=#{cate2}
  382. where SPFSNL_TYPE = #{spfsnlType} and PBLMS_DESC = #{pblmsDesc}
  383. </update>
  384. </mapper>