2024-07-04 07:43:04 +08:00
|
|
|
|
package com.wms.mapper;
|
|
|
|
|
|
|
|
|
|
|
|
import com.wms.entity.table.Stock;
|
|
|
|
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
|
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
@Mapper
|
|
|
|
|
|
public interface StockMapper {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 查询库存列表
|
|
|
|
|
|
* @param stock 库存参数
|
|
|
|
|
|
* @return 结果
|
|
|
|
|
|
*/
|
|
|
|
|
|
List<Stock> selStocks(Stock stock);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 查询库存,前端用
|
|
|
|
|
|
* @param query 查询键值
|
|
|
|
|
|
* @return 结果
|
|
|
|
|
|
*/
|
|
|
|
|
|
List<Stock> selStocksFront(@Param("query") String query);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 添加库存
|
|
|
|
|
|
* @param stock
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
int addStock(Stock stock);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 修改库存信息
|
|
|
|
|
|
* @param stock
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
int modifyStock(Stock stock);
|
|
|
|
|
|
|
2024-07-10 16:22:54 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 修改库存存储的位置
|
|
|
|
|
|
* @param oldLocationId 旧库位
|
|
|
|
|
|
* @param newLocationId 新库位
|
|
|
|
|
|
* @return 结果
|
|
|
|
|
|
*/
|
|
|
|
|
|
int updateLocation(@Param("oldLocationId") String oldLocationId, @Param("newLocationId") String newLocationId);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 更新库存里的库位和库存状态
|
|
|
|
|
|
* @param oldLocationId 旧库位
|
|
|
|
|
|
* @param newLocationId 新库位
|
|
|
|
|
|
* @param status 状态
|
|
|
|
|
|
* @return 结果
|
|
|
|
|
|
*/
|
|
|
|
|
|
int updateLocationAndStatus(@Param("oldLocationId") String oldLocationId, @Param("newLocationId") String newLocationId, @Param("status") Integer status);
|
|
|
|
|
|
|
2024-07-04 07:43:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 删除库存
|
|
|
|
|
|
* @param stockId
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
int deleteStock(String stockId);
|
|
|
|
|
|
|
2024-07-10 16:22:54 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 根据库位删除库存
|
|
|
|
|
|
* @param locationId 库位
|
|
|
|
|
|
* @return 删除结果
|
|
|
|
|
|
*/
|
|
|
|
|
|
int deleteStockWithLocationId(@Param("locationId") String locationId);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 根据库位更新库位状态
|
|
|
|
|
|
* @param locationId 库位
|
|
|
|
|
|
* @param status 状态
|
|
|
|
|
|
* @return 更新结果
|
|
|
|
|
|
*/
|
|
|
|
|
|
int updateStockStatusWithLocationId(@Param("locationId") String locationId, @Param("status") Integer status);
|
|
|
|
|
|
|
2024-07-16 15:12:27 +08:00
|
|
|
|
int updateLocationIdWithBetchNo(@Param("batchNo") String batchNo, @Param("locationId") String locationId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-07-04 07:43:04 +08:00
|
|
|
|
List<Stock> selStocksByGoodsId(Stock stock);
|
|
|
|
|
|
|
|
|
|
|
|
List<Stock> selStockOutOfDate();
|
|
|
|
|
|
|
|
|
|
|
|
List<Stock> selStockNearDeadLine(int nearInterval);
|
|
|
|
|
|
|
|
|
|
|
|
List<Stock> selStockLongTimeNoUse(int nearInterval);
|
|
|
|
|
|
|
|
|
|
|
|
int resetStock(Stock stock);
|
|
|
|
|
|
}
|