From 25c7cdf3ea9c4e63f16bbb52ce40e28bc65dc87c Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期六, 13 九月 2025 11:08:50 +0800
Subject: [PATCH] 1

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

diff --git a/src/main/resources/mapper/BasCrnpMapper.xml b/src/main/resources/mapper/BasCrnpMapper.xml
index 50d9755..9ee2944 100644
--- a/src/main/resources/mapper/BasCrnpMapper.xml
+++ b/src/main/resources/mapper/BasCrnpMapper.xml
@@ -27,5 +27,26 @@
         <result column="tank_qty1" property="tankQty1" />
         <result column="origin" property="origin" />
     </resultMap>
+    <select id="getCrnLaneWayInfo" resultType="com.zy.asrs.entity.CrnLaneWayInfoDto">
+        select
+            crn.crn_no crnNo ,
+            crn.crn_sts crnSts,
+            case when crn.crn_err != 0 then 1 else 0 end as crnErr,
+            count(loc.loc_no) count,
+	        count(case when loc.loc_sts = 'F' then 1 end) stockQty,
+	        count(case when loc.loc_sts = 'D' then 1 end) emptyPalletQty,
+	        count(case when loc.loc_sts = 'O' then 1 end) emptySlotQty,
+	        count(case when loc.loc_sts != 'O' and loc.loc_sts != 'D' and loc.loc_sts != 'F' then 1 end) otherQty
+        from
+            asr_bas_crnp crn
+        left join asr_loc_mast loc on
+            crn.crn_no = loc.crn_no
+        group by
+            crn.crn_no,
+            crn.crn_sts,
+            crn.crn_err
+        order by
+            crn.crn_no
+    </select>
 
 </mapper>

--
Gitblit v1.9.1