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

fix(设备注销): 摘要添加电梯监管码

parent ed6edf84
......@@ -104,6 +104,8 @@ public class JgScrapCancelDto extends BaseDto {
*/
private String useUnitName;
@ApiModelProperty(value = "设备监管码")
private String supervisoryCode;
/**
* 设备ID
......
......@@ -136,5 +136,10 @@ public class JgScrapCancel extends BaseEntity {
@TableField(value = "next_task_id")
private String nextTaskId;
/**
* 设备监管码
*/
@TableField("supervisory_code")
private String supervisoryCode;
}
......@@ -27,14 +27,12 @@ import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgRegisterInfoService;
import com.yeejoin.amos.boot.module.jg.flc.api.fegin.WorkFlowFeignService;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgRegisterInfo;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo;
import com.yeejoin.amos.boot.module.ymt.api.entity.OtherInfo;
import com.yeejoin.amos.boot.module.ymt.api.entity.SuperviseInfo;
import com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum;
import com.yeejoin.amos.boot.module.ymt.api.enums.EquimentEnum;
import com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgOtherInfoMapper;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgRegisterInfoMapper;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgUseInfoMapper;
import com.yeejoin.amos.boot.module.ymt.api.mapper.SuperviseInfoMapper;
import com.yeejoin.amos.boot.module.ymt.api.mapper.*;
import com.yeejoin.amos.feign.systemctl.model.TaskV2Model;
import com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO;
import com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO;
......@@ -84,6 +82,8 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
@Autowired
CmWorkflowServiceImpl cmWorkflowService;
@Autowired
private OtherInfoMapper otherInfoMapper;
@Autowired
RedisUtils redisUtils;
@Autowired
IdxBizJgRegisterInfoMapper idxBizJgRegisterInfoMapper;
......@@ -95,7 +95,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
private JgScrapCancelEqMapper jgScrapCancelEqMapper;
@Autowired
private IdxBizJgUseInfoMapper idxBizJgUseInfoMapper;
private static String template = "来自电梯【%s】 【%s】的业务办理,【申请单号:%s】";
private static String template = "来自电梯【%s】【%s】的业务办理,【申请单号:%s】";
public Page<Map<String, Object>> getList(JgScrapCancelDto dto, Page<Map<String, Object>> page, List<String> roleIds) {
ReginParams reginParams = this.getSelectedOrgInfo();
......@@ -206,11 +206,17 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
List<JgScrapCancel> list = new ArrayList<>();
List<JgScrapCancelEq> equipList = new ArrayList<>();
for (int i = 0; i < deviceList.size(); i++) {
JgScrapCancelEq jgRelationEquip = new JgScrapCancelEq();
JgScrapCancel dto = new JgScrapCancel();
BeanUtils.copyProperties(model, dto);
String applyNo = applyNoList.get(i);
LambdaQueryWrapper<OtherInfo> otherLambda = new QueryWrapper<OtherInfo>().lambda();
otherLambda.eq(OtherInfo::getRecord, equipList.get(i).getEquId());
OtherInfo otherInfo = otherInfoMapper.selectOne(otherLambda);
String supervisoryCode = otherInfo.getSupervisoryCode();
dto.setSupervisoryCode(supervisoryCode);
dto.setApplyNo(applyNo);
dto.setCreateDate(new Date());
dto.setNextExecuteIds(String.join(",", roleListNext));
......@@ -263,7 +269,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
taskModelDto.setFlowCreateDate(dto.getCreateDate());
taskModelDto.setTaskName(taskName);
taskModelDto.setTaskCode(dto.getApplyNo());
taskModelDto.setTaskContent(this.buildTaskContent(dto.getCancelType(), dto.getApplyNo()));
taskModelDto.setTaskContent(this.buildTaskContent(dto.getSupervisoryCode(), dto.getCancelType(), dto.getApplyNo()));
taskModelDto.setTaskDesc("");
taskModelDto.setTaskType(businessTypeJudgment(dto.getCancelType()).getCode());
taskModelDto.setTaskTypeLabel(businessTypeJudgment(dto.getCancelType()).getName());
......@@ -300,10 +306,10 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
*
* @return 摘要
*/
private String buildTaskContent(String cancelType, String applyNo) {
private String buildTaskContent(String supervisoryCode, String cancelType, String applyNo) {
// 来自电梯【X3100-123456】【移装注销】的业务办理【申请单号:ABCD0000001】
String type = "1".equals(cancelType) ? "报废注销" : "移装注销";
return String.format(template, "XXX", type, applyNo);
return String.format(template, supervisoryCode, type, applyNo);
}
......@@ -412,7 +418,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
// 先更新之前的待办
TaskV2Model taskV2Model = updateTaskModel(jgScrapCancelDto, operate);
taskV2Model.setTaskDesc("");
taskV2Model.setTaskContent(this.buildTaskContent(jgScrapCancelDto.getCancelType(), jgScrapCancelDto.getApplyNo()));
taskV2Model.setTaskContent(this.buildTaskContent(jgScrapCancelDto.getSupervisoryCode(), jgScrapCancelDto.getCancelType(), jgScrapCancelDto.getApplyNo()));
taskV2Model.setTaskName(taskName);
taskV2Model.setTaskDesc("");
taskV2Model.setTaskCode(jgScrapCancelDto.getApplyNo());
......
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