|
|
|
@ -52,16 +52,16 @@
|
|
|
|
|
<select id="selectBPlanEnterPriseTreeRequestRequestList"
|
|
|
|
|
resultType="com.ruoyi.programManagement.entity.request.BPlanEnterPriseTreeResponse">
|
|
|
|
|
|
|
|
|
|
-- SELECT a.subdistrict AS subdistrict,a.county,c.id,a.institution_name as institutionName,
|
|
|
|
|
-- COUNT(b.subdistrict) AS enterpriseCount,
|
|
|
|
|
-- COUNT(DISTINCT k.ent_code) - COUNT(DISTINCT c.enterprise_id) AS remainingKeyEnterpriseCount,
|
|
|
|
|
-- COUNT(DISTINCT c.enterprise_id) AS plannedEnterpriseCount,
|
|
|
|
|
-- COUNT(DISTINCT CASE WHEN k.ent_code IS NOT NULL THEN c.enterprise_id END) AS planneKeyEnterpriseCount
|
|
|
|
|
-- FROM b_administrative a
|
|
|
|
|
-- LEFT JOIN sz_ent_basic_info b ON a.subdistrict = LPAD(b.subdistrict, LENGTH(a.subdistrict), '0')
|
|
|
|
|
-- LEFT JOIN b_key_enterprise k ON a.subdistrict = k.district
|
|
|
|
|
-- LEFT JOIN b_plan_enterprise c ON k.ent_code = c.enterprise_id
|
|
|
|
|
-- WHERE a.SUBDISTRICT LIKE '%13205%'
|
|
|
|
|
-- SELECT a.subdistrict AS subdistrict,a.county,c.id,a.institution_name as institutionName,
|
|
|
|
|
-- COUNT(b.subdistrict) AS enterpriseCount,
|
|
|
|
|
-- COUNT(DISTINCT k.ent_code) - COUNT(DISTINCT c.enterprise_id) AS remainingKeyEnterpriseCount,
|
|
|
|
|
-- COUNT(DISTINCT c.enterprise_id) AS plannedEnterpriseCount,
|
|
|
|
|
-- COUNT(DISTINCT CASE WHEN k.ent_code IS NOT NULL THEN c.enterprise_id END) AS planneKeyEnterpriseCount
|
|
|
|
|
-- FROM b_administrative a
|
|
|
|
|
-- LEFT JOIN sz_ent_basic_info b ON a.subdistrict = LPAD(b.subdistrict, LENGTH(a.subdistrict), '0')
|
|
|
|
|
-- LEFT JOIN b_key_enterprise k ON a.subdistrict = k.district
|
|
|
|
|
-- LEFT JOIN b_plan_enterprise c ON k.ent_code = c.enterprise_id
|
|
|
|
|
-- WHERE a.SUBDISTRICT LIKE '%13205%'
|
|
|
|
|
select s.institutionName ,s.plannedEnterpriseCount,s.checkEnterpriseCount,s.pt from (SELECT
|
|
|
|
|
a. institution_name AS institutionName,
|
|
|
|
|
COUNT(DISTINCT b.enterprise_id) AS plannedEnterpriseCount,
|
|
|
|
@ -73,7 +73,8 @@
|
|
|
|
|
LEFT JOIN sz_enfor_examine c ON b.enterprise_id = c.USC_CODE
|
|
|
|
|
<where>
|
|
|
|
|
<if test="req.plannedYear!=null and req.plannedYear!=''">
|
|
|
|
|
b.planned_year=#{req.plannedYear}
|
|
|
|
|
b.planned_year =#{req.plannedYear}
|
|
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
GROUP BY SUBSTRING(a.county, 1, 8) )s
|
|
|
|
|