#
Junjie
昨天 253e9b3735533c4d8c69cf5e6983d5fa1e984ae9
src/main/java/com/zy/asrs/controller/OpenController.java
@@ -63,22 +63,6 @@
            return R.error("参数不能为空");
        }
        boolean dispatchShuttle = shuttleDispatchUtils.dispatchShuttle(null, param.getLocNo(), param.getShuttleNo());
        apiLogService.insert(new ApiLog(
                null
                , "小车移动任务"
                , "/createMoveTask"
                , null
                , null
                , null
                , JSON.toJSONString(param)
                , null
                , null
                , dispatchShuttle ? 1 : 0
                , 1
                , new Date()
                , null
                , null
        ));
        if (dispatchShuttle) {
            return R.ok();
        }
@@ -93,22 +77,6 @@
            return R.error("参数不能为空");
        }
        boolean result = commonService.createLocMoveTask(param);
        apiLogService.insert(new ApiLog(
                null
                , "移库任务"
                , "/createLocMoveTask"
                , null
                , null
                , null
                , JSON.toJSONString(param)
                , null
                , null
                , result ? 1 : 0
                , 1
                , new Date()
                , null
                , null
        ));
        if (result) {
            return R.ok();
        }
@@ -118,27 +86,11 @@
    //入库任务
    @PostMapping("/createInTask")
    @OpenApiLog(memo = "入库任务")
    public R createInTask(@RequestBody CreateInTaskParam param) {
    public synchronized R createInTask(@RequestBody CreateInTaskParam param) {
        if (param == null) {
            return R.error("参数不能为空");
        }
        boolean result = commonService.createInTask(param);
        apiLogService.insert(new ApiLog(
                null
                , "入库任务"
                , "/createInTask"
                , null
                , null
                , null
                , JSON.toJSONString(param)
                , null
                , null
                , result ? 1 : 0
                , 1
                , new Date()
                , null
                , null
        ));
        if (result) {
            return R.ok();
        }
@@ -148,27 +100,11 @@
    //出库任务
    @PostMapping("/createOutTask")
    @OpenApiLog(memo = "出库任务")
    public R createOutTask(@RequestBody CreateOutTaskParam param) {
    public synchronized R createOutTask(@RequestBody CreateOutTaskParam param) {
        if (param == null) {
            return R.error("参数不能为空");
        }
        boolean result = commonService.createOutTask(param);
        apiLogService.insert(new ApiLog(
                null
                , "出库任务"
                , "/createOutTask"
                , null
                , null
                , null
                , JSON.toJSONString(param)
                , null
                , null
                , result ? 1 : 0
                , 1
                , new Date()
                , null
                , null
        ));
        if (result) {
            return R.ok();
        }
@@ -182,22 +118,6 @@
            return R.error("参数不能为空");
        }
        boolean completeTask = commonService.completeTask(param);
        apiLogService.insert(new ApiLog(
                null
                , "任务完成"
                , "/completeTask"
                , null
                , null
                , null
                , JSON.toJSONString(param)
                , null
                , null
                , completeTask ? 1 : 0
                , 1
                , new Date()
                , null
                , null
        ));
        if (completeTask) {
            return R.ok();
        }
@@ -211,22 +131,6 @@
            return R.error("参数不能为空");
        }
        boolean completeTask = commonService.cancelTask(param);
        apiLogService.insert(new ApiLog(
                null
                , "任务取消"
                , "/cancelTask"
                , null
                , null
                , null
                , JSON.toJSONString(param)
                , null
                , null
                , completeTask ? 1 : 0
                , 1
                , new Date()
                , null
                , null
        ));
        if (completeTask) {
            return R.ok();
        }
@@ -355,24 +259,6 @@
    @OpenApiLog(memo = "小车集合")
    public R shuttleGather(@RequestBody ShuttleGatherParam param) {
        List<ShuttleGatherResult> shuttleGather = shuttleDispatchUtils.shuttleGather(param);
        apiLogService.insert(new ApiLog(
                null
                , "小车集合"
                , "/shuttleGather"
                , null
                , null
                , null
                , JSON.toJSONString(param)
                , JSON.toJSONString(shuttleGather)
                , null
                , null
                , 1
                , new Date()
                , null
                , null
        ));
        return R.ok().add(shuttleGather);
    }
@@ -380,24 +266,6 @@
    @OpenApiLog(memo = "小车演示")
    public R shuttleDemo(@RequestBody ShuttleDemoParam param) {
        shuttleDispatchUtils.shuttleDemo(param);
        apiLogService.insert(new ApiLog(
                null
                , "小车演示"
                , "/shuttleDemo"
                , null
                , null
                , null
                , JSON.toJSONString(param)
                , null
                , null
                , null
                , 1
                , new Date()
                , null
                , null
        ));
        return R.ok();
    }
@@ -417,23 +285,6 @@
            wrapper.eq("io_type", ioType.id);
        }
        List<WrkMast> wrkMasts = wrkMastService.selectList(wrapper);
        apiLogService.insert(new ApiLog(
                null
                , "查询任务"
                , "/queryTask"
                , null
                , null
                , null
                , JSON.toJSONString(param)
                , JSON.toJSONString(wrkMasts)
                , null
                , null
                , 1
                , new Date()
                , null
                , null
        ));
        return R.ok().add(wrkMasts);
    }