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);
|
}
|
}
|