This commit is contained in:
qimingjin 2021-07-20 21:55:08 +08:00
parent 601dfc72bc
commit 0d878edfe9
2 changed files with 19 additions and 10 deletions

View File

@ -57,14 +57,14 @@ public class FlowUserController extends BaseController {
*/ */
@GetMapping(value = "/rest/getUserGroupList") @GetMapping(value = "/rest/getUserGroupList")
public FlowRemoteVO getUserGroupList(@RequestParam(value = "filter",required = false) String filter) { public FlowRemoteVO getUserGroupList(@RequestParam(value = "filter",required = false) String filter) {
startPage();
List<RemoteGroup> flowUserGroupList = flowableUserService.getFlowUserGroupList(filter); List<RemoteGroup> flowUserGroupList = flowableUserService.getLinkFlowUserGroupList(filter);
TableDataInfo dataTable = getDataTable(flowUserGroupList);
FlowRemoteVO flowRemoteVO = new FlowRemoteVO(); FlowRemoteVO flowRemoteVO = new FlowRemoteVO();
flowRemoteVO.setData(dataTable.getRows()); flowRemoteVO.setData(flowUserGroupList);
flowRemoteVO.setSize(dataTable.getPageSize()); // flowRemoteVO.setSize(dataTable.getPageSize());
flowRemoteVO.setStart(dataTable.getPageIndex()); // flowRemoteVO.setStart(dataTable.getPageIndex());
flowRemoteVO.setTotal(dataTable.getTotal()); flowRemoteVO.setTotal(flowUserGroupList.size());
return flowRemoteVO; return flowRemoteVO;
} }
} }

View File

@ -245,13 +245,22 @@ public class FlowableUserServiceImpl implements FlowableUserService {
List<RemoteGroup> flowUserGroupList = getFlowUserGroupList(filter); List<RemoteGroup> flowUserGroupList = getFlowUserGroupList(filter);
if(CollectionUtil.isNotEmpty(flowUserGroupList)){ if(CollectionUtil.isNotEmpty(flowUserGroupList)){
flowUserGroupList.forEach(t->{ flowUserGroupList.forEach(t->{
FlowGroupDO flowGroupDO1 = flowGroupDOService.selectFlowGroupDOById(Long.parseLong(t.getId())); FlowGroupDO flowGroupDOById = flowGroupDOService.selectFlowGroupDOById(Long.parseLong(t.getId()));
if(flowGroupDOById.getParentId()==0L){
return;
}
FlowGroupDO flowGroupDO=new FlowGroupDO(); FlowGroupDO flowGroupDO=new FlowGroupDO();
flowGroupDO.setParentId(Long.parseLong(t.getId())); flowGroupDO.setParentId(Long.parseLong(t.getId()));
List<FlowGroupDO> flowGroupDOS = flowGroupDOService.selectFlowGroupDOList(flowGroupDO); List<FlowGroupDO> flowGroupDOS = flowGroupDOService.selectFlowGroupDOList(flowGroupDO);
if() if(CollectionUtil.isEmpty(flowGroupDOS)){
RemoteGroup remoteGroup=new RemoteGroup();
FlowGroupDO parentFlowGroupDO = flowGroupDOService.selectFlowGroupDOById(flowGroupDOById.getParentId());
remoteGroup.setId(t.getId());
remoteGroup.setName(parentFlowGroupDO.getRoleName()+"---"+t.getName());
returnFlowUserGroupList.add(remoteGroup);
}
}); });
} }
return null; return returnFlowUserGroupList;
} }
} }