Blame view

src/main/java/com/huaheng/api/U8/controller/ICSShipmentApi.java 5.17 KB
1
2
package com.huaheng.api.U8.controller;
pengcheng authored
3
import com.huaheng.api.U8.Service.ICSShipmentAPIService;
pengcheng authored
4
import com.huaheng.api.U8.domain.ICSShipmentHeader;
5
6
7
8
9
10
11
import com.huaheng.api.U8.domain.ICSShipmentModel;
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.Api;
import org.springframework.beans.factory.annotation.Autowired;
pengcheng authored
12
import org.springframework.web.bind.annotation.*;
13
14
15
16
17
18
19
20
21

/**
 * u8-wms出库下发或回传接口
 *
 *
 */


@RestController
pengcheng authored
22
23
@RequestMapping("/api/icsShipment")
@Api(tags = {"icsShipment"}, description = "ICS出库下发或回传接口")
24
25
26
27
public class ICSShipmentApi extends BaseController {


    @Autowired
pengcheng authored
28
    private ICSShipmentAPIService icsShipmentService;
29
30

    //出库下发
pengcheng authored
31
32
33
    @Log(title = "采购退货单出库下发", action = BusinessType.INSERT)
    @PostMapping("/GetICSPU_ArrivalVouch_Return")
    @ResponseBody
pengcheng authored
34
35
36
37
    public AjaxResult GetICSPU_ArrivalVouch_Return(@RequestBody ICSShipmentModel icsShipmentModel){
        if(icsShipmentModel==null){
            return AjaxResult.error("没有接收到数据");
        }
pengcheng authored
38
        ICSShipmentHeader icsShipmentHeader=icsShipmentModel.getIcsShipmentHeader();
pengcheng authored
39
        icsShipmentHeader.setType("PRO");
pengcheng authored
40
41
42
43
44
45
46
        AjaxResult ajaxResult = icsShipmentService.insertICSShipment(icsShipmentModel);
        return ajaxResult;
    }

    @Log(title = "领料申请单出库下发", action = BusinessType.INSERT)
    @PostMapping("/GetICSMaterialAppVouch")
    @ResponseBody
pengcheng authored
47
48
49
50
    public AjaxResult GetICSMaterialAppVouch(@RequestBody ICSShipmentModel icsShipmentModel){
        if(icsShipmentModel==null){
            return AjaxResult.error("没有接收到数据");
        }
pengcheng authored
51
        ICSShipmentHeader icsShipmentHeader=icsShipmentModel.getIcsShipmentHeader();
pengcheng authored
52
        icsShipmentHeader.setType("PKO");
pengcheng authored
53
54
55
56
57
58
59
        AjaxResult ajaxResult = icsShipmentService.insertICSShipment(icsShipmentModel);
        return ajaxResult;
    }

    @Log(title = "材料出库单出库下发", action = BusinessType.INSERT)
    @PostMapping("/GetICSRdRecord_11")
    @ResponseBody
pengcheng authored
60
61
62
63
    public AjaxResult GetICSRdRecord_11(@RequestBody ICSShipmentModel icsShipmentModel){
        if(icsShipmentModel==null){
            return AjaxResult.error("没有接收到数据");
        }
pengcheng authored
64
        ICSShipmentHeader icsShipmentHeader=icsShipmentModel.getIcsShipmentHeader();
pengcheng authored
65
        icsShipmentHeader.setType("MO");
pengcheng authored
66
67
68
69
70
71
72
        AjaxResult ajaxResult = icsShipmentService.insertICSShipment(icsShipmentModel);
        return ajaxResult;
    }

    @Log(title = "生产订单出库下发", action = BusinessType.INSERT)
    @PostMapping("/GetICSmom_order")
    @ResponseBody
pengcheng authored
73
74
75
76
    public AjaxResult GetICSmom_order(@RequestBody ICSShipmentModel icsShipmentModel){
        if(icsShipmentModel==null){
            return AjaxResult.error("没有接收到数据");
        }
pengcheng authored
77
        ICSShipmentHeader icsShipmentHeader=icsShipmentModel.getIcsShipmentHeader();
pengcheng authored
78
        icsShipmentHeader.setType("OO");
pengcheng authored
79
80
81
82
83
84
85
        AjaxResult ajaxResult = icsShipmentService.insertICSShipment(icsShipmentModel);
        return ajaxResult;
    }

    @Log(title = "销售发货单出库下发", action = BusinessType.INSERT)
    @PostMapping("/GetICSDispatchList")
    @ResponseBody
pengcheng authored
86
87
88
89
    public AjaxResult GetICSDispatchList(@RequestBody ICSShipmentModel icsShipmentModel){
        if(icsShipmentModel==null){
            return AjaxResult.error("没有接收到数据");
        }
pengcheng authored
90
        ICSShipmentHeader icsShipmentHeader=icsShipmentModel.getIcsShipmentHeader();
pengcheng authored
91
        icsShipmentHeader.setType("SO");
pengcheng authored
92
        AjaxResult ajaxResult = icsShipmentService.insertICSShipments(icsShipmentModel);
pengcheng authored
93
94
95
96
97
98
        return ajaxResult;
    }

    @Log(title = "调拨单出库下发", action = BusinessType.INSERT)
    @PostMapping("/TransVouch")
    @ResponseBody
pengcheng authored
99
100
101
102
    public AjaxResult TransVouch(@RequestBody ICSShipmentModel icsShipmentModel){
        if(icsShipmentModel==null){
            return AjaxResult.error("没有接收到数据");
        }
pengcheng authored
103
        ICSShipmentHeader icsShipmentHeader=icsShipmentModel.getIcsShipmentHeader();
pengcheng authored
104
        icsShipmentHeader.setType("TO");
pengcheng authored
105
106
107
108
109
110
111
112
        AjaxResult ajaxResult = icsShipmentService.insertICSShipment(icsShipmentModel);
        return ajaxResult;
    }


    @Log(title = "其他出库单出库下发", action = BusinessType.INSERT)
    @PostMapping("/GetICSRdRecord_09")
    @ResponseBody
pengcheng authored
113
114
115
116
    public AjaxResult GetICSRdRecord_09(@RequestBody ICSShipmentModel icsShipmentModel){
        if(icsShipmentModel==null){
            return AjaxResult.error("没有接收到数据");
        }
pengcheng authored
117
        ICSShipmentHeader icsShipmentHeader=icsShipmentModel.getIcsShipmentHeader();
pengcheng authored
118
        icsShipmentHeader.setType("QO");
pengcheng authored
119
120
121
122
123
124
125
        AjaxResult ajaxResult = icsShipmentService.insertICSShipment(icsShipmentModel);
        return ajaxResult;
    }
126
127
128

    //出库下发
    @Log(title = "出库回传", action = BusinessType.GRANT)
pengcheng authored
129
    @PostMapping("/ConfirmICSShipment")
130
    @ResponseBody
pengcheng authored
131
    public AjaxResult ConfirmICSShipment(String url){
pengcheng authored
132
        AjaxResult ajaxResult = icsShipmentService.ConfirmICSShipment(url);
133
134
135
136
137
        return ajaxResult;
    }


}