From e5c29d6ac2b210a9385723598d79a42ae5a9679e Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期三, 23 四月 2025 15:20:13 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV

---
 pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/command/ComSupport.java |   20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/command/ComSupport.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/command/ComSupport.java
index 2afc76d..646d9be 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/command/ComSupport.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/command/ComSupport.java
@@ -12,6 +12,7 @@
 import com.dy.pipIrrGlobal.command.enums.LastOperateENUM;
 import com.dy.pipIrrGlobal.command.result.CommandResultCode;
 import com.dy.pipIrrGlobal.daoBa.BaSettingsMapper;
+import com.dy.pipIrrGlobal.daoIr.IrIntakeOperateMapper;
 import com.dy.pipIrrGlobal.daoPr.PrCommonIntakesMapper;
 import com.dy.pipIrrGlobal.daoPr.PrControllerMapper;
 import com.dy.pipIrrGlobal.daoRm.RmCommandHistoryMapper;
@@ -34,7 +35,10 @@
 import java.text.SimpleDateFormat;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
-import java.util.*;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Random;
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
@@ -83,6 +87,9 @@
 
     @Autowired
     private PrCommonIntakesMapper prCommonIntakesMapper;
+
+    @Autowired
+    private IrIntakeOperateMapper irIntakeOperateMapper;
 
     public static ComSupport comSupport;
 
@@ -279,6 +286,7 @@
         Object param = po.getParam();
         String rtuResultSendWebUrl = po.getRtuResultSendWebUrl();
         Long operator = po.getOperator();
+        Byte openType = po.getOpenType();
 
         // 鏋勯�犲懡浠�
         Command com = command(comId, commandCode, rtuAddr, protocol, rtuResultSendWebUrl, param);
@@ -306,6 +314,7 @@
             rmCommandHistory.setResult((byte) 0);
             rmCommandHistoryMapper.updateByPrimaryKeySelective(rmCommandHistory);
             //return BaseResponseUtils.buildErrorMsg(response_CallBack.getContent().toString());
+            irIntakeOperateMapper.updateByCommandId(comId, (byte)2, response_CallBack.getMsg());
             return BaseResponseUtils.buildErrorMsg(response_CallBack.getMsg());
         }
 
@@ -321,6 +330,7 @@
             rmCommandHistory.setComId(comId);
             rmCommandHistory.setResult((byte) 0);
             rmCommandHistoryMapper.updateByPrimaryKeySelective(rmCommandHistory);
+            irIntakeOperateMapper.updateByCommandId(comId, (byte)2, "鍥炶皟瓒呮椂");
             return BaseResponseUtils.buildErrorMsg(CommandResultCode.GET_RESULT_IN_ONE_MINUTE.getMessage());
         }
 
@@ -359,6 +369,10 @@
                 rmCommandHistory.setResult((byte) 0);
                 rmCommandHistoryMapper.updateByPrimaryKeySelective(rmCommandHistory);
 
+                if(openType != null && openType == 1 ) {
+                    irIntakeOperateMapper.updateByCommandId(comId, (byte)2, "寮�闃�澶辫触");
+                }
+
                 // 寮�闃�澶辫触鍒欒В闄ゅ崰鐢紝鍏抽榾澶辫触鍒欏崰鐢�
                 if (comType != null) {
                     SeVirtualCard virtualCard = new SeVirtualCard();
@@ -387,6 +401,10 @@
                 rmCommandHistory.setResult((byte) 1);
                 rmCommandHistoryMapper.updateByPrimaryKeySelective(rmCommandHistory);
 
+                if(openType != null && openType == 1) {
+                    irIntakeOperateMapper.updateByCommandId(comId, (byte)1, null);
+                }
+
                 // 寮�闃�鎴愬姛鍒欏崰鐢紝鍏抽榾鎴愬姛涓嶅崰鐢�
                 if (comType != null) {
                     SeVirtualCard virtualCard = new SeVirtualCard();

--
Gitblit v1.8.0