WarecellAllocationServiceImpl.java
1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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;
}
}