fix(企标稽查整改): 81096
This commit is contained in:
+47
-38
@@ -263,49 +263,58 @@ public class EsInspectRectifyFlowServiceImpl implements IEsInspectRectifyFlowSer
|
|||||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
Date parse = dateFormat.parse(dateFormat.format(date));
|
Date parse = dateFormat.parse(dateFormat.format(date));
|
||||||
// 是否申请延期
|
// 是否申请延期
|
||||||
if (EsInspectRectifyCommon.OPERATION_TYPE_2.equals(processEsInspectReportVO.getOperationType())
|
if (EsInspectRectifyCommon.OPERATION_TYPE_2.equals(processEsInspectReportVO.getOperationType())){
|
||||||
&& (processEsInspectReportVO.getApplyDelayDate().before(parse)
|
// 更新整改计划完成日期
|
||||||
|| processEsInspectReportVO.getApplyDelayDate().equals(parse))){
|
enterpriseStandardInspectRectifyPlanService.update(
|
||||||
// 生成新整改流程
|
new LambdaUpdateWrapper<EnterpriseStandardInspectRectifyPlan>()
|
||||||
EsInspectRectifyFlowVO newEsInspectReportFlowVO = new EsInspectRectifyFlowVO();
|
.eq(EnterpriseStandardInspectRectifyPlan::getId, processEsInspectReportVO.getInspectRectifyPlanId())
|
||||||
// 处理流程信息
|
.set(EnterpriseStandardInspectRectifyPlan::getPlanCompleteDate, processEsInspectReportVO.getApplyDelayDate()));
|
||||||
ProcessAll newProcessAll = new ProcessAll();
|
|
||||||
newProcessAll.setProjectId(String.valueOf(SnowflakeUtils.snowflake()));
|
|
||||||
newProcessAll.setPrcName(processAll.getPrcName());
|
|
||||||
newEsInspectReportFlowVO.setProcessAll(newProcessAll);
|
|
||||||
|
|
||||||
// 整改计划
|
// 申请延期日期 <= 当前日期 立即生成新流程
|
||||||
EnterpriseStandardInspectRectifyPlan enterpriseStandardInspectRectifyPlan = enterpriseStandardInspectRectifyPlanService.getById(processEsInspectReportVO.getInspectRectifyPlanId());
|
if (processEsInspectReportVO.getApplyDelayDate().before(parse)
|
||||||
|
|| processEsInspectReportVO.getApplyDelayDate().equals(parse)){
|
||||||
|
// 生成新整改流程
|
||||||
|
EsInspectRectifyFlowVO newEsInspectReportFlowVO = new EsInspectRectifyFlowVO();
|
||||||
|
// 处理流程信息
|
||||||
|
ProcessAll newProcessAll = new ProcessAll();
|
||||||
|
newProcessAll.setProjectId(String.valueOf(SnowflakeUtils.snowflake()));
|
||||||
|
newProcessAll.setPrcName(processAll.getPrcName());
|
||||||
|
newEsInspectReportFlowVO.setProcessAll(newProcessAll);
|
||||||
|
|
||||||
// 处理流程审批信息
|
// 整改计划
|
||||||
ProcessApprovalRecord newProcessApprovalRecord = new ProcessApprovalRecord();
|
EnterpriseStandardInspectRectifyPlan enterpriseStandardInspectRectifyPlan =
|
||||||
newProcessApprovalRecord.setId(String.valueOf(SnowflakeUtils.snowflake()));
|
enterpriseStandardInspectRectifyPlanService.getById(processEsInspectReportVO.getInspectRectifyPlanId());
|
||||||
newProcessApprovalRecord.setProjectId(newProcessAll.getProjectId());
|
|
||||||
newProcessApprovalRecord.setUserId(enterpriseStandardInspectRectifyPlan.getResponseUser());
|
|
||||||
newEsInspectReportFlowVO.setProcessApprovalRecord(newProcessApprovalRecord);
|
|
||||||
|
|
||||||
// 处理业务表数据
|
// 处理流程审批信息
|
||||||
ProcessEsInspectRectify processEsInspectRectify = new ProcessEsInspectRectify();
|
ProcessApprovalRecord newProcessApprovalRecord = new ProcessApprovalRecord();
|
||||||
processEsInspectRectify.setId(String.valueOf(SnowflakeUtils.snowflake()));
|
newProcessApprovalRecord.setId(String.valueOf(SnowflakeUtils.snowflake()));
|
||||||
processEsInspectRectify.setProjectId(newProcessAll.getProjectId());
|
newProcessApprovalRecord.setProjectId(newProcessAll.getProjectId());
|
||||||
processEsInspectRectify.setIsDelayCreate(YesOrNoEnum.NO.getValue());
|
newProcessApprovalRecord.setUserId(enterpriseStandardInspectRectifyPlan.getResponseUser());
|
||||||
processEsInspectRectify.setInspectRectifyPlanId(processEsInspectReportVO.getInspectRectifyPlanId());
|
newEsInspectReportFlowVO.setProcessApprovalRecord(newProcessApprovalRecord);
|
||||||
newEsInspectReportFlowVO.setProcessEsInspectRectify(processEsInspectRectify);
|
|
||||||
processEsInspectRectifyService.save(processEsInspectRectify);
|
|
||||||
|
|
||||||
// 处理人员信息
|
// 处理业务表数据
|
||||||
Map<String, Object> newMap = new HashMap<>();
|
ProcessEsInspectRectify processEsInspectRectify = new ProcessEsInspectRectify();
|
||||||
newMap.put("responsible", enterpriseStandardInspectRectifyPlan.getResponseUser());
|
processEsInspectRectify.setId(String.valueOf(SnowflakeUtils.snowflake()));
|
||||||
newMap.put("leader", "请选择");
|
processEsInspectRectify.setProjectId(newProcessAll.getProjectId());
|
||||||
newMap.put("responsibleApproval", "请选择");
|
processEsInspectRectify.setIsDelayCreate(YesOrNoEnum.NO.getValue());
|
||||||
newEsInspectReportFlowVO.setMap(newMap);
|
processEsInspectRectify.setInspectRectifyPlanId(processEsInspectReportVO.getInspectRectifyPlanId());
|
||||||
createReportFlow(newEsInspectReportFlowVO);
|
newEsInspectReportFlowVO.setProcessEsInspectRectify(processEsInspectRectify);
|
||||||
|
processEsInspectRectifyService.save(processEsInspectRectify);
|
||||||
|
|
||||||
// 修改状态
|
// 处理人员信息
|
||||||
processEsInspectRectifyService.update(
|
Map<String, Object> newMap = new HashMap<>();
|
||||||
new LambdaUpdateWrapper<ProcessEsInspectRectify>()
|
newMap.put("responsible", enterpriseStandardInspectRectifyPlan.getResponseUser());
|
||||||
.in(ProcessEsInspectRectify::getId, processEsInspectReportVO.getId())
|
newMap.put("leader", "请选择");
|
||||||
.set(ProcessEsInspectRectify::getIsDelayCreate, YesOrNoEnum.YES.getValue()));
|
newMap.put("responsibleApproval", "请选择");
|
||||||
|
newEsInspectReportFlowVO.setMap(newMap);
|
||||||
|
createReportFlow(newEsInspectReportFlowVO);
|
||||||
|
|
||||||
|
// 修改状态
|
||||||
|
processEsInspectRectifyService.update(
|
||||||
|
new LambdaUpdateWrapper<ProcessEsInspectRectify>()
|
||||||
|
.in(ProcessEsInspectRectify::getId, processEsInspectReportVO.getId())
|
||||||
|
.set(ProcessEsInspectRectify::getIsDelayCreate, YesOrNoEnum.YES.getValue()));
|
||||||
|
}
|
||||||
}else {
|
}else {
|
||||||
// 更新整改状态
|
// 更新整改状态
|
||||||
enterpriseStandardInspectRectifyPlanService.update(new LambdaUpdateWrapper<EnterpriseStandardInspectRectifyPlan>()
|
enterpriseStandardInspectRectifyPlanService.update(new LambdaUpdateWrapper<EnterpriseStandardInspectRectifyPlan>()
|
||||||
|
|||||||
Reference in New Issue
Block a user