|
|
@ -83,28 +83,28 @@ public class SysCustomerServiceImpl implements ISysCustomerService |
|
|
|
/** |
|
|
|
* 查询客户基本信息列表 |
|
|
|
* |
|
|
|
* @param sysCustomerVo1 |
|
|
|
* @param sysCustomer |
|
|
|
* @return 客户基本信息 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public List<SysCustomerVo> selectSysCustomerList(SysCustomerVo sysCustomerVo1) |
|
|
|
public List<SysCustomerVo> selectSysCustomerList(SysCustomerVo sysCustomer) |
|
|
|
{ |
|
|
|
PageDomain pageDomain = TableSupport.buildPageRequest(); |
|
|
|
Integer pageNum = pageDomain.getPageNum(); |
|
|
|
Integer pageSize = pageDomain.getPageSize(); |
|
|
|
Page<SysCustomerVo> list = (Page<SysCustomerVo>) sysCustomerMapper.selectSysCustomerList(sysCustomerVo1); |
|
|
|
Page<SysCustomerVo> list = (Page<SysCustomerVo>) sysCustomerMapper.selectSysCustomerList(sysCustomer); |
|
|
|
Page<SysCustomerVo> returnList = new Page<>(); |
|
|
|
//PageHelper 仅对第一List分页有效
|
|
|
|
for(SysCustomerVo sysCustomer : list){ |
|
|
|
SysUser sysUser = userMapper.selectUserByLoginName(sysCustomer.getCreateBy()); |
|
|
|
for(SysCustomerVo sysCustomerVo : list){ |
|
|
|
SysUser sysUser = userMapper.selectUserByLoginName(sysCustomerVo.getCreateBy()); |
|
|
|
if (sysUser != null) { |
|
|
|
sysCustomer.setCreateBy(sysUser.getUserName()); |
|
|
|
sysCustomerVo.setCreateBy(sysUser.getUserName()); |
|
|
|
} |
|
|
|
SysUser sysUser2 = userMapper.selectUserByLoginName(sysCustomer.getApplyUser()); |
|
|
|
SysUser sysUser2 = userMapper.selectUserByLoginName(sysCustomerVo.getApplyUser()); |
|
|
|
if (sysUser2!=null){ |
|
|
|
sysCustomer.setApplyUserName(sysUser2.getUserName()); |
|
|
|
sysCustomerVo.setApplyUserName(sysUser2.getUserName()); |
|
|
|
} |
|
|
|
String instanceId = sysCustomer.getInstanceId(); |
|
|
|
String instanceId = sysCustomerVo.getInstanceId(); |
|
|
|
// 当前环节
|
|
|
|
if (StringUtils.isNotBlank(instanceId)) { |
|
|
|
List<Task> taskList = taskService.createTaskQuery() |
|
|
@ -114,27 +114,27 @@ public class SysCustomerServiceImpl implements ISysCustomerService |
|
|
|
if (!CollectionUtils.isEmpty(taskList)) { |
|
|
|
TaskEntityImpl task = (TaskEntityImpl) taskList.get(0); |
|
|
|
String taskId = task.getId(); |
|
|
|
sysCustomer.setTaskId(taskId); |
|
|
|
sysCustomerVo.setTaskId(taskId); |
|
|
|
// 设置待办用户
|
|
|
|
List<String> todoUserList = todoItemMapper.selectUndealTodoUserList(taskId); |
|
|
|
if(!CollectionUtils.isEmpty(taskList)){ |
|
|
|
sysCustomer.setTodoUserId(String.join(",",todoUserList)); |
|
|
|
sysCustomerVo.setTodoUserId(String.join(",",todoUserList)); |
|
|
|
} |
|
|
|
if (task.getSuspensionState() == 2) { |
|
|
|
sysCustomer.setTaskName("已挂起"); |
|
|
|
sysCustomer.setSuspendState("2"); |
|
|
|
sysCustomerVo.setTaskName("已挂起"); |
|
|
|
sysCustomerVo.setSuspendState("2"); |
|
|
|
} else { |
|
|
|
sysCustomer.setTaskName(task.getName()); |
|
|
|
sysCustomer.setSuspendState("1"); |
|
|
|
sysCustomerVo.setTaskName(task.getName()); |
|
|
|
sysCustomerVo.setSuspendState("1"); |
|
|
|
} |
|
|
|
} else { |
|
|
|
// 已办结或者已撤销
|
|
|
|
sysCustomer.setTaskName("已结束"); |
|
|
|
sysCustomerVo.setTaskName("已结束"); |
|
|
|
} |
|
|
|
} else { |
|
|
|
sysCustomer.setTaskName("未启动"); |
|
|
|
sysCustomerVo.setTaskName("未启动"); |
|
|
|
} |
|
|
|
returnList.add(sysCustomer); |
|
|
|
returnList.add(sysCustomerVo); |
|
|
|
} |
|
|
|
returnList.setTotal(CollectionUtils.isEmpty(list) ? 0 : list.getTotal()); |
|
|
|
returnList.setPageNum(pageNum); |
|
|
@ -281,7 +281,6 @@ public class SysCustomerServiceImpl implements ISysCustomerService |
|
|
|
|
|
|
|
@Override |
|
|
|
public int add(SysCustomer sysCustomer) { |
|
|
|
|
|
|
|
return sysCustomerMapper.insertSysCustomer(sysCustomer); |
|
|
|
} |
|
|
|
|
|
|
@ -387,8 +386,8 @@ public class SysCustomerServiceImpl implements ISysCustomerService |
|
|
|
|
|
|
|
|
|
|
|
private ProcessInstance startProcessInstance(String applyTitle, String instanceType, SysCustomer sysCustomer, SysUser user) { |
|
|
|
Long materialId = sysCustomer.getId(); |
|
|
|
String businessKey = materialId.toString(); // 实体类 ID,作为流程的业务 key
|
|
|
|
Long customerId = sysCustomer.getId(); |
|
|
|
String businessKey = customerId.toString(); // 实体类 ID,作为流程的业务 key
|
|
|
|
String key = "customer"; |
|
|
|
Map<String,Object> variables = new HashMap<>(); |
|
|
|
// 构造authority传参
|
|
|
|