From 49c3ba90feb4f14fb2f0c911aadeb865bb07f26f Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期一, 01 六月 2026 13:59:42 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_新疆马铃薯pro' into dev_新疆马铃薯pro
---
src/main/java/com/ruoyi/approve/service/impl/ApprovalInstanceServiceImpl.java | 27 +++++++++++++++++++++++++--
1 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/src/main/java/com/ruoyi/approve/service/impl/ApprovalInstanceServiceImpl.java b/src/main/java/com/ruoyi/approve/service/impl/ApprovalInstanceServiceImpl.java
index 5c5e540..e0c7eae 100644
--- a/src/main/java/com/ruoyi/approve/service/impl/ApprovalInstanceServiceImpl.java
+++ b/src/main/java/com/ruoyi/approve/service/impl/ApprovalInstanceServiceImpl.java
@@ -105,6 +105,30 @@
}
records.forEach(vo -> {
vo.setBusinessName(TypeEnums.getLabelByValue(vo.getBusinessType()));
+
+ // 鏍规嵁涓氬姟绫诲瀷鏌ヨ瀵瑰簲鐨勫崟鍙�
+ if (vo.getBusinessType() != null && vo.getBusinessId() != null) {
+ if (TypeEnums.PURCHASE_APPROVAL.getCode().equals(vo.getBusinessType())) {
+ // 閲囪喘瀹℃壒 - 鏌ヨ閲囪喘鍗曞彿
+ PurchaseLedger purchaseLedger = purchaseLedgerMapper.selectById(vo.getBusinessId());
+ System.out.println("涓氬姟绫诲瀷锛�" + purchaseLedger.getPurchaseContractNumber());
+ if (purchaseLedger != null) {
+ vo.setPurchaseContractNumber(purchaseLedger.getPurchaseContractNumber());
+ }
+ } else if (TypeEnums.QUOTATION_APPROVAL.getCode().equals(vo.getBusinessType())) {
+ // 鎶ヤ环瀹℃壒 - 鏌ヨ鎶ヤ环鍗曞彿
+ SalesQuotation salesQuotation = salesQuotationMapper.selectById(vo.getBusinessId());
+ if (salesQuotation != null) {
+ vo.setQuotationNo(salesQuotation.getQuotationNo());
+ }
+ } else if (TypeEnums.SHIPPING_APPROVAL.getCode().equals(vo.getBusinessType())) {
+ // 鍙戣揣瀹℃壒 - 鏌ヨ鍙戣揣鍗曞彿
+ ShippingInfo shippingInfo = shippingInfoMapper.selectById(vo.getBusinessId());
+ if (shippingInfo != null) {
+ vo.setShippingNo(shippingInfo.getShippingNo());
+ }
+ }
+ }
});
Long currentUserId = SecurityUtils.getUserId();
@@ -658,8 +682,7 @@
private void handleShippingApprovalFinished(ApprovalInstance instance, String status) {
ShippingInfo shippingInfo = shippingInfoMapper.selectOne(
new LambdaQueryWrapper<ShippingInfo>()
- .eq(ShippingInfo::getId, instance.getTitle())
- .orderByDesc(ShippingInfo::getCreateTime)
+ .eq(ShippingInfo::getId, instance.getBusinessId())
.last("limit 1")
);
if (shippingInfo == null) {
--
Gitblit v1.9.3