Compare commits

...

41 Commits

Author SHA1 Message Date
8d5f20d2e6 短信配置修改 2026-01-29 10:41:25 +08:00
9d7c810fb5 bug更改 2026-01-29 10:09:34 +08:00
9dea50103f bug修改 2026-01-29 08:54:07 +08:00
93a15e497f bug修改 2026-01-28 17:06:07 +08:00
8439ec5bdf bug修改 2026-01-28 16:38:18 +08:00
d8b1396b6f 远程控制修改 2026-01-27 15:42:04 +08:00
1295adb885 远程控制修改 2026-01-27 15:16:58 +08:00
a0841d75d7 远程控制修改 2026-01-27 13:59:17 +08:00
f417e661ce 多语言功能修改 2026-01-21 15:02:10 +08:00
69a117105b 一键同步-多语言修改 2026-01-21 10:10:46 +08:00
0a56b84650 多语言修改 2026-01-19 08:49:26 +08:00
d1b767593f 导出修改 2026-01-16 15:32:56 +08:00
bbcea1bbee 多语言(英语、法语、西班牙语、德语、波兰语、阿拉伯语)修改 2026-01-16 11:06:00 +08:00
c50a953d4a 多语言(英语、法语、西班牙语、德语、波兰语、阿拉伯语)修改 2026-01-15 17:30:37 +08:00
c626e3256f 多语言(英语、法语、西班牙语、德语、波兰语、阿拉伯语)处理 2026-01-15 16:22:43 +08:00
41f0b72253 多语言(英语、法语、西班牙语、德语、波兰语、阿拉伯语)处理 2026-01-12 09:37:20 +08:00
219caadd45 电站远程控制 2025-12-03 17:00:26 +08:00
861155b2e5 新增光伏Mppt相关功能 2025-11-28 10:04:04 +08:00
6c23c4a9c4 电站信息中英文修改 2025-11-10 11:07:34 +08:00
f870d4f41f 取消缓存 2025-11-04 08:55:10 +08:00
6fb36de2c3 海外平台-数据全英文化 2025-09-29 11:35:58 +08:00
66e49673df 海外平台-数据全英文化 2025-09-18 17:33:34 +08:00
83eff7d1ee 海外平台-数据全英文化 2025-09-18 14:05:01 +08:00
e6b6ccd804 添加百度翻译api接口工具类 2025-08-19 08:37:42 +08:00
4319f97a5c 服务器时区查询接口 2025-08-14 09:53:46 +08:00
c04c764ade 计划曲线下发问题处理 2025-08-12 16:50:18 +08:00
b0751a55cd 国外区域、天气api获取 2025-08-11 15:47:22 +08:00
046e4b2b43 国外区域、天气api获取 2025-08-07 15:41:14 +08:00
c12b165816 国外区域、天气api获取 2025-07-22 17:01:54 +08:00
2a7c3d42c0 解决冲突 2025-07-21 13:59:35 +08:00
805cad8cb9 添加测试机器sn 2025-07-21 13:55:32 +08:00
0a94f51e0d Merge branch 'dev' into paris 2025-07-15 10:14:12 +08:00
16aa6099ea 英文翻译 2025-07-15 09:43:30 +08:00
af8f225384 Merge branch 'dev' into paris 2025-07-14 15:28:32 +08:00
237f79a56f 英文翻译 2025-07-14 15:14:24 +08:00
e1cfe7f911 欧洲巴黎配置 2025-07-11 17:16:10 +08:00
2b70f531b4 代码修改 2025-07-09 08:43:36 +08:00
a853dafca3 配置修改 2025-07-08 19:00:35 +08:00
2164e77b5a 文件服务双发代码提交 2025-07-08 15:32:43 +08:00
3286204dc0 区分正式与测试配置修改 2025-07-04 21:19:07 +08:00
af7cc98d77 区分正式与测试配置修改 2025-06-30 16:48:50 +08:00
248 changed files with 9164 additions and 1693 deletions

View File

@ -0,0 +1,58 @@
#网关
server:
port: 8001
spring:
application:
name: api-gateway
cloud:
nacos:
username: nacos
password: nacos
discovery:
server-addr: 172.31.9.103:8848
#路由配置
gateway:
routes:
#用户中心
- id: user_center_route
uri: lb://user-center
predicates:
- Path=/api/sys/**
#业务中心
- id: business_route
uri: lb://business-service
predicates:
- Path=/api/business/**
#数据采集
- id: datacollect_route
uri: lb://datacollect-service
predicates:
- Path=/api/datacollect/**
#定时任务中心
- id: xxl_job_admin_route
uri: lb://xxl-job-admin
predicates:
- Path=/job-admin/**
#多媒体文件
- id: file_center_route
uri: lb://file-center
predicates:
- Path=/api/media/**
#告警和流程中心
- id: flow_center_route
uri: lb://flowable-center
predicates:
- Path=/api/flow/**
#actuator监控检查配置
management:
endpoint:
health:
show-details: always
health:
redis:
enabled: false
#需要校验true ,不需要校验false
isCheckLicence: false

View File

@ -9,9 +9,9 @@
</appender>
<appender name="rollingFile" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>/home/hocloud/logs/api-gateway/api-gateway.log</file>
<file>/www/zzkjcloud/logs/api-gateway/api-gateway.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>/home/hocloud/logs/api-gateway/api-gateway.%d{yyyy-MM-dd}-%i.log
<fileNamePattern>/www/zzkjcloud/logs/api-gateway/api-gateway.%d{yyyy-MM-dd}-%i.log
</fileNamePattern>
<maxHistory>10</maxHistory>
<!-- 除按日志记录之外还配置了日志文件不能超过2M若超过2M日志文件会以索引0开始

View File

@ -71,6 +71,8 @@ public interface DeviceTypeConstant {
//英博DC/DCMPPT
String DCDC = "dcdc";
String MPPT ="mppt";
//柴油发电机_济宁微山湖
String CF = "cf";
@ -371,6 +373,8 @@ public interface DeviceTypeConstant {
String BMS_MIN_VOL = "bmsMinVol";
}
//mppt 日发起始
String PV_DAILY_CHARGE_START = "pvDailyReleaseStart";
//日充起始
String DAILY_CHARGE_START = "dailyChargeStart";
//日放起始

View File

@ -21,6 +21,21 @@ public class CurveConfig implements Serializable {
@ApiModelProperty(value = "曲线名称(英文)")
private String curveNameEn;
@ApiModelProperty(value = "曲线名称(法语)")
private String curveNameFra;
@ApiModelProperty(value = "曲线名称(西班牙语)")
private String curveNameSpa;
@ApiModelProperty(value = "曲线名称(德语)")
private String curveNameDe;
@ApiModelProperty(value = "曲线名称(波兰语)")
private String curveNamePl;
@ApiModelProperty(value = "曲线名称(阿拉伯语)")
private String curveNameAra;
@ApiModelProperty(value = "曲线类型")
private Integer curveType;

View File

@ -55,6 +55,26 @@ public class Device implements Serializable {
@ApiModelProperty(value = "设备名字")
private String deviceName;
/**
* 设备名字-英文
*/
@ApiModelProperty(value = "设备名字-英文")
private String deviceNameEn;
@ApiModelProperty(value = "设备名字-法语")
private String deviceNameFra;
@ApiModelProperty(value = "设备名字-西班牙语")
private String deviceNameSpa;
@ApiModelProperty(value = "设备名字-德语")
private String deviceNameDe;
@ApiModelProperty(value = "设备名字-波兰语")
private String deviceNamePl;
@ApiModelProperty(value = "设备名字-阿拉伯语")
private String deviceNameAra;
@ApiModelProperty(value = "设备类型")
private String deviceType;

View File

@ -55,6 +55,18 @@ public class DeviceCall implements Serializable {
@ApiModelProperty(value = "设备名字")
private String deviceName;
@ApiModelProperty(value = "设备名字-英文")
private String deviceNameEn;
@ApiModelProperty(value = "设备名字-法语")
private String deviceNameFra;
@ApiModelProperty(value = "设备名字-西班牙语")
private String deviceNameSpa;
@ApiModelProperty(value = "设备名字-德语")
private String deviceNameDe;
@ApiModelProperty(value = "设备名字-波兰语")
private String deviceNamePl;
@ApiModelProperty(value = "设备名字-阿拉伯语")
private String deviceNameAra;
@ApiModelProperty(value = "设备类型")
private String deviceType;

View File

@ -50,8 +50,18 @@ public class DeviceTypeCol implements Serializable {
/**
* 字段英文名
*/
@ApiModelProperty(value = "字段英文名")
@ApiModelProperty(value = "字段(英语)")
private String colEn;
@ApiModelProperty(value = "字段(法语)")
private String colFra;
@ApiModelProperty(value = "字段(西班牙语)")
private String colSpa;
@ApiModelProperty(value = "字段(德语)")
private String colDe;
@ApiModelProperty(value = "字段(波兰语)")
private String colPl;
@ApiModelProperty(value = "字段(阿拉伯语)")
private String colAra;
/**
* INT BIGDECIMAL 等

View File

@ -53,4 +53,19 @@ public class DynamicConfig implements Serializable {
@ApiModelProperty(value = "指标名称(英文)")
private String colNameEn;
@ApiModelProperty(value = "指标名称(法语)")
private String colNameFra;
@ApiModelProperty(value = "指标名称(西班牙语)")
private String colNameSpa;
@ApiModelProperty(value = "指标名称(德语)")
private String colNameDe;
@ApiModelProperty(value = "指标名称(波兰语)")
private String colNamePl;
@ApiModelProperty(value = "指标名称(阿拉伯语)")
private String colNameAra;
}

View File

@ -0,0 +1,101 @@
package com.ho.business.entity;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@Data
public class EarningsCalculateMppt implements Serializable {
/**
* 主键id
*/
private Integer id;
/**
* 分组id(与src_id)
*/
private Integer groupId;
/**
* 所属id
*/
private Integer pid;
/**
* 电站id
*/
private Integer stationId;
/**
* device表中的id字段相连
*/
private Integer srcId;
/**
* 部门id
*/
private Integer deptId;
/**
* 创建时间
*/
private Date createTime;
/**
* 日期
*/
private String day;
/**
* 数据类型: 0:充 1:放
*/
private Integer type;
/**
* 收益
*/
private BigDecimal digital;
/**
* 电量
*/
private BigDecimal elec;
/**
* 费率类型:elec_template_sub表type
*/
private String rateType;
/**
* 价格
*/
private BigDecimal price;
/**
* 总充,总放 根据type判断
*/
private BigDecimal total;
/**
* 收益
*/
private BigDecimal discharge;
/**
* 电量
*/
private BigDecimal disElec;
/**
* 费率类型:elec_template_sub表type
*/
private String disRateType;
/**
* 折扣
*/
private BigDecimal discount;
}

View File

@ -42,6 +42,38 @@ public class HisCurveRelate implements Serializable {
private String modelName;
/**
* 模板名称-英文
*/
private String modelNameEn;
/**
* 模板名称-法语
*/
private String modelNameFra;
/**
* 模板名称-西班牙语
*/
private String modelNameSpa;
/**
* 模板名称-德语
*/
private String modelNameDe;
/**
* 模板名称-波兰语
*/
private String modelNamePl;
/**
* 模板名称-阿拉伯语
*/
private String modelNameAra;
/**
* srcId
*/
@ -59,6 +91,31 @@ public class HisCurveRelate implements Serializable {
*/
private String colName;
/**
* 字段名称-英文
*/
private String colNameEn;
/**
* 字段名称-法语
*/
private String colNameFra;
/**
* 字段名称-西班牙语
*/
private String colNameSpa;
/**
* 字段名称-德语
*/
private String colNameDe;
/**
* 字段名称-波兰语
*/
private String colNamePl;
/**
* 字段名称-阿拉伯语
*/
private String colNameAra;
/**
* 设备类型
*/
@ -67,4 +124,7 @@ public class HisCurveRelate implements Serializable {
List<HisCurveRelate> list;
@ApiModelProperty(value = "多语言切换-查询字段")
private String lang;
}

View File

@ -21,9 +21,35 @@ public class PlanCurveOperationRecordReq {
@ApiModelProperty(value = "操作内容")
String operateContent;
@ApiModelProperty(value = "操作内容-英文")
String operateContentEn;
@ApiModelProperty(value = "操作内容-法语")
String operateContentFra;
@ApiModelProperty(value = "操作内容-西班牙语")
String operateContentSpa;
@ApiModelProperty(value = "操作内容-德语")
String operateContentDe;
@ApiModelProperty(value = "操作内容-波兰语")
String operateContentPl;
@ApiModelProperty(value = "操作内容-阿拉伯语")
String operateContentAra;
@ApiModelProperty(value = "操作结果")
String operateResult;
@ApiModelProperty(value = "操作结果-英文")
String operateResultEn;
@ApiModelProperty(value = "操作结果-法语")
String operateResultFra;
@ApiModelProperty(value = "操作结果-西班牙语")
String operateResultSpa;
@ApiModelProperty(value = "操作结果-德语")
String operateResultDe;
@ApiModelProperty(value = "操作结果-波兰语")
String operateResultPl;
@ApiModelProperty(value = "操作结果-阿拉伯语")
String operateResultAra;
@ApiModelProperty(value = "生效时间")
String effectiveTime;

View File

@ -26,6 +26,19 @@ public class PlanningCurveTemplate {
/* 模板名称 */
private String templateName;
/* 模板名称-英文 */
private String templateNameEn;
/* 模板名称-法语 */
private String templateNameFra;
/* 模板名称-西班牙语 */
private String templateNameSpa;
/* 模板名称-德语 */
private String templateNameDe;
/* 模板名称-波兰语 */
private String templateNamePl;
/* 模板名称-阿拉伯语 */
private String templateNameAra;
/* 电价模板id */
//private Integer elecTemplateId;
@ -69,4 +82,7 @@ public class PlanningCurveTemplate {
/* 计划曲线列表数据 */
private List<PlanningCurve> planningCurves;
@ApiModelProperty(value = "多语言切换-查询字段")
private String lang;
}

View File

@ -1,6 +1,7 @@
package com.ho.business.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
@ -22,4 +23,6 @@ public class PlanningIssueDevice {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date operationDate;
@ApiModelProperty(value = "多语言切换-查询字段")
private String lang;
}

View File

@ -21,10 +21,33 @@ public class PointConfig implements Serializable {
@ApiModelProperty(value = "点位名称(英文)")
private String nameEn;
@ApiModelProperty(value = "点位名称(法语)")
private String nameFra;
@ApiModelProperty(value = "点位名称(西班牙语)")
private String nameSpa;
@ApiModelProperty(value = "点位名称(德语)")
private String nameDe;
@ApiModelProperty(value = "点位名称(波兰语)")
private String namePl;
@ApiModelProperty(value = "点位名称(阿拉伯语)")
private String nameAra;
@ApiModelProperty(value = "默认值")
private String defaultValue;
@ApiModelProperty(value = "默认值-英文")
private String defaultValueEn;
@ApiModelProperty(value = "默认值-法语")
private String defaultValueFra;
@ApiModelProperty(value = "默认值-西班牙语")
private String defaultValueSpa;
@ApiModelProperty(value = "默认值-德语")
private String defaultValueDe;
@ApiModelProperty(value = "默认值-波兰语")
private String defaultValuePl;
@ApiModelProperty(value = "默认值-阿拉伯语")
private String defaultValueAra;
@ApiModelProperty(value = "配置点类型")
private Integer pointType;

View File

@ -32,4 +32,14 @@ public class PointPolysemyConfig implements Serializable {
@ApiModelProperty(value = "值对应的名称(英文)")
private String nameEn;
@ApiModelProperty(value = "值对应的名称(法语)")
private String nameFra;
@ApiModelProperty(value = "值对应的名称(西班牙语)")
private String nameSpa;
@ApiModelProperty(value = "值对应的名称(德语)")
private String nameDe;
@ApiModelProperty(value = "值对应的名称(波兰语)")
private String namePl;
@ApiModelProperty(value = "值对应的名称(阿拉伯语)")
private String nameAra;
}

View File

@ -33,6 +33,16 @@ public class Station implements Serializable {
@ApiModelProperty(value = "电站名称(英文)")
private String nameEn;
@ApiModelProperty(value = "电站名称(法语)")
private String nameFra;
@ApiModelProperty(value = "电站名称(西班牙语)")
private String nameSpa;
@ApiModelProperty(value = "电站名称(德语)")
private String nameDe;
@ApiModelProperty(value = "电站名称(波兰语)")
private String namePl;
@ApiModelProperty(value = "电站名称(阿拉伯语)")
private String nameAra;
@ApiModelProperty(value = "地址")
private String address;
@ -52,6 +62,9 @@ public class Station implements Serializable {
@ApiModelProperty(value = "额定功率")
private BigDecimal ratePower;
@ApiModelProperty(value = "额定功率(光伏mppt)")
private BigDecimal pvPower;
@ApiModelProperty(value = "sn编号列表")
private List<String> snList;
@ -118,9 +131,34 @@ public class Station implements Serializable {
@ApiModelProperty(value = "国家")
private String nation;
@ApiModelProperty(value = "国家-英语")
private String nationEn;
@ApiModelProperty(value = "国家-法语")
private String nationFra;
@ApiModelProperty(value = "国家-西班牙语")
private String nationSpa;
@ApiModelProperty(value = "国家-德语")
private String nationDe;
@ApiModelProperty(value = "国家-波兰语")
private String nationPl;
@ApiModelProperty(value = "国家-阿拉伯语")
private String nationAra;
@ApiModelProperty(value = "")
private String province;
@ApiModelProperty(value = "省-英语")
private String provinceEn;
@ApiModelProperty(value = "省-法语")
private String provinceFra;
@ApiModelProperty(value = "省-西班牙语")
private String provinceSpa;
@ApiModelProperty(value = "省-德语")
private String provinceDe;
@ApiModelProperty(value = "省-波兰")
private String provincePl;
@ApiModelProperty(value = "省-阿拉伯语")
private String provinceAra;
@ApiModelProperty(value = "")
private String city;

View File

@ -0,0 +1,48 @@
package com.ho.business.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ho.common.tools.constant.CommonConstant;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
@Data
public class StationRemoteControl implements Serializable {
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "电站id")
private Integer stationId;
@ApiModelProperty(value = "电站名称")
private String stationName;
@ApiModelProperty(value = "远程访问ip、也可以是域名")
private String ip;
@ApiModelProperty(value = "端口")
private String port;
@ApiModelProperty(value = "账号")
private String userName;
@ApiModelProperty(value = "密码")
private String password;
@ApiModelProperty(value = "内网ip")
private String intranetIp;
@ApiModelProperty(value = "ems页面类型")
private String type;
@JsonFormat(pattern = CommonConstant.DATE)
@ApiModelProperty(value = "创建时间")
private Date createTime;
@JsonFormat(pattern = CommonConstant.DATE)
@ApiModelProperty(value = "修改时间")
private Date updateTime;
}

View File

@ -0,0 +1,39 @@
package com.ho.business.entity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @author kerwin
*/
@Data
public class TranslateName implements Serializable {
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "名称(中文)")
private String name;
@ApiModelProperty(value = "名称(英文)")
private String nameEn;
@ApiModelProperty(value = "名称(法语)")
private String nameFra;
@ApiModelProperty(value = "名称(西班牙语)")
private String nameSpa;
@ApiModelProperty(value = "名称(德语)")
private String nameDe;
@ApiModelProperty(value = "名称(波兰语)")
private String namePl;
@ApiModelProperty(value = "名称(阿拉伯语)")
private String nameAra;
}

View File

@ -1,22 +0,0 @@
package com.ho.business.entity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @TableName translate_nation
*/
@Data
public class TranslateNation implements Serializable {
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "名称")
private String name;
@ApiModelProperty(value = "名称(英文)")
private String nameEn;
}

View File

@ -41,5 +41,8 @@ public class VirtualDeviceCol implements Serializable {
private String name;
//查询条件,非数据库中列
List<String> typeList;;
List<String> typeList;
@ApiModelProperty(value = "多语言切换-查询字段")
private String lang;
}

View File

@ -77,4 +77,7 @@ public class DeviceReqVO {
@ApiModelProperty(hidden = true,value = "获取设备类型不为空的第一个设备")
private Integer needDeviceTypeNotNull;
@ApiModelProperty(value = "多语言切换-查询字段")
private String lang;
}

View File

@ -32,4 +32,7 @@ public class DeviceTypeColReqVO {
* 遥信遥测 1遥信 2遥测 3遥控 默认送2
*/
Integer sensType;
@ApiModelProperty(value = "多语言切换-查询字段")
private String lang;
}

View File

@ -124,6 +124,11 @@ public class StationPutReqVO {
@ApiModelProperty(value = "是否接入光伏0代表不接,1代表接入")
private Integer inverterFlag;
@ApiModelProperty(value = "额定功率(mppt)")
@Range(max = 999999999, message = "额定功率过大")
BigDecimal pvPower;
//图片地址
@ApiModelProperty(value = "图片地址")
Integer logoPictureId;

View File

@ -0,0 +1,16 @@
package com.ho.business.vo.req;
import com.ho.business.entity.StationRemoteControl;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class StationRemoteControlPageVo extends StationRemoteControl {
@ApiModelProperty(value = "第几页")
private Integer pageNum=1;
@ApiModelProperty(value = "分页数量")
private Integer pageSize=10;
}

View File

@ -29,4 +29,8 @@ public class StationReq implements Serializable {
@ApiModelProperty(value = "设备类型",hidden = true)
String deviceType;
@ApiModelProperty(value = "多语言切换-查询字段")
String lang;
}

View File

@ -102,6 +102,10 @@ public class StationReqVO {
@ApiModelProperty(value = "是否接入光伏0默认不接入 1接入")
private Integer inverterFlag;
@ApiModelProperty(value = "额定功率(mppt)")
@Range(max = 999999999, message = "额定功率过大")
BigDecimal pvPower;
@ApiModelProperty(value = "卡号")
private String iccId;
@ -128,4 +132,7 @@ public class StationReqVO {
@ApiModelProperty(value = "电站id集合",hidden = true)
private List<Integer> ids;
@ApiModelProperty(value = "多语言切换-查询字段")
private String lang;
}

View File

@ -34,6 +34,7 @@ public class EarningsCalculateReq {
@ApiModelProperty(value = "结束时间",hidden = true)
String endTime;
@ApiModelProperty(value = "多语言切换-查询字段")
private String lang;
}

View File

@ -17,4 +17,7 @@ public class DeviceTreeReq {
@ApiModelProperty(value = "src_id")
Integer srcId;
@ApiModelProperty(value = "多语言切换-查询字段")
private String lang;
}

View File

@ -49,6 +49,21 @@ public class CurveConfigAdd {
@ApiModelProperty(value = "曲线名称(英文)")
private String curveNameEn;
@ApiModelProperty(value = "曲线名称(法语)")
private String curveNameFra;
@ApiModelProperty(value = "曲线名称(西班牙语)")
private String curveNameSpa;
@ApiModelProperty(value = "曲线名称(德语)")
private String curveNameDe;
@ApiModelProperty(value = "曲线名称(波兰语)")
private String curveNamePl;
@ApiModelProperty(value = "曲线名称(阿拉伯语)")
private String curveNameAra;
@ApiModelProperty(value = "动态配置集合")
private List<DynamicConfig> list;
}

View File

@ -35,4 +35,7 @@ public class DynamicConfigQuery {
@ApiModelProperty(value = "是否隐藏0否1是默认0",hidden = true)
private Integer isHide;
@ApiModelProperty(value = "多语言切换-查询字段")
private String lang;
}

View File

@ -21,6 +21,19 @@ public class PointConfigAdd {
@ApiModelProperty(value = "默认值")
private String defaultValue;
@ApiModelProperty(value = "默认值-英文")
private String defaultValueEn;
@ApiModelProperty(value = "默认值-法语")
private String defaultValueFra;
@ApiModelProperty(value = "默认值-西班牙语")
private String defaultValueSpa;
@ApiModelProperty(value = "默认值-德语")
private String defaultValueDe;
@ApiModelProperty(value = "默认值-波兰语")
private String defaultValuePl;
@ApiModelProperty(value = "默认值-阿拉伯语")
private String defaultValueAra;
@ApiModelProperty(value = "配置点类型")
private Integer pointType;
@ -53,6 +66,17 @@ public class PointConfigAdd {
@ApiModelProperty(value = "点位名称(英文)")
private String nameEn;
@ApiModelProperty(value = "点位名称(法语)")
private String nameFra;
@ApiModelProperty(value = "点位名称(西班牙语)")
private String nameSpa;
@ApiModelProperty(value = "点位名称(德语)")
private String nameDe;
@ApiModelProperty(value = "点位名称(波兰语)")
private String namePl;
@ApiModelProperty(value = "点位名称(阿拉伯语)")
private String nameAra;
@ApiModelProperty(value = "点位集合")
List<DynamicConfig> list;

View File

@ -20,4 +20,7 @@ public class PointConfigQuery {
@ApiModelProperty(value = "设备id(用以区分属于哪个设备页)")
private Integer deviceId;
@ApiModelProperty(value = "多语言切换-查询字段")
private String lang;
}

View File

@ -28,4 +28,7 @@ public class ModelTypeQueryReq {
@ApiModelProperty(value = "用户id",hidden = true)
private String userId;
@ApiModelProperty(value = "多语言切换-查询字段")
private String lang;
}

View File

@ -31,4 +31,7 @@ public class PcsStationReq extends StationReq {
@ApiModelProperty(value = "分段类型",hidden = true)
String stationName;
@ApiModelProperty(value = "多语言切换-查询字段")
private String lang;
}

View File

@ -49,4 +49,7 @@ public class PointCurveReq {
@ApiModelProperty(value = "是否为策略总览页面(1:是;0:否)")
Integer isStrategy;
@ApiModelProperty(value = "多语言切换-查询字段")
private String lang;
}

View File

@ -42,5 +42,8 @@ public class PointReq {
@ApiModelProperty(value = "值2的定义 大于1 小于2 等于3 大于等于4 小于等于5")
private BigDecimal Value2;
@ApiModelProperty(value = "多语言切换-查询字段")
private String lang;
}

View File

@ -24,6 +24,9 @@ public class PointVo {
@ApiModelProperty(value = "遥信遥测 1遥信 2遥测 默认送2")
private Integer sensType;
@ApiModelProperty(value = "多语言切换-查询字段")
private String lang;
}

View File

@ -88,4 +88,16 @@ public class EarningsCalculateResp {
*/
private Integer finish;
@ApiModelProperty(value = "月发电量(mppt)")
BigDecimal monthReleaseElec;
@ApiModelProperty(value = "月收益(mppt)")
BigDecimal monthIncone;
@ApiModelProperty(value = "累计发电量(mppt)")
BigDecimal totalReleaseElec;
@ApiModelProperty(value = "累计收益(mppt)")
BigDecimal totalIncome;
@ApiModelProperty(value = "额定功率(mppt)")
BigDecimal pvPower;
}

View File

@ -0,0 +1,66 @@
package com.ho.business.vo.resp.elecPriceCurve;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
/**
* @author kerwin
*/
public class ElecPriceTemplateExcelEn {
// @ExcelProperty(value = "模板编号")
@ExcelIgnore
private String templateNo;
@ExcelProperty(value = "Time period starts", index = 1)
private String beginTime;
@ExcelProperty(value = "End of time period", index = 2)
private String endTime;
@ExcelProperty(value = "Electricity type", index = 3)
private String type;
@ExcelProperty(value = "price", index = 4)
private String price;
@ExcelProperty(value = "Template Name", index = 0)
private String templateName;
@ExcelProperty(value = "Enable or not", index = 5)
private String isEnable;
//@ExcelProperty(value = "电价曲线类型", index = 6)
//private String elecType;
@ExcelProperty(value = "Modification time", index = 9)
private String updateTime;
//电站id
@ExcelIgnore
private Integer stationId;
//集团id
@ExcelIgnore
private Integer groupId;
@ApiModelProperty(value="模板有效期开始时间")
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
@ExcelProperty(value = "Template validity period start time", index = 6)
private Date validityStartTime;
@ApiModelProperty(value="模板有效期结束时间")
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
@ExcelProperty(value = "End time of template validity period", index = 7)
private Date validityEndTime;
@ApiModelProperty(value="电价折扣(%)")
@ExcelProperty(value = "Electricity price discount (%)", index = 8)
private Double discount;
}

View File

@ -36,4 +36,6 @@ public class AnnualChartValue {
@ApiModelProperty(value = "容量")
BigDecimal stationCapacity;
@ApiModelProperty(value = "mppt发电量")
BigDecimal release;
}

View File

@ -0,0 +1,37 @@
package com.ho.business.vo.resp.iargeScreen;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
@Data
public class AnnualPvOverviewResp {
//装机容量
@ApiModelProperty(value = "装机容量")
BigDecimal capacity;
//电站总数
@ApiModelProperty(value = "电站总数")
Integer stationNumber;
@ApiModelProperty(value = "日发电量(mppt)")
BigDecimal dailyReleaseElec;
@ApiModelProperty(value = "年发电量(mppt)")
BigDecimal yearReleaseElec;
@ApiModelProperty(value = "累计发电量(mppt)")
BigDecimal totalReleaseElec;
@ApiModelProperty(value = "日收益(mppt)")
BigDecimal todayIncone;
@ApiModelProperty(value = "年收益(mppt)")
BigDecimal yearIncone;
@ApiModelProperty(value = "累计收益(mppt)")
BigDecimal totalIncome;
}

View File

@ -52,4 +52,7 @@ public class Subdata {
//年总充()
@ApiModelProperty(value = "总充")
BigDecimal charge;
@ApiModelProperty(value = "mppt总发电量")
BigDecimal release;
}

View File

@ -0,0 +1,20 @@
package com.ho.business.vo.resp.mppt;
import com.ho.business.vo.DeviceTransfer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
@Data
public class MpptActiveVo {
@ApiModelProperty(value = "mppt有功功率")
BigDecimal pvActivePower;
@ApiModelProperty(value = "mppt总发电量")
BigDecimal totalRelease;
@ApiModelProperty(value = "mppt日发电量")
BigDecimal dailyReleaseElec;
}

View File

@ -0,0 +1,17 @@
package com.ho.business.vo.resp.mppt;
import com.ho.business.vo.DeviceTransfer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class MpptVo {
@ApiModelProperty(value = "mppt有功功率")
DeviceTransfer pvActivePower;
@ApiModelProperty(value = "mppt总发电量")
DeviceTransfer totalRelease;
@ApiModelProperty(value = "mppt 日发电量-起始")
DeviceTransfer pvDailyReleaseStart;
}

View File

@ -0,0 +1,75 @@
package com.ho.business.vo.resp.pcsStation;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.alibaba.excel.annotation.ExcelIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
/**
* 阿拉伯语
*/
@Data
public class EarningsCalculateDataAra {
@ApiModelProperty(value = "日期/名称")
@Excel(name = "التاريخ/الاسم")
String date;
@ApiModelProperty(value = "充电量-尖(kWh)")
@Excel(name = "كمية الشحن-نصيحة(kWh)")
BigDecimal chargeTip;
@ApiModelProperty(value = "充电量-峰(kWh)")
@Excel(name = "كمية الشحن-قمة(kWh)")
BigDecimal chargePeak;
@ApiModelProperty(value = "充电量-平(kWh)")
@Excel(name = "كمية الشحن-مسطح(kWh)")
BigDecimal chargeFlat;
@ApiModelProperty(value = "充电量-谷(kWh)")
@Excel(name = "كمية الشحن-وادي(kWh)")
BigDecimal chargeValley;
@ApiModelProperty(value = "充电量-深谷(kWh)")
@Excel(name = "كمية الشحن-وادي عميق(kWh)")
BigDecimal chargeDeepValley;
@ApiModelProperty(value = "充电量-总(kWh)")
@Excel(name = "كمية الشحن-المجموع(kWh)")
BigDecimal chargeElec;
@ApiModelProperty(value = "放电量-尖(kWh)")
@Excel(name = "التفريغ-نصيحة(kWh)")
BigDecimal dischargeTip;
@ApiModelProperty(value = "放电量-峰(kWh)")
@Excel(name = "التفريغ-قمة(kWh)")
BigDecimal dischargePeak;
@ApiModelProperty(value = "放电量-平(kWh)")
@Excel(name = "التفريغ-مسطح(kWh)")
BigDecimal dischargeFlat;
@ApiModelProperty(value = "放电量-谷(kWh)")
@Excel(name = "التفريغ-وادي(kWh)")
BigDecimal dischargeValley;
@ApiModelProperty(value = "放电量-深谷(kWh)")
@Excel(name = "التفريغ-وادي عميق(kWh)")
BigDecimal dischargeDeepValley;
@ApiModelProperty(value = "放电量-总(kWh)")
@Excel(name = "التفريغ-المجموع(kWh)")
BigDecimal dischargeElec;
@ApiModelProperty(value = "电站名称")
@ExcelIgnore
String name;
@ApiModelProperty(value = "电站id")
@ExcelIgnore
Integer stationId;
}

View File

@ -0,0 +1,76 @@
package com.ho.business.vo.resp.pcsStation;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.alibaba.excel.annotation.ExcelIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
/**
* 德语
*/
@Data
public class EarningsCalculateDataDe {
@ApiModelProperty(value = "日期/名称")
@Excel(name = "Datum/Name")
String date;
@ApiModelProperty(value = "充电量-尖(kWh)")
@Excel(name = "Ladefähigkeit-Spitze (kWh)")
BigDecimal chargeTip;
@ApiModelProperty(value = "充电量-峰(kWh)")
@Excel(name = "Ladefähigkeit-Gipfel(kWh)")
BigDecimal chargePeak;
@ApiModelProperty(value = "充电量-平(kWh)")
@Excel(name = "Ladefähigkeit-Flat(kWh)")
BigDecimal chargeFlat;
@ApiModelProperty(value = "充电量-谷(kWh)")
@Excel(name = "Ladefähigkeit-Valley(kWh)")
BigDecimal chargeValley;
@ApiModelProperty(value = "充电量-深谷(kWh)")
@Excel(name = "Ladefähigkeit-Deep Valley(kWh)")
BigDecimal chargeDeepValley;
@ApiModelProperty(value = "充电量-总(kWh)")
@Excel(name = "Ladefähigkeit-Total(kWh)")
BigDecimal chargeElec;
@ApiModelProperty(value = "放电量-尖(kWh)")
@Excel(name = "Entladung-Spitze(kWh)")
BigDecimal dischargeTip;
@ApiModelProperty(value = "放电量-峰(kWh)")
@Excel(name = "Entladung-Gipfel(kWh)")
BigDecimal dischargePeak;
@ApiModelProperty(value = "放电量-平(kWh)")
@Excel(name = "Entladung-Flat(kWh)")
BigDecimal dischargeFlat;
@ApiModelProperty(value = "放电量-谷(kWh)")
@Excel(name = "Entladung-Valley(kWh)")
BigDecimal dischargeValley;
@ApiModelProperty(value = "放电量-深谷(kWh)")
@Excel(name = "Entladung-Deep Valley(kWh)")
BigDecimal dischargeDeepValley;
@ApiModelProperty(value = "放电量-总(kWh)")
@Excel(name = "Entladung-Total(kWh)")
BigDecimal dischargeElec;
@ApiModelProperty(value = "电站名称")
@ExcelIgnore
String name;
@ApiModelProperty(value = "电站id")
@ExcelIgnore
Integer stationId;
}

View File

@ -7,10 +7,14 @@ import lombok.Data;
import java.math.BigDecimal;
/**
* 英语
*/
@Data
public class EarningsCalculateDataEn {
@ApiModelProperty(value = "日期/名称")
@Excel(name = "date/name")
@Excel(name = "Date/Name")
String date;
@ApiModelProperty(value = "充电量-尖(kWh)")
@ -61,7 +65,6 @@ public class EarningsCalculateDataEn {
@Excel(name = "Discharge-Total(kWh)")
BigDecimal dischargeElec;
@ApiModelProperty(value = "电站名称")
@ExcelIgnore
String name;

View File

@ -0,0 +1,73 @@
package com.ho.business.vo.resp.pcsStation;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.alibaba.excel.annotation.ExcelIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
/**
* 法语
*/
@Data
public class EarningsCalculateDataFra {
@ApiModelProperty(value = "日期/名称")
@Excel(name = "Date/Name")
String date;
@ApiModelProperty(value = "充电量-尖(kWh)")
@Excel(name = "Quantité de charge-Pointe (kWh)")
BigDecimal chargeTip;
@ApiModelProperty(value = "充电量-峰(kWh)")
@Excel(name = "Quantité de charge-crête (kWh)")
BigDecimal chargePeak;
@ApiModelProperty(value = "充电量-平(kWh)")
@Excel(name = "Quantité de charge-plate (kWh)")
BigDecimal chargeFlat;
@ApiModelProperty(value = "充电量-谷(kWh)")
@Excel(name = "Quantité de charge-Vallée (kWh)")
BigDecimal chargeValley;
@ApiModelProperty(value = "充电量-深谷(kWh)")
@Excel(name = "Quantité de charge-Vallée profonde (kWh)")
BigDecimal chargeDeepValley;
@ApiModelProperty(value = "充电量-总(kWh)")
@Excel(name = "Quantité de charge-total (kWh)")
BigDecimal chargeElec;
@ApiModelProperty(value = "放电量-尖(kWh)")
@Excel(name = "Quantité de décharge-Pointe (kWh)")
BigDecimal dischargeTip;
@ApiModelProperty(value = "放电量-峰(kWh)")
@Excel(name = "Quantité de décharge-crête (kWh)")
BigDecimal dischargePeak;
@ApiModelProperty(value = "放电量-平(kWh)")
@Excel(name = "Quantité de décharge-plate (kWh)")
BigDecimal dischargeFlat;
@ApiModelProperty(value = "放电量-谷(kWh)")
@Excel(name = "Quantité de décharge-Vallée (kWh)")
BigDecimal dischargeValley;
@ApiModelProperty(value = "放电量-深谷(kWh)")
@Excel(name = "Quantité de décharge-Vallée profonde (kWh)")
BigDecimal dischargeDeepValley;
@ApiModelProperty(value = "放电量-总(kWh)")
@Excel(name = "Quantité de décharge-total (kWh)")
BigDecimal dischargeElec;
@ApiModelProperty(value = "电站名称")
@ExcelIgnore
String name;
@ApiModelProperty(value = "电站id")
@ExcelIgnore
Integer stationId;
}

View File

@ -0,0 +1,75 @@
package com.ho.business.vo.resp.pcsStation;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.alibaba.excel.annotation.ExcelIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
/**
* 波兰语
*/
@Data
public class EarningsCalculateDataPl {
@ApiModelProperty(value = "日期/名称")
@Excel(name = "Data/Nazwa")
String date;
@ApiModelProperty(value = "充电量-尖(kWh)")
@Excel(name = "Poładowanie-koniec(kWh)")
BigDecimal chargeTip;
@ApiModelProperty(value = "充电量-峰(kWh)")
@Excel(name = "Poładowanie-szczyt(kWh)")
BigDecimal chargePeak;
@ApiModelProperty(value = "充电量-平(kWh)")
@Excel(name = "Poładowanie-stałe(kWh)")
BigDecimal chargeFlat;
@ApiModelProperty(value = "充电量-谷(kWh)")
@Excel(name = "Poładowanie-dolina(kWh)")
BigDecimal chargeValley;
@ApiModelProperty(value = "充电量-深谷(kWh)")
@Excel(name = "Poładowanie-Deep Valley(kWh)")
BigDecimal chargeDeepValley;
@ApiModelProperty(value = "充电量-总(kWh)")
@Excel(name = "Poładowanie-Całkowita(kWh)")
BigDecimal chargeElec;
@ApiModelProperty(value = "放电量-尖(kWh)")
@Excel(name = "Wyładowanie-koniec(kWh)")
BigDecimal dischargeTip;
@ApiModelProperty(value = "放电量-峰(kWh)")
@Excel(name = "Wyładowanie-szczyt(kWh)")
BigDecimal dischargePeak;
@ApiModelProperty(value = "放电量-平(kWh)")
@Excel(name = "Wyładowanie-stałe(kWh)")
BigDecimal dischargeFlat;
@ApiModelProperty(value = "放电量-谷(kWh)")
@Excel(name = "Wyładowanie-dolina(kWh)")
BigDecimal dischargeValley;
@ApiModelProperty(value = "放电量-深谷(kWh)")
@Excel(name = "Wyładowanie-Deep Valley(kWh)")
BigDecimal dischargeDeepValley;
@ApiModelProperty(value = "放电量-总(kWh)")
@Excel(name = "Wyładowanie-Całkowita(kWh)")
BigDecimal dischargeElec;
@ApiModelProperty(value = "电站名称")
@ExcelIgnore
String name;
@ApiModelProperty(value = "电站id")
@ExcelIgnore
Integer stationId;
}

View File

@ -0,0 +1,75 @@
package com.ho.business.vo.resp.pcsStation;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.alibaba.excel.annotation.ExcelIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
/**
* 西班牙语
*/
@Data
public class EarningsCalculateDataSpa {
@ApiModelProperty(value = "日期/名称")
@Excel(name = "Fecha/Nombre")
String date;
@ApiModelProperty(value = "充电量-尖(kWh)")
@Excel(name = "Capacidad de carga-Punta (kwh)")
BigDecimal chargeTip;
@ApiModelProperty(value = "充电量-峰(kWh)")
@Excel(name = "Capacidad de carga-pico (kwh)")
BigDecimal chargePeak;
@ApiModelProperty(value = "充电量-平(kWh)")
@Excel(name = "Capacidad de carga-plana (kwh)")
BigDecimal chargeFlat;
@ApiModelProperty(value = "充电量-谷(kWh)")
@Excel(name = "Capacidad de carga-Valle (kwh)")
BigDecimal chargeValley;
@ApiModelProperty(value = "充电量-深谷(kWh)")
@Excel(name = "Capacidad de carga-Valle profundo (kwh)")
BigDecimal chargeDeepValley;
@ApiModelProperty(value = "充电量-总(kWh)")
@Excel(name = "Capacidad de carga-total (kwh)")
BigDecimal chargeElec;
@ApiModelProperty(value = "放电量-尖(kWh)")
@Excel(name = "Descarga-Punta (kwh)")
BigDecimal dischargeTip;
@ApiModelProperty(value = "放电量-峰(kWh)")
@Excel(name = "Descarga-pico (kwh)")
BigDecimal dischargePeak;
@ApiModelProperty(value = "放电量-平(kWh)")
@Excel(name = "Descarga-plano (kwh)")
BigDecimal dischargeFlat;
@ApiModelProperty(value = "放电量-谷(kWh)")
@Excel(name = "Descarga-Valle (kwh)")
BigDecimal dischargeValley;
@ApiModelProperty(value = "放电量-深谷(kWh)")
@Excel(name = "Descarga-Valle profundo (kwh)")
BigDecimal dischargeDeepValley;
@ApiModelProperty(value = "放电量-总(kWh)")
@Excel(name = "Descarga-total (kwh)")
BigDecimal dischargeElec;
@ApiModelProperty(value = "电站名称")
@ExcelIgnore
String name;
@ApiModelProperty(value = "电站id")
@ExcelIgnore
Integer stationId;
}

View File

@ -0,0 +1,42 @@
package com.ho.business.vo.resp.pcsStation;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.alibaba.excel.annotation.ExcelIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
/**
* 阿拉伯语
*/
@Data
public class PcsElecDataAra {
@ApiModelProperty(value = "日期")
@Excel(name = "اسم/تاريخ")
String date;
@ApiModelProperty(value = "充电量(kWh)")
@Excel(name = "(kWh)كمية الشحن")
BigDecimal chargeElec;
@ApiModelProperty(value = "纵坐标 光伏充电量")
BigDecimal PvChargeElec;
@ApiModelProperty(value = "放电量(kWh)")
@Excel(name = "التفريغ الكهربائي(kWh)")
BigDecimal dischargeElec;
@ApiModelProperty(value = "纵坐标 收益")
@ExcelIgnore
BigDecimal income;
@ApiModelProperty(value = "电站名称")
@ExcelIgnore
String name;
@ApiModelProperty(value = "电站id")
@ExcelIgnore
Integer stationId;
}

View File

@ -0,0 +1,42 @@
package com.ho.business.vo.resp.pcsStation;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.alibaba.excel.annotation.ExcelIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
/**
* 德语
*/
@Data
public class PcsElecDataDe {
@ApiModelProperty(value = "日期")
@Excel(name = "Datum/Name")
String date;
@ApiModelProperty(value = "充电量(kWh)")
@Excel(name = "Ladefähigkeit (kWh)")
BigDecimal chargeElec;
@ApiModelProperty(value = "纵坐标 光伏充电量")
BigDecimal PvChargeElec;
@ApiModelProperty(value = "放电量(kWh)")
@Excel(name = "Entladung (kWh)")
BigDecimal dischargeElec;
@ApiModelProperty(value = "纵坐标 收益")
@ExcelIgnore
BigDecimal income;
@ApiModelProperty(value = "电站名称")
@ExcelIgnore
String name;
@ApiModelProperty(value = "电站id")
@ExcelIgnore
Integer stationId;
}

View File

@ -8,19 +8,17 @@ import lombok.Data;
import java.math.BigDecimal;
/**
* @Description 上海一体柜首页 充放电量出参
* Author yule
* Date 2023/4/17 11:17
* 英语
*/
@Data
public class PcsElecDataEn {
@ApiModelProperty(value = "日期")
@Excel(name = "date/name")
@Excel(name = "Date/Name")
String date;
@ApiModelProperty(value = "充电量(kWh)")
@Excel(name = "Charge-Total(kWh)")
@Excel(name = "Charging capacity(kWh)")
BigDecimal chargeElec;
@ApiModelProperty(value = "纵坐标 光伏充电量")
@ -28,7 +26,7 @@ public class PcsElecDataEn {
@ApiModelProperty(value = "放电量(kWh)")
@Excel(name = "Discharge-Total(kWh)")
@Excel(name = "Discharge capacity(kWh)")
BigDecimal dischargeElec;
@ApiModelProperty(value = "纵坐标 收益")

View File

@ -0,0 +1,43 @@
package com.ho.business.vo.resp.pcsStation;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.alibaba.excel.annotation.ExcelIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
/**
* 法语
*/
@Data
public class PcsElecDataFra {
@ApiModelProperty(value = "日期")
@Excel(name = "Date/Nom")
String date;
@ApiModelProperty(value = "充电量(kWh)")
@Excel(name = "Quantité de charge(kWh)")
BigDecimal chargeElec;
@ApiModelProperty(value = "纵坐标 光伏充电量")
BigDecimal PvChargeElec;
@ApiModelProperty(value = "放电量(kWh)")
@Excel(name = "Quantité de décharge(kWh)")
BigDecimal dischargeElec;
@ApiModelProperty(value = "纵坐标 收益")
@ExcelIgnore
BigDecimal income;
@ApiModelProperty(value = "电站名称")
@ExcelIgnore
String name;
@ApiModelProperty(value = "电站id")
@ExcelIgnore
Integer stationId;
}

View File

@ -0,0 +1,43 @@
package com.ho.business.vo.resp.pcsStation;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.alibaba.excel.annotation.ExcelIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
/**
* 波兰语
*/
@Data
public class PcsElecDataPl {
@ApiModelProperty(value = "日期")
@Excel(name = "Data/Nazwa")
String date;
@ApiModelProperty(value = "充电量(kWh)")
@Excel(name = "Pojemność ładowania (kWh)")
BigDecimal chargeElec;
@ApiModelProperty(value = "纵坐标 光伏充电量")
BigDecimal PvChargeElec;
@ApiModelProperty(value = "放电量(kWh)")
@Excel(name = "Wyładowanie (kWh)")
BigDecimal dischargeElec;
@ApiModelProperty(value = "纵坐标 收益")
@ExcelIgnore
BigDecimal income;
@ApiModelProperty(value = "电站名称")
@ExcelIgnore
String name;
@ApiModelProperty(value = "电站id")
@ExcelIgnore
Integer stationId;
}

View File

@ -0,0 +1,43 @@
package com.ho.business.vo.resp.pcsStation;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.alibaba.excel.annotation.ExcelIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
/**
* 西班牙语
*/
@Data
public class PcsElecDataSpa {
@ApiModelProperty(value = "日期")
@Excel(name = "Fecha/Nombre")
String date;
@ApiModelProperty(value = "充电量(kWh)")
@Excel(name = "Capacidad de carga (kwh)")
BigDecimal chargeElec;
@ApiModelProperty(value = "纵坐标 光伏充电量")
BigDecimal PvChargeElec;
@ApiModelProperty(value = "放电量(kWh)")
@Excel(name = "Descarga de energía (kwh)")
BigDecimal dischargeElec;
@ApiModelProperty(value = "纵坐标 收益")
@ExcelIgnore
BigDecimal income;
@ApiModelProperty(value = "电站名称")
@ExcelIgnore
String name;
@ApiModelProperty(value = "电站id")
@ExcelIgnore
Integer stationId;
}

View File

@ -43,4 +43,18 @@ public class PcsTotalData {
@ApiModelProperty(value = "额定容量")
BigDecimal rateCapacity;
//2025-11-13 储能加入mppt模块开发
@ApiModelProperty(value = "当前功率(mppt)")
BigDecimal pvCurrentPower;
@ApiModelProperty(value = "日发电量(mppt)")
BigDecimal dailyReleaseElec;
@ApiModelProperty(value = "日收益(mppt)")
BigDecimal todayIncone;
@ApiModelProperty(value = "总发电量(mppt)")
BigDecimal totalReleaseElec;
@ApiModelProperty(value = "总收益(mppt)")
BigDecimal totalIncome;
@ApiModelProperty(value = "额定功率(mppt)")
BigDecimal pvPower;
}

View File

@ -0,0 +1,72 @@
package com.ho.business.vo.resp.point;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ho.common.tools.constant.CommonConstant;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
/**
* @author kerwin 阿拉伯语
*/
@Data
@ExcelIgnoreUnannotated
public class PointRespAraVO {
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "设备映射表的id")
Integer deviceTypeColId;
@ApiModelProperty(value = "站点id")
Integer stationId;
@ApiModelProperty(value = "设备id")
Integer srcId;
@ApiModelProperty(value = "设备类型")
@ExcelProperty(value = "نوع الجهاز",index = 3)
String deviceType;
@ApiModelProperty(value = "1遥信 2遥测 3遥控")
private Integer sensType;
@ApiModelProperty(value = "设备名")
@ExcelProperty(value = "اسم الجهاز",index = 2)
String deviceName;
@ApiModelProperty(value = "点表字段")
@ExcelProperty(value = "حقل نقطة الجدول",index = 1)
String col;
@ApiModelProperty(value = "点表字段名称")
@ExcelProperty(value = "نقطة الجدول اسم الحقل",index = 0)
String colName;
@ApiModelProperty(value = "当前值")
@ExcelProperty(value = "القيمة الحالية",index = 7)
BigDecimal value;
@ApiModelProperty(value = "单位")
@ExcelProperty(value = "وحدة",index = 8)
String unit;
@ApiModelProperty(value = "最大值")
@ExcelProperty(value = "القيمة القصوى",index = 4)
BigDecimal maxValue;
@ApiModelProperty(value = "最小值")
@ExcelProperty(value = "قيمة الحد الأدنى",index = 5)
BigDecimal minValue;
@ApiModelProperty(value = "更新时间")
@JsonFormat(pattern = CommonConstant.DATE)
@ExcelProperty(value = "وقت التحديث",index = 6)
String updateTime;
@ApiModelProperty(value = "是否具有品质位 1是 2否")
private Integer qualityLevel;
}

View File

@ -0,0 +1,72 @@
package com.ho.business.vo.resp.point;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ho.common.tools.constant.CommonConstant;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
/**
* @author kerwin 德语
*/
@Data
@ExcelIgnoreUnannotated
public class PointRespDeVO {
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "设备映射表的id")
Integer deviceTypeColId;
@ApiModelProperty(value = "站点id")
Integer stationId;
@ApiModelProperty(value = "设备id")
Integer srcId;
@ApiModelProperty(value = "设备类型")
@ExcelProperty(value = "Gerätetyp",index = 3)
String deviceType;
@ApiModelProperty(value = "1遥信 2遥测 3遥控")
private Integer sensType;
@ApiModelProperty(value = "设备名")
@ExcelProperty(value = "Gerätenamen",index = 2)
String deviceName;
@ApiModelProperty(value = "点表字段")
@ExcelProperty(value = "Punkttabellenfeld",index = 1)
String col;
@ApiModelProperty(value = "点表字段名称")
@ExcelProperty(value = "Name des Punkttabellenfeldes",index = 0)
String colName;
@ApiModelProperty(value = "当前值")
@ExcelProperty(value = "Aktueller Wert",index = 7)
BigDecimal value;
@ApiModelProperty(value = "单位")
@ExcelProperty(value = "Einheit",index = 8)
String unit;
@ApiModelProperty(value = "最大值")
@ExcelProperty(value = "Maximalwert",index = 4)
BigDecimal maxValue;
@ApiModelProperty(value = "最小值")
@ExcelProperty(value = "Mindestwert",index = 5)
BigDecimal minValue;
@ApiModelProperty(value = "更新时间")
@JsonFormat(pattern = CommonConstant.DATE)
@ExcelProperty(value = "Aktualisierungszeit",index = 6)
String updateTime;
@ApiModelProperty(value = "是否具有品质位 1是 2否")
private Integer qualityLevel;
}

View File

@ -0,0 +1,74 @@
package com.ho.business.vo.resp.point;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ho.common.tools.constant.CommonConstant;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
/**
* @author kerwin 英语
*/
@Data
@ExcelIgnoreUnannotated
public class PointRespEnVO {
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "设备映射表的id")
Integer deviceTypeColId;
@ApiModelProperty(value = "站点id")
Integer stationId;
@ApiModelProperty(value = "设备id")
Integer srcId;
@ApiModelProperty(value = "设备类型")
@ExcelProperty(value = "Device type",index = 3)
String deviceType;
@ApiModelProperty(value = "1遥信 2遥测 3遥控")
private Integer sensType;
@ApiModelProperty(value = "设备名")
@ExcelProperty(value = "Associated device",index = 2)
String deviceName;
@ApiModelProperty(value = "点表字段")
@ExcelProperty(value = "Code",index = 1)
String col;
@ApiModelProperty(value = "点表字段名称")
@ExcelProperty(value = "Name",index = 0)
String colName;
@ApiModelProperty(value = "当前值")
@ExcelProperty(value = "Current value",index = 7)
BigDecimal value;
@ApiModelProperty(value = "单位")
@ExcelProperty(value = "Unit",index = 8)
String unit;
@ApiModelProperty(value = "最大值")
@ExcelProperty(value = "Maximum",index = 4)
BigDecimal maxValue;
@ApiModelProperty(value = "最小值")
@ExcelProperty(value = "Minimum",index = 5)
BigDecimal minValue;
@ApiModelProperty(value = "更新时间")
@JsonFormat(pattern = CommonConstant.DATE)
@ExcelProperty(value = "Update time",index = 6)
String updateTime;
@ApiModelProperty(value = "是否具有品质位 1是 2否")
private Integer qualityLevel;
}

View File

@ -0,0 +1,72 @@
package com.ho.business.vo.resp.point;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ho.common.tools.constant.CommonConstant;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
/**
* @author kerwin 法语
*/
@Data
@ExcelIgnoreUnannotated
public class PointRespFraVO {
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "设备映射表的id")
Integer deviceTypeColId;
@ApiModelProperty(value = "站点id")
Integer stationId;
@ApiModelProperty(value = "设备id")
Integer srcId;
@ApiModelProperty(value = "设备类型")
@ExcelProperty(value = "Type d'équipement",index = 3)
String deviceType;
@ApiModelProperty(value = "1遥信 2遥测 3遥控")
private Integer sensType;
@ApiModelProperty(value = "设备名")
@ExcelProperty(value = "Nom de l'équipement",index = 2)
String deviceName;
@ApiModelProperty(value = "点表字段")
@ExcelProperty(value = "Champ table de points",index = 1)
String col;
@ApiModelProperty(value = "点表字段名称")
@ExcelProperty(value = "Nom du champ table de points",index = 0)
String colName;
@ApiModelProperty(value = "当前值")
@ExcelProperty(value = "Valeur actuelle",index = 7)
BigDecimal value;
@ApiModelProperty(value = "单位")
@ExcelProperty(value = "Unité",index = 8)
String unit;
@ApiModelProperty(value = "最大值")
@ExcelProperty(value = "Valeur maximale",index = 4)
BigDecimal maxValue;
@ApiModelProperty(value = "最小值")
@ExcelProperty(value = "Valeur minimale",index = 5)
BigDecimal minValue;
@ApiModelProperty(value = "更新时间")
@JsonFormat(pattern = CommonConstant.DATE)
@ExcelProperty(value = "Temps de mise à jour",index = 6)
String updateTime;
@ApiModelProperty(value = "是否具有品质位 1是 2否")
private Integer qualityLevel;
}

View File

@ -0,0 +1,73 @@
package com.ho.business.vo.resp.point;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ho.common.tools.constant.CommonConstant;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
/**
* @author kerwin 波兰语
*/
@Data
@ExcelIgnoreUnannotated
public class PointRespPlVO {
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "设备映射表的id")
Integer deviceTypeColId;
@ApiModelProperty(value = "站点id")
Integer stationId;
@ApiModelProperty(value = "设备id")
Integer srcId;
@ApiModelProperty(value = "设备类型")
@ExcelProperty(value = "Rodzaj urządzenia",index = 3)
String deviceType;
@ApiModelProperty(value = "1遥信 2遥测 3遥控")
private Integer sensType;
@ApiModelProperty(value = "设备名")
@ExcelProperty(value = "Nazwa urządzenia",index = 2)
String deviceName;
@ApiModelProperty(value = "点表字段")
@ExcelProperty(value = "Pole tabeli punktów",index = 1)
String col;
@ApiModelProperty(value = "点表字段名称")
@ExcelProperty(value = "Nazwa pola tabeli punktów",index = 0)
String colName;
@ApiModelProperty(value = "当前值")
@ExcelProperty(value = "Bieżąca wartość",index = 7)
BigDecimal value;
@ApiModelProperty(value = "单位")
@ExcelProperty(value = "Jednostki",index = 8)
String unit;
@ApiModelProperty(value = "最大值")
@ExcelProperty(value = "Maksymalna wartość",index = 4)
BigDecimal maxValue;
@ApiModelProperty(value = "最小值")
@ExcelProperty(value = "Wartość minimalna",index = 5)
BigDecimal minValue;
@ApiModelProperty(value = "更新时间")
@JsonFormat(pattern = CommonConstant.DATE)
@ExcelProperty(value = "Czas aktualizacji",index = 6)
String updateTime;
@ApiModelProperty(value = "是否具有品质位 1是 2否")
private Integer qualityLevel;
}

View File

@ -0,0 +1,72 @@
package com.ho.business.vo.resp.point;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ho.common.tools.constant.CommonConstant;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
/**
* @author kerwin 西班牙语
*/
@Data
@ExcelIgnoreUnannotated
public class PointRespSpaVO {
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "设备映射表的id")
Integer deviceTypeColId;
@ApiModelProperty(value = "站点id")
Integer stationId;
@ApiModelProperty(value = "设备id")
Integer srcId;
@ApiModelProperty(value = "设备类型")
@ExcelProperty(value = "Tipo de dispositivo",index = 3)
String deviceType;
@ApiModelProperty(value = "1遥信 2遥测 3遥控")
private Integer sensType;
@ApiModelProperty(value = "设备名")
@ExcelProperty(value = "Nombre del dispositivo",index = 2)
String deviceName;
@ApiModelProperty(value = "点表字段")
@ExcelProperty(value = "Campos de la tabla de puntos",index = 1)
String col;
@ApiModelProperty(value = "点表字段名称")
@ExcelProperty(value = "Nombre del campo de la tabla de puntos",index = 0)
String colName;
@ApiModelProperty(value = "当前值")
@ExcelProperty(value = "Valor actual",index = 7)
BigDecimal value;
@ApiModelProperty(value = "单位")
@ExcelProperty(value = "Unidad",index = 8)
String unit;
@ApiModelProperty(value = "最大值")
@ExcelProperty(value = "Valor máximo",index = 4)
BigDecimal maxValue;
@ApiModelProperty(value = "最小值")
@ExcelProperty(value = "Valor mínimo",index = 5)
BigDecimal minValue;
@ApiModelProperty(value = "更新时间")
@JsonFormat(pattern = CommonConstant.DATE)
@ExcelProperty(value = "Tiempo de actualización",index = 6)
String updateTime;
@ApiModelProperty(value = "是否具有品质位 1是 2否")
private Integer qualityLevel;
}

View File

@ -99,6 +99,9 @@ public interface TdFeignClient {
@PostMapping(value = ContextConstant.TD_CONTEXT + "device001/getToDayPVCharge")
DataResult<StationHomeRespVo> getToDayPVCharge(TdBaseTimeQuery tdBaseTimeQuery);
@PostMapping(value = ContextConstant.TD_CONTEXT + "device001/getToDayPVMpptCharge")
DataResult<StationHomeRespVo> getToDayPVMpptCharge(TdBaseTimeQuery tdBaseTimeQuery);
//查询遥信值五遥
@PostMapping(value = ContextConstant.TD_CONTEXT + "device001/querySignal")
DataResult<List<PointCurveResp>> querySignal(@RequestBody TdBaseTimeQuery tdBaseTimeQuery);

View File

@ -168,6 +168,12 @@ public class TdFeignClientFallback implements TdFeignClient{
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
}
@Override
public DataResult<StationHomeRespVo> getToDayPVMpptCharge(TdBaseTimeQuery tdBaseTimeQuery) {
log.error("调用 [TdClient.getToDayPVCharge] 异常!");
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
}
@Override
public DataResult modifyHistoryData(TdBaseTimeQuery tdBaseTimeQuery) {
log.error("调用 [TdClient.modifyHistoryData] 异常!");

View File

@ -54,7 +54,7 @@ public interface DeviceMapper {
* @param needAccessPoint 是否需要接入点,不为空表示需要
* @return
*/
List<DeviceRespVO> selectByIdAndSrcIdNotZero(Integer stationId,Integer needHide,Integer needAccessPoint);
List<DeviceRespVO> selectByIdAndSrcIdNotZero(Integer stationId,Integer needHide,Integer needAccessPoint,String lang);
int insertBatch(@Param("list")List<Device> deviceList);

View File

@ -32,7 +32,7 @@ public interface DeviceTypeColMapper {
int updateList(@Param("deviceTypeColList")List<DeviceTypeCol> deviceTypeColList);
//deviceType查询
List<DeviceTypeCol> selectByDeviceType(String deviceType);
List<DeviceTypeCol> selectByDeviceType(@Param("deviceType")String deviceType,@Param("lang") String lang);
List<DeviceTypeCol> selectByParam(@Param("deviceTypeCol") DeviceTypeCol deviceTypeCol);
@ -53,7 +53,7 @@ public interface DeviceTypeColMapper {
List<ModelDeviceColComp> getCompListByType(@Param("type") String type, @Param("typeName") String typeName, @Param("modelCol") String modelCol);
List<DeviceTypeCol> selectSameCol(@Param("deviceType") String deviceType, @Param("list") List<String> collect);
List<DeviceTypeCol> selectSameCol(@Param("deviceType") String deviceType, @Param("list") List<String> collect,@Param("lang") String lang);
//批量新增设备表字段
void addBatchDevice(@Param("list") List<DeviceTypeCol> deviceTypeColList);
@ -65,7 +65,7 @@ public interface DeviceTypeColMapper {
void deleteBatchModel(List<Integer> ids);
DeviceTypeCol selectTypeAndCol(String col, String deviceType);
DeviceTypeCol selectTypeAndCol(String col, String deviceType,String lang);
Integer selectCountByDeviceType(@Param("deviceTypeCol")DeviceTypeCol deviceTypeCol);

View File

@ -48,7 +48,7 @@ public interface EarningsCalculateMapper {
*/
List<EarningsCalculate> totalListByDay(@Param("ec") EarningsCalculateReq earningsCalculateReq);
public List<EarningsCalculateSub> queryElecTemplateSubByStationId(@Param("stationId")Integer stationId, @Param("templateType")Integer templateType,@Param("date")String date);
public List<EarningsCalculateSub> queryElecTemplateSubByStationId(@Param("stationId")Integer stationId, @Param("templateType")Integer templateType,@Param("date")String date,@Param("elecType")Integer elecType);
public List<EarningsCalculateSub> queryElecRateTemplateSubByStationId(@Param("stationId")Integer stationId, @Param("templateType")Integer templateType,@Param("date")String date);

View File

@ -0,0 +1,30 @@
package com.ho.business.mapper;
import com.ho.business.entity.EarningsCalculate;
import com.ho.business.entity.EarningsCalculateMppt;
import com.ho.business.vo.req.bigScreen.CommonBigScreenReq;
import com.ho.business.vo.resp.InverterResp.PowerGenerateRespVO;
import com.ho.business.vo.resp.profit.DayProfitType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.math.BigDecimal;
import java.util.List;
@Mapper
public interface EarningsCalculateMpptMapper {
int deleteByDay(@Param("day") String day, @Param("typeList") List<Integer> typeList);
int insertBatch(List<EarningsCalculateMppt> list);
List<PowerGenerateRespVO> countPvIncome(@Param("stationId") Integer stationId, @Param("beginTime")String beginTime, @Param("endTime")String endTime);
BigDecimal countAllPvIncome(@Param("stationId")Integer stationId,@Param("beginTime")String beginTime, @Param("endTime")String endTime);
List<DayProfitType> getProfit(@Param("beginTime")String begin, @Param("endTime")String end, @Param("groupId")Integer groupId);
String getFirstTime();
List<DayProfitType> getEarningsByParam(CommonBigScreenReq req);
}

View File

@ -4,6 +4,7 @@ package com.ho.business.mapper;
import com.ho.business.entity.ElecMeterValue;
import com.ho.business.vo.req.bigScreen.CommonBigScreenReq;
import com.ho.business.vo.req.carbin.ElecMeterReq;
import com.ho.business.vo.resp.profit.DayProfitType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -54,4 +55,7 @@ public interface ElecMeterValueMapper {
List<ElecMeterValue> selectAllList(@Param("stationId") Integer stationId, @Param("typeList") List<Integer> typeList, @Param("beginTime") String beginTime, @Param("endTime") String endTime,
@Param("deviceTypeList") List<Integer> deviceTypeList);
List<DayProfitType> getElec(@Param("beginTime") String beginTime,@Param("endTime")String endTime,
@Param("groupId") Integer groupId, @Param("type")Integer type,List<Integer> stationIds);
}

View File

@ -33,7 +33,7 @@ public interface PlanningCurveIssueMapper {
void addPlanningCurveHistory(@Param("condition") List<PlanningCurveHistory> PlanningCurveHistory);
List<PlanCurveOperationRecordReq> getPlanCurveOperationList(@Param("stationId") String stationId);
List<PlanCurveOperationRecordReq> getPlanCurveOperationList(@Param("stationId") String stationId,@Param("lang") String lang);
List<PlanningCurveHistory> getPlanningCurveHistory(@Param("planningCurveId") String planningCurveId);

View File

@ -62,5 +62,4 @@ public interface PointConfigMapper {
* @return
*/
int updateList(List<PointConfig> list);
}

View File

@ -38,7 +38,7 @@ public interface PointPolysemyConfigMapper {
* @param ids
* @return
*/
List<PointPolysemyConfig> selectByPointIds(@Param("ids") List<Integer> ids);
List<PointPolysemyConfig> selectByPointIds(@Param("ids") List<Integer> ids,@Param("lang") String lang);
/**
* 根据id删除配置信息

View File

@ -36,7 +36,7 @@ public interface StationMapper {
List<Station> selectByDimName(String name,Integer groupId);
List<Station> selectByIds(List<Integer> ids);
List<Station> selectByIds(List<Integer> ids,String lang);
Station selectByNameAndId(@Param("name") String name, @Param("id") Integer id, @Param("deptId") Integer deptId);

View File

@ -0,0 +1,21 @@
package com.ho.business.mapper;
import com.ho.business.entity.StationRemoteControl;
import com.ho.business.vo.req.StationRemoteControlPageVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface StationRemoteControlMapper {
void insert(@Param("entity") StationRemoteControl entity);
void update(@Param("entity") StationRemoteControl entity);
void delete(@Param("id") Integer id);
StationRemoteControl search(@Param("stationId") Integer stationId);
List<StationRemoteControl> selectList(@Param("vo") StationRemoteControlPageVo vo);
}

View File

@ -0,0 +1,28 @@
package com.ho.business.mapper;
import com.ho.business.entity.TranslateName;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author xwz
* @description 针对表【Dict_Province】的数据库操作Mapper
* @createDate 2024-12-18
*/
@Mapper
public interface TranslateNameMapper {
List<TranslateName> getDictNation();
TranslateName selectNameLang(@Param("name")String name);
int insert(@Param("vo")TranslateName vo);
int updateById(@Param("vo") TranslateName vo);
}

View File

@ -1,21 +0,0 @@
package com.ho.business.mapper;
import com.ho.business.entity.TranslateNation;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* @author xwz
* @description 针对表【Dict_Province】的数据库操作Mapper
* @createDate 2024-12-18
*/
@Mapper
public interface TranslateNationMapper {
List<TranslateNation> getDictNation();
}

View File

@ -89,11 +89,14 @@ public interface DeviceService {
//根据电站id和srcId查询
Device selectByStationIdAndSrcId(Integer stationId, Integer srcId);
Device selectByStationIdAndSrcIdAndLng(Integer stationId, Integer srcId,String lang);
List<DeviceRespVO> selectByGroup(Integer groupId);
List<String> selectDistinctDeviceTypeByStationId(Integer stationId);
List<DeviceRespVO> getDeviceByStationId(Integer stationId);
List<DeviceRespVO> getDeviceByStationId(Integer stationId,String lang);
List<DeviceRespVO> getDeviceByStationIds(List<Integer> stationIds);
@ -138,7 +141,7 @@ public interface DeviceService {
* @param stationId
* @return
*/
List<DeviceRespVO> selectByIdAndSrcIdNotZero(Integer stationId);
List<DeviceRespVO> selectByIdAndSrcIdNotZero(Integer stationId,String lang);
/**
* 查询设备需要设备接入点
@ -146,7 +149,7 @@ public interface DeviceService {
* @param stationId
* @return
*/
List<DeviceRespVO> selectDeviceByStationId(Integer stationId);
List<DeviceRespVO> selectDeviceByStationId(Integer stationId,String lang);
/**
* 查询所有设备,不包含接入点
@ -154,7 +157,7 @@ public interface DeviceService {
* @param stationId
* @return
*/
List<DeviceRespVO> selectAllDeviceAndSrcIdNotZero(Integer stationId);
List<DeviceRespVO> selectAllDeviceAndSrcIdNotZero(Integer stationId,String lang);
/**
* 获取单个设备电压电流正太分布数据

View File

@ -19,14 +19,14 @@ public interface DeviceTypeColService {
int insertList(List<DeviceTypeColImportVO> list,Integer GroupId);
List<DeviceTypeCol> selectByDeviceType(String deviceType);
List<DeviceTypeCol> selectByDeviceType(String deviceType,String lang);
DeviceTypeCol selectById(Integer id);
DeviceTypeCol selectTypeAndCol(String col, String deviceType);
DeviceTypeCol selectTypeAndCol(String col, String deviceType,String lang);
List<DeviceTypeCol> selectDeviceTypeColList(String deviceType,List<String> collect);
List<DeviceTypeCol> selectDeviceTypeColList(String deviceType,List<String> collect,String lang);
Integer selectCountByDeviceType(DeviceTypeCol deviceTypeCol);

View File

@ -2,6 +2,7 @@ package com.ho.business.service;
import com.ho.business.entity.DynamicConfig;
import com.ho.business.entity.DynamicConfigTitle;
import com.ho.business.entity.TranslateName;
import com.ho.business.vo.req.dynamicConfig.*;
import com.ho.business.vo.resp.DeviceRespVO;
import com.ho.business.vo.resp.dynamicConfig.CurveConfigQueryResp;
@ -119,4 +120,20 @@ public interface DynamicConfigService {
* @return
*/
int delDynamicConfigTitle(DynamicConfigTitle vo);
/**
* 已知 name 参数是中文
* @param name 中文名称
* @return 返回得到中文翻译的结果(翻译结果为:英语、法语、西班牙语、德语、波兰语、阿拉伯语)
*/
TranslateName getNameLanguage(String name);
/**
* 已知 name 参数是中文 根据lang参数 得到翻译的结果
* @param name 中文名称
* @param lang 翻译语种(英语、法语、西班牙语、德语、波兰语、阿拉伯语)
* @return 返回的翻译语音结果
*/
String getNameByLang(String name,String lang);
}

View File

@ -0,0 +1,34 @@
package com.ho.business.service;
import com.ho.business.entity.Station;
import com.ho.business.vo.req.bigScreen.CommonBigScreenReq;
import com.ho.business.vo.resp.InverterResp.PowerGenerateRespVO;
import com.ho.business.vo.resp.profit.DayProfitType;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* @Description Mppt 尖峰平谷电量收益计算
* @Author zjl
* @Date 2025/11/19
*/
public interface EarningsCalculateMpptService {
int deleteByDay(String transDayStr, List<Integer> typeList);
public void allMpptIncome(List<Station> stations, String beginTime);
void todayMpptIncome(List<Station> stations, String beginTime);
List<PowerGenerateRespVO> countPvIncome(Integer stationId, String beginTime, String endTime);
BigDecimal countAllPvIncome(Integer id,String beginTime, String endTime);
List<DayProfitType> getProfit(String begin, String end, Integer groupId);
Date getFirstTime();
List<DayProfitType> getEarningsByParam(CommonBigScreenReq req);
}

View File

@ -7,6 +7,7 @@ import com.ho.business.vo.req.bigScreen.CommonBigScreenReq;
import com.ho.business.vo.req.carbin.EarningsCalculateReq;
import com.ho.business.vo.req.pcsStation.PcsStationReq;
import com.ho.business.vo.req.report.ReportReqVO;
import com.ho.business.vo.resp.InverterResp.PowerGenerateRespVO;
import com.ho.business.vo.resp.cabin.EarningsCalculateCountResp;
import com.ho.business.vo.resp.cabin.EarningsCalculateResp;
import com.ho.business.vo.resp.income.RevenueOverview;
@ -137,4 +138,5 @@ public interface EarningsCalculateService {
List<DayProfitType> getEarningsByParam(CommonBigScreenReq req);
List<PowerGenerateRespVO> getPvMonthData(EarningsCalculateReq req);
}

View File

@ -3,6 +3,7 @@ package com.ho.business.service;
import com.ho.business.entity.ElecMeterValue;
import com.ho.business.vo.req.bigScreen.CommonBigScreenReq;
import com.ho.business.vo.req.carbin.ElecMeterReq;
import com.ho.business.vo.resp.profit.DayProfitType;
import java.math.BigDecimal;
import java.util.List;
@ -50,4 +51,6 @@ public interface ElecMeterValueService {
* @return
*/
List<ElecMeterValue> selectGroupByDay(CommonBigScreenReq req);
List<DayProfitType> getElec(String begin, String end, Integer groupId, Integer type,List<Integer> stationIds);
}

View File

@ -90,27 +90,27 @@ public interface IargeScreenShowService {
* 查询收益按电站分组
* @return
*/
List<Subdata> getCommonProfit(String beginString, String endString,List<Integer> stationIds);
List<Subdata> getCommonProfit(String beginString, String endString,List<Integer> stationIds,String lang);
/**
* 通用系统转换率
* @param stationIds
* @return
*/
List<Subdata> getCommonEfficiencyDate(List<Integer> stationIds);
List<Subdata> getCommonEfficiencyDate(List<Integer> stationIds,String lang);
/**
* 获取统计电站信息
* @param stationIds
* @return
*/
List<Station> getCountStations(List<Integer> stationIds);
List<Station> getCountStations(List<Integer> stationIds,String lang);
/**
* 通用装机容量倒排
* @return
*/
List<Subdata> getCommonCapacity(List<Integer> stationIds);
List<Subdata> getCommonCapacity(List<Integer> stationIds,String lang);
/**
* 通用根据天获取告警数目曲线
@ -118,4 +118,18 @@ public interface IargeScreenShowService {
*/
List<EventDayNum> getCommonEventCount(SimpleUser user);
/**************************************************************/
List<Subdata> getCommonPvRegionList(List<Integer> byDeptId);
AnnualPvOverviewResp getPvOverviewData(List<Integer> stationIds);
EnergySavingRespVo getPvEnergySaving(List<Integer> stationIds);
List<AnnualChartValue> getPVCommonProfitCurve(CockpitReqVO vo,List<Integer> stationIds);
List<Subdata> getPvCommonProfit(String beginString, String endString,List<Integer> stationIds);
List<Subdata> getPvCommonElec(String beginString, String endString, List<Integer> stationIds);
List<AnnualChartValue> getCommonPvRelease(List<Integer> stationIds);
}

View File

@ -4,6 +4,7 @@ import com.ho.business.vo.req.StationReq;
import com.ho.business.vo.req.pcsStation.PcsStationReq;
import com.ho.business.vo.resp.DeviceRespVO;
import com.ho.business.vo.resp.cabin.CircleCtrlResp;
import com.ho.business.vo.resp.mppt.MpptActiveVo;
import com.ho.business.vo.resp.pcsStation.HomePageStationDataResp;
import com.ho.business.vo.resp.station.ActiveReactivePower;
import com.ho.common.tools.util.PageResult;
@ -24,6 +25,8 @@ public interface OpenStationService {
ActiveReactivePower getAcPower(Integer stationId);
MpptActiveVo getPvActivePower(Integer stationId);
//环控
List<CircleCtrlResp> getCircle(List<DeviceRespVO> deviceList );
@ -42,7 +45,7 @@ public interface OpenStationService {
* @param req
* @param response
*/
void exportEleData(PcsStationReq req, HttpServletResponse response);
void exportEleData(PcsStationReq req, HttpServletResponse response,String lang);
/**
* 查询日冻结数据

View File

@ -25,6 +25,8 @@ public interface OutApiService {
void dayPVCharge(MonitorQuery monitorQuery);
void dayPVMpptCharge(MonitorQuery monitorQuery);
//天小时的充放电量
void hourChargeDeal(MonitorQuery monitorQuery) throws ParseException;

View File

@ -28,7 +28,7 @@ public interface PlanningCurveIssueService {
public void planCurveOperationRecord(PlanCurveOperationRecordReq planCurveOperationRecordReq);
List<PlanCurveOperationRecordReq> getPlanCurveOperationList(String stationId);
List<PlanCurveOperationRecordReq> getPlanCurveOperationList(String stationId,String lang);
Map<String,Object> getPlanningCurveHistory(List<String> planningCurveIds);
}

View File

@ -8,6 +8,7 @@ import com.ho.business.vo.resp.AppRealTimeCurveRespVo;
import com.ho.business.vo.resp.CountEleData;
import com.ho.business.vo.resp.DeviceColData;
import com.ho.business.vo.resp.DeviceRespVO;
import com.ho.business.vo.resp.InverterResp.PowerGenerateRespVO;
import com.ho.business.vo.resp.cabin.TemperatureHumidityResp;
import com.ho.business.vo.resp.pcsStation.OutStationData;
import com.ho.business.vo.resp.pcsStation.PcsElecData;
@ -35,7 +36,7 @@ public interface StationHomeService {
* @param stationId 电站id
* @return
*/
PcsStationData getPcsStationData(Integer stationId);
PcsStationData getPcsStationData(Integer stationId,String lang);
/**
* 根据电站id查询数据总览
@ -72,6 +73,8 @@ public interface StationHomeService {
*/
List<AppRealTimeCurveRespVo> getOpticalStorageCurve(MonitorQuery monitorQuery);
List<AppRealTimeCurveRespVo> pvCurve(MonitorQuery monitorQuery);
List<TemperatureHumidityResp> getTemperatureHumidityCurve(MonitorQuery monitorQuery);
CountEleData getCountEleData(StationReq req);
@ -96,6 +99,6 @@ public interface StationHomeService {
*/
OutStationData getStationData(StationReq req);
List<PcsElecData> getPvChargeElec(PcsStationReq req);
List<PowerGenerateRespVO> getPvData(PcsStationReq req);
}

View File

@ -0,0 +1,17 @@
package com.ho.business.service;
import com.ho.business.entity.StationRemoteControl;
import com.ho.business.vo.req.StationRemoteControlPageVo;
import com.ho.common.tools.util.PageResult;
public interface StationRemoteControlService {
void insert(StationRemoteControl entity);
void update(StationRemoteControl entity);
void delete(Integer id);
StationRemoteControl search(Integer stationId);
PageResult<StationRemoteControl> selectPageList(StationRemoteControlPageVo vo);
}

View File

@ -25,9 +25,9 @@ public interface StationService {
Station selectById(Integer id);
List<StationRespVO> selectByIds(List<Integer> ids);
List<StationRespVO> selectByIds(List<Integer> ids,String lang);
List<Station> selectStationsByIds(List<Integer> ids);
List<Station> selectStationsByIds(List<Integer> ids,String lang);
Station insertStation(StationReqVO vo);

View File

@ -89,7 +89,7 @@ public class DeviceModelServiceImpl implements DeviceModelService {
List<String> addCollect = addColList.stream().map(DeviceCol::getCol)
.collect(Collectors.toList());
if (!addCollect.isEmpty()) {
List<DeviceTypeCol> deviceTypeCols = deviceTypeColMapper.selectSameCol(vo.getDeviceType(), addCollect);
List<DeviceTypeCol> deviceTypeCols = deviceTypeColMapper.selectSameCol(vo.getDeviceType(), addCollect,null);
if (!deviceTypeCols.isEmpty()) {
throw new BusinessException(BaseResponseCode.THE_SAME_DATA_EXISTS_DATABASE_PLEASE_CHECK);
}
@ -158,7 +158,7 @@ public class DeviceModelServiceImpl implements DeviceModelService {
@Override
public void addDeviceTypeCol(DeviceTypeColAddReq vo) {
DeviceTypeCol deviceCol = deviceTypeColMapper.selectTypeAndCol(vo.getCol(), vo.getDeviceType());
DeviceTypeCol deviceCol = deviceTypeColMapper.selectTypeAndCol(vo.getCol(), vo.getDeviceType(),null);
if (deviceCol != null && vo.getId() == null) {
throw new BusinessException(BaseResponseCode.THE_SAME_DATA_EXISTS_DATABASE_PLEASE_CHECK);
}

View File

@ -106,6 +106,10 @@ public class DeviceServiceImpl implements DeviceService {
@Autowired
Snowflake snowflake;
@Autowired
DynamicConfigService dynamicConfigService;
@Override
public PageResult<DeviceRespVO> getPageListByInfo(DeviceReqVO deviceReqVO) {
//是否是多个电站
@ -391,6 +395,13 @@ public class DeviceServiceImpl implements DeviceService {
String dName = adddevice.getDeviceName() + (i + 1);
newSrcIdList.add(newSrcId);
device.setDeviceName(dName);
TranslateName translate = dynamicConfigService.getNameLanguage(dName);
device.setDeviceNameEn(translate.getNameEn());
device.setDeviceNameDe(translate.getNameDe());
device.setDeviceNamePl(translate.getNamePl());
device.setDeviceNameAra(translate.getNameAra());
device.setDeviceNameFra(translate.getNameFra());
device.setDeviceNameSpa(translate.getNameSpa());
device.setSrcId(newSrcId);
device.setDeptId(adddevice.getDeptId());
device.setDeviceType(adddevice.getDeviceType());
@ -517,6 +528,21 @@ public class DeviceServiceImpl implements DeviceService {
return device;
}
@Override
// @Cacheable(value = "device", sync = true)
public Device selectByStationIdAndSrcIdAndLng(Integer stationId, Integer srcId,String lang) {
Device device = new Device();
DeviceReqVO deviceReqVO = new DeviceReqVO();
deviceReqVO.setStationId(stationId);
deviceReqVO.setSrcId(srcId);
deviceReqVO.setLang(lang);
List<DeviceRespVO> deviceRespVOList = getList(deviceReqVO);
if(deviceRespVOList!=null && !deviceRespVOList.isEmpty()){
device = deviceRespVOList.get(0);
}
return device;
}
@Override
public List<DeviceRespVO> selectByGroup(Integer groupId) {
Device device = new Device();
@ -532,9 +558,10 @@ public class DeviceServiceImpl implements DeviceService {
}
@Override
public List<DeviceRespVO> getDeviceByStationId(Integer stationId) {
public List<DeviceRespVO> getDeviceByStationId(Integer stationId,String lang) {
DeviceReqVO reqVO = new DeviceReqVO();
reqVO.setStationId(stationId);
reqVO.setLang(lang);
List<DeviceRespVO> deviceRespVOS = deviceMapper.selectByCondition(reqVO);
deviceRespVOS = getDeviceRespVOS(deviceRespVOS);
return deviceRespVOS;
@ -814,26 +841,26 @@ public class DeviceServiceImpl implements DeviceService {
}
@Override
public List<DeviceRespVO> selectByIdAndSrcIdNotZero(Integer stationId) {
List<DeviceRespVO> list = deviceMapper.selectByIdAndSrcIdNotZero(stationId, null, null);
public List<DeviceRespVO> selectByIdAndSrcIdNotZero(Integer stationId,String lang) {
List<DeviceRespVO> list = deviceMapper.selectByIdAndSrcIdNotZero(stationId, null, null,lang);
return list;
}
@Override
public List<DeviceRespVO> selectDeviceByStationId(Integer stationId) {
List<DeviceRespVO> list = deviceMapper.selectByIdAndSrcIdNotZero(stationId, null, CommonConstant.ONE);
public List<DeviceRespVO> selectDeviceByStationId(Integer stationId,String lang) {
List<DeviceRespVO> list = deviceMapper.selectByIdAndSrcIdNotZero(stationId, null, CommonConstant.ONE,lang);
return list;
}
@Override
public List<DeviceRespVO> selectAllDeviceAndSrcIdNotZero(Integer stationId) {
List<DeviceRespVO> list = deviceMapper.selectByIdAndSrcIdNotZero(stationId, CommonConstant.ONE, null);
public List<DeviceRespVO> selectAllDeviceAndSrcIdNotZero(Integer stationId,String lang) {
List<DeviceRespVO> list = deviceMapper.selectByIdAndSrcIdNotZero(stationId, CommonConstant.ONE, null,lang);
return list;
}
@Override
public TemperatureVoltageResp getTemperatureVoltageData(DeviceTreeReq vo) {
List<DeviceRespVO> deviceRespVOS = selectByIdAndSrcIdNotZero(vo.getStationId());
List<DeviceRespVO> deviceRespVOS = selectByIdAndSrcIdNotZero(vo.getStationId(),vo.getLang());
List<DevicePointResp> treeDevices = new ArrayList<>();
if (!deviceRespVOS.isEmpty()) {
treeDevices = deviceTypeConfigService.getTreeDevices(deviceRespVOS, vo.getSrcId());
@ -1030,6 +1057,12 @@ public class DeviceServiceImpl implements DeviceService {
deviceValue.setCategory(device.getCategory());
deviceValue.setStationId(vo.getStationId());
deviceValue.setDeviceName(device.getDeviceName());
deviceValue.setDeviceNameEn(device.getDeviceNameEn());
deviceValue.setDeviceNameFra(device.getDeviceNameFra());
deviceValue.setDeviceNameSpa(device.getDeviceNameSpa());
deviceValue.setDeviceNameDe(device.getDeviceNameDe());
deviceValue.setDeviceNamePl(device.getDeviceNamePl());
deviceValue.setDeviceNameAra(device.getDeviceNameAra());
deviceValue.setStatus(device.getStatus());
deviceValue.setCreateTime(new Date());
deviceValue.setFromId(device.getFromId());
@ -1118,7 +1151,7 @@ public class DeviceServiceImpl implements DeviceService {
List<DeviceRespVO> deviceRespVOS = deviceMapper.selectByCondition(deviceReqVO);
List<Integer> srcIdList = deviceRespVOS.stream().map(s -> s.getSrcId()).collect(Collectors.toList());
//查询对应的设备
List<DeviceRespVO> deviceStation = selectByIdAndSrcIdNotZero(vo.getStationId());
List<DeviceRespVO> deviceStation = selectByIdAndSrcIdNotZero(vo.getStationId(),vo.getLang());
List<DevicePointResp> treeDevices = new ArrayList<>();
if (!deviceRespVOS.isEmpty()) {
for (Integer srcId : srcIdList) {
@ -1140,7 +1173,7 @@ public class DeviceServiceImpl implements DeviceService {
List<DeviceRespVO> deviceRespVOS = deviceMapper.selectByCondition(deviceReqVO);
List<Integer> srcIdList = deviceRespVOS.stream().map(s -> s.getSrcId()).collect(Collectors.toList());
//查询对应的设备
List<DeviceRespVO> deviceStation = selectByIdAndSrcIdNotZero(vo.getStationId());
List<DeviceRespVO> deviceStation = selectByIdAndSrcIdNotZero(vo.getStationId(),vo.getLang());
List<DevicePointResp> treeDevices = new ArrayList<>();
if (!deviceRespVOS.isEmpty()) {
for (Integer srcId : srcIdList) {
@ -1623,7 +1656,7 @@ public class DeviceServiceImpl implements DeviceService {
}
}else if(CommonConstant.THREE.equals(vo.getType())){
//导出电站数据
List<Station> list = stationService.selectStationsByIds(vo.getStationIds());
List<Station> list = stationService.selectStationsByIds(vo.getStationIds(),null);
String fileName = "station";
String sheetName = "data";
try {

View File

@ -50,7 +50,7 @@ public class DeviceTypeColServiceImpl implements DeviceTypeColService {
DeviceTypeCol deviceTypeCol = null;
for (Map.Entry<String, List<DeviceTypeColImportVO>> src : mapList.entrySet()) {
//已经存在的
List<DeviceTypeCol> isSaveList = deviceTypeColMapper.selectByDeviceType(src.getKey());
List<DeviceTypeCol> isSaveList = deviceTypeColMapper.selectByDeviceType(src.getKey(),null);
Map<String, DeviceTypeCol> isSaveMap = isSaveList.stream().collect(Collectors.toMap(k -> k.getDeviceType() + "_" + k.getCol(), DeviceTypeCol -> DeviceTypeCol));
Map<Integer, List<DeviceTypeCol>> addMap = new HashMap<>();
@ -118,8 +118,8 @@ public class DeviceTypeColServiceImpl implements DeviceTypeColService {
}
@Override
public List<DeviceTypeCol> selectByDeviceType(String deviceType) {
List<DeviceTypeCol> deviceTypeColList = deviceTypeColMapper.selectByDeviceType(deviceType);
public List<DeviceTypeCol> selectByDeviceType(String deviceType,String lang) {
List<DeviceTypeCol> deviceTypeColList = deviceTypeColMapper.selectByDeviceType(deviceType,lang);
return deviceTypeColList;
}
@ -130,14 +130,14 @@ public class DeviceTypeColServiceImpl implements DeviceTypeColService {
}
@Override
public DeviceTypeCol selectTypeAndCol(String col, String deviceType) {
DeviceTypeCol deviceTypeCol = deviceTypeColMapper.selectTypeAndCol(col, deviceType);
public DeviceTypeCol selectTypeAndCol(String col, String deviceType,String lang) {
DeviceTypeCol deviceTypeCol = deviceTypeColMapper.selectTypeAndCol(col, deviceType,lang);
return deviceTypeCol;
}
@Override
public List<DeviceTypeCol> selectDeviceTypeColList(String deviceType, List<String> collect) {
List<DeviceTypeCol> deviceTypeCols = deviceTypeColMapper.selectSameCol(deviceType, collect);
public List<DeviceTypeCol> selectDeviceTypeColList(String deviceType, List<String> collect,String lang) {
List<DeviceTypeCol> deviceTypeCols = deviceTypeColMapper.selectSameCol(deviceType, collect,lang);
return deviceTypeCols;
}

View File

@ -18,7 +18,9 @@ import com.ho.business.vo.resp.DeviceRespVO;
import com.ho.business.vo.resp.dynamicConfig.*;
import com.ho.common.tools.constant.CommonConstant;
import com.ho.common.tools.service.RedisService;
import com.ho.common.tools.util.TranslateUtils;
import com.ho.datacollect.api.constant.DataCollectConstant;
import jodd.util.StringUtil;
import lombok.extern.slf4j.Slf4j;
import org.jetbrains.annotations.NotNull;
import org.springframework.beans.BeanUtils;
@ -27,6 +29,7 @@ import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.*;
import java.util.concurrent.CompletableFuture;
import java.util.function.Function;
import java.util.stream.Collectors;
@ -70,6 +73,9 @@ public class DynamicConfigServiceImpl implements DynamicConfigService {
@Autowired
DynamicConfigTitleMapper configTitleMapper;
@Autowired
TranslateNameMapper translateNameMapper;
@Override
public int insertList(List<DynamicConfig> list) {
List<DynamicConfig> insertList = list.stream().filter(i -> i.getId() == null).collect(Collectors.toList());
@ -153,6 +159,14 @@ public class DynamicConfigServiceImpl implements DynamicConfigService {
List<CurveConfig> insertList = new ArrayList<>();
CurveConfig config = null;
for (CurveConfigAdd c:list) {
//curveName 设置多语言翻译 20250821
TranslateName translate = getNameLanguage(c.getCurveName());
c.setCurveNameEn(translate.getNameEn());
c.setCurveNameFra(translate.getNameFra());
c.setCurveNameSpa(translate.getNameSpa());
c.setCurveNameDe(translate.getNameDe());
c.setCurveNamePl(translate.getNamePl());
c.setCurveNameAra(translate.getNameAra());
config = new CurveConfig();
BeanUtils.copyProperties(c,config);
if(c.getId() == null){
@ -180,6 +194,15 @@ public class DynamicConfigServiceImpl implements DynamicConfigService {
list.get(i).setId(id);
List<DynamicConfig> dList = list.get(i).getList();
if(null != dList && !dList.isEmpty()){
dList.stream().forEach(s->{
TranslateName translate = getNameLanguage(s.getColName());
s.setColNameEn(translate.getNameEn());
s.setColNameFra(translate.getNameFra());
s.setColNameSpa(translate.getNameSpa());
s.setColNameDe(translate.getNameDe());
s.setColNamePl(translate.getNamePl());
s.setColNameAra(translate.getNameAra());
});
//动态配置点国际化
result = dynamicConfigMapper.insertList(dList);
log.info("插入动态配置结果,{}",result);
@ -293,6 +316,23 @@ public class DynamicConfigServiceImpl implements DynamicConfigService {
if(srcPoint.getSort()==null){
srcPoint.setSort(i);
}
//name defaultValue 设置多语言翻译 20250821
TranslateName translate = getNameLanguage(srcPoint.getName());
srcPoint.setNameEn(translate.getNameEn());
srcPoint.setNameFra(translate.getNameFra());
srcPoint.setNameSpa(translate.getNameSpa());
srcPoint.setNameDe(translate.getNameDe());
srcPoint.setNamePl(translate.getNamePl());
srcPoint.setNameAra(translate.getNameAra());
if(StringUtil.isNotBlank(srcPoint.getDefaultValue())){
TranslateName translateDe = getNameLanguage(srcPoint.getDefaultValue());
srcPoint.setDefaultValueEn(translateDe.getNameEn());
srcPoint.setDefaultValueFra(translateDe.getNameFra());
srcPoint.setDefaultValueSpa(translateDe.getNameSpa());
srcPoint.setDefaultValueDe(translateDe.getNameDe());
srcPoint.setDefaultValuePl(translateDe.getNamePl());
srcPoint.setDefaultValueAra(translateDe.getNameAra());
}
pointConfig = new PointConfig();
BeanUtils.copyProperties(srcPoint,pointConfig);
if(srcPoint.getId()==null){
@ -337,6 +377,15 @@ public class DynamicConfigServiceImpl implements DynamicConfigService {
List<DynamicConfig> dynamicConfigs = list.get(i).getList();
//插入动态配置点
if(!dynamicConfigs.isEmpty()){
dynamicConfigs.stream().forEach(s->{
TranslateName translate = getNameLanguage(s.getColName());
s.setColNameEn(translate.getNameEn());
s.setColNameFra(translate.getNameFra());
s.setColNameSpa(translate.getNameSpa());
s.setColNameDe(translate.getNameDe());
s.setColNamePl(translate.getNamePl());
s.setColNameAra(translate.getNameAra());
});
result = dynamicConfigMapper.insertList(dynamicConfigs);
for (DynamicConfig d:dynamicConfigs) {
relation = new PointConfigRelation();
@ -359,6 +408,16 @@ public class DynamicConfigServiceImpl implements DynamicConfigService {
p.getPolysemyList().forEach(i->i.setPointId(p.getId()));
pList.addAll(p.getPolysemyList());
}
//name 设置多语言翻译 20250821
pList.stream().forEach(i->{
TranslateName translate = getNameLanguage(i.getName());
i.setNameEn(translate.getNameEn());
i.setNameFra(translate.getNameFra());
i.setNameSpa(translate.getNameSpa());
i.setNameDe(translate.getNameDe());
i.setNamePl(translate.getNamePl());
i.setNameAra(translate.getNameAra());
});
result = polysemyMapper.insertList(pList);
log.info("插入一点多义表结果:{}",result);
}
@ -386,7 +445,7 @@ public class DynamicConfigServiceImpl implements DynamicConfigService {
List<Integer> polysemyList = pointConfigResultList.stream().filter(i -> CommonConstant.TWO.equals(i.getPointType()) || CommonConstant.ELEVEN.equals(i.getPointType())).map(PointConfigResultResp::getId).distinct().collect(Collectors.toList());
Map<Integer, List<PointPolysemyConfig>> vMap = new HashMap<>();
if(!polysemyList.isEmpty()){
List<PointPolysemyConfig> list = polysemyMapper.selectByPointIds(polysemyList);
List<PointPolysemyConfig> list = polysemyMapper.selectByPointIds(polysemyList,vo.getLang());
vMap = list.stream().collect(Collectors.groupingBy(PointPolysemyConfig::getPointId));
}
//拆电芯
@ -445,14 +504,14 @@ public class DynamicConfigServiceImpl implements DynamicConfigService {
List<Integer> polysemyList = pointConfigResultList.stream().filter(i -> CommonConstant.TWO.equals(i.getPointType())).map(PointConfigResultResp::getId).distinct().collect(Collectors.toList());
Map<String, String> vMap = new HashMap<>();
if(!polysemyList.isEmpty()){
List<PointPolysemyConfig> list = polysemyMapper.selectByPointIds(polysemyList);
List<PointPolysemyConfig> list = polysemyMapper.selectByPointIds(polysemyList,vo.getLang());
vMap = list.stream().filter(s->s.getValue()!=null&&s.getName()!=null).collect(Collectors.toMap(s -> s.getPointId() + "," + s.getValue().intValue(), s -> s.getName(), (k1, k2) -> k1));
}
//范围内的一点多义
List<Integer> rangePolysemyList = pointConfigResultList.stream().filter(i -> CommonConstant.ELEVEN.equals(i.getPointType())).map(PointConfigResultResp::getId).distinct().collect(Collectors.toList());
Map<Integer, List<PointPolysemyConfig>> rMap = new HashMap<>();
if(!rangePolysemyList.isEmpty()){
List<PointPolysemyConfig> list = polysemyMapper.selectByPointIds(rangePolysemyList);
List<PointPolysemyConfig> list = polysemyMapper.selectByPointIds(rangePolysemyList,vo.getLang());
rMap = list.stream().filter(s -> s.getValue() != null && s.getName() != null && s.getSymbol() != null).collect(Collectors.groupingBy(PointPolysemyConfig::getPointId));
}
//拆电芯
@ -762,6 +821,101 @@ public class DynamicConfigServiceImpl implements DynamicConfigService {
return result;
}
@Override
public String getNameByLang(String name,String lang){
TranslateName translate = getNameLanguage(name);
switch (lang){
case CommonConstant.langTemp.EN_US:
return translate.getNameEn();
case CommonConstant.langTemp.DE_DE:
return translate.getNameDe();
case CommonConstant.langTemp.ES_ES:
return translate.getNameSpa();
case CommonConstant.langTemp.AR_EG:
return translate.getNameAra();
case CommonConstant.langTemp.PL_PL:
return translate.getNamePl();
case CommonConstant.langTemp.FR_FR:
return translate.getNameFra();
case CommonConstant.langTemp.ZH_CN:
return translate.getName();
}
return null;
}
@Override
public TranslateName getNameLanguage(String name) {
// 英语
String nameEn = null;
// 法语
String nameFra = null;
// 西班牙语
String nameSpa = null;
// 德语
String nameDe = null;
// 波兰语
String namePl = null;
// 阿拉伯语
String nameAra = null;
// 查询数据库中 预先翻译的中文字段 语言
TranslateName vo = translateNameMapper.selectNameLang(name);
TranslateName translate = new TranslateName();
boolean flag = false;
if(vo == null){
nameEn = TranslateUtils.translate(name,CommonConstant.lang.EN);
nameFra = TranslateUtils.translate(name,CommonConstant.lang.FRA);
nameSpa = TranslateUtils.translate(name,CommonConstant.lang.SPA);
nameDe = TranslateUtils.translate(name,CommonConstant.lang.DE);
namePl = TranslateUtils.translate(name,CommonConstant.lang.PL);
nameAra = TranslateUtils.translate(name,CommonConstant.lang.ARA);
// 插入中文预翻译表
translate.setName(name);
translate.setNameEn(nameEn);
translate.setNameFra(nameFra);
translate.setNameSpa(nameSpa);
translate.setNameDe(nameDe);
translate.setNamePl(namePl);
translate.setNameAra(nameAra);
CompletableFuture.runAsync(()->{
translateNameMapper.insert(translate);
});
return translate;
}else{
if(StringUtil.isEmpty(vo.getNameEn())){
vo.setNameEn(TranslateUtils.translate(name,CommonConstant.lang.EN));
flag = true;
}
if(StringUtil.isEmpty(vo.getNameFra())){
vo.setNameFra(TranslateUtils.translate(name,CommonConstant.lang.FRA));
flag = true;
}
if(StringUtil.isEmpty(vo.getNameSpa())){
vo.setNameSpa(TranslateUtils.translate(name,CommonConstant.lang.SPA));
flag = true;
}
if(StringUtil.isEmpty(vo.getNameDe())){
vo.setNameDe(TranslateUtils.translate(name,CommonConstant.lang.DE));
flag = true;
}
if(StringUtil.isEmpty(vo.getNamePl())){
vo.setNamePl(TranslateUtils.translate(name,CommonConstant.lang.PL));
flag = true;
}
if(StringUtil.isEmpty(vo.getNameAra())){
vo.setNameAra(TranslateUtils.translate(name,CommonConstant.lang.ARA));
flag = true;
}
if(flag){
CompletableFuture.runAsync(()->{
translateNameMapper.updateById(vo);
});
}
}
return vo;
}
private void getConfigAddList(SyncDynamicConfigParam vo, List<PointConfigResultResp> pointList, List<PointConfigAdd> pointAddList,Integer deviceId,Map<Integer, SyncDynamicDeviceMapping> map) {
PointConfigAdd configAdd = null;
for (PointConfigResultResp p: pointList) {

View File

@ -0,0 +1,212 @@
package com.ho.business.service.impl;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import com.ho.business.constant.DeviceTypeConstant;
import com.ho.business.entity.*;
import com.ho.business.feignclient.TdFeignClient;
import com.ho.business.mapper.EarningsCalculateMapper;
import com.ho.business.mapper.EarningsCalculateMpptMapper;
import com.ho.business.service.*;
import com.ho.business.util.QueuesUtil;
import com.ho.business.vo.req.bigScreen.CommonBigScreenReq;
import com.ho.business.vo.req.device.DeviceTypeQuery;
import com.ho.business.vo.resp.DeviceRespVO;
import com.ho.business.vo.resp.InverterResp.PowerGenerateRespVO;
import com.ho.business.vo.resp.profit.DayProfitType;
import com.ho.common.tools.constant.CommonConstant;
import com.ho.common.tools.constant.RedisKeyConstant;
import com.ho.common.tools.exception.DataResult;
import com.ho.common.tools.service.RedisService;
import com.ho.common.tools.vo.req.StationHomeRespVo;
import com.ho.td.api.entity.query.TdBaseTimeQuery;
import jodd.util.CollectionUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
@Service
@Slf4j
public class EarningsCalculateMpptServiceImpl implements EarningsCalculateMpptService {
@Autowired
EarningsCalculateMpptMapper earningsCalculateMpptMapper;
@Autowired
private DeviceService deviceService;
@Autowired
private ModelDeviceService modelDeviceService;
@Autowired
private DeviceTypeConfigService deviceTypeConfigService;
public static final String TOTAL_RELEASE = "totalRelease";
@Autowired
RedisService redisService;
@Autowired
EarningsCalculateMapper earningsCalculateMapper;
@Autowired
private TdFeignClient tdFeignClient;
@Override
public int deleteByDay(String day, List<Integer> typeList) {
int i = earningsCalculateMpptMapper.deleteByDay(day, typeList);
return i;
}
/**
* 计算光伏收益
* @return
*/
private List<EarningsCalculateMppt> countMpptIncome(Station station,String beginTime){
List<EarningsCalculateMppt> list =new ArrayList<>();
Integer stationId = station.getId();
// 总发
List<DeviceRespVO> deviceRespVOS = deviceService.getListByDeviceType(stationId, DeviceTypeConstant.MPPT);
if (deviceRespVOS.isEmpty()) {
deviceRespVOS = deviceService.getListByFuzzyDeviceType(stationId, DeviceTypeConstant.MPPT);
}
for (DeviceRespVO vo : deviceRespVOS) {
// 查询光伏Mppt 放电量关联字段 如果没关联,则不计算
List<ModelDeviceColComp> deviceCp = modelDeviceService.getCompListByType("device", vo.getDeviceType(), TOTAL_RELEASE);
if(deviceCp == null ){
break;
}
// 查询设备模型,没查询到则返回,不计算
DeviceTypeQuery deviceTypeQuery = new DeviceTypeQuery();
deviceTypeQuery.setGroupId(station.getGroupId());
deviceTypeQuery.setDeviceType(deviceCp.get(0).getDeviceType());
List<DeviceTypeConfig> deviceTypeConfigs = deviceTypeConfigService.queryListByCondition(deviceTypeQuery);
if (deviceTypeConfigs == null){
break;
}
//开始计算
//1:组装时序数据库查询参数
DateTime beginDate = DateUtil.beginOfDay(DateUtil.parse(beginTime));
DateTime endDate = DateUtil.endOfDay(beginDate);
TdBaseTimeQuery tdBaseQuery = new TdBaseTimeQuery();
tdBaseQuery.setBeginTime(beginDate.toMsStr());
tdBaseQuery.setEndTime(endDate.toMsStr());
tdBaseQuery.setTime("1m");
tdBaseQuery.setStationId(station.getId());
tdBaseQuery.setGroupId(station.getGroupId());
tdBaseQuery.setModelName((deviceTypeConfigs.get(0)).getModelName());
tdBaseQuery.setCol(deviceCp.get(0).getDeviceCol());
tdBaseQuery.setSrcId(vo.getSrcId());
// 查询设备时序数据,如果为空则不计算
DataResult<List<StationHomeRespVo>> listDataResult = tdFeignClient.queryPointTableList(tdBaseQuery);
List<StationHomeRespVo> datas = listDataResult.getData();
if(datas ==null){
break;
}
// 获取电价分时段计算收益
List<EarningsCalculateSub> elecTemplateSubs = earningsCalculateMapper.queryElecTemplateSubByStationId(station.getId(), 0, beginTime,2);
BigDecimal lastelec = BigDecimal.ZERO;
BigDecimal elec = BigDecimal.ZERO;
int num = 0 ;
for (EarningsCalculateSub sub : elecTemplateSubs ){
String earnBegin = sub.getBeginTime();
String earnEnd = sub.getEndTime();
DateTime earnBeginDate = DateUtil.parse(beginTime + " " + earnBegin + ":00");
DateTime earnEndate = DateUtil.parse(beginTime + " " + earnEnd + ":59");
List<StationHomeRespVo> subData = datas.stream().filter(i->DateUtil.isIn(DateUtil.parse(i.getDate()),earnBeginDate,earnEndate)).collect(Collectors.toList());
if(subData.size()>0){
if(num==0){
elec = subData.get(subData.size()-1).getDigital().subtract(subData.get(0).getDigital());
}else {
elec = subData.get(subData.size() - 1).getDigital().subtract(lastelec);
}
lastelec = subData.get(subData.size()-1).getDigital();
num++;
EarningsCalculateMppt earn =new EarningsCalculateMppt();
earn.setDay(beginTime);
earn.setGroupId(station.getGroupId());
earn.setStationId(station.getId());
earn.setSrcId(tdBaseQuery.getSrcId());
earn.setPrice(sub.getPrice());
earn.setRateType(sub.getType());
earn.setType(1);
earn.setCreateTime(new Date());
BigDecimal discount = sub.getDiscount() == null ? BigDecimal.ONE : sub.getDiscount();
earn.setTotal(BigDecimal.ZERO);
earn.setElec(elec);
earn.setDiscount(discount);
earn.setDigital(new BigDecimal(String.format("%.4f",elec.multiply(sub.getPrice()))));
list.add(earn);
}
}
}
return list;
}
@Override
public void todayMpptIncome(List<Station> stations,String beginTime){
if(stations != null && stations.size() > 0){
for (Station station:stations){
List<EarningsCalculateMppt> list = countMpptIncome(station,beginTime);
// 缓存今日收益
if(list.size()>0){
String key = RedisKeyConstant.PV.STATION_PV_TODAY_PROFIT + station.getId();
BigDecimal todayIncone = list.stream().map(EarningsCalculateMppt::getDigital).reduce(BigDecimal.ZERO,BigDecimal::add);
redisService.set(key, todayIncone);
}
}
}
}
@Override
public List<PowerGenerateRespVO> countPvIncome(Integer stationId, String beginTime, String endTime) {
return earningsCalculateMpptMapper.countPvIncome(stationId,beginTime,endTime);
}
@Override
public BigDecimal countAllPvIncome(Integer stationId,String beginTime, String endTime) {
BigDecimal data = earningsCalculateMpptMapper.countAllPvIncome(stationId,beginTime,endTime);
return data==null?BigDecimal.ZERO:data;
}
@Override
public List<DayProfitType> getProfit(String begin, String end, Integer groupId) {
return earningsCalculateMpptMapper.getProfit(begin, end, groupId);
}
@Override
public Date getFirstTime() {
String day = earningsCalculateMpptMapper.getFirstTime();
DateTime date = null;
if(day!=null){
date = DateUtil.parse(day, CommonConstant.DATE_YMD);
}
return date;
}
@Override
public List<DayProfitType> getEarningsByParam(CommonBigScreenReq req) {
return earningsCalculateMpptMapper.getEarningsByParam(req);
}
@Override
public void allMpptIncome(List<Station> stations,String beginTime) {
if(stations != null && stations.size() > 0){
for (Station station:stations){
List<EarningsCalculateMppt> list = countMpptIncome(station,beginTime);
// 数据插入
if(list.size()>0){
int a = this.earningsCalculateMpptMapper.insertBatch(list);
System.err.println("修改的行数:" + a);
}
}
}
}
}

View File

@ -24,11 +24,13 @@ import com.ho.business.vo.req.pcsStation.PcsStationReq;
import com.ho.business.vo.req.report.ReportReqVO;
import com.ho.business.vo.resp.CountEleData;
import com.ho.business.vo.resp.DeviceRespVO;
import com.ho.business.vo.resp.InverterResp.PowerGenerateRespVO;
import com.ho.business.vo.resp.cabin.EarningsCalculateCountResp;
import com.ho.business.vo.resp.cabin.EarningsCalculateResp;
import com.ho.business.vo.resp.colCount.ColCountResp;
import com.ho.business.vo.resp.income.RevenueOverview;
import com.ho.business.vo.resp.income.RevenueOverviewData;
import com.ho.business.vo.resp.mppt.MpptActiveVo;
import com.ho.business.vo.resp.pcsStation.EarningsCalculateData;
import com.ho.business.vo.resp.pcsStation.PcsElecData;
import com.ho.business.vo.resp.profit.DayProfitType;
@ -41,6 +43,7 @@ import com.ho.common.tools.exception.BusinessException;
import com.ho.common.tools.service.RedisService;
import com.ho.datacollect.api.constant.DataCollectConstant;
import com.ho.user.api.vo.req.SysSubDictVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.BeanUtils;
@ -101,6 +104,12 @@ public class EarningsCalculateServiceImpl implements EarningsCalculateService {
@Autowired
UserFeignClient userFeignClient;
@Autowired
OpenStationService openStationService;
@Autowired
EarningsCalculateMpptService earningsCalculateMpptService;
public static final String DICT_TYPE = "electrovalence_type";
/** start */
@ -160,6 +169,10 @@ public class EarningsCalculateServiceImpl implements EarningsCalculateService {
if (station == null || station.getId() == null) {
return ec;
}
boolean flag = false;
if(DataCollectConstant.ONE.equals(station.getInverterFlag())){
flag = true;
}
Integer stationId = station.getId();
String deviceType = colCountService.getDeviceType(stationId);
List<DeviceRespVO> deviceRespVOS = deviceService.getListByDeviceType(stationId, deviceType);
@ -194,11 +207,44 @@ public class EarningsCalculateServiceImpl implements EarningsCalculateService {
String time = earningsCalculateReq.getTime();
ec.setMonth(time.substring(time.length() - 2, time.length()));
String reportName = CommonConstant.REPORT_NAME;
String billName = CommonConstant.BILL_NAME;
String name = station.getName();
if(CommonConstant.langTemp.EN_US.equals(earningsCalculateReq.getLang())){
reportName = CommonConstant.REPORT_NAME_EN;
billName = CommonConstant.BILL_NAME_EN;
name = station.getNameEn();
}
if(CommonConstant.langTemp.FR_FR.equals(earningsCalculateReq.getLang())){
reportName = CommonConstant.REPORT_NAME_FRA;
billName = CommonConstant.BILL_NAME_FRA;
name = station.getNameFra();
}
if(CommonConstant.langTemp.ES_ES.equals(earningsCalculateReq.getLang())){
reportName = CommonConstant.REPORT_NAME_SPA;
billName = CommonConstant.BILL_NAME_SPA;
name = station.getNameSpa();
}
if(CommonConstant.langTemp.DE_DE.equals(earningsCalculateReq.getLang())){
reportName = CommonConstant.REPORT_NAME_DE;
billName = CommonConstant.BILL_NAME_DE;
name = station.getNameDe();
}
if(CommonConstant.langTemp.PL_PL.equals(earningsCalculateReq.getLang())){
reportName = CommonConstant.REPORT_NAME_PL;
billName = CommonConstant.BILL_NAME_PL;
name = station.getNamePl();
}
if(CommonConstant.langTemp.AR_EG.equals(earningsCalculateReq.getLang())){
reportName = CommonConstant.REPORT_NAME_ARA;
billName = CommonConstant.BILL_NAME_ARA;
name = station.getNameAra();
}
// 电站名称(报表标题)
if (type == 0) {
ec.setStationName(station.getName() + "( " + time + " ) 月度报表");
ec.setStationName(name + "( " + time + " ) "+reportName);
} else {
ec.setStationName(station.getName() + "( " + time + " ) 月度账单");
ec.setStationName(name + "( " + time + " ) "+billName);
}
ec.setList(list);
//充电收益
@ -220,6 +266,10 @@ public class EarningsCalculateServiceImpl implements EarningsCalculateService {
BigDecimal dailyChargeElec = BigDecimal.ZERO;
//日放电量
BigDecimal dailyDischargeElec = BigDecimal.ZERO;
//今日收益mppt
BigDecimal todayIncone = BigDecimal.ZERO;
//今日发电量mppt
BigDecimal dailyReleaseElec = BigDecimal.ZERO;
//当月则叠加当日,否则不叠加
if (sameMonth) {
//将当日的日充日放叠加到日冻结中
@ -234,8 +284,26 @@ public class EarningsCalculateServiceImpl implements EarningsCalculateService {
dailyChargeElec = countEleData.getDailyChargeElec();
//日放电量
dailyDischargeElec = countEleData.getDailyDischargeElec();
if(flag){
//今日收益mppt
String key = RedisKeyConstant.PV.STATION_PV_TODAY_PROFIT + station.getId();
todayIncone = (BigDecimal)redisService.get(key)==null?BigDecimal.ZERO:(BigDecimal)redisService.get(key);
//今日发电量mppt
MpptActiveVo pv = openStationService.getPvActivePower(stationId);
dailyReleaseElec = pv.getDailyReleaseElec();
}
}
if(flag){
BigDecimal monthIncone = earningsCalculateMpptService.countAllPvIncome(station.getId(),earningsCalculateReq.getBeginTime(),earningsCalculateReq.getEndTime());
ec.setMonthIncone(monthIncone.add(todayIncone));
BigDecimal monthReleaseElec = elecMeterValueService.selectSumByType(station.getId(),DeviceTypeConstant.ELEC_METER_VALUE_TYPE.PV_CHARGE,earningsCalculateReq.getBeginTime(),earningsCalculateReq.getEndTime(),null);
ec.setMonthReleaseElec(monthReleaseElec.add(dailyReleaseElec));
BigDecimal totalIncome = earningsCalculateMpptService.countAllPvIncome(station.getId(),null,null);
ec.setTotalIncome(totalIncome.add(todayIncone));
BigDecimal totalReleaseElec = elecMeterValueService.selectSumValue(station.getId(),DeviceTypeConstant.ELEC_METER_VALUE_TYPE.PV_CHARGE,null);
ec.setTotalReleaseElec(totalReleaseElec.add(dailyReleaseElec));
ec.setPvPower(station.getPvPower());
}
ec.setTotalChargeElec(pcsElecData.stream().map(PcsElecData::getChargeElec).reduce(BigDecimal.ZERO, BigDecimal::add).add(dailyChargeElec));
ec.setTotalDischargeElec(pcsElecData.stream().map(PcsElecData::getDischargeElec).reduce(BigDecimal.ZERO, BigDecimal::add).add(dailyDischargeElec));
@ -649,7 +717,8 @@ public class EarningsCalculateServiceImpl implements EarningsCalculateService {
if (dateStr != null && !"".equals(dateStr)) {
date = dateStr.substring(0, 7);
}
earningsCalculateSubs = earningsCalculateMapper.queryElecTemplateSubByStationId(stationId, templateType, dateStr);
Integer elecType = 1;
earningsCalculateSubs = earningsCalculateMapper.queryElecTemplateSubByStationId(stationId, templateType, dateStr,elecType);
if (earningsCalculateSubs != null && earningsCalculateSubs.size() > 0) {
return earningsCalculateSubs;
}
@ -1534,6 +1603,55 @@ public class EarningsCalculateServiceImpl implements EarningsCalculateService {
return earningsCalculateMapper.getEarningsByParam(req);
}
@Override
public List<PowerGenerateRespVO> getPvMonthData(EarningsCalculateReq req) {
List<PowerGenerateRespVO> list = new ArrayList<>();
LocalDateTime mDate = DateUtil.parse(req.getTime(), CommonConstant.DATE_YM).toLocalDateTime();
LocalDateTime begin = mDate.with(TemporalAdjusters.firstDayOfMonth());
LocalDateTime end = mDate.with(TemporalAdjusters.lastDayOfMonth());
String beginTime= DateUtil.format(begin, CommonConstant.DATE_YMD);
String endTime = DateUtil.format(end, CommonConstant.DATE_YMD);
//光伏收益
List<PowerGenerateRespVO> pvIncome = earningsCalculateMpptService.countPvIncome(req.getStationId(),beginTime, endTime);
Map<String,List<PowerGenerateRespVO>> mapIncome = pvIncome.stream().collect(Collectors.groupingBy(i ->i.getDate()));
//光伏放电
List<Integer> types = new ArrayList<>();
types.add(DeviceTypeConstant.ELEC_METER_VALUE_TYPE.PV_CHARGE);
List<ElecMeterValue> elecMeterValues = elecMeterValueService.selectList(req.getStationId(), types, beginTime, endTime);
Map<String, List<ElecMeterValue>> mapMeter = elecMeterValues.stream().collect(Collectors.groupingBy(i ->i.getDay()));
//根据天获取时间段
List<DateTime> dateTimes = DateUtil.rangeToList(DateUtil.parse(beginTime), DateUtil.parse(endTime), DateField.DAY_OF_MONTH);
for (DateTime dateTime : dateTimes){
String date = DateUtil.format(dateTime, CommonConstant.DATE_YMD);
PowerGenerateRespVO pv = new PowerGenerateRespVO();
pv.setDate(date);
List<PowerGenerateRespVO> pvIn = mapIncome.get(date);
//收益
if(pvIn != null){
pv.setProfit(pvIn.get(0).getProfit());
}
//放电
List<ElecMeterValue> elecs = mapMeter.get(date);
if(elecs != null){
pv.setPowerGenerate(elecs.stream().map(ElecMeterValue::getDigital).reduce(BigDecimal.ZERO,BigDecimal::add));
}
if(date.equals(endTime)){
String key = RedisKeyConstant.PV.STATION_PV_TODAY_PROFIT + req.getStationId();
//获取今日收益
BigDecimal todayIncone = (BigDecimal)redisService.get(key);
pv.setProfit(todayIncone);
//获取今日发电
//当前功率(光伏)、总发电量、日发电量
MpptActiveVo todayPv = openStationService.getPvActivePower(req.getStationId());
pv.setPowerGenerate(todayPv.getDailyReleaseElec());
}
list.add(pv);
}
return list;
}
public static ArrayList<BigDecimal> list(EarningsCalculateSub earningsCalculateSub) {
BigDecimal[] bigDecimal = new BigDecimal[49];
ArrayList<BigDecimal> list = new ArrayList<BigDecimal>(Arrays.asList(bigDecimal));

View File

@ -5,6 +5,7 @@ import com.ho.business.mapper.ElecMeterValueMapper;
import com.ho.business.service.ElecMeterValueService;
import com.ho.business.vo.req.bigScreen.CommonBigScreenReq;
import com.ho.business.vo.req.carbin.ElecMeterReq;
import com.ho.business.vo.resp.profit.DayProfitType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -26,7 +27,7 @@ public class ElecMeterValueServiceImpl implements ElecMeterValueService {
@Override
public BigDecimal selectSumByType(Integer stationId, Integer type, String beginTime, String endTime,Integer srcId) {
BigDecimal sum = elecMeterValueMapper.selectSumByType(stationId, type, beginTime, endTime,srcId);
return sum;
return sum == null ? BigDecimal.ZERO:sum;
}
//按日期和类型删除
@ -77,7 +78,7 @@ public class ElecMeterValueServiceImpl implements ElecMeterValueService {
@Override
public BigDecimal selectSumValue(Integer stationId, Integer type,Integer srcId) {
BigDecimal sum = elecMeterValueMapper.selectSumValue(stationId, type,srcId);
return sum;
return sum == null ? BigDecimal.ZERO:sum;
}
@Override
@ -96,4 +97,9 @@ public class ElecMeterValueServiceImpl implements ElecMeterValueService {
public List<ElecMeterValue> selectGroupByDay(CommonBigScreenReq req) {
return elecMeterValueMapper.selectGroupByDay(req);
}
@Override
public List<DayProfitType> getElec(String begin, String end, Integer groupId, Integer type,List<Integer> stationIds) {
return elecMeterValueMapper.getElec(begin,end,groupId,type,stationIds);
}
}

View File

@ -257,7 +257,7 @@ public class ElecPriceCurveServiceImpl implements ElecPriceCurveService {
//电站id集合
List<Integer> stationIds = elecTemplates.stream().map(ElecTemplate::getStationId).collect(Collectors.toList());
//查询电站
List<StationRespVO> stationRespVOS = stationService.selectByIds(stationIds);
List<StationRespVO> stationRespVOS = stationService.selectByIds(stationIds,null);
Map<Integer, List<StationRespVO>> stationMap = stationRespVOS.stream().collect(Collectors.groupingBy(StationRespVO::getId));
//模板id的集合
List<Integer> elecTemplateIds = elecTemplates.stream().map(ElecTemplate::getId).collect(Collectors.toList());

View File

@ -5,7 +5,9 @@ import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ho.business.entity.ElecMeterValue;
import com.ho.business.entity.HisCurveRelate;
import com.ho.business.entity.TranslateName;
import com.ho.business.mapper.HisCurveRelateMapper;
import com.ho.business.service.DynamicConfigService;
import com.ho.business.service.HisCurveRelateService;
import com.ho.business.vo.req.modelType.ModelTypeQueryReq;
import com.ho.business.vo.req.point.HisPointReqVo;
@ -38,6 +40,10 @@ public class HisCurveRelateServiceImpl implements HisCurveRelateService {
@Autowired
private HisCurveRelateMapper hisCurveRelateMapper;
@Autowired
private DynamicConfigService dynamicConfigService;
@Override
public void add(HisPointReqVo hisPointReqVo, SimpleUser user) {
List<HisCurveRelate> list =new ArrayList<>();
@ -49,10 +55,24 @@ public class HisCurveRelateServiceImpl implements HisCurveRelateService {
hisCurveRelate.setDeviceType(hisPointCurveReqVo.getDeviceType());
hisCurveRelate.setModelId(String.valueOf(modelId));
hisCurveRelate.setColName(hisPointCurveReqVo.getColName());
TranslateName colTrans = dynamicConfigService.getNameLanguage(hisPointCurveReqVo.getColName());
hisCurveRelate.setColNameEn(colTrans.getNameEn());
hisCurveRelate.setColNameFra(colTrans.getNameFra());
hisCurveRelate.setColNameSpa(colTrans.getNameSpa());
hisCurveRelate.setColNameDe(colTrans.getNameDe());
hisCurveRelate.setColNamePl(colTrans.getNamePl());
hisCurveRelate.setColNameAra(colTrans.getNameAra());
hisCurveRelate.setStationId(hisPointCurveReqVo.getStationId());
//modelname 不能重复
//hisCurveRelateMapper.selectName(hisPointReqVo.getModelName());
hisCurveRelate.setModelName(hisPointReqVo.getModelName());
TranslateName modelTrans = dynamicConfigService.getNameLanguage(hisPointReqVo.getModelName());
hisCurveRelate.setModelNameEn(modelTrans.getNameEn());
hisCurveRelate.setModelNameFra(modelTrans.getNameFra());
hisCurveRelate.setModelNameSpa(modelTrans.getNameSpa());
hisCurveRelate.setModelNameDe(modelTrans.getNameDe());
hisCurveRelate.setModelNamePl(modelTrans.getNamePl());
hisCurveRelate.setModelNameAra(modelTrans.getNameAra());
hisCurveRelate.setSrcId(hisPointCurveReqVo.getSrcId());
hisCurveRelate.setUserId(user.getUserId());
list.add(hisCurveRelate);
@ -69,6 +89,7 @@ public class HisCurveRelateServiceImpl implements HisCurveRelateService {
HisCurveRelate queryVo = new HisCurveRelate();
queryVo.setStationId(vo.getStationId());
queryVo.setUserId(vo.getUserId());
queryVo.setLang(vo.getLang());
List<HisCurveRelate> hisCurveRelateList = hisCurveRelateMapper.selectAll(queryVo);
Map<String, List<HisCurveRelate>> chargeMap = hisCurveRelateList.stream().collect(Collectors.groupingBy(HisCurveRelate::getModelId));
List<HisCurveRelate> resultList = new ArrayList<>();

View File

@ -19,8 +19,10 @@ import com.ho.business.vo.resp.DeviceRespVO;
import com.ho.business.vo.resp.ProvinceStation;
import com.ho.business.vo.resp.colCount.ColCountResp;
import com.ho.business.vo.resp.iargeScreen.*;
import com.ho.business.vo.resp.mppt.MpptActiveVo;
import com.ho.business.vo.resp.profit.DayProfitType;
import com.ho.common.tools.constant.CommonConstant;
import com.ho.common.tools.constant.RedisKeyConstant;
import com.ho.common.tools.entity.SimpleUser;
import com.ho.common.tools.service.RedisService;
import com.ho.common.tools.util.BigDecimalUtil;
@ -77,11 +79,18 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
@Autowired
TranslateProvinceMapper translateProvinceMapper;
@Autowired
OpenStationService openStationService;
@Autowired
EarningsCalculateMpptService earningsCalculateMpptService;
private final static BigDecimal value = new BigDecimal("0.475");
private final static BigDecimal parameter = new BigDecimal("18.3");
private final static BigDecimal four = new BigDecimal("0.4");
private final static BigDecimal fours = new BigDecimal("40");
private final static BigDecimal coalPrice = new BigDecimal("0.6");//煤炭价格
private final static Integer maxSize = 30;
private final static BigDecimal hundred = new BigDecimal(100);
private final static int FENGStationId = 418;
@ -200,6 +209,62 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
return annualOverviewResp;
}*/
private AnnualPvOverviewResp getPvOverviewDatas(List<Station> list){
AnnualPvOverviewResp annualOverviewResp = new AnnualPvOverviewResp();
//装机容量
BigDecimal capacity = BigDecimal.ZERO;
//电站总数
Integer stationNumber = list.size();
BigDecimal todayIncone = BigDecimal.ZERO;
BigDecimal dailyReleaseElec = BigDecimal.ZERO;
BigDecimal yearIncone = BigDecimal.ZERO;
BigDecimal totalIncome = BigDecimal.ZERO;
BigDecimal yearReleaseElec = BigDecimal.ZERO;
BigDecimal totalReleaseElec = BigDecimal.ZERO;
//今年开始时间、结束时间
DateTime begin = DateUtil.beginOfYear(new Date());
String beginString = DateUtil.format(begin, CommonConstant.DATE_YMD);
String endString = DateUtil.format(DateUtil.endOfYear(new Date()), CommonConstant.DATE_YMD);
for (Station station : list) {
//装机容量进行累加
BigDecimal capacityStation = station.getCapacity();
if (capacityStation != null) {
capacity = capacity.add(capacityStation);
}
String key = RedisKeyConstant.PV.STATION_PV_TODAY_PROFIT + station.getId();
// 今日收益
BigDecimal tIncone = (BigDecimal)redisService.get(key);
todayIncone = todayIncone.add(tIncone==null?BigDecimal.ZERO:tIncone);
// 年收益
BigDecimal yIncone = earningsCalculateMpptService.countAllPvIncome(station.getId(),beginString,endString);
yearIncone = yearIncone.add(yIncone);
// 累计收益
BigDecimal allIncone = earningsCalculateMpptService.countAllPvIncome(station.getId(),null,null);
totalIncome = totalIncome.add(allIncone);
// 日发电
MpptActiveVo todayPv = openStationService.getPvActivePower(station.getId());
dailyReleaseElec = dailyReleaseElec.add(todayPv.getDailyReleaseElec());
// 年发电
BigDecimal yReleaseElec = elecMeterValueService.selectSumByType(station.getId(),DeviceTypeConstant.ELEC_METER_VALUE_TYPE.PV_CHARGE,beginString,endString,null);
yearReleaseElec = yearReleaseElec.add(yReleaseElec);
// 累计发电
BigDecimal allReleaseElec = elecMeterValueService.selectSumValue(station.getId(),DeviceTypeConstant.ELEC_METER_VALUE_TYPE.PV_CHARGE,null);
totalReleaseElec = totalReleaseElec.add(allReleaseElec);
}
//装机容量、电站数量
annualOverviewResp.setCapacity(capacity);
annualOverviewResp.setStationNumber(stationNumber);
// 今日收益、年收益、累计收益
annualOverviewResp.setTodayIncone(todayIncone);
annualOverviewResp.setYearIncone(yearIncone.add(todayIncone));
annualOverviewResp.setTotalIncome(totalIncome.add(todayIncone));
//今日发电量、年发电量、累计发电量
annualOverviewResp.setDailyReleaseElec(dailyReleaseElec);
annualOverviewResp.setYearReleaseElec(yearReleaseElec.add(dailyReleaseElec));
annualOverviewResp.setTotalReleaseElec(totalReleaseElec.add(dailyReleaseElec));
return annualOverviewResp;
}
private AnnualOverviewResp getOverviewDatas(List<Station> list) {
AnnualOverviewResp annualOverviewResp = new AnnualOverviewResp();
List<Station> stations = new ArrayList<>();
@ -466,7 +531,23 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
List<Station> list = stationService.selectAll();
return getEnergySavingRespVo(list);
}
private EnergySavingRespVo getPvEnergySavingRespVo(List<Station> list){
EnergySavingRespVo energySavingRespVo = new EnergySavingRespVo();
AnnualPvOverviewResp vo = getPvOverviewDatas(list);
BigDecimal totalReleaseElec = vo.getTotalReleaseElec();
BigDecimal reductionCO2 = totalReleaseElec.multiply(value);
energySavingRespVo.setReductionCO2(reductionCO2);
//等效植树量 等效植树量=等效减排CO2/183/40
BigDecimal treePlanting = reductionCO2.divide(parameter, 6, BigDecimal.ROUND_HALF_UP).divide(fours, 6, BigDecimal.ROUND_HALF_UP);
energySavingRespVo.setTreePlanting(treePlanting);
//等效节约煤 等效节约煤=所有电站总充*节约标准煤转换系数(04)
BigDecimal equivalentCoal = totalReleaseElec.multiply(four);
energySavingRespVo.setEquivalentCoal(equivalentCoal);
//等效经济收入 等效经济收入=等效节约煤*煤价 (600元/吨) 等效节约煤此处单位为kg,故而单价调整为0.6元/kg
energySavingRespVo.setIncome(equivalentCoal.multiply(coalPrice));
return energySavingRespVo;
}
private EnergySavingRespVo getEnergySavingRespVo(List<Station> list) {
EnergySavingRespVo energySavingRespVo = new EnergySavingRespVo();
List<Station> stations = new ArrayList<>();
@ -503,8 +584,8 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
//等效节约煤 等效节约煤=所有电站总充*节约标准煤转换系数(04)
BigDecimal equivalentCoal = totalCharge.multiply(four);
energySavingRespVo.setEquivalentCoal(equivalentCoal);
//等效经济收入 等效经济收入=所有电站总充*对应谷时电价
energySavingRespVo.setIncome(income);
//等效经济收入 等效经济收入=等效节约煤*煤价 (600元/吨) 等效节约煤此处单位为kg,故而单价调整为0.6元/kg
energySavingRespVo.setIncome(equivalentCoal.multiply(coalPrice));
return energySavingRespVo;
}
@ -517,6 +598,56 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
return subdataList;
}
private List<Subdata> getPvElec(String beginString, String endString, List<Station> stations){
Map<Integer, Station> stationMap = stations.stream().collect(Collectors.toMap(Station::getId, Function.identity()));
Integer groupId = null;
for (Station station : stations) {
groupId = station.getGroupId();
}
List<DayProfitType> stationElec = elecMeterValueService.getElec(beginString, endString, groupId,DeviceTypeConstant.ELEC_METER_VALUE_TYPE.PV_CHARGE,null);
Map<Integer, List<DayProfitType>> profitMap = stationElec.stream().collect(Collectors.groupingBy(DayProfitType::getStationId));
//创建返回对象
List<Subdata> subdataList = new ArrayList<>();
profitMap.forEach((k, v) -> {
Subdata subdata = new Subdata();
//收益
BigDecimal result = v.stream().map(DayProfitType::getDigital).reduce(BigDecimal.ZERO,BigDecimal::add);
if (stationMap.containsKey(k)) {
Station station = stationMap.get(k);
subdata.setStationId(k);
subdata.setStationName(station.getName());
subdata.setRelease(result);
subdataList.add(subdata);
}
});
subdataList.sort(Comparator.comparing((Subdata::getRelease)).reversed());
return subdataList;
}
private List<Subdata> getPvSubdata(String beginString, String endString, List<Station> stations){
Map<Integer, Station> stationMap = stations.stream().collect(Collectors.toMap(Station::getId, Function.identity()));
Integer groupId = null;
for (Station station : stations) {
groupId = station.getGroupId();
}
List<DayProfitType> stationProfit = earningsCalculateMpptService.getProfit(beginString, endString, groupId);
Map<Integer, List<DayProfitType>> profitMap = stationProfit.stream().collect(Collectors.groupingBy(DayProfitType::getStationId));
//创建返回对象
List<Subdata> subdataList = new ArrayList<>();
profitMap.forEach((k, v) -> {
Subdata subdata = new Subdata();
//收益
BigDecimal result = v.stream().map(DayProfitType::getDigital).reduce(BigDecimal.ZERO,BigDecimal::add);
if (stationMap.containsKey(k)) {
Station station = stationMap.get(k);
subdata.setStationId(k);
subdata.setStationName(station.getName());
subdata.setIncomeValue(result);
subdataList.add(subdata);
}
});
subdataList.sort(Comparator.comparing((Subdata::getIncomeValue)).reversed());
return subdataList;
}
@NotNull
private List<Subdata> getSubdata(String beginString, String endString, List<Station> stations) {
Map<Integer, Station> stationMap = stations.stream().collect(Collectors.toMap(Station::getId, Function.identity()));
@ -570,6 +701,76 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
return subdataList;
}
private List<Subdata> getPvElecByDay(String beginString, String endString, List<Station> stations){
Map<Integer, Station> stationMap = stations.stream().collect(Collectors.toMap(Station::getId, Function.identity()));
Integer groupId = null;
List<Integer> ids = new ArrayList<>();
for (Station station : stations) {
groupId = station.getGroupId();
ids.add(station.getId());
}
CommonBigScreenReq req = new CommonBigScreenReq();
req.setBeginTime(beginString);
req.setEndTime(endString);
req.setStationIds(ids);
req.setGroupId(groupId);
List<DayProfitType> stationElec = elecMeterValueService.getElec(beginString, endString, groupId,DeviceTypeConstant.ELEC_METER_VALUE_TYPE.PV_CHARGE,ids);
Map<String, List<DayProfitType>> elecMap = stationElec.stream().collect(Collectors.groupingBy(s -> s.getStationId() + "," + s.getDay()));
//创建返回对象
List<Subdata> subdataList = new ArrayList<>();
elecMap.forEach((k, v) -> {
Subdata subdata = new Subdata();
// 收益
BigDecimal result = v.stream().map(DayProfitType::getDigital).reduce(BigDecimal.ZERO,BigDecimal::add);
String[] split = k.split(",");
Integer stationId = Integer.parseInt(split[0]);
if (stationMap.containsKey(stationId)) {
Station station = stationMap.get(stationId);
subdata.setStationId(stationId);
subdata.setStationName(split[1] + station.getName());
subdata.setRelease(result);
subdataList.add(subdata);
}
});
subdataList.sort(Comparator.comparing((Subdata::getRelease)).reversed());
return subdataList;
}
private List<Subdata> getPvSubdataByDay(String beginString, String endString, List<Station> stations){
Map<Integer, Station> stationMap = stations.stream().collect(Collectors.toMap(Station::getId, Function.identity()));
Integer groupId = null;
List<Integer> ids = new ArrayList<>();
for (Station station : stations) {
groupId = station.getGroupId();
ids.add(station.getId());
}
CommonBigScreenReq req = new CommonBigScreenReq();
req.setBeginTime(beginString);
req.setEndTime(endString);
req.setStationIds(ids);
req.setGroupId(groupId);
List<DayProfitType> stationProfit = earningsCalculateMpptService.getEarningsByParam(req);
Map<String, List<DayProfitType>> profitMap = stationProfit.stream().collect(Collectors.groupingBy(s -> s.getStationId() + "," + s.getDay()));
//创建返回对象
List<Subdata> subdataList = new ArrayList<>();
profitMap.forEach((k, v) -> {
Subdata subdata = new Subdata();
// 收益
BigDecimal result = v.stream().map(DayProfitType::getDigital).reduce(BigDecimal.ZERO,BigDecimal::add);
String[] split = k.split(",");
Integer stationId = Integer.parseInt(split[0]);
if (stationMap.containsKey(stationId)) {
Station station = stationMap.get(stationId);
subdata.setStationId(stationId);
subdata.setStationName(split[1] + station.getName());
subdata.setIncomeValue(result);
subdataList.add(subdata);
}
});
subdataList.sort(Comparator.comparing((Subdata::getIncomeValue)).reversed());
return subdataList;
}
private List<Subdata> getSubdataByDay(String beginString, String endString, List<Station> stations) {
Map<Integer, Station> stationMap = stations.stream().collect(Collectors.toMap(Station::getId, Function.identity()));
@ -966,48 +1167,15 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
}
private List<ProvinceStation> getProvince(List<Station> stations) {
//地址选取前三个字
// Map<String, List<Station>> provincesMap = stations.stream().sorted(Comparator.comparing(Station::getName)).collect(Collectors.groupingBy(s -> {
// return s.getAddress().substring(0, 3);
// }));
// //创建返回值集合
// List<ProvinceStation> provinceList = new ArrayList<>();
// provincesMap.forEach((k, v) -> {
// ProvinceStation provinceStation = new ProvinceStation();
// if (k.contains("省")) {
// provinceStation.setName(k.replace("省", ""));
// } else if (k.contains("广西")) {
// provinceStation.setName(CommonConstant.ChineseProvinces.guangxi);
// } else if (k.contains("宁夏")) {
// provinceStation.setName(CommonConstant.ChineseProvinces.ningxia);
// } else if (k.contains("内蒙古")) {
// provinceStation.setName(CommonConstant.ChineseProvinces.neimenggu);
// } else if (k.contains("新疆")) {
// provinceStation.setName(CommonConstant.ChineseProvinces.xinjiang);
// } else if (k.contains("西藏")) {
// provinceStation.setName(CommonConstant.ChineseProvinces.xizang);
// } else if (k.contains("香港")) {
// provinceStation.setName(CommonConstant.ChineseProvinces.xianggang);
// } else if (k.contains("澳门")) {
// provinceStation.setName(CommonConstant.ChineseProvinces.aomen);
// } else {
// provinceStation.setName(k.replaceFirst("市", ""));
// }
// provinceStation.setList(v);
// provinceList.add(provinceStation);
// });
List<TranslateProvince> dictProvince = translateProvinceMapper.getDictProvince();
Map<String, String> provinceMap = dictProvince.stream().collect(Collectors.toMap(s -> s.getName(), s -> s.getNameEn(), (k1, k2) -> k1));
Map<String, List<Station>> provincesMap = stations.stream().filter(s->s.getProvince()!=null).collect(Collectors.groupingBy(Station::getProvince));
List<ProvinceStation> provinceList = new ArrayList<>();
provincesMap.forEach((k, v) -> {
Map<String, List<Station>> natioMap = stations.stream().filter(s->s.getProvince()!=null).collect(Collectors.groupingBy(Station::getNation));
List<ProvinceStation> list = new ArrayList<>();
natioMap.forEach((k, v) -> {
ProvinceStation provinceStation = new ProvinceStation();
provinceStation.setName(k);
provinceStation.setNameEn(provinceMap.get(k));
provinceStation.setList(v);
provinceList.add(provinceStation);
list.add(provinceStation);
});
return provinceList;
return list;
}
@Override
@ -1063,6 +1231,36 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
return getAnnualChartValues(stations);
}
private List<AnnualChartValue> getAnnualReleaseValues(List<Station> stations){
Integer groupId = null;
for (Station station : stations) {
groupId = station.getGroupId();
}
//时间近30天
Date date = DateUtil.yesterday();
Date startDate = DateUtils.addDays(date, -maxSize);
Date endDate = DateUtil.endOfDay(date);
List<DateTime> dateTimes = DateUtil.rangeToList(startDate, endDate, DateField.DAY_OF_MONTH);
String beginTime = DateUtil.format(startDate, CommonConstant.DATE_YMD);
String endTime = DateUtil.format(endDate, CommonConstant.DATE_YMD);
List<DayProfitType> stationElec = elecMeterValueService.getElec(beginTime, endTime, groupId,DeviceTypeConstant.ELEC_METER_VALUE_TYPE.PV_CHARGE,null);
Map<String, List<DayProfitType>> elecMap = stationElec.stream().collect(Collectors.groupingBy(s -> s.getDay()));
List<AnnualChartValue> resultList = new ArrayList<>();
for (DateTime dateTime:dateTimes){
AnnualChartValue annualChartValue = new AnnualChartValue();
BigDecimal release = BigDecimal.ZERO;
String time = DateUtil.format(dateTime, CommonConstant.DATE_YMD);
List<DayProfitType> elecList = elecMap.get(time);
if(elecList != null && elecList.size()>0){
release = elecList.stream().map(DayProfitType::getDigital).reduce(BigDecimal.ZERO,BigDecimal::add);
}
annualChartValue.setTime(time);
annualChartValue.setRelease(release);
resultList.add(annualChartValue);
}
return resultList;
}
private List<AnnualChartValue> getAnnualChartValues(List<Station> stations) {
//时间近30天
Date date = DateUtil.yesterday();
@ -1132,47 +1330,6 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
annualChartValue.setDayDischarge(totalDischarge);
resultList.add(annualChartValue);
}
/*********************************************************/
// List<AnnualChartValue> annualChartList = new ArrayList<>();
// annualChartList = dateTimes.stream().map(s -> {
// AnnualChartValue annualChartValue = new AnnualChartValue();
// String dateString = s + "";
// String substring = dateString.substring(0, 10);
// annualChartValue.setTime(substring);
// annualChartValue.setDayCharge(BigDecimal.ZERO);
// annualChartValue.setDayDischarge(BigDecimal.ZERO);
// return annualChartValue;
// }).collect(Collectors.toList());
// for (AnnualChartValue annualChartValue : annualChartList) {
// String time = annualChartValue.getTime();
// //年总充/年总放(日冻结表计算)或者总充/总放
// BigDecimal yearCharge = BigDecimal.ZERO;
// BigDecimal yearDischarge = BigDecimal.ZERO;
// List<ElecMeterValue> byTimeList = getByTimeList(stations, time, time);
// List<ElecMeterValue> chargeList = new ArrayList<>();
// byTimeList.stream().filter(i -> DeviceTypeConstant.ELEC_METER_VALUE_TYPE.CHARGE.equals(i.getType())).forEach(s -> chargeList.add(s));
// List<ElecMeterValue> disList = new ArrayList<>();
// byTimeList.stream().filter(i -> DeviceTypeConstant.ELEC_METER_VALUE_TYPE.DISCHARGE.equals(i.getType())).forEach(s -> disList.add(s));
// for (ElecMeterValue elecMeterValue : chargeList) {
// if (FENGStationId == elecMeterValue.getStationId()) {
// yearCharge = yearCharge.add(elecMeterValue.getDigital().multiply(new BigDecimal("1000")));
// } else {
// yearCharge = yearCharge.add(elecMeterValue.getDigital());
// }
//
// }
// for (ElecMeterValue elecMeterValue : disList) {
// if (FENGStationId == elecMeterValue.getStationId()) {
// yearDischarge = yearDischarge.add(elecMeterValue.getDigital().multiply(new BigDecimal("1000")));
// } else {
// yearDischarge = yearDischarge.add(elecMeterValue.getDigital());
// }
//
// }
//
// annualChartValue.setDayCharge(yearCharge);
// annualChartValue.setDayDischarge(yearDischarge);
// }
return resultList;
}
@ -1293,28 +1450,79 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
if (stationIds == null) {
return new AnnualOverviewResp();
}
List<Station> list = stationService.selectStationsByIds(stationIds);
List<Station> list = stationService.selectStationsByIds(stationIds,null);
AnnualOverviewResp annualOverviewResp = getOverviewDatas(list);
return annualOverviewResp;
}
@Override
public AnnualPvOverviewResp getPvOverviewData(List<Integer> stationIds) {
if (stationIds == null) {
return new AnnualPvOverviewResp();
}
List<Station> list = getCountPvStations(stationIds);
AnnualPvOverviewResp annualOverviewResp = getPvOverviewDatas(list);
return annualOverviewResp;
}
@Override
public EnergySavingRespVo getPvEnergySaving(List<Integer> stationIds) {
if (stationIds == null) {
return new EnergySavingRespVo();
}
List<Station> list = getCountPvStations(stationIds);
return getPvEnergySavingRespVo(list);
}
@Override
public List<AnnualChartValue> getPVCommonProfitCurve(CockpitReqVO vo, List<Integer> stationIds) {
if (stationIds == null) {
return new ArrayList<>();
}
List<Station> list = getCountPvStations(stationIds);
return getPvProfitCurve(vo, list);
}
@Override
public List<Subdata> getCommonRegionList(List<Integer> stationIds) {
if (stationIds == null) {
return new ArrayList<>();
}
List<Station> list = getCountStations(stationIds);
List<Station> list = getCountStations(stationIds,null);
List<Subdata> regionList = new ArrayList<>();
Map<String, List<Station>> provinceMap = list.stream().filter(i -> i.getProvince() != null).collect(Collectors.groupingBy(Station::getProvince));
if (provinceMap.size() > CommonConstant.ONE) {
regionList = getListSubdata(provinceMap);
Map<String, List<Station>> nationMap = list.stream().filter(i -> i.getProvince() != null).collect(Collectors.groupingBy(Station::getNation));
if (nationMap.size() > CommonConstant.ONE) {
regionList = getListSubdata(nationMap);
} else {
Map<String, List<Station>> cityMap = list.stream().filter(i -> i.getCity() != null).collect(Collectors.groupingBy(Station::getCity));
if (cityMap.size() > CommonConstant.ONE) {
regionList = getListSubdata(cityMap);
Map<String, List<Station>> provinceMap = list.stream().filter(i -> i.getCity() != null).collect(Collectors.groupingBy(Station::getProvince));
if (provinceMap.size() > CommonConstant.ONE) {
regionList = getListSubdata(provinceMap);
} else {
Map<String, List<Station>> districtMap = list.stream().filter(i -> i.getDistrict() != null).collect(Collectors.groupingBy(Station::getDistrict));
regionList = getListSubdata(districtMap);
Map<String, List<Station>> cityMap = list.stream().filter(i -> i.getDistrict() != null).collect(Collectors.groupingBy(Station::getCity));
regionList = getListSubdata(cityMap);
}
}
return regionList;
}
@Override
public List<Subdata> getCommonPvRegionList(List<Integer> stationIds) {
if (stationIds == null) {
return new ArrayList<>();
}
List<Station> list = getCountPvStations(stationIds);
List<Subdata> regionList = new ArrayList<>();
Map<String, List<Station>> nationMap = list.stream().filter(i -> i.getProvince() != null).collect(Collectors.groupingBy(Station::getNation));
if (nationMap.size() > CommonConstant.ONE) {
regionList = getListSubdata(nationMap);
} else {
Map<String, List<Station>> provinceMap = list.stream().filter(i -> i.getCity() != null).collect(Collectors.groupingBy(Station::getProvince));
if (provinceMap.size() > CommonConstant.ONE) {
regionList = getListSubdata(provinceMap);
} else {
Map<String, List<Station>> cityMap = list.stream().filter(i -> i.getDistrict() != null).collect(Collectors.groupingBy(Station::getCity));
regionList = getListSubdata(cityMap);
}
}
return regionList;
@ -1331,7 +1539,22 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
}
return regionList;
}
public List<AnnualChartValue> getPvProfitCurve(CockpitReqVO vo, List<Station> stations){
List<AnnualChartValue> curveResult = new ArrayList<>();
Integer groupId = null;
for (Station station : stations) {
groupId = station.getGroupId();
}
if (CommonConstant.DAY.equals(vo.getType())) {
setDayPvCurveResult(curveResult, groupId, stations);
} else if (CommonConstant.YEAR.equals(vo.getType())) {
setYearPVCurveResult(curveResult, groupId, stations);
} else {
setMonthPvCurveResult(curveResult, groupId, stations);
}
return curveResult;
}
public List<AnnualChartValue> getProfitCurve(CockpitReqVO vo, List<Station> stations) {
List<AnnualChartValue> curveResult = new ArrayList<>();
Integer groupId = null;
@ -1354,7 +1577,7 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
if (stationIds == null) {
return new EnergySavingRespVo();
}
List<Station> list = getCountStations(stationIds);
List<Station> list = getCountStations(stationIds,null);
return getEnergySavingRespVo(list);
}
@ -1363,7 +1586,7 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
if (stationIds == null) {
return new ArrayList<>();
}
List<Station> list = getCountStations(stationIds);
List<Station> list = getCountStations(stationIds,null);
return getProfitCurve(vo, list);
}
@ -1372,16 +1595,69 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
if (stationIds == null) {
return new ArrayList<>();
}
return getAnnualChartValues(getCountStations(stationIds));
return getAnnualChartValues(getCountStations(stationIds,null));
}
@Override
public List<Subdata> getCommonProfit(String beginString, String endString, List<Integer> stationIds) {
public List<AnnualChartValue> getCommonPvRelease(List<Integer> stationIds){
if (stationIds == null) {
return new ArrayList<>();
}
return getAnnualReleaseValues(getCountPvStations(stationIds));
}
@Override
public List<Subdata> getPvCommonElec(String beginString, String endString,List<Integer> stationIds){
List<Subdata> subdata = new ArrayList<>();
if (stationIds == null) {
return subdata;
}
List<Station> countStations = getCountStations(stationIds);
List<Station> countStations = getCountPvStations(stationIds);
if (countStations != null && !countStations.isEmpty()) {
if (countStations.size() >= CommonConstant.FIVE) {
subdata = getPvElec(beginString,endString,countStations);
} else {
//电站数目小于5个
Date date = DateUtil.yesterday();
Date startDate = DateUtils.addDays(date, -CommonConstant.FIVE);
Date endDate = DateUtil.endOfDay(date);
beginString = DateUtil.format(startDate, CommonConstant.DATE_YMD);
endString = DateUtil.format(endDate, CommonConstant.DATE_YMD);
subdata = getPvElecByDay(beginString, endString, countStations);
}
}
return subdata;
}
@Override
public List<Subdata> getPvCommonProfit(String beginString, String endString,List<Integer> stationIds){
List<Subdata> subdata = new ArrayList<>();
if (stationIds == null) {
return subdata;
}
List<Station> countStations = getCountPvStations(stationIds);
if (countStations != null && !countStations.isEmpty()) {
if (countStations.size() >= CommonConstant.FIVE) {
subdata = getPvSubdata(beginString,endString,countStations);
} else {
//电站数目小于5个
Date date = DateUtil.yesterday();
Date startDate = DateUtils.addDays(date, -CommonConstant.FIVE);
Date endDate = DateUtil.endOfDay(date);
beginString = DateUtil.format(startDate, CommonConstant.DATE_YMD);
endString = DateUtil.format(endDate, CommonConstant.DATE_YMD);
subdata = getPvSubdataByDay(beginString, endString, countStations);
}
}
return subdata;
}
@Override
public List<Subdata> getCommonProfit(String beginString, String endString, List<Integer> stationIds,String lang) {
List<Subdata> subdata = new ArrayList<>();
if (stationIds == null) {
return subdata;
}
List<Station> countStations = getCountStations(stationIds,lang);
if (countStations != null && !countStations.isEmpty()) {
if (countStations.size() >= CommonConstant.FIVE) {
subdata = getSubdata(beginString, endString, countStations);
@ -1399,12 +1675,12 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
}
@Override
public List<Subdata> getCommonEfficiencyDate(List<Integer> stationIds) {
public List<Subdata> getCommonEfficiencyDate(List<Integer> stationIds,String lang) {
List<Subdata> subdata = new ArrayList<>();
if (stationIds == null) {
return subdata;
}
List<Station> countStations = getCountStations(stationIds);
List<Station> countStations = getCountStations(stationIds,lang);
if (countStations != null && !countStations.isEmpty()) {
subdata = getEfficiencyDate(countStations);
// if (countStations.size() >= CommonConstant.FIVE) {
@ -1426,6 +1702,16 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
return subdata;
}
private void setMonthPvCurveResult(List<AnnualChartValue> curveResult, Integer groupId, List<Station> stations) {
Date date = DateUtil.yesterday();
Date startDate = DateUtil.beginOfYear(date);
Date endDate = DateUtil.endOfDay(date);
String begin = DateUtil.format(startDate, CommonConstant.DATE_YMD);
String end = DateUtil.format(endDate, CommonConstant.DATE_YMD);
List<DateTime> dateTime = DateUtil.rangeToList(startDate, endDate, DateField.MONTH);
setPvProfitByDayFormat(curveResult, groupId, dateTime, begin, end, CommonConstant.DATE_YM, stations);
}
private void setMonthCurveResult(List<AnnualChartValue> curveResult, Integer groupId, List<Station> stations) {
Date date = DateUtil.yesterday();
Date startDate = DateUtil.beginOfYear(date);
@ -1436,6 +1722,19 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
setProfitByDayFormat(curveResult, groupId, dateTime, begin, end, CommonConstant.DATE_YM, stations);
}
private void setYearPVCurveResult(List<AnnualChartValue> curveResult, Integer groupId, List<Station> stations) {
//查询数据的最小日期
Date beginDate = earningsCalculateMpptService.getFirstTime();
if(beginDate != null){
Date date = DateUtil.yesterday();
Date startDate = DateUtil.beginOfYear(beginDate);
Date endDate = DateUtil.endOfDay(date);
String begin = DateUtil.format(startDate, CommonConstant.DATE_YMD);
String end = DateUtil.format(endDate, CommonConstant.DATE_YMD);
List<DateTime> dateTime = DateUtil.rangeToList(startDate, endDate, DateField.YEAR);
setPvProfitByDayFormat(curveResult, groupId, dateTime, begin, end, CommonConstant.DATE_Y, stations);
}
}
private void setYearCurveResult(List<AnnualChartValue> curveResult, Integer groupId, List<Station> stations) {
//查询数据的最小日期
Date beginDate = earningsCalculateService.getFirstTime();
@ -1449,6 +1748,16 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
setProfitByDayFormat(curveResult, groupId, dateTime, begin, end, CommonConstant.DATE_Y, stations);
}
}
private void setDayPvCurveResult(List<AnnualChartValue> curveResult, Integer groupId, List<Station> stations) {
//开始结束时间为30天
Date date = DateUtil.yesterday();
Date startDate = DateUtils.addDays(date, -maxSize);
Date endDate = DateUtil.endOfDay(date);
String begin = DateUtil.format(startDate, CommonConstant.DATE_YMD);
String end = DateUtil.format(endDate, CommonConstant.DATE_YMD);
List<DateTime> dateTime = DateUtil.rangeToList(startDate, endDate, DateField.DAY_OF_MONTH);
setPvProfitByDayFormat(curveResult, groupId, dateTime, begin, end, CommonConstant.DATE_YMD, stations);
}
private void setDayCurveResult(List<AnnualChartValue> curveResult, Integer groupId, List<Station> stations) {
//开始结束时间为30天
@ -1461,6 +1770,37 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
setProfitByDayFormat(curveResult, groupId, dateTime, begin, end, CommonConstant.DATE_YMD, stations);
}
private void setPvProfitByDayFormat(List<AnnualChartValue> curveResult, Integer groupId, List<DateTime> dateTimes, String begin, String end, String type, List<Station> stations) {
Map<Integer, List<Station>> stationMap = stations.stream().collect(Collectors.groupingBy(Station::getId));
//查询收益
List<DayProfitType> dayProfit = earningsCalculateMpptService.getProfit(begin, end, groupId);
//在使用之前将不要的电站过滤
List<DayProfitType> profitList = new ArrayList<>();
for (DayProfitType dayProfitType : dayProfit) {
if (stationMap.containsKey(dayProfitType.getStationId())) {
profitList.add(dayProfitType);
}
}
Map<String, List<DayProfitType>> dayMap = profitList.stream().collect(Collectors.groupingBy(DayProfitType::getDay));
for (DateTime dateTime : dateTimes) {
AnnualChartValue annualChartValue = new AnnualChartValue();
String day = DateUtil.format(dateTime, type);
List<DayProfitType> dayProfitTypes = new ArrayList<>();
Set<String> dayList = dayMap.keySet();
for (String key : dayList) {
if (key.contains(day)) {
dayProfitTypes.addAll(dayMap.get(key));
}
}
//收益
BigDecimal profit = dayProfitTypes.stream().map(DayProfitType::getDigital).reduce(BigDecimal.ZERO,BigDecimal::add);
// BigDecimal result = profit.divide(new BigDecimal("10000"));
annualChartValue.setProfit(profit);
annualChartValue.setTime(day);
curveResult.add(annualChartValue);
}
}
private void setProfitByDayFormat(List<AnnualChartValue> curveResult, Integer groupId, List<DateTime> dateTimes, String begin, String end, String type, List<Station> stations) {
//直接查询需要的电站
// List<Station> list = stationService.selectAll();
@ -1701,17 +2041,24 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
* @return
*/
@Override
public List<Station> getCountStations(List<Integer> stationIds) {
List<Station> list = stationService.selectStationsByIds(stationIds);
public List<Station> getCountStations(List<Integer> stationIds,String lang) {
List<Station> list = stationService.selectStationsByIds(stationIds,lang);
List<Station> oneList = list.stream().filter(i -> CommonConstant.ONE.equals(i.getStatus())).collect(Collectors.toList());
return oneList;
}
public List<Station> getCountPvStations(List<Integer> stationIds) {
List<Station> list = stationService.selectStationsByIds(stationIds,null);
List<Station> oneList = list.stream().filter(i -> CommonConstant.ONE.equals(i.getStatus()) && CommonConstant.ONE.equals(i.getInverterFlag())).collect(Collectors.toList());
return oneList;
}
@Override
public List<Subdata> getCommonCapacity(List<Integer> stationIds) {
public List<Subdata> getCommonCapacity(List<Integer> stationIds,String lang) {
List<Subdata> subDataList = new ArrayList<>();
if (stationIds != null) {
List<Station> stations = getCountStations(stationIds);
List<Station> stations = getCountStations(stationIds,lang);
subDataList = getSubdataList(stations);
}
return subDataList;

Some files were not shown because too many files have changed in this diff Show More