|
@@ -223,6 +223,9 @@ public class PurchContractApprovalServiceImpl extends ServiceImpl<PurchContractA
|
|
//获取合同补充信息
|
|
//获取合同补充信息
|
|
PurchContractReplenishInfo replenishInfo = purchContractReplenishInfoService
|
|
PurchContractReplenishInfo replenishInfo = purchContractReplenishInfoService
|
|
.lambdaQuery().eq(PurchContractReplenishInfo::getPurchContractApprovalId, purchContractApproval.getId()).one();
|
|
.lambdaQuery().eq(PurchContractReplenishInfo::getPurchContractApprovalId, purchContractApproval.getId()).one();
|
|
|
|
+ if (replenishInfo == null){
|
|
|
|
+ replenishInfo = new PurchContractReplenishInfo();
|
|
|
|
+ }
|
|
replenishInfo.setContractName(purchContractBasicInfo.getContractName());
|
|
replenishInfo.setContractName(purchContractBasicInfo.getContractName());
|
|
replenishInfo.setContractNumber(purchContractBasicInfo.getContractNumber());
|
|
replenishInfo.setContractNumber(purchContractBasicInfo.getContractNumber());
|
|
purchContractApprovalVo.setPurchContractReplenishInfo(replenishInfo);
|
|
purchContractApprovalVo.setPurchContractReplenishInfo(replenishInfo);
|
|
@@ -355,33 +358,21 @@ public class PurchContractApprovalServiceImpl extends ServiceImpl<PurchContractA
|
|
//获取质量与验收
|
|
//获取质量与验收
|
|
PurchContractQualityAccept qualityAccept = purchContractQualityAcceptService
|
|
PurchContractQualityAccept qualityAccept = purchContractQualityAcceptService
|
|
.lambdaQuery().eq(PurchContractQualityAccept::getPurchContractApprovalId, purchContractApproval.getId()).one();
|
|
.lambdaQuery().eq(PurchContractQualityAccept::getPurchContractApprovalId, purchContractApproval.getId()).one();
|
|
- if (qualityAccept == null){
|
|
|
|
- qualityAccept = new PurchContractQualityAccept();
|
|
|
|
- }
|
|
|
|
purchContractApprovalVo.setPurchContractQualityAccept(qualityAccept);
|
|
purchContractApprovalVo.setPurchContractQualityAccept(qualityAccept);
|
|
|
|
|
|
//结算与付款
|
|
//结算与付款
|
|
PurchContractApprovalSettlePayment approvalSettlePayment = approvalSettlePaymentService.lambdaQuery()
|
|
PurchContractApprovalSettlePayment approvalSettlePayment = approvalSettlePaymentService.lambdaQuery()
|
|
.eq(PurchContractApprovalSettlePayment::getPurchContractApprovalId, purchContractApproval.getId()).one();
|
|
.eq(PurchContractApprovalSettlePayment::getPurchContractApprovalId, purchContractApproval.getId()).one();
|
|
- if (approvalSettlePayment == null){
|
|
|
|
- approvalSettlePayment = new PurchContractApprovalSettlePayment();
|
|
|
|
- }
|
|
|
|
purchContractApprovalVo.setApprovalSettlePayment(approvalSettlePayment);
|
|
purchContractApprovalVo.setApprovalSettlePayment(approvalSettlePayment);
|
|
|
|
|
|
//获取交货规定
|
|
//获取交货规定
|
|
PurchContractDeliverClause deliverClause = purchContractDeliverClauseService
|
|
PurchContractDeliverClause deliverClause = purchContractDeliverClauseService
|
|
.lambdaQuery().eq(PurchContractDeliverClause::getPurchContractApprovalId, purchContractApproval.getId()).one();
|
|
.lambdaQuery().eq(PurchContractDeliverClause::getPurchContractApprovalId, purchContractApproval.getId()).one();
|
|
- if (deliverClause == null){
|
|
|
|
- deliverClause = new PurchContractDeliverClause();
|
|
|
|
- }
|
|
|
|
purchContractApprovalVo.setPurchContractDeliverClause(deliverClause);
|
|
purchContractApprovalVo.setPurchContractDeliverClause(deliverClause);
|
|
|
|
|
|
//获取结算
|
|
//获取结算
|
|
PurchContractApprovalSettleCycle settleCycle = approvalSettleCycleService.lambdaQuery()
|
|
PurchContractApprovalSettleCycle settleCycle = approvalSettleCycleService.lambdaQuery()
|
|
.eq(PurchContractApprovalSettleCycle::getPurchContractApprovalId, purchContractApproval.getId()).one();
|
|
.eq(PurchContractApprovalSettleCycle::getPurchContractApprovalId, purchContractApproval.getId()).one();
|
|
- if (settleCycle == null){
|
|
|
|
- settleCycle = new PurchContractApprovalSettleCycle();
|
|
|
|
- }
|
|
|
|
purchContractApprovalVo.setApprovalSettleCycle(settleCycle);
|
|
purchContractApprovalVo.setApprovalSettleCycle(settleCycle);
|
|
|
|
|
|
//获取需方收货人
|
|
//获取需方收货人
|
|
@@ -403,17 +394,11 @@ public class PurchContractApprovalServiceImpl extends ServiceImpl<PurchContractA
|
|
//增值税要求
|
|
//增值税要求
|
|
PurchContractApprovalVatInfo approvalVatInfo = approvalVatInfoService.lambdaQuery()
|
|
PurchContractApprovalVatInfo approvalVatInfo = approvalVatInfoService.lambdaQuery()
|
|
.eq(PurchContractApprovalVatInfo::getPurchContractApprovalId, purchContractApproval.getId()).one();
|
|
.eq(PurchContractApprovalVatInfo::getPurchContractApprovalId, purchContractApproval.getId()).one();
|
|
- if (approvalVatInfo == null){
|
|
|
|
- approvalVatInfo = new PurchContractApprovalVatInfo();
|
|
|
|
- }
|
|
|
|
purchContractApprovalVo.setApprovalVatInfo(approvalVatInfo);
|
|
purchContractApprovalVo.setApprovalVatInfo(approvalVatInfo);
|
|
|
|
|
|
//获取其他条款
|
|
//获取其他条款
|
|
List<PurchContractOtherClause> otherClauseList = purchContractOtherClauseService
|
|
List<PurchContractOtherClause> otherClauseList = purchContractOtherClauseService
|
|
.lambdaQuery().eq(PurchContractOtherClause::getPurchcontractApprovalId, purchContractApproval.getId()).list();
|
|
.lambdaQuery().eq(PurchContractOtherClause::getPurchcontractApprovalId, purchContractApproval.getId()).list();
|
|
- if (CollectionUtil.isEmpty(otherClauseList)){
|
|
|
|
- otherClauseList = new ArrayList<>();
|
|
|
|
- }
|
|
|
|
purchContractApprovalVo.setPurchContractOtherClause(otherClauseList);
|
|
purchContractApprovalVo.setPurchContractOtherClause(otherClauseList);
|
|
|
|
|
|
|
|
|