From b2bfc3c8c094d7b46f1e41fc75b26221ce945dab Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期二, 21 四月 2026 16:04:57 +0800
Subject: [PATCH] feat(technology): 添加工艺路线查询功能并完善相关接口
---
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