From b34d941094d11e21e21a2ceead8a9fdeee640e2d Mon Sep 17 00:00:00 2001
From: liuhaonan <31457034@qq.com>
Date: 星期五, 27 五月 2022 11:20:55 +0800
Subject: [PATCH] 列表
---
ximon-admin/src/main/java/com/sandu/ximon/admin/service/C3ChargingService.java | 68 +++++++++++++++++++++++++++++++--
1 files changed, 63 insertions(+), 5 deletions(-)
diff --git a/ximon-admin/src/main/java/com/sandu/ximon/admin/service/C3ChargingService.java b/ximon-admin/src/main/java/com/sandu/ximon/admin/service/C3ChargingService.java
index 2b119f6..4e1d2bd 100644
--- a/ximon-admin/src/main/java/com/sandu/ximon/admin/service/C3ChargingService.java
+++ b/ximon-admin/src/main/java/com/sandu/ximon/admin/service/C3ChargingService.java
@@ -18,15 +18,14 @@
import com.sandu.ximon.admin.manager.iot.rrpc.mainboard.MainBoardInvokeSyncService;
import com.sandu.ximon.admin.param.C3ChargingAddParam;
import com.sandu.ximon.admin.param.C3ChargingParam;
-import com.sandu.ximon.admin.param.PoleBindingParam;
import com.sandu.ximon.admin.security.SecurityUtils;
import com.sandu.ximon.admin.utils.LogUtils;
import com.sandu.ximon.admin.utils.RedisUtils;
+import com.sandu.ximon.admin.utils.StoreOperationRecordsUtils;
import com.sandu.ximon.admin.vo.EquipmentInfomation;
import com.sandu.ximon.dao.bo.C3ChargingBo;
import com.sandu.ximon.dao.domain.C3mCharging;
import com.sandu.ximon.dao.domain.C3mChargingCharge;
-import com.sandu.ximon.dao.domain.Pole;
import com.sandu.ximon.dao.domain.PoleBinding;
import com.sandu.ximon.dao.mapper.C3mChargingMapper;
import lombok.AllArgsConstructor;
@@ -34,6 +33,7 @@
import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
+import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Set;
@@ -288,6 +288,7 @@
}
equipmentInfo.setEquipmentCreateTime(one.getUpdateTime());
equipmentInfo.setEquipmentMac(one.getMcuUdid());
+ equipmentInfo.setEquipmentName(one.getC3Name());
}
return equipmentInfo;
}
@@ -312,6 +313,7 @@
throw new BusinessException("C3鍏呯數妗╃‖浠秏cu_udid涓嶅瓨鍦�");
}
CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getPoleDevicesCode(), a5Frame);
+ StoreOperationRecordsUtils.storeInnerFrameData(c3Mac, "C3甯�-寮�濮嬪厖鐢�", a5Frame, commonFrame);
System.out.println(commonFrame + " -----commonFrame");
@@ -345,7 +347,7 @@
throw new BusinessException("C3鍏呯數妗╃‖浠秏cu_udid涓嶅瓨鍦�");
}
CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getPoleDevicesCode(), a5Frame);
-
+ StoreOperationRecordsUtils.storeInnerFrameData(c3Mac, "C3甯�-缁撴潫鍏呯數", a5Frame, commonFrame);
System.out.println(commonFrame + " -----commonFrame");
A5C3OperationReportInnerFrame operationReportInnerFrame = new A5C3OperationReportInnerFrame().transformFrame(commonFrame.getPayload());
@@ -375,6 +377,8 @@
throw new BusinessException("C3鍏呯數妗╃‖浠秏cu_udid涓嶅瓨鍦�");
}
CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getPoleDevicesCode(), a5Frame);
+ StoreOperationRecordsUtils.storeInnerFrameData(c3Mac, "C3甯�-鍚屾缁撴潫", a5Frame, commonFrame);
+
System.out.println(commonFrame + " -----commonFrame");
@@ -403,6 +407,8 @@
throw new BusinessException("C3鍏呯數妗╃‖浠秏cu_udid涓嶅瓨鍦�");
}
CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getPoleDevicesCode(), a5Frame);
+ StoreOperationRecordsUtils.storeInnerFrameData(c3Mac, "C3甯�-浜岀淮鐮�", a5Frame, commonFrame);
+
System.out.println(commonFrame + " -----commonFrame");
@@ -432,6 +438,8 @@
throw new BusinessException("C3鍏呯數妗╃‖浠秏cu_udid涓嶅瓨鍦�");
}
CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getPoleDevicesCode(), a5Frame);
+ StoreOperationRecordsUtils.storeInnerFrameData(c3Mac, "C3甯�-鐗堟湰鏌ヨ", a5Frame, commonFrame);
+
System.out.println(commonFrame + " -----commonFrame");
@@ -461,6 +469,7 @@
throw new BusinessException("C3鍏呯數妗╃‖浠秏cu_udid涓嶅瓨鍦�");
}
CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getPoleDevicesCode(), a5Frame);
+ StoreOperationRecordsUtils.storeInnerFrameData(c3Mac, "C3甯�-鏌ヨ蹇冭烦鍖呴棿闅旀椂闂�", a5Frame, commonFrame);
System.out.println(commonFrame + " -----commonFrame");
@@ -490,6 +499,8 @@
throw new BusinessException("C3鍏呯數妗╃‖浠秏cu_udid涓嶅瓨鍦�");
}
CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getPoleDevicesCode(), a5Frame);
+ StoreOperationRecordsUtils.storeInnerFrameData(c3Mac, "C3甯�-鏌ヨ鐢靛帇/鐢垫祦甯告暟", a5Frame, commonFrame);
+
System.out.println(commonFrame + " -----commonFrame");
@@ -519,6 +530,8 @@
throw new BusinessException("C3鍏呯數妗╃‖浠秏cu_udid涓嶅瓨鍦�");
}
CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getPoleDevicesCode(), a5Frame);
+ StoreOperationRecordsUtils.storeInnerFrameData(c3Mac, "C3甯�-鏌ヨ鍦板潃", a5Frame, commonFrame);
+
System.out.println(commonFrame + " -----commonFrame");
@@ -548,6 +561,8 @@
throw new BusinessException("C3鍏呯數妗╃‖浠秏cu_udid涓嶅瓨鍦�");
}
CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getPoleDevicesCode(), a5Frame);
+ StoreOperationRecordsUtils.storeInnerFrameData(c3Mac, "C3甯�-鏌ヨ鏁呴殰鐮�", a5Frame, commonFrame);
+
System.out.println(commonFrame + " -----commonFrame");
@@ -577,6 +592,8 @@
throw new BusinessException("C3鍏呯數妗╃‖浠秏cu_udid涓嶅瓨鍦�");
}
CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getPoleDevicesCode(), a5Frame);
+ StoreOperationRecordsUtils.storeInnerFrameData(c3Mac, "C3甯�-璇诲彇蹇冭烦鍖�", a5Frame, commonFrame);
+
System.out.println(commonFrame + " -----commonFrame");
@@ -610,6 +627,8 @@
throw new BusinessException("C3鍏呯數妗╃‖浠秏cu_udid涓嶅瓨鍦�");
}
CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getPoleDevicesCode(), a5Frame);
+ StoreOperationRecordsUtils.storeInnerFrameData(c3Mac, "C3甯�-璁剧疆蹇冭烦鍖呴棿闅旀椂闂�", a5Frame, commonFrame);
+
System.out.println(commonFrame + " -----commonFrame");
@@ -641,6 +660,8 @@
throw new BusinessException("C3鍏呯數妗╃‖浠秏cu_udid涓嶅瓨鍦�");
}
CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getPoleDevicesCode(), a5Frame);
+ StoreOperationRecordsUtils.storeInnerFrameData(c3Mac, "C3甯�-璁剧疆鐢靛帇/鐢垫祦甯告暟", a5Frame, commonFrame);
+
System.out.println(commonFrame + " -----commonFrame");
@@ -681,6 +702,8 @@
CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getPoleDevicesCode(), a5Frame);
+ StoreOperationRecordsUtils.storeInnerFrameData(c3Mac, "C3甯�-璁剧疆鍦板潃", a5Frame, commonFrame);
+
System.out.println(commonFrame + " -----commonFrame");
@@ -718,6 +741,7 @@
throw new BusinessException("C3鍏呯數妗╃‖浠秏cu_udid涓嶅瓨鍦�");
}
CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getPoleDevicesCode(), a5Frame);
+ StoreOperationRecordsUtils.storeInnerFrameData(c3Mac, "C3甯�-璁剧疆鏃ュ巻", a5Frame, commonFrame);
System.out.println(commonFrame + " -----commonFrame");
@@ -749,6 +773,7 @@
throw new BusinessException("C3鍏呯數妗╃‖浠秏cu_udid涓嶅瓨鍦�");
}
CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getPoleDevicesCode(), a5Frame);
+ StoreOperationRecordsUtils.storeInnerFrameData(c3Mac, "C3甯�-娓呴櫎鏁呴殰鐮佷笂鎶�", a5Frame, commonFrame);
System.out.println(commonFrame + " -----commonFrame");
@@ -780,6 +805,7 @@
throw new BusinessException("C3鍏呯數妗╃‖浠秏cu_udid涓嶅瓨鍦�");
}
CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getPoleDevicesCode(), a5Frame);
+ StoreOperationRecordsUtils.storeInnerFrameData(c3Mac, "C3甯�-鎭㈠鍑哄巶璁剧疆", a5Frame, commonFrame);
System.out.println(commonFrame + " -----commonFrame");
@@ -808,7 +834,8 @@
throw new BusinessException("C3鍏呯數妗╃‖浠秏cu_udid涓嶅瓨鍦�");
}
CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getPoleDevicesCode(), a5Frame);
-// CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC("32313243305008ff1a06ffff", a5Frame);
+ StoreOperationRecordsUtils.storeInnerFrameData(c3Mac, "C3甯�-杞噸鍚�", a5Frame, commonFrame);
+
System.out.println(commonFrame + " -----commonFrame");
@@ -836,7 +863,23 @@
c3mCharging.setC3Name(c3ChargingAddParam.getC3Name());
}
c3mCharging.setC3Mac(c3ChargingAddParam.getC3Mac());
- return save(c3mCharging);
+ /**
+ * 娣诲姞鍏呯數妗� 鏃ュ織璁板綍寮�濮�
+ */
+ List<String> listCode = new ArrayList<>(1);
+ listCode.add(c3mCharging.getMcuUdid());
+ String content = "{璁惧code锛�" + c3mCharging.getMcuUdid() + "璁惧鍚�:" + c3mCharging.getC3Name() +
+ "}";
+
+ StoreOperationRecordsUtils.storeOperationData(listCode, null, "娣诲姞鍏呯數妗�", content);
+ /**
+ * 娣诲姞鍏呯數妗� 鏃ュ織璁板綍缁撴潫
+ */
+
+ return
+
+ save(c3mCharging);
+
}
public boolean updateC3ChargingName(C3ChargingAddParam c3ChargingAddParam) {
@@ -851,6 +894,21 @@
C3mCharging c3mCharging = new C3mCharging();
c3mCharging.setC3Id(c3ChargingAddParam.getC3Id());
c3mCharging.setC3Name(c3ChargingAddParam.getC3Name());
+
+ /**
+ * 淇敼鍏呯數妗� 鏃ュ織璁板綍寮�濮�
+ */
+ List<String> listCode = new ArrayList<>(1);
+ listCode.add(c3mCharging.getMcuUdid());
+ String content = "{璁惧code锛�" + c3mCharging.getMcuUdid() + "璁惧鍘熷悕:" + one.getC3Name() + "鏇存敼鍚庣殑璁惧鍚�:" + c3mCharging.getC3Name() +
+ "}";
+
+ StoreOperationRecordsUtils.storeOperationData(listCode, null, "缂栬緫鍏呯數妗�", content);
+ /**
+ * 淇敼鍏呯數妗� 鏃ュ織璁板綍缁撴潫
+ */
+
+
return updateById(c3mCharging);
}
--
Gitblit v1.9.3