From 47200ddd17698ae4afefd0d25c6b1b9551bcf14f Mon Sep 17 00:00:00 2001
From: maven <2163098428@qq.com>
Date: 星期二, 10 三月 2026 11:11:00 +0800
Subject: [PATCH] yys 1.工资计算修改

---
 src/main/resources/mapper/production/SalesLedgerProductionAccountingMapper.xml |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/main/resources/mapper/production/SalesLedgerProductionAccountingMapper.xml b/src/main/resources/mapper/production/SalesLedgerProductionAccountingMapper.xml
index 38cb14e..68308af 100644
--- a/src/main/resources/mapper/production/SalesLedgerProductionAccountingMapper.xml
+++ b/src/main/resources/mapper/production/SalesLedgerProductionAccountingMapper.xml
@@ -12,22 +12,21 @@
         t4.finished_num,
         t4.work_hours,
         t4.process,
-        t3.product_name as productCategory,
-        t2.model as specificationModel,
-        t2.unit
+        t3.product_category,
+        t3.specification_model,
+        t3.unit
         FROM
         sales_ledger_production_accounting t4
-        left join product_model t2 on t2.id = t4.sales_ledger_product_id
-        left join product t3 on t3.id = t2.product_id
+        left join sales_ledger_product t3 on t4.sales_ledger_product_id = t3.id and t3.type = 3
         <where>
             <if test="salesLedgerDto.schedulingUserName != null and salesLedgerDto.schedulingUserName != '' ">
-                AND  t4.scheduling_user_name LIKE CONCAT('%',#{salesLedgerDto.schedulingUserName},'%')
+                AND t4.scheduling_user_name LIKE CONCAT('%',#{salesLedgerDto.schedulingUserName},'%')
             </if>
             <if test="salesLedgerDto.entryDateStart != null and salesLedgerDto.entryDateStart != '' ">
                 AND t4.scheduling_date &gt;= DATE_FORMAT(#{salesLedgerDto.entryDateStart},'%Y-%m-%d')
             </if>
             <if test="salesLedgerDto.entryDateEnd != null and salesLedgerDto.entryDateEnd != '' ">
-                AND  t4.scheduling_date &lt;= DATE_FORMAT(#{salesLedgerDto.entryDateEnd},'%Y-%m-%d')
+                AND t4.scheduling_date &lt;= DATE_FORMAT(#{salesLedgerDto.entryDateEnd},'%Y-%m-%d')
             </if>
         </where>
         group by t4.id

--
Gitblit v1.9.3