chenshudong преди 1 месец
родител
ревизия
6f205bac70

+ 130 - 0
airport-personnel/src/main/java/com/sundot/airport/personnel/domain/PersonnelNonCadreMonthlyAssessment.java

@@ -44,6 +44,18 @@ public class PersonnelNonCadreMonthlyAssessment extends BaseEntity {
44
     @Excel(name = "用户名称")
44
     @Excel(name = "用户名称")
45
     private String userName;
45
     private String userName;
46
 
46
 
47
+    /** 角色ID */
48
+    @Excel(name = "角色ID")
49
+    private Long roleId;
50
+
51
+    /** 角色权限字符串 */
52
+    @Excel(name = "角色权限字符串")
53
+    private String roleKey;
54
+
55
+    /** 角色名称 */
56
+    @Excel(name = "角色名称")
57
+    private String roleName;
58
+
47
     /** 用工形式 */
59
     /** 用工形式 */
48
     @Excel(name = "用工形式")
60
     @Excel(name = "用工形式")
49
     private String employmentType;
61
     private String employmentType;
@@ -160,6 +172,34 @@ public class PersonnelNonCadreMonthlyAssessment extends BaseEntity {
160
     @TableField(exist = false)
172
     @TableField(exist = false)
161
     private List<PersonnelMonthlyAssessmentIndicatorDetail> personnelMonthlyAssessmentIndicatorDetailList;
173
     private List<PersonnelMonthlyAssessmentIndicatorDetail> personnelMonthlyAssessmentIndicatorDetailList;
162
 
174
 
175
+    /** 红线指标依据 */
176
+    @TableField(exist = false)
177
+    private List<PersonnelMonthlyAssessmentIndicatorDetail> redLineIndexAccordList;
178
+
179
+    /** 核心指标依据 */
180
+    @TableField(exist = false)
181
+    private List<PersonnelMonthlyAssessmentIndicatorDetail> coreIndexAccordList;
182
+
183
+    /** 其他指标依据  */
184
+    @TableField(exist = false)
185
+    private List<PersonnelMonthlyAssessmentIndicatorDetail> otherIndexAccordList;
186
+
187
+    /** 其他指标中的安全指标(仅含SOC/站品控检查扣分)依据 */
188
+    @TableField(exist = false)
189
+    private List<PersonnelMonthlyAssessmentIndicatorDetail> otherIndexSafetyScoreWithSocStationQcAccordList;
190
+
191
+    /** 其他指标中的安全指标(不含SOC/站品控检查扣分)依据 */
192
+    @TableField(exist = false)
193
+    private List<PersonnelMonthlyAssessmentIndicatorDetail> otherIndexSafetyScoreWithoutSocStationQcAccordList;
194
+
195
+    /** 其他指标中的非安全指标扣分依据 */
196
+    @TableField(exist = false)
197
+    private List<PersonnelMonthlyAssessmentIndicatorDetail> otherIndexNonSafetyAccordList;
198
+
199
+    /** SOC/站品控检查的涉及核心、安全指标扣分依据 */
200
+    @TableField(exist = false)
201
+    private List<PersonnelMonthlyAssessmentIndicatorDetail> socStationQcInvolvedCoreSafetyAccordList;
202
+
163
     public void setTenantId(String tenantId) {
203
     public void setTenantId(String tenantId) {
164
         this.tenantId = tenantId;
204
         this.tenantId = tenantId;
165
     }
205
     }
@@ -208,6 +248,30 @@ public class PersonnelNonCadreMonthlyAssessment extends BaseEntity {
208
         return userName;
248
         return userName;
209
     }
249
     }
210
 
250
 
251
+    public Long getRoleId() {
252
+        return roleId;
253
+    }
254
+
255
+    public void setRoleId(Long roleId) {
256
+        this.roleId = roleId;
257
+    }
258
+
259
+    public String getRoleKey() {
260
+        return roleKey;
261
+    }
262
+
263
+    public void setRoleKey(String roleKey) {
264
+        this.roleKey = roleKey;
265
+    }
266
+
267
+    public String getRoleName() {
268
+        return roleName;
269
+    }
270
+
271
+    public void setRoleName(String roleName) {
272
+        this.roleName = roleName;
273
+    }
274
+
211
     public void setEmploymentType(String employmentType) {
275
     public void setEmploymentType(String employmentType) {
212
         this.employmentType = employmentType;
276
         this.employmentType = employmentType;
213
     }
277
     }
@@ -440,6 +504,62 @@ public class PersonnelNonCadreMonthlyAssessment extends BaseEntity {
440
         this.personnelMonthlyAssessmentIndicatorDetailList = personnelMonthlyAssessmentIndicatorDetailList;
504
         this.personnelMonthlyAssessmentIndicatorDetailList = personnelMonthlyAssessmentIndicatorDetailList;
441
     }
505
     }
442
 
506
 
507
+    public List<PersonnelMonthlyAssessmentIndicatorDetail> getRedLineIndexAccordList() {
508
+        return redLineIndexAccordList;
509
+    }
510
+
511
+    public void setRedLineIndexAccordList(List<PersonnelMonthlyAssessmentIndicatorDetail> redLineIndexAccordList) {
512
+        this.redLineIndexAccordList = redLineIndexAccordList;
513
+    }
514
+
515
+    public List<PersonnelMonthlyAssessmentIndicatorDetail> getCoreIndexAccordList() {
516
+        return coreIndexAccordList;
517
+    }
518
+
519
+    public void setCoreIndexAccordList(List<PersonnelMonthlyAssessmentIndicatorDetail> coreIndexAccordList) {
520
+        this.coreIndexAccordList = coreIndexAccordList;
521
+    }
522
+
523
+    public List<PersonnelMonthlyAssessmentIndicatorDetail> getOtherIndexAccordList() {
524
+        return otherIndexAccordList;
525
+    }
526
+
527
+    public void setOtherIndexAccordList(List<PersonnelMonthlyAssessmentIndicatorDetail> otherIndexAccordList) {
528
+        this.otherIndexAccordList = otherIndexAccordList;
529
+    }
530
+
531
+    public List<PersonnelMonthlyAssessmentIndicatorDetail> getOtherIndexSafetyScoreWithSocStationQcAccordList() {
532
+        return otherIndexSafetyScoreWithSocStationQcAccordList;
533
+    }
534
+
535
+    public void setOtherIndexSafetyScoreWithSocStationQcAccordList(List<PersonnelMonthlyAssessmentIndicatorDetail> otherIndexSafetyScoreWithSocStationQcAccordList) {
536
+        this.otherIndexSafetyScoreWithSocStationQcAccordList = otherIndexSafetyScoreWithSocStationQcAccordList;
537
+    }
538
+
539
+    public List<PersonnelMonthlyAssessmentIndicatorDetail> getOtherIndexSafetyScoreWithoutSocStationQcAccordList() {
540
+        return otherIndexSafetyScoreWithoutSocStationQcAccordList;
541
+    }
542
+
543
+    public void setOtherIndexSafetyScoreWithoutSocStationQcAccordList(List<PersonnelMonthlyAssessmentIndicatorDetail> otherIndexSafetyScoreWithoutSocStationQcAccordList) {
544
+        this.otherIndexSafetyScoreWithoutSocStationQcAccordList = otherIndexSafetyScoreWithoutSocStationQcAccordList;
545
+    }
546
+
547
+    public List<PersonnelMonthlyAssessmentIndicatorDetail> getOtherIndexNonSafetyAccordList() {
548
+        return otherIndexNonSafetyAccordList;
549
+    }
550
+
551
+    public void setOtherIndexNonSafetyAccordList(List<PersonnelMonthlyAssessmentIndicatorDetail> otherIndexNonSafetyAccordList) {
552
+        this.otherIndexNonSafetyAccordList = otherIndexNonSafetyAccordList;
553
+    }
554
+
555
+    public List<PersonnelMonthlyAssessmentIndicatorDetail> getSocStationQcInvolvedCoreSafetyAccordList() {
556
+        return socStationQcInvolvedCoreSafetyAccordList;
557
+    }
558
+
559
+    public void setSocStationQcInvolvedCoreSafetyAccordList(List<PersonnelMonthlyAssessmentIndicatorDetail> socStationQcInvolvedCoreSafetyAccordList) {
560
+        this.socStationQcInvolvedCoreSafetyAccordList = socStationQcInvolvedCoreSafetyAccordList;
561
+    }
562
+
443
     @Override
563
     @Override
444
     public String toString() {
564
     public String toString() {
445
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
565
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
@@ -454,6 +574,9 @@ public class PersonnelNonCadreMonthlyAssessment extends BaseEntity {
454
                 .append("assessmentMonth", getAssessmentMonth())
574
                 .append("assessmentMonth", getAssessmentMonth())
455
                 .append("userId", getUserId())
575
                 .append("userId", getUserId())
456
                 .append("userName", getUserName())
576
                 .append("userName", getUserName())
577
+                .append("roleId", getRoleId())
578
+                .append("roleKey", getRoleKey())
579
+                .append("roleName", getRoleName())
457
                 .append("employmentType", getEmploymentType())
580
                 .append("employmentType", getEmploymentType())
458
                 .append("assessmentTeam", getAssessmentTeam())
581
                 .append("assessmentTeam", getAssessmentTeam())
459
                 .append("post", getPost())
582
                 .append("post", getPost())
@@ -483,6 +606,13 @@ public class PersonnelNonCadreMonthlyAssessment extends BaseEntity {
483
                 .append("exemption", getExemption())
606
                 .append("exemption", getExemption())
484
                 .append("exemptionReasonRemark", getExemptionReasonRemark())
607
                 .append("exemptionReasonRemark", getExemptionReasonRemark())
485
                 .append("personnelMonthlyAssessmentIndicatorDetailList", getPersonnelMonthlyAssessmentIndicatorDetailList())
608
                 .append("personnelMonthlyAssessmentIndicatorDetailList", getPersonnelMonthlyAssessmentIndicatorDetailList())
609
+                .append("redLineIndexAccordList", getRedLineIndexAccordList())
610
+                .append("coreIndexAccordList", getCoreIndexAccordList())
611
+                .append("otherIndexAccordList", getOtherIndexAccordList())
612
+                .append("otherIndexSafetyScoreWithSocStationQcAccordList", getOtherIndexSafetyScoreWithSocStationQcAccordList())
613
+                .append("otherIndexSafetyScoreWithoutSocStationQcAccordList", getOtherIndexSafetyScoreWithoutSocStationQcAccordList())
614
+                .append("otherIndexNonSafetyAccordList", getOtherIndexNonSafetyAccordList())
615
+                .append("socStationQcInvolvedCoreSafetyAccordList", getSocStationQcInvolvedCoreSafetyAccordList())
486
                 .toString();
616
                 .toString();
487
     }
617
     }
488
 }
618
 }

+ 82 - 0
airport-personnel/src/main/java/com/sundot/airport/personnel/service/impl/PersonnelNonCadreMonthlyAssessmentServiceImpl.java

@@ -1,18 +1,26 @@
1
 package com.sundot.airport.personnel.service.impl;
1
 package com.sundot.airport.personnel.service.impl;
2
 
2
 
3
+import java.math.BigDecimal;
4
+import java.util.ArrayList;
3
 import java.util.List;
5
 import java.util.List;
4
 import java.util.Map;
6
 import java.util.Map;
7
+import java.util.Optional;
5
 import java.util.stream.Collectors;
8
 import java.util.stream.Collectors;
6
 
9
 
7
 import cn.hutool.core.collection.CollUtil;
10
 import cn.hutool.core.collection.CollUtil;
8
 import cn.hutool.core.util.ObjUtil;
11
 import cn.hutool.core.util.ObjUtil;
12
+import cn.hutool.core.util.StrUtil;
9
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
13
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
10
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
14
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
15
+import com.sundot.airport.common.enums.BasePerformanceIndicatorQcDeptTypeEnum;
16
+import com.sundot.airport.common.enums.BasePerformanceIndicatorRewardPunishmentTypeTypeEnum;
11
 import com.sundot.airport.common.utils.DateUtils;
17
 import com.sundot.airport.common.utils.DateUtils;
12
 import com.sundot.airport.personnel.domain.PersonnelMonthlyAssessmentIndicatorDetail;
18
 import com.sundot.airport.personnel.domain.PersonnelMonthlyAssessmentIndicatorDetail;
13
 import com.sundot.airport.personnel.domain.PersonnelMonthlyAssessmentIndicatorRewardPunishmentDetail;
19
 import com.sundot.airport.personnel.domain.PersonnelMonthlyAssessmentIndicatorRewardPunishmentDetail;
14
 import com.sundot.airport.personnel.service.IPersonnelMonthlyAssessmentIndicatorDetailService;
20
 import com.sundot.airport.personnel.service.IPersonnelMonthlyAssessmentIndicatorDetailService;
15
 import com.sundot.airport.personnel.service.IPersonnelMonthlyAssessmentIndicatorRewardPunishmentDetailService;
21
 import com.sundot.airport.personnel.service.IPersonnelMonthlyAssessmentIndicatorRewardPunishmentDetailService;
22
+import com.sundot.airport.system.domain.BasePerformanceIndicatorCategory;
23
+import com.sundot.airport.system.service.IBasePerformanceIndicatorCategoryService;
16
 import org.springframework.beans.factory.annotation.Autowired;
24
 import org.springframework.beans.factory.annotation.Autowired;
17
 import org.springframework.stereotype.Service;
25
 import org.springframework.stereotype.Service;
18
 import com.sundot.airport.personnel.mapper.PersonnelNonCadreMonthlyAssessmentMapper;
26
 import com.sundot.airport.personnel.mapper.PersonnelNonCadreMonthlyAssessmentMapper;
@@ -34,6 +42,8 @@ public class PersonnelNonCadreMonthlyAssessmentServiceImpl extends ServiceImpl<P
34
     private IPersonnelMonthlyAssessmentIndicatorDetailService personnelMonthlyAssessmentIndicatorDetailService;
42
     private IPersonnelMonthlyAssessmentIndicatorDetailService personnelMonthlyAssessmentIndicatorDetailService;
35
     @Autowired
43
     @Autowired
36
     private IPersonnelMonthlyAssessmentIndicatorRewardPunishmentDetailService personnelMonthlyAssessmentIndicatorRewardPunishmentDetailService;
44
     private IPersonnelMonthlyAssessmentIndicatorRewardPunishmentDetailService personnelMonthlyAssessmentIndicatorRewardPunishmentDetailService;
45
+    @Autowired
46
+    private IBasePerformanceIndicatorCategoryService basePerformanceIndicatorCategoryService;
37
 
47
 
38
     /**
48
     /**
39
      * 查询非干部月度考核
49
      * 查询非干部月度考核
@@ -66,6 +76,78 @@ public class PersonnelNonCadreMonthlyAssessmentServiceImpl extends ServiceImpl<P
66
         personnelMonthlyAssessmentIndicatorDetailList.forEach(item -> {
76
         personnelMonthlyAssessmentIndicatorDetailList.forEach(item -> {
67
             item.setPersonnelMonthlyAssessmentIndicatorRewardPunishmentDetailList(rewardPunishmentDetailMap.get(item.getId()));
77
             item.setPersonnelMonthlyAssessmentIndicatorRewardPunishmentDetailList(rewardPunishmentDetailMap.get(item.getId()));
68
         });
78
         });
79
+
80
+        List<BasePerformanceIndicatorCategory> indicatorCategoryyList = basePerformanceIndicatorCategoryService.selectBasePerformanceIndicatorCategoryListTree(new BasePerformanceIndicatorCategory());
81
+        // 红线指标
82
+        BasePerformanceIndicatorCategory redLineIndexCategory = indicatorCategoryyList.stream().filter(item -> StrUtil.equals("红线指标", item.getName())).findFirst().orElse(null);
83
+        List<BasePerformanceIndicatorCategory> redLineIndexCategoryChildren = (List<BasePerformanceIndicatorCategory>) redLineIndexCategory.getChildren();
84
+        List<String> redLineIndexCategoryCodeList = redLineIndexCategoryChildren.stream().map(BasePerformanceIndicatorCategory::getCode).collect(Collectors.toList());
85
+        List<PersonnelMonthlyAssessmentIndicatorDetail> redLineIndexAccordList = result.getPersonnelMonthlyAssessmentIndicatorDetailList().stream().filter(item -> redLineIndexCategoryCodeList.contains(item.getIndicatorCode())).collect(Collectors.toList());
86
+        Integer redLineIndexTriggerCount = redLineIndexAccordList.stream().map(PersonnelMonthlyAssessmentIndicatorDetail::getOccurCount).filter(ObjUtil::isNotNull).reduce(0, Integer::sum);
87
+        result.setRedLineIndexTriggerCount(redLineIndexTriggerCount);
88
+        result.setRedLineIndexAccordList(redLineIndexAccordList);
89
+        // 核心指标
90
+        BasePerformanceIndicatorCategory coreIndexCategory = indicatorCategoryyList.stream().filter(item -> StrUtil.equals("核心指标", item.getName())).findFirst().orElse(null);
91
+        List<BasePerformanceIndicatorCategory> coreIndexCategoryChildren = (List<BasePerformanceIndicatorCategory>) coreIndexCategory.getChildren();
92
+        List<String> coreIndexCategoryCodeList = coreIndexCategoryChildren.stream().map(BasePerformanceIndicatorCategory::getCode).collect(Collectors.toList());
93
+        List<PersonnelMonthlyAssessmentIndicatorDetail> coreIndexAccordList = result.getPersonnelMonthlyAssessmentIndicatorDetailList().stream().filter(item -> coreIndexCategoryCodeList.contains(item.getIndicatorCode())).collect(Collectors.toList());
94
+        BigDecimal coreIndexScore = coreIndexAccordList.stream().map(PersonnelMonthlyAssessmentIndicatorDetail::getScoreResult).filter(ObjUtil::isNotNull).reduce(BigDecimal.ZERO, BigDecimal::add);
95
+        result.setCoreIndexScore(coreIndexScore);
96
+        result.setCoreIndexAccordList(coreIndexAccordList);
97
+        // 其他指标
98
+        BasePerformanceIndicatorCategory otherIndexCategory = indicatorCategoryyList.stream().filter(item -> StrUtil.equals("其他指标", item.getName())).findFirst().orElse(null);
99
+        List<BasePerformanceIndicatorCategory> otherIndexCategoryChildren = (List<BasePerformanceIndicatorCategory>) otherIndexCategory.getChildren();
100
+        List<String> otherIndexCategoryCodeList = otherIndexCategoryChildren.stream().map(BasePerformanceIndicatorCategory::getCode).collect(Collectors.toList());
101
+        List<PersonnelMonthlyAssessmentIndicatorDetail> otherIndexAccordList = result.getPersonnelMonthlyAssessmentIndicatorDetailList().stream().filter(item -> otherIndexCategoryCodeList.contains(item.getIndicatorCode())).collect(Collectors.toList());
102
+        BigDecimal otherIndexScore = otherIndexAccordList.stream().map(PersonnelMonthlyAssessmentIndicatorDetail::getScoreResult).filter(ObjUtil::isNotNull).reduce(BigDecimal.ZERO, BigDecimal::add);
103
+        result.setOtherIndexScore(otherIndexScore);
104
+        result.setOtherIndexAccordList(otherIndexAccordList);
105
+        // 其他指标-安全
106
+        List<BasePerformanceIndicatorCategory> otherIndexSafetyCategory = otherIndexCategoryChildren.stream().filter(item -> StrUtil.equals("安全", item.getName())).collect(Collectors.toList());
107
+        List<String> otherIndexSafetyCategoryCodeList = otherIndexSafetyCategory.stream().map(BasePerformanceIndicatorCategory::getCode).collect(Collectors.toList());
108
+        // 其他指标-安全-仅含SOC/站品控检查扣分
109
+        List<PersonnelMonthlyAssessmentIndicatorDetail> otherIndexWithSocStationQcAccordList = result.getPersonnelMonthlyAssessmentIndicatorDetailList().stream()
110
+                .filter(item -> otherIndexSafetyCategoryCodeList.contains(item.getIndicatorCode()))
111
+                .filter(item -> StrUtil.equals(BasePerformanceIndicatorQcDeptTypeEnum.SOC.getCode(), item.getIndicatorCode()) || StrUtil.equals(BasePerformanceIndicatorQcDeptTypeEnum.STATION_QC.getCode(), item.getIndicatorCode()))
112
+                .filter(item -> StrUtil.equals(BasePerformanceIndicatorRewardPunishmentTypeTypeEnum.PUNISHMENT.getCode(), item.getRewardPunishmentType()))
113
+                .collect(Collectors.toList());
114
+        BigDecimal otherIndexSafetyScoreWithSocStationQcDeduction = otherIndexWithSocStationQcAccordList.stream().map(PersonnelMonthlyAssessmentIndicatorDetail::getScoreResult).filter(ObjUtil::isNotNull).reduce(BigDecimal.ZERO, BigDecimal::add);
115
+        result.setOtherIndexSafetyScoreWithSocStationQcDeduction(otherIndexSafetyScoreWithSocStationQcDeduction);
116
+        result.setOtherIndexSafetyScoreWithSocStationQcAccordList(otherIndexWithSocStationQcAccordList);
117
+        // 其他指标-安全-不仅含SOC/站品控检查扣分
118
+        List<PersonnelMonthlyAssessmentIndicatorDetail> otherIndexWithoutSocStationQcAccordList = result.getPersonnelMonthlyAssessmentIndicatorDetailList().stream()
119
+                .filter(item -> otherIndexSafetyCategoryCodeList.contains(item.getIndicatorCode()))
120
+                .filter(item -> !(StrUtil.equals(BasePerformanceIndicatorQcDeptTypeEnum.SOC.getCode(), item.getIndicatorCode()) || StrUtil.equals(BasePerformanceIndicatorQcDeptTypeEnum.STATION_QC.getCode(), item.getIndicatorCode())))
121
+                .filter(item -> StrUtil.equals(BasePerformanceIndicatorRewardPunishmentTypeTypeEnum.PUNISHMENT.getCode(), item.getRewardPunishmentType()))
122
+                .collect(Collectors.toList());
123
+        BigDecimal otherIndexSafetyScoreWithoutSocStationQcDeduction = otherIndexWithoutSocStationQcAccordList.stream().map(PersonnelMonthlyAssessmentIndicatorDetail::getScoreResult).filter(ObjUtil::isNotNull).reduce(BigDecimal.ZERO, BigDecimal::add);
124
+        result.setOtherIndexSafetyScoreWithoutSocStationQcDeduction(otherIndexSafetyScoreWithoutSocStationQcDeduction);
125
+        result.setOtherIndexSafetyScoreWithoutSocStationQcAccordList(otherIndexWithoutSocStationQcAccordList);
126
+        // 其他指标-非安全
127
+        List<BasePerformanceIndicatorCategory> otherIndexNonSafetyCategory = otherIndexCategoryChildren.stream().filter(item -> !StrUtil.equals("安全", item.getName())).collect(Collectors.toList());
128
+        List<String> otherIndexNonSafetyCategoryCodeList = otherIndexNonSafetyCategory.stream().map(BasePerformanceIndicatorCategory::getCode).collect(Collectors.toList());
129
+        List<PersonnelMonthlyAssessmentIndicatorDetail> otherIndexNonSafetyAccordList = result.getPersonnelMonthlyAssessmentIndicatorDetailList().stream()
130
+                .filter(item -> otherIndexNonSafetyCategoryCodeList.contains(item.getIndicatorCode()))
131
+                .filter(item -> StrUtil.equals(BasePerformanceIndicatorRewardPunishmentTypeTypeEnum.PUNISHMENT.getCode(), item.getRewardPunishmentType()))
132
+                .collect(Collectors.toList());
133
+        BigDecimal otherIndexNonSafetyDeduction = otherIndexNonSafetyAccordList.stream().map(PersonnelMonthlyAssessmentIndicatorDetail::getScoreResult).filter(ObjUtil::isNotNull).reduce(BigDecimal.ZERO, BigDecimal::add);
134
+        result.setOtherIndexNonSafetyDeduction(otherIndexNonSafetyDeduction);
135
+        result.setOtherIndexNonSafetyAccordList(otherIndexNonSafetyAccordList);
136
+        // 非核心安全+核心扣分
137
+        BigDecimal nonCoreSafetyPlusCoreDeduction = result.getOtherIndexSafetyScoreWithSocStationQcDeduction().add(result.getOtherIndexSafetyScoreWithoutSocStationQcDeduction()).add(result.getOtherIndexNonSafetyDeduction());
138
+        result.setNonCoreSafetyPlusCoreDeduction(nonCoreSafetyPlusCoreDeduction);
139
+        // 核心指标+其他指标-安全
140
+        List<String> socStationQcInvolvedCoreSafetyCodeList = new ArrayList<>();
141
+        socStationQcInvolvedCoreSafetyCodeList.addAll(coreIndexCategoryCodeList);
142
+        socStationQcInvolvedCoreSafetyCodeList.addAll(otherIndexSafetyCategoryCodeList);
143
+        List<PersonnelMonthlyAssessmentIndicatorDetail> socStationQcInvolvedCoreSafetyAccordList = result.getPersonnelMonthlyAssessmentIndicatorDetailList().stream()
144
+                .filter(item -> socStationQcInvolvedCoreSafetyCodeList.contains(item.getIndicatorCode()))
145
+                .filter(item -> !(StrUtil.equals(BasePerformanceIndicatorQcDeptTypeEnum.SOC.getCode(), item.getIndicatorCode()) || StrUtil.equals(BasePerformanceIndicatorQcDeptTypeEnum.STATION_QC.getCode(), item.getIndicatorCode())))
146
+                .filter(item -> StrUtil.equals(BasePerformanceIndicatorRewardPunishmentTypeTypeEnum.PUNISHMENT.getCode(), item.getRewardPunishmentType()))
147
+                .collect(Collectors.toList());
148
+        BigDecimal socStationQcInvolvedCoreSafetyDeduction = socStationQcInvolvedCoreSafetyAccordList.stream().map(PersonnelMonthlyAssessmentIndicatorDetail::getScoreResult).filter(ObjUtil::isNotNull).reduce(BigDecimal.ZERO, BigDecimal::add);
149
+        result.setSocStationQcInvolvedCoreSafetyDeduction(socStationQcInvolvedCoreSafetyDeduction);
150
+        result.setSocStationQcInvolvedCoreSafetyAccordList(socStationQcInvolvedCoreSafetyAccordList);
69
         return result;
151
         return result;
70
     }
152
     }
71
 
153
 

+ 18 - 0
airport-personnel/src/main/resources/mapper/personnel/PersonnelNonCadreMonthlyAssessmentMapper.xml

@@ -16,6 +16,9 @@
16
         <result property="assessmentMonth" column="assessment_month"/>
16
         <result property="assessmentMonth" column="assessment_month"/>
17
         <result property="userId" column="user_id"/>
17
         <result property="userId" column="user_id"/>
18
         <result property="userName" column="user_name"/>
18
         <result property="userName" column="user_name"/>
19
+        <result property="roleId" column="role_id"/>
20
+        <result property="roleKey" column="role_key"/>
21
+        <result property="roleName" column="role_name"/>
19
         <result property="employmentType" column="employment_type"/>
22
         <result property="employmentType" column="employment_type"/>
20
         <result property="assessmentTeam" column="assessment_team"/>
23
         <result property="assessmentTeam" column="assessment_team"/>
21
         <result property="post" column="post"/>
24
         <result property="post" column="post"/>
@@ -61,6 +64,9 @@
61
                assessment_month,
64
                assessment_month,
62
                user_id,
65
                user_id,
63
                user_name,
66
                user_name,
67
+               role_id,
68
+               role_key,
69
+               role_name,
64
                employment_type,
70
                employment_type,
65
                assessment_team,
71
                assessment_team,
66
                post,
72
                post,
@@ -101,6 +107,9 @@
101
             <if test="assessmentMonth != null  and assessmentMonth != ''">and assessment_month = #{assessmentMonth}</if>
107
             <if test="assessmentMonth != null  and assessmentMonth != ''">and assessment_month = #{assessmentMonth}</if>
102
             <if test="userId != null ">and user_id = #{userId}</if>
108
             <if test="userId != null ">and user_id = #{userId}</if>
103
             <if test="userName != null  and userName != ''">and user_name like concat('%', #{userName}, '%')</if>
109
             <if test="userName != null  and userName != ''">and user_name like concat('%', #{userName}, '%')</if>
110
+            <if test="roleId != null ">and role_id = #{roleId}</if>
111
+            <if test="roleKey != null  and roleKey != ''">and role_key = #{roleKey}</if>
112
+            <if test="roleName != null  and roleName != ''">and role_name like concat('%', #{roleName}, '%')</if>
104
             <if test="employmentType != null  and employmentType != ''">and employment_type = #{employmentType}</if>
113
             <if test="employmentType != null  and employmentType != ''">and employment_type = #{employmentType}</if>
105
             <if test="assessmentTeam != null  and assessmentTeam != ''">and assessment_team = #{assessmentTeam}</if>
114
             <if test="assessmentTeam != null  and assessmentTeam != ''">and assessment_team = #{assessmentTeam}</if>
106
             <if test="post != null  and post != ''">and post = #{post}</if>
115
             <if test="post != null  and post != ''">and post = #{post}</if>
@@ -182,6 +191,9 @@
182
             <if test="assessmentMonth != null and assessmentMonth != ''">assessment_month,</if>
191
             <if test="assessmentMonth != null and assessmentMonth != ''">assessment_month,</if>
183
             <if test="userId != null">user_id,</if>
192
             <if test="userId != null">user_id,</if>
184
             <if test="userName != null and userName != ''">user_name,</if>
193
             <if test="userName != null and userName != ''">user_name,</if>
194
+            <if test="roleId != null">role_id,</if>
195
+            <if test="roleKey != null and roleKey != ''">role_key,</if>
196
+            <if test="roleName != null and roleName != ''">role_name,</if>
185
             <if test="employmentType != null">employment_type,</if>
197
             <if test="employmentType != null">employment_type,</if>
186
             <if test="assessmentTeam != null">assessment_team,</if>
198
             <if test="assessmentTeam != null">assessment_team,</if>
187
             <if test="post != null">post,</if>
199
             <if test="post != null">post,</if>
@@ -227,6 +239,9 @@
227
             <if test="assessmentMonth != null and assessmentMonth != ''">#{assessmentMonth},</if>
239
             <if test="assessmentMonth != null and assessmentMonth != ''">#{assessmentMonth},</if>
228
             <if test="userId != null">#{userId},</if>
240
             <if test="userId != null">#{userId},</if>
229
             <if test="userName != null and userName != ''">#{userName},</if>
241
             <if test="userName != null and userName != ''">#{userName},</if>
242
+            <if test="roleId != null">#{roleId},</if>
243
+            <if test="roleKey != null and roleKey != ''">#{roleKey},</if>
244
+            <if test="roleName != null and roleName != ''">#{roleName},</if>
230
             <if test="employmentType != null">#{employmentType},</if>
245
             <if test="employmentType != null">#{employmentType},</if>
231
             <if test="assessmentTeam != null">#{assessmentTeam},</if>
246
             <if test="assessmentTeam != null">#{assessmentTeam},</if>
232
             <if test="post != null">#{post},</if>
247
             <if test="post != null">#{post},</if>
@@ -275,6 +290,9 @@
275
             <if test="assessmentMonth != null and assessmentMonth != ''">assessment_month = #{assessmentMonth},</if>
290
             <if test="assessmentMonth != null and assessmentMonth != ''">assessment_month = #{assessmentMonth},</if>
276
             <if test="userId != null">user_id = #{userId},</if>
291
             <if test="userId != null">user_id = #{userId},</if>
277
             <if test="userName != null and userName != ''">user_name = #{userName},</if>
292
             <if test="userName != null and userName != ''">user_name = #{userName},</if>
293
+            <if test="roleId != null">role_id = #{roleId},</if>
294
+            <if test="roleKey != null and roleKey != ''">role_key = #{roleKey},</if>
295
+            <if test="roleName != null and roleName != ''">role_name = #{roleName},</if>
278
             <if test="employmentType != null">employment_type = #{employmentType},</if>
296
             <if test="employmentType != null">employment_type = #{employmentType},</if>
279
             <if test="assessmentTeam != null">assessment_team = #{assessmentTeam},</if>
297
             <if test="assessmentTeam != null">assessment_team = #{assessmentTeam},</if>
280
             <if test="post != null">post = #{post},</if>
298
             <if test="post != null">post = #{post},</if>