From ca1971f52b62c18efa1af540431175b8e8ec7cd3 Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期五, 06 六月 2025 17:06:50 +0800
Subject: [PATCH] *

---
 src/main/java/com/zy/asrs/controller/RgvController.java |   39 +++++++++++++++++++++++++++++++++------
 1 files changed, 33 insertions(+), 6 deletions(-)

diff --git a/src/main/java/com/zy/asrs/controller/RgvController.java b/src/main/java/com/zy/asrs/controller/RgvController.java
index c9f1720..2e64a3d 100644
--- a/src/main/java/com/zy/asrs/controller/RgvController.java
+++ b/src/main/java/com/zy/asrs/controller/RgvController.java
@@ -10,10 +10,7 @@
 import com.zy.asrs.domain.vo.*;
 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.NumUtils;
 import com.zy.asrs.utils.Utils;
@@ -57,6 +54,8 @@
     private WrkMastService wrkMastService;
     @Autowired
     private BasRgvErrMapper basRgvErrMapper;
+    @Autowired
+    private BasRgvErrLogService basRgvErrLogService;
     @Autowired
     private BasRgvService basRgvService;
     @Autowired
@@ -370,11 +369,11 @@
         List<RingThroughParam> result = new ArrayList<>();
         List<BasDevpPosition> basDevpPositions = basDevpPositionService.selectList(new EntityWrapper<>());
         for (BasDevpPosition basDevpPosition : basDevpPositions){
-            if (basDevpPosition.getDevNo() == 114){
+            if (basDevpPosition.getDevNo() == 134){
                 continue;
             }
             RingThroughParam ringThroughParam = new RingThroughParam();
-            ringThroughParam.setIndex(basDevpPosition.getDevNo()-100);
+            ringThroughParam.setIndex(basDevpPosition.getDevNo());
 //            double[] doubles = Utils.RingThroughXYSta(perimeter, perimeter-basDevpPosition.getPlcPosition());
 //            ringThroughParam.setValueX(doubles[0]>50? doubles[0]+6:doubles[0]-1);
 //            ringThroughParam.setValueY(doubles[1]>50? doubles[1]+6:doubles[1]-1);
@@ -468,6 +467,21 @@
                         if (rgvCircularShuttleParam.getStatus()==0){
                             rgvCircularShuttleParam.setStatus$(rgvProtocol.statusType.desc);
                         }
+                        if (rgvProtocol.getAlarmList().isEmpty()){
+                            rgvCircularShuttleParam.setError(0);
+                            rgvCircularShuttleParam.setError$("-");
+                        } else {
+                            StringBuilder alarmList = new StringBuilder();
+                            for (Integer alarm : rgvProtocol.getAlarmList()){
+                                BasRgvErr rgvErr = basRgvErrMapper.selectById(alarm);
+                                alarmList.append((rgvErr==null || rgvErr.getErrName()==null)? "鏈煡寮傚父:"+alarm:rgvErr.getErrName());
+                                if (alarm.equals(rgvProtocol.getAlarmList().get(rgvProtocol.getAlarmList().size() - 1))){
+                                    break;
+                                }
+                                alarmList.append("---");
+                            }
+                            rgvCircularShuttleParam.setError$(alarmList.toString());
+                        }
                     }
                 }
             }
@@ -476,6 +490,19 @@
         return R.ok().add(result);
     }
 
+    @PostMapping("/task/rgv/circular/shuttle/mast/position/data/v1")
+//    @ManagerAuth(memo = "浣滀笟淇℃伅")
+    public R rgvCircularShuttleV1(){
+        List<BasRgvErrLog> result = new ArrayList<>();
+        for (int i = 1 ; i<11; i ++){
+            BasRgvErrLog basRgvErrLog = basRgvErrLogService.selectOne(new EntityWrapper<BasRgvErrLog>().eq("rgv_no", i).orderBy("id", false));
+            if (basRgvErrLog!=null){
+                result.add(basRgvErrLog);
+            }
+        }
+        return R.ok().add(result);
+    }
+
 
     @PostMapping("/disable/rgv/status")
 //    @ManagerAuth(memo = "淇敼RGV鐘舵��")

--
Gitblit v1.9.1