From f68d79d0ff6658795c19c2fd473fab9ff6f0640d Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期六, 14 三月 2026 13:53:12 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_宁夏_中盛建材' into dev_宁夏_中盛建材
---
src/main/resources/mapper/production/SalesLedgerProductionAccountingMapper.xml | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/src/main/resources/mapper/production/SalesLedgerProductionAccountingMapper.xml b/src/main/resources/mapper/production/SalesLedgerProductionAccountingMapper.xml
index 28501a6..d9ddde7 100644
--- a/src/main/resources/mapper/production/SalesLedgerProductionAccountingMapper.xml
+++ b/src/main/resources/mapper/production/SalesLedgerProductionAccountingMapper.xml
@@ -105,6 +105,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