Blame view

src/main/java/com/huaheng/api/wcs/controller/ReleaseNoticeController.java 2.74 KB
1
2
package com.huaheng.api.wcs.controller;
tongzhonghao authored
3
import com.huaheng.api.wcs.service.releaseNotice.ReleaseNoticeService;
周鸿 authored
4
import com.huaheng.common.utils.StringUtils;
5
import com.huaheng.framework.aspectj.lang.annotation.ApiLogger;
tongzhonghao authored
6
import com.huaheng.framework.web.controller.BaseController;
7
import com.huaheng.framework.web.domain.AjaxResult;
8
import com.huaheng.pc.task.taskHeader.service.TaskHeaderService;
周鸿 authored
9
import io.swagger.annotations.ApiOperation;
10
11
12
13
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.Map;
14
15
16
17

/**
 * 铜箔仓 二楼出库时不能有入库任务堵
 * 放行通知
tongzhonghao authored
18
 * 2023314 :所有入库口都都通用。
19
20
21
22
 */

@RestController
@RequestMapping("/API/WMS/v2")
tongzhonghao authored
23
public class ReleaseNoticeController extends BaseController {
24
25

    @Resource
tongzhonghao authored
26
    private ReleaseNoticeService releaseNoticeService;
27
28
    @Resource
    private TaskHeaderService taskHeaderService;
29
30
31

    @PostMapping("/releasedNotice")
    @ApiOperation("放行通知")
32
    @ApiLogger(apiName = "放行通知", from = "WCS")
33
    @ResponseBody
34
    public AjaxResult releasedNotice(@RequestBody Map<String, String> map) {
tongzhonghao authored
35
36
37
        String area = map.get("area");
        String port = map.get("port");
tongzhonghao authored
38
        String barcode = map.get("barcode");
肖超群 authored
39
        AjaxResult ajaxResult = handleMultiProcess("releasedNotice", new MultiProcessListener() {
tongzhonghao authored
40
41
            @Override
            public AjaxResult doProcess() {
42
                AjaxResult ajaxResult = releaseNoticeService.releasedNotice(area, port, barcode);
tongzhonghao authored
43
44
45
46
                return ajaxResult;
            }
        });
        return ajaxResult;
47
48
    }
49
50
    /**
     * 解锁站台 通知下发 assignTask
51
52
     *
     * @param map
53
54
     * @return
     */
tongzhonghao authored
55
    @PostMapping("/noticeAssign")
56
    @ApiOperation("解锁站台")
57
    @ApiLogger(apiName = "解锁站台", from = "WCS")
tongzhonghao authored
58
    @ResponseBody
59
    public AjaxResult noticeAssign(@RequestBody Map<String, String> map) {
tongzhonghao authored
60
        String taskId = map.get("TaskNo");
tongzhonghao authored
61
        if (StringUtils.isEmpty(taskId)) {
周鸿 authored
62
            return AjaxResult.error("解锁站台:任务号空值");
周鸿 authored
63
        }
肖超群 authored
64
        AjaxResult ajaxResult = handleMultiProcess("noticeAssign", new MultiProcessListener() {
周鸿 authored
65
66
            @Override
            public AjaxResult doProcess() {
周鸿 authored
67
                AjaxResult ajaxResult = releaseNoticeService.noticeAssign(taskId);
周鸿 authored
68
69
70
71
72
73
74
75
                return ajaxResult;
            }
        });
        return ajaxResult;
    }

    /**
     * 解锁站台 通知下发 assignTask
76
77
     *
     * @param map
周鸿 authored
78
79
80
81
82
83
84
     * @return
     */
    @PostMapping("/noticeAssignD")
    @ApiOperation("解锁站台")
    @ApiLogger(apiName = "解锁站台", from = "WCS")
    @ResponseBody
    public AjaxResult noticeAssignD(@RequestBody Map<String, String> map) {
85
        return noticeAssign(map);
tongzhonghao authored
86
    }
87
}