Blame view

src/main/java/com/huaheng/api/U8/controller/ICSShipmentApi.java 4.58 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
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

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


@RestController
@RequestMapping("/api/ICSShipment")
@Api(tags = {"shipment"}, description = "出库下发或回传接口")
public class ICSShipmentApi extends BaseController {


    @Autowired
pengcheng authored
31
    private ICSShipmentAPIService icsShipmentService;
32
33

    //出库下发
pengcheng authored
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
    @Log(title = "采购退货单出库下发", action = BusinessType.INSERT)
    @PostMapping("/GetICSPU_ArrivalVouch_Return")
    @ResponseBody
    public AjaxResult GetICSPU_ArrivalVouch_Return(ICSShipmentModel icsShipmentModel){
        ICSShipmentHeader icsShipmentHeader=icsShipmentModel.getIcsShipmentHeader();
        icsShipmentHeader.setType("采购退货");
        AjaxResult ajaxResult = icsShipmentService.insertICSShipment(icsShipmentModel);
        return ajaxResult;
    }

    @Log(title = "领料申请单出库下发", action = BusinessType.INSERT)
    @PostMapping("/GetICSMaterialAppVouch")
    @ResponseBody
    public AjaxResult GetICSMaterialAppVouch(ICSShipmentModel icsShipmentModel){
        ICSShipmentHeader icsShipmentHeader=icsShipmentModel.getIcsShipmentHeader();
        icsShipmentHeader.setType("领料申请");
        AjaxResult ajaxResult = icsShipmentService.insertICSShipment(icsShipmentModel);
        return ajaxResult;
    }

    @Log(title = "材料出库单出库下发", action = BusinessType.INSERT)
    @PostMapping("/GetICSRdRecord_11")
    @ResponseBody
    public AjaxResult GetICSRdRecord_11(ICSShipmentModel icsShipmentModel){
        ICSShipmentHeader icsShipmentHeader=icsShipmentModel.getIcsShipmentHeader();
        icsShipmentHeader.setType("材料出库");
        AjaxResult ajaxResult = icsShipmentService.insertICSShipment(icsShipmentModel);
        return ajaxResult;
    }

    @Log(title = "生产订单出库下发", action = BusinessType.INSERT)
    @PostMapping("/GetICSmom_order")
    @ResponseBody
    public AjaxResult GetICSmom_order(ICSShipmentModel icsShipmentModel){
        ICSShipmentHeader icsShipmentHeader=icsShipmentModel.getIcsShipmentHeader();
        icsShipmentHeader.setType("生产");
        AjaxResult ajaxResult = icsShipmentService.insertICSShipment(icsShipmentModel);
        return ajaxResult;
    }

    @Log(title = "销售发货单出库下发", action = BusinessType.INSERT)
    @PostMapping("/GetICSDispatchList")
    @ResponseBody
    public AjaxResult GetICSDispatchList(ICSShipmentModel icsShipmentModel){
        ICSShipmentHeader icsShipmentHeader=icsShipmentModel.getIcsShipmentHeader();
        icsShipmentHeader.setType("销售发货");
pengcheng authored
80
        AjaxResult ajaxResult = icsShipmentService.insertICSShipments(icsShipmentModel);
pengcheng authored
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
        return ajaxResult;
    }

    @Log(title = "调拨单出库下发", action = BusinessType.INSERT)
    @PostMapping("/TransVouch")
    @ResponseBody
    public AjaxResult TransVouch(ICSShipmentModel icsShipmentModel){
        ICSShipmentHeader icsShipmentHeader=icsShipmentModel.getIcsShipmentHeader();
        icsShipmentHeader.setType("调拨");
        AjaxResult ajaxResult = icsShipmentService.insertICSShipment(icsShipmentModel);
        return ajaxResult;
    }


    @Log(title = "其他出库单出库下发", action = BusinessType.INSERT)
    @PostMapping("/GetICSRdRecord_09")
    @ResponseBody
    public AjaxResult GetICSRdRecord_09(ICSShipmentModel icsShipmentModel){
        ICSShipmentHeader icsShipmentHeader=icsShipmentModel.getIcsShipmentHeader();
        icsShipmentHeader.setType("其他出库");
        AjaxResult ajaxResult = icsShipmentService.insertICSShipment(icsShipmentModel);
        return ajaxResult;
    }
108
109
110
111
112
113

    //出库下发
    @Log(title = "出库回传", action = BusinessType.GRANT)
    @PostMapping("/ICSShipmentAssign")
    @ResponseBody
    public AjaxResult ICSShipmentAssign(String url){
pengcheng authored
114
        AjaxResult ajaxResult = icsShipmentService.ConfirmICSShipment(url);
115
116
117
118
119
        return ajaxResult;
    }


}