#
Junjie
2025-01-12 84e959cd1b213e0706b884d54903fe6f3dd7079d
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
package com.zy.asrs.controller;
 
import com.core.common.R;
import com.zy.asrs.domain.param.CreateMoveTaskParam;
import com.zy.common.service.CommonService;
import com.zy.core.dispatcher.ShuttleDispatchUtils;
import lombok.extern.slf4j.Slf4j;
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.RestController;
 
@Slf4j
@RestController
@RequestMapping("/openapi")
public class OpenController {
 
    @Autowired
    private CommonService commonService;
    @Autowired
    private ShuttleDispatchUtils shuttleDispatchUtils;
 
    @PostMapping("/createMoveTask")
    public R createMoveTask(CreateMoveTaskParam param) {
        if (param == null) {
            return R.error("参数不能为空");
        }
        boolean dispatchShuttle = shuttleDispatchUtils.dispatchShuttle(commonService.getWorkNo(99), param.getLocNo(), param.getShuttleNo());
        if (dispatchShuttle) {
            return R.ok();
        }
        return R.error();
    }
 
}