From add5c816a5281cf6b1df4a0988e8b3a0c2b59bee Mon Sep 17 00:00:00 2001 From: whyclxw <810412026@qq.com> Date: 星期三, 25 六月 2025 17:37:03 +0800 Subject: [PATCH] 电源表和电池信息表加入新的字段,添加,编辑需要修改 --- src/main/java/com/whyc/service/BattInfService.java | 33 +++++++++++ src/main/java/com/whyc/dto/InfoDto.java | 32 ++++++++++ src/main/java/com/whyc/pojo/db_station/PowerInf.java | 9 +++ src/main/java/com/whyc/factory/InfoFactory.java | 29 +++++++++ src/main/java/com/whyc/pojo/db_station/BattInf.java | 25 ++++++++ 5 files changed, 127 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/whyc/dto/InfoDto.java b/src/main/java/com/whyc/dto/InfoDto.java index 97a1f60..65fe8e1 100644 --- a/src/main/java/com/whyc/dto/InfoDto.java +++ b/src/main/java/com/whyc/dto/InfoDto.java @@ -79,6 +79,14 @@ @ApiModelProperty(value = "鏁存祦鍣ㄤ娇鑳絒bit0-妯″潡1 bit15-妯″潡16]銆�1-鍙敤 0-涓嶅彲浠ャ��") private Long modelCfg; + @ApiModelProperty(value = "浜ゆ祦涓婇檺闃堝��") + private Float acvolHighLimit; + + @ApiModelProperty(value = "浜ゆ祦涓嬮檺闃堝��") + private Float acvolLowLimit; + + @ApiModelProperty(value = "鐩存祦杈撳嚭鐢靛帇涓嬮檺闃堝��") + private Float dcoutvolLowLimit; @ApiModelProperty(value = "璁惧id") @@ -129,6 +137,30 @@ @JsonFormat(pattern = "yyyy-MM-dd",timezone = "Asia/Shanghai") private Date inuseTime; + @ApiModelProperty(value = "娴厖鐢靛帇闃堝��") + private Float floatVolLevel; + + @ApiModelProperty(value = "绂荤嚎鐢靛帇闃堝��") + private Float offlinelineVolLevel; + + @ApiModelProperty(value = "娴厖鐢垫祦闃堝��") + private Float floatCurrLevel; + + @ApiModelProperty(value = "鏈�澶ф牳瀹圭數娴�(0~300)") + private Float maxDisCurr; + + @ApiModelProperty(value = "楠岀鏍煎紡0-甯歌 1-姝e父1鎷�2[61850璁惧鏈夋晥]") + private Integer signType; + + @ApiModelProperty(value = "閫氫俊绔彛鍙枫��0-浣跨敤璁惧榛樿绔彛鍙枫��") + private Integer commPort; + + @ApiModelProperty(value = "璐熻浇鐢垫祦") + private Float loadCurr; + + @ApiModelProperty(value = "瑙嗛鐩戞帶搴忓垪鍙�") + private String videoUrl; + @ApiModelProperty(value = "鏍囪瘑鏄惁鍔犲叆鐢垫睜缁�1:娣诲姞锛�0涓嶆坊鍔�") private Integer addBinfFlag; diff --git a/src/main/java/com/whyc/factory/InfoFactory.java b/src/main/java/com/whyc/factory/InfoFactory.java index 42ca5a3..e346cd4 100644 --- a/src/main/java/com/whyc/factory/InfoFactory.java +++ b/src/main/java/com/whyc/factory/InfoFactory.java @@ -15,7 +15,10 @@ .setProtocol(info.getProtocol()) .setPowerIp(info.getPowerIp()) .setModelCfg(info.getModelCfg()) - .setPowerInuseTime(info.getPowerInuseTime()); + .setPowerInuseTime(info.getPowerInuseTime()) + .setAcvolHighLimit(info.getAcvolHighLimit()) + .setAcvolLowLimit(info.getAcvolLowLimit()) + .setDcoutvolLowLimit(info.getDcoutvolLowLimit()); if(info.getPowerId()!=null){ pinf.setPowerId(info.getPowerId()); } @@ -91,6 +94,30 @@ if(info.getInuseTime()!=null){ binf.setInuseTime(info.getInuseTime()); } + if(info.getFloatVolLevel()!=null){ + binf.setFloatVolLevel(info.getFloatVolLevel()); + } + if(info.getOfflinelineVolLevel()!=null){ + binf.setOfflinelineVolLevel(info.getOfflinelineVolLevel()); + } + if(info.getFloatCurrLevel()!=null){ + binf.setFloatCurrLevel(info.getFloatCurrLevel()); + } + if(info.getMaxDisCurr()!=null){ + binf.setMaxDisCurr(info.getMaxDisCurr()); + } + if(info.getSignType()!=null){ + binf.setSignType(info.getSignType()); + } + if(info.getCommPort()!=null){ + binf.setCommPort(info.getCommPort()); + } + if(info.getLoadCurr()!=null){ + binf.setLoadCurr(info.getLoadCurr()); + } + if(info.getVideoUrl()!=null){ + binf.setVideoUrl(info.getVideoUrl()); + } return binf; } } \ No newline at end of file diff --git a/src/main/java/com/whyc/pojo/db_station/BattInf.java b/src/main/java/com/whyc/pojo/db_station/BattInf.java index ddefd6b..543da92 100644 --- a/src/main/java/com/whyc/pojo/db_station/BattInf.java +++ b/src/main/java/com/whyc/pojo/db_station/BattInf.java @@ -87,6 +87,31 @@ @JsonFormat(pattern = "yyyy-MM-dd",timezone = "Asia/Shanghai") private Date inuseTime; + @ApiModelProperty(value = "娴厖鐢靛帇闃堝��") + private Float floatVolLevel; + + @ApiModelProperty(value = "绂荤嚎鐢靛帇闃堝��") + private Float offlinelineVolLevel; + + @ApiModelProperty(value = "娴厖鐢垫祦闃堝��") + private Float floatCurrLevel; + + @ApiModelProperty(value = "鏈�澶ф牳瀹圭數娴�(0~300)") + private Float maxDisCurr; + + @ApiModelProperty(value = "楠岀鏍煎紡0-甯歌 1-姝e父1鎷�2[61850璁惧鏈夋晥]") + private Integer signType; + + @ApiModelProperty(value = "閫氫俊绔彛鍙枫��0-浣跨敤璁惧榛樿绔彛鍙枫��") + private Integer commPort; + + @ApiModelProperty(value = "璐熻浇鐢垫祦") + private Float loadCurr; + + @ApiModelProperty(value = "瑙嗛鐩戞帶搴忓垪鍙�") + private String videoUrl; + + @TableField(exist = false) private Integer inuseYear; diff --git a/src/main/java/com/whyc/pojo/db_station/PowerInf.java b/src/main/java/com/whyc/pojo/db_station/PowerInf.java index d3cee97..0b40de4 100644 --- a/src/main/java/com/whyc/pojo/db_station/PowerInf.java +++ b/src/main/java/com/whyc/pojo/db_station/PowerInf.java @@ -69,6 +69,15 @@ @JsonFormat(pattern = "yyyy-MM-dd",timezone = "Asia/Shanghai") private Date powerInuseTime; + @ApiModelProperty(value = "浜ゆ祦涓婇檺闃堝��") + private Float acvolHighLimit; + + @ApiModelProperty(value = "浜ゆ祦涓嬮檺闃堝��") + private Float acvolLowLimit; + + @ApiModelProperty(value = "鐩存祦杈撳嚭鐢靛帇涓嬮檺闃堝��") + private Float dcoutvolLowLimit; + @TableField(exist = false) private StationInf sinf; diff --git a/src/main/java/com/whyc/service/BattInfService.java b/src/main/java/com/whyc/service/BattInfService.java index ddaa507..0e7344c 100644 --- a/src/main/java/com/whyc/service/BattInfService.java +++ b/src/main/java/com/whyc/service/BattInfService.java @@ -233,6 +233,15 @@ if(pinf.getModelCfg()!=null){ wrapper2.set("model_cfg",pinf.getModelCfg()); } + if(pinf.getAcvolHighLimit()!=null){ + wrapper2.set("acvol_high_limit",pinf.getAcvolHighLimit()); + } + if(pinf.getAcvolLowLimit()!=null){ + wrapper2.set("acvol_low_limit",pinf.getAcvolLowLimit()); + } + if(pinf.getDcoutvolLowLimit()!=null){ + wrapper2.set("dcoutvol_low_limit",pinf.getDcoutvolLowLimit()); + } /*if(pinf.getPowerName()!=null){ //妫�娴嬭鏈烘埧涓嬭淇敼鐨勭數婧愬悕鏄惁瀛樺湪 QueryWrapper queryWrapper1=new QueryWrapper(); @@ -306,6 +315,30 @@ if (binf.getInuseTime() != null) { wrapper4.set("inuse_time", binf.getInuseTime()); } + if (binf.getFloatVolLevel() != null) { + wrapper4.set("float_vol_level", binf.getFloatVolLevel()); + } + if (binf.getOfflinelineVolLevel() != null) { + wrapper4.set("offlineline_vol_level", binf.getOfflinelineVolLevel()); + } + if (binf.getFloatCurrLevel() != null) { + wrapper4.set("float_curr_level", binf.getFloatCurrLevel()); + } + if (binf.getMaxDisCurr() != null) { + wrapper4.set("max_dis_curr", binf.getMaxDisCurr()); + } + if (binf.getSignType()!= null) { + wrapper4.set("sign_type", binf.getSignType()); + } + if (binf.getCommPort()!= null) { + wrapper4.set("comm_port", binf.getCommPort()); + } + if (binf.getLoadCurr()!= null) { + wrapper4.set("load_curr", binf.getLoadCurr()); + } + if (binf.getVideoUrl()!= null) { + wrapper4.set("video_url", binf.getVideoUrl()); + } wrapper4.eq("battgroup_id", binf.getBattgroupId()); mapper.update((BattInf) ActionUtil.objeNull,wrapper3); mapper.update((BattInf) ActionUtil.objeNull,wrapper4); -- Gitblit v1.9.1