From 4f5133a1aa9ae7842fa808be6d082a036e408f12 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期四, 02 七月 2026 17:09:20 +0800
Subject: [PATCH] 采购退货时,对应批次库存已被销售发货出去一批(比如销售发货时,选择的采购入库的批次库存,剩下38个,但采购退货时,可退货数量还是显示150个。)
---
src/main/java/com/ruoyi/sales/mapper/SalesLedgerProductMapper.java | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/src/main/java/com/ruoyi/sales/mapper/SalesLedgerProductMapper.java b/src/main/java/com/ruoyi/sales/mapper/SalesLedgerProductMapper.java
index e765f71..2615d19 100644
--- a/src/main/java/com/ruoyi/sales/mapper/SalesLedgerProductMapper.java
+++ b/src/main/java/com/ruoyi/sales/mapper/SalesLedgerProductMapper.java
@@ -4,11 +4,14 @@
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.config.MyBaseMapper;
import com.ruoyi.purchase.dto.ProcurementBusinessSummaryDto;
-import com.ruoyi.sales.dto.SalesLedgerProductDto;
+import com.ruoyi.sales.dto.LossProductModelDto;
import com.ruoyi.sales.pojo.SalesLedgerProduct;
import org.apache.ibatis.annotations.Param;
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
import java.util.List;
+import java.util.Map;
/**
* 浜у搧淇℃伅Mapper鎺ュ彛
@@ -17,13 +20,21 @@
* @date 2025-05-08
*/
public interface SalesLedgerProductMapper extends MyBaseMapper<SalesLedgerProduct> {
+ List<SalesLedgerProduct> selectProduct();
+
List<SalesLedgerProduct> selectSalesLedgerProductList(@Param("salesLedgerProduct") SalesLedgerProduct salesLedgerProduct);
SalesLedgerProduct selectSalesLedgerProductByMainId(@Param("productMainId") Long productMainId);
- IPage<SalesLedgerProductDto> listPage(Page page, @Param("req") SalesLedgerProductDto salesLedgerProduct);
+ IPage<ProcurementBusinessSummaryDto> procurementBusinessSummaryListPage(Page page, @Param("req") ProcurementBusinessSummaryDto procurementBusinessSummaryDto);
- IPage<SalesLedgerProductDto> listPagePurchaseLedger(Page page,@Param("req") SalesLedgerProductDto salesLedgerProduct);
+ List<LossProductModelDto> selectProductBomStructure(@Param("salesLedegerId") Long salesLedegerId);
- IPage<ProcurementBusinessSummaryDto> procurementBusinessSummaryListPage(Page page,@Param("req") ProcurementBusinessSummaryDto procurementBusinessSummaryDto);
+ List<Map<String, Object>> selectProductSalesAnalysis();
+
+ List<Map<String, Object>> selectRawMaterialPurchaseAnalysis();
+
+ int selectProductCountByTypeAndDate(@Param("type") Integer type, @Param("startDate") LocalDateTime startDate, @Param("endDate") LocalDateTime endDate);
+
+ BigDecimal selectRawMaterialExpense();
}
--
Gitblit v1.9.3