|
@@ -96,19 +96,24 @@ public class FlowableTaskController {
|
|
|
|
|
|
@GetMapping("todo")
|
|
@GetMapping("todo")
|
|
public ResponseEntity todoListData(Page <ProcessVo> page, Flow flow) throws Exception {
|
|
public ResponseEntity todoListData(Page <ProcessVo> page, Flow flow) throws Exception {
|
|
|
|
+ //获取当前登陆人的信息
|
|
|
|
+ UserDTO currentUserDTO = UserUtils.getCurrentUserDTO();
|
|
//各服务引用状态 =》 (若包含,则进行获取该服务的流程信息)
|
|
//各服务引用状态 =》 (若包含,则进行获取该服务的流程信息)
|
|
String inquireStatus = Global.getConfig("INQUIRE_STATUS");
|
|
String inquireStatus = Global.getConfig("INQUIRE_STATUS");
|
|
Page <ProcessVo> pageList = flowTaskService.todoList(new Page<>(1, -1), flow);
|
|
Page <ProcessVo> pageList = flowTaskService.todoList(new Page<>(1, -1), flow);
|
|
List<ProcessVo> list = new ArrayList<>();
|
|
List<ProcessVo> list = new ArrayList<>();
|
|
list.addAll(pageList.getRecords()); // 当前系统查询数据
|
|
list.addAll(pageList.getRecords()); // 当前系统查询数据
|
|
- if(inquireStatus.contains("ccpm")){
|
|
|
|
- // 访问ccpm
|
|
|
|
- Object response = flowRequest.getNotifyList(flow);
|
|
|
|
- List<Map<String, Object>> res = JSONObject.parseArray(JSON.toJSONString(response));
|
|
|
|
- // ccpm待办查询返回结果
|
|
|
|
- List<ProcessVo> processVos = ConvertServiceUtil.convertProcessVoList(res);
|
|
|
|
- // 整合全部查询结果
|
|
|
|
- list.addAll(processVos); // ccpm返回数据
|
|
|
|
|
|
+ //判定如果当前登陆人是否可以查看其他服务的待办信息
|
|
|
|
+ if("1".equals(currentUserDTO.getOtherServiceFlag())){
|
|
|
|
+ if(inquireStatus.contains("ccpm")){
|
|
|
|
+ // 访问ccpm
|
|
|
|
+ Object response = flowRequest.getNotifyList(flow);
|
|
|
|
+ List<Map<String, Object>> res = JSONObject.parseArray(JSON.toJSONString(response));
|
|
|
|
+ // ccpm待办查询返回结果
|
|
|
|
+ List<ProcessVo> processVos = ConvertServiceUtil.convertProcessVoList(res);
|
|
|
|
+ // 整合全部查询结果
|
|
|
|
+ list.addAll(processVos); // ccpm返回数据
|
|
|
|
+ }
|
|
}
|
|
}
|
|
// 将整合后的结果排序后分页
|
|
// 将整合后的结果排序后分页
|
|
Page sortAndPaging = ConvertServiceUtil.getSortAndPaging(page, list);
|
|
Page sortAndPaging = ConvertServiceUtil.getSortAndPaging(page, list);
|