package com.th.demo.service.impl.ware;

import com.th.demo.model.ware.Store;

import java.util.List;

public class WareTools {

    //检查顺序是否连续
    public static  boolean checkOrder(List<Store> listStore) {
        boolean flag = true;
        int layer = listStore.get(0).getLayer();
        for (int i = 0; i < listStore.size(); i++) {
            if (layer+i != listStore.get(i).getLayer() ) {
                flag = false;
                break;
            }
        }
        return flag;
    }
}
