fix(88091): 增加对比校验
This commit is contained in:
@@ -8,6 +8,8 @@ import com.jero.modules.activiti.enums.ProcessStatusEnum;
|
|||||||
import com.jero.modules.activiti.process.standardinterpret.entity.ProcessStandardInterpret;
|
import com.jero.modules.activiti.process.standardinterpret.entity.ProcessStandardInterpret;
|
||||||
import com.jero.modules.activiti.process.standardinterpret.service.ProcessStandardInterpretService;
|
import com.jero.modules.activiti.process.standardinterpret.service.ProcessStandardInterpretService;
|
||||||
import com.jero.modules.activiti.service.ProcessAllService;
|
import com.jero.modules.activiti.service.ProcessAllService;
|
||||||
|
import com.jero.modules.compare.entity.SarFileCompareInfo;
|
||||||
|
import com.jero.modules.compare.service.ISarFileCompareInfoService;
|
||||||
import com.jero.modules.laws.standard.entity.LawsDomesticStandard;
|
import com.jero.modules.laws.standard.entity.LawsDomesticStandard;
|
||||||
import com.jero.modules.laws.standard.service.DoNotSplitStandardProvider;
|
import com.jero.modules.laws.standard.service.DoNotSplitStandardProvider;
|
||||||
import com.jero.modules.laws.standard.service.ILawsDomesticStandardService;
|
import com.jero.modules.laws.standard.service.ILawsDomesticStandardService;
|
||||||
@@ -34,6 +36,9 @@ public class StandardUtil {
|
|||||||
@Resource
|
@Resource
|
||||||
private ILawsDomesticStandardService lawsDomesticStandardService;
|
private ILawsDomesticStandardService lawsDomesticStandardService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ISarFileCompareInfoService sarFileCompareInfoService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ProcessStandardInterpretService processStandardInterpretService;
|
private ProcessStandardInterpretService processStandardInterpretService;
|
||||||
|
|
||||||
@@ -94,11 +99,21 @@ public class StandardUtil {
|
|||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
int count = sarFileSplitInfoService.count(
|
int count = sarFileSplitInfoService.count(
|
||||||
new LambdaQueryWrapper<SarFileSplitInfoEO>()
|
new LambdaQueryWrapper<SarFileSplitInfoEO>()
|
||||||
.in(SarFileSplitInfoEO::getStandardId, needDelStandardIdList)
|
.isNull(SarFileSplitInfoEO::getPublishBeforeId)
|
||||||
.or().in(SarFileSplitInfoEO::getSerialNumber, standardNumberList));
|
.and(w -> w.in(SarFileSplitInfoEO::getStandardId, needDelStandardIdList)
|
||||||
|
.or().in(SarFileSplitInfoEO::getSerialNumber, standardNumberList)));
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
throw new JeroBootException(ResultCommon.SCC_DELETE_STANDARD_ERROR2);
|
throw new JeroBootException(ResultCommon.SCC_DELETE_STANDARD_ERROR2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询对比数据
|
||||||
|
int count2 = sarFileCompareInfoService.count(
|
||||||
|
new LambdaQueryWrapper<SarFileCompareInfo>()
|
||||||
|
.in(SarFileCompareInfo::getSerialNumberLeft, standardNumberList)
|
||||||
|
.or().in(SarFileCompareInfo::getSerialNumberRight, standardNumberList));
|
||||||
|
if (count2 > 0) {
|
||||||
|
throw new JeroBootException(ResultCommon.SCC_DELETE_STANDARD_ERROR4);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user