From e235d483194ab95bf62d1cfd343a172ff12781e8 Mon Sep 17 00:00:00 2001
From: pang.jiabao <pang_jiabao@163.com>
Date: 星期六, 13 四月 2024 14:58:24 +0800
Subject: [PATCH] 聚乳酸库存明细 1.批号与包号排序需同步,增加水分,挥发段,分解段搜索,按照最大最小范围,包装类型跟托盘类型增加删选功能。 2.已经出库的物料,在明细表里面隐藏掉,但是数据保留。 3.增加二个跟聚乳酸一样的明细表,分改性树脂,纯树脂库存明细表,所有功能跟总的聚乳酸库存明细表一样 4.明细表整体框架调整一下,相对压缩一下,搜索功能框看看能否弄成二行 5.表里面的包装类型与托盘类型这些不主要的信息放到指标后面 6.关于分包再处理,举例原有系统里面销售选定的10包物料,再二次重新弄后,车间打印新标签,使用新的包号,在明细表里面体现原有所有指标信息及批号,包号,牌号跟新的关联 7.出库时候时间可选历史,不要就只能出现4天 8.提取库存里面需要有最大包号跟最小包号选择

---
 src/main/java/com/zy/asrs/mapper/LocDetlMapper.java |   84 ++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 80 insertions(+), 4 deletions(-)

diff --git a/src/main/java/com/zy/asrs/mapper/LocDetlMapper.java b/src/main/java/com/zy/asrs/mapper/LocDetlMapper.java
index 5306c07..ebb5594 100644
--- a/src/main/java/com/zy/asrs/mapper/LocDetlMapper.java
+++ b/src/main/java/com/zy/asrs/mapper/LocDetlMapper.java
@@ -2,29 +2,105 @@
 
 import com.baomidou.mybatisplus.mapper.BaseMapper;
 import com.zy.asrs.entity.LocDetl;
+import com.zy.asrs.entity.LocDetlWarningDTO;
+import com.zy.asrs.entity.result.LocDetlAll;
+import com.zy.asrs.entity.result.LocDetlDTO;
+import com.zy.asrs.entity.result.StockVo;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
 import org.apache.ibatis.annotations.Update;
 import org.springframework.stereotype.Repository;
 
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 @Mapper
 @Repository
 public interface LocDetlMapper extends BaseMapper<LocDetl> {
 
+    List<LocDetl> listByPage(Map<String, Object> map);
+
+    Integer listByPageCount(Map<String, Object> map);
+
+    LocDetl selectItem(@Param("locNo")String locNo, @Param("matnr")String matnr, @Param("batch")String batch);
+
+    int deleteItem(@Param("locNo")String locNo, @Param("matnr")String matnr, @Param("batch")String batch);
+
+    int updateAnfme(@Param("anfme")Double anfme, @Param("locNo")String locNo, @Param("matnr")String matnr, @Param("batch")String batch);
+
     List<LocDetl> getStockOutPage(Map<String, Object> map);
 
     Integer getStockOutPageCount(Map<String, Object> map);
 
-    @Update("update asr_loc_detl set anfme=#{anfme}, modi_time = getDate() where loc_no = #{locNo} and matnr = #{matnr}")
-    int updateAnfme(Double anfme, String locNo, String matnr);
+    List<LocDetl> getStockOutPage2(Map<String, Object> map);
+
+    Integer getStockOutPageCount2(Map<String, Object> map);
 
     @Update("update asr_loc_detl set loc_no = #{newLocNo}, modi_time=getDate() where loc_no = #{oldLocNo}")
     int updateLocNo(String newLocNo, String oldLocNo);
 
-    @Select("SELECT wml.loc_no FROM asr_wrk_mast_log wml LEFT JOIN asr_wrk_detl_log wdl ON wml.wrk_no = wdl.wrk_no LEFT JOIN asr_loc_mast lm ON wml.loc_no = lm.loc_no WHERE (1 = 1 AND wdl.matnr = 'X004073XX' AND (wml.io_type = 1 OR wml.io_type = 11) AND wml.wrk_sts = 5 AND DateDiff(dd, wml.modi_time, getdate()) = 0 AND lm.loc_sts = 'F') ORDER BY wml.modi_time ASC")
-    List<String> selectSameDetlToday(String matnr);
+    @Select("SELECT ld.loc_no FROM asr_loc_detl ld LEFT JOIN asr_loc_mast lm ON ld.loc_no = lm.loc_no WHERE (1 = 1 AND ld.matnr = #{matnr} AND (lm.row1 >= #{start} AND lm.row1 <= #{end})  AND lm.loc_sts = 'F' AND DateDiff(dd, ld.appe_time, getdate()) = 0) ORDER BY ld.appe_time ASC")
+    List<String> selectSameDetlToday(@Param("matnr") String matnr, @Param("start") Integer start, @Param("end") Integer end);
 
+    List<LocDetl> getStockStatis(Map<String, Object> map);
+
+    Integer getStockStatisCount(Map<String, Object> map);
+
+    List<LocDetlAll> getStockStatisAll(Map<String, Object> map);
+
+    Integer getStockStatisCountAll(Map<String, Object> map);
+
+    List<LocDetlAll> getWarningNumList(Map<String, Object> map);
+
+    Integer getWarningNumListCount(Map<String, Object> map);
+
+    List<LocDetl> getStockStatisExcel();
+
+    @Select("select sum(a.anfme) as sum from asr_loc_detl a left join asr_loc_mast b on a.loc_no = b.loc_no where b.loc_sts = 'F' and a.matnr = #{matnr}")
+    Double selectSumAnfmeByMatnr(@Param("matnr") String matnr);
+
+    List<LocDetl> selectPakoutByRule(String matnr);
+
+    List<LocDetl> getAsrsLocDetl(String matnr);
+
+    Integer countLocNoNum(String locNo);
+
+    // -------------------------------------------------
+
+    List<LocDetl> queryStock(@Param("matnr")String matnr, @Param("batch")String batch, @Param("owner")int owner);
+
+    List<LocDetl> queryStockViewMerge(@Param("locNo")String locNo);
+
+    Double queryStockAnfme(String matnr, String batch);
+
+    List<StockVo> queryStockTotal(@Param("matnr")String matnr,@Param("batch")String batch);
+
+
+    Integer sum();
+
+    List<LocDetl> unreason();
+
+    Double selectLocDetlSumQty(String locNo);
+
+    Integer queryStockViewMergeCount(@Param("row")int row,@Param("lev")int lev);
+
+    //閫氳繃璁㈠崟鍙枫�佺墿鏂欏彿銆佺墿鏂欏悕绉般�佽鏍笺�佸簱浣嶅彿杩涜妯$硦鎼滅储
+    List<LocDetl> searchByLike(String orderNo, String matnr, String maktx, String specs, String locNo);
+
+    List<LocDetl> queryStock2(String matnr, String batch);
+
+    List<LocDetlAll> selectAllOwner(LocDetlDTO locDetlDTO);
+
+    int selectAllCount(LocDetlDTO locDetlDTO);
+
+    List<LocDetlAll> selectAllPyment(LocDetlDTO locDetlDTO);
+
+    int selectAllPymentcount(LocDetlDTO locDetlDTO);
+    Double sumAll();
+
+    List<LocDetlWarningDTO> selectAllWarning(LocDetlWarningDTO locDetlWarningDTO);
+
+    int getAllWarningCount(LocDetlWarningDTO locDetlWarningDTO);
 }

--
Gitblit v1.9.1