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 {
@ApiModelProperty(value = "监管码")
private String supervisoryCode;
@ApiModelProperty(value = "分类")
private String equList;
}
......@@ -217,6 +217,9 @@ public class JgChangeRegistrationUnit extends BaseEntity {
@TableField(exist = false)
private String supervisoryCode;
@TableField(exist = false)
private String equList;
/**
*工作流下一节点任务id
*/
......
......@@ -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.ymt.api.entity.*;
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.mapper.*;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
......@@ -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.setEquAddress((String.valueOf(obj.get("ADDRESS"))));
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.setUnitChangeRegistrationId(applyNo);
if (!CollectionUtils.isEmpty(nextExecutorUserIds)) {
......@@ -542,7 +543,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
dto.setFlowCreateDate(new Date());
dto.setTaskName(workflowResultDtos.get(0).getNextTaskName());
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.setTaskType(BusinessTypeEnum.JG_COMPANY_CHANGE_REGISTRATION.getCode());
dto.setTaskTypeLabel(BusinessTypeEnum.JG_COMPANY_CHANGE_REGISTRATION.getName());
......@@ -564,7 +565,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
//行数据
dto.setModel(obj);
//摘要 按原有规则组装
dto.setTaskContent("来自"+obj.getEquType()+"【"+obj.getSupervisoryCode()+"】的业务办理,【申请单号:"+obj.getApplyNo()+"】");
dto.setTaskContent("来自"+obj.getEquList()+"【"+obj.getSupervisoryCode()+"】的业务办理,【申请单号:"+obj.getApplyNo()+"】");
//申请单号
dto.setTaskCode(obj.getApplyNo());
//业务类型枚举code值
......@@ -762,9 +763,8 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
task.setResultCode("approvalStatus");
task.setTaskId(taskId);
task.setComment("");
task.setNextExecuteUserCompanyCode(this.getNextUserOrgCode(op,dto));
task.setNextExecuteUserCompanyCode(this.getNextUserOrgCode(op,jgChangeRegistrationUnit));
task.setNextExecuteUserCompanyCode(dto.getReceiveOrgCode());
HashMap<String, Object> map = new HashMap<>();
map.put("approvalStatus", op);
if (!ObjectUtils.isEmpty(jgChangeRegistrationUnit.getInstanceStatus()) &&
......@@ -984,7 +984,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
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
}
private String getNextUserOrgCode(String operate, JgChangeRegistrationUnitDto jgChangeRegistrationName) {
private String getNextUserOrgCode(String operate, JgChangeRegistrationUnit jgChangeRegistrationName) {
if("0".equals(operate)){
// 执行通过节点,单位code为接收机构单位信息
return jgChangeRegistrationName.getReceiveOrgCode();
}
if(jgChangeRegistrationName.getStatus().equals(WorkFlowStatusEnum.UNIT_RENAME_SUBMIT.getPass())
|| jgChangeRegistrationName.getStatus().equals(WorkFlowStatusEnum.UNIT_RENAME_SUBMIT.getReject())
|| jgChangeRegistrationName.getStatus().equals(WorkFlowStatusEnum.UNIT_RENAME_SUBMIT.getRollBack())){
if(jgChangeRegistrationName.getStatus().equals(WorkFlowStatusEnum.UNIT_RENAME_RECEIVE.getPass())
|| jgChangeRegistrationName.getStatus().equals(WorkFlowStatusEnum.UNIT_RENAME_RECEIVE.getReject())
|| jgChangeRegistrationName.getStatus().equals(WorkFlowStatusEnum.UNIT_RENAME_RECEIVE.getRollBack())){
// 驳回且当前节点为一键节点时,单位code为发起人单位信息
return jgChangeRegistrationName.getUseUnitCreditCode();
}
......
......@@ -179,7 +179,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
// 仅保存
if ("add".equals(pageType)) {
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)){
// 暂存任务
buildTaskDraft(jgEnableDisable);
......@@ -209,20 +209,24 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
private void buildTaskDraft(JgEnableDisable jgEnableDisable) {
List<TaskModelDto> modelDtos = new ArrayList<>();
TaskModelDto dto = new TaskModelDto();
//行数据
TaskMessageDto taskMessageDto = new TaskMessageDto();
BeanUtils.copyProperties(jgEnableDisable, taskMessageDto);
dto.setModel(taskMessageDto);
//摘要 按原有规则组装
dto.setTaskContent(String.format("来自%s【%s】的业务办理,【申请单号:%s】", jgEnableDisable.getEquList(), jgEnableDisable.getSequenceNbr(), jgEnableDisable.getApplyNo()));
//申请单号
dto.setTaskCode(jgEnableDisable.getApplyNo());
//业务类型枚举code值
dto.setTaskType(BusinessTypeEnum.JG_INSTALLATION_NOTIFICATION.getCode());
////业务主键
dto.setRelationId(jgEnableDisable.getSequenceNbr() + "");
modelDtos.add(dto);
TaskModelDto dto = new TaskModelDto();
//行数据
TaskMessageDto taskMessageDto = new TaskMessageDto();
BeanUtils.copyProperties(jgEnableDisable, taskMessageDto);
dto.setModel(taskMessageDto);
//摘要 按原有规则组装
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());
//业务类型枚举code值
dto.setTaskType(BusinessTypeEnum.JG_EQUIPMENT_START.getCode());
////业务主键
dto.setRelationId(jgEnableDisable.getSequenceNbr() + "");
modelDtos.add(dto);
commonService.buildTaskModel(modelDtos);
}
......@@ -242,22 +246,21 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
jgEnableDisable.setApplyType(map.getString("applyType"));
jgEnableDisable.setCreateUserCompanyName(reginParams.getCompany().getCompanyName());
jgEnableDisable.setPromoter(reginParams.getUserModel().getUserId());
jgEnableDisable.setInstanceId(workflowResultList.get(0).getInstanceId());
jgEnableDisable.setNextExecuteUserIds(workflowResultList.get(0).getNextExecutorUserIds());
if (SUBMIT_TYPE_FLOW.equals(submitType)) {
jgEnableDisable.setNextExecutorIds(workflowResultList.get(0).getNextExecutorRoleIds());
jgEnableDisable.setExecuteSequence(workflowResultList.get(0).getNextExecutorRoleIds() + "," + workflowResultList.get(0).getExecutorRoleIds());
jgEnableDisable.setPromoter(reginParams.getUserModel().getUserId());
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()));
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.setExecuteSequence(workflowResultList.get(0).getNextExecutorRoleIds() + "," + workflowResultList.get(0).getExecutorRoleIds());
jgEnableDisable.setPromoter(reginParams.getUserModel().getUserId());
jgEnableDisable.setNextTaskId(workflowResultList.get(0).getNextTaskId());
}
} else {
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.setCreateUserId(reginParams.getUserModel().getUserId());
}
......@@ -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 taskTypeLabel = businessCode.equals(ApplicationFormTypeEnum.SBQY.getBusinessCode())?BusinessTypeEnum.JG_EQUIPMENT_START.getName():BusinessTypeEnum.JG_EQUIPMENT_STOP.getName();
List<TaskModelDto> taskModelDtoList = new ArrayList<>();
WorkflowResultDto workflowResultDto = workflowResultList.get(0);
list.forEach(item -> {
TaskModelDto taskModelDto = new TaskModelDto();
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.setTaskType(taskType);
taskModelDto.setTaskTypeLabel(taskTypeLabel);
taskModelDto.setRelationId(item.getInstanceId());
taskModelDto.setExecuteUserIds(workflowResultDto.getNextExecutorUserIds()); // 工作流API返回
taskModelDto.setTaskStatusLabel(FlowStatusEnum.TO_BE_PROCESSED.getName());
taskModelDto.setFlowStatus(commonService.getDictionaryCodeByName(FlowStatusEnum.TO_BE_PROCESSED.getName())); // 流程状态枚举
taskModelDto.setFlowStatusLabel(FlowStatusEnum.TO_BE_PROCESSED.getName());
......@@ -299,7 +303,9 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
commonService.deleteTaskModel(item.getSequenceNbr()+"");
}
});
commonService.buildTaskModel(taskModelDtoList);
if(bool){
commonService.buildTaskModel(taskModelDtoList);
}
}
......@@ -560,17 +566,19 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
public Map<String, Object> getDetail(Long sequenceNbr) {
Map<String,Object> resultMap = this.baseMapper.getDetail(sequenceNbr);
JgEnableDisableEq jgEnableDisableEq = jgEnableDisableEqMapper.selectOne(new LambdaQueryWrapper<JgEnableDisableEq>().eq(JgEnableDisableEq::getEnableDisableApplyId, sequenceNbr));
Map<String, Object> map = jgMaintainNoticeMapper.getEquipInfoByRecord(jgEnableDisableEq.getEquId());
map.put("equListDesc",map.get("equList"));
map.put("equCategoryDesc",map.get("equCategory"));
map.put("equDefineDesc",map.get("equDefine"));
String[] fields = {"productPhoto", "designDoc", "designStandard", "factoryStandard", "productQualityYieldProve",
"insUseMaintainExplain", "inspectReport", "proxyStatementAttachment", "installContractAttachment"};
for (String s : fields) {
if (map.containsKey(s) && !ObjectUtils.isEmpty(map.get(s)))
map.put(s, JSON.parseArray(map.get(s).toString()));
if(!ObjectUtils.isEmpty(jgEnableDisableEq)){
Map<String, Object> map = jgMaintainNoticeMapper.getEquipInfoByRecord(jgEnableDisableEq.getEquId());
map.put("equListDesc",map.get("equList"));
map.put("equCategoryDesc",map.get("equCategory"));
map.put("equDefineDesc",map.get("equDefine"));
String[] fields = {"productPhoto", "designDoc", "designStandard", "factoryStandard", "productQualityYieldProve",
"insUseMaintainExplain", "inspectReport", "proxyStatementAttachment", "installContractAttachment"};
for (String s : fields) {
if (map.containsKey(s) && !ObjectUtils.isEmpty(map.get(s)))
map.put(s, JSON.parseArray(map.get(s).toString()));
}
resultMap.putAll(map);
}
resultMap.putAll(map);
return resultMap;
}
......
......@@ -742,6 +742,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(jgInstallationNotice));
jsonObject.put("taskType", BusinessTypeEnum.JG_INSTALLATION_NOTIFICATION.getCode());
jsonObject.put("nextExecuteUser", jgInstallationNotice.getNextExecuteIds());
jsonObject.put("flowStatusLabel", FlowStatusEnum.ROLLBACK.getName());
jsonObject.put("flowStatus", FlowStatusEnum.ROLLBACK.getCode());
commonService.rollbackTask(jgInstallationNotice.getInstanceId(), jsonObject);
}
......
......@@ -329,11 +329,18 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
}
public void deleteBatch(List<Long> ids) {
JgScrapCancel jgScrapCancel = new JgScrapCancel();
jgScrapCancel.setIsDelete(true);
LambdaQueryWrapper<JgScrapCancel> lambda = new QueryWrapper<JgScrapCancel>().lambda();
lambda.in(JgScrapCancel::getSequenceNbr, ids);
this.update(jgScrapCancel, lambda);
if (!ids.isEmpty()) {
for (Long id : ids) {
LambdaQueryWrapper<JgScrapCancel> lambda = new QueryWrapper<JgScrapCancel>().lambda();
lambda.eq(JgScrapCancel::getSequenceNbr, id);
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) {
......
......@@ -636,6 +636,8 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(jgInstallationNotice));
jsonObject.put("taskType", BusinessTypeEnum.JG_ADVICE_REMOVAL.getCode());
jsonObject.put("nextExecuteUser", jgInstallationNotice.getNextExecuteIds());
jsonObject.put("flowStatusLabel", FlowStatusEnum.ROLLBACK.getName());
jsonObject.put("flowStatus", FlowStatusEnum.ROLLBACK.getCode());
commonService.rollbackTask(jgInstallationNotice.getInstanceId(), jsonObject);
}
......
......@@ -488,6 +488,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
jsonObject.put("receiveOrgCode", jgUseRegistration.getReceiveCompanyCode() + "_" + jgUseRegistration.getReceiveOrgName());
jsonObject.put("status", jgUseRegistration.getStatus());
jsonObject.put("applyNo", jgUseRegistration.getApplyNo());
jsonObject.remove("submit");
jsonObject.remove("instanceId");
return jsonObject;
}
Map<String, Object> detail = this.baseMapper.getDetail(id);
......
......@@ -171,7 +171,7 @@
"type": "111",
"name": "改造变更登记",
"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",
......
......@@ -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