fix: 不符合项库批量关闭
This commit is contained in:
+5
-7
@@ -62,9 +62,9 @@ public class LawsEvaluationNotMetController extends JeroController<LawsEvaluatio
|
||||
@AutoLog(value = "不符合项-批量关闭")
|
||||
@ApiOperation(value="不符合项-批量关闭", notes="项目库-批量关闭")
|
||||
@PostMapping(value = "/batchClose")
|
||||
public Result<T> batchClose(@RequestBody IdsMapBody body) {
|
||||
String ids = body.getIds();
|
||||
if(StringUtils.isEmpty(ids)){
|
||||
public Result<T> batchClose(@RequestBody LawsEvaluationNotMetLibrary lawsEvaluationNotMet) {
|
||||
String ids = lawsEvaluationNotMet.getIds();
|
||||
if (StringUtils.isEmpty(ids)){
|
||||
throw new JeroBootException(ResultCommon.PLEASE_SELECT_DATA);
|
||||
}
|
||||
List<String> idList = Arrays.asList(ids.split(","));
|
||||
@@ -72,7 +72,7 @@ public class LawsEvaluationNotMetController extends JeroController<LawsEvaluatio
|
||||
if (!this.check(idList)) {
|
||||
throw new JeroBootException(ResultCommon.CANNOT_CLOSE);
|
||||
}
|
||||
lawsEvaluationNotMetLibraryService.batchClose(idList);
|
||||
lawsEvaluationNotMetLibraryService.batchClose(idList, lawsEvaluationNotMet);
|
||||
return Result.OK(ResultCommon.OK);
|
||||
}
|
||||
|
||||
@@ -81,9 +81,7 @@ public class LawsEvaluationNotMetController extends JeroController<LawsEvaluatio
|
||||
for (LawsEvaluationNotMetLibrary notMet : notMets) {
|
||||
String state = notMet.getRectifyStatus();
|
||||
//判断是否是待整改,超期,警示
|
||||
if (!state.equals(AssessCommon.TO_BE_RECTIFIED)
|
||||
&& !state.equals(AssessCommon.WARNING)
|
||||
&& !state.equals(AssessCommon.OVERDUE)) {
|
||||
if (!state.equals(AssessCommon.TO_BE_RECTIFIED)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
+6
@@ -231,6 +231,12 @@ public class LawsEvaluationNotMetLibrary implements Serializable {
|
||||
@Excel(name = "标准编号", width = 15, orderNum = "4")
|
||||
private String standardName;
|
||||
|
||||
/**
|
||||
* 关闭用主键ids
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "关闭用主键ids")
|
||||
private String ids;
|
||||
|
||||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
+13
-4
@@ -3,10 +3,7 @@ package com.jero.modules.assessmentLibrary.service;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.modules.assessmentLibrary.entity.LawsEvaluationNotMetLibrary;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.modules.laws.enterprise.entity.dto.ESPlanQueryDTO;
|
||||
import com.jero.modules.projectLibrary.entity.LawsEvaluationNotMet;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
@@ -27,7 +24,19 @@ public interface ILawsEvaluationNotMetLibraryService extends IService<LawsEvalua
|
||||
*/
|
||||
IPage<LawsEvaluationNotMetLibrary> queryPage(LawsEvaluationNotMetLibrary lawsEvaluationNotMet, Integer pageNo, Integer pageSize);
|
||||
|
||||
void batchClose(List<String> ids);
|
||||
/**
|
||||
* 批量关闭
|
||||
* @param ids
|
||||
* @param lawsEvaluationNotMet
|
||||
*/
|
||||
void batchClose(List<String> ids, LawsEvaluationNotMetLibrary lawsEvaluationNotMet);
|
||||
|
||||
/**
|
||||
* 导出
|
||||
* @param response
|
||||
* @param lawsEvaluationNotMet
|
||||
* @param fileName
|
||||
* @param sheetName
|
||||
*/
|
||||
void export(HttpServletResponse response, LawsEvaluationNotMetLibrary lawsEvaluationNotMet, String fileName, String sheetName);
|
||||
}
|
||||
|
||||
+8
-1
@@ -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<LawsEval
|
||||
}
|
||||
|
||||
@Override
|
||||
public void batchClose(List<String> ids) {
|
||||
public void batchClose(List<String> ids, LawsEvaluationNotMetLibrary lawsEvaluationNotMet) {
|
||||
if (ids == null || ids.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
LambdaUpdateWrapper<LawsEvaluationNotMetLibrary> 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);
|
||||
}
|
||||
|
||||
+11
-16
@@ -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";
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user