41 Commits
dev ... paris

Author SHA1 Message Date
a859c4b649 光伏今日放电统计逻辑修改 2026-02-03 17:57:41 +08:00
2e6cee7f49 光伏收益报表导出 2026-02-03 15:03:13 +08:00
93460199b2 摸版修改 2026-02-03 10:39:30 +08:00
805d7d01fb 光伏mppt收益修改 2026-02-02 09:25:39 +08:00
292a7c7376 远控查询修改 2026-01-29 14:06:21 +08:00
0c4b8b8ca9 Merge remote-tracking branch 'origin/paris' into paris
# Conflicts:
#	common-tools/src/main/java/com/ho/common/tools/util/AliSendSmsUtils.java
2026-01-29 13:42:52 +08:00
7d641db749 短信配置修改 2026-01-29 13:42:00 +08:00
605de0a6cd 短信配置修改 2026-01-29 13:40:56 +08:00
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
0a94f51e0d Merge branch 'dev' into paris 2025-07-15 10:14:12 +08:00
af8f225384 Merge branch 'dev' into paris 2025-07-14 15:28:32 +08:00
e1cfe7f911 欧洲巴黎配置 2025-07-11 17:16:10 +08:00
200 changed files with 6183 additions and 3364 deletions

View File

@ -10,7 +10,7 @@ spring:
username: nacos
password: nacos
discovery:
server-addr: 192.168.0.142:8848
server-addr: 172.31.9.103:8848
#路由配置
gateway:
routes:

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

@ -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;
@ -121,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,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

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

View File

@ -132,4 +132,7 @@ public class StationReqVO {
@ApiModelProperty(value = "电站id集合",hidden = true)
private List<Integer> ids;
@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,7 +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

@ -1,47 +0,0 @@
package com.ho.business.vo.resp;
import com.alibaba.fastjson.JSONArray;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 主监控汇总信息
*/
@Data
public class ShipStationRespVO {
@ApiModelProperty(value = "储能系统累计收益,单位(元)")
private Float incomeSum;
@ApiModelProperty(value = "储能系统昨⽇收益")
private Float incomeYesterday;
@ApiModelProperty(value = "储能系统累计充电量单位kWh")
private Float positivePowerSum;
@ApiModelProperty(value = "储能系统累计放电量单位kWh")
private Float reversePowerSum;
@ApiModelProperty(value = "储能系统今⽇充电量单位kWh")
private Float positivePowerToday;
@ApiModelProperty(value = "储能系统今⽇放电量单位kWh")
private Float reversePowerToday;
@ApiModelProperty(value = "储能系统实时功率单位kw")
private Float realTimePower;
@ApiModelProperty(value = "关⼝表电压单位v")
private Float voltage;
@ApiModelProperty(value = "储能系统剩余电量单位kwh")
private Float surplus;
@ApiModelProperty(value = "储能系统剩余SOC")
private Float soc;
@ApiModelProperty(value = "储能系统装机容量单位kWh")
private Integer capacity;
@ApiModelProperty(value = "储能系统投运时⻓,单位(天)")
private Integer operationTime;
@ApiModelProperty(value = "储能系统能量链数量,单位(条)")
private Integer eLinkNumber;
@ApiModelProperty(value = "储能系统在线能量链数量,单位(条)")
private Integer eLinkOnline;
@ApiModelProperty(value = "储能系统能量块数量,单位(个)")
private Integer eBLockNumber;
@ApiModelProperty(value = "储能系统在线能量块数量,单位(个)")
private Integer eBlockOnline;
@ApiModelProperty(value = "储能系统今⽇功率和soc曲线")
private JSONArray historyDataList;
}

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

@ -31,8 +31,6 @@ public class AnnualOverviewResp {
@ApiModelProperty(value = "年总充")
BigDecimal yearCharge;
@ApiModelProperty(value = "今日收益")
BigDecimal todayProfit;
@ApiModelProperty(value = "昨日收益")
BigDecimal yestProfit;

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

@ -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

@ -85,7 +85,7 @@ public interface TdFeignClient {
Integer getCountData(@RequestBody TdBase tdBase);
@PostMapping(value = ContextConstant.TD_CONTEXT + "device001/selectMaxValue")
DataResult<PointData> selectMaxValue(@RequestBody TdBaseTimeQuery query);
DataResult<PointData> selectMaxValue(@RequestBody TdBaseTimeQuery query);
@PostMapping(value = ContextConstant.TD_CONTEXT + "device001/queryPointTableList")
DataResult<List<StationHomeRespVo>> queryPointTableList(@RequestBody TdBaseTimeQuery query);

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

@ -17,18 +17,18 @@ import java.math.BigDecimal;
import java.util.List;
/**
* @author xwz
* @description 针对表【earnings_calculate】的数据库操作Mapper
* @createDate 2023-09-26
* @Entity com.ho.business.entity.EarningsCalculate
*/
* @author xwz
* @description 针对表【earnings_calculate】的数据库操作Mapper
* @createDate 2023-09-26
* @Entity com.ho.business.entity.EarningsCalculate
*/
@Mapper
public interface EarningsCalculateMapper {
int insertSelective(EarningsCalculate record);
int deleteByDay(@Param("day") String day, @Param("typeList") List<Integer> typeList);
int deleteByStationAndDay(@Param("day") String day, @Param("typeList") List<Integer> typeList, @Param("stationId") Integer stationId);
int insertBatch(List<EarningsCalculate> list);
// 类型是传入多个
//List<EarningsCalculate> selectList(@Param("stationId") Integer stationId, @Param("typeList") List<Integer> typeList, @Param("beginTime") String beginTime, @Param("endTime") String endTime);

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,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

@ -1,354 +0,0 @@
package com.ho.business.service;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.google.common.collect.Maps;
import com.ho.business.constant.DeviceTypeConstant;
import com.ho.business.entity.EarningsCalculate;
import com.ho.business.entity.ElecMeterValue;
import com.ho.business.mapper.EarningsCalculateMapper;
import com.ho.business.vo.req.carbin.EarningsCalculateReq;
import com.ho.business.vo.resp.ShipStationRespVO;
import com.ho.common.tools.constant.CommonConstant;
import com.ho.common.tools.service.RedisService;
import com.ho.common.tools.util.HttpUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.io.IOException;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.time.Instant;
import java.time.LocalDate;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.concurrent.TimeUnit;
/**
* 成都巨石 能源 储能
* 成都巨石能源 API 接口 服务
*
* @author kerwin
*/
@Service
@Slf4j
public class BoulderEnergyService {
/**
* 获取token 参数 appAccount
*/
private static final String APP_ACCOUNT = "cdjs_app";
/**
* 获取token 参数 appSecretKey
*/
private static final String APP_SECRET_KEY = "cdjs@0108";
/**
* 中车- 获取电站id
*/
private static final Integer BOULDER_STATION_ID = 11006;
/**
* 中车- 获取token Url
*/
private static final String TOKEN_URL = "http://111.15.176.77:18082/gate-newpc/zhny-openapi/openapi/v1/authentication/getAccessToken";
/**
* 中车- 统计数据 Url
*/
private static final String BOULDER_DATA_URL = "http://111.15.176.77:18082/gate-newpc/zhny-openapi/openapi/v1/statistics/station/qryIncDayBill";
@Autowired
private RedisService redisService;
@Autowired
ElecMeterValueService elecMeterValueService;
@Autowired
EarningsCalculateMapper earningsCalculateMapper;
/**
* 中车能源 - 获取token
* @return token
*/
public String getToken(){
String token = null;
if(redisService.hasKey(CommonConstant.BOULDER_ENERGY_TOKEN_KEY)){
token = (String)redisService.get(CommonConstant.BOULDER_ENERGY_TOKEN_KEY);
return token;
}
Map<String, Object> params = Maps.newHashMap();
params.put("appAccount",APP_ACCOUNT);
params.put("appSecretKey",APP_SECRET_KEY);
try {
String json = HttpUtils.postWithJson(TOKEN_URL,params);
log.info("json:" + TOKEN_URL);
log.info("json:" + json);
JSONObject jsonObject = JSONObject.parseObject(json);
Integer code = jsonObject.getInteger("code");
if(CommonConstant.HttpCode.SUCCESS_CODE.equals(code)){
JSONObject data = jsonObject.getJSONObject("data");
token = data.getString("accessToken");
//redis 缓存
redisService.set(CommonConstant.BOULDER_ENERGY_TOKEN_KEY,token,50, TimeUnit.SECONDS);
}
} catch (IOException e) {
throw new RuntimeException(e);
}
return token;
}
/**
* 中车能源 - 统计数据
* @param beginTime 开始时间
* @return
*/
public String getBoulderData(String beginTime){
Map<String, String> headers = new HashMap<>();
headers.put("Authorization", getToken());
Map<String, Object> params = new HashMap<>();
params.put("stationCode","SC020075040001");
params.put("time",beginTime);
String contentType = "application/json; charset=utf-8";
try {
String json = HttpUtils.postWithHeaders(BOULDER_DATA_URL,HttpUtils.mapToJson(params),contentType,headers);
log.info("MAIN_URL:" + BOULDER_DATA_URL);
log.info("json:" + json);
JSONObject jsonObject = JSONObject.parseObject(json);
Integer code = jsonObject.getInteger("code");
if(CommonConstant.HttpCode.SUCCESS_CODE.equals(code)){
String data = jsonObject.getString("data");
JSONObject dataJson = JSONObject.parseObject(data);
return dataJson.getString("records");
}
} catch (IOException e) {
throw new RuntimeException(e);
}
return null;
}
/*****************************************业务处理******************************************************/
/**
* 中车 - 获取电站历史收益、充放电数据并存储
*/
public void getBoulderEleIncome(String beginTime){
DateTime yesterday = DateUtil.yesterday();
String yesterdayStr = DateUtil.formatDate(yesterday);
if(beginTime==null){
beginTime = yesterdayStr;
}
long timestamp = dateStringToTimestamp(beginTime);
String records = getBoulderData(String.valueOf(timestamp));
JSONArray data = JSON.parseArray(records);
String finalBeginTime = beginTime;
data.forEach(i->{
List<EarningsCalculate> list = new ArrayList<>();
List<ElecMeterValue> elecList = new ArrayList<>();
JSONObject obj = (JSONObject) i;
String date = timestampToDateString(obj.getLong("balanceDate"));
if(finalBeginTime.equals(date)){
//收益-充-尖
EarningsCalculate sharpCharge = new EarningsCalculate();
BigDecimal sharpChargeEle = obj.getBigDecimal("sharpChargeElectricity");
sharpCharge.setElec(sharpChargeEle);
sharpCharge.setType(0);
sharpCharge.setRateType(CommonConstant.RateType.TIP);
sharpCharge.setPrice(BigDecimal.ZERO);
sharpCharge.setDigital(BigDecimal.ZERO);
sharpCharge.setTotal(BigDecimal.ZERO);
list.add(sharpCharge);
//收益-充-峰
EarningsCalculate peakCharge = new EarningsCalculate();
BigDecimal peakChargeEle = obj.getBigDecimal("peakChargeElectricity");
peakCharge.setElec(peakChargeEle);
peakCharge.setType(0);
peakCharge.setRateType(CommonConstant.RateType.PEAK);
peakCharge.setPrice(BigDecimal.ZERO);
peakCharge.setDigital(BigDecimal.ZERO);
peakCharge.setTotal(BigDecimal.ZERO);
list.add(peakCharge);
//收益-充-平
EarningsCalculate flatCharge = new EarningsCalculate();
BigDecimal flatChargeEle = obj.getBigDecimal("flatChargeElectricity");
flatCharge.setElec(flatChargeEle);
flatCharge.setType(0);
flatCharge.setRateType(CommonConstant.RateType.FLAT);
flatCharge.setPrice(BigDecimal.ZERO);
flatCharge.setDigital(BigDecimal.ZERO);
flatCharge.setTotal(BigDecimal.ZERO);
list.add(flatCharge);
//收益-充-谷
EarningsCalculate valleyCharge = new EarningsCalculate();
BigDecimal valleyChargeEle = obj.getBigDecimal("valleyChargeElectricity");
valleyCharge.setElec(valleyChargeEle);
valleyCharge.setType(0);
valleyCharge.setRateType(CommonConstant.RateType.VALLEY);
valleyCharge.setPrice(BigDecimal.ZERO);
valleyCharge.setDigital(BigDecimal.ZERO);
valleyCharge.setTotal(BigDecimal.ZERO);
list.add(valleyCharge);
//收益-充-深谷
EarningsCalculate deepValleyCharge = new EarningsCalculate();
BigDecimal deepValleyChargeEle = obj.getBigDecimal("deepValleyChargeElectricity");
deepValleyCharge.setElec(deepValleyChargeEle);
deepValleyCharge.setType(0);
deepValleyCharge.setRateType(CommonConstant.RateType.DEEP_VALLEY);
deepValleyCharge.setPrice(BigDecimal.ZERO);
deepValleyCharge.setDigital(BigDecimal.ZERO);
deepValleyCharge.setTotal(BigDecimal.ZERO);
list.add(deepValleyCharge);
//收益-放-尖
EarningsCalculate sharpDischarge = new EarningsCalculate();
BigDecimal reverseSharp = obj.getBigDecimal("sharpDischargeElectricity");
sharpDischarge.setElec(reverseSharp);
sharpDischarge.setType(1);
sharpDischarge.setRateType(CommonConstant.RateType.TIP);
sharpDischarge.setPrice(BigDecimal.ZERO);
sharpDischarge.setDigital(BigDecimal.ZERO);
sharpDischarge.setTotal(BigDecimal.ZERO);
list.add(sharpDischarge);
//收益-放-峰
EarningsCalculate peakDischarge = new EarningsCalculate();
BigDecimal peakDischargeEle = obj.getBigDecimal("peakDischargeElectricity");
peakDischarge.setElec(peakDischargeEle);
peakDischarge.setType(1);
peakDischarge.setRateType(CommonConstant.RateType.PEAK);
peakDischarge.setPrice(BigDecimal.ZERO);
peakDischarge.setDigital(BigDecimal.ZERO);
peakDischarge.setTotal(BigDecimal.ZERO);
list.add(peakDischarge);
//收益-放-平
EarningsCalculate flatDischarge = new EarningsCalculate();
BigDecimal flatDischargeEle = obj.getBigDecimal("flatDischargeElectricity");
flatDischarge.setElec(flatDischargeEle);
flatDischarge.setType(1);
flatDischarge.setRateType(CommonConstant.RateType.FLAT);
flatDischarge.setPrice(BigDecimal.ZERO);
flatDischarge.setDigital(BigDecimal.ZERO);
flatDischarge.setTotal(BigDecimal.ZERO);
list.add(flatDischarge);
//收益-放-谷
EarningsCalculate valleyDischarge = new EarningsCalculate();
BigDecimal valleyDischargeEle = obj.getBigDecimal("valleyDischargeElectricity");
valleyDischarge.setElec(valleyDischargeEle);
valleyDischarge.setType(1);
valleyDischarge.setRateType(CommonConstant.RateType.VALLEY);
valleyDischarge.setPrice(BigDecimal.ZERO);
valleyDischarge.setDigital(BigDecimal.ZERO);
valleyDischarge.setTotal(BigDecimal.ZERO);
list.add(valleyDischarge);
//收益-放-深谷
EarningsCalculate deepValleyDischarge = new EarningsCalculate();
BigDecimal deepValleyDischargeEle = obj.getBigDecimal("deepValleyDischargeElectricity");
BigDecimal income = obj.getBigDecimal("income");
deepValleyDischarge.setElec(deepValleyDischargeEle);
deepValleyDischarge.setType(1);
deepValleyDischarge.setRateType(CommonConstant.RateType.DEEP_VALLEY);
deepValleyDischarge.setPrice(BigDecimal.ZERO);
deepValleyDischarge.setDigital(income);
deepValleyDischarge.setTotal(income);
list.add(deepValleyDischarge);
// 充电
ElecMeterValue charge = new ElecMeterValue();
BigDecimal chargeEle = obj.getBigDecimal("chargeElectricity");
charge.setDigital(chargeEle);
charge.setType(DeviceTypeConstant.ELEC_METER_VALUE_TYPE.CHARGE);
charge.setStatus(CommonConstant.STATUS_FLAG);
elecList.add(charge);
// 放电
ElecMeterValue disCharge = new ElecMeterValue();
BigDecimal dischargeEle = obj.getBigDecimal("dischargeElectricity");
disCharge.setDigital(dischargeEle);
disCharge.setType(DeviceTypeConstant.ELEC_METER_VALUE_TYPE.DISCHARGE);
disCharge.setStatus(CommonConstant.STATUS_FLAG);
elecList.add(disCharge);
if(elecList.size()>0){
//删除
elecMeterValueService.deleteByStationAndDay(BOULDER_STATION_ID,date,null);
elecList.forEach(eleMeter -> {
eleMeter.setGroupId(155);
eleMeter.setStationId(BOULDER_STATION_ID);
eleMeter.setCreateTime(new Date());
eleMeter.setDay(date);
//新增
elecMeterValueService.insert(eleMeter);
});
}
if(list.size()>0){
//删除
earningsCalculateMapper.deleteByStationAndDay(date,null,BOULDER_STATION_ID);
list.forEach(a->{
a.setGroupId(155);
a.setStationId(BOULDER_STATION_ID);
a.setCreateTime(new Date());
a.setDay(date);
a.setDiscount(BigDecimal.ONE);
//新增
earningsCalculateMapper.insertSelective(a);
});
}
}
});
}
public void getCacheBoulderData(){
ShipStationRespVO vo = new ShipStationRespVO();
//查询电站收益数据
EarningsCalculateReq ec = new EarningsCalculateReq();
//昨日
DateTime yesterday = DateUtil.yesterday();
String yesterdayStr = DateUtil.formatDate(yesterday);
//今日
DateTime nowDay = DateUtil.date();
String nowDayStr = DateUtil.formatDate(nowDay);
//查询电站所有收益数据-组装参数
ec.setStationId(BOULDER_STATION_ID);
ec.setBeginTime(earningsCalculateMapper.getFirstTime());
ec.setEndTime(nowDayStr);
List<EarningsCalculate> earnList = earningsCalculateMapper.selectList(ec);
// 累计充电、放电、收益
BigDecimal incomeSum = earnList.stream().map(EarningsCalculate::getDigital).reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal positivePowerSum = earnList.stream().filter(i->i.getType().equals(CommonConstant.ZERO)).map(EarningsCalculate::getElec).reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal reversePowerSum = earnList.stream().filter(i->i.getType().equals(CommonConstant.ONE)).map(EarningsCalculate::getElec).reduce(BigDecimal.ZERO, BigDecimal::add);
vo.setIncomeSum(incomeSum.floatValue());
vo.setPositivePowerSum(positivePowerSum.floatValue());
vo.setReversePowerSum(reversePowerSum.floatValue());
// 昨日收益
BigDecimal incomeYesterday = earnList.stream().filter(i->i.getDay().equals(yesterdayStr)).map(EarningsCalculate::getDigital).reduce(BigDecimal.ZERO, BigDecimal::add);
vo.setIncomeYesterday(incomeYesterday.floatValue());
// 今日充、放电
BigDecimal positivePowerToday = earnList.stream().filter(i->i.getDay().equals(nowDayStr)&&i.getType().equals(CommonConstant.ZERO)).map(EarningsCalculate::getElec).reduce(BigDecimal.ZERO, BigDecimal::add);
vo.setPositivePowerToday(positivePowerToday.floatValue());
BigDecimal reversePowerToday = earnList.stream().filter(i->i.getDay().equals(nowDayStr)&&i.getType().equals(CommonConstant.ONE)).map(EarningsCalculate::getElec).reduce(BigDecimal.ZERO, BigDecimal::add);
vo.setReversePowerToday(reversePowerToday.floatValue());
String mainKey = CommonConstant.SHIP_ENERGY_MAIN + BOULDER_STATION_ID;
redisService.set(mainKey,JSONObject.toJSONString(vo));
}
/**
* 时间日期 转换为时间戳
* @param dateStr yyyy-MM-dd
* @return long 时间戳
*/
public static long dateStringToTimestamp(String dateStr) {
LocalDate localDate = LocalDate.parse(dateStr, DateTimeFormatter.ISO_LOCAL_DATE);
return localDate.atStartOfDay(ZoneId.systemDefault()).toInstant().toEpochMilli();
}
/**
* 毫秒级时间戳 转换为日期 yyyy-MM-dd
* @param timestamp long 时间戳
* @return yyyy-MM-dd
*/
public static String timestampToDateString(long timestamp) {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(CommonConstant.DATE_YMD);
return Instant.ofEpochMilli(timestamp)
.atZone(ZoneId.systemDefault())
.format(formatter);
}
}

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

@ -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);
/**
* 通用根据天获取告警数目曲线

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

@ -1,446 +0,0 @@
package com.ho.business.service;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.google.common.collect.Maps;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.ho.business.constant.DeviceTypeConstant;
import com.ho.business.entity.EarningsCalculate;
import com.ho.business.entity.ElecMeterValue;
import com.ho.business.entity.Station;
import com.ho.business.mapper.EarningsCalculateMapper;
import com.ho.business.vo.req.StationReqVO;
import com.ho.business.vo.resp.ShipStationRespVO;
import com.ho.common.tools.constant.CommonConstant;
import com.ho.common.tools.exception.BaseResponseCode;
import com.ho.common.tools.exception.BusinessException;
import com.ho.common.tools.service.RedisService;
import com.ho.common.tools.util.HttpUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.jsf.FacesContextUtils;
import java.io.IOException;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.TimeUnit;
/**
* 西安寄点能源股份有限公司
* 西安寄点能源 API 接口 服务
*
* @author kerwin
*/
@Service
@Slf4j
public class ShipEnergyService {
/**
* 获取token 参数 platform
*/
private static final String PLATFORM = "f9599b6c79a5efbfc6ddce5fed1bbed5";
/**
* 获取token 参数 platformsecret
*/
private static final String PLATFORM_SECRET = "2928b16f9cb8e85199a4caa6ba3b6620";
/**
* 寄点能源- 获取token Url
*/
private static final String TOKEN_URL = "https://www.emind2000.cloud/rest-api/gettoken";
/**
* 寄点能源- 获取项目列表 Url
*/
private static final String STATION_URL = "https://www.emind2000.cloud/rest-api/getStations";
/**
* 寄点能源- 主监控汇总 Url
*/
private static final String MAIN_URL = "https://www.emind2000.cloud/rest-api/getMainTotal";
/**
* 寄点能源- 历史收益 Url
*/
private static final String INCOME_HIS_URL = "https://www.emind2000.cloud/rest-api/getIncomeHis";
@Autowired
private RedisService redisService;
@Autowired
private StationService stationService;
@Autowired
ElecMeterValueService elecMeterValueService;
@Autowired
EarningsCalculateMapper earningsCalculateMapper;
/**
* 寄点能源 - 获取token
* @return token
*/
public String getToken(){
String token = null;
if(redisService.hasKey(CommonConstant.SHIP_ENERGY_TOKEN_KEY)){
token = (String)redisService.get(CommonConstant.SHIP_ENERGY_TOKEN_KEY);
return token;
}
Map<String, String> params = Maps.newHashMap();
params.put("platform",PLATFORM);
params.put("platformsecret",PLATFORM_SECRET);
try {
String json = HttpUtils.getWithForm(TOKEN_URL,params);
log.info("json:" + TOKEN_URL);
log.info("json:" + json);
JSONObject jsonObject = JSONObject.parseObject(json);
Integer code = jsonObject.getInteger("code");
if(CommonConstant.HttpCode.SUCCESS_CODE.equals(code)){
JSONObject data = jsonObject.getJSONObject("data");
token = data.getString("access_token");
//redis 缓存
redisService.set(CommonConstant.SHIP_ENERGY_TOKEN_KEY,token,10, TimeUnit.HOURS);
}
} catch (IOException e) {
throw new RuntimeException(e);
}
return token;
}
/**
* 寄点能源 - 获取 项目列表
* @return 项目列表 json 字符串
*/
public String getStations(){
Map<String, String> headers = new HashMap<>();
headers.put("Authorization", getToken());
try {
String json = HttpUtils.getWithHeaders(STATION_URL,null,headers);
log.info("json:" + STATION_URL);
log.info("json:" + json);
JSONObject jsonObject = JSONObject.parseObject(json);
Integer code = jsonObject.getInteger("code");
if(CommonConstant.HttpCode.SUCCESS_CODE.equals(code)){
JSONObject data = jsonObject.getJSONObject("data");
return data.getString("rows");
}
} catch (IOException e) {
throw new RuntimeException(e);
}
return null;
}
/**
*
* 寄点能源 - 获取 主监控汇总信息
* @param stationId 电站id
* @return 返回对应电站汇总信息
*/
public String getMainTotal(Integer stationId){
Map<String, String> headers = new HashMap<>();
headers.put("Authorization", getToken());
Map<String, String> params = new HashMap<>();
params.put("stationId",stationId.toString());
try {
Thread.sleep(2000);
String json = HttpUtils.getWithHeaders(MAIN_URL,params,headers);
log.info("MAIN_URL:" + MAIN_URL);
log.info("json:" + json);
JSONObject jsonObject = JSONObject.parseObject(json);
Integer code = jsonObject.getInteger("code");
if(CommonConstant.HttpCode.SUCCESS_CODE.equals(code)){
return jsonObject.getString("data");
}
} catch (IOException e) {
throw new RuntimeException(e);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
return null;
}
/**
* 寄点能源 - 获取 历史收益查询
*/
public String getIncomeHis(Integer stationId,String beginTime){
Map<String, String> headers = new HashMap<>();
headers.put("Authorization", getToken());
Map<String, String> params = new HashMap<>();
params.put("stationId",stationId.toString());
params.put("startTime",beginTime+CommonConstant.START_SUFFIX_TIMESTAMP);
params.put("endTime",beginTime+CommonConstant.END_SUFFIX_TIMESTAMP);
try {
String json = HttpUtils.getWithHeaders(INCOME_HIS_URL,params,headers);
log.info("INCOME_HIS_URL:" + INCOME_HIS_URL);
log.info("json:" + json);
JSONObject jsonObject = JSONObject.parseObject(json);
Integer code = jsonObject.getInteger("code");
if(CommonConstant.HttpCode.SUCCESS_CODE.equals(code)){
return jsonObject.getString("data");
}
} catch (IOException e) {
throw new RuntimeException(e);
}
return null;
}
/*****************************************业务处理******************************************************/
/**
* 寄点能源 - 电站信息融合储能平台处理
*/
public void addShipEnergyStation(){
String json = getStations();
JSONArray jsonStation = JSON.parseArray(json);
jsonStation.forEach(i->{
JSONObject jsonObj = (JSONObject) i;
Integer stationId = jsonObj.getInteger("stationId");
String name = jsonObj.getString("name");
String address = jsonObj.getString("address");
String province = jsonObj.getString("province");
String city = jsonObj.getString("city");
BigDecimal longitude = jsonObj.getBigDecimal("longitude");
BigDecimal latitude = jsonObj.getBigDecimal("latitude");
BigDecimal maxPower = jsonObj.getBigDecimal("maxPower");
BigDecimal capacity = jsonObj.getBigDecimal("capacity");
Date commossioningTime = jsonObj.getDate("commossioningTime");
StationReqVO vo = new StationReqVO();
vo.setId(stationId+10000);
vo.setName(name);
vo.setAddress(address);
vo.setLongitude(longitude);
vo.setLatitude(latitude);
vo.setCapacity(capacity);
vo.setRatePower(maxPower);
vo.setGridTime(commossioningTime);
vo.setGroupId(155);
vo.setDeptId(592);
vo.setStatus(1);
vo.setType(7);
vo.setPId(0);
vo.setIsDailyCount(0);
vo.setTopologyType(1);
vo.setCupboardType(2);
Station station = stationService.selectByName(vo.getName());
if (station != null) {
throw new BusinessException(BaseResponseCode.STATION_ALREADY_EXISTS);
}
stationService.insertStation(vo);
});
}
/**
* 寄点能源 - 缓存电站监控信息
*/
public void getShipEnergyTotal(){
String stations = getStations();
JSONArray jsonStation = JSON.parseArray(stations);
jsonStation.forEach(i->{
JSONObject jsonObj = (JSONObject) i;
Integer stationId = jsonObj.getInteger("stationId");
String json = getMainTotal(stationId);
Integer finalStationId = stationId +10000;
String mainKey = CommonConstant.SHIP_ENERGY_MAIN + finalStationId;
redisService.set(mainKey,json);
});
}
/**
* 寄点能源 - 获取寄点电站历史收益 并存储
*/
public void getStationIncomeHis(String beginTime){
DateTime yesterday = DateUtil.yesterday();
String yesterdayStr = DateUtil.formatDate(yesterday);
if(beginTime==null){
beginTime = yesterdayStr;
}
String stations = getStations();
JSONArray jsonStation = JSON.parseArray(stations);
String finalBeginTime = beginTime;
log.info("传入参数-统计时间:{}",beginTime);
jsonStation.forEach(i->{
JSONObject jsonObj = (JSONObject) i;
Integer stationId = jsonObj.getInteger("stationId");
String incomeHis = getIncomeHis(stationId, finalBeginTime);
JSONArray incomes = JSON.parseArray(incomeHis);
log.info("远程查询-历史收益数据:{}",incomes);
incomes.forEach(j->{
JSONObject income = (JSONObject) j;
String date = income.getString("date");
String price = income.getString("price");
JsonObject jsonPrice = JsonParser.parseString(price).getAsJsonObject();
List<EarningsCalculate> list = new ArrayList<>();
List<ElecMeterValue> elecList = new ArrayList<>();
BigDecimal inTotalIncome = BigDecimal.ZERO;
BigDecimal outTotalIncome = BigDecimal.ZERO;
log.info("远程查询-统计日期:{}",date);
if(finalBeginTime.equals(date)){
//收益-充-尖
EarningsCalculate inSharp = new EarningsCalculate();
BigDecimal positiveSharp = income.getBigDecimal("sum_e_positive_sharp");
inSharp.setElec(positiveSharp);
inSharp.setType(0);
inSharp.setRateType(CommonConstant.RateType.TIP);
BigDecimal inSharpPrice = jsonPrice.get("in_sharp_price").getAsBigDecimal();
inSharp.setPrice(inSharpPrice);
inSharp.setDigital(positiveSharp.multiply(inSharpPrice));
inTotalIncome = inTotalIncome.add(inSharp.getDigital());
inSharp.setTotal(BigDecimal.ZERO);
list.add(inSharp);
//收益-充-峰
EarningsCalculate inPeak = new EarningsCalculate();
BigDecimal positivePeak = income.getBigDecimal("sum_e_positive_peak");
inPeak.setElec(positivePeak);
inPeak.setType(0);
inPeak.setRateType(CommonConstant.RateType.PEAK);
BigDecimal inPeakPrice = jsonPrice.get("in_peak_price").getAsBigDecimal();
inPeak.setPrice(inPeakPrice);
inPeak.setDigital(positivePeak.multiply(inPeakPrice));
inTotalIncome = inTotalIncome.add(inPeak.getDigital());
inPeak.setTotal(BigDecimal.ZERO);
list.add(inPeak);
//收益-充-平
EarningsCalculate inFlat = new EarningsCalculate();
BigDecimal positiveFlat = income.getBigDecimal("sum_e_positive_flat");
inFlat.setElec(positiveFlat);
inFlat.setType(0);
inFlat.setRateType(CommonConstant.RateType.FLAT);
BigDecimal inFlatPrice = jsonPrice.get("in_flat_price").getAsBigDecimal();
inFlat.setPrice(inFlatPrice);
inFlat.setDigital(positiveFlat.multiply(inFlatPrice));
inTotalIncome = inTotalIncome.add(inFlat.getDigital());
inFlat.setTotal(BigDecimal.ZERO);
list.add(inFlat);
//收益-充-谷
EarningsCalculate inValley = new EarningsCalculate();
BigDecimal positiveValley = income.getBigDecimal("sum_e_positive_valley");
inValley.setElec(positiveValley);
inValley.setType(0);
inValley.setRateType(CommonConstant.RateType.VALLEY);
BigDecimal inValleyPrice = jsonPrice.get("in_valley_price").getAsBigDecimal();
inValley.setPrice(inValleyPrice);
inValley.setDigital(positiveValley.multiply(inValleyPrice));
inTotalIncome = inTotalIncome.add(inValley.getDigital());
inValley.setTotal(BigDecimal.ZERO);
list.add(inValley);
//收益-充-深谷
EarningsCalculate inDeepValley = new EarningsCalculate();
BigDecimal positiveDeepValley = income.getBigDecimal("sum_e_positive_deep_valley");
inDeepValley.setElec(positiveDeepValley);
inDeepValley.setType(0);
inDeepValley.setRateType(CommonConstant.RateType.DEEP_VALLEY);
BigDecimal inDeepValleyPrice = jsonPrice.get("in_deep_valley_price").getAsBigDecimal();
inDeepValley.setPrice(inDeepValleyPrice);
inDeepValley.setDigital(positiveDeepValley.multiply(inDeepValleyPrice));
inTotalIncome = inTotalIncome.add(inValley.getDigital());
inDeepValley.setTotal(inTotalIncome);
list.add(inDeepValley);
//收益-放-尖
EarningsCalculate outSharp = new EarningsCalculate();
BigDecimal reverseSharp = income.getBigDecimal("sum_e_reverse_sharp");
outSharp.setElec(reverseSharp);
outSharp.setType(1);
outSharp.setRateType(CommonConstant.RateType.TIP);
BigDecimal outSharpPrice = jsonPrice.get("out_sharp_price").getAsBigDecimal();
outSharp.setPrice(outSharpPrice);
outSharp.setDigital(reverseSharp.multiply(outSharpPrice));
outTotalIncome = outTotalIncome.add(outSharp.getDigital());
outSharp.setTotal(BigDecimal.ZERO);
list.add(outSharp);
//收益-放-峰
EarningsCalculate outPeak = new EarningsCalculate();
BigDecimal reversePeak = income.getBigDecimal("sum_e_reverse_peak");
outPeak.setElec(reversePeak);
outPeak.setType(1);
outPeak.setRateType(CommonConstant.RateType.PEAK);
BigDecimal outPeakPrice = jsonPrice.get("out_peak_price").getAsBigDecimal();
outPeak.setPrice(outPeakPrice);
outPeak.setDigital(reversePeak.multiply(outPeakPrice));
outTotalIncome = outTotalIncome.add(outPeak.getDigital());
outPeak.setTotal(BigDecimal.ZERO);
list.add(outPeak);
//收益-放-平
EarningsCalculate outFlat = new EarningsCalculate();
BigDecimal reverseFlat = income.getBigDecimal("sum_e_reverse_flat");
outFlat.setElec(reverseFlat);
outFlat.setType(1);
outFlat.setRateType(CommonConstant.RateType.FLAT);
BigDecimal outFlatPrice = jsonPrice.get("out_flat_price").getAsBigDecimal();
outFlat.setPrice(outFlatPrice);
outFlat.setDigital(reverseFlat.multiply(outFlatPrice));
outTotalIncome = outTotalIncome.add(outFlat.getDigital());
outFlat.setTotal(BigDecimal.ZERO);
list.add(outFlat);
//收益-放-谷
EarningsCalculate outValley = new EarningsCalculate();
BigDecimal reverseValley = income.getBigDecimal("sum_e_reverse_valley");
outValley.setElec(reverseValley);
outValley.setType(1);
outValley.setRateType(CommonConstant.RateType.VALLEY);
BigDecimal outValleyPrice = jsonPrice.get("out_valley_price").getAsBigDecimal();
outValley.setPrice(outValleyPrice);
outValley.setDigital(reverseValley.multiply(outValleyPrice));
outTotalIncome = outTotalIncome.add(outValley.getDigital());
outValley.setTotal(BigDecimal.ZERO);
list.add(outValley);
//收益-放-深谷
EarningsCalculate outDeepValley = new EarningsCalculate();
BigDecimal reverseDeepValley = income.getBigDecimal("sum_e_reverse_deep_valley");
outDeepValley.setElec(reverseDeepValley);
outDeepValley.setType(1);
outDeepValley.setRateType(CommonConstant.RateType.DEEP_VALLEY);
BigDecimal outDeepValleyPrice = jsonPrice.get("out_deep_valley_price").getAsBigDecimal();
outDeepValley.setPrice(outDeepValleyPrice);
outDeepValley.setDigital(reverseDeepValley.multiply(outDeepValleyPrice));
outTotalIncome = outTotalIncome.add(outDeepValley.getDigital());
outDeepValley.setTotal(outTotalIncome);
list.add(outDeepValley);
// 充电
ElecMeterValue charge = new ElecMeterValue();
BigDecimal sumEPositive = income.getBigDecimal("sum_e_positive");
charge.setDigital(sumEPositive);
charge.setType(DeviceTypeConstant.ELEC_METER_VALUE_TYPE.CHARGE);
charge.setStatus(CommonConstant.STATUS_FLAG);
elecList.add(charge);
// 放电
ElecMeterValue disCharge = new ElecMeterValue();
BigDecimal sumEReverse = income.getBigDecimal("sum_e_reverse");
disCharge.setDigital(sumEReverse);
disCharge.setType(DeviceTypeConstant.ELEC_METER_VALUE_TYPE.DISCHARGE);
disCharge.setStatus(CommonConstant.STATUS_FLAG);
elecList.add(disCharge);
}
if(elecList.size()>0){
//删除
elecMeterValueService.deleteByStationAndDay(stationId+10000,date,null);
elecList.forEach(eleMeter -> {
eleMeter.setGroupId(155);
eleMeter.setStationId(stationId+10000);
eleMeter.setCreateTime(new Date());
eleMeter.setDay(date);
//新增
elecMeterValueService.insert(eleMeter);
});
}
if(list.size()>0){
//删除
earningsCalculateMapper.deleteByStationAndDay(date,null,stationId+10000);
list.forEach(a->{
a.setGroupId(155);
a.setStationId(stationId+10000);
a.setCreateTime(new Date());
a.setDay(date);
a.setDiscount(BigDecimal.ONE);
//新增
earningsCalculateMapper.insertSelective(a);
});
}
});
});
}
}

View File

@ -36,7 +36,7 @@ public interface StationHomeService {
* @param stationId 电站id
* @return
*/
PcsStationData getPcsStationData(Integer stationId);
PcsStationData getPcsStationData(Integer stationId,String lang);
/**
* 根据电站id查询数据总览

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

@ -6,7 +6,6 @@ import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil;
import com.alibaba.excel.util.DateUtils;
import com.alibaba.excel.util.StringUtils;
import com.alibaba.fastjson.JSON;
import com.ho.business.constant.DeviceTypeConstant;
import com.ho.business.entity.*;
import com.ho.business.feignclient.UserFeignClient;
@ -26,7 +25,6 @@ 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.ShipStationRespVO;
import com.ho.business.vo.resp.cabin.EarningsCalculateCountResp;
import com.ho.business.vo.resp.cabin.EarningsCalculateResp;
import com.ho.business.vo.resp.colCount.ColCountResp;
@ -211,15 +209,42 @@ public class EarningsCalculateServiceImpl implements EarningsCalculateService {
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 + " ) "+reportName);
ec.setStationName(name + "( " + time + " ) "+reportName);
} else {
ec.setStationName(station.getName() + "( " + time + " ) "+billName);
ec.setStationName(name + "( " + time + " ) "+billName);
}
ec.setList(list);
//充电收益
@ -1447,16 +1472,6 @@ public class EarningsCalculateServiceImpl implements EarningsCalculateService {
revenueOverview.setStationName(station.getName());
revenueOverview.setCapacity(station.getCapacity());
revenueOverview.setOperationDays((int) operationDays);
if(station.getId()==11003 || station.getId()==10942 ||station.getId()==11006){
// 寄点电站数据
String mainKey = CommonConstant.SHIP_ENERGY_MAIN + station.getId();
String json = (String)redisService.get(mainKey);
ShipStationRespVO respVO = JSON.parseObject(json,ShipStationRespVO.class);
revenueOverview.setCharging(respVO.getPositivePowerSum()==null?BigDecimal.ZERO:BigDecimal.valueOf(respVO.getPositivePowerSum()));
revenueOverview.setDischarging(respVO.getReversePowerSum()==null?BigDecimal.ZERO:BigDecimal.valueOf(respVO.getReversePowerSum()));
revenueOverview.setTotalRevenue(respVO.getIncomeSum()==null?BigDecimal.ZERO:BigDecimal.valueOf(respVO.getIncomeSum()));
return revenueOverview;
}
List<RevenueOverviewData> list = getRevenueOverviewData(vo);

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

@ -3,7 +3,6 @@ package com.ho.business.service.impl;
import cn.hutool.core.date.DateField;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSON;
import com.ho.business.constant.DeviceTypeConstant;
import com.ho.business.entity.Device;
import com.ho.business.entity.ElecMeterValue;
@ -18,7 +17,6 @@ import com.ho.business.vo.req.colCount.ColCountReq;
import com.ho.business.vo.resp.CountEleData;
import com.ho.business.vo.resp.DeviceRespVO;
import com.ho.business.vo.resp.ProvinceStation;
import com.ho.business.vo.resp.ShipStationRespVO;
import com.ho.business.vo.resp.colCount.ColCountResp;
import com.ho.business.vo.resp.iargeScreen.*;
import com.ho.business.vo.resp.mppt.MpptActiveVo;
@ -289,10 +287,22 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
BigDecimal dayCharge = BigDecimal.ZERO;
BigDecimal dayDischarge = BigDecimal.ZERO;
StringBuffer stationDayLog = new StringBuffer();
// ColCountReq colCountReq = new ColCountReq();
// colCountReq.setCol(DataCollectConstant.Elec_Meter.TOTAL_CHARGE);
// List<Integer> ids = stations.stream().map(Station::getId).collect(Collectors.toList());
// colCountReq.setIds(ids);
// List<ColCountResp> colCountResps = colCountService.selectByParam(colCountReq);
// Map<Integer, String> stationMapAndType = new HashMap<>();
// if (colCountResps != null) {
// stationMapAndType = colCountResps.stream().collect(Collectors.toMap(ColCountResp::getStationId, ColCountResp::getDeviceType, (k1, k2) -> k1));
// }
for (Station station : stations) {
// StationReq req = new StationReq();
// req.setStationId(station.getId());
// req.setDeviceType(stationMapAndType.get(req.getStationId()));
BigDecimal dailyChargeElec = BigDecimal.ZERO;
BigDecimal dailyDischargeElec = BigDecimal.ZERO;
// CountEleData countEleData = stationHomeService.getCountEleData(req);
CountEleData countEleData = getByRedisData(station.getId());
if (null == countEleData || null == countEleData.getDailyChargeElec() || null == countEleData.getDailyDischargeElec()) {
dailyChargeElec = BigDecimal.ZERO;
@ -347,19 +357,6 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
annualOverviewResp.setTotalCharge(incomeShow1.getYearCharge());
annualOverviewResp.setTotalDischarge(incomeShow1.getYearDischarge());
}
// 寄点站点数据融合
stations.forEach(s->{
if(s.getId()==11003 || s.getId()==10942 || s.getId()==11006) {
// 寄点电站数据
String mainKey = CommonConstant.SHIP_ENERGY_MAIN + s.getId();
String json = (String) redisService.get(mainKey);
ShipStationRespVO respVO = JSON.parseObject(json, ShipStationRespVO.class);
// 日充
annualOverviewResp.setDayCharge(annualOverviewResp.getDayCharge().add(respVO.getPositivePowerToday()==null?BigDecimal.ZERO:BigDecimal.valueOf(respVO.getPositivePowerToday())));
// 日放
annualOverviewResp.setDayDischarge(annualOverviewResp.getDayDischarge().add(respVO.getReversePowerToday()==null?BigDecimal.ZERO:BigDecimal.valueOf(respVO.getReversePowerToday())));
}
});
return annualOverviewResp;
}
@ -623,7 +620,7 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
subdataList.add(subdata);
}
});
subdataList.sort(Comparator.comparing((Subdata::getIncomeValue)).reversed());
subdataList.sort(Comparator.comparing((Subdata::getRelease)).reversed());
return subdataList;
}
private List<Subdata> getPvSubdata(String beginString, String endString, List<Station> stations){
@ -735,7 +732,7 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
subdataList.add(subdata);
}
});
subdataList.sort(Comparator.comparing((Subdata::getIncomeValue)).reversed());
subdataList.sort(Comparator.comparing((Subdata::getRelease)).reversed());
return subdataList;
}
@ -1453,7 +1450,7 @@ 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;
}
@ -1491,7 +1488,7 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
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>> nationMap = list.stream().filter(i -> i.getProvince() != null).collect(Collectors.groupingBy(Station::getNation));
if (nationMap.size() > CommonConstant.ONE) {
@ -1580,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);
}
@ -1589,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);
}
@ -1598,7 +1595,7 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
if (stationIds == null) {
return new ArrayList<>();
}
return getAnnualChartValues(getCountStations(stationIds));
return getAnnualChartValues(getCountStations(stationIds,null));
}
@Override
@ -1655,12 +1652,12 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
return subdata;
}
@Override
public List<Subdata> getCommonProfit(String beginString, String endString, List<Integer> stationIds) {
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);
List<Station> countStations = getCountStations(stationIds,lang);
if (countStations != null && !countStations.isEmpty()) {
if (countStations.size() >= CommonConstant.FIVE) {
subdata = getSubdata(beginString, endString, countStations);
@ -1678,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) {
@ -2044,24 +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);
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;

View File

@ -1081,7 +1081,7 @@ public class InverterServiceImpl implements InverterService {
//查询设备映射字段
List<ModelDeviceColComp> colMappingList = modelDeviceService.getCompListByType(CommonConstant.ModelDeviceType.DEVICE, device.getDeviceType(), null);
//查询没有映射字段
List<DeviceTypeCol> deviceTypeCols = deviceTypeColMapper.selectByDeviceType(device.getDeviceType());
List<DeviceTypeCol> deviceTypeCols = deviceTypeColMapper.selectByDeviceType(device.getDeviceType(),null);
//拼接缓存key
String inverterRedisKey = device.getDeviceType() + ":" + vo.getStationId() + ":" + vo.getSrcId();
//先判断缓存中是否存在

View File

@ -104,7 +104,7 @@ public class ModelDeviceServiceImpl implements ModelDeviceService {
if(redisService.hasKey(key)){
deviceTypeCols =(List<DeviceTypeCol>) redisService.get(key);
}else{
deviceTypeCols = deviceTypeColMapper.selectByDeviceType(deviceType);
deviceTypeCols = deviceTypeColMapper.selectByDeviceType(deviceType,null);
redisService.set(key,deviceTypeCols);
redisService.expire(key,1, TimeUnit.HOURS);
}
@ -142,7 +142,7 @@ public class ModelDeviceServiceImpl implements ModelDeviceService {
* @return
*/
@Override
@Cacheable(cacheManager = "fiveMinuteCacheManager", value = "modelConfigList", sync = true)
// @Cacheable(cacheManager = "fiveMinuteCacheManager", value = "modelConfigList", sync = true)
public List<ModelDeviceColComp> getCompListByType(String type, String typeName, String modelCol) {
//因为几个表数据量不大, 做个left级联查询
List<ModelDeviceColComp> compListByType = deviceTypeColMapper.getCompListByType(type, typeName, modelCol);

View File

@ -626,7 +626,7 @@ public class OpenStationServiceImpl implements OpenStationService {
public void exportEleData(PcsStationReq req, HttpServletResponse response,String lang) {
try {
List<Integer> stationIds = req.getStationIds();
List<Station> stations = stationService.selectStationsByIds(stationIds);
List<Station> stations = stationService.selectStationsByIds(stationIds,lang);
Map<Integer, String> idNameMap = getStationMap(stations);
List<Map<String, Object>> sheetsList = new ArrayList<>();
//汇总
@ -640,6 +640,26 @@ public class OpenStationServiceImpl implements OpenStationService {
summary = DefineConstant.SUMMARY_EN;
summaryData = DefineConstant.SUMMARY_DATA_STATION_EN;
}
if(CommonConstant.langTemp.FR_FR.equals(lang)){
summary = DefineConstant.SUMMARY_FRA;
summaryData = DefineConstant.SUMMARY_DATA_STATION_FRA;
}
if(CommonConstant.langTemp.ES_ES.equals(lang)){
summary = DefineConstant.SUMMARY_SPA;
summaryData = DefineConstant.SUMMARY_DATA_STATION_SPA;
}
if(CommonConstant.langTemp.AR_EG.equals(lang)){
summary = DefineConstant.SUMMARY_ARA;
summaryData = DefineConstant.SUMMARY_DATA_STATION_ARA;
}
if(CommonConstant.langTemp.DE_DE.equals(lang)){
summary = DefineConstant.SUMMARY_DE;
summaryData = DefineConstant.SUMMARY_DATA_STATION_DE;
}
if(CommonConstant.langTemp.PL_PL.equals(lang)){
summary = DefineConstant.SUMMARY_PL;
summaryData = DefineConstant.SUMMARY_DATA_STATION_PL;
}
if("segment".equals(segmentType)){
List<EarningsCalculateData> totalList = new ArrayList<>();
BigDecimal chargeTip = BigDecimal.ZERO;
@ -758,7 +778,7 @@ public class OpenStationServiceImpl implements OpenStationService {
PageResult pageResult = new PageResult<>();
try {
List<Integer> stationIds = req.getStationIds();
List<Station> stations = stationService.selectStationsByIds(stationIds);
List<Station> stations = stationService.selectStationsByIds(stationIds,null);
Map<Integer, String> idNameMap = stations.stream().collect(Collectors.toMap(Station::getId, Station::getName));
List<PcsElecData> result = new ArrayList<>();
String name = null;
@ -793,7 +813,7 @@ public class OpenStationServiceImpl implements OpenStationService {
Object obj = new Object();
try {
List<Integer> stationIds = req.getStationIds();
List<Station> stations = stationService.selectStationsByIds(stationIds);
List<Station> stations = stationService.selectStationsByIds(stationIds,req.getLang());
Map<Integer, String> idNameMap = getStationMap(stations);
//汇总
BigDecimal charge = BigDecimal.ZERO;
@ -803,6 +823,16 @@ public class OpenStationServiceImpl implements OpenStationService {
String summary = DefineConstant.SUMMARY;
if(CommonConstant.langTemp.EN_US.equals(req.getLang())){
summary = DefineConstant.SUMMARY_EN;
}else if(CommonConstant.langTemp.FR_FR.equals(req.getLang())){
summary = DefineConstant.SUMMARY_FRA;
}else if(CommonConstant.langTemp.ES_ES.equals(req.getLang())){
summary = DefineConstant.SUMMARY_SPA;
}else if(CommonConstant.langTemp.DE_DE.equals(req.getLang())){
summary = DefineConstant.SUMMARY_DE;
}else if(CommonConstant.langTemp.PL_PL.equals(req.getLang())){
summary = DefineConstant.SUMMARY_PL;
}else if(CommonConstant.langTemp.AR_EG.equals(req.getLang())){
summary = DefineConstant.SUMMARY_ARA;
}
if(CommonConstant.SEGMENT.equals(segmentType)){
List<EarningsCalculateData> resultList = new ArrayList<>();
@ -933,7 +963,7 @@ public class OpenStationServiceImpl implements OpenStationService {
Object obj = new Object();
try {
List<Integer> stationIds = req.getStationIds();
List<Station> stations = stationService.selectStationsByIds(stationIds);
List<Station> stations = stationService.selectStationsByIds(stationIds,req.getLang());
Map<Integer, String> idNameMap = getStationMap(stations);
//汇总
String segmentType = req.getSegmentType();
@ -1120,7 +1150,59 @@ public class OpenStationServiceImpl implements OpenStationService {
});
// sheet1中要填充得数据
userExportMap.put("data", enList);
}else{
}else if(CommonConstant.langTemp.FR_FR.equals(lang)){
userExportMap.put("entity", PcsElecDataFra.class);
List<PcsElecDataFra> fraList=new ArrayList<>();
dataList.stream().forEach(s->{
PcsElecDataFra fra = new PcsElecDataFra();
BeanUtils.copyProperties(s, fra);
fraList.add(fra);
});
// sheet1中要填充得数据
userExportMap.put("data", fraList);
}else if(CommonConstant.langTemp.ES_ES.equals(lang)){
userExportMap.put("entity", PcsElecDataSpa.class);
List<PcsElecDataSpa> spaList=new ArrayList<>();
dataList.stream().forEach(s->{
PcsElecDataSpa spa = new PcsElecDataSpa();
BeanUtils.copyProperties(s, spa);
spaList.add(spa);
});
// sheet1中要填充得数据
userExportMap.put("data", spaList);
}else if(CommonConstant.langTemp.AR_EG.equals(lang)){
userExportMap.put("entity", PcsElecDataAra.class);
List<PcsElecDataAra> araList=new ArrayList<>();
dataList.stream().forEach(s->{
PcsElecDataAra ara = new PcsElecDataAra();
BeanUtils.copyProperties(s, ara);
araList.add(ara);
});
// sheet1中要填充得数据
userExportMap.put("data", araList);
}else if(CommonConstant.langTemp.DE_DE.equals(lang)){
userExportMap.put("entity", PcsElecDataDe.class);
List<PcsElecDataDe> deList=new ArrayList<>();
dataList.stream().forEach(s->{
PcsElecDataDe de = new PcsElecDataDe();
BeanUtils.copyProperties(s, de);
deList.add(de);
});
// sheet1中要填充得数据
userExportMap.put("data", deList);
}else if(CommonConstant.langTemp.PL_PL.equals(lang)){
userExportMap.put("entity", PcsElecDataPl.class);
List<PcsElecDataPl> plList=new ArrayList<>();
dataList.stream().forEach(s->{
PcsElecDataPl pl = new PcsElecDataPl();
BeanUtils.copyProperties(s, pl);
plList.add(pl);
});
// sheet1中要填充得数据
userExportMap.put("data", plList);
}
else{
userExportMap.put("entity", PcsElecData.class);
// sheet1中要填充得数据
userExportMap.put("data", dataList);
@ -1148,6 +1230,56 @@ public class OpenStationServiceImpl implements OpenStationService {
});
// sheet1中要填充得数据
userExportMap.put("data", enList);
}else if(CommonConstant.langTemp.FR_FR.equals(lang)){
userExportMap.put("entity", EarningsCalculateDataFra.class);
List<EarningsCalculateDataFra> fraList=new ArrayList<>();
dataList.stream().forEach(s->{
EarningsCalculateDataFra fra = new EarningsCalculateDataFra();
BeanUtils.copyProperties(s, fra);
fraList.add(fra);
});
// sheet1中要填充得数据
userExportMap.put("data", fraList);
}else if(CommonConstant.langTemp.ES_ES.equals(lang)){
userExportMap.put("entity", EarningsCalculateDataSpa.class);
List<EarningsCalculateDataSpa> spaList=new ArrayList<>();
dataList.stream().forEach(s->{
EarningsCalculateDataSpa spa = new EarningsCalculateDataSpa();
BeanUtils.copyProperties(s, spa);
spaList.add(spa);
});
// sheet1中要填充得数据
userExportMap.put("data", spaList);
}else if(CommonConstant.langTemp.AR_EG.equals(lang)){
userExportMap.put("entity", EarningsCalculateDataAra.class);
List<EarningsCalculateDataAra> araList=new ArrayList<>();
dataList.stream().forEach(s->{
EarningsCalculateDataAra ara = new EarningsCalculateDataAra();
BeanUtils.copyProperties(s, ara);
araList.add(ara);
});
// sheet1中要填充得数据
userExportMap.put("data", araList);
}else if(CommonConstant.langTemp.DE_DE.equals(lang)){
userExportMap.put("entity", EarningsCalculateDataDe.class);
List<EarningsCalculateDataDe> deList=new ArrayList<>();
dataList.stream().forEach(s->{
EarningsCalculateDataDe de = new EarningsCalculateDataDe();
BeanUtils.copyProperties(s, de);
deList.add(de);
});
// sheet1中要填充得数据
userExportMap.put("data", deList);
}else if(CommonConstant.langTemp.PL_PL.equals(lang)){
userExportMap.put("entity", EarningsCalculateDataPl.class);
List<EarningsCalculateDataPl> plList=new ArrayList<>();
dataList.stream().forEach(s->{
EarningsCalculateDataPl pl = new EarningsCalculateDataPl();
BeanUtils.copyProperties(s, pl);
plList.add(pl);
});
// sheet1中要填充得数据
userExportMap.put("data", plList);
}else{
userExportMap.put("entity", EarningsCalculateData.class);
// sheet1中要填充得数据

View File

@ -176,7 +176,6 @@ public class OutApiServiceImpl implements OutApiService {
}
String deviceType = DeviceTypeConstant.BMS;
log.info("stations.size:" + stations.size());
stations = stations.stream().filter(i->i.getId()!=11003 && i.getId()!=10942 && i.getId()!=11006).collect(Collectors.toList());
for (Station station : stations) {
try {
//先删除站的当日数据
@ -425,7 +424,7 @@ public class OutApiServiceImpl implements OutApiService {
ids.add(418);//新凤鸣电站
ids.add(551);//江苏暨阳电力科技发展有限公司1号柜
ids.add(564);//江苏暨阳电力科技发展有限公司2号柜
List<Station> stations = stationService.selectStationsByIds(ids);
List<Station> stations = stationService.selectStationsByIds(ids,null);
String deviceType = DeviceTypeConstant.PCS;
for (Station station : stations) {
//先删除站的当日数据

View File

@ -7,6 +7,7 @@ import com.ho.business.entity.*;
import com.ho.business.feignclient.UserFeignClient;
import com.ho.business.mapper.PlanningCurveIssueMapper;
import com.ho.business.mapper.PlanningCurveMapper;
import com.ho.business.service.DynamicConfigService;
import com.ho.business.service.PlanningCurveIssueService;
import com.ho.business.vo.DeviceTransfer;
import com.ho.business.vo.resp.planningCurve.PlanningIssueQueryVo;
@ -18,6 +19,7 @@ import com.ho.common.tools.service.RedisService;
import com.ho.datacollect.api.constant.DataCollectConstant;
import com.ho.user.api.entity.SysUser;
import com.ho.user.api.vo.req.QueryUserReqVO;
import jodd.util.StringUtil;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -42,6 +44,9 @@ public class PlanningCurveIssueServiceImpl implements PlanningCurveIssueService
@Autowired
private PlanningCurveMapper planningMapper;
@Autowired
private DynamicConfigService dynamicConfigService;
@Override
public List<Map<String, Object>> getIssueDevices(PlanningIssueDevice issueDevice) {
return issueMapper.getIssueDevices(issueDevice);
@ -358,21 +363,39 @@ public class PlanningCurveIssueServiceImpl implements PlanningCurveIssueService
planCurveOperationRecordReq.setLatestPlanningCurve(lastestOperateId);
//获取电站的上一次计划曲线模板id
String previousOperateId = null;
List<PlanCurveOperationRecordReq> result = issueMapper.getPlanCurveOperationList(String.valueOf(planCurveOperationRecordReq.getStationId()));
List<PlanCurveOperationRecordReq> result = issueMapper.getPlanCurveOperationList(String.valueOf(planCurveOperationRecordReq.getStationId()),null);
//取成功下发的操作记录
result = result.stream().filter(e ->1==e.getStatus()).collect(Collectors.toList());
if(result.size()>0){
previousOperateId = result.get(0).getLatestPlanningCurve();
}
planCurveOperationRecordReq.setPreviousPlanningCurve(previousOperateId);
// 英文字段处理
if(StringUtil.isNotBlank(planCurveOperationRecordReq.getOperateContent())){
TranslateName opTrans = dynamicConfigService.getNameLanguage(planCurveOperationRecordReq.getOperateContent());
planCurveOperationRecordReq.setOperateContentEn(opTrans.getNameEn());
planCurveOperationRecordReq.setOperateContentFra(opTrans.getNameFra());
planCurveOperationRecordReq.setOperateContentSpa(opTrans.getNameSpa());
planCurveOperationRecordReq.setOperateContentDe(opTrans.getNameDe());
planCurveOperationRecordReq.setOperateContentPl(opTrans.getNamePl());
planCurveOperationRecordReq.setOperateContentAra(opTrans.getNameAra());
}
if(StringUtil.isNotBlank(planCurveOperationRecordReq.getOperateResult())){
TranslateName reTrans = dynamicConfigService.getNameLanguage(planCurveOperationRecordReq.getOperateResult());
planCurveOperationRecordReq.setOperateResultEn(reTrans.getNameEn());
planCurveOperationRecordReq.setOperateResultFra(reTrans.getNameFra());
planCurveOperationRecordReq.setOperateResultSpa(reTrans.getNameSpa());
planCurveOperationRecordReq.setOperateResultDe(reTrans.getNameDe());
planCurveOperationRecordReq.setOperateResultPl(reTrans.getNamePl());
planCurveOperationRecordReq.setOperateResultAra(reTrans.getNameAra());
}
//插入操作记录
issueMapper.planCurveOperationRecord(planCurveOperationRecordReq);
}
@Override
public List<PlanCurveOperationRecordReq> getPlanCurveOperationList(String stationId) {
List<PlanCurveOperationRecordReq> result = issueMapper.getPlanCurveOperationList(stationId);
public List<PlanCurveOperationRecordReq> getPlanCurveOperationList(String stationId,String lang) {
List<PlanCurveOperationRecordReq> result = issueMapper.getPlanCurveOperationList(stationId,lang);
return result;
}

View File

@ -4,16 +4,15 @@ import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSON;
import com.ho.business.entity.PlanningCurve;
import com.ho.business.entity.PlanningCurveTactics;
import com.ho.business.entity.PlanningCurveTemplate;
import com.ho.business.entity.Station;
import com.ho.business.entity.*;
import com.ho.business.mapper.PlanningCurveMapper;
import com.ho.business.mapper.PlanningCurveTacticsMapper;
import com.ho.business.service.DynamicConfigService;
import com.ho.business.service.PlanningCurveService;
import com.ho.business.service.StationService;
import com.ho.common.tools.constant.DefineConstant;
import com.ho.common.tools.entity.UserDetailRespVO;
import jodd.util.StringUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.*;
@ -48,6 +47,9 @@ public class PlanningCurveServiceImpl implements PlanningCurveService {
@Autowired
private PlanningCurveTacticsMapper planningCurveTacticsMapper;
@Autowired
private DynamicConfigService dynamicConfigService;
@Override
public List<Map<String, Object>> getPlanningCurveTemplates(PlanningCurveTemplate template) {
return planningMapper.getPlanningCurveTemplates(template);
@ -62,6 +64,17 @@ public class PlanningCurveServiceImpl implements PlanningCurveService {
try {
if (null != template) {
if(StringUtil.isNotBlank(template.getTemplateName())){
// 摸版名字英文处理
TranslateName translate = dynamicConfigService.getNameLanguage(template.getTemplateName());
template.setTemplateNameEn(translate.getNameEn());
template.setTemplateNameFra(translate.getNameFra());
template.setTemplateNameSpa(translate.getNameSpa());
template.setTemplateNameDe(translate.getNameDe());
template.setTemplateNamePl(translate.getNamePl());
template.setTemplateNameAra(translate.getNameAra());
}
if (template.getPlanningCurves().size() <= 0) {
result.put("code", 500);
result.put("msg", DefineConstant.PeakShaving.TEMPLATE_CHECK_SIZE);
@ -101,6 +114,16 @@ public class PlanningCurveServiceImpl implements PlanningCurveService {
result.put("msg", DefineConstant.PeakShaving.EDIT_TEMPLATE_SUCCESS);
try {
if (null != template && null != template.getTemId()) {
if(StringUtil.isNotBlank(template.getTemplateName())){
// 摸版名字英文处理
TranslateName translate = dynamicConfigService.getNameLanguage(template.getTemplateName());
template.setTemplateNameEn(translate.getNameEn());
template.setTemplateNameFra(translate.getNameFra());
template.setTemplateNameSpa(translate.getNameSpa());
template.setTemplateNameDe(translate.getNameDe());
template.setTemplateNamePl(translate.getNamePl());
template.setTemplateNameAra(translate.getNameAra());
}
Integer templateId = template.getTemId();
Map<String, Object> check = this.checkData(template, templateId);
if (null != check) {

View File

@ -23,6 +23,7 @@ import com.ho.business.vo.req.configure.*;
import com.ho.business.vo.resp.point.*;
import com.ho.common.tools.constant.CommonConstant;
import com.ho.common.tools.constant.DefineConstant;
import com.ho.common.tools.constant.RedisKeyConstant;
import com.ho.common.tools.constant.TableConstant;
import com.ho.common.tools.entity.PointCurveSrcCol;
import com.ho.common.tools.exception.BaseResponseCode;
@ -108,6 +109,9 @@ public class PointDemoServiceImpl implements PointDemoService {
@Autowired
PlanningCurveService planningService;
@Autowired
DynamicConfigService dynamicConfigService;
@Override
public List<PointRespVO> getPointList(PointReq pointReq) {
Integer stationId = pointReq.getStationId();
@ -121,13 +125,13 @@ public class PointDemoServiceImpl implements PointDemoService {
return new ArrayList<>();
}
if (srcId != null) {
deviceInfo = deviceService.selectByStationIdAndSrcId(stationId, srcId);
deviceInfo = deviceService.selectByStationIdAndSrcIdAndLng(stationId, srcId,pointReq.getLang());
if (deviceInfo != null && CommonConstant.ONE.equals(deviceInfo.getVirtual())) {
realSrcId = deviceInfo.getFromId();
virtualDevice = true;
virtualId = deviceInfo.getSrcId();
String deviceName = deviceInfo.getDeviceName();
deviceInfo = deviceService.selectByStationIdAndSrcId(stationId, realSrcId);
deviceInfo = deviceService.selectByStationIdAndSrcIdAndLng(stationId, realSrcId,pointReq.getLang());
deviceInfo.setDeviceName(deviceName);
}
}else{
@ -171,6 +175,7 @@ public class PointDemoServiceImpl implements PointDemoService {
}
deviceTypeColReqVO.setName("".equals(pointReq.getName()) ? null : pointReq.getName());
deviceTypeColReqVO.setSensType(pointReq.getSensType());
deviceTypeColReqVO.setLang(pointReq.getLang());
//增加单位
List<DeviceTypeCol> deviceTypeCols = modelDeviceService.selectByDeviceTypeList(deviceTypeColReqVO);
Map<String, String> deviceColMap = new HashMap<>();
@ -400,7 +405,7 @@ public class PointDemoServiceImpl implements PointDemoService {
if (device.getVirtual() == 0) {
DeviceTypeConfig deviceTypeConfig = deviceTypeConfigService.selectByDeviceType(device.getDeviceType(), device.getGroupId());
if (deviceTypeConfig != null) {
deviceTypeCols = deviceTypeColService.selectByDeviceType(deviceTypeConfig.getDeviceType());
deviceTypeCols = deviceTypeColService.selectByDeviceType(deviceTypeConfig.getDeviceType(),vo.getLang());
queryPointRespVo.setDeviceTypeName(deviceTypeConfig.getName());
}
} else if (device.getVirtual() == 1) {
@ -408,6 +413,7 @@ public class PointDemoServiceImpl implements PointDemoService {
VirtualDeviceCol virtualDeviceColReq = new VirtualDeviceCol();
virtualDeviceColReq.setStationId(vo.getStationId());
virtualDeviceColReq.setSrcId(srcId);
virtualDeviceColReq.setLang(vo.getLang());
List<VirtualDeviceColResp> virtualColList = virtualDeviceColService.getList(virtualDeviceColReq);
for (VirtualDeviceColResp virtualDeviceColResp : virtualColList) {
DeviceTypeCol deviceTypeCol = new DeviceTypeCol();
@ -455,7 +461,7 @@ public class PointDemoServiceImpl implements PointDemoService {
if (device.getVirtual() == 0) {
DeviceTypeConfig deviceTypeConfig = deviceTypeConfigService.selectByDeviceType(device.getDeviceType(), device.getGroupId());
if (deviceTypeConfig != null) {
deviceTypeCols = deviceTypeColService.selectByDeviceType(deviceTypeConfig.getDeviceType());
deviceTypeCols = deviceTypeColService.selectByDeviceType(deviceTypeConfig.getDeviceType(),vo.getLang());
queryPointRespVo.setDeviceTypeName(deviceTypeConfig.getName());
}
}
@ -661,7 +667,7 @@ public class PointDemoServiceImpl implements PointDemoService {
Map<String, BigDecimal> colMaxMap = new HashMap<>();
Map<String, BigDecimal> colMinMap = new HashMap<>();
for (PointCurveSrcCol pointCurveSrcCol : deviceIdList) {
Device device = deviceService.selectByStationIdAndSrcId(pointCurveReq.getStationId(), pointCurveSrcCol.getSrcId());
Device device = deviceService.selectByStationIdAndSrcIdAndLng(pointCurveReq.getStationId(), pointCurveSrcCol.getSrcId(),pointCurveReq.getLang());
DeviceTypeConfig deviceTypeConfig = new DeviceTypeConfig();
if (device != null && device.getDeviceType() != null) {
deviceTypeConfig = deviceTypeConfigService.selectByDeviceType(device.getDeviceType(), device.getGroupId());
@ -672,7 +678,7 @@ public class PointDemoServiceImpl implements PointDemoService {
srcIdAndDeviceTypeMap.put(pointCurveSrcCol.getSrcId(), device.getDeviceType());
pointCurveSrcCol.setDeviceType(device.getDeviceType());
}
List<DeviceTypeCol> deviceTypeCols = deviceTypeColService.selectDeviceTypeColList(pointCurveSrcCol.getDeviceType(), pointCurveSrcCol.getCols());
List<DeviceTypeCol> deviceTypeCols = deviceTypeColService.selectDeviceTypeColList(pointCurveSrcCol.getDeviceType(), pointCurveSrcCol.getCols(),pointCurveReq.getLang());
Map<String, String> nameMap = deviceTypeCols.stream().collect(Collectors.toMap(s -> s.getDeviceType() + "_" + s.getCol(), DeviceTypeCol::getColName));
Map<String, BigDecimal> maxMap = deviceTypeCols.stream().collect(Collectors.toMap(s -> s.getDeviceType() + "_" + s.getCol(), DeviceTypeCol::getMaxValue));
Map<String, BigDecimal> minMap = deviceTypeCols.stream().collect(Collectors.toMap(s -> s.getDeviceType() + "_" + s.getCol(), DeviceTypeCol::getMinValue));;
@ -814,12 +820,12 @@ public class PointDemoServiceImpl implements PointDemoService {
Map<String, BigDecimal> colMinMap = new HashMap<>();
for (PointCurveSrcCol pointCurveSrcCol : deviceIdList) {
Device device = deviceService.selectByStationIdAndSrcId(pointCurveReq.getStationId(), pointCurveSrcCol.getSrcId());
Device device = deviceService.selectByStationIdAndSrcIdAndLng(pointCurveReq.getStationId(), pointCurveSrcCol.getSrcId(),pointCurveReq.getLang());
DeviceTypeConfig deviceTypeConfig = new DeviceTypeConfig();
if (device != null && device.getDeviceType() != null) {
//若是虚拟设备,则取来自的真实设备
if (device.getSrcId() < 0) {
device = deviceService.selectByStationIdAndSrcId(pointCurveReq.getStationId(), device.getFromId());
device = deviceService.selectByStationIdAndSrcIdAndLng(pointCurveReq.getStationId(), device.getFromId(),pointCurveReq.getLang());
pointCurveSrcCol.setSrcId(device.getSrcId());
}
pointCurveSrcCol.setDeviceName(device.getDeviceName());
@ -831,7 +837,7 @@ public class PointDemoServiceImpl implements PointDemoService {
srcIdAndDeviceTypeMap.put(pointCurveSrcCol.getSrcId(), device.getDeviceType());
pointCurveSrcCol.setDeviceType(device.getDeviceType());
}
List<DeviceTypeCol> deviceTypeCols = deviceTypeColService.selectDeviceTypeColList(pointCurveSrcCol.getDeviceType(), pointCurveSrcCol.getCols());
List<DeviceTypeCol> deviceTypeCols = deviceTypeColService.selectDeviceTypeColList(pointCurveSrcCol.getDeviceType(), pointCurveSrcCol.getCols(),pointCurveReq.getLang());
Map<String, String> nameMap = deviceTypeCols.stream().collect(Collectors.toMap(s -> s.getDeviceType() + "_" + s.getCol(), DeviceTypeCol::getColName));
Map<String, BigDecimal> maxMap = deviceTypeCols.stream().collect(Collectors.toMap(s -> s.getDeviceType() + "_" + s.getCol(), DeviceTypeCol::getMaxValue));
Map<String, BigDecimal> minMap = deviceTypeCols.stream().collect(Collectors.toMap(s -> s.getDeviceType() + "_" + s.getCol(), DeviceTypeCol::getMinValue));;
@ -943,10 +949,10 @@ public class PointDemoServiceImpl implements PointDemoService {
// srcIdAndNameMap.put(id, device.getDeviceName());
// srcIdAndDeviceTypeMap.put(id, device.getDeviceType());
// }
Device device = deviceService.selectByStationIdAndSrcId(pointCurveReq.getStationId(), pointCurveSrcCol.getSrcId());
Device device = deviceService.selectByStationIdAndSrcIdAndLng(pointCurveReq.getStationId(), pointCurveSrcCol.getSrcId(),pointCurveReq.getLang());
Integer realSrcId = device.getFromId();
if (device != null && device.getVirtual() == 1) {
device = deviceService.selectByStationIdAndSrcId(pointCurveReq.getStationId(), device.getFromId());
device = deviceService.selectByStationIdAndSrcIdAndLng(pointCurveReq.getStationId(), device.getFromId(),pointCurveReq.getLang());
//此时把 pointCurveSrcCol 的设备id设置为真实设备id
pointCurveSrcCol.setSrcId(realSrcId);
}
@ -982,7 +988,7 @@ public class PointDemoServiceImpl implements PointDemoService {
List<String> yxCols = new ArrayList<>();
List<String> ycCols = new ArrayList<>();
for (String col : cols) {
DeviceTypeCol deviceTypeCol = deviceTypeColService.selectTypeAndCol(col, device.getDeviceType());
DeviceTypeCol deviceTypeCol = deviceTypeColService.selectTypeAndCol(col, device.getDeviceType(),pointCurveReq.getLang());
if (deviceTypeCol != null) {
if (CommonConstant.ONE.equals(pointCurveReq.getIsOriginal())) {
yxCols.add(col);
@ -1123,7 +1129,7 @@ public class PointDemoServiceImpl implements PointDemoService {
if (pointCurveResp.getSrcId().equals(pointCurveSrcCol.getSrcId())) {
Device device = deviceService.selectByStationIdAndSrcId(pointCurveReq.getStationId(), pointCurveSrcCol.getSrcId());
//根据deviceType和col进行在deviceTypeCol表
DeviceTypeCol deviceTypeCol = deviceTypeColService.selectTypeAndCol(pointCurveResp.getCol(), device.getDeviceType());
DeviceTypeCol deviceTypeCol = deviceTypeColService.selectTypeAndCol(pointCurveResp.getCol(), device.getDeviceType(),pointCurveReq.getLang());
if (deviceTypeCol != null) {
pointCurveResp.setUnit(deviceTypeCol.getUnit());
pointCurveResp.setColName(deviceTypeCol.getColName());
@ -1141,7 +1147,7 @@ public class PointDemoServiceImpl implements PointDemoService {
point.setCol(pointCurveResp.getCol());
point.setDeviceName(srcIdAndNameMap.get(pointCurveResp.getSrcId()));
//根据deviceType 和col进行查询colName
DeviceTypeCol deviceTypeCol = deviceTypeColService.selectTypeAndCol(pointCurveResp.getCol(), deviceType);
DeviceTypeCol deviceTypeCol = deviceTypeColService.selectTypeAndCol(pointCurveResp.getCol(), deviceType,pointCurveReq.getLang());
point.setColName(deviceTypeCol.getColName());
point.setStaticCurveList(new ArrayList<>());
point.setUnit(deviceTypeCol.getUnit());
@ -1162,7 +1168,7 @@ public class PointDemoServiceImpl implements PointDemoService {
pointCurveResp.setCol(col);
pointCurveResp.setDeviceName(srcIdAndNameMap.get(pointCurveSrcCol.getSrcId()));
//根据deviceType 和col进行查询colName
deviceTypeCol = deviceTypeColService.selectTypeAndCol(pointCurveResp.getCol(), deviceType);
deviceTypeCol = deviceTypeColService.selectTypeAndCol(pointCurveResp.getCol(), deviceType,pointCurveReq.getLang());
pointCurveResp.setColName(deviceTypeCol.getColName());
pointCurveResp.setStaticCurveList(new ArrayList<>());
pointCurveResp.setUnit(deviceTypeCol.getUnit());
@ -1363,7 +1369,22 @@ public class PointDemoServiceImpl implements PointDemoService {
}
}
List<String> titleList = new ArrayList<>();
String time = DefineConstant.PointDemo.TIME;
String time;
if(CommonConstant.langTemp.EN_US.equals(pointCurveReq.getLang())){
time = DefineConstant.PointDemo.TIME_EN;
}else if(CommonConstant.langTemp.FR_FR.equals(pointCurveReq.getLang())){
time = DefineConstant.PointDemo.TIME_FRA;
}else if(CommonConstant.langTemp.ES_ES.equals(pointCurveReq.getLang())){
time = DefineConstant.PointDemo.TIME_SPA;
}else if(CommonConstant.langTemp.AR_EG.equals(pointCurveReq.getLang())){
time = DefineConstant.PointDemo.TIME_ARA;
}else if(CommonConstant.langTemp.DE_DE.equals(pointCurveReq.getLang())){
time = DefineConstant.PointDemo.TIME_DE;
}else if(CommonConstant.langTemp.PL_PL.equals(pointCurveReq.getLang())){
time = DefineConstant.PointDemo.TIME_PL;
}else{
time = DefineConstant.PointDemo.TIME;
}
if (!CommonConstant.ONE.equals(pointCurveReq.getPageType())) {
titleList.add(time);
}
@ -1550,12 +1571,12 @@ public class PointDemoServiceImpl implements PointDemoService {
Map<String, String> colNameMap = new HashMap<>();
for (PointCurveSrcCol pointCurveSrcCol : deviceIdList) {
Device device = deviceService.selectByStationIdAndSrcId(pointCurveReq.getStationId(), pointCurveSrcCol.getSrcId());
Device device = deviceService.selectByStationIdAndSrcIdAndLng(pointCurveReq.getStationId(), pointCurveSrcCol.getSrcId(),pointCurveReq.getLang());
DeviceTypeConfig deviceTypeConfig = new DeviceTypeConfig();
if (device != null && device.getDeviceType() != null) {
//若是虚拟设备,则取来自的真实设备
if (device.getSrcId() < 0) {
device = deviceService.selectByStationIdAndSrcId(pointCurveReq.getStationId(), device.getFromId());
device = deviceService.selectByStationIdAndSrcIdAndLng(pointCurveReq.getStationId(), device.getFromId(),pointCurveReq.getLang());
pointCurveSrcCol.setSrcId(device.getSrcId());
}
pointCurveSrcCol.setDeviceName(device.getDeviceName());
@ -1567,7 +1588,7 @@ public class PointDemoServiceImpl implements PointDemoService {
srcIdAndDeviceTypeMap.put(pointCurveSrcCol.getSrcId(), device.getDeviceType());
pointCurveSrcCol.setDeviceType(device.getDeviceType());
}
List<DeviceTypeCol> deviceTypeCols = deviceTypeColService.selectDeviceTypeColList(pointCurveSrcCol.getDeviceType(), pointCurveSrcCol.getCols());
List<DeviceTypeCol> deviceTypeCols = deviceTypeColService.selectDeviceTypeColList(pointCurveSrcCol.getDeviceType(), pointCurveSrcCol.getCols(),pointCurveReq.getLang());
Map<String, String> nameMap = deviceTypeCols.stream().collect(Collectors.toMap(s -> s.getDeviceType() + "_" + s.getCol(), DeviceTypeCol::getColName));
colNameMap.putAll(nameMap);
}
@ -1762,12 +1783,12 @@ public class PointDemoServiceImpl implements PointDemoService {
Map<String, String> colNameMap = new HashMap<>();
for (PointCurveSrcCol pointCurveSrcCol : deviceIdList) {
Device device = deviceService.selectByStationIdAndSrcId(pointCurveReq.getStationId(), pointCurveSrcCol.getSrcId());
Device device = deviceService.selectByStationIdAndSrcIdAndLng(pointCurveReq.getStationId(), pointCurveSrcCol.getSrcId(),pointCurveReq.getLang());
DeviceTypeConfig deviceTypeConfig = new DeviceTypeConfig();
if (device != null && device.getDeviceType() != null) {
//若是虚拟设备,则取来自的真实设备
if (device.getSrcId() < 0) {
device = deviceService.selectByStationIdAndSrcId(pointCurveReq.getStationId(), device.getFromId());
device = deviceService.selectByStationIdAndSrcIdAndLng(pointCurveReq.getStationId(), device.getFromId(),pointCurveReq.getLang());
pointCurveSrcCol.setSrcId(device.getSrcId());
}
pointCurveSrcCol.setDeviceName(device.getDeviceName());
@ -1779,7 +1800,7 @@ public class PointDemoServiceImpl implements PointDemoService {
srcIdAndDeviceTypeMap.put(pointCurveSrcCol.getSrcId(), device.getDeviceType());
pointCurveSrcCol.setDeviceType(device.getDeviceType());
}
List<DeviceTypeCol> deviceTypeCols = deviceTypeColService.selectDeviceTypeColList(pointCurveSrcCol.getDeviceType(), pointCurveSrcCol.getCols());
List<DeviceTypeCol> deviceTypeCols = deviceTypeColService.selectDeviceTypeColList(pointCurveSrcCol.getDeviceType(), pointCurveSrcCol.getCols(),pointCurveReq.getLang());
Map<String, String> nameMap = deviceTypeCols.stream().collect(Collectors.toMap(s -> s.getDeviceType() + "_" + s.getCol(), DeviceTypeCol::getColName));
colNameMap.putAll(nameMap);
}

View File

@ -4,7 +4,6 @@ import cn.hutool.core.date.DateField;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.ho.business.constant.DeviceTypeConstant;
import com.ho.business.entity.*;
@ -16,6 +15,7 @@ import com.ho.business.service.*;
import com.ho.business.vo.DeviceTransfer;
import com.ho.business.vo.req.DeviceReqVO;
import com.ho.business.vo.req.MonitorQuery;
import com.ho.business.vo.req.PvEnegyValueReqVO;
import com.ho.business.vo.req.StationReq;
import com.ho.business.vo.req.colCount.ColCountReq;
import com.ho.business.vo.req.device.DeviceTypeQuery;
@ -131,11 +131,10 @@ public class StationHomeServiceImpl implements StationHomeService {
@Autowired
ThreadPoolTaskExecutor threadPoolExecutor;
private List<AppRealTimeCurveRespVo> list;
@Autowired
EarningsCalculateMpptService earningsCalculateMpptService;
private List<AppRealTimeCurveRespVo> list;
@Override
public List<NewRealTimeCurveVo> getRealtimeCurve(StationReq stationReq) {
@ -305,7 +304,7 @@ public class StationHomeServiceImpl implements StationHomeService {
vo.setDeviceName(deviceRespVO.getDeviceName());
if (pointTableData != null) {
//BMS过滤超过最大最小值的数据
DeviceTypeCol deviceTypeCol = deviceTypeColService.selectTypeAndCol(socPowerData.getDeviceIdList().get(0).getCols().get(0), deviceRespVO.getDeviceType());
DeviceTypeCol deviceTypeCol = deviceTypeColService.selectTypeAndCol(socPowerData.getDeviceIdList().get(0).getCols().get(0), deviceRespVO.getDeviceType(),null);
BigDecimal maxValue = deviceTypeCol.getMaxValue();
BigDecimal minValue = deviceTypeCol.getMinValue();
if(maxValue!= null && minValue!= null){
@ -562,7 +561,7 @@ public class StationHomeServiceImpl implements StationHomeService {
if (cols.isEmpty()) {
cols.add(compListByType.get(0).getDeviceCol());
}
DeviceTypeCol deviceTypeCol = deviceTypeColService.selectTypeAndCol(cols.get(0), deviceValue.getDeviceType());
DeviceTypeCol deviceTypeCol = deviceTypeColService.selectTypeAndCol(cols.get(0), deviceValue.getDeviceType(),null);
deviceColData.setSensType(deviceTypeCol.getSensType());
pointCurveSrcCol.setCols(cols);
deviceIdList.add(pointCurveSrcCol);
@ -602,7 +601,7 @@ public class StationHomeServiceImpl implements StationHomeService {
* @return
*/
@Override
public PcsStationData getPcsStationData(Integer stationId) {
public PcsStationData getPcsStationData(Integer stationId,String lang) {
//根据id查询电站
Station station = stationService.selectById(stationId);
if (station == null) {
@ -613,10 +612,51 @@ public class StationHomeServiceImpl implements StationHomeService {
BeanUtils.copyProperties(station, data);
//计算运行天数
String operationDayStr = null;
String name = station.getName();
if (station.getStatus().equals(CommonConstant.TWO)) {
operationDayStr = DefineConstant.StationHome.BUILDING;
if(CommonConstant.langTemp.EN_US.equals(lang)){
operationDayStr = DefineConstant.StationHome.BUILDING_EN;
name = station.getNameEn();
}else if(CommonConstant.langTemp.FR_FR.equals(lang)){
operationDayStr = DefineConstant.StationHome.BUILDING_FRA;
name = station.getNameFra();
}else if(CommonConstant.langTemp.ES_ES.equals(lang)){
operationDayStr = DefineConstant.StationHome.BUILDING_SPA;
name = station.getNameSpa();
}else if(CommonConstant.langTemp.AR_EG.equals(lang)){
operationDayStr = DefineConstant.StationHome.BUILDING_ARA;
name = station.getNameAra();
}else if(CommonConstant.langTemp.DE_DE.equals(lang)){
operationDayStr = DefineConstant.StationHome.BUILDING_DE;
name = station.getNameDe();
}else if(CommonConstant.langTemp.PL_PL.equals(lang)){
operationDayStr = DefineConstant.StationHome.BUILDING_PL;
name = station.getNamePl();
}else{
operationDayStr = DefineConstant.StationHome.BUILDING;
}
} else if (station.getStatus().equals(CommonConstant.THREE)) {
operationDayStr = DefineConstant.StationHome.PROPOSED;
if(CommonConstant.langTemp.EN_US.equals(lang)){
operationDayStr = DefineConstant.StationHome.PROPOSED_EN;
name = station.getNameEn();
}else if(CommonConstant.langTemp.FR_FR.equals(lang)){
operationDayStr = DefineConstant.StationHome.PROPOSED_FRA;
name = station.getNameFra();
}else if(CommonConstant.langTemp.ES_ES.equals(lang)){
operationDayStr = DefineConstant.StationHome.PROPOSED_SPA;
name = station.getNameSpa();
}else if(CommonConstant.langTemp.AR_EG.equals(lang)){
operationDayStr = DefineConstant.StationHome.PROPOSED_ARA;
name = station.getNameAra();
}else if(CommonConstant.langTemp.DE_DE.equals(lang)){
operationDayStr = DefineConstant.StationHome.PROPOSED_DE;
name = station.getNameDe();
}else if(CommonConstant.langTemp.PL_PL.equals(lang)){
operationDayStr = DefineConstant.StationHome.PROPOSED_PL;
name = station.getNamePl();
}else{
operationDayStr = DefineConstant.StationHome.PROPOSED;
}
} else {
long operationDays = DateUtil.between(station.getGridTime(), new Date(), DateUnit.DAY);
operationDayStr = Long.toString(operationDays);
@ -627,6 +667,7 @@ public class StationHomeServiceImpl implements StationHomeService {
// long operationDays = DateUtil.between(station.getGridTime(), new Date(), DateUnit.DAY);
data.setOperationDays(operationDayStr);
data.setName(name);
return data;
}
@ -649,9 +690,38 @@ public class StationHomeServiceImpl implements StationHomeService {
//计算运行天数
String operationDayStr = null;
if (station.getStatus().equals(CommonConstant.TWO)) {
operationDayStr = DefineConstant.StationHome.BUILDING;
// 多语言切换
if(CommonConstant.langTemp.EN_US.equals(req.getLang())){
operationDayStr = DefineConstant.StationHome.BUILDING_EN;
}else if(CommonConstant.langTemp.FR_FR.equals(req.getLang())){
operationDayStr = DefineConstant.StationHome.BUILDING_FRA;
}else if(CommonConstant.langTemp.ES_ES.equals(req.getLang())){
operationDayStr = DefineConstant.StationHome.BUILDING_SPA;
}else if(CommonConstant.langTemp.AR_EG.equals(req.getLang())){
operationDayStr = DefineConstant.StationHome.BUILDING_ARA;
}else if(CommonConstant.langTemp.DE_DE.equals(req.getLang())){
operationDayStr = DefineConstant.StationHome.BUILDING_DE;
}else if(CommonConstant.langTemp.PL_PL.equals(req.getLang())){
operationDayStr = DefineConstant.StationHome.BUILDING_PL;
}else{
operationDayStr = DefineConstant.StationHome.BUILDING;
}
} else if (station.getStatus().equals(CommonConstant.THREE)) {
operationDayStr = DefineConstant.StationHome.PROPOSED;
if(CommonConstant.langTemp.EN_US.equals(req.getLang())){
operationDayStr = DefineConstant.StationHome.PROPOSED_EN;
}else if(CommonConstant.langTemp.FR_FR.equals(req.getLang())){
operationDayStr = DefineConstant.StationHome.PROPOSED_FRA;
}else if(CommonConstant.langTemp.ES_ES.equals(req.getLang())){
operationDayStr = DefineConstant.StationHome.PROPOSED_SPA;
}else if(CommonConstant.langTemp.AR_EG.equals(req.getLang())){
operationDayStr = DefineConstant.StationHome.PROPOSED_ARA;
}else if(CommonConstant.langTemp.DE_DE.equals(req.getLang())){
operationDayStr = DefineConstant.StationHome.PROPOSED_DE;
}else if(CommonConstant.langTemp.PL_PL.equals(req.getLang())){
operationDayStr = DefineConstant.StationHome.PROPOSED_PL;
}else{
operationDayStr = DefineConstant.StationHome.PROPOSED;
}
} else {
long operationDays = DateUtil.between(station.getGridTime(), new Date(), DateUnit.DAY);
operationDayStr = Long.toString(operationDays);
@ -659,6 +729,7 @@ public class StationHomeServiceImpl implements StationHomeService {
//计算系统转化效率
BigDecimal systemEfficiency = BigDecimal.ZERO;
//获取 日充日放 总充总放
CountEleData countEleData = getCountEleData(req);
//总充电量
BigDecimal totalChargeElec = countEleData.getTotalChargeElec();
@ -668,6 +739,7 @@ public class StationHomeServiceImpl implements StationHomeService {
BigDecimal dailyChargeElec = countEleData.getDailyChargeElec();
//日放电量
BigDecimal dailyDischargeElec = countEleData.getDailyDischargeElec();
ColCountReq colCountReq = new ColCountReq();
colCountReq.setStationId(station.getId());
colCountReq.setCol(DataCollectConstant.Elec_Meter.TOTAL_CHARGE);
@ -750,17 +822,22 @@ public class StationHomeServiceImpl implements StationHomeService {
data.setDailyReleaseElec(pv.getDailyReleaseElec());
//计算累计发电量
BigDecimal totalReleaseElec = elecMeterValueService.selectSumValue(station.getId(),DeviceTypeConstant.ELEC_METER_VALUE_TYPE.PV_CHARGE,null);
totalReleaseElec = totalReleaseElec.add(pv.getDailyReleaseElec());
data.setTotalReleaseElec(totalReleaseElec);
//今日收益
String key = RedisKeyConstant.PV.STATION_PV_TODAY_PROFIT + station.getId();
BigDecimal todayIncone = (BigDecimal)redisService.get(key);
todayIncone = todayIncone==null?BigDecimal.ZERO:todayIncone;
data.setTodayIncone(todayIncone);
//累计收益
BigDecimal totalIncome = earningsCalculateMpptService.countAllPvIncome(station.getId(),null,null);
totalIncome = totalIncome.add(todayIncone);
data.setTotalIncome(totalIncome);
//额定功率(光伏)
data.setPvPower(station.getPvPower());
}
if (acPower != null) {
data.setCurrentPower(acPower.getActivePowerPCS());
}
@ -960,22 +1037,12 @@ public class StationHomeServiceImpl implements StationHomeService {
dailyDischargeElec = new BigDecimal(dailyDischargeElecStr);
pcsElecData.setChargeElec(dailyChargeElec);
pcsElecData.setDischargeElec(dailyDischargeElec);
if(req.getStationId()==11003 || req.getStationId()==10942 || req.getStationId()==11006){
// 寄点电站数据
String mainKey = CommonConstant.SHIP_ENERGY_MAIN + req.getStationId();
String json = (String)redisService.get(mainKey);
ShipStationRespVO vo = JSON.parseObject(json,ShipStationRespVO.class);
pcsElecData.setChargeElec(vo.getPositivePowerToday()==null?BigDecimal.ZERO:BigDecimal.valueOf(vo.getPositivePowerToday()));
pcsElecData.setDischargeElec(vo.getReversePowerToday()==null?BigDecimal.ZERO:BigDecimal.valueOf(vo.getReversePowerToday()));
}
}
}
}
return list;
}
@Override
public List<PowerGenerateRespVO> getPvData(PcsStationReq req) {
// 获取今日光伏收益
@ -1031,7 +1098,6 @@ public class StationHomeServiceImpl implements StationHomeService {
}
return list;
}
/**
* 慈溪电站特殊处理
*
@ -1558,7 +1624,7 @@ public class StationHomeServiceImpl implements StationHomeService {
@Override
public OutStationData getStationData(StationReq req) {
OutStationData outStationData = new OutStationData();
PcsStationData pcsStationData = getPcsStationData(req.getStationId());
PcsStationData pcsStationData = getPcsStationData(req.getStationId(),req.getLang());
BeanUtils.copyProperties(pcsStationData, outStationData);
if (req.getDeviceType() == null) {
String deviceType = colCountService.getDeviceType(req.getStationId());
@ -1836,14 +1902,12 @@ public class StationHomeServiceImpl implements StationHomeService {
}
return pcsCurveCurveList;
}
@Override
public List<AppRealTimeCurveRespVo> pvCurve(MonitorQuery monitorQuery) {
//mppt总发电量、有功功率
List<AppRealTimeCurveRespVo> appRealTimeCurveRespVos = getAppRealTimeCurveRespVos(monitorQuery, "totalRelease", "pvActivePower");
return appRealTimeCurveRespVos;
}
@Override
public List<AppRealTimeCurveRespVo> getOpticalStorageCurve(MonitorQuery monitorQuery) {
//逆变有功功率、PV输出功率

View File

@ -23,7 +23,7 @@ public class StationRemoteControlServiceImpl implements StationRemoteControlServ
@Override
public void insert(StationRemoteControl entity) {
stationRemoteControlMapper.insert(entity);
stationRemoteControlMapper.insert(entity);
}
@Override

View File

@ -10,7 +10,7 @@ import com.ho.business.entity.*;
import com.ho.business.feignclient.FileCenterFeignClient;
import com.ho.business.feignclient.FlowFeignClient;
import com.ho.business.feignclient.UserFeignClient;
import com.ho.business.mapper.TranslateNationMapper;
import com.ho.business.mapper.TranslateNameMapper;
import com.ho.business.mapper.TranslateProvinceMapper;
import com.ho.business.mapper.StationMapper;
import com.ho.business.service.*;
@ -34,6 +34,7 @@ import com.ho.common.tools.util.*;
import com.ho.common.tools.vo.req.CardInfoReqVo;
import com.ho.user.api.entity.SysDept;
import com.ho.user.api.vo.req.QueryDeptReqVO;
import jodd.util.StringUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -43,6 +44,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
@ -101,7 +103,7 @@ public class StationServiceImpl implements StationService {
TranslateProvinceMapper translateProvinceMapper;
@Autowired
TranslateNationMapper translateNationMapper;
DynamicConfigService dynamicConfigService;
@Value("${station.timeDifference}")
Integer minute;
@ -212,8 +214,8 @@ public class StationServiceImpl implements StationService {
}
@Override
public List<StationRespVO> selectByIds(List<Integer> ids) {
List<Station> stations = stationMapper.selectByIds(ids);
public List<StationRespVO> selectByIds(List<Integer> ids,String lang) {
List<Station> stations = stationMapper.selectByIds(ids,lang);
List<StationRespVO> stationRespVOS = getStationRespVOS(stations);
if (stationRespVOS != null) {
for (StationRespVO stationRespVO : stationRespVOS) {
@ -235,8 +237,8 @@ public class StationServiceImpl implements StationService {
}
@Override
public List<Station> selectStationsByIds(List<Integer> ids) {
List<Station> stations = stationMapper.selectByIds(ids);
public List<Station> selectStationsByIds(List<Integer> ids,String lang) {
List<Station> stations = stationMapper.selectByIds(ids,lang);
return stations;
}
@ -252,6 +254,17 @@ public class StationServiceImpl implements StationService {
//新增电站是默认不接入光伏
station.setInverterFlag(CommonConstant.ZERO);
updateStationInfo(station);
//电站名称多语言处理
if(StringUtil.isNotBlank(station.getName())){
TranslateName translate = dynamicConfigService.getNameLanguage(station.getName());
station.setNameEn(translate.getNameEn());
station.setNameFra(translate.getNameFra());
station.setNameSpa(translate.getNameSpa());
station.setNameDe(translate.getNameDe());
station.setNamePl(translate.getNamePl());
station.setNameAra(translate.getNameAra());
}
stationMapper.insertSelective(station);
vo.setId(station.getId());
//新增图片数据
@ -310,17 +323,34 @@ public class StationServiceImpl implements StationService {
* @param station
*/
private void updateStationInfo(Station station) {
MyAddress address = AddressUntils.getAddress(String.valueOf(station.getLatitude()),String.valueOf(station.getLongitude()));
MyAddress address = AbroadAddressUtils.getAddress(String.valueOf(station.getLatitude()),String.valueOf(station.getLongitude()));
if (null != address) {
String adCode = address.getAdcode();
String adCode = address.getCityCode();
if(StringUtil.isEmpty(adCode)){
adCode = String.format("%05d", new Random().nextInt(100000));
}
station.setAdCode(adCode);
station.setDistrict(address.getDistrict());
station.setCity(address.getCity());
station.setProvince(address.getProvince());
TranslateName pro = dynamicConfigService.getNameLanguage(station.getProvince());
station.setProvinceEn(pro.getNameEn());
station.setProvinceFra(pro.getNameFra());
station.setProvinceSpa(pro.getNameSpa());
station.setProvinceDe(pro.getNameDe());
station.setProvincePl(pro.getNamePl());
station.setProvinceAra(pro.getNameAra());
station.setNation(address.getNation());
TranslateName na = dynamicConfigService.getNameLanguage(station.getNation());
station.setNationEn(na.getNameEn());
station.setNationFra(na.getNameFra());
station.setNationSpa(na.getNameSpa());
station.setNationDe(na.getNameDe());
station.setNationPl(na.getNamePl());
station.setNationAra(na.getNameAra());
String key = RedisKeyConstant.WEATHER_PROVINCE_CITY + adCode;
if (!redisService.hasKey(key)) {
WeatherRespVo weatherRespVo = WeatherUntils.getWeatherRespVo(station.getAdCode());
WeatherRespVo weatherRespVo = AbroadWeatherUtils.getWeatherRespVo(String.valueOf(station.getLatitude()),String.valueOf(station.getLongitude()));
if (weatherRespVo != null) {
weatherRespVo.setUpdateTime(System.currentTimeMillis());
redisService.set(key, weatherRespVo);
@ -376,6 +406,18 @@ public class StationServiceImpl implements StationService {
if (!(vo.getLongitude().compareTo(s.getLongitude()) == 0 && vo.getLatitude().compareTo(s.getLatitude()) == 0)) {
updateStationInfo(station);
}
// 电站名称多语言处理,名称相同是不需要处理
if(StringUtil.isNotBlank(station.getName())
&& !(vo.getName().equals(s.getName()))){
TranslateName translate = dynamicConfigService.getNameLanguage(station.getName());
station.setNameEn(translate.getNameEn());
station.setNameFra(translate.getNameFra());
station.setNameSpa(translate.getNameSpa());
station.setNameDe(translate.getNameDe());
station.setNamePl(translate.getNamePl());
station.setNameAra(translate.getNameAra());
}
station.setIccId(vo.getIccId());
stationMapper.updateByPrimaryKeySelective(station);
//调用device方法 直接进行修改
@ -715,6 +757,7 @@ public class StationServiceImpl implements StationService {
if (stationIds != null && !stationIds.isEmpty()) {
StationPageReqVO vo = new StationPageReqVO();
vo.setIds(stationIds);
vo.setLang(user.getLang());
stations = stationMapper.selectByGroupIdNotExclude(vo);
}
List<NationStation> nationList = new ArrayList<>();

View File

@ -119,7 +119,7 @@ public class VirtualDeviceColServiceImpl implements VirtualDeviceColService {
}
virtualDeviceColList = new ArrayList<>();
String deviceType = deviceValue.getDeviceType().replace(UNDERLINE + vo.getModelStationId(), UNDERLINE + vo.getStationId());
List<DeviceTypeCol> deviceTypeCols = deviceTypeColService.selectByDeviceType(deviceType);
List<DeviceTypeCol> deviceTypeCols = deviceTypeColService.selectByDeviceType(deviceType,null);
Map<String, List<DeviceTypeCol>> modelMap = deviceTypeCols.stream().collect(Collectors.groupingBy(DeviceTypeCol::getCol));
//根据col进行数据对比更换device_col_id
for (VirtualDeviceColResp virtualDeviceColResp : virtualDeviceColRespList) {

View File

@ -14,10 +14,14 @@
</insert>
<insert id="insertList" keyColumn="id" keyProperty="id" useGeneratedKeys="true">
insert into curve_config (curve_type,curve_name,curve_name_en,auxiliary_value,is_hide,station_id,permission_id,page_location,device_id,sort)
insert into curve_config (curve_type,curve_name,curve_name_en,
curve_name_fra,curve_name_spa,curve_name_de,curve_name_pl,curve_name_ara,
auxiliary_value,is_hide,station_id,permission_id,page_location,device_id,sort)
values
<foreach item="item" collection="list" index="index" separator=",">
(#{item.curveType},#{item.curveName},#{item.curveNameEn},#{item.auxiliaryValue},#{item.isHide},#{item.stationId},#{item.permissionId},#{item.pageLocation},#{item.deviceId},#{item.sort})
(#{item.curveType},#{item.curveName},#{item.curveNameEn},
#{item.curveNameFra},#{item.curveNameSpa},#{item.curveNameDe},#{item.curveNamePl},#{item.curveNameAra},
#{item.auxiliaryValue},#{item.isHide},#{item.stationId},#{item.permissionId},#{item.pageLocation},#{item.deviceId},#{item.sort})
</foreach>
</insert>
@ -35,9 +39,29 @@
<select id="selectByParam" resultType="com.ho.business.vo.resp.dynamicConfig.CurveConfigResp">
SELECT
c.id,
c.curve_name,
c.curve_name as curve_name_zh,
c.curve_name_en,
<choose>
<when test="lang != null and lang=='en_US' ">
c.curve_name_en curveName,
</when>
<when test="lang != null and lang=='fr_FR' ">
c.curve_name_fra curveName,
</when>
<when test="lang != null and lang=='es_ES' ">
c.curve_name_spa curveName,
</when>
<when test="lang != null and lang=='de_DE' ">
c.curve_name_de curveName,
</when>
<when test="lang != null and lang=='pl_PL' ">
c.curve_name_pl curveName,
</when>
<when test="lang != null and lang=='ar_EG' ">
c.curve_name_ara curveName,
</when>
<otherwise>
c.curve_name,
</otherwise>
</choose>
c.curve_type,
c.auxiliary_value,
c.station_id,
@ -81,10 +105,14 @@
</delete>
<insert id="updateList" keyColumn="id" keyProperty="id" useGeneratedKeys="true">
insert into curve_config (id,curve_type,curve_name,auxiliary_value,is_hide,station_id,permission_id,page_location,device_id,sort)
insert into curve_config (id,curve_type,curve_name,auxiliary_value,is_hide,
curve_name_en,curve_name_fra,curve_name_spa,curve_name_de,curve_name_pl,curve_name_ara,
station_id,permission_id,page_location,device_id,sort)
values
<foreach item="item" collection="list" index="index" separator=",">
(#{item.id},#{item.curveType},#{item.curveName},#{item.auxiliaryValue},#{item.isHide},#{item.stationId},#{item.permissionId},#{item.pageLocation},#{item.deviceId},#{item.sort})
(#{item.id},#{item.curveType},#{item.curveName},
#{item.curveNameEn},#{item.curveNameFra},#{item.curveNameSpa},#{item.curveNameDe},#{item.curveNamePl},#{item.curveNameAra},
#{item.auxiliaryValue},#{item.isHide},#{item.stationId},#{item.permissionId},#{item.pageLocation},#{item.deviceId},#{item.sort})
</foreach>
</insert>

View File

@ -22,7 +22,44 @@
<sql id="Base_Column_List">
id,group_id,dept_id,src_id,pid,category,
station_id,device_name,device_name_en,device_type,
station_id,device_name,
device_name_en,device_name_fra,device_name_spa,device_name_de,device_name_pl,device_name_ara,
device_type,producer,serial_no,status,device_json,`virtual`,from_id,hide,flow_direction,producer_type,unit_type
</sql>
<sql id="Base_Column_List1">
id,group_id,dept_id,src_id,pid,category,
station_id,device_name_en deviceName,device_type,
producer,serial_no,status,device_json,`virtual`,from_id,hide,flow_direction,producer_type,unit_type
</sql>
<sql id="Base_Column_List2">
id,group_id,dept_id,src_id,pid,category,
station_id,device_name_fra deviceName,device_type,
producer,serial_no,status,device_json,`virtual`,from_id,hide,flow_direction,producer_type,unit_type
</sql>
<sql id="Base_Column_List3">
id,group_id,dept_id,src_id,pid,category,
station_id,device_name_spa deviceName,device_type,
producer,serial_no,status,device_json,`virtual`,from_id,hide,flow_direction,producer_type,unit_type
</sql>
<sql id="Base_Column_List4">
id,group_id,dept_id,src_id,pid,category,
station_id,device_name_de deviceName,device_type,
producer,serial_no,status,device_json,`virtual`,from_id,hide,flow_direction,producer_type,unit_type
</sql>
<sql id="Base_Column_List5">
id,group_id,dept_id,src_id,pid,category,
station_id,device_name_pl deviceName,device_type,
producer,serial_no,status,device_json,`virtual`,from_id,hide,flow_direction,producer_type,unit_type
</sql>
<sql id="Base_Column_List6">
id,group_id,dept_id,src_id,pid,category,
station_id,device_name_ara deviceName,device_type,
producer,serial_no,status,device_json,`virtual`,from_id,hide,flow_direction,producer_type,unit_type
</sql>
@ -81,7 +118,29 @@
<select id="selectByCondition" resultType="com.ho.business.vo.resp.DeviceRespVO">
select
<include refid="Base_Column_List"/>
<choose>
<when test="lang != null and lang=='en_US' ">
<include refid="Base_Column_List1"/>
</when>
<when test="lang != null and lang=='fr_FR' ">
<include refid="Base_Column_List2"/>
</when>
<when test="lang != null and lang=='es_ES' ">
<include refid="Base_Column_List3"/>
</when>
<when test="lang != null and lang=='de_DE' ">
<include refid="Base_Column_List4"/>
</when>
<when test="lang != null and lang=='pl_PL' ">
<include refid="Base_Column_List5"/>
</when>
<when test="lang != null and lang=='ar_EG' ">
<include refid="Base_Column_List6"/>
</when>
<otherwise>
<include refid="Base_Column_List"/>
</otherwise>
</choose>
from device
<where>
<if test="stationId != null">
@ -259,7 +318,29 @@
</select>
<select id="selectByIdAndSrcIdNotZero" resultType="com.ho.business.vo.resp.DeviceRespVO">
SELECT
<include refid="Base_Column_List"/>
<choose>
<when test="lang != null and lang=='en_US' ">
<include refid="Base_Column_List1"/>
</when>
<when test="lang != null and lang=='fr_FR' ">
<include refid="Base_Column_List2"/>
</when>
<when test="lang != null and lang=='es_ES' ">
<include refid="Base_Column_List3"/>
</when>
<when test="lang != null and lang=='de_DE' ">
<include refid="Base_Column_List4"/>
</when>
<when test="lang != null and lang=='pl_PL' ">
<include refid="Base_Column_List5"/>
</when>
<when test="lang != null and lang=='ar_EG' ">
<include refid="Base_Column_List6"/>
</when>
<otherwise>
<include refid="Base_Column_List"/>
</otherwise>
</choose>
FROM `device`
<where>
<if test="needHide == null">
@ -334,6 +415,12 @@
<if test="category != null">category,</if>
<if test="stationId != null">station_id,</if>
<if test="deviceName != null">device_name,</if>
<if test="deviceNameEn != null">device_name_en,</if>
<if test="deviceNameFra != null">device_name_fra,</if>
<if test="deviceNameSpa != null">device_name_spa,</if>
<if test="deviceNameDe != null">device_name_de,</if>
<if test="deviceNamePl != null">device_name_pl,</if>
<if test="deviceNameAra != null">device_name_ara,</if>
<if test="deviceType != null">device_type,</if>
<if test="producer != null">producer,</if>
<if test="serialNo != null">serial_no,</if>
@ -351,6 +438,12 @@
<if test="category != null">#{category,jdbcType=INTEGER},</if>
<if test="stationId != null">#{stationId,jdbcType=INTEGER},</if>
<if test="deviceName != null">#{deviceName,jdbcType=VARCHAR},</if>
<if test="deviceNameEn != null">#{deviceNameEn,jdbcType=VARCHAR},</if>
<if test="deviceNameFra != null">#{deviceNameFra,jdbcType=VARCHAR},</if>
<if test="deviceNameSpa != null">#{deviceNameSpa,jdbcType=VARCHAR},</if>
<if test="deviceNameDe != null">#{deviceNameDe,jdbcType=VARCHAR},</if>
<if test="deviceNamePl != null">#{deviceNamePl,jdbcType=VARCHAR},</if>
<if test="deviceNameAra != null">#{deviceNameAra,jdbcType=VARCHAR},</if>
<if test="deviceType != null">#{deviceType,jdbcType=VARCHAR},</if>
<if test="producer != null">#{producer,jdbcType=VARCHAR},</if>
<if test="serialNo != null">#{serialNo,jdbcType=VARCHAR},</if>
@ -366,14 +459,16 @@
<insert id="insertBatch">
INSERT INTO device
(group_id,dept_id,src_id,pid,category,
station_id,device_name,device_type,
serial_no,status,`virtual`,from_id,create_time)
station_id,device_name,device_name_en,
device_name_fra,device_name_spa,device_name_de,device_name_pl,device_name_ara,
device_type,serial_no,status,`virtual`,from_id,create_time)
VALUES
<foreach item="item" collection="list" index="index" separator=",">
(
#{item.groupId},#{item.deptId},#{item.srcId},#{item.pid}
,#{item.category} ,#{item.stationId},#{item.deviceName},#{item.deviceType}
,#{item.serialNo},#{item.status},#{item.virtual},#{item.fromId},#{item.createTime}
,#{item.category} ,#{item.stationId},#{item.deviceName},#{item.deviceNameEn}
,#{item.deviceNameFra},#{item.deviceNameSpa},#{item.deviceNameDe},#{item.deviceNamePl},#{item.deviceNameAra}
,#{item.deviceType},#{item.serialNo},#{item.status},#{item.virtual},#{item.fromId},#{item.createTime}
)
</foreach>

View File

@ -26,7 +26,52 @@
<sql id="Base_Column_List">
id
,device_type_id,device_type,
device_type_name,col,col_name,col_en,sens_type,is_show,is_save,
device_type_name,col,col_name,
col_en,col_fra,col_spa,col_de,col_pl,col_ara,
sens_type,is_show,is_save,
max_value,min_value,specified_value,offset_value,factor,unit,
data_type,filter_type
</sql>
<sql id="Base_Column_List1">
id
,device_type_id,device_type,
device_type_name,col,col_en colName,col_en,sens_type,is_show,is_save,
max_value,min_value,specified_value,offset_value,factor,unit,
data_type,filter_type
</sql>
<sql id="Base_Column_List2">
id
,device_type_id,device_type,
device_type_name,col,col_fra colName,col_en,sens_type,is_show,is_save,
max_value,min_value,specified_value,offset_value,factor,unit,
data_type,filter_type
</sql>
<sql id="Base_Column_List3">
id
,device_type_id,device_type,
device_type_name,col,col_spa colName,col_en,sens_type,is_show,is_save,
max_value,min_value,specified_value,offset_value,factor,unit,
data_type,filter_type
</sql>
<sql id="Base_Column_List4">
id
,device_type_id,device_type,
device_type_name,col,col_de colName,col_en,sens_type,is_show,is_save,
max_value,min_value,specified_value,offset_value,factor,unit,
data_type,filter_type
</sql>
<sql id="Base_Column_List5">
id
,device_type_id,device_type,
device_type_name,col,col_pl colName,col_en,sens_type,is_show,is_save,
max_value,min_value,specified_value,offset_value,factor,unit,
data_type,filter_type
</sql>
<sql id="Base_Column_List6">
id
,device_type_id,device_type,
device_type_name,col,col_ara colName,col_en,sens_type,is_show,is_save,
max_value,min_value,specified_value,offset_value,factor,unit,
data_type,filter_type
</sql>
@ -73,7 +118,29 @@
<select id="selectByDeviceType" resultType="com.ho.business.entity.DeviceTypeCol">
select
<include refid="Base_Column_List"/>
<choose>
<when test="lang != null and lang=='en_US' ">
<include refid="Base_Column_List1"/>
</when>
<when test="lang != null and lang=='fr_FR' ">
<include refid="Base_Column_List2"/>
</when>
<when test="lang != null and lang=='es_ES' ">
<include refid="Base_Column_List3"/>
</when>
<when test="lang != null and lang=='de_DE' ">
<include refid="Base_Column_List4"/>
</when>
<when test="lang != null and lang=='pl_PL' ">
<include refid="Base_Column_List5"/>
</when>
<when test="lang != null and lang=='ar_EG' ">
<include refid="Base_Column_List6"/>
</when>
<otherwise>
<include refid="Base_Column_List"/>
</otherwise>
</choose>
from device_type_col
<where>
<if test="deviceType != null">
@ -103,7 +170,29 @@
<select id="selectByDeviceTypeList" resultType="com.ho.business.entity.DeviceTypeCol">
select
<include refid="Base_Column_List"/>
<choose>
<when test="deviceTypeColReqVO.lang != null and deviceTypeColReqVO.lang=='en_US' ">
<include refid="Base_Column_List1"/>
</when>
<when test="deviceTypeColReqVO.lang != null and deviceTypeColReqVO.lang=='fr_FR' ">
<include refid="Base_Column_List2"/>
</when>
<when test="deviceTypeColReqVO.lang != null and deviceTypeColReqVO.lang=='es_ES' ">
<include refid="Base_Column_List3"/>
</when>
<when test="deviceTypeColReqVO.lang != null and deviceTypeColReqVO.lang=='de_DE' ">
<include refid="Base_Column_List4"/>
</when>
<when test="deviceTypeColReqVO.lang != null and deviceTypeColReqVO.lang=='pl_PL' ">
<include refid="Base_Column_List5"/>
</when>
<when test="deviceTypeColReqVO.lang != null and deviceTypeColReqVO.lang=='ar_EG' ">
<include refid="Base_Column_List6"/>
</when>
<otherwise>
<include refid="Base_Column_List"/>
</otherwise>
</choose>
from device_type_col
<where>
<if test="deviceTypeColReqVO.deviceTypeList != null and deviceTypeColReqVO.deviceTypeList.size !=0">
@ -116,7 +205,7 @@
and is_save = #{deviceTypeColReqVO.isSave}
</if>
<if test="deviceTypeColReqVO.name != null">
and (col_name LIKE concat('%',#{deviceTypeColReqVO.name},'%') or col LIKE
and (col_name LIKE concat('%',#{deviceTypeColReqVO.name},'%') or col_en LIKE concat('%',#{deviceTypeColReqVO.name},'%') or col LIKE
concat('%',#{deviceTypeColReqVO.name},'%'))
</if>
<if test="deviceTypeColReqVO.sensType != null">
@ -181,7 +270,29 @@
<select id="selectSameCol" resultType="com.ho.business.entity.DeviceTypeCol">
select
<include refid="Base_Column_List"/>
<choose>
<when test="lang != null and lang=='en_US' ">
<include refid="Base_Column_List1"/>
</when>
<when test="lang != null and lang=='fr_FR' ">
<include refid="Base_Column_List2"/>
</when>
<when test="lang != null and lang=='es_ES' ">
<include refid="Base_Column_List3"/>
</when>
<when test="lang != null and lang=='de_DE' ">
<include refid="Base_Column_List4"/>
</when>
<when test="lang != null and lang=='pl_PL' ">
<include refid="Base_Column_List5"/>
</when>
<when test="lang != null and lang=='ar_EG' ">
<include refid="Base_Column_List6"/>
</when>
<otherwise>
<include refid="Base_Column_List"/>
</otherwise>
</choose>
from device_type_col
<where>
<if test="deviceType != null">
@ -197,7 +308,29 @@
</select>
<select id="selectTypeAndCol" resultType="com.ho.business.entity.DeviceTypeCol">
select
<include refid="Base_Column_List"/>
<choose>
<when test="lang != null and lang=='en_US' ">
<include refid="Base_Column_List1"/>
</when>
<when test="lang != null and lang=='fr_FR' ">
<include refid="Base_Column_List2"/>
</when>
<when test="lang != null and lang=='es_ES' ">
<include refid="Base_Column_List3"/>
</when>
<when test="lang != null and lang=='de_DE' ">
<include refid="Base_Column_List4"/>
</when>
<when test="lang != null and lang=='pl_PL' ">
<include refid="Base_Column_List5"/>
</when>
<when test="lang != null and lang=='ar_EG' ">
<include refid="Base_Column_List6"/>
</when>
<otherwise>
<include refid="Base_Column_List"/>
</otherwise>
</choose>
from device_type_col
<where>
<if test="deviceType != null">
@ -287,10 +420,14 @@
<insert id="insertList" keyColumn="id" keyProperty="id" parameterType="java.util.List" useGeneratedKeys="true">
insert into device_type_col
(device_type_id,device_type,device_type_name,col,col_name,col_en,sens_type,is_show,is_save,max_value,min_value,offset_value,factor,unit)
(device_type_id,device_type,device_type_name,col,col_name,
col_en,col_fra,col_spa,col_de,col_pl,col_ara,
sens_type,is_show,is_save,max_value,min_value,offset_value,factor,unit)
values
<foreach collection="deviceTypeColList" item="item" index="index" separator=",">
(#{item.deviceTypeId},#{item.deviceType},#{item.deviceTypeName},#{item.col},#{item.colName},#{item.colEn},#{item.sensType},#{item.isShow},#{item.isSave},#{item.maxValue},#{item.minValue},#{item.offsetValue},#{item.factor},#{item.unit})
(#{item.deviceTypeId},#{item.deviceType},#{item.deviceTypeName},#{item.col},#{item.colName},
#{item.colEn},#{item.colFra},#{item.colSpa},#{item.colDe},#{item.colPl},#{item.colAra},
#{item.sensType},#{item.isShow},#{item.isSave},#{item.maxValue},#{item.minValue},#{item.offsetValue},#{item.factor},#{item.unit})
</foreach>
</insert>

View File

@ -19,12 +19,16 @@
</resultMap>
<insert id="insertList" keyColumn="id" keyProperty="id" useGeneratedKeys="true">
insert into dynamic_config (station_id,src_id,device_type,col,col_name,col_name_en,sens_type,permission_id,page_location,div_location,sort,device_id)
insert into dynamic_config (station_id,src_id,device_type,col,col_name,col_name_en,
col_name_fra,col_name_spa,col_name_de,col_name_pl,col_name_ara,
sens_type,permission_id,page_location,div_location,sort,device_id)
values
<foreach item="item" collection="list" index="index" separator=",">
(
#{item.stationId},#{item.srcId},#{item.deviceType},#{item.col},
#{item.colName},#{item.colNameEn},#{item.sensType},#{item.permissionId},#{item.pageLocation},#{item.divLocation},#{item.sort},#{item.deviceId}
#{item.colName},#{item.colNameEn},
#{item.colNameFra},#{item.colNameSpa},#{item.colNameDe},#{item.colNamePl},#{item.colNameAra},
#{item.sensType},#{item.permissionId},#{item.pageLocation},#{item.divLocation},#{item.sort},#{item.deviceId}
)
</foreach>

View File

@ -45,9 +45,9 @@
<select id="countAllPvIncome" resultType="java.math.BigDecimal">
SELECT sum( digital )
FROM
earnings_calculate_mppt
earnings_calculate_mppt
WHERE
station_id = #{stationId}
station_id = #{stationId}
<if test="beginTime != null">
and day &gt;= #{beginTime}
</if>

View File

@ -22,18 +22,59 @@
col_name
</sql>
<sql id="Base_Column_List1">
id
,user_id,model_id,
model_name_en model_name,src_id,col,station_id,device_type,
col_name_en col_name
</sql>
<sql id="Base_Column_List2">
id
,user_id,model_id,
model_name_fra model_name,src_id,col,station_id,device_type,
col_name_en col_name
</sql>
<sql id="Base_Column_List3">
id
,user_id,model_id,
model_name_spa model_name,src_id,col,station_id,device_type,
col_name_en col_name
</sql>
<sql id="Base_Column_List4">
id
,user_id,model_id,
model_name_de model_name,src_id,col,station_id,device_type,
col_name_en col_name
</sql>
<sql id="Base_Column_List5">
id
,user_id,model_id,
model_name_pl model_name,src_id,col,station_id,device_type,
col_name_en col_name
</sql>
<sql id="Base_Column_List6">
id
,user_id,model_id,
model_name_ara model_name,src_id,col,station_id,device_type,
col_name_en col_name
</sql>
<insert id="insertBatch">
INSERT INTO his_curve_relate
(user_id,model_id,
model_name,src_id,col,station_id,device_type,
col_name)
model_name,model_name_en,
model_name_fra,model_name_spa,model_name_de,model_name_pl,model_name_ara,
src_id,col,station_id,device_type,
col_name,col_name_en,
col_name_fra,col_name_spa,col_name_de,col_name_pl, col_name_ara)
VALUES
<foreach item="item" collection="list" index="index" separator=",">
(
#{item.userId},#{item.modelId},#{item.modelName},#{item.srcId}
,#{item.col} ,#{item.stationId},#{item.deviceType}
,#{item.colName}
#{item.userId},#{item.modelId},#{item.modelName},#{item.modelNameEn},
#{item.modelNameFra},#{item.modelNameSpa},#{item.modelNameDe},#{item.modelNamePl},#{item.modelNameAra},
#{item.srcId},#{item.col} ,#{item.stationId},#{item.deviceType}
,#{item.colName},#{item.colNameEn},#{item.colNameFra},#{item.colNameSpa},#{item.colNameDe},#{item.colNamePl},#{item.colNameAra}
)
</foreach>
@ -41,7 +82,29 @@
<select id="selectAll" resultType="com.ho.business.entity.HisCurveRelate">
select
<include refid="Base_Column_List"/>
<choose>
<when test="hisCurveRelate.lang != null and hisCurveRelate.lang=='en_US' ">
<include refid="Base_Column_List1"/>
</when>
<when test="hisCurveRelate.lang != null and hisCurveRelate.lang=='fr_FR' ">
<include refid="Base_Column_List2"/>
</when>
<when test="hisCurveRelate.lang != null and hisCurveRelate.lang=='es_ES' ">
<include refid="Base_Column_List3"/>
</when>
<when test="hisCurveRelate.lang != null and hisCurveRelate.lang=='de_DE' ">
<include refid="Base_Column_List4"/>
</when>
<when test="hisCurveRelate.lang != null and hisCurveRelate.lang=='pl_PL' ">
<include refid="Base_Column_List5"/>
</when>
<when test="hisCurveRelate.lang != null and hisCurveRelate.lang=='ar_EG' ">
<include refid="Base_Column_List6"/>
</when>
<otherwise>
<include refid="Base_Column_List"/>
</otherwise>
</choose>
from his_curve_relate
<where>
<if test="hisCurveRelate.stationId!=null">

View File

@ -6,12 +6,59 @@
<select id="getIssueDevices" resultType="HashMap">
select
src_id as value, device_name as label
src_id as value,
<choose>
<when test="lang != null and lang=='en_US' ">
device_name_en as label
</when>
<when test="lang != null and lang=='fr_FR' ">
device_name_fra as label
</when>
<when test="lang != null and lang=='es_ES' ">
device_name_spa as label
</when>
<when test="lang != null and lang=='de_DE' ">
device_name_de as label
</when>
<when test="lang != null and lang=='pl_PL' ">
device_name_pl as label
</when>
<when test="lang != null and lang=='ar_EG' ">
device_name_ara as label
</when>
<otherwise>
device_name as label
</otherwise>
</choose>
from device where (device_type like 'agc%' or device_type like 'planCurve%' ) and station_id = #{stationId}
</select>
<select id="getTemplate" resultType="HashMap">
select id as value,template_name as label from planning_curve_template
select id as value,
<choose>
<when test="lang != null and lang=='en_US' ">
template_name_en as label
</when>
<when test="lang != null and lang=='fr_FR' ">
template_name_fra as label
</when>
<when test="lang != null and lang=='es_ES' ">
template_name_spa as label
</when>
<when test="lang != null and lang=='de_DE' ">
template_name_de as label
</when>
<when test="lang != null and lang=='pl_PL' ">
template_name_pl as label
</when>
<when test="lang != null and lang=='ar_EG' ">
template_name_ara as label
</when>
<otherwise>
template_name as label
</otherwise>
</choose>
from planning_curve_template
where ( station_id = #{stationId} or station_id is null ) and status = 1
</select>
@ -110,11 +157,17 @@
<insert id="planCurveOperationRecord" useGeneratedKeys="true" keyColumn="id" keyProperty="id" parameterType="com.ho.business.vo.resp.planningCurve.PlanningIssueVo">
insert into planning_curve_operation_record
(user_id,user_name,operate_time,operate_content,operate_result,effective_time,status,previous_planning_curve,latest_planning_curve,station_id)
values (
#{condition.userId},#{condition.userName},#{condition.operateTime},#{condition.operateContent},#{condition.operateResult},
#{condition.effectiveTime},#{condition.status},#{condition.previousPlanningCurve},#{condition.latestPlanningCurve},#{condition.stationId}
)
(user_id,user_name,operate_time,operate_content,operate_content_en,
operate_content_fra,operate_content_spa,operate_content_de,operate_content_pl,operate_content_ara,
operate_result,operate_result_en,operate_result_fra,operate_result_spa,operate_result_de,operate_result_pl,operate_result_ara,
effective_time,status,previous_planning_curve,latest_planning_curve,station_id)
values (
#{condition.userId},#{condition.userName},#{condition.operateTime},#{condition.operateContent},
#{condition.operateContentEn},#{condition.operateContentFra},#{condition.operateContentSpa},#{condition.operateContentDe},#{condition.operateContentPl},#{condition.operateContentAra},
#{condition.operateResult},
#{condition.operateResultEn},#{condition.operateResultFra},#{condition.operateResultSpa},#{condition.operateResultDe},#{condition.operateResultPl},#{condition.operateResultAra},
#{condition.effectiveTime},#{condition.status},#{condition.previousPlanningCurve},#{condition.latestPlanningCurve},#{condition.stationId}
)
</insert>
<insert id="addPlanningCurveHistory" parameterType="com.ho.business.entity.PlanningCurveHistory">
@ -125,8 +178,55 @@
</insert>
<select id="getPlanCurveOperationList" resultType="com.ho.business.entity.PlanCurveOperationRecordReq">
select user_id,user_name,operate_time,operate_content,operate_result,effective_time,status,previous_planning_curve,latest_planning_curve,station_id from
planning_curve_operation_record where station_id = #{stationId} order by operate_time desc
select user_id,user_name,operate_time,
<choose>
<when test="lang != null and lang=='en_US' ">
operate_content_en operate_content,
</when>
<when test="lang != null and lang=='fr_FR' ">
operate_content_fra operate_content,
</when>
<when test="lang != null and lang=='es_ES' ">
operate_content_spa operate_content,
</when>
<when test="lang != null and lang=='de_DE' ">
operate_content_de operate_content,
</when>
<when test="lang != null and lang=='pl_PL' ">
operate_content_pl operate_content,
</when>
<when test="lang != null and lang=='ar_EG' ">
operate_content_ara operate_content,
</when>
<otherwise>
operate_content,
</otherwise>
</choose>
<choose>
<when test="lang != null and lang=='en_US' ">
operate_result_en operate_result,
</when>
<when test="lang != null and lang=='fr_FR' ">
operate_result_fra operate_content,
</when>
<when test="lang != null and lang=='es_ES' ">
operate_result_spa operate_content,
</when>
<when test="lang != null and lang=='de_DE' ">
operate_result_de operate_content,
</when>
<when test="lang != null and lang=='pl_PL' ">
operate_result_pl operate_content,
</when>
<when test="lang != null and lang=='ar_EG' ">
operate_result_ara operate_content,
</when>
<otherwise>
operate_result,
</otherwise>
</choose>
effective_time,status,previous_planning_curve,latest_planning_curve,station_id from
planning_curve_operation_record where station_id = #{stationId} order by operate_time desc
</select>
<select id="getPlanningCurveHistory" resultType="com.ho.business.entity.PlanningCurveHistory">

View File

@ -35,14 +35,45 @@
tem.elec_template_id elec_template_id, tem.status status, date_format(tem.update_time,'%Y-%m-%d %H:%i:%s') update_time, tem.p tem_p, tem.capacity, tem.soc_upper,
tem.soc_lower, cur.id id, cur.start_time start_time, cur.end_time end_time, cur.p p, cur.q q, cur.soc soc,cur.planning_template_id
from (
select id,template_no,template_name,elec_template_id,station_id,group_id,income,status,p,capacity,soc_upper,soc_lower,create_time,update_time
select id,template_no,
<choose>
<when test="lang != null and lang=='en_US' ">
template_name_en template_name,
</when>
<when test="lang != null and lang=='fr_FR' ">
template_name_fra template_name,
</when>
<when test="lang != null and lang=='es_ES' ">
template_name_spa template_name,
</when>
<when test="lang != null and lang=='de_DE' ">
template_name_de template_name,
</when>
<when test="lang != null and lang=='pl_PL' ">
template_name_pl template_name,
</when>
<when test="lang != null and lang=='ar_EG' ">
template_name_ara template_name,
</when>
<otherwise>
template_name,
</otherwise>
</choose>
elec_template_id,station_id,group_id,income,status,p,capacity,soc_upper,soc_lower,create_time,update_time
from planning_curve_template
<where>
<if test="temId != null and temId != ''">
id = #{temId}
</if>
<if test="templateName != null and templateName != ''">
and template_name like concat('%',#{templateName},'%')
and (template_name like concat('%',#{templateName},'%') or
template_name_en like concat('%',#{templateName},'%') or
template_name_fra like concat('%',#{templateName},'%')
template_name_spa like concat('%',#{templateName},'%')
template_name_de like concat('%',#{templateName},'%')
template_name_pl like concat('%',#{templateName},'%')
template_name_ara like concat('%',#{templateName},'%')
)
</if>
<if test="status != null">
and status = #{status}
@ -57,7 +88,7 @@
<if test="pageNum != null and pageSize != null" >
limit ${pageNum},${pageSize}
</if>
)tem left join planning_curve cur on cur.planning_template_id = tem.id
)tem left join planning_curve cur on cur.planning_template_id = tem.id
order by tem.create_time,tem.update_time desc, cur.start_time
</select>
@ -67,22 +98,24 @@
<!-- 新增模板 -->
<insert id="addPlanningCurveTemplate" parameterType="com.ho.business.entity.PlanningCurveTemplate">
insert into planning_curve_template ( id,template_no,template_name,<!-- elec_template_id, -->
<if test="stationId != null and stationId != ''">
station_id,
</if>
<if test="groupId != null and groupId != ''">
group_id,
</if>
income,status,p,capacity,soc_upper,soc_lower,create_time )
values( #{temId},#{templateNo},#{templateName},<!-- #{elecTemplateId}, -->
<if test="stationId != null and stationId != ''">
#{stationId},
</if>
<if test="groupId != null and groupId != ''">
#{groupId},
</if>
#{income},#{status},#{temP},#{capacity},#{socUpper},#{socLower},sysdate() )
insert into planning_curve_template ( id,template_no,template_name,template_name_en,
template_name_fra,template_name_spa,template_name_de,template_name_pl,template_name_ara,
<if test="stationId != null and stationId != ''">
station_id,
</if>
<if test="groupId != null and groupId != ''">
group_id,
</if>
income,status,p,capacity,soc_upper,soc_lower,create_time )
values( #{temId},#{templateNo},#{templateName},#{templateNameEn},
#{templateNameFra},#{templateNameSpa},#{templateNameDe},#{templateNamePl},#{templateNameAra},
<if test="stationId != null and stationId != ''">
#{stationId},
</if>
<if test="groupId != null and groupId != ''">
#{groupId},
</if>
#{income},#{status},#{temP},#{capacity},#{socUpper},#{socLower},sysdate() )
</insert>
<!-- 新增曲线 -->
@ -102,6 +135,24 @@
<if test="templateName != null and templateName != ''">
template_name = #{templateName},
</if>
<if test="templateNameEn != null and templateNameEn != ''">
template_name_en = #{templateNameEn},
</if>
<if test="templateNameFra != null and templateNameFra != ''">
template_name_fra = #{templateNameFra},
</if>
<if test="templateNameSpa != null and templateNameSpa != ''">
template_name_spa = #{templateNameSpa},
</if>
<if test="templateNameDe != null and templateNameDe != ''">
template_name_de = #{templateNameDe},
</if>
<if test="templateNamePl != null and templateNamePl != ''">
template_name_pl = #{templateNamePl},
</if>
<if test="templateNameAra != null and templateNameAra != ''">
template_name_ara = #{templateNameAra},
</if>
<!--
<if test="elecTemplateId != null and elecTemplateId != ''">
elec_template_id = #{elecTemplateId},
@ -170,7 +221,31 @@
tem.elec_template_id elec_template_id, tem.status status, tem.update_time update_time, tem.p tem_p, tem.capacity, tem.soc_upper,
tem.soc_lower, cur.id id, cur.start_time start_time, cur.end_time end_time, ifnull(cur.p,0) p, ifnull(cur.q,0) q, cur.soc soc,cur.planning_template_id
from (
select id,template_no,template_name,elec_template_id,station_id,group_id,income,status,p,capacity,soc_upper,soc_lower,create_time,update_time
select id,template_no,
<choose>
<when test="lang != null and lang=='en_US' ">
template_name_en template_name,
</when>
<when test="lang != null and lang=='fr_FR' ">
template_name_fra template_name,
</when>
<when test="lang != null and lang=='es_ES' ">
template_name_spa template_name,
</when>
<when test="lang != null and lang=='de_DE' ">
template_name_de template_name,
</when>
<when test="lang != null and lang=='pl_PL' ">
template_name_pl template_name,
</when>
<when test="lang != null and lang=='ar_EG' ">
template_name_ara template_name,
</when>
<otherwise>
template_name,
</otherwise>
</choose>
elec_template_id,station_id,group_id,income,status,p,capacity,soc_upper,soc_lower,create_time,update_time
from planning_curve_template
<where>
<if test="temId != null and temId != ''">
@ -189,7 +264,7 @@
and group_id = #{groupId} or group_id is null
</if>
</where>
) tem left join planning_curve cur on cur.planning_template_id = tem.id
) tem left join planning_curve cur on cur.planning_template_id = tem.id
order by tem.create_time,tem.update_time desc, cur.start_time
</select>

View File

@ -27,12 +27,19 @@
</resultMap>
<insert id="insertList" keyColumn="id" keyProperty="id" useGeneratedKeys="true">
insert into point_config (name,name_en,default_value,point_type,station_id,permission_id,page_location,div_location,sort,device_id,offset_value,factor)
insert into point_config (name,name_en,
name_fra,name_spa,name_de,name_pl,name_ara,
default_value,default_value_en,
default_value_fra,default_value_spa,default_value_de,default_value_pl,default_value_ara,
point_type,station_id,permission_id,page_location,div_location,sort,device_id,offset_value,factor)
values
<foreach item="item" collection="list" index="index" separator=",">
(
#{item.name},#{item.nameEn},#{item.defaultValue},#{item.pointType},
#{item.stationId},#{item.permissionId},#{item.pageLocation},#{item.divLocation},#{item.sort},#{item.deviceId},#{item.offsetValue},#{item.factor}
#{item.name},#{item.nameEn},
#{item.nameFra},#{item.nameSpa},#{item.nameDe},#{item.namePl},#{item.nameAra},
#{item.defaultValue},#{item.defaultValueEn},
#{item.defaultValueFra},#{item.defaultValueSpa},#{item.defaultValueDe},#{item.defaultValuePl},#{item.defaultValueAra},
#{item.pointType},#{item.stationId},#{item.permissionId},#{item.pageLocation},#{item.divLocation},#{item.sort},#{item.deviceId},#{item.offsetValue},#{item.factor}
)
</foreach>
@ -90,10 +97,43 @@
<select id="selectByParamNew" resultMap="baseMap">
SELECT
p.id,
p.name,
p.name as name_zh,
p.name_en,
p.default_value,
<choose>
<when test="lang != null and lang=='en_US' ">
p.name_en name,
d.col_name_en col_name,
p.default_value_en default_value,
</when>
<when test="lang != null and lang=='fr_FR' ">
p.name_fra name,
d.col_name_fra col_name,
p.default_value_fra default_value,
</when>
<when test="lang != null and lang=='es_ES' ">
p.name_spa name,
d.col_name_spa col_name,
p.default_value_spa default_value,
</when>
<when test="lang != null and lang=='de_DE' ">
p.name_de name,
d.col_name_de col_name,
p.default_value_de default_value,
</when>
<when test="lang != null and lang=='pl_PL' ">
p.name_pl name,
d.col_name_pl col_name,
p.default_value_pl default_value,
</when>
<when test="lang != null and lang=='ar_EG' ">
p.name_ara name,
d.col_name_ara col_name,
p.default_value_ara default_value,
</when>
<otherwise>
p.name,
d.col_name,
p.default_value,
</otherwise>
</choose>
p.point_type,
p.station_id,
p.permission_id,
@ -106,9 +146,6 @@
d.src_id,
d.device_type,
d.col,
d.col_name,
d.col_name as col_name_zh,
d.col_name_en,
d.sens_type
FROM
point_config p
@ -138,11 +175,18 @@
</delete>
<insert id="updateList" keyColumn="id" keyProperty="id" useGeneratedKeys="true">
insert into point_config (id,name,name_en,default_value,point_type,station_id,permission_id,page_location,div_location,sort,device_id,offset_value,factor)
insert into point_config (id,name,name_en,
name_fra,name_spa,name_de,name_pl,name_ara,
default_value,default_value_en,
default_value_fra,default_value_spa,default_value_de,default_value_pl,default_value_ara,
point_type,station_id,permission_id,page_location,div_location,sort,device_id,offset_value,factor)
values
<foreach item="item" collection="list" index="index" separator=",">
(#{item.id},#{item.name},#{item.nameEn},#{item.defaultValue},#{item.pointType},
#{item.stationId},#{item.permissionId},#{item.pageLocation},#{item.divLocation},#{item.sort},#{item.deviceId},#{item.offsetValue},#{item.factor}
(#{item.id},#{item.name},#{item.nameEn},
#{item.nameFra},#{item.nameSpa},#{item.nameDe},#{item.namePl},#{item.nameAra},
#{item.defaultValue},#{item.defaultValueEn},
#{item.defaultValueFra},#{item.defaultValueSpa},#{item.defaultValueDe},#{item.defaultValuePl},#{item.defaultValueAra},
#{item.pointType},#{item.stationId},#{item.permissionId},#{item.pageLocation},#{item.divLocation},#{item.sort},#{item.deviceId},#{item.offsetValue},#{item.factor}
)
</foreach>

View File

@ -8,12 +8,36 @@
id,point_id,value,name,name as name_zh,name_en,symbol
</sql>
<sql id="Base_Column_List1">
id,point_id,value,name_en name,name as name_zh,name_en,symbol
</sql>
<sql id="Base_Column_List2">
id,point_id,value,name_fra name,name as name_zh,name_en,symbol
</sql>
<sql id="Base_Column_List3">
id,point_id,value,name_spa name,name as name_zh,name_en,symbol
</sql>
<sql id="Base_Column_List4">
id,point_id,value,name_de name,name as name_zh,name_en,symbol
</sql>
<sql id="Base_Column_List5">
id,point_id,value,name_pl name,name as name_zh,name_en,symbol
</sql>
<sql id="Base_Column_List6">
id,point_id,value,name_ara name,name as name_zh,name_en,symbol
</sql>
<insert id="insertList" keyColumn="id" keyProperty="id" useGeneratedKeys="true">
insert into point_polysemy_config (point_id,value,name,name_en,symbol)
insert into point_polysemy_config (point_id,value,name,name_en,
name_fra,name_spa,name_de,name_pl,name_ara,
symbol)
values
<foreach item="item" collection="list" index="index" separator=",">
(
#{item.pointId},#{item.value},#{item.name},#{item.nameEn},#{item.symbol}
#{item.pointId},#{item.value},#{item.name},#{item.nameEn},
#{item.nameFra},#{item.nameSpa},#{item.nameDe},#{item.namePl},#{item.nameAra},
#{item.symbol}
)
</foreach>
@ -35,7 +59,30 @@
</update>
<select id="selectByPointIds" resultType="com.ho.business.entity.PointPolysemyConfig">
select <include refid="Base_Column_List"/>
select
<choose>
<when test="lang != null and lang=='en_US' ">
<include refid="Base_Column_List1"/>
</when>
<when test="lang != null and lang=='fr_FR' ">
<include refid="Base_Column_List2"/>
</when>
<when test="lang != null and lang=='es_ES' ">
<include refid="Base_Column_List3"/>
</when>
<when test="lang != null and lang=='de_DE' ">
<include refid="Base_Column_List4"/>
</when>
<when test="lang != null and lang=='pl_PL' ">
<include refid="Base_Column_List5"/>
</when>
<when test="lang != null and lang=='ar_EG' ">
<include refid="Base_Column_List6"/>
</when>
<otherwise>
<include refid="Base_Column_List"/>
</otherwise>
</choose>
from point_polysemy_config
<where>
<if test="ids != null and ids.size() != 0">

View File

@ -4,17 +4,66 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ho.business.mapper.StationMapper">
<sql id="Base_Column_List">
id
,pid,group_id,dept_id,
`name`,name_en,address,address_en,longitude,
latitude,capacity,rate_power,
status,type,create_time,
contact,contact_details,grid_time,
,pid,group_id,dept_id,address,longitude,latitude,capacity,rate_power,
name,name_en,name_fra,name_spa,name_de,name_pl,name_ara,
nation,nation_en,nation_fra,nation_spa,nation_de,nation_pl,nation_ara,
province,province_en,province_fra,province_spa,province_de,province_pl,province_ara,
status,type,create_time,contact,contact_details,grid_time,
update_time,deleted,is_enable,cabin_num,district,ad_code,is_daily_count,topology_type,cupboard_type,plan_version,inverter_flag,pv_power,icc_id,province,city,
electricity_type,customer_type,voltage_level,batch_number,nation
electricity_type,customer_type,voltage_level,batch_number
</sql>
<sql id="Base_Column_List1">
id
,pid,group_id,dept_id,address,longitude,latitude,capacity,rate_power,
name_en name,nation_en nation ,province_en province,
status,type,create_time,contact,contact_details,grid_time,
update_time,deleted,is_enable,cabin_num,district,ad_code,is_daily_count,topology_type,cupboard_type,plan_version,inverter_flag,pv_power,icc_id,province,city,
electricity_type,customer_type,voltage_level,batch_number
</sql>
<sql id="Base_Column_List2">
id
,pid,group_id,dept_id,address,longitude,latitude,capacity,rate_power,
name_fra name,nation_fra nation ,province_fra province,
status,type,create_time,contact,contact_details,grid_time,
update_time,deleted,is_enable,cabin_num,district,ad_code,is_daily_count,topology_type,cupboard_type,plan_version,inverter_flag,pv_power,icc_id,province,city,
electricity_type,customer_type,voltage_level,batch_number
</sql>
<sql id="Base_Column_List3">
id
,pid,group_id,dept_id,address,longitude,latitude,capacity,rate_power,
name_spa name,nation_spa nation ,province_spa province,
status,type,create_time,contact,contact_details,grid_time,
update_time,deleted,is_enable,cabin_num,district,ad_code,is_daily_count,topology_type,cupboard_type,plan_version,inverter_flag,pv_power,icc_id,province,city,
electricity_type,customer_type,voltage_level,batch_number
</sql>
<sql id="Base_Column_List4">
id
,pid,group_id,dept_id,address,longitude,latitude,capacity,rate_power,
name_de name,nation_de nation ,province_de province,
status,type,create_time,contact,contact_details,grid_time,
update_time,deleted,is_enable,cabin_num,district,ad_code,is_daily_count,topology_type,cupboard_type,plan_version,inverter_flag,pv_power,icc_id,province,city,
electricity_type,customer_type,voltage_level,batch_number
</sql>
<sql id="Base_Column_List5">
id
,pid,group_id,dept_id,address,longitude,latitude,capacity,rate_power,
name_pl name,nation_pl nation ,province_pl province,
status,type,create_time,contact,contact_details,grid_time,
update_time,deleted,is_enable,cabin_num,district,ad_code,is_daily_count,topology_type,cupboard_type,plan_version,inverter_flag,pv_power,icc_id,province,city,
electricity_type,customer_type,voltage_level,batch_number
</sql>
<sql id="Base_Column_List6">
id
,pid,group_id,dept_id,address,longitude,latitude,capacity,rate_power,
name_ara name,nation_ara nation ,province_ara province,
status,type,create_time,contact,contact_details,grid_time,
update_time,deleted,is_enable,cabin_num,district,ad_code,is_daily_count,topology_type,cupboard_type,plan_version,inverter_flag,pv_power,icc_id,province,city,
electricity_type,customer_type,voltage_level,batch_number
</sql>
<select id="selectByName" resultType="com.ho.business.entity.Station">
select
@ -50,7 +99,29 @@
<select id="selectByIds" resultType="com.ho.business.entity.Station">
select
<include refid="Base_Column_List"/>
<choose>
<when test="lang != null and lang=='en_US' ">
<include refid="Base_Column_List1"/>
</when>
<when test="lang != null and lang=='fr_FR' ">
<include refid="Base_Column_List2"/>
</when>
<when test="lang != null and lang=='es_ES' ">
<include refid="Base_Column_List3"/>
</when>
<when test="lang != null and lang=='de_DE' ">
<include refid="Base_Column_List4"/>
</when>
<when test="lang != null and lang=='pl_PL' ">
<include refid="Base_Column_List5"/>
</when>
<when test="lang != null and lang=='ar_EG' ">
<include refid="Base_Column_List6"/>
</when>
<otherwise>
<include refid="Base_Column_List"/>
</otherwise>
</choose>
from station
<where>
<if test="ids != null and ids.size() != 0">
@ -119,7 +190,30 @@
</select>
<select id="selectByGroupIdNotExclude" resultType="com.ho.business.entity.Station">
select <include refid="Base_Column_List"/>
select
<choose>
<when test="record.lang != null and record.lang=='en_US' ">
<include refid="Base_Column_List1"/>
</when>
<when test="record.lang != null and record.lang=='fr_FR' ">
<include refid="Base_Column_List2"/>
</when>
<when test="record.lang != null and record.lang=='es_ES' ">
<include refid="Base_Column_List3"/>
</when>
<when test="record.lang != null and record.lang=='de_DE' ">
<include refid="Base_Column_List4"/>
</when>
<when test="record.lang != null and record.lang=='pl_PL' ">
<include refid="Base_Column_List5"/>
</when>
<when test="record.lang != null and record.lang=='ar_EG' ">
<include refid="Base_Column_List6"/>
</when>
<otherwise>
<include refid="Base_Column_List"/>
</otherwise>
</choose>
FROM station
<where>
<if test="record.name != null and record.name != ''">
@ -152,6 +246,7 @@
<include refid="Base_Column_List"/>
FROM station
where
deleted = #{deleted}
and is_daily_count = #{dailyCount}
</select>
@ -195,6 +290,12 @@
<if test="record.groupId != null">group_id,</if>
<if test="record.deptId != null">dept_id,</if>
<if test="record.name != null">name,</if>
<if test="record.nameEn != null">name_en,</if>
<if test="record.nameFra != null">name_fra,</if>
<if test="record.nameSpa != null">name_spa,</if>
<if test="record.nameDe != null">name_de,</if>
<if test="record.namePl != null">name_pl,</if>
<if test="record.nameAra != null">name_ara,</if>
<if test="record.address != null">address,</if>
<if test="record.longitude != null">longitude,</if>
<if test="record.latitude != null">latitude,</if>
@ -220,12 +321,24 @@
<if test="record.pvPower != null">pv_power,</if>
<if test="record.iccId != null">icc_id,</if>
<if test="record.province != null">province,</if>
<if test="record.provinceEn != null">province_en,</if>
<if test="record.provinceFra != null">province_fra,</if>
<if test="record.provinceSpa != null">province_spa,</if>
<if test="record.provinceDe != null">province_de,</if>
<if test="record.provincePl != null">province_pl,</if>
<if test="record.provinceAra != null">province_ara,</if>
<if test="record.city != null">city,</if>
<if test="record.electricityType != null">electricity_type,</if>
<if test="record.customerType != null">customer_type,</if>
<if test="record.voltageLevel != null">voltage_level,</if>
<if test="record.batchNumber != null">batch_number,</if>
<if test="record.nation != null">nation,</if>
<if test="record.nationEn != null">nation_en,</if>
<if test="record.nationFra != null">nation_fra,</if>
<if test="record.nationSpa != null">nation_spa,</if>
<if test="record.nationDe != null">nation_de,</if>
<if test="record.nationPl != null">nation_pl,</if>
<if test="record.nationAra != null">nation_ara,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="record.id != null">#{record.id,jdbcType=INTEGER},</if>
@ -233,6 +346,12 @@
<if test="record.groupId != null">#{record.groupId,jdbcType=INTEGER},</if>
<if test="record.deptId != null">#{record.deptId,jdbcType=INTEGER},</if>
<if test="record.name != null">#{record.name,jdbcType=VARCHAR},</if>
<if test="record.nameEn != null">#{record.nameEn,jdbcType=VARCHAR},</if>
<if test="record.nameFra != null">#{record.nameFra,jdbcType=VARCHAR},</if>
<if test="record.nameSpa != null">#{record.nameSpa,jdbcType=VARCHAR},</if>
<if test="record.nameDe != null">#{record.nameDe,jdbcType=VARCHAR},</if>
<if test="record.namePl != null">#{record.namePl,jdbcType=VARCHAR},</if>
<if test="record.nameAra != null">#{record.nameAra,jdbcType=VARCHAR},</if>
<if test="record.address != null">#{record.address,jdbcType=VARCHAR},</if>
<if test="record.longitude != null">#{record.longitude,jdbcType=DECIMAL},</if>
<if test="record.latitude != null">#{record.latitude,jdbcType=DECIMAL},</if>
@ -258,12 +377,24 @@
<if test="record.pvPower != null">#{record.pvPower},</if>
<if test="record.iccId != null">#{record.iccId},</if>
<if test="record.province != null">#{record.province},</if>
<if test="record.provinceEn != null">#{record.provinceEn},</if>
<if test="record.provinceFra != null">#{record.provinceFra},</if>
<if test="record.provinceSpa != null">#{record.provinceSpa},</if>
<if test="record.provinceDe != null">#{record.provinceDe},</if>
<if test="record.provincePl != null">#{record.provincePl},</if>
<if test="record.provinceAra != null">#{record.provinceAra},</if>
<if test="record.city != null">#{record.city},</if>
<if test="record.electricityType != null">#{record.electricityType},</if>
<if test="record.customerType != null">#{record.customerType},</if>
<if test="record.voltageLevel != null">#{record.voltageLevel},</if>
<if test="record.batchNumber != null">#{record.batchNumber},</if>
<if test="record.nation != null">#{record.nation},</if>
<if test="record.nationEn != null">#{record.nationEn},</if>
<if test="record.nationFra != null">#{record.nationFra},</if>
<if test="record.nationSpa != null">#{record.nationSpa},</if>
<if test="record.nationDe != null">#{record.nationDe},</if>
<if test="record.nationPl != null">#{record.nationPl},</if>
<if test="record.nationAra != null">#{record.nationAra},</if>
</trim>
</insert>
@ -279,6 +410,24 @@
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.nameEn != null">
name_en = #{record.nameEn,jdbcType=VARCHAR},
</if>
<if test="record.nameFra != null">
name_fra = #{record.nameFra,jdbcType=VARCHAR},
</if>
<if test="record.nameSpa != null">
name_spa = #{record.nameSpa,jdbcType=VARCHAR},
</if>
<if test="record.nameDe != null">
name_de = #{record.nameDe,jdbcType=VARCHAR},
</if>
<if test="record.namePl != null">
name_pl = #{record.namePl,jdbcType=VARCHAR},
</if>
<if test="record.nameAra != null">
name_ara = #{record.nameAra,jdbcType=VARCHAR},
</if>
<if test="record.address != null">
address = #{record.address,jdbcType=VARCHAR},
</if>
@ -357,6 +506,24 @@
<if test="record.province != null">
province = #{record.province},
</if>
<if test="record.provinceEn != null">
province_en = #{record.provinceEn},
</if>
<if test="record.provinceFra != null">
province_fra = #{record.provinceFra},
</if>
<if test="record.provinceSpa != null">
province_spa = #{record.provinceSpa},
</if>
<if test="record.provinceDe != null">
province_de = #{record.provinceDe},
</if>
<if test="record.provincePl != null">
province_pl = #{record.provincePl},
</if>
<if test="record.provinceAra != null">
province_ara = #{record.provinceAra},
</if>
<if test="record.city != null">
city = #{record.city},
</if>
@ -375,6 +542,24 @@
<if test="record.nation != null">
nation = #{record.nation},
</if>
<if test="record.nationEn != null">
nation_en = #{record.nationEn},
</if>
<if test="record.nationFra != null">
nation_fra = #{record.nationFra},
</if>
<if test="record.nationSpa != null">
nation_spa = #{record.nationSpa},
</if>
<if test="record.nationDe != null">
nation_de = #{record.nationDe},
</if>
<if test="record.nationPl != null">
nation_pl = #{record.nationPl},
</if>
<if test="record.nationAra != null">
nation_ara = #{record.nationAra},
</if>
</set>
where id = #{record.id,jdbcType=INTEGER}
</update>

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