From 203223860baa19deb6860eb2ba3181910d662980 Mon Sep 17 00:00:00 2001 From: zhubaomin <zhubaomin> Date: 星期四, 17 四月 2025 14:22:59 +0800 Subject: [PATCH] 1. 轮灌组被终止时灌溉时长为实际数值。2. 计划历史表按照创建时间倒排序。3. 发布计划时判断是否同项目下未完成计划,是否其他项目下使用了本计划的轮灌组且计划未完成。4. 根据计划ID获取计划最新状态。 --- pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmLossDay.java | 107 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 107 insertions(+), 0 deletions(-) diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmLossDay.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmLossDay.java new file mode 100644 index 0000000..36a13c4 --- /dev/null +++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmLossDay.java @@ -0,0 +1,107 @@ +package com.dy.pipIrrGlobal.pojoRm; + +import com.alibaba.fastjson2.annotation.JSONField; +import com.alibaba.fastjson2.writer.ObjectWriterImplToString; +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.DataV1; +import com.dy.common.mw.protocol.p206V2.DataV2; +import com.dy.common.po.BaseEntity; +import com.dy.common.util.DateTime; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; + +import java.util.Date; + +/** + * @Author liurunyu + * @Date 2024/2/28 15:31 + * @LastEditTime 2024/2/28 15:31 + * @Description 鎺у埗鍣ㄦ棩婕忔崯姘撮噺鍘嗗彶鏁版嵁 + */ +@TableName(value="rm_loss_history_history", autoResultMap = true) +@Data +@Builder +@ToString +@NoArgsConstructor +@AllArgsConstructor +@Schema(name = "鎺у埗鍣ㄦ棩婕忔崯姘撮噺鍘嗗彶鏁版嵁 ") +public class RmLossDay implements BaseEntity { + + public static final long serialVersionUID = 202402281620001L; + /** + * 涓婚敭 + */ + @Schema(description = "涓婚敭", requiredMode = Schema.RequiredMode.REQUIRED) + @JSONField(serializeUsing= ObjectWriterImplToString.class) + @TableId(type = IdType.INPUT) + public Long id; + + + /** + * 鎺у埗鍣ㄥ疄浣揑D锛堝閿級 + */ + @Schema(description = "鎺у埗鍣ㄥ疄浣撳閿�", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JSONField(serializeUsing= ObjectWriterImplToString.class) + public Long controllerId; + + /** + * 鍙栨按鍙e疄浣揑D锛堝閿級 + */ + @Schema(description = "鍙栨按鍙e疄浣撳閿�", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JSONField(serializeUsing= ObjectWriterImplToString.class) + public Long intakeId; + + /** + * 鎺у埗鍣ㄥ湴鍧� + */ + @Schema(description = "鎺у埗鍣ㄥ湴鍧�", requiredMode = Schema.RequiredMode.REQUIRED) + public String rtuAddr; + + /** + * 缁熻鏃ワ紝杩欎釜鏃ユ湡閲囩敤RTU鏃堕挓锛屽洜涓烘湁琛ユ姤鐨勯棶棰� + */ + @Schema(description = "涓婃姤鏃ユ湡鏃堕棿", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonFormat(pattern = "yyyy-MM-dd") + public Date dt; + + /** + * 鎺у埗鍣ㄥ綋鏃ユ渶鍚庝笂鎶ユ暟鎹椂闂� + */ + @Schema(description = "鎺у埗鍣ㄥ綋鏃ユ渶鍚庝笂鎶ユ暟鎹椂闂�", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:SS") + public Date dtLast; + + /** + * 鎺у埗鍣ㄥ綋鏃ユ渶鍚庝笂鎶ユ暟鎹腑鐨勬帶鍒跺櫒鏃堕挓 + */ + @Schema(description = "鎺у埗鍣ㄦ椂閽�", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:SS") + public Date dtRtu; + + /** + * 鏃ユ紡鎹熸祦閲� + */ + @Schema(description = "鏃ユ紡鎹熼噺锛坢3锛�", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" ) + public Double lossAmount; + + + public void valueFrom(DataV1 dV1, com.dy.common.mw.protocol.p206V1.upVos.DataCdC0Vo cdData) throws Exception{ + this.dt = DateTime.dateFrom_yyyy_MM_dd1(cdData.rtuDt); + this.dtLast = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dV1.dt); + this.dtRtu = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(cdData.rtuDt); + this.lossAmount = cdData.lossAmount ;// 鎹熷け娴侀噺(浠�0鏃跺埌褰撳墠鐨勬紡鎹熺疮璁℃祦閲忥紝24鏃朵竴涓懆鏈燂紝0鏃跺綊0)鍗曚綅涓簃3銆� + } + + + + public void valueFrom(DataV2 dV2, com.dy.common.mw.protocol.p206V2.upVos.DataCdC0Vo cdData) throws Exception{ + this.dt = DateTime.dateFrom_yyyy_MM_dd1(cdData.rtuDt); + this.dtLast = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dV2.dt); + this.dtRtu = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(cdData.rtuDt); + this.lossAmount = cdData.lossAmount ;// 鎹熷け娴侀噺(浠�0鏃跺埌褰撳墠鐨勬紡鎹熺疮璁℃祦閲忥紝24鏃朵竴涓懆鏈燂紝0鏃跺綊0)鍗曚綅涓簃3銆� + } +} \ No newline at end of file -- Gitblit v1.8.0