package org.wcs.business.stock.impl.StockTaskDataCheck;

import org.wcs.business.stock.StockComposeTaskManage;
import org.wcs.business.stock.intf.IStockTaskDataCheck;
import org.wcs.model.po.app.AppStockComposeTask;
import org.wcs.utils.SpringUtils;

/**
 * 输送搬运任务数据检查
 */
public class ConveyStockTaskDataCheck implements IStockTaskDataCheck {
    @Override
    public String checkStockTaskData(AppStockComposeTask composeTask) {
        StockComposeTaskManage stockComposeTaskManage = SpringUtils.getBean(StockComposeTaskManage.class);
        boolean destinationExist = stockComposeTaskManage.checkLocationExist(composeTask.getDestination());
        if(!destinationExist) {
            return "搬运任务终点位置不能为空";
        }
        return null;
    }
}
