@@ -230,7 +230,7 @@ public class ProjectFileManage { | |||||
List<ProcessDetailVO> processDetailVos = projectLibManage.processScheduleDetail(projectId); | List<ProcessDetailVO> processDetailVos = projectLibManage.processScheduleDetail(projectId); | ||||
ProjectReviewDetailVO projectReviewDetailVo = expertReviewManage.projectExpertReviewDetail(projectCode); | ProjectReviewDetailVO projectReviewDetailVo = expertReviewManage.projectExpertReviewDetail(projectCode); | ||||
List<PurchaseVO> purchaseVos = purchaseManage.detailByProjectId(projectId); | List<PurchaseVO> purchaseVos = purchaseManage.detailByProjectId(projectId); | ||||
ContractVO contractVo = constructionManage.detailContractByProjectId(projectId); | |||||
List<ContractVO> contractVos = constructionManage.detailContractByProjectId(projectId); | |||||
PreInsVO preInsVo = constructionManage.detailPreInsByProjectId(projectId); | PreInsVO preInsVo = constructionManage.detailPreInsByProjectId(projectId); | ||||
FinalAcceptanceVO finalAcceptanceVo = finalAcceptanceManage.detailByProjectId(projectId); | FinalAcceptanceVO finalAcceptanceVo = finalAcceptanceManage.detailByProjectId(projectId); | ||||
@@ -238,7 +238,7 @@ public class ProjectFileManage { | |||||
projectFileVo.setProcessDetailVos(processDetailVos); | projectFileVo.setProcessDetailVos(processDetailVos); | ||||
projectFileVo.setProjectReviewDetailVo(projectReviewDetailVo); | projectFileVo.setProjectReviewDetailVo(projectReviewDetailVo); | ||||
projectFileVo.setPurchaseVos(purchaseVos); | projectFileVo.setPurchaseVos(purchaseVos); | ||||
projectFileVo.setContractVo(contractVo); | |||||
projectFileVo.setContractVos(contractVos); | |||||
projectFileVo.setPreInsVo(preInsVo); | projectFileVo.setPreInsVo(preInsVo); | ||||
projectFileVo.setFinalAcceptanceVo(finalAcceptanceVo); | projectFileVo.setFinalAcceptanceVo(finalAcceptanceVo); | ||||
@@ -36,7 +36,7 @@ public class ProjectFileVO { | |||||
private List<PurchaseVO> purchaseVos; | private List<PurchaseVO> purchaseVos; | ||||
@ApiModelProperty("合同登记详情") | @ApiModelProperty("合同登记详情") | ||||
private ContractVO contractVo; | |||||
private List<ContractVO> contractVos; | |||||
@ApiModelProperty("初验登记详情") | @ApiModelProperty("初验登记详情") | ||||
private PreInsVO preInsVo; | private PreInsVO preInsVo; | ||||
@@ -307,14 +307,6 @@ public class ProjectConvertUtil { | |||||
//转化采购信息 | //转化采购信息 | ||||
private static List<GovBizProjectProcureVO> buildProcure(ProjectDetailVO project) { | private static List<GovBizProjectProcureVO> buildProcure(ProjectDetailVO project) { | ||||
List<PurchaseVO> purchases = project.getPurchases(); | List<PurchaseVO> purchases = project.getPurchases(); | ||||
ContractVO contract = project.getContract(); | |||||
final BigDecimal[] paymentTotal = {BigDecimal.ZERO}; | |||||
if (Objects.nonNull(contract)) { | |||||
List<PaymentPlanVO> payments = contract.getPayments(); | |||||
payments.stream().map(PaymentPlanVO::getPaymentAmount) | |||||
.reduce(BigDecimal::add) | |||||
.ifPresent(b -> paymentTotal[0] = b); | |||||
} | |||||
if (CollUtil.isNotEmpty(purchases)) { | if (CollUtil.isNotEmpty(purchases)) { | ||||
return purchases.stream().map(p -> { | return purchases.stream().map(p -> { | ||||
GovBizProjectProcureVO purchase = new GovBizProjectProcureVO(); | GovBizProjectProcureVO purchase = new GovBizProjectProcureVO(); | ||||
@@ -332,10 +324,6 @@ public class ProjectConvertUtil { | |||||
purchase.setBasePurchaseCode(p.getBudgetExecConfirmNo()); | purchase.setBasePurchaseCode(p.getBudgetExecConfirmNo()); | ||||
purchase.setBaseWinningBidTime(p.getTransactionTime()); | purchase.setBaseWinningBidTime(p.getTransactionTime()); | ||||
purchase.setBiddingFile(p.getAcceptanceLetter()); | purchase.setBiddingFile(p.getAcceptanceLetter()); | ||||
purchase.setPaymentProgress(paymentTotal[0]); | |||||
if (Objects.nonNull(contract)) { | |||||
purchase.setPurchaseContract(contract.getAttachment()); | |||||
} | |||||
purchase.setSetProjCodeFinan(project.getFinancialCode()); | purchase.setSetProjCodeFinan(project.getFinancialCode()); | ||||
purchase.setPurchaseFile(p.getBidDoc()); | purchase.setPurchaseFile(p.getBidDoc()); | ||||
return purchase; | return purchase; | ||||
@@ -2,9 +2,9 @@ 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.ConstructionManage; | import com.hz.pm.api.projectdeclared.manage.ConstructionManage; | ||||
import com.hz.pm.api.projectdeclared.model.dto.ContractSaveDTO; | |||||
import com.hz.pm.api.projectdeclared.model.dto.PaymentPlanSupplementDTO; | 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.SubmitConstructionReq; | |||||
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.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; | ||||
@@ -56,17 +56,17 @@ public class ConstructionController { | |||||
ExcelDownUtil.downXls(response, req, constructionManage::exportList); | ExcelDownUtil.downXls(response, req, constructionManage::exportList); | ||||
} | } | ||||
@ApiOperation(value = "合同备案的详情-通过项目ID", notes = "合同备案的详情-通过项目ID") | |||||
@ApiOperation(value = "合同备案的详情") | |||||
@GetMapping("/contract/detail/{projectId}") | @GetMapping("/contract/detail/{projectId}") | ||||
public ContractVO detailContractByProjectId(@PathVariable Long projectId) { | |||||
public List<ContractVO> detailContractByProjectId(@PathVariable Long projectId) { | |||||
return constructionManage.detailContractByProjectId(projectId); | return constructionManage.detailContractByProjectId(projectId); | ||||
} | } | ||||
@ApiOperation(value = "填写合同信息", notes = "填写合同信息") | |||||
@ApiOperation(value = "填写合同信息") | |||||
@WebLog("填写合同信息") | @WebLog("填写合同信息") | ||||
@PostMapping("/submit-contract") | @PostMapping("/submit-contract") | ||||
public String submitContract(@Validated @RequestBody ContractSaveDTO dto) { | |||||
return constructionManage.submitContract(dto); | |||||
public String submitContract(@Validated @RequestBody SubmitConstructionReq req) { | |||||
return constructionManage.submitPurchaseContract(req); | |||||
} | } | ||||
@ApiOperation(value = "补充实际支付金额", notes = "补充实际支付金额") | @ApiOperation(value = "补充实际支付金额", notes = "补充实际支付金额") | ||||
@@ -1,8 +1,8 @@ | |||||
package com.hz.pm.api.projectdeclared.controller; | package com.hz.pm.api.projectdeclared.controller; | ||||
import com.hz.pm.api.projectdeclared.model.dto.OperationReq; | |||||
import com.ningdatech.log.annotation.WebLog; | import com.ningdatech.log.annotation.WebLog; | ||||
import com.hz.pm.api.projectdeclared.manage.OperationManage; | import com.hz.pm.api.projectdeclared.manage.OperationManage; | ||||
import com.hz.pm.api.projectdeclared.model.dto.OperationDTO; | |||||
import com.hz.pm.api.projectdeclared.model.vo.OperationVO; | import com.hz.pm.api.projectdeclared.model.vo.OperationVO; | ||||
import io.swagger.annotations.Api; | import io.swagger.annotations.Api; | ||||
import io.swagger.annotations.ApiOperation; | import io.swagger.annotations.ApiOperation; | ||||
@@ -11,6 +11,8 @@ import lombok.extern.slf4j.Slf4j; | |||||
import org.springframework.validation.annotation.Validated; | import org.springframework.validation.annotation.Validated; | ||||
import org.springframework.web.bind.annotation.*; | import org.springframework.web.bind.annotation.*; | ||||
import java.util.List; | |||||
/** | /** | ||||
* @Classname OperationController | * @Classname OperationController | ||||
* @Description 申报项目-实施 | * @Description 申报项目-实施 | ||||
@@ -28,14 +30,14 @@ public class OperationController { | |||||
@ApiOperation(value = "实施详情", notes = "实施详情") | @ApiOperation(value = "实施详情", notes = "实施详情") | ||||
@GetMapping("/detail/{projectId}") | @GetMapping("/detail/{projectId}") | ||||
public OperationVO detail(@PathVariable Long projectId) { | |||||
public List<OperationVO> detail(@PathVariable Long projectId) { | |||||
return operationManage.detail(projectId); | return operationManage.detail(projectId); | ||||
} | } | ||||
@PostMapping("/push-operation") | @PostMapping("/push-operation") | ||||
@ApiOperation("填写实施计划") | @ApiOperation("填写实施计划") | ||||
@WebLog("填写实施计划") | @WebLog("填写实施计划") | ||||
public String pushOperation(@RequestBody OperationDTO operation) { | |||||
public String pushOperation(@RequestBody OperationReq operation) { | |||||
return operationManage.pushOperation(operation); | return operationManage.pushOperation(operation); | ||||
} | } | ||||
@@ -1,5 +1,6 @@ | |||||
package com.hz.pm.api.projectdeclared.controller; | package com.hz.pm.api.projectdeclared.controller; | ||||
import cn.hutool.core.io.FileUtil; | |||||
import com.hz.pm.api.common.util.ExcelDownUtil; | import com.hz.pm.api.common.util.ExcelDownUtil; | ||||
import com.hz.pm.api.projectdeclared.manage.ProjectAdjustmentManage; | import com.hz.pm.api.projectdeclared.manage.ProjectAdjustmentManage; | ||||
import com.hz.pm.api.projectdeclared.model.dto.DefaultDeclaredDTO; | import com.hz.pm.api.projectdeclared.model.dto.DefaultDeclaredDTO; | ||||
@@ -15,6 +16,9 @@ import org.springframework.validation.annotation.Validated; | |||||
import org.springframework.web.bind.annotation.*; | import org.springframework.web.bind.annotation.*; | ||||
import javax.servlet.http.HttpServletResponse; | import javax.servlet.http.HttpServletResponse; | ||||
import java.io.File; | |||||
import java.util.Comparator; | |||||
import java.util.List; | |||||
/** | /** | ||||
* @Classname ConstructionPlanController | * @Classname ConstructionPlanController | ||||
@@ -52,4 +56,5 @@ public class ProjectAdjustmentController { | |||||
public void exportList(AdjustmentListReq preReq, HttpServletResponse response){ | public void exportList(AdjustmentListReq preReq, HttpServletResponse response){ | ||||
ExcelDownUtil.downXls(response,preReq,projectAdjustmentManage::exportList); | ExcelDownUtil.downXls(response,preReq,projectAdjustmentManage::exportList); | ||||
} | } | ||||
} | } |
@@ -1,14 +1,15 @@ | |||||
package com.hz.pm.api.projectdeclared.controller; | package com.hz.pm.api.projectdeclared.controller; | ||||
import com.ningdatech.basic.model.PageVo; | |||||
import com.ningdatech.log.annotation.WebLog; | |||||
import com.hz.pm.api.common.util.ExcelDownUtil; | import com.hz.pm.api.common.util.ExcelDownUtil; | ||||
import com.hz.pm.api.projectdeclared.manage.ProjectAdjustmentManage; | |||||
import com.hz.pm.api.projectdeclared.manage.PurchaseManage; | import com.hz.pm.api.projectdeclared.manage.PurchaseManage; | ||||
import com.hz.pm.api.projectdeclared.model.dto.PurchaseSaveDTO; | import com.hz.pm.api.projectdeclared.model.dto.PurchaseSaveDTO; | ||||
import com.hz.pm.api.projectdeclared.model.req.SubmitPurchaseRecordReq; | |||||
import com.hz.pm.api.projectdeclared.model.req.SubmitPurchaseNoticeReq; | |||||
import com.hz.pm.api.projectdeclared.model.vo.PurchaseVO; | import com.hz.pm.api.projectdeclared.model.vo.PurchaseVO; | ||||
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; | ||||
import com.ningdatech.basic.model.PageVo; | |||||
import com.ningdatech.log.annotation.WebLog; | |||||
import io.swagger.annotations.Api; | import io.swagger.annotations.Api; | ||||
import io.swagger.annotations.ApiOperation; | import io.swagger.annotations.ApiOperation; | ||||
import lombok.RequiredArgsConstructor; | import lombok.RequiredArgsConstructor; | ||||
@@ -34,8 +35,6 @@ import java.util.List; | |||||
public class PurchaseController { | public class PurchaseController { | ||||
private final PurchaseManage purchaseManage; | private final PurchaseManage purchaseManage; | ||||
private final ProjectAdjustmentManage projectAdjustmentManage; | |||||
@ApiOperation(value = "待采购结果备案列表", notes = "待采购结果备案列表") | @ApiOperation(value = "待采购结果备案列表", notes = "待采购结果备案列表") | ||||
@GetMapping("/project-list") | @GetMapping("/project-list") | ||||
public PageVo<ProjectLibListItemVO> projectlist(@ModelAttribute ProjectListReq req) { | public PageVo<ProjectLibListItemVO> projectlist(@ModelAttribute ProjectListReq req) { | ||||
@@ -62,4 +61,18 @@ public class PurchaseController { | |||||
return purchaseManage.submitResult(dto); | return purchaseManage.submitResult(dto); | ||||
} | } | ||||
@ApiOperation("发布采购公告") | |||||
@WebLog("发布采购公告") | |||||
@PostMapping("/notice/submit") | |||||
public void submitPurchaseNotice(@RequestBody SubmitPurchaseNoticeReq req) { | |||||
purchaseManage.submitPurchaseNotice(req); | |||||
} | |||||
@ApiOperation("采购信息备案") | |||||
@WebLog("采购信息备案") | |||||
@PostMapping("/record/submit") | |||||
public void submitPurchaseRecord(@RequestBody SubmitPurchaseRecordReq req) { | |||||
purchaseManage.submitPurchaseRecord(req); | |||||
} | |||||
} | } |
@@ -10,6 +10,7 @@ import com.google.common.collect.Lists; | |||||
import com.hz.pm.api.common.helper.UserInfoHelper; | import com.hz.pm.api.common.helper.UserInfoHelper; | ||||
import com.hz.pm.api.common.model.constant.BizConst; | import com.hz.pm.api.common.model.constant.BizConst; | ||||
import com.hz.pm.api.common.statemachine.util.StateMachineUtil; | import com.hz.pm.api.common.statemachine.util.StateMachineUtil; | ||||
import com.hz.pm.api.common.util.DecimalUtil; | |||||
import com.hz.pm.api.common.util.ExcelDownUtil; | import com.hz.pm.api.common.util.ExcelDownUtil; | ||||
import com.hz.pm.api.common.util.ExcelExportStyle; | import com.hz.pm.api.common.util.ExcelExportStyle; | ||||
import com.hz.pm.api.projectdeclared.model.dto.ContractSaveDTO; | import com.hz.pm.api.projectdeclared.model.dto.ContractSaveDTO; | ||||
@@ -20,6 +21,7 @@ import com.hz.pm.api.projectdeclared.model.entity.Contract; | |||||
import com.hz.pm.api.projectdeclared.model.entity.PaymentPlan; | import com.hz.pm.api.projectdeclared.model.entity.PaymentPlan; | ||||
import com.hz.pm.api.projectdeclared.model.entity.PreInsAcceptancePerson; | import com.hz.pm.api.projectdeclared.model.entity.PreInsAcceptancePerson; | ||||
import com.hz.pm.api.projectdeclared.model.entity.Purchase; | import com.hz.pm.api.projectdeclared.model.entity.Purchase; | ||||
import com.hz.pm.api.projectdeclared.model.req.SubmitConstructionReq; | |||||
import com.hz.pm.api.projectdeclared.model.vo.*; | import com.hz.pm.api.projectdeclared.model.vo.*; | ||||
import com.hz.pm.api.projectdeclared.service.IContractService; | import com.hz.pm.api.projectdeclared.service.IContractService; | ||||
import com.hz.pm.api.projectdeclared.service.IPaymentPlanService; | import com.hz.pm.api.projectdeclared.service.IPaymentPlanService; | ||||
@@ -47,6 +49,7 @@ import lombok.extern.slf4j.Slf4j; | |||||
import org.apache.commons.lang3.StringUtils; | import org.apache.commons.lang3.StringUtils; | ||||
import org.springframework.beans.BeanUtils; | import org.springframework.beans.BeanUtils; | ||||
import org.springframework.stereotype.Component; | import org.springframework.stereotype.Component; | ||||
import org.springframework.transaction.annotation.Transactional; | |||||
import javax.servlet.http.HttpServletResponse; | import javax.servlet.http.HttpServletResponse; | ||||
import java.math.BigDecimal; | import java.math.BigDecimal; | ||||
@@ -246,51 +249,29 @@ public class ConstructionManage { | |||||
/** | /** | ||||
* 获取合同备案详情 | * 获取合同备案详情 | ||||
* | * | ||||
* @param projectId | |||||
* @return | |||||
* @param projectId \ | |||||
* @return \ | |||||
*/ | */ | ||||
public ContractVO detailContractByProjectId(Long projectId) { | |||||
public List<ContractVO> detailContractByProjectId(Long projectId) { | |||||
Project project = projectService.getNewProject(projectId); | Project project = projectService.getNewProject(projectId); | ||||
if (Objects.isNull(project)) { | if (Objects.isNull(project)) { | ||||
return null; | |||||
} | |||||
Contract contract = contractService.getOne(Wrappers.lambdaQuery(Contract.class) | |||||
.eq(Contract::getProjectCode, project.getProjectCode()) | |||||
.last(BizConst.LIMIT_1)); | |||||
ContractVO vo = BeanUtil.copyProperties(contract, ContractVO.class); | |||||
List<PaymentPlan> payments = paymentPlanService.list(Wrappers.lambdaQuery(PaymentPlan.class) | |||||
.eq(PaymentPlan::getProjectCode, project.getProjectCode()) | |||||
.orderByAsc(PaymentPlan::getPaymentTime)); | |||||
if (CollUtil.isNotEmpty(payments)) { | |||||
vo.setPayments(convertPayments(payments, contract.getTotalAmount())); | |||||
} | |||||
return vo; | |||||
} | |||||
private List<PaymentPlanVO> convertPayments(List<PaymentPlan> payments, BigDecimal totalAmount) { | |||||
if (CollUtil.isEmpty(payments)) { | |||||
return Collections.emptyList(); | return Collections.emptyList(); | ||||
} | } | ||||
return payments.stream().map(p -> { | |||||
PaymentPlanVO vo = BeanUtil.copyProperties(p, PaymentPlanVO.class); | |||||
vo.setRatio((Objects.isNull(totalAmount) || totalAmount.compareTo(BigDecimal.ZERO) == 0) ? "0%" | |||||
: p.getPaymentAmount().multiply(BigDecimal.valueOf(100)) | |||||
.divide(totalAmount, BigDecimal.ROUND_CEILING, RoundingMode.CEILING) + "%"); | |||||
return vo; | |||||
}) | |||||
.collect(Collectors.toList()); | |||||
List<Contract> contracts = contractService.list(Wrappers.lambdaQuery(Contract.class) | |||||
.eq(Contract::getProjectCode, project.getProjectCode())); | |||||
return BeanUtil.copyToList(contracts, ContractVO.class); | |||||
} | } | ||||
/** | /** | ||||
* 填写合同信息 | * 填写合同信息 | ||||
* | * | ||||
* @param dto | |||||
* @return | |||||
* @param dto \ | |||||
* @return \ | |||||
* @deprecated 弃用 | |||||
*/ | */ | ||||
@Deprecated | |||||
@Transactional(rollbackFor = Exception.class) | |||||
public String submitContract(ContractSaveDTO dto) { | public String submitContract(ContractSaveDTO dto) { | ||||
UserFullInfoDTO user = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId()); | UserFullInfoDTO user = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId()); | ||||
Long projectId = dto.getProjectId(); | Long projectId = dto.getProjectId(); | ||||
@@ -317,27 +298,25 @@ public class ConstructionManage { | |||||
} | } | ||||
contractEntity.setProjectId(projectId); | contractEntity.setProjectId(projectId); | ||||
contractEntity.setProjectCode(project.getProjectCode()); | contractEntity.setProjectCode(project.getProjectCode()); | ||||
if (contractService.saveOrUpdate(contractEntity)) { | |||||
//存 付款计划信心 | |||||
if (Objects.nonNull(dto.getPayments())) { | |||||
//先删除 | |||||
paymentPlanService.remove(Wrappers.lambdaQuery(PaymentPlan.class) | |||||
.eq(PaymentPlan::getProjectId, projectId)); | |||||
if (CollUtil.isNotEmpty(dto.getPayments())) { | |||||
List<PaymentPlan> payments = dto.getPayments().stream().map(d -> { | |||||
PaymentPlan plan = BeanUtil.copyProperties(d, PaymentPlan.class); | |||||
plan.setProjectId(projectId); | |||||
plan.setProjectCode(project.getProjectCode()); | |||||
plan.setCreateOn(LocalDateTime.now()); | |||||
plan.setUpdateOn(LocalDateTime.now()); | |||||
plan.setCreateBy(user.getUserIdStr()); | |||||
plan.setUpdateBy(user.getUserIdStr()); | |||||
return plan; | |||||
}).collect(Collectors.toList()); | |||||
paymentPlanService.saveBatch(payments); | |||||
} | |||||
if (contractService.saveOrUpdate(contractEntity) && (Objects.nonNull(dto.getPayments()))) { | |||||
//先删除 | |||||
paymentPlanService.remove(Wrappers.lambdaQuery(PaymentPlan.class) | |||||
.eq(PaymentPlan::getProjectId, projectId)); | |||||
if (CollUtil.isNotEmpty(dto.getPayments())) { | |||||
List<PaymentPlan> payments = dto.getPayments().stream().map(d -> { | |||||
PaymentPlan plan = BeanUtil.copyProperties(d, PaymentPlan.class); | |||||
plan.setProjectId(projectId); | |||||
plan.setProjectCode(project.getProjectCode()); | |||||
plan.setCreateOn(LocalDateTime.now()); | |||||
plan.setUpdateOn(LocalDateTime.now()); | |||||
plan.setCreateBy(user.getUserIdStr()); | |||||
plan.setUpdateBy(user.getUserIdStr()); | |||||
return plan; | |||||
}).collect(Collectors.toList()); | |||||
paymentPlanService.saveBatch(payments); | |||||
} | } | ||||
} | } | ||||
//判断下 如果和初验都完成了 才进入下一阶段 | //判断下 如果和初验都完成了 才进入下一阶段 | ||||
@@ -357,6 +336,47 @@ public class ConstructionManage { | |||||
return "填写成功"; | return "填写成功"; | ||||
} | } | ||||
@Transactional(rollbackFor = Exception.class) | |||||
public String submitPurchaseContract(SubmitConstructionReq req) { | |||||
UserInfoDetails user = LoginUserUtil.loginUserDetail(); | |||||
Long projectId = req.getProjectId(); | |||||
Project project = projectService.getNewProject(req.getProjectId()); | |||||
VUtils.isTrue(Objects.isNull(project)).throwMessage("提交失败 此项目不存在!"); | |||||
//首先要判断 项目当前状态 是不是 采购结果备案 | |||||
VUtils.isTrue(!ProjectStatusEnum.UNDER_CONSTRUCTION.getCode().equals(project.getStatus()) || | |||||
!ProjectStatusEnum.PROJECT_APPROVED.getCode().equals(project.getStage())) | |||||
.throwMessage("提交失败 该项目不是 建设中或者已立项阶段"); | |||||
LocalDateTime now = LocalDateTime.now(); | |||||
Contract contract = new Contract(); | |||||
contract.setContractTime(req.getContractTime()); | |||||
contract.setAttachment(req.getAttachment()); | |||||
contract.setName(req.getName()); | |||||
contract.setProjectId(projectId); | |||||
contract.setProjectCode(project.getProjectCode()); | |||||
contract.setBidId(req.getBidId()); | |||||
contract.setId(req.getConstructionId()); | |||||
contract.setCreateBy(user.getUserIdStr()); | |||||
contract.setUpdateBy(user.getUserIdStr()); | |||||
contract.setCreateOn(now); | |||||
contract.setUpdateOn(now); | |||||
contract.setTotalAmount(req.getTotalAmount()); | |||||
contract.setConstructionNo(req.getConstructionNo()); | |||||
contract.setSupplierContact(req.getSupplierContact()); | |||||
contract.setSupplierContactInfo(req.getSupplierContactInfo()); | |||||
contractService.saveOrUpdate(contract); | |||||
LambdaQueryWrapper<Contract> query = Wrappers.lambdaQuery(Contract.class) | |||||
.eq(Contract::getProjectId, projectId); | |||||
List<Contract> allContracts = contractService.list(query); | |||||
BigDecimal totalAmount = DecimalUtil.sum(allContracts, Contract::getTotalAmount); | |||||
project.setUpdateOn(now); | |||||
project.setContractAmount(totalAmount); | |||||
projectService.updateById(project); | |||||
return "填写成功"; | |||||
} | |||||
/** | /** | ||||
* 待初验项目列表 | * 待初验项目列表 | ||||
* | * | ||||
@@ -565,15 +585,14 @@ public class ConstructionManage { | |||||
project.setIsCompletedLogCollection(dto.getIsCompletedLogCollection()); | project.setIsCompletedLogCollection(dto.getIsCompletedLogCollection()); | ||||
project.setActualPerformanceIndicators(dto.getActualPerformanceIndicators()); | project.setActualPerformanceIndicators(dto.getActualPerformanceIndicators()); | ||||
projectService.updateById(project); | projectService.updateById(project); | ||||
return "填写成功"; | return "填写成功"; | ||||
} | } | ||||
/** | /** | ||||
* 补充项目 合同 实际支付信息 | * 补充项目 合同 实际支付信息 | ||||
* | * | ||||
* @param plans | |||||
* @return | |||||
* @param plans \ | |||||
* @return \ | |||||
*/ | */ | ||||
public String supplement(List<PaymentPlanSupplementDTO> plans) { | public String supplement(List<PaymentPlanSupplementDTO> plans) { | ||||
if (CollUtil.isEmpty(plans)) { | if (CollUtil.isEmpty(plans)) { | ||||
@@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.core.toolkit.Assert; | |||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||
import com.hz.pm.api.common.model.constant.BizConst; | import com.hz.pm.api.common.model.constant.BizConst; | ||||
import com.hz.pm.api.common.statemachine.util.StateMachineUtil; | import com.hz.pm.api.common.statemachine.util.StateMachineUtil; | ||||
import com.hz.pm.api.projectdeclared.model.dto.OperationDTO; | |||||
import com.hz.pm.api.projectdeclared.model.dto.OperationReq; | |||||
import com.hz.pm.api.projectdeclared.model.entity.Operation; | import com.hz.pm.api.projectdeclared.model.entity.Operation; | ||||
import com.hz.pm.api.projectdeclared.model.vo.OperationVO; | import com.hz.pm.api.projectdeclared.model.vo.OperationVO; | ||||
import com.hz.pm.api.projectdeclared.service.IOperationService; | import com.hz.pm.api.projectdeclared.service.IOperationService; | ||||
@@ -15,11 +15,14 @@ import com.hz.pm.api.projectlib.service.IProjectService; | |||||
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.function.VUtils; | import com.ningdatech.basic.function.VUtils; | ||||
import com.ningdatech.basic.util.CollUtils; | |||||
import lombok.RequiredArgsConstructor; | import lombok.RequiredArgsConstructor; | ||||
import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||
import org.springframework.stereotype.Component; | import org.springframework.stereotype.Component; | ||||
import org.springframework.transaction.annotation.Transactional; | |||||
import java.time.LocalDateTime; | import java.time.LocalDateTime; | ||||
import java.util.List; | |||||
import java.util.Objects; | import java.util.Objects; | ||||
/** | /** | ||||
@@ -42,24 +45,24 @@ public class OperationManage { | |||||
/** | /** | ||||
* 获取实施详情 | * 获取实施详情 | ||||
* | * | ||||
* @param projectId | |||||
* @return | |||||
* @param projectId \ | |||||
* @return \ | |||||
*/ | */ | ||||
public OperationVO detail(Long projectId) { | |||||
public List<OperationVO> detail(Long projectId) { | |||||
Project project = projectService.getNewProject(projectId); | Project project = projectService.getNewProject(projectId); | ||||
Assert.notNull(project, "项目不存在!"); | Assert.notNull(project, "项目不存在!"); | ||||
Operation operation = operationService.getOne(Wrappers.lambdaQuery(Operation.class) | |||||
.eq(Operation::getProjectCode, project.getProjectCode()) | |||||
.last(BizConst.LIMIT_1)); | |||||
List<Operation> operations = operationService.list(Wrappers.lambdaQuery(Operation.class) | |||||
.eq(Operation::getProjectCode, project.getProjectCode())); | |||||
return BeanUtil.copyProperties(operation, OperationVO.class); | |||||
return CollUtils.convert(operations, w -> BeanUtil.copyProperties(w, OperationVO.class)); | |||||
} | } | ||||
public String pushOperation(OperationDTO operation) { | |||||
@Transactional(rollbackFor = Exception.class) | |||||
public String pushOperation(OperationReq req) { | |||||
UserInfoDetails user = LoginUserUtil.loginUserDetail(); | UserInfoDetails user = LoginUserUtil.loginUserDetail(); | ||||
Project project = projectService.getNewProject(operation.getProjectId()); | |||||
Project project = projectService.getNewProject(req.getProjectId()); | |||||
Assert.notNull(project, "项目不存在!"); | Assert.notNull(project, "项目不存在!"); | ||||
//首先要判断 项目当前状态 是不是 待开工状态 | //首先要判断 项目当前状态 是不是 待开工状态 | ||||
@@ -67,28 +70,23 @@ public class OperationManage { | |||||
!ProjectStatusEnum.PROJECT_APPROVED.eq(project.getStage())) | !ProjectStatusEnum.PROJECT_APPROVED.eq(project.getStage())) | ||||
.throwMessage("提交失败 该项目不是 待开工或者已立项阶段"); | .throwMessage("提交失败 该项目不是 待开工或者已立项阶段"); | ||||
Operation old = operationService.getOne(Wrappers.lambdaQuery(Operation.class) | |||||
Operation pre = operationService.getOne(Wrappers.lambdaQuery(Operation.class) | |||||
.eq(Operation::getProjectCode, project.getProjectCode()) | .eq(Operation::getProjectCode, project.getProjectCode()) | ||||
.eq(Operation::getBidId, req.getBidId()) | |||||
.last(BizConst.LIMIT_1)); | .last(BizConst.LIMIT_1)); | ||||
Operation entity = BeanUtil.copyProperties(operation, Operation.class); | |||||
if (Objects.nonNull(old)) { | |||||
entity.setId(old.getId()); | |||||
LocalDateTime now = LocalDateTime.now(); | |||||
Operation curr = BeanUtil.copyProperties(req, Operation.class); | |||||
if (Objects.nonNull(pre)) { | |||||
curr.setId(pre.getId()); | |||||
} else { | } else { | ||||
entity.setCreateOn(LocalDateTime.now()); | |||||
entity.setCreateBy(user.getUsername()); | |||||
curr.setCreateOn(now); | |||||
curr.setCreateBy(user.getUsername()); | |||||
} | } | ||||
entity.setProjectCode(project.getProjectCode()); | |||||
entity.setUpdateOn(LocalDateTime.now()); | |||||
entity.setUpdateBy(user.getUsername()); | |||||
//强制放入 计划终验时间 | |||||
entity.setFinalInspectionDate(project.getPlanAcceptanceTime()); | |||||
if (operationService.saveOrUpdate(entity)) { | |||||
stateMachineUtil.pass(project); | |||||
project.setUpdateOn(LocalDateTime.now()); | |||||
projectService.updateById(project); | |||||
} | |||||
return entity.getProjectCode(); | |||||
curr.setProjectCode(project.getProjectCode()); | |||||
curr.setUpdateOn(now); | |||||
curr.setUpdateBy(user.getUsername()); | |||||
operationService.saveOrUpdate(curr); | |||||
return curr.getProjectCode(); | |||||
} | } | ||||
} | } |
@@ -13,6 +13,8 @@ import com.hz.pm.api.common.util.ExcelExportStyle; | |||||
import com.hz.pm.api.projectdeclared.model.dto.DeclaredProjectExportDTO; | import com.hz.pm.api.projectdeclared.model.dto.DeclaredProjectExportDTO; | ||||
import com.hz.pm.api.projectdeclared.model.dto.PurchaseSaveDTO; | import com.hz.pm.api.projectdeclared.model.dto.PurchaseSaveDTO; | ||||
import com.hz.pm.api.projectdeclared.model.entity.Purchase; | import com.hz.pm.api.projectdeclared.model.entity.Purchase; | ||||
import com.hz.pm.api.projectdeclared.model.req.SubmitPurchaseNoticeReq; | |||||
import com.hz.pm.api.projectdeclared.model.req.SubmitPurchaseRecordReq; | |||||
import com.hz.pm.api.projectdeclared.model.vo.PurchaseVO; | import com.hz.pm.api.projectdeclared.model.vo.PurchaseVO; | ||||
import com.hz.pm.api.projectdeclared.service.IPurchaseService; | import com.hz.pm.api.projectdeclared.service.IPurchaseService; | ||||
import com.hz.pm.api.projectlib.helper.ProjectHelper; | import com.hz.pm.api.projectlib.helper.ProjectHelper; | ||||
@@ -23,6 +25,7 @@ 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; | ||||
import com.hz.pm.api.projectlib.service.IProjectService; | import com.hz.pm.api.projectlib.service.IProjectService; | ||||
import com.hz.pm.api.user.security.model.UserFullInfoDTO; | 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.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.function.VUtils; | ||||
@@ -215,4 +218,51 @@ public class PurchaseManage { | |||||
return "保存失败"; | return "保存失败"; | ||||
} | } | ||||
public void submitPurchaseNotice(SubmitPurchaseNoticeReq req) { | |||||
UserInfoDetails user = LoginUserUtil.loginUserDetail(); | |||||
Long projectId = req.getProjectId(); | |||||
Project project = projectService.getNewProject(projectId); | |||||
Assert.notNull(project, "提交失败 此项目不存在!"); | |||||
//首先要判断 项目当前状态 是不是 采购结果备案 | |||||
VUtils.isTrue(!ProjectStatusEnum.TO_BE_PURCHASED.eq(project.getStatus()) | |||||
|| !ProjectStatusEnum.PROJECT_APPROVED.eq(project.getStage())) | |||||
.throwMessage("提交失败,该项目不是待采购备案状态或者已立项阶段"); | |||||
Purchase purchase = new Purchase(); | |||||
purchase.setPurchaseMethod(req.getPurchaseMethod()); | |||||
purchase.setBizAddress(req.getBidAddress()); | |||||
purchase.setBidName(req.getBidName()); | |||||
purchase.setBizBudget(req.getBidBudget()); | |||||
purchase.setBidDoc(req.getBidDoc()); | |||||
purchase.setBidStartTime(req.getBidStartTime()); | |||||
purchase.setBidEndTime(req.getBidEndTime()); | |||||
purchase.setId(req.getBidId()); | |||||
purchase.setProjectId(projectId); | |||||
if (purchase.getId() == null) { | |||||
purchase.setCreateBy(user.getUserIdStr()); | |||||
} | |||||
purchaseService.saveOrUpdate(purchase); | |||||
} | |||||
public void submitPurchaseRecord(SubmitPurchaseRecordReq req) { | |||||
Long projectId = req.getProjectId(); | |||||
Project project = projectService.getNewProject(projectId); | |||||
Assert.notNull(project, "提交失败 此项目不存在!"); | |||||
//首先要判断 项目当前状态 是不是 采购结果备案 | |||||
VUtils.isTrue(!ProjectStatusEnum.TO_BE_PURCHASED.eq(project.getStatus()) | |||||
|| !ProjectStatusEnum.PROJECT_APPROVED.eq(project.getStage())) | |||||
.throwMessage("提交失败,该项目不是待采购备案状态或者已立项阶段"); | |||||
Purchase purchase = new Purchase(); | |||||
purchase.setId(req.getBidId()); | |||||
purchase.setAcceptanceLetter(req.getAcceptanceLetter()); | |||||
purchase.setBidBuildContent(req.getBidBuildContent()); | |||||
purchase.setBiddingDoc(req.getBiddingDoc()); | |||||
purchase.setSupplier(req.getSupplier()); | |||||
purchase.setSupplierSocialCreditCode(req.getSupplierSocialCreditCode()); | |||||
purchase.setBidType(req.getBidType()); | |||||
purchaseService.saveOrUpdate(purchase); | |||||
} | |||||
} | } |
@@ -2,24 +2,28 @@ package com.hz.pm.api.projectdeclared.model.dto; | |||||
import io.swagger.annotations.ApiModel; | import io.swagger.annotations.ApiModel; | ||||
import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.ApiModelProperty; | ||||
import lombok.AllArgsConstructor; | |||||
import lombok.Data; | import lombok.Data; | ||||
import lombok.NoArgsConstructor; | |||||
import javax.validation.constraints.NotNull; | import javax.validation.constraints.NotNull; | ||||
import java.time.LocalDateTime; | import java.time.LocalDateTime; | ||||
/** | /** | ||||
* @Classname OperationDTO | |||||
* @Description | |||||
* @Date 2023/5/29 10:00 | |||||
* @Author PoffyZhang | |||||
* <p> | |||||
* 实施计划参数类 | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 09:25 2024/2/23 | |||||
*/ | */ | ||||
@ApiModel(value = "实施对象DTO", description = "实施对象DTO") | |||||
@Data | @Data | ||||
@AllArgsConstructor | |||||
@NoArgsConstructor | |||||
public class OperationDTO { | |||||
@ApiModel(value = "实施对象DTO") | |||||
public class OperationReq { | |||||
@ApiModelProperty("实施计划ID") | |||||
private Long operationId; | |||||
@ApiModelProperty("标段ID") | |||||
private Long bidId; | |||||
@ApiModelProperty("项目ID") | @ApiModelProperty("项目ID") | ||||
@NotNull(message = "项目ID不能为空") | @NotNull(message = "项目ID不能为空") | ||||
@@ -41,6 +45,9 @@ public class OperationDTO { | |||||
private LocalDateTime finalInspectionDate; | private LocalDateTime finalInspectionDate; | ||||
@ApiModelProperty("开始实施时间") | @ApiModelProperty("开始实施时间") | ||||
@NotNull(message = "开始实施时间不能为空") | |||||
private LocalDateTime startTrialOperationDate; | private LocalDateTime startTrialOperationDate; | ||||
@ApiModelProperty("试运行开始时间") | |||||
private LocalDateTime pilotRunStartDate; | |||||
} | } |
@@ -70,4 +70,16 @@ public class Contract { | |||||
@ApiModelProperty("项目编号") | @ApiModelProperty("项目编号") | ||||
private String projectCode; | private String projectCode; | ||||
@ApiModelProperty("标段ID") | |||||
private Long bidId; | |||||
@ApiModelProperty("合同编号") | |||||
private String constructionNo; | |||||
@ApiModelProperty("供应商联系人") | |||||
private String supplierContact; | |||||
@ApiModelProperty("供应商联系方式") | |||||
private String supplierContactInfo; | |||||
} | } |
@@ -5,28 +5,33 @@ import com.baomidou.mybatisplus.annotation.TableId; | |||||
import com.baomidou.mybatisplus.annotation.TableName; | import com.baomidou.mybatisplus.annotation.TableName; | ||||
import io.swagger.annotations.ApiModel; | import io.swagger.annotations.ApiModel; | ||||
import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.ApiModelProperty; | ||||
import io.swagger.annotations.ApiOperation; | |||||
import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||
import lombok.Data; | import lombok.Data; | ||||
import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||
import java.time.LocalDateTime; | import java.time.LocalDateTime; | ||||
/** | /** | ||||
* @Classname Operation | |||||
* @Description | |||||
* @Date 2023/5/29 10:00 | |||||
* @Author PoffyZhang | |||||
* <p> | |||||
* Operation | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 09:36 2024/2/23 | |||||
*/ | */ | ||||
@TableName("nd_project_operation") | |||||
@ApiModel(value = "实施对象", description = "实施对象") | |||||
@Data | @Data | ||||
@AllArgsConstructor | |||||
@NoArgsConstructor | |||||
@TableName("nd_project_operation") | |||||
@ApiModel(value = "实施对象") | |||||
public class Operation { | public class Operation { | ||||
@TableId(type = IdType.AUTO) | @TableId(type = IdType.AUTO) | ||||
@ApiModelProperty("id") | @ApiModelProperty("id") | ||||
private Long id; | private Long id; | ||||
@ApiModelProperty("标段ID") | |||||
private Long bidId; | |||||
@ApiModelProperty("项目ID") | @ApiModelProperty("项目ID") | ||||
private Long projectId; | private Long projectId; | ||||
@@ -39,10 +44,10 @@ public class Operation { | |||||
@ApiModelProperty("修改时间") | @ApiModelProperty("修改时间") | ||||
private LocalDateTime updateOn; | private LocalDateTime updateOn; | ||||
@ApiModelProperty("创建人 工号") | |||||
@ApiModelProperty("创建人ID") | |||||
private String createBy; | private String createBy; | ||||
@ApiModelProperty("修改人 工号") | |||||
@ApiModelProperty("修改人ID") | |||||
private String updateBy; | private String updateBy; | ||||
@ApiModelProperty("项目开工时间") | @ApiModelProperty("项目开工时间") | ||||
@@ -56,4 +61,8 @@ public class Operation { | |||||
@ApiModelProperty("开始实施时间") | @ApiModelProperty("开始实施时间") | ||||
private LocalDateTime startTrialOperationDate; | private LocalDateTime startTrialOperationDate; | ||||
@ApiModelProperty("试运行开始时间") | |||||
private LocalDateTime pilotRunStartDate; | |||||
} | } |
@@ -50,12 +50,6 @@ public class Purchase { | |||||
@ApiModelProperty("供应商") | @ApiModelProperty("供应商") | ||||
private String supplier; | private String supplier; | ||||
@ApiModelProperty("供应商联系人") | |||||
private String supplierContact; | |||||
@ApiModelProperty("供应商联系方式") | |||||
private String supplierContactInfo; | |||||
@ApiModelProperty("供应商社会信用代码") | @ApiModelProperty("供应商社会信用代码") | ||||
private String supplierSocialCreditCode; | private String supplierSocialCreditCode; | ||||
@@ -71,18 +65,37 @@ public class Purchase { | |||||
@ApiModelProperty("代理机构") | @ApiModelProperty("代理机构") | ||||
private String agency; | private String agency; | ||||
@ApiModelProperty("代理机构社会统一信用代码") | |||||
private String purchaseSocialCreditCode; | |||||
@ApiModelProperty("标段类型") | |||||
private Integer bidType; | |||||
@ApiModelProperty("投标文件") | @ApiModelProperty("投标文件") | ||||
private String biddingDoc; | private String biddingDoc; | ||||
@ApiModelProperty("招标文件") | |||||
private String bidDoc; | |||||
@ApiModelProperty("中标通知书") | @ApiModelProperty("中标通知书") | ||||
private String acceptanceLetter; | private String acceptanceLetter; | ||||
@ApiModelProperty("标段建设内容") | |||||
private String bidBuildContent; | |||||
@ApiModelProperty("代理机构社会统一信用代码") | |||||
private String purchaseSocialCreditCode; | |||||
@ApiModelProperty("招标文件") | |||||
private String bidDoc; | |||||
@ApiModelProperty("预算执行确认书编号") | @ApiModelProperty("预算执行确认书编号") | ||||
private String budgetExecConfirmNo; | private String budgetExecConfirmNo; | ||||
@ApiModelProperty("投标地址") | |||||
private String bizAddress; | |||||
@ApiModelProperty("标项预算") | |||||
private BigDecimal bizBudget; | |||||
@ApiModelProperty("开标时间") | |||||
private LocalDateTime bidStartTime; | |||||
@ApiModelProperty("投标截止时间") | |||||
private LocalDateTime bidEndTime; | |||||
} | } |
@@ -9,7 +9,6 @@ import lombok.Data; | |||||
import java.math.BigDecimal; | import java.math.BigDecimal; | ||||
import java.time.LocalDateTime; | import java.time.LocalDateTime; | ||||
import java.util.List; | |||||
/** | /** | ||||
* @Classname Contract | * @Classname Contract | ||||
@@ -18,11 +17,9 @@ import java.util.List; | |||||
* @Author PoffyZhang | * @Author PoffyZhang | ||||
*/ | */ | ||||
@Data | @Data | ||||
@ApiModel(value = "ContractVO", description = "") | |||||
@ApiModel(value = "ContractVO") | |||||
public class ContractVO { | public class ContractVO { | ||||
private static final long serialVersionUID = 1L; | |||||
@ApiModelProperty("主键") | @ApiModelProperty("主键") | ||||
private Long id; | private Long id; | ||||
@@ -75,6 +72,16 @@ public class ContractVO { | |||||
@ApiModelProperty("项目编号") | @ApiModelProperty("项目编号") | ||||
private String projectCode; | private String projectCode; | ||||
@ApiModelProperty("支付计划") | |||||
private List<PaymentPlanVO> payments; | |||||
@ApiModelProperty("供应商联系人") | |||||
private String supplierContact; | |||||
@ApiModelProperty("供应商联系方式") | |||||
private String supplierContactInfo; | |||||
@ApiModelProperty("标段ID") | |||||
private Long bidId; | |||||
@ApiModelProperty("合同编号") | |||||
private String constructionNo; | |||||
} | } |
@@ -9,15 +9,15 @@ import lombok.NoArgsConstructor; | |||||
import java.time.LocalDateTime; | import java.time.LocalDateTime; | ||||
/** | /** | ||||
* @Classname Operation | |||||
* @Description | |||||
* @Date 2023/5/29 10:00 | |||||
* @Author PoffyZhang | |||||
* <p> | |||||
* OperationVO | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 09:28 2024/2/23 | |||||
*/ | */ | ||||
@ApiModel(value = "实施对象", description = "实施对象") | |||||
@Data | @Data | ||||
@AllArgsConstructor | |||||
@NoArgsConstructor | |||||
@ApiModel(value = "实施对象") | |||||
public class OperationVO { | public class OperationVO { | ||||
@ApiModelProperty("id") | @ApiModelProperty("id") | ||||
@@ -50,6 +50,13 @@ public class OperationVO { | |||||
@ApiModelProperty("终验时间") | @ApiModelProperty("终验时间") | ||||
private LocalDateTime finalInspectionDate; | private LocalDateTime finalInspectionDate; | ||||
@ApiModelProperty("标段ID") | |||||
private Long bidId; | |||||
@ApiModelProperty("试运行开始时间") | |||||
private LocalDateTime pilotRunStartDate; | |||||
@ApiModelProperty("开始实施时间") | @ApiModelProperty("开始实施时间") | ||||
private LocalDateTime startTrialOperationDate; | private LocalDateTime startTrialOperationDate; | ||||
} | } |
@@ -5,7 +5,6 @@ import cn.hutool.core.bean.copier.CopyOptions; | |||||
import cn.hutool.core.collection.CollUtil; | import cn.hutool.core.collection.CollUtil; | ||||
import cn.hutool.core.lang.Assert; | import cn.hutool.core.lang.Assert; | ||||
import cn.hutool.core.util.NumberUtil; | import cn.hutool.core.util.NumberUtil; | ||||
import cn.hutool.json.JSONUtil; | |||||
import com.alibaba.fastjson.JSONObject; | import com.alibaba.fastjson.JSONObject; | ||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | ||||
@@ -41,8 +40,12 @@ import com.hz.pm.api.portrait.model.entity.Tag; | |||||
import com.hz.pm.api.portrait.model.vo.TagVO; | import com.hz.pm.api.portrait.model.vo.TagVO; | ||||
import com.hz.pm.api.portrait.service.IProjectTagService; | import com.hz.pm.api.portrait.service.IProjectTagService; | ||||
import com.hz.pm.api.portrait.service.ITagService; | import com.hz.pm.api.portrait.service.ITagService; | ||||
import com.hz.pm.api.projectdeclared.manage.ConstructionManage; | |||||
import com.hz.pm.api.projectdeclared.model.dto.DelayedApplyDTO; | import com.hz.pm.api.projectdeclared.model.dto.DelayedApplyDTO; | ||||
import com.hz.pm.api.projectdeclared.model.entity.*; | |||||
import com.hz.pm.api.projectdeclared.model.entity.Operation; | |||||
import com.hz.pm.api.projectdeclared.model.entity.PaymentPlan; | |||||
import com.hz.pm.api.projectdeclared.model.entity.PreInsAcceptancePerson; | |||||
import com.hz.pm.api.projectdeclared.model.entity.Purchase; | |||||
import com.hz.pm.api.projectdeclared.model.vo.*; | import com.hz.pm.api.projectdeclared.model.vo.*; | ||||
import com.hz.pm.api.projectdeclared.service.*; | import com.hz.pm.api.projectdeclared.service.*; | ||||
import com.hz.pm.api.projectdeclared.utils.GenerateProjectCodeUtil; | import com.hz.pm.api.projectdeclared.utils.GenerateProjectCodeUtil; | ||||
@@ -94,7 +97,6 @@ import org.springframework.stereotype.Component; | |||||
import javax.servlet.http.HttpServletResponse; | import javax.servlet.http.HttpServletResponse; | ||||
import java.math.BigDecimal; | import java.math.BigDecimal; | ||||
import java.math.RoundingMode; | import java.math.RoundingMode; | ||||
import java.sql.Array; | |||||
import java.time.LocalDateTime; | import java.time.LocalDateTime; | ||||
import java.util.*; | import java.util.*; | ||||
import java.util.stream.Collectors; | import java.util.stream.Collectors; | ||||
@@ -139,6 +141,7 @@ public class ProjectLibManage { | |||||
private final TaskService taskService; | private final TaskService taskService; | ||||
private final UserInfoHelper userInfoHelper; | private final UserInfoHelper userInfoHelper; | ||||
private final IExpertReviewService expertReviewService; | private final IExpertReviewService expertReviewService; | ||||
private final ConstructionManage constructionManage; | |||||
public PageVo<ProjectLibListItemVO> projectLibList(ProjectListReq req) { | public PageVo<ProjectLibListItemVO> projectLibList(ProjectListReq req) { | ||||
LambdaQueryWrapper<Project> query = ProjectHelper.projectQuery(req); | LambdaQueryWrapper<Project> query = ProjectHelper.projectQuery(req); | ||||
@@ -689,17 +692,8 @@ public class ProjectLibManage { | |||||
vo.setPurchases(BeanUtil.copyToList(purchases, PurchaseVO.class)); | vo.setPurchases(BeanUtil.copyToList(purchases, PurchaseVO.class)); | ||||
//查询合同备案 | //查询合同备案 | ||||
Contract contract = contractService.getOne(Wrappers.lambdaQuery(Contract.class) | |||||
.eq(Contract::getProjectCode, projectInfo.getProjectCode()) | |||||
.last(BizConst.LIMIT_1)); | |||||
ContractVO contractVO = BeanUtil.copyProperties(contract, ContractVO.class); | |||||
vo.setContract(contractVO); | |||||
List<PaymentPlan> payments = paymentPlanService.list(Wrappers.lambdaQuery(PaymentPlan.class) | |||||
.eq(PaymentPlan::getProjectCode, projectInfo.getProjectCode()) | |||||
.orderByAsc(PaymentPlan::getPaymentTime)); | |||||
if (Objects.nonNull(contractVO)) { | |||||
contractVO.setPayments(convertPayments(payments, contractVO.getTotalAmount())); | |||||
} | |||||
List<ContractVO> contracts = constructionManage.detailContractByProjectId(projectInfo.getId()); | |||||
vo.setContract(contracts); | |||||
//查询实施信息 | //查询实施信息 | ||||
Operation operation = operationService.getOne(Wrappers.lambdaQuery(Operation.class) | Operation operation = operationService.getOne(Wrappers.lambdaQuery(Operation.class) | ||||
@@ -402,7 +402,7 @@ public class ProjectDetailVO { | |||||
private BigDecimal contractAmount; | private BigDecimal contractAmount; | ||||
@ApiModelProperty("合同信息") | @ApiModelProperty("合同信息") | ||||
private ContractVO contract; | |||||
private List<ContractVO> contract; | |||||
@ApiModelProperty("采购信息") | @ApiModelProperty("采购信息") | ||||
private List<PurchaseVO> purchases; | private List<PurchaseVO> purchases; | ||||