diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/controller/ConstructionController.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/controller/ConstructionController.java index aff1c9b..019158d 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/controller/ConstructionController.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/controller/ConstructionController.java @@ -83,12 +83,6 @@ public class ConstructionController { return constructionManage.preProjectList(req); } - @ApiOperation(value = "信创审查项目列表") - @GetMapping("/xcfhx/project-list") - public PageVo xcfhxProjectList(@ModelAttribute ProjectListReq req) { - return constructionManage.xcfhxProjectList(req); - } - @GetMapping("/pre-ins/export") @ApiOperation("待初验备案的项目列表导出") @WebLog("待初验备案的项目列表导出") diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ConstructionManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ConstructionManage.java index c2e4070..f7698dc 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ConstructionManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ConstructionManage.java @@ -345,7 +345,8 @@ public class ConstructionManage { VUtils.isTrue(Objects.isNull(user)).throwMessage("获取登录用户失败!"); LambdaQueryWrapper query = ProjectHelper.projectQuery(req); //建设中状态 - query.eq(Project::getStatus, ProjectStatusEnum.TO_BE_FIRST_INSPECTED.getCode()); + query.in(Project::getStatus, ProjectStatusEnum.TO_BE_FIRST_INSPECTED.getCode(), + ProjectStatusEnum.ON_FIRST_INSPECTED.getCode()); query.eq(Project::getStage, ProjectStatusEnum.PROJECT_APPROVED.getCode()); query.eq(Project::getNewest, Boolean.TRUE); //只能看自己单位的 diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/service/IPurchaseInstService.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/service/IPurchaseInstService.java index 3ae2d0e..b11645e 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/service/IPurchaseInstService.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/service/IPurchaseInstService.java @@ -5,6 +5,9 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.service.IService; import com.hz.pm.api.projectdeclared.model.entity.PurchaseInst; +import java.util.Collection; +import java.util.List; + /** *

* IPurchaseInstService @@ -22,4 +25,10 @@ public interface IPurchaseInstService extends IService { return getOne(query); } + default List listByInstCodes(Collection instCodes) { + Wrapper query = Wrappers.lambdaQuery(PurchaseInst.class) + .in(PurchaseInst::getInstCode, instCodes); + return list(query); + } + } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/IProjectService.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/IProjectService.java index 53a6472..314494d 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/IProjectService.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/IProjectService.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.hz.pm.api.common.model.constant.BizConst; import com.hz.pm.api.projectlib.model.entity.Project; import com.baomidou.mybatisplus.extension.service.IService; import com.hz.pm.api.projectlib.model.po.ProjectPO; @@ -26,7 +27,8 @@ public interface IProjectService extends IService { default Optional getProjectCode(Long projectId) { LambdaQueryWrapper query = Wrappers.lambdaQuery(Project.class) - .select(Project::getProjectCode); + .select(Project::getProjectCode) + .last(BizConst.LIMIT_1); return Optional.ofNullable(getOne(query)) .flatMap(w -> Optional.of(w.getProjectCode())); } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/HandlerManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/HandlerManage.java index bb855e7..a0bb468 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/HandlerManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/HandlerManage.java @@ -586,4 +586,5 @@ public class HandlerManage { } return Boolean.FALSE; } + } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/TodoCenterManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/TodoCenterManage.java index 9423264..d2d1dba 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/TodoCenterManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/TodoCenterManage.java @@ -24,6 +24,8 @@ import com.hz.pm.api.common.util.BizUtils; import com.hz.pm.api.common.util.ExcelDownUtil; import com.hz.pm.api.irs.sign.IRSAPIRequest; import com.hz.pm.api.projectdeclared.manage.DefaultDeclaredProjectManage; +import com.hz.pm.api.projectdeclared.model.entity.PurchaseInst; +import com.hz.pm.api.projectdeclared.service.IPurchaseInstService; import com.hz.pm.api.projectlib.manage.ProjectLibManage; import com.hz.pm.api.projectlib.model.dto.ProjectApplicationDTO; import com.hz.pm.api.projectlib.model.dto.ProjectDTO; @@ -145,6 +147,7 @@ public class TodoCenterManage { private final RepositoryService repositoryService; private final IRegionService regionService; private final ITodoService todoService; + private final IPurchaseInstService purchaseInstService; /** * 待办中心待我处理项目列表查询 @@ -212,7 +215,10 @@ public class TodoCenterManage { .collect(Collectors.toList()).stream() .filter(v -> processSet.add(v.getNodeId())) .collect(Collectors.toMap(ProcessTaskVo::getNodeId, v -> v)); - + List instanceIds = CollUtils.fieldList(userTodoList, ProcessTaskVo::getInstanceId); + List purchaseInstList = purchaseInstService.listByInstCodes(instanceIds); + Map purchaseInstMap = CollUtils.listToMap(purchaseInstList, + PurchaseInst::getInstCode, PurchaseInst::getBidId); List resVos = userTodoList.stream().map(d -> { Project projectInfo = projectInfoMap.get(d.getInstanceId()); @@ -230,6 +236,7 @@ public class TodoCenterManage { res.setTaskId(d.getTaskId()); res.setNodeName(findSubProcessName(d)); res.setPretrialFileId(projectInfo.getPretrialFileId()); + res.setBidId(purchaseInstMap.get(d.getInstanceId())); return res; }).collect(Collectors.toList()); return PageVo.of(resVos, list.size()); @@ -340,9 +347,7 @@ public class TodoCenterManage { VUtils.isTrue(Objects.isNull(projectId)).throwMessage("获取项目ID失败!"); // 获取当前申报项目 - Project declaredProject = projectService.getOne(Wrappers.lambdaQuery(Project.class) - .eq(Project::getInstCode, processInstanceId) - .eq(Project::getId, projectId)); + Project declaredProject = projectService.getById(projectId); VUtils.isTrue(Objects.isNull(declaredProject)).throwMessage("获取项目失败!"); // 获取当前未处理流程详情 @@ -679,12 +684,14 @@ public class TodoCenterManage { if (CollUtil.isEmpty(iDoList)) { return PageVo.empty(); } - List userIdoList = iDoList.stream() .skip((long) (pageNumber - 1) * pageSize) .limit(pageSize) .collect(Collectors.toList()); - + List instanceIds = CollUtils.fieldList(userIdoList, ProcessTaskVo::getInstanceId); + List purchaseInstList = purchaseInstService.listByInstCodes(instanceIds); + Map purchaseInstMap = CollUtils.listToMap(purchaseInstList, + PurchaseInst::getInstCode, PurchaseInst::getBidId); List resVos = userIdoList.stream().map(d -> { ResToBeProcessedVO res = new ResToBeProcessedVO(); Project projectInfo = projectInfoMap.get(d.getInstanceId()); @@ -698,6 +705,7 @@ public class TodoCenterManage { res.setProcessHandleTime(d.getTaskEndTime()); res.setTaskId(d.getTaskId()); res.setNodeName(findSubProcessName(d)); + res.setBidId(purchaseInstMap.get(d.getInstanceId())); return res; }).collect(Collectors.toList()); return PageVo.of(resVos, iDoList.size()); diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/vo/ResToBeProcessedVO.java b/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/vo/ResToBeProcessedVO.java index dbf691f..b684ed5 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/vo/ResToBeProcessedVO.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/vo/ResToBeProcessedVO.java @@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; + import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; @@ -72,4 +73,8 @@ public class ResToBeProcessedVO implements Serializable { @ApiModelProperty("项目预审申请单文件ID") private Long pretrialFileId; + + @ApiModelProperty("标段ID") + private Long bidId; + }