From 00083c26fde57c0165427ae4cc712d24596fdbc6 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期四, 21 五月 2026 11:09:46 +0800
Subject: [PATCH] refactor(purchase): 删除payment_registration 付款登记 invoice_purchase 发票信息 ticket_registration 来票登记 receipt_payment 回款登记 product_record 采购台账开票记录
---
src/main/java/com/ruoyi/ai/service/PurchaseAiService.java | 24 ++----------------------
1 files changed, 2 insertions(+), 22 deletions(-)
diff --git a/src/main/java/com/ruoyi/ai/service/PurchaseAiService.java b/src/main/java/com/ruoyi/ai/service/PurchaseAiService.java
index 0f24d64..47c914b 100644
--- a/src/main/java/com/ruoyi/ai/service/PurchaseAiService.java
+++ b/src/main/java/com/ruoyi/ai/service/PurchaseAiService.java
@@ -20,8 +20,6 @@
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.purchase.dto.PurchaseLedgerDto;
import com.ruoyi.purchase.dto.PurchaseReturnOrderDto;
-import com.ruoyi.purchase.pojo.PaymentRegistration;
-import com.ruoyi.purchase.service.IPaymentRegistrationService;
import com.ruoyi.purchase.service.IPurchaseLedgerService;
import com.ruoyi.purchase.service.PurchaseReturnOrdersService;
import com.ruoyi.sales.pojo.SalesLedgerProduct;
@@ -48,7 +46,6 @@
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Base64;
-import java.util.Arrays;
import java.time.LocalDate;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
@@ -80,7 +77,6 @@
private final AiFileTextExtractor aiFileTextExtractor;
private final ObjectMapper objectMapper;
private final IPurchaseLedgerService purchaseLedgerService;
- private final IPaymentRegistrationService paymentRegistrationService;
private final PurchaseReturnOrdersService purchaseReturnOrdersService;
private final StorageBlobService storageBlobService;
private final SupplierManageMapper supplierManageMapper;
@@ -94,7 +90,6 @@
AiFileTextExtractor aiFileTextExtractor,
ObjectMapper objectMapper,
IPurchaseLedgerService purchaseLedgerService,
- IPaymentRegistrationService paymentRegistrationService,
PurchaseReturnOrdersService purchaseReturnOrdersService,
StorageBlobService storageBlobService,
SupplierManageMapper supplierManageMapper,
@@ -107,7 +102,6 @@
this.aiFileTextExtractor = aiFileTextExtractor;
this.objectMapper = objectMapper;
this.purchaseLedgerService = purchaseLedgerService;
- this.paymentRegistrationService = paymentRegistrationService;
this.purchaseReturnOrdersService = purchaseReturnOrdersService;
this.storageBlobService = storageBlobService;
this.supplierManageMapper = supplierManageMapper;
@@ -221,7 +215,6 @@
String businessType = request.getBusinessType().trim();
return switch (businessType) {
case "purchase_ledger" -> processPurchaseLedger(request.getPayload());
- case "payment_registration" -> processPaymentRegistration(request.getPayload());
case "purchase_return_order" -> processPurchaseReturnOrder(request.getPayload());
default -> AjaxResult.error("鏆備笉鏀寔璇ヤ笟鍔$被鍨�: " + businessType);
};
@@ -482,7 +475,7 @@
1. 鍙緭鍑哄悎娉� JSON锛屼笉瑕� Markdown锛屼笉瑕侀澶栬В閲娿��
2. JSON 椤跺眰瀛楁鍥哄畾涓�:
- success: boolean
- - businessType: purchase_ledger | payment_registration | purchase_return_order | unknown
+ - businessType: purchase_ledger | purchase_return_order | unknown
- action: confirm_required
- description: 涓枃璇存槑
- confidence: 0鍒�1鐨勫皬鏁�
@@ -507,7 +500,7 @@
entryDateStart, entryDateEnd, id, purchaseContractNumber, supplierId, supplierName, isWhite, recorderId, recorderName, salesContractNo, salesContractNoId, projectName, entryDate, executionDate, remarks, attachmentMaterials, createdAt, updatedAt, salesLedgerId, hasChildren, Type, productData, tempFileIds, SalesLedgerFiles, phoneNumber, businessPersonId, productId, productModelId, invoiceNumber, invoiceAmount, ticketRegistrationId, contractAmount, receiptPaymentAmount, unReceiptPaymentAmount, type, paymentMethod, approvalStatus, templateName
- productData 姣忔潯浜у搧鍙娇鐢ㄨ繖浜� SalesLedgerProduct 瀛楁鍚�:
productCategory, specificationModel, unit, quantity, taxRate, taxInclusiveUnitPrice, taxInclusiveTotalPrice, taxExclusiveTotalPrice, invoiceType, productId, productModelId, isChecked, type
- 4. 濡傛灉鍙垽鏂负浠樻鐧昏锛宐usinessType 浣跨敤 payment_registration锛宲ayload.records 涓轰粯娆剧櫥璁版暟缁勶紝瀛楁灏介噺鍖呭惈 purchaseLedgerId銆乻alesLedgerProductId銆乧urrentPaymentAmount銆乸aymentMethod銆乸aymentDate銆�
+ 4. 濡傛灉鍙垽鏂负浠樻鐧昏锛宐usinessType 浣跨敤 payload.records 涓轰粯娆剧櫥璁版暟缁勶紝瀛楁灏介噺鍖呭惈 purchaseLedgerId銆乻alesLedgerProductId銆乧urrentPaymentAmount銆乸aymentMethod銆乸aymentDate銆�
5. 濡傛灉鍙垽鏂负閲囪喘閫�璐э紝businessType 浣跨敤 purchase_return_order锛宲ayload 鎸� PurchaseReturnOrderDto 缁勭粐锛屾槑缁嗘斁 purchaseReturnOrderProductsDtos銆�
6. 缂哄皯涓氬姟澶勭悊蹇呴』瀛楁鏃讹紝涓嶈缂栭�� ID锛屾妸瀛楁鏀惧叆 missingFields锛屽苟浠嶈繑鍥炲彲纭鐨勮崏绋挎暟鎹��
7. 鎵�鏈変腑鏂囧唴瀹圭洿鎺ヤ繚鐣欙紝涓嶈杞箟鎴� Unicode銆�
@@ -1008,19 +1001,6 @@
}
dto.setSupplierId(supplier.getId());
return null;
- }
-
- private AjaxResult processPaymentRegistration(Map<String, Object> payload) {
- Object recordsValue = payload.get("records");
- List<PaymentRegistration> records;
- if (recordsValue == null) {
- records = Collections.singletonList(objectMapper.convertValue(payload, PaymentRegistration.class));
- } else {
- records = objectMapper.convertValue(recordsValue, new TypeReference<List<PaymentRegistration>>() {
- });
- }
- int result = paymentRegistrationService.insertPaymentRegistration(records);
- return AjaxResult.success("浠樻鐧昏宸插鐞�", result);
}
private AjaxResult processPurchaseReturnOrder(Map<String, Object> payload) {
--
Gitblit v1.9.3