From 382d9f2df47c0e26b9a86077ad70c1c317f3d52d Mon Sep 17 00:00:00 2001 From: pjb <pjb123456> Date: 星期一, 11 八月 2025 10:07:03 +0800 Subject: [PATCH] 优化界面 --- src/main/java/com/zy/asrs/controller/RgvController.java | 35 ++++++++++++++++++++++++++++------- 1 files changed, 28 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/zy/asrs/controller/RgvController.java b/src/main/java/com/zy/asrs/controller/RgvController.java index 35fe0b3..10af29a 100644 --- a/src/main/java/com/zy/asrs/controller/RgvController.java +++ b/src/main/java/com/zy/asrs/controller/RgvController.java @@ -11,10 +11,7 @@ import com.zy.asrs.domain.vo.RgvStateTableVo; import com.zy.asrs.entity.*; import com.zy.asrs.mapper.BasRgvErrMapper; -import com.zy.asrs.service.BasCircularShuttleService; -import com.zy.asrs.service.BasDevpPositionService; -import com.zy.asrs.service.BasRgvService; -import com.zy.asrs.service.WrkMastService; +import com.zy.asrs.service.*; import com.zy.asrs.service.impl.MainServiceImpl; import com.zy.asrs.utils.Utils; import com.zy.core.cache.MessageQueue; @@ -60,6 +57,8 @@ private BasRgvErrMapper basRgvErrMapper; @Autowired private BasRgvService basRgvService; + @Autowired + private BasDevpService basDevpService; @Autowired private MainServiceImpl mainService; @Autowired @@ -371,10 +370,32 @@ List<RingThroughParam> result = new ArrayList<>(); List<BasDevpPosition> basDevpPositions = basDevpPositionService.selectList(new EntityWrapper<>()); for (BasDevpPosition basDevpPosition : basDevpPositions){ - if (basDevpPosition.getDevNo() == 134){ - continue; - } RingThroughParam ringThroughParam = new RingThroughParam(); + + ringThroughParam.setModeColor("#FFFFFF"); + ringThroughParam.setStatusColor("#FFFFFF"); + try{ + BasDevp basDevp = basDevpService.selectOne(new EntityWrapper<BasDevp>().eq("dev_no",basDevpPosition.getDevNo())); + if (basDevp.getAutoing().equals("Y")){ + if (basDevp.getLoading().equals("Y")){ + ringThroughParam.setModeColor("#ab1839"); + ringThroughParam.setStatusColor("#ab1839"); + } + if (basDevp.getLoading().equals("N")){ + ringThroughParam.setModeColor("#27AE60"); + ringThroughParam.setStatusColor("#27AE60"); + } + } else { + ringThroughParam.setModeColor("#C0392B"); + ringThroughParam.setStatusColor("#C0392B"); + } + + } catch (Exception e){ + System.out.println(e.getMessage()); + ringThroughParam.setModeColor("#000000"); + ringThroughParam.setStatusColor("#000000"); + + } ringThroughParam.setIndex(basDevpPosition.getDevNo()); // double[] doubles = Utils.RingThroughXYSta(perimeter, perimeter-basDevpPosition.getPlcPosition()); // ringThroughParam.setValueX(doubles[0]>50? doubles[0]+6:doubles[0]-1); -- Gitblit v1.9.1