| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391 |
- <?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.ChkSafeStatListDao">
-
- <resultMap type="cn.com.goldenwater.dcproj.model.ChkSafeStatList" id="chkSafeStatListResultMap">
- <result property="id" column="ID" />
- <result property="chkIndustry" column="CHK_INDUSTRY" />
- <result property="orgId" column="ORG_ID" />
- <result property="adCode" column="AD_CODE" />
- <result property="chkGroupNum" column="CHK_GROUP_NUM" />
- <result property="chkGroupNumUndercover" column="CHK_GROUP_NUM_UNDERCOVER" />
- <result property="chkPointNum" column="CHK_POINT_NUM" />
- <result property="inspGeneralChk" column="INSP_GENERAL_CHK" />
- <result property="inspGeneralRepair" column="INSP_GENERAL_REPAIR" />
- <result property="inspMajorChk" column="INSP_MAJOR_CHK" />
- <result property="inspMajorRepair" column="INSP_MAJOR_REPAIR" />
- <result property="dangerRectFund" column="DANGER_RECT_FUND" />
- <result property="crackDownIllegalAction" column="CRACK_DOWN_ILLEGAL_ACTION" />
- <result property="repairViolateRuleAction" column="REPAIR_VIOLATE_RULE_ACTION" />
- <result property="stopProdRect" column="STOP_PROD_RECT" />
- <result property="suspendLicense" column="SUSPEND_LICENSE" />
- <result property="shutClampDown" column="SHUT_CLAMP_DOWN" />
- <result property="penaltyFine" column="PENALTY_FINE" />
- <result property="actbExpsUnit" column="ACTB_EXPS_UNIT" />
- <result property="joinPunishTrustBreakEntp" column="JOIN_PUNISH_TRUST_BREAK_ENTP" />
- <result property="chkSubmitDttm" column="CHK_SUBMIT_DTTM" />
- <result property="chkSubmitDept" column="CHK_SUBMIT_DEPT" />
- <result property="auditApprovalPers" column="AUDIT_APPROVAL_PERS" />
- <result property="chkSubmitPers" column="CHK_SUBMIT_PERS" />
- <result property="contactPers" column="CONTACT_PERS" />
- <result property="fillRepoStat" column="FILL_REPO_STAT" />
- <result property="note" column="NOTE" />
- <result property="persId" column="PERS_ID" />
- <result property="intm" column="INTM" />
- <result property="uptm" column="UPTM" />
- <result property="dataStat" column="DATA_STAT" />
- <association property="adName" javaType="java.lang.String" column="{code = AD_CODE}" select="cn.com.goldenwater.dcproj.dao.AttAdBaseDao.getNameByAdCode"></association>
- </resultMap>
- <!-- 数据库表字段列表 table_columns -->
- <sql id="table_columns">
- ID,
- CHK_INDUSTRY,
- ORG_ID,
- AD_CODE,
- CHK_GROUP_NUM,
- CHK_GROUP_NUM_UNDERCOVER,
- CHK_POINT_NUM,
- INSP_GENERAL_CHK,
- INSP_GENERAL_REPAIR,
- INSP_MAJOR_CHK,
- INSP_MAJOR_REPAIR,
- DANGER_RECT_FUND,
- CRACK_DOWN_ILLEGAL_ACTION,
- REPAIR_VIOLATE_RULE_ACTION,
- STOP_PROD_RECT,
- SUSPEND_LICENSE,
- SHUT_CLAMP_DOWN,
- PENALTY_FINE,
- ACTB_EXPS_UNIT,
- JOIN_PUNISH_TRUST_BREAK_ENTP,
- CHK_SUBMIT_DTTM,
- CHK_SUBMIT_DEPT,
- AUDIT_APPROVAL_PERS,
- CHK_SUBMIT_PERS,
- CONTACT_PERS,
- FILL_REPO_STAT,
- NOTE,
- PERS_ID,
- INTM,
- UPTM,
- DATA_STAT
- </sql>
- <!-- 实体类属性 列表 entity_properties -->
- <sql id="entity_properties">
- #{id},
- #{chkIndustry},
- #{orgId},
- #{adCode},
- #{chkGroupNum},
- #{chkGroupNumUndercover},
- #{chkPointNum},
- #{inspGeneralChk},
- #{inspGeneralRepair},
- #{inspMajorChk},
- #{inspMajorRepair},
- #{dangerRectFund},
- #{crackDownIllegalAction},
- #{repairViolateRuleAction},
- #{stopProdRect},
- #{suspendLicense},
- #{shutClampDown},
- #{penaltyFine},
- #{actbExpsUnit},
- #{joinPunishTrustBreakEntp},
- #{chkSubmitDttm},
- #{chkSubmitDept},
- #{auditApprovalPers},
- #{chkSubmitPers},
- #{contactPers},
- #{fillRepoStat},
- #{note},
- #{persId},
- #{intm},
- #{uptm},
- #{dataStat}
- </sql>
- <!-- 实体类属性 列表 entity_properties_item for循环使用 -->
- <sql id="entity_properties_item">
- #{item.id} as ID ,
- #{item.chkIndustry} as CHK_INDUSTRY ,
- #{item.orgId} as ORG_ID ,
- #{item.adCode} as AD_CODE ,
- #{item.chkGroupNum} as CHK_GROUP_NUM ,
- #{item.chkGroupNumUndercover} as CHK_GROUP_NUM_UNDERCOVER ,
- #{item.chkPointNum} as CHK_POINT_NUM ,
- #{item.inspGeneralChk} as INSP_GENERAL_CHK ,
- #{item.inspGeneralRepair} as INSP_GENERAL_REPAIR ,
- #{item.inspMajorChk} as INSP_MAJOR_CHK ,
- #{item.inspMajorRepair} as INSP_MAJOR_REPAIR ,
- #{item.dangerRectFund} as DANGER_RECT_FUND ,
- #{item.crackDownIllegalAction} as CRACK_DOWN_ILLEGAL_ACTION ,
- #{item.repairViolateRuleAction} as REPAIR_VIOLATE_RULE_ACTION ,
- #{item.stopProdRect} as STOP_PROD_RECT ,
- #{item.suspendLicense} as SUSPEND_LICENSE ,
- #{item.shutClampDown} as SHUT_CLAMP_DOWN ,
- #{item.penaltyFine} as PENALTY_FINE ,
- #{item.actbExpsUnit} as ACTB_EXPS_UNIT ,
- #{item.joinPunishTrustBreakEntp} as JOIN_PUNISH_TRUST_BREAK_ENTP ,
- #{item.chkSubmitDttm} as CHK_SUBMIT_DTTM ,
- #{item.chkSubmitDept} as CHK_SUBMIT_DEPT ,
- #{item.auditApprovalPers} as AUDIT_APPROVAL_PERS ,
- #{item.chkSubmitPers} as CHK_SUBMIT_PERS ,
- #{item.contactPers} as CONTACT_PERS ,
- #{item.fillRepoStat} as FILL_REPO_STAT ,
- #{item.note} as NOTE ,
- #{item.persId} as PERS_ID ,
- #{item.intm} as INTM ,
- #{item.uptm} as UPTM ,
- #{item.dataStat} as DATA_STAT
- </sql>
- <!-- 查询条件 -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test='chkIndustry != null and chkIndustry != ""'> and CHK_INDUSTRY = #{chkIndustry}</if>
- <if test='orgId != null and orgId != ""'> and ORG_ID = #{orgId}</if>
- <if test='adCode != null and adCode != ""'> and AD_CODE like '${adCode}%'</if>
- <if test='chkGroupNum != null '> and CHK_GROUP_NUM = #{chkGroupNum}</if>
- <if test='chkGroupNumUndercover != null '> and CHK_GROUP_NUM_UNDERCOVER = #{chkGroupNumUndercover}</if>
- <if test='chkPointNum != null '> and CHK_POINT_NUM = #{chkPointNum}</if>
- <if test='inspGeneralChk != null '> and INSP_GENERAL_CHK = #{inspGeneralChk}</if>
- <if test='inspGeneralRepair != null '> and INSP_GENERAL_REPAIR = #{inspGeneralRepair}</if>
- <if test='inspMajorChk != null '> and INSP_MAJOR_CHK = #{inspMajorChk}</if>
- <if test='inspMajorRepair != null '> and INSP_MAJOR_REPAIR = #{inspMajorRepair}</if>
- <if test='dangerRectFund != null and dangerRectFund != ""'> and DANGER_RECT_FUND = #{dangerRectFund}</if>
- <if test='crackDownIllegalAction != null '> and CRACK_DOWN_ILLEGAL_ACTION = #{crackDownIllegalAction}</if>
- <if test='repairViolateRuleAction != null '> and REPAIR_VIOLATE_RULE_ACTION = #{repairViolateRuleAction}</if>
- <if test='stopProdRect != null '> and STOP_PROD_RECT = #{stopProdRect}</if>
- <if test='suspendLicense != null '> and SUSPEND_LICENSE = #{suspendLicense}</if>
- <if test='shutClampDown != null '> and SHUT_CLAMP_DOWN = #{shutClampDown}</if>
- <if test='penaltyFine != null and penaltyFine != ""'> and PENALTY_FINE = #{penaltyFine}</if>
- <if test='actbExpsUnit != null '> and ACTB_EXPS_UNIT = #{actbExpsUnit}</if>
- <if test='joinPunishTrustBreakEntp != null '> and JOIN_PUNISH_TRUST_BREAK_ENTP = #{joinPunishTrustBreakEntp}</if>
- <if test='chkSubmitDttm != null '> and to_char(CHK_SUBMIT_DTTM,'yyyy-MM-dd') = to_char(#{chkSubmitDttm},'yyyy-MM-dd')</if>
- <if test='chkSubmitDept != null and chkSubmitDept != ""'> and CHK_SUBMIT_DEPT LIKE '%${chkSubmitDept}%'</if>
- <if test='auditApprovalPers != null and auditApprovalPers != ""'> and AUDIT_APPROVAL_PERS = #{auditApprovalPers}</if>
- <if test='chkSubmitPers != null and chkSubmitPers != ""'> and CHK_SUBMIT_PERS = #{chkSubmitPers}</if>
- <if test='contactPers != null and contactPers != ""'> and CONTACT_PERS = #{contactPers}</if>
- <if test='fillRepoStat != null and fillRepoStat != ""'> and FILL_REPO_STAT = #{fillRepoStat}</if>
- <if test='note != null and note != ""'> and NOTE = #{note}</if>
- <if test='persId != null and persId != ""'> and PERS_ID = #{persId}</if>
- <if test='intm != null '> and INTM = #{intm}</if>
- <if test='uptm != null '> and UPTM = #{uptm}</if>
- and DATA_STAT = '0'
- </trim>
- </sql>
- <!-- 根据Id查询 -->
- <select id="get" resultMap="chkSafeStatListResultMap" parameterType="String">
- select
- <include refid="table_columns"/>
- from CHK_SAFE_STAT_LIST where ID = #{id}
- </select>
- <!-- 根据条件筛选查询 -->
- <select id="getBy" resultMap="chkSafeStatListResultMap" parameterType="cn.com.goldenwater.dcproj.param.ChkSafeStatListParam">
- select
- <include refid="table_columns"/>
- from CHK_SAFE_STAT_LIST
- <include refid="page_where"/>
- </select>
- <!-- 查询所有 -->
- <select id="findAll" resultMap="chkSafeStatListResultMap">
- select
- <include refid="table_columns"/>
- from CHK_SAFE_STAT_LIST
- </select>
- <!-- 根据条件筛选 查询所有 -->
- <select id="findList" resultMap="chkSafeStatListResultMap" parameterType="cn.com.goldenwater.dcproj.param.ChkSafeStatListParam">
- select
- <include refid="table_columns"/>
- from CHK_SAFE_STAT_LIST
- <include refid="page_where"/>
- </select>
- <!-- 根据条件筛选 统计记录数 -->
- <select id="selectCount" resultType="int" parameterType="cn.com.goldenwater.dcproj.param.ChkSafeStatListParam">
- select count( ID ) from CHK_SAFE_STAT_LIST
- <include refid="page_where"/>
- </select>
- <!-- 添加 -->
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.ChkSafeStatList" >
- insert into CHK_SAFE_STAT_LIST(
- <include refid="table_columns"/>
- )
- values (
- <include refid="entity_properties"/>
- )
- </insert>
- <!-- 批量添加 -->
- <insert id="insertBatchFile" parameterType="java.util.List" useGeneratedKeys="false">
- insert into CHK_SAFE_STAT_LIST
- (<include refid="table_columns"/>)
- select t.* from (
- <foreach item="item" index="index" collection="list" separator="union all">
- select <include refid="entity_properties_item"/> from dual
- </foreach>
- ) t
- </insert>
- <!-- 主键删除 -->
- <delete id="delete" parameterType="java.lang.String">
- update CHK_SAFE_STAT_LIST set DATA_STAT='9' where ID = #{id}
- </delete>
- <!-- 条件删除 -->
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.ChkSafeStatList">
- update CHK_SAFE_STAT_LIST set DATA_STAT='9'
- <include refid="page_where"/>
- </delete>
- <!-- 逻辑删除 -->
- <update id="deleteInFlag" parameterType="java.lang.String">
- update CHK_SAFE_STAT_LIST set DATA_STAT = '9' where ID = #{id}
- </update>
- <!-- 主键更新 -->
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.ChkSafeStatList">
- update CHK_SAFE_STAT_LIST
- <trim prefix="SET" suffixOverrides=",">
- <if test='chkIndustry != null'>CHK_INDUSTRY = #{chkIndustry},</if>
- <if test='orgId != null'>ORG_ID = #{orgId},</if>
- <if test='adCode != null'>AD_CODE = #{adCode},</if>
- <if test='chkGroupNum != null'>CHK_GROUP_NUM = #{chkGroupNum},</if>
- <if test='chkGroupNumUndercover != null'>CHK_GROUP_NUM_UNDERCOVER = #{chkGroupNumUndercover},</if>
- <if test='chkPointNum != null'>CHK_POINT_NUM = #{chkPointNum},</if>
- <if test='inspGeneralChk != null'>INSP_GENERAL_CHK = #{inspGeneralChk},</if>
- <if test='inspGeneralRepair != null'>INSP_GENERAL_REPAIR = #{inspGeneralRepair},</if>
- <if test='inspMajorChk != null'>INSP_MAJOR_CHK = #{inspMajorChk},</if>
- <if test='inspMajorRepair != null'>INSP_MAJOR_REPAIR = #{inspMajorRepair},</if>
- <if test='dangerRectFund != null'>DANGER_RECT_FUND = #{dangerRectFund},</if>
- <if test='crackDownIllegalAction != null'>CRACK_DOWN_ILLEGAL_ACTION = #{crackDownIllegalAction},</if>
- <if test='repairViolateRuleAction != null'>REPAIR_VIOLATE_RULE_ACTION = #{repairViolateRuleAction},</if>
- <if test='stopProdRect != null'>STOP_PROD_RECT = #{stopProdRect},</if>
- <if test='suspendLicense != null'>SUSPEND_LICENSE = #{suspendLicense},</if>
- <if test='shutClampDown != null'>SHUT_CLAMP_DOWN = #{shutClampDown},</if>
- <if test='penaltyFine != null'>PENALTY_FINE = #{penaltyFine},</if>
- <if test='actbExpsUnit != null'>ACTB_EXPS_UNIT = #{actbExpsUnit},</if>
- <if test='joinPunishTrustBreakEntp != null'>JOIN_PUNISH_TRUST_BREAK_ENTP = #{joinPunishTrustBreakEntp},</if>
- <if test='chkSubmitDttm != null'>CHK_SUBMIT_DTTM = #{chkSubmitDttm},</if>
- <if test='chkSubmitDept != null'>CHK_SUBMIT_DEPT = #{chkSubmitDept},</if>
- <if test='auditApprovalPers != null'>AUDIT_APPROVAL_PERS = #{auditApprovalPers},</if>
- <if test='chkSubmitPers != null'>CHK_SUBMIT_PERS = #{chkSubmitPers},</if>
- <if test='contactPers != null'>CONTACT_PERS = #{contactPers},</if>
- <if test='note != null'>NOTE = #{note},</if>
- <if test='uptm != null'>UPTM = #{uptm},</if>
- <if test='dataStat != null'>DATA_STAT = #{dataStat},</if>
- </trim>
- where ID = #{id}
- </update>
- <!-- 条件更新 -->
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.ChkSafeStatList">
- update CHK_SAFE_STAT_LIST
- <trim prefix="SET" suffixOverrides=",">
- <if test='chkIndustry != null'>CHK_INDUSTRY = #{chkIndustry},</if>
- <if test='orgId != null'>ORG_ID = #{orgId},</if>
- <if test='adCode != null'>AD_CODE = #{adCode},</if>
- <if test='chkGroupNum != null'>CHK_GROUP_NUM = #{chkGroupNum},</if>
- <if test='chkGroupNumUndercover != null'>CHK_GROUP_NUM_UNDERCOVER = #{chkGroupNumUndercover},</if>
- <if test='chkPointNum != null'>CHK_POINT_NUM = #{chkPointNum},</if>
- <if test='inspGeneralChk != null'>INSP_GENERAL_CHK = #{inspGeneralChk},</if>
- <if test='inspGeneralRepair != null'>INSP_GENERAL_REPAIR = #{inspGeneralRepair},</if>
- <if test='inspMajorChk != null'>INSP_MAJOR_CHK = #{inspMajorChk},</if>
- <if test='inspMajorRepair != null'>INSP_MAJOR_REPAIR = #{inspMajorRepair},</if>
- <if test='dangerRectFund != null'>DANGER_RECT_FUND = #{dangerRectFund},</if>
- <if test='crackDownIllegalAction != null'>CRACK_DOWN_ILLEGAL_ACTION = #{crackDownIllegalAction},</if>
- <if test='repairViolateRuleAction != null'>REPAIR_VIOLATE_RULE_ACTION = #{repairViolateRuleAction},</if>
- <if test='stopProdRect != null'>STOP_PROD_RECT = #{stopProdRect},</if>
- <if test='suspendLicense != null'>SUSPEND_LICENSE = #{suspendLicense},</if>
- <if test='shutClampDown != null'>SHUT_CLAMP_DOWN = #{shutClampDown},</if>
- <if test='penaltyFine != null'>PENALTY_FINE = #{penaltyFine},</if>
- <if test='actbExpsUnit != null'>ACTB_EXPS_UNIT = #{actbExpsUnit},</if>
- <if test='joinPunishTrustBreakEntp != null'>JOIN_PUNISH_TRUST_BREAK_ENTP = #{joinPunishTrustBreakEntp},</if>
- <if test='chkSubmitDttm != null'>CHK_SUBMIT_DTTM = #{chkSubmitDttm},</if>
- <if test='chkSubmitDept != null'>CHK_SUBMIT_DEPT = #{chkSubmitDept},</if>
- <if test='auditApprovalPers != null'>AUDIT_APPROVAL_PERS = #{auditApprovalPers},</if>
- <if test='chkSubmitPers != null'>CHK_SUBMIT_PERS = #{chkSubmitPers},</if>
- <if test='contactPers != null'>CONTACT_PERS = #{contactPers},</if>
- <if test='note != null'>NOTE = #{note},</if>
- <if test='uptm != null'>UPTM = #{uptm},</if>
- <if test='dataStat != null'>DATA_STAT = #{dataStat},</if>
- </trim>
- <include refid="page_where"/>
- </update>
- <!-- 其他自定义SQL -->
- <!-- 批量上报 -->
- <update id="batchReportByIds" >
- update CHK_SAFE_STAT_LIST
- set FILL_REPO_STAT = '2', UPTM = #{uptm}
- where FILL_REPO_STAT = '1' and ID in
- <foreach item="id" collection="ids" open="(" separator="," close=")">
- #{id}
- </foreach>
- </update>
- <resultMap type="cn.com.goldenwater.dcproj.model.ChkSafeStatList" id="countTotalMap">
- <result property="chkIndustry" column="CHK_INDUSTRY" />
- <result property="orgId" column="ORG_ID" />
- <result property="adCode" column="AD_CODE" />
- <result property="chkGroupNum" column="CHK_GROUP_NUM" />
- <result property="chkGroupNumUndercover" column="CHK_GROUP_NUM_UNDERCOVER" />
- <result property="chkPointNum" column="CHK_POINT_NUM" />
- <result property="inspGeneralChk" column="INSP_GENERAL_CHK" />
- <result property="inspGeneralRepair" column="INSP_GENERAL_REPAIR" />
- <result property="inspMajorChk" column="INSP_MAJOR_CHK" />
- <result property="inspMajorRepair" column="INSP_MAJOR_REPAIR" />
- <result property="dangerRectFund" column="DANGER_RECT_FUND" />
- <result property="crackDownIllegalAction" column="CRACK_DOWN_ILLEGAL_ACTION" />
- <result property="repairViolateRuleAction" column="REPAIR_VIOLATE_RULE_ACTION" />
- <result property="stopProdRect" column="STOP_PROD_RECT" />
- <result property="suspendLicense" column="SUSPEND_LICENSE" />
- <result property="shutClampDown" column="SHUT_CLAMP_DOWN" />
- <result property="penaltyFine" column="PENALTY_FINE" />
- <result property="actbExpsUnit" column="ACTB_EXPS_UNIT" />
- <result property="joinPunishTrustBreakEntp" column="JOIN_PUNISH_TRUST_BREAK_ENTP" />
- <result property="chkSubmitDttm" column="CHK_SUBMIT_DTTM" />
- <result property="chkSubmitDept" column="CHK_SUBMIT_DEPT" />
- <result property="auditApprovalPers" column="AUDIT_APPROVAL_PERS" />
- <result property="chkSubmitPers" column="CHK_SUBMIT_PERS" />
- <result property="contactPers" column="CONTACT_PERS" />
- <result property="fillRepoStat" column="FILL_REPO_STAT" />
- </resultMap>
- <!-- 按行业(领域) 进行分类统计 -->
- <select id="countTotalByIndustry" resultMap="countTotalMap" parameterType="cn.com.goldenwater.dcproj.param.ChkSafeStatListParam">
- select cssli.id as CHK_INDUSTRY ,
- NVL(cssl.CHK_GROUP_NUM , 0) as CHK_GROUP_NUM,
- NVL(cssl.CHK_GROUP_NUM_UNDERCOVER, 0) as CHK_GROUP_NUM_UNDERCOVER,
- NVL(cssl.CHK_POINT_NUM , 0) as CHK_POINT_NUM,
- NVL(cssl.INSP_GENERAL_CHK , 0) as INSP_GENERAL_CHK,
- NVL(cssl.INSP_GENERAL_REPAIR , 0) as INSP_GENERAL_REPAIR,
- NVL(cssl.INSP_MAJOR_CHK , 0) as INSP_MAJOR_CHK,
- NVL(cssl.INSP_MAJOR_REPAIR , 0) as INSP_MAJOR_REPAIR,
- NVL(cssl.DANGER_RECT_FUND , 0) as DANGER_RECT_FUND,
- NVL(cssl.CRACK_DOWN_ILLEGAL_ACTION , 0) as CRACK_DOWN_ILLEGAL_ACTION,
- NVL(cssl.REPAIR_VIOLATE_RULE_ACTION , 0) as REPAIR_VIOLATE_RULE_ACTION,
- NVL(cssl.STOP_PROD_RECT , 0) as STOP_PROD_RECT,
- NVL(cssl.SUSPEND_LICENSE , 0) as SUSPEND_LICENSE,
- NVL(cssl.SHUT_CLAMP_DOWN , 0) as SHUT_CLAMP_DOWN,
- NVL(cssl.PENALTY_FINE , 0) as PENALTY_FINE,
- NVL(cssl.ACTB_EXPS_UNIT , 0) as ACTB_EXPS_UNIT,
- NVL(cssl.JOIN_PUNISH_TRUST_BREAK_ENTP , 0) JOIN_PUNISH_TRUST_BREAK_ENTP
- from chk_safe_stat_list_industry cssli
- left join (
- select CHK_INDUSTRY ,
- sum(CHK_GROUP_NUM) as CHK_GROUP_NUM,
- sum(CHK_GROUP_NUM_UNDERCOVER ) as CHK_GROUP_NUM_UNDERCOVER,
- sum(CHK_POINT_NUM) as CHK_POINT_NUM,
- sum(INSP_GENERAL_CHK) as INSP_GENERAL_CHK,
- sum(INSP_GENERAL_REPAIR) as INSP_GENERAL_REPAIR,
- sum(INSP_MAJOR_CHK) as INSP_MAJOR_CHK,
- sum(INSP_MAJOR_REPAIR) as INSP_MAJOR_REPAIR,
- SUM(nvl(DANGER_RECT_FUND , 0 )) DANGER_RECT_FUND,
- sum(CRACK_DOWN_ILLEGAL_ACTION) as CRACK_DOWN_ILLEGAL_ACTION,
- sum(REPAIR_VIOLATE_RULE_ACTION) as REPAIR_VIOLATE_RULE_ACTION,
- sum(STOP_PROD_RECT) as STOP_PROD_RECT,
- sum(SUSPEND_LICENSE) as SUSPEND_LICENSE,
- sum(SHUT_CLAMP_DOWN) as SHUT_CLAMP_DOWN,
- SUM(nvl( PENALTY_FINE , 0 )) as PENALTY_FINE,
- sum(ACTB_EXPS_UNIT) as ACTB_EXPS_UNIT,
- sum(JOIN_PUNISH_TRUST_BREAK_ENTP) as JOIN_PUNISH_TRUST_BREAK_ENTP
- from chk_safe_stat_list
- <include refid="page_where"/>
- group by CHK_INDUSTRY ) cssl on cssl.CHK_INDUSTRY = cssli.ID
- order by cssli.ORDR
- </select>
- </mapper>
|