Commit 78a91d39 authored by 刘林's avatar 刘林

fix(jg):代办设备种类转义bug修改

parent 96bb068d
......@@ -32,6 +32,7 @@ import com.yeejoin.amos.boot.module.jg.api.enums.PipelineEnum;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgInstallationNoticeEqMapper;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgInstallationNoticeMapper;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgRegistrationHistoryMapper;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationMapper;
import com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService;
import com.yeejoin.amos.boot.module.jg.api.vo.SortVo;
import com.yeejoin.amos.boot.module.jg.api.vo.tableDataExportVo.InstallationVo;
......@@ -203,6 +204,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
private JgTransferNoticeServiceImpl jgTransferNoticeService;
@Autowired
private JgMaintainNoticeServiceImpl jgMaintainNoticeService;
@Autowired
private JgUseRegistrationMapper jgUseRegistrationMapper;
/**
......@@ -953,6 +956,13 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
*/
private void buildTaskDraft(List<JgInstallationNotice> list) {
List<TaskModelDto> modelDtos = new ArrayList<>();
String equType = Optional.ofNullable(list)
.filter(l -> !l.isEmpty())
.map(l -> l.get(0))
.map(JgInstallationNotice::getEquListCode)
.map(jgUseRegistrationMapper::getEquType)
.orElse(null);
assert list != null;
list.forEach(obj -> {
TaskModelDto dto = new TaskModelDto();
// 行数据
......@@ -960,7 +970,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
BeanUtils.copyProperties(obj, taskMessageDto);
dto.setModel(taskMessageDto);
// 摘要 按原有规则组装
dto.setTaskContent(String.format("来自%s的业务办理,【申请单号:%s】", obj.getEquList(), obj.getApplyNo()));
dto.setTaskContent(String.format("来自%s的业务办理,【申请单号:%s】", equType, obj.getApplyNo()));
// 申请单号
dto.setTaskCode(obj.getApplyNo());
// 业务类型枚举code值
......@@ -975,6 +985,13 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
private void buildTask(List<JgInstallationNotice> list, List<WorkflowResultDto> workflowResultList, Boolean isDeleteDraft) {
List<TaskModelDto> taskModelDtoList = new ArrayList<>();
WorkflowResultDto workflowResultDto = workflowResultList.get(0);
String equType = Optional.ofNullable(list)
.filter(l -> !l.isEmpty())
.map(l -> l.get(0))
.map(JgInstallationNotice::getEquListCode)
.map(jgUseRegistrationMapper::getEquType)
.orElse(null);
assert list != null;
list.forEach(item -> {
TaskModelDto taskModelDto = new TaskModelDto();
taskModelDto.setFlowCreateDate(item.getCreateDate());
......@@ -993,7 +1010,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
taskModelDto.setStartUserCompanyName(item.getCreateUserCompanyName()); // 任务发起人所在单位
taskModelDto.setStartDate(item.getCreateDate());
taskModelDto.setNextExecuteUser(item.getNextExecuteIds());
taskModelDto.setTaskContent(String.format("来自%s的业务办理,【申请单号:%s】", item.getEquList(), item.getApplyNo()));
taskModelDto.setTaskContent(String.format("来自%s的业务办理,【申请单号:%s】", equType, item.getApplyNo()));
TaskMessageDto taskMessageDto = new TaskMessageDto();
BeanUtils.copyProperties(item, taskMessageDto);
taskModelDto.setModel(taskMessageDto);
......
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