update 项目库-未符合项
This commit is contained in:
+7
-5
@@ -8,6 +8,7 @@ import com.jero.common.api.vo.ResultCommon;
|
||||
import com.jero.modules.projectLibrary.entity.LawsEvaluationNotMet;
|
||||
import com.jero.modules.projectLibrary.service.ILawsEvaluationNotMetService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.modules.system.vo.IdsMapBody;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@@ -99,16 +100,17 @@ public class LawsEvaluationNotMetController extends JeroController<LawsEvaluatio
|
||||
@AutoLog(value = "未符合项-批量关闭")
|
||||
@ApiOperation(value="未符合项-批量关闭", notes="项目库-批量关闭")
|
||||
@PostMapping(value = "/batchClose")
|
||||
public Result<T> batchClose(@RequestBody Map<String, String> map) {
|
||||
if(!map.containsKey("ids") || StringUtils.isEmpty(map.get("ids"))){
|
||||
public Result<T> batchClose(@RequestBody IdsMapBody body) {
|
||||
String ids = body.getIds();
|
||||
if(StringUtils.isEmpty(ids)){
|
||||
throw new JeroBootException(ResultCommon.PLEASE_SELECT_DATA);
|
||||
}
|
||||
List<String> ids = Arrays.asList(map.get("ids").split(","));
|
||||
List<String> idList = Arrays.asList(ids.split(","));
|
||||
//检查所选数据是否均是待整改状态、当前时间大于预计整改完成日期
|
||||
if (this.check(ids)) {
|
||||
if (this.check(idList)) {
|
||||
throw new JeroBootException(ResultCommon.CANNOT_CLOSE);
|
||||
}
|
||||
lawsEvaluationNotMetService.batchClose(ids);
|
||||
lawsEvaluationNotMetService.batchClose(idList);
|
||||
return Result.OK(ResultCommon.OK);
|
||||
}
|
||||
|
||||
|
||||
-5
@@ -65,9 +65,6 @@ public class LawsEvaluationNotMetServiceImpl extends ServiceImpl<LawsEvaluationN
|
||||
*/
|
||||
@Override
|
||||
public void add(LawsEvaluationNotMet lawsEvaluationNotMet) {
|
||||
Date now = new Date();
|
||||
lawsEvaluationNotMet.setCreateTime(now);
|
||||
lawsEvaluationNotMet.setUpdateTime(now);
|
||||
save(lawsEvaluationNotMet);
|
||||
}
|
||||
|
||||
@@ -79,8 +76,6 @@ public class LawsEvaluationNotMetServiceImpl extends ServiceImpl<LawsEvaluationN
|
||||
*/
|
||||
@Override
|
||||
public void editById(LawsEvaluationNotMet lawsEvaluationNotMet) {
|
||||
Date now = new Date();
|
||||
lawsEvaluationNotMet.setUpdateTime(now);
|
||||
saveOrUpdate(lawsEvaluationNotMet);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user