ソースを参照

增加信创审查项目列表

tags/24080901
WendyYang 8ヶ月前
コミット
e545b70125
3個のファイルの変更83行の追加4行の削除
  1. +8
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/controller/ConstructionController.java
  2. +73
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ConstructionManage.java
  3. +2
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/FinalAcceptanceManage.java

+ 8
- 2
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/controller/ConstructionController.java ファイルの表示

@@ -77,12 +77,18 @@ public class ConstructionController {
return constructionManage.supplement(plans);
}

@ApiOperation(value = "待初验备案的项目列表", notes = "待初验备案的项目列表")
@ApiOperation(value = "待初验备案的项目列表")
@GetMapping("/pre-ins/project-list")
public PageVo<ProjectLibListItemVO> preProjectList(@ModelAttribute ProjectListReq req) {
return constructionManage.preProjectList(req);
}

@ApiOperation(value = "信创审查项目列表")
@GetMapping("/xcfhx/project-list")
public PageVo<ProjectLibListItemVO> xcfhxProjectList(@ModelAttribute ProjectListReq req) {
return constructionManage.xcfhxProjectList(req);
}

@GetMapping("/pre-ins/export")
@ApiOperation("待初验备案的项目列表导出")
@WebLog("待初验备案的项目列表导出")
@@ -106,7 +112,7 @@ public class ConstructionController {
@ApiOperation("信创符合性申请")
@WebLog("信创符合性申请")
@PostMapping("/submitXcfhxApply")
public void submitXcfhxApply(@RequestBody XcfhxApplyReq req){
public void submitXcfhxApply(@RequestBody XcfhxApplyReq req) {
constructionManage.submitXcfhxApply(req);
}



+ 73
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ConstructionManage.java ファイルの表示

@@ -413,6 +413,79 @@ public class ConstructionManage {
return PageVo.of(records, total);
}

public PageVo<ProjectLibListItemVO> xcfhxProjectList(ProjectListReq req) {
UserInfoDetails user = LoginUserUtil.loginUserDetail();
VUtils.isTrue(Objects.isNull(user)).throwMessage("获取登录用户失败!");
LambdaQueryWrapper<Project> query = ProjectHelper.projectQuery(req);
//建设中状态
query.eq(Project::getStatus, ProjectStatusEnum.ON_FIRST_INSPECTED.getCode());
query.eq(Project::getStage, ProjectStatusEnum.PROJECT_APPROVED.getCode());
query.eq(Project::getNewest, Boolean.TRUE);
//只能看自己单位的
query.eq(Project::getBuildOrgCode, user.getMhUnitIdStr());
query.orderByAsc(Project::getDeliveryTime);
Page<Project> page = projectService.page(req.page(), query);
long total;
if ((total = page.getTotal()) == 0) {
return PageVo.empty();
}

List<Long> projectIds = new ArrayList<>();
for (Project project : page.getRecords()) {
projectIds.add(project.getId());
}
List<Purchase> purchases = purchaseService.listByProjectIds(projectIds);
Map<Long, List<Purchase>> purchaseMap = CollUtils.group(purchases, Purchase::getProjectId);
Map<Long, Contract> contractMap = contractService.listByProjectIds(projectIds);
Map<Long, List<ProjectAnnualPaymentPlan>> paymentPlansMap = projectPaymentPlanService.listByProjectIds(projectIds);

List<ProjectLibListItemVO> records = CollUtils.convert(page.getRecords(), w -> {
ProjectLibListItemVO item = new ProjectLibListItemVO();
item.setId(w.getId());
item.setProjectName(w.getProjectName());
item.setCreateOn(w.getCreateOn());
item.setDeclaredAmount(w.getDeclareAmount());
item.setStage(w.getStage());
item.setStatus(w.getStatus());
item.setProjectType(w.getProjectType());
item.setProjectYear(w.getProjectYear());
item.setBuildOrg(w.getBuildOrgName());
item.setBizDomain(w.getBizDomain());
item.setProcessStatus(w.getProcessStatus());
item.setInstCode(w.getInstCode());
item.setIsHigherSuperOrg(w.getIsHigherSuperOrg());
item.setApprovedAmount(w.getApprovalAmount());
item.setApprovalDate(w.getApprovalDate());
item.setDeliveryTime(w.getDeliveryTime());
item.setContractAmount(w.getContractAmount());
List<ProjectAnnualPaymentPlan> paymentPlans = paymentPlansMap.getOrDefault(w.getId(), Collections.emptyList());
BigDecimal totalAnnualAmount = paymentPlans.stream()
.map(ProjectAnnualPaymentPlan::getAnnualPlanAmount)
.reduce(BigDecimal::add).orElse(BigDecimal.ZERO);
item.setAnnualPlanAmount(totalAnnualAmount);
item.setTransactionTime(w.getTransactionTime());
item.setTransactionAmount(w.getTransactionAmount());
List<Purchase> currPurchases = purchaseMap.get(w.getId());
if (currPurchases != null) {
List<TenderListInfoVO> tmpPurchases = CollUtils.convert(currPurchases, x -> {
TenderListInfoVO tender = new TenderListInfoVO();
tender.setBidName(x.getBidName());
tender.setBidId(x.getId());
tender.setBidStatus(x.getStatus());
tender.setBidStatusName(TenderStatusEnum.getDescByStatus(x.getStatus()));
Contract contract = contractMap.get(x.getId());
if (contract != null) {
tender.setConstructionAmount(contract.getTotalAmount());
}
return tender;
});
item.setTenders(tmpPurchases);
}
return item;
});
return PageVo.of(records, total);
}

public void exportPreList(HttpServletResponse response, ProjectListReq param) {
UserFullInfoDTO user = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId());
VUtils.isTrue(Objects.isNull(user)).throwMessage("获取登录用户失败!");


+ 2
- 2
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/FinalAcceptanceManage.java ファイルの表示

@@ -97,8 +97,8 @@ public class FinalAcceptanceManage {
/**
* 待采购的-项目列表
*
* @param req
* @return
* @param req \
* @return \
*/
public PageVo<ProjectLibListItemVO> projectLibList(ProjectListReq req) {
UserFullInfoDTO user = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId());


読み込み中…
キャンセル
保存