| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
- <mapper namespace="cn.com.goldenwater.dcproj.dao.DcPageOfficeFjStstnReportDao">
- <!--福建省 “党建+标准化”示范工地评选成果 报告 -->
- <!-- 根据 工地 Id(RGSTR_ID)获取到评分状态 -->
- <select id="selectScoreItemNum" resultType="java.util.HashMap">
- select count(sc.ID) NUM
- from BIS_INSP_STSTN_SCORE sc
- left join BIS_INSP_STSTN_SCENE sce on sc.CASE_ID = sce.ID and sce.RGSTR_ID = #{rgstrId}
- left join BIS_INSP_STSTN_TMPR t on sc.CASE_ID = t.ID and t.RGSTR_ID = #{rgstrId}
- left join BIS_INSP_STSTN_SAF sa on sc.CASE_ID = sa.ID and sa.RGSTR_ID = #{rgstrId}
- left join BIS_INSP_STSTN_PB p on sc.CASE_ID = p.ID and p.RGSTR_ID = #{rgstrId}
- where sce.RGSTR_ID is not null or t.RGSTR_ID is not null or sa.RGSTR_ID is not null or p.RGSTR_ID is not null
- </select>
- <!-- 根据 工地 Id(RGSTR_ID)获取到评分 -->
- <select id="selectScore" resultType="java.util.HashMap">
- select a.NM,
- nvl(a.STANDARD_SCORE, a. ACTUAL_SCORE) STANDARD_SCORE ,
- a.total as STANDARD_TOTAL,
- case when a.total = null or a.total = 0 then 0 else nvl(a.STANDARD_SCORE, 0) * 100 /a.total end as STANDARD_RATIO ,
- a.PB_SCORE
- from BIS_INSP_STSTN a
- where a.id = #{rgstrId}
- </select>
- <!-- 查询 标准化建设检测项 总数-->
- <select id="selectCheckNum" resultType="java.util.HashMap">
- select sum(rs.num) NUM
- from (
- select count(sc.ID) num , sce.RGSTR_ID as RGSTR_ID
- from BIS_INSP_STSTN_SCORE sc
- join BIS_INSP_STSTN_SCENE sce on sc.CASE_ID = sce.ID and sce.RGSTR_ID = #{rgstrId}
- group by sce.RGSTR_ID
- UNION ALL
- select count(sc.ID) num, t.RGSTR_ID as RGSTR_ID
- from BIS_INSP_STSTN_SCORE sc
- join BIS_INSP_STSTN_TMPR t on sc.CASE_ID = t.ID and t.RGSTR_ID = #{rgstrId}
- group by t.RGSTR_ID
- UNION ALL
- select count(sc.ID) num, sa.RGSTR_ID as RGSTR_ID
- from BIS_INSP_STSTN_SCORE sc
- join BIS_INSP_STSTN_SAF sa on sc.CASE_ID = sa.ID and sa.RGSTR_ID = #{rgstrId}
- group by sa.RGSTR_ID
- ) rs
- group by rs.RGSTR_ID
- </select>
- <!-- 查询 “党建进工地” 部分 评分 描述和图片-->
- <select id="selectPartyScoreInfo" resultType="java.util.HashMap">
- select p.RGSTR_ID ,sc.ID, sc.EXPLAIN ,sc.SCORE_NAME,gcf.FILE_PATH ,gcf.SN
- from BIS_INSP_STSTN_PB p
- left join BIS_INSP_STSTN_SCORE sc on sc.CASE_ID = p.ID
- left join gw_com_file gcf on gcf.biz_id = sc.id
- where p.RGSTR_ID = #{rgstrId}
- order by gcf.biz_id , gcf.sn
- </select>
- <!-- 查询 标准化建设-施工现场布置 评分 描述和图片-->
- <select id="selectStandardSceneScoreInfo" resultType="java.util.HashMap">
- select sce.RGSTR_ID ,sc.ID, sc.EXPLAIN ,sc.SCORE_NAME,gcf.FILE_PATH ,gcf.SN
- from BIS_INSP_STSTN_SCENE sce
- left join BIS_INSP_STSTN_SCORE sc on sc.CASE_ID = sce.ID
- left join gw_com_file gcf on gcf.biz_id = sc.id
- where sce.RGSTR_ID = #{rgstrId}
- order by gcf.biz_id , gcf.sn
- </select>
- <!-- 查询 标准化建设-临时工程 评分 描述和图片-->
- <select id="selectStandardTmprScoreInfo" resultType="java.util.HashMap">
- select t.RGSTR_ID ,sc.ID, sc.EXPLAIN ,sc.SCORE_NAME,gcf.FILE_PATH ,gcf.SN
- from BIS_INSP_STSTN_TMPR t
- left join BIS_INSP_STSTN_SCORE sc on sc.CASE_ID = t.ID
- left join gw_com_file gcf on gcf.biz_id = sc.id
- where t.RGSTR_ID = #{rgstrId}
- order by gcf.biz_id ,gcf.sn
- </select>
- <!-- 查询 标准化建设-安全文明施工(包含数字化建设和加分项) 评分 描述和图片-->
- <select id="selectStandardSafScoreInfo" resultType="java.util.HashMap">
- select sa.RGSTR_ID ,sc.ID, sc.EXPLAIN ,sc.SCORE_NAME,gcf.FILE_PATH ,gcf.SN
- from BIS_INSP_STSTN_SAF sa
- left join BIS_INSP_STSTN_SCORE sc on sc.CASE_ID = sa.ID
- left join gw_com_file gcf on gcf.biz_id = sc.id
- where sa.RGSTR_ID = #{rgstrId}
- order by gcf.biz_id ,gcf.sn
- </select>
- </mapper>
|