| | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.zy.asrs.entity.BasDevp; |
| | | import com.zy.asrs.service.BasDevpService; |
| | | 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; |
| | |
| | | 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; |
| | | } |
| | |
| | | return R.error("站点不存在"); |
| | | } |
| | | |
| | | Integer devpNo = finalStation.getInteger("devpNo"); |
| | | Integer devpNo = finalStation.getDeviceNo(); |
| | | |
| | | StationThread stationThread = (StationThread) SlaveConnection.get(SlaveType.Devp, devpNo); |
| | | if (stationThread == null) { |