fix 80746 车型项目库详情-删除评估过的数据,风险性总览数量没有变化,再次添加提示操作失败
This commit is contained in:
+17
-12
@@ -2,6 +2,7 @@ package com.jero.modules.projectLibrary.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.jero.common.api.vo.ResultCommon;
|
||||
import com.jero.common.constant.CommonConstant;
|
||||
import com.jero.common.system.api.ISysBaseAPI;
|
||||
@@ -12,7 +13,9 @@ import com.jero.modules.laws.standard.service.ILawsDomesticStandardService;
|
||||
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.mapper.LawsAssessMapper;
|
||||
import com.jero.modules.projectLibrary.service.ILawsAssessResultsService;
|
||||
import com.jero.modules.projectLibrary.service.ILawsAssessService;
|
||||
import com.jero.modules.projectLibrary.vo.DecompositionOrderSourceVO;
|
||||
import com.jero.modules.projectLibrary.vo.LawsAssessAddVo;
|
||||
@@ -57,6 +60,8 @@ public class LawsAssessServiceImpl extends ServiceImpl<LawsAssessMapper, LawsAss
|
||||
private ISysBaseAPI sysBaseAPI;
|
||||
@Resource
|
||||
private LawsAssessMapper lawsAssessMapper;
|
||||
@Resource
|
||||
private ILawsAssessResultsService lawsAssessResultsService;
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
@@ -244,21 +249,21 @@ public class LawsAssessServiceImpl extends ServiceImpl<LawsAssessMapper, LawsAss
|
||||
for (String standardNumber : standardNumbers.split(",")) {
|
||||
LawsDomesticStandard lawsDomesticStandard = lawsDomesticStandardService.queryByStandardNumber(standardNumber);
|
||||
if (lawsDomesticStandard != null){
|
||||
String id = lawsDomesticStandard.getId();
|
||||
if (allByProjectIdNotDeletedIdList.contains(id)){
|
||||
String standardId = lawsDomesticStandard.getId();
|
||||
if (allByProjectIdNotDeletedIdList.contains(standardId)){
|
||||
//如果已存在跳过新增
|
||||
continue;
|
||||
}
|
||||
if (allByProjectIdDeletedIdList.contains(id)){
|
||||
if (allByProjectIdDeletedIdList.contains(standardId)){
|
||||
//如果已删除则恢复未删除状态
|
||||
lawsAssessMapper.changeDelFlag(id);
|
||||
lawsAssessMapper.changeDelFlag(projectId,standardId);
|
||||
continue;
|
||||
}
|
||||
LawsAssess lawsAssess = new LawsAssess();
|
||||
lawsAssess.setSource(CommonConstant.STANDARD_SOURCE_1);
|
||||
lawsAssess.setProjectId(projectId);
|
||||
lawsAssess.setStandardId(id);
|
||||
LawsDomesticStandard standard = lawsDomesticStandardService.queryById(id);
|
||||
lawsAssess.setStandardId(standardId);
|
||||
LawsDomesticStandard standard = lawsDomesticStandardService.queryById(standardId);
|
||||
lawsAssess.setStandardNumber(standard.getStandardNumber());
|
||||
lawsAssess.setStandardName(standard.getStandardName());
|
||||
lawsAssess.setProcessStatus(AssessCommon.NOT_EVALUATED);
|
||||
@@ -268,21 +273,21 @@ public class LawsAssessServiceImpl extends ServiceImpl<LawsAssessMapper, LawsAss
|
||||
}
|
||||
LawsOverseasStandard lawsOverseasStandard = lawsOverseasStandardService.queryByStandardNumber(standardNumber);
|
||||
if (lawsOverseasStandard != null){
|
||||
String id = lawsOverseasStandard.getId();
|
||||
if (allByProjectIdNotDeletedIdList.contains(id)){
|
||||
String standardId = lawsOverseasStandard.getId();
|
||||
if (allByProjectIdNotDeletedIdList.contains(standardId)){
|
||||
//如果已存在跳过新增
|
||||
continue;
|
||||
}
|
||||
if (allByProjectIdDeletedIdList.contains(id)){
|
||||
if (allByProjectIdDeletedIdList.contains(standardId)){
|
||||
//如果已删除则恢复未删除状态
|
||||
lawsAssessMapper.changeDelFlag(id);
|
||||
lawsAssessMapper.changeDelFlag(projectId, standardId);
|
||||
continue;
|
||||
}
|
||||
LawsAssess lawsAssess = new LawsAssess();
|
||||
lawsAssess.setSource(CommonConstant.STANDARD_SOURCE_2);
|
||||
lawsAssess.setProjectId(projectId);
|
||||
lawsAssess.setStandardId(id);
|
||||
LawsOverseasStandard standard = lawsOverseasStandardService.queryById(id);
|
||||
lawsAssess.setStandardId(standardId);
|
||||
LawsOverseasStandard standard = lawsOverseasStandardService.queryById(standardId);
|
||||
lawsAssess.setStandardNumber(standard.getStandardNumber());
|
||||
lawsAssess.setStandardName(standard.getStandardName());
|
||||
lawsAssess.setProcessStatus(AssessCommon.NOT_EVALUATED);
|
||||
|
||||
Reference in New Issue
Block a user