123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326 |
- package com.ruoyi.ams.inv.mapper;
- import java.math.BigDecimal;
- import java.util.List;
- import com.ruoyi.ams.asn.vo.StockingListVO;
- import com.ruoyi.ams.config.domain.dto.LotattDTO;
- import com.ruoyi.ams.inv.domain.InvLotAtt;
- import com.ruoyi.ams.inv.domain.InvLotLocId;
- import com.ruoyi.ams.inv.domain.form.InvLocIdSearchFrom;
- import com.ruoyi.ams.inv.domain.vo.InvLotLocIdLotattVO;
- import com.ruoyi.base.domain.vo.BaseLocationLotattVO;
- import com.ruoyi.common.core.domain.AjaxResult;
- import org.apache.ibatis.annotations.Param;
- /**
- * 库位库存信息Mapper接口
- *
- * @author andy
- * @date 2022-03-03
- */
- public interface InvLotLocIdMapper {
- /**
- * 查询库位库存信息
- *
- * @param lotnum 库位库存信息主键
- * @return 库位库存信息
- */
- List<InvLotLocId> selectInvLotLocIdByLotnum(String lotnum);
- /**
- * 查询库存根据lotnum和库位id
- *
- * @param lotnum
- * @param locationId
- * @return
- */
- InvLotLocId selectInvLotLocIdByKey(@Param("lotnum") String lotnum, @Param("locationId") String locationId, @Param("customerId") String customerId, @Param("sku") String sku);
- /**
- * 查询库存(根据主键)
- *
- * @param lotnum
- * @param sku
- * @param location
- * @param customerId
- * @return
- */
- InvLotLocId queryById(@Param("lotnum") String lotnum, @Param("sku") String sku, @Param("location") String location, @Param("customerId") String customerId);
- /**
- * 查询库位库存信息列表
- *
- * @param invLotLocId 库位库存信息
- * @return 库位库存信息集合
- */
- List<InvLotLocId> selectInvLotLocIdList(InvLotLocId invLotLocId);
- /**
- * 新增库位库存信息
- *
- * @param invLotLocId 库位库存信息
- * @return 结果
- */
- int insertInvLotLocId(InvLotLocId invLotLocId);
- /**
- * 修改库位库存信息
- *
- * @param invLotLocId 库位库存信息
- * @return 结果
- */
- int updateInvLotLocId(InvLotLocId invLotLocId);
- /**
- * 删除库位库存信息
- *
- * @param lotnum 库位库存信息主键
- * @return 结果
- */
- int deleteInvLotLocIdByLotnum(String lotnum);
- /**
- * 删除库位库存信息
- *
- * @param lotnum 库位库存信息主键
- * @return 结果
- */
- int deleteInvLotLocIdBy(@Param("lotnum") String lotnum, @Param("sku") String sku, @Param("locationId") String locationId, @Param("customerId") String customerId);
- /**
- * 批量删除库位库存信息
- *
- * @param lotnums 需要删除的数据主键集合
- * @return 结果
- */
- int deleteInvLotLocIdByLotnums(String[] lotnums);
- /**
- * 查询库位库存
- *
- * @param zoneId
- * @param sku
- * @param skuType
- * @param weight
- * @param supplier
- * @param lotattDTO
- * @return
- */
- List<BaseLocationLotattVO> selectInvLocationList(@Param("zoneId") Long zoneId, @Param("sku") String sku, @Param("skuType") String skuType, @Param("weight") Double weight, @Param("supplier") String supplier, @Param("lotattDTO") LotattDTO lotattDTO);
- /**
- * 根据sku和批次属性获取
- *
- * @param sku
- * @param skuType
- * @return
- */
- List<BaseLocationLotattVO> selectInvZoneBySkuLotatt(@Param("sku") String sku, @Param("skuType") String skuType, @Param("lotattDTO") LotattDTO lotattDTO);
- /**
- * 查询物料批次信息列表
- *
- * @param invLocIdSearchFrom
- * @return
- */
- List<InvLotLocIdLotattVO> selectInvLocIdLotattList(InvLocIdSearchFrom invLocIdSearchFrom);
- /**
- * @param locationId
- * @return
- */
- List<InvLotLocIdLotattVO> selectInvLocIdLotattByLocationId(Long locationId);
- /**
- * 删除库位库存信息
- *
- * @param locationId 库位id
- * @return 结果
- */
- int deleteInvLotLocIdByLocationId(Long locationId);
- /**
- * 删除库位库存信息
- *
- * @param locationId
- * @param customerId
- * @param sku
- * @param lotnum
- * @return
- */
- int deleteInvLotLocIdByPrimaryKey(String locationId, String customerId, String sku, String lotnum);
- /**
- * 更新起始库位库存至目标库位
- *
- * @param locationFrom
- * @param locationTo
- * @return
- */
- int updateInvLotLocIdLocationId(@Param("locationFrom") Long locationFrom, @Param("locationTo") Long locationTo);
- /**
- * 根据库位移动库存
- * @param locationFrom
- * @param locationTo
- * @param traceid
- * @return
- */
- int moveInvByLocationId(@Param("locationFrom") Long locationFrom, @Param("locationTo") Long locationTo,@Param("traceid")String traceid);
- /**
- * 根据库位和traceid移动库存
- * @param locationFrom
- * @param locationTo
- * @param traceid
- * @return
- */
- int moveInvByTraceId(@Param("locationFrom") Long locationFrom, @Param("locationTo") Long locationTo,@Param("traceid")String traceid);
- /**
- * 更新起始库位库存至目标库位并区分托盘
- *
- * @param locationFrom
- * @param locationTo
- * @return
- */
- int updateInvLotLocIdLotnum(@Param("locationFrom") Long locationFrom, @Param("lotnum") String lotnum, @Param("locationTo") Long locationTo);
- /**
- * 根据托盘号将库存更新到目标库位
- *
- * @param lotnum
- * @param locationTo
- * @return
- */
- int updateInvLotLocIdToByLotnum(@Param("lotnum") String lotnum, @Param("locationTo") Long locationTo);
- /**
- * 清除库位库存信息
- *
- * @param locationId
- * @return
- */
- int clearInvByLocationId(@Param("locationId") Long locationId);
- /**
- * 根据物料查询库位库存信息
- *
- * @param sku
- * @param lotattDTO
- * @return
- */
- Double queryInvBySku(@Param("sku") String sku, @Param("lotattDTO") LotattDTO lotattDTO, @Param("zoneIdList") List<String> zoneIdList);
- /**
- * 根据物料库位查询库存
- *
- * @param sku
- * @param locationId
- * @param lotattDTO
- * @return
- */
- Double queryInvBySkuLocationId(@Param("sku") String sku, @Param("locationId") Long locationId, @Param("lotattDTO") LotattDTO lotattDTO);
- /**
- * 查询库存
- *
- * @param lotnum
- * @param sku
- * @param location
- * @param customerId
- * @return
- */
- List<InvLotLocId> queryInvOrderBy(@Param("lotnum") String lotnum, @Param("sku") String sku, @Param("location") String location, @Param("customerId") String customerId, @Param("lotattDTO") LotattDTO lotattDTO);
- /**
- * 根据托盘查询库存
- *
- * @param invLotAtt
- * @return
- */
- List<InvLotLocId> queryInvByInvLotatt(@Param("lotattDTO") InvLotAtt invLotAtt);
- /**
- * 根据托盘查询库存(带出批次)
- *
- * @param invLotAtt
- * @return
- */
- List<InvLotLocIdLotattVO> queryInvLotattByInvLotatt(@Param("lotattDTO") InvLotAtt invLotAtt);
- /**
- * 查询
- *
- * @return
- */
- List<InvLotLocId> queryInvByFull(@Param("orderNo") String orderNo, @Param("sku") String sku);
- /**
- * 解绑库存
- *
- * @param locationId
- * @param sku
- * @param customerId
- * @return
- */
- AjaxResult unlockInv(@Param("locationId") Long locationId, @Param("sku") String sku, @Param("customerId") String customerId);
- /**
- * 获取质检列表
- *
- * @return
- */
- List<InvLotLocIdLotattVO> getQualityInspectionList();
- /**
- * 获取质检库位列表根据批号
- *
- * @param lotNumber 批号
- * @return
- */
- List<InvLotLocIdLotattVO> getQualityLocationListByLotNumber(String lotNumber);
- /**
- * 修改质量状态根据批号
- *
- * @param lotNumber
- * @return
- */
- int updateQualityStatusByLotNumber(String lotNumber, String qualityStatus);
- /**
- * 根据托盘号和物料分类查询是否有相同的库存
- *
- * @param skuType
- * @param palletNo
- * @return
- */
- List<InvLotLocId> querySameTypeByPalletNo(@Param("skuType") String skuType, @Param("palletNo") String palletNo);
- /**
- * 根据sku和locationid查询库存(根据sku进行排序)
- *
- * @param sku
- * @param locationId
- * @return
- */
- List<InvLotLocId> selectInvLotLocIdBySkuLocationSort(@Param("sku") String sku, @Param("locationId") Long locationId);
- /**
- * 根据条件更新已分配数
- *
- * @param lotnum
- * @param locationId
- * @param qty
- * @return
- */
- int updateAllocationBy(@Param("lotnum") String lotnum, @Param("locationId") Long locationId, @Param("qty") BigDecimal qty);
- /**
- * 根据条件更新已分配数
- */
- int updateLocation(@Param("fromLocationId") Long fromLocationId, @Param("toLocationId") Long toLocationId);
- }
|