From 959e5318189e66ad58d07c5bb94789c815b4d2e9 Mon Sep 17 00:00:00 2001
From: zhangherong <571457620@qq.com>
Date: 星期六, 16 八月 2025 11:42:37 +0800
Subject: [PATCH] art: WebService服务端相关代码修改

---
 src/main/java/org/jeecg/modules/andon/mapper/xml/AndonButtonConfigMapper.xml |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/src/main/java/org/jeecg/modules/andon/mapper/xml/AndonButtonConfigMapper.xml b/src/main/java/org/jeecg/modules/andon/mapper/xml/AndonButtonConfigMapper.xml
index ec55989..128f32a 100644
--- a/src/main/java/org/jeecg/modules/andon/mapper/xml/AndonButtonConfigMapper.xml
+++ b/src/main/java/org/jeecg/modules/andon/mapper/xml/AndonButtonConfigMapper.xml
@@ -4,4 +4,24 @@
     <select id="getAndonButtonById" resultType="org.jeecg.modules.andon.entity.AndonButtonConfig">
         SELECT * FROM andon_button_config WHERE id = #{id} and del_flag = 0 and button_status = '鍚敤'
     </select>
+    <select id="queryUserAndonButtonList" resultType="org.jeecg.modules.andon.dto.AndonButtonDTO">
+        select arc.id,
+               abc.id as button_id,
+               abc.button_name,
+               abc.button_code,
+               (select count(1)
+                from andon_order ao
+                where ao.button_id = arc.button_id
+                  and ao.factory_id = arc.factory_id
+                  and ao.order_status != '3') as blinking_flag,
+            STUFF((SELECT ',' + CAST(ao.id AS VARCHAR)
+            FROM andon_order ao
+            WHERE ao.button_id = arc.button_id
+            and ao.factory_id = arc.factory_id
+            FOR XML PATH('')), 1, 1, '') as order_ids
+        from andon_response_config arc
+            left join andon_button_config abc
+        on arc.button_id = abc.id
+        where arc.factory_id=#{factoryId};
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3