From 7efbf921192559cad13a4f8086c46c3617ad2a05 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期四, 31 十月 2024 08:34:42 +0800
Subject: [PATCH] 1、协议解析中,关阀报(83)中的RTU时钟改为关阀时间,但代码误注解掉了这行代码,修改之; 2、通信中间件测试web系统增加查询所在在线情况的命令下发。

---
 pipIrr-platform/pipIrr-web/pipIrr-web-app/src/main/java/com/dy/pipIrrApp/inspect/InspectCtrl.java |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-app/src/main/java/com/dy/pipIrrApp/inspect/InspectCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-app/src/main/java/com/dy/pipIrrApp/inspect/InspectCtrl.java
index 26e4ca5..26446d4 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-app/src/main/java/com/dy/pipIrrApp/inspect/InspectCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-app/src/main/java/com/dy/pipIrrApp/inspect/InspectCtrl.java
@@ -75,7 +75,7 @@
 
                     // 娣诲姞宸℃璁板綍
                     OpeInspect opeInspect = new OpeInspect();
-                    opeInspect.setInspectorId(inspects.getInspectorId());
+                    opeInspect.setInspectorId(inspectorId);
                     if(startTime != null) {
                         opeInspect.setStartTime(startTime);
                     }
@@ -97,7 +97,23 @@
                     }
                 }else {
                     // 璇ュ贰妫�宸蹭笂浼犺繃璁板綍锛岀画浼�
+                    if(stopTime != null) {
+                        OpeInspect inspect = new OpeInspect();
+                        inspect.setId(inspectId);
+                        inspect.setStopTime(stopTime);
+                        inspectSv.updateInspect(inspect);
+                    }
 
+                    if(tracks != null && tracks.size() > 0) {
+                        for (int j = 0; j < tracks.size(); j++) {
+                            tracks.get(j).setId(idLongGenerator.generate());
+                            tracks.get(j).setInspectId(inspectId);
+                        }
+                        Integer rec = inspectSv.insertTracks(tracks);
+                        if(rec == null || rec == 0) {
+                            return BaseResponseUtils.buildErrorMsg("宸℃杞ㄨ抗娣诲姞澶辫触");
+                        }
+                    }
                 }
             }
             return BaseResponseUtils.buildSuccess() ;

--
Gitblit v1.8.0