LocationService.java 1.86 KB
package com.huaheng.pc.config.location.service;

import com.huaheng.framework.web.domain.AjaxResult;
import com.huaheng.pc.config.location.domain.Location;
import com.baomidou.mybatisplus.extension.service.IService;
import com.huaheng.pc.config.location.domain.LocationInfo;

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

public interface LocationService extends IService<Location>{

    /**
     * 新增库位
     * @param location
     * @return
     */
    AjaxResult addsave(Location location);

    /**
     * 批量新增库位
     * @param location
     * @return boolean
     */
    boolean insertLocation(Location location);

    /**
     * 更新库位状态
     * @param locationCode
     * @param status
     */
    void updateStatus(String locationCode, String status);

    /**
     * 通过定位规则查找库位
     * @param locatingRule
     * @return
     */
    String position(String locatingRule);

    /**
     * 修改容器和库位状态
     *
     */
    void updateContainerCodeAndStatus(String locationCode, String containerCode, String status);

    LocationInfo getAllLocation(String type);

    /**
     * 验证库位合法性
     * @param code
     * @return
     */
    boolean checkLocation(String code);

    boolean getFreeLocation(String materialCode, String batch);

    /**
     * 查询库位利用率
     * @return
     */
    List<LinkedHashMap<String, Object>> getLocationProp();

    /**
     * 根据库位编码查询库位信息
     * @param code 库位编码
     * @return
     */
    Location findLocationByCode(String code);


    /**
     * 查询空闲可用的库位用来补充入库
     * @return location
     */
    List<Location> pickLocation();



    List<Location> selectContainerEmpty(String warehouseCode);

    Location getInsideNear(Location location);

    Location getEmptyInsideLocation(Location location);
}