From 1817a79605b464735014a00e762e715788229a4b Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期三, 01 四月 2026 11:41:14 +0800
Subject: [PATCH] #入库获取Row优化

---
 src/main/resources/mapper/WrkMastMapper.xml |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mapper/WrkMastMapper.xml b/src/main/resources/mapper/WrkMastMapper.xml
index 35186ad..0ea293f 100644
--- a/src/main/resources/mapper/WrkMastMapper.xml
+++ b/src/main/resources/mapper/WrkMastMapper.xml
@@ -39,4 +39,24 @@
         limit 0,1
     </select>
 
+    <select id="selectCrnTaskCountList" resultType="com.zy.asrs.domain.vo.WrkTaskCountVo">
+        select
+            crn_no as deviceNo,
+            count(1) as totalCount,
+            sum(case when io_type = #{inIoType} then 1 else 0 end) as inCount
+        from asr_wrk_mast
+        where crn_no is not null
+        group by crn_no
+    </select>
+
+    <select id="selectDualCrnTaskCountList" resultType="com.zy.asrs.domain.vo.WrkTaskCountVo">
+        select
+            dual_crn_no as deviceNo,
+            count(1) as totalCount,
+            sum(case when io_type = #{inIoType} then 1 else 0 end) as inCount
+        from asr_wrk_mast
+        where dual_crn_no is not null
+        group by dual_crn_no
+    </select>
+
 </mapper>

--
Gitblit v1.9.1