From 0368c0b26c52b032e3ef86b3fda548d34fbfa4f7 Mon Sep 17 00:00:00 2001
From: ZY <zc857179121@qq.com>
Date: 星期日, 27 四月 2025 14:28:21 +0800
Subject: [PATCH] 1

---
 src/main/java/com/zy/asrs/mapper/AgvLocDetlMapper.java |   20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/zy/asrs/mapper/AgvLocDetlMapper.java b/src/main/java/com/zy/asrs/mapper/AgvLocDetlMapper.java
index 2cd3647..c6f41fe 100644
--- a/src/main/java/com/zy/asrs/mapper/AgvLocDetlMapper.java
+++ b/src/main/java/com/zy/asrs/mapper/AgvLocDetlMapper.java
@@ -16,18 +16,30 @@
 @Repository
 public interface AgvLocDetlMapper extends BaseMapper<AgvLocDetl> {
 
+    @Update("update agv_loc_detl set loc_no = '${targetLoc}' ,appe_user = '${userId}' where loc_no = '${sourceLoc}' ")
+    void updateStock2(@Param("sourceLoc")String sourceLoc, @Param("targetLoc")String targetLoc, @Param("userId")Long userId);
+
     @Update("update agv_loc_detl set loc_no = '${targetLoc}' where loc_no = '${sourceLoc}' ")
     void updateStock(@Param("sourceLoc")String sourceLoc, @Param("targetLoc")String targetLoc);
 
     List<AgvLocDetl> getStockStatis1(Map<String, Object> map);
+
 
     Integer getStockStatisCount(Map<String, Object> map);
 
     @Select("select sum(a.anfme) as sum from agv_loc_detl a left join agv_loc_mast b on a.loc_no = b.loc_no where b.loc_sts = 'F' and a.matnr = #{matnr} AND a.three_code = #{threeCode}")
     Double selectSumAnfmeByMatnr(@Param("matnr") String matnr,@Param("threeCode") String threeCode);
 
+    @Select("select sum(a.anfme) as sum from agv_loc_detl a left join agv_loc_mast b on a.loc_no = b.loc_no where b.loc_sts = 'F' and a.matnr = #{matnr} AND a.three_code = #{threeCode} AND b.floor != 1")
+    Double selectSumAnfmeByMatnr2(@Param("matnr") String matnr,@Param("threeCode") String threeCode);
+
+
     @Select("select * from agv_loc_detl where 1=1 and loc_no = #{locNo} and matnr = #{matnr} and three_code = #{csocode}")
     AgvLocDetl selectItemByOrderNo(@Param("locNo")String locNo, @Param("matnr")String matnr, @Param("batch")String batch, @Param("csocode")String csocode, @Param("isocode")String isocode);
+
+    @Select("select * from agv_loc_detl where 1=1 and loc_no = #{locNo} and matnr = #{matnr} and three_code = #{csocode}")
+    List<AgvLocDetl> selectItemByOrderNo2(@Param("locNo")String locNo, @Param("matnr")String matnr, @Param("batch")String batch, @Param("csocode")String csocode, @Param("isocode")String isocode);
+
 
     @Select("select sum(a.anfme) as sum from agv_loc_detl a left join agv_loc_mast b on a.loc_no = b.loc_no where b.loc_sts = 'F' and a.matnr = #{matnr} AND a.three_code = #{threeCode} AND a.process_sts = 1")
     Double selectSumAnfmeByMatnrProcess(@Param("matnr") String matnr,@Param("threeCode") String threeCode);
@@ -39,8 +51,12 @@
     Double selectSumAnfmeByMatnrProcessed2(@Param("matnr") String matnr,@Param("threeCode") String threeCode);
 
 
-    @Select("select sum(a.anfme) as sum from agv_loc_detl a left join agv_loc_mast b on a.loc_no = b.loc_no where (b.loc_sts = 'F' or b.loc_sts = 'R') and b.floor = #{floor} and a.matnr = #{matnr} AND a.three_code = #{threeCode} AND a.process_sts != 1")
-    Double selectSumAnfmeByMatnr2(@Param("matnr") String matnr,@Param("threeCode") String threeCode,@Param("floor") Integer floor);
+    @Select("select sum(a.anfme) as sum from agv_loc_detl a left join agv_loc_mast b on a.loc_no = b.loc_no where  b.floor = 1 AND a.matnr = #{matnr} AND a.three_code = #{threeCode} AND a.process_sts != 1 AND (b.loc_sts = 'F' or b.loc_sts = 'R')")
+    Double selectSumAnfmeByMatnr22(@Param("matnr") String matnr,@Param("threeCode") String threeCode,@Param("floor") Integer floor);
+
+    @Select("select sum(a.anfme) as sum from agv_loc_detl a left join agv_loc_mast b on a.loc_no = b.loc_no where (b.loc_sts = 'F' or b.loc_sts = 'R') AND b.floor != 2  AND a.matnr = #{matnr} AND a.three_code = #{threeCode} AND a.process_sts != 1")
+    Double selectSumAnfmeByMatnr3(@Param("matnr") String matnr,@Param("threeCode") String threeCode,@Param("floor") Integer floor);
+
 
     @Select("select sum(a.anfme) as sum from agv_loc_detl a left join agv_loc_mast b on a.loc_no = b.loc_no where (b.loc_sts = 'F' or b.loc_sts = 'R') and b.floor != #{floor} and a.matnr = #{matnr} AND a.three_code = #{threeCode} AND a.process_sts != 1")
     Double getSumAnfmeback(@Param("matnr") String matnr,@Param("threeCode") String threeCode,@Param("floor") Integer floor);

--
Gitblit v1.9.1