ZY
2025-04-07 a6f6f82ccb56c168ecd564eca377b41f25a901bb
src/main/java/com/zy/asrs/controller/CrnController.java
@@ -22,7 +22,6 @@
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;
@@ -55,10 +54,6 @@
@RestController
public class CrnController {
    @Value("${wms.url}")
    private String wmsUrl;
    @Value("${wms.movePath}")
    private String movePath;
    @Autowired
@@ -69,8 +64,6 @@
    private BasCrnErrorMapper basCrnErrorMapper;
    @Autowired
    private BasCrnpService basCrnpService;
    @Autowired
    private MainServiceImpl mainService;
    @Autowired
    private LocMastService locMastService;
@@ -612,7 +605,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 +764,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 +795,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("命令下发失败");