Commit 0da9ebbd authored by tianyiming's avatar tianyiming

维修告知修改

parent 30a50df8
...@@ -117,11 +117,11 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto ...@@ -117,11 +117,11 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
maintainInfo.put("powerOfAttorneyList", JSON.parseArray(notice.getPowerOfAttorney())); maintainInfo.put("powerOfAttorneyList", JSON.parseArray(notice.getPowerOfAttorney()));
maintainInfo.put("constructionContractList", JSON.parseArray(notice.getConstructionContract())); maintainInfo.put("constructionContractList", JSON.parseArray(notice.getConstructionContract()));
maintainInfo.put("province", notice.getProvince() + "_" + notice.getProvinceName()); maintainInfo.put("province", notice.getProvince() + "_" + notice.getProvinceName());
maintainInfo.put("city", notice.getCity() + "_" + notice.getCityName()); maintainInfo.put("city", ObjectUtils.isEmpty(notice.getCity()) ? null : notice.getCity() + "_" + notice.getCityName());
maintainInfo.put("constructionManagerId", notice.getConstructionManagerId() + "_" + notice.getConstructionManager()); maintainInfo.put("constructionManagerId",ObjectUtils.isEmpty(notice.getConstructionManagerId()) ? null : notice.getConstructionManagerId() + "_" + notice.getConstructionManager());
maintainInfo.put("county", notice.getCounty() + "_" + notice.getCountyName()); maintainInfo.put("county",ObjectUtils.isEmpty(notice.getCounty()) ? null : notice.getCounty() + "_" + notice.getCountyName());
maintainInfo.put("fullAddress", notice.getProvinceName() + notice.getCityName() + notice.getCounty() + notice.getStreetName() + notice.getAddress()); maintainInfo.put("fullAddress", notice.getProvinceName() + notice.getCityName() + notice.getCounty() + notice.getStreetName() + notice.getAddress());
maintainInfo.put("useUnitCreditCode", notice.getUseUnitCreditCode() + "_" + notice.getUseUnitName()); maintainInfo.put("useUnitCreditCode",ObjectUtils.isEmpty(notice.getUseUnitCreditCode()) ? null : notice.getUseUnitCreditCode() + "_" + notice.getUseUnitName());
maintainInfo.put("receiveOrgCode", notice.getReceiveOrgCode() + "_" + notice.getReceiveOrgName()); maintainInfo.put("receiveOrgCode", notice.getReceiveOrgCode() + "_" + notice.getReceiveOrgName());
if (!ValidationUtil.isEmpty(notice.getInspectionUnitCreditCode()) && !ValidationUtil.isEmpty(notice.getInspectionUnitName())) { if (!ValidationUtil.isEmpty(notice.getInspectionUnitCreditCode()) && !ValidationUtil.isEmpty(notice.getInspectionUnitName())) {
maintainInfo.put("inspectUnitId", notice.getInspectionUnitCreditCode() + "_" + notice.getInspectionUnitName()); maintainInfo.put("inspectUnitId", notice.getInspectionUnitCreditCode() + "_" + notice.getInspectionUnitName());
...@@ -191,6 +191,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto ...@@ -191,6 +191,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
notice.setPromoter(RequestContext.getExeUserId()); notice.setPromoter(RequestContext.getExeUserId());
notice.setNextExecuteIds(String.join(",", workflowResultDto.getNextExecutorRoleIds())); notice.setNextExecuteIds(String.join(",", workflowResultDto.getNextExecutorRoleIds()));
notice.setNoticeStatus(String.valueOf(FlowStatusEnum.TO_BE_PROCESSED.getCode())); notice.setNoticeStatus(String.valueOf(FlowStatusEnum.TO_BE_PROCESSED.getCode()));
notice.setInstanceId(workflowResultDto.getInstanceId());
jgMaintainNoticeMapper.updateById(notice); jgMaintainNoticeMapper.updateById(notice);
// 如果为保存并提交,则创建代办 // 如果为保存并提交,则创建代办
buildTask(Collections.singletonList(notice), Collections.singletonList(workflowResultDto),Boolean.TRUE); buildTask(Collections.singletonList(notice), Collections.singletonList(workflowResultDto),Boolean.TRUE);
...@@ -434,20 +435,20 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto ...@@ -434,20 +435,20 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
dto.setInstanceStatus(workflowResultDtoList.get(i).getNextExecutorRoleIds() + "," + workflowResultDtoList.get(i).getExecutorRoleIds()); dto.setInstanceStatus(workflowResultDtoList.get(i).getNextExecutorRoleIds() + "," + workflowResultDtoList.get(i).getExecutorRoleIds());
dto.setPromoter(reginParams.getUserModel().getUserId()); dto.setPromoter(reginParams.getUserModel().getUserId());
dto.setNextExecuteUserIds(workflowResultDtoList.get(i).getNextExecutorUserIds()); dto.setNextExecuteUserIds(workflowResultDtoList.get(i).getNextExecutorUserIds());
dto.setNextTaskId(workflowResultDtoList.get(i).getNextTaskId());
dto.setInstanceId(workflowResultDtoList.get(i).getInstanceId());
dto.setNoticeStatus(String.valueOf(FlowStatusEnum.TO_BE_PROCESSED.getCode()));
} else {
dto.setNoticeStatus(String.valueOf(FlowStatusEnum.TO_BE_SUBMITTED.getCode()));
} }
dto.setEquList(obj.get("EQU_LIST").toString()); dto.setEquList(obj.get("EQU_LIST").toString());
dto.setSupervisoryCode(obj.get("SUPERVISORY_CODE").toString()); dto.setSupervisoryCode(obj.get("SUPERVISORY_CODE").toString());
dto.setInstallUnitName(reginParams.getCompany().getCompanyName()); dto.setInstallUnitName(reginParams.getCompany().getCompanyName());
dto.setInstallUnitCreditCode(reginParams.getCompany().getCompanyCode()); dto.setInstallUnitCreditCode(reginParams.getCompany().getCompanyCode());
dto.setNextTaskId(workflowResultDtoList.get(i).getNextTaskId());
jgRelationEquip.setEquId(String.valueOf(obj.get("SEQUENCE_NBR"))); jgRelationEquip.setEquId(String.valueOf(obj.get("SEQUENCE_NBR")));
jgRelationEquip.setEquipTransferId(applyNo); jgRelationEquip.setEquipTransferId(applyNo);
if (!CollectionUtils.isEmpty(workflowResultDtoList)) {
dto.setInstanceId(workflowResultDtoList.get(i).getInstanceId());
dto.setNoticeStatus(String.valueOf(FlowStatusEnum.TO_BE_PROCESSED.getCode()));
} else {
dto.setNoticeStatus(String.valueOf(FlowStatusEnum.TO_BE_SUBMITTED.getCode()));
}
dto.setCreateUserName(reginParams.getUserModel().getRealName()); dto.setCreateUserName(reginParams.getUserModel().getRealName());
dto.setCreateUserId(reginParams.getUserModel().getUserId()); dto.setCreateUserId(reginParams.getUserModel().getUserId());
list.add(dto); list.add(dto);
...@@ -486,7 +487,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto ...@@ -486,7 +487,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
//申请单号 //申请单号
dto.setTaskCode(obj.getApplyNo()); dto.setTaskCode(obj.getApplyNo());
//业务类型枚举code值 //业务类型枚举code值
dto.setTaskType(BusinessTypeEnum.JG_INSTALLATION_NOTIFICATION.getCode()); dto.setTaskType(BusinessTypeEnum.JG_MAINTENANCE_NOTIFICATION.getCode());
////业务主键 ////业务主键
dto.setRelationId(obj.getSequenceNbr() + ""); dto.setRelationId(obj.getSequenceNbr() + "");
modelDtos.add(dto); modelDtos.add(dto);
...@@ -507,7 +508,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto ...@@ -507,7 +508,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
taskModelDto.setTaskCode(item.getApplyNo()); taskModelDto.setTaskCode(item.getApplyNo());
taskModelDto.setTaskType(BusinessTypeEnum.JG_MAINTENANCE_NOTIFICATION.getCode()); taskModelDto.setTaskType(BusinessTypeEnum.JG_MAINTENANCE_NOTIFICATION.getCode());
taskModelDto.setTaskTypeLabel(BusinessTypeEnum.JG_MAINTENANCE_NOTIFICATION.getName()); taskModelDto.setTaskTypeLabel(BusinessTypeEnum.JG_MAINTENANCE_NOTIFICATION.getName());
taskModelDto.setRelationId(item.getInstanceId()); taskModelDto.setRelationId(workflowResultDto.getInstanceId());
taskModelDto.setExecuteUserIds(workflowResultDto.getNextExecutorUserIds()); // 工作流API返回 taskModelDto.setExecuteUserIds(workflowResultDto.getNextExecutorUserIds()); // 工作流API返回
taskModelDto.setTaskStatusLabel(FlowStatusEnum.TO_BE_PROCESSED.getName()); taskModelDto.setTaskStatusLabel(FlowStatusEnum.TO_BE_PROCESSED.getName());
taskModelDto.setFlowStatus(commonService.getDictionaryCodeByName(FlowStatusEnum.TO_BE_PROCESSED.getName())); // 流程状态枚举 taskModelDto.setFlowStatus(commonService.getDictionaryCodeByName(FlowStatusEnum.TO_BE_PROCESSED.getName())); // 流程状态枚举
...@@ -699,6 +700,8 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto ...@@ -699,6 +700,8 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(jgMaintainNotice)); JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(jgMaintainNotice));
jsonObject.put("nextExecuteUser", jgMaintainNotice.getNextExecuteIds()); jsonObject.put("nextExecuteUser", jgMaintainNotice.getNextExecuteIds());
jsonObject.put("taskType", BusinessTypeEnum.JG_MAINTENANCE_NOTIFICATION.getCode()); jsonObject.put("taskType", BusinessTypeEnum.JG_MAINTENANCE_NOTIFICATION.getCode());
jsonObject.put("flowStatusLabel", FlowStatusEnum.ROLLBACK.getName());
jsonObject.put("flowStatus", FlowStatusEnum.ROLLBACK.getCode());
commonService.rollbackTask(jgMaintainNotice.getInstanceId(), jsonObject); commonService.rollbackTask(jgMaintainNotice.getInstanceId(), jsonObject);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment