From 4efe2fcc15ec73184dac380df0385de60217fa48 Mon Sep 17 00:00:00 2001
From: zhubaomin <zhubaomin>
Date: 星期五, 18 十月 2024 16:37:34 +0800
Subject: [PATCH] 2024-10-18 朱宝民 待关阀列表
---
pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/rtuData/p206V1_0_0/TkDealLoss.java | 32 ++++++++++++++++++++++----------
1 files changed, 22 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..a34dc2e 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;
@@ -11,6 +11,8 @@
import com.dy.pipIrrGlobal.pojoPr.PrController;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
+
+import java.util.Date;
/**
* @Author liurunyu
@@ -56,7 +58,16 @@
* @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());
+ Date operateDt = controller.getOperateDt() ;//鍙栨按涓笂缁戝畾姝ゆ帶鍒跺櫒鐨勬棩鏈熶笌鏃堕棿
+ if(operateDt != null){
+ String operateDtStr = DateTime.yyyy_MM_dd(operateDt) ;
+ if(operateDtStr.equals(DateTime.yyyy_MM_dd())){
+ //褰撳ぉ鍙戠幇锛堝苟缁戝畾锛夋帶鍒跺櫒锛屾帶鍒跺櫒璁$畻鐨勬紡鎹熼噺涓�瀹氫笉姝g‘锛屽己鍒惰缃垚0
+ dataCdC0Vo.lossAmount = 0.0 ;
+ }
+ }
+
+ RmLossDayLast poLast = sv.getRmLossLast(controller.getIntakeId());
if (poLast == null) {
//鏁版嵁搴撲腑涓嶅瓨鍦ㄨ鍙栨按鍙g殑婕忔崯鏁版嵁
//棣栧厛鐢熸垚鏈�鏂版暟鎹強鍘嗗彶鏁版嵁锛屽苟鍏堜繚瀛�
@@ -67,7 +78,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 +105,7 @@
//杩欑鎯呭喌涓嶅瓨鍦紙RTU鏃堕挓鏃╀簬鏈湴璁板綍涓殑RTU鏃堕挓锛圧TU绌胯秺鍥炶繃鍘讳簡锛屽彲鑳芥椂閽熼噸缃簡锛夛紝姝ょ鎯呭喌涓嶅鐞嗭級
}
}
+ sv.updateRmLossLast(poLast);
}
}
@@ -106,8 +118,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 +136,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 +157,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