whyclxw
2025-05-28 e16302f9d475c7cc4dd18c5abf1a23cb5502e362
src/main/java/com/whyc/service/WorkflowLinkService.java
@@ -135,7 +135,7 @@
                }
                break;
            }
            case "P2"://当前节点为过程2-管理审核
            case "P2"://当前节点为过程2-管理专责审核
            {
                link.setDealUserId(userId);
                if(link.getStatus() == WorkflowEnum.STATUS_REJECT.getValue().intValue()){ //驳回
@@ -388,6 +388,36 @@
        PageHelper.startPage(pageNum, pageSize);
        List<WorkflowLink> list = mapper.searchTmp(uId, uRole, type, status);
        PageInfo pageInfo = new PageInfo(list);
        //追加机房信息
        if(type !=1) { //1为查询放电计划,不追加机房信息
            List<Integer> mainIdList = list.stream().map(WorkflowLink::getMainId).collect(Collectors.toList());
            //从二次核容查询
            List<StationInf> stationInfList = tmpMapper.getStationInfWithSpecificMainId(mainIdList);
            //从故障隐患查询
            List<StationInf> stationInfList2 = faultUploadApplicationService.getStationInfWithSpecificMainId(mainIdList);
            list.forEach(link -> {
                if(link.getWorkflowMain().getType().intValue() == WorkflowEnum.MAIN_TYPE_DISCHARGE_DIST.getValue()){
                    for (StationInf stationInf : stationInfList) {
                        if(stationInf.getTogetherFlag() == link.getMainId()){
                            link.setStationInf(stationInf);
                            break;
                        }
                    }
                }
                else if(link.getWorkflowMain().getType().intValue() == WorkflowEnum.MAIN_TYPE_FAULT_UPLOAD.getValue()){
                    for (StationInf stationInf : stationInfList2) {
                        if(stationInf.getTogetherFlag() == link.getMainId()){
                            link.setStationInf(stationInf);
                            break;
                        }
                    }
                }
            });
        }
        return new Response().setII(1, list == null ? false : true, pageInfo, "查询节点(除放电计划之外的)");
    }