skyouc
20 小时以前 52d78628a70d6aa129f874050b7846d259819554
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
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
80
81
82
83
package com.vincent.rsf.openApi.controller;
 
 
import com.vincent.rsf.framework.exception.CoolException;
import com.vincent.rsf.openApi.entity.dto.CommonResponse;
import com.vincent.rsf.openApi.entity.params.ErpOpParams;
import com.vincent.rsf.openApi.service.WmsErpService;
import io.swagger.annotations.ApiOperation;
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;
 
import java.util.Objects;
 
@RestController
@RequestMapping("/erp")
public class WmsErpController {
 
    @Autowired
    private WmsErpService wmsErpService;
 
    /**
     * @author Ryan
     * @date 2025/9/27
     * @description: 订单信息查询
     * @version 1.0
     */
    @ApiOperation("订单信息查询")
    @PostMapping("/order")
    public CommonResponse getOrders(@RequestBody ErpOpParams params) {
        if (Objects.isNull(params)) {
            throw new CoolException("参数不能为空!!");
        }
        return wmsErpService.getOrderInfo(params);
    }
 
 
    /**
     * 订单修改
     * @param params
     * @return
     */
    @ApiOperation("单据修改")
    @PostMapping("/order/upadte")
    public CommonResponse modifyOrderDtel(@RequestBody ErpOpParams params) {
        if (Objects.isNull(params)) {
            throw new CoolException("参数不能为空!!");
        }
        return wmsErpService.updateOrderDetl(params);
    }
 
 
    /**
     * 订单新增
     * @param params
     * @return
     */
    @ApiOperation("新增单据")
    @PostMapping("/order/add")
    public CommonResponse orderAdd(@RequestBody ErpOpParams params) {
        if (Objects.isNull(params)) {
            throw new CoolException("参数不能为空!!");
        }
        return wmsErpService.updateOrderDetl(params);
    }
 
 
    /**
     * 删除订单
     * @param params
     * @return
     */
    @ApiOperation("删除订单")
    @PostMapping("/order/del")
    public CommonResponse orderDel(@RequestBody ErpOpParams params) {
        if (Objects.isNull(params)) {
            throw new CoolException("参数不能为空!!");
        }
        return wmsErpService.orderDel(params);
    }
}