Commit 9bb9b634 authored by 鲁鸿波's avatar 鲁鸿波

危险作业监督检查统计修改

承包商bug修改
parent 1a206627
......@@ -272,7 +272,11 @@ public class TContractorSafetyBriefController extends SuperController
String orgId = loginUser.getOrgId();
//List<String> idsChildrenById = newSysOrgService.getIdsChildrenById(orgId);
List<String> idsChildrenById = new ArrayList<>();
idsChildrenById.addAll(Arrays.asList(contractorLedgerDao.orgIdDistinct(orgId).split(",")));
//idsChildrenById.addAll(Arrays.asList(contractorLedgerDao.orgIdDistinct(orgId).split(",")));
String orgIdDistinct = contractorLedgerDao.orgIdDistinct(orgId);
if (orgIdDistinct != null && !orgIdDistinct.trim().isEmpty()) {
idsChildrenById.addAll(Arrays.asList(orgIdDistinct.split(",")));
}
log.info("承包商人员台账列表--ids1------>ids值:{}",idsChildrenById);
idsChildrenById.addAll(newSysOrgService.getIdsChildrenById(orgId));
log.info("承包商人员台账列表--ids2------>ids值:{}",idsChildrenById);
......
......@@ -491,7 +491,7 @@
wc.basic_id,
wc.basic_unit,
COUNT(DISTINCT wp.id) AS total_count, -- 检查记录总数
COALESCE(SUM(CASE WHEN wc.is_compliant = '1' THEN 1 ELSE 0 END), 0) AS compliant_count
COALESCE(SUM(CASE WHEN wc.is_compliant = '0' THEN 1 ELSE 0 END), 0) AS compliant_count
FROM t_hazard_work_plan wp
LEFT JOIN t_hazard_work_plan_check wc
ON wp.id = wc.plan_id
......@@ -516,6 +516,7 @@
</if>
GROUP BY wc.basic_id, wc.basic_unit
) AS t
WHERE t.basic_id IS NOT NULL AND t.basic_unit IS NOT NULL
ORDER BY complianceRate DESC
</select>
......
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