From 26d63d120e517624be6fcf70ae9620c3582a91dd Mon Sep 17 00:00:00 2001
From: Administrator <zhubaomin>
Date: 星期二, 18 六月 2024 17:35:06 +0800
Subject: [PATCH] 2024-06-18 朱宝民 优化开关阀逻辑
---
pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/resources/application-database.yml | 4
pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/rtuData/p206V1_0_0/TkDealOpenValveReport.java | 6
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/command/ComSupport.java | 2
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveHistoryMapper.xml | 337 +++++-------
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/valve/ValveCtrl.java | 18
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/ValveCtrl.java | 8
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmCommandHistoryMapper.xml | 3
pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/rtuData/p206V1_0_0/TkDealCloseValveReport.java | 6
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/common/CommandSv.java | 28 +
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOpenCloseValveHistoryMapper.java | 46 +
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtu/RtuCtrl.java | 4
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmCommandHistoryMapper.java | 3
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOpenCloseValveLastMapper.java | 57 +
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmOpenCloseValveLast.java | 393 +++-----------
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/webUtil/BaseResponseUtils.java | 4
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveLastMapper.xml | 362 +++++-------
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmOpenCloseValveHistory.java | 239 +++-----
pipIrr-platform/pipIrr-global/src/main/resources/application-database-ym.yml | 4
18 files changed, 624 insertions(+), 900 deletions(-)
diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/webUtil/BaseResponseUtils.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/webUtil/BaseResponseUtils.java
index 64d0dda..e7606f5 100644
--- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/webUtil/BaseResponseUtils.java
+++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/webUtil/BaseResponseUtils.java
@@ -40,6 +40,10 @@
return buildResult(ResultCodeMsg.RsCode.ERROR_CODE,ResultCodeMsg.RsMsg.ERROR_MESSAGE, message);
}
+ public static BaseResponse buildErrorMsg(String msg) {
+ return buildResult(ResultCodeMsg.RsCode.ERROR_CODE, msg, null);
+ }
+
public static BaseResponse buildError(Object obj){
return buildResult(ResultCodeMsg.RsCode.ERROR_CODE,ResultCodeMsg.RsMsg.ERROR_MESSAGE, obj);
}
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/command/ComSupport.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/command/ComSupport.java
index 7673734..644f9b7 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/command/ComSupport.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/command/ComSupport.java
@@ -185,7 +185,7 @@
try {
CompletableFuture<Data> feature = (CompletableFuture<Data>) features.get(comId);
System.out.println("receive result ID:" + comId);
- Data resultData = feature.get(30, TimeUnit.SECONDS);
+ Data resultData = feature.get(180, TimeUnit.SECONDS);
features.remove(comId);
Long commandId = Long.parseLong(resultData.getCommandId());
if(commandId.equals(comId)) {
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmCommandHistoryMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmCommandHistoryMapper.java
index 48bc0a5..7161e1c 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmCommandHistoryMapper.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmCommandHistoryMapper.java
@@ -43,5 +43,6 @@
* @param intakeId
* @return
*/
- VoUnclosedParam getUncloseParam(Long intakeId);
+ //VoUnclosedParam getUncloseParam(Long intakeId);
+ VoUnclosedParam getUncloseParam(@Param("onLineMap") String onLineMap, @Param("intakeId")Long intakeId);
}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOpenCloseValveHistoryMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOpenCloseValveHistoryMapper.java
index 412db49..ab59ab4 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOpenCloseValveHistoryMapper.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOpenCloseValveHistoryMapper.java
@@ -1,27 +1,61 @@
package com.dy.pipIrrGlobal.daoRm;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveHistory;
import org.apache.ibatis.annotations.Mapper;
/**
- * @author ZhuBaoMin
- * @date 2024-06-17 11:27
- * @LastEditTime 2024-06-17 11:27
+ * @Author liurunyu
+ * @Date 2024/2/23 15:42
+ * @LastEditTime 2024/2/23 15:42
* @Description
*/
-
@Mapper
-public interface RmOpenCloseValveHistoryMapper extends BaseMapper<RmOpenCloseValveHistory> {
+public interface RmOpenCloseValveHistoryMapper {
+ /**
+ * delete by primary key
+ *
+ * @param id primaryKey
+ * @return deleteCount
+ */
int deleteByPrimaryKey(Long id);
+ /**
+ * insert record to table
+ *
+ * @param record the record
+ * @return insert count
+ */
int insert(RmOpenCloseValveHistory record);
+ /**
+ * insert record to table selective
+ *
+ * @param record the record
+ * @return insert count
+ */
int insertSelective(RmOpenCloseValveHistory record);
+ /**
+ * select by primary key
+ *
+ * @param id primary key
+ * @return object by primary key
+ */
RmOpenCloseValveHistory selectByPrimaryKey(Long id);
+ /**
+ * update record selective
+ *
+ * @param record the updated record
+ * @return update count
+ */
int updateByPrimaryKeySelective(RmOpenCloseValveHistory record);
+ /**
+ * update record
+ *
+ * @param record the updated record
+ * @return update count
+ */
int updateByPrimaryKey(RmOpenCloseValveHistory record);
}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOpenCloseValveLastMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOpenCloseValveLastMapper.java
index b750ae4..8dbadd4 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOpenCloseValveLastMapper.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmOpenCloseValveLastMapper.java
@@ -1,35 +1,64 @@
package com.dy.pipIrrGlobal.daoRm;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveLast;
import org.apache.ibatis.annotations.Mapper;
-/**
- * @author ZhuBaoMin
- * @date 2024-06-17 11:28
- * @LastEditTime 2024-06-17 11:28
- * @Description
- */
+import java.util.List;
+/**
+ * @Author liurunyu
+ * @Date 2024/2/23 16:00
+ * @LastEditTime 2024/2/23 16:00
+ * @Description
+ */
@Mapper
-public interface RmOpenCloseValveLastMapper extends BaseMapper<RmOpenCloseValveLast> {
+public interface RmOpenCloseValveLastMapper {
+ /**
+ * delete by primary key
+ * @param id primaryKey
+ * @return deleteCount
+ */
int deleteByPrimaryKey(Long id);
+ /**
+ * insert record to table
+ * @param record the record
+ * @return insert count
+ */
int insert(RmOpenCloseValveLast record);
+ /**
+ * insert record to table selective
+ * @param record the record
+ * @return insert count
+ */
int insertSelective(RmOpenCloseValveLast record);
+ /**
+ * select by primary key
+ * @param id primary key
+ * @return object by primary key
+ */
RmOpenCloseValveLast selectByPrimaryKey(Long id);
-
- int updateByPrimaryKeySelective(RmOpenCloseValveLast record);
-
- int updateByPrimaryKey(RmOpenCloseValveLast record);
/**
* select by rtuAddr
- *
* @param rtuAddr rtuAddr
* @return object by rtuAddr
*/
- //List<RmOpenCloseValveLast> selectByRtuAddr(String rtuAddr);
+ List<RmOpenCloseValveLast> selectByRtuAddr(String rtuAddr);
+
+ /**
+ * update record selective
+ * @param record the updated record
+ * @return update count
+ */
+ int updateByPrimaryKeySelective(RmOpenCloseValveLast record);
+
+ /**
+ * update record
+ * @param record the updated record
+ * @return update count
+ */
+ int updateByPrimaryKey(RmOpenCloseValveLast record);
}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmOpenCloseValveHistory.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmOpenCloseValveHistory.java
index 0f0e31f..8cc409c 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmOpenCloseValveHistory.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmOpenCloseValveHistory.java
@@ -5,10 +5,7 @@
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
-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.util.DateTime;
+import com.dy.common.po.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
@@ -16,201 +13,155 @@
import java.util.Date;
/**
- * @author ZhuBaoMin
- * @date 2024-06-17 11:27
- * @LastEditTime 2024-06-17 11:27
- * @Description
+ * @Author liurunyu
+ * @Date 2024/2/23 15:42
+ * @LastEditTime 2024/2/23 15:42
+ * @Description 鎺у埗鍣ㄥ紑鍏抽榾涓婃姤鏁版嵁
*/
-
-/**
- * 寮�鍏抽榾鎶ュ巻鍙叉暟鎹〃
- */
-
-@TableName(value="rm_open_close_valve_history", autoResultMap = true)
+@TableName(value="rm_open_close_valve_report", autoResultMap = true)
@Data
@Builder
@ToString
@NoArgsConstructor
@AllArgsConstructor
-@Schema(name = "寮�鍏抽榾鎶ュ巻鍙叉暟鎹〃")
-public class RmOpenCloseValveHistory {
- public static final long serialVersionUID = 202406171339001L;
+@Schema(name = "鎺у埗鍣ㄥ紑鍏抽榾涓婃姤鏁版嵁")
+public class RmOpenCloseValveHistory implements BaseEntity {
+ public static final long serialVersionUID = 202402231450001L;
/**
* 涓婚敭
*/
+ @Schema(description = "涓婚敭", requiredMode = Schema.RequiredMode.REQUIRED)
@JSONField(serializeUsing= ObjectWriterImplToString.class)
@TableId(type = IdType.INPUT)
- private Long id;
-
+ public Long id;
/**
- * 鎺у埗鍣ㄥ疄浣揑D锛堝閿級
- */
+ * 鎺у埗鍣ㄥ疄浣揑D锛堝閿級
+ */
+ @Schema(description = "鎺у埗鍣ㄥ疄浣撳閿�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JSONField(serializeUsing= ObjectWriterImplToString.class)
- private Long controllerId;
+ public Long controllerId;
/**
- * 鍙栨按鍙e疄浣揑D锛堝閿級
- */
+ * 鍙栨按鍙e疄浣揑D锛堝閿級
+ */
+ @Schema(description = "鍙栨按鍙e疄浣撳閿�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JSONField(serializeUsing= ObjectWriterImplToString.class)
- private Long intakeId;
+ public Long intakeId;
/**
- * 鎺у埗鍣ㄥ湴鍧�
- */
- private String rtuAddr;
+ * 鎺у埗鍣ㄥ湴鍧�
+ */
+ @Schema(description = "鎺у埗鍣ㄥ湴鍧�", requiredMode = Schema.RequiredMode.REQUIRED)
+ public String rtuAddr;
/**
- * 寮�闃�鏁版嵁鎺ユ敹鏃ユ湡鏃堕棿
- */
+ * 寮�闃�鏁版嵁鎺ユ敹鏃ユ湡鏃堕棿
+ */
+ @Schema(description = "鏁版嵁鎺ユ敹鏃ユ湡鏃堕棿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private Date opDt;
+ public Date opDt;
/**
- * 寮�闃�鎺у埗鍣ㄦ椂閽�
- */
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private Date opRtuDt;
+ * 寮�闃�绫诲瀷
+ */
+ @Schema(description = "寮�闃�绫诲瀷", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Byte opType;
/**
- * IC鍗″湴鍧�锛堣繙绋嬪叧闂椂涓�0锛�
- */
- private String opIcCardAddr;
+ * 寮�闃�鏃剁疮璁℃祦閲�
+ */
+ @Schema(description = "寮�闃�鏃剁疮璁℃祦閲�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Double opTotalAmount;
/**
- * IC鍗$紪鍙凤紙17浣嶆暟瀛楋級
- */
- private String opIcCardNo;
+ * 寮�闃�IC鍗$紪鍙�
+ */
+ @Schema(description = "寮�闃�IC鍗$紪鍙�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public String opIcCardNo;
/**
- * 寮�闃�璁㈠崟鍙凤紙16浣嶆暟瀛楋級
- */
- private String opOrderNo;
+ * 寮�闃�ic鍗″湴鍧�
+ */
+ @Schema(description = "寮�闃�ic鍗″湴鍧�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public String opIcCardAddr;
/**
- * 寮�娉�/闃�鏃堕棿
- */
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private Date openDt;
+ * 寮�闃�鏃跺墿浣欓噾棰�
+ */
+ @Schema(description = "寮�闃�鏃跺墿浣欓噾棰�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Double opRemainMoney;
/**
- * 寮�闃�姘磋〃绱姘撮噺
- */
- private Double opWaterTotalAmount;
+ * 寮�闃�鏃舵帶鍒跺櫒鏃堕挓
+ */
+ @Schema(description = "寮�闃�鏃舵帶鍒跺櫒鏃堕挓", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Date openDt;
/**
- * 寮�闃�鐢佃〃绱鐢甸噺
- */
- private Double opEleTotalAmount;
+ * 鍏抽榾鏁版嵁鎺ユ敹鏃ユ湡鏃堕棿
+ */
+ @Schema(description = "鍏抽榾鏁版嵁鎺ユ敹鏃ユ湡鏃堕棿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Date clDt;
/**
- * 寮�闃�鐢ㄦ埛鍓╀綑閲戦
- */
- private Double opMoneyRemainUser;
+ * 鍏抽榾绫诲瀷
+ */
+ @Schema(description = "鍏抽榾绫诲瀷", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Byte clType;
/**
- * 寮�闃�鐢ㄦ埛鍓╀綑姘撮噺
- */
- private Double opWaterRemainUser;
+ * 鍏抽榾鏃剁疮璁℃祦閲�
+ */
+ @Schema(description = "鍏抽榾鏃剁疮璁℃祦閲�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Double clTotalAmount;
/**
- * 鍏虫车/闃�鏂瑰紡
- */
- private Byte opType;
+ * 鍏抽榾鏃禝C鍗$紪鍙�
+ */
+ @Schema(description = "鍏抽榾鏃禝C鍗$紪鍙�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public String clIcCardNo;
/**
- * 鍏抽榾IC鍗″湴鍧�锛堣繙绋嬪叧闂椂涓�0锛�
- */
- private String clIcCardAddr;
+ * 鍏抽榾鏃禝C鍗″湴鍧�
+ */
+ @Schema(description = "鍏抽榾鏃禝C鍗″湴鍧�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public String clIcCardAddr;
/**
- * 鍏抽榾IC鍗$紪鍙凤紙17浣嶆暟瀛楋級
- */
- private String clIcCardNo;
+ * 鍏抽榾鏃跺墿浣欓噾棰�
+ */
+ @Schema(description = "鍏抽榾鏃跺墿浣欓噾棰�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Double clRemainMoney;
/**
- * 鍏抽榾璁㈠崟鍙凤紙16浣嶆暟瀛楋級
- */
- private String clOrderNo;
+ * 鍏抽榾鎶ヤ腑鏈鐢ㄦ按閲�
+ */
+ @Schema(description = "鍏抽榾鏃舵湰娆$敤姘撮噺", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Double clThisAmount;
/**
- * 寮�濮嬫椂闂�(鍒嗘椂鏃ユ湀)
- */
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private Date startDt;
+ * 鍏抽榾鎶ヤ腑鏈娑堣垂閲戦
+ */
+ @Schema(description = "鍏抽榾鏃舵湰娆℃秷璐归噾棰�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Double clThisMoney;
/**
- * 缁撴潫鏃堕棿(鍒嗘椂鏃ユ湀)
- */
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private Date endDt;
+ * 鍏抽榾鎶ヤ腑鏈鐢ㄦ按鏃堕暱锛堝垎閽燂級
+ */
+ @Schema(description = "鍏抽榾鏃舵湰娆$敤姘存椂闀匡紙鍒嗛挓锛�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Integer clThisTime;
/**
- * 姘磋〃绱娴侀噺
- */
- private Double clWaterTotalAmount;
+ * 鍏抽榾鎶ヤ腑鐨勫紑闃�鏃舵帶鍒跺櫒鏃堕挓
+ */
+ @Schema(description = "鍏抽榾鎶ヤ腑鐨勫紑闃�鏃舵帶鍒跺櫒鏃堕挓", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Date clOpenDt;
/**
- * 鐢佃〃绱鐢甸噺
- */
- private Double clEleTotalAmount;
+ * 鍏抽榾鏃舵帶鍒跺櫒鏃堕挓
+ */
+ @Schema(description = "鍏抽榾鏃舵帶鍒跺櫒鏃堕挓", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Date closeDt;
- /**
- * 鐢ㄦ埛鍓╀綑閲戦
- */
- private Double clMoneyRemainUser;
-
- /**
- * 鐢ㄦ埛鍓╀綑姘撮噺
- */
- private Double clWaterRemainUser;
-
- /**
- * 鏈浣跨敤鐢甸噺
- */
- private Double thisEle;
-
- /**
- * 鏈浣跨敤姘撮噺
- */
- private Double thisWater;
-
- /**
- * 鏈浣跨敤閲戦
- */
- private Double thisMoney;
-
- /**
- * 鏈浣跨敤鏃堕棿闀�
- */
- private Integer thisDuration;
-
- public void valueFrom84(DataV202404 dataV202404, DataCd84Vo cdData) throws Exception{
- this.opDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dataV202404.dt);
- this.openDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(cdData.opDt);
- this.opIcCardAddr = cdData.icCardAddr;;
- this.opIcCardNo = cdData.icCardNo;
- this.opOrderNo = cdData.orderNo;
- this.opWaterTotalAmount = cdData.waterTotalAmount;
- this.opEleTotalAmount = cdData.eleTotalAmount;
- this.opMoneyRemainUser = cdData.moneyRemainUser;
- this.opWaterRemainUser = cdData.waterRemainUser;
- }
-
- public void valueFrom85(DataV202404 dataV202404, DataCd85Vo cdData) throws Exception{
- this.startDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(cdData.startDt);
- this.endDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(cdData.endDt);
- this.opType = cdData.opType;
- this.clIcCardAddr = cdData.icCardAddr;
- this.clIcCardNo = cdData.icCardNo;
- this.clOrderNo = cdData.orderNo;
- this.clWaterTotalAmount = cdData.waterTotalAmount;
- this.clEleTotalAmount = cdData.eleTotalAmount;
- this.clMoneyRemainUser = cdData.moneyRemain;;
- this.clWaterRemainUser = cdData.waterRemain;
- this.thisEle = cdData.thisEle;
- this.thisWater = cdData.thisWater;
- this.thisMoney = cdData.thisMoney;
- this.thisDuration = cdData.thisDuration;;
- }
}
\ No newline at end of file
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 bf9fa43..8950a0f 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
@@ -1,380 +1,175 @@
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.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.*;
+
import java.util.Date;
/**
- * @author ZhuBaoMin
- * @date 2024-06-17 11:28
- * @LastEditTime 2024-06-17 11:28
+ * @Author liurunyu
+ * @Date 2024/2/23 16:00
+ * @LastEditTime 2024/2/23 16:00
* @Description
*/
-
-/**
- * 寮�鍏抽榾鎶ユ渶鏂版暟鎹〃
- */
+@TableName(value="rm_open_close_valve_last", autoResultMap = true)
+@Data
+@Builder
+@ToString
+@NoArgsConstructor
+@AllArgsConstructor
+@Schema(name = "鎺у埗鍣ㄥ紑鍏抽榾涓婃姤鏈�鏂版暟鎹�")
public class RmOpenCloseValveLast {
+
public static final long serialVersionUID = 202402231602001L;
/**
* 涓婚敭
*/
- private Long id;
+ @Schema(description = "涓婚敭", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ @TableId(type = IdType.INPUT)
+ public Long id;
+
+ /**
+ * 鐢辨渶鏂版暟鎹寔鏈夊巻鍙叉暟鎹腑鐨勬渶鏂拌褰旾D锛屼互鏂逛究蹇�熸煡璇�
+ * json涓嶅簭鍒楀寲姝ゅ睘鎬э紝鍗充笉鍚戝墠绔〉闈㈠彂閫佸強鏄剧ず
+ */
+ @Schema(hidden=true)
+ @JSONField(serialize = false)
+ public Long lastHistoryId;
/**
* 鎺у埗鍣ㄥ疄浣揑D锛堝閿級
*/
- private Long controllerId;
+ @Schema(description = "鎺у埗鍣ㄥ疄浣撳閿�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ public Long controllerId;
/**
* 鍙栨按鍙e疄浣揑D锛堝閿級
*/
- private Long intakeId;
+ @Schema(description = "鍙栨按鍙e疄浣撳閿�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ public Long intakeId;
/**
* 鎺у埗鍣ㄥ湴鍧�
*/
- private String rtuAddr;
+ @Schema(description = "鎺у埗鍣ㄥ湴鍧�", requiredMode = Schema.RequiredMode.REQUIRED)
+ public String rtuAddr;
/**
* 寮�闃�鏁版嵁鎺ユ敹鏃ユ湡鏃堕棿
*/
- private Date opDt;
+ @Schema(description = "鏁版嵁鎺ユ敹鏃ユ湡鏃堕棿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ public Date opDt;
/**
- * 寮�闃�鎺у埗鍣ㄦ椂閽�
+ * 寮�闃�绫诲瀷
*/
- private Date opRtuDt;
+ @Schema(description = "寮�闃�绫诲瀷", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Byte opType;
/**
- * IC鍗″湴鍧�锛堣繙绋嬪叧闂椂涓�0锛�
+ * 寮�闃�鏃剁疮璁℃祦閲�
*/
- private String opIcCardAddr;
+ @Schema(description = "寮�闃�鏃剁疮璁℃祦閲�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Double opTotalAmount;
/**
- * IC鍗$紪鍙凤紙17浣嶆暟瀛楋級
+ * 寮�闃�IC鍗$紪鍙�
*/
- private String opIcCardNo;
+ @Schema(description = "寮�闃�IC鍗$紪鍙�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public String opIcCardNo;
/**
- * 寮�闃�璁㈠崟鍙凤紙16浣嶆暟瀛楋級
+ * 寮�闃�ic鍗″湴鍧�
*/
- private String opOrderNo;
+ @Schema(description = "寮�闃�ic鍗″湴鍧�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public String opIcCardAddr;
/**
- * 寮�娉�/闃�鏃堕棿
+ * 寮�闃�鏃跺墿浣欓噾棰�
*/
- private Date openDt;
+ @Schema(description = "寮�闃�鏃跺墿浣欓噾棰�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Double opRemainMoney;
/**
- * 寮�闃�姘磋〃绱姘撮噺
+ * 寮�闃�鏃舵帶鍒跺櫒鏃堕挓
*/
- private Double opWaterTotalAmount;
+ @Schema(description = "寮�闃�鏃舵帶鍒跺櫒鏃堕挓", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Date openDt;
/**
- * 寮�闃�鐢佃〃绱鐢甸噺
+ * 鍏抽榾鏁版嵁鎺ユ敹鏃ユ湡鏃堕棿
*/
- private Double opEleTotalAmount;
+ @Schema(description = "鍏抽榾鏁版嵁鎺ユ敹鏃ユ湡鏃堕棿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Date clDt;
/**
- * 寮�闃�鐢ㄦ埛鍓╀綑閲戦
+ * 鍏抽榾绫诲瀷
*/
- private Double opMoneyRemainUser;
+ @Schema(description = "鍏抽榾绫诲瀷", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Byte clType;
/**
- * 寮�闃�鐢ㄦ埛鍓╀綑姘撮噺
+ * 鍏抽榾鏃剁疮璁℃祦閲�
*/
- private Double opWaterRemainUser;
+ @Schema(description = "鍏抽榾鏃剁疮璁℃祦閲�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Double clTotalAmount;
/**
- * 鍏虫车/闃�鏂瑰紡
+ * 鍏抽榾鏃禝C鍗$紪鍙�
*/
- private String opType;
+ @Schema(description = "鍏抽榾鏃禝C鍗$紪鍙�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public String clIcCardNo;
/**
- * 鍏抽榾IC鍗″湴鍧�锛堣繙绋嬪叧闂椂涓�0锛�
+ * 鍏抽榾鏃禝C鍗″湴鍧�
*/
- private String clIcCardAddr;
+ @Schema(description = "鍏抽榾鏃禝C鍗″湴鍧�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public String clIcCardAddr;
/**
- * 鍏抽榾IC鍗$紪鍙凤紙17浣嶆暟瀛楋級
+ * 鍏抽榾鏃跺墿浣欓噾棰�
*/
- private String clIcCardNo;
+ @Schema(description = "鍏抽榾鏃跺墿浣欓噾棰�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Double clRemainMoney;
/**
- * 鍏抽榾璁㈠崟鍙凤紙16浣嶆暟瀛楋級
+ * 鍏抽榾鎶ヤ腑鏈鐢ㄦ按閲�
*/
- private String clOrderNo;
+ @Schema(description = "鍏抽榾鏃舵湰娆$敤姘撮噺", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Double clThisAmount;
/**
- * 寮�濮嬫椂闂�(鍒嗘椂鏃ユ湀)
+ * 鍏抽榾鎶ヤ腑鏈娑堣垂閲戦
*/
- private Date startDt;
+ @Schema(description = "鍏抽榾鏃舵湰娆℃秷璐归噾棰�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Double clThisMoney;
/**
- * 缁撴潫鏃堕棿(鍒嗘椂鏃ユ湀)
+ * 鍏抽榾鎶ヤ腑鏈鐢ㄦ按鏃堕暱锛堝垎閽燂級
*/
- private Date endDt;
+ @Schema(description = "鍏抽榾鏃舵湰娆$敤姘存椂闀匡紙鍒嗛挓锛�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Integer clThisTime;
/**
- * 姘磋〃绱娴侀噺
+ * 鍏抽榾鎶ヤ腑鐨勫紑闃�鏃舵帶鍒跺櫒鏃堕挓
*/
- private Double clWaterTotalAmount;
+ @Schema(description = "鍏抽榾鎶ヤ腑鐨勫紑闃�鏃舵帶鍒跺櫒鏃堕挓", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Date clOpenDt;
/**
- * 鐢佃〃绱鐢甸噺
+ * 鍏抽榾鏃舵帶鍒跺櫒鏃堕挓
*/
- private Double clEleTotalAmount;
+ @Schema(description = "鍏抽榾鏃舵帶鍒跺櫒鏃堕挓", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ public Date closeDt;
- /**
- * 鐢ㄦ埛鍓╀綑閲戦
- */
- private Double clMoneyRemainUser;
-
- /**
- * 鐢ㄦ埛鍓╀綑姘撮噺
- */
- private Double clWaterRemainUser;
-
- /**
- * 鏈浣跨敤鐢甸噺
- */
- private Double thisEle;
-
- /**
- * 鏈浣跨敤姘撮噺
- */
- private Double thisWater;
-
- /**
- * 鏈浣跨敤閲戦
- */
- private Double thisMoney;
-
- /**
- * 鏈浣跨敤鏃堕棿闀�
- */
- private Integer thisDuration;
-
- public Long getId() {
- return id;
- }
-
- public void setId(Long id) {
- this.id = id;
- }
-
- public Long getControllerId() {
- return controllerId;
- }
-
- public void setControllerId(Long controllerId) {
- this.controllerId = controllerId;
- }
-
- public Long getIntakeId() {
- return intakeId;
- }
-
- public void setIntakeId(Long intakeId) {
- this.intakeId = intakeId;
- }
-
- public String getRtuAddr() {
- return rtuAddr;
- }
-
- public void setRtuAddr(String rtuAddr) {
- this.rtuAddr = rtuAddr;
- }
-
- public Date getOpDt() {
- return opDt;
- }
-
- public void setOpDt(Date opDt) {
- this.opDt = opDt;
- }
-
- public Date getOpRtuDt() {
- return opRtuDt;
- }
-
- public void setOpRtuDt(Date opRtuDt) {
- this.opRtuDt = opRtuDt;
- }
-
- public String getOpIcCardAddr() {
- return opIcCardAddr;
- }
-
- public void setOpIcCardAddr(String opIcCardAddr) {
- this.opIcCardAddr = opIcCardAddr;
- }
-
- public String getOpIcCardNo() {
- return opIcCardNo;
- }
-
- public void setOpIcCardNo(String opIcCardNo) {
- this.opIcCardNo = opIcCardNo;
- }
-
- public String getOpOrderNo() {
- return opOrderNo;
- }
-
- public void setOpOrderNo(String opOrderNo) {
- this.opOrderNo = opOrderNo;
- }
-
- public Date getOpenDt() {
- return openDt;
- }
-
- public void setOpenDt(Date openDt) {
- this.openDt = openDt;
- }
-
- public Double getOpWaterTotalAmount() {
- return opWaterTotalAmount;
- }
-
- public void setOpWaterTotalAmount(Double opWaterTotalAmount) {
- this.opWaterTotalAmount = opWaterTotalAmount;
- }
-
- public Double getOpEleTotalAmount() {
- return opEleTotalAmount;
- }
-
- public void setOpEleTotalAmount(Double opEleTotalAmount) {
- this.opEleTotalAmount = opEleTotalAmount;
- }
-
- public Double getOpMoneyRemainUser() {
- return opMoneyRemainUser;
- }
-
- public void setOpMoneyRemainUser(Double opMoneyRemainUser) {
- this.opMoneyRemainUser = opMoneyRemainUser;
- }
-
- public Double getOpWaterRemainUser() {
- return opWaterRemainUser;
- }
-
- public void setOpWaterRemainUser(Double opWaterRemainUser) {
- this.opWaterRemainUser = opWaterRemainUser;
- }
-
- public String getOpType() {
- return opType;
- }
-
- public void setOpType(String opType) {
- this.opType = opType;
- }
-
- public String getClIcCardAddr() {
- return clIcCardAddr;
- }
-
- public void setClIcCardAddr(String clIcCardAddr) {
- this.clIcCardAddr = clIcCardAddr;
- }
-
- public String getClIcCardNo() {
- return clIcCardNo;
- }
-
- public void setClIcCardNo(String clIcCardNo) {
- this.clIcCardNo = clIcCardNo;
- }
-
- public String getClOrderNo() {
- return clOrderNo;
- }
-
- public void setClOrderNo(String clOrderNo) {
- this.clOrderNo = clOrderNo;
- }
-
- public Date getStartDt() {
- return startDt;
- }
-
- public void setStartDt(Date startDt) {
- this.startDt = startDt;
- }
-
- public Date getEndDt() {
- return endDt;
- }
-
- public void setEndDt(Date endDt) {
- this.endDt = endDt;
- }
-
- public Double getClWaterTotalAmount() {
- return clWaterTotalAmount;
- }
-
- public void setClWaterTotalAmount(Double clWaterTotalAmount) {
- this.clWaterTotalAmount = clWaterTotalAmount;
- }
-
- public Double getClEleTotalAmount() {
- return clEleTotalAmount;
- }
-
- public void setClEleTotalAmount(Double clEleTotalAmount) {
- this.clEleTotalAmount = clEleTotalAmount;
- }
-
- public Double getClMoneyRemainUser() {
- return clMoneyRemainUser;
- }
-
- public void setClMoneyRemainUser(Double clMoneyRemainUser) {
- this.clMoneyRemainUser = clMoneyRemainUser;
- }
-
- public Double getClWaterRemainUser() {
- return clWaterRemainUser;
- }
-
- public void setClWaterRemainUser(Double clWaterRemainUser) {
- this.clWaterRemainUser = clWaterRemainUser;
- }
-
- public Double getThisEle() {
- return thisEle;
- }
-
- public void setThisEle(Double thisEle) {
- this.thisEle = thisEle;
- }
-
- public Double getThisWater() {
- return thisWater;
- }
-
- public void setThisWater(Double thisWater) {
- this.thisWater = thisWater;
- }
-
- public Double getThisMoney() {
- return thisMoney;
- }
-
- public void setThisMoney(Double thisMoney) {
- this.thisMoney = thisMoney;
- }
-
- public Integer getThisDuration() {
- return thisDuration;
- }
-
- public void setThisDuration(Integer thisDuration) {
- this.thisDuration = thisDuration;
- }
}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/application-database-ym.yml b/pipIrr-platform/pipIrr-global/src/main/resources/application-database-ym.yml
index 700142f..29fac5c 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/application-database-ym.yml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/application-database-ym.yml
@@ -5,8 +5,8 @@
#name: ym
type: com.alibaba.druid.pool.DruidDataSource
driverClassName: com.mysql.cj.jdbc.Driver
- url: jdbc:mysql://192.168.40.166:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull
-# url: jdbc:mysql://127.0.0.1:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull
+# url: jdbc:mysql://192.168.40.166:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull
+ url: jdbc:mysql://127.0.0.1:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull
username: root
password: dysql,;.abc!@#
druid:
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmCommandHistoryMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmCommandHistoryMapper.xml
index aee1cf2..5394661 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmCommandHistoryMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmCommandHistoryMapper.xml
@@ -227,7 +227,8 @@
INNER JOIN pr_controller con ON com.rtu_addr = con.rtuAddr
INNER JOIN pr_intake inta ON con.intakeId = inta.id
INNER JOIN JSON_TABLE(
- '[{"rtuAddr":"620201000029","isOnLine":true},{"rtuAddr":"4000004","isOnLine":true},{"rtuAddr":"dy20240325","isOnLine":false}]',
+<!-- '[{"rtuAddr":"620201000029","isOnLine":true},{"rtuAddr":"4000004","isOnLine":true},{"rtuAddr":"dy20240325","isOnLine":false}]',-->
+ #{onLineMap},
'$[*]' COLUMNS(
rtuAddr VARCHAR(20) PATH '$.rtuAddr',
isOnLine BOOLEAN PATH '$.isOnLine'
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveHistoryMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveHistoryMapper.xml
index 5d82bb0..f1de3dd 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveHistoryMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveHistoryMapper.xml
@@ -9,37 +9,30 @@
<result column="intake_id" jdbcType="BIGINT" property="intakeId" />
<result column="rtu_addr" jdbcType="VARCHAR" property="rtuAddr" />
<result column="op_dt" jdbcType="TIMESTAMP" property="opDt" />
- <result column="op_rtu_dt" jdbcType="TIMESTAMP" property="opRtuDt" />
- <result column="op_ic_card_addr" jdbcType="VARCHAR" property="opIcCardAddr" />
+ <result column="op_type" jdbcType="TINYINT" property="opType" />
+ <result column="op_total_amount" jdbcType="DOUBLE" property="opTotalAmount" />
<result column="op_ic_card_no" jdbcType="VARCHAR" property="opIcCardNo" />
- <result column="op_order_no" jdbcType="VARCHAR" property="opOrderNo" />
+ <result column="op_ic_card_addr" jdbcType="VARCHAR" property="opIcCardAddr" />
+ <result column="op_remain_money" jdbcType="DOUBLE" property="opRemainMoney" />
<result column="open_dt" jdbcType="TIMESTAMP" property="openDt" />
- <result column="op_water_total_amount" jdbcType="FLOAT" property="opWaterTotalAmount" />
- <result column="op_ele_total_amount" jdbcType="FLOAT" property="opEleTotalAmount" />
- <result column="op_money_remain_user" jdbcType="FLOAT" property="opMoneyRemainUser" />
- <result column="op_water_remain_user" jdbcType="FLOAT" property="opWaterRemainUser" />
- <result column="op_type" jdbcType="VARCHAR" property="opType" />
- <result column="cl_ic_card_addr" jdbcType="VARCHAR" property="clIcCardAddr" />
+ <result column="cl_dt" jdbcType="TIMESTAMP" property="clDt" />
+ <result column="cl_type" jdbcType="TINYINT" property="clType" />
+ <result column="cl_total_amount" jdbcType="DOUBLE" property="clTotalAmount" />
<result column="cl_ic_card_no" jdbcType="VARCHAR" property="clIcCardNo" />
- <result column="cl_order_no" jdbcType="VARCHAR" property="clOrderNo" />
- <result column="start_dt" jdbcType="TIMESTAMP" property="startDt" />
- <result column="end_dt" jdbcType="TIMESTAMP" property="endDt" />
- <result column="cl_water_total_amount" jdbcType="FLOAT" property="clWaterTotalAmount" />
- <result column="cl_ele_total_amount" jdbcType="FLOAT" property="clEleTotalAmount" />
- <result column="cl_money_remain_user" jdbcType="FLOAT" property="clMoneyRemainUser" />
- <result column="cl_water_remain_user" jdbcType="FLOAT" property="clWaterRemainUser" />
- <result column="this_ele" jdbcType="FLOAT" property="thisEle" />
- <result column="this_water" jdbcType="FLOAT" property="thisWater" />
- <result column="this_money" jdbcType="FLOAT" property="thisMoney" />
- <result column="this_duration" jdbcType="INTEGER" property="thisDuration" />
+ <result column="cl_ic_card_addr" jdbcType="VARCHAR" property="clIcCardAddr" />
+ <result column="cl_remain_money" jdbcType="DOUBLE" property="clRemainMoney" />
+ <result column="cl_this_amount" jdbcType="DOUBLE" property="clThisAmount" />
+ <result column="cl_this_money" jdbcType="DOUBLE" property="clThisMoney" />
+ <result column="cl_this_time" jdbcType="INTEGER" property="clThisTime" />
+ <result column="cl_open_dt" jdbcType="TIMESTAMP" property="clOpenDt" />
+ <result column="close_dt" jdbcType="TIMESTAMP" property="closeDt" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
- id, controller_id, intake_id, rtu_addr, op_dt, op_rtu_dt, op_ic_card_addr, op_ic_card_no,
- op_order_no, open_dt, op_water_total_amount, op_ele_total_amount, op_money_remain_user,
- op_water_remain_user, op_type, cl_ic_card_addr, cl_ic_card_no, cl_order_no, start_dt,
- end_dt, cl_water_total_amount, cl_ele_total_amount, cl_money_remain_user, cl_water_remain_user,
- this_ele, this_water, this_money, this_duration
+ id, controller_id, intake_id, rtu_addr, op_dt, op_type, op_total_amount, op_ic_card_no,
+ op_ic_card_addr, op_remain_money, open_dt, cl_dt, cl_type, cl_total_amount, cl_ic_card_no,
+ cl_ic_card_addr, cl_remain_money, cl_this_amount, cl_this_money, cl_this_time, cl_open_dt,
+ close_dt
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--@mbg.generated-->
@@ -56,25 +49,21 @@
<insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveHistory">
<!--@mbg.generated-->
insert into rm_open_close_valve_history (id, controller_id, intake_id,
- rtu_addr, op_dt, op_rtu_dt,
- op_ic_card_addr, op_ic_card_no, op_order_no,
- open_dt, op_water_total_amount, op_ele_total_amount,
- op_money_remain_user, op_water_remain_user, op_type,
- cl_ic_card_addr, cl_ic_card_no, cl_order_no,
- start_dt, end_dt, cl_water_total_amount,
- cl_ele_total_amount, cl_money_remain_user, cl_water_remain_user,
- this_ele, this_water, this_money,
- this_duration)
+ rtu_addr, op_dt, op_type,
+ op_total_amount, op_ic_card_no, op_ic_card_addr,
+ op_remain_money, open_dt, cl_dt,
+ cl_type, cl_total_amount, cl_ic_card_no,
+ cl_ic_card_addr, cl_remain_money, cl_this_amount,
+ cl_this_money, cl_this_time, cl_open_dt,
+ close_dt)
values (#{id,jdbcType=BIGINT}, #{controllerId,jdbcType=BIGINT}, #{intakeId,jdbcType=BIGINT},
- #{rtuAddr,jdbcType=VARCHAR}, #{opDt,jdbcType=TIMESTAMP}, #{opRtuDt,jdbcType=TIMESTAMP},
- #{opIcCardAddr,jdbcType=VARCHAR}, #{opIcCardNo,jdbcType=VARCHAR}, #{opOrderNo,jdbcType=VARCHAR},
- #{openDt,jdbcType=TIMESTAMP}, #{opWaterTotalAmount,jdbcType=FLOAT}, #{opEleTotalAmount,jdbcType=FLOAT},
- #{opMoneyRemainUser,jdbcType=FLOAT}, #{opWaterRemainUser,jdbcType=FLOAT}, #{opType,jdbcType=VARCHAR},
- #{clIcCardAddr,jdbcType=VARCHAR}, #{clIcCardNo,jdbcType=VARCHAR}, #{clOrderNo,jdbcType=VARCHAR},
- #{startDt,jdbcType=TIMESTAMP}, #{endDt,jdbcType=TIMESTAMP}, #{clWaterTotalAmount,jdbcType=FLOAT},
- #{clEleTotalAmount,jdbcType=FLOAT}, #{clMoneyRemainUser,jdbcType=FLOAT}, #{clWaterRemainUser,jdbcType=FLOAT},
- #{thisEle,jdbcType=FLOAT}, #{thisWater,jdbcType=FLOAT}, #{thisMoney,jdbcType=FLOAT},
- #{thisDuration,jdbcType=INTEGER})
+ #{rtuAddr,jdbcType=VARCHAR}, #{opDt,jdbcType=TIMESTAMP}, #{opType,jdbcType=TINYINT},
+ #{opTotalAmount,jdbcType=DOUBLE}, #{opIcCardNo,jdbcType=VARCHAR}, #{opIcCardAddr,jdbcType=VARCHAR},
+ #{opRemainMoney,jdbcType=DOUBLE}, #{openDt,jdbcType=TIMESTAMP}, #{clDt,jdbcType=TIMESTAMP},
+ #{clType,jdbcType=TINYINT}, #{clTotalAmount,jdbcType=DOUBLE}, #{clIcCardNo,jdbcType=VARCHAR},
+ #{clIcCardAddr,jdbcType=VARCHAR}, #{clRemainMoney,jdbcType=DOUBLE}, #{clThisAmount,jdbcType=DOUBLE},
+ #{clThisMoney,jdbcType=DOUBLE}, #{clThisTime,jdbcType=INTEGER}, #{clOpenDt,jdbcType=TIMESTAMP},
+ #{closeDt,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveHistory">
<!--@mbg.generated-->
@@ -95,74 +84,56 @@
<if test="opDt != null">
op_dt,
</if>
- <if test="opRtuDt != null">
- op_rtu_dt,
+ <if test="opType != null">
+ op_type,
</if>
- <if test="opIcCardAddr != null">
- op_ic_card_addr,
+ <if test="opTotalAmount != null">
+ op_total_amount,
</if>
<if test="opIcCardNo != null">
op_ic_card_no,
</if>
- <if test="opOrderNo != null">
- op_order_no,
+ <if test="opIcCardAddr != null">
+ op_ic_card_addr,
+ </if>
+ <if test="opRemainMoney != null">
+ op_remain_money,
</if>
<if test="openDt != null">
open_dt,
</if>
- <if test="opWaterTotalAmount != null">
- op_water_total_amount,
+ <if test="clDt != null">
+ cl_dt,
</if>
- <if test="opEleTotalAmount != null">
- op_ele_total_amount,
+ <if test="clType != null">
+ cl_type,
</if>
- <if test="opMoneyRemainUser != null">
- op_money_remain_user,
- </if>
- <if test="opWaterRemainUser != null">
- op_water_remain_user,
- </if>
- <if test="opType != null">
- op_type,
- </if>
- <if test="clIcCardAddr != null">
- cl_ic_card_addr,
+ <if test="clTotalAmount != null">
+ cl_total_amount,
</if>
<if test="clIcCardNo != null">
cl_ic_card_no,
</if>
- <if test="clOrderNo != null">
- cl_order_no,
+ <if test="clIcCardAddr != null">
+ cl_ic_card_addr,
</if>
- <if test="startDt != null">
- start_dt,
+ <if test="clRemainMoney != null">
+ cl_remain_money,
</if>
- <if test="endDt != null">
- end_dt,
+ <if test="clThisAmount != null">
+ cl_this_amount,
</if>
- <if test="clWaterTotalAmount != null">
- cl_water_total_amount,
+ <if test="clThisMoney != null">
+ cl_this_money,
</if>
- <if test="clEleTotalAmount != null">
- cl_ele_total_amount,
+ <if test="clThisTime != null">
+ cl_this_time,
</if>
- <if test="clMoneyRemainUser != null">
- cl_money_remain_user,
+ <if test="clOpenDt != null">
+ cl_open_dt,
</if>
- <if test="clWaterRemainUser != null">
- cl_water_remain_user,
- </if>
- <if test="thisEle != null">
- this_ele,
- </if>
- <if test="thisWater != null">
- this_water,
- </if>
- <if test="thisMoney != null">
- this_money,
- </if>
- <if test="thisDuration != null">
- this_duration,
+ <if test="closeDt != null">
+ close_dt,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
@@ -181,74 +152,56 @@
<if test="opDt != null">
#{opDt,jdbcType=TIMESTAMP},
</if>
- <if test="opRtuDt != null">
- #{opRtuDt,jdbcType=TIMESTAMP},
+ <if test="opType != null">
+ #{opType,jdbcType=TINYINT},
</if>
- <if test="opIcCardAddr != null">
- #{opIcCardAddr,jdbcType=VARCHAR},
+ <if test="opTotalAmount != null">
+ #{opTotalAmount,jdbcType=DOUBLE},
</if>
<if test="opIcCardNo != null">
#{opIcCardNo,jdbcType=VARCHAR},
</if>
- <if test="opOrderNo != null">
- #{opOrderNo,jdbcType=VARCHAR},
+ <if test="opIcCardAddr != null">
+ #{opIcCardAddr,jdbcType=VARCHAR},
+ </if>
+ <if test="opRemainMoney != null">
+ #{opRemainMoney,jdbcType=DOUBLE},
</if>
<if test="openDt != null">
#{openDt,jdbcType=TIMESTAMP},
</if>
- <if test="opWaterTotalAmount != null">
- #{opWaterTotalAmount,jdbcType=FLOAT},
+ <if test="clDt != null">
+ #{clDt,jdbcType=TIMESTAMP},
</if>
- <if test="opEleTotalAmount != null">
- #{opEleTotalAmount,jdbcType=FLOAT},
+ <if test="clType != null">
+ #{clType,jdbcType=TINYINT},
</if>
- <if test="opMoneyRemainUser != null">
- #{opMoneyRemainUser,jdbcType=FLOAT},
- </if>
- <if test="opWaterRemainUser != null">
- #{opWaterRemainUser,jdbcType=FLOAT},
- </if>
- <if test="opType != null">
- #{opType,jdbcType=VARCHAR},
- </if>
- <if test="clIcCardAddr != null">
- #{clIcCardAddr,jdbcType=VARCHAR},
+ <if test="clTotalAmount != null">
+ #{clTotalAmount,jdbcType=DOUBLE},
</if>
<if test="clIcCardNo != null">
#{clIcCardNo,jdbcType=VARCHAR},
</if>
- <if test="clOrderNo != null">
- #{clOrderNo,jdbcType=VARCHAR},
+ <if test="clIcCardAddr != null">
+ #{clIcCardAddr,jdbcType=VARCHAR},
</if>
- <if test="startDt != null">
- #{startDt,jdbcType=TIMESTAMP},
+ <if test="clRemainMoney != null">
+ #{clRemainMoney,jdbcType=DOUBLE},
</if>
- <if test="endDt != null">
- #{endDt,jdbcType=TIMESTAMP},
+ <if test="clThisAmount != null">
+ #{clThisAmount,jdbcType=DOUBLE},
</if>
- <if test="clWaterTotalAmount != null">
- #{clWaterTotalAmount,jdbcType=FLOAT},
+ <if test="clThisMoney != null">
+ #{clThisMoney,jdbcType=DOUBLE},
</if>
- <if test="clEleTotalAmount != null">
- #{clEleTotalAmount,jdbcType=FLOAT},
+ <if test="clThisTime != null">
+ #{clThisTime,jdbcType=INTEGER},
</if>
- <if test="clMoneyRemainUser != null">
- #{clMoneyRemainUser,jdbcType=FLOAT},
+ <if test="clOpenDt != null">
+ #{clOpenDt,jdbcType=TIMESTAMP},
</if>
- <if test="clWaterRemainUser != null">
- #{clWaterRemainUser,jdbcType=FLOAT},
- </if>
- <if test="thisEle != null">
- #{thisEle,jdbcType=FLOAT},
- </if>
- <if test="thisWater != null">
- #{thisWater,jdbcType=FLOAT},
- </if>
- <if test="thisMoney != null">
- #{thisMoney,jdbcType=FLOAT},
- </if>
- <if test="thisDuration != null">
- #{thisDuration,jdbcType=INTEGER},
+ <if test="closeDt != null">
+ #{closeDt,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
@@ -268,74 +221,56 @@
<if test="opDt != null">
op_dt = #{opDt,jdbcType=TIMESTAMP},
</if>
- <if test="opRtuDt != null">
- op_rtu_dt = #{opRtuDt,jdbcType=TIMESTAMP},
+ <if test="opType != null">
+ op_type = #{opType,jdbcType=TINYINT},
</if>
- <if test="opIcCardAddr != null">
- op_ic_card_addr = #{opIcCardAddr,jdbcType=VARCHAR},
+ <if test="opTotalAmount != null">
+ op_total_amount = #{opTotalAmount,jdbcType=DOUBLE},
</if>
<if test="opIcCardNo != null">
op_ic_card_no = #{opIcCardNo,jdbcType=VARCHAR},
</if>
- <if test="opOrderNo != null">
- op_order_no = #{opOrderNo,jdbcType=VARCHAR},
+ <if test="opIcCardAddr != null">
+ op_ic_card_addr = #{opIcCardAddr,jdbcType=VARCHAR},
+ </if>
+ <if test="opRemainMoney != null">
+ op_remain_money = #{opRemainMoney,jdbcType=DOUBLE},
</if>
<if test="openDt != null">
open_dt = #{openDt,jdbcType=TIMESTAMP},
</if>
- <if test="opWaterTotalAmount != null">
- op_water_total_amount = #{opWaterTotalAmount,jdbcType=FLOAT},
+ <if test="clDt != null">
+ cl_dt = #{clDt,jdbcType=TIMESTAMP},
</if>
- <if test="opEleTotalAmount != null">
- op_ele_total_amount = #{opEleTotalAmount,jdbcType=FLOAT},
+ <if test="clType != null">
+ cl_type = #{clType,jdbcType=TINYINT},
</if>
- <if test="opMoneyRemainUser != null">
- op_money_remain_user = #{opMoneyRemainUser,jdbcType=FLOAT},
- </if>
- <if test="opWaterRemainUser != null">
- op_water_remain_user = #{opWaterRemainUser,jdbcType=FLOAT},
- </if>
- <if test="opType != null">
- op_type = #{opType,jdbcType=VARCHAR},
- </if>
- <if test="clIcCardAddr != null">
- cl_ic_card_addr = #{clIcCardAddr,jdbcType=VARCHAR},
+ <if test="clTotalAmount != null">
+ cl_total_amount = #{clTotalAmount,jdbcType=DOUBLE},
</if>
<if test="clIcCardNo != null">
cl_ic_card_no = #{clIcCardNo,jdbcType=VARCHAR},
</if>
- <if test="clOrderNo != null">
- cl_order_no = #{clOrderNo,jdbcType=VARCHAR},
+ <if test="clIcCardAddr != null">
+ cl_ic_card_addr = #{clIcCardAddr,jdbcType=VARCHAR},
</if>
- <if test="startDt != null">
- start_dt = #{startDt,jdbcType=TIMESTAMP},
+ <if test="clRemainMoney != null">
+ cl_remain_money = #{clRemainMoney,jdbcType=DOUBLE},
</if>
- <if test="endDt != null">
- end_dt = #{endDt,jdbcType=TIMESTAMP},
+ <if test="clThisAmount != null">
+ cl_this_amount = #{clThisAmount,jdbcType=DOUBLE},
</if>
- <if test="clWaterTotalAmount != null">
- cl_water_total_amount = #{clWaterTotalAmount,jdbcType=FLOAT},
+ <if test="clThisMoney != null">
+ cl_this_money = #{clThisMoney,jdbcType=DOUBLE},
</if>
- <if test="clEleTotalAmount != null">
- cl_ele_total_amount = #{clEleTotalAmount,jdbcType=FLOAT},
+ <if test="clThisTime != null">
+ cl_this_time = #{clThisTime,jdbcType=INTEGER},
</if>
- <if test="clMoneyRemainUser != null">
- cl_money_remain_user = #{clMoneyRemainUser,jdbcType=FLOAT},
+ <if test="clOpenDt != null">
+ cl_open_dt = #{clOpenDt,jdbcType=TIMESTAMP},
</if>
- <if test="clWaterRemainUser != null">
- cl_water_remain_user = #{clWaterRemainUser,jdbcType=FLOAT},
- </if>
- <if test="thisEle != null">
- this_ele = #{thisEle,jdbcType=FLOAT},
- </if>
- <if test="thisWater != null">
- this_water = #{thisWater,jdbcType=FLOAT},
- </if>
- <if test="thisMoney != null">
- this_money = #{thisMoney,jdbcType=FLOAT},
- </if>
- <if test="thisDuration != null">
- this_duration = #{thisDuration,jdbcType=INTEGER},
+ <if test="closeDt != null">
+ close_dt = #{closeDt,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
@@ -347,29 +282,23 @@
intake_id = #{intakeId,jdbcType=BIGINT},
rtu_addr = #{rtuAddr,jdbcType=VARCHAR},
op_dt = #{opDt,jdbcType=TIMESTAMP},
- op_rtu_dt = #{opRtuDt,jdbcType=TIMESTAMP},
- op_ic_card_addr = #{opIcCardAddr,jdbcType=VARCHAR},
+ op_type = #{opType,jdbcType=TINYINT},
+ op_total_amount = #{opTotalAmount,jdbcType=DOUBLE},
op_ic_card_no = #{opIcCardNo,jdbcType=VARCHAR},
- op_order_no = #{opOrderNo,jdbcType=VARCHAR},
+ op_ic_card_addr = #{opIcCardAddr,jdbcType=VARCHAR},
+ op_remain_money = #{opRemainMoney,jdbcType=DOUBLE},
open_dt = #{openDt,jdbcType=TIMESTAMP},
- op_water_total_amount = #{opWaterTotalAmount,jdbcType=FLOAT},
- op_ele_total_amount = #{opEleTotalAmount,jdbcType=FLOAT},
- op_money_remain_user = #{opMoneyRemainUser,jdbcType=FLOAT},
- op_water_remain_user = #{opWaterRemainUser,jdbcType=FLOAT},
- op_type = #{opType,jdbcType=VARCHAR},
- cl_ic_card_addr = #{clIcCardAddr,jdbcType=VARCHAR},
+ cl_dt = #{clDt,jdbcType=TIMESTAMP},
+ cl_type = #{clType,jdbcType=TINYINT},
+ cl_total_amount = #{clTotalAmount,jdbcType=DOUBLE},
cl_ic_card_no = #{clIcCardNo,jdbcType=VARCHAR},
- cl_order_no = #{clOrderNo,jdbcType=VARCHAR},
- start_dt = #{startDt,jdbcType=TIMESTAMP},
- end_dt = #{endDt,jdbcType=TIMESTAMP},
- cl_water_total_amount = #{clWaterTotalAmount,jdbcType=FLOAT},
- cl_ele_total_amount = #{clEleTotalAmount,jdbcType=FLOAT},
- cl_money_remain_user = #{clMoneyRemainUser,jdbcType=FLOAT},
- cl_water_remain_user = #{clWaterRemainUser,jdbcType=FLOAT},
- this_ele = #{thisEle,jdbcType=FLOAT},
- this_water = #{thisWater,jdbcType=FLOAT},
- this_money = #{thisMoney,jdbcType=FLOAT},
- this_duration = #{thisDuration,jdbcType=INTEGER}
+ cl_ic_card_addr = #{clIcCardAddr,jdbcType=VARCHAR},
+ cl_remain_money = #{clRemainMoney,jdbcType=DOUBLE},
+ cl_this_amount = #{clThisAmount,jdbcType=DOUBLE},
+ cl_this_money = #{clThisMoney,jdbcType=DOUBLE},
+ cl_this_time = #{clThisTime,jdbcType=INTEGER},
+ cl_open_dt = #{clOpenDt,jdbcType=TIMESTAMP},
+ close_dt = #{closeDt,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveLastMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveLastMapper.xml
index 34d58a7..0ffaefd 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveLastMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveLastMapper.xml
@@ -5,41 +5,35 @@
<!--@mbg.generated-->
<!--@Table rm_open_close_valve_last-->
<id column="id" jdbcType="BIGINT" property="id" />
+ <result column="last_history_id" jdbcType="BIGINT" property="lastHistoryId" />
<result column="controller_id" jdbcType="BIGINT" property="controllerId" />
<result column="intake_id" jdbcType="BIGINT" property="intakeId" />
<result column="rtu_addr" jdbcType="VARCHAR" property="rtuAddr" />
<result column="op_dt" jdbcType="TIMESTAMP" property="opDt" />
- <result column="op_rtu_dt" jdbcType="TIMESTAMP" property="opRtuDt" />
- <result column="op_ic_card_addr" jdbcType="VARCHAR" property="opIcCardAddr" />
+ <result column="op_type" jdbcType="TINYINT" property="opType" />
+ <result column="op_total_amount" jdbcType="DOUBLE" property="opTotalAmount" />
<result column="op_ic_card_no" jdbcType="VARCHAR" property="opIcCardNo" />
- <result column="op_order_no" jdbcType="VARCHAR" property="opOrderNo" />
+ <result column="op_ic_card_addr" jdbcType="VARCHAR" property="opIcCardAddr" />
+ <result column="op_remain_money" jdbcType="DOUBLE" property="opRemainMoney" />
<result column="open_dt" jdbcType="TIMESTAMP" property="openDt" />
- <result column="op_water_total_amount" jdbcType="FLOAT" property="opWaterTotalAmount" />
- <result column="op_ele_total_amount" jdbcType="FLOAT" property="opEleTotalAmount" />
- <result column="op_money_remain_user" jdbcType="FLOAT" property="opMoneyRemainUser" />
- <result column="op_water_remain_user" jdbcType="FLOAT" property="opWaterRemainUser" />
- <result column="op_type" jdbcType="VARCHAR" property="opType" />
- <result column="cl_ic_card_addr" jdbcType="VARCHAR" property="clIcCardAddr" />
+ <result column="cl_dt" jdbcType="TIMESTAMP" property="clDt" />
+ <result column="cl_type" jdbcType="TINYINT" property="clType" />
+ <result column="cl_total_amount" jdbcType="DOUBLE" property="clTotalAmount" />
<result column="cl_ic_card_no" jdbcType="VARCHAR" property="clIcCardNo" />
- <result column="cl_order_no" jdbcType="VARCHAR" property="clOrderNo" />
- <result column="start_dt" jdbcType="TIMESTAMP" property="startDt" />
- <result column="end_dt" jdbcType="TIMESTAMP" property="endDt" />
- <result column="cl_water_total_amount" jdbcType="FLOAT" property="clWaterTotalAmount" />
- <result column="cl_ele_total_amount" jdbcType="FLOAT" property="clEleTotalAmount" />
- <result column="cl_money_remain_user" jdbcType="FLOAT" property="clMoneyRemainUser" />
- <result column="cl_water_remain_user" jdbcType="FLOAT" property="clWaterRemainUser" />
- <result column="this_ele" jdbcType="FLOAT" property="thisEle" />
- <result column="this_water" jdbcType="FLOAT" property="thisWater" />
- <result column="this_money" jdbcType="FLOAT" property="thisMoney" />
- <result column="this_duration" jdbcType="INTEGER" property="thisDuration" />
+ <result column="cl_ic_card_addr" jdbcType="VARCHAR" property="clIcCardAddr" />
+ <result column="cl_remain_money" jdbcType="DOUBLE" property="clRemainMoney" />
+ <result column="cl_this_amount" jdbcType="DOUBLE" property="clThisAmount" />
+ <result column="cl_this_money" jdbcType="DOUBLE" property="clThisMoney" />
+ <result column="cl_this_time" jdbcType="INTEGER" property="clThisTime" />
+ <result column="cl_open_dt" jdbcType="TIMESTAMP" property="clOpenDt" />
+ <result column="close_dt" jdbcType="TIMESTAMP" property="closeDt" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
- id, controller_id, intake_id, rtu_addr, op_dt, op_rtu_dt, op_ic_card_addr, op_ic_card_no,
- op_order_no, open_dt, op_water_total_amount, op_ele_total_amount, op_money_remain_user,
- op_water_remain_user, op_type, cl_ic_card_addr, cl_ic_card_no, cl_order_no, start_dt,
- end_dt, cl_water_total_amount, cl_ele_total_amount, cl_money_remain_user, cl_water_remain_user,
- this_ele, this_water, this_money, this_duration
+ id, last_history_id, controller_id, intake_id, rtu_addr, op_dt, op_type, op_total_amount, op_ic_card_no,
+ op_ic_card_addr, op_remain_money, open_dt, cl_dt, cl_type, cl_total_amount, cl_ic_card_no,
+ cl_ic_card_addr, cl_remain_money, cl_this_amount, cl_this_money, cl_this_time, cl_open_dt,
+ close_dt
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--@mbg.generated-->
@@ -48,6 +42,14 @@
from rm_open_close_valve_last
where id = #{id,jdbcType=BIGINT}
</select>
+
+ <select id="selectByRtuAddr" parameterType="java.lang.String" resultMap="BaseResultMap">
+ <!--@mbg.generated-->
+ select
+ <include refid="Base_Column_List" />
+ from rm_open_close_valve_last
+ where rtu_addr = #{rtuAddr,jdbcType=VARCHAR}
+ </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--@mbg.generated-->
delete from rm_open_close_valve_last
@@ -55,26 +57,22 @@
</delete>
<insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveLast">
<!--@mbg.generated-->
- insert into rm_open_close_valve_last (id, controller_id, intake_id,
- rtu_addr, op_dt, op_rtu_dt,
- op_ic_card_addr, op_ic_card_no, op_order_no,
- open_dt, op_water_total_amount, op_ele_total_amount,
- op_money_remain_user, op_water_remain_user, op_type,
- cl_ic_card_addr, cl_ic_card_no, cl_order_no,
- start_dt, end_dt, cl_water_total_amount,
- cl_ele_total_amount, cl_money_remain_user, cl_water_remain_user,
- this_ele, this_water, this_money,
- this_duration)
- values (#{id,jdbcType=BIGINT}, #{controllerId,jdbcType=BIGINT}, #{intakeId,jdbcType=BIGINT},
- #{rtuAddr,jdbcType=VARCHAR}, #{opDt,jdbcType=TIMESTAMP}, #{opRtuDt,jdbcType=TIMESTAMP},
- #{opIcCardAddr,jdbcType=VARCHAR}, #{opIcCardNo,jdbcType=VARCHAR}, #{opOrderNo,jdbcType=VARCHAR},
- #{openDt,jdbcType=TIMESTAMP}, #{opWaterTotalAmount,jdbcType=FLOAT}, #{opEleTotalAmount,jdbcType=FLOAT},
- #{opMoneyRemainUser,jdbcType=FLOAT}, #{opWaterRemainUser,jdbcType=FLOAT}, #{opType,jdbcType=VARCHAR},
- #{clIcCardAddr,jdbcType=VARCHAR}, #{clIcCardNo,jdbcType=VARCHAR}, #{clOrderNo,jdbcType=VARCHAR},
- #{startDt,jdbcType=TIMESTAMP}, #{endDt,jdbcType=TIMESTAMP}, #{clWaterTotalAmount,jdbcType=FLOAT},
- #{clEleTotalAmount,jdbcType=FLOAT}, #{clMoneyRemainUser,jdbcType=FLOAT}, #{clWaterRemainUser,jdbcType=FLOAT},
- #{thisEle,jdbcType=FLOAT}, #{thisWater,jdbcType=FLOAT}, #{thisMoney,jdbcType=FLOAT},
- #{thisDuration,jdbcType=INTEGER})
+ insert into rm_open_close_valve_last (id, last_history_id, controller_id, intake_id,
+ rtu_addr, op_dt, op_type,
+ op_total_amount, op_ic_card_no, op_ic_card_addr,
+ op_remain_money, open_dt, cl_dt,
+ cl_type, cl_total_amount, cl_ic_card_no,
+ cl_ic_card_addr, cl_remain_money, cl_this_amount,
+ cl_this_money, cl_this_time, cl_open_dt,
+ close_dt)
+ values (#{id,jdbcType=BIGINT}, #{lastHistoryId,jdbcType=BIGINT}, #{controllerId,jdbcType=BIGINT},
+ #{intakeId,jdbcType=BIGINT}, #{rtuAddr,jdbcType=VARCHAR}, #{opDt,jdbcType=TIMESTAMP},
+ #{opType,jdbcType=TINYINT}, #{opTotalAmount,jdbcType=DOUBLE}, #{opIcCardNo,jdbcType=VARCHAR},
+ #{opIcCardAddr,jdbcType=VARCHAR}, #{opRemainMoney,jdbcType=DOUBLE}, #{openDt,jdbcType=TIMESTAMP},
+ #{clDt,jdbcType=TIMESTAMP}, #{clType,jdbcType=TINYINT}, #{clTotalAmount,jdbcType=DOUBLE},
+ #{clIcCardNo,jdbcType=VARCHAR}, #{clIcCardAddr,jdbcType=VARCHAR}, #{clRemainMoney,jdbcType=DOUBLE},
+ #{clThisAmount,jdbcType=DOUBLE}, #{clThisMoney,jdbcType=DOUBLE}, #{clThisTime,jdbcType=INTEGER},
+ #{clOpenDt,jdbcType=TIMESTAMP}, #{closeDt,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveLast">
<!--@mbg.generated-->
@@ -82,6 +80,9 @@
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
+ </if>
+ <if test="lastHistoryId != null">
+ last_history_id,
</if>
<if test="controllerId != null">
controller_id,
@@ -95,79 +96,64 @@
<if test="opDt != null">
op_dt,
</if>
- <if test="opRtuDt != null">
- op_rtu_dt,
+ <if test="opType != null">
+ op_type,
</if>
- <if test="opIcCardAddr != null">
- op_ic_card_addr,
+ <if test="opTotalAmount != null">
+ op_total_amount,
</if>
<if test="opIcCardNo != null">
op_ic_card_no,
</if>
- <if test="opOrderNo != null">
- op_order_no,
+ <if test="opIcCardAddr != null">
+ op_ic_card_addr,
+ </if>
+ <if test="opRemainMoney != null">
+ op_remain_money,
</if>
<if test="openDt != null">
open_dt,
</if>
- <if test="opWaterTotalAmount != null">
- op_water_total_amount,
+ <if test="clDt != null">
+ cl_dt,
</if>
- <if test="opEleTotalAmount != null">
- op_ele_total_amount,
+ <if test="clType != null">
+ cl_type,
</if>
- <if test="opMoneyRemainUser != null">
- op_money_remain_user,
- </if>
- <if test="opWaterRemainUser != null">
- op_water_remain_user,
- </if>
- <if test="opType != null">
- op_type,
- </if>
- <if test="clIcCardAddr != null">
- cl_ic_card_addr,
+ <if test="clTotalAmount != null">
+ cl_total_amount,
</if>
<if test="clIcCardNo != null">
cl_ic_card_no,
</if>
- <if test="clOrderNo != null">
- cl_order_no,
+ <if test="clIcCardAddr != null">
+ cl_ic_card_addr,
</if>
- <if test="startDt != null">
- start_dt,
+ <if test="clRemainMoney != null">
+ cl_remain_money,
</if>
- <if test="endDt != null">
- end_dt,
+ <if test="clThisAmount != null">
+ cl_this_amount,
</if>
- <if test="clWaterTotalAmount != null">
- cl_water_total_amount,
+ <if test="clThisMoney != null">
+ cl_this_money,
</if>
- <if test="clEleTotalAmount != null">
- cl_ele_total_amount,
+ <if test="clThisTime != null">
+ cl_this_time,
</if>
- <if test="clMoneyRemainUser != null">
- cl_money_remain_user,
+ <if test="clOpenDt != null">
+ cl_open_dt,
</if>
- <if test="clWaterRemainUser != null">
- cl_water_remain_user,
- </if>
- <if test="thisEle != null">
- this_ele,
- </if>
- <if test="thisWater != null">
- this_water,
- </if>
- <if test="thisMoney != null">
- this_money,
- </if>
- <if test="thisDuration != null">
- this_duration,
+ <if test="closeDt != null">
+ close_dt,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
+ </if>
+ <if test="lastHistoryId != null">
+ #{lastHistoryId,jdbcType=BIGINT},
</if>
<if test="controllerId != null">
#{controllerId,jdbcType=BIGINT},
@@ -181,74 +167,56 @@
<if test="opDt != null">
#{opDt,jdbcType=TIMESTAMP},
</if>
- <if test="opRtuDt != null">
- #{opRtuDt,jdbcType=TIMESTAMP},
+ <if test="opType != null">
+ #{opType,jdbcType=TINYINT},
</if>
- <if test="opIcCardAddr != null">
- #{opIcCardAddr,jdbcType=VARCHAR},
+ <if test="opTotalAmount != null">
+ #{opTotalAmount,jdbcType=DOUBLE},
</if>
<if test="opIcCardNo != null">
#{opIcCardNo,jdbcType=VARCHAR},
</if>
- <if test="opOrderNo != null">
- #{opOrderNo,jdbcType=VARCHAR},
+ <if test="opIcCardAddr != null">
+ #{opIcCardAddr,jdbcType=VARCHAR},
+ </if>
+ <if test="opRemainMoney != null">
+ #{opRemainMoney,jdbcType=DOUBLE},
</if>
<if test="openDt != null">
#{openDt,jdbcType=TIMESTAMP},
</if>
- <if test="opWaterTotalAmount != null">
- #{opWaterTotalAmount,jdbcType=FLOAT},
+ <if test="clDt != null">
+ #{clDt,jdbcType=TIMESTAMP},
</if>
- <if test="opEleTotalAmount != null">
- #{opEleTotalAmount,jdbcType=FLOAT},
+ <if test="clType != null">
+ #{clType,jdbcType=TINYINT},
</if>
- <if test="opMoneyRemainUser != null">
- #{opMoneyRemainUser,jdbcType=FLOAT},
- </if>
- <if test="opWaterRemainUser != null">
- #{opWaterRemainUser,jdbcType=FLOAT},
- </if>
- <if test="opType != null">
- #{opType,jdbcType=VARCHAR},
- </if>
- <if test="clIcCardAddr != null">
- #{clIcCardAddr,jdbcType=VARCHAR},
+ <if test="clTotalAmount != null">
+ #{clTotalAmount,jdbcType=DOUBLE},
</if>
<if test="clIcCardNo != null">
#{clIcCardNo,jdbcType=VARCHAR},
</if>
- <if test="clOrderNo != null">
- #{clOrderNo,jdbcType=VARCHAR},
+ <if test="clIcCardAddr != null">
+ #{clIcCardAddr,jdbcType=VARCHAR},
</if>
- <if test="startDt != null">
- #{startDt,jdbcType=TIMESTAMP},
+ <if test="clRemainMoney != null">
+ #{clRemainMoney,jdbcType=DOUBLE},
</if>
- <if test="endDt != null">
- #{endDt,jdbcType=TIMESTAMP},
+ <if test="clThisAmount != null">
+ #{clThisAmount,jdbcType=DOUBLE},
</if>
- <if test="clWaterTotalAmount != null">
- #{clWaterTotalAmount,jdbcType=FLOAT},
+ <if test="clThisMoney != null">
+ #{clThisMoney,jdbcType=DOUBLE},
</if>
- <if test="clEleTotalAmount != null">
- #{clEleTotalAmount,jdbcType=FLOAT},
+ <if test="clThisTime != null">
+ #{clThisTime,jdbcType=INTEGER},
</if>
- <if test="clMoneyRemainUser != null">
- #{clMoneyRemainUser,jdbcType=FLOAT},
+ <if test="clOpenDt != null">
+ #{clOpenDt,jdbcType=TIMESTAMP},
</if>
- <if test="clWaterRemainUser != null">
- #{clWaterRemainUser,jdbcType=FLOAT},
- </if>
- <if test="thisEle != null">
- #{thisEle,jdbcType=FLOAT},
- </if>
- <if test="thisWater != null">
- #{thisWater,jdbcType=FLOAT},
- </if>
- <if test="thisMoney != null">
- #{thisMoney,jdbcType=FLOAT},
- </if>
- <if test="thisDuration != null">
- #{thisDuration,jdbcType=INTEGER},
+ <if test="closeDt != null">
+ #{closeDt,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
@@ -256,6 +224,9 @@
<!--@mbg.generated-->
update rm_open_close_valve_last
<set>
+ <if test="lastHistoryId != null">
+ last_history_id = #{lastHistoryId,jdbcType=BIGINT},
+ </if>
<if test="controllerId != null">
controller_id = #{controllerId,jdbcType=BIGINT},
</if>
@@ -268,74 +239,56 @@
<if test="opDt != null">
op_dt = #{opDt,jdbcType=TIMESTAMP},
</if>
- <if test="opRtuDt != null">
- op_rtu_dt = #{opRtuDt,jdbcType=TIMESTAMP},
+ <if test="opType != null">
+ op_type = #{opType,jdbcType=TINYINT},
</if>
- <if test="opIcCardAddr != null">
- op_ic_card_addr = #{opIcCardAddr,jdbcType=VARCHAR},
+ <if test="opTotalAmount != null">
+ op_total_amount = #{opTotalAmount,jdbcType=DOUBLE},
</if>
<if test="opIcCardNo != null">
op_ic_card_no = #{opIcCardNo,jdbcType=VARCHAR},
</if>
- <if test="opOrderNo != null">
- op_order_no = #{opOrderNo,jdbcType=VARCHAR},
+ <if test="opIcCardAddr != null">
+ op_ic_card_addr = #{opIcCardAddr,jdbcType=VARCHAR},
+ </if>
+ <if test="opRemainMoney != null">
+ op_remain_money = #{opRemainMoney,jdbcType=DOUBLE},
</if>
<if test="openDt != null">
open_dt = #{openDt,jdbcType=TIMESTAMP},
</if>
- <if test="opWaterTotalAmount != null">
- op_water_total_amount = #{opWaterTotalAmount,jdbcType=FLOAT},
+ <if test="clDt != null">
+ cl_dt = #{clDt,jdbcType=TIMESTAMP},
</if>
- <if test="opEleTotalAmount != null">
- op_ele_total_amount = #{opEleTotalAmount,jdbcType=FLOAT},
+ <if test="clType != null">
+ cl_type = #{clType,jdbcType=TINYINT},
</if>
- <if test="opMoneyRemainUser != null">
- op_money_remain_user = #{opMoneyRemainUser,jdbcType=FLOAT},
- </if>
- <if test="opWaterRemainUser != null">
- op_water_remain_user = #{opWaterRemainUser,jdbcType=FLOAT},
- </if>
- <if test="opType != null">
- op_type = #{opType,jdbcType=VARCHAR},
- </if>
- <if test="clIcCardAddr != null">
- cl_ic_card_addr = #{clIcCardAddr,jdbcType=VARCHAR},
+ <if test="clTotalAmount != null">
+ cl_total_amount = #{clTotalAmount,jdbcType=DOUBLE},
</if>
<if test="clIcCardNo != null">
cl_ic_card_no = #{clIcCardNo,jdbcType=VARCHAR},
</if>
- <if test="clOrderNo != null">
- cl_order_no = #{clOrderNo,jdbcType=VARCHAR},
+ <if test="clIcCardAddr != null">
+ cl_ic_card_addr = #{clIcCardAddr,jdbcType=VARCHAR},
</if>
- <if test="startDt != null">
- start_dt = #{startDt,jdbcType=TIMESTAMP},
+ <if test="clRemainMoney != null">
+ cl_remain_money = #{clRemainMoney,jdbcType=DOUBLE},
</if>
- <if test="endDt != null">
- end_dt = #{endDt,jdbcType=TIMESTAMP},
+ <if test="clThisAmount != null">
+ cl_this_amount = #{clThisAmount,jdbcType=DOUBLE},
</if>
- <if test="clWaterTotalAmount != null">
- cl_water_total_amount = #{clWaterTotalAmount,jdbcType=FLOAT},
+ <if test="clThisMoney != null">
+ cl_this_money = #{clThisMoney,jdbcType=DOUBLE},
</if>
- <if test="clEleTotalAmount != null">
- cl_ele_total_amount = #{clEleTotalAmount,jdbcType=FLOAT},
+ <if test="clThisTime != null">
+ cl_this_time = #{clThisTime,jdbcType=INTEGER},
</if>
- <if test="clMoneyRemainUser != null">
- cl_money_remain_user = #{clMoneyRemainUser,jdbcType=FLOAT},
+ <if test="clOpenDt != null">
+ cl_open_dt = #{clOpenDt,jdbcType=TIMESTAMP},
</if>
- <if test="clWaterRemainUser != null">
- cl_water_remain_user = #{clWaterRemainUser,jdbcType=FLOAT},
- </if>
- <if test="thisEle != null">
- this_ele = #{thisEle,jdbcType=FLOAT},
- </if>
- <if test="thisWater != null">
- this_water = #{thisWater,jdbcType=FLOAT},
- </if>
- <if test="thisMoney != null">
- this_money = #{thisMoney,jdbcType=FLOAT},
- </if>
- <if test="thisDuration != null">
- this_duration = #{thisDuration,jdbcType=INTEGER},
+ <if test="closeDt != null">
+ close_dt = #{closeDt,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
@@ -343,33 +296,28 @@
<update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveLast">
<!--@mbg.generated-->
update rm_open_close_valve_last
- set controller_id = #{controllerId,jdbcType=BIGINT},
+ set last_history_id = #{lastHistoryId,jdbcType=BIGINT},
+ controller_id = #{controllerId,jdbcType=BIGINT},
intake_id = #{intakeId,jdbcType=BIGINT},
rtu_addr = #{rtuAddr,jdbcType=VARCHAR},
op_dt = #{opDt,jdbcType=TIMESTAMP},
- op_rtu_dt = #{opRtuDt,jdbcType=TIMESTAMP},
- op_ic_card_addr = #{opIcCardAddr,jdbcType=VARCHAR},
+ op_type = #{opType,jdbcType=TINYINT},
+ op_total_amount = #{opTotalAmount,jdbcType=DOUBLE},
op_ic_card_no = #{opIcCardNo,jdbcType=VARCHAR},
- op_order_no = #{opOrderNo,jdbcType=VARCHAR},
+ op_ic_card_addr = #{opIcCardAddr,jdbcType=VARCHAR},
+ op_remain_money = #{opRemainMoney,jdbcType=DOUBLE},
open_dt = #{openDt,jdbcType=TIMESTAMP},
- op_water_total_amount = #{opWaterTotalAmount,jdbcType=FLOAT},
- op_ele_total_amount = #{opEleTotalAmount,jdbcType=FLOAT},
- op_money_remain_user = #{opMoneyRemainUser,jdbcType=FLOAT},
- op_water_remain_user = #{opWaterRemainUser,jdbcType=FLOAT},
- op_type = #{opType,jdbcType=VARCHAR},
- cl_ic_card_addr = #{clIcCardAddr,jdbcType=VARCHAR},
+ cl_dt = #{clDt,jdbcType=TIMESTAMP},
+ cl_type = #{clType,jdbcType=TINYINT},
+ cl_total_amount = #{clTotalAmount,jdbcType=DOUBLE},
cl_ic_card_no = #{clIcCardNo,jdbcType=VARCHAR},
- cl_order_no = #{clOrderNo,jdbcType=VARCHAR},
- start_dt = #{startDt,jdbcType=TIMESTAMP},
- end_dt = #{endDt,jdbcType=TIMESTAMP},
- cl_water_total_amount = #{clWaterTotalAmount,jdbcType=FLOAT},
- cl_ele_total_amount = #{clEleTotalAmount,jdbcType=FLOAT},
- cl_money_remain_user = #{clMoneyRemainUser,jdbcType=FLOAT},
- cl_water_remain_user = #{clWaterRemainUser,jdbcType=FLOAT},
- this_ele = #{thisEle,jdbcType=FLOAT},
- this_water = #{thisWater,jdbcType=FLOAT},
- this_money = #{thisMoney,jdbcType=FLOAT},
- this_duration = #{thisDuration,jdbcType=INTEGER}
+ cl_ic_card_addr = #{clIcCardAddr,jdbcType=VARCHAR},
+ cl_remain_money = #{clRemainMoney,jdbcType=DOUBLE},
+ cl_this_amount = #{clThisAmount,jdbcType=DOUBLE},
+ cl_this_money = #{clThisMoney,jdbcType=DOUBLE},
+ cl_this_time = #{clThisTime,jdbcType=INTEGER},
+ cl_open_dt = #{clOpenDt,jdbcType=TIMESTAMP},
+ close_dt = #{closeDt,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/rtuData/p206V1_0_0/TkDealCloseValveReport.java b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/rtuData/p206V1_0_0/TkDealCloseValveReport.java
index 8c148ed..802e440 100644
--- a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/rtuData/p206V1_0_0/TkDealCloseValveReport.java
+++ b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/rtuData/p206V1_0_0/TkDealCloseValveReport.java
@@ -1,14 +1,14 @@
package com.dy.rtuMw.server.rtuData.p206V1_0_0;
-import com.dy.rtuMw.server.rtuData.TaskSurpport;
-import com.dy.rtuMw.server.rtuData.dbSv.DbSv;
import com.dy.common.mw.protocol.Data;
-import com.dy.common.mw.protocol.p206V1_0_0.upVos.DataCd83CloseVo;
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.util.DateTime;
import com.dy.pipIrrGlobal.pojoPr.PrController;
import com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveHistory;
import com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveLast;
+import com.dy.rtuMw.server.rtuData.TaskSurpport;
+import com.dy.rtuMw.server.rtuData.dbSv.DbSv;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
diff --git a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/rtuData/p206V1_0_0/TkDealOpenValveReport.java b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/rtuData/p206V1_0_0/TkDealOpenValveReport.java
index 219fd4a..0c326bd 100644
--- a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/rtuData/p206V1_0_0/TkDealOpenValveReport.java
+++ b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/rtuData/p206V1_0_0/TkDealOpenValveReport.java
@@ -1,14 +1,14 @@
package com.dy.rtuMw.server.rtuData.p206V1_0_0;
-import com.dy.rtuMw.server.rtuData.TaskSurpport;
-import com.dy.rtuMw.server.rtuData.dbSv.DbSv;
import com.dy.common.mw.protocol.Data;
-import com.dy.common.mw.protocol.p206V1_0_0.upVos.DataCd83OpenVo;
import com.dy.common.mw.protocol.p206V1_0_0.DataV1_0_1;
+import com.dy.common.mw.protocol.p206V1_0_0.upVos.DataCd83OpenVo;
import com.dy.common.util.DateTime;
import com.dy.pipIrrGlobal.pojoPr.PrController;
import com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveHistory;
import com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveLast;
+import com.dy.rtuMw.server.rtuData.TaskSurpport;
+import com.dy.rtuMw.server.rtuData.dbSv.DbSv;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
diff --git a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/resources/application-database.yml b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/resources/application-database.yml
index 9f1a545..c487a86 100644
--- a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/resources/application-database.yml
+++ b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/resources/application-database.yml
@@ -3,8 +3,8 @@
datasource: #閰嶇疆鏁版嵁婧�
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
- url: jdbc:mysql://192.168.91.73:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull
-# url: jdbc:mysql://127.0.0.1:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull
+# url: jdbc:mysql://192.168.40.166:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull
+ url: jdbc:mysql://127.0.0.1:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull
username: root
password: dysql,;.abc!@#
druid:
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/common/CommandSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/common/CommandSv.java
index 58b3bf7..602291e 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/common/CommandSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/common/CommandSv.java
@@ -140,6 +140,32 @@
* @return
*/
public VoUnclosedParam getUncloseParam(Long intakeId) {
- return rmCommandHistoryMapper.getUncloseParam(intakeId);
+ Command com = new Command() ;
+ com.id = Command.defaultId;
+ com.code = "LCD0001";
+ com.type = "innerCommand";
+
+ JSONObject response = (JSONObject) JSON.toJSON(sendCom2Mw(com));
+
+ if(response != null && response.getString("code").equals("0001")) {
+ JSONObject attachment = response.getJSONObject("content").getJSONObject("attachment").getJSONObject("onLineMap");
+ HashMap<String, Boolean> onLineMap = JSON.parseObject(attachment.toJSONString(), HashMap.class);
+
+ JSONArray jsonArray = new JSONArray();
+ for (Map.Entry<String, Boolean> entry : onLineMap.entrySet()) {
+ JSONObject jsonObject = new JSONObject();
+ jsonObject.put("rtuAddr", entry.getKey());
+ jsonObject.put("isOnLine", entry.getValue());
+ jsonArray.add(jsonObject);
+ }
+
+ System.out.println(jsonArray);
+ return rmCommandHistoryMapper.getUncloseParam(jsonArray.toJSONString(), intakeId);
+ } else {
+ QueryResultVo<List<VoOnLineIntake>> rsVo = new QueryResultVo<>();
+ VoUnclosedParam voUnclosedParam = new VoUnclosedParam();
+ return voUnclosedParam;
+ }
+
}
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtu/RtuCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtu/RtuCtrl.java
index 5afe421..86cc3c9 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtu/RtuCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtu/RtuCtrl.java
@@ -75,7 +75,7 @@
// 鍙栨按鍙D鎹㈤榾鎺у櫒鍦板潃鍙婇�氳鍗忚
JSONObject job_rtu = getRtu(intakeId, null);
if(job_rtu == null) {
- return BaseResponseUtils.buildError(RemoteResultCode.RTU_NOT_EXIST.getMessage());
+ return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_EXIST.getMessage());
}
String rtuAddr = job_rtu.getString("rtuAddr");
String protocol = job_rtu.getString("protocol");
@@ -184,7 +184,7 @@
// 鍙栨按鍙D鎹㈤榾鎺у櫒鍦板潃鍙婇�氳鍗忚
//PrController prController = commandSv.getControllerByIntakeId(intakeId);
//if(prController == null) {
- // return BaseResponseUtils.buildError(RemoteResultCode.RTU_NOT_EXIST.getMessage());
+ // return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_EXIST.getMessage());
//}
//String rtuAddr = prController.getRtuAddr();
//String protocol = prController.getProtocol();
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/valve/ValveCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/valve/ValveCtrl.java
index 3d9cbf5..3888f7c 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/valve/ValveCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/valve/ValveCtrl.java
@@ -111,7 +111,7 @@
// 鍙栨按鍙D鎹㈤榾鎺у櫒鍦板潃鍙婇�氳鍗忚
JSONObject job_rtu = getRtu(intakeId, null);
if(job_rtu == null) {
- return BaseResponseUtils.buildError(RemoteResultCode.RTU_NOT_EXIST.getMessage());
+ return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_EXIST.getMessage());
}
String rtuAddr = job_rtu.getString("rtuAddr");
String protocol = job_rtu.getString("protocol");
@@ -343,7 +343,7 @@
// 闃�鎺у櫒鍦板潃鎹㈠彇姘村彛ID鍜岄�氳鍗忚
JSONObject job_rtu = getRtu(null, rtuAddr);
if(job_rtu == null) {
- return BaseResponseUtils.buildError(RemoteResultCode.RTU_NOT_EXIST.getMessage());
+ return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_EXIST.getMessage());
}
Long intakeId = job_rtu.getLong("intakeId");
String protocol = job_rtu.getString("protocol");
@@ -384,7 +384,7 @@
//rmCommandHistory.setResult((byte)0);
//commandSv.updateCommandResult(rmCommandHistory);
return BaseResponseUtils.buildFail(response_CallBack.getMsg());
- //return BaseResponseUtils.buildError(WechatResultCode.GET_RESULT_ERROR.getMessage());
+ //return BaseResponseUtils.buildErrorMsgMsg(WechatResultCode.GET_RESULT_ERROR.getMessage());
}
// 鍥炶皟鎴愬姛锛屽啀鍒ゆ柇鎵ц鏄惁鎴愬姛
@@ -527,7 +527,13 @@
Long intakeId = dtoBase.getIntakeId();
Long operator = dtoBase.getOperator();
- VoUnclosedParam voUnclosedParam = commandSv.getUncloseParam(intakeId);
+ VoUnclosedParam voUnclosedParam = null;
+ try {
+ voUnclosedParam = commandSv.getUncloseParam(intakeId);
+ }catch (Exception e) {
+ return BaseResponseUtils.buildErrorMsg("鑾峰彇鏈叧闃�淇℃伅閿欒");
+ }
+
if(voUnclosedParam == null) {
return BaseResponseUtils.buildSuccess(RemoteResultCode.VALVE_CLOSED.getMessage());
}
@@ -544,7 +550,7 @@
// 闃�鎺у櫒鍦板潃鎹㈠彇姘村彛ID鍜岄�氳鍗忚
JSONObject job_rtu = getRtu(null, rtuAddr);
if(job_rtu == null) {
- return BaseResponseUtils.buildError(RemoteResultCode.RTU_NOT_EXIST.getMessage());
+ return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_EXIST.getMessage());
}
//Long intakeId = job_rtu.getLong("intakeId");
String protocol = job_rtu.getString("protocol");
@@ -585,7 +591,7 @@
//rmCommandHistory.setResult((byte)0);
//commandSv.updateCommandResult(rmCommandHistory);
return BaseResponseUtils.buildFail(response_CallBack.getMsg());
- //return BaseResponseUtils.buildError(WechatResultCode.GET_RESULT_ERROR.getMessage());
+ //return BaseResponseUtils.buildErrorMsgMsg(WechatResultCode.GET_RESULT_ERROR.getMessage());
}
// 鍥炶皟鎴愬姛锛屽啀鍒ゆ柇鎵ц鏄惁鎴愬姛
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/ValveCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/ValveCtrl.java
index c923176..4b13527 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/ValveCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/ValveCtrl.java
@@ -108,7 +108,7 @@
// 鍙栨按鍙D鎹㈤榾鎺у櫒鍦板潃鍙婇�氳鍗忚
JSONObject job_rtu = getRtu(intakeId, null);
if(job_rtu == null) {
- return BaseResponseUtils.buildError(WechatResultCode.RTU_NOT_EXIST.getMessage());
+ return BaseResponseUtils.buildErrorMsg(WechatResultCode.RTU_NOT_EXIST.getMessage());
}
String rtuAddr = job_rtu.getString("rtuAddr");
String protocol = job_rtu.getString("protocol");
@@ -290,7 +290,7 @@
public BaseResponse<Boolean> close(@RequestBody @Valid ValveClose valve, BindingResult bindingResult) {
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyMMddHHmmss");
if(bindingResult != null && bindingResult.hasErrors()){
- return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+ return BaseResponseUtils.buildErrorMsg(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
String rtuAddr = valve.getRtuAddr();
@@ -307,7 +307,7 @@
// 闃�鎺у櫒鍦板潃鎹㈠彇姘村彛ID鍜岄�氳鍗忚
JSONObject job_rtu = getRtu(null, rtuAddr);
if(job_rtu == null) {
- return BaseResponseUtils.buildError(WechatResultCode.RTU_NOT_EXIST.getMessage());
+ return BaseResponseUtils.buildErrorMsg(WechatResultCode.RTU_NOT_EXIST.getMessage());
}
Long intakeId = job_rtu.getLong("intakeId");
String protocol = job_rtu.getString("protocol");
@@ -343,7 +343,7 @@
// 鍥炶皟澶辫触
if(!response_CallBack.getCode().equals("0001")) {
return BaseResponseUtils.buildFail(response_CallBack.getMsg());
- //return BaseResponseUtils.buildError(WechatResultCode.GET_RESULT_ERROR.getMessage());
+ //return BaseResponseUtils.buildErrorMsg(WechatResultCode.GET_RESULT_ERROR.getMessage());
}
// 鍥炶皟鎴愬姛锛屽啀鍒ゆ柇鎵ц鏄惁鎴愬姛
--
Gitblit v1.8.0