diff --git a/laws-modules/src/main/java/com/jero/modules/assessmentLibrary/controller/LawsEvaluationNotMetController.java b/laws-modules/src/main/java/com/jero/modules/assessmentLibrary/controller/LawsEvaluationNotMetController.java index eb77b06b..6f846ade 100644 --- a/laws-modules/src/main/java/com/jero/modules/assessmentLibrary/controller/LawsEvaluationNotMetController.java +++ b/laws-modules/src/main/java/com/jero/modules/assessmentLibrary/controller/LawsEvaluationNotMetController.java @@ -62,9 +62,9 @@ public class LawsEvaluationNotMetController extends JeroController batchClose(@RequestBody IdsMapBody body) { - String ids = body.getIds(); - if(StringUtils.isEmpty(ids)){ + public Result batchClose(@RequestBody LawsEvaluationNotMetLibrary lawsEvaluationNotMet) { + String ids = lawsEvaluationNotMet.getIds(); + if (StringUtils.isEmpty(ids)){ throw new JeroBootException(ResultCommon.PLEASE_SELECT_DATA); } List idList = Arrays.asList(ids.split(",")); @@ -72,7 +72,7 @@ public class LawsEvaluationNotMetController extends JeroController queryPage(LawsEvaluationNotMetLibrary lawsEvaluationNotMet, Integer pageNo, Integer pageSize); - void batchClose(List ids); + /** + * 批量关闭 + * @param ids + * @param lawsEvaluationNotMet + */ + void batchClose(List ids, LawsEvaluationNotMetLibrary lawsEvaluationNotMet); + /** + * 导出 + * @param response + * @param lawsEvaluationNotMet + * @param fileName + * @param sheetName + */ void export(HttpServletResponse response, LawsEvaluationNotMetLibrary lawsEvaluationNotMet, String fileName, String sheetName); } diff --git a/laws-modules/src/main/java/com/jero/modules/assessmentLibrary/service/impl/LawsEvaluationNotMetLibraryServiceImpl.java b/laws-modules/src/main/java/com/jero/modules/assessmentLibrary/service/impl/LawsEvaluationNotMetLibraryServiceImpl.java index d769ff9e..d1746402 100644 --- a/laws-modules/src/main/java/com/jero/modules/assessmentLibrary/service/impl/LawsEvaluationNotMetLibraryServiceImpl.java +++ b/laws-modules/src/main/java/com/jero/modules/assessmentLibrary/service/impl/LawsEvaluationNotMetLibraryServiceImpl.java @@ -1,5 +1,6 @@ package com.jero.modules.assessmentLibrary.service.impl; +import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -60,12 +61,18 @@ public class LawsEvaluationNotMetLibraryServiceImpl extends ServiceImpl ids) { + public void batchClose(List ids, LawsEvaluationNotMetLibrary lawsEvaluationNotMet) { if (ids == null || ids.isEmpty()) { return; } LambdaUpdateWrapper wrapper = new LambdaUpdateWrapper<>(); wrapper.set(LawsEvaluationNotMetLibrary::getRectifyStatus, AssessCommon.CLOSED); + wrapper.set(StrUtil.isNotBlank(lawsEvaluationNotMet.getPcrNo()), + LawsEvaluationNotMetLibrary::getPcrNo, lawsEvaluationNotMet.getPcrNo()); + wrapper.set(null != lawsEvaluationNotMet.getRectifyCompleteDate(), + LawsEvaluationNotMetLibrary::getRectifyCompleteDate, lawsEvaluationNotMet.getRectifyCompleteDate()); + wrapper.set(StrUtil.isNotBlank(lawsEvaluationNotMet.getFile()), + LawsEvaluationNotMetLibrary::getFile, lawsEvaluationNotMet.getFile()); wrapper.in(LawsEvaluationNotMetLibrary::getId, ids); update(wrapper); } 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 cf2bfc79..dbeb05a9 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 @@ -5,6 +5,16 @@ package com.jero.modules.projectLibrary.common; * @date 2023-12-22 14:19 */ public class AssessCommon { + + /** + * 待整改 + */ + public final static String TO_BE_RECTIFIED = "1"; + /** + * 已关闭 + */ + public final static String CLOSED = "2"; + /** * 未评估 */ @@ -35,10 +45,7 @@ public class AssessCommon { */ public final static String NOT_INVOLVED = "4"; - /** - * 待整改 - */ - public final static String TO_BE_RECTIFIED = "1"; + /** * 整改中 */ @@ -47,14 +54,6 @@ public class AssessCommon { * 审批中 */ public final static String UNDER_APPROVAL = "3"; - /** - * 已完成 - */ - public final static String DONE = "4"; - /** - * 已关闭 - */ - public final static String CLOSED = "5"; /** * 警示 */ @@ -63,8 +62,4 @@ public class AssessCommon { * 超期 */ public final static String OVERDUE = "7"; - - - - } diff --git a/laws-single-startup/src/main/resources/i18n/messages.properties b/laws-single-startup/src/main/resources/i18n/messages.properties index 124aba19..86a06944 100644 --- a/laws-single-startup/src/main/resources/i18n/messages.properties +++ b/laws-single-startup/src/main/resources/i18n/messages.properties @@ -36,7 +36,7 @@ the.job.number.cannot.be.empty.export=Line {0},job number cannot be empty the.real.name.cannot.be.empty.export=Line {0},real name cannot be empty job.number.does.not.exist.export=Line {0},job number does not exist duplicate.job.number.export=Line {0},duplicate job number -cannot.close=\u4E0D\u662F\u5F85\u6574\u6539\u3001\u8B66\u793A\u6216\u8D85\u671F\u72B6\u6001\u7684\u6570\u636E\u4E0D\u80FD\u5173\u95ED +cannot.close=\u4E0D\u662F\u5F85\u6574\u6539\u72B6\u6001\u7684\u6570\u636E\u4E0D\u80FD\u5173\u95ED no.corresponding.record.found=\u672A\u627E\u5230\u5BF9\u5E94\u8BB0\u5F55 parameters.cannot.be.null=\u53C2\u6570\u4E0D\u80FD\u4E3A\u7A7A diff --git a/laws-single-startup/src/main/resources/i18n/messages_en.properties b/laws-single-startup/src/main/resources/i18n/messages_en.properties index 76f24847..65fb4557 100644 --- a/laws-single-startup/src/main/resources/i18n/messages_en.properties +++ b/laws-single-startup/src/main/resources/i18n/messages_en.properties @@ -38,7 +38,7 @@ the.job.number.cannot.be.empty.export=Line {0},job number cannot be empty the.real.name.cannot.be.empty.export=Line {0},real name cannot be empty job.number.does.not.exist.export=Line {0},job number does not exist duplicate.job.number.export=Line {0},duplicate job number -cannot.close=Data that is not pending rectification, warning, or overdue cannot be closed +cannot.close=Data that is not pending rectification cannot be closed diff --git a/laws-single-startup/src/main/resources/i18n/messages_zh.properties b/laws-single-startup/src/main/resources/i18n/messages_zh.properties index 97242f7c..96c92fa3 100644 --- a/laws-single-startup/src/main/resources/i18n/messages_zh.properties +++ b/laws-single-startup/src/main/resources/i18n/messages_zh.properties @@ -37,7 +37,7 @@ the.job.number.cannot.be.empty.export=\u7B2C{0}\u884C,\u5DE5\u53F7\u4E0D\u80FD\u the.real.name.cannot.be.empty.export=\u7B2C{0}\u884C,\u59D3\u540D\u4E0D\u80FD\u4E3A\u7A7A job.number.does.not.exist.export=\u7B2C{0}\u884C,\u5DE5\u53F7\u4E0D\u5B58\u5728 duplicate.job.number.export=\u7B2C{0}\u884C,\u5DE5\u53F7\u91CD\u590D -cannot.close=\u4E0D\u662F\u5F85\u6574\u6539\u3001\u8B66\u793A\u6216\u8D85\u671F\u72B6\u6001\u7684\u6570\u636E\u4E0D\u80FD\u5173\u95ED +cannot.close=\u4E0D\u662F\u5F85\u6574\u6539\u7684\u6570\u636E\u4E0D\u80FD\u5173\u95ED