WarecellAllocationServiceImpl.java 1.4 KB
package com.huaheng.api.wcs.service.warecellAllocation;

import com.huaheng.api.wcs.domain.WcsTask;
import com.huaheng.common.utils.StringUtils;
import com.huaheng.framework.web.domain.AjaxResult;
import org.springframework.stereotype.Service;

@Service
public class WarecellAllocationServiceImpl implements WarecellAllocationService {

    /**
     * 仓位分配
     * 1、判断非空字段
     * 2、实体转换
     *
     * @param wcsTask
     * @return
     */
    @Override
    public AjaxResult WarecellAllocation(WcsTask wcsTask) {

        //1、判断非空字段
        if(StringUtils.isEmpty(wcsTask.getTaskNo())){
            return AjaxResult.error("任务号为空");
        }
        if(StringUtils.isEmpty(wcsTask.getPalletNo())){
            return AjaxResult.error("托盘编号为空");
        }
        if(StringUtils.isEmpty(wcsTask.getStation())){
            return AjaxResult.error("站台编码为空");
        }
        if(StringUtils.isNull(wcsTask.getLength())){
            return AjaxResult.error("长为空");
        }
        if(StringUtils.isNull(wcsTask.getWidth())){
            return AjaxResult.error("宽为空");
        }
        if(StringUtils.isNull(wcsTask.getHeight())){
            return AjaxResult.error("高为空");
        }
        if(StringUtils.isNull(wcsTask.getWeight())){
            return AjaxResult.error("重为空");
        }


        return null;
    }
}