@@ -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.open.model.po.StrFileIdReq; | ||||
import com.hz.pm.api.user.util.LoginUserUtil; | import com.hz.pm.api.user.util.LoginUserUtil; | ||||
import com.ningdatech.file.entity.vo.result.AttachFileVo; | import com.ningdatech.file.entity.vo.result.AttachFileVo; | ||||
import io.swagger.annotations.Api; | |||||
import io.swagger.annotations.ApiOperation; | import io.swagger.annotations.ApiOperation; | ||||
import lombok.RequiredArgsConstructor; | import lombok.RequiredArgsConstructor; | ||||
import org.springframework.util.Assert; | import org.springframework.util.Assert; | ||||
@@ -22,6 +23,7 @@ import java.util.List; | |||||
* @author WendyYang | * @author WendyYang | ||||
* @since 10:44 2024/12/9 | * @since 10:44 2024/12/9 | ||||
*/ | */ | ||||
@Api(tags = "文件管理(供信产使用)") | |||||
@RestController | @RestController | ||||
@RequestMapping("/open/api/file") | @RequestMapping("/open/api/file") | ||||
@RequiredArgsConstructor | @RequiredArgsConstructor | ||||
@@ -30,7 +30,7 @@ import java.util.List; | |||||
*/ | */ | ||||
@Slf4j | @Slf4j | ||||
@Validated | @Validated | ||||
@Api(tags = "专家会议开放接口") | |||||
@Api(tags = "专家会议管理(供信产使用)") | |||||
@RestController | @RestController | ||||
@RequestMapping("/open/api/meeting-expert-info") | @RequestMapping("/open/api/meeting-expert-info") | ||||
@RequiredArgsConstructor | @RequiredArgsConstructor | ||||
@@ -25,7 +25,7 @@ import java.util.List; | |||||
* @since 10:43 2024/11/6 | * @since 10:43 2024/11/6 | ||||
*/ | */ | ||||
@RestController | @RestController | ||||
@Api(tags = "项目库开放接口管理") | |||||
@Api(tags = "项目库管理(供信产使用)") | |||||
@RequiredArgsConstructor | @RequiredArgsConstructor | ||||
@RequestMapping("/open/api/projectLib") | @RequestMapping("/open/api/projectLib") | ||||
public class OpenApiProjectLibController { | public class OpenApiProjectLibController { | ||||
@@ -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.dto.PreInsSaveDTO; | ||||
import com.hz.pm.api.projectdeclared.model.req.XcfhxApplyReq; | 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.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.PreInsVO; | ||||
import com.hz.pm.api.projectdeclared.model.vo.ProjectContractListVO; | import com.hz.pm.api.projectdeclared.model.vo.ProjectContractListVO; | ||||
import com.hz.pm.api.projectlib.model.req.ProjectListReq; | import com.hz.pm.api.projectlib.model.req.ProjectListReq; | ||||
@@ -73,8 +73,8 @@ public class ConstructionController { | |||||
@GetMapping("/pre-ins/progressStatistics") | @GetMapping("/pre-ins/progressStatistics") | ||||
@ApiOperation("项目初验进度统计") | @ApiOperation("项目初验进度统计") | ||||
public FirstAcceptProgressStatisticsVO firstAcceptProgressStatistics(@ModelAttribute ProjectListReq req) { | |||||
return constructionManage.firstAcceptProgressStatistics(req); | |||||
public FirstAcceptProgressVO firstAcceptProgressStatistics(@ModelAttribute ProjectListReq req) { | |||||
return constructionManage.firstAcceptProgress(req); | |||||
} | } | ||||
@ApiOperation(value = "待初验备案的项目列表") | @ApiOperation(value = "待初验备案的项目列表") | ||||
@@ -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.DefaultDeclaredDTO; | ||||
import com.hz.pm.api.projectdeclared.model.dto.ProjectDraftSaveDTO; | 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.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.model.vo.ProjectDraftVO; | ||||
import com.hz.pm.api.projectlib.model.req.ProjectIdReq; | 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.ProjectListReq; | ||||
@@ -25,7 +25,7 @@ import javax.validation.Valid; | |||||
/** | /** | ||||
* <p> | * <p> | ||||
* DeclaredProjectController | |||||
* 项目申报(合规性审查) | |||||
* </p> | * </p> | ||||
* | * | ||||
* @author WendyYang | * @author WendyYang | ||||
@@ -35,58 +35,58 @@ import javax.validation.Valid; | |||||
@Validated | @Validated | ||||
@RestController | @RestController | ||||
@RequestMapping("/api/v1/declared") | @RequestMapping("/api/v1/declared") | ||||
@Api(tags = "项目申报") | |||||
@Api(tags = "项目申报(合规性审查)") | |||||
@RequiredArgsConstructor | @RequiredArgsConstructor | ||||
public class DeclaredProjectController { | public class DeclaredProjectController { | ||||
private final DeclaredProjectManage declaredProjectManage; | private final DeclaredProjectManage declaredProjectManage; | ||||
@ApiOperation(value = "申报项目已申报列表", notes = "申报项目已申报列表") | |||||
@GetMapping("/list") | @GetMapping("/list") | ||||
@ApiOperation("申报项目已申报列表") | |||||
public PageVo<ProjectLibListItemVO> list(@ModelAttribute ProjectListReq req) { | public PageVo<ProjectLibListItemVO> list(@ModelAttribute ProjectListReq req) { | ||||
return declaredProjectManage.projectLibList(req); | return declaredProjectManage.projectLibList(req); | ||||
} | } | ||||
@GetMapping("/progressStatistics") | @GetMapping("/progressStatistics") | ||||
@ApiOperation("项目申报进度统计") | @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") | @GetMapping("/draft") | ||||
@ApiOperation("申报项目草稿箱列表") | |||||
public PageVo<ProjectDraftVO> draft(@ModelAttribute DeclaredProjectListParamDTO params) { | public PageVo<ProjectDraftVO> draft(@ModelAttribute DeclaredProjectListParamDTO params) { | ||||
return declaredProjectManage.pageDraft(params, ProjectDraftTypeEnum.PROJECT_DECLARED.getCode()); | return declaredProjectManage.pageDraft(params, ProjectDraftTypeEnum.PROJECT_DECLARED.getCode()); | ||||
} | } | ||||
@ApiOperation(value = "立项备案草稿箱列表", notes = "立项备案草稿箱列表") | |||||
@GetMapping("/declaredRecord/draft") | @GetMapping("/declaredRecord/draft") | ||||
@ApiOperation("立项备案草稿箱列表") | |||||
public PageVo<ProjectDraftVO> declaredRecordDraft(@ModelAttribute DeclaredProjectListParamDTO params) { | public PageVo<ProjectDraftVO> declaredRecordDraft(@ModelAttribute DeclaredProjectListParamDTO params) { | ||||
return declaredProjectManage.pageDraft(params, ProjectDraftTypeEnum.DECLARED_RECORD.getCode()); | return declaredProjectManage.pageDraft(params, ProjectDraftTypeEnum.DECLARED_RECORD.getCode()); | ||||
} | } | ||||
@ApiOperation(value = "申报项目草稿箱详情", notes = "申报项目草稿箱详情") | |||||
@ApiOperation("申报项目草稿箱详情") | |||||
@GetMapping("/draft/{id}") | @GetMapping("/draft/{id}") | ||||
public ProjectDraftVO draft(@PathVariable(value = "id") Long id) { | public ProjectDraftVO draft(@PathVariable(value = "id") Long id) { | ||||
return declaredProjectManage.draftDetail(id); | return declaredProjectManage.draftDetail(id); | ||||
} | } | ||||
@ApiOperation(value = "申报项目保存至草稿箱", notes = "申报项目保存至草稿箱") | |||||
@WebLog("申报项目保存至草稿箱") | |||||
@PostMapping("/save-to-draft") | @PostMapping("/save-to-draft") | ||||
@WebLog("申报项目保存至草稿箱") | |||||
@ApiOperation("申报项目保存至草稿箱") | |||||
public Object saveToDraft(@Validated @RequestBody ProjectDraftSaveDTO dto) { | public Object saveToDraft(@Validated @RequestBody ProjectDraftSaveDTO dto) { | ||||
return declaredProjectManage.saveToDraft(dto, ProjectDraftTypeEnum.PROJECT_DECLARED); | return declaredProjectManage.saveToDraft(dto, ProjectDraftTypeEnum.PROJECT_DECLARED); | ||||
} | } | ||||
@ApiOperation(value = "立项备案保存至草稿箱", notes = "立项备案保存至草稿箱") | |||||
@WebLog("立项备案保存至草稿箱") | @WebLog("立项备案保存至草稿箱") | ||||
@ApiOperation("立项备案保存至草稿箱") | |||||
@PostMapping("/declaredRecord/save-to-draft") | @PostMapping("/declaredRecord/save-to-draft") | ||||
public Object declaredRecordSaveToDraft(@Validated @RequestBody ProjectDraftSaveDTO dto) { | public Object declaredRecordSaveToDraft(@Validated @RequestBody ProjectDraftSaveDTO dto) { | ||||
return declaredProjectManage.saveToDraft(dto, ProjectDraftTypeEnum.DECLARED_RECORD); | return declaredProjectManage.saveToDraft(dto, ProjectDraftTypeEnum.DECLARED_RECORD); | ||||
} | } | ||||
@ApiOperation(value = "申报项目", notes = "申报项目") | |||||
@WebLog("申报项目") | @WebLog("申报项目") | ||||
@ApiOperation("申报项目") | |||||
@PostMapping("/start") | @PostMapping("/start") | ||||
public String startTheProcess(@Validated @RequestBody DefaultDeclaredDTO dto) { | public String startTheProcess(@Validated @RequestBody DefaultDeclaredDTO dto) { | ||||
String instanceId = declaredProjectManage.startTheProcess(dto); | String instanceId = declaredProjectManage.startTheProcess(dto); | ||||
@@ -100,7 +100,7 @@ public class DeclaredProjectController { | |||||
declaredProjectManage.store(dto); | declaredProjectManage.store(dto); | ||||
} | } | ||||
@ApiOperation(value = "重新申报项目", notes = "重新申报项目") | |||||
@ApiOperation("重新申报项目") | |||||
@WebLog("重新申报项目") | @WebLog("重新申报项目") | ||||
@PostMapping("/restart") | @PostMapping("/restart") | ||||
public String reStartTheProcess(@Validated @RequestBody DefaultDeclaredDTO dto) { | public String reStartTheProcess(@Validated @RequestBody DefaultDeclaredDTO dto) { | ||||
@@ -108,7 +108,7 @@ public class DeclaredProjectController { | |||||
} | } | ||||
@GetMapping("/export") | @GetMapping("/export") | ||||
@ApiOperation("申报项目列表导出") | |||||
@ApiOperation("申报项目导出") | |||||
@WebLog("申报项目列表导出") | @WebLog("申报项目列表导出") | ||||
public void exportList(ProjectListReq req, HttpServletResponse response) { | public void exportList(ProjectListReq req, HttpServletResponse response) { | ||||
ExcelDownUtil.downXls(response, req, declaredProjectManage::exportList); | ExcelDownUtil.downXls(response, req, declaredProjectManage::exportList); | ||||
@@ -3,7 +3,7 @@ package com.hz.pm.api.projectdeclared.controller; | |||||
import com.hz.pm.api.common.util.ExcelDownUtil; | import com.hz.pm.api.common.util.ExcelDownUtil; | ||||
import com.hz.pm.api.projectdeclared.manage.FinalAcceptanceManage; | import com.hz.pm.api.projectdeclared.manage.FinalAcceptanceManage; | ||||
import com.hz.pm.api.projectdeclared.model.req.SubmitFinallyInspectedReq; | 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.model.vo.FinalAcceptanceVO; | ||||
import com.hz.pm.api.projectlib.model.req.ProjectListReq; | import com.hz.pm.api.projectlib.model.req.ProjectListReq; | ||||
import com.hz.pm.api.projectlib.model.vo.ProjectLibListItemVO; | import com.hz.pm.api.projectlib.model.vo.ProjectLibListItemVO; | ||||
@@ -37,8 +37,8 @@ public class FinalAcceptanceController { | |||||
@GetMapping("/progressStatistics") | @GetMapping("/progressStatistics") | ||||
@ApiOperation(value = "项目终验进度统计", notes = "项目终验进度统计") | @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 = "待终验申报的项目列表") | @ApiOperation(value = "待终验申报的项目列表", notes = "待终验申报的项目列表") | ||||
@@ -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.meeting.entity.dto.ProjectReviewResultDTO; | ||||
import com.hz.pm.api.projectdeclared.manage.ProjectReviewManage; | import com.hz.pm.api.projectdeclared.manage.ProjectReviewManage; | ||||
import com.hz.pm.api.projectdeclared.model.dto.DefaultDeclaredDTO; | 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.ProjectListReq; | ||||
import com.hz.pm.api.projectlib.model.req.UploadConstructionPlanSealFileReq; | import com.hz.pm.api.projectlib.model.req.UploadConstructionPlanSealFileReq; | ||||
import com.hz.pm.api.projectlib.model.vo.ProjectLibListItemVO; | import com.hz.pm.api.projectlib.model.vo.ProjectLibListItemVO; | ||||
@@ -61,8 +60,8 @@ public class ProjectReviewController { | |||||
@GetMapping("/progressStatistics") | @GetMapping("/progressStatistics") | ||||
@ApiOperation("评审项目进度统计") | @ApiOperation("评审项目进度统计") | ||||
public ReviewProgressStatisticsVO progressStatistics(ProjectListReq req) { | |||||
return projectReviewManage.reviewProjectProgressStatistics(req); | |||||
public ExpertReviewProgressVO progressStatistics(ProjectListReq req) { | |||||
return projectReviewManage.reviewProjectProgress(req); | |||||
} | } | ||||
@ApiOperation("专家评审列表") | @ApiOperation("专家评审列表") | ||||
@@ -73,8 +72,8 @@ public class ProjectReviewController { | |||||
@GetMapping("/expertReviewProgressStatistics") | @GetMapping("/expertReviewProgressStatistics") | ||||
@ApiOperation("专家评审项目进度统计") | @ApiOperation("专家评审项目进度统计") | ||||
public ReviewProgressStatisticsVO expertProgressStatistics(ProjectListReq req) { | |||||
return projectReviewManage.expertReviewProjectProgressStatistics(req); | |||||
public ExpertReviewProgressVO expertProgressStatistics(ProjectListReq req) { | |||||
return projectReviewManage.expertReviewProjectProgress(req); | |||||
} | } | ||||
@ApiOperation("修改后重新提交") | @ApiOperation("修改后重新提交") | ||||
@@ -44,8 +44,8 @@ public class PurchaseController { | |||||
@ApiOperation(value = "招标采购进度统计") | @ApiOperation(value = "招标采购进度统计") | ||||
@GetMapping("/purchaseProgressStatistics") | @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 = "待采购结果备案列表") | @ApiOperation(value = "待采购结果备案列表", notes = "待采购结果备案列表") | ||||
@@ -104,8 +104,8 @@ public class PurchaseController { | |||||
@GetMapping("/adaptionProgressStatistics") | @GetMapping("/adaptionProgressStatistics") | ||||
@ApiOperation("获取采购进度统计") | @ApiOperation("获取采购进度统计") | ||||
public AdaptionProgressStatVO adaptionProgressStatistics(PurchaseAdaptionListReq req) { | |||||
return purchaseManage.adaptionProgressStatistics(req); | |||||
public AdaptionProgressVO adaptionProgressStatistics(PurchaseAdaptionListReq req) { | |||||
return purchaseManage.adaptionProgress(req); | |||||
} | } | ||||
@GetMapping("/pageAdaption") | @GetMapping("/pageAdaption") | ||||
@@ -303,7 +303,7 @@ public class ConstructionManage { | |||||
PRE_INSPECTED_PURCHASE_STATUS.add(TenderMainStatus.TO_BE_SUBMIT_FIRST_INSPECTED_INFO); | 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(); | UserInfoDetails user = LoginUserUtil.userDetail(); | ||||
Long buildOrgCode = req.clearBuildOrgCode(); | Long buildOrgCode = req.clearBuildOrgCode(); | ||||
UnitQueryState queryState = mhUnitQueryAuthHelper.listCanViewUnitIds(buildOrgCode, user); | UnitQueryState queryState = mhUnitQueryAuthHelper.listCanViewUnitIds(buildOrgCode, user); | ||||
@@ -347,7 +347,7 @@ public class ConstructionManage { | |||||
Collection<List<ITenderStatus>> values = purchaseMap.values(); | Collection<List<ITenderStatus>> values = purchaseMap.values(); | ||||
return CollUtil.count(values, x -> CollUtil.anyMatch(x, w -> w.eq(s))); | 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.setTotalCount(projectIds.size()); | ||||
stat.setPassedCount(counter.apply(purchaseMap, TenderMainStatus.SUBMITTED_FIRST_INSPECTED_INFO)); | stat.setPassedCount(counter.apply(purchaseMap, TenderMainStatus.SUBMITTED_FIRST_INSPECTED_INFO)); | ||||
stat.setTodoCount(counter.apply(purchaseMap, TenderMainStatus.TO_BE_SUBMIT_FIRST_INSPECTED_INFO)); | stat.setTodoCount(counter.apply(purchaseMap, TenderMainStatus.TO_BE_SUBMIT_FIRST_INSPECTED_INFO)); | ||||
@@ -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.dto.*; | ||||
import com.hz.pm.api.projectdeclared.model.entity.ProjectDraft; | 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.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.model.vo.ProjectDraftVO; | ||||
import com.hz.pm.api.projectdeclared.service.IProjectDraftService; | import com.hz.pm.api.projectdeclared.service.IProjectDraftService; | ||||
import com.hz.pm.api.projectlib.helper.ProjectManageUtil; | 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) | @Transactional(rollbackFor = Exception.class) | ||||
public synchronized String reStartTheProcess(DefaultDeclaredDTO req) { | 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); | req.setStatus(null); | ||||
UserFullInfoDTO user = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId()); | UserFullInfoDTO user = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId()); | ||||
LambdaQueryWrapper<Project> query = ProjectManageUtil.projectQuery(req); | LambdaQueryWrapper<Project> query = ProjectManageUtil.projectQuery(req); | ||||
@@ -384,7 +384,7 @@ public class DeclaredProjectManage { | |||||
List<Project> projects = projectService.list(query); | List<Project> projects = projectService.list(query); | ||||
Map<ProjectStatus, Long> countMap = CollUtils.groupCount(projects, | Map<ProjectStatus, Long> countMap = CollUtils.groupCount(projects, | ||||
w -> ProjectStatus.getNoNull(w.getStatus())); | w -> ProjectStatus.getNoNull(w.getStatus())); | ||||
DeclaredProgressStatisticsVO stat = new DeclaredProgressStatisticsVO(); | |||||
DeclaredProgressVO stat = new DeclaredProgressVO(); | |||||
stat.setTotalCount(projects.size()); | stat.setTotalCount(projects.size()); | ||||
stat.setTodoCount(countMap.getOrDefault(ProjectStatus.TO_BE_DECLARED, 0L)); | stat.setTodoCount(countMap.getOrDefault(ProjectStatus.TO_BE_DECLARED, 0L)); | ||||
stat.setAuditCount(countMap.getOrDefault(ProjectStatus.ON_COMPLIANCE_REVIEW, 0L)); | stat.setAuditCount(countMap.getOrDefault(ProjectStatus.ON_COMPLIANCE_REVIEW, 0L)); | ||||
@@ -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.entity.PurchaseInst; | ||||
import com.hz.pm.api.projectdeclared.model.enumerization.BidTypeEnum; | 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.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.model.vo.FinalAcceptanceVO; | ||||
import com.hz.pm.api.projectdeclared.service.IContractService; | import com.hz.pm.api.projectdeclared.service.IContractService; | ||||
import com.hz.pm.api.projectdeclared.service.IPurchaseInstService; | import com.hz.pm.api.projectdeclared.service.IPurchaseInstService; | ||||
@@ -110,7 +110,7 @@ public class FinalAcceptanceManage { | |||||
* @param req \ | * @param req \ | ||||
* @return \ | * @return \ | ||||
*/ | */ | ||||
public FinalAcceptProgressStatisticsVO finalAcceptProgressStatistics(ProjectListReq req) { | |||||
public FinalAcceptProgressVO finalAcceptProgress(ProjectListReq req) { | |||||
UserInfoDetails user = LoginUserUtil.userDetail(); | UserInfoDetails user = LoginUserUtil.userDetail(); | ||||
Long buildOrgCode = req.clearBuildOrgCode(); | Long buildOrgCode = req.clearBuildOrgCode(); | ||||
UnitQueryState queryState = mhUnitQueryAuthHelper.listCanViewUnitIds(buildOrgCode, user); | UnitQueryState queryState = mhUnitQueryAuthHelper.listCanViewUnitIds(buildOrgCode, user); | ||||
@@ -142,7 +142,7 @@ public class FinalAcceptanceManage { | |||||
Set<Map.Entry<Long, List<Integer>>> entries = statusMap.entrySet(); | Set<Map.Entry<Long, List<Integer>>> entries = statusMap.entrySet(); | ||||
return CollUtil.count(entries, entry -> entry.getValue().contains(status.getCode())); | return CollUtil.count(entries, entry -> entry.getValue().contains(status.getCode())); | ||||
}; | }; | ||||
return FinalAcceptProgressStatisticsVO.builder() | |||||
return FinalAcceptProgressVO.builder() | |||||
.totalCount(projects.size()) | .totalCount(projects.size()) | ||||
.auditCount(counter.apply(purchaseStatusMap, TenderMainStatus.ON_FINALLY_INSPECTED_APPLY)) | .auditCount(counter.apply(purchaseStatusMap, TenderMainStatus.ON_FINALLY_INSPECTED_APPLY)) | ||||
.todoCount(counter.apply(purchaseStatusMap, TenderMainStatus.TO_BE_SUBMIT_FINALLY_INSPECTED_APPLY)) | .todoCount(counter.apply(purchaseStatusMap, TenderMainStatus.TO_BE_SUBMIT_FINALLY_INSPECTED_APPLY)) | ||||
@@ -9,7 +9,6 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper; | |||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 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.enumeration.ProjectProcessType; | ||||
import com.hz.pm.api.common.exception.ReturnException; | import com.hz.pm.api.common.exception.ReturnException; | ||||
import com.hz.pm.api.common.helper.UserInfoHelper; | 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.meeting.service.IMeetingInnerProjectService; | ||||
import com.hz.pm.api.projectdeclared.model.dto.DefaultDeclaredDTO; | 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.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.service.IProjectReviewService; | ||||
import com.hz.pm.api.projectdeclared.utils.ProjectIdCodeCacheUtil; | import com.hz.pm.api.projectdeclared.utils.ProjectIdCodeCacheUtil; | ||||
import com.hz.pm.api.projectlib.helper.ProjectManageUtil; | 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.security.model.UserInfoDetails; | ||||
import com.hz.pm.api.user.util.LoginUserUtil; | import com.hz.pm.api.user.util.LoginUserUtil; | ||||
import com.ningdatech.basic.exception.BizException; | import com.ningdatech.basic.exception.BizException; | ||||
import com.ningdatech.basic.function.VUtils; | |||||
import com.ningdatech.basic.model.PageVo; | import com.ningdatech.basic.model.PageVo; | ||||
import com.ningdatech.basic.util.CollUtils; | import com.ningdatech.basic.util.CollUtils; | ||||
import com.wflow.bean.entity.WflowModels; | import com.wflow.bean.entity.WflowModels; | ||||
@@ -146,7 +144,7 @@ public class ProjectReviewManage { | |||||
* @param req \ | * @param req \ | ||||
* @return \ | * @return \ | ||||
*/ | */ | ||||
public ReviewProgressStatisticsVO reviewProjectProgressStatistics(ProjectListReq req) { | |||||
public ExpertReviewProgressVO reviewProjectProgress(ProjectListReq req) { | |||||
UserFullInfoDTO user = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId()); | UserFullInfoDTO user = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId()); | ||||
LambdaQueryWrapper<Project> query = ProjectManageUtil.initQuery(); | LambdaQueryWrapper<Project> query = ProjectManageUtil.initQuery(); | ||||
if (!projectQueryPermission(query, user, req.getDeclaredUnitId())) { | if (!projectQueryPermission(query, user, req.getDeclaredUnitId())) { | ||||
@@ -171,7 +169,7 @@ public class ProjectReviewManage { | |||||
} | } | ||||
return ProjectStatus.getNoNull(w.getStatus()); | return ProjectStatus.getNoNull(w.getStatus()); | ||||
}); | }); | ||||
return ReviewProgressStatisticsVO.builder() | |||||
return ExpertReviewProgressVO.builder() | |||||
.totalCount(projects.size()) | .totalCount(projects.size()) | ||||
.todoCount(countMap.getOrDefault(ProjectStatus.WITHOUT_PROJECT_REVIEW, 0L)) | .todoCount(countMap.getOrDefault(ProjectStatus.WITHOUT_PROJECT_REVIEW, 0L)) | ||||
.auditCount(countMap.getOrDefault(ProjectStatus.ON_PROJECT_REVIEW, 0L)) | .auditCount(countMap.getOrDefault(ProjectStatus.ON_PROJECT_REVIEW, 0L)) | ||||
@@ -227,7 +225,7 @@ public class ProjectReviewManage { | |||||
return PageVo.of(records, page.getTotal()); | return PageVo.of(records, page.getTotal()); | ||||
} | } | ||||
public ReviewProgressStatisticsVO expertReviewProjectProgressStatistics(ProjectListReq req) { | |||||
public ExpertReviewProgressVO expertReviewProjectProgress(ProjectListReq req) { | |||||
UserFullInfoDTO user = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId()); | UserFullInfoDTO user = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId()); | ||||
LambdaQueryWrapper<Project> query = ProjectManageUtil.initQuery(); | LambdaQueryWrapper<Project> query = ProjectManageUtil.initQuery(); | ||||
if (!projectQueryPermission(query, user, req.getDeclaredUnitId())) { | if (!projectQueryPermission(query, user, req.getDeclaredUnitId())) { | ||||
@@ -253,7 +251,7 @@ public class ProjectReviewManage { | |||||
} | } | ||||
return ProjectStatus.getNoNull(w.getStatus()); | return ProjectStatus.getNoNull(w.getStatus()); | ||||
}); | }); | ||||
return ReviewProgressStatisticsVO.builder() | |||||
return ExpertReviewProgressVO.builder() | |||||
.totalCount(projects.size()) | .totalCount(projects.size()) | ||||
.withoutConstructionPlanSealFileCount(CollUtil.count(projects, | .withoutConstructionPlanSealFileCount(CollUtil.count(projects, | ||||
w -> ProjectStatus.WITHOUT_EXPERT_REVIEW.eq(w.getStatus()) | w -> ProjectStatus.WITHOUT_EXPERT_REVIEW.eq(w.getStatus()) | ||||
@@ -145,7 +145,7 @@ public class PurchaseManage { | |||||
private final ProjectStatusRewriteHandlerContext projectStatusRewriteHandlerContext; | private final ProjectStatusRewriteHandlerContext projectStatusRewriteHandlerContext; | ||||
private final StagingManage stagingManage; | private final StagingManage stagingManage; | ||||
public PurchaseProgressStatVO purchaseProgressStatistics(ProjectListReq req) { | |||||
public PurchaseProgressVO purchaseProgress(ProjectListReq req) { | |||||
UserInfoDetails user = LoginUserUtil.userDetail(); | UserInfoDetails user = LoginUserUtil.userDetail(); | ||||
Long buildOrgCode = req.clearBuildOrgCode(); | Long buildOrgCode = req.clearBuildOrgCode(); | ||||
LambdaQueryWrapper<Project> query = ProjectManageUtil.projectQuery(req); | LambdaQueryWrapper<Project> query = ProjectManageUtil.projectQuery(req); | ||||
@@ -170,7 +170,7 @@ public class PurchaseManage { | |||||
.select(Purchase::getProjectId, Purchase::getStatus)); | .select(Purchase::getProjectId, Purchase::getStatus)); | ||||
Map<Long, Collection<Purchase>> projectPurchaseMap = CollUtils.listToMap(projects, Project::getId, | Map<Long, Collection<Purchase>> projectPurchaseMap = CollUtils.listToMap(projects, Project::getId, | ||||
w -> CollUtil.filterNew(purchases, x -> x.getProjectId().equals(w.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.setToBePurchaseCount(CollUtil.count(projectPurchaseMap.values(), Collection::isEmpty)); | ||||
// 采购中 | // 采购中 | ||||
stat.setOnPurchaseCount(CollUtil.count(projectPurchaseMap.values(), | stat.setOnPurchaseCount(CollUtil.count(projectPurchaseMap.values(), | ||||
@@ -667,7 +667,7 @@ public class PurchaseManage { | |||||
tenderStateMachineUtil.pass(purchase); | tenderStateMachineUtil.pass(purchase); | ||||
purchaseService.saveOrUpdate(purchase); | purchaseService.saveOrUpdate(purchase); | ||||
UserInfoDetails user = LoginUserUtil.userDetail(); | |||||
UserInfoDetails user = LoginUserUtil.userDetailNotNull(); | |||||
Long projectId = req.getProjectId(); | Long projectId = req.getProjectId(); | ||||
Project project = projectService.getNewestNoNull(projectId); | Project project = projectService.getNewestNoNull(projectId); | ||||
LocalDateTime now = LocalDateTime.now(); | LocalDateTime now = LocalDateTime.now(); | ||||
@@ -719,14 +719,14 @@ public class PurchaseManage { | |||||
stagingManage.delete(StagingType.PURCHASE_RECORD, req.getBidId()); | stagingManage.delete(StagingType.PURCHASE_RECORD, req.getBidId()); | ||||
} | } | ||||
public AdaptionProgressStatVO adaptionProgressStatistics(PurchaseAdaptionListReq req) { | |||||
public AdaptionProgressVO adaptionProgress(PurchaseAdaptionListReq req) { | |||||
LambdaQueryWrapper<Purchase> query = Wrappers.lambdaQuery(Purchase.class) | LambdaQueryWrapper<Purchase> query = Wrappers.lambdaQuery(Purchase.class) | ||||
.select(Purchase::getStatus, Purchase::getId) | .select(Purchase::getStatus, Purchase::getId) | ||||
.eq(Purchase::getBidType, BidTypeEnum.BUILD_APP.getCode()) | .eq(Purchase::getBidType, BidTypeEnum.BUILD_APP.getCode()) | ||||
.exists(ExistsSqlConst.PURCHASE_EXISTS_STATUS_CHANGE | .exists(ExistsSqlConst.PURCHASE_EXISTS_STATUS_CHANGE | ||||
+ " and npsc.event = {0}", TenderStateChangeEvent.SUBMIT_PURCHASE_CONSTRUCTION_INFO) | + " and npsc.event = {0}", TenderStateChangeEvent.SUBMIT_PURCHASE_CONSTRUCTION_INFO) | ||||
.notExists(ExistsSqlConst.PURCHASE_EXISTS_PROJECT | .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()) | ProjectStatus.CHANGE_APPLY_PASSED.getCode(), ProjectStatus.DELETED_PASSED.getCode()) | ||||
.orderByDesc(Purchase::getCreateOn); | .orderByDesc(Purchase::getCreateOn); | ||||
UserFullInfoDTO user = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId()); | UserFullInfoDTO user = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId()); | ||||
@@ -744,10 +744,10 @@ public class PurchaseManage { | |||||
.le(req.getCreateOnMax() != null, Purchase::getCreateOn, req.getCreateOnMax()) | .le(req.getCreateOnMax() != null, Purchase::getCreateOn, req.getCreateOnMax()) | ||||
.ge(req.getCreateOnMin() != null, Purchase::getCreateOn, req.getCreateOnMin()); | .ge(req.getCreateOnMin() != null, Purchase::getCreateOn, req.getCreateOnMin()); | ||||
List<Purchase> purchases = purchaseService.list(query); | 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, | Map<ITenderStatus, Long> statusCountMap = CollUtils.groupCount(purchases, | ||||
w -> { | w -> { | ||||
ITenderStatus status = TenderMainStatus.getNoNull(w.getStatus()); | ITenderStatus status = TenderMainStatus.getNoNull(w.getStatus()); | ||||
@@ -771,7 +771,7 @@ public class PurchaseManage { | |||||
return status; | return status; | ||||
} | } | ||||
}); | }); | ||||
return AdaptionProgressStatVO.builder() | |||||
return AdaptionProgressVO.builder() | |||||
.withoutAdaptionInfo(statusCountMap.getOrDefault(TenderAdaptStatus.WITHOUT_ADAPT_INFO, 0L)) | .withoutAdaptionInfo(statusCountMap.getOrDefault(TenderAdaptStatus.WITHOUT_ADAPT_INFO, 0L)) | ||||
.withoutOperationCount(statusCountMap.getOrDefault(TenderMainStatus.TO_BE_SUBMIT_OPERATION_PLAN, 0L)) | .withoutOperationCount(statusCountMap.getOrDefault(TenderMainStatus.TO_BE_SUBMIT_OPERATION_PLAN, 0L)) | ||||
.withoutOrgConfirmCount(statusCountMap.getOrDefault(TenderMainStatus.WAIT_ORG_CONFIRM, 0L)) | .withoutOrgConfirmCount(statusCountMap.getOrDefault(TenderMainStatus.WAIT_ORG_CONFIRM, 0L)) | ||||
@@ -7,7 +7,7 @@ import lombok.experimental.Tolerate; | |||||
/** | /** | ||||
* <p> | * <p> | ||||
* AdaptionProgressStatVO | |||||
* AdaptionProgressVO | |||||
* </p> | * </p> | ||||
* | * | ||||
* @author WendyYang | * @author WendyYang | ||||
@@ -15,10 +15,10 @@ import lombok.experimental.Tolerate; | |||||
*/ | */ | ||||
@Data | @Data | ||||
@Builder | @Builder | ||||
public class AdaptionProgressStatVO { | |||||
public class AdaptionProgressVO { | |||||
@Tolerate | @Tolerate | ||||
public AdaptionProgressStatVO() { | |||||
public AdaptionProgressVO() { | |||||
// 默认构造方法 | // 默认构造方法 | ||||
} | } | ||||
@@ -5,14 +5,14 @@ import lombok.Data; | |||||
/** | /** | ||||
* <p> | * <p> | ||||
* DeclaredProgressStatisticsVO | |||||
* DeclaredProgressVO | |||||
* </p> | * </p> | ||||
* | * | ||||
* @author WendyYang | * @author WendyYang | ||||
* @since 15:23 2024/9/2 | * @since 15:23 2024/9/2 | ||||
*/ | */ | ||||
@Data | @Data | ||||
public class DeclaredProgressStatisticsVO { | |||||
public class DeclaredProgressVO { | |||||
@ApiModelProperty("总数") | @ApiModelProperty("总数") | ||||
private Integer totalCount; | private Integer totalCount; |
@@ -6,7 +6,7 @@ import lombok.Data; | |||||
/** | /** | ||||
* <p> | * <p> | ||||
* ProjectReviewProgressStatisticsVO | |||||
* ExpertReviewProgressVO | |||||
* </p> | * </p> | ||||
* | * | ||||
* @author WendyYang | * @author WendyYang | ||||
@@ -14,7 +14,7 @@ import lombok.Data; | |||||
*/ | */ | ||||
@Data | @Data | ||||
@Builder | @Builder | ||||
public class ReviewProgressStatisticsVO { | |||||
public class ExpertReviewProgressVO { | |||||
@ApiModelProperty("总数") | @ApiModelProperty("总数") | ||||
private Integer totalCount; | private Integer totalCount; |
@@ -6,7 +6,7 @@ import lombok.Data; | |||||
/** | /** | ||||
* <p> | * <p> | ||||
* FinalAcceptProgressStatisticsVO | |||||
* FinalAcceptProgressVO | |||||
* </p> | * </p> | ||||
* | * | ||||
* @author WendyYang | * @author WendyYang | ||||
@@ -14,7 +14,7 @@ import lombok.Data; | |||||
*/ | */ | ||||
@Data | @Data | ||||
@Builder | @Builder | ||||
public class FinalAcceptProgressStatisticsVO { | |||||
public class FinalAcceptProgressVO { | |||||
@ApiModelProperty("总数量") | @ApiModelProperty("总数量") | ||||
private Integer totalCount; | private Integer totalCount; |
@@ -5,14 +5,14 @@ import lombok.Data; | |||||
/** | /** | ||||
* <p> | * <p> | ||||
* FirstAcceptProgressStatisticsVO | |||||
* FirstAcceptProgressVO | |||||
* </p> | * </p> | ||||
* | * | ||||
* @author WendyYang | * @author WendyYang | ||||
* @since 14:23 2024/9/4 | * @since 14:23 2024/9/4 | ||||
*/ | */ | ||||
@Data | @Data | ||||
public class FirstAcceptProgressStatisticsVO { | |||||
public class FirstAcceptProgressVO { | |||||
@ApiModelProperty("总数量") | @ApiModelProperty("总数量") | ||||
private Integer totalCount; | private Integer totalCount; |
@@ -5,14 +5,14 @@ import lombok.Data; | |||||
/** | /** | ||||
* <p> | * <p> | ||||
* PurchaseProgressStatisticsVO | |||||
* PurchaseProgressVO | |||||
* </p> | * </p> | ||||
* | * | ||||
* @author WendyYang | * @author WendyYang | ||||
* @since 11:58 2024/8/27 | * @since 11:58 2024/8/27 | ||||
*/ | */ | ||||
@Data | @Data | ||||
public class PurchaseProgressStatVO { | |||||
public class PurchaseProgressVO { | |||||
@ApiModelProperty("总数量") | @ApiModelProperty("总数量") | ||||
private Integer totalCount; | private Integer totalCount; |
@@ -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.dto.ProjectApprovalAmountDTO; | ||||
import com.hz.pm.api.projectlib.model.req.ProjectListReq; | 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.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.model.vo.ProjectLibListItemVO; | ||||
import com.ningdatech.basic.model.PageVo; | import com.ningdatech.basic.model.PageVo; | ||||
import com.ningdatech.log.annotation.WebLog; | import com.ningdatech.log.annotation.WebLog; | ||||
@@ -41,8 +41,8 @@ public class AmountApprovalController { | |||||
@GetMapping("progressStatistics") | @GetMapping("progressStatistics") | ||||
@ApiOperation("资金下达进度统计") | @ApiOperation("资金下达进度统计") | ||||
public AmountApprovalProgressStatisticsVO progressStatistics(ProjectListReq req) { | |||||
return amountApprovalManage.progressStatistics(req); | |||||
public AmountApprovalProgressVO progressStatistics(ProjectListReq req) { | |||||
return amountApprovalManage.amountApprovalProgress(req); | |||||
} | } | ||||
@PostMapping("/submit") | @PostMapping("/submit") | ||||
@@ -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.ProjectListReq; | ||||
import com.hz.pm.api.projectlib.model.req.StartProjectDeclareReq; | 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.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.basic.model.PageVo; | ||||
import com.ningdatech.log.annotation.WebLog; | import com.ningdatech.log.annotation.WebLog; | ||||
import io.swagger.annotations.Api; | import io.swagger.annotations.Api; | ||||
@@ -42,8 +42,8 @@ public class AnnualPlanController { | |||||
@GetMapping("/progressStatistics") | @GetMapping("/progressStatistics") | ||||
@ApiOperation("年度计划库列表进度统计") | @ApiOperation("年度计划库列表进度统计") | ||||
public AnnualPlanProgressStatisticsVO progressStatistics(ProjectListReq req) { | |||||
return annualPlanLibManage.annualProgressStatistics(req); | |||||
public AnnualPlanProgressVO progressStatistics(ProjectListReq req) { | |||||
return annualPlanLibManage.annualPlanProgress(req); | |||||
} | } | ||||
@PostMapping("/startProjectDeclared") | @PostMapping("/startProjectDeclared") | ||||
@@ -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.manage.DeclaredRecordManage; | ||||
import com.hz.pm.api.projectlib.model.req.DeclaredProjectListReq; | 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.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.model.vo.MhProjectBaseInfoVO; | ||||
import com.ningdatech.basic.model.PageVo; | import com.ningdatech.basic.model.PageVo; | ||||
import com.ningdatech.log.annotation.WebLog; | import com.ningdatech.log.annotation.WebLog; | ||||
@@ -43,8 +43,8 @@ public class MhProjectController { | |||||
@ApiOperation("立项备案列表数量统计") | @ApiOperation("立项备案列表数量统计") | ||||
@GetMapping("/declaredRecordProgressStatistics") | @GetMapping("/declaredRecordProgressStatistics") | ||||
@WebLog("立项备案列表") | @WebLog("立项备案列表") | ||||
public DeclaredRecordProgressStatVO declaredRecordProgressStatistics(DeclaredProjectListReq req) { | |||||
return declaredRecordManage.declaredRecordProgressStatistics(req); | |||||
public DeclaredRecordProgressVO declaredRecordProgressStatistics(DeclaredProjectListReq req) { | |||||
return declaredRecordManage.declaredRecordProgress(req); | |||||
} | } | ||||
@ApiOperation("信产项目基本信息") | @ApiOperation("信产项目基本信息") | ||||
@@ -1,7 +1,9 @@ | |||||
package com.hz.pm.api.projectlib.controller; | package com.hz.pm.api.projectlib.controller; | ||||
import com.hz.pm.api.projectlib.manage.ProjectManageTodoCountManage; | 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.projectlib.model.vo.ProjectManageTodoCountVO; | ||||
import com.hz.pm.api.workbench.model.WorkbenchProjectLibReq; | |||||
import lombok.RequiredArgsConstructor; | import lombok.RequiredArgsConstructor; | ||||
import org.springframework.web.bind.annotation.GetMapping; | import org.springframework.web.bind.annotation.GetMapping; | ||||
import org.springframework.web.bind.annotation.RequestMapping; | import org.springframework.web.bind.annotation.RequestMapping; | ||||
@@ -9,7 +11,7 @@ import org.springframework.web.bind.annotation.RestController; | |||||
/** | /** | ||||
* <p> | * <p> | ||||
* ProjectManageTodoCountController | |||||
* 过程管理待办统计 | |||||
* </p> | * </p> | ||||
* | * | ||||
* @author WendyYang | * @author WendyYang | ||||
@@ -23,8 +25,8 @@ public class ProjectManageController { | |||||
private final ProjectManageTodoCountManage projectManageTodoCountManage; | private final ProjectManageTodoCountManage projectManageTodoCountManage; | ||||
@GetMapping("/allTodoCount") | @GetMapping("/allTodoCount") | ||||
public ProjectManageTodoCountVO allTodoCount() { | |||||
return projectManageTodoCountManage.allTodoCount(); | |||||
public ProjectManageTodoCountVO allTodoCount(ProjectListReq req) { | |||||
return projectManageTodoCountManage.allTodoCount(req); | |||||
} | } | ||||
} | } | ||||
@@ -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.enumeration.status.ProjectStatus; | ||||
import com.hz.pm.api.projectlib.model.req.ProjectListReq; | 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.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.model.vo.ProjectLibListItemVO; | ||||
import com.hz.pm.api.projectlib.service.IProjectApprovalAmountService; | import com.hz.pm.api.projectlib.service.IProjectApprovalAmountService; | ||||
import com.hz.pm.api.projectlib.service.IProjectService; | 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(); | LambdaQueryWrapper<Project> query = ProjectManageUtil.initQuery(); | ||||
UserFullInfoDTO user = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId()); | UserFullInfoDTO user = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId()); | ||||
if (!projectQueryPermission(query, user)) { | if (!projectQueryPermission(query, user)) { | ||||
@@ -166,7 +166,7 @@ public class AmountApprovalManage { | |||||
.notIn(Project::getStatus, ProjectStatusConstant.CHANGE_DELETE_PASSED); | .notIn(Project::getStatus, ProjectStatusConstant.CHANGE_DELETE_PASSED); | ||||
buildAmountApprovalFilter(req.getIsAmountApproval(), query); | buildAmountApprovalFilter(req.getIsAmountApproval(), query); | ||||
List<Project> page = projectService.list(query); | List<Project> page = projectService.list(query); | ||||
AmountApprovalProgressStatisticsVO stat = new AmountApprovalProgressStatisticsVO(); | |||||
AmountApprovalProgressVO stat = new AmountApprovalProgressVO(); | |||||
stat.setTotalCount(page.size()); | stat.setTotalCount(page.size()); | ||||
stat.setApprovalCount(CollUtil.count(page, w -> DecimalUtil.noNullAndGtZero(w.getApprovalAmount()))); | stat.setApprovalCount(CollUtil.count(page, w -> DecimalUtil.noNullAndGtZero(w.getApprovalAmount()))); | ||||
stat.setUnApprovalCount(stat.getTotalCount() - stat.getApprovalCount()); | stat.setUnApprovalCount(stat.getTotalCount() - stat.getApprovalCount()); | ||||
@@ -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.ProjectListReq; | ||||
import com.hz.pm.api.projectlib.model.req.StartProjectDeclareReq; | 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.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.IProjectApplicationService; | ||||
import com.hz.pm.api.projectlib.service.IProjectService; | import com.hz.pm.api.projectlib.service.IProjectService; | ||||
import com.hz.pm.api.todocenter.constant.TodoCenterConst; | import com.hz.pm.api.todocenter.constant.TodoCenterConst; | ||||
@@ -64,7 +64,7 @@ public class AnnualPlanLibManage { | |||||
private final MhUnitQueryAuthHelper mhUnitQueryAuthHelper; | private final MhUnitQueryAuthHelper mhUnitQueryAuthHelper; | ||||
public AnnualPlanProgressStatisticsVO annualProgressStatistics(ProjectListReq req) { | |||||
public AnnualPlanProgressVO annualPlanProgress(ProjectListReq req) { | |||||
req.setIsStartDeclaredProject(null); | req.setIsStartDeclaredProject(null); | ||||
LambdaQueryWrapper<Project> query = ProjectManageUtil.initQuery(); | LambdaQueryWrapper<Project> query = ProjectManageUtil.initQuery(); | ||||
if (!projectQueryPermission(req.clearBuildOrgCode(), query)) { | if (!projectQueryPermission(req.clearBuildOrgCode(), query)) { | ||||
@@ -79,7 +79,7 @@ public class AnnualPlanLibManage { | |||||
.notIn(Project::getStatus, ProjectStatusConstant.CHANGE_DELETE_PASSED) | .notIn(Project::getStatus, ProjectStatusConstant.CHANGE_DELETE_PASSED) | ||||
.ne(Project::getStage, ProjectStatus.STOPPED.getCode()); | .ne(Project::getStage, ProjectStatus.STOPPED.getCode()); | ||||
List<Project> projects = projectService.list(query); | List<Project> projects = projectService.list(query); | ||||
AnnualPlanProgressStatisticsVO stat = new AnnualPlanProgressStatisticsVO(); | |||||
AnnualPlanProgressVO stat = new AnnualPlanProgressVO(); | |||||
stat.setTotalCount(projects.size()); | stat.setTotalCount(projects.size()); | ||||
stat.setOpenAnnualPlanCount(CollUtil.count(projects, w -> Boolean.TRUE.equals(w.getAnnualPlanOpened()))); | stat.setOpenAnnualPlanCount(CollUtil.count(projects, w -> Boolean.TRUE.equals(w.getAnnualPlanOpened()))); | ||||
stat.setNotOpenAnnualPlanCount(stat.getTotalCount() - stat.getOpenAnnualPlanCount()); | stat.setNotOpenAnnualPlanCount(stat.getTotalCount() - stat.getOpenAnnualPlanCount()); | ||||
@@ -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.enumeration.status.ProjectStatus; | ||||
import com.hz.pm.api.projectlib.model.req.DeclaredProjectListReq; | 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.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.model.vo.MhProjectBaseInfoVO; | ||||
import com.hz.pm.api.projectlib.service.IMhProjectSchemaTargetDataService; | import com.hz.pm.api.projectlib.service.IMhProjectSchemaTargetDataService; | ||||
import com.hz.pm.api.projectlib.service.IMhProjectService; | 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); | req.setStatus(null); | ||||
LambdaQueryWrapper<Project> query = buildDeclaredRecordQuery(req); | LambdaQueryWrapper<Project> query = buildDeclaredRecordQuery(req); | ||||
if (query == null) { | if (query == null) { | ||||
@@ -166,7 +166,7 @@ public class DeclaredRecordManage { | |||||
List<Project> projects = projectService.list(query); | List<Project> projects = projectService.list(query); | ||||
Map<ProjectStatus, Long> countMap = CollUtils.groupCount(projects, | Map<ProjectStatus, Long> countMap = CollUtils.groupCount(projects, | ||||
w -> getDeclaredRecordStatus(w.getStatus())); | w -> getDeclaredRecordStatus(w.getStatus())); | ||||
DeclaredRecordProgressStatVO stat = new DeclaredRecordProgressStatVO(); | |||||
DeclaredRecordProgressVO stat = new DeclaredRecordProgressVO(); | |||||
stat.setTodoCount(countMap.getOrDefault(ProjectStatus.DECLARED_APPROVED_TO_BE_RECORD, 0L)); | stat.setTodoCount(countMap.getOrDefault(ProjectStatus.DECLARED_APPROVED_TO_BE_RECORD, 0L)); | ||||
stat.setAuditingCount(countMap.getOrDefault(ProjectStatus.DECLARED_APPROVED_RECORD_AUDITING, 0L)); | stat.setAuditingCount(countMap.getOrDefault(ProjectStatus.DECLARED_APPROVED_RECORD_AUDITING, 0L)); | ||||
stat.setPassedCount(countMap.getOrDefault(ProjectStatus.DECLARED_APPROVED_RECORD_PASSED, 0L)); | stat.setPassedCount(countMap.getOrDefault(ProjectStatus.DECLARED_APPROVED_RECORD_PASSED, 0L)); | ||||
@@ -1,14 +1,15 @@ | |||||
package com.hz.pm.api.projectlib.manage; | 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.common.util.ThreadPoolUtil; | ||||
import com.hz.pm.api.projectdeclared.manage.*; | import com.hz.pm.api.projectdeclared.manage.*; | ||||
import com.hz.pm.api.projectdeclared.model.req.PurchaseAdaptionListReq; | import com.hz.pm.api.projectdeclared.model.req.PurchaseAdaptionListReq; | ||||
import com.hz.pm.api.projectdeclared.model.vo.*; | 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.DeclaredProjectListReq; | ||||
import com.hz.pm.api.projectlib.model.req.ProjectListReq; | 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 com.hz.pm.api.projectlib.model.vo.ProjectManageTodoCountVO; | ||||
import lombok.RequiredArgsConstructor; | import lombok.RequiredArgsConstructor; | ||||
import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||
@@ -43,55 +44,72 @@ public class ProjectManageTodoCountManage { | |||||
private final FinalAcceptanceManage finalAcceptanceManage; | private final FinalAcceptanceManage finalAcceptanceManage; | ||||
private final ProjectReviewManage projectReviewManage; | 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<>(); | 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(() -> { | 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)); | }, ThreadPoolUtil.REQUEST)); | ||||
futures.add(CompletableFuture.runAsync(() -> { | 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)); | }, ThreadPoolUtil.REQUEST)); | ||||
futures.add(CompletableFuture.runAsync(() -> { | 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)); | }, ThreadPoolUtil.REQUEST)); | ||||
CompletableFuture.allOf(futures.toArray(new CompletableFuture[0])).join(); | CompletableFuture.allOf(futures.toArray(new CompletableFuture[0])).join(); | ||||
return todoCount; | |||||
return ret; | |||||
} | } | ||||
@SafeVarargs | @SafeVarargs | ||||
@@ -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; | |||||
} |
@@ -5,14 +5,14 @@ import lombok.Data; | |||||
/** | /** | ||||
* <p> | * <p> | ||||
* AmountApprovalProgressStatisticsVO | |||||
* AmountApprovalProgressVO | |||||
* </p> | * </p> | ||||
* | * | ||||
* @author WendyYang | * @author WendyYang | ||||
* @since 17:01 2024/9/4 | * @since 17:01 2024/9/4 | ||||
*/ | */ | ||||
@Data | @Data | ||||
public class AmountApprovalProgressStatisticsVO { | |||||
public class AmountApprovalProgressVO { | |||||
@ApiModelProperty("总数量") | @ApiModelProperty("总数量") | ||||
private Integer totalCount; | private Integer totalCount; |
@@ -5,14 +5,14 @@ import lombok.Data; | |||||
/** | /** | ||||
* <p> | * <p> | ||||
* AnnualPlanProgressStatisticsVO | |||||
* AnnualPlanProgressVO | |||||
* </p> | * </p> | ||||
* | * | ||||
* @author WendyYang | * @author WendyYang | ||||
* @since 16:41 2024/9/4 | * @since 16:41 2024/9/4 | ||||
*/ | */ | ||||
@Data | @Data | ||||
public class AnnualPlanProgressStatisticsVO { | |||||
public class AnnualPlanProgressVO { | |||||
@ApiModelProperty("总数量") | @ApiModelProperty("总数量") | ||||
private Integer totalCount; | private Integer totalCount; |
@@ -5,14 +5,14 @@ import lombok.Data; | |||||
/** | /** | ||||
* <p> | * <p> | ||||
* DeclaredRecordProgressStatVO | |||||
* DeclaredRecordProgressVO | |||||
* </p> | * </p> | ||||
* | * | ||||
* @author WendyYang | * @author WendyYang | ||||
* @since 17:14 2024/8/26 | * @since 17:14 2024/8/26 | ||||
*/ | */ | ||||
@Data | @Data | ||||
public class DeclaredRecordProgressStatVO { | |||||
public class DeclaredRecordProgressVO { | |||||
@ApiModelProperty("总记录数") | @ApiModelProperty("总记录数") | ||||
private Long totalCount; | private Long totalCount; |