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

补正登记bug:36446

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