Commit 245211d5 authored by 王果's avatar 王果

Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register

parents 2523ee2a 1dd60d1b
...@@ -142,4 +142,7 @@ public class JgChangeRegistrationUnitDto extends BaseDto { ...@@ -142,4 +142,7 @@ public class JgChangeRegistrationUnitDto extends BaseDto {
@ApiModelProperty(value = "监管码") @ApiModelProperty(value = "监管码")
private String supervisoryCode; private String supervisoryCode;
@ApiModelProperty(value = "分类")
private String equList;
} }
...@@ -217,6 +217,9 @@ public class JgChangeRegistrationUnit extends BaseEntity { ...@@ -217,6 +217,9 @@ public class JgChangeRegistrationUnit extends BaseEntity {
@TableField(exist = false) @TableField(exist = false)
private String supervisoryCode; private String supervisoryCode;
@TableField(exist = false)
private String equList;
/** /**
*工作流下一节点任务id *工作流下一节点任务id
*/ */
......
...@@ -48,7 +48,6 @@ import org.springframework.util.StringUtils; ...@@ -48,7 +48,6 @@ import org.springframework.util.StringUtils;
import org.typroject.tyboot.core.foundation.context.RequestContext; import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil; import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.*; import java.util.*;
...@@ -143,7 +142,6 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg ...@@ -143,7 +142,6 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
String nextUserIds = ""; String nextUserIds = "";
if ("1".equals(submitType)) { if ("1".equals(submitType)) {
// 发起流程 // 发起流程
try {
ActWorkflowBatchDTO actWorkflowBatchDTO = new ActWorkflowBatchDTO(); ActWorkflowBatchDTO actWorkflowBatchDTO = new ActWorkflowBatchDTO();
List<ActWorkflowStartDTO> list = new ArrayList<>(); List<ActWorkflowStartDTO> list = new ArrayList<>();
ActWorkflowStartDTO dto = new ActWorkflowStartDTO(); ActWorkflowStartDTO dto = new ActWorkflowStartDTO();
...@@ -161,10 +159,6 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg ...@@ -161,10 +159,6 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
taskName[0] = processTasks.get(0).getNextTask().get(0).getName(); taskName[0] = processTasks.get(0).getNextTask().get(0).getName();
List<WorkflowResultDto> workflowResultDtos = commonService.buildWorkFlowInfo(processTasks); List<WorkflowResultDto> workflowResultDtos = commonService.buildWorkFlowInfo(processTasks);
nextUserIds = workflowResultDtos.get(0).getNextExecutorUserIds(); nextUserIds = workflowResultDtos.get(0).getNextExecutorUserIds();
} catch (Exception e) {
log.error("提交失败:{}", e);
throw new BadRequest("提交失败" + e.getMessage());
}
} }
JgChangeRegistrationName dto = new JgChangeRegistrationName(); JgChangeRegistrationName dto = new JgChangeRegistrationName();
// 字段转换 // 字段转换
...@@ -219,7 +213,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg ...@@ -219,7 +213,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
// 提交创建待办逻辑 // 提交创建待办逻辑
if ("1".equals(submitType)) { if ("1".equals(submitType)) {
//提交时先删除之前的暂存待办数据 //提交时先删除之前的暂存待办数据
commonService.deleteTaskModel(dto.getSequenceNbr()+""); commonService.deleteTaskModel(dto.getSequenceNbr() + "");
// 创建待办 // 创建待办
TaskModelDto taskModelDto = new TaskModelDto(); TaskModelDto taskModelDto = new TaskModelDto();
taskModelDto.setFlowCreateDate(dto.getApplyDate()); taskModelDto.setFlowCreateDate(dto.getApplyDate());
...@@ -256,13 +250,13 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg ...@@ -256,13 +250,13 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
dto.setChangeCertificate(null); dto.setChangeCertificate(null);
taskModelDto.setModel(dto); taskModelDto.setModel(dto);
//摘要 按原有规则组装 //摘要 按原有规则组装
taskModelDto.setTaskContent("来自"+dto.getUseUnitCreditCode()+"【"+dto.getReceiveOrgName()+"】的业务办理,【申请单号:"+dto.getApplyNo()+"】"); taskModelDto.setTaskContent(buildTaskContent(dto) + "待提交");
//申请单号 //申请单号
taskModelDto.setTaskCode(dto.getApplyNo()); taskModelDto.setTaskCode(dto.getApplyNo());
//业务类型枚举code值 //业务类型枚举code值
taskModelDto.setTaskType(BusinessTypeEnum.JG_NAME_CHANGE_REGISTRATION.getCode()); taskModelDto.setTaskType(BusinessTypeEnum.JG_NAME_CHANGE_REGISTRATION.getCode());
//业务主键 //业务主键
taskModelDto.setRelationId(dto.getSequenceNbr()+""); taskModelDto.setRelationId(dto.getSequenceNbr() + "");
commonService.buildTaskModel(Collections.singletonList(taskModelDto)); commonService.buildTaskModel(Collections.singletonList(taskModelDto));
} }
} }
...@@ -295,7 +289,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg ...@@ -295,7 +289,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
if ("1".equals(submitType)) { if ("1".equals(submitType)) {
//发起流程 //发起流程
if (!StringUtils.hasText(jgChangeRegistrationName.getInstanceId())) { if (!StringUtils.hasText(jgChangeRegistrationName.getInstanceId())) {
try {
List<ProcessTaskDTO> processTasks = new ArrayList<>(); List<ProcessTaskDTO> processTasks = new ArrayList<>();
ActWorkflowBatchDTO actWorkflowBatchDTO = new ActWorkflowBatchDTO(); ActWorkflowBatchDTO actWorkflowBatchDTO = new ActWorkflowBatchDTO();
List<ActWorkflowStartDTO> list = new ArrayList<>(); List<ActWorkflowStartDTO> list = new ArrayList<>();
...@@ -322,10 +316,6 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg ...@@ -322,10 +316,6 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
jgChangeRegistrationName.setAuditStatus(WorkFlowStatusEnum.UNIT_RENAME_RECEIVE.getPass()); jgChangeRegistrationName.setAuditStatus(WorkFlowStatusEnum.UNIT_RENAME_RECEIVE.getPass());
// 创建待办 // 创建待办
createTaskModel(jgChangeRegistrationName, taskName, "1", nextUserIds); createTaskModel(jgChangeRegistrationName, taskName, "1", nextUserIds);
} catch (Exception e) {
log.error("提交失败:{}", e);
throw new BadRequest("提交失败" + e.getMessage());
}
} else { } else {
// 执行一步 // 执行一步
ProcessTaskDTO processTaskDTO = submit(op, jgChangeRegistrationName); ProcessTaskDTO processTaskDTO = submit(op, jgChangeRegistrationName);
...@@ -392,12 +382,12 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg ...@@ -392,12 +382,12 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
private String getPageTypeForReject(String operate, String auditStatus) { private String getPageTypeForReject(String operate, String auditStatus) {
// 驳回 // 驳回
if("1".equals(operate)){ if ("1".equals(operate)) {
// 且驳回到的节点为使用单位提交 则可编辑 // 且驳回到的节点为使用单位提交 则可编辑
if(WorkFlowStatusEnum.UNIT_RENAME_SUBMIT.getPass().equals(auditStatus) || if (WorkFlowStatusEnum.UNIT_RENAME_SUBMIT.getPass().equals(auditStatus) ||
WorkFlowStatusEnum.UNIT_RENAME_SUBMIT.getReject().equals(auditStatus) || WorkFlowStatusEnum.UNIT_RENAME_SUBMIT.getReject().equals(auditStatus) ||
WorkFlowStatusEnum.UNIT_RENAME_SUBMIT.getRollBack().equals(auditStatus) WorkFlowStatusEnum.UNIT_RENAME_SUBMIT.getRollBack().equals(auditStatus)
){ ) {
// urlInfo.json 文件的 pageType // urlInfo.json 文件的 pageType
return "edit"; return "edit";
} }
...@@ -413,7 +403,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg ...@@ -413,7 +403,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
dto.setResultCode("approvalStatus"); dto.setResultCode("approvalStatus");
dto.setTaskId(jgChangeRegistrationName.getNextTaskId()); dto.setTaskId(jgChangeRegistrationName.getNextTaskId());
dto.setComment("提交流程"); dto.setComment("提交流程");
dto.setNextExecuteUserCompanyCode(this.getNextUserOrgCode(operate,jgChangeRegistrationName)); dto.setNextExecuteUserCompanyCode(this.getNextUserOrgCode(operate, jgChangeRegistrationName));
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
map.put("approvalStatus", operate); map.put("approvalStatus", operate);
dto.setVariable(map); dto.setVariable(map);
...@@ -476,17 +466,17 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg ...@@ -476,17 +466,17 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
jsonObject.put("taskType", BusinessTypeEnum.JG_NAME_CHANGE_REGISTRATION.getCode()); jsonObject.put("taskType", BusinessTypeEnum.JG_NAME_CHANGE_REGISTRATION.getCode());
jsonObject.put("flowStatus", this.getTaskCodeByName(jgChangeRegistrationName.getAuditStatus())); jsonObject.put("flowStatus", this.getTaskCodeByName(jgChangeRegistrationName.getAuditStatus()));
jsonObject.put("flowStatusLabel", jgChangeRegistrationName.getAuditStatus()); jsonObject.put("flowStatusLabel", jgChangeRegistrationName.getAuditStatus());
jsonObject.put("changeCertificate",null); jsonObject.put("changeCertificate", null);
// 判断撤回后当前的节点,如果当前节点为提交节点则页面可编辑 // 判断撤回后当前的节点,如果当前节点为提交节点则页面可编辑
jsonObject.put("pageType",this.getPageTypeByCurrentNode(jgChangeRegistrationName.getAuditStatus())); jsonObject.put("pageType", this.getPageTypeByCurrentNode(jgChangeRegistrationName.getAuditStatus()));
commonService.rollbackTask(instanceId, jsonObject); commonService.rollbackTask(instanceId, jsonObject);
} }
private String getPageTypeByCurrentNode(String auditStatus) { private String getPageTypeByCurrentNode(String auditStatus) {
if(WorkFlowStatusEnum.UNIT_RENAME_SUBMIT.getPass().equals(auditStatus) || if (WorkFlowStatusEnum.UNIT_RENAME_SUBMIT.getPass().equals(auditStatus) ||
WorkFlowStatusEnum.UNIT_RENAME_SUBMIT.getReject().equals(auditStatus) || WorkFlowStatusEnum.UNIT_RENAME_SUBMIT.getReject().equals(auditStatus) ||
WorkFlowStatusEnum.UNIT_RENAME_SUBMIT.getRollBack().equals(auditStatus) WorkFlowStatusEnum.UNIT_RENAME_SUBMIT.getRollBack().equals(auditStatus)
){ ) {
// urlInfo.json 文件的 pageType // urlInfo.json 文件的 pageType
return "edit"; return "edit";
} else { } else {
...@@ -497,7 +487,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg ...@@ -497,7 +487,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
public void flowExecute(Long id, String instanceId, String operate, String comment) { public void flowExecute(Long id, String instanceId, String operate, String comment) {
try {
JgChangeRegistrationName jgChangeRegistrationName = this.getBaseMapper().selectById(id); JgChangeRegistrationName jgChangeRegistrationName = this.getBaseMapper().selectById(id);
String taskId = jgChangeRegistrationName.getNextTaskId(); String taskId = jgChangeRegistrationName.getNextTaskId();
//组装信息 //组装信息
...@@ -505,7 +495,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg ...@@ -505,7 +495,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
dto.setResultCode("approvalStatus"); dto.setResultCode("approvalStatus");
dto.setTaskId(taskId); dto.setTaskId(taskId);
dto.setComment(comment); dto.setComment(comment);
dto.setNextExecuteUserCompanyCode(this.getNextUserOrgCode(operate,jgChangeRegistrationName)); dto.setNextExecuteUserCompanyCode(this.getNextUserOrgCode(operate, jgChangeRegistrationName));
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
map.put("approvalStatus", operate); map.put("approvalStatus", operate);
if (!ObjectUtils.isEmpty(jgChangeRegistrationName.getInstanceStatus()) && if (!ObjectUtils.isEmpty(jgChangeRegistrationName.getInstanceStatus()) &&
...@@ -518,19 +508,16 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg ...@@ -518,19 +508,16 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
ProcessTaskDTO processTaskDTO = cmWorkflowService.complete(taskId, dto); ProcessTaskDTO processTaskDTO = cmWorkflowService.complete(taskId, dto);
// 更新下一步执行人、创建待办 // 更新下一步执行人、创建待办
updateExecuteIds(instanceId, id, operate, processTaskDTO); updateExecuteIds(instanceId, id, operate, processTaskDTO);
} catch (Exception e) {
e.printStackTrace();
}
} }
private String getNextUserOrgCode(String operate, JgChangeRegistrationName jgChangeRegistrationName) { private String getNextUserOrgCode(String operate, JgChangeRegistrationName jgChangeRegistrationName) {
if("0".equals(operate)){ if ("0".equals(operate)) {
// 执行通过节点,单位code为接收机构单位信息 // 执行通过节点,单位code为接收机构单位信息
return jgChangeRegistrationName.getReceiveOrgCode(); return jgChangeRegistrationName.getReceiveOrgCode();
} }
if(jgChangeRegistrationName.getAuditStatus().equals(WorkFlowStatusEnum.UNIT_RENAME_RECEIVE.getPass()) if (jgChangeRegistrationName.getAuditStatus().equals(WorkFlowStatusEnum.UNIT_RENAME_RECEIVE.getPass())
|| jgChangeRegistrationName.getAuditStatus().equals(WorkFlowStatusEnum.UNIT_RENAME_RECEIVE.getReject()) || jgChangeRegistrationName.getAuditStatus().equals(WorkFlowStatusEnum.UNIT_RENAME_RECEIVE.getReject())
|| jgChangeRegistrationName.getAuditStatus().equals(WorkFlowStatusEnum.UNIT_RENAME_RECEIVE.getRollBack())){ || jgChangeRegistrationName.getAuditStatus().equals(WorkFlowStatusEnum.UNIT_RENAME_RECEIVE.getRollBack())) {
// 驳回且当前节点为一键节点时,单位code为发起人单位信息 // 驳回且当前节点为一键节点时,单位code为发起人单位信息
return jgChangeRegistrationName.getUseUnitCreditCode(); return jgChangeRegistrationName.getUseUnitCreditCode();
} }
......
...@@ -26,6 +26,7 @@ import com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils; ...@@ -26,6 +26,7 @@ import com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils;
import com.yeejoin.amos.boot.module.jg.flc.api.fegin.WorkFlowFeignService; import com.yeejoin.amos.boot.module.jg.flc.api.fegin.WorkFlowFeignService;
import com.yeejoin.amos.boot.module.ymt.api.entity.*; import com.yeejoin.amos.boot.module.ymt.api.entity.*;
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.EquipmentClassifityEnum;
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.*; import com.yeejoin.amos.boot.module.ymt.api.mapper.*;
import com.yeejoin.amos.component.feign.model.FeignClientResult; import com.yeejoin.amos.component.feign.model.FeignClientResult;
...@@ -504,7 +505,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg ...@@ -504,7 +505,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
dto.setUseInnerCode(ValidationUtil.isEmpty(obj.get("USE_INNER_CODE")) ? "" : String.valueOf(obj.get("USE_INNER_CODE"))); dto.setUseInnerCode(ValidationUtil.isEmpty(obj.get("USE_INNER_CODE")) ? "" : String.valueOf(obj.get("USE_INNER_CODE")));
dto.setEquAddress((String.valueOf(obj.get("ADDRESS")))); dto.setEquAddress((String.valueOf(obj.get("ADDRESS"))));
dto.setSupervisoryCode(String.valueOf(obj.get("SUPERVISORY_CODE"))); dto.setSupervisoryCode(String.valueOf(obj.get("SUPERVISORY_CODE")));
dto.setEquList(String.valueOf(obj.get("EQU_LIST")));
jgRelationEquip.setEquId(String.valueOf(obj.get("SEQUENCE_NBR"))); jgRelationEquip.setEquId(String.valueOf(obj.get("SEQUENCE_NBR")));
jgRelationEquip.setUnitChangeRegistrationId(applyNo); jgRelationEquip.setUnitChangeRegistrationId(applyNo);
if (!CollectionUtils.isEmpty(nextExecutorUserIds)) { if (!CollectionUtils.isEmpty(nextExecutorUserIds)) {
...@@ -542,7 +543,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg ...@@ -542,7 +543,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
dto.setFlowCreateDate(new Date()); dto.setFlowCreateDate(new Date());
dto.setTaskName(workflowResultDtos.get(0).getNextTaskName()); dto.setTaskName(workflowResultDtos.get(0).getNextTaskName());
dto.setFlowCode(obj.getNextTaskId()); dto.setFlowCode(obj.getNextTaskId());
dto.setTaskContent("来自"+obj.getEquType()+"【"+obj.getSupervisoryCode()+"】的业务办理,【申请单号:"+obj.getApplyNo()+"】"); dto.setTaskContent("来自"+obj.getEquList()+"【"+obj.getSupervisoryCode()+"】的业务办理,【申请单号:"+obj.getApplyNo()+"】");
dto.setTaskCode(obj.getApplyNo()); dto.setTaskCode(obj.getApplyNo());
dto.setTaskType(BusinessTypeEnum.JG_COMPANY_CHANGE_REGISTRATION.getCode()); dto.setTaskType(BusinessTypeEnum.JG_COMPANY_CHANGE_REGISTRATION.getCode());
dto.setTaskTypeLabel(BusinessTypeEnum.JG_COMPANY_CHANGE_REGISTRATION.getName()); dto.setTaskTypeLabel(BusinessTypeEnum.JG_COMPANY_CHANGE_REGISTRATION.getName());
...@@ -564,7 +565,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg ...@@ -564,7 +565,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
//行数据 //行数据
dto.setModel(obj); dto.setModel(obj);
//摘要 按原有规则组装 //摘要 按原有规则组装
dto.setTaskContent("来自"+obj.getEquType()+"【"+obj.getSupervisoryCode()+"】的业务办理,【申请单号:"+obj.getApplyNo()+"】"); dto.setTaskContent("来自"+obj.getEquList()+"【"+obj.getSupervisoryCode()+"】的业务办理,【申请单号:"+obj.getApplyNo()+"】");
//申请单号 //申请单号
dto.setTaskCode(obj.getApplyNo()); dto.setTaskCode(obj.getApplyNo());
//业务类型枚举code值 //业务类型枚举code值
...@@ -762,9 +763,8 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg ...@@ -762,9 +763,8 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
task.setResultCode("approvalStatus"); task.setResultCode("approvalStatus");
task.setTaskId(taskId); task.setTaskId(taskId);
task.setComment(""); task.setComment("");
task.setNextExecuteUserCompanyCode(this.getNextUserOrgCode(op,dto)); task.setNextExecuteUserCompanyCode(this.getNextUserOrgCode(op,jgChangeRegistrationUnit));
task.setNextExecuteUserCompanyCode(dto.getReceiveOrgCode());
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
map.put("approvalStatus", op); map.put("approvalStatus", op);
if (!ObjectUtils.isEmpty(jgChangeRegistrationUnit.getInstanceStatus()) && if (!ObjectUtils.isEmpty(jgChangeRegistrationUnit.getInstanceStatus()) &&
...@@ -984,7 +984,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg ...@@ -984,7 +984,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
private String buildTaskContent(JgChangeRegistrationUnit obj) { private String buildTaskContent(JgChangeRegistrationUnit obj) {
return "来自"+obj.getEquType()+"【"+obj.getSupervisoryCode()+"】的业务办理,【申请单号:"+obj.getApplyNo()+"】"; return "来自"+ EquipmentClassifityEnum.getNameByCode(obj.getEquList()) +"【"+obj.getSupervisoryCode()+"】的业务办理,【申请单号:"+obj.getApplyNo()+"】";
} }
...@@ -1120,14 +1120,14 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg ...@@ -1120,14 +1120,14 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
} }
private String getNextUserOrgCode(String operate, JgChangeRegistrationUnitDto jgChangeRegistrationName) { private String getNextUserOrgCode(String operate, JgChangeRegistrationUnit jgChangeRegistrationName) {
if("0".equals(operate)){ if("0".equals(operate)){
// 执行通过节点,单位code为接收机构单位信息 // 执行通过节点,单位code为接收机构单位信息
return jgChangeRegistrationName.getReceiveOrgCode(); return jgChangeRegistrationName.getReceiveOrgCode();
} }
if(jgChangeRegistrationName.getStatus().equals(WorkFlowStatusEnum.UNIT_RENAME_SUBMIT.getPass()) if(jgChangeRegistrationName.getStatus().equals(WorkFlowStatusEnum.UNIT_RENAME_RECEIVE.getPass())
|| jgChangeRegistrationName.getStatus().equals(WorkFlowStatusEnum.UNIT_RENAME_SUBMIT.getReject()) || jgChangeRegistrationName.getStatus().equals(WorkFlowStatusEnum.UNIT_RENAME_RECEIVE.getReject())
|| jgChangeRegistrationName.getStatus().equals(WorkFlowStatusEnum.UNIT_RENAME_SUBMIT.getRollBack())){ || jgChangeRegistrationName.getStatus().equals(WorkFlowStatusEnum.UNIT_RENAME_RECEIVE.getRollBack())){
// 驳回且当前节点为一键节点时,单位code为发起人单位信息 // 驳回且当前节点为一键节点时,单位code为发起人单位信息
return jgChangeRegistrationName.getUseUnitCreditCode(); return jgChangeRegistrationName.getUseUnitCreditCode();
} }
......
...@@ -179,7 +179,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto, ...@@ -179,7 +179,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
// 仅保存 // 仅保存
if ("add".equals(pageType)) { if ("add".equals(pageType)) {
this.save(jgEnableDisable); this.save(jgEnableDisable);
buildTask(Arrays.asList(jgEnableDisable),businessCode, workflowResultList,Boolean.FALSE); buildTask(Arrays.asList(jgEnableDisable), businessCode, workflowResultList, Boolean.FALSE);
if(!SUBMIT_TYPE_FLOW.equals(submit)){ if(!SUBMIT_TYPE_FLOW.equals(submit)){
// 暂存任务 // 暂存任务
buildTaskDraft(jgEnableDisable); buildTaskDraft(jgEnableDisable);
...@@ -215,11 +215,15 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto, ...@@ -215,11 +215,15 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
BeanUtils.copyProperties(jgEnableDisable, taskMessageDto); BeanUtils.copyProperties(jgEnableDisable, taskMessageDto);
dto.setModel(taskMessageDto); dto.setModel(taskMessageDto);
//摘要 按原有规则组装 //摘要 按原有规则组装
dto.setTaskContent(String.format("来自%s【%s】的业务办理,【申请单号:%s】", jgEnableDisable.getEquList(), jgEnableDisable.getSequenceNbr(), jgEnableDisable.getApplyNo())); dto.setTaskContent(
String.format("来自%s【%s】的业务办理,【申请单号:%s】",
ObjectUtils.isEmpty(jgEnableDisable.getEquList()) ? "null" : jgEnableDisable.getEquList(),
ObjectUtils.isEmpty(jgEnableDisable.getSupervisoryCode()) ? "null" : jgEnableDisable.getSupervisoryCode(),
jgEnableDisable.getApplyNo()));
//申请单号 //申请单号
dto.setTaskCode(jgEnableDisable.getApplyNo()); dto.setTaskCode(jgEnableDisable.getApplyNo());
//业务类型枚举code值 //业务类型枚举code值
dto.setTaskType(BusinessTypeEnum.JG_INSTALLATION_NOTIFICATION.getCode()); dto.setTaskType(BusinessTypeEnum.JG_EQUIPMENT_START.getCode());
////业务主键 ////业务主键
dto.setRelationId(jgEnableDisable.getSequenceNbr() + ""); dto.setRelationId(jgEnableDisable.getSequenceNbr() + "");
modelDtos.add(dto); modelDtos.add(dto);
...@@ -242,22 +246,21 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto, ...@@ -242,22 +246,21 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
jgEnableDisable.setApplyType(map.getString("applyType")); jgEnableDisable.setApplyType(map.getString("applyType"));
jgEnableDisable.setCreateUserCompanyName(reginParams.getCompany().getCompanyName()); jgEnableDisable.setCreateUserCompanyName(reginParams.getCompany().getCompanyName());
jgEnableDisable.setPromoter(reginParams.getUserModel().getUserId()); jgEnableDisable.setPromoter(reginParams.getUserModel().getUserId());
jgEnableDisable.setInstanceId(workflowResultList.get(0).getInstanceId());
jgEnableDisable.setNextExecuteUserIds(workflowResultList.get(0).getNextExecutorUserIds());
if (SUBMIT_TYPE_FLOW.equals(submitType)) { if (SUBMIT_TYPE_FLOW.equals(submitType)) {
if (!CollectionUtils.isEmpty(workflowResultList)) {
jgEnableDisable.setNextExecuteUserIds(workflowResultList.get(0).getNextExecutorUserIds());
jgEnableDisable.setInstanceId(workflowResultList.get(0).getInstanceId());
jgEnableDisable.setAuditStatus(String.valueOf(FlowStatusEnum.TO_BE_PROCESSED.getName()));
jgEnableDisable.setNextExecutorIds(workflowResultList.get(0).getNextExecutorRoleIds()); jgEnableDisable.setNextExecutorIds(workflowResultList.get(0).getNextExecutorRoleIds());
jgEnableDisable.setExecuteSequence(workflowResultList.get(0).getNextExecutorRoleIds() + "," + workflowResultList.get(0).getExecutorRoleIds()); jgEnableDisable.setExecuteSequence(workflowResultList.get(0).getNextExecutorRoleIds() + "," + workflowResultList.get(0).getExecutorRoleIds());
jgEnableDisable.setPromoter(reginParams.getUserModel().getUserId()); jgEnableDisable.setPromoter(reginParams.getUserModel().getUserId());
jgEnableDisable.setNextTaskId(workflowResultList.get(0).getNextTaskId()); jgEnableDisable.setNextTaskId(workflowResultList.get(0).getNextTaskId());
} }
jgEnableDisable.setEquList(map.get("equListDesc").toString());
jgEnableDisable.setSupervisoryCode(map.get("supervisoryCode").toString());
if (!CollectionUtils.isEmpty(workflowResultList)) {
jgEnableDisable.setInstanceId(workflowResultList.get(0).getInstanceId());
jgEnableDisable.setAuditStatus(String.valueOf(FlowStatusEnum.TO_BE_PROCESSED.getName()));
} else { } else {
jgEnableDisable.setAuditStatus(String.valueOf(FlowStatusEnum.TO_BE_SUBMITTED.getName())); jgEnableDisable.setAuditStatus(String.valueOf(FlowStatusEnum.TO_BE_SUBMITTED.getName()));
} }
jgEnableDisable.setEquList(String.valueOf(map.get("equListDesc")));
jgEnableDisable.setSupervisoryCode(String.valueOf(map.get("supervisoryCode")));
jgEnableDisable.setCreateUserName(reginParams.getUserModel().getRealName()); jgEnableDisable.setCreateUserName(reginParams.getUserModel().getRealName());
jgEnableDisable.setCreateUserId(reginParams.getUserModel().getUserId()); jgEnableDisable.setCreateUserId(reginParams.getUserModel().getUserId());
} }
...@@ -270,16 +273,17 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto, ...@@ -270,16 +273,17 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
String taskType = businessCode.equals(ApplicationFormTypeEnum.SBQY.getBusinessCode())?BusinessTypeEnum.JG_EQUIPMENT_START.getCode():BusinessTypeEnum.JG_EQUIPMENT_STOP.getCode(); String taskType = businessCode.equals(ApplicationFormTypeEnum.SBQY.getBusinessCode())?BusinessTypeEnum.JG_EQUIPMENT_START.getCode():BusinessTypeEnum.JG_EQUIPMENT_STOP.getCode();
String taskTypeLabel = businessCode.equals(ApplicationFormTypeEnum.SBQY.getBusinessCode())?BusinessTypeEnum.JG_EQUIPMENT_START.getName():BusinessTypeEnum.JG_EQUIPMENT_STOP.getName(); String taskTypeLabel = businessCode.equals(ApplicationFormTypeEnum.SBQY.getBusinessCode())?BusinessTypeEnum.JG_EQUIPMENT_START.getName():BusinessTypeEnum.JG_EQUIPMENT_STOP.getName();
List<TaskModelDto> taskModelDtoList = new ArrayList<>(); List<TaskModelDto> taskModelDtoList = new ArrayList<>();
WorkflowResultDto workflowResultDto = workflowResultList.get(0);
list.forEach(item -> { list.forEach(item -> {
TaskModelDto taskModelDto = new TaskModelDto(); TaskModelDto taskModelDto = new TaskModelDto();
taskModelDto.setFlowCreateDate(item.getCreateDate()); taskModelDto.setFlowCreateDate(item.getCreateDate());
taskModelDto.setTaskName(workflowResultDto.getNextTaskName()); // 工作流API返回 if(workflowResultList.size()>0){
taskModelDto.setTaskName(workflowResultList.get(0).getNextTaskName()); // 工作流API返回
taskModelDto.setExecuteUserIds(workflowResultList.get(0).getNextExecutorUserIds()); // 工作流API返回
}
taskModelDto.setTaskCode(item.getApplyNo()); taskModelDto.setTaskCode(item.getApplyNo());
taskModelDto.setTaskType(taskType); taskModelDto.setTaskType(taskType);
taskModelDto.setTaskTypeLabel(taskTypeLabel); taskModelDto.setTaskTypeLabel(taskTypeLabel);
taskModelDto.setRelationId(item.getInstanceId()); taskModelDto.setRelationId(item.getInstanceId());
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())); // 流程状态枚举
taskModelDto.setFlowStatusLabel(FlowStatusEnum.TO_BE_PROCESSED.getName()); taskModelDto.setFlowStatusLabel(FlowStatusEnum.TO_BE_PROCESSED.getName());
...@@ -299,8 +303,10 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto, ...@@ -299,8 +303,10 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
commonService.deleteTaskModel(item.getSequenceNbr()+""); commonService.deleteTaskModel(item.getSequenceNbr()+"");
} }
}); });
if(bool){
commonService.buildTaskModel(taskModelDtoList); commonService.buildTaskModel(taskModelDtoList);
} }
}
...@@ -560,6 +566,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto, ...@@ -560,6 +566,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
public Map<String, Object> getDetail(Long sequenceNbr) { public Map<String, Object> getDetail(Long sequenceNbr) {
Map<String,Object> resultMap = this.baseMapper.getDetail(sequenceNbr); Map<String,Object> resultMap = this.baseMapper.getDetail(sequenceNbr);
JgEnableDisableEq jgEnableDisableEq = jgEnableDisableEqMapper.selectOne(new LambdaQueryWrapper<JgEnableDisableEq>().eq(JgEnableDisableEq::getEnableDisableApplyId, sequenceNbr)); JgEnableDisableEq jgEnableDisableEq = jgEnableDisableEqMapper.selectOne(new LambdaQueryWrapper<JgEnableDisableEq>().eq(JgEnableDisableEq::getEnableDisableApplyId, sequenceNbr));
if(!ObjectUtils.isEmpty(jgEnableDisableEq)){
Map<String, Object> map = jgMaintainNoticeMapper.getEquipInfoByRecord(jgEnableDisableEq.getEquId()); Map<String, Object> map = jgMaintainNoticeMapper.getEquipInfoByRecord(jgEnableDisableEq.getEquId());
map.put("equListDesc",map.get("equList")); map.put("equListDesc",map.get("equList"));
map.put("equCategoryDesc",map.get("equCategory")); map.put("equCategoryDesc",map.get("equCategory"));
...@@ -571,6 +578,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto, ...@@ -571,6 +578,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
map.put(s, JSON.parseArray(map.get(s).toString())); map.put(s, JSON.parseArray(map.get(s).toString()));
} }
resultMap.putAll(map); resultMap.putAll(map);
}
return resultMap; return resultMap;
} }
......
...@@ -742,6 +742,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -742,6 +742,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(jgInstallationNotice)); JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(jgInstallationNotice));
jsonObject.put("taskType", BusinessTypeEnum.JG_INSTALLATION_NOTIFICATION.getCode()); jsonObject.put("taskType", BusinessTypeEnum.JG_INSTALLATION_NOTIFICATION.getCode());
jsonObject.put("nextExecuteUser", jgInstallationNotice.getNextExecuteIds()); jsonObject.put("nextExecuteUser", jgInstallationNotice.getNextExecuteIds());
jsonObject.put("flowStatusLabel", FlowStatusEnum.ROLLBACK.getName());
jsonObject.put("flowStatus", FlowStatusEnum.ROLLBACK.getCode());
commonService.rollbackTask(jgInstallationNotice.getInstanceId(), jsonObject); commonService.rollbackTask(jgInstallationNotice.getInstanceId(), jsonObject);
} }
......
...@@ -329,11 +329,18 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc ...@@ -329,11 +329,18 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
} }
public void deleteBatch(List<Long> ids) { public void deleteBatch(List<Long> ids) {
JgScrapCancel jgScrapCancel = new JgScrapCancel(); if (!ids.isEmpty()) {
jgScrapCancel.setIsDelete(true); for (Long id : ids) {
LambdaQueryWrapper<JgScrapCancel> lambda = new QueryWrapper<JgScrapCancel>().lambda(); LambdaQueryWrapper<JgScrapCancel> lambda = new QueryWrapper<JgScrapCancel>().lambda();
lambda.in(JgScrapCancel::getSequenceNbr, ids); lambda.eq(JgScrapCancel::getSequenceNbr, id);
this.update(jgScrapCancel, lambda); JgScrapCancel jgScrapCancel = this.baseMapper.selectOne(lambda);
//删除代办消息
commonService.deleteTaskModel(jgScrapCancel.getInstanceId());
//更新jgScrapCancel数据
jgScrapCancel.setIsDelete(true);
this.updateById(jgScrapCancel);
}
}
} }
public JgScrapCancelDto updateInfo(String submitType, JgScrapCancelDto jgScrapCancelDto, String op) { public JgScrapCancelDto updateInfo(String submitType, JgScrapCancelDto jgScrapCancelDto, String op) {
......
...@@ -636,6 +636,8 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto ...@@ -636,6 +636,8 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(jgInstallationNotice)); JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(jgInstallationNotice));
jsonObject.put("taskType", BusinessTypeEnum.JG_ADVICE_REMOVAL.getCode()); jsonObject.put("taskType", BusinessTypeEnum.JG_ADVICE_REMOVAL.getCode());
jsonObject.put("nextExecuteUser", jgInstallationNotice.getNextExecuteIds()); jsonObject.put("nextExecuteUser", jgInstallationNotice.getNextExecuteIds());
jsonObject.put("flowStatusLabel", FlowStatusEnum.ROLLBACK.getName());
jsonObject.put("flowStatus", FlowStatusEnum.ROLLBACK.getCode());
commonService.rollbackTask(jgInstallationNotice.getInstanceId(), jsonObject); commonService.rollbackTask(jgInstallationNotice.getInstanceId(), jsonObject);
} }
......
...@@ -488,6 +488,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -488,6 +488,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
jsonObject.put("receiveOrgCode", jgUseRegistration.getReceiveCompanyCode() + "_" + jgUseRegistration.getReceiveOrgName()); jsonObject.put("receiveOrgCode", jgUseRegistration.getReceiveCompanyCode() + "_" + jgUseRegistration.getReceiveOrgName());
jsonObject.put("status", jgUseRegistration.getStatus()); jsonObject.put("status", jgUseRegistration.getStatus());
jsonObject.put("applyNo", jgUseRegistration.getApplyNo()); jsonObject.put("applyNo", jgUseRegistration.getApplyNo());
jsonObject.remove("submit");
jsonObject.remove("instanceId");
return jsonObject; return jsonObject;
} }
Map<String, Object> detail = this.baseMapper.getDetail(id); Map<String, Object> detail = this.baseMapper.getDetail(id);
......
...@@ -171,7 +171,7 @@ ...@@ -171,7 +171,7 @@
"type": "111", "type": "111",
"name": "改造变更登记", "name": "改造变更登记",
"pageType": "draft", "pageType": "draft",
"url": "/mixuap?appId=1742358052905971713&id=1737029146837544962&roleIds={roleIds}&userId={userId}&pageType=look" "url": "/mixuap?appId=1742358052905971713&id=1737415710281330690&roleIds={roleIds}&userId={userId}&pageType=edit"
}, },
{ {
"type": "111", "type": "111",
......
...@@ -39,4 +39,14 @@ public enum EquipmentClassifityEnum { ...@@ -39,4 +39,14 @@ public enum EquipmentClassifityEnum {
} }
} }
public static String getNameByCode(String code){
for (EquipmentClassifityEnum value : EquipmentClassifityEnum.values()) {
if (value.getCode().equals(code)){
return value.getName();
}
}
return "";
}
} }
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