Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV
New file |
| | |
| | | package com.dy.pipIrrGlobal.daoRm; |
| | | |
| | | import com.dy.pipIrrGlobal.pojoRm.RmIntakeAmount; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * @Author liurunyu |
| | | * @Date 2024/1/17 9:07 |
| | | * @LastEditTime 2024/1/17 9:07 |
| | | * @Description |
| | | */ |
| | | @Mapper |
| | | public interface RmIntakeAmountMapper { |
| | | /** |
| | | * 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(RmIntakeAmount record); |
| | | |
| | | /** |
| | | * insert record to table selective |
| | | * @param record the record |
| | | * @return insert count |
| | | */ |
| | | int insertSelective(RmIntakeAmount record); |
| | | |
| | | /** |
| | | * select by primary key |
| | | * @param id primary key |
| | | * @return object by primary key |
| | | */ |
| | | RmIntakeAmount selectByPrimaryKey(Long id); |
| | | |
| | | /** |
| | | * update record selective |
| | | * @param record the updated record |
| | | * @return update count |
| | | */ |
| | | int updateByPrimaryKeySelective(RmIntakeAmount record); |
| | | |
| | | /** |
| | | * update record |
| | | * @param record the updated record |
| | | * @return update count |
| | | */ |
| | | int updateByPrimaryKey(RmIntakeAmount record); |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrGlobal.daoRm; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveReport; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * @Author liurunyu |
| | | * @Date 2024/1/16 19:44 |
| | | * @LastEditTime 2024/1/16 19:44 |
| | | * @Description |
| | | */ |
| | | @Mapper |
| | | public interface RmOpenCloseValveReportMapper extends BaseMapper<RmOpenCloseValveReport> { |
| | | /** |
| | | * 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(RmOpenCloseValveReport record); |
| | | |
| | | /** |
| | | * insert record to table selective |
| | | * @param record the record |
| | | * @return insert count |
| | | */ |
| | | int insertSelective(RmOpenCloseValveReport record); |
| | | |
| | | /** |
| | | * select by primary key |
| | | * @param id primary key |
| | | * @return object by primary key |
| | | */ |
| | | RmOpenCloseValveReport selectByPrimaryKey(Long id); |
| | | |
| | | /** |
| | | * update record selective |
| | | * @param record the updated record |
| | | * @return update count |
| | | */ |
| | | int updateByPrimaryKeySelective(RmOpenCloseValveReport record); |
| | | |
| | | /** |
| | | * update record |
| | | * @param record the updated record |
| | | * @return update count |
| | | */ |
| | | int updateByPrimaryKey(RmOpenCloseValveReport record); |
| | | } |
| | |
| | | * @Author liurunyu |
| | | * @Date 2024/1/16 11:03 |
| | | * @LastEditTime 2024/1/16 11:03 |
| | | * @Description |
| | | * @Description æ§å¶å¨æ¥è¦ä¸ç¶æï¼åå²ï¼ |
| | | */ |
| | | /** |
| | | * æ§å¶å¨æ¥è¦ä¸ç¶æï¼åå²ï¼ |
| | | */ |
| | | @TableName(value="rm_alarm_state_history", autoResultMap = true) |
| | | @Data |
| | | @Builder |
| | |
| | | * @Author liurunyu |
| | | * @Date 2024/1/16 10:39 |
| | | * @LastEditTime 2024/1/16 10:39 |
| | | * @Description |
| | | * @Description æ§å¶å¨æ¥è¦ä¸ç¶æï¼ææ°ï¼ |
| | | */ |
| | | /** |
| | | * æ§å¶å¨æ¥è¦ä¸ç¶æï¼ææ°ï¼ |
| | | */ |
| | | @TableName(value="rm_alarm_state_last", autoResultMap = true) |
| | | @Data |
| | | @Builder |
| | |
| | | * @Author liurunyu |
| | | * @Date 2024/1/16 14:59 |
| | | * @LastEditTime 2024/1/16 14:59 |
| | | * @Description |
| | | * @Description ç»ç«¯èªæ¥ï¼ææ°ï¼ |
| | | */ |
| | | /** |
| | | * ç»ç«¯èªæ¥ï¼ææ°ï¼ |
| | | */ |
| | | @TableName(value="rm_alarm_state_history", autoResultMap = true) |
| | | @Data |
| | | @Builder |
| | |
| | | * @Author liurunyu |
| | | * @Date 2024/1/16 14:45 |
| | | * @LastEditTime 2024/1/16 14:45 |
| | | * @Description |
| | | * @Description ç»ç«¯èªæ¥ï¼ææ°ï¼ |
| | | */ |
| | | /** |
| | | * ç»ç«¯èªæ¥ï¼ææ°ï¼ |
| | | */ |
| | | |
| | | @TableName(value="rm_alarm_state_last", autoResultMap = true) |
| | | @Data |
| | | @Builder |
New file |
| | |
| | | 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.po.BaseEntity; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.*; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Author liurunyu |
| | | * @Date 2024/1/17 9:07 |
| | | * @LastEditTime 2024/1/17 9:07 |
| | | * @Description åæ°´å£åæ°´é |
| | | */ |
| | | @TableName(value="rm_intake_amount", autoResultMap = true) |
| | | @Data |
| | | @Builder |
| | | @ToString |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @Schema(name = "åæ°´å£åæ°´é") |
| | | public class RmIntakeAmount implements BaseEntity { |
| | | |
| | | public static final long serialVersionUID = 202401170908001L; |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | @TableId(type = IdType.INPUT) |
| | | public Long id; |
| | | |
| | | /** |
| | | * åæ°´å£IDï¼å¤é®ï¼ |
| | | */ |
| | | @Schema(description = "åæ°´å£å®ä½å¤é®", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long intakeid; |
| | | |
| | | /** |
| | | * ç´¯è®¡åæ°´éï¼ä¸å
æ¬æ¼ææ°´éï¼ |
| | | */ |
| | | @Schema(description = "ç´¯è®¡åæ°´éï¼ä¸å
æ¬æ¼ææ°´éï¼", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double amount; |
| | | |
| | | /** |
| | | * ç´¯è®¡æ¼ææ°´é |
| | | */ |
| | | @Schema(description = "ç´¯è®¡æ¼ææ°´é", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double loss; |
| | | |
| | | /** |
| | | * æå计水éçæ§å¶å¨IDï¼å¤é®ï¼ |
| | | */ |
| | | @Schema(description = "æ§å¶å¨å®ä½å¤é®", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long controlleridlast; |
| | | |
| | | /** |
| | | * æåè®¡æ°´éæ¥æ |
| | | */ |
| | | @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) |
| | | public Double amountlast; |
| | | |
| | | /** |
| | | * æåè®¡æ°´éæ¶æ§å¶å¨ç´¯è®¡æ°´é |
| | | */ |
| | | @Schema(description = "æåè®¡æ°´éæ¶æ§å¶å¨ç´¯è®¡æ°´é", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double totalamountlast; |
| | | |
| | | /** |
| | | * æåè®¡æ°´éæ¥æºï¼1å¼é工使¥ï¼2å
³éæ¥ï¼3èªæ¥ï¼ |
| | | */ |
| | | @Schema(description = "æåè®¡æ°´éæ¥æºï¼1å¼é工使¥ï¼2å
³éæ¥ï¼3èªæ¥ï¼", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Byte resourcetypelast; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | 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.po.BaseEntity; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.*; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Author liurunyu |
| | | * @Date 2024/1/16 19:44 |
| | | * @LastEditTime 2024/1/16 19:44 |
| | | * @Description æ§å¶å¨å¼å
³éè®°å½ |
| | | */ |
| | | @TableName(value="rm_open_close_valve_report", autoResultMap = true) |
| | | @Data |
| | | @Builder |
| | | @ToString |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @Schema(name = "æ§å¶å¨å¼å
³éè®°å½") |
| | | public class RmOpenCloseValveReport implements BaseEntity { |
| | | |
| | | public static final long serialVersionUID = 202401161929001L; |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | @TableId(type = IdType.INPUT) |
| | | public Long id; |
| | | |
| | | /** |
| | | * æ§å¶å¨å®ä½IDï¼å¤é®ï¼ |
| | | */ |
| | | @Schema(description = "æ§å¶å¨å®ä½å¤é®", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long controllerid; |
| | | |
| | | /** |
| | | * åæ°´å£å®ä½IDï¼å¤é®ï¼ |
| | | */ |
| | | @Schema(description = "åæ°´å£å®ä½å¤é®", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long intakeid; |
| | | |
| | | /** |
| | | * æ§å¶å¨å°å |
| | | */ |
| | | @Schema(description = "æ§å¶å¨å°å", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | public String rtuaddr; |
| | | |
| | | /** |
| | | * å¼éæ°æ®æ¥æ¶æ¶é´ |
| | | */ |
| | | @Schema(description = "å¼éæ°æ®æ¥æ¶æ¶é´", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | public Date opdt; |
| | | |
| | | /** |
| | | * å¼éç±»å |
| | | */ |
| | | @Schema(description = "å¼éç±»å", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Byte optype; |
| | | |
| | | /** |
| | | * å¼éæ¶ç´¯è®¡æµé |
| | | */ |
| | | @Schema(description = "å¼éæ¶ç´¯è®¡æµé", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double optotalamount; |
| | | |
| | | /** |
| | | * å¼éICå¡ç¼å· |
| | | */ |
| | | @Schema(description = "å¼éICå¡ç¼å·", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public String opiccardno; |
| | | |
| | | /** |
| | | * å¼éicå¡å°å |
| | | */ |
| | | @Schema(description = "å¼éicå¡å°å", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public String opiccardaddr; |
| | | |
| | | /** |
| | | * å¼éæ¶å©ä½éé¢ |
| | | */ |
| | | @Schema(description = "å¼éæ¶å©ä½éé¢", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double opremainmoney; |
| | | |
| | | /** |
| | | * å¼éæ¶æ§å¶å¨æ¶é |
| | | */ |
| | | @Schema(description = "å¼éæ¶æ§å¶å¨æ¶é", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | public Date opendt; |
| | | |
| | | /** |
| | | * å
³éæ°æ®æ¥æ¶æ¥ææ¶é´ |
| | | */ |
| | | @Schema(description = "éæ°æ®æ¥æ¶æ¥ææ¶é´", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | public Date cldt; |
| | | |
| | | /** |
| | | * å
³éç±»å |
| | | */ |
| | | @Schema(description = "å
³éç±»å", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Byte cltype; |
| | | |
| | | /** |
| | | * å
³éæ¶ç´¯è®¡æµé |
| | | */ |
| | | @Schema(description = "å
³éæ¶ç´¯è®¡æµé", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double cltotalamount; |
| | | |
| | | /** |
| | | * å
³éæ¶ICå¡ç¼å· |
| | | */ |
| | | @Schema(description = "å
³éæ¶ICå¡ç¼å·", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public String cliccardno; |
| | | |
| | | /** |
| | | * å
³éæ¶ICå¡å°å |
| | | */ |
| | | @Schema(description = "å
³éæ¶ICå¡å°å", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public String cliccardaddr; |
| | | |
| | | /** |
| | | * å
³éæ¶å©ä½éé¢ |
| | | */ |
| | | @Schema(description = "å
³éæ¶å©ä½éé¢", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double clremainmoney; |
| | | |
| | | /** |
| | | * å
³éæ¥ä¸æ¬æ¬¡ç¨æ°´é |
| | | */ |
| | | @Schema(description = "å
³éæ¥ä¸æ¬æ¬¡ç¨æ°´é", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double clthisamount; |
| | | |
| | | /** |
| | | * å
³éæ¥ä¸æ¬æ¬¡æ¶è´¹éé¢ |
| | | */ |
| | | @Schema(description = "å
³éæ¥ä¸æ¬æ¬¡æ¶è´¹éé¢", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double clthismoney; |
| | | |
| | | /** |
| | | * å
³éæ¥ä¸æ¬æ¬¡ç¨æ°´æ¶é¿ï¼åéï¼ |
| | | */ |
| | | @Schema(description = "å
³éæ¥ä¸æ¬æ¬¡ç¨æ°´æ¶é¿ï¼åéï¼", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Integer clthistime; |
| | | |
| | | /** |
| | | * å
³éæ¥ä¸çå¼éæ¶æ§å¶å¨æ¶é |
| | | */ |
| | | @Schema(description = "å
³éæ¥ä¸çå¼éæ¶æ§å¶å¨æ¶é", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | public Date clopendt; |
| | | |
| | | /** |
| | | * å
³éæ¶æ§å¶å¨æ¶é |
| | | */ |
| | | @Schema(description = "å
³éæ¶æ§å¶å¨æ¶é", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | public Date closedt; |
| | | |
| | | } |
| | |
| | | package com.dy.pipIrrGlobal.util; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | public class Constant { |
| | | /** |
| | |
| | | } |
| | | return null ; |
| | | } |
| | | |
| | | // 1ãå·å¡å¼éï¼2å·å¡å
³éï¼3ãä¸å¿ç«å¼éï¼4ãä¸å¿ç«å
³éï¼5ãæ¬ è´¹å
³éï¼ |
| | | // 6ãæµé计æ
éå
³éï¼7ãç´§æ¥å
³éï¼8ãç¨æ·è¿ç¨å¼éï¼9ãç¨æ·è¿ç¨å
³éï¼ |
| | | // 16ï¼ç¨æ·å¼éå管éå
æ²¡ææ°´ï¼èªå¨å
³éã管éä¸åºæ°´èªå¨å
³é |
| | | public static final Integer valveOpenByIC = 1 ;//å·å¡å¼é |
| | | public static final Integer valveCloseByIC = 2 ;//å·å¡å
³é |
| | | public static final Integer valveOpenByCenter = 3 ;//ä¸å¿ç«å¼é |
| | | public static final Integer valveCloseByCenter = 4 ;//ä¸å¿ç«å
³é |
| | | public static final Integer valveCloseByFee = 5 ;//æ¬ è´¹å
³é |
| | | public static final Integer valveCloseByFlowMeterFault = 6 ;//æµé计æ
éå
³é |
| | | public static final Integer valveCloseByEmergency = 7 ;//ç´§æ¥å
³é |
| | | public static final Integer valveOpenByRemoteUser = 8 ;//ç¨æ·è¿ç¨å¼é |
| | | public static final Integer valveCloseByRemoteUser = 9 ;//ç¨æ·è¿ç¨å
³éï¼ |
| | | public static final Integer valveCloseByNoWater = 16 ;//ç®¡éæ æ°´èªå¨å
³éï¼ |
| | | |
| | | public static Map<Integer, String> openCloseValveTypes(){ |
| | | Map<Integer, String> map = new HashMap<>() ; |
| | | map.put(valveOpenByIC, "å·å¡å¼é"); |
| | | map.put(valveCloseByIC , "å·å¡å
³é") ; |
| | | map.put(valveOpenByCenter , "ä¸å¿ç«å¼é") ; |
| | | map.put(valveCloseByCenter , "ä¸å¿ç«å
³é") ; |
| | | map.put(valveCloseByFee , "æ¬ è´¹å
³é") ; |
| | | map.put(valveCloseByFlowMeterFault , "æµé计æ
éå
³é") ; |
| | | map.put(valveCloseByEmergency , "ç´§æ¥å
³é") ; |
| | | map.put(valveOpenByRemoteUser , "ç¨æ·è¿ç¨å¼é") ; |
| | | map.put(valveCloseByRemoteUser , "ç¨æ·è¿ç¨å
³é") ; |
| | | map.put(valveCloseByNoWater , "ç®¡éæ æ°´èªå¨å
³é") ; |
| | | return map ; |
| | | } |
| | | public static String openCloseValveTypeName(Integer type){ |
| | | if(type != null){ |
| | | return switch (type.intValue()) { |
| | | case 1 -> "å·å¡å¼é"; |
| | | case 2 -> "å·å¡å
³é"; |
| | | case 3 -> "ä¸å¿ç«å¼é"; |
| | | case 4 -> "ä¸å¿ç«å
³é"; |
| | | case 5 -> "æ¬ è´¹å
³é"; |
| | | case 6 -> "æµé计æ
éå
³é"; |
| | | case 7 -> "ç´§æ¥å
³é"; |
| | | case 8 -> "ç¨æ·è¿ç¨å¼é"; |
| | | case 9 -> "ç¨æ·è¿ç¨å
³é"; |
| | | case 16 -> "ç®¡éæ æ°´èªå¨å
³é"; |
| | | default -> "æªç¥"; |
| | | }; |
| | | } |
| | | return null ; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.dy.pipIrrGlobal.daoRm.RmIntakeAmountMapper"> |
| | | <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoRm.RmIntakeAmount"> |
| | | <!--@mbg.generated--> |
| | | <!--@Table rm_intake_amount--> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="intakeId" jdbcType="BIGINT" property="intakeid" /> |
| | | <result column="amount" jdbcType="DOUBLE" property="amount" /> |
| | | <result column="loss" jdbcType="DOUBLE" property="loss" /> |
| | | <result column="controllerIdLast" jdbcType="BIGINT" property="controlleridlast" /> |
| | | <result column="dtLast" jdbcType="DATE" property="dtlast" /> |
| | | <result column="amountLast" jdbcType="DOUBLE" property="amountlast" /> |
| | | <result column="totalAmountLast" jdbcType="DOUBLE" property="totalamountlast" /> |
| | | <result column="resourceTypeLast" jdbcType="TINYINT" property="resourcetypelast" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, intakeId, amount, loss, controllerIdLast, dtLast, amountLast, totalAmountLast, |
| | | resourceTypeLast |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from rm_intake_amount |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | <!--@mbg.generated--> |
| | | delete from rm_intake_amount |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoRm.RmIntakeAmount"> |
| | | <!--@mbg.generated--> |
| | | insert into rm_intake_amount (id, intakeId, amount, |
| | | loss, controllerIdLast, dtLast, |
| | | amountLast, totalAmountLast, resourceTypeLast |
| | | ) |
| | | values (#{id,jdbcType=BIGINT}, #{intakeid,jdbcType=BIGINT}, #{amount,jdbcType=DOUBLE}, |
| | | #{loss,jdbcType=DOUBLE}, #{controlleridlast,jdbcType=BIGINT}, #{dtlast,jdbcType=DATE}, |
| | | #{amountlast,jdbcType=DOUBLE}, #{totalamountlast,jdbcType=DOUBLE}, #{resourcetypelast,jdbcType=TINYINT} |
| | | ) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmIntakeAmount"> |
| | | <!--@mbg.generated--> |
| | | insert into rm_intake_amount |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | id, |
| | | </if> |
| | | <if test="intakeid != null"> |
| | | intakeId, |
| | | </if> |
| | | <if test="amount != null"> |
| | | amount, |
| | | </if> |
| | | <if test="loss != null"> |
| | | loss, |
| | | </if> |
| | | <if test="controlleridlast != null"> |
| | | controllerIdLast, |
| | | </if> |
| | | <if test="dtlast != null"> |
| | | dtLast, |
| | | </if> |
| | | <if test="amountlast != null"> |
| | | amountLast, |
| | | </if> |
| | | <if test="totalamountlast != null"> |
| | | totalAmountLast, |
| | | </if> |
| | | <if test="resourcetypelast != null"> |
| | | resourceTypeLast, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | #{id,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="intakeid != null"> |
| | | #{intakeid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="amount != null"> |
| | | #{amount,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="loss != null"> |
| | | #{loss,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="controlleridlast != null"> |
| | | #{controlleridlast,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="dtlast != null"> |
| | | #{dtlast,jdbcType=DATE}, |
| | | </if> |
| | | <if test="amountlast != null"> |
| | | #{amountlast,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="totalamountlast != null"> |
| | | #{totalamountlast,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="resourcetypelast != null"> |
| | | #{resourcetypelast,jdbcType=TINYINT}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmIntakeAmount"> |
| | | <!--@mbg.generated--> |
| | | update rm_intake_amount |
| | | <set> |
| | | <if test="intakeid != null"> |
| | | intakeId = #{intakeid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="amount != null"> |
| | | amount = #{amount,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="loss != null"> |
| | | loss = #{loss,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="controlleridlast != null"> |
| | | controllerIdLast = #{controlleridlast,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="dtlast != null"> |
| | | dtLast = #{dtlast,jdbcType=DATE}, |
| | | </if> |
| | | <if test="amountlast != null"> |
| | | amountLast = #{amountlast,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="totalamountlast != null"> |
| | | totalAmountLast = #{totalamountlast,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="resourcetypelast != null"> |
| | | resourceTypeLast = #{resourcetypelast,jdbcType=TINYINT}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoRm.RmIntakeAmount"> |
| | | <!--@mbg.generated--> |
| | | update rm_intake_amount |
| | | set intakeId = #{intakeid,jdbcType=BIGINT}, |
| | | amount = #{amount,jdbcType=DOUBLE}, |
| | | loss = #{loss,jdbcType=DOUBLE}, |
| | | controllerIdLast = #{controlleridlast,jdbcType=BIGINT}, |
| | | dtLast = #{dtlast,jdbcType=DATE}, |
| | | amountLast = #{amountlast,jdbcType=DOUBLE}, |
| | | totalAmountLast = #{totalamountlast,jdbcType=DOUBLE}, |
| | | resourceTypeLast = #{resourcetypelast,jdbcType=TINYINT} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.dy.pipIrrGlobal.daoRm.RmOpenCloseValveReportMapper"> |
| | | <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveReport"> |
| | | <!--@mbg.generated--> |
| | | <!--@Table rm_open_close_valve_report--> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="controllerId" jdbcType="BIGINT" property="controllerid" /> |
| | | <result column="intakeId" jdbcType="BIGINT" property="intakeid" /> |
| | | <result column="rtuAddr" jdbcType="VARCHAR" property="rtuaddr" /> |
| | | <result column="opDt" jdbcType="DATE" property="opdt" /> |
| | | <result column="opType" jdbcType="TINYINT" property="optype" /> |
| | | <result column="opTotalAmount" jdbcType="DOUBLE" property="optotalamount" /> |
| | | <result column="opIcCardNo" jdbcType="VARCHAR" property="opiccardno" /> |
| | | <result column="opIcCardAddr" jdbcType="VARCHAR" property="opiccardaddr" /> |
| | | <result column="opRemainMoney" jdbcType="DOUBLE" property="opremainmoney" /> |
| | | <result column="openDt" jdbcType="DATE" property="opendt" /> |
| | | <result column="clDt" jdbcType="DATE" property="cldt" /> |
| | | <result column="clType" jdbcType="TINYINT" property="cltype" /> |
| | | <result column="clTotalAmount" jdbcType="DOUBLE" property="cltotalamount" /> |
| | | <result column="clIcCardNo" jdbcType="VARCHAR" property="cliccardno" /> |
| | | <result column="clIcCardAddr" jdbcType="VARCHAR" property="cliccardaddr" /> |
| | | <result column="clRemainMoney" jdbcType="DOUBLE" property="clremainmoney" /> |
| | | <result column="clThisAmount" jdbcType="DOUBLE" property="clthisamount" /> |
| | | <result column="clThisMoney" jdbcType="DOUBLE" property="clthismoney" /> |
| | | <result column="clThisTime" jdbcType="INTEGER" property="clthistime" /> |
| | | <result column="clOpenDt" jdbcType="DATE" property="clopendt" /> |
| | | <result column="closeDt" jdbcType="DATE" property="closedt" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, controllerId, intakeId, rtuAddr, opDt, opType, opTotalAmount, opIcCardNo, opIcCardAddr, |
| | | opRemainMoney, openDt, clDt, clType, clTotalAmount, clIcCardNo, clIcCardAddr, clRemainMoney, |
| | | clThisAmount, clThisMoney, clThisTime, clOpenDt, closeDt |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from rm_open_close_valve_report |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | <!--@mbg.generated--> |
| | | delete from rm_open_close_valve_report |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveReport"> |
| | | <!--@mbg.generated--> |
| | | insert into rm_open_close_valve_report (id, controllerId, intakeId, |
| | | rtuAddr, opDt, opType, |
| | | opTotalAmount, opIcCardNo, opIcCardAddr, |
| | | opRemainMoney, openDt, clDt, |
| | | clType, clTotalAmount, clIcCardNo, |
| | | clIcCardAddr, clRemainMoney, clThisAmount, |
| | | clThisMoney, clThisTime, clOpenDt, |
| | | closeDt) |
| | | values (#{id,jdbcType=BIGINT}, #{controllerid,jdbcType=BIGINT}, #{intakeid,jdbcType=BIGINT}, |
| | | #{rtuaddr,jdbcType=VARCHAR}, #{opdt,jdbcType=DATE}, #{optype,jdbcType=TINYINT}, |
| | | #{optotalamount,jdbcType=DOUBLE}, #{opiccardno,jdbcType=VARCHAR}, #{opiccardaddr,jdbcType=VARCHAR}, |
| | | #{opremainmoney,jdbcType=DOUBLE}, #{opendt,jdbcType=DATE}, #{cldt,jdbcType=DATE}, |
| | | #{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=DATE}, |
| | | #{closedt,jdbcType=DATE}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveReport"> |
| | | <!--@mbg.generated--> |
| | | insert into rm_open_close_valve_report |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | id, |
| | | </if> |
| | | <if test="controllerid != null"> |
| | | controllerId, |
| | | </if> |
| | | <if test="intakeid != null"> |
| | | intakeId, |
| | | </if> |
| | | <if test="rtuaddr != null"> |
| | | rtuAddr, |
| | | </if> |
| | | <if test="opdt != null"> |
| | | opDt, |
| | | </if> |
| | | <if test="optype != null"> |
| | | opType, |
| | | </if> |
| | | <if test="optotalamount != null"> |
| | | opTotalAmount, |
| | | </if> |
| | | <if test="opiccardno != null"> |
| | | opIcCardNo, |
| | | </if> |
| | | <if test="opiccardaddr != null"> |
| | | opIcCardAddr, |
| | | </if> |
| | | <if test="opremainmoney != null"> |
| | | opRemainMoney, |
| | | </if> |
| | | <if test="opendt != null"> |
| | | openDt, |
| | | </if> |
| | | <if test="cldt != null"> |
| | | clDt, |
| | | </if> |
| | | <if test="cltype != null"> |
| | | clType, |
| | | </if> |
| | | <if test="cltotalamount != null"> |
| | | clTotalAmount, |
| | | </if> |
| | | <if test="cliccardno != null"> |
| | | clIcCardNo, |
| | | </if> |
| | | <if test="cliccardaddr != null"> |
| | | clIcCardAddr, |
| | | </if> |
| | | <if test="clremainmoney != null"> |
| | | clRemainMoney, |
| | | </if> |
| | | <if test="clthisamount != null"> |
| | | clThisAmount, |
| | | </if> |
| | | <if test="clthismoney != null"> |
| | | clThisMoney, |
| | | </if> |
| | | <if test="clthistime != null"> |
| | | clThisTime, |
| | | </if> |
| | | <if test="clopendt != null"> |
| | | clOpenDt, |
| | | </if> |
| | | <if test="closedt != null"> |
| | | closeDt, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | #{id,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="controllerid != null"> |
| | | #{controllerid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="intakeid != null"> |
| | | #{intakeid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="rtuaddr != null"> |
| | | #{rtuaddr,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="opdt != null"> |
| | | #{opdt,jdbcType=DATE}, |
| | | </if> |
| | | <if test="optype != null"> |
| | | #{optype,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="optotalamount != null"> |
| | | #{optotalamount,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="opiccardno != null"> |
| | | #{opiccardno,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="opiccardaddr != null"> |
| | | #{opiccardaddr,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="opremainmoney != null"> |
| | | #{opremainmoney,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="opendt != null"> |
| | | #{opendt,jdbcType=DATE}, |
| | | </if> |
| | | <if test="cldt != null"> |
| | | #{cldt,jdbcType=DATE}, |
| | | </if> |
| | | <if test="cltype != null"> |
| | | #{cltype,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="cltotalamount != null"> |
| | | #{cltotalamount,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="cliccardno != null"> |
| | | #{cliccardno,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="cliccardaddr != null"> |
| | | #{cliccardaddr,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="clremainmoney != null"> |
| | | #{clremainmoney,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="clthisamount != null"> |
| | | #{clthisamount,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="clthismoney != null"> |
| | | #{clthismoney,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="clthistime != null"> |
| | | #{clthistime,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="clopendt != null"> |
| | | #{clopendt,jdbcType=DATE}, |
| | | </if> |
| | | <if test="closedt != null"> |
| | | #{closedt,jdbcType=DATE}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveReport"> |
| | | <!--@mbg.generated--> |
| | | update rm_open_close_valve_report |
| | | <set> |
| | | <if test="controllerid != null"> |
| | | controllerId = #{controllerid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="intakeid != null"> |
| | | intakeId = #{intakeid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="rtuaddr != null"> |
| | | rtuAddr = #{rtuaddr,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="opdt != null"> |
| | | opDt = #{opdt,jdbcType=DATE}, |
| | | </if> |
| | | <if test="optype != null"> |
| | | opType = #{optype,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="optotalamount != null"> |
| | | opTotalAmount = #{optotalamount,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="opiccardno != null"> |
| | | opIcCardNo = #{opiccardno,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="opiccardaddr != null"> |
| | | opIcCardAddr = #{opiccardaddr,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="opremainmoney != null"> |
| | | opRemainMoney = #{opremainmoney,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="opendt != null"> |
| | | openDt = #{opendt,jdbcType=DATE}, |
| | | </if> |
| | | <if test="cldt != null"> |
| | | clDt = #{cldt,jdbcType=DATE}, |
| | | </if> |
| | | <if test="cltype != null"> |
| | | clType = #{cltype,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="cltotalamount != null"> |
| | | clTotalAmount = #{cltotalamount,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="cliccardno != null"> |
| | | clIcCardNo = #{cliccardno,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="cliccardaddr != null"> |
| | | clIcCardAddr = #{cliccardaddr,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="clremainmoney != null"> |
| | | clRemainMoney = #{clremainmoney,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="clthisamount != null"> |
| | | clThisAmount = #{clthisamount,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="clthismoney != null"> |
| | | clThisMoney = #{clthismoney,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="clthistime != null"> |
| | | clThisTime = #{clthistime,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="clopendt != null"> |
| | | clOpenDt = #{clopendt,jdbcType=DATE}, |
| | | </if> |
| | | <if test="closedt != null"> |
| | | closeDt = #{closedt,jdbcType=DATE}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveReport"> |
| | | <!--@mbg.generated--> |
| | | update rm_open_close_valve_report |
| | | set controllerId = #{controllerid,jdbcType=BIGINT}, |
| | | intakeId = #{intakeid,jdbcType=BIGINT}, |
| | | rtuAddr = #{rtuaddr,jdbcType=VARCHAR}, |
| | | opDt = #{opdt,jdbcType=DATE}, |
| | | opType = #{optype,jdbcType=TINYINT}, |
| | | opTotalAmount = #{optotalamount,jdbcType=DOUBLE}, |
| | | opIcCardNo = #{opiccardno,jdbcType=VARCHAR}, |
| | | opIcCardAddr = #{opiccardaddr,jdbcType=VARCHAR}, |
| | | opRemainMoney = #{opremainmoney,jdbcType=DOUBLE}, |
| | | openDt = #{opendt,jdbcType=DATE}, |
| | | clDt = #{cldt,jdbcType=DATE}, |
| | | clType = #{cltype,jdbcType=TINYINT}, |
| | | clTotalAmount = #{cltotalamount,jdbcType=DOUBLE}, |
| | | clIcCardNo = #{cliccardno,jdbcType=VARCHAR}, |
| | | clIcCardAddr = #{cliccardaddr,jdbcType=VARCHAR}, |
| | | clRemainMoney = #{clremainmoney,jdbcType=DOUBLE}, |
| | | clThisAmount = #{clthisamount,jdbcType=DOUBLE}, |
| | | clThisMoney = #{clthismoney,jdbcType=DOUBLE}, |
| | | clThisTime = #{clthistime,jdbcType=INTEGER}, |
| | | clOpenDt = #{clopendt,jdbcType=DATE}, |
| | | closeDt = #{closedt,jdbcType=DATE} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
| | |
| | | import com.dy.common.mw.protocol.p206V1_0_0.DataAlarmVo; |
| | | import com.dy.common.mw.protocol.p206V1_0_0.DataStateVo; |
| | | import com.dy.common.mw.protocol.p206V1_0_0.DataV1_0_1; |
| | | import com.dy.common.util.DateTime; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrController; |
| | | import com.dy.pipIrrGlobal.pojoRm.RmAlarmStateHistory; |
| | | import com.dy.pipIrrGlobal.pojoRm.RmAlarmStateLast; |
| | |
| | | DataV1_0_1 dV1_0_1 = (DataV1_0_1)subD ; |
| | | if(dV1_0_1 != null){ |
| | | //dV1_0_1.dataCd81Vo ä¸ dV1_0_1.dataCdC0Vo ä¸ä¼åæ¶æå¼ |
| | | if(dV1_0_1.dataCd81Vo != null){ |
| | | if(dV1_0_1.dataCd81Vo.alarmVo != null || dV1_0_1.dataCd81Vo.stateVo != null){ |
| | | Object[] objs = this.getTaskResults(TkPreGenObjs.taskId) ; |
| | | DbSv sv = (DbSv)objs[0] ; |
| | | PrController controller = (PrController)objs[1] ; |
| | | this.saveOrUpdateLast(sv, controller, d.getRtuAddr(), dV1_0_1.dataCd81Vo.alarmVo, dV1_0_1.dataCd81Vo.stateVo) ; |
| | | this.saveHistory(sv, controller, d.getRtuAddr(), dV1_0_1.dataCd81Vo.alarmVo, dV1_0_1.dataCd81Vo.stateVo) ; |
| | | try{ |
| | | if(dV1_0_1.dataCd81Vo != null){ |
| | | if(dV1_0_1.dataCd81Vo.alarmVo != null || dV1_0_1.dataCd81Vo.stateVo != null){ |
| | | Object[] objs = this.getTaskResults(TkPreGenObjs.taskId) ; |
| | | DbSv sv = (DbSv)objs[0] ; |
| | | PrController controller = (PrController)objs[1] ; |
| | | this.saveOrUpdateLast(sv, controller, d.getRtuAddr(), dV1_0_1, dV1_0_1.dataCd81Vo.alarmVo, dV1_0_1.dataCd81Vo.stateVo) ; |
| | | this.saveHistory(sv, controller, d.getRtuAddr(), dV1_0_1, dV1_0_1.dataCd81Vo.alarmVo, dV1_0_1.dataCd81Vo.stateVo) ; |
| | | } |
| | | } else if(dV1_0_1.dataCdC0Vo != null){ |
| | | if(dV1_0_1.dataCdC0Vo.alarmVo != null || dV1_0_1.dataCdC0Vo.stateVo != null){ |
| | | Object[] objs = this.getTaskResults(TkPreGenObjs.taskId) ; |
| | | DbSv sv = (DbSv)objs[0] ; |
| | | PrController controller = (PrController)objs[1] ; |
| | | this.saveOrUpdateLast(sv, controller, d.getRtuAddr(), dV1_0_1, dV1_0_1.dataCdC0Vo.alarmVo, dV1_0_1.dataCdC0Vo.stateVo) ; |
| | | this.saveHistory(sv, controller, d.getRtuAddr(), dV1_0_1, dV1_0_1.dataCdC0Vo.alarmVo, dV1_0_1.dataCdC0Vo.stateVo) ; |
| | | } |
| | | } |
| | | } else if(dV1_0_1.dataCdC0Vo != null){ |
| | | if(dV1_0_1.dataCdC0Vo.alarmVo != null || dV1_0_1.dataCdC0Vo.stateVo != null){ |
| | | Object[] objs = this.getTaskResults(TkPreGenObjs.taskId) ; |
| | | DbSv sv = (DbSv)objs[0] ; |
| | | PrController controller = (PrController)objs[1] ; |
| | | this.saveOrUpdateLast(sv, controller, d.getRtuAddr(), dV1_0_1.dataCdC0Vo.alarmVo, dV1_0_1.dataCdC0Vo.stateVo) ; |
| | | this.saveHistory(sv, controller, d.getRtuAddr(), dV1_0_1.dataCdC0Vo.alarmVo, dV1_0_1.dataCdC0Vo.stateVo) ; |
| | | } |
| | | }catch (Exception e){ |
| | | log.error("ä¿åæ§å¶å¨æ¥è¦åç¶ææ°æ®æ¶åçå¼å¸¸", e); |
| | | } |
| | | } |
| | | } |
| | |
| | | * @param alarmVo æ¥è¦å¯¹è±¡ |
| | | * @param stateVo ç¶æå¯¹è±¡ |
| | | */ |
| | | private void saveOrUpdateLast(DbSv sv, PrController controller, String rtuAddr, DataAlarmVo alarmVo, DataStateVo stateVo){ |
| | | private void saveOrUpdateLast(DbSv sv, PrController controller, String rtuAddr, DataV1_0_1 dV1_0_1, DataAlarmVo alarmVo, DataStateVo stateVo) throws Exception { |
| | | RmAlarmStateLast po = sv.getRmLastAlarmState(rtuAddr) ; |
| | | if(po == null){ |
| | | po = new RmAlarmStateLast(null, controller==null?null:controller.getId(), controller==null?null:controller.getIntakeId(), |
| | | rtuAddr, |
| | | new Date(), |
| | | DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dV1_0_1.dt), |
| | | alarmVo==null?null:alarmVo.batteryVolt, alarmVo==null?null:alarmVo.loss, alarmVo==null?null:alarmVo.meter, alarmVo==null?null:alarmVo.valve, |
| | | stateVo==null?null:stateVo.icCard, stateVo==null?null:stateVo.working, stateVo==null?null:stateVo.valve) ; |
| | | sv.saveRmAlarmStateLast(po) ; |
| | | }else{ |
| | | po = this.update(controller, po, alarmVo, stateVo) ; |
| | | po = this.update(controller, po, dV1_0_1, alarmVo, stateVo) ; |
| | | sv.saveRmAlarmStateLast(po); |
| | | } |
| | | } |
| | |
| | | * @param alarmVo æ¥è¦å¯¹è±¡ |
| | | * @param stateVo ç¶æå¯¹è±¡ |
| | | */ |
| | | private void saveHistory(DbSv sv, PrController controller, String rtuAddr, DataAlarmVo alarmVo, DataStateVo stateVo){ |
| | | private void saveHistory(DbSv sv, PrController controller, String rtuAddr, DataV1_0_1 dV1_0_1, DataAlarmVo alarmVo, DataStateVo stateVo) throws Exception { |
| | | RmAlarmStateHistory po = new RmAlarmStateHistory(null, controller==null?null:controller.getId(), controller==null?null:controller.getIntakeId(), |
| | | rtuAddr, |
| | | new Date(), |
| | | DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dV1_0_1.dt), |
| | | alarmVo==null?null:alarmVo.batteryVolt, alarmVo==null?null:alarmVo.loss, alarmVo==null?null:alarmVo.meter, alarmVo==null?null:alarmVo.valve, |
| | | stateVo==null?null:stateVo.icCard, stateVo==null?null:stateVo.working, stateVo==null?null:stateVo.valve) ; |
| | | sv.saveRmAlarmStateHistory(po) ; |
| | | } |
| | | |
| | | |
| | | private RmAlarmStateLast update(PrController controller, RmAlarmStateLast po, DataAlarmVo alarmVo, DataStateVo stateVo){ |
| | | private RmAlarmStateLast update(PrController controller, RmAlarmStateLast po, DataV1_0_1 dV1_0_1, DataAlarmVo alarmVo, DataStateVo stateVo) throws Exception { |
| | | po.controllerid = controller==null?null:controller.getId() ; |
| | | |
| | | po.dt = new Date() ; |
| | | po.dt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dV1_0_1.dt) ; |
| | | if(alarmVo != null){ |
| | | po.bateryvolt = alarmVo.batteryVolt ; |
| | | po.loss = alarmVo.loss ; |
| | |
| | | DbSv sv = (DbSv)objs[0] ; |
| | | PrController controller = (PrController)objs[1] ; |
| | | try{ |
| | | this.saveOrUpdateLast(sv, controller, d.getRtuAddr(), dV1_0_1.dataCdC0Vo) ; |
| | | this.saveHistory(sv, controller, d.getRtuAddr(), dV1_0_1.dataCdC0Vo) ; |
| | | this.saveOrUpdateLast(sv, controller, d.getRtuAddr(), dV1_0_1, dV1_0_1.dataCdC0Vo) ; |
| | | this.saveHistory(sv, controller, d.getRtuAddr(),dV1_0_1, dV1_0_1.dataCdC0Vo) ; |
| | | }catch (Exception e){ |
| | | log.error("ä¿åæ§å¶å¨èªæ¥æ°æ®æ¶åçå¼å¸¸", e); |
| | | } |
| | |
| | | * @param rtuAddr æ§å¶å¨å°å |
| | | * @param dataCdC0Vo èªæ¥æ°æ®å¯¹è±¡ |
| | | */ |
| | | private void saveOrUpdateLast(DbSv sv, PrController controller, String rtuAddr, DataCdC0Vo dataCdC0Vo) throws Exception { |
| | | private void saveOrUpdateLast(DbSv sv, PrController controller, String rtuAddr, DataV1_0_1 dV1_0_1, DataCdC0Vo dataCdC0Vo) throws Exception { |
| | | RmAutoReportLast po = sv.getRmLastAutoReport(rtuAddr) ; |
| | | if(po == null){ |
| | | po = new RmAutoReportLast(null, controller==null?null:controller.getId(), controller==null?null:controller.getId(), |
| | | rtuAddr, |
| | | new Date(), |
| | | DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dV1_0_1.dt), |
| | | DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dataCdC0Vo.rtuDt), |
| | | dataCdC0Vo.instantAmount, dataCdC0Vo.totalAmount, dataCdC0Vo.lossAmount, |
| | | dataCdC0Vo.waterPress, dataCdC0Vo.batteryVolt, dataCdC0Vo.sunVolt, dataCdC0Vo.signalValue) ; |
| | | sv.saveRmAutoReportLast(po) ; |
| | | }else{ |
| | | po = this.update(po, dataCdC0Vo) ; |
| | | po = this.update(po, dV1_0_1, dataCdC0Vo) ; |
| | | sv.saveRmAutoReportLast(po); |
| | | } |
| | | } |
| | |
| | | * @param rtuAddr æ§å¶å¨å°å |
| | | * @param dataCdC0Vo èªæ¥æ°æ®å¯¹è±¡ |
| | | */ |
| | | private void saveHistory(DbSv sv, PrController controller, String rtuAddr, DataCdC0Vo dataCdC0Vo) throws Exception { |
| | | private void saveHistory(DbSv sv, PrController controller, String rtuAddr, DataV1_0_1 dV1_0_1, DataCdC0Vo dataCdC0Vo) throws Exception { |
| | | RmAutoReportHistory po = new RmAutoReportHistory(null, controller==null?null:controller.getId(), controller==null?null:controller.getIntakeId(), |
| | | rtuAddr, |
| | | new Date(), |
| | | DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dV1_0_1.dt), |
| | | DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dataCdC0Vo.rtuDt), |
| | | dataCdC0Vo.instantAmount, dataCdC0Vo.totalAmount, dataCdC0Vo.lossAmount, |
| | | dataCdC0Vo.waterPress, dataCdC0Vo.batteryVolt, dataCdC0Vo.sunVolt, dataCdC0Vo.signalValue) ; |
| | |
| | | } |
| | | |
| | | |
| | | private RmAutoReportLast update(RmAutoReportLast po, DataCdC0Vo dataCdC0Vo) throws Exception { |
| | | po.dt = new Date() ; |
| | | private RmAutoReportLast update(RmAutoReportLast po, DataV1_0_1 dV1_0_1, DataCdC0Vo dataCdC0Vo) throws Exception { |
| | | po.dt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dV1_0_1.dt); |
| | | po.rtudt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dataCdC0Vo.rtuDt) ; |
| | | po.instantamount = dataCdC0Vo.instantAmount; |
| | | po.totalamount = dataCdC0Vo.totalAmount; |
New file |
| | |
| | | package com.dy.aceMw.server.rtuData.p206V1_0_0; |
| | | |
| | | import com.dy.aceMw.server.rtuData.TaskSurpport; |
| | | import com.dy.aceMw.server.rtuData.dbSv.DbSv; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrControllerTramp; |
| | | import org.apache.logging.log4j.LogManager; |
| | | import org.apache.logging.log4j.Logger; |
| | | |
| | | /** |
| | | * @Author liurunyu |
| | | * @Date 2024/1/16 17:18 |
| | | * @LastEditTime 2024/1/16 17:18 |
| | | * @Description |
| | | */ |
| | | /** |
| | | * å¤çæ§å¶å¨å
³é䏿¥ |
| | | */ |
| | | public class TkDealCloseValveReport extends TaskSurpport { |
| | | |
| | | private static final Logger log = LogManager.getLogger(TkDealCloseValveReport.class.getName()) ; |
| | | |
| | | //ç±»IDï¼ä¸å®ä¸Tree.xmlé
ç½®æä»¶ä¸é
ç½®ä¸è´ |
| | | public static final String taskId = "TkDealCloseValveReport" ; |
| | | |
| | | /** |
| | | * æ§è¡èç¹ä»»å¡: å¤çæ§å¶å¨å
³é䏿¥ |
| | | * @param data éè¦å¤ççæ°æ® |
| | | */ |
| | | @Override |
| | | public void execute(Object data) { |
| | | Object[] objs = this.getTaskResults(TkPreGenObjs.taskId) ; |
| | | DbSv sv = (DbSv)objs[0] ; |
| | | PrControllerTramp rtuTramp = (PrControllerTramp)objs[2] ; |
| | | sv.savePrConctrollerTramp(rtuTramp); |
| | | } |
| | | } |
New file |
| | |
| | | package com.dy.aceMw.server.rtuData.p206V1_0_0; |
| | | |
| | | import com.dy.aceMw.server.rtuData.TaskSurpport; |
| | | import com.dy.aceMw.server.rtuData.dbSv.DbSv; |
| | | import com.dy.common.mw.protocol.Data; |
| | | import com.dy.common.mw.protocol.p206V1_0_0.DataV1_0_1; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrController; |
| | | import org.apache.logging.log4j.LogManager; |
| | | import org.apache.logging.log4j.Logger; |
| | | |
| | | /** |
| | | * @Author liurunyu |
| | | * @Date 2024/1/16 17:16 |
| | | * @LastEditTime 2024/1/16 17:16 |
| | | * @Description |
| | | */ |
| | | /** |
| | | * å¤çæ§å¶å¨å¼é䏿¥ |
| | | */ |
| | | public class TkDealOpenValveReport extends TaskSurpport { |
| | | |
| | | private static final Logger log = LogManager.getLogger(TkDealOpenValveReport.class.getName()) ; |
| | | |
| | | //ç±»IDï¼ä¸å®ä¸Tree.xmlé
ç½®æä»¶ä¸é
ç½®ä¸è´ |
| | | public static final String taskId = "TkDealOpenValveReport" ; |
| | | |
| | | /** |
| | | * æ§è¡èç¹ä»»å¡: å¤çæ§å¶å¨å¼é䏿¥ |
| | | * @param data éè¦å¤ççæ°æ® |
| | | */ |
| | | @Override |
| | | public void execute(Object data) { |
| | | Data d = (Data) data; |
| | | Object subD = d.getSubData(); |
| | | if (subD != null) { |
| | | DataV1_0_1 dV1_0_1 = (DataV1_0_1) subD; |
| | | if (dV1_0_1 != null && dV1_0_1.dataCd83OpenVo != null) { |
| | | Object[] objs = this.getTaskResults(TkPreGenObjs.taskId) ; |
| | | DbSv sv = (DbSv)objs[0] ; |
| | | PrController controller = (PrController)objs[1] ; |
| | | try{ |
| | | this.saveOrUpdateLast(sv, controller, d.getRtuAddr(), dV1_0_1.dataCdC0Vo) ; |
| | | this.saveHistory(sv, controller, d.getRtuAddr(), dV1_0_1.dataCdC0Vo) ; |
| | | }catch (Exception e){ |
| | | log.error("ä¿åæ§å¶å¨å¼é䏿¥æ¶åçå¼å¸¸", e); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | import java.text.DateFormat; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | public class TkPreGenObjs extends TaskSurpport { |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public void execute(Object data) throws ParseException { |
| | | DateFormat fmt =new SimpleDateFormat(("yyyy_MM_dd_HH_mm_ss")); |
| | | Data d = (Data)data ; |
| | | String rtuAddr = d.getRtuAddr() ;//TkRtuDataé夿äºrtuAddr为空 |
| | | DbSv sv = (DbSv)SpringContextUtil.getBean(DbSv.class) ; |
| | |
| | | //æµæµªè
æ§å¶å¨ |
| | | PrControllerTramp rtuTramp = sv.getPrControllerTrampByRtuAddr(rtuAddr); |
| | | if(rtuTramp == null){ |
| | | rtuTramp = new PrControllerTramp(null, rtuAddr, d.getProtocol(), fmt.parse(DateTime.yyyy_MM_dd_HH_mm_ss())) ; |
| | | rtuTramp = new PrControllerTramp(null, rtuAddr, d.getProtocol(), new Date()) ; |
| | | this.taskResult = new Object[]{sv, null, rtuTramp} ; |
| | | this.toNextOneTask(data, TkDealControllerTramp.taskId); |
| | | } |
| | |
| | | <task id="TkFindReport" name="è¯å«æ§å¶å¨ä¸æ¥æ°æ®" enable="true" class="com.dy.aceMw.server.rtuData.p206V1_0_0.TkFindReport"> |
| | | <task id="TkDealAlarmStatus" name="æ§å¶å¨æ¥è¦ä¸ç¶ææ°æ®" enable="true" class="com.dy.aceMw.server.rtuData.p206V1_0_0.TkDealAlarmStatus" /> |
| | | <task id="TkDealAutoReport" name="æ§å¶å¨èªæ¥æ°æ®" enable="true" class="com.dy.aceMw.server.rtuData.p206V1_0_0.TkDealAutoReport" /> |
| | | <task id="TkDealOpenValveReport" name="æ§å¶å¨å¼é䏿¥" enable="true" class="com.dy.aceMw.server.rtuData.p206V1_0_0.TkDealOpenValveReport" /> |
| | | <task id="TkDealCloseValveReport" name="æ§å¶å¨å
³é䏿¥" enable="true" class="com.dy.aceMw.server.rtuData.p206V1_0_0.TkDealCloseValveReport" /> |
| | | </task> |
| | | <!-- è¯å«å½ä»¤ååºæ°æ® --> |
| | | <task id="TkFindComResponse" name="è¯å«ååºå½ä»¤æ°æ®" enable="true" class="com.dy.aceMw.server.rtuData.p206V1_0_0.TkFindComResponse"> |