TacPageOfficePblmListDao.xml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. DATE_FORMAT(a.INTM,'%Y-%m-%d') intm,
  24. a.SPCL_ID,
  25. a.SPCL_NM,
  26. a.SPCL_RVW_OPTN,
  27. DATE_FORMAT(a.SPCL_TM,'%Y-%m-%d') spcl_tm,
  28. a.UPTM,
  29. CONCAT('(', a.sn, ')' , a.PBLM_NM PBLM_NM),
  30. a.HAS_VEDIO,
  31. a.subject_Names,
  32. a.NOTE,
  33. b.PBLMS_DESC,
  34. b.RELATIVE_LAW,
  35. b.LAW_CONTENT,
  36. a.PBLM_REASON_DETAIL,
  37. a.PBLM_MEASURE
  38. from TAC_PBLM_INFO a
  39. left join TAC_OBJ_PBLMSTB b on a.pblmstd_id = b.id
  40. where a.id in
  41. (select id from TAC_PBLM_INFO WHERE RGSTR_ID = #{rgstrId}
  42. AND LIST_TYPE = substr(#{type},3,1) )
  43. <if test="pblmId !=null and pblmId !='' ">
  44. and a.id in (${pblmId})
  45. </if>
  46. <if test="reasonState != null and reasonState != ''">
  47. and a.REASON_STATE = #{reasonState}
  48. </if>
  49. order by a.sn
  50. </select>
  51. <select id="getFileList" resultType="java.util.HashMap" >
  52. select BIZ_ID,FILE_PATH AS FILE_PATH FROM gw_com_file where BIZ_ID in
  53. (select id from TAC_PBLM_INFO WHERE RGSTR_ID = #{rgstrId}
  54. AND LIST_TYPE = SUBSTRING(#{type},4,1) )
  55. and UPPER(file_ext) in('JPEG','JPG','PNG')
  56. and BIZ_ID = #{id}
  57. <if test="bizType != null and bizType != ''">
  58. and BIZ_TYPE = #{bizType}
  59. </if>
  60. order by SN ASC
  61. </select>
  62. <select id="getRgstrName" resultType="java.util.HashMap">
  63. SELECT
  64. DISTINCT T.OJB_NM AS RGSTR_NM
  65. FROM
  66. TAC_INSP_YEAR_BATCH_OBJ T
  67. LEFT JOIN
  68. TAC_PAWP_RGSTR R ON T.ID = R.OBJ_ID WHERE
  69. R.ID IN
  70. <foreach collection="rgstrId.split(',')" index="index" item="item" separator="," open="(" close=")">
  71. #{item}
  72. </foreach>
  73. </select>
  74. </mapper>