Commit 8bc64539 authored by 韩桐桐's avatar 韩桐桐

补正登记bug:36446

parent 479a59c1
......@@ -33,6 +33,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgFactoryInfo;
import com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum;
import com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum;
import com.yeejoin.amos.boot.module.ymt.api.mapper.EquipmentCategoryMapper;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.feign.systemctl.model.TaskV2Model;
import com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO;
import com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO;
......@@ -215,7 +216,7 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
taskModelDto.setFlowStatusLabel(FlowStatusEnum.TO_BE_PROCESSED.getName());
taskModelDto.setTaskType(BusinessTypeEnum.JG_REPLACEMENT_REGISTRATION.getCode());
taskModelDto.setTaskTypeLabel(BusinessTypeEnum.JG_REPLACEMENT_REGISTRATION.getName());
taskModelDto.setStartUser(certRep.getRecUserName());
taskModelDto.setStartUser(certRep.getCreateUserName());
taskModelDto.setStartUserCompanyName(certRep.getUseUnitName());
taskModelDto.setNextExecuteUser(certRep.getNextExecuteIds());
taskModelDto.setStartDate(new Date());
......@@ -357,6 +358,15 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
}
public JgCertificateReplenish buildCertRep(Long sequenceNbr, JSONObject jsonObj, WorkflowResultDto workflowResultDto, FlowStatusEnum flowStatusEnum) {
CompanyBo company = getSelectedOrgInfo().getCompany();
AgencyUserModel userModel = getSelectedOrgInfo().getUserModel();
boolean isCompany = !company.getCompanyType().equals(JG_COMAPNY_TYPE);
String useUnitCode = "";
String useUnitName = "";
if (isCompany) {
useUnitCode = CompanyTypeEnum.INDIVIDUAL.getName().equals(company.getCompanyType()) ? company.getCompanyCode().split("_")[1] : company.getCompanyCode();
useUnitName = CompanyTypeEnum.INDIVIDUAL.getName().equals(company.getCompanyType()) ? company.getCompanyName().split("_")[1] : company.getCompanyName();
}
JgCertificateReplenishDto dto = JSON.parseObject(JSONObject.toJSONString(jsonObj), JgCertificateReplenishDto.class);
Date date = new Date();
String[] receiveOrg = Objects.toString(jsonObj.get(RECEIVE_ORG_CODE)).split("_");
......@@ -376,18 +386,16 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
certRep.setApplyStatus(Objects.toString(flowStatusEnum.getCode()));
certRep.setReceiveOrgCode(receiveOrg[0]);
certRep.setReceiveOrgName(receiveOrg[1]);
certRep.setUseUnitCode(getSelectedOrgInfo().getCompany().getCompanyCode());
certRep.setUseUnitName(getSelectedOrgInfo().getCompany().getCompanyName());
certRep.setUseUnitCode(useUnitCode);
certRep.setUseUnitName(useUnitName);
Optional.ofNullable(jsonObj.get(APPLICATION_FORM_FILE)).ifPresent(x -> certRep.setApplicationFormFile(JSONObject.toJSONString(x)));
Optional.ofNullable(jsonObj.get(OTHER_ACCESSORIES)).ifPresent(x -> certRep.setOtherAccessories(JSONObject.toJSONString(x)));
certRep.setSafetyManagerName(safetyManager[1]);
certRep.setIsDelete(Boolean.FALSE);
certRep.setCreateDate(date);
certRep.setRecDate(date);
certRep.setCreateUserId(getSelectedOrgInfo().getUserModel().getUserId());
certRep.setRecUserId(getSelectedOrgInfo().getUserModel().getUserId());
certRep.setCreateUserName(getSelectedOrgInfo().getUserModel().getRealName());
certRep.setRecUserName(getSelectedOrgInfo().getUserModel().getRealName());
certRep.setCreateUserId(userModel.getUserId());
certRep.setCreateUserName(userModel.getRealName());
return certRep;
}
......@@ -600,7 +608,7 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
.taskCode(taskV2Model.getTaskCode())
.taskType(BusinessTypeEnum.JG_REPLACEMENT_REGISTRATION.getCode())
.taskTypeLabel(BusinessTypeEnum.JG_REPLACEMENT_REGISTRATION.getName())
.relationId(String.valueOf(certRep.getSequenceNbr()))
.relationId(Objects.isNull(certRep.getInstanceId()) ? Objects.toString(certRep.getSequenceNbr()) : certRep.getInstanceId())
.executeUserIds(workflowResultDto.getNextExecutorUserIds())
.taskStatusLabel(statusEnum.getName()).flowStatus(statusEnum.getCode())
.flowCode(workflowResultDto.getNextTaskId())
......@@ -608,6 +616,7 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
.taskContent(String.format("来自%s的业务办理,【申请单号:%s】", certRep.getEquList(), certRep.getApplyNo()))
.taskDesc("")
.startUserId(taskV2Model.getStartUserId())
.startUserCompanyName(certRep.getUseUnitName())
.startUser(taskV2Model.getStartUser())
.startDate(taskV2Model.getStartDate())
.pageType(statusEnum.getCode() == 6614 ? "edit" : "look")
......@@ -674,7 +683,9 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
.flowStatusLabel(FlowStatusEnum.TO_BE_PROCESSED.getName())
.taskContent(String.format("来自%s的业务办理,【申请单号:%s】", certRep.getEquList(), certRep.getApplyNo()))
.taskDesc("")
.startUser(certRep.getCreateUserName()).startUserCompanyName(getSelectedOrgInfo().getCompany().getCompanyName()).startDate(certRep.getCreateDate())
.startUser(certRep.getCreateUserName())
.startUserCompanyName(certRep.getUseUnitName())
.startDate(certRep.getCreateDate())
.model(taskMessageDto)
.nextExecuteUser(certRep.getNextExecuteIds())
.build();
......
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