From 377e207801eec0014b806394166a68caa52561ab Mon Sep 17 00:00:00 2001
From: Junjie <DELL@qq.com>
Date: 星期三, 07 一月 2026 10:09:20 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/controller/StationController.java | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/main/java/com/zy/asrs/controller/StationController.java b/src/main/java/com/zy/asrs/controller/StationController.java
index 2542008..c90f325 100644
--- a/src/main/java/com/zy/asrs/controller/StationController.java
+++ b/src/main/java/com/zy/asrs/controller/StationController.java
@@ -1,10 +1,10 @@
package com.zy.asrs.controller;
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.zy.asrs.entity.BasDevp;
import com.zy.asrs.service.BasDevpService;
+import com.zy.core.enums.StationCommandType;
+import com.zy.core.model.StationObjModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@@ -40,12 +40,12 @@
Integer taskNo = param.getTaskNo();
Integer targetStationId = param.getTargetStationId();
- JSONObject finalStation = null;
+ StationObjModel finalStation = null;
List<BasDevp> basDevps = basDevpService.selectList(new EntityWrapper<BasDevp>());
for (BasDevp basDevp : basDevps) {
- List<JSONObject> list = JSON.parseArray(basDevp.getStationList(), JSONObject.class);
- for (JSONObject entity : list) {
- if(entity.getInteger("stationId").equals(stationId)){
+ List<StationObjModel> list = basDevp.getStationList$();
+ for (StationObjModel entity : list) {
+ if(entity.getStationId().equals(stationId)){
finalStation = entity;
break;
}
@@ -60,14 +60,14 @@
return R.error("绔欑偣涓嶅瓨鍦�");
}
- Integer devpNo = finalStation.getInteger("devpNo");
+ Integer devpNo = finalStation.getDeviceNo();
StationThread stationThread = (StationThread) SlaveConnection.get(SlaveType.Devp, devpNo);
if (stationThread == null) {
return R.error("绾跨▼涓嶅瓨鍦�");
}
- StationCommand command = stationThread.getMoveCommand(taskNo, stationId, targetStationId, 0);
+ StationCommand command = stationThread.getCommand(StationCommandType.MOVE, taskNo, stationId, targetStationId, 0);
MessageQueue.offer(SlaveType.Devp, devpNo, new Task(2, command));
return R.ok();
}
--
Gitblit v1.9.1