IStoragePosManager.java 4.0 KB
package com.myproject.manager;

import com.myproject.bean.json.ChartData;
import com.myproject.bean.json.ChartItem;
import com.myproject.bean.json.InventoryItem;
import com.myproject.bean.json.PlateSizeBean;
import com.myproject.bean.update.Barcode;
import com.myproject.bean.update.Storage;
import com.myproject.bean.update.StoragePos;
import com.myproject.exception.ValidateException;
import com.myproject.util.PLATE_SIZE;
import com.myproject.util.StorageConstants;
import org.springframework.data.mongodb.core.query.Query;

import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * Created by kangmor on 2015/12/4.
 */
public interface IStoragePosManager extends IManager<StoragePos> {
    StoragePos findByStorage(String storageId, String storagePosName);

    StoragePos findOneLockPos(String partNumber, String lockId, Collection<String> excludePosIds);

    StoragePos findOneById(String id);

    StoragePos findPartNumberPos(String storageId, String partNumber, Collection<String> excludePosIds, StorageConstants.CHECKOUT_TYPE checkoutType);

    StoragePos findPartNumberInStorages(List<String> storageIdList, String partNumber, Collection<String> excludePosIds, StorageConstants.CHECKOUT_TYPE checkoutType);

    List<StoragePos> findByPartNumber(String storageId, String partNumber);

    StoragePos findTypePos(String storageId, String type, Collection<String> excludePosIds, StorageConstants.CHECKOUT_TYPE checkoutType);

    StoragePos getByFixtureCode(String fixtureCode);

    StoragePos getByBarcodeId(String barcodeId);

    List<StoragePos> findEnablePosList(String storageId);

    void clearPos(String storageId);

    StoragePos getEmptyPosByPartNumber(String storageId, String partNumber, Collection<String> excludePosIds);

    List<StoragePos> getEmptyPosByLimitPn(String storageId, String limitPn);

    StoragePos getEmptyPosByStorage(Storage storage, Barcode barcode, Collection<String> excludePosIds) throws ValidateException;

    StoragePos getEmptyWarmPos(Storage storage, Barcode barcode, Collection<String> excludePosIds) throws ValidateException;

    int countTotalStorageSize(String storageId);

    int countEmptyStorageSize(String storageId);

    List<StoragePos> getSortedStoragePosList(String storageId);

    @Deprecated
    StoragePos findComponent(String componentId);

    /**
     * 查找物料,只返回入库时间最早的一个
     */
    StoragePos findComponent(String storageId, Collection<String> partNumbers, Collection<String> excludePosIds, StorageConstants.CHECKOUT_TYPE checkoutType);

    List<StoragePos> findNotEmptyByStorageId(String storageId);

    List<StoragePos> findNotEmpty();

    List<StoragePos> findInaction(List<String> storageIds, int day, Collection<String> excludePosIds, int count);

    int countInaction(List<String> storageIds, int day, Collection<String> excludePosIds);

    int stockCount(String storageId, int type);

    int partNumberCount(String storageId, String partNumber);

    int expireCount(String storageId, int type);

    List<ChartData> groupShow();

    Map<String, InventoryItem> getInventory(String storageId);

    Map<String, InventoryItem> getInventory(int type,String... storageIds);

    List<PLATE_SIZE> distinctPlateSize(String storageId);

    StoragePos getByBarcode(String barcode);

    StoragePos getBySubCode(String barcode);

    StoragePos getByPosName(String posName);

    StoragePos getByHostPosId(String hostPosId, String pn);

    List<StoragePos> getExtendPosList(String hostPosId);

    List<StoragePos> findByLabel(String storageId, String labelStr);

    void insertAll(List<StoragePos> posList);

    List<StoragePos> findLockPos(String lockId);

    List findByQuery(Query query);

    int countByQuery(Query query);

    /**
     * 锁定订单信息(订单名和数量)
     * @return
     */
    List<ChartItem> lockOrderInfo();
    //获取料仓的料格使用详情
    List<PlateSizeBean> getStoragePosUsage(String storageId);

    List<StoragePos> getSameSizeContinuityEmptyPosList(Storage storage, Barcode barcode) throws ValidateException;
}