From a14169f2a546ce8041d4205c871b55a7ce0e84c7 Mon Sep 17 00:00:00 2001 From: haungxing <1203316822@qq.com> Date: Tue, 20 Aug 2024 08:44:51 +0800 Subject: [PATCH 1/6] =?UTF-8?q?fix:=20=E8=AE=BE=E5=A4=87=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E6=8C=87=E4=BB=A4=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bigmodel/maintenance/entity/ControlEntity.java | 57 +++++++++++++++++ .../bigmodel/configuration/BigModelInvokeApi.java | 6 ++ .../interactive/service/IHznlmInvokeService.java | 6 ++ .../service/impl/HznlmInvokeServiceImpl.java | 7 ++ .../maintenance/controller/ControlController.java | 74 ++++++++++++++++++++++ .../bigmodel/maintenance/mapper/ControlMapper.java | 12 ++++ .../maintenance/service/ControlService.java | 21 ++++++ .../src/main/resources/template/template.yml | 1 + 8 files changed, 184 insertions(+) create mode 100644 hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/maintenance/entity/ControlEntity.java create mode 100644 hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/controller/ControlController.java create mode 100644 hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/mapper/ControlMapper.java create mode 100644 hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/service/ControlService.java diff --git a/hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/maintenance/entity/ControlEntity.java b/hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/maintenance/entity/ControlEntity.java new file mode 100644 index 0000000..3c0ea70 --- /dev/null +++ b/hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/maintenance/entity/ControlEntity.java @@ -0,0 +1,57 @@ +package com.hnac.hzims.bigmodel.maintenance.entity; + +import com.alibaba.fastjson.annotation.JSONField; +import com.baomidou.mybatisplus.annotation.SqlCondition; +import com.baomidou.mybatisplus.annotation.TableField; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.core.mp.support.QueryField; +import org.springblade.core.tenant.mp.TenantEntity; + +import java.io.Serializable; + +/** + * @Author: huangxing + * @Date: 2024/08/19 18:33 + */ +@Data +@EqualsAndHashCode +@ApiModel("设备控制实体类") +public class ControlEntity extends TenantEntity implements Serializable { + + @ApiModelProperty(value = "itemId",required = true) + private String itemId; + + @ApiModelProperty(value = "站点名称",required = true) + @QueryField(condition = SqlCondition.LIKE) + private String stationName; + + @ApiModelProperty(value = "站点ID") + @QueryField(condition = SqlCondition.EQUAL) + private String stationId; + + @ApiModelProperty(value = "遥控的设备名称") + @QueryField(condition = SqlCondition.LIKE) + private String deviceName; + + @ApiModelProperty(value = "遥控的设备ID") + @QueryField(condition = SqlCondition.EQUAL) + private String deviceId; + + @TableField("yk_name") + @JSONField(name = "yk_name") + @ApiModelProperty(value = "遥控名称(不包含站点)",required = true) + @QueryField(condition = SqlCondition.LIKE) + private String remoteName; + + @ApiModelProperty(value = "用于展示和匹配的全称,一般可设为 站点名称-遥控名称",required = true) + @QueryField(condition = SqlCondition.LIKE) + private String itemName; + + @ApiModelProperty(value = "类型,可为平台、业务",required = true) + @QueryField(condition = SqlCondition.LIKE) + private String type; + +} diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/configuration/BigModelInvokeApi.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/configuration/BigModelInvokeApi.java index d6365af..c11b4b6 100644 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/configuration/BigModelInvokeApi.java +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/configuration/BigModelInvokeApi.java @@ -56,4 +56,10 @@ public class BigModelInvokeApi { * 起数据分析问答 */ private String assistantAnalyseAsk; + + /** + * 更新数据 + */ + private String updateKnowledge; + } diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/IHznlmInvokeService.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/IHznlmInvokeService.java index 1833f09..51ed3f3 100644 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/IHznlmInvokeService.java +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/IHznlmInvokeService.java @@ -87,4 +87,10 @@ public interface IHznlmInvokeService { */ void smartReportGeneratePower(RunReportAnalyseRequest req); + /** + * 更新数据 + * @param name 数据名 + */ + void updateKnowledge(String name); + } diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/HznlmInvokeServiceImpl.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/HznlmInvokeServiceImpl.java index 90074ba..b8bdb15 100644 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/HznlmInvokeServiceImpl.java +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/HznlmInvokeServiceImpl.java @@ -145,6 +145,13 @@ public class HznlmInvokeServiceImpl implements IHznlmInvokeService { } @Override + public void updateKnowledge(String name) { + Map params = new HashMap<>(); + params.put("name",name); + RequestClientUtil.postCall(gglmUrl + bigModelInvokeApi.getUpdateKnowledge(), params); + } + + @Override public List hotQuestions() { try { return RequestClientUtil.postCall(gglmUrl + bigModelInvokeApi.getHotQuestion(), null, new TypeReference>(){}); diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/controller/ControlController.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/controller/ControlController.java new file mode 100644 index 0000000..17f18bc --- /dev/null +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/controller/ControlController.java @@ -0,0 +1,74 @@ +package com.hnac.hzims.bigmodel.maintenance.controller; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.hnac.hzims.bigmodel.interactive.service.IHznlmInvokeService; +import com.hnac.hzims.bigmodel.maintenance.entity.ControlEntity; +import com.hnac.hzims.bigmodel.maintenance.entity.DatasourceEntity; +import com.hnac.hzims.bigmodel.maintenance.service.ControlService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import lombok.AllArgsConstructor; +import org.springblade.core.mp.support.Condition; +import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.Func; +import org.springframework.web.bind.annotation.*; + +/** + * @Author: huangxing + * @Date: 2024/08/19 18:50 + */ +@RestController +@RequestMapping("/control") +@Api(tags = "设备控制指令管理",value = "设备控制指令管理") +@AllArgsConstructor +public class ControlController { + + private final ControlService service; + private final IHznlmInvokeService invokeService; + + @GetMapping("/listPage") + @ApiOperation(value = "分页查询") + @ApiOperationSupport(order = 1) + public R> listPage(Query query, ControlEntity req) { + return R.data(service.page(Condition.getPage(query),Condition.getQueryWrapper(req).lambda())); + } + + @GetMapping("/detail") + @ApiOperation(value = "查看详情") + @ApiOperationSupport(order = 2) + public R detail(@RequestParam @ApiParam("主键ID") Long id) { + return R.data(service.getById(id)); + } + + @PostMapping("/save") + @ApiOperation(value = "保存设备控制指令配置") + @ApiOperationSupport(order = 3) + public R save(@RequestBody ControlEntity req) { + return R.status(service.save(req)); + } + + @DeleteMapping("/remove") + @ApiOperation(value = "删除设备控制指令配置") + @ApiOperationSupport(order = 4) + public R remove(@RequestParam @ApiParam("主键ID,按逗号分隔") String ids) { + return R.status(service.removeByIds(Func.toLongList(",",ids))); + } + + @PutMapping("/updateById") + @ApiOperation(value = "编辑设备控制指令") + @ApiOperationSupport(order = 5) + public R updateById(@RequestBody ControlEntity req) { + return R.status(service.updateById(req)); + } + + @PutMapping("/updateKnowledge") + @ApiOperation(value = "更新设备控制知识库") + @ApiOperationSupport(order = 6) + public R updateKnowledge() { + invokeService.updateKnowledge("yk"); + return R.success("操作成功!"); + } +} diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/mapper/ControlMapper.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/mapper/ControlMapper.java new file mode 100644 index 0000000..470d734 --- /dev/null +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/mapper/ControlMapper.java @@ -0,0 +1,12 @@ +package com.hnac.hzims.bigmodel.maintenance.mapper; + +import com.hnac.hzims.bigmodel.maintenance.entity.ControlEntity; +import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; + +/** + * @Author: huangxing + * @Date: 2024/08/19 18:42 + */ +public interface ControlMapper extends UserDataScopeBaseMapper { + +} diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/service/ControlService.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/service/ControlService.java new file mode 100644 index 0000000..264e7ef --- /dev/null +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/service/ControlService.java @@ -0,0 +1,21 @@ +package com.hnac.hzims.bigmodel.maintenance.service; + +import com.baomidou.dynamic.datasource.annotation.DS; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.hnac.hzims.bigmodel.maintenance.entity.ControlEntity; +import com.hnac.hzims.bigmodel.maintenance.mapper.ControlMapper; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +/** + * @Author: huangxing + * @Date: 2024/08/19 18:48 + */ +@Service +@DS("hznlm") +@AllArgsConstructor +@Slf4j +public class ControlService extends ServiceImpl { + +} diff --git a/hzims-service/hzims-big-model/src/main/resources/template/template.yml b/hzims-service/hzims-big-model/src/main/resources/template/template.yml index be2f075..77287f6 100644 --- a/hzims-service/hzims-big-model/src/main/resources/template/template.yml +++ b/hzims-service/hzims-big-model/src/main/resources/template/template.yml @@ -61,6 +61,7 @@ gglm: hotQuestion: "/qa/question_recommand" smartReportGeneratePower: "/custom/smart_report_generate_power" assistantAnalyseAsk: "/qa/assistant_analyse_ask" + updateKnowledge: "/kn/update_knowledge" swagger: base-packages: com.hnac.hzims.bigmodel From 145c3607701d39ac89ff562f541a13ea9eec8de1 Mon Sep 17 00:00:00 2001 From: haungxing <1203316822@qq.com> Date: Tue, 20 Aug 2024 08:55:09 +0800 Subject: [PATCH 2/6] =?UTF-8?q?fix:=20=E9=A6=96=E9=A1=B5=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=8C=85=E5=90=8D=E9=87=8D=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../constant/HydroelectricConstant.java | 18 ------ .../vo/HydroelectricAreaStationVo.java | 48 --------------- .../Hydroelectric/vo/HydroelectricAreaVo.java | 70 --------------------- .../vo/HydroelectricDeviceGenerateVo.java | 26 -------- .../vo/HydroelectricDevicePowerVo.java | 22 ------- .../Hydroelectric/vo/HydroelectricDeviceVo.java | 72 ---------------------- .../vo/HydroelectricGenerateMonVo.java | 28 --------- .../vo/HydroelectricGenerateYearVo.java | 21 ------- .../Hydroelectric/vo/HydroelectricGroupAreaVo.java | 45 -------------- .../Hydroelectric/vo/HydroelectricGroupVo.java | 70 --------------------- .../Hydroelectric/vo/HydroelectricPowerRainVo.java | 22 ------- .../Hydroelectric/vo/HydroelectricStationVo.java | 68 -------------------- .../constant/HydroelectricConstant.java | 18 ++++++ .../vo/HydroelectricAreaStationVo.java | 48 +++++++++++++++ .../hydroelectric/vo/HydroelectricAreaVo.java | 70 +++++++++++++++++++++ .../vo/HydroelectricDeviceGenerateVo.java | 26 ++++++++ .../vo/HydroelectricDevicePowerVo.java | 22 +++++++ .../hydroelectric/vo/HydroelectricDeviceVo.java | 2 +- .../vo/HydroelectricGenerateMonVo.java | 28 +++++++++ .../vo/HydroelectricGenerateYearVo.java | 21 +++++++ .../hydroelectric/vo/HydroelectricGroupAreaVo.java | 45 ++++++++++++++ .../hydroelectric/vo/HydroelectricGroupVo.java | 70 +++++++++++++++++++++ .../hydroelectric/vo/HydroelectricPowerRainVo.java | 2 +- .../hydroelectric/vo/HydroelectricStationVo.java | 68 ++++++++++++++++++++ 24 files changed, 418 insertions(+), 512 deletions(-) delete mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/constant/HydroelectricConstant.java delete mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricAreaStationVo.java delete mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricAreaVo.java delete mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricDeviceGenerateVo.java delete mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricDevicePowerVo.java delete mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricDeviceVo.java delete mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricGenerateMonVo.java delete mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricGenerateYearVo.java delete mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricGroupAreaVo.java delete mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricGroupVo.java delete mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricPowerRainVo.java delete mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricStationVo.java create mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/constant/HydroelectricConstant.java create mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricAreaStationVo.java create mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricAreaVo.java create mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricDeviceGenerateVo.java create mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricDevicePowerVo.java create mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricGenerateMonVo.java create mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricGenerateYearVo.java create mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricGroupAreaVo.java create mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricGroupVo.java create mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricStationVo.java diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/constant/HydroelectricConstant.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/constant/HydroelectricConstant.java deleted file mode 100644 index bd008e2..0000000 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/constant/HydroelectricConstant.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.hnac.hzims.operational.homePage.hydroelectric.constant; - -/** - * 水电站首页-常量 - * @author ysj - */ -public interface HydroelectricConstant { - - /** - * 水电站 - */ - Integer HYDROPOWER = 0; - - /** - * 代运维 - */ - Integer PROXY_OPEARIONAL = 2; -} \ No newline at end of file diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricAreaStationVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricAreaStationVo.java deleted file mode 100644 index 98cdb14..0000000 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricAreaStationVo.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.hnac.hzims.operational.homePage.hydroelectric.vo; - -import com.hnac.hzims.hzimsweather.response.weather.Daily; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.List; - -/** - * 集团/区域占比 - * @author ysj - */ -@Data -public class HydroelectricAreaStationVo { - - @ApiModelProperty(value = "站点机构") - private Long deptId; - - @ApiModelProperty(value = "机构ID") - private String stationCode; - - @ApiModelProperty(value = "机构名称") - private String stationName; - - @ApiModelProperty(value = "站点实时温度") - private String temp; - - @ApiModelProperty(value = "七日内天气") - private List weather; - - @ApiModelProperty(value = "年发电量") - private Double generateYear; - - @ApiModelProperty(value = "发电完成率") - private Double generateRate; - - @ApiModelProperty(value = "电站利用率") - private Double deviceUse; - - @ApiModelProperty(value = "容量利用率") - private Double capacityUse; - - @ApiModelProperty(value = "区域/集团发电占比") - private Double areaMakeUp; - - @ApiModelProperty(value = "排序") - private Integer sort; -} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricAreaVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricAreaVo.java deleted file mode 100644 index 14b6f1b..0000000 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricAreaVo.java +++ /dev/null @@ -1,70 +0,0 @@ -package com.hnac.hzims.operational.homePage.hydroelectric.vo; - -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.ser.std.NullSerializer; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.List; - -/** - * @author ysj - */ -@Data -@ApiModel(value = "水电站首页-区域") -public class HydroelectricAreaVo { - - @ApiModelProperty(value = "机构Id") - @JsonSerialize(nullsUsing = NullSerializer.class) - private Long deptId; - - @ApiModelProperty(value = "机构名称") - private String deptName; - - @ApiModelProperty(value = "站点数量") - @JsonSerialize(nullsUsing = NullSerializer.class) - private Integer count; - - @ApiModelProperty(value = "总装机容量") - @JsonSerialize(nullsUsing = NullSerializer.class) - private Double capacity; - - @ApiModelProperty(value = "电站总负荷") - @JsonSerialize(nullsUsing = NullSerializer.class) - private Double load; - - @ApiModelProperty(value = "容量利用率") - @JsonSerialize(nullsUsing = NullSerializer.class) - private Double capacityRate; - - @ApiModelProperty(value = "年发电量") - @JsonSerialize(nullsUsing = NullSerializer.class) - private Double generateYear; - - @ApiModelProperty(value = "月发电量") - @JsonSerialize(nullsUsing = NullSerializer.class) - private Double generateMon; - - @ApiModelProperty(value = "日发电量") - @JsonSerialize(nullsUsing = NullSerializer.class) - private Double generateDay; - - @ApiModelProperty(value = "今年计划发电量") - @JsonSerialize(nullsUsing = NullSerializer.class) - private Double generatePlanYear; - - @ApiModelProperty(value = "电量完成吕") - @JsonSerialize(nullsUsing = NullSerializer.class) - private Double generateRate; - - @ApiModelProperty(value = "近3年发电对比") - private List recentYears; - - @ApiModelProperty(value = "计划完成完成趋势") - private List completes; - - @ApiModelProperty(value = "电站 :利用情况 && 天气 && 排名") - private List stations; - -} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricDeviceGenerateVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricDeviceGenerateVo.java deleted file mode 100644 index 97f5971..0000000 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricDeviceGenerateVo.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.hnac.hzims.operational.homePage.hydroelectric.vo; - -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.ser.std.NullSerializer; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * @author ysj - */ -@Data -@ApiModel(value = "站点首页-设备近30天发电量") -public class HydroelectricDeviceGenerateVo { - - @ApiModelProperty(value = "日期") - private String date; - - @ApiModelProperty(value = "发电量") - @JsonSerialize(nullsUsing = NullSerializer.class) - private Float generate; - - @ApiModelProperty(value = "功率") - @JsonSerialize(nullsUsing = NullSerializer.class) - private Float load; -} \ No newline at end of file diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricDevicePowerVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricDevicePowerVo.java deleted file mode 100644 index 462e92f..0000000 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricDevicePowerVo.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.hnac.hzims.operational.homePage.hydroelectric.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * @author ysj - */ -@Data -@ApiModel(value = "站点首页-设备近24小时功率曲线") -public class HydroelectricDevicePowerVo { - - @ApiModelProperty(value = "字符串时间") - private String strHour; - - @ApiModelProperty(value = "小时") - private Integer hour; - - @ApiModelProperty(value = "有功功率") - private String activePower; -} \ No newline at end of file diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricDeviceVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricDeviceVo.java deleted file mode 100644 index f3ce2b7..0000000 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricDeviceVo.java +++ /dev/null @@ -1,72 +0,0 @@ -package com.hnac.hzims.operational.homePage.Hydroelectric.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.List; - -/** - * @author ysj - */ -@Data -@ApiModel(value = "站点首页-设备信息") -public class HydroelectricDeviceVo { - - @ApiModelProperty(value = "设备编号") - private String deivceCode; - - @ApiModelProperty(value = "设备名称") - private String deivceName; - - @ApiModelProperty(value = "开关机状态: 0 - 关机 1 - 开机") - private Boolean state; - - @ApiModelProperty(value = "总装机容量") - private Double installedCapacity; - - @ApiModelProperty(value = "有功功率") - private Double activePower; - - @ApiModelProperty(value = "容量利用率") - private Double capacityRate; - - @ApiModelProperty(value = "无功功率") - private Double reactivePower; - - @ApiModelProperty(value = "导叶开度") - private Double guideOpen; - - @ApiModelProperty(value = "今日发电量") - private Float powerDay; - - @ApiModelProperty(value = "昨日发电量") - private Float powerYesterDay; - - @ApiModelProperty(value = "当年发电量") - private Float powerYear; - - @ApiModelProperty(value = "去年发电量") - private Float powerYesterYear; - - @ApiModelProperty(value = "当月发电量") - private Float powerMon; - - @ApiModelProperty(value = "本次开机时间") - private String startDownTime; - - @ApiModelProperty(value = "本次开机时长") - private Double startupDownDuration; - - @ApiModelProperty(value = "年停机时长") - private Double shutDownDurationYear; - - @ApiModelProperty(value = "年开机时长") - private Double startupDurationYear; - - @ApiModelProperty(value = "设备近24小时有功功率") - private List powers; - - @ApiModelProperty(value = "设备近30日发电量") - private List generates; -} \ No newline at end of file diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricGenerateMonVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricGenerateMonVo.java deleted file mode 100644 index daeba5e..0000000 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricGenerateMonVo.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.hnac.hzims.operational.homePage.hydroelectric.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * @author ysj - */ -@Data -@ApiModel(value = "月发电对象") -public class HydroelectricGenerateMonVo { - - @ApiModelProperty(value = "年份") - private Integer year; - - @ApiModelProperty(value = "月份") - private Integer month; - - @ApiModelProperty(value = "字符串格式月份") - private String strMonth; - - @ApiModelProperty(value = "月发电量") - private Double generate; - - @ApiModelProperty(value = "计划发电量") - private Double planGenerate; -} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricGenerateYearVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricGenerateYearVo.java deleted file mode 100644 index 319e88d..0000000 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricGenerateYearVo.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.hnac.hzims.operational.homePage.hydroelectric.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.List; - -/** - * @author ysj - */ -@Data -@ApiModel(value = "年发电对象") -public class HydroelectricGenerateYearVo { - - @ApiModelProperty(value = "年份") - private Integer year; - - @ApiModelProperty(value = "月发电量集合:由1-12月组合") - private List generateMons; -} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricGroupAreaVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricGroupAreaVo.java deleted file mode 100644 index e834cd1..0000000 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricGroupAreaVo.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.hnac.hzims.operational.homePage.hydroelectric.vo; - -import com.hnac.hzims.hzimsweather.response.weather.Daily; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.List; - -/** - * 集团/区域占比 - * @author ysj - */ -@Data -public class HydroelectricGroupAreaVo { - - @ApiModelProperty(value = "站点机构") - private Long deptId; - - @ApiModelProperty(value = "机构名称") - private String deptName; - - @ApiModelProperty(value = "站点实时温度") - private String temp; - - @ApiModelProperty(value = "七日内天气") - private List weather; - - @ApiModelProperty(value = "年发电量") - private Double generateYear; - - @ApiModelProperty(value = "发电完成率") - private Double generateRate; - - @ApiModelProperty(value = "电站利用率") - private Double deviceUse; - - @ApiModelProperty(value = "容量利用率") - private Double capacityUse; - - @ApiModelProperty(value = "区域/集团发电占比") - private Double areaMakeUp; - - @ApiModelProperty(value = "排序") - private Integer sort; -} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricGroupVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricGroupVo.java deleted file mode 100644 index 66e31e5..0000000 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricGroupVo.java +++ /dev/null @@ -1,70 +0,0 @@ -package com.hnac.hzims.operational.homePage.hydroelectric.vo; - -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.ser.std.NullSerializer; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.List; - -/** - * @author ysj - */ -@Data -@ApiModel(value = "水电站首页-站点") -public class HydroelectricGroupVo { - - @ApiModelProperty(value = "机构Id") - @JsonSerialize(nullsUsing = NullSerializer.class) - private Long deptId; - - @ApiModelProperty(value = "机构名称") - private String deptName; - - @ApiModelProperty(value = "站点数量") - @JsonSerialize(nullsUsing = NullSerializer.class) - private Integer count; - - @ApiModelProperty(value = "总装机容量") - @JsonSerialize(nullsUsing = NullSerializer.class) - private Double capacity; - - @ApiModelProperty(value = "电站总负荷") - @JsonSerialize(nullsUsing = NullSerializer.class) - private Double load; - - @ApiModelProperty(value = "容量利用率") - @JsonSerialize(nullsUsing = NullSerializer.class) - private Double capacityRate; - - @ApiModelProperty(value = "年发电量") - @JsonSerialize(nullsUsing = NullSerializer.class) - private Double generateYear; - - @ApiModelProperty(value = "月发电量") - @JsonSerialize(nullsUsing = NullSerializer.class) - private Double generateMon; - - @ApiModelProperty(value = "日发电量") - @JsonSerialize(nullsUsing = NullSerializer.class) - private Double generateDay; - - @ApiModelProperty(value = "今年计划发电量") - @JsonSerialize(nullsUsing = NullSerializer.class) - private Double generatePlanYear; - - @ApiModelProperty(value = "电量完成吕") - @JsonSerialize(nullsUsing = NullSerializer.class) - private Double generateRate; - - @ApiModelProperty(value = "近3年发电对比") - private List recentYears; - - @ApiModelProperty(value = "计划完成完成趋势") - private List completes; - - @ApiModelProperty(value = "电站 :利用情况 && 天气 && 排名") - private List areas; - -} \ No newline at end of file diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricPowerRainVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricPowerRainVo.java deleted file mode 100644 index a2aae0e..0000000 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricPowerRainVo.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.hnac.hzims.operational.homePage.Hydroelectric.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * @author ysj - */ -@Data -@ApiModel(value = "站点首页-最近30日发电量/降雨量") -public class HydroelectricPowerRainVo { - - @ApiModelProperty(value = "日期") - private String date; - - @ApiModelProperty(value = "发电量") - private Double generate; - - @ApiModelProperty(value = "降雨") - private Double rain; -} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricStationVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricStationVo.java deleted file mode 100644 index ad3b959..0000000 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/Hydroelectric/vo/HydroelectricStationVo.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.hnac.hzims.operational.homePage.hydroelectric.vo; - -import com.hnac.hzims.hzimsweather.response.weather.Daily; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.List; - -/** - * @author ysj - */ -@Data -@ApiModel(value = "水电站首页-站点") -public class HydroelectricStationVo { - - - @ApiModelProperty(value = "站点编号") - private String stationCode; - - @ApiModelProperty(value = "站点名称") - private String stationName; - - @ApiModelProperty(value = "总装机容量") - private Double installedCapacity; - - @ApiModelProperty(value = "总发电负荷") - private Double powerSum; - - @ApiModelProperty(value = "容量利用率") - private Double capacityRate; - - @ApiModelProperty(value = "月计划发电量") - private Double powerMonPlan; - - @ApiModelProperty(value = "月发电量") - private Double powerMon; - - @ApiModelProperty(value = "月发电量完成率") - private Double powerRateMon; - - @ApiModelProperty(value = "年计划发电量") - private Double powerYearPlan; - - @ApiModelProperty(value = "年发电量") - private Double powerYear; - - @ApiModelProperty(value = "年发电完成率") - private Double powerRateYear; - - @ApiModelProperty(value = "今日发电量") - private Double powerDay; - - @ApiModelProperty(value = "昨日发电量") - private Double powerYesterDay; - - @ApiModelProperty(value = "七日内天气") - private List weather; - - @ApiModelProperty(value = "设备集合") - private List devices; - - @ApiModelProperty(value = "降雨/发电量曲线") - private List powerRains; - - @ApiModelProperty(value = "降雨/发电量曲线") - private List generateMons; -} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/constant/HydroelectricConstant.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/constant/HydroelectricConstant.java new file mode 100644 index 0000000..bd008e2 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/constant/HydroelectricConstant.java @@ -0,0 +1,18 @@ +package com.hnac.hzims.operational.homePage.hydroelectric.constant; + +/** + * 水电站首页-常量 + * @author ysj + */ +public interface HydroelectricConstant { + + /** + * 水电站 + */ + Integer HYDROPOWER = 0; + + /** + * 代运维 + */ + Integer PROXY_OPEARIONAL = 2; +} \ No newline at end of file diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricAreaStationVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricAreaStationVo.java new file mode 100644 index 0000000..98cdb14 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricAreaStationVo.java @@ -0,0 +1,48 @@ +package com.hnac.hzims.operational.homePage.hydroelectric.vo; + +import com.hnac.hzims.hzimsweather.response.weather.Daily; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * 集团/区域占比 + * @author ysj + */ +@Data +public class HydroelectricAreaStationVo { + + @ApiModelProperty(value = "站点机构") + private Long deptId; + + @ApiModelProperty(value = "机构ID") + private String stationCode; + + @ApiModelProperty(value = "机构名称") + private String stationName; + + @ApiModelProperty(value = "站点实时温度") + private String temp; + + @ApiModelProperty(value = "七日内天气") + private List weather; + + @ApiModelProperty(value = "年发电量") + private Double generateYear; + + @ApiModelProperty(value = "发电完成率") + private Double generateRate; + + @ApiModelProperty(value = "电站利用率") + private Double deviceUse; + + @ApiModelProperty(value = "容量利用率") + private Double capacityUse; + + @ApiModelProperty(value = "区域/集团发电占比") + private Double areaMakeUp; + + @ApiModelProperty(value = "排序") + private Integer sort; +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricAreaVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricAreaVo.java new file mode 100644 index 0000000..14b6f1b --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricAreaVo.java @@ -0,0 +1,70 @@ +package com.hnac.hzims.operational.homePage.hydroelectric.vo; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.NullSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @author ysj + */ +@Data +@ApiModel(value = "水电站首页-区域") +public class HydroelectricAreaVo { + + @ApiModelProperty(value = "机构Id") + @JsonSerialize(nullsUsing = NullSerializer.class) + private Long deptId; + + @ApiModelProperty(value = "机构名称") + private String deptName; + + @ApiModelProperty(value = "站点数量") + @JsonSerialize(nullsUsing = NullSerializer.class) + private Integer count; + + @ApiModelProperty(value = "总装机容量") + @JsonSerialize(nullsUsing = NullSerializer.class) + private Double capacity; + + @ApiModelProperty(value = "电站总负荷") + @JsonSerialize(nullsUsing = NullSerializer.class) + private Double load; + + @ApiModelProperty(value = "容量利用率") + @JsonSerialize(nullsUsing = NullSerializer.class) + private Double capacityRate; + + @ApiModelProperty(value = "年发电量") + @JsonSerialize(nullsUsing = NullSerializer.class) + private Double generateYear; + + @ApiModelProperty(value = "月发电量") + @JsonSerialize(nullsUsing = NullSerializer.class) + private Double generateMon; + + @ApiModelProperty(value = "日发电量") + @JsonSerialize(nullsUsing = NullSerializer.class) + private Double generateDay; + + @ApiModelProperty(value = "今年计划发电量") + @JsonSerialize(nullsUsing = NullSerializer.class) + private Double generatePlanYear; + + @ApiModelProperty(value = "电量完成吕") + @JsonSerialize(nullsUsing = NullSerializer.class) + private Double generateRate; + + @ApiModelProperty(value = "近3年发电对比") + private List recentYears; + + @ApiModelProperty(value = "计划完成完成趋势") + private List completes; + + @ApiModelProperty(value = "电站 :利用情况 && 天气 && 排名") + private List stations; + +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricDeviceGenerateVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricDeviceGenerateVo.java new file mode 100644 index 0000000..97f5971 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricDeviceGenerateVo.java @@ -0,0 +1,26 @@ +package com.hnac.hzims.operational.homePage.hydroelectric.vo; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.NullSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author ysj + */ +@Data +@ApiModel(value = "站点首页-设备近30天发电量") +public class HydroelectricDeviceGenerateVo { + + @ApiModelProperty(value = "日期") + private String date; + + @ApiModelProperty(value = "发电量") + @JsonSerialize(nullsUsing = NullSerializer.class) + private Float generate; + + @ApiModelProperty(value = "功率") + @JsonSerialize(nullsUsing = NullSerializer.class) + private Float load; +} \ No newline at end of file diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricDevicePowerVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricDevicePowerVo.java new file mode 100644 index 0000000..462e92f --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricDevicePowerVo.java @@ -0,0 +1,22 @@ +package com.hnac.hzims.operational.homePage.hydroelectric.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author ysj + */ +@Data +@ApiModel(value = "站点首页-设备近24小时功率曲线") +public class HydroelectricDevicePowerVo { + + @ApiModelProperty(value = "字符串时间") + private String strHour; + + @ApiModelProperty(value = "小时") + private Integer hour; + + @ApiModelProperty(value = "有功功率") + private String activePower; +} \ No newline at end of file diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricDeviceVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricDeviceVo.java index 4eb7c5b..ec21858 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricDeviceVo.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricDeviceVo.java @@ -19,7 +19,7 @@ public class HydroelectricDeviceVo { @ApiModelProperty(value = "设备名称") private String deivceName; - @ApiModelProperty(value = "开关机状态 : 0 - 关机 1 - 开机") + @ApiModelProperty(value = "开关机状态: 0 - 关机 1 - 开机") private Boolean state; @ApiModelProperty(value = "总装机容量") diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricGenerateMonVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricGenerateMonVo.java new file mode 100644 index 0000000..daeba5e --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricGenerateMonVo.java @@ -0,0 +1,28 @@ +package com.hnac.hzims.operational.homePage.hydroelectric.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author ysj + */ +@Data +@ApiModel(value = "月发电对象") +public class HydroelectricGenerateMonVo { + + @ApiModelProperty(value = "年份") + private Integer year; + + @ApiModelProperty(value = "月份") + private Integer month; + + @ApiModelProperty(value = "字符串格式月份") + private String strMonth; + + @ApiModelProperty(value = "月发电量") + private Double generate; + + @ApiModelProperty(value = "计划发电量") + private Double planGenerate; +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricGenerateYearVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricGenerateYearVo.java new file mode 100644 index 0000000..319e88d --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricGenerateYearVo.java @@ -0,0 +1,21 @@ +package com.hnac.hzims.operational.homePage.hydroelectric.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @author ysj + */ +@Data +@ApiModel(value = "年发电对象") +public class HydroelectricGenerateYearVo { + + @ApiModelProperty(value = "年份") + private Integer year; + + @ApiModelProperty(value = "月发电量集合:由1-12月组合") + private List generateMons; +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricGroupAreaVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricGroupAreaVo.java new file mode 100644 index 0000000..e834cd1 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricGroupAreaVo.java @@ -0,0 +1,45 @@ +package com.hnac.hzims.operational.homePage.hydroelectric.vo; + +import com.hnac.hzims.hzimsweather.response.weather.Daily; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * 集团/区域占比 + * @author ysj + */ +@Data +public class HydroelectricGroupAreaVo { + + @ApiModelProperty(value = "站点机构") + private Long deptId; + + @ApiModelProperty(value = "机构名称") + private String deptName; + + @ApiModelProperty(value = "站点实时温度") + private String temp; + + @ApiModelProperty(value = "七日内天气") + private List weather; + + @ApiModelProperty(value = "年发电量") + private Double generateYear; + + @ApiModelProperty(value = "发电完成率") + private Double generateRate; + + @ApiModelProperty(value = "电站利用率") + private Double deviceUse; + + @ApiModelProperty(value = "容量利用率") + private Double capacityUse; + + @ApiModelProperty(value = "区域/集团发电占比") + private Double areaMakeUp; + + @ApiModelProperty(value = "排序") + private Integer sort; +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricGroupVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricGroupVo.java new file mode 100644 index 0000000..66e31e5 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricGroupVo.java @@ -0,0 +1,70 @@ +package com.hnac.hzims.operational.homePage.hydroelectric.vo; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.NullSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @author ysj + */ +@Data +@ApiModel(value = "水电站首页-站点") +public class HydroelectricGroupVo { + + @ApiModelProperty(value = "机构Id") + @JsonSerialize(nullsUsing = NullSerializer.class) + private Long deptId; + + @ApiModelProperty(value = "机构名称") + private String deptName; + + @ApiModelProperty(value = "站点数量") + @JsonSerialize(nullsUsing = NullSerializer.class) + private Integer count; + + @ApiModelProperty(value = "总装机容量") + @JsonSerialize(nullsUsing = NullSerializer.class) + private Double capacity; + + @ApiModelProperty(value = "电站总负荷") + @JsonSerialize(nullsUsing = NullSerializer.class) + private Double load; + + @ApiModelProperty(value = "容量利用率") + @JsonSerialize(nullsUsing = NullSerializer.class) + private Double capacityRate; + + @ApiModelProperty(value = "年发电量") + @JsonSerialize(nullsUsing = NullSerializer.class) + private Double generateYear; + + @ApiModelProperty(value = "月发电量") + @JsonSerialize(nullsUsing = NullSerializer.class) + private Double generateMon; + + @ApiModelProperty(value = "日发电量") + @JsonSerialize(nullsUsing = NullSerializer.class) + private Double generateDay; + + @ApiModelProperty(value = "今年计划发电量") + @JsonSerialize(nullsUsing = NullSerializer.class) + private Double generatePlanYear; + + @ApiModelProperty(value = "电量完成吕") + @JsonSerialize(nullsUsing = NullSerializer.class) + private Double generateRate; + + @ApiModelProperty(value = "近3年发电对比") + private List recentYears; + + @ApiModelProperty(value = "计划完成完成趋势") + private List completes; + + @ApiModelProperty(value = "电站 :利用情况 && 天气 && 排名") + private List areas; + +} \ No newline at end of file diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricPowerRainVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricPowerRainVo.java index 22df4ec..2fcb5e3 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricPowerRainVo.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricPowerRainVo.java @@ -8,7 +8,7 @@ import lombok.Data; * @author ysj */ @Data -@ApiModel(value = "站点首页 - 最近30日发电量/降雨量") +@ApiModel(value = "站点首页-最近30日发电量/降雨量") public class HydroelectricPowerRainVo { @ApiModelProperty(value = "日期") diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricStationVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricStationVo.java new file mode 100644 index 0000000..ad3b959 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricStationVo.java @@ -0,0 +1,68 @@ +package com.hnac.hzims.operational.homePage.hydroelectric.vo; + +import com.hnac.hzims.hzimsweather.response.weather.Daily; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @author ysj + */ +@Data +@ApiModel(value = "水电站首页-站点") +public class HydroelectricStationVo { + + + @ApiModelProperty(value = "站点编号") + private String stationCode; + + @ApiModelProperty(value = "站点名称") + private String stationName; + + @ApiModelProperty(value = "总装机容量") + private Double installedCapacity; + + @ApiModelProperty(value = "总发电负荷") + private Double powerSum; + + @ApiModelProperty(value = "容量利用率") + private Double capacityRate; + + @ApiModelProperty(value = "月计划发电量") + private Double powerMonPlan; + + @ApiModelProperty(value = "月发电量") + private Double powerMon; + + @ApiModelProperty(value = "月发电量完成率") + private Double powerRateMon; + + @ApiModelProperty(value = "年计划发电量") + private Double powerYearPlan; + + @ApiModelProperty(value = "年发电量") + private Double powerYear; + + @ApiModelProperty(value = "年发电完成率") + private Double powerRateYear; + + @ApiModelProperty(value = "今日发电量") + private Double powerDay; + + @ApiModelProperty(value = "昨日发电量") + private Double powerYesterDay; + + @ApiModelProperty(value = "七日内天气") + private List weather; + + @ApiModelProperty(value = "设备集合") + private List devices; + + @ApiModelProperty(value = "降雨/发电量曲线") + private List powerRains; + + @ApiModelProperty(value = "降雨/发电量曲线") + private List generateMons; +} From 853207bc260bca1276be2ca25496ad5517b60459 Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Tue, 20 Aug 2024 10:19:36 +0800 Subject: [PATCH 3/6] =?UTF-8?q?#=E9=A6=96=E9=A1=B5=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../operational/homePage/service/impl/HydroelectricServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/homePage/service/impl/HydroelectricServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/homePage/service/impl/HydroelectricServiceImpl.java index aef388a..cbec557 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/homePage/service/impl/HydroelectricServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/homePage/service/impl/HydroelectricServiceImpl.java @@ -254,7 +254,7 @@ public class HydroelectricServiceImpl implements HydroelectricService { // 日发电量 area.setGenerateDay(targets.stream().mapToDouble(HydropowerUnitTargetVo::getPowerDay).sum()); // 年计划发电量 - area.setGeneratePlanYear(planClient.getPlanPowerYear(stations.stream().map(StationEntity::getCode).collect(Collectors.toList()), DateUtil.format(new Date(),"yyyy"))); + area.setGeneratePlanYear(plans.stream().mapToDouble(PlanGenerationEntity::getPlanGeneration).sum()); if(area.getGeneratePlanYear() <= 0 || area.getGenerateYear() <= 0){ area.setGenerateRate(0.0); }else{ From 2a7c7ef0d0661e798b0b17d0e136d141e4a979fa Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Tue, 20 Aug 2024 10:20:22 +0800 Subject: [PATCH 4/6] =?UTF-8?q?#=E9=A6=96=E9=A1=B5=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../operational/homePage/hydroelectric/vo/HydroelectricDeviceVo.java | 4 ++-- .../homePage/hydroelectric/vo/HydroelectricPowerRainVo.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricDeviceVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricDeviceVo.java index 4eb7c5b..f3ce2b7 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricDeviceVo.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricDeviceVo.java @@ -1,4 +1,4 @@ -package com.hnac.hzims.operational.homePage.hydroelectric.vo; +package com.hnac.hzims.operational.homePage.Hydroelectric.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -19,7 +19,7 @@ public class HydroelectricDeviceVo { @ApiModelProperty(value = "设备名称") private String deivceName; - @ApiModelProperty(value = "开关机状态 : 0 - 关机 1 - 开机") + @ApiModelProperty(value = "开关机状态: 0 - 关机 1 - 开机") private Boolean state; @ApiModelProperty(value = "总装机容量") diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricPowerRainVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricPowerRainVo.java index 22df4ec..a2aae0e 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricPowerRainVo.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricPowerRainVo.java @@ -1,4 +1,4 @@ -package com.hnac.hzims.operational.homePage.hydroelectric.vo; +package com.hnac.hzims.operational.homePage.Hydroelectric.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -8,7 +8,7 @@ import lombok.Data; * @author ysj */ @Data -@ApiModel(value = "站点首页 - 最近30日发电量/降雨量") +@ApiModel(value = "站点首页-最近30日发电量/降雨量") public class HydroelectricPowerRainVo { @ApiModelProperty(value = "日期") From 7ae6c50426606a7c00a6926c4a74f70f8eecf8a4 Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Tue, 20 Aug 2024 10:21:49 +0800 Subject: [PATCH 5/6] =?UTF-8?q?#=E9=A6=96=E9=A1=B5=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../operational/homePage/hydroelectric/vo/HydroelectricAreaVo.java | 2 +- .../operational/homePage/hydroelectric/vo/HydroelectricDeviceVo.java | 2 +- .../homePage/hydroelectric/vo/HydroelectricPowerRainVo.java | 2 +- .../operational/homePage/hydroelectric/vo/HydroelectricStationVo.java | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricAreaVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricAreaVo.java index 14b6f1b..2266d43 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricAreaVo.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricAreaVo.java @@ -54,7 +54,7 @@ public class HydroelectricAreaVo { @JsonSerialize(nullsUsing = NullSerializer.class) private Double generatePlanYear; - @ApiModelProperty(value = "电量完成吕") + @ApiModelProperty(value = "电量完成率") @JsonSerialize(nullsUsing = NullSerializer.class) private Double generateRate; diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricDeviceVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricDeviceVo.java index f3ce2b7..ec21858 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricDeviceVo.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricDeviceVo.java @@ -1,4 +1,4 @@ -package com.hnac.hzims.operational.homePage.Hydroelectric.vo; +package com.hnac.hzims.operational.homePage.hydroelectric.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricPowerRainVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricPowerRainVo.java index a2aae0e..2fcb5e3 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricPowerRainVo.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricPowerRainVo.java @@ -1,4 +1,4 @@ -package com.hnac.hzims.operational.homePage.Hydroelectric.vo; +package com.hnac.hzims.operational.homePage.hydroelectric.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricStationVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricStationVo.java index ad3b959..320c530 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricStationVo.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/homePage/hydroelectric/vo/HydroelectricStationVo.java @@ -60,9 +60,9 @@ public class HydroelectricStationVo { @ApiModelProperty(value = "设备集合") private List devices; - @ApiModelProperty(value = "降雨/发电量曲线") + @ApiModelProperty(value = "降雨曲线") private List powerRains; - @ApiModelProperty(value = "降雨/发电量曲线") + @ApiModelProperty(value = "发电量曲线") private List generateMons; } From 8fdf204b408d92541bcf2bd0b380d2a4e948df78 Mon Sep 17 00:00:00 2001 From: haungxing <1203316822@qq.com> Date: Tue, 20 Aug 2024 10:51:55 +0800 Subject: [PATCH 6/6] =?UTF-8?q?fix:=20=E9=81=A5=E6=8E=A7=E5=91=BD=E4=BB=A4?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=A1=A8=E5=90=8D=E6=B3=A8=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/hnac/hzims/bigmodel/maintenance/entity/ControlEntity.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/maintenance/entity/ControlEntity.java b/hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/maintenance/entity/ControlEntity.java index 3c0ea70..889b04a 100644 --- a/hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/maintenance/entity/ControlEntity.java +++ b/hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/maintenance/entity/ControlEntity.java @@ -3,6 +3,7 @@ package com.hnac.hzims.bigmodel.maintenance.entity; import com.alibaba.fastjson.annotation.JSONField; import com.baomidou.mybatisplus.annotation.SqlCondition; import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -19,6 +20,7 @@ import java.io.Serializable; @Data @EqualsAndHashCode @ApiModel("设备控制实体类") +@TableName("data_yk") public class ControlEntity extends TenantEntity implements Serializable { @ApiModelProperty(value = "itemId",required = true)