|
@@ -0,0 +1,105 @@
|
|
|
+package com.rongwei.bscommon.sys.strategy.scoreCalculation;
|
|
|
+
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.rongwei.bscommon.sys.service.JtFjglxmService;
|
|
|
+import com.rongwei.bscommon.sys.service.JtNdjhqdService;
|
|
|
+import com.rongwei.bscommon.sys.service.JtXysjyqService;
|
|
|
+import com.rongwei.bsentity.domain.*;
|
|
|
+import com.rongwei.rwadmincommon.system.vo.SysUserVo;
|
|
|
+import com.rongwei.rwcommon.base.BaseDo;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+import java.math.BigDecimal;
|
|
|
+import java.util.LinkedList;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+import static com.rongwei.bscommon.sys.utils.JXKHConstant.DefaultSource.THREE_SOURCE;
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * ScoreCalculationServiceNum1 class
|
|
|
+ *
|
|
|
+ * @author XH
|
|
|
+ * @date 2024/12/09
|
|
|
+ */
|
|
|
+@Service
|
|
|
+public class ScoreCalculationServiceNum21 implements ScoreCalculationService {
|
|
|
+ @Autowired
|
|
|
+ private JtXysjyqService jtXysjyqService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 按实施方案要求组织开展了技术方案标准化实施行动得1分;开展了国际标准制修订能力提升行动方案得1分。
|
|
|
+ * 未按文件要求组织申报标准立项申报或结题总结、优秀技术成果和集团工法申报,每项扣0.5分,包括迟报漏报等
|
|
|
+ * 集团组织开展的优秀总工程师培训班、优秀工程部长培训班等培训汇总获优秀个人的得0.5分/人,最高得1分。
|
|
|
+ *
|
|
|
+ * @param khbmList
|
|
|
+ * @param jtKhxmList
|
|
|
+ * @param jtGsjtbsj
|
|
|
+ * @param jkAssessmentRules
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public JtYcpfhzDetail soreCalculation(JtYcpfhz jtYcpfhz, List<JtXmkh> khbmList, List<JtKhxm> jtKhxmList, JtGsjtbsj jtGsjtbsj,
|
|
|
+ JkAssessmentRules jkAssessmentRules,
|
|
|
+ SysUserVo currentUser) {
|
|
|
+ // 考核得分
|
|
|
+ BigDecimal finalScore = BigDecimal.ZERO;
|
|
|
+ // 扣分细则
|
|
|
+ String errorMsg = "";
|
|
|
+
|
|
|
+ List<JtXysjyq> list = jtXysjyqService.list(new LambdaQueryWrapper<JtXysjyq>()
|
|
|
+ .eq(JtXysjyq::getDeleted, "0")
|
|
|
+ .eq(JtXysjyq::getMainid, jtGsjtbsj.getId()));
|
|
|
+ //按实施方案要求组织开展了技术方案标准化实施行动得1分
|
|
|
+ long jsfabzhssxd = list.stream().filter(item -> ObjectUtil.isNotEmpty(item.getJsfabzhsscl())).count();
|
|
|
+ if (jsfabzhssxd > 0) {
|
|
|
+ finalScore = finalScore.add(BigDecimal.ONE);
|
|
|
+ errorMsg = "公司级:按实施方案要求组织开展了技术方案标准化实施行动";
|
|
|
+ }
|
|
|
+ //开展了国际标准制修订能力提升行动方案得1分。
|
|
|
+ long gjbzxdnltsxdfa = list.stream().filter(item -> ObjectUtil.isNotEmpty(item.getGjbzxdnltsxdfa())).count();
|
|
|
+ if (gjbzxdnltsxdfa > 0) {
|
|
|
+ finalScore = finalScore.add(BigDecimal.ONE);
|
|
|
+ errorMsg = "公司级:开展了国际标准制修订能力提升行动方案";
|
|
|
+ }
|
|
|
+ //未按文件要求组织申报标准立项申报或结题总结、优秀技术成果和集团工法申报,每项扣0.5分,包括迟报漏报等
|
|
|
+ for (JtXysjyq jtXysjyq : list) {
|
|
|
+ if (ObjectUtil.isEmpty(jtXysjyq.getLxsbhjtzjcl())) {
|
|
|
+ finalScore = finalScore.subtract(new BigDecimal("0.5"));
|
|
|
+ errorMsg = "公司级:未按文件要求组织申报标准立项申报或结题总结";
|
|
|
+ }
|
|
|
+ if (ObjectUtil.isEmpty(jtXysjyq.getYxjscgsbcl())) {
|
|
|
+ finalScore = finalScore.subtract(new BigDecimal("0.5"));
|
|
|
+ errorMsg = "公司级:未按文件要求组织申报优秀技术成果";
|
|
|
+ }
|
|
|
+ if (ObjectUtil.isEmpty(jtXysjyq.getJtgfsbcl())) {
|
|
|
+ finalScore = finalScore.subtract(new BigDecimal("0.5"));
|
|
|
+ errorMsg = "公司级:未按文件要求组织申报集团工法";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //集团组织开展的优秀总工程师培训班、优秀工程部长培训班等培训汇总获优秀个人的得0.5分/人,最高得1分。
|
|
|
+ int total = 0;
|
|
|
+ for (JtXysjyq jtXysjyq : list) {
|
|
|
+ if (ObjectUtil.isNotEmpty(jtXysjyq.getYxzgcspxbyxgcbzpxbdpxhzhyxgrsl())) {
|
|
|
+ total += jtXysjyq.getYxzgcspxbyxgcbzpxbdpxhzhyxgrsl();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (total >= 2) {
|
|
|
+ finalScore = finalScore.add(new BigDecimal("1"));
|
|
|
+ errorMsg = "公司级:集团组织开展的优秀总工程师培训班、优秀工程部长培训班等培训汇总获优秀个人的得0.5分/人,最高得1分。";
|
|
|
+ } else if (total == 1) {
|
|
|
+ finalScore = finalScore.add(new BigDecimal("0.5"));
|
|
|
+ errorMsg = "公司级:集团组织开展的优秀总工程师培训班、优秀工程部长培训班等培训汇总获优秀个人的得0.5分/人,最高得1分。";
|
|
|
+ }
|
|
|
+
|
|
|
+ if (finalScore.compareTo(BigDecimal.ZERO) < 0) {
|
|
|
+ finalScore = BigDecimal.ZERO;
|
|
|
+ }
|
|
|
+ if (finalScore.compareTo(jkAssessmentRules.getWeight()) > 0) {
|
|
|
+ finalScore = jkAssessmentRules.getWeight();
|
|
|
+ }
|
|
|
+ return assemblyYcpfhzDetail(jtYcpfhz, jkAssessmentRules, finalScore, errorMsg, currentUser);
|
|
|
+ }
|
|
|
+}
|