调整风险人员总览异常点与疑似违规数口径

This commit is contained in:
wkc
2026-03-19 17:37:20 +08:00
parent c33f411c8b
commit f858fbdcbc
12 changed files with 308 additions and 14 deletions

View File

@@ -20,10 +20,14 @@ public class CcdiProjectEmployeeRiskAggregateVO {
private Integer modelCount;
private Integer hitCount;
private String topRuleCode;
private String topRuleName;
private String riskPoint;
private String riskLevelCode;
private String riskLevelName;

View File

@@ -105,8 +105,8 @@ public class CcdiProjectOverviewServiceImpl implements ICcdiProjectOverviewServi
item.setName(aggregate.getStaffName());
item.setIdNo(aggregate.getStaffIdCard());
item.setDepartment(aggregate.getDeptName());
item.setRiskCount(defaultZero(aggregate.getRuleCount()));
item.setRiskPoint(aggregate.getTopRuleName());
item.setRiskCount(defaultZero(aggregate.getHitCount()));
item.setRiskPoint(aggregate.getRiskPoint());
item.setActionLabel(ACTION_LABEL);
return item;
}

View File

@@ -9,8 +9,10 @@
<result property="deptName" column="dept_name"/>
<result property="ruleCount" column="rule_count"/>
<result property="modelCount" column="model_count"/>
<result property="hitCount" column="hit_count"/>
<result property="topRuleCode" column="top_rule_code"/>
<result property="topRuleName" column="top_rule_name"/>
<result property="riskPoint" column="risk_point"/>
<result property="riskLevelCode" column="risk_level_code"/>
<result property="riskLevelName" column="risk_level_name"/>
<result property="riskLevelSort" column="risk_level_sort"/>
@@ -56,8 +58,10 @@
dept.dept_name,
agg.rule_count,
agg.model_count,
agg.hit_count,
rule_pick.rule_code as top_rule_code,
rule_pick.rule_name as top_rule_name,
risk_points.risk_point,
case
when agg.rule_count >= 5 then 'HIGH'
when agg.rule_count between 2 and 4 then 'MEDIUM'
@@ -79,7 +83,8 @@
max(base.staff_name) as staff_name,
max(base.dept_id) as dept_id,
count(distinct base.rule_code) as rule_count,
count(distinct base.model_code) as model_count
count(distinct base.model_code) as model_count,
count(1) as hit_count
from (
<include refid="resolvedEmployeeRiskBaseSql"/>
) base
@@ -130,6 +135,23 @@
)
) chosen
) rule_pick on rule_pick.staff_id_card = agg.staff_id_card
left join (
select
grouped.staff_id_card,
group_concat(grouped.rule_name order by grouped.hit_count desc, grouped.rule_code asc separator '、') as risk_point
from (
select
base.staff_id_card,
base.rule_code,
max(base.rule_name) as rule_name,
count(1) as hit_count
from (
<include refid="resolvedEmployeeRiskBaseSql"/>
) base
group by base.staff_id_card, base.rule_code
) grouped
group by grouped.staff_id_card
) risk_points on risk_points.staff_id_card = agg.staff_id_card
</sql>
<select id="selectDashboardBaseByProjectId" resultType="com.ruoyi.ccdi.project.domain.CcdiProject">