From 8043346013cac57ba9e0b74ec68408a463c84c18 Mon Sep 17 00:00:00 2001 From: wuzeyu <1223318623@qq.com> Date: 星期三, 31 七月 2024 16:38:03 +0800 Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV --- pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/rtuData/p206V1_0_0/TkDealLoss.java | 27 ++++++++++++++------------- 1 files changed, 14 insertions(+), 13 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 1dc4192..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,5 +1,7 @@ package com.dy.rtuMw.server.rtuData.p206V1_0_0; +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; @@ -7,8 +9,6 @@ import com.dy.common.mw.protocol.p206V1_0_0.DataV1_0_1; import com.dy.common.util.DateTime; import com.dy.pipIrrGlobal.pojoPr.PrController; -import com.dy.pipIrrGlobal.pojoRm.RmLossHistory; -import com.dy.pipIrrGlobal.pojoRm.RmLossLast; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -16,7 +16,7 @@ * @Author liurunyu * @Date 2024/2/28 16:31 * @LastEditTime 2024/2/28 16:31 - * @Description 鎺у埗鍣ㄦ紡鎹熺粺璁� + * @Description 鍙栨按鍙f紡鎹熺粺璁� */ public class TkDealLoss extends TaskSurpport { @@ -42,7 +42,7 @@ try{ this.doDeal(sv, controller, d.getRtuAddr(), dV1_0_1, (DataCdC0Vo)cdObj); }catch (Exception e){ - log.error("淇濆瓨閬ユ祴绔欒嚜鎶ュ疄鏃舵暟鎹腑鐨勬紡鎹熸暟鎹椂鍙戠敓寮傚父", e); + log.error("淇濆瓨鍙栨按鍙f紡鎹熺粺璁℃暟鎹椂鍙戠敓寮傚父", e); } } } @@ -56,9 +56,9 @@ * @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殑婕忔崯鏁版嵁 //棣栧厛鐢熸垚鏈�鏂版暟鎹強鍘嗗彶鏁版嵁锛屽苟鍏堜繚瀛� poLast = this.newRmLossLast(controller, rtuAddr, dV1_0_1, dataCdC0Vo); this.newAndSaveHistoryDataDeal(sv, controller, rtuAddr, dV1_0_1, dataCdC0Vo, poLast); @@ -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