TacPageOfficePblmListDao.xml 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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.TacPageOfficePblmListDao">
  4. <select id="getPblmList" resultType="java.util.HashMap">
  5. select a.ID,
  6. a.OBJ_TYPE,
  7. a.OBJ_ID,
  8. (case a.PBLM_PASI when '0' then '一般' when '1' then '较重' when '2' then '严重' end) PBLM_PASI,
  9. a.IF_CASE_PBLM,
  10. a.SUBJECT_IDS,
  11. a.PBLM_DESC,
  12. a.PBLM_REASON,
  13. a.PBLM_SGGTN,
  14. a.PBLM_SN,
  15. a.PBLMSTD_ID,
  16. a.RECT_ID,
  17. a.RGSTR_ID,
  18. a.LIST_TYPE,
  19. a.LIST_ID,
  20. a.GROUP_ID,
  21. a.PERS_ID,
  22. a.PERS_NM,
  23. to_char(a.INTM,'yyyy-mm-dd') intm,
  24. a.SPCL_ID,
  25. a.SPCL_NM,
  26. a.SPCL_RVW_OPTN,
  27. to_char(a.SPCL_TM,'yyyy-mm-dd') spcl_tm,
  28. a.UPTM,
  29. '('||a.sn||')' ||a.PBLM_NM PBLM_NM,
  30. a.HAS_VEDIO,
  31. (select listagg(UNIT_NM,',') within group (order by intm) from TAC_PBLM_SUBJECT SUB where A.ID=SUB.PBLM_ID) subject_Names,
  32. a.NOTE,
  33. b.PBLMS_DESC,
  34. a.RELATIVE_LAW,
  35. a.LAW_CONTENT,
  36. a.PBLM_REASON_DETAIL,
  37. a.PBLM_MEASURE,
  38. a.PROVINCE
  39. from TAC_PBLM_INFO a
  40. left join TAC_OBJ_PBLMSTB b on a.pblmstd_id = b.id
  41. where a.id in
  42. (select id from TAC_PBLM_INFO WHERE RGSTR_ID = #{rgstrId}
  43. AND LIST_TYPE = substr(#{type},3,1) )
  44. <if test="pblmId !=null and pblmId !='' ">
  45. and a.id in (${pblmId})
  46. </if>
  47. <if test="reasonState != null and reasonState != ''">
  48. and a.REASON_STATE = #{reasonState}
  49. </if>
  50. order by a.sn
  51. </select>
  52. <select id="getFileList" resultType="java.util.HashMap" >
  53. select BIZ_ID,FILE_PATH AS FILE_PATH FROM gw_com_file where BIZ_ID in
  54. (select id from TAC_PBLM_INFO WHERE RGSTR_ID = #{rgstrId}
  55. AND LIST_TYPE = substr(#{type},3,1) )
  56. and UPPER(file_ext) in('JPEG','JPG','PNG')
  57. and BIZ_ID = #{id}
  58. <if test="bizType != null and bizType != ''">
  59. and BIZ_TYPE = #{bizType}
  60. </if>
  61. order by SN ASC
  62. </select>
  63. <select id="getRgstrName" resultType="java.util.HashMap">
  64. <!--
  65. select RGSTR_NM from VIEW_REG_BASE where rgstr_id = #{rgstrId}
  66. -->
  67. select distinct t.ojb_nm as RGSTR_NM from TAC_INSP_YEAR_BATCH_OBJ t left join tac_pawp_rgstr r on t.id = r.obj_id where
  68. r.id in (SELECT REGEXP_SUBSTR(#{rgstrId},'[^,]+', 1, LEVEL) FROM DUAL CONNECT BY REGEXP_SUBSTR(#{rgstrId}, '[^,]+', 1, LEVEL) IS NOT NULL)
  69. </select>
  70. </mapper>