From e4aa9db5e3c91c969adf2361f8069b8c54244e1a Mon Sep 17 00:00:00 2001 From: zhubaomin <zhubaomin> Date: 星期二, 15 四月 2025 12:02:39 +0800 Subject: [PATCH] 获取轮灌组详情接口,对轮灌组增加终止状态判断 --- pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmOpenCloseValveLast.java | 150 +++++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 135 insertions(+), 15 deletions(-) diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmOpenCloseValveLast.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmOpenCloseValveLast.java index c388d1d..190160a 100644 --- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmOpenCloseValveLast.java +++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmOpenCloseValveLast.java @@ -5,16 +5,13 @@ import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; -import com.dy.common.mw.protocol.p206V1_0_0.DataV1_0_1; -import com.dy.common.mw.protocol.p206V1_0_0.upVos.DataCd83CloseVo; -import com.dy.common.mw.protocol.p206V1_0_0.upVos.DataCd83OpenVo; -import com.dy.common.mw.protocol.p206V1_0_0.upVos.DataCd97Vo; +import com.dy.common.mw.protocol.p206V1.DataV1; +import com.dy.common.mw.protocol.p206V2.DataV2; import com.dy.common.mw.protocol.p206V202404.DataV202404; import com.dy.common.mw.protocol.p206V202404.upVos.DataCd84Vo; import com.dy.common.mw.protocol.p206V202404.upVos.DataCd85Vo; import com.dy.common.po.BaseEntity; import com.dy.common.util.DateTime; -import com.dy.pipIrrGlobal.pojoPr.PrController; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; @@ -102,6 +99,7 @@ * 寮�闃�鏃剁疮璁℃祦閲� */ @Schema(description = "寮�闃�鏃剁疮璁℃祦閲�", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" ) public Double opTotalAmount; /** @@ -120,6 +118,7 @@ * 寮�闃�鏃跺墿浣欓噾棰� */ @Schema(description = "寮�闃�鏃跺墿浣欓噾棰�", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" ) public Double opRemainMoney; /** @@ -132,12 +131,14 @@ * 寮�闃�鏃剁數琛ㄧ疮璁$數閲� */ @Schema(description = "寮�闃�鏃剁數琛ㄧ疮璁$數閲�", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" ) public Double opEleTotalAmount; /** * 寮�闃�鏃剁敤姘存埛鍓╀綑姘撮噺 */ @Schema(description = "寮�闃�鏃剁敤姘存埛鍓╀綑姘撮噺", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" ) public Double opWaterRemainUser; /** @@ -162,6 +163,7 @@ * 鍏抽榾鏃剁疮璁℃祦閲� */ @Schema(description = "鍏抽榾鏃剁疮璁℃祦閲�", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" ) public Double clTotalAmount; /** @@ -180,18 +182,21 @@ * 鍏抽榾鏃跺墿浣欓噾棰� */ @Schema(description = "鍏抽榾鏃跺墿浣欓噾棰�", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" ) public Double clRemainMoney; /** * 鍏抽榾鎶ヤ腑鏈鐢ㄦ按閲� */ @Schema(description = "鍏抽榾鏃舵湰娆$敤姘撮噺", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" ) public Double clThisAmount; /** * 鍏抽榾鎶ヤ腑鏈娑堣垂閲戦 */ @Schema(description = "鍏抽榾鏃舵湰娆℃秷璐归噾棰�", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" ) public Double clThisMoney; /** @@ -204,6 +209,7 @@ * 鍏抽榾鎶ヤ腑姘翠环 */ @Schema(description = "鍏抽榾鎶ヤ腑姘翠环", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" ) public Double clPrice ;//姘翠环 /** * 鍏抽榾鎶ヤ腑鐨勫紑闃�鏃舵帶鍒跺櫒鏃堕挓 @@ -225,20 +231,36 @@ /** * 鐢佃〃绱鐢甸噺 */ + @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" ) public Double clEleTotalAmount; /** * 鐢ㄦ埛鍓╀綑姘撮噺 */ + @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" ) public Double clWaterRemainUser; /** * 鏈浣跨敤鐢甸噺 */ + @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" ) public Double clThisEle; - public void valueFrom(DataV1_0_1 dV1_0_1, DataCd83OpenVo dataCd83OpenVo) throws Exception { - this.opDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dV1_0_1.dt); + public void valueFrom(DataV1 dV1, com.dy.common.mw.protocol.p206V1.upVos.DataCd83OpenVo dataCd83OpenVo) throws Exception { + this.opDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dV1.dt); + this.opType = dataCd83OpenVo.type; + this.opTotalAmount = dataCd83OpenVo.totalAmount; + this.opIcCardNo = dataCd83OpenVo.icCardNo; + this.opIcCardAddr = dataCd83OpenVo.icCardAddr; + this.opRemainMoney = dataCd83OpenVo.remainMoney; + this.opOrderNo = null; //姹熸捣鍗忚鐗规湁 + this.opEleTotalAmount = null; //姹熸捣鍗忚鐗规湁 + this.opWaterRemainUser = null; //姹熸捣鍗忚鐗规湁 + this.openDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dataCd83OpenVo.openDt); + } + + public void valueFrom(DataV2 dV2, com.dy.common.mw.protocol.p206V2.upVos.DataCd83OpenVo dataCd83OpenVo) throws Exception { + this.opDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dV2.dt); this.opType = dataCd83OpenVo.type; this.opTotalAmount = dataCd83OpenVo.totalAmount; this.opIcCardNo = dataCd83OpenVo.icCardNo; @@ -251,8 +273,28 @@ } - public void valueFrom(DataV1_0_1 dV1_0_1, DataCd83CloseVo dataCd83CloseVo) throws Exception { - this.clDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dV1_0_1.dt); + public void valueFrom(DataV1 dV1, com.dy.common.mw.protocol.p206V1.upVos.DataCd83CloseVo dataCd83CloseVo) throws Exception { + this.clDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dV1.dt); + this.clType = dataCd83CloseVo.type; + this.clTotalAmount = dataCd83CloseVo.totalAmount; + this.clIcCardNo = dataCd83CloseVo.icCardNo; + this.clIcCardAddr = dataCd83CloseVo.icCardAddr; + this.clRemainMoney = dataCd83CloseVo.remainMoney; + this.clThisAmount = dataCd83CloseVo.thisAmount; + this.clThisMoney = dataCd83CloseVo.thisMoney; + this.clThisTime = dataCd83CloseVo.thisTime; + this.clPrice = dataCd83CloseVo.price; + this.clOpenDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dataCd83CloseVo.openDt); + this.closeDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dataCd83CloseVo.closeDt); + + this.clOrderNo = null;//姹熸捣鍗忚鐗规湁 + this.clEleTotalAmount = null;//姹熸捣鍗忚鐗规湁 + this.clWaterRemainUser = null;//姹熸捣鍗忚鐗规湁 + this.clThisEle = null;//姹熸捣鍗忚鐗规湁 + } + + public void valueFrom(DataV2 dV2, com.dy.common.mw.protocol.p206V2.upVos.DataCd83CloseVo dataCd83CloseVo) throws Exception { + this.clDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dV2.dt); this.clType = dataCd83CloseVo.type; this.clTotalAmount = dataCd83CloseVo.totalAmount; this.clIcCardNo = dataCd83CloseVo.icCardNo; @@ -273,7 +315,7 @@ public void valueFrom84(DataV202404 dataV202404, DataCd84Vo cdData) throws Exception { this.opDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dataV202404.dt); - this.opType = null; + this.opType = cdData.opType; this.opTotalAmount = cdData.waterTotalAmount; this.opIcCardNo = cdData.icCardNo; this.opIcCardAddr = cdData.icCardAddr; @@ -301,10 +343,11 @@ this.clThisEle = null;//姹熸捣鍗忚鐗规湁 } + public void valueFrom85(DataV202404 dataV202404, DataCd85Vo cdData) throws Exception { this.clOpenDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(cdData.startDt); this.closeDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(cdData.endDt); - this.opType = cdData.opType; + this.clType = cdData.clType; this.clIcCardAddr = cdData.icCardAddr; this.clIcCardNo = cdData.icCardNo; this.clTotalAmount = cdData.waterTotalAmount; @@ -319,8 +362,8 @@ this.clThisEle = cdData.thisEle; } - public void updateFrom(DataV1_0_1 dV1_0_1, DataCd83OpenVo dataCd83OpenVo, Boolean clearCloseValve) throws Exception { - this.opDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dV1_0_1.dt); + public void updateFrom(DataV1 dV1, com.dy.common.mw.protocol.p206V1.upVos.DataCd83OpenVo dataCd83OpenVo, Boolean clearCloseValve) throws Exception { + this.opDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dV1.dt); this.opType = dataCd83OpenVo.type; this.opTotalAmount = dataCd83OpenVo.totalAmount; this.opIcCardNo = dataCd83OpenVo.icCardNo; @@ -333,8 +376,23 @@ } } - public void updateFrom(DataV1_0_1 dV1_0_1, DataCd83CloseVo dataCd83CloseVo, Boolean clearLastOpenValve) throws Exception { - this.clDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dV1_0_1.dt); + + public void updateFrom(DataV2 dV2, com.dy.common.mw.protocol.p206V2.upVos.DataCd83OpenVo dataCd83OpenVo, Boolean clearCloseValve) throws Exception { + this.opDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dV2.dt); + this.opType = dataCd83OpenVo.type; + this.opTotalAmount = dataCd83OpenVo.totalAmount; + this.opIcCardNo = dataCd83OpenVo.icCardNo; + this.opIcCardAddr = dataCd83OpenVo.icCardAddr; + this.opRemainMoney = dataCd83OpenVo.remainMoney; + this.openDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dataCd83OpenVo.openDt); + + if (clearCloseValve != null && clearCloseValve.booleanValue()) { + this.clearCloseValue(); + } + } + + public void updateFrom(DataV1 dV1, com.dy.common.mw.protocol.p206V1.upVos.DataCd83CloseVo dataCd83CloseVo, Boolean clearLastOpenValve) throws Exception { + this.clDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dV1.dt); this.clType = dataCd83CloseVo.type; this.clTotalAmount = dataCd83CloseVo.totalAmount; this.clIcCardNo = dataCd83CloseVo.icCardNo; @@ -352,6 +410,68 @@ } } + + public void updateFrom(DataV2 dV2, com.dy.common.mw.protocol.p206V2.upVos.DataCd83CloseVo dataCd83CloseVo, Boolean clearLastOpenValve) throws Exception { + this.clDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dV2.dt); + this.clType = dataCd83CloseVo.type; + this.clTotalAmount = dataCd83CloseVo.totalAmount; + this.clIcCardNo = dataCd83CloseVo.icCardNo; + this.clIcCardAddr = dataCd83CloseVo.icCardAddr; + this.clRemainMoney = dataCd83CloseVo.remainMoney; + this.clThisAmount = dataCd83CloseVo.thisAmount; + this.clThisMoney = dataCd83CloseVo.thisMoney; + this.clThisTime = dataCd83CloseVo.thisTime; + this.clPrice = dataCd83CloseVo.price; + this.clOpenDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dataCd83CloseVo.openDt); + this.closeDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dataCd83CloseVo.closeDt) ; + + if(clearLastOpenValve != null && clearLastOpenValve.booleanValue()){ + this.clearOpenValue(); + } + } + + + public void updateFrom(DataV202404 dataV202404, DataCd84Vo cdData, Boolean clearLastCloseValve) throws Exception { + this.opDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dataV202404.dt); + this.opType = cdData.opType; + this.opTotalAmount = cdData.waterTotalAmount; + this.opIcCardNo = cdData.icCardNo; + this.opIcCardAddr = cdData.icCardAddr; + this.opRemainMoney = cdData.moneyRemainUser; + this.opOrderNo = cdData.orderNo; //姹熸捣鍗忚鐗规湁 + this.opEleTotalAmount = cdData.eleTotalAmount; //姹熸捣鍗忚鐗规湁 + this.opWaterRemainUser = cdData.waterRemainUser; //姹熸捣鍗忚鐗规湁 + this.openDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(cdData.openDt); + + if (clearLastCloseValve != null && clearLastCloseValve.booleanValue()) { + this.clearCloseValue(); + } + } + + + public void updateFrom(DataV202404 dataV202404, DataCd85Vo cdData, Boolean clearLastOpenValve) throws Exception { + this.clDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dataV202404.dt); + this.clType = cdData.clType; + this.clTotalAmount = cdData.waterTotalAmount; + this.clIcCardNo = cdData.icCardNo; + this.clIcCardAddr = cdData.icCardAddr; + this.clOrderNo = cdData.orderNo; + this.clRemainMoney = cdData.moneyRemain; + this.clEleTotalAmount = cdData.eleTotalAmount; + this.clWaterRemainUser = cdData.waterRemain; + this.clThisAmount = cdData.thisWater; + this.clThisMoney = cdData.thisMoney; + this.clThisTime = cdData.thisDuration; + this.clThisEle = cdData.thisEle; + this.clPrice = null; + this.clOpenDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(cdData.startDt); + this.closeDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(cdData.endDt) ; + + if(clearLastOpenValve != null && clearLastOpenValve.booleanValue()){ + this.clearOpenValue(); + } + } + public void clearCloseValue(){ this.clDt = null; this.clType = null; -- Gitblit v1.8.0