pang.jiabao
2025-05-10 d3119a7643717d1cd93c8d2e8ca9617acf91e561
src/main/java/com/zy/asrs/controller/CrnController.java
@@ -21,8 +21,6 @@
import com.zy.asrs.service.BasCrnpService;
import com.zy.asrs.service.LocMastService;
import com.zy.asrs.service.WrkMastService;
import com.zy.asrs.service.impl.MainServiceImpl;
import com.zy.asrs.utils.CommandUtils;
import com.zy.asrs.utils.VersionUtils;
import com.zy.core.CrnThread;
import com.zy.core.cache.MessageQueue;
@@ -39,7 +37,6 @@
import com.zy.core.properties.SystemProperties;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
@@ -55,11 +52,6 @@
@RestController
public class CrnController {
    @Value("${wms.url}")
    private String wmsUrl;
    @Value("${wms.movePath}")
    private String movePath;
    @Autowired
    private SlaveProperties slaveProperties;
@@ -69,8 +61,6 @@
    private BasCrnErrorMapper basCrnErrorMapper;
    @Autowired
    private BasCrnpService basCrnpService;
    @Autowired
    private MainServiceImpl mainService;
    @Autowired
    private LocMastService locMastService;
@@ -612,7 +602,7 @@
                crnCommand.setCommand((short) 0);  // 任务完成确认位
                // 延时发送
                Thread.sleep(1000L);
                if (CommandUtils.offer(SlaveType.Crn, crn.getId(), new Task(5, crnCommand), false)) {
                if (MessageQueue.offer(SlaveType.Crn, crn.getId(), new Task(5, crnCommand))) {
                    return R.ok();
                } else {
                    throw new CoolException("命令下发失败");
@@ -771,7 +761,7 @@
                }
                // 空闲判断
//                if (crnProtocol.getStatusType().equals(com.zy.core.enums.CrnStatusType.IDLE) && crnProtocol.getTaskNo() == 0) {
                if (CommandUtils.offer(SlaveType.Crn, crn.getId(), new Task(4, command), false)) {
                if (MessageQueue.offer(SlaveType.Crn, crn.getId(), new Task(4, command))) {
                    return true;
                } else {
                    throw new CoolException("命令下发失败");
@@ -802,7 +792,7 @@
                }
                // 空闲判断
//                if (crnProtocol.getStatusType().equals(com.zy.core.enums.CrnStatusType.IDLE) && crnProtocol.getTaskNo() == 0) {
                if (CommandUtils.offer(SlaveType.Crn, crn.getId(), new Task(2, command), false)) {
                if (MessageQueue.offer(SlaveType.Crn, crn.getId(), new Task(2, command))) {
                    return true;
                } else {
                    throw new CoolException("命令下发失败");