Commit 2be968b0 authored by chenzhao's avatar chenzhao

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

parents 8bb2617a a60e9f7d
...@@ -64,6 +64,8 @@ ...@@ -64,6 +64,8 @@
concat(use."PROVINCE_NAME", use."CITY_NAME", use."COUNTY_NAME", use."ADDRESS", concat(use."PROVINCE_NAME", use."CITY_NAME", use."COUNTY_NAME", use."ADDRESS",
use.STREET_NAME) as fullAddress, use.STREET_NAME) as fullAddress,
jri.EQU_CODE as equCode, jri.EQU_CODE as equCode,
jed.audit_status as auditStatus,
jed.apply_no as applyNo,
jed.apply_type as applyType, jed.apply_type as applyType,
jed.remark, jed.remark,
use.RECORD as record, use.RECORD as record,
......
...@@ -131,8 +131,8 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto, ...@@ -131,8 +131,8 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
} else { } else {
jgEnableDisable.setExecuteSequence(workflowResultDto.getNextExecutorRoleIds()); jgEnableDisable.setExecuteSequence(workflowResultDto.getNextExecutorRoleIds());
} }
jgEnableDisable.setEquList(map.get("equListDesc").toString()); jgEnableDisable.setEquList("null".equals(record) ? "null" : map.get("equListDesc").toString());
jgEnableDisable.setSupervisoryCode(map.get("supervisoryCode").toString()); jgEnableDisable.setSupervisoryCode("null".equals(record) ? "null" : map.get("supervisoryCode").toString());
jgEnableDisable.setPromoter(RequestContext.getExeUserId()); jgEnableDisable.setPromoter(RequestContext.getExeUserId());
jgEnableDisable.setNextExecutorIds(String.join(",", workflowResultDto.getNextExecutorRoleIds())); jgEnableDisable.setNextExecutorIds(String.join(",", workflowResultDto.getNextExecutorRoleIds()));
jgEnableDisable.setAuditStatus(String.valueOf(FlowStatusEnum.TO_BE_PROCESSED.getName())); jgEnableDisable.setAuditStatus(String.valueOf(FlowStatusEnum.TO_BE_PROCESSED.getName()));
...@@ -192,11 +192,13 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto, ...@@ -192,11 +192,13 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
lambda.eq(JgEnableDisableEq::getEnableDisableApplyId, String.valueOf(map.get("sequenceNbr"))); lambda.eq(JgEnableDisableEq::getEnableDisableApplyId, String.valueOf(map.get("sequenceNbr")));
jgEnableDisableEqService.getBaseMapper().delete(lambda); jgEnableDisableEqService.getBaseMapper().delete(lambda);
} }
if(!"null".equals(record)){
// 关联设备表 // 关联设备表
JgEnableDisableEq jgEnableDisableEq = new JgEnableDisableEq(); JgEnableDisableEq jgEnableDisableEq = new JgEnableDisableEq();
jgEnableDisableEq.setEquId(record); jgEnableDisableEq.setEquId(record);
jgEnableDisableEq.setEnableDisableApplyId(jgEnableDisable.getSequenceNbr().toString()); jgEnableDisableEq.setEnableDisableApplyId(jgEnableDisable.getSequenceNbr().toString());
jgEnableDisableEqService.save(jgEnableDisableEq); jgEnableDisableEqService.save(jgEnableDisableEq);
}
} }
......
...@@ -161,13 +161,14 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto, ...@@ -161,13 +161,14 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
* @return 代办信息 * @return 代办信息
*/ */
private TaskModelDto buildTaskModelDto(JgEquipTransfer item, WorkflowResultDto workflowResultDto) { private TaskModelDto buildTaskModelDto(JgEquipTransfer item, WorkflowResultDto workflowResultDto) {
item.setInstanceId(workflowResultDto.getInstanceId());
return TaskModelDto.builder() return TaskModelDto.builder()
.flowCreateDate(item.getCreateDate()) .flowCreateDate(item.getCreateDate())
.taskName(workflowResultDto.getNextTaskName()) .taskName(workflowResultDto.getNextTaskName())
.taskCode(item.getApplyNo()) .taskCode(item.getApplyNo())
.taskType(BusinessTypeEnum.JG_EQUIPMENT_HANDOVER.getCode()) .taskType(BusinessTypeEnum.JG_EQUIPMENT_HANDOVER.getCode())
.taskTypeLabel(BusinessTypeEnum.JG_EQUIPMENT_HANDOVER.getName()) .taskTypeLabel(BusinessTypeEnum.JG_EQUIPMENT_HANDOVER.getName())
.relationId(item.getInstanceId()) .relationId(workflowResultDto.getInstanceId())
.executeUserIds(workflowResultDto.getNextExecutorUserIds()) .executeUserIds(workflowResultDto.getNextExecutorUserIds())
.taskStatus(FlowStatusEnum.TO_BE_PROCESSED.getCode()) .taskStatus(FlowStatusEnum.TO_BE_PROCESSED.getCode())
.taskStatusLabel(FlowStatusEnum.TO_BE_PROCESSED.getName()) .taskStatusLabel(FlowStatusEnum.TO_BE_PROCESSED.getName())
...@@ -192,6 +193,7 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto, ...@@ -192,6 +193,7 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
* @param taskV2Model 代办信息 * @param taskV2Model 代办信息
*/ */
private void createNewTodo(JgEquipTransfer transfer, WorkflowResultDto workflowResultDto, TaskV2Model taskV2Model, FlowStatusEnum statusEnum) { private void createNewTodo(JgEquipTransfer transfer, WorkflowResultDto workflowResultDto, TaskV2Model taskV2Model, FlowStatusEnum statusEnum) {
transfer.setInstanceId(workflowResultDto.getInstanceId());
ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class); ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
TaskModelDto taskModelDto = TaskModelDto.builder() TaskModelDto taskModelDto = TaskModelDto.builder()
.flowCreateDate(taskV2Model.getFlowCreateDate()) .flowCreateDate(taskV2Model.getFlowCreateDate())
......
...@@ -252,6 +252,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -252,6 +252,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
notice.setNextExecuteIds(String.join(",", workflowResultDto.getNextExecutorRoleIds())); notice.setNextExecuteIds(String.join(",", workflowResultDto.getNextExecutorRoleIds()));
notice.setNoticeStatus(String.valueOf(FlowStatusEnum.TO_BE_PROCESSED.getCode())); notice.setNoticeStatus(String.valueOf(FlowStatusEnum.TO_BE_PROCESSED.getCode()));
notice.setNextTaskId(workflowResultDto.getNextTaskId()); notice.setNextTaskId(workflowResultDto.getNextTaskId());
notice.setInstanceId(workflowResultDto.getInstanceId());
this.updateById(notice); this.updateById(notice);
// 如果为保存并提交,则创建代办 // 如果为保存并提交,则创建代办
buildTask(Collections.singletonList(notice), Collections.singletonList(workflowResultDto), Boolean.TRUE); buildTask(Collections.singletonList(notice), Collections.singletonList(workflowResultDto), Boolean.TRUE);
......
...@@ -43,6 +43,7 @@ import org.springframework.util.StringUtils; ...@@ -43,6 +43,7 @@ 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.text.ParseException; import java.text.ParseException;
...@@ -402,8 +403,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto ...@@ -402,8 +403,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
// 获取告知设备列表 // 获取告知设备列表
List<Map<String, Object>> deviceList = model.getDeviceList(); List<Map<String, Object>> deviceList = model.getDeviceList();
if (CollectionUtils.isEmpty(deviceList)) { if (CollectionUtils.isEmpty(deviceList)) {
log.error(" 获取告知设备列表"); throw new BadRequest("请选择设备");
throw new RuntimeException();
} }
// 获取告知单号 // 获取告知单号
ResponseModel<List<String>> applyNoResult = tzsServiceFeignClient.applicationFormCode(ApplicationFormTypeEnum.WXGZ.getCode(), deviceList.size()); ResponseModel<List<String>> applyNoResult = tzsServiceFeignClient.applicationFormCode(ApplicationFormTypeEnum.WXGZ.getCode(), deviceList.size());
......
...@@ -17,7 +17,6 @@ import com.yeejoin.amos.boot.module.jg.api.entity.JgMaintenanceContract; ...@@ -17,7 +17,6 @@ import com.yeejoin.amos.boot.module.jg.api.entity.JgMaintenanceContract;
import com.yeejoin.amos.boot.module.jg.api.entity.JgMaintenanceContractEq; import com.yeejoin.amos.boot.module.jg.api.entity.JgMaintenanceContractEq;
import com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum; import com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum; import com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum;
import com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgMaintenanceContractEqMapper; import com.yeejoin.amos.boot.module.jg.api.mapper.JgMaintenanceContractEqMapper;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgMaintenanceContractMapper; import com.yeejoin.amos.boot.module.jg.api.mapper.JgMaintenanceContractMapper;
import com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService; import com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService;
...@@ -267,12 +266,11 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC ...@@ -267,12 +266,11 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
*/ */
@Transactional @Transactional
public void revocation(String instanceId) { public void revocation(String instanceId) {
JgMaintenanceContract contract = new JgMaintenanceContract();
LambdaQueryWrapper<JgMaintenanceContract> lambda = new QueryWrapper<JgMaintenanceContract>().lambda(); LambdaQueryWrapper<JgMaintenanceContract> lambda = new QueryWrapper<JgMaintenanceContract>().lambda();
lambda.eq(JgMaintenanceContract::getInstanceId, instanceId); lambda.eq(JgMaintenanceContract::getInstanceId, instanceId);
List<String> roleListNext = new ArrayList<>(); List<String> roleListNext = new ArrayList<>();
List<String> roleListAll = new ArrayList<>(); List<String> roleListAll = new ArrayList<>();
contract = this.getOne(lambda); JgMaintenanceContract contract = this.getOne(lambda);
ProcessTaskDTO processTaskDTO = workflowService.rollBack(instanceId); ProcessTaskDTO processTaskDTO = workflowService.rollBack(instanceId);
String nextTaskId = processTaskDTO.getNextTask().get(0).getId(); String nextTaskId = processTaskDTO.getNextTask().get(0).getId();
this.buildRoleList(Collections.singletonList(processTaskDTO), roleListNext, roleListAll); this.buildRoleList(Collections.singletonList(processTaskDTO), roleListNext, roleListAll);
...@@ -296,7 +294,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC ...@@ -296,7 +294,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
jsonObject.put("taskType", BusinessTypeEnum.JG_MAINTENANCE_RECORD.getCode()); jsonObject.put("taskType", BusinessTypeEnum.JG_MAINTENANCE_RECORD.getCode());
jsonObject.put("flowStatus", this.getTaskCodeByName(contract.getStatus())); jsonObject.put("flowStatus", this.getTaskCodeByName(contract.getStatus()));
jsonObject.put("flowStatusLabel", contract.getStatus()); jsonObject.put("flowStatusLabel", contract.getStatus());
jsonObject.put("changeCertificate", null); jsonObject.put("maintenanceContract", null);//不传合同照片附件信息
commonService.rollbackTask(instanceId, jsonObject); commonService.rollbackTask(instanceId, jsonObject);
} }
...@@ -399,6 +397,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC ...@@ -399,6 +397,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
contract.setNextTaskId(nextTaskId); contract.setNextTaskId(nextTaskId);
contract.setStatus(String.valueOf(WorkFlowStatusEnum.MAIN_RECEIVE.getPass())); contract.setStatus(String.valueOf(WorkFlowStatusEnum.MAIN_RECEIVE.getPass()));
contract.setNextExecuteUserIds(nextUserIds); contract.setNextExecuteUserIds(nextUserIds);
commonService.deleteTaskModel(contract.getSequenceNbr() + "");
// 创建待办 // 创建待办
JgMaintenanceContract bean = new JgMaintenanceContract(); JgMaintenanceContract bean = new JgMaintenanceContract();
BeanUtil.copyProperties(contract, bean); BeanUtil.copyProperties(contract, bean);
...@@ -426,9 +425,9 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC ...@@ -426,9 +425,9 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
contract.setStatus(String.valueOf(WorkFlowStatusEnum.MAIN_RECEIVE.getPass())); contract.setStatus(String.valueOf(WorkFlowStatusEnum.MAIN_RECEIVE.getPass()));
contract.setNextTaskId(nextTaskId); contract.setNextTaskId(nextTaskId);
contract.setNextExecuteUserIds(nextUserIds); contract.setNextExecuteUserIds(nextUserIds);
commonService.deleteTaskModel(contract.getSequenceNbr() + "");
executeOneStep(contract, taskName, nextUserIds, "0"); executeOneStep(contract, taskName, nextUserIds, "0");
} }
commonService.deleteTaskModel(contract.getSequenceNbr()+"");
} else { } else {
List<TaskModelDto> modelDtos = new ArrayList<>(); List<TaskModelDto> modelDtos = new ArrayList<>();
TaskModelDto dto = new TaskModelDto(); TaskModelDto dto = new TaskModelDto();
......
...@@ -283,6 +283,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto ...@@ -283,6 +283,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
notice.setNextExecuteIds(String.join(",", workflowResultDto.getNextExecutorRoleIds())); notice.setNextExecuteIds(String.join(",", workflowResultDto.getNextExecutorRoleIds()));
notice.setNoticeStatus(String.valueOf(FlowStatusEnum.TO_BE_PROCESSED.getCode())); notice.setNoticeStatus(String.valueOf(FlowStatusEnum.TO_BE_PROCESSED.getCode()));
notice.setNextTaskId(workflowResultDto.getNextTaskId()); notice.setNextTaskId(workflowResultDto.getNextTaskId());
notice.setInstanceId(workflowResultDto.getInstanceId());
jgTransferNoticeMapper.updateById(notice); jgTransferNoticeMapper.updateById(notice);
// 如果为保存并提交,则创建代办 // 如果为保存并提交,则创建代办
buildTask(Collections.singletonList(notice), Collections.singletonList(workflowResultDto), Boolean.TRUE); buildTask(Collections.singletonList(notice), Collections.singletonList(workflowResultDto), Boolean.TRUE);
......
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