fix(标准主计划): 完善

This commit is contained in:
yjz
2024-07-19 11:08:14 +08:00
parent 4807ac067f
commit b50a9db5ca
@@ -138,12 +138,22 @@ public class LawsStandardMasterPlanServiceImpl
String type = lawsStandardMasterPlanSublist.getType();
switch (type) {
case LawsStandardMasterPlanCommon.INTERPRETATION_OF_REGULATIONS:
ProcessAll processAll = processAllService.getOne(new LambdaQueryWrapper<ProcessAll>()
.eq(ProcessAll::getPrcType, "2")
.eq(ProcessAll::getPrcStatus, ProcessStatusEnum.COMPLETED.getValue())
.orderByAsc(ProcessAll::getCreateTime).last("limit 1"));
if (!Objects.isNull(processAll)){
lawsStandardMasterPlanSublist.setAssociationId(processAll.getId());
List<ProcessStandardInterpret> list = processStandardInterpretService.list(
new LambdaQueryWrapper<ProcessStandardInterpret>()
.eq(ProcessStandardInterpret::getStandardId,
lawsStandardMasterPlan.getStandardId()));
if (CollectionUtils.isNotEmpty(list)){
List<String> projectIdList = list.stream()
.map(ProcessStandardInterpret::getProjectId)
.collect(Collectors.toList());
ProcessAll processAll = processAllService.getOne(new LambdaQueryWrapper<ProcessAll>()
.in(ProcessAll::getProjectId, projectIdList)
.eq(ProcessAll::getPrcType, "2")
.eq(ProcessAll::getPrcStatus, ProcessStatusEnum.COMPLETED.getValue())
.orderByAsc(ProcessAll::getCreateTime).last("limit 1"));
if (!Objects.isNull(processAll)){
lawsStandardMasterPlanSublist.setAssociationId(processAll.getId());
}
}
break;
case LawsStandardMasterPlanCommon.MARKET_REGULATION_LIST_UPDATE:
@@ -247,23 +257,16 @@ public class LawsStandardMasterPlanServiceImpl
new LambdaQueryWrapper<ProcessNewStandardImport>()
.eq(ProcessNewStandardImport::getStandardId, lawsStandardMasterPlan.getStandardId())
.eq(ProcessNewStandardImport::getApplicableMarket,
lawsStandardMasterPlan.getApplicableMarket())
.orderByAsc(ProcessNewStandardImport::getCreateTime));
lawsStandardMasterPlan.getApplicableMarket()));
if (CollectionUtils.isNotEmpty(list1)){
ProcessNewStandardImport processNewStandardImport = list1.get(0);
ProcessAll processAll = processAllService.getOne(new LambdaQueryWrapper<ProcessAll>()
.eq(ProcessAll::getProcessInstanceId,
processNewStandardImport.getProcessInstanceId())
.eq(ProcessAll::getPrcStatus,ProcessStatusEnum.COMPLETED.getValue()));
if (!Objects.isNull(processAll)){
lawsStandardMasterPlanSublist.setActualCompletionDate(processAll.getEndTime());
}
List<String> processInstanceIdList = list1.stream()
.map(ProcessNewStandardImport::getProcessInstanceId).collect(Collectors.toList());
List<ProcessAll> processAllList = processAllService.list(new LambdaQueryWrapper<ProcessAll>()
.in(ProcessAll::getProcessInstanceId, processInstanceIdList));
.in(ProcessAll::getProcessInstanceId, processInstanceIdList)
.orderByAsc(ProcessAll::getEndTime));
if (CollectionUtils.isNotEmpty(processAllList)){
ProcessAll processAll = processAllList.get(0);
lawsStandardMasterPlanSublist.setActualCompletionDate(processAll.getEndTime());
lawsStandardMasterPlanSublist.setProcessAllList(processAllList);
}
}