Commit c1b909b8 authored by 刘林's avatar 刘林

fix(大屏):大屏接口修改

parent 3c636f98
...@@ -54,11 +54,11 @@ public interface JGStatisticsMapper { ...@@ -54,11 +54,11 @@ public interface JGStatisticsMapper {
Long over15yearsCount(@Param("orgCode") String orgCode, @Param("time") String time); Long over15yearsCount(@Param("orgCode") String orgCode, @Param("time") String time);
Long constructionNoticeCount(@Param("orgCode") String orgCode); Long constructionNoticeCount(@Param("dto") DPFilterParamDto dto);
Long changeCountByOrgCode(@Param("orgCode") String orgCode); Long changeCountByOrgCode(@Param("dto") DPFilterParamDto dto);
List<Map<String, Object>> selectNoticeList(@Param("orgCode") String orgCode, @Param("time") String time); List<Map<String, Object>> selectNoticeList(@Param("orgCode") String orgCode, @Param("time") String time, @Param("dto") DPFilterParamDto dto);
Page<Map<String, Object>> selectNoticeDetailList(@Param("page") Page<Map<String, Object>> page, @Param("orgCode") String orgCode, @Param("time") String time, @Param("dto") DPFilterParamForDetailDto dpFilterParamDto); Page<Map<String, Object>> selectNoticeDetailList(@Param("page") Page<Map<String, Object>> page, @Param("orgCode") String orgCode, @Param("time") String time, @Param("dto") DPFilterParamForDetailDto dpFilterParamDto);
...@@ -70,7 +70,7 @@ public interface JGStatisticsMapper { ...@@ -70,7 +70,7 @@ public interface JGStatisticsMapper {
Page<Map<String, Object>> selectYZNoticeDetailList(@Param("page") Page<Map<String, Object>> page, @Param("orgCode") String orgCode, @Param("time") String time, @Param("dto") DPFilterParamForDetailDto dpFilterParamDto); Page<Map<String, Object>> selectYZNoticeDetailList(@Param("page") Page<Map<String, Object>> page, @Param("orgCode") String orgCode, @Param("time") String time, @Param("dto") DPFilterParamForDetailDto dpFilterParamDto);
List<Map<String, Object>> selectNoticeCountTopTen(@Param("orgCode") String orgCode, @Param("time") String time); List<Map<String, Object>> selectNoticeCountTopTen(@Param("orgCode") String orgCode, @Param("time") String time, @Param("dto") DPFilterParamDto dto);
/** /**
* 告知类业务平均办理时效,统计维度:接收机构所在的行政区域; * 告知类业务平均办理时效,统计维度:接收机构所在的行政区域;
...@@ -100,9 +100,9 @@ public interface JGStatisticsMapper { ...@@ -100,9 +100,9 @@ public interface JGStatisticsMapper {
Page<Map<String, Object>> countBizFinishedNumForDPListAll(@Param("page") Page<Map<String, Object>> page, @Param("orgCode") String orgCode, @Param("dto") DPFilterParamDto filterParamDto, @Param("treeValue") String treeValue); Page<Map<String, Object>> countBizFinishedNumForDPListAll(@Param("page") Page<Map<String, Object>> page, @Param("orgCode") String orgCode, @Param("dto") DPFilterParamDto filterParamDto, @Param("treeValue") String treeValue);
Long getNoticeCountTopChart(@Param("dpFilterParamForDetailDto") DPFilterParamForDetailDto dpFilterParamForDetailDto); Long getNoticeCountTopChart(@Param("dto") DPFilterParamForDetailDto dto);
Page<Map<String, Object>> noticeCountTopPageNew(@Param("page") Page<Map<String, Object>> page, @Param("dpFilterParamForDetailDto") DPFilterParamForDetailDto dpFilterParamForDetailDto); Page<Map<String, Object>> noticeCountTopPageNew(@Param("page") Page<Map<String, Object>> page, @Param("dpFilterParamForDetailDto") DPFilterParamForDetailDto dpFilterParamForDetailDto);
List<Map<String, Object>> noticeCountTopPageByUseUnitCode(@Param("unitCodeList") List<String> unitCodeList, @Param("dpFilterParamForDetailDto") DPFilterParamForDetailDto dpFilterParamForDetailDto); List<Map<String, Object>> noticeCountTopPageByUseUnitCode(@Param("unitCodeList") List<String> unitCodeList, @Param("dto") DPFilterParamForDetailDto dto);
} }
...@@ -402,82 +402,99 @@ ...@@ -402,82 +402,99 @@
AND ibjsi."ORG_BRANCH_CODE" LIKE CONCAT ( #{orgCode}, '%' ); AND ibjsi."ORG_BRANCH_CODE" LIKE CONCAT ( #{orgCode}, '%' );
]]></select> ]]></select>
<select id="constructionNoticeCount" resultType="java.lang.Long"> <select id="constructionNoticeCount" resultType="java.lang.Long">
SELECT SUM SELECT SUM ( T.COUNT )
( T.COUNT )
FROM FROM
( (
SELECT COUNT SELECT COUNT( 1 )
( 1 )
FROM FROM
tzs_jg_installation_notice T tzs_jg_installation_notice T
WHERE WHERE
T.notice_status = 6616 T.notice_status = 6616
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) UNION all <include refid="companyConditionForNotice"/>
SELECT COUNT UNION ALL
( 1 ) SELECT COUNT( 1 )
FROM FROM
tzs_jg_maintain_notice T tzs_jg_maintain_notice T
WHERE WHERE
T.notice_status = 6616 T.notice_status = 6616
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) UNION all <include refid="companyCondition"/>
SELECT COUNT UNION ALL
( 1 ) SELECT COUNT ( 1 )
FROM FROM
tzs_jg_reform_notice T tzs_jg_reform_notice T
WHERE WHERE
T.notice_status = 6616 T.notice_status = 6616
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) UNION all <include refid="companyCondition"/>
SELECT COUNT UNION ALL
( 1 ) SELECT COUNT ( 1 )
FROM FROM
tzs_jg_transfer_notice T tzs_jg_transfer_notice T
WHERE WHERE
T.notice_status = 6616 T.notice_status = 6616
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) <include refid="companyCondition"/>
) T ) T
</select> </select>
<!-- 公共条件:根据 cityCode 或 companyCodes 生成过滤条件 -->
<sql id="companyCondition">
<if test='dto.cityCode != "610000"'>
<if test="dto.companyCodes != null and dto.companyCodes.size() > 0">
AND T.receive_company_code IN
<foreach collection="dto.companyCodes" item="code" open="(" separator="," close=")">
#{code}
</foreach>
</if>
</if>
</sql>
<sql id="companyConditionForNotice">
<if test='dto.cityCode != "610000"'>
<if test="dto.companyCodes != null and dto.companyCodes.size() > 0">
AND T.receive_org_credit_code IN
<foreach collection="dto.companyCodes" item="code" open="(" separator="," close=")">
#{code}
</foreach>
</if>
</if>
</sql>
<select id="changeCountByOrgCode" resultType="java.lang.Long"> <select id="changeCountByOrgCode" resultType="java.lang.Long">
SELECT SUM SELECT SUM( T.COUNT )
( T.COUNT )
FROM FROM
( (
SELECT COUNT SELECT COUNT( 1 )
( 1 )
FROM FROM
tzs_jg_change_registration_name crn left join privilege_company pc tzs_jg_change_registration_name T
ON crn.receive_org_code = pc.company_code
AND crn.audit_status = '已完成'
WHERE WHERE
pc.org_code LIKE CONCAT ( #{orgCode}, '%' ) UNION ALL T.audit_status = '已完成'
SELECT COUNT <include refid="companyCondition"/>
( 1 ) UNION ALL
SELECT COUNT( 1 )
FROM FROM
tzs_jg_change_registration_reform T tzs_jg_change_registration_reform T
WHERE WHERE
T.audit_status = '已完成' T.audit_status = '已完成'
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) UNION ALL <include refid="companyCondition"/>
SELECT COUNT UNION ALL
( 1 ) SELECT COUNT( 1 )
FROM FROM
tzs_jg_change_registration_transfer T tzs_jg_change_registration_transfer T
WHERE WHERE
T.audit_status = '已完成' T.audit_status = '已完成'
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) UNION ALL <include refid="companyCondition"/>
SELECT COUNT UNION ALL
( 1 ) SELECT COUNT( 1 )
FROM FROM
tzs_jg_change_registration_unit T tzs_jg_change_registration_unit T
WHERE WHERE
T.status = '已完成' T.status = '已完成'
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) UNION ALL <include refid="companyCondition"/>
SELECT COUNT UNION ALL
( 1 ) SELECT COUNT ( 1 )
FROM FROM
tzs_jg_change_vehicle_registration_unit T tzs_jg_change_vehicle_registration_unit T
WHERE WHERE
T.status = '已完成' T.status = '已完成'
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) <include refid="companyCondition"/>
) T ) T
</select> </select>
<select id="selectNoticeList" resultType="java.util.Map"> <select id="selectNoticeList" resultType="java.util.Map">
select select
...@@ -494,7 +511,8 @@ ...@@ -494,7 +511,8 @@
WHERE WHERE
handle_date &gt;= #{time} handle_date &gt;= #{time}
and notice_status != 6617 and notice_status != 6617
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) UNION ALL <include refid="companyConditionForNotice"/>
UNION ALL
SELECT SELECT
CONCAT ( T.city_name, T.county_name ) AS location, CONCAT ( T.city_name, T.county_name ) AS location,
T.install_unit_name AS constructionCompany, T.install_unit_name AS constructionCompany,
...@@ -506,7 +524,8 @@ ...@@ -506,7 +524,8 @@
WHERE WHERE
accept_date &gt;= #{time} accept_date &gt;= #{time}
and notice_status != 6617 and notice_status != 6617
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) UNION ALL <include refid="companyCondition"/>
UNION ALL
SELECT SELECT
CONCAT ( T.city_name, T.county_name ) AS location, CONCAT ( T.city_name, T.county_name ) AS location,
T.install_unit_name AS constructionCompany, T.install_unit_name AS constructionCompany,
...@@ -518,7 +537,8 @@ ...@@ -518,7 +537,8 @@
WHERE WHERE
accept_date &gt;= #{time} accept_date &gt;= #{time}
and notice_status != 6617 and notice_status != 6617
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) UNION ALL <include refid="companyCondition"/>
UNION ALL
SELECT SELECT
CONCAT ( T.city_name, T.county_name ) AS location, CONCAT ( T.city_name, T.county_name ) AS location,
T.install_unit_name AS constructionCompany, T.install_unit_name AS constructionCompany,
...@@ -530,7 +550,8 @@ ...@@ -530,7 +550,8 @@
WHERE WHERE
handle_date &gt;= #{time} handle_date &gt;= #{time}
and notice_status != 6617 and notice_status != 6617
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' )) A <include refid="companyCondition"/>
) A
ORDER BY A."constructionDate" DESC ORDER BY A."constructionDate" DESC
</select> </select>
...@@ -554,7 +575,8 @@ ...@@ -554,7 +575,8 @@
<if test="dto.address != null and dto.address != ''"> <if test="dto.address != null and dto.address != ''">
AND (T.city_name like CONCAT(#{dto.address},'%') or T.county_name like CONCAT(#{dto.address},'%')) AND (T.city_name like CONCAT(#{dto.address},'%') or T.county_name like CONCAT(#{dto.address},'%'))
</if> </if>
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) UNION ALL <include refid="companyConditionForNotice"/>
UNION ALL
SELECT SELECT
CONCAT ( T.city_name, T.county_name ) AS location, CONCAT ( T.city_name, T.county_name ) AS location,
T.install_unit_name AS constructionCompany, T.install_unit_name AS constructionCompany,
...@@ -571,7 +593,8 @@ ...@@ -571,7 +593,8 @@
<if test="dto.address != null and dto.address != ''"> <if test="dto.address != null and dto.address != ''">
AND (T.city_name like CONCAT(#{dto.address},'%') or T.county_name like CONCAT(#{dto.address},'%')) AND (T.city_name like CONCAT(#{dto.address},'%') or T.county_name like CONCAT(#{dto.address},'%'))
</if> </if>
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) UNION ALL <include refid="companyCondition"/>
UNION ALL
SELECT SELECT
CONCAT ( T.city_name, T.county_name ) AS location, CONCAT ( T.city_name, T.county_name ) AS location,
T.install_unit_name AS constructionCompany, T.install_unit_name AS constructionCompany,
...@@ -588,7 +611,8 @@ ...@@ -588,7 +611,8 @@
<if test="dto.address != null and dto.address != ''"> <if test="dto.address != null and dto.address != ''">
AND (T.city_name like CONCAT(#{dto.address},'%') or T.county_name like CONCAT(#{dto.address},'%')) AND (T.city_name like CONCAT(#{dto.address},'%') or T.county_name like CONCAT(#{dto.address},'%'))
</if> </if>
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) UNION ALL <include refid="companyCondition"/>
UNION ALL
SELECT SELECT
CONCAT ( T.city_name, T.county_name ) AS location, CONCAT ( T.city_name, T.county_name ) AS location,
T.install_unit_name AS constructionCompany, T.install_unit_name AS constructionCompany,
...@@ -605,13 +629,13 @@ ...@@ -605,13 +629,13 @@
<if test="dto.address != null and dto.address != ''"> <if test="dto.address != null and dto.address != ''">
AND (T.city_name like CONCAT(#{dto.address},'%') or T.county_name like CONCAT(#{dto.address},'%')) AND (T.city_name like CONCAT(#{dto.address},'%') or T.county_name like CONCAT(#{dto.address},'%'))
</if> </if>
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' )) A <include refid="companyCondition"/>
) A
ORDER BY A."constructionDate" DESC ORDER BY A."constructionDate" DESC
</select> </select>
<select id="selectNoticeCountTopTen" resultType="java.util.Map"> <select id="selectNoticeCountTopTen" resultType="java.util.Map">
SELECT SUM( T.num ) AS count, SELECT SUM( T.num ) AS count,T.company
T.company
FROM FROM
( (
SELECT COUNT SELECT COUNT
...@@ -622,9 +646,10 @@ ...@@ -622,9 +646,10 @@
tzs_jg_installation_notice T tzs_jg_installation_notice T
WHERE WHERE
install_start_date &gt;= #{time} install_start_date &gt;= #{time}
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) <include refid="companyConditionForNotice"/>
GROUP BY GROUP BY
T.install_unit_credit_code UNION ALL T.install_unit_credit_code
UNION ALL
SELECT COUNT SELECT COUNT
( 1 ) AS num, ( 1 ) AS num,
T.install_unit_name AS company, T.install_unit_name AS company,
...@@ -633,9 +658,10 @@ ...@@ -633,9 +658,10 @@
tzs_jg_maintain_notice T tzs_jg_maintain_notice T
WHERE WHERE
plan_date &gt;= #{time} plan_date &gt;= #{time}
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) <include refid="companyCondition"/>
GROUP BY GROUP BY
T.install_unit_credit_code UNION ALL T.install_unit_credit_code
UNION ALL
SELECT SELECT
( 1 ) AS num, ( 1 ) AS num,
T.install_unit_name AS company, T.install_unit_name AS company,
...@@ -644,9 +670,10 @@ ...@@ -644,9 +670,10 @@
tzs_jg_reform_notice T tzs_jg_reform_notice T
WHERE WHERE
plan_date &gt;= #{time} plan_date &gt;= #{time}
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) <include refid="companyCondition"/>
GROUP BY GROUP BY
T.install_unit_credit_code UNION ALL T.install_unit_credit_code
UNION ALL
SELECT SELECT
( 1 ) AS num, ( 1 ) AS num,
T.install_unit_name AS company, T.install_unit_name AS company,
...@@ -655,7 +682,7 @@ ...@@ -655,7 +682,7 @@
tzs_jg_transfer_notice T tzs_jg_transfer_notice T
WHERE WHERE
plan_date &gt;= #{time} plan_date &gt;= #{time}
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) <include refid="companyCondition"/>
GROUP BY GROUP BY
T.install_unit_credit_code T.install_unit_credit_code
) T ) T
...@@ -1098,7 +1125,7 @@ ...@@ -1098,7 +1125,7 @@
<if test="dto.address != null and dto.address != ''"> <if test="dto.address != null and dto.address != ''">
AND (T.city_name like CONCAT(#{dto.address},'%') or T.county_name like CONCAT(#{dto.address},'%')) AND (T.city_name like CONCAT(#{dto.address},'%') or T.county_name like CONCAT(#{dto.address},'%'))
</if> </if>
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) <include refid="companyConditionForNotice"/>
order by T.install_start_date desc order by T.install_start_date desc
</select> </select>
<select id="selectWXNoticeDetailList" resultType="java.util.Map"> <select id="selectWXNoticeDetailList" resultType="java.util.Map">
...@@ -1118,7 +1145,7 @@ ...@@ -1118,7 +1145,7 @@
<if test="dto.address != null and dto.address != ''"> <if test="dto.address != null and dto.address != ''">
AND (T.city_name like CONCAT(#{dto.address},'%') or T.county_name like CONCAT(#{dto.address},'%')) AND (T.city_name like CONCAT(#{dto.address},'%') or T.county_name like CONCAT(#{dto.address},'%'))
</if> </if>
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) <include refid="companyCondition"/>
order by T.plan_date desc order by T.plan_date desc
</select> </select>
<select id="selectGZNoticeDetailList" resultType="java.util.Map"> <select id="selectGZNoticeDetailList" resultType="java.util.Map">
...@@ -1138,7 +1165,7 @@ ...@@ -1138,7 +1165,7 @@
<if test="dto.address != null and dto.address != ''"> <if test="dto.address != null and dto.address != ''">
AND (T.city_name like CONCAT(#{dto.address},'%') or T.county_name like CONCAT(#{dto.address},'%')) AND (T.city_name like CONCAT(#{dto.address},'%') or T.county_name like CONCAT(#{dto.address},'%'))
</if> </if>
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) <include refid="companyCondition"/>
order by T.plan_date desc order by T.plan_date desc
</select> </select>
<select id="selectYZNoticeDetailList" resultType="java.util.Map"> <select id="selectYZNoticeDetailList" resultType="java.util.Map">
...@@ -1158,7 +1185,7 @@ ...@@ -1158,7 +1185,7 @@
<if test="dto.address != null and dto.address != ''"> <if test="dto.address != null and dto.address != ''">
AND (T.city_name like CONCAT(#{dto.address},'%') or T.county_name like CONCAT(#{dto.address},'%')) AND (T.city_name like CONCAT(#{dto.address},'%') or T.county_name like CONCAT(#{dto.address},'%'))
</if> </if>
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) <include refid="companyCondition"/>
order by T.plan_date desc order by T.plan_date desc
</select> </select>
<select id="countBizFinishedNumForDPListSGGZ" resultType="java.util.Map"> <select id="countBizFinishedNumForDPListSGGZ" resultType="java.util.Map">
...@@ -1181,9 +1208,22 @@ ...@@ -1181,9 +1208,22 @@
END AS status END AS status
FROM FROM
"tzs_jg_installation_notice" tjin "tzs_jg_installation_notice" tjin
WHERE WHERE notice_status != 6617
receive_company_org_code like CONCAT(#{orgCode}, '%') <choose>
and notice_status != 6617 <when test='dto.cityCode != null and dto.cityCode == "610000"'>
and 1=1
</when>
<otherwise>
<if test="dto.companyCodes != null and dto.companyCodes.size > 0">
and tjin.receive_org_credit_code =
ANY(ARRAY[
<foreach collection="dto.companyCodes" item="companyCode" separator=",">
#{companyCode}
</foreach>
])
</if>
</otherwise>
</choose>
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(handle_date as date),#{dto.beginDate}) and date_ge(CAST(handle_date as date),#{dto.beginDate})
</if> </if>
...@@ -1231,9 +1271,22 @@ ...@@ -1231,9 +1271,22 @@
END AS status END AS status
FROM FROM
"tzs_jg_maintain_notice" tjmn "tzs_jg_maintain_notice" tjmn
WHERE WHERE notice_status != 6617
receive_company_org_code like CONCAT(#{orgCode}, '%') <choose>
and notice_status != 6617 <when test='dto.cityCode != null and dto.cityCode == "610000"'>
and 1=1
</when>
<otherwise>
<if test="dto.companyCodes != null and dto.companyCodes.size > 0">
and tjmn.receive_company_code =
ANY(ARRAY[
<foreach collection="dto.companyCodes" item="companyCode" separator=",">
#{companyCode}
</foreach>
])
</if>
</otherwise>
</choose>
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(accept_date as date),#{dto.beginDate}) and date_ge(CAST(accept_date as date),#{dto.beginDate})
</if> </if>
...@@ -1281,9 +1334,22 @@ ...@@ -1281,9 +1334,22 @@
END AS status END AS status
FROM FROM
"tzs_jg_reform_notice" tjrn "tzs_jg_reform_notice" tjrn
WHERE WHERE notice_status != 6617
receive_company_org_code like CONCAT(#{orgCode}, '%') <choose>
and notice_status != 6617 <when test='dto.cityCode != null and dto.cityCode == "610000"'>
and 1=1
</when>
<otherwise>
<if test="dto.companyCodes != null and dto.companyCodes.size > 0">
and tjrn.receive_company_code =
ANY(ARRAY[
<foreach collection="dto.companyCodes" item="companyCode" separator=",">
#{companyCode}
</foreach>
])
</if>
</otherwise>
</choose>
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(accept_date as date),#{dto.beginDate}) and date_ge(CAST(accept_date as date),#{dto.beginDate})
</if> </if>
...@@ -1333,9 +1399,22 @@ ...@@ -1333,9 +1399,22 @@
tzs_jg_transfer_notice tn tzs_jg_transfer_notice tn
LEFT JOIN tzs_jg_transfer_notice_eq tne ON tn.sequence_nbr = tne.equip_transfer_id LEFT JOIN tzs_jg_transfer_notice_eq tne ON tn.sequence_nbr = tne.equip_transfer_id
LEFT JOIN idx_biz_jg_register_info ri ON tne.equ_id = ri.RECORD LEFT JOIN idx_biz_jg_register_info ri ON tne.equ_id = ri.RECORD
WHERE WHERE tn.notice_status != 6617
receive_company_org_code like CONCAT(#{orgCode}, '%') <choose>
and notice_status != 6617 <when test='dto.cityCode != null and dto.cityCode == "610000"'>
and 1=1
</when>
<otherwise>
<if test="dto.companyCodes != null and dto.companyCodes.size > 0">
and tn.receive_company_code =
ANY(ARRAY[
<foreach collection="dto.companyCodes" item="companyCode" separator=",">
#{companyCode}
</foreach>
])
</if>
</otherwise>
</choose>
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(handle_date as date),#{dto.beginDate}) and date_ge(CAST(handle_date as date),#{dto.beginDate})
</if> </if>
...@@ -1389,10 +1468,23 @@ ...@@ -1389,10 +1468,23 @@
LEFT JOIN idx_biz_jg_register_info ri ON tne.equ_id = ri.RECORD LEFT JOIN idx_biz_jg_register_info ri ON tne.equ_id = ri.RECORD
LEFT JOIN equipment_category ec_equ_list ON ec_equ_list.code = ri.EQU_LIST LEFT JOIN equipment_category ec_equ_list ON ec_equ_list.code = ri.EQU_LIST
LEFT JOIN equipment_category ec_equ_category ON ec_equ_category.code = ri.EQU_CATEGORY LEFT JOIN equipment_category ec_equ_category ON ec_equ_category.code = ri.EQU_CATEGORY
WHERE WHERE tjur.status != '已作废'
receive_company_org_code LIKE CONCAT(#{orgCode}, '%')
AND tjur.status != '已作废'
AND tjur.is_delete = 0 AND tjur.is_delete = 0
<choose>
<when test='dto.cityCode != null and dto.cityCode == "610000"'>
and 1=1
</when>
<otherwise>
<if test="dto.companyCodes != null and dto.companyCodes.size > 0">
and tjur.receive_company_code =
ANY(ARRAY[
<foreach collection="dto.companyCodes" item="companyCode" separator=",">
#{companyCode}
</foreach>
])
</if>
</otherwise>
</choose>
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate}) and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if> </if>
...@@ -1441,9 +1533,22 @@ ...@@ -1441,9 +1533,22 @@
LEFT JOIN idx_biz_jg_register_info ri ON tjvie.equ_id = ri.RECORD LEFT JOIN idx_biz_jg_register_info ri ON tjvie.equ_id = ri.RECORD
LEFT JOIN equipment_category ec_equ_list ON ec_equ_list.code = ri.EQU_LIST LEFT JOIN equipment_category ec_equ_list ON ec_equ_list.code = ri.EQU_LIST
LEFT JOIN equipment_category ec_equ_category ON ec_equ_category.code = ri.EQU_CATEGORY LEFT JOIN equipment_category ec_equ_category ON ec_equ_category.code = ri.EQU_CATEGORY
WHERE WHERE tjvi.status != '已作废'
tjvi.org_branch_code LIKE CONCAT(#{orgCode}, '%') <choose>
AND tjvi.status != '已作废' <when test='dto.cityCode != null and dto.cityCode == "610000"'>
and 1=1
</when>
<otherwise>
<if test="dto.companyCodes != null and dto.companyCodes.size > 0">
and tjvi.receive_company_code =
ANY(ARRAY[
<foreach collection="dto.companyCodes" item="companyCode" separator=",">
#{companyCode}
</foreach>
])
</if>
</otherwise>
</choose>
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate}) and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if> </if>
...@@ -1493,9 +1598,22 @@ ...@@ -1493,9 +1598,22 @@
tzs_jg_change_registration_reform tjcrr tzs_jg_change_registration_reform tjcrr
LEFT JOIN tzs_jg_change_registration_reform_eq tjcrre ON tjcrr.sequence_nbr = tjcrre.equip_transfer_id LEFT JOIN tzs_jg_change_registration_reform_eq tjcrre ON tjcrr.sequence_nbr = tjcrre.equip_transfer_id
LEFT JOIN idx_biz_jg_register_info ri ON tjcrre.equ_id = ri.RECORD LEFT JOIN idx_biz_jg_register_info ri ON tjcrre.equ_id = ri.RECORD
WHERE WHERE tjcrr.audit_status != '已作废'
tjcrr.receive_company_org_code like CONCAT(#{orgCode}, '%') <choose>
and tjcrr.audit_status != '已作废' <when test='dto.cityCode != null and dto.cityCode == "610000"'>
and 1=1
</when>
<otherwise>
<if test="dto.companyCodes != null and dto.companyCodes.size > 0">
and tjcrr.receive_company_code =
ANY(ARRAY[
<foreach collection="dto.companyCodes" item="companyCode" separator=",">
#{companyCode}
</foreach>
])
</if>
</otherwise>
</choose>
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate}) and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if> </if>
...@@ -1544,9 +1662,22 @@ ...@@ -1544,9 +1662,22 @@
tzs_jg_change_registration_transfer tjcrt tzs_jg_change_registration_transfer tjcrt
LEFT JOIN tzs_jg_change_registration_transfer_eq tjcrte ON tjcrt.sequence_nbr = tjcrte.equip_transfer_id LEFT JOIN tzs_jg_change_registration_transfer_eq tjcrte ON tjcrt.sequence_nbr = tjcrte.equip_transfer_id
LEFT JOIN idx_biz_jg_register_info ri ON tjcrte.equ_id = ri.RECORD LEFT JOIN idx_biz_jg_register_info ri ON tjcrte.equ_id = ri.RECORD
WHERE WHERE tjcrt.audit_status != '已作废'
tjcrt.receive_company_org_code like CONCAT( #{orgCode}, '%') <choose>
and tjcrt.audit_status != '已作废' <when test='dto.cityCode != null and dto.cityCode == "610000"'>
and 1=1
</when>
<otherwise>
<if test="dto.companyCodes != null and dto.companyCodes.size > 0">
and tjcrt.receive_company_code =
ANY(ARRAY[
<foreach collection="dto.companyCodes" item="companyCode" separator=",">
#{companyCode}
</foreach>
])
</if>
</otherwise>
</choose>
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate}) and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if> </if>
...@@ -1595,9 +1726,22 @@ ...@@ -1595,9 +1726,22 @@
tzs_jg_change_registration_unit tjcru tzs_jg_change_registration_unit tjcru
LEFT JOIN tzs_jg_change_registration_unit_eq tjcrue ON tjcru.sequence_nbr = tjcrue.unit_change_registration_id LEFT JOIN tzs_jg_change_registration_unit_eq tjcrue ON tjcru.sequence_nbr = tjcrue.unit_change_registration_id
LEFT JOIN idx_biz_jg_register_info ri ON tjcrue.equ_id = ri.RECORD LEFT JOIN idx_biz_jg_register_info ri ON tjcrue.equ_id = ri.RECORD
WHERE WHERE tjcru.status != '已作废'
tjcru.receive_company_org_code like CONCAT(#{orgCode}, '%') <choose>
and tjcru.status != '已作废' <when test='dto.cityCode != null and dto.cityCode == "610000"'>
and 1=1
</when>
<otherwise>
<if test="dto.companyCodes != null and dto.companyCodes.size > 0">
and tjcru.receive_company_code =
ANY(ARRAY[
<foreach collection="dto.companyCodes" item="companyCode" separator=",">
#{companyCode}
</foreach>
])
</if>
</otherwise>
</choose>
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate}) and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if> </if>
...@@ -1644,10 +1788,22 @@ ...@@ -1644,10 +1788,22 @@
END AS status END AS status
FROM FROM
tzs_jg_change_registration_name tjcrn tzs_jg_change_registration_name tjcrn
LEFT JOIN privilege_company pc ON pc.company_code = tjcrn.receive_org_code WHERE tjcrn.audit_status != '已作废'
WHERE <choose>
pc.org_code LIKE CONCAT ( #{orgCode}, '%' ) <when test='dto.cityCode != null and dto.cityCode == "610000"'>
AND tjcrn.audit_status != '已作废' and 1=1
</when>
<otherwise>
<if test="dto.companyCodes != null and dto.companyCodes.size > 0">
and tjcrn.receive_company_code =
ANY(ARRAY[
<foreach collection="dto.companyCodes" item="companyCode" separator=",">
#{companyCode}
</foreach>
])
</if>
</otherwise>
</choose>
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate}) and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if> </if>
...@@ -1945,9 +2101,22 @@ ...@@ -1945,9 +2101,22 @@
END AS status END AS status
FROM FROM
"tzs_jg_installation_notice" tjin "tzs_jg_installation_notice" tjin
WHERE WHERE notice_status != 6617
receive_company_org_code like CONCAT(#{orgCode}, '%') <choose>
and notice_status != 6617 <when test='dto.cityCode != null and dto.cityCode == "610000"'>
and 1=1
</when>
<otherwise>
<if test="dto.companyCodes != null and dto.companyCodes.size > 0">
and tjin.receive_org_credit_code =
ANY(ARRAY[
<foreach collection="dto.companyCodes" item="companyCode" separator=",">
#{companyCode}
</foreach>
])
</if>
</otherwise>
</choose>
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(handle_date as date),#{dto.beginDate}) and date_ge(CAST(handle_date as date),#{dto.beginDate})
</if> </if>
...@@ -1993,9 +2162,22 @@ ...@@ -1993,9 +2162,22 @@
END AS status END AS status
FROM FROM
"tzs_jg_maintain_notice" tjmn "tzs_jg_maintain_notice" tjmn
WHERE WHERE notice_status != 6617
receive_company_org_code like CONCAT(#{orgCode}, '%') <choose>
and notice_status != 6617 <when test='dto.cityCode != null and dto.cityCode == "610000"'>
and 1=1
</when>
<otherwise>
<if test="dto.companyCodes != null and dto.companyCodes.size > 0">
and tjmn.receive_company_code =
ANY(ARRAY[
<foreach collection="dto.companyCodes" item="companyCode" separator=",">
#{companyCode}
</foreach>
])
</if>
</otherwise>
</choose>
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(accept_date as date),#{dto.beginDate}) and date_ge(CAST(accept_date as date),#{dto.beginDate})
</if> </if>
...@@ -2041,9 +2223,22 @@ ...@@ -2041,9 +2223,22 @@
END AS status END AS status
FROM FROM
"tzs_jg_reform_notice" tjrn "tzs_jg_reform_notice" tjrn
WHERE WHERE notice_status != 6617
receive_company_org_code like CONCAT(#{orgCode}, '%') <choose>
and notice_status != 6617 <when test='dto.cityCode != null and dto.cityCode == "610000"'>
and 1=1
</when>
<otherwise>
<if test="dto.companyCodes != null and dto.companyCodes.size > 0">
and tjrn.receive_company_code =
ANY(ARRAY[
<foreach collection="dto.companyCodes" item="companyCode" separator=",">
#{companyCode}
</foreach>
])
</if>
</otherwise>
</choose>
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(accept_date as date),#{dto.beginDate}) and date_ge(CAST(accept_date as date),#{dto.beginDate})
</if> </if>
...@@ -2091,9 +2286,22 @@ ...@@ -2091,9 +2286,22 @@
tzs_jg_transfer_notice tn tzs_jg_transfer_notice tn
LEFT JOIN tzs_jg_transfer_notice_eq tne ON tn.sequence_nbr = tne.equip_transfer_id LEFT JOIN tzs_jg_transfer_notice_eq tne ON tn.sequence_nbr = tne.equip_transfer_id
LEFT JOIN idx_biz_jg_register_info ri ON tne.equ_id = ri.RECORD LEFT JOIN idx_biz_jg_register_info ri ON tne.equ_id = ri.RECORD
WHERE WHERE notice_status != 6617
receive_company_org_code like CONCAT(#{orgCode}, '%') <choose>
and notice_status != 6617 <when test='dto.cityCode != null and dto.cityCode == "610000"'>
and 1=1
</when>
<otherwise>
<if test="dto.companyCodes != null and dto.companyCodes.size > 0">
and tn.receive_company_code =
ANY(ARRAY[
<foreach collection="dto.companyCodes" item="companyCode" separator=",">
#{companyCode}
</foreach>
])
</if>
</otherwise>
</choose>
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(handle_date as date),#{dto.beginDate}) and date_ge(CAST(handle_date as date),#{dto.beginDate})
</if> </if>
...@@ -2142,9 +2350,22 @@ ...@@ -2142,9 +2350,22 @@
tzs_jg_use_registration tjur tzs_jg_use_registration tjur
LEFT JOIN tzs_jg_use_registration_eq tne ON tjur.sequence_nbr = tne.equip_transfer_id LEFT JOIN tzs_jg_use_registration_eq tne ON tjur.sequence_nbr = tne.equip_transfer_id
LEFT JOIN idx_biz_jg_register_info ri ON tne.equ_id = ri.RECORD LEFT JOIN idx_biz_jg_register_info ri ON tne.equ_id = ri.RECORD
WHERE WHERE tjur.status != '已作废' and tjur.is_delete = 0
receive_company_org_code like CONCAT(#{orgCode}, '%') <choose>
and tjur.status != '已作废' and tjur.is_delete = 0 <when test='dto.cityCode != null and dto.cityCode == "610000"'>
and 1=1
</when>
<otherwise>
<if test="dto.companyCodes != null and dto.companyCodes.size > 0">
and tjur.receive_company_code =
ANY(ARRAY[
<foreach collection="dto.companyCodes" item="companyCode" separator=",">
#{companyCode}
</foreach>
])
</if>
</otherwise>
</choose>
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate}) and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if> </if>
...@@ -2192,9 +2413,22 @@ ...@@ -2192,9 +2413,22 @@
tzs_jg_vehicle_information tjvi tzs_jg_vehicle_information tjvi
LEFT JOIN tzs_jg_vehicle_information_eq tjvie ON tjvi.sequence_nbr = tjvie.vehicle_id LEFT JOIN tzs_jg_vehicle_information_eq tjvie ON tjvi.sequence_nbr = tjvie.vehicle_id
LEFT JOIN idx_biz_jg_register_info ri ON tjvie.equ_id = ri.RECORD LEFT JOIN idx_biz_jg_register_info ri ON tjvie.equ_id = ri.RECORD
WHERE WHERE tjvi.status != '已作废'
tjvi.org_branch_code like CONCAT(#{orgCode}, '%') <choose>
and tjvi.status != '已作废' <when test='dto.cityCode != null and dto.cityCode == "610000"'>
and 1=1
</when>
<otherwise>
<if test="dto.companyCodes != null and dto.companyCodes.size > 0">
and tjvi.receive_company_code =
ANY(ARRAY[
<foreach collection="dto.companyCodes" item="companyCode" separator=",">
#{companyCode}
</foreach>
])
</if>
</otherwise>
</choose>
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate}) and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if> </if>
...@@ -2243,9 +2477,22 @@ ...@@ -2243,9 +2477,22 @@
tzs_jg_change_registration_reform tjcrr tzs_jg_change_registration_reform tjcrr
LEFT JOIN tzs_jg_change_registration_reform_eq tjcrre ON tjcrr.sequence_nbr = tjcrre.equip_transfer_id LEFT JOIN tzs_jg_change_registration_reform_eq tjcrre ON tjcrr.sequence_nbr = tjcrre.equip_transfer_id
LEFT JOIN idx_biz_jg_register_info ri ON tjcrre.equ_id = ri.RECORD LEFT JOIN idx_biz_jg_register_info ri ON tjcrre.equ_id = ri.RECORD
WHERE WHERE tjcrr.audit_status != '已作废'
tjcrr.receive_company_org_code like CONCAT(#{orgCode}, '%') <choose>
and tjcrr.audit_status != '已作废' <when test='dto.cityCode != null and dto.cityCode == "610000"'>
and 1=1
</when>
<otherwise>
<if test="dto.companyCodes != null and dto.companyCodes.size > 0">
and tjcrr.receive_company_code =
ANY(ARRAY[
<foreach collection="dto.companyCodes" item="companyCode" separator=",">
#{companyCode}
</foreach>
])
</if>
</otherwise>
</choose>
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate}) and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if> </if>
...@@ -2294,9 +2541,22 @@ ...@@ -2294,9 +2541,22 @@
tzs_jg_change_registration_transfer tjcrt tzs_jg_change_registration_transfer tjcrt
LEFT JOIN tzs_jg_change_registration_transfer_eq tjcrte ON tjcrt.sequence_nbr = tjcrte.equip_transfer_id LEFT JOIN tzs_jg_change_registration_transfer_eq tjcrte ON tjcrt.sequence_nbr = tjcrte.equip_transfer_id
LEFT JOIN idx_biz_jg_register_info ri ON tjcrte.equ_id = ri.RECORD LEFT JOIN idx_biz_jg_register_info ri ON tjcrte.equ_id = ri.RECORD
WHERE WHERE tjcrt.audit_status != '已作废'
tjcrt.receive_company_org_code like CONCAT( #{orgCode}, '%') <choose>
and tjcrt.audit_status != '已作废' <when test='dto.cityCode != null and dto.cityCode == "610000"'>
and 1=1
</when>
<otherwise>
<if test="dto.companyCodes != null and dto.companyCodes.size > 0">
and tjcrt.receive_company_code =
ANY(ARRAY[
<foreach collection="dto.companyCodes" item="companyCode" separator=",">
#{companyCode}
</foreach>
])
</if>
</otherwise>
</choose>
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate}) and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if> </if>
...@@ -2345,9 +2605,22 @@ ...@@ -2345,9 +2605,22 @@
tzs_jg_change_registration_unit tjcru tzs_jg_change_registration_unit tjcru
LEFT JOIN tzs_jg_change_registration_unit_eq tjcrue ON tjcru.sequence_nbr = tjcrue.unit_change_registration_id LEFT JOIN tzs_jg_change_registration_unit_eq tjcrue ON tjcru.sequence_nbr = tjcrue.unit_change_registration_id
LEFT JOIN idx_biz_jg_register_info ri ON tjcrue.equ_id = ri.RECORD LEFT JOIN idx_biz_jg_register_info ri ON tjcrue.equ_id = ri.RECORD
WHERE WHERE tjcru.status != '已作废'
tjcru.receive_company_org_code like CONCAT(#{orgCode}, '%') <choose>
and tjcru.status != '已作废' <when test='dto.cityCode != null and dto.cityCode == "610000"'>
and 1=1
</when>
<otherwise>
<if test="dto.companyCodes != null and dto.companyCodes.size > 0">
and tjcru.receive_company_code =
ANY(ARRAY[
<foreach collection="dto.companyCodes" item="companyCode" separator=",">
#{companyCode}
</foreach>
])
</if>
</otherwise>
</choose>
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate}) and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if> </if>
...@@ -2394,10 +2667,22 @@ ...@@ -2394,10 +2667,22 @@
END AS status END AS status
FROM FROM
tzs_jg_change_registration_name tjcrn tzs_jg_change_registration_name tjcrn
LEFT JOIN privilege_company pc ON pc.company_code = tjcrn.receive_org_code WHERE tjcrn.audit_status != '已作废'
WHERE <choose>
pc.org_code LIKE CONCAT ( #{orgCode}, '%' ) <when test='dto.cityCode != null and dto.cityCode == "610000"'>
AND tjcrn.audit_status != '已作废' and 1=1
</when>
<otherwise>
<if test="dto.companyCodes != null and dto.companyCodes.size > 0">
and tjcrn.receive_company_code =
ANY(ARRAY[
<foreach collection="dto.companyCodes" item="companyCode" separator=",">
#{companyCode}
</foreach>
])
</if>
</otherwise>
</choose>
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate}) and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if> </if>
...@@ -2449,10 +2734,22 @@ ...@@ -2449,10 +2734,22 @@
tzs_jg_enable_disable tjed tzs_jg_enable_disable tjed
LEFT JOIN tzs_jg_enable_disable_eq tjede ON tjed.sequence_nbr = tjede.enable_disable_apply_id LEFT JOIN tzs_jg_enable_disable_eq tjede ON tjed.sequence_nbr = tjede.enable_disable_apply_id
LEFT JOIN idx_biz_jg_register_info ri ON tjede.equ_id = ri.RECORD LEFT JOIN idx_biz_jg_register_info ri ON tjede.equ_id = ri.RECORD
LEFT JOIN privilege_company pc ON pc.company_code = tjed.receive_company_code WHERE tjed.audit_status != '已作废'
WHERE <choose>
pc.org_code LIKE CONCAT ( #{orgCode}, '%' ) <when test='dto.cityCode != null and dto.cityCode == "610000"'>
AND tjed.audit_status != '已作废' and 1=1
</when>
<otherwise>
<if test="dto.companyCodes != null and dto.companyCodes.size > 0">
and tjed.receive_company_code =
ANY(ARRAY[
<foreach collection="dto.companyCodes" item="companyCode" separator=",">
#{companyCode}
</foreach>
])
</if>
</otherwise>
</choose>
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate}) and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if> </if>
...@@ -2504,10 +2801,22 @@ ...@@ -2504,10 +2801,22 @@
tzs_jg_scrap_cancel tjsc tzs_jg_scrap_cancel tjsc
LEFT JOIN tzs_jg_scrap_cancel_eq tjsce ON tjsc.sequence_nbr = tjsce.equip_transfer_id LEFT JOIN tzs_jg_scrap_cancel_eq tjsce ON tjsc.sequence_nbr = tjsce.equip_transfer_id
LEFT JOIN idx_biz_jg_register_info ri ON tjsce.equ_id = ri.RECORD LEFT JOIN idx_biz_jg_register_info ri ON tjsce.equ_id = ri.RECORD
LEFT JOIN privilege_company pc ON pc.company_code = tjsc.receive_org_code WHERE tjsc.audit_status != '已作废'
WHERE <choose>
pc.org_code LIKE CONCAT ( #{orgCode}, '%' ) <when test='dto.cityCode != null and dto.cityCode == "610000"'>
AND tjsc.audit_status != '已作废' and 1=1
</when>
<otherwise>
<if test="dto.companyCodes != null and dto.companyCodes.size > 0">
and tjsc.receive_company_code =
ANY(ARRAY[
<foreach collection="dto.companyCodes" item="companyCode" separator=",">
#{companyCode}
</foreach>
])
</if>
</otherwise>
</choose>
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate}) and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if> </if>
...@@ -2536,8 +2845,7 @@ ...@@ -2536,8 +2845,7 @@
</if> </if>
</select> </select>
<select id="getNoticeCountTopChart" resultType="java.lang.Long"> <select id="getNoticeCountTopChart" resultType="java.lang.Long">
SELECT SUM SELECT SUM( T.num ) AS COUNT
( T.num ) AS COUNT
FROM FROM
( (
SELECT COUNT SELECT COUNT
...@@ -2546,42 +2854,43 @@ ...@@ -2546,42 +2854,43 @@
T.install_unit_credit_code T.install_unit_credit_code
FROM FROM
tzs_jg_installation_notice T tzs_jg_installation_notice T
WHERE WHERE 1 = 1 <include refid="companyConditionForNotice"/>
T.receive_company_org_code LIKE CONCAT ( #{dpFilterParamForDetailDto.orgCode}, '%' ) GROUP BY
GROUP BY T.install_unit_credit_code
T.install_unit_credit_code UNION ALL UNION ALL
SELECT COUNT SELECT COUNT
( 1 ) AS num, ( 1 ) AS num,
T.install_unit_name AS company, T.install_unit_name AS company,
T.install_unit_credit_code T.install_unit_credit_code
FROM FROM
tzs_jg_maintain_notice T tzs_jg_maintain_notice T
WHERE WHERE 1 = 1
T.receive_company_org_code LIKE CONCAT ( #{dpFilterParamForDetailDto.orgCode}, '%' ) <include refid="companyCondition"/>
GROUP BY GROUP BY
T.install_unit_credit_code UNION ALL T.install_unit_credit_code
UNION ALL
SELECT SELECT
( 1 ) AS num, ( 1 ) AS num,
T.install_unit_name AS company, T.install_unit_name AS company,
T.install_unit_credit_code T.install_unit_credit_code
FROM FROM
tzs_jg_reform_notice T tzs_jg_reform_notice T
WHERE WHERE 1 = 1
T.receive_company_org_code LIKE CONCAT ( #{dpFilterParamForDetailDto.orgCode}, '%' ) <include refid="companyCondition"/>
GROUP BY GROUP BY
T.install_unit_credit_code UNION ALL T.install_unit_credit_code
UNION ALL
SELECT SELECT
( 1 ) AS num, ( 1 ) AS num,
T.install_unit_name AS company, T.install_unit_name AS company,
T.install_unit_credit_code T.install_unit_credit_code
FROM FROM
tzs_jg_transfer_notice T tzs_jg_transfer_notice T
WHERE WHERE 1 = 1
T.receive_company_org_code LIKE CONCAT ( #{dpFilterParamForDetailDto.orgCode}, '%' ) <include refid="companyCondition"/>
GROUP BY GROUP BY
T.install_unit_credit_code T.install_unit_credit_code
) T ) T
</select> </select>
<select id="noticeCountTopPageNew" resultType="java.util.Map"> <select id="noticeCountTopPageNew" resultType="java.util.Map">
SELECT SELECT
...@@ -2650,38 +2959,37 @@ ...@@ -2650,38 +2959,37 @@
T.install_unit_credit_code T.install_unit_credit_code
FROM FROM
tzs_jg_installation_notice T tzs_jg_installation_notice T
WHERE WHERE 1 = 1 <include refid="companyConditionForNotice"/>
T.receive_company_org_code LIKE CONCAT ( #{dpFilterParamForDetailDto.orgCode}, '%' ) GROUP BY
GROUP BY T.install_unit_credit_code
T.install_unit_credit_code UNION ALL UNION ALL
SELECT COUNT SELECT COUNT
( 1 ) AS num, ( 1 ) AS num,
T.install_unit_name AS company, T.install_unit_name AS company,
T.install_unit_credit_code T.install_unit_credit_code
FROM FROM
tzs_jg_maintain_notice T tzs_jg_maintain_notice T
WHERE WHERE 1 = 1 <include refid="companyCondition"/>
T.receive_company_org_code LIKE CONCAT ( #{dpFilterParamForDetailDto.orgCode}, '%' )
GROUP BY GROUP BY
T.install_unit_credit_code UNION ALL T.install_unit_credit_code
UNION ALL
SELECT SELECT
( 1 ) AS num, ( 1 ) AS num,
T.install_unit_name AS company, T.install_unit_name AS company,
T.install_unit_credit_code T.install_unit_credit_code
FROM FROM
tzs_jg_reform_notice T tzs_jg_reform_notice T
WHERE WHERE 1 = 1 <include refid="companyCondition"/>
T.receive_company_org_code LIKE CONCAT ( #{dpFilterParamForDetailDto.orgCode}, '%' )
GROUP BY GROUP BY
T.install_unit_credit_code UNION ALL T.install_unit_credit_code
UNION ALL
SELECT SELECT
( 1 ) AS num, ( 1 ) AS num,
T.install_unit_name AS company, T.install_unit_name AS company,
T.install_unit_credit_code T.install_unit_credit_code
FROM FROM
tzs_jg_transfer_notice T tzs_jg_transfer_notice T
WHERE WHERE 1 = 1 <include refid="companyCondition"/>
T.receive_company_org_code LIKE CONCAT ( #{dpFilterParamForDetailDto.orgCode}, '%' )
GROUP BY GROUP BY
T.install_unit_credit_code T.install_unit_credit_code
) T ) T
......
...@@ -1839,7 +1839,9 @@ public class JGDPStatisticsServiceImpl { ...@@ -1839,7 +1839,9 @@ public class JGDPStatisticsServiceImpl {
return resultList; return resultList;
} }
@FieldMapping({
@FieldMapping.FieldMap(sourceField = "cityCode", targetField = "companyCodes", serviceClass = StCommonServiceImpl.class, queryMethod = "getCompanyCodesByRegionCode"),
})
public Map<String, Object> JGCenterMapCountForGlobal(DPFilterParamDto dpFilterParamDto) { public Map<String, Object> JGCenterMapCountForGlobal(DPFilterParamDto dpFilterParamDto) {
Map<String, Object> result = new HashMap<>(); Map<String, Object> result = new HashMap<>();
String orgCode = stCommonService.getAndSetOrgCode(dpFilterParamDto.getCityCode()); String orgCode = stCommonService.getAndSetOrgCode(dpFilterParamDto.getCityCode());
...@@ -1865,20 +1867,19 @@ public class JGDPStatisticsServiceImpl { ...@@ -1865,20 +1867,19 @@ public class JGDPStatisticsServiceImpl {
// 6.使用登记办理量 // 6.使用登记办理量
this.staticsCenterMapCountDataForUseReg(result, orgCode); this.staticsCenterMapCountDataForUseReg(result, orgCode);
// 7.施工告知办理量 // 7.施工告知办理量
this.staticsCenterMapCountDataForConstructionNotice(result, orgCode); this.staticsCenterMapCountDataForConstructionNotice(result, dpFilterParamDto);
// 8.变更办理量 // 8.变更办理量
this.staticsCenterMapCountDataForChange(result, orgCode); this.staticsCenterMapCountDataForChange(result, dpFilterParamDto);
return result; return result;
} }
private void staticsCenterMapCountDataForChange(Map<String, Object> result, String orgCode) { private void staticsCenterMapCountDataForChange(Map<String, Object> result, DPFilterParamDto dpFilterParamDto) {
Long num = jgStatisticsMapper.changeCountByOrgCode(orgCode); Long num = jgStatisticsMapper.changeCountByOrgCode(dpFilterParamDto);
result.put(DPMapStatisticsItemEnum.CHANGE_COUNT.getCode(), num); result.put(DPMapStatisticsItemEnum.CHANGE_COUNT.getCode(), num);
} }
private void staticsCenterMapCountDataForConstructionNotice(Map<String, Object> result, String orgCode) { private void staticsCenterMapCountDataForConstructionNotice(Map<String, Object> result, DPFilterParamDto dpFilterParamDto) {
Long num = jgStatisticsMapper.constructionNoticeCount(orgCode); Long num = jgStatisticsMapper.constructionNoticeCount(dpFilterParamDto);
result.put(DPMapStatisticsItemEnum.CONSTRUCTION_NOTICE_COUNT.getCode(), num); result.put(DPMapStatisticsItemEnum.CONSTRUCTION_NOTICE_COUNT.getCode(), num);
} }
...@@ -1916,34 +1917,39 @@ public class JGDPStatisticsServiceImpl { ...@@ -1916,34 +1917,39 @@ public class JGDPStatisticsServiceImpl {
}).collect(Collectors.toList()); }).collect(Collectors.toList());
} }
@FieldMapping({
@FieldMapping.FieldMap(sourceField = "cityCode", targetField = "companyCodes", serviceClass = StCommonServiceImpl.class, queryMethod = "getCompanyCodesByRegionCode"),
})
public List<Map<String, Object>> noticeList(DPFilterParamDto dpFilterParamDto) { public List<Map<String, Object>> noticeList(DPFilterParamDto dpFilterParamDto) {
String orgCode = stCommonService.getAndSetOrgCode(dpFilterParamDto.getCityCode()); String orgCode = stCommonService.getAndSetOrgCode(dpFilterParamDto.getCityCode());
if (orgCode == null) { if (orgCode == null) {
return new ArrayList<>(); return new ArrayList<>();
} }
String time = LocalDate.now().minusDays(29).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); String time = LocalDate.now().minusDays(29).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
return jgStatisticsMapper.selectNoticeList(orgCode, time); return jgStatisticsMapper.selectNoticeList(orgCode, time, dpFilterParamDto);
} }
@FieldMapping({
@FieldMapping.FieldMap(sourceField = "cityCode", targetField = "companyCodes", serviceClass = StCommonServiceImpl.class, queryMethod = "getCompanyCodesByRegionCode"),
})
public List<Map<String, Object>> noticeCountTop(DPFilterParamDto dpFilterParamDto) { public List<Map<String, Object>> noticeCountTop(DPFilterParamDto dpFilterParamDto) {
String orgCode = stCommonService.getAndSetOrgCode(dpFilterParamDto.getCityCode()); String orgCode = stCommonService.getAndSetOrgCode(dpFilterParamDto.getCityCode());
if (orgCode == null) { if (orgCode == null) {
return new ArrayList<>(); return new ArrayList<>();
} }
String time = LocalDate.now().minusDays(29).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); String time = LocalDate.now().minusDays(29).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
return jgStatisticsMapper.selectNoticeCountTopTen(orgCode, time); return jgStatisticsMapper.selectNoticeCountTopTen(orgCode, time, dpFilterParamDto);
} }
@FieldMapping({
@FieldMapping.FieldMap(sourceField = "cityCode", targetField = "companyCodes", serviceClass = StCommonServiceImpl.class, queryMethod = "getCompanyCodesByRegionCode"),
})
public Map<String, Object> noticeCountTopChart(DPFilterParamForDetailDto dpFilterParamForDetailDto) { public Map<String, Object> noticeCountTopChart(DPFilterParamForDetailDto dpFilterParamForDetailDto) {
List<RegionModel> regionModels = stCommonService.setRegionIfRootParent(dpFilterParamForDetailDto.getCityCode()); List<RegionModel> regionModels = stCommonService.setRegionIfRootParent(dpFilterParamForDetailDto.getCityCode());
List<Map<String, Object>> result = regionModels.parallelStream().map(r -> { List<Map<String, Object>> result = regionModels.parallelStream().map(r -> {
String orgCode = stCommonService.getAndSetOrgCode(r.getRegionCode() + "");
DPFilterParamForDetailDto dpFilterParamForDetailDtoForSearch = new DPFilterParamForDetailDto();
dpFilterParamForDetailDtoForSearch.setOrgCode(orgCode);
dpFilterParamForDetailDtoForSearch.setCityCode(r.getRegionCode() + "");
Map<String, Object> itemResult = new HashMap<>(); Map<String, Object> itemResult = new HashMap<>();
itemResult.put("xdata", r.getRegionName()); itemResult.put("xdata", r.getRegionName());
getNoticeCountTopChart(itemResult, dpFilterParamForDetailDtoForSearch); getNoticeCountTopChart(itemResult, dpFilterParamForDetailDto);
return itemResult; return itemResult;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
...@@ -1970,6 +1976,7 @@ public class JGDPStatisticsServiceImpl { ...@@ -1970,6 +1976,7 @@ public class JGDPStatisticsServiceImpl {
return returnMap; return returnMap;
} }
@FieldMapping({@FieldMapping.FieldMap(sourceField = "cityCode", paramIndex = 1, targetField = "companyCodes", serviceClass = StCommonServiceImpl.class, queryMethod = "getCompanyCodesByRegionCode"),})
public Page<Map<String, Object>> noticeCountTopPage(Page<Map<String, Object>> page, DPFilterParamForDetailDto dpFilterParamForDetailDto) { public Page<Map<String, Object>> noticeCountTopPage(Page<Map<String, Object>> page, DPFilterParamForDetailDto dpFilterParamForDetailDto) {
String orgCode = stCommonService.getAndSetOrgCode(dpFilterParamForDetailDto.getCityCode()); String orgCode = stCommonService.getAndSetOrgCode(dpFilterParamForDetailDto.getCityCode());
dpFilterParamForDetailDto.setOrgCode(orgCode); dpFilterParamForDetailDto.setOrgCode(orgCode);
...@@ -2166,6 +2173,9 @@ public class JGDPStatisticsServiceImpl { ...@@ -2166,6 +2173,9 @@ public class JGDPStatisticsServiceImpl {
return result; return result;
} }
@FieldMapping({
@FieldMapping.FieldMap(sourceField = "cityCode", paramIndex = 1, targetField = "companyCodes", serviceClass = StCommonServiceImpl.class, queryMethod = "getCompanyCodesByRegionCode"),
})
public Page<Map<String, Object>> noticeDetailList(Page<Map<String, Object>> page, DPFilterParamForDetailDto dpFilterParamDto) { public Page<Map<String, Object>> noticeDetailList(Page<Map<String, Object>> page, DPFilterParamForDetailDto dpFilterParamDto) {
String orgCode = stCommonService.getAndSetOrgCode(dpFilterParamDto.getCityCode()); String orgCode = stCommonService.getAndSetOrgCode(dpFilterParamDto.getCityCode());
if (orgCode == null) { if (orgCode == null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment