From 15c3c3159ac76b32cc5100ffe53a74e0c533c882 Mon Sep 17 00:00:00 2001 From: zty <1048209592@qq.com> Date: Mon, 15 Jul 2024 16:22:03 +0800 Subject: [PATCH] =?UTF-8?q?1.api=E5=A2=9E=E5=8A=A0=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E8=B7=AF=E7=94=B1=202.=E8=BF=94=E5=9B=9E=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=E9=9B=86=E5=A4=B1=E8=B4=A5=E5=A2=9E=E5=8A=A0=E7=A9=BA=E5=8F=82?= =?UTF-8?q?=E6=96=B9=E6=B3=95=203.=E5=AD=A3=E5=BA=A6=E6=8C=87=E6=A0=87?= =?UTF-8?q?=E8=A1=A8ext=E5=AD=97=E6=AE=B5=E7=94=B1json=E6=94=B9=E4=B8=BAjs?= =?UTF-8?q?onObject=204.=E5=A2=9E=E5=8A=A0=E5=AD=A3=E5=BA=A6=E8=80=83?= =?UTF-8?q?=E6=A0=B8=E6=8C=87=E6=A0=87=E7=BC=96=E8=BE=91=E6=96=B9=E6=B3=95?= =?UTF-8?q?=EF=BC=88=E8=87=AA=E8=AF=84/=E7=AE=A1=E7=90=86=E5=91=98?= =?UTF-8?q?=E8=AF=84=E5=88=86=EF=BC=89=E5=8F=8A=E5=AE=A1=E6=A0=B8=E6=96=B9?= =?UTF-8?q?=E6=B3=95=205.=E5=AD=A3=E5=BA=A6=E8=80=83=E6=A0=B8=E6=8C=87?= =?UTF-8?q?=E6=A0=87=E6=8E=A7=E5=88=B6=E5=B1=82=206.=E5=AD=A3=E5=BA=A6?= =?UTF-8?q?=E8=80=83=E6=A0=B8=E6=8C=87=E6=A0=87=E5=A2=9E=E5=8A=A0ext?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E6=98=A0=E5=B0=84=EF=BC=8CgetList=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E5=A2=9E=E5=8A=A0id=E5=88=A4=E6=96=AD=207.=E9=80=9A?= =?UTF-8?q?=E8=BF=87=E5=AD=A3=E5=BA=A6=E8=80=83=E6=A0=B8=E6=8C=87=E6=A0=87?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E9=A1=B9=E7=9B=AE=E7=AB=8B=E9=A1=B9=E9=9B=86?= =?UTF-8?q?=E5=90=88=EF=BC=8Cif=E6=9D=A1=E4=BB=B6=E6=9B=B4=E6=94=B9=208.?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=AB=8B=E9=A1=B9-=E5=AD=A3=E5=BA=A6?= =?UTF-8?q?=E8=80=83=E6=A0=B8=E6=8C=87=E6=A0=87=E5=A2=9E=E5=8A=A0(?= =?UTF-8?q?=E4=BC=AA)=E5=B7=A5=E4=BD=9C=E6=B5=81=209.=E5=AD=A3=E5=BA=A6?= =?UTF-8?q?=E8=80=83=E6=A0=B8=E6=8C=87=E6=A0=87=E6=9F=A5=E8=AF=A2=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=9F=A5=E8=AF=A2=E6=96=B9=E6=B3=95=E6=9C=89=E5=A4=9A?= =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E7=89=A9=E6=9F=A5=E8=AF=A2=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=EF=BC=88=E4=BC=AA=EF=BC=89=E5=B7=A5=E4=BD=9C=E6=B5=81=E9=80=9A?= =?UTF-8?q?=E8=BF=87=E5=BD=93=E5=89=8D=E6=89=A7=E8=A1=8C=E4=BA=BA=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/xqopen/kehui/Api.java | 4 +- .../kehui/flows/util/ProjectInitListener.java | 28 ++- .../xml/ProjectAssessmentIndicatorsMapper.xml | 5 +- .../kehui/mapper/xml/ProjectInfoDao.xml | 2 +- ...ProjectAssessmentIndicatorsController.java | 160 +++++++++++++++++- .../project/action/ProjectInitComtroller.java | 21 ++- .../ProjectQuarterlyEvaluationController.java | 53 +++--- .../api/ProjectAssessmentIndicatorsApi.java | 9 + .../entity/ProjectAssessmentIndicators.java | 4 +- .../entity/ProjectQuarterlyEvaluation.java | 5 +- .../com/xqopen/kehui/util/ApiResponse.java | 7 +- 11 files changed, 262 insertions(+), 36 deletions(-) diff --git a/src/main/java/com/xqopen/kehui/Api.java b/src/main/java/com/xqopen/kehui/Api.java index 78ffea5..de04475 100644 --- a/src/main/java/com/xqopen/kehui/Api.java +++ b/src/main/java/com/xqopen/kehui/Api.java @@ -382,8 +382,8 @@ public class Api { */ public static final String PROJECT_QUARTERLY_EVALUATION=PROJECT_PREFIX+"/quarterExamine"; public static final String PROJECT_QUARTERLY_EVALUATION_LIST=PROJECT_QUARTERLY_EVALUATION+"/list"; - - + public static final String PROJECT_QUARTERLY_EVALUATION_UPDATE=PROJECT_QUARTERLY_EVALUATION+"/update"; + public static final String PROJECT_QUARTERLY_EVALUATION_EXAMINE=PROJECT_QUARTERLY_EVALUATION+"/examine"; public static final String PROJECT_INFO_GET_ACCEPT_PROJECTS = PROJECT_INFO + "/accept"; diff --git a/src/main/java/com/xqopen/kehui/flows/util/ProjectInitListener.java b/src/main/java/com/xqopen/kehui/flows/util/ProjectInitListener.java index cab22cf..bb7c653 100644 --- a/src/main/java/com/xqopen/kehui/flows/util/ProjectInitListener.java +++ b/src/main/java/com/xqopen/kehui/flows/util/ProjectInitListener.java @@ -3,6 +3,7 @@ package com.xqopen.kehui.flows.util; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.mapper.EntityWrapper; +import com.xqopen.kehui.common.entity.SystemUserLogin; import com.xqopen.kehui.common.service.ISystemUserLoginService; import com.xqopen.kehui.exception.ErrorCode; import com.xqopen.kehui.exception.XQException; @@ -10,6 +11,7 @@ import com.xqopen.kehui.flows.service.IFlowsService; import com.xqopen.kehui.project.entity.ProjectInfo; import com.xqopen.kehui.project.entity.ProjectQuarterlyEvaluation; import com.xqopen.kehui.project.entity.ProjectWeekly; +import com.xqopen.kehui.project.service.IProjectAssessmentIndicatorsService; import com.xqopen.kehui.project.service.IProjectInfoService; import com.xqopen.kehui.project.service.IProjectWeeklyService; import com.xqopen.kehui.project.service.ProjectQuarterlyEvaluationService; @@ -21,6 +23,7 @@ import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.interceptor.TransactionAspectSupport; import org.springframework.util.ObjectUtils; +import org.springframework.util.StringUtils; import java.sql.Timestamp; import java.util.ArrayList; @@ -38,6 +41,8 @@ public class ProjectInitListener implements ExecutionListener { ISystemUserLoginService systemUserLoginService; @Autowired ProjectQuarterlyEvaluationService projectQuarterlyEvaluationService; + @Autowired + IProjectAssessmentIndicatorsService projectAssessmentIndicatorsService; @Override @Transactional @@ -98,12 +103,24 @@ public class ProjectInitListener implements ExecutionListener { ProjectQuarterlyEvaluation quarterlyEvaluation = new ProjectQuarterlyEvaluation(); quarterlyEvaluation.setCreatedBy(projectManager); JSONArray projectAdmin = (JSONArray) ext.get("projectAdmin"); + JSONArray branchLeaders = (JSONArray) ext.get("branchLeaders"); + JSONArray MainLeader = (JSONArray) ext.get("MainLeader"); + //添加json数据 JSONObject jsonObject = new JSONObject(); - jsonObject.put("projectAdmin",projectAdmin.get(1)); + jsonObject.put("projectManager",getSystemUserLogin(projectManager).getId()); + jsonObject.put("projectAdmin",getSystemUserLogin(String.valueOf(projectAdmin.get(1))).getId()); + jsonObject.put("branchLeaders",getSystemUserLogin(String.valueOf(branchLeaders.get(1))).getId()); + jsonObject.put("MainLeader",getSystemUserLogin(String.valueOf(MainLeader.get(1))).getId()); + jsonObject.put("executor",getSystemUserLogin(projectManager).getId()); quarterlyEvaluation.setExt(jsonObject); quarterlyEvaluation.setCreatedAt(new Timestamp(System.currentTimeMillis())); quarterlyEvaluation.setProjectId(String.valueOf(projectInfo.getId())); projectQuarterlyEvaluationService.insert(quarterlyEvaluation); + //添加季度审核的状态 + JSONObject infoExt = projectInfo.getExt(); + infoExt.put("taskName","季度审核填报");//任务节点 + infoExt.put("executor",getSystemUserLogin(projectManager).getId());//当前委托人 + if(!StringUtils.isEmpty(projectInfo.getId()))projectInfoService.updateById(projectInfo); } } } @@ -114,4 +131,13 @@ public class ProjectInitListener implements ExecutionListener { throw new XQException(ErrorCode.PROJECTINFO_EXCEPTION_ERROR, null); } } + private SystemUserLogin getSystemUserLogin(String name) { + SystemUserLogin systemUserLogin = new SystemUserLogin(); + if(!StringUtils.isEmpty(name)){ + EntityWrapper wrapper = new EntityWrapper<>(); + wrapper.eq(SystemUserLogin.USERINFO_ID,Long.parseLong(name)); + systemUserLogin = systemUserLoginService.selectOne(wrapper); + } + return systemUserLogin; + } } diff --git a/src/main/java/com/xqopen/kehui/mapper/xml/ProjectAssessmentIndicatorsMapper.xml b/src/main/java/com/xqopen/kehui/mapper/xml/ProjectAssessmentIndicatorsMapper.xml index 7cfdef7..51fddee 100644 --- a/src/main/java/com/xqopen/kehui/mapper/xml/ProjectAssessmentIndicatorsMapper.xml +++ b/src/main/java/com/xqopen/kehui/mapper/xml/ProjectAssessmentIndicatorsMapper.xml @@ -21,6 +21,7 @@ + @@ -36,6 +37,8 @@ and project_id =#{indicators.projectId} - + + and id_=#{indicators.id} + diff --git a/src/main/java/com/xqopen/kehui/mapper/xml/ProjectInfoDao.xml b/src/main/java/com/xqopen/kehui/mapper/xml/ProjectInfoDao.xml index 6f3dc7b..6527de9 100644 --- a/src/main/java/com/xqopen/kehui/mapper/xml/ProjectInfoDao.xml +++ b/src/main/java/com/xqopen/kehui/mapper/xml/ProjectInfoDao.xml @@ -147,7 +147,7 @@