From 45847670fea5d7354c2bfb4b53a321887271dcd4 Mon Sep 17 00:00:00 2001
From: shiyunteng <shiyunteng@example.com>
Date: 星期四, 11 六月 2026 17:26:00 +0800
Subject: [PATCH] feat:产品页面体验优化
---
platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/ContractInvoiceServiceImpl.java | 39 +++++++++++++++++++++++++++------------
1 files changed, 27 insertions(+), 12 deletions(-)
diff --git a/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/ContractInvoiceServiceImpl.java b/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/ContractInvoiceServiceImpl.java
index 328c86d..b3e084a 100644
--- a/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/ContractInvoiceServiceImpl.java
+++ b/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/ContractInvoiceServiceImpl.java
@@ -117,7 +117,7 @@
private GenInvoiceInfoVo genInvoiceInfoVo(GenInvoiceInfoDTO genInvoiceInfoDTO, Contract contract, SysDept b) {
GenInvoiceInfoVo vo = new GenInvoiceInfoVo();
BusinessCustomer a = businessCustomerMapper.selectById(contract.getPartyAId());
- vo.setPartyA(a.getCompanyName());
+ vo.setPartyA(a.getRegisterName());
vo.setPartyAOrgCode(a.getCreditCode());
vo.setPartyAOpenBank(a.getBankName());
vo.setPartyABankAccount(a.getBankAccount());
@@ -627,10 +627,14 @@
}
}
}
- //鏇存柊鍚堝悓寮�绁ㄧ姸鎬�
- contract.setBillingStatus("2");
- contract.setBillingAmout(contract.getAmount().subtract(invoice.getInvoiceTotalPriceTax()));
- contractMapper.updateById(contract);
+ //鏇存柊鍚堝悓寮�绁ㄧ姸鎬� 鍓嶆彁鍑哄簱瀹屾垚
+ if (StrUtil.equals(contract.getBillingStatus(),"3")) {
+ contract.setBillingStatus("2");
+ contract.setBillingAmout(contract.getBillingAmout().subtract(invoice.getInvoiceTotalPriceTax()));
+ contractMapper.updateById(contract);
+ }
+ blueInvoice.setRedReversal("1");
+ baseMapper.updateById(blueInvoice);
//鏇存柊鍚堝悓鍑哄簱鍗曠姸鎬�
List<ContractOutBoundInvoiceVo> outBoundInvoiceVoList = BeanUtil.copyToList(JSONArray.parseArray(blueInvoice.getInvoicePreviewParam()),ContractOutBoundInvoiceVo.class);
@@ -649,14 +653,25 @@
@Override
public void refuseApproval(Long id) {
ContractInvoice invoice = baseMapper.selectById(id);
- //鏇存柊鍚堝悓鍑哄簱鍗曠姸鎬�
- String[] outBoundIds = invoice.getOutBoundId().split(",");
- Arrays.stream(outBoundIds).forEach(outBoundId -> {
- ContractOutBound bound = contractOutBoundMapper.selectById(outBoundId);
- bound.setInvoiceStatus("0");
- contractOutBoundMapper.updateById(bound);
- });
invoice.setApprovalStatus("2");
baseMapper.updateById(invoice);
+ //钃濈エ
+ if (invoice.getInvoiceCategory().equals("1")) {
+ //鏇存柊鍚堝悓鍑哄簱鍗曠姸鎬�
+ List<ContractOutBoundInvoiceVo> outBoundInvoiceVoList = BeanUtil.copyToList(JSONArray.parseArray(invoice.getInvoicePreviewParam()),ContractOutBoundInvoiceVo.class);
+ if (ArrayUtil.isNotEmpty(outBoundInvoiceVoList.toArray())){
+ outBoundInvoiceVoList.stream().forEach(contractOutBoundInvoiceVo -> {
+ ContractOutBound contractOutBound = contractOutBoundMapper.selectById(contractOutBoundInvoiceVo.getContractOutBoundId());
+ contractOutBound.setInvoiceNum(contractOutBound.getInvoiceNum().subtract(contractOutBoundInvoiceVo.getInvoiceNum()));
+ contractOutBoundMapper.updateById(contractOutBound);
+ });
+ }
+ }
+ //绾㈢エ
+ if (invoice.getInvoiceCategory().equals("2")) {
+ ContractInvoice blueInvoice = baseMapper.selectById(invoice.getBlueInvoiceId());
+ blueInvoice.setRedReversal("0");
+ baseMapper.updateById(blueInvoice);
+ }
}
}
--
Gitblit v1.9.1