Explorar el Código

feat:

1. 过程管理增加查询条件;
tags/24122501^0
WendyYang hace 2 semanas
padre
commit
7740f498d1
Se han modificado 31 ficheros con 174 adiciones y 132 borrados
  1. +2
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/open/controller/OpenApiFileController.java
  2. +1
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/open/controller/OpenApiMeetingController.java
  3. +1
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/open/controller/OpenApiProjectLibController.java
  4. +3
    -3
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/controller/ConstructionController.java
  5. +15
    -15
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/controller/DeclaredProjectController.java
  6. +3
    -3
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/controller/FinalAcceptanceController.java
  7. +5
    -6
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/controller/ProjectReviewController.java
  8. +4
    -4
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/controller/PurchaseController.java
  9. +2
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ConstructionManage.java
  10. +5
    -5
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/DeclaredProjectManage.java
  11. +3
    -3
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/FinalAcceptanceManage.java
  12. +5
    -7
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ProjectReviewManage.java
  13. +8
    -8
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/PurchaseManage.java
  14. +3
    -3
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/AdaptionProgressVO.java
  15. +2
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/DeclaredProgressVO.java
  16. +2
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/ExpertReviewProgressVO.java
  17. +2
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/FinalAcceptProgressVO.java
  18. +2
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/FirstAcceptProgressVO.java
  19. +2
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/PurchaseProgressVO.java
  20. +3
    -3
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/controller/AmountApprovalController.java
  21. +3
    -3
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/controller/AnnualPlanController.java
  22. +3
    -3
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/controller/MhProjectController.java
  23. +5
    -3
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/controller/ProjectManageController.java
  24. +3
    -3
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/AmountApprovalManage.java
  25. +3
    -3
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/AnnualPlanLibManage.java
  26. +3
    -3
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/DeclaredRecordManage.java
  27. +52
    -34
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectManageTodoCountManage.java
  28. +23
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/req/ProjectCodeReq.java
  29. +2
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/vo/AmountApprovalProgressVO.java
  30. +2
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/vo/AnnualPlanProgressVO.java
  31. +2
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/vo/DeclaredRecordProgressVO.java

+ 2
- 0
hz-pm-api/src/main/java/com/hz/pm/api/open/controller/OpenApiFileController.java Ver fichero

@@ -5,6 +5,7 @@ import com.hz.pm.api.open.model.po.StrFileIdListReq;
import com.hz.pm.api.open.model.po.StrFileIdReq;
import com.hz.pm.api.user.util.LoginUserUtil;
import com.ningdatech.file.entity.vo.result.AttachFileVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.util.Assert;
@@ -22,6 +23,7 @@ import java.util.List;
* @author WendyYang
* @since 10:44 2024/12/9
*/
@Api(tags = "文件管理(供信产使用)")
@RestController
@RequestMapping("/open/api/file")
@RequiredArgsConstructor


+ 1
- 1
hz-pm-api/src/main/java/com/hz/pm/api/open/controller/OpenApiMeetingController.java Ver fichero

@@ -30,7 +30,7 @@ import java.util.List;
*/
@Slf4j
@Validated
@Api(tags = "专家会议开放接口")
@Api(tags = "专家会议管理(供信产使用)")
@RestController
@RequestMapping("/open/api/meeting-expert-info")
@RequiredArgsConstructor


+ 1
- 1
hz-pm-api/src/main/java/com/hz/pm/api/open/controller/OpenApiProjectLibController.java Ver fichero

@@ -25,7 +25,7 @@ import java.util.List;
* @since 10:43 2024/11/6
*/
@RestController
@Api(tags = "项目库开放接口管理")
@Api(tags = "项目库管理(供信产使用)")
@RequiredArgsConstructor
@RequestMapping("/open/api/projectLib")
public class OpenApiProjectLibController {


+ 3
- 3
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/controller/ConstructionController.java Ver fichero

@@ -6,7 +6,7 @@ import com.hz.pm.api.projectdeclared.model.dto.PaymentPlanSupplementDTO;
import com.hz.pm.api.projectdeclared.model.dto.PreInsSaveDTO;
import com.hz.pm.api.projectdeclared.model.req.XcfhxApplyReq;
import com.hz.pm.api.projectdeclared.model.vo.ContractVO;
import com.hz.pm.api.projectdeclared.model.vo.FirstAcceptProgressStatisticsVO;
import com.hz.pm.api.projectdeclared.model.vo.FirstAcceptProgressVO;
import com.hz.pm.api.projectdeclared.model.vo.PreInsVO;
import com.hz.pm.api.projectdeclared.model.vo.ProjectContractListVO;
import com.hz.pm.api.projectlib.model.req.ProjectListReq;
@@ -73,8 +73,8 @@ public class ConstructionController {

@GetMapping("/pre-ins/progressStatistics")
@ApiOperation("项目初验进度统计")
public FirstAcceptProgressStatisticsVO firstAcceptProgressStatistics(@ModelAttribute ProjectListReq req) {
return constructionManage.firstAcceptProgressStatistics(req);
public FirstAcceptProgressVO firstAcceptProgressStatistics(@ModelAttribute ProjectListReq req) {
return constructionManage.firstAcceptProgress(req);
}

@ApiOperation(value = "待初验备案的项目列表")


+ 15
- 15
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/controller/DeclaredProjectController.java Ver fichero

@@ -6,7 +6,7 @@ import com.hz.pm.api.projectdeclared.model.dto.DeclaredProjectListParamDTO;
import com.hz.pm.api.projectdeclared.model.dto.DefaultDeclaredDTO;
import com.hz.pm.api.projectdeclared.model.dto.ProjectDraftSaveDTO;
import com.hz.pm.api.projectdeclared.model.enumerization.ProjectDraftTypeEnum;
import com.hz.pm.api.projectdeclared.model.vo.DeclaredProgressStatisticsVO;
import com.hz.pm.api.projectdeclared.model.vo.DeclaredProgressVO;
import com.hz.pm.api.projectdeclared.model.vo.ProjectDraftVO;
import com.hz.pm.api.projectlib.model.req.ProjectIdReq;
import com.hz.pm.api.projectlib.model.req.ProjectListReq;
@@ -25,7 +25,7 @@ import javax.validation.Valid;

/**
* <p>
* DeclaredProjectController
* 项目申报(合规性审查)
* </p>
*
* @author WendyYang
@@ -35,58 +35,58 @@ import javax.validation.Valid;
@Validated
@RestController
@RequestMapping("/api/v1/declared")
@Api(tags = "项目申报")
@Api(tags = "项目申报(合规性审查)")
@RequiredArgsConstructor
public class DeclaredProjectController {

private final DeclaredProjectManage declaredProjectManage;

@ApiOperation(value = "申报项目已申报列表", notes = "申报项目已申报列表")
@GetMapping("/list")
@ApiOperation("申报项目已申报列表")
public PageVo<ProjectLibListItemVO> list(@ModelAttribute ProjectListReq req) {
return declaredProjectManage.projectLibList(req);
}

@GetMapping("/progressStatistics")
@ApiOperation("项目申报进度统计")
public DeclaredProgressStatisticsVO progressStatistics(@ModelAttribute ProjectListReq req) {
return declaredProjectManage.declaredProgressStatistics(req);
public DeclaredProgressVO progressStatistics(@ModelAttribute ProjectListReq req) {
return declaredProjectManage.declaredProgress(req);
}

@ApiOperation(value = "申报项目草稿箱列表", notes = "申报项目草稿箱列表")
@GetMapping("/draft")
@ApiOperation("申报项目草稿箱列表")
public PageVo<ProjectDraftVO> draft(@ModelAttribute DeclaredProjectListParamDTO params) {
return declaredProjectManage.pageDraft(params, ProjectDraftTypeEnum.PROJECT_DECLARED.getCode());
}

@ApiOperation(value = "立项备案草稿箱列表", notes = "立项备案草稿箱列表")
@GetMapping("/declaredRecord/draft")
@ApiOperation("立项备案草稿箱列表")
public PageVo<ProjectDraftVO> declaredRecordDraft(@ModelAttribute DeclaredProjectListParamDTO params) {
return declaredProjectManage.pageDraft(params, ProjectDraftTypeEnum.DECLARED_RECORD.getCode());
}

@ApiOperation(value = "申报项目草稿箱详情", notes = "申报项目草稿箱详情")
@ApiOperation("申报项目草稿箱详情")
@GetMapping("/draft/{id}")
public ProjectDraftVO draft(@PathVariable(value = "id") Long id) {
return declaredProjectManage.draftDetail(id);
}

@ApiOperation(value = "申报项目保存至草稿箱", notes = "申报项目保存至草稿箱")
@WebLog("申报项目保存至草稿箱")
@PostMapping("/save-to-draft")
@WebLog("申报项目保存至草稿箱")
@ApiOperation("申报项目保存至草稿箱")
public Object saveToDraft(@Validated @RequestBody ProjectDraftSaveDTO dto) {
return declaredProjectManage.saveToDraft(dto, ProjectDraftTypeEnum.PROJECT_DECLARED);
}

@ApiOperation(value = "立项备案保存至草稿箱", notes = "立项备案保存至草稿箱")
@WebLog("立项备案保存至草稿箱")
@ApiOperation("立项备案保存至草稿箱")
@PostMapping("/declaredRecord/save-to-draft")
public Object declaredRecordSaveToDraft(@Validated @RequestBody ProjectDraftSaveDTO dto) {
return declaredProjectManage.saveToDraft(dto, ProjectDraftTypeEnum.DECLARED_RECORD);
}

@ApiOperation(value = "申报项目", notes = "申报项目")
@WebLog("申报项目")
@ApiOperation("申报项目")
@PostMapping("/start")
public String startTheProcess(@Validated @RequestBody DefaultDeclaredDTO dto) {
String instanceId = declaredProjectManage.startTheProcess(dto);
@@ -100,7 +100,7 @@ public class DeclaredProjectController {
declaredProjectManage.store(dto);
}

@ApiOperation(value = "重新申报项目", notes = "重新申报项目")
@ApiOperation("重新申报项目")
@WebLog("重新申报项目")
@PostMapping("/restart")
public String reStartTheProcess(@Validated @RequestBody DefaultDeclaredDTO dto) {
@@ -108,7 +108,7 @@ public class DeclaredProjectController {
}

@GetMapping("/export")
@ApiOperation("申报项目列表导出")
@ApiOperation("申报项目导出")
@WebLog("申报项目列表导出")
public void exportList(ProjectListReq req, HttpServletResponse response) {
ExcelDownUtil.downXls(response, req, declaredProjectManage::exportList);


+ 3
- 3
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/controller/FinalAcceptanceController.java Ver fichero

@@ -3,7 +3,7 @@ package com.hz.pm.api.projectdeclared.controller;
import com.hz.pm.api.common.util.ExcelDownUtil;
import com.hz.pm.api.projectdeclared.manage.FinalAcceptanceManage;
import com.hz.pm.api.projectdeclared.model.req.SubmitFinallyInspectedReq;
import com.hz.pm.api.projectdeclared.model.vo.FinalAcceptProgressStatisticsVO;
import com.hz.pm.api.projectdeclared.model.vo.FinalAcceptProgressVO;
import com.hz.pm.api.projectdeclared.model.vo.FinalAcceptanceVO;
import com.hz.pm.api.projectlib.model.req.ProjectListReq;
import com.hz.pm.api.projectlib.model.vo.ProjectLibListItemVO;
@@ -37,8 +37,8 @@ public class FinalAcceptanceController {

@GetMapping("/progressStatistics")
@ApiOperation(value = "项目终验进度统计", notes = "项目终验进度统计")
public FinalAcceptProgressStatisticsVO progressStatistics(@ModelAttribute ProjectListReq req) {
return finalAcceptanceManage.finalAcceptProgressStatistics(req);
public FinalAcceptProgressVO progressStatistics(@ModelAttribute ProjectListReq req) {
return finalAcceptanceManage.finalAcceptProgress(req);
}

@ApiOperation(value = "待终验申报的项目列表", notes = "待终验申报的项目列表")


+ 5
- 6
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/controller/ProjectReviewController.java Ver fichero

@@ -3,8 +3,7 @@ package com.hz.pm.api.projectdeclared.controller;
import com.hz.pm.api.meeting.entity.dto.ProjectReviewResultDTO;
import com.hz.pm.api.projectdeclared.manage.ProjectReviewManage;
import com.hz.pm.api.projectdeclared.model.dto.DefaultDeclaredDTO;
import com.hz.pm.api.projectdeclared.model.req.ProjectReviewApplyReq;
import com.hz.pm.api.projectdeclared.model.vo.ReviewProgressStatisticsVO;
import com.hz.pm.api.projectdeclared.model.vo.ExpertReviewProgressVO;
import com.hz.pm.api.projectlib.model.req.ProjectListReq;
import com.hz.pm.api.projectlib.model.req.UploadConstructionPlanSealFileReq;
import com.hz.pm.api.projectlib.model.vo.ProjectLibListItemVO;
@@ -61,8 +60,8 @@ public class ProjectReviewController {

@GetMapping("/progressStatistics")
@ApiOperation("评审项目进度统计")
public ReviewProgressStatisticsVO progressStatistics(ProjectListReq req) {
return projectReviewManage.reviewProjectProgressStatistics(req);
public ExpertReviewProgressVO progressStatistics(ProjectListReq req) {
return projectReviewManage.reviewProjectProgress(req);
}

@ApiOperation("专家评审列表")
@@ -73,8 +72,8 @@ public class ProjectReviewController {

@GetMapping("/expertReviewProgressStatistics")
@ApiOperation("专家评审项目进度统计")
public ReviewProgressStatisticsVO expertProgressStatistics(ProjectListReq req) {
return projectReviewManage.expertReviewProjectProgressStatistics(req);
public ExpertReviewProgressVO expertProgressStatistics(ProjectListReq req) {
return projectReviewManage.expertReviewProjectProgress(req);
}

@ApiOperation("修改后重新提交")


+ 4
- 4
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/controller/PurchaseController.java Ver fichero

@@ -44,8 +44,8 @@ public class PurchaseController {

@ApiOperation(value = "招标采购进度统计")
@GetMapping("/purchaseProgressStatistics")
public PurchaseProgressStatVO purchaseProgressStatistics(@ModelAttribute ProjectListReq req) {
return purchaseManage.purchaseProgressStatistics(req);
public PurchaseProgressVO purchaseProgressStatistics(@ModelAttribute ProjectListReq req) {
return purchaseManage.purchaseProgress(req);
}

@ApiOperation(value = "待采购结果备案列表", notes = "待采购结果备案列表")
@@ -104,8 +104,8 @@ public class PurchaseController {

@GetMapping("/adaptionProgressStatistics")
@ApiOperation("获取采购进度统计")
public AdaptionProgressStatVO adaptionProgressStatistics(PurchaseAdaptionListReq req) {
return purchaseManage.adaptionProgressStatistics(req);
public AdaptionProgressVO adaptionProgressStatistics(PurchaseAdaptionListReq req) {
return purchaseManage.adaptionProgress(req);
}

@GetMapping("/pageAdaption")


+ 2
- 2
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ConstructionManage.java Ver fichero

@@ -303,7 +303,7 @@ public class ConstructionManage {
PRE_INSPECTED_PURCHASE_STATUS.add(TenderMainStatus.TO_BE_SUBMIT_FIRST_INSPECTED_INFO);
}

public FirstAcceptProgressStatisticsVO firstAcceptProgressStatistics(ProjectListReq req) {
public FirstAcceptProgressVO firstAcceptProgress(ProjectListReq req) {
UserInfoDetails user = LoginUserUtil.userDetail();
Long buildOrgCode = req.clearBuildOrgCode();
UnitQueryState queryState = mhUnitQueryAuthHelper.listCanViewUnitIds(buildOrgCode, user);
@@ -347,7 +347,7 @@ public class ConstructionManage {
Collection<List<ITenderStatus>> values = purchaseMap.values();
return CollUtil.count(values, x -> CollUtil.anyMatch(x, w -> w.eq(s)));
};
FirstAcceptProgressStatisticsVO stat = new FirstAcceptProgressStatisticsVO();
FirstAcceptProgressVO stat = new FirstAcceptProgressVO();
stat.setTotalCount(projectIds.size());
stat.setPassedCount(counter.apply(purchaseMap, TenderMainStatus.SUBMITTED_FIRST_INSPECTED_INFO));
stat.setTodoCount(counter.apply(purchaseMap, TenderMainStatus.TO_BE_SUBMIT_FIRST_INSPECTED_INFO));


+ 5
- 5
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/DeclaredProjectManage.java Ver fichero

@@ -28,7 +28,7 @@ import com.hz.pm.api.external.model.enumeration.MhUnitTypeEnum;
import com.hz.pm.api.projectdeclared.model.dto.*;
import com.hz.pm.api.projectdeclared.model.entity.ProjectDraft;
import com.hz.pm.api.projectdeclared.model.enumerization.ProjectDraftTypeEnum;
import com.hz.pm.api.projectdeclared.model.vo.DeclaredProgressStatisticsVO;
import com.hz.pm.api.projectdeclared.model.vo.DeclaredProgressVO;
import com.hz.pm.api.projectdeclared.model.vo.ProjectDraftVO;
import com.hz.pm.api.projectdeclared.service.IProjectDraftService;
import com.hz.pm.api.projectlib.helper.ProjectManageUtil;
@@ -201,8 +201,8 @@ public class DeclaredProjectManage {
/**
* 重新提交 启动实例
*
* @param req
* @return
* @param req \
* @return \
*/
@Transactional(rollbackFor = Exception.class)
public synchronized String reStartTheProcess(DefaultDeclaredDTO req) {
@@ -369,7 +369,7 @@ public class DeclaredProjectManage {
}


public DeclaredProgressStatisticsVO declaredProgressStatistics(ProjectListReq req) {
public DeclaredProgressVO declaredProgress(ProjectListReq req) {
req.setStatus(null);
UserFullInfoDTO user = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId());
LambdaQueryWrapper<Project> query = ProjectManageUtil.projectQuery(req);
@@ -384,7 +384,7 @@ public class DeclaredProjectManage {
List<Project> projects = projectService.list(query);
Map<ProjectStatus, Long> countMap = CollUtils.groupCount(projects,
w -> ProjectStatus.getNoNull(w.getStatus()));
DeclaredProgressStatisticsVO stat = new DeclaredProgressStatisticsVO();
DeclaredProgressVO stat = new DeclaredProgressVO();
stat.setTotalCount(projects.size());
stat.setTodoCount(countMap.getOrDefault(ProjectStatus.TO_BE_DECLARED, 0L));
stat.setAuditCount(countMap.getOrDefault(ProjectStatus.ON_COMPLIANCE_REVIEW, 0L));


+ 3
- 3
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/FinalAcceptanceManage.java Ver fichero

@@ -24,7 +24,7 @@ import com.hz.pm.api.projectdeclared.model.entity.Purchase;
import com.hz.pm.api.projectdeclared.model.entity.PurchaseInst;
import com.hz.pm.api.projectdeclared.model.enumerization.BidTypeEnum;
import com.hz.pm.api.projectdeclared.model.req.SubmitFinallyInspectedReq;
import com.hz.pm.api.projectdeclared.model.vo.FinalAcceptProgressStatisticsVO;
import com.hz.pm.api.projectdeclared.model.vo.FinalAcceptProgressVO;
import com.hz.pm.api.projectdeclared.model.vo.FinalAcceptanceVO;
import com.hz.pm.api.projectdeclared.service.IContractService;
import com.hz.pm.api.projectdeclared.service.IPurchaseInstService;
@@ -110,7 +110,7 @@ public class FinalAcceptanceManage {
* @param req \
* @return \
*/
public FinalAcceptProgressStatisticsVO finalAcceptProgressStatistics(ProjectListReq req) {
public FinalAcceptProgressVO finalAcceptProgress(ProjectListReq req) {
UserInfoDetails user = LoginUserUtil.userDetail();
Long buildOrgCode = req.clearBuildOrgCode();
UnitQueryState queryState = mhUnitQueryAuthHelper.listCanViewUnitIds(buildOrgCode, user);
@@ -142,7 +142,7 @@ public class FinalAcceptanceManage {
Set<Map.Entry<Long, List<Integer>>> entries = statusMap.entrySet();
return CollUtil.count(entries, entry -> entry.getValue().contains(status.getCode()));
};
return FinalAcceptProgressStatisticsVO.builder()
return FinalAcceptProgressVO.builder()
.totalCount(projects.size())
.auditCount(counter.apply(purchaseStatusMap, TenderMainStatus.ON_FINALLY_INSPECTED_APPLY))
.todoCount(counter.apply(purchaseStatusMap, TenderMainStatus.TO_BE_SUBMIT_FINALLY_INSPECTED_APPLY))


+ 5
- 7
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ProjectReviewManage.java Ver fichero

@@ -9,7 +9,6 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hz.pm.api.common.enumeration.CommonEnum;
import com.hz.pm.api.common.enumeration.ProjectProcessType;
import com.hz.pm.api.common.exception.ReturnException;
import com.hz.pm.api.common.helper.UserInfoHelper;
@@ -27,7 +26,7 @@ import com.hz.pm.api.meeting.entity.dto.ProjectReviewResultDTO;
import com.hz.pm.api.meeting.service.IMeetingInnerProjectService;
import com.hz.pm.api.projectdeclared.model.dto.DefaultDeclaredDTO;
import com.hz.pm.api.projectdeclared.model.entity.ProjectReview;
import com.hz.pm.api.projectdeclared.model.vo.ReviewProgressStatisticsVO;
import com.hz.pm.api.projectdeclared.model.vo.ExpertReviewProgressVO;
import com.hz.pm.api.projectdeclared.service.IProjectReviewService;
import com.hz.pm.api.projectdeclared.utils.ProjectIdCodeCacheUtil;
import com.hz.pm.api.projectlib.helper.ProjectManageUtil;
@@ -50,7 +49,6 @@ import com.hz.pm.api.user.security.model.UserFullInfoDTO;
import com.hz.pm.api.user.security.model.UserInfoDetails;
import com.hz.pm.api.user.util.LoginUserUtil;
import com.ningdatech.basic.exception.BizException;
import com.ningdatech.basic.function.VUtils;
import com.ningdatech.basic.model.PageVo;
import com.ningdatech.basic.util.CollUtils;
import com.wflow.bean.entity.WflowModels;
@@ -146,7 +144,7 @@ public class ProjectReviewManage {
* @param req \
* @return \
*/
public ReviewProgressStatisticsVO reviewProjectProgressStatistics(ProjectListReq req) {
public ExpertReviewProgressVO reviewProjectProgress(ProjectListReq req) {
UserFullInfoDTO user = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId());
LambdaQueryWrapper<Project> query = ProjectManageUtil.initQuery();
if (!projectQueryPermission(query, user, req.getDeclaredUnitId())) {
@@ -171,7 +169,7 @@ public class ProjectReviewManage {
}
return ProjectStatus.getNoNull(w.getStatus());
});
return ReviewProgressStatisticsVO.builder()
return ExpertReviewProgressVO.builder()
.totalCount(projects.size())
.todoCount(countMap.getOrDefault(ProjectStatus.WITHOUT_PROJECT_REVIEW, 0L))
.auditCount(countMap.getOrDefault(ProjectStatus.ON_PROJECT_REVIEW, 0L))
@@ -227,7 +225,7 @@ public class ProjectReviewManage {
return PageVo.of(records, page.getTotal());
}

public ReviewProgressStatisticsVO expertReviewProjectProgressStatistics(ProjectListReq req) {
public ExpertReviewProgressVO expertReviewProjectProgress(ProjectListReq req) {
UserFullInfoDTO user = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId());
LambdaQueryWrapper<Project> query = ProjectManageUtil.initQuery();
if (!projectQueryPermission(query, user, req.getDeclaredUnitId())) {
@@ -253,7 +251,7 @@ public class ProjectReviewManage {
}
return ProjectStatus.getNoNull(w.getStatus());
});
return ReviewProgressStatisticsVO.builder()
return ExpertReviewProgressVO.builder()
.totalCount(projects.size())
.withoutConstructionPlanSealFileCount(CollUtil.count(projects,
w -> ProjectStatus.WITHOUT_EXPERT_REVIEW.eq(w.getStatus())


+ 8
- 8
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/PurchaseManage.java Ver fichero

@@ -145,7 +145,7 @@ public class PurchaseManage {
private final ProjectStatusRewriteHandlerContext projectStatusRewriteHandlerContext;
private final StagingManage stagingManage;

public PurchaseProgressStatVO purchaseProgressStatistics(ProjectListReq req) {
public PurchaseProgressVO purchaseProgress(ProjectListReq req) {
UserInfoDetails user = LoginUserUtil.userDetail();
Long buildOrgCode = req.clearBuildOrgCode();
LambdaQueryWrapper<Project> query = ProjectManageUtil.projectQuery(req);
@@ -170,7 +170,7 @@ public class PurchaseManage {
.select(Purchase::getProjectId, Purchase::getStatus));
Map<Long, Collection<Purchase>> projectPurchaseMap = CollUtils.listToMap(projects, Project::getId,
w -> CollUtil.filterNew(purchases, x -> x.getProjectId().equals(w.getId())));
PurchaseProgressStatVO stat = new PurchaseProgressStatVO();
PurchaseProgressVO stat = new PurchaseProgressVO();
stat.setToBePurchaseCount(CollUtil.count(projectPurchaseMap.values(), Collection::isEmpty));
// 采购中
stat.setOnPurchaseCount(CollUtil.count(projectPurchaseMap.values(),
@@ -667,7 +667,7 @@ public class PurchaseManage {
tenderStateMachineUtil.pass(purchase);
purchaseService.saveOrUpdate(purchase);

UserInfoDetails user = LoginUserUtil.userDetail();
UserInfoDetails user = LoginUserUtil.userDetailNotNull();
Long projectId = req.getProjectId();
Project project = projectService.getNewestNoNull(projectId);
LocalDateTime now = LocalDateTime.now();
@@ -719,14 +719,14 @@ public class PurchaseManage {
stagingManage.delete(StagingType.PURCHASE_RECORD, req.getBidId());
}

public AdaptionProgressStatVO adaptionProgressStatistics(PurchaseAdaptionListReq req) {
public AdaptionProgressVO adaptionProgress(PurchaseAdaptionListReq req) {
LambdaQueryWrapper<Purchase> query = Wrappers.lambdaQuery(Purchase.class)
.select(Purchase::getStatus, Purchase::getId)
.eq(Purchase::getBidType, BidTypeEnum.BUILD_APP.getCode())
.exists(ExistsSqlConst.PURCHASE_EXISTS_STATUS_CHANGE
+ " and npsc.event = {0}", TenderStateChangeEvent.SUBMIT_PURCHASE_CONSTRUCTION_INFO)
.notExists(ExistsSqlConst.PURCHASE_EXISTS_PROJECT
+ "and (np.stage = {0} or np.status in ({1}),{2}))", ProjectStatus.STOPPED.getCode(),
+ "and (np.stage = {0} or np.status in ({1},{2}))", ProjectStatus.STOPPED.getCode(),
ProjectStatus.CHANGE_APPLY_PASSED.getCode(), ProjectStatus.DELETED_PASSED.getCode())
.orderByDesc(Purchase::getCreateOn);
UserFullInfoDTO user = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId());
@@ -744,10 +744,10 @@ public class PurchaseManage {
.le(req.getCreateOnMax() != null, Purchase::getCreateOn, req.getCreateOnMax())
.ge(req.getCreateOnMin() != null, Purchase::getCreateOn, req.getCreateOnMin());
List<Purchase> purchases = purchaseService.list(query);
return adaptionProgressStatistics(purchases);
return adaptionProgress(purchases);
}

public AdaptionProgressStatVO adaptionProgressStatistics(List<Purchase> purchases) {
public AdaptionProgressVO adaptionProgress(List<Purchase> purchases) {
Map<ITenderStatus, Long> statusCountMap = CollUtils.groupCount(purchases,
w -> {
ITenderStatus status = TenderMainStatus.getNoNull(w.getStatus());
@@ -771,7 +771,7 @@ public class PurchaseManage {
return status;
}
});
return AdaptionProgressStatVO.builder()
return AdaptionProgressVO.builder()
.withoutAdaptionInfo(statusCountMap.getOrDefault(TenderAdaptStatus.WITHOUT_ADAPT_INFO, 0L))
.withoutOperationCount(statusCountMap.getOrDefault(TenderMainStatus.TO_BE_SUBMIT_OPERATION_PLAN, 0L))
.withoutOrgConfirmCount(statusCountMap.getOrDefault(TenderMainStatus.WAIT_ORG_CONFIRM, 0L))


hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/AdaptionProgressStatVO.java → hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/AdaptionProgressVO.java Ver fichero

@@ -7,7 +7,7 @@ import lombok.experimental.Tolerate;

/**
* <p>
* AdaptionProgressStatVO
* AdaptionProgressVO
* </p>
*
* @author WendyYang
@@ -15,10 +15,10 @@ import lombok.experimental.Tolerate;
*/
@Data
@Builder
public class AdaptionProgressStatVO {
public class AdaptionProgressVO {

@Tolerate
public AdaptionProgressStatVO() {
public AdaptionProgressVO() {
// 默认构造方法
}


hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/DeclaredProgressStatisticsVO.java → hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/DeclaredProgressVO.java Ver fichero

@@ -5,14 +5,14 @@ import lombok.Data;

/**
* <p>
* DeclaredProgressStatisticsVO
* DeclaredProgressVO
* </p>
*
* @author WendyYang
* @since 15:23 2024/9/2
*/
@Data
public class DeclaredProgressStatisticsVO {
public class DeclaredProgressVO {

@ApiModelProperty("总数")
private Integer totalCount;

hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/ReviewProgressStatisticsVO.java → hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/ExpertReviewProgressVO.java Ver fichero

@@ -6,7 +6,7 @@ import lombok.Data;

/**
* <p>
* ProjectReviewProgressStatisticsVO
* ExpertReviewProgressVO
* </p>
*
* @author WendyYang
@@ -14,7 +14,7 @@ import lombok.Data;
*/
@Data
@Builder
public class ReviewProgressStatisticsVO {
public class ExpertReviewProgressVO {

@ApiModelProperty("总数")
private Integer totalCount;

hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/FinalAcceptProgressStatisticsVO.java → hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/FinalAcceptProgressVO.java Ver fichero

@@ -6,7 +6,7 @@ import lombok.Data;

/**
* <p>
* FinalAcceptProgressStatisticsVO
* FinalAcceptProgressVO
* </p>
*
* @author WendyYang
@@ -14,7 +14,7 @@ import lombok.Data;
*/
@Data
@Builder
public class FinalAcceptProgressStatisticsVO {
public class FinalAcceptProgressVO {

@ApiModelProperty("总数量")
private Integer totalCount;

hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/FirstAcceptProgressStatisticsVO.java → hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/FirstAcceptProgressVO.java Ver fichero

@@ -5,14 +5,14 @@ import lombok.Data;

/**
* <p>
* FirstAcceptProgressStatisticsVO
* FirstAcceptProgressVO
* </p>
*
* @author WendyYang
* @since 14:23 2024/9/4
*/
@Data
public class FirstAcceptProgressStatisticsVO {
public class FirstAcceptProgressVO {

@ApiModelProperty("总数量")
private Integer totalCount;

hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/PurchaseProgressStatVO.java → hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/PurchaseProgressVO.java Ver fichero

@@ -5,14 +5,14 @@ import lombok.Data;

/**
* <p>
* PurchaseProgressStatisticsVO
* PurchaseProgressVO
* </p>
*
* @author WendyYang
* @since 11:58 2024/8/27
*/
@Data
public class PurchaseProgressStatVO {
public class PurchaseProgressVO {

@ApiModelProperty("总数量")
private Integer totalCount;

+ 3
- 3
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/controller/AmountApprovalController.java Ver fichero

@@ -4,7 +4,7 @@ import com.hz.pm.api.projectlib.manage.AmountApprovalManage;
import com.hz.pm.api.projectlib.model.dto.ProjectApprovalAmountDTO;
import com.hz.pm.api.projectlib.model.req.ProjectListReq;
import com.hz.pm.api.projectlib.model.req.SubmitAmountApprovalReq;
import com.hz.pm.api.projectlib.model.vo.AmountApprovalProgressStatisticsVO;
import com.hz.pm.api.projectlib.model.vo.AmountApprovalProgressVO;
import com.hz.pm.api.projectlib.model.vo.ProjectLibListItemVO;
import com.ningdatech.basic.model.PageVo;
import com.ningdatech.log.annotation.WebLog;
@@ -41,8 +41,8 @@ public class AmountApprovalController {

@GetMapping("progressStatistics")
@ApiOperation("资金下达进度统计")
public AmountApprovalProgressStatisticsVO progressStatistics(ProjectListReq req) {
return amountApprovalManage.progressStatistics(req);
public AmountApprovalProgressVO progressStatistics(ProjectListReq req) {
return amountApprovalManage.amountApprovalProgress(req);
}

@PostMapping("/submit")


+ 3
- 3
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/controller/AnnualPlanController.java Ver fichero

@@ -7,7 +7,7 @@ import com.hz.pm.api.projectlib.model.req.ProjectIdReq;
import com.hz.pm.api.projectlib.model.req.ProjectListReq;
import com.hz.pm.api.projectlib.model.req.StartProjectDeclareReq;
import com.hz.pm.api.projectlib.model.vo.AnnualPlanListItemVO;
import com.hz.pm.api.projectlib.model.vo.AnnualPlanProgressStatisticsVO;
import com.hz.pm.api.projectlib.model.vo.AnnualPlanProgressVO;
import com.ningdatech.basic.model.PageVo;
import com.ningdatech.log.annotation.WebLog;
import io.swagger.annotations.Api;
@@ -42,8 +42,8 @@ public class AnnualPlanController {

@GetMapping("/progressStatistics")
@ApiOperation("年度计划库列表进度统计")
public AnnualPlanProgressStatisticsVO progressStatistics(ProjectListReq req) {
return annualPlanLibManage.annualProgressStatistics(req);
public AnnualPlanProgressVO progressStatistics(ProjectListReq req) {
return annualPlanLibManage.annualPlanProgress(req);
}

@PostMapping("/startProjectDeclared")


+ 3
- 3
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/controller/MhProjectController.java Ver fichero

@@ -4,7 +4,7 @@ import com.hz.pm.api.projectdeclared.model.dto.DefaultDeclaredDTO;
import com.hz.pm.api.projectlib.manage.DeclaredRecordManage;
import com.hz.pm.api.projectlib.model.req.DeclaredProjectListReq;
import com.hz.pm.api.projectlib.model.vo.DeclaredProjectListVO;
import com.hz.pm.api.projectlib.model.vo.DeclaredRecordProgressStatVO;
import com.hz.pm.api.projectlib.model.vo.DeclaredRecordProgressVO;
import com.hz.pm.api.projectlib.model.vo.MhProjectBaseInfoVO;
import com.ningdatech.basic.model.PageVo;
import com.ningdatech.log.annotation.WebLog;
@@ -43,8 +43,8 @@ public class MhProjectController {
@ApiOperation("立项备案列表数量统计")
@GetMapping("/declaredRecordProgressStatistics")
@WebLog("立项备案列表")
public DeclaredRecordProgressStatVO declaredRecordProgressStatistics(DeclaredProjectListReq req) {
return declaredRecordManage.declaredRecordProgressStatistics(req);
public DeclaredRecordProgressVO declaredRecordProgressStatistics(DeclaredProjectListReq req) {
return declaredRecordManage.declaredRecordProgress(req);
}

@ApiOperation("信产项目基本信息")


+ 5
- 3
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/controller/ProjectManageController.java Ver fichero

@@ -1,7 +1,9 @@
package com.hz.pm.api.projectlib.controller;

import com.hz.pm.api.projectlib.manage.ProjectManageTodoCountManage;
import com.hz.pm.api.projectlib.model.req.ProjectListReq;
import com.hz.pm.api.projectlib.model.vo.ProjectManageTodoCountVO;
import com.hz.pm.api.workbench.model.WorkbenchProjectLibReq;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -9,7 +11,7 @@ import org.springframework.web.bind.annotation.RestController;

/**
* <p>
* ProjectManageTodoCountController
* 过程管理待办统计
* </p>
*
* @author WendyYang
@@ -23,8 +25,8 @@ public class ProjectManageController {
private final ProjectManageTodoCountManage projectManageTodoCountManage;

@GetMapping("/allTodoCount")
public ProjectManageTodoCountVO allTodoCount() {
return projectManageTodoCountManage.allTodoCount();
public ProjectManageTodoCountVO allTodoCount(ProjectListReq req) {
return projectManageTodoCountManage.allTodoCount(req);
}

}


+ 3
- 3
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/AmountApprovalManage.java Ver fichero

@@ -25,7 +25,7 @@ import com.hz.pm.api.projectlib.model.entity.Project;
import com.hz.pm.api.projectlib.model.enumeration.status.ProjectStatus;
import com.hz.pm.api.projectlib.model.req.ProjectListReq;
import com.hz.pm.api.projectlib.model.req.SubmitAmountApprovalReq;
import com.hz.pm.api.projectlib.model.vo.AmountApprovalProgressStatisticsVO;
import com.hz.pm.api.projectlib.model.vo.AmountApprovalProgressVO;
import com.hz.pm.api.projectlib.model.vo.ProjectLibListItemVO;
import com.hz.pm.api.projectlib.service.IProjectApprovalAmountService;
import com.hz.pm.api.projectlib.service.IProjectService;
@@ -152,7 +152,7 @@ public class AmountApprovalManage {
}
}

public AmountApprovalProgressStatisticsVO progressStatistics(ProjectListReq req) {
public AmountApprovalProgressVO amountApprovalProgress(ProjectListReq req) {
LambdaQueryWrapper<Project> query = ProjectManageUtil.initQuery();
UserFullInfoDTO user = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId());
if (!projectQueryPermission(query, user)) {
@@ -166,7 +166,7 @@ public class AmountApprovalManage {
.notIn(Project::getStatus, ProjectStatusConstant.CHANGE_DELETE_PASSED);
buildAmountApprovalFilter(req.getIsAmountApproval(), query);
List<Project> page = projectService.list(query);
AmountApprovalProgressStatisticsVO stat = new AmountApprovalProgressStatisticsVO();
AmountApprovalProgressVO stat = new AmountApprovalProgressVO();
stat.setTotalCount(page.size());
stat.setApprovalCount(CollUtil.count(page, w -> DecimalUtil.noNullAndGtZero(w.getApprovalAmount())));
stat.setUnApprovalCount(stat.getTotalCount() - stat.getApprovalCount());


+ 3
- 3
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/AnnualPlanLibManage.java Ver fichero

@@ -23,7 +23,7 @@ import com.hz.pm.api.projectlib.model.req.ProjectIdReq;
import com.hz.pm.api.projectlib.model.req.ProjectListReq;
import com.hz.pm.api.projectlib.model.req.StartProjectDeclareReq;
import com.hz.pm.api.projectlib.model.vo.AnnualPlanListItemVO;
import com.hz.pm.api.projectlib.model.vo.AnnualPlanProgressStatisticsVO;
import com.hz.pm.api.projectlib.model.vo.AnnualPlanProgressVO;
import com.hz.pm.api.projectlib.service.IProjectApplicationService;
import com.hz.pm.api.projectlib.service.IProjectService;
import com.hz.pm.api.todocenter.constant.TodoCenterConst;
@@ -64,7 +64,7 @@ public class AnnualPlanLibManage {
private final MhUnitQueryAuthHelper mhUnitQueryAuthHelper;


public AnnualPlanProgressStatisticsVO annualProgressStatistics(ProjectListReq req) {
public AnnualPlanProgressVO annualPlanProgress(ProjectListReq req) {
req.setIsStartDeclaredProject(null);
LambdaQueryWrapper<Project> query = ProjectManageUtil.initQuery();
if (!projectQueryPermission(req.clearBuildOrgCode(), query)) {
@@ -79,7 +79,7 @@ public class AnnualPlanLibManage {
.notIn(Project::getStatus, ProjectStatusConstant.CHANGE_DELETE_PASSED)
.ne(Project::getStage, ProjectStatus.STOPPED.getCode());
List<Project> projects = projectService.list(query);
AnnualPlanProgressStatisticsVO stat = new AnnualPlanProgressStatisticsVO();
AnnualPlanProgressVO stat = new AnnualPlanProgressVO();
stat.setTotalCount(projects.size());
stat.setOpenAnnualPlanCount(CollUtil.count(projects, w -> Boolean.TRUE.equals(w.getAnnualPlanOpened())));
stat.setNotOpenAnnualPlanCount(stat.getTotalCount() - stat.getOpenAnnualPlanCount());


+ 3
- 3
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/DeclaredRecordManage.java Ver fichero

@@ -40,7 +40,7 @@ import com.hz.pm.api.projectlib.model.enumeration.GovSystemReplaceTypeEnum;
import com.hz.pm.api.projectlib.model.enumeration.status.ProjectStatus;
import com.hz.pm.api.projectlib.model.req.DeclaredProjectListReq;
import com.hz.pm.api.projectlib.model.vo.DeclaredProjectListVO;
import com.hz.pm.api.projectlib.model.vo.DeclaredRecordProgressStatVO;
import com.hz.pm.api.projectlib.model.vo.DeclaredRecordProgressVO;
import com.hz.pm.api.projectlib.model.vo.MhProjectBaseInfoVO;
import com.hz.pm.api.projectlib.service.IMhProjectSchemaTargetDataService;
import com.hz.pm.api.projectlib.service.IMhProjectService;
@@ -156,7 +156,7 @@ public class DeclaredRecordManage {
}


public DeclaredRecordProgressStatVO declaredRecordProgressStatistics(DeclaredProjectListReq req) {
public DeclaredRecordProgressVO declaredRecordProgress(DeclaredProjectListReq req) {
req.setStatus(null);
LambdaQueryWrapper<Project> query = buildDeclaredRecordQuery(req);
if (query == null) {
@@ -166,7 +166,7 @@ public class DeclaredRecordManage {
List<Project> projects = projectService.list(query);
Map<ProjectStatus, Long> countMap = CollUtils.groupCount(projects,
w -> getDeclaredRecordStatus(w.getStatus()));
DeclaredRecordProgressStatVO stat = new DeclaredRecordProgressStatVO();
DeclaredRecordProgressVO stat = new DeclaredRecordProgressVO();
stat.setTodoCount(countMap.getOrDefault(ProjectStatus.DECLARED_APPROVED_TO_BE_RECORD, 0L));
stat.setAuditingCount(countMap.getOrDefault(ProjectStatus.DECLARED_APPROVED_RECORD_AUDITING, 0L));
stat.setPassedCount(countMap.getOrDefault(ProjectStatus.DECLARED_APPROVED_RECORD_PASSED, 0L));


+ 52
- 34
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectManageTodoCountManage.java Ver fichero

@@ -1,14 +1,15 @@
package com.hz.pm.api.projectlib.manage;

import cn.hutool.core.util.NumberUtil;
import com.hz.pm.api.common.util.ThreadPoolUtil;
import com.hz.pm.api.projectdeclared.manage.*;
import com.hz.pm.api.projectdeclared.model.req.PurchaseAdaptionListReq;
import com.hz.pm.api.projectdeclared.model.vo.*;
import com.hz.pm.api.projectlib.model.req.DeclaredProjectListReq;
import com.hz.pm.api.projectlib.model.req.ProjectListReq;
import com.hz.pm.api.projectlib.model.vo.AmountApprovalProgressStatisticsVO;
import com.hz.pm.api.projectlib.model.vo.AnnualPlanProgressStatisticsVO;
import com.hz.pm.api.projectlib.model.vo.DeclaredRecordProgressStatVO;
import com.hz.pm.api.projectlib.model.vo.AmountApprovalProgressVO;
import com.hz.pm.api.projectlib.model.vo.AnnualPlanProgressVO;
import com.hz.pm.api.projectlib.model.vo.DeclaredRecordProgressVO;
import com.hz.pm.api.projectlib.model.vo.ProjectManageTodoCountVO;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@@ -43,55 +44,72 @@ public class ProjectManageTodoCountManage {
private final FinalAcceptanceManage finalAcceptanceManage;
private final ProjectReviewManage projectReviewManage;

public ProjectManageTodoCountVO allTodoCount() {
ProjectManageTodoCountVO todoCount = new ProjectManageTodoCountVO();
public ProjectManageTodoCountVO allTodoCount(ProjectListReq req) {
ProjectManageTodoCountVO ret = new ProjectManageTodoCountVO();
List<CompletableFuture<Void>> futures = new ArrayList<>();
Long buildOrgCode = NumberUtil.parseLong(req.getBuildOrgCode(), null);
ProjectListReq projReq = ProjectListReq.builder()
.projectYear(req.getProjectYear())
.declaredUnitId(buildOrgCode)
.build();
ProjectListReq projReqOrg = ProjectListReq.builder()
.projectYear(req.getProjectYear())
.buildOrgCode(req.getBuildOrgCode())
.build();
futures.add(CompletableFuture.runAsync(() -> {
// 项目申报
DeclaredProgressStatisticsVO declaredStat = declaredProjectManage.declaredProgressStatistics(new ProjectListReq());
todoCount.setProjectDeclare(sum(declaredStat, DeclaredProgressStatisticsVO::getTodoCount,
DeclaredProgressStatisticsVO::getFailedCount));
DeclaredProgressVO declaredStat = declaredProjectManage.declaredProgress(projReq);
ret.setProjectDeclare(sum(declaredStat, DeclaredProgressVO::getTodoCount,
DeclaredProgressVO::getFailedCount));
// 专家评审
ReviewProgressStatisticsVO expertReviewStat = projectReviewManage.expertReviewProjectProgressStatistics(new ProjectListReq());
todoCount.setExpertReview(sum(expertReviewStat, ReviewProgressStatisticsVO::getTodoCount));
ExpertReviewProgressVO expertReview = projectReviewManage.expertReviewProjectProgress(projReq);
ret.setExpertReview(sum(expertReview, ExpertReviewProgressVO::getTodoCount));
// 项目复核
ReviewProgressStatisticsVO projectReviewStat = projectReviewManage.reviewProjectProgressStatistics(new ProjectListReq());
todoCount.setProjectReview(sum(projectReviewStat, ReviewProgressStatisticsVO::getTodoCount,
ReviewProgressStatisticsVO::getFailedCount));
ExpertReviewProgressVO projectReview = projectReviewManage.reviewProjectProgress(projReq);
ret.setProjectReview(sum(projectReview, ExpertReviewProgressVO::getTodoCount,
ExpertReviewProgressVO::getFailedCount));
}, ThreadPoolUtil.REQUEST));
futures.add(CompletableFuture.runAsync(() -> {
// 年度计划
AnnualPlanProgressStatisticsVO annualStat = annualPlanLibManage.annualProgressStatistics(new ProjectListReq());
todoCount.setAnnualPlan(sum(annualStat, AnnualPlanProgressStatisticsVO::getNotOpenAnnualPlanCount));
AnnualPlanProgressVO annualPlan = annualPlanLibManage.annualPlanProgress(projReqOrg);
ret.setAnnualPlan(sum(annualPlan, AnnualPlanProgressVO::getNotOpenAnnualPlanCount));
// 资金下达
AmountApprovalProgressStatisticsVO amountApprovalStat = amountApprovalManage.progressStatistics(new ProjectListReq());
todoCount.setAmountApproval(sum(amountApprovalStat, AmountApprovalProgressStatisticsVO::getUnApprovalCount));
projReqOrg.setBuildOrgCode(req.getBuildOrgCode());
AmountApprovalProgressVO amountApproval = amountApprovalManage.amountApprovalProgress(projReqOrg);
ret.setAmountApproval(sum(amountApproval, AmountApprovalProgressVO::getUnApprovalCount));
// 立项备案
DeclaredRecordProgressStatVO recordStat = declaredRecordManage.declaredRecordProgressStatistics(new DeclaredProjectListReq());
todoCount.setProjectRecord(sum(recordStat, DeclaredRecordProgressStatVO::getTodoCount,
DeclaredRecordProgressStatVO::getFailedCount));
DeclaredProjectListReq declaredReq = new DeclaredProjectListReq();
declaredReq.setProjectYear(req.getProjectYear());
declaredReq.setDeclaredUnitId(buildOrgCode);
DeclaredRecordProgressVO declaredRecord = declaredRecordManage.declaredRecordProgress(declaredReq);
ret.setProjectRecord(sum(declaredRecord, DeclaredRecordProgressVO::getTodoCount,
DeclaredRecordProgressVO::getFailedCount));
}, ThreadPoolUtil.REQUEST));
futures.add(CompletableFuture.runAsync(() -> {
// 招标采购
PurchaseProgressStatVO purchaseStat = purchaseManage.purchaseProgressStatistics(new ProjectListReq());
todoCount.setProjectPurchase(sum(purchaseStat, PurchaseProgressStatVO::getOnPurchaseCount));
projReqOrg.setBuildOrgCode(req.getBuildOrgCode());
PurchaseProgressVO purchase = purchaseManage.purchaseProgress(projReqOrg);
ret.setProjectPurchase(sum(purchase, PurchaseProgressVO::getOnPurchaseCount));
// 适配改造
AdaptionProgressStatVO adaptionStat = purchaseManage.adaptionProgressStatistics(new PurchaseAdaptionListReq());
todoCount.setProjectAdaption(sum(adaptionStat, AdaptionProgressStatVO::getWithoutOperationCount,
AdaptionProgressStatVO::getWithoutAdaptionInfo,
AdaptionProgressStatVO::getWithoutTestValidCount,
AdaptionProgressStatVO::getWithoutOrgConfirmCount,
AdaptionProgressStatVO::getWithoutSelfTestCount));
PurchaseAdaptionListReq adaptionReq = new PurchaseAdaptionListReq();
adaptionReq.setBuildOrgCode(buildOrgCode);
adaptionReq.setProjectYear(req.getProjectYear());
AdaptionProgressVO adaptionStat = purchaseManage.adaptionProgress(adaptionReq);
ret.setProjectAdaption(sum(adaptionStat, AdaptionProgressVO::getWithoutOperationCount,
AdaptionProgressVO::getWithoutAdaptionInfo, AdaptionProgressVO::getWithoutTestValidCount,
AdaptionProgressVO::getWithoutOrgConfirmCount, AdaptionProgressVO::getWithoutSelfTestCount));
// 项目初验
FirstAcceptProgressStatisticsVO firstAcceptStat = constructionManage.firstAcceptProgressStatistics(new ProjectListReq());
todoCount.setFirstAccept(sum(firstAcceptStat, FirstAcceptProgressStatisticsVO::getTodoCount));
projReqOrg.setBuildOrgCode(req.getBuildOrgCode());
FirstAcceptProgressVO firstAccept = constructionManage.firstAcceptProgress(projReqOrg);
ret.setFirstAccept(sum(firstAccept, FirstAcceptProgressVO::getTodoCount));
// 项目终验
FinalAcceptProgressStatisticsVO finalAcceptStat = finalAcceptanceManage.finalAcceptProgressStatistics(new ProjectListReq());
todoCount.setFinalAccept(sum(finalAcceptStat, FinalAcceptProgressStatisticsVO::getTodoCount,
FinalAcceptProgressStatisticsVO::getFailedCount));
projReqOrg.setBuildOrgCode(req.getBuildOrgCode());
FinalAcceptProgressVO finalAccept = finalAcceptanceManage.finalAcceptProgress(projReqOrg);
ret.setFinalAccept(sum(finalAccept, FinalAcceptProgressVO::getTodoCount,
FinalAcceptProgressVO::getFailedCount));
}, ThreadPoolUtil.REQUEST));
CompletableFuture.allOf(futures.toArray(new CompletableFuture[0])).join();
return todoCount;
return ret;
}

@SafeVarargs


+ 23
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/req/ProjectCodeReq.java Ver fichero

@@ -0,0 +1,23 @@
package com.hz.pm.api.projectlib.model.req;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;

/**
* <p>
* ProjectCodeReq
* </p>
*
* @author WendyYang
* @since 18:08 2024/12/18
*/
@Data
public class ProjectCodeReq {

@NotBlank(message = "项目编码不能为空")
@ApiModelProperty("项目编码")
private String projectCode;

}

hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/vo/AmountApprovalProgressStatisticsVO.java → hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/vo/AmountApprovalProgressVO.java Ver fichero

@@ -5,14 +5,14 @@ import lombok.Data;

/**
* <p>
* AmountApprovalProgressStatisticsVO
* AmountApprovalProgressVO
* </p>
*
* @author WendyYang
* @since 17:01 2024/9/4
*/
@Data
public class AmountApprovalProgressStatisticsVO {
public class AmountApprovalProgressVO {

@ApiModelProperty("总数量")
private Integer totalCount;

hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/vo/AnnualPlanProgressStatisticsVO.java → hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/vo/AnnualPlanProgressVO.java Ver fichero

@@ -5,14 +5,14 @@ import lombok.Data;

/**
* <p>
* AnnualPlanProgressStatisticsVO
* AnnualPlanProgressVO
* </p>
*
* @author WendyYang
* @since 16:41 2024/9/4
*/
@Data
public class AnnualPlanProgressStatisticsVO {
public class AnnualPlanProgressVO {

@ApiModelProperty("总数量")
private Integer totalCount;

hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/vo/DeclaredRecordProgressStatVO.java → hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/vo/DeclaredRecordProgressVO.java Ver fichero

@@ -5,14 +5,14 @@ import lombok.Data;

/**
* <p>
* DeclaredRecordProgressStatVO
* DeclaredRecordProgressVO
* </p>
*
* @author WendyYang
* @since 17:14 2024/8/26
*/
@Data
public class DeclaredRecordProgressStatVO {
public class DeclaredRecordProgressVO {

@ApiModelProperty("总记录数")
private Long totalCount;

Cargando…
Cancelar
Guardar