zjj
19 小时以前 da20b84fb1dbb266939deff9fd52f9a16f4e32fa
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
package com.vincent.rsf.server.api.controller;
 
import com.vincent.rsf.framework.common.Cools;
import com.vincent.rsf.framework.common.R;
import com.vincent.rsf.server.api.entity.dto.InTaskMsgDto;
import com.vincent.rsf.server.api.controller.params.TaskInParam;
import com.vincent.rsf.server.api.entity.enums.TaskType;
import com.vincent.rsf.server.api.service.WcsService;
import com.vincent.rsf.server.system.controller.BaseController;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
@RestController
@RequestMapping("/wcs")
@Api(tags = "wcs接口对接")
public class WcsController extends BaseController {
 
    @Autowired
    private WcsService wcsService;
 
//    @ApiOperation(value = "wcs生成入库任务接口")
    @PostMapping("/create/in/task")
    public R createInTask(@RequestBody TaskInParam param) {
        if (Cools.isEmpty(param.getIoType())) {
            return R.error("入出库类型不能为空");
        }
        if (Cools.isEmpty(param.getSourceStaNo())) {
            return R.error("源站编号不能为空");
        }
        if (Cools.isEmpty(param.getBarcode()) && param.getIoType().equals(TaskType.TASK_TYPE_IN.type)) {
            return R.error("条码不能为空");
        }
        if (Cools.isEmpty(param.getLocType1())){
            return R.error("高低检测信号不能为空");
        }
        InTaskMsgDto msgDto = wcsService.createInTask(param,getLoginUserId());
        return R.ok(msgDto);
 
 
    }
 
 
}