From a881d98d2eee345af7454fd943fccbcc5c8bcb6f Mon Sep 17 00:00:00 2001 From: tzsk <Administrator@qq.com> Date: 星期一, 04 八月 2025 15:01:40 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/mapper/AgvLocDetlMapper.java | 36 +++++++++++++++++++++++++++++++++--- 1 files changed, 33 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/zy/asrs/mapper/AgvLocDetlMapper.java b/src/main/java/com/zy/asrs/mapper/AgvLocDetlMapper.java index beef7e1..c1cf30b 100644 --- a/src/main/java/com/zy/asrs/mapper/AgvLocDetlMapper.java +++ b/src/main/java/com/zy/asrs/mapper/AgvLocDetlMapper.java @@ -2,9 +2,6 @@ import com.baomidou.mybatisplus.mapper.BaseMapper; import com.zy.asrs.entity.AgvLocDetl; -import com.zy.asrs.entity.LocDetl; -import com.zy.asrs.entity.result.StockVo; -import com.zy.common.model.QueryStockPreDo; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; @@ -18,4 +15,37 @@ @Repository public interface AgvLocDetlMapper extends BaseMapper<AgvLocDetl> { + @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(anfme) FROM agv_loc_detl") + Integer sum(); + + @Select("select\n" + + " ROW_NUMBER() over (order by sum(a.anfme) desc) as row\n" + + " , a.matnr\n" + + " , a.maktx, a.specs, a.model\n " + + " , sum(a.anfme) as anfme\n" + + " from agv_loc_detl a\n" + + " where 1=1\n" + + " group by a.matnr, a.maktx, a.specs, a.model") + List<AgvLocDetl> getStockStatisExcel(); + + @Select("SELECT SUM(anfme) FROM agv_loc_detl WHERE loc_no = #{locNo}") + Double sumByLocNo(@Param("locNo")String locNo); + + @Select("SELECT SUM(anfme) FROM agv_loc_detl WHERE matnr = #{matnr}") + Double sumByMatnr(@Param("matnr")String matnr); + + int updateAnfme(@Param("locNo")String locNo, @Param("anfme")Double anfme, @Param("matnr")String matnr, @Param("batch")String batch, @Param("csocode")String csocode, @Param("isocode")String isocode); + + int deleteLocDetl(@Param("locNo")String locNo, @Param("anfme")Double anfme, @Param("matnr")String matnr, @Param("batch")String batch, @Param("csocode")String csocode, @Param("isocode")String isocode); + + AgvLocDetl selectLocdetl(@Param("locNo")String locNo, @Param("matnr")String matnr, @Param("batch")String batch, @Param("csocode")String csocode, @Param("isocode")String isocode); + + int updateNewMatnr(String matnrOld, String matnrNew); } -- Gitblit v1.9.1