From 4513ef24bf9b188c2a77d6ce94f1a6b7e9ebf0e6 Mon Sep 17 00:00:00 2001
From: zuoxiao <470321431@qq.com>
Date: 星期日, 27 四月 2025 20:40:19 +0800
Subject: [PATCH] fix(irrigatePlan): 修正灌溉计划开始时间逻辑

---
 pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/parse/global/GlParse.java |   21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/parse/global/GlParse.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/parse/global/GlParse.java
index d03d85e..a2df974 100644
--- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/parse/global/GlParse.java
+++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/parse/global/GlParse.java
@@ -1,5 +1,6 @@
 package com.dy.common.mw.protocol.p206V202404.parse.global;
 
+import com.dy.common.mw.protocol.p206V202404.CommonV202404;
 import com.dy.common.mw.protocol.p206V202404.ProtocolConstantV206V202404;
 import com.dy.common.mw.protocol.p206V202404.upVos.*;
 import com.dy.common.util.ByteUtil;
@@ -60,6 +61,14 @@
     public static void parseAlarmAndState(byte[] bs, int index, AlarmVo vo){
         byte b = bs[index] ;
         vo.statePump = (byte)(b & 0x1) ;
+
+        //涓庢祴鎺т竴浣撻榾鍏煎
+        if(vo.statePump == 0){
+            vo.statePump = (byte)1;
+        }else{
+            vo.statePump = (byte)0;
+        }
+
         vo.alarmWaterRemain = (byte)((b >> 1) & 1) ;
         vo.alarm0WaterRemain = (byte)((b >> 2) & 1) ;
         vo.alarmExceedYear = (byte)((b >> 3) & 1) ;
@@ -242,6 +251,8 @@
 
         index ++ ;
         cdData.clType = bs[index];
+        //杩涜鍏煎杞崲
+        cdData.clType = CommonV202404.closeType2P206V1(cdData.clType) ;
 
         index++ ;
         cdData.icCardAddr = ByteUtil.bytes2Hex(bs, false, index, 4) ;
@@ -284,6 +295,10 @@
 
         index += 2 ;
         GlParse.parseAlarmAndState(bs, index, cdData) ;//鍥涗釜瀛楄妭
+
+        index += 4 ;
+        cdData.price = ByteUtil.BCD2Int_LE(bs, index, index + 1)/100.0 ;
+
     }
     /**
      * 鍒嗘瀽鍔熻兘93銆丄3鏁版嵁
@@ -299,10 +314,10 @@
         cdData.projectNo = (int)bs[index];
 
         index ++ ;
-        cdData.opResult = bs[index];
+        cdData.clResult = bs[index];
 
         index ++ ;
-        cdData.opType = bs[index];
+        cdData.clType = bs[index];
 
         index++ ;
         cdData.icCardAddr = ByteUtil.bytes2Hex(bs, false, index, 4) ;
@@ -316,7 +331,7 @@
         index += 8 ;
         cdData.startDt  = GlParse.parseRtuDt(bs, index) ;
 
-        if(cdData.opResult == (byte)0x81){
+        if(cdData.clResult == (byte)0x81){
             //澶辫触浜嗭紝涓嬮潰灏辨病鏈夋暟鎹簡
             return ;
         }

--
Gitblit v1.8.0