|
@@ -244,23 +244,24 @@ public class TodoCenterManage { |
|
|
public PageVo<ResToBeProcessedVO> todoXinchuangList(ToBeProcessedReq param) { |
|
|
public PageVo<ResToBeProcessedVO> todoXinchuangList(ToBeProcessedReq param) { |
|
|
Long userId = Optional.ofNullable(param.getUserId()).orElseGet(LoginUserUtil::getUserId); |
|
|
Long userId = Optional.ofNullable(param.getUserId()).orElseGet(LoginUserUtil::getUserId); |
|
|
String userIdStr = String.valueOf(userId); |
|
|
String userIdStr = String.valueOf(userId); |
|
|
UserFullInfoDTO userFullInfo = userInfoHelper.getUserFullInfo(userId); |
|
|
|
|
|
|
|
|
|
|
|
// 查出信创信息 |
|
|
|
|
|
|
|
|
// 查出信创 |
|
|
List<Xinchuang> xinchuangs = xinchuangService.list(Wrappers.lambdaQuery(Xinchuang.class) |
|
|
List<Xinchuang> xinchuangs = xinchuangService.list(Wrappers.lambdaQuery(Xinchuang.class) |
|
|
.isNotNull(Xinchuang::getInstCode)); |
|
|
.isNotNull(Xinchuang::getInstCode)); |
|
|
|
|
|
|
|
|
if (CollUtil.isEmpty(xinchuangs)) { |
|
|
if (CollUtil.isEmpty(xinchuangs)) { |
|
|
return PageVo.empty(); |
|
|
return PageVo.empty(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Map<Long, Xinchuang> xinchuangMap = CollUtils.listToMap(xinchuangs, Xinchuang::getId); |
|
|
List<Long> xinchuangIds = CollUtils.fieldList(xinchuangs, Xinchuang::getId); |
|
|
List<Long> xinchuangIds = CollUtils.fieldList(xinchuangs, Xinchuang::getId); |
|
|
List<XinchuangInst> xinchuangInsts = xinchuangInstService.listByXinchuangIds(xinchuangIds); |
|
|
List<XinchuangInst> xinchuangInsts = xinchuangInstService.listByXinchuangIds(xinchuangIds); |
|
|
|
|
|
|
|
|
Map<String, Xinchuang> xinchuangMap = CollUtils.listToMap(xinchuangs, Xinchuang::getInstCode); |
|
|
|
|
|
|
|
|
Map<String, XinchuangInst> xinchuangInstMap = CollUtils.listToMap(xinchuangInsts, XinchuangInst::getInstCode); |
|
|
List<String> instCodes = CollUtils.fieldList(xinchuangInsts, XinchuangInst::getInstCode); |
|
|
List<String> instCodes = CollUtils.fieldList(xinchuangInsts, XinchuangInst::getInstCode); |
|
|
if (CollUtil.isEmpty(instCodes)) { |
|
|
if (CollUtil.isEmpty(instCodes)) { |
|
|
return PageVo.empty(); |
|
|
return PageVo.empty(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 查出用户工作流 |
|
|
// 查出用户工作流 |
|
|
TodoCenterListReqDTO req = new TodoCenterListReqDTO(); |
|
|
TodoCenterListReqDTO req = new TodoCenterListReqDTO(); |
|
|
req.setInstCodes(instCodes); |
|
|
req.setInstCodes(instCodes); |
|
@@ -296,9 +297,10 @@ public class TodoCenterManage { |
|
|
List<String> instanceIds = CollUtils.fieldList(userTodoList, ProcessTaskVo::getInstanceId); |
|
|
List<String> instanceIds = CollUtils.fieldList(userTodoList, ProcessTaskVo::getInstanceId); |
|
|
|
|
|
|
|
|
List<ResToBeProcessedVO> resVos = userTodoList.stream().map(d -> { |
|
|
List<ResToBeProcessedVO> resVos = userTodoList.stream().map(d -> { |
|
|
Xinchuang xinchuang = xinchuangMap.get(d.getInstanceId()); |
|
|
|
|
|
|
|
|
XinchuangInst xinchuangInst = xinchuangInstMap.get(d.getInstanceId()); |
|
|
ResToBeProcessedVO res = new ResToBeProcessedVO(); |
|
|
ResToBeProcessedVO res = new ResToBeProcessedVO(); |
|
|
if(Objects.nonNull(xinchuang)){ |
|
|
|
|
|
|
|
|
if(Objects.nonNull(xinchuangInst) && xinchuangMap.containsKey(xinchuangInst.getXinchuangId())){ |
|
|
|
|
|
Xinchuang xinchuang = xinchuangMap.get(xinchuangInst.getXinchuangId()); |
|
|
res.setXinchuangId(xinchuang.getId()); |
|
|
res.setXinchuangId(xinchuang.getId()); |
|
|
res.setProjectName(xinchuang.getProjectName()); |
|
|
res.setProjectName(xinchuang.getProjectName()); |
|
|
res.setBuildOrg(xinchuang.getBuildOrgName()); |
|
|
res.setBuildOrg(xinchuang.getBuildOrgName()); |
|
@@ -931,19 +933,19 @@ public class TodoCenterManage { |
|
|
Long userId = LoginUserUtil.getUserId(); |
|
|
Long userId = LoginUserUtil.getUserId(); |
|
|
// 获取登录用户浙政钉code |
|
|
// 获取登录用户浙政钉code |
|
|
String userIdStr = String.valueOf(userId); |
|
|
String userIdStr = String.valueOf(userId); |
|
|
UserFullInfoDTO userFullInfo = userInfoHelper.getUserFullInfo(userId); |
|
|
|
|
|
|
|
|
|
|
|
// 查出信创信息 |
|
|
|
|
|
|
|
|
// 查出信创 |
|
|
List<Xinchuang> xinchuangs = xinchuangService.list(Wrappers.lambdaQuery(Xinchuang.class) |
|
|
List<Xinchuang> xinchuangs = xinchuangService.list(Wrappers.lambdaQuery(Xinchuang.class) |
|
|
.isNotNull(Xinchuang::getInstCode)); |
|
|
.isNotNull(Xinchuang::getInstCode)); |
|
|
|
|
|
|
|
|
if (xinchuangs.isEmpty()) { |
|
|
|
|
|
|
|
|
if (CollUtil.isEmpty(xinchuangs)) { |
|
|
return PageVo.empty(); |
|
|
return PageVo.empty(); |
|
|
} |
|
|
} |
|
|
|
|
|
Map<Long, Xinchuang> xinchuangMap = CollUtils.listToMap(xinchuangs, Xinchuang::getId); |
|
|
List<Long> xinchuangIds = CollUtils.fieldList(xinchuangs, Xinchuang::getId); |
|
|
List<Long> xinchuangIds = CollUtils.fieldList(xinchuangs, Xinchuang::getId); |
|
|
List<XinchuangInst> xinchuangInsts = xinchuangInstService.listByXinchuangIds(xinchuangIds); |
|
|
List<XinchuangInst> xinchuangInsts = xinchuangInstService.listByXinchuangIds(xinchuangIds); |
|
|
|
|
|
|
|
|
Map<String, Xinchuang> xinchuangMap = CollUtils.listToMap(xinchuangs, Xinchuang::getInstCode); |
|
|
|
|
|
|
|
|
Map<String, XinchuangInst> xinchuangInstMap = CollUtils.listToMap(xinchuangInsts, XinchuangInst::getInstCode); |
|
|
List<String> instCodes = CollUtils.fieldList(xinchuangInsts, XinchuangInst::getInstCode); |
|
|
List<String> instCodes = CollUtils.fieldList(xinchuangInsts, XinchuangInst::getInstCode); |
|
|
if (CollUtil.isEmpty(instCodes)) { |
|
|
if (CollUtil.isEmpty(instCodes)) { |
|
|
return PageVo.empty(); |
|
|
return PageVo.empty(); |
|
@@ -967,8 +969,9 @@ public class TodoCenterManage { |
|
|
.collect(Collectors.toList()); |
|
|
.collect(Collectors.toList()); |
|
|
List<ResToBeProcessedVO> resVos = userIdoList.stream().map(d -> { |
|
|
List<ResToBeProcessedVO> resVos = userIdoList.stream().map(d -> { |
|
|
ResToBeProcessedVO res = new ResToBeProcessedVO(); |
|
|
ResToBeProcessedVO res = new ResToBeProcessedVO(); |
|
|
Xinchuang xinchuang = xinchuangMap.get(d.getInstanceId()); |
|
|
|
|
|
if(Objects.nonNull(xinchuang)){ |
|
|
|
|
|
|
|
|
XinchuangInst xinchuangInst = xinchuangInstMap.get(d.getInstanceId()); |
|
|
|
|
|
if(Objects.nonNull(xinchuangInst) && xinchuangMap.containsKey(xinchuangInst.getXinchuangId())){ |
|
|
|
|
|
Xinchuang xinchuang = xinchuangMap.get(xinchuangInst.getXinchuangId()); |
|
|
res.setXinchuangId(xinchuang.getId()); |
|
|
res.setXinchuangId(xinchuang.getId()); |
|
|
res.setProjectName(xinchuang.getProjectName()); |
|
|
res.setProjectName(xinchuang.getProjectName()); |
|
|
res.setBuildOrg(xinchuang.getBuildOrgName()); |
|
|
res.setBuildOrg(xinchuang.getBuildOrgName()); |
|
@@ -1132,7 +1135,6 @@ public class TodoCenterManage { |
|
|
Long userId = LoginUserUtil.getUserId(); |
|
|
Long userId = LoginUserUtil.getUserId(); |
|
|
// 获取登录用户浙政钉code |
|
|
// 获取登录用户浙政钉code |
|
|
String userIdStr = String.valueOf(userId); |
|
|
String userIdStr = String.valueOf(userId); |
|
|
UserFullInfoDTO userFullInfo = userInfoHelper.getUserFullInfo(userId); |
|
|
|
|
|
|
|
|
|
|
|
// 查出信创 |
|
|
// 查出信创 |
|
|
List<Xinchuang> xinchuangs = xinchuangService.list(Wrappers.lambdaQuery(Xinchuang.class) |
|
|
List<Xinchuang> xinchuangs = xinchuangService.list(Wrappers.lambdaQuery(Xinchuang.class) |
|
@@ -1141,10 +1143,11 @@ public class TodoCenterManage { |
|
|
if (CollUtil.isEmpty(xinchuangs)) { |
|
|
if (CollUtil.isEmpty(xinchuangs)) { |
|
|
return PageVo.empty(); |
|
|
return PageVo.empty(); |
|
|
} |
|
|
} |
|
|
|
|
|
Map<Long, Xinchuang> xinchuangMap = CollUtils.listToMap(xinchuangs, Xinchuang::getId); |
|
|
List<Long> xinchuangIds = CollUtils.fieldList(xinchuangs, Xinchuang::getId); |
|
|
List<Long> xinchuangIds = CollUtils.fieldList(xinchuangs, Xinchuang::getId); |
|
|
List<XinchuangInst> xinchuangInsts = xinchuangInstService.listByXinchuangIds(xinchuangIds); |
|
|
List<XinchuangInst> xinchuangInsts = xinchuangInstService.listByXinchuangIds(xinchuangIds); |
|
|
|
|
|
|
|
|
Map<String, Xinchuang> xinchuangMap = CollUtils.listToMap(xinchuangs, Xinchuang::getInstCode); |
|
|
|
|
|
|
|
|
Map<String, XinchuangInst> xinchuangInstMap = CollUtils.listToMap(xinchuangInsts, XinchuangInst::getInstCode); |
|
|
List<String> instCodes = CollUtils.fieldList(xinchuangInsts, XinchuangInst::getInstCode); |
|
|
List<String> instCodes = CollUtils.fieldList(xinchuangInsts, XinchuangInst::getInstCode); |
|
|
if (CollUtil.isEmpty(instCodes)) { |
|
|
if (CollUtil.isEmpty(instCodes)) { |
|
|
return PageVo.empty(); |
|
|
return PageVo.empty(); |
|
@@ -1171,8 +1174,9 @@ public class TodoCenterManage { |
|
|
|
|
|
|
|
|
List<ResToBeProcessedVO> resVos = userSubmittedList.stream().map(d -> { |
|
|
List<ResToBeProcessedVO> resVos = userSubmittedList.stream().map(d -> { |
|
|
ResToBeProcessedVO res = new ResToBeProcessedVO(); |
|
|
ResToBeProcessedVO res = new ResToBeProcessedVO(); |
|
|
Xinchuang xinchuang = xinchuangMap.get(d.getInstanceId()); |
|
|
|
|
|
if(Objects.nonNull(xinchuang)){ |
|
|
|
|
|
|
|
|
XinchuangInst xinchuangInst = xinchuangInstMap.get(d.getInstanceId()); |
|
|
|
|
|
if(Objects.nonNull(xinchuangInst) && xinchuangMap.containsKey(xinchuangInst.getXinchuangId())){ |
|
|
|
|
|
Xinchuang xinchuang = xinchuangMap.get(xinchuangInst.getXinchuangId()); |
|
|
res.setXinchuangId(xinchuang.getId()); |
|
|
res.setXinchuangId(xinchuang.getId()); |
|
|
res.setProjectName(xinchuang.getProjectName()); |
|
|
res.setProjectName(xinchuang.getProjectName()); |
|
|
res.setBuildOrg(xinchuang.getBuildOrgName()); |
|
|
res.setBuildOrg(xinchuang.getBuildOrgName()); |
|
@@ -1327,6 +1331,67 @@ public class TodoCenterManage { |
|
|
return PageVo.of(resVos, ccMeList.size()); |
|
|
return PageVo.of(resVos, ccMeList.size()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public PageVo<ResToBeProcessedVO> ccmeListXinchuang(ToBeProcessedReq param) { |
|
|
|
|
|
|
|
|
|
|
|
// 获取登录用户ID |
|
|
|
|
|
Long userId = LoginUserUtil.getUserId(); |
|
|
|
|
|
// 获取登录用户全量信息 |
|
|
|
|
|
String userIdStr = String.valueOf(userId); |
|
|
|
|
|
// 查出信创 |
|
|
|
|
|
List<Xinchuang> xinchuangs = xinchuangService.list(Wrappers.lambdaQuery(Xinchuang.class) |
|
|
|
|
|
.isNotNull(Xinchuang::getInstCode)); |
|
|
|
|
|
|
|
|
|
|
|
if (CollUtil.isEmpty(xinchuangs)) { |
|
|
|
|
|
return PageVo.empty(); |
|
|
|
|
|
} |
|
|
|
|
|
Map<Long, Xinchuang> xinchuangMap = CollUtils.listToMap(xinchuangs, Xinchuang::getId); |
|
|
|
|
|
List<Long> xinchuangIds = CollUtils.fieldList(xinchuangs, Xinchuang::getId); |
|
|
|
|
|
List<XinchuangInst> xinchuangInsts = xinchuangInstService.listByXinchuangIds(xinchuangIds); |
|
|
|
|
|
|
|
|
|
|
|
Map<String, XinchuangInst> xinchuangInstMap = CollUtils.listToMap(xinchuangInsts, XinchuangInst::getInstCode); |
|
|
|
|
|
List<String> instCodes = CollUtils.fieldList(xinchuangInsts, XinchuangInst::getInstCode); |
|
|
|
|
|
if (CollUtil.isEmpty(instCodes)) { |
|
|
|
|
|
return PageVo.empty(); |
|
|
|
|
|
} |
|
|
|
|
|
// 查出用户工作流 |
|
|
|
|
|
TodoCenterListReqDTO req = new TodoCenterListReqDTO(); |
|
|
|
|
|
Integer pageNumber = param.getPageNumber(); |
|
|
|
|
|
Integer pageSize = param.getPageSize(); |
|
|
|
|
|
req.setProcessDefId(param.getProcessDefId()); |
|
|
|
|
|
req.setUserId(userIdStr); |
|
|
|
|
|
req.setEmployeeCode(userIdStr); |
|
|
|
|
|
req.setInstCodes(instCodes); |
|
|
|
|
|
List<ProcessInstanceVo> ccMeList = processInstanceService.getCcMeList(req); |
|
|
|
|
|
|
|
|
|
|
|
if (CollUtil.isEmpty(ccMeList)) { |
|
|
|
|
|
return PageVo.empty(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
List<ProcessInstanceVo> ccMeInstList = ccMeList.stream() |
|
|
|
|
|
.skip((long) (pageNumber - 1) * pageSize) |
|
|
|
|
|
.limit(pageSize) |
|
|
|
|
|
.collect(Collectors.toList()); |
|
|
|
|
|
|
|
|
|
|
|
List<ResToBeProcessedVO> resVos = ccMeInstList.stream().map(d -> { |
|
|
|
|
|
ResToBeProcessedVO res = new ResToBeProcessedVO(); |
|
|
|
|
|
XinchuangInst xinchuangInst = xinchuangInstMap.get(d.getInstanceId()); |
|
|
|
|
|
if(Objects.nonNull(xinchuangInst) && xinchuangMap.containsKey(xinchuangInst.getXinchuangId())){ |
|
|
|
|
|
Xinchuang xinchuang = xinchuangMap.get(xinchuangInst.getXinchuangId()); |
|
|
|
|
|
BeanUtils.copyProperties(xinchuang, res); |
|
|
|
|
|
res.setXinchuangId(xinchuang.getId()); |
|
|
|
|
|
res.setBuildOrg(xinchuang.getBuildOrgName()); |
|
|
|
|
|
res.setBuildOrgCode(xinchuang.getBuildOrgCode()); |
|
|
|
|
|
} |
|
|
|
|
|
res.setInstCode(d.getInstanceId()); |
|
|
|
|
|
res.setNodeId(d.getNodeId()); |
|
|
|
|
|
|
|
|
|
|
|
res.setProcessStatusName(d.getStatus()); |
|
|
|
|
|
res.setProcessLaunchTime(d.getStartTime()); |
|
|
|
|
|
return res; |
|
|
|
|
|
}).collect(Collectors.toList()); |
|
|
|
|
|
return PageVo.of(resVos, ccMeList.size()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 待办中心-抄送我的项目列表导出 |
|
|
* 待办中心-抄送我的项目列表导出 |
|
|
* |
|
|
* |
|
|