From 161ea810e369955f42665ffa06269abbce133bb8 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期四, 08 八月 2024 10:20:47 +0800
Subject: [PATCH] 1、通信中间件实现上行数据任务:更新物理卡和虚拟卡的剩余金额; 2、完善代码。

---
 pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/rtuData/p206V1_0_0/TkDealLoss.java |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/rtuData/p206V1_0_0/TkDealLoss.java b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/rtuData/p206V1_0_0/TkDealLoss.java
index 828d061..fbefd1c 100644
--- a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/rtuData/p206V1_0_0/TkDealLoss.java
+++ b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/rtuData/p206V1_0_0/TkDealLoss.java
@@ -1,7 +1,7 @@
 package com.dy.rtuMw.server.rtuData.p206V1_0_0;
 
-import com.dy.pipIrrGlobal.pojoRm.RmLossHistory;
-import com.dy.pipIrrGlobal.pojoRm.RmLossLast;
+import com.dy.pipIrrGlobal.pojoRm.RmLossDay;
+import com.dy.pipIrrGlobal.pojoRm.RmLossDayLast;
 import com.dy.rtuMw.server.rtuData.TaskSurpport;
 import com.dy.rtuMw.server.rtuData.dbSv.DbSv;
 import com.dy.common.mw.protocol.Data;
@@ -56,7 +56,7 @@
      * @param dataCdC0Vo 寮�闃�涓婃姤鏁版嵁瀵硅薄
      */
     private void doDeal(DbSv sv, PrController controller, String rtuAddr, DataV1_0_1 dV1_0_1, DataCdC0Vo dataCdC0Vo) throws Exception {
-        RmLossLast poLast = sv.getRmLossLast(controller.getIntakeId());
+        RmLossDayLast poLast = sv.getRmLossLast(controller.getIntakeId());
         if (poLast == null) {
             //鏁版嵁搴撲腑涓嶅瓨鍦ㄨ鍙栨按鍙g殑婕忔崯鏁版嵁
             //棣栧厛鐢熸垚鏈�鏂版暟鎹強鍘嗗彶鏁版嵁锛屽苟鍏堜繚瀛�
@@ -67,7 +67,7 @@
             if(DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dataCdC0Vo.rtuDt).equals(poLast.dtRtu)){
                 //鏃堕棿涓�鑷达紝閲嶅涓婃姤鏁版嵁锛屼笉杩涜浠讳綍澶勭悊
             }else{
-                RmLossHistory poHistory = null ;
+                RmLossDay poHistory = null ;
                 if(poLast.lastHistoryId != null){
                     poHistory = sv.getRmLossHistory(poLast.lastHistoryId) ;
                 }
@@ -94,6 +94,7 @@
                     //杩欑鎯呭喌涓嶅瓨鍦紙RTU鏃堕挓鏃╀簬鏈湴璁板綍涓殑RTU鏃堕挓锛圧TU绌胯秺鍥炶繃鍘讳簡锛屽彲鑳芥椂閽熼噸缃簡锛夛紝姝ょ鎯呭喌涓嶅鐞嗭級
                 }
             }
+            sv.updateRmLossLast(poLast);
         }
     }
 
@@ -106,8 +107,8 @@
      * @return
      * @throws Exception
      */
-    private RmLossLast newRmLossLast(PrController controller, String rtuAddr, DataV1_0_1 dV1_0_1, DataCdC0Vo cdData)throws Exception {
-        RmLossLast po = new RmLossLast() ;
+    private RmLossDayLast newRmLossLast(PrController controller, String rtuAddr, DataV1_0_1 dV1_0_1, DataCdC0Vo cdData)throws Exception {
+        RmLossDayLast po = new RmLossDayLast() ;
         po.controllerId = controller==null?null:controller.getId();
         po.intakeId = controller==null?null:controller.getIntakeId();
         po.rtuAddr = rtuAddr;
@@ -124,8 +125,8 @@
      * @return
      * @throws Exception
      */
-    private RmLossHistory newRmLossHistory(PrController controller, String rtuAddr, DataV1_0_1 dV1_0_1, DataCdC0Vo cdData)throws Exception {
-        RmLossHistory po = new RmLossHistory() ;
+    private RmLossDay newRmLossHistory(PrController controller, String rtuAddr, DataV1_0_1 dV1_0_1, DataCdC0Vo cdData)throws Exception {
+        RmLossDay po = new RmLossDay() ;
         po.controllerId = controller==null?null:controller.getId();
         po.intakeId = controller==null?null:controller.getIntakeId();
         po.rtuAddr = rtuAddr;
@@ -145,8 +146,8 @@
      * @throws Exception
      * @return RmLossHistory
      */
-    private RmLossHistory newAndSaveHistoryDataDeal(DbSv sv, PrController controller, String rtuAddr, DataV1_0_1 dV1_0_1, DataCdC0Vo dataCdC0Vo, RmLossLast poLast)throws Exception {
-        RmLossHistory poHistory = this.newRmLossHistory(controller, rtuAddr, dV1_0_1, dataCdC0Vo) ;
+    private RmLossDay newAndSaveHistoryDataDeal(DbSv sv, PrController controller, String rtuAddr, DataV1_0_1 dV1_0_1, DataCdC0Vo dataCdC0Vo, RmLossDayLast poLast)throws Exception {
+        RmLossDay poHistory = this.newRmLossHistory(controller, rtuAddr, dV1_0_1, dataCdC0Vo) ;
         sv.saveRmLossHistory(poHistory);
         //鐢辨渶鏂版暟鎹寔鏈夊巻鍙叉暟鎹腑鐨勬渶鏂拌褰旾D锛屼互鏂逛究蹇�熸煡璇�
         poLast.lastHistoryId = poHistory == null ? null: poHistory.id ;

--
Gitblit v1.8.0