From fd60ef9d3c3d7c1eee9a6fb458fe4084463b5b81 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期二, 26 五月 2026 10:42:41 +0800
Subject: [PATCH] refactor(account): 重构财务模块DTO包结构并添加总账科目功能
---
src/main/resources/mapper/production/SalesLedgerProductionAccountingMapper.xml | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/src/main/resources/mapper/production/SalesLedgerProductionAccountingMapper.xml b/src/main/resources/mapper/production/SalesLedgerProductionAccountingMapper.xml
index 28501a6..8a32b42 100644
--- a/src/main/resources/mapper/production/SalesLedgerProductionAccountingMapper.xml
+++ b/src/main/resources/mapper/production/SalesLedgerProductionAccountingMapper.xml
@@ -84,8 +84,7 @@
</if>
</where>
- GROUP BY slpa.scheduling_user_name
-
+ GROUP BY slpa.scheduling_user_id, slpa.scheduling_user_name
</select>
<select id="selectDailyWagesStats" resultType="java.util.Map">
@@ -105,6 +104,19 @@
GROUP BY DATE(ppout.create_time)
ORDER BY DATE(ppout.create_time);
</select>
+ <select id="getByUserId" resultType="com.ruoyi.production.dto.UserAccountDto">
+ select
+ slpa.scheduling_user_id as user_id,
+ pp.type,
+ sum(case when pp.type = 0 then slpa.work_hours else 0 end) as account,
+ sum(case when pp.type = 1 then slpa.work_hours else 0 end) as accountBalance
+ from sales_ledger_production_accounting slpa
+ left join product_process pp on pp.name = slpa.process
+ where slpa.scheduling_user_id = #{ew.userId}
+ and slpa.scheduling_date like concat(#{ew.date}, '%')
+ group by slpa.scheduling_user_id
+
+ </select>
</mapper>
--
Gitblit v1.9.3