自动化立体仓库 - WMS系统
pang.jiabao
2024-07-05 07c572bea979dbd3ee46ec24083cb1bdcc014e3a
src/main/java/com/zy/asrs/mapper/LocDetlMapper.java
@@ -2,8 +2,11 @@
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.zy.asrs.entity.LocDetl;
import com.zy.asrs.entity.LocDetlWarningDTO;
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;
@@ -13,7 +16,38 @@
@Repository
public interface LocDetlMapper extends BaseMapper<LocDetl> {
    List<LocDetl> getStockOutPage(@Param("pageNumber")int pageNumber, @Param("pageSize")int pageSize, @Param("param") Map param);
    List<LocDetl> getStockOutPage(Map<String, Object> map);
    Integer getStockOutPageCount();
    Integer getStockOutPageCount(Map<String, Object> map);
    @Update("update asr_loc_detl set qty=#{qty}, modi_time = getDate(),all_weight=#{weight},all_qty=#{allQty} where loc_no = #{locNo} and mat_no = #{matNo}")
    int updateAnfme(Double qty, String locNo, String matNo,Double weight,Double allQty);
    @Update("update asr_loc_detl set loc_no = #{newLocNo}, modi_time=getDate() where loc_no = #{oldLocNo}")
    int updateLocNo(String newLocNo, String oldLocNo);
    @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.mat_no = #{matNo} AND (lm.row1 >= #{start} AND lm.row1 <= #{end})  AND lm.loc_sts = 'F' AND DateDiff(dd, lm.modi_time, getdate()) = 0) ORDER BY lm.modi_time ASC")
    List<String> selectSameDetlToday(@Param("matNo") String matNo, @Param("start") Integer start, @Param("end") Integer end);
    List<LocDetl> selectLocDetlList(@Param("mat_no") String matNo);
    Double selectLocDetlSumQty(String locNo);
    List<LocDetl> getStockStatis(Map<String, Object> condition);
    Integer getStockStatisCount(Map<String, Object> condition);
    List<LocDetl> getStockStatisExcel(LocDetl locDetl);
    /**
     * 库存上报ERP时,根据物料汇总查询库存总量
     * @return
     */
    @Select("select mat_no,mat_name,sum(qty) qty from asr_loc_detl group by mat_no,mat_name")
    List<LocDetl> getStockSum();
    List<LocDetlWarningDTO> selectAllWarning(LocDetlWarningDTO locDetlWarningDTO);
    int getAllWarningCount(LocDetlWarningDTO locDetlWarningDTO);
}