Blame view

src/main/java/com/huaheng/api/wcs/controller/EmptyOutHandle.java 1.73 KB
pengcheng authored
1
2
3
package com.huaheng.api.wcs.controller;

import com.huaheng.api.wcs.service.emptyOutHandle.EmptyOutHandleService;
4
import com.huaheng.common.utils.StringUtils;
周峰 authored
5
import com.huaheng.framework.aspectj.lang.annotation.ApiLogger;
pengcheng authored
6
7
8
9
10
import com.huaheng.framework.aspectj.lang.annotation.Log;
import com.huaheng.framework.aspectj.lang.constant.BusinessType;
import com.huaheng.framework.web.controller.BaseController;
import com.huaheng.framework.web.domain.AjaxResult;
import io.swagger.annotations.ApiOperation;
11
import org.springframework.web.bind.annotation.*;
pengcheng authored
12
13

import javax.annotation.Resource;
14
import java.util.Map;
pengcheng authored
15
16
17
/**
 * 空出处理接口
pengcheng authored
18
19
 * wcswms传递数据
 *
20
21
 * @author ricard
 * @date 2019/10/11
pengcheng authored
22
23
24
 */

@RestController
mahuandong authored
25
@RequestMapping("/API/WMS/v2")
pengcheng authored
26
27
28
29
30
31
public class EmptyOutHandle extends BaseController {

    @Resource
    private EmptyOutHandleService emptyOutHandleService;

    @Log(title = "wcs空出处理", action = BusinessType.INSERT)
游杰 authored
32
    @PostMapping("/emptyOutHandle")
pengcheng authored
33
34
    @ApiOperation("wcs空出处理")
    @ResponseBody
35
36
    @ApiLogger(apiName = "wcs空出处理", from = "WCS")
    public AjaxResult emptyOutHandle(@RequestBody Map<String, String> map) {
37
38
39
40
        AjaxResult ajaxResult = handleMultiProcess(new MultiProcessListener() {
            @Override
            public AjaxResult doProcess() {
                String taskNo = map.get("taskNo");
41
                String warehouseCode = map.get("warehouseCode");
42
                if (StringUtils.isEmpty(warehouseCode)) {
43
44
                    return AjaxResult.error("warehouseCode 不能为空");
                }
45
46
47
48
                AjaxResult ajaxResult = emptyOutHandleService.EmptyOutHandle(taskNo);
                return ajaxResult;
            }
        });
pengcheng authored
49
        return ajaxResult;
50
pengcheng authored
51
52
53
54
    }


}