LocationMapper.java 3.12 KB
package com.huaheng.pc.config.location.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.huaheng.pc.config.location.domain.Location;
import com.huaheng.pc.config.location.domain.LocationAge;
import com.huaheng.pc.config.points.domain.Points;
import org.apache.ibatis.annotations.Param;

import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

public interface LocationMapper extends BaseMapper<Location> {

    void updateStatus(@Param("warehouseCode") String warehouseCode, @Param("code") String code, @Param("status") String status);

    Location position(String locatingRule);

    int addList(@Param("locations") List<Location> locations);

    int updateList(@Param("locations") List<Location> locations);

    Location getAllLocation(@Param("warehouseCode") String warehouseCode, @Param("type") String type);

    //库位利用率
    List<LinkedHashMap<String, Object>> getLocationProp();

    List<Location> pickLocation();

    List<Location> selectLocationByContainerEmpty(@Param("warehouseCode") String warehouseCode, @Param("zoneCode") String zoneCode, @Param("roadWay") String roadWay);

    List<Location> selectContainerEmpty(@Param("warehouseCode") String warehouseCode);

    int getFirstRowOfZone(@Param("warehouseCode") String warehouseCode, @Param("locationType") String locationType);

    int getLastRowOfZone(@Param("warehouseCode") String warehouseCode, @Param("locationType") String locationType);

    Location selectAddress(Location location);
    List<Location> selectEmptyAddress(Points points);

    //查出外侧有货,内测无货的库位
    List<String> selectlistEmpty(String warehouseCode);

    List<Location> selectCode( String warehouseCode);
    //查找空库位
    Location selectByPrefix(Location location);

    //查找类似空库位
    Location selectModelByOld(Location location);
    //查找类似空库位
    Location selectModelByOlds(@Param("location") Location location,@Param("codes") List<String> codes);
    /**
     * 获取相邻的两个库位(存在托盘或者不存在托盘)
     * @param layer
     * @param line
     * @param flag true表示存在托盘,false表示不存在托盘
     * @return
     */
    List<Location> getLocationAajacentIsNull(@Param("layer")Integer layer,@Param("line")Integer line,@Param("flag")Boolean flag) ;

    Location getLocationRoadWay(@Param("roadway") Integer roadway);
    /**
     * 获取周边的库位(存在托盘或者不存在托盘)
     * @param line
     * @param layer
     * @param flag true表示存在托盘,false表示不存在托盘
     * @return
     */
    List<Location> getLocationAdjacent(@Param("line")Integer line,@Param("layer")Integer layer,@Param("flag")Boolean flag);

    Location getLocationFarAway(@Param("roadway") Integer roadway,@Param("flag")int flag,@Param("layer")int layer);

    Location getLocationOfRule();

    List<Location> selectListInventory(String zoneCode);

    int updateStatusNew(@Param("code") String code, @Param("warehouseCode") String warehouseCode,@Param("status") String status, @Param("oldStatus") String oldStatus);

    List<LocationAge> getLkLocationList();
}