#
Junjie
2024-01-05 96f09fb7eb450bac7e94565838f10d945f35af57
zy-asrs-openapi/src/main/java/com/zy/asrs/openapi/controller/ApiController.java
@@ -55,8 +55,8 @@
        if (Cools.isEmpty(param.getOrderType())) {
            return R.error("单据类型[orderType]不能为空");
        }
        if (Cools.isEmpty(param.getOrderDetails())) {
            return R.error("单据明细[orderDetails]不能为空");
        if (Cools.isEmpty(param.getMats())) {
            return R.error("物料[mats]不能为空");
        }
        param.setHostId(hostKey.getHostId());
        apiService.generateOrderPakIn(param);
@@ -80,8 +80,8 @@
        if (Cools.isEmpty(param.getOrderType())) {
            return R.error("单据类型[orderType]不能为空");
        }
        if (Cools.isEmpty(param.getOrderDetails())) {
            return R.error("单据明细[orderDetails]不能为空");
        if (Cools.isEmpty(param.getMats())) {
            return R.error("物料[mats]不能为空");
        }
        param.setHostId(hostKey.getHostId());
        apiService.generateOrderPakOut(param);
@@ -124,9 +124,10 @@
     */
    @PostMapping("/createMat")
    public synchronized R createMat(@RequestHeader(required = true) String appkey,
                                    @RequestBody(required = false) List<CreateMatParam> mats) {
        HostKey hostKey = auth(appkey, mats, true);
        int result = apiService.createMat(mats, hostKey.getHostId());
                                    @RequestBody(required = false) CreateMatParam param) {
        HostKey hostKey = auth(appkey, param, true);
        param.setHostId(hostKey.getHostId());
        int result = apiService.createMat(param);
        return R.ok().add(result);
    }