fix(企标稽查流程): 81869
This commit is contained in:
+16
-1
@@ -222,7 +222,7 @@ public class EsInspectFlowServiceImpl implements IEsInspectFlowService {
|
||||
List<EnterpriseStandardInspect> enterpriseStandardInspectList = enterpriseStandardInspectService.listByIds(inspectIdList);
|
||||
if (!enterpriseStandardInspectList.isEmpty()){
|
||||
String errorMsg = enterpriseStandardInspectList.stream().map(EnterpriseStandardInspect::getInspectNo).collect(Collectors.joining(","));
|
||||
throw new JeroBootException("稽查依据标准号为:" + errorMsg +"的稽查计划企标不可重复发起!");
|
||||
throw new JeroBootException("稽查依据标准号为:" + errorMsg + "的稽查计划企标不可重复发起!");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -240,6 +240,21 @@ public class EsInspectFlowServiceImpl implements IEsInspectFlowService {
|
||||
List<EnterpriseStandardInspectRectifyPlan> enterpriseStandardInspectRectifyPlanList = processEsInspect.getEnterpriseStandardInspectRectifyPlanList();
|
||||
for (EnterpriseStandardInspectRectifyPlan enterpriseStandardInspectRectifyPlan : enterpriseStandardInspectRectifyPlanList) {
|
||||
enterpriseStandardInspectRectifyPlan.setProcessEsInspectId(processEsInspect.getId());
|
||||
// 如果整改单位不为空,则同时更新相关稽查内容的整改单位
|
||||
if (StringUtils.isNotBlank(enterpriseStandardInspectRectifyPlan.getResponseDepart())){
|
||||
// 通过整改计划查询稽查报告
|
||||
EnterpriseStandardInspectReport enterpriseStandardInspectReport =
|
||||
enterpriseStandardInspectReportService.getById(
|
||||
enterpriseStandardInspectRectifyPlan.getInspectReportId());
|
||||
if (!Objects.isNull(enterpriseStandardInspectReport)){
|
||||
enterpriseStandardInspectContentService.update(
|
||||
new LambdaUpdateWrapper<EnterpriseStandardInspectContent>()
|
||||
.eq(EnterpriseStandardInspectContent::getId,
|
||||
enterpriseStandardInspectReport.getInspectContentId())
|
||||
.set(EnterpriseStandardInspectContent::getRectificationDepartment,
|
||||
enterpriseStandardInspectRectifyPlan.getResponseDepart()));
|
||||
}
|
||||
}
|
||||
}
|
||||
enterpriseStandardInspectRectifyPlanService.saveOrUpdateBatch(enterpriseStandardInspectRectifyPlanList);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user