Commit eaad6c67 authored by 韩桐桐's avatar 韩桐桐

补证登记相关

parent 078d7b81
...@@ -103,6 +103,7 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate ...@@ -103,6 +103,7 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
public static final String APPLY_STATUS = "applyStatus"; public static final String APPLY_STATUS = "applyStatus";
public static final String APPLY_NO = "applyNo"; public static final String APPLY_NO = "applyNo";
public static final String APPLICATION_FORM_FILE_URL = "applicationFormFileUrl"; public static final String APPLICATION_FORM_FILE_URL = "applicationFormFileUrl";
public static String JG_COMAPNY_TYPE = "监管机构";
private final List<String> NOT_FLOWING_STATE = Arrays.asList("6610", "6614", "6615", "6617", "6616"); private final List<String> NOT_FLOWING_STATE = Arrays.asList("6610", "6614", "6615", "6617", "6616");
private final List<String> ATTACHMENT_FIELD = Arrays.asList(APPLICATION_FORM_FILE, OTHER_ACCESSORIES); private final List<String> ATTACHMENT_FIELD = Arrays.asList(APPLICATION_FORM_FILE, OTHER_ACCESSORIES);
private static final String EQUIP_TRANSFER_PROCESS_KEY = "certReplenish"; private static final String EQUIP_TRANSFER_PROCESS_KEY = "certReplenish";
...@@ -186,7 +187,7 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate ...@@ -186,7 +187,7 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
certRep.setNextTaskId(processTaskDTO.getNextTask().get(0).getId()); certRep.setNextTaskId(processTaskDTO.getNextTask().get(0).getId());
// 更新下一步可执行人 // 更新下一步可执行人
certRep.setNextExecuteUserIds(nextUserIds); certRep.setNextExecuteUserIds(nextUserIds);
updateTaskModel(certRep); commonService.deleteTasksByRelationId(certRep.getSequenceNbr().toString());
createTaskModel(certRep, processTaskDTO, nextUserIds); createTaskModel(certRep, processTaskDTO, nextUserIds);
} }
commonService.saveExecuteFlowData2Redis(certRep.getInstanceId(), buildInstanceRuntimeData(certRep)); commonService.saveExecuteFlowData2Redis(certRep.getInstanceId(), buildInstanceRuntimeData(certRep));
...@@ -212,10 +213,11 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate ...@@ -212,10 +213,11 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
taskModelDto.setFlowStatus(FlowStatusEnum.TO_BE_PROCESSED.getCode()); taskModelDto.setFlowStatus(FlowStatusEnum.TO_BE_PROCESSED.getCode());
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.setStartUser(certRep.getRecUserName()); taskModelDto.setStartUser(certRep.getRecUserName());
taskModelDto.setStartUserCompanyName(certRep.getUseUnitName()); taskModelDto.setStartUserCompanyName(certRep.getUseUnitName());
taskModelDto.setNextExecuteUser(certRep.getNextExecuteIds()); taskModelDto.setNextExecuteUser(certRep.getNextExecuteIds());
taskModelDto.setStartDate(certRep.getCreateDate() == null ? new Date() : certRep.getCreateDate()); taskModelDto.setStartDate(new Date());
TaskMessageDto taskMessageDto = new TaskMessageDto(); TaskMessageDto taskMessageDto = new TaskMessageDto();
BeanUtils.copyProperties(certRep, taskMessageDto); BeanUtils.copyProperties(certRep, taskMessageDto);
taskModelDto.setModel(taskMessageDto); taskModelDto.setModel(taskMessageDto);
...@@ -552,7 +554,7 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate ...@@ -552,7 +554,7 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
.flowCode(workflowResultDto.getNextTaskId()) .flowCode(workflowResultDto.getNextTaskId())
.flowStatusLabel(statusEnum.getName()) .flowStatusLabel(statusEnum.getName())
.taskContent(String.format("来自%s的业务办理,【申请单号:%s】", certRep.getEquList(), certRep.getApplyNo())) .taskContent(String.format("来自%s的业务办理,【申请单号:%s】", certRep.getEquList(), certRep.getApplyNo()))
.taskDesc(String.format("来自%s的业务办理,【申请单号:%s】", certRep.getEquList(), certRep.getApplyNo())).startUserCompanyName(getSelectedOrgInfo().getCompany().getCompanyName()) .taskDesc("")
.startUserId(taskV2Model.getStartUserId()) .startUserId(taskV2Model.getStartUserId())
.startUser(taskV2Model.getStartUser()) .startUser(taskV2Model.getStartUser())
.startDate(taskV2Model.getStartDate()) .startDate(taskV2Model.getStartDate())
...@@ -604,7 +606,25 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate ...@@ -604,7 +606,25 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
private TaskModelDto buildTaskModelDto(JgCertificateReplenish certRep, WorkflowResultDto workflowResultDto) { private TaskModelDto buildTaskModelDto(JgCertificateReplenish certRep, WorkflowResultDto workflowResultDto) {
TaskMessageDto taskMessageDto = new TaskMessageDto(); TaskMessageDto taskMessageDto = new TaskMessageDto();
BeanUtil.copyProperties(certRep, taskMessageDto); BeanUtil.copyProperties(certRep, taskMessageDto);
return TaskModelDto.builder().flowCreateDate(certRep.getCreateDate()).taskName(workflowResultDto.getNextTaskName()).taskCode(certRep.getApplyNo()).taskType(BusinessTypeEnum.JG_REPLACEMENT_REGISTRATION.getCode()).taskTypeLabel(BusinessTypeEnum.JG_REPLACEMENT_REGISTRATION.getName()).relationId(workflowResultDto.getInstanceId()).executeUserIds(workflowResultDto.getNextExecutorUserIds()).taskStatus(FlowStatusEnum.TO_BE_PROCESSED.getCode()).taskStatusLabel(FlowStatusEnum.TO_BE_PROCESSED.getName()).flowStatus(FlowStatusEnum.TO_BE_PROCESSED.getCode()).flowCode(workflowResultDto.getNextTaskId()).flowStatusLabel(FlowStatusEnum.TO_BE_PROCESSED.getName()).taskContent(String.format("来自%s的业务办理,【申请单号:%s】", certRep.getEquList(), certRep.getApplyNo())).taskDesc(String.format("来自%s的业务办理,【申请单号:%s】", certRep.getEquList(), certRep.getApplyNo())).startUserId(certRep.getCreateUserId()).startUser(certRep.getCreateUserName()).startUserCompanyName(getSelectedOrgInfo().getCompany().getCompanyName()).startDate(certRep.getCreateDate()).model(taskMessageDto).nextExecuteUser(certRep.getNextExecuteIds()).build(); return TaskModelDto.builder()
.flowCreateDate(certRep.getCreateDate())
.taskName(workflowResultDto.getNextTaskName())
.taskCode(certRep.getApplyNo())
.taskType(BusinessTypeEnum.JG_REPLACEMENT_REGISTRATION.getCode())
.taskTypeLabel(BusinessTypeEnum.JG_REPLACEMENT_REGISTRATION.getName())
.relationId(workflowResultDto.getInstanceId())
.executeUserIds(workflowResultDto.getNextExecutorUserIds())
.taskStatus(FlowStatusEnum.TO_BE_PROCESSED.getCode())
.taskStatusLabel(FlowStatusEnum.TO_BE_PROCESSED.getName())
.flowStatus(FlowStatusEnum.TO_BE_PROCESSED.getCode())
.flowCode(workflowResultDto.getNextTaskId())
.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())
.model(taskMessageDto)
.nextExecuteUser(certRep.getNextExecuteIds())
.build();
} }
...@@ -613,8 +633,8 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate ...@@ -613,8 +633,8 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
*/ */
public Page<JgCertificateReplenish> queryForJgCertificateReplenishPage(Page<JgCertificateReplenish> page, JgCertificateReplenishDto dto) { public Page<JgCertificateReplenish> queryForJgCertificateReplenishPage(Page<JgCertificateReplenish> page, JgCertificateReplenishDto dto) {
CompanyBo company = getSelectedOrgInfo().getCompany(); CompanyBo company = getSelectedOrgInfo().getCompany();
boolean isCompany = company.getLevel().equals(BaseController.COMPANY_TYPE_COMPANY); boolean isCompany = !company.getCompanyType().equals(JG_COMAPNY_TYPE);
boolean isSupervision = company.getLevel().equals(BaseController.COMPANY_TYPE_SUPERVISION); boolean isSupervision = company.getCompanyType().equals(JG_COMAPNY_TYPE);
String useUnitCode = ""; String useUnitCode = "";
if (isCompany) { if (isCompany) {
useUnitCode = CompanyTypeEnum.INDIVIDUAL.getName().equals(company.getCompanyType()) ? company.getCompanyCode().split("_")[1] : company.getCompanyCode(); useUnitCode = CompanyTypeEnum.INDIVIDUAL.getName().equals(company.getCompanyType()) ? company.getCompanyCode().split("_")[1] : company.getCompanyCode();
...@@ -623,6 +643,7 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate ...@@ -623,6 +643,7 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
IPage<JgCertificateReplenish> replenishIPage = this.lambdaQuery() IPage<JgCertificateReplenish> replenishIPage = this.lambdaQuery()
// 监管 // 监管
.eq(isSupervision, JgCertificateReplenish::getReceiveOrgCode, company.getCompanyCode()) .eq(isSupervision, JgCertificateReplenish::getReceiveOrgCode, company.getCompanyCode())
.isNotNull(isSupervision, JgCertificateReplenish::getInstanceId)
// 非监管 // 非监管
.eq(isCompany, JgCertificateReplenish::getUseUnitCode, useUnitCode) .eq(isCompany, JgCertificateReplenish::getUseUnitCode, useUnitCode)
.eq(JgCertificateReplenish::getIsDelete, Boolean.FALSE) .eq(JgCertificateReplenish::getIsDelete, Boolean.FALSE)
...@@ -806,6 +827,7 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate ...@@ -806,6 +827,7 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(certRep)); JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(certRep));
jsonObject.put("nextExecuteUser", certRep.getNextExecuteIds()); jsonObject.put("nextExecuteUser", certRep.getNextExecuteIds());
jsonObject.put("taskType", BusinessTypeEnum.JG_REPLACEMENT_REGISTRATION.getCode()); jsonObject.put("taskType", BusinessTypeEnum.JG_REPLACEMENT_REGISTRATION.getCode());
jsonObject.put("taskTypeLabel", BusinessTypeEnum.JG_REPLACEMENT_REGISTRATION.getName());
jsonObject.put("flowStatus", FlowStatusEnum.ROLLBACK.getCode()); jsonObject.put("flowStatus", FlowStatusEnum.ROLLBACK.getCode());
jsonObject.put("flowStatusLabel", FlowStatusEnum.ROLLBACK.getName()); jsonObject.put("flowStatusLabel", FlowStatusEnum.ROLLBACK.getName());
commonService.rollbackTask(certRep.getInstanceId(), jsonObject); commonService.rollbackTask(certRep.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