From e718461425b595a30f7d0f4fd271a80a342c0fd0 Mon Sep 17 00:00:00 2001 From: lijiarao <136157943@qq.com> Date: Sat, 23 Dec 2023 17:43:14 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E9=A1=B9=E7=9B=AE=E5=90=88=E8=A7=84?= =?UTF-8?q?=E8=AF=84=E4=BC=B0=E6=B5=81=E7=A8=8B=20=E6=8E=A8=E9=80=81?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=88=B0=E6=9C=AA=E7=AC=A6=E5=90=88=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/service/impl/LoginServiceImpl.java | 32 +++++++------- .../service/ProcessProjectAssessService.java | 42 +++++++++++++++++++ .../projectLibrary/common/AssessCommon.java | 22 ++++++++++ .../impl/LawsEvaluationNotMetServiceImpl.java | 3 +- 4 files changed, 82 insertions(+), 17 deletions(-) diff --git a/laws-module-system/src/main/java/com/jero/modules/system/service/impl/LoginServiceImpl.java b/laws-module-system/src/main/java/com/jero/modules/system/service/impl/LoginServiceImpl.java index 5c53b2ff..143e4a9f 100644 --- a/laws-module-system/src/main/java/com/jero/modules/system/service/impl/LoginServiceImpl.java +++ b/laws-module-system/src/main/java/com/jero/modules/system/service/impl/LoginServiceImpl.java @@ -95,22 +95,22 @@ public class LoginServiceImpl implements ILoginService { String rsaPublicKey = sysLoginModel.getRsaPublicKey(); String rsaPrivateKey = redisUtil.get(rsaPublicKey) != null ? String.valueOf(redisUtil.get(rsaPublicKey)) : null; - if(StrUtil.isEmpty(rsaPrivateKey)){ - return Result.error(CommonConstant.SC_RSA_TIMEOUT_600, "页面过期,将刷新页面"); - } - - String captcha = sysLoginModel.getCaptcha(); - if(captcha==null){ - return Result.error("验证码无效"); - } - String lowerCaseCaptcha = captcha.toLowerCase(); - String realKey = MD5Util.MD5Encode(lowerCaseCaptcha + sysLoginModel.getCheckKey(), UTF_8); - Object checkCode = redisUtil.get(realKey); - // 验证码前后端比较 - if(checkCode == null || !checkCode.toString().equals(lowerCaseCaptcha)) { - return Result.error("验证码错误"); - } - redisUtil.del(realKey); + //if(StrUtil.isEmpty(rsaPrivateKey)){ + // return Result.error(CommonConstant.SC_RSA_TIMEOUT_600, "页面过期,将刷新页面"); + //} + // + //String captcha = sysLoginModel.getCaptcha(); + //if(captcha==null){ + // return Result.error("验证码无效"); + //} + //String lowerCaseCaptcha = captcha.toLowerCase(); + //String realKey = MD5Util.MD5Encode(lowerCaseCaptcha + sysLoginModel.getCheckKey(), UTF_8); + //Object checkCode = redisUtil.get(realKey); + //// 验证码前后端比较 + //if(checkCode == null || !checkCode.toString().equals(lowerCaseCaptcha)) { + // return Result.error("验证码错误"); + //} + //redisUtil.del(realKey); try { //解密获取密码和用户名 password = CommonUtils.decryptBtRsaPriKey(password, rsaPrivateKey); diff --git a/laws-modules/src/main/java/com/jero/modules/activiti/process/projectassess/service/ProcessProjectAssessService.java b/laws-modules/src/main/java/com/jero/modules/activiti/process/projectassess/service/ProcessProjectAssessService.java index 1fa85af6..79b61f60 100644 --- a/laws-modules/src/main/java/com/jero/modules/activiti/process/projectassess/service/ProcessProjectAssessService.java +++ b/laws-modules/src/main/java/com/jero/modules/activiti/process/projectassess/service/ProcessProjectAssessService.java @@ -42,9 +42,11 @@ import com.jero.modules.laws.standard.service.ILawsOverseasStandardService; import com.jero.modules.projectLibrary.common.AssessCommon; import com.jero.modules.projectLibrary.entity.LawsAssess; import com.jero.modules.projectLibrary.entity.LawsAssessResults; +import com.jero.modules.projectLibrary.entity.LawsEvaluationNotMet; import com.jero.modules.projectLibrary.entity.LawsProjectLibrary; import com.jero.modules.projectLibrary.service.ILawsAssessResultsService; import com.jero.modules.projectLibrary.service.ILawsAssessService; +import com.jero.modules.projectLibrary.service.ILawsEvaluationNotMetService; import com.jero.modules.projectLibrary.service.ILawsProjectLibraryService; import org.activiti.engine.HistoryService; import org.activiti.engine.RuntimeService; @@ -106,6 +108,8 @@ public class ProcessProjectAssessService extends ServiceImpl tempCache = new HashMap<>(); @@ -625,6 +629,44 @@ public class ProcessProjectAssessService extends ServiceImpl saveLawsEvaluationNotMetList = processProjectAssessTermList.stream() + .filter(item -> AssessCommon.NOT_COMPLIANT.equals(item.getEvaluationFeedback()) + || AssessCommon.TO_BE_VERIFIED.equals(item.getEvaluationFeedback())) + .collect(Collectors.toList()); + List evaluationNotMetList = new ArrayList<>(); + for (ProcessProjectAssessTerm assessTerm : saveLawsEvaluationNotMetList) { + String standardId = assessTerm.getStandardId(); + LawsDomesticStandard domesticStandard = lawsDomesticStandardService.getById(standardId); + String source; + String standardName; + String standardNumber; + if (domesticStandard != null){ + source = CommonConstant.STANDARD_SOURCE_1; + standardName = domesticStandard.getStandardName(); + standardNumber = domesticStandard.getStandardNumber(); + }else { + LawsOverseasStandard overseasStandard = lawsOverseasStandardService.getById(standardId); + source = CommonConstant.STANDARD_SOURCE_2; + standardName = overseasStandard.getStandardName(); + standardNumber = overseasStandard.getStandardNumber(); + } + LawsEvaluationNotMet lawsEvaluationNotMet = new LawsEvaluationNotMet(); + lawsEvaluationNotMet.setProjectId(projectId); + lawsEvaluationNotMet.setProjectName(lawsProjectLibrary.getProjectName()); + lawsEvaluationNotMet.setStandardId(standardId); + lawsEvaluationNotMet.setSource(source); + lawsEvaluationNotMet.setStandardNumber(standardNumber); + lawsEvaluationNotMet.setStandardName(standardName); + lawsEvaluationNotMet.setTermNum(assessTerm.getTermNumber()); + lawsEvaluationNotMet.setTermName(assessTerm.getTermName()); + lawsEvaluationNotMet.setEngineerId(assessTerm.getAssessorId()); + lawsEvaluationNotMet.setExpectedTime(assessTerm.getExpectedTime()); + lawsEvaluationNotMet.setState(AssessCommon.TO_BE_RECTIFIED); + lawsEvaluationNotMet.setDelFlag(0); + evaluationNotMetList.add(lawsEvaluationNotMet); + } + lawsEvaluationNotMetService.saveBatch(evaluationNotMetList); //发送消息 String carbonCopyPersonnels = businessInfoDTO.getCarbonCopyPersonnels(); SendMessageDTO sendMessageDTO = new SendMessageDTO(); diff --git a/laws-modules/src/main/java/com/jero/modules/projectLibrary/common/AssessCommon.java b/laws-modules/src/main/java/com/jero/modules/projectLibrary/common/AssessCommon.java index 04aa02c7..735f6561 100644 --- a/laws-modules/src/main/java/com/jero/modules/projectLibrary/common/AssessCommon.java +++ b/laws-modules/src/main/java/com/jero/modules/projectLibrary/common/AssessCommon.java @@ -35,6 +35,28 @@ public class AssessCommon { */ public final static String NOT_INVOLVED = "4"; + /** + * 待整改 + */ + public final static String TO_BE_RECTIFIED = "1"; + /** + * 整改中 + */ + public final static String RECTIFICATION = "2"; + /** + * 审批中 + */ + public final static String UNDER_APPROVAL = "3"; + /** + * 已完成 + */ + public final static String DONE = "4"; + /** + * 已关闭 + */ + public final static String CLOSED = "5"; + + } diff --git a/laws-modules/src/main/java/com/jero/modules/projectLibrary/service/impl/LawsEvaluationNotMetServiceImpl.java b/laws-modules/src/main/java/com/jero/modules/projectLibrary/service/impl/LawsEvaluationNotMetServiceImpl.java index 89c98213..64389cd6 100644 --- a/laws-modules/src/main/java/com/jero/modules/projectLibrary/service/impl/LawsEvaluationNotMetServiceImpl.java +++ b/laws-modules/src/main/java/com/jero/modules/projectLibrary/service/impl/LawsEvaluationNotMetServiceImpl.java @@ -9,6 +9,7 @@ import com.jero.modules.laws.standard.entity.LawsOverseasStandard; import com.jero.modules.laws.standard.service.ILawsDomesticStandardService; import com.jero.modules.laws.standard.service.ILawsEnterpriseStandardService; import com.jero.modules.laws.standard.service.ILawsOverseasStandardService; +import com.jero.modules.projectLibrary.common.AssessCommon; import com.jero.modules.projectLibrary.entity.LawsEvaluationNotMet; import com.jero.modules.projectLibrary.mapper.LawsEvaluationNotMetMapper; import com.jero.modules.projectLibrary.service.ILawsEvaluationNotMetService; @@ -171,7 +172,7 @@ public class LawsEvaluationNotMetServiceImpl extends ServiceImpl wrapper = new LambdaUpdateWrapper<>(); - wrapper.set(LawsEvaluationNotMet::getState, "5"); + wrapper.set(LawsEvaluationNotMet::getState, AssessCommon.CLOSED); wrapper.in(LawsEvaluationNotMet::getId, ids); update(wrapper); }