From a42ae1ffc20459dc46a88590bc4a94f9280f2d3d Mon Sep 17 00:00:00 2001 From: Junjie <540245094@qq.com> Date: 星期五, 10 五月 2024 15:31:28 +0800 Subject: [PATCH] # --- zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/impl/MainServiceImpl.java | 22 ++++++++++++++++------ 1 files changed, 16 insertions(+), 6 deletions(-) diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/impl/MainServiceImpl.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/impl/MainServiceImpl.java index 74784be..56a8231 100644 --- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/impl/MainServiceImpl.java +++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/impl/MainServiceImpl.java @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.zy.asrs.framework.common.Cools; import com.zy.asrs.framework.common.SnowflakeIdWorker; +import com.zy.asrs.wcs.core.domain.dto.RedisMapDto; import com.zy.asrs.wcs.core.entity.*; import com.zy.asrs.wcs.core.kernel.AnalyzeService; import com.zy.asrs.wcs.core.model.MapNode; @@ -82,7 +83,7 @@ public synchronized void initRealtimeBasMap() { try { List<Dict> dicts = dictService.list(new LambdaQueryWrapper<Dict>() - .like(Dict::getFlag, "map") + .like(Dict::getFlag, "map-") .eq(Dict::getStatus, 1)); TreeMap<Integer, ArrayList<ArrayList<MapNode>>> levData = new TreeMap<>(); @@ -121,6 +122,8 @@ mapNode.setRow(object.getInteger("row")); mapNode.setBay(object.getInteger("bay")); mapNode.setNo(object.getString("row") + "-" + object.getString("bay")); + mapNode.setXBase(object.getInteger("refx")); + mapNode.setYBase(object.getInteger("refy")); nodes.add(mapNode); } @@ -149,6 +152,8 @@ mapNode.setRow(0); mapNode.setBay(0); mapNode.setNo("0-0"); + mapNode.setXBase(0); + mapNode.setYBase(0); //鑾峰彇鏈�闀縭ow int row = 0; @@ -174,11 +179,11 @@ Integer lev = entry.getKey(); Date now = new Date(); - HashMap<String, Object> map = new HashMap<>(); - map.put("data", JSON.toJSONString(lists)); - map.put("create_time", now); - map.put("update_time", now); - map.put("lev", lev); + RedisMapDto map = new RedisMapDto(); + map.setData(JSON.toJSONString(lists)); + map.setCreateTime(now); + map.setUpdateTime(now); + map.setLev(lev); //灏嗗湴鍥炬暟鎹瓨鍏edis redisUtil.set(DeviceRedisConstant.MAP + lev, JSON.toJSONString(map)); @@ -441,6 +446,11 @@ continue; } + ShuttleProtocol shuttleProtocol = shuttleThread.getStatus(); + if (shuttleProtocol == null) { + continue; + } + if (!shuttleThread.isCharging()) { continue; } -- Gitblit v1.9.1