From f3b5c732a11e3dfb7fafac48e6c86ca5f67a981d Mon Sep 17 00:00:00 2001 From: "liang.chao" <1360241448@qq.com> Date: Wed, 6 Aug 2025 14:02:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E5=8C=85=E5=95=86=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E5=8F=AA=E8=A6=81=E8=AF=84=E4=BB=B7=E4=BA=BA=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E5=B0=B1=E8=83=BD=E7=9C=8B=E5=88=B0=E5=AE=A1=E6=A0=B8=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluate/dao/OutsourcerEvaluateDao.java | 2 ++ .../service/OutsourcerEvaluateService.java | 2 +- .../OutsourcerEvaluateServiceImpl.java | 17 +++++++------- .../evaluate/OutsourcerEvaluateMapper.xml | 22 +++++++++++++++++++ 4 files changed, 33 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/bonus/gs/sub/evaluate/evaluate/dao/OutsourcerEvaluateDao.java b/src/main/java/com/bonus/gs/sub/evaluate/evaluate/dao/OutsourcerEvaluateDao.java index 9fdfb25..57e539b 100644 --- a/src/main/java/com/bonus/gs/sub/evaluate/evaluate/dao/OutsourcerEvaluateDao.java +++ b/src/main/java/com/bonus/gs/sub/evaluate/evaluate/dao/OutsourcerEvaluateDao.java @@ -159,4 +159,6 @@ public interface OutsourcerEvaluateDao { List getOrgList(); Integer selectScore(EvaluateDataBean o); + + Integer getExaminePerson(ExamineBean o); } diff --git a/src/main/java/com/bonus/gs/sub/evaluate/evaluate/service/OutsourcerEvaluateService.java b/src/main/java/com/bonus/gs/sub/evaluate/evaluate/service/OutsourcerEvaluateService.java index b2b408c..cf6a5b1 100644 --- a/src/main/java/com/bonus/gs/sub/evaluate/evaluate/service/OutsourcerEvaluateService.java +++ b/src/main/java/com/bonus/gs/sub/evaluate/evaluate/service/OutsourcerEvaluateService.java @@ -49,7 +49,7 @@ public interface OutsourcerEvaluateService { */ int isWait(String evaluateId); - int addExaminePerson(ExamineBean o); + void addExaminePerson(ExamineBean o); //根据评价id 获取需要审核的部门数 int examineNumByEvaluateId(String evaluateId); diff --git a/src/main/java/com/bonus/gs/sub/evaluate/evaluate/service/OutsourcerEvaluateServiceImpl.java b/src/main/java/com/bonus/gs/sub/evaluate/evaluate/service/OutsourcerEvaluateServiceImpl.java index 70f9e3e..e27c2b1 100644 --- a/src/main/java/com/bonus/gs/sub/evaluate/evaluate/service/OutsourcerEvaluateServiceImpl.java +++ b/src/main/java/com/bonus/gs/sub/evaluate/evaluate/service/OutsourcerEvaluateServiceImpl.java @@ -15,8 +15,6 @@ import org.springframework.transaction.interceptor.TransactionAspectSupport; import javax.annotation.Resource; import java.math.BigDecimal; -import java.time.LocalDate; -import java.time.format.DateTimeFormatter; import java.util.*; import java.util.List; @@ -435,17 +433,16 @@ public class OutsourcerEvaluateServiceImpl implements OutsourcerEvaluateService examineBean.setUserId(userId); if ("0".equals(deptId) || ("1".equals(orgType) && "评价人".equals(roleName))) { System.err.println("项目部或者事业部评价人"); - int num = isWait(o.getEvaluateId()); - System.err.println("isWait==" + num); - if (num <= 0) { +// int num = isWait(o.getEvaluateId()); +// System.err.println("isWait==" + num); +// if (num <= 0) { addExaminePerson(examineBean); - } +// } } else { System.err.println("其他部门,直接去审核"); //直接去审核 addExaminePerson(examineBean); } - // } catch (Exception e) { TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); @@ -1288,7 +1285,7 @@ public class OutsourcerEvaluateServiceImpl implements OutsourcerEvaluateService } @Override - public int addExaminePerson(ExamineBean o) { + public void addExaminePerson(ExamineBean o) { String postId = o.getPostId(); //如果是项目部,则获取事业部orgId 插入 if (postId != null && "0".equals(postId)) { @@ -1300,7 +1297,9 @@ public class OutsourcerEvaluateServiceImpl implements OutsourcerEvaluateService stringList.addAll(dao.getExaminePersonByDeptAndRoleName(o.getPostId(), "汇总审批人")); } o.setUserList(String.join(",", stringList)); - return dao.addExaminePerson(o); + if (dao.getExaminePerson(o) == 0){ + dao.addExaminePerson(o); + } } @Override diff --git a/src/main/resources/mappers/evaluate/OutsourcerEvaluateMapper.xml b/src/main/resources/mappers/evaluate/OutsourcerEvaluateMapper.xml index 81c9f53..4d415f2 100644 --- a/src/main/resources/mappers/evaluate/OutsourcerEvaluateMapper.xml +++ b/src/main/resources/mappers/evaluate/OutsourcerEvaluateMapper.xml @@ -834,6 +834,28 @@ where evaluate_id = #{evaluateId} and post_id = #{deptId} and details_id = #{detailsId} and score is null + update pj_evaluate_record set task_status = #{taskStatus} where evaluate_id = #{evaluateId}