|
|
@ -92,19 +92,19 @@ public class SysCustomerServiceImpl implements ISysCustomerService |
|
|
|
PageDomain pageDomain = TableSupport.buildPageRequest(); |
|
|
|
Integer pageNum = pageDomain.getPageNum(); |
|
|
|
Integer pageSize = pageDomain.getPageSize(); |
|
|
|
Page<SysCustomerVo> list = (Page<SysCustomerVo>) sysCustomerMapper.selectSysCustomerList(sysCustomerVo1); |
|
|
|
Page<SysCustomerVo> returnList = new Page<>(); |
|
|
|
//PageHelper 仅对第一List分页有效
|
|
|
|
Page<SysCustomerVo> list = (Page<SysCustomerVo>) sysCustomerMapper.selectSysCustomerList(sysCustomerVo1); |
|
|
|
for(SysCustomerVo sysCustomerVo : list){ |
|
|
|
SysUser sysUser = userMapper.selectUserByLoginName(sysCustomerVo.getCreateBy()); |
|
|
|
for(SysCustomerVo sysCustomer : list){ |
|
|
|
SysUser sysUser = userMapper.selectUserByLoginName(sysCustomer.getCreateBy()); |
|
|
|
if (sysUser != null) { |
|
|
|
sysCustomerVo.setCreateBy(sysUser.getUserName()); |
|
|
|
sysCustomer.setCreateBy(sysUser.getUserName()); |
|
|
|
} |
|
|
|
SysUser sysUser2 = userMapper.selectUserByLoginName(sysCustomerVo.getApplyUser()); |
|
|
|
SysUser sysUser2 = userMapper.selectUserByLoginName(sysCustomer.getApplyUser()); |
|
|
|
if (sysUser2!=null){ |
|
|
|
sysCustomerVo.setApplyUserName(sysUser2.getUserName()); |
|
|
|
sysCustomer.setApplyUserName(sysUser2.getUserName()); |
|
|
|
} |
|
|
|
String instanceId = sysCustomerVo.getInstanceId(); |
|
|
|
String instanceId = sysCustomer.getInstanceId(); |
|
|
|
// 当前环节
|
|
|
|
if (StringUtils.isNotBlank(instanceId)) { |
|
|
|
List<Task> taskList = taskService.createTaskQuery() |
|
|
@ -114,28 +114,27 @@ public class SysCustomerServiceImpl implements ISysCustomerService |
|
|
|
if (!CollectionUtils.isEmpty(taskList)) { |
|
|
|
TaskEntityImpl task = (TaskEntityImpl) taskList.get(0); |
|
|
|
String taskId = task.getId(); |
|
|
|
sysCustomerVo.setTaskId(taskId); |
|
|
|
sysCustomer.setTaskId(taskId); |
|
|
|
// 设置待办用户
|
|
|
|
List<String> todoUserList = todoItemMapper.selectUndealTodoUserList(taskId); |
|
|
|
if(!CollectionUtils.isEmpty(taskList)){ |
|
|
|
sysCustomerVo.setTodoUserId(String.join(",",todoUserList)); |
|
|
|
sysCustomer.setTodoUserId(String.join(",",todoUserList)); |
|
|
|
} |
|
|
|
if (task.getSuspensionState() == 2) { |
|
|
|
sysCustomerVo.setTaskName("已挂起"); |
|
|
|
sysCustomerVo.setSuspendState("2"); |
|
|
|
sysCustomer.setTaskName("已挂起"); |
|
|
|
sysCustomer.setSuspendState("2"); |
|
|
|
} else { |
|
|
|
sysCustomerVo.setTaskName(task.getName()); |
|
|
|
sysCustomerVo.setSuspendState("1"); |
|
|
|
sysCustomer.setTaskName(task.getName()); |
|
|
|
sysCustomer.setSuspendState("1"); |
|
|
|
} |
|
|
|
} else { |
|
|
|
// 已办结或者已撤销
|
|
|
|
sysCustomerVo.setTaskName("已结束"); |
|
|
|
sysCustomer.setTaskName("已结束"); |
|
|
|
} |
|
|
|
} else { |
|
|
|
sysCustomer.setTaskName("未启动"); |
|
|
|
} |
|
|
|
else { |
|
|
|
sysCustomerVo.setTaskName("未启动"); |
|
|
|
} |
|
|
|
returnList.add(sysCustomerVo); |
|
|
|
returnList.add(sysCustomer); |
|
|
|
} |
|
|
|
returnList.setTotal(CollectionUtils.isEmpty(list) ? 0 : list.getTotal()); |
|
|
|
returnList.setPageNum(pageNum); |
|
|
|