Browse Source

修改项目详情

tags/24080901
WendyYang 8 months ago
parent
commit
5901e63012
9 changed files with 121 additions and 89 deletions
  1. +8
    -10
      hz-pm-api/src/main/java/com/hz/pm/api/gov/utils/ProjectConvertUtil.java
  2. +15
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ConstructionManage.java
  3. +3
    -3
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/PurchaseManage.java
  4. +0
    -8
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/ContractVO.java
  5. +7
    -19
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/PreInsAcceptancePersonVO.java
  6. +35
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/PurchaseFullInfoVO.java
  7. +14
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/PurchaseVO.java
  8. +32
    -22
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectLibManage.java
  9. +7
    -26
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/vo/ProjectDetailVO.java

+ 8
- 10
hz-pm-api/src/main/java/com/hz/pm/api/gov/utils/ProjectConvertUtil.java View File

@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.google.common.collect.Lists;
import com.hz.pm.api.projectdeclared.model.vo.PurchaseFullInfoVO;
import com.ningdatech.basic.util.StrPool;
import com.ningdatech.file.entity.File;
import com.ningdatech.file.service.FileService;
@@ -205,7 +206,6 @@ public class ProjectConvertUtil {
//转化审批信息
private static GovBizProjectApproveVO buildApprove(ProjectDetailVO project, FileService fileService) {
GovBizProjectApproveVO approve = new GovBizProjectApproveVO();
// approve.setBaseProjId(project.getProjectCode());
approve.setBaseProjName(project.getProjectName());
File file = fileService.getById(project.getApprovedFile());
if (Objects.nonNull(file)) {
@@ -230,18 +230,16 @@ public class ProjectConvertUtil {
}
}
approve.setPreliminaryDesignScheme(project.getPreliminaryPlanFile());
approve.setPreliminaryDesignFile(project.getPreliminaryInspectionMaterials());
approve.setBaseReviewOpinion(project.getProposeAttach());
if (Objects.nonNull(project.getBaseReviewResults())) {
approve.setBaseReviewResults(String.format(StrPool.FORMAT_DATE_SINGLE_DIGITS,
project.getBaseReviewResults()));
}
List<PurchaseVO> purchases = project.getPurchases();
List<PurchaseFullInfoVO> purchases = project.getPurchaseDetails();
if (CollUtil.isNotEmpty(purchases)) {
purchases.stream().map(PurchaseVO::getTransactionAmount)
purchases.stream().map(w -> w.getPurchase().getTransactionAmount())
.filter(Objects::nonNull).reduce(BigDecimal::add)
.ifPresent(approve::setReleaseYearMoney);

}
return approve;
}
@@ -249,7 +247,6 @@ public class ProjectConvertUtil {
//转化建设 实施
private static GovBizProjectCimplementVO buildCim(ProjectDetailVO project) {
GovBizProjectCimplementVO cim = new GovBizProjectCimplementVO();
// cim.setBaseProjId(project.getProjectCode());
cim.setBaseProjName(project.getProjectName());
cim.setBaseEngineerPostpoFile(project.getSupportingMaterialsFile());
cim.setAreaCode(RegionConst.RC_HZ);
@@ -306,10 +303,11 @@ public class ProjectConvertUtil {

//转化采购信息
private static List<GovBizProjectProcureVO> buildProcure(ProjectDetailVO project) {
List<PurchaseVO> purchases = project.getPurchases();
List<PurchaseFullInfoVO> purchases = project.getPurchaseDetails();
if (CollUtil.isNotEmpty(purchases)) {
return purchases.stream().map(p -> {
return purchases.stream().map(w -> {
GovBizProjectProcureVO purchase = new GovBizProjectProcureVO();
PurchaseVO p = w.getPurchase();
purchase.setBaseProjName(project.getProjectName());
purchase.setAreaCode(RegionConst.RC_HZ);
purchase.setDeleted(Boolean.FALSE);
@@ -339,14 +337,14 @@ public class ProjectConvertUtil {
* @return
*/
private static String searchReportFile(ProjectDetailVO project, Integer firstIndex, Integer secondIndex) {
if (Objects.isNull(project)) {
/*if (Objects.isNull(project)) {
return null;
}
if (StringUtils.isNotBlank(project.getFinalAcceptanceMaterials())) {
return searchReportFileInner(project.getFinalAcceptanceMaterials(), firstIndex, secondIndex);
} else if (StringUtils.isNotBlank(project.getPreliminaryInspectionMaterials())) {
return searchReportFileInner(project.getFinalAcceptanceMaterials(), firstIndex, secondIndex);
}
}*/
return null;
}



+ 15
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ConstructionManage.java View File

@@ -270,6 +270,21 @@ public class ConstructionManage {
return BeanUtil.copyToList(contracts, ContractVO.class);
}

/**
* 获取合同备案详情
*
* @param bidIds \
* @return \
*/
public List<ContractVO> detailContractByBidIds(Collection<Long> bidIds) {
if (CollUtil.isEmpty(bidIds)) {
return Collections.emptyList();
}
List<Contract> contracts = contractService.list(Wrappers.lambdaQuery(Contract.class)
.in(Contract::getBidId, bidIds));
return BeanUtil.copyToList(contracts, ContractVO.class);
}

@Transactional(rollbackFor = Exception.class)
public String submitPurchaseContract(SubmitConstructionReq req) {
UserInfoDetails user = LoginUserUtil.loginUserDetail();


+ 3
- 3
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/PurchaseManage.java View File

@@ -75,8 +75,8 @@ public class PurchaseManage {
/**
* 待采购的-项目列表
*
* @param req
* @return
* @param req \
* @return \
*/
public PageVo<ProjectLibListItemVO> projectLibList(ProjectListReq req) {
UserInfoDetails user = LoginUserUtil.loginUserDetail();
@@ -86,7 +86,7 @@ public class PurchaseManage {
query.eq(Project::getBuildOrgCode, user.getMhUnitIdStr());
//待采购状态
query.in(Project::getStatus, Lists.newArrayList(ProjectStatusEnum.TO_BE_PURCHASED.getCode(),
ProjectStatusEnum.OPERATION.getCode()));
ProjectStatusEnum.ON_PURCHASING.getCode()));
query.eq(Project::getStage, ProjectStatusEnum.PROJECT_APPROVED.getCode());
query.eq(Project::getNewest, Boolean.TRUE);
query.orderByAsc(Project::getApprovalDate);


+ 0
- 8
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/ContractVO.java View File

@@ -23,14 +23,6 @@ public class ContractVO {
@ApiModelProperty("主键")
private Long id;

@ApiModelProperty("创建人")
@TableField(fill = FieldFill.INSERT)
private String createBy;

@ApiModelProperty("修改人人")
@TableField(fill = FieldFill.INSERT_UPDATE)
private String updateBy;

@ApiModelProperty("创建时间")
private LocalDateTime createOn;



+ 7
- 19
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/PreInsAcceptancePersonVO.java View File

@@ -7,32 +7,19 @@ import lombok.Data;
import java.time.LocalDateTime;

/**
* @Classname PreInsAcceptancePerson
* @Description 初验人员
* @Date 2023/5/30 15:35
* @Author PoffyZhang
* <p>
* PreInsAcceptancePersonVO
* </p>
*
* @author WendyYang
* @since 14:34 2024/2/26
*/
@Data
@ApiModel(value = "PreInsAcceptancePersonVO", description = "")
public class PreInsAcceptancePersonVO {

private static final long serialVersionUID = 1L;

@ApiModelProperty("主键")
private Long id;

@ApiModelProperty("创建人")
private String createBy;

@ApiModelProperty("修改人人")
private String updateBy;

@ApiModelProperty("创建时间")
private LocalDateTime createOn;

@ApiModelProperty("修改时间")
private LocalDateTime updateOn;

@ApiModelProperty("项目ID")
private Long projectId;

@@ -41,4 +28,5 @@ public class PreInsAcceptancePersonVO {

@ApiModelProperty("单位")
private String unit;

}

+ 35
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/PurchaseFullInfoVO.java View File

@@ -0,0 +1,35 @@
package com.hz.pm.api.projectdeclared.model.vo;

import com.hz.pm.api.projectdeclared.model.req.XcfhxApplyReq;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
* <p>
* PurchaseFullInfoVO
* </p>
*
* @author WendyYang
* @since 14:35 2024/2/26
*/
@Data
public class PurchaseFullInfoVO {

@ApiModelProperty("招标登记")
private PurchaseVO purchase;

@ApiModelProperty("初验人员")
private List<PreInsAcceptancePersonVO> firstInspectedPersons;

@ApiModelProperty("实施计划")
private OperationVO operation;

@ApiModelProperty("合同信息")
private ContractVO construction;

@ApiModelProperty("信创符合性申请信息")
private XcfhxApplyReq xcfhxApplyInfo;

}

+ 14
- 1
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/PurchaseVO.java View File

@@ -14,8 +14,8 @@ import java.time.LocalDateTime;
* @Date 2023/5/29 10:00
* @Author PoffyZhang
*/
@ApiModel(value = "采购对象", description = "采购对象")
@Data
@ApiModel(value = "采购对象")
@AllArgsConstructor
public class PurchaseVO {

@@ -84,4 +84,17 @@ public class PurchaseVO {

@ApiModelProperty("预算执行确认书编号")
private String budgetExecConfirmNo;

@ApiModelProperty("是否符合信创符合性要求")
private Boolean matchXcfhx;

@ApiModelProperty("备注")
private String xcfhxApplyRemark;

@ApiModelProperty("其他附件")
private String xcfhxApplyFiles;

@ApiModelProperty("信创报告")
private String xcfhxReportFiles;

}

+ 32
- 22
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectLibManage.java View File

@@ -687,28 +687,44 @@ public class ProjectLibManage {
vo.setProcess(todoService.getProcessDetail(req));

List<Long> allVersionProjectId = projectService.getAllVersionProjectId(projectInfo);
//查询采购备案
// 查询采购备案
vo.setPurchaseDetails(new ArrayList<>());
List<Purchase> purchases = purchaseService.listByProjectIds(allVersionProjectId);
vo.setPurchases(CollUtils.fieldList(purchases,w -> {
PurchaseVO purchase = BeanUtil.copyProperties(w, PurchaseVO.class);
purchase.setStatusName(TenderStatusEnum.getDescByStatus(w.getStatus()));
return purchase;
}));
if (!purchases.isEmpty()) {
Map<Long, PurchaseVO> purchaseMap = CollUtils.listToMap(purchases, Purchase::getId, w -> {
PurchaseVO purchase = BeanUtil.copyProperties(w, PurchaseVO.class);
purchase.setStatusName(TenderStatusEnum.getDescByStatus(w.getStatus()));
return purchase;
});
//查询合同备案
List<ContractVO> contracts = constructionManage.detailContractByBidIds(purchaseMap.keySet());
Map<Long, ContractVO> contractMap = CollUtils.listToMap(contracts, ContractVO::getBidId);

//查询实施信息
List<Operation> operations = operationService.list(Wrappers.lambdaQuery(Operation.class)
.in(Operation::getBidId, purchaseMap.keySet()));
List<OperationVO> tmpOperations = BeanUtil.copyToList(operations, OperationVO.class);
Map<Long, OperationVO> operationMap = CollUtils.listToMap(tmpOperations, w -> w.getBidId());

//查询初验信息
Map<Long, List<PreInsAcceptancePerson>> acceptancePersonsMap = acceptancePersonService.listByBidIds(purchaseMap.keySet());
purchaseMap.forEach((k, v) -> {
PurchaseFullInfoVO purchaseFullInfo = new PurchaseFullInfoVO();
purchaseFullInfo.setPurchase(v);
purchaseFullInfo.setOperation(operationMap.get(k));
purchaseFullInfo.setConstruction(contractMap.get(k));
List<PreInsAcceptancePerson> tmpPersons = acceptancePersonsMap.get(k);
if (tmpPersons != null) {
purchaseFullInfo.setFirstInspectedPersons(convertPersons(tmpPersons));
}
vo.getPurchaseDetails().add(purchaseFullInfo);
});
}

//查询合同备案
List<ContractVO> contracts = constructionManage.detailContractByProjectId(projectInfo.getId());
vo.setContract(contracts);

List<ProjectAnnualPaymentPlan> paymentPlans = projectPaymentPlanService.listByProjectId(projectInfo.getId());
vo.setAnnualPaymentPlans(BeanUtil.copyToList(paymentPlans, ProjectPaymentPlanDTO.class));

//查询实施信息
Operation operation = operationService.getOne(Wrappers.lambdaQuery(Operation.class)
.in(Operation::getProjectId, allVersionProjectId)
.orderByAsc(Operation::getCreateOn)
.last(BizConst.LIMIT_1));
vo.setOperation(BeanUtil.copyProperties(operation, OperationVO.class));

SafetyMonitorVO safetyVo = new SafetyMonitorVO();
//查询风险监测
@@ -729,12 +745,6 @@ public class ProjectLibManage {
.collect(Collectors.toList()));
}

//查询初验信息
List<PreInsAcceptancePerson> acceptancePersons = acceptancePersonService.list(Wrappers.lambdaQuery(PreInsAcceptancePerson.class)
.in(PreInsAcceptancePerson::getProjectId, allVersionProjectId)
.orderByAsc(PreInsAcceptancePerson::getCreateOn));
vo.setAcceptancePersons(convertPersons(acceptancePersons));

//查询终验信息
vo.setFinalIrsApps(applicationHandler.generateIrsApp(projectInfo.getProjectCode()));



+ 7
- 26
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/vo/ProjectDetailVO.java View File

@@ -1,23 +1,18 @@
package com.hz.pm.api.projectlib.model.vo;

import cn.hutool.json.JSONNull;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.annotation.JSONField;
import com.hz.pm.api.projectlib.model.dto.ProjectPaymentPlanDTO;
import com.ningdatech.basic.util.NdDateUtils;
import com.hz.pm.api.common.compare.Compare;
import com.hz.pm.api.common.util.BizUtils;
import com.hz.pm.api.dashboard.model.vo.ProtraitProjectOutputVO;
import com.hz.pm.api.portrait.model.vo.TagVO;
import com.hz.pm.api.projectdeclared.model.vo.ContractVO;
import com.hz.pm.api.projectdeclared.model.vo.OperationVO;
import com.hz.pm.api.projectdeclared.model.vo.PreInsAcceptancePersonVO;
import com.hz.pm.api.projectdeclared.model.vo.PurchaseVO;
import com.hz.pm.api.projectdeclared.model.vo.*;
import com.hz.pm.api.projectlib.model.dto.ProjectPaymentPlanDTO;
import com.hz.pm.api.projectlib.model.enumeration.ProjectStatusEnum;
import com.hz.pm.api.projectlib.model.enumeration.ProjectTypeNewEnum;
import com.hz.pm.api.safety.model.vo.SafetyMonitorVO;
import com.hz.pm.api.todocenter.model.vo.ProcessProgressDetailVO;
import com.ningdatech.basic.util.NdDateUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -380,6 +375,7 @@ public class ProjectDetailVO {
private Boolean newest;

private LocalDateTime createOn;

private LocalDateTime updateOn;

@ApiModelProperty("成交金额")
@@ -393,26 +389,11 @@ public class ProjectDetailVO {
@JSONField(format = "yyyy-MM-dd")
private LocalDateTime deliveryTime;

@ApiModelProperty("初验材料")
private String preliminaryInspectionMaterials;

@ApiModelProperty("终验材料")
private String finalAcceptanceMaterials;

@ApiModelProperty("合同总金额")
private BigDecimal contractAmount;

@ApiModelProperty("合同信息")
private List<ContractVO> contract;

@ApiModelProperty("采购信息")
private List<PurchaseVO> purchases;

@ApiModelProperty("初审人员")
private List<PreInsAcceptancePersonVO> acceptancePersons;

@ApiModelProperty("实施信息")
private OperationVO operation;
@ApiModelProperty("采购信息(标段)")
private List<PurchaseFullInfoVO> purchaseDetails;

@ApiModelProperty("版本号str")
private String versionStr;
@@ -457,7 +438,7 @@ public class ProjectDetailVO {
private LocalDateTime planAcceptanceTime;

public String getVersionStr() {
if (Objects.nonNull(this.newest) && this.newest) {
if (Objects.nonNull(this.newest) && Boolean.TRUE.equals(this.newest)) {
this.versionStr = "当前版本";
return this.versionStr;
}


Loading…
Cancel
Save