多语言(英语、法语、西班牙语、德语、波兰语、阿拉伯语)处理

This commit is contained in:
2026-01-12 09:37:20 +08:00
parent 219caadd45
commit 41f0b72253
113 changed files with 3593 additions and 464 deletions

View File

@ -61,6 +61,20 @@ public class Device implements Serializable {
@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,12 +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

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

@ -47,6 +47,31 @@ public class HisCurveRelate implements Serializable {
*/
private String modelNameEn;
/**
* 模板名称-法语
*/
private String modelNameFra;
/**
* 模板名称-西班牙语
*/
private String modelNameSpa;
/**
* 模板名称-德语
*/
private String modelNameDe;
/**
* 模板名称-波兰语
*/
private String modelNamePl;
/**
* 模板名称-阿拉伯语
*/
private String modelNameAra;
/**
@ -67,9 +92,29 @@ 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;
/**
* 设备类型
@ -79,7 +124,7 @@ public class HisCurveRelate implements Serializable {
List<HisCurveRelate> list;
@ApiModelProperty(value = "中英切换-查询字段")
@ApiModelProperty(value = "多语言切换-查询字段")
private String lang;
}

View File

@ -23,12 +23,32 @@ public class PlanCurveOperationRecordReq {
@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

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

View File

@ -23,6 +23,6 @@ public class PlanningIssueDevice {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date operationDate;
@ApiModelProperty(value = "中英切换-查询字段")
@ApiModelProperty(value = "多语言切换-查询字段")
private String lang;
}

View File

@ -21,12 +21,32 @@ 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

@ -15,9 +15,25 @@ public class TranslateName implements Serializable {
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "名称")
@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

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

View File

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

View File

@ -33,6 +33,6 @@ public class DeviceTypeColReqVO {
*/
Integer sensType;
@ApiModelProperty(value = "中英切换-查询字段")
@ApiModelProperty(value = "多语言切换-查询字段")
private String lang;
}

View File

@ -30,7 +30,7 @@ public class StationReq implements Serializable {
@ApiModelProperty(value = "设备类型",hidden = true)
String deviceType;
@ApiModelProperty(value = "中英切换-查询字段")
@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

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

View File

@ -17,7 +17,7 @@ public class DeviceTreeReq {
@ApiModelProperty(value = "src_id")
Integer srcId;
@ApiModelProperty(value = "中英切换-查询字段")
@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

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

View File

@ -23,6 +23,16 @@ public class PointConfigAdd {
@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;
@ -56,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

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

View File

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

View File

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

View File

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

View File

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

View File

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

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

@ -10,7 +10,7 @@ import lombok.Data;
import java.math.BigDecimal;
/**
* @author kerwin
* @author kerwin 英语
*/
@Data
@ExcelIgnoreUnannotated
@ -29,43 +29,43 @@ public class PointRespEnVO {
Integer srcId;
@ApiModelProperty(value = "设备类型")
@ExcelProperty(value = "device type",index = 3)
@ExcelProperty(value = "Device type",index = 3)
String deviceType;
@ApiModelProperty(value = "1遥信 2遥测 3遥控")
private Integer sensType;
@ApiModelProperty(value = "设备名")
@ExcelProperty(value = "associated device",index = 2)
@ExcelProperty(value = "Associated device",index = 2)
String deviceName;
@ApiModelProperty(value = "点表字段")
@ExcelProperty(value = "code",index = 1)
@ExcelProperty(value = "Code",index = 1)
String col;
@ApiModelProperty(value = "点表字段名称")
@ExcelProperty(value = "name",index = 0)
@ExcelProperty(value = "Name",index = 0)
String colName;
@ApiModelProperty(value = "当前值")
@ExcelProperty(value = "current value",index = 7)
@ExcelProperty(value = "Current value",index = 7)
BigDecimal value;
@ApiModelProperty(value = "单位")
@ExcelProperty(value = "unit",index = 8)
@ExcelProperty(value = "Unit",index = 8)
String unit;
@ApiModelProperty(value = "最大值")
@ExcelProperty(value = "maximum",index = 4)
@ExcelProperty(value = "Maximum",index = 4)
BigDecimal maxValue;
@ApiModelProperty(value = "最小值")
@ExcelProperty(value = "minimum",index = 5)
@ExcelProperty(value = "Minimum",index = 5)
BigDecimal minValue;
@ApiModelProperty(value = "更新时间")
@JsonFormat(pattern = CommonConstant.DATE)
@ExcelProperty(value = "update time",index = 6)
@ExcelProperty(value = "Update time",index = 6)
String updateTime;
@ApiModelProperty(value = "是否具有品质位 1是 2否")

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

@ -62,14 +62,4 @@ public interface PointConfigMapper {
* @return
*/
int updateList(List<PointConfig> list);
/**
* 查询所有name_en 为空的数据
* @return
*/
List<PointConfigResp> selectTableList(@Param("tableName") String tableName,@Param("name") String name,@Param("nameEn") String nameEn);
int updateNameEnById(@Param("id") Integer id, @Param("tableName") String tableName,@Param("nameEn") String nameEn,@Param("translateName") String translateName);
}

View File

@ -16,11 +16,11 @@ public interface TranslateNameMapper {
List<TranslateName> getDictNation();
TranslateName selectNameEN(@Param("name")String name);
TranslateName selectNameLang(@Param("name")String name);
int insert(@Param("vo")TranslateName vo);
int updateNameEnById(@Param("id") Integer id, @Param("nameEn") String nameEn);
int updateById(@Param("vo") TranslateName vo);
}

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;
@ -120,11 +121,7 @@ public interface DynamicConfigService {
*/
int delDynamicConfigTitle(DynamicConfigTitle vo);
/**
* 修改点名称英文
* @return
*/
int updatePointNameEn(String tableName,String name,String nameEn);
TranslateName getNameLanguage(String name);
String getNameEn(String name);
String getNameByLang(String name,String lang);
}

View File

@ -395,7 +395,13 @@ public class DeviceServiceImpl implements DeviceService {
String dName = adddevice.getDeviceName() + (i + 1);
newSrcIdList.add(newSrcId);
device.setDeviceName(dName);
device.setDeviceNameEn(dynamicConfigService.getNameEn(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());

View File

@ -159,8 +159,14 @@ public class DynamicConfigServiceImpl implements DynamicConfigService {
List<CurveConfig> insertList = new ArrayList<>();
CurveConfig config = null;
for (CurveConfigAdd c:list) {
//curveName 设置英文翻译 20250821
c.setCurveNameEn(getNameEn(c.getCurveName()));
//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){
@ -188,7 +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->{s.setColNameEn(getNameEn(s.getColName()));});
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);
@ -302,10 +316,22 @@ public class DynamicConfigServiceImpl implements DynamicConfigService {
if(srcPoint.getSort()==null){
srcPoint.setSort(i);
}
//name defaultValue 设置英文翻译 20250821
srcPoint.setNameEn(getNameEn(srcPoint.getName()));
//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())){
srcPoint.setDefaultValueEn(getNameEn(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);
@ -351,7 +377,15 @@ public class DynamicConfigServiceImpl implements DynamicConfigService {
List<DynamicConfig> dynamicConfigs = list.get(i).getList();
//插入动态配置点
if(!dynamicConfigs.isEmpty()){
dynamicConfigs.stream().forEach(s->{s.setColNameEn(getNameEn(s.getColName()));});
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();
@ -374,8 +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->{i.setNameEn(getNameEn(i.getName()));});
//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);
}
@ -780,47 +822,97 @@ public class DynamicConfigServiceImpl implements DynamicConfigService {
}
@Override
public int updatePointNameEn(String tableName,String name,String nameEn) {
int a=0;
//查询所有name_en 为空的数据
List<PointConfigResp> pointList = pointConfigMapper.selectTableList(tableName,name,nameEn);
for (PointConfigResp vo:pointList){
if(StringUtil.isNotBlank(vo.getName())){
String translateName = getNameEn(vo.getName());
int resoult=pointConfigMapper.updateNameEnById(vo.getId(),tableName,nameEn,translateName);
a=a+resoult;
log.info("修改进度:{}",a);
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 a;
return null;
}
@Override
public String getNameEn(String name) {
// 查询数据库中有预先翻译的中文字段
public TranslateName getNameLanguage(String name) {
// 英语
String nameEn = null;
TranslateName vo = translateNameMapper.selectNameEN(name);
if(vo == null){
nameEn = TranslateUtils.translate(name);
// 插入中文预翻译表
// 法语
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())){
nameEn = TranslateUtils.translate(name);
String finalNameEn = nameEn;
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.updateNameEnById(vo.getId(), finalNameEn);
translateNameMapper.updateById(vo);
});
}else{
nameEn = vo.getNameEn();
}
}
return nameEn;
return vo;
}

View File

@ -209,10 +209,30 @@ public class EarningsCalculateServiceImpl implements EarningsCalculateService {
ec.setMonth(time.substring(time.length() - 2, time.length()));
String reportName = CommonConstant.REPORT_NAME;
String billName = CommonConstant.BILL_NAME;
if(RedisKeyConstant.User.EN_US.equals(earningsCalculateReq.getLang())){
if(CommonConstant.langTemp.EN_US.equals(earningsCalculateReq.getLang())){
reportName = CommonConstant.REPORT_NAME_EN;
billName = CommonConstant.BILL_NAME_EN;
}
if(CommonConstant.langTemp.FR_FR.equals(earningsCalculateReq.getLang())){
reportName = CommonConstant.REPORT_NAME_FRA;
billName = CommonConstant.BILL_NAME_FRA;
}
if(CommonConstant.langTemp.ES_ES.equals(earningsCalculateReq.getLang())){
reportName = CommonConstant.REPORT_NAME_SPA;
billName = CommonConstant.BILL_NAME_SPA;
}
if(CommonConstant.langTemp.AR_EG.equals(earningsCalculateReq.getLang())){
reportName = CommonConstant.REPORT_NAME_ARA;
billName = CommonConstant.BILL_NAME_ARA;
}
if(CommonConstant.langTemp.DE_DE.equals(earningsCalculateReq.getLang())){
reportName = CommonConstant.REPORT_NAME_DE;
billName = CommonConstant.BILL_NAME_DE;
}
if(CommonConstant.langTemp.PL_PL.equals(earningsCalculateReq.getLang())){
reportName = CommonConstant.REPORT_NAME_PL;
billName = CommonConstant.BILL_NAME_PL;
}
// 电站名称(报表标题)
if (type == 0) {
ec.setStationName(station.getName() + "( " + time + " ) "+reportName);

View File

@ -5,6 +5,7 @@ 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;
@ -54,12 +55,24 @@ public class HisCurveRelateServiceImpl implements HisCurveRelateService {
hisCurveRelate.setDeviceType(hisPointCurveReqVo.getDeviceType());
hisCurveRelate.setModelId(String.valueOf(modelId));
hisCurveRelate.setColName(hisPointCurveReqVo.getColName());
hisCurveRelate.setColNameEn(dynamicConfigService.getNameEn(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());
hisCurveRelate.setModelNameEn(dynamicConfigService.getNameEn(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);

View File

@ -608,10 +608,30 @@ public class OpenStationServiceImpl implements OpenStationService {
String name = "";
String summary = DefineConstant.SUMMARY;
String summaryData = DefineConstant.SUMMARY_DATA_STATION;
if(RedisKeyConstant.User.EN_US.equals(lang)){
if(CommonConstant.langTemp.EN_US.equals(lang)){
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;
@ -773,8 +793,18 @@ public class OpenStationServiceImpl implements OpenStationService {
String segmentType = req.getSegmentType();
String name = "";
String summary = DefineConstant.SUMMARY;
if(RedisKeyConstant.User.EN_US.equals(req.getLang())){
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<>();
@ -1082,7 +1112,7 @@ public class OpenStationServiceImpl implements OpenStationService {
// title的参数为ExportParams类型目前仅仅在ExportParams中设置了sheetName
userExportMap.put("title", userExportParams);
// 模版导出对应得实体类型
if(RedisKeyConstant.User.EN_US.equals(lang)){
if(CommonConstant.langTemp.EN_US.equals(lang)){
userExportMap.put("entity", PcsElecDataEn.class);
List<PcsElecDataEn> enList=new ArrayList<>();
dataList.stream().forEach(s->{
@ -1092,7 +1122,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);
@ -1110,7 +1192,7 @@ public class OpenStationServiceImpl implements OpenStationService {
// title的参数为ExportParams类型目前仅仅在ExportParams中设置了sheetName
userExportMap.put("title", userExportParams);
// 模版导出对应得实体类型
if(RedisKeyConstant.User.EN_US.equals(lang)){
if(CommonConstant.langTemp.EN_US.equals(lang)){
userExportMap.put("entity", EarningsCalculateDataEn.class);
List<EarningsCalculateDataEn> enList=new ArrayList<>();
dataList.stream().forEach(s->{
@ -1120,6 +1202,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

@ -372,10 +372,22 @@ public class PlanningCurveIssueServiceImpl implements PlanningCurveIssueService
planCurveOperationRecordReq.setPreviousPlanningCurve(previousOperateId);
// 英文字段处理
if(StringUtil.isNotBlank(planCurveOperationRecordReq.getOperateContent())){
planCurveOperationRecordReq.setOperateContentEn(dynamicConfigService.getNameEn(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())){
planCurveOperationRecordReq.setOperateResultEn(dynamicConfigService.getNameEn(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);

View File

@ -4,10 +4,7 @@ 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;
@ -69,7 +66,13 @@ public class PlanningCurveServiceImpl implements PlanningCurveService {
if(StringUtil.isNotBlank(template.getTemplateName())){
// 摸版名字英文处理
template.setTemplateNameEn(dynamicConfigService.getNameEn(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) {
@ -113,7 +116,13 @@ public class PlanningCurveServiceImpl implements PlanningCurveService {
if (null != template && null != template.getTemId()) {
if(StringUtil.isNotBlank(template.getTemplateName())){
// 摸版名字英文处理
template.setTemplateNameEn(dynamicConfigService.getNameEn(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);

View File

@ -1370,8 +1370,18 @@ public class PointDemoServiceImpl implements PointDemoService {
}
List<String> titleList = new ArrayList<>();
String time;
if(RedisKeyConstant.User.EN_US.equals(pointCurveReq.getLang())){
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;
}

View File

@ -648,16 +648,35 @@ public class StationHomeServiceImpl implements StationHomeService {
//计算运行天数
String operationDayStr = null;
if (station.getStatus().equals(CommonConstant.TWO)) {
if(RedisKeyConstant.User.EN_US.equals(req.getLang())){
//切换为英文
// 多语言切换
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)) {
if(RedisKeyConstant.User.EN_US.equals(req.getLang())){
//切换为英文
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;
}

View File

@ -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;
@ -100,6 +102,9 @@ public class StationServiceImpl implements StationService {
@Autowired
TranslateProvinceMapper translateProvinceMapper;
@Autowired
DynamicConfigService dynamicConfigService;
@Value("${station.timeDifference}")
Integer minute;
@ -249,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,11 +326,28 @@ public class StationServiceImpl implements StationService {
MyAddress address = AbroadAddressUtils.getAddress(String.valueOf(station.getLatitude()),String.valueOf(station.getLongitude()));
if (null != address) {
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 = AbroadWeatherUtils.getWeatherRespVo(String.valueOf(station.getLatitude()),String.valueOf(station.getLongitude()));
@ -373,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方法 直接进行修改
@ -712,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

@ -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>
@ -39,6 +43,21 @@
<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>
@ -86,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

@ -32,6 +32,36 @@
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>
<select id="selectByInfo" resultType="com.ho.business.vo.resp.DeviceRespVO">
select
<include refid="Base_Column_List"/>
@ -91,6 +121,21 @@
<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>
@ -276,6 +321,21 @@
<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>
@ -355,6 +415,11 @@
<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>
@ -373,6 +438,11 @@
<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>
@ -388,14 +458,16 @@
<insert id="insertBatch">
INSERT INTO device
(group_id,dept_id,src_id,pid,category,
station_id,device_name,device_name_en,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.deviceNameEn},#{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

@ -38,6 +38,41 @@
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>
<sql id="Base_List">
id
@ -85,6 +120,21 @@
<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>
@ -122,6 +172,21 @@
<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>
@ -207,6 +272,21 @@
<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>
@ -230,6 +310,21 @@
<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>

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

@ -28,19 +28,53 @@
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,model_name_en,src_id,col,station_id,device_type,
col_name,col_name_en)
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.modelNameEn},#{item.srcId}
,#{item.col} ,#{item.stationId},#{item.deviceType}
,#{item.colName},#{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>
@ -52,6 +86,21 @@
<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>

View File

@ -11,6 +11,21 @@
<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>
@ -24,6 +39,21 @@
<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>
@ -127,10 +157,15 @@
<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_content_en,operate_result,operate_result_en,effective_time,status,previous_planning_curve,latest_planning_curve,station_id)
(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.operateResult},#{condition.operateResultEn},
#{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>
@ -148,6 +183,21 @@
<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>
@ -156,6 +206,21 @@
<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>

View File

@ -40,6 +40,21 @@
<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>
@ -51,7 +66,14 @@
id = #{temId}
</if>
<if test="templateName != null and templateName != ''">
and (template_name like concat('%',#{templateName},'%') or template_name_en 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}
@ -76,7 +98,8 @@
<!-- 新增模板 -->
<insert id="addPlanningCurveTemplate" parameterType="com.ho.business.entity.PlanningCurveTemplate">
insert into planning_curve_template ( id,template_no,template_name,template_name_en,<!-- elec_template_id, -->
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>
@ -84,7 +107,8 @@
group_id,
</if>
income,status,p,capacity,soc_upper,soc_lower,create_time )
values( #{temId},#{templateNo},#{templateName},#{templateNameEn},<!-- #{elecTemplateId}, -->
values( #{temId},#{templateNo},#{templateName},#{templateNameEn},
#{templateNameFra},#{templateNameSpa},#{templateNameDe},#{templateNamePl},#{templateNameAra},
<if test="stationId != null and stationId != ''">
#{stationId},
</if>
@ -114,6 +138,21 @@
<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},
@ -187,6 +226,21 @@
<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>

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,default_value_en,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.defaultValueEn},#{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>
@ -53,14 +60,6 @@
</set>
where id = #{id}
</update>
<update id="updateNameEnById">
update ${tableName} set ${nameEn}=#{translateName} where id = #{id}
</update>
<select id="selectTableList" resultType="com.ho.business.vo.resp.dynamicConfig.PointConfigResp">
select
id,${name} name
from ${tableName} where (${nameEn} is null or ${nameEn}='') and ${name} is not null
</select>
<select id="selectByParam" resultType="com.ho.business.vo.resp.dynamicConfig.PointConfigResp">
SELECT
@ -104,6 +103,31 @@
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,
@ -151,11 +175,18 @@
</delete>
<insert id="updateList" keyColumn="id" keyProperty="id" useGeneratedKeys="true">
insert into point_config (id,name,name_en,default_value,default_value_en,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.defaultValueEn},#{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

@ -11,13 +11,33 @@
<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>
@ -44,6 +64,21 @@
<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>

View File

@ -7,14 +7,62 @@
<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,nation,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,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
@ -119,7 +167,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 +223,7 @@
<include refid="Base_Column_List"/>
FROM station
where
deleted = #{deleted}
and is_daily_count = #{dailyCount}
</select>
@ -195,6 +267,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 +298,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 +323,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 +354,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 +387,24 @@
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.nameEn != null">
name = #{record.nameEn,jdbcType=VARCHAR},
</if>
<if test="record.nameFra != null">
name = #{record.nameFra,jdbcType=VARCHAR},
</if>
<if test="record.nameSpa != null">
name = #{record.nameSpa,jdbcType=VARCHAR},
</if>
<if test="record.nameDe != null">
name = #{record.nameDe,jdbcType=VARCHAR},
</if>
<if test="record.namePl != null">
name = #{record.namePl,jdbcType=VARCHAR},
</if>
<if test="record.nameAra != null">
name = #{record.nameAra,jdbcType=VARCHAR},
</if>
<if test="record.address != null">
address = #{record.address,jdbcType=VARCHAR},
</if>
@ -357,6 +483,24 @@
<if test="record.province != null">
province = #{record.province},
</if>
<if test="record.provinceEn != null">
province = #{record.provinceEn},
</if>
<if test="record.provinceFra != null">
province = #{record.provinceFra},
</if>
<if test="record.provinceSpa != null">
province = #{record.provinceSpa},
</if>
<if test="record.provinceDe != null">
province = #{record.provinceDe},
</if>
<if test="record.provincePl != null">
province = #{record.provincePl},
</if>
<if test="record.provinceAra != null">
province = #{record.provinceAra},
</if>
<if test="record.city != null">
city = #{record.city},
</if>
@ -375,6 +519,24 @@
<if test="record.nation != null">
nation = #{record.nation},
</if>
<if test="record.nationEn != null">
nation = #{record.nationEn},
</if>
<if test="record.nationFra != null">
nation = #{record.nationFra},
</if>
<if test="record.nationSpa != null">
nation = #{record.nationSpa},
</if>
<if test="record.nationDe != null">
nation = #{record.nationDe},
</if>
<if test="record.nationPl != null">
nation = #{record.nationPl},
</if>
<if test="record.nationAra != null">
nation = #{record.nationAra},
</if>
</set>
where id = #{record.id,jdbcType=INTEGER}
</update>

View File

@ -5,26 +5,32 @@
<mapper namespace="com.ho.business.mapper.TranslateNameMapper">
<sql id="Base_Column_List">
id,`name`,name_en
id,`name`,name_en,name_fra,name_spa,name_de,name_pl,name_ara
</sql>
<select id="getDictNation" resultType="com.ho.business.entity.TranslateName">
select <include refid="Base_Column_List"/> from translate_name
</select>
<select id="selectNameEN" resultType="com.ho.business.entity.TranslateName">
<select id="selectNameLang" resultType="com.ho.business.entity.TranslateName">
select <include refid="Base_Column_List"/> from translate_name where name = #{name} limit 1
</select>
<update id="updateNameEnById">
update translate_name set name_en=#{nameEn} where id = #{id}
<update id="updateById">
update translate_name
set name_en=#{vo.nameEn},name_fra=#{vo.nameFra},
name_spa = #{vo.nameSpa},name_de=#{vo.nameDe},
name_pl = #{vo.namePl},name_ara = #{vo.nameAra}
where id = #{vo.id}
</update>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.ho.business.entity.TranslateName"
useGeneratedKeys="true">
insert into translate_name
( id, name, name_en)
values ( #{vo.id,jdbcType=INTEGER}, #{vo.name,jdbcType=VARCHAR}, #{vo.nameEn,jdbcType=VARCHAR})
( id, name, name_en,name_fra,name_spa,name_de,name_pl,name_ara)
values ( #{vo.id,jdbcType=INTEGER}, #{vo.name,jdbcType=VARCHAR}, #{vo.nameEn,jdbcType=VARCHAR},
#{vo.nameFra,jdbcType=VARCHAR},#{vo.nameSpa,jdbcType=VARCHAR},#{vo.nameDe,jdbcType=VARCHAR},
#{vo.namePl,jdbcType=VARCHAR},#{vo.nameAra,jdbcType=VARCHAR})
</insert>
</mapper>

View File

@ -17,6 +17,21 @@
<when test="lang != null and lang=='en_US' ">
b.col_en col_name,
</when>
<when test="lang != null and lang=='fr_FR' ">
b.col_fra col_name,
</when>
<when test="lang != null and lang=='es_ES' ">
b.col_spa col_name,
</when>
<when test="lang != null and lang=='de_DE' ">
b.col_de col_name,
</when>
<when test="lang != null and lang=='pl_PL' ">
b.col_pl col_name,
</when>
<when test="lang != null and lang=='ar_EG' ">
b.col_ara col_name,
</when>
<otherwise>
a.col_name,
</otherwise>

View File

@ -1,6 +1,7 @@
package com.ho.business.config;
import com.ho.common.tools.annotation.NotSportEnOperation;
import com.ho.common.tools.constant.CommonConstant;
import com.ho.common.tools.constant.RedisKeyConstant;
import com.ho.common.tools.exception.BaseResponseCode;
import com.ho.common.tools.exception.BusinessException;
@ -36,8 +37,8 @@ public class NotSportEnOperationAspect {
Method method = signature.getMethod();
NotSportEnOperation notSportEnOperation = method.getAnnotation(NotSportEnOperation.class);
if (null != notSportEnOperation) {
String lang = request.getHeader(RedisKeyConstant.User.LANG);
if(RedisKeyConstant.User.EN_US.equals(lang)){
String lang = request.getHeader(CommonConstant.LANG);
if(!CommonConstant.langTemp.ZH_CN.equals(lang)){
throw new BusinessException(BaseResponseCode.EN_US_NOT_SUPPORT_OPERATION);
}
}

View File

@ -163,7 +163,7 @@ public class CabinController {
@ApiOperation(value = "温度电压正太分布")
@PostMapping("temperatureVoltageData")
public DataResult<TemperatureVoltageResp> temperatureVoltageData(@RequestBody DeviceTreeReq vo, HttpServletRequest request) {
vo.setLang(request.getHeader(RedisKeyConstant.User.LANG));
vo.setLang(request.getHeader(CommonConstant.LANG));
TemperatureVoltageResp temperatureVoltageData = deviceService.getTemperatureVoltageData(vo);
return DataResult.success(temperatureVoltageData);
}

View File

@ -188,7 +188,7 @@ public class DeviceController {
@GetMapping("{stationId}")
@ApiOperation(value = "查询电站下的设备列表")
public DataResult<List<DeviceRespVO>> getDeviceByStationId(@PathVariable @Valid Integer stationId,HttpServletRequest request) {
String lang = request.getHeader(RedisKeyConstant.User.LANG);
String lang = request.getHeader(CommonConstant.LANG);
List<DeviceRespVO> deviceList = deviceService.getDeviceByStationId(stationId,lang);
return DataResult.success(deviceList);
}
@ -285,7 +285,7 @@ public class DeviceController {
@ApiOperation(value = "树状结构设备(设备带接入点,告警页面专用)")
@PostMapping("treeDevices")
public DataResult<List<DevicePointResp>> treeDevices(@RequestBody DeviceStationReqVo deviceTypeReq,HttpServletRequest request) {
String lang = request.getHeader(RedisKeyConstant.User.LANG);
String lang = request.getHeader(CommonConstant.LANG);
List<DeviceRespVO> deviceList = deviceService.selectAllDeviceAndSrcIdNotZero(deviceTypeReq.getStationId(),lang);
List<DeviceRespVO> deviceRespVOS = deviceService.selectDeviceByStationId(deviceTypeReq.getStationId(),lang);
Map<Integer, List<DeviceRespVO>> dataMap = deviceRespVOS.stream().collect(Collectors.groupingBy(DeviceRespVO::getId));
@ -304,7 +304,7 @@ public class DeviceController {
@ApiOperation(value = "树状结构设备(储能总览,设备列表页面专用)")
@PostMapping("homePageTreeDevices")
public DataResult<List<DevicePointResp>> homePageTreeDevices(@RequestBody DeviceTreeReq vo,HttpServletRequest request) {
String lang = request.getHeader(RedisKeyConstant.User.LANG);
String lang = request.getHeader(CommonConstant.LANG);
List<DeviceRespVO> deviceRespVOS = deviceService.selectByIdAndSrcIdNotZero(vo.getStationId(),lang);
List<DevicePointResp> treeDevices = new ArrayList<>();
if (!deviceRespVOS.isEmpty()) {
@ -316,7 +316,7 @@ public class DeviceController {
@ApiOperation(value = "平铺过滤隐藏的真实设备(储能总览设备列表页面APP专用)")
@PostMapping("appHomePageDevices")
public DataResult<List<DeviceRespVO>> appHomePageDevices(@RequestBody DeviceTreeReq vo,HttpServletRequest request) {
String lang = request.getHeader(RedisKeyConstant.User.LANG);
String lang = request.getHeader(CommonConstant.LANG);
List<DeviceRespVO> deviceRespVOS = deviceService.selectByIdAndSrcIdNotZero(vo.getStationId(),lang);
deviceRespVOS = deviceRespVOS.stream().filter(i -> i.getCategory() > CommonConstant.TWO).collect(Collectors.toList());
return DataResult.success(deviceRespVOS);
@ -325,7 +325,7 @@ public class DeviceController {
@ApiOperation(value = "根据条件生成树状结构设备")
@PostMapping("treeVirtualDevices")
public DataResult<List<DevicePointResp>> treeVirtualDevices(@RequestBody DeviceTreeReq vo,HttpServletRequest request) {
String lang = request.getHeader(RedisKeyConstant.User.LANG);
String lang = request.getHeader(CommonConstant.LANG);
List<DeviceRespVO> deviceRespVOS = deviceService.selectAllDeviceAndSrcIdNotZero(vo.getStationId(),lang);
List<DevicePointResp> treeDevices = new ArrayList<>();
if (null != deviceRespVOS && !deviceRespVOS.isEmpty()) {
@ -341,7 +341,7 @@ public class DeviceController {
@TokenIgnore
@PostMapping("treeTrueDevices")
public DataResult<List<DevicePointResp>> treeTrueDevices(@RequestBody DeviceTreeReq vo,HttpServletRequest request) {
String lang = request.getHeader(RedisKeyConstant.User.LANG);
String lang = request.getHeader(CommonConstant.LANG);
List<DeviceRespVO> deviceRespVOS = deviceService.selectAllDeviceAndSrcIdNotZero(vo.getStationId(),lang);
deviceRespVOS = deviceRespVOS.stream().filter(i -> CommonConstant.ZERO.equals(i.getVirtual())).collect(Collectors.toList());
List<DeviceRespVO> deviceGroupRespVOS = deviceService.selectGroup(deviceRespVOS);

View File

@ -65,7 +65,7 @@ public class DynamicConfigController {
@PostMapping("queryCurveConfig")
@ApiOperation(value = "查询曲线配置信息")
public DataResult<List<CurveConfigQueryResp>> queryCurveConfig(@RequestBody DynamicConfigQuery vo, HttpServletRequest request) {
vo.setLang(request.getHeader(RedisKeyConstant.User.LANG));
vo.setLang(request.getHeader(CommonConstant.LANG));
List<CurveConfigQueryResp> result = dynamicConfigService.queryCurveConfig(vo);
return DataResult.success(result);
}
@ -124,7 +124,7 @@ public class DynamicConfigController {
@PostMapping("pointList")
@ApiOperation(value = "查询配置信息")
public DataResult<List<PointConfigResultResp>> pointList(@RequestBody PointConfigQuery vo, HttpServletRequest request) {
vo.setLang(request.getHeader(RedisKeyConstant.User.LANG));
vo.setLang(request.getHeader(CommonConstant.LANG));
List<PointConfigResultResp> resultRespList = dynamicConfigService.pointList(vo);
return DataResult.success(resultRespList);
}
@ -132,7 +132,7 @@ public class DynamicConfigController {
@PostMapping("pointListData")
@ApiOperation(value = "配置点数据集合")
public DataResult<List<PointConfigDataResp>> pointListData(@RequestBody PointConfigQuery vo, HttpServletRequest request) {
vo.setLang(request.getHeader(RedisKeyConstant.User.LANG));
vo.setLang(request.getHeader(CommonConstant.LANG));
List<PointConfigDataResp> pointConfigData = dynamicConfigService.getPointConfigData(vo);
return DataResult.success(pointConfigData);
}
@ -177,17 +177,4 @@ public class DynamicConfigController {
int count = dynamicConfigService.delDynamicConfigTitle(vo);
return DataResult.success(count);
}
@PostMapping("updatePointNameEn")
@ApiOperation(value = "修改表中点名称英文")
@TokenIgnore
public DataResult updatePointNameEn(String tableName,String name,String nameEn) {
int count = 0;
if(StringUtil.isNotBlank(tableName)
&&StringUtil.isNotBlank(name)
&&StringUtil.isNotBlank(nameEn)){
count = dynamicConfigService.updatePointNameEn(tableName,name,nameEn);
}
return DataResult.success(count);
}
}

View File

@ -76,7 +76,7 @@ public class EarningsCalculateController {
@ApiOperation(value = "获取月发电量报表")
@TokenIgnore
public DataResult<EarningsCalculateResp> getTotal(@RequestBody EarningsCalculateReq earningsCalculateReq,HttpServletRequest request){
earningsCalculateReq.setLang(request.getHeader(RedisKeyConstant.User.LANG));
earningsCalculateReq.setLang(request.getHeader(CommonConstant.LANG));
EarningsCalculateResp total = earningsCalculateService.getTotal(earningsCalculateReq,PAGE_LIST_TYPE);
if( earningsCalculateReq != null && earningsCalculateReq.getStationId() != null ){
Integer stationId = earningsCalculateReq.getStationId();
@ -204,7 +204,7 @@ public class EarningsCalculateController {
@PostMapping("/export")
@ApiOperation(value = "导出")
public void export(HttpServletRequest req, HttpServletResponse response, @RequestBody EarningsCalculateReq earningsCalculateReq) {
String lang = req.getHeader(RedisKeyConstant.User.LANG);
String lang = req.getHeader(CommonConstant.LANG);
earningsCalculateReq.setLang(lang);
EarningsCalculateResp total = earningsCalculateService.getTotal(earningsCalculateReq,PAGE_LIST_TYPE);
@ -217,8 +217,18 @@ public class EarningsCalculateController {
String fileName = "demo.xlsx";
response.setHeader("Content-disposition", "attachment;filename=" +fileName);
String path="template/earningsTemplate.xlsx";
if(RedisKeyConstant.User.EN_US.equals(lang)){
if(CommonConstant.langTemp.EN_US.equals(lang)){
path="template/earningsTemplateen_US.xlsx";
}else if(CommonConstant.langTemp.FR_FR.equals(lang)){
path="template/earningsTemplateen_FRA.xlsx";
}else if(CommonConstant.langTemp.ES_ES.equals(lang)){
path="template/earningsTemplateen_SPA.xlsx";
}else if(CommonConstant.langTemp.DE_DE.equals(lang)){
path="template/earningsTemplateen_DE.xlsx";
}else if(CommonConstant.langTemp.PL_PL.equals(lang)){
path="template/earningsTemplateen_PL.xlsx";
}else if(CommonConstant.langTemp.AR_EG.equals(lang)){
path="template/earningsTemplateen_ARA.xlsx";
}
//文件模板输入流
InputStream inputStream = new ClassPathResource(path).getInputStream();
@ -313,7 +323,7 @@ public class EarningsCalculateController {
@PostMapping("/exportReport")
@ApiOperation(value = "导出")
public void exportReport(HttpServletRequest req, HttpServletResponse response, @RequestBody EarningsCalculateReq earningsCalculateReq) {
String lang = req.getHeader(RedisKeyConstant.User.LANG);
String lang = req.getHeader(CommonConstant.LANG);
earningsCalculateReq.setLang(lang);
EarningsCalculateResp total = earningsCalculateService.getTotal(earningsCalculateReq,REPORT_LIST_TYPE);
@ -326,8 +336,18 @@ public class EarningsCalculateController {
String fileName = "demo.xlsx";
response.setHeader("Content-disposition", "attachment;filename=" +fileName);
String path="template/earningsUserTemplate.xlsx";
if(RedisKeyConstant.User.EN_US.equals(lang)){
if(CommonConstant.langTemp.EN_US.equals(lang)){
path="template/earningsUserTemplateen_US.xlsx";
}else if(CommonConstant.langTemp.FR_FR.equals(lang)){
path="template/earningsUserTemplateen_FRA.xlsx";
}else if(CommonConstant.langTemp.ES_ES.equals(lang)){
path="template/earningsUserTemplateen_SPA.xlsx";
}else if(CommonConstant.langTemp.DE_DE.equals(lang)){
path="template/earningsUserTemplateen_DE.xlsx";
}else if(CommonConstant.langTemp.PL_PL.equals(lang)){
path="template/earningsUserTemplateen_Pl.xlsx";
}else if(CommonConstant.langTemp.AR_EG.equals(lang)){
path="template/earningsUserTemplateen_ARA.xlsx";
}
//文件模板输入流
InputStream inputStream = new ClassPathResource(path).getInputStream();

View File

@ -173,7 +173,7 @@ public class ElecPriceCurveController {
@ApiOperation(value = "查询所有电价曲线模板")
//@TokenIgnore
public DataResult<List<ElecPriceData>> getAll(@RequestBody @Valid ElecPriceTemplateReqVO vo,HttpServletRequest request) {
String lang = request.getHeader(RedisKeyConstant.User.LANG);
String lang = request.getHeader(CommonConstant.LANG);
List<ElecPriceTemplate> list = elecPriceCurveService.getAll(vo);
List<ElecPriceData> resultList = new ArrayList<>();
for (ElecPriceTemplate elecTemplate : list) {
@ -189,14 +189,13 @@ public class ElecPriceCurveController {
data.setBeginTime(elecTemplateSub.getBeginTime());
data.setEndTime(elecTemplateSub.getEndTime());
data.setType(elecTemplateSub.getType());
if(RedisKeyConstant.User.EN_US.equals(lang)){
if(StringUtil.isNotBlank(data.getTemplateName())){
data.setTemplateName(dynamicConfigService.getNameEn(data.getTemplateName()));
data.setTemplateName(dynamicConfigService.getNameByLang(data.getTemplateName(),lang));
}
if(StringUtil.isNotBlank(data.getType())){
data.setType(dynamicConfigService.getNameEn(data.getType()));
}
data.setType(dynamicConfigService.getNameByLang(data.getType(),lang));
}
resultList.add(data);
}
}
@ -311,7 +310,7 @@ public class ElecPriceCurveController {
@LogAnnotation(title = "电价曲线模板设置", action = "导出电价曲线数据")
@HzPermission(PermissionConstant.STRATEGY_ELECURVE_EXPORT)
public void exportExcel(@RequestBody BatchDeleteReq batchDeleteReq ,HttpServletResponse response,HttpServletRequest request){
String lang = request.getHeader(RedisKeyConstant.User.LANG);
String lang = request.getHeader(CommonConstant.LANG);
List<Integer> ids = batchDeleteReq.getIds();
if (ids == null || ids.isEmpty()){
throw new BusinessException(BaseResponseCode.PLEASE_SELECT_ELECTRICITY_PRICE_TEMPLATE_DATA);
@ -338,11 +337,9 @@ public class ElecPriceCurveController {
}else {
excel.setIsEnable(CommonConstant.NOT_IS_ENABlE);
}
if(RedisKeyConstant.User.EN_US.equals(lang)){
excel.setTemplateName(dynamicConfigService.getNameEn(excel.getTemplateName()));
excel.setType(dynamicConfigService.getNameEn(excel.getType()));
excel.setIsEnable(dynamicConfigService.getNameEn(excel.getIsEnable()));
}
excel.setTemplateName(dynamicConfigService.getNameByLang(excel.getTemplateName(),lang));
excel.setType(dynamicConfigService.getNameByLang(excel.getType(),lang));
excel.setIsEnable(dynamicConfigService.getNameByLang(excel.getIsEnable(),lang));
excelList.add(excel);
}
}
@ -422,7 +419,7 @@ public class ElecPriceCurveController {
/**
* 组装json
* @param earningsCalculateSubs
* @param vo
* @return
*/
private String parseJson(EleRateFileVo vo){

View File

@ -5,6 +5,7 @@ import com.ho.business.service.HisCurveRelateService;
import com.ho.business.vo.req.modelType.ModelTypeQueryReq;
import com.ho.business.vo.req.point.HisPointReqVo;
import com.ho.common.tools.annotation.LogAnnotation;
import com.ho.common.tools.constant.CommonConstant;
import com.ho.common.tools.constant.ContextConstant;
import com.ho.common.tools.constant.RedisKeyConstant;
import com.ho.common.tools.entity.SimpleUser;
@ -56,7 +57,7 @@ public class HisCurveRelateController {
String token = request.getHeader(RedisKeyConstant.User.ACCESS_TOKEN);
SimpleUser user = redisService.getSimpleUserByToken(token);
vo.setUserId(user.getUserId());
vo.setLang(request.getHeader(RedisKeyConstant.User.LANG));
vo.setLang(request.getHeader(CommonConstant.LANG));
PageResult<HisCurveRelate> list = hisCurveRelateService.pageSelectAll(vo);
return DataResult.success(list);
}

View File

@ -159,7 +159,7 @@ public class OpenStationController {
public DataResult<List<NewRealTimeCurveVo>> dynamicRealtimeCurve(@RequestBody DynamicConfigQuery vo, HttpServletRequest request) {
//默认隐藏曲线不显示
vo.setIsHide(CommonConstant.ZERO);
vo.setLang(request.getHeader(RedisKeyConstant.User.LANG));
vo.setLang(request.getHeader(CommonConstant.LANG));
List<NewRealTimeCurveVo> resList = stationHomeService.getDynamicRealtimeCurve(vo);
//返回值的BigDecimal类型保留两位小数
for (NewRealTimeCurveVo newRealTimeCurveVo : resList) {
@ -187,7 +187,7 @@ public class OpenStationController {
@PostMapping("/pcsTotalData")
@ApiOperation(value = "数据总览")
public DataResult<PcsTotalData> pcsTotalData(@RequestBody StationReq req,HttpServletRequest request) {
req.setLang(request.getHeader(RedisKeyConstant.User.LANG));
req.setLang(request.getHeader(CommonConstant.LANG));
if (req.getDeviceType() == null) {
String deviceType = colCountService.getDeviceType(req.getStationId());
req.setDeviceType(deviceType);
@ -218,7 +218,7 @@ public class OpenStationController {
@ApiOperation(value = "数据总览取PCS计算")
@TokenIgnore
public DataResult<PcsTotalData> getPcsTotalData(@RequestBody StationReq req,HttpServletRequest request) {
req.setLang(request.getHeader(RedisKeyConstant.User.LANG));
req.setLang(request.getHeader(CommonConstant.LANG));
if (req.getDeviceType() == null) {
String deviceType = colCountService.getDeviceType(req.getStationId());
if (null == deviceType) {
@ -307,7 +307,7 @@ public class OpenStationController {
//@LogAnnotation(title = "累计充放电量", action = "导出累计充放电量数据")
//@HzPermission(value = {PermissionConstant.REMOTECONTROL_COMMAND_EXPORT,PermissionConstant.DATA_SHOW_EXPORT,PermissionConstant.REMOTECONTROL_COMMAND_EXPORT})
public void exportExcel(@RequestBody @Valid PcsStationReq req, HttpServletResponse response,HttpServletRequest request) {
String lang = request.getHeader(RedisKeyConstant.User.LANG);
String lang = request.getHeader(CommonConstant.LANG);
//功能描述把同一个表格多个sheet测试结果重新输出
openStationService.exportEleData(req, response,lang);
@ -324,7 +324,7 @@ public class OpenStationController {
@PostMapping("/getElecMeterList")
@ApiOperation(value = "获取多电站累计充放电量数据(不分页)")
public DataResult<Object> getElecMeterList(@RequestBody PcsStationReq req,HttpServletRequest request) {
req.setLang(request.getHeader(RedisKeyConstant.User.LANG));
req.setLang(request.getHeader(CommonConstant.LANG));
Object obj = openStationService.getElecMeterList(req);
return DataResult.success(obj);
}

View File

@ -67,7 +67,7 @@ public class PlanningCurveController {
@ApiOperation(value = "模板列表查询")
@TokenIgnore
public DataResult getPlanningCurveTemplates(@RequestBody PlanningCurveTemplate template,HttpServletRequest request) {
template.setLang(request.getHeader(RedisKeyConstant.User.LANG));
template.setLang(request.getHeader(CommonConstant.LANG));
List<Map<String, Object>> planningCurveTemplates = planningService.getPlanningCurveTemplates(template);
return DataResult.success(planningCurveTemplates);
}
@ -103,7 +103,7 @@ public class PlanningCurveController {
@ApiOperation(value = "查看详情")
@TokenIgnore
public DataResult planningCurveTemplateDetail(@RequestBody PlanningCurveTemplate template,HttpServletRequest request) {
template.setLang(request.getHeader(RedisKeyConstant.User.LANG));
template.setLang(request.getHeader(CommonConstant.LANG));
if( template == null || template.getTemId() == null ){
return DataResult.success();
}

View File

@ -1,7 +1,6 @@
package com.ho.business.controller;
import com.ho.business.entity.PlanCurveOperationRecordReq;
import com.ho.business.entity.PlanningCurveHistory;
import com.ho.business.entity.PlanningIssueDevice;
import com.ho.business.service.PlanningCurveIssueService;
import com.ho.business.vo.resp.planningCurve.PlanningIssueQueryVo;
@ -9,9 +8,9 @@ import com.ho.business.vo.resp.planningCurve.PlanningIssueVo;
import com.ho.common.tools.annotation.HzPermission;
import com.ho.common.tools.annotation.LogAnnotation;
import com.ho.common.tools.annotation.TokenIgnore;
import com.ho.common.tools.constant.CommonConstant;
import com.ho.common.tools.constant.ContextConstant;
import com.ho.common.tools.constant.PermissionConstant;
import com.ho.common.tools.constant.RedisKeyConstant;
import com.ho.common.tools.exception.BaseResponseCode;
import com.ho.common.tools.exception.BusinessException;
import com.ho.common.tools.exception.DataResult;
@ -41,7 +40,7 @@ public class PlanningCurveIssueController {
@ApiOperation(value = "查询下发设备接口")
@TokenIgnore
public DataResult getIssueDevices(@RequestBody PlanningIssueDevice issueDevice, HttpServletRequest request) {
issueDevice.setLang(request.getHeader(RedisKeyConstant.User.LANG));
issueDevice.setLang(request.getHeader(CommonConstant.LANG));
return DataResult.success(issueService.getIssueDevices(issueDevice));
}
@ -49,7 +48,7 @@ public class PlanningCurveIssueController {
@ApiOperation(value = "查询计划曲线模板接口")
@TokenIgnore
public DataResult getTemplate(@RequestBody PlanningIssueDevice issueDevice,HttpServletRequest request) {
issueDevice.setLang(request.getHeader(RedisKeyConstant.User.LANG));
issueDevice.setLang(request.getHeader(CommonConstant.LANG));
return DataResult.success(issueService.getTemplate(issueDevice));
}
@ -109,7 +108,7 @@ public class PlanningCurveIssueController {
@ApiOperation(value = "查询计划曲线下发操作记录")
@TokenIgnore
public DataResult<List<PlanCurveOperationRecordReq>> getPlanCurveOperationList(@RequestBody String stationId,HttpServletRequest request){
String lang = request.getHeader(RedisKeyConstant.User.LANG);
String lang = request.getHeader(CommonConstant.LANG);
List<PlanCurveOperationRecordReq> result = issueService.getPlanCurveOperationList(stationId,lang);
return DataResult.success(result);
}

View File

@ -128,7 +128,7 @@ public class PointDemoController {
@PostMapping("page")
@ApiOperation(value = "点表列表,分页")
public DataResult<PageResult<PointRespVO>> page(@RequestBody @Valid PointReq pointReq,HttpServletRequest request) {
pointReq.setLang(request.getHeader(RedisKeyConstant.User.LANG));
pointReq.setLang(request.getHeader(CommonConstant.LANG));
String name = pointReq.getName();
if (name != null) {
name = name.trim();
@ -164,7 +164,7 @@ public class PointDemoController {
@PostMapping("pointList")
@ApiOperation(value = "点表列表,不分页")
public DataResult<List<PointListRespVo>> pointList(@RequestBody @Valid PointReq pointReq,HttpServletRequest request) {
pointReq.setLang(request.getHeader(RedisKeyConstant.User.LANG));
pointReq.setLang(request.getHeader(CommonConstant.LANG));
String name = pointReq.getName();
if (name != null) {
name = name.trim();
@ -177,7 +177,7 @@ public class PointDemoController {
@PostMapping("queryPoint")
@ApiOperation(value = "根据设备查询点表")
public DataResult<List<QueryPointRespVo>> queryPoint(@RequestBody @Valid PointVo vo,HttpServletRequest request) {
vo.setLang(request.getHeader(RedisKeyConstant.User.LANG));
vo.setLang(request.getHeader(CommonConstant.LANG));
List<QueryPointRespVo> pointList = pointDemoService.queryPoint(vo);
return DataResult.success(pointList);
}
@ -185,7 +185,7 @@ public class PointDemoController {
@PostMapping("queryVirtualPoint")
@ApiOperation(value = "根据设备查询虚拟点表")
public DataResult<List<QueryPointRespVo>> queryVirtualPoint(@RequestBody @Valid PointVo vo,HttpServletRequest request) {
vo.setLang(request.getHeader(RedisKeyConstant.User.LANG));
vo.setLang(request.getHeader(CommonConstant.LANG));
List<QueryPointRespVo> pointList = pointDemoService.queryVirtualPoint(vo);
return DataResult.success(pointList);
}
@ -243,15 +243,31 @@ public class PointDemoController {
@LogAnnotation(title = "一体柜点表模块", action = "导出点表数据")
//@HzPermission(value = {PermissionConstant.REMOTECONTROL_COMMAND_EXPORT,PermissionConstant.DATA_SHOW_EXPORT,PermissionConstant.REMOTECONTROL_COMMAND_EXPORT})
public void exportExcel(@RequestBody @Valid PointReq pointReq, HttpServletResponse response,HttpServletRequest request) {
String lang = request.getHeader(RedisKeyConstant.User.LANG);
String lang = request.getHeader(CommonConstant.LANG);
pointReq.setLang(lang);
List<PointRespVO> pointList = pointDemoService.getPointList(pointReq);
String fileName = "点表";
String sheetName = "data";
String sheetName = "数据";
try {
if(RedisKeyConstant.User.EN_US.equals(lang)){
if(CommonConstant.langTemp.EN_US.equals(lang)){
fileName = "point table";sheetName = "data";
EasyExcelUtil.writeExcel(response, pointList, fileName, sheetName, PointRespEnVO.class);
}else if(CommonConstant.langTemp.FR_FR.equals(lang)){
fileName = "Tableau des points";sheetName = "données";
EasyExcelUtil.writeExcel(response, pointList, fileName, sheetName, PointRespFraVO.class);
}else if(CommonConstant.langTemp.ES_ES.equals(lang)){
fileName = "Tabla de puntos";sheetName = "datos";
EasyExcelUtil.writeExcel(response, pointList, fileName, sheetName, PointRespSpaVO.class);
}else if(CommonConstant.langTemp.AR_EG.equals(lang)){
fileName = "نقطة الجدول";sheetName = "داتا";
EasyExcelUtil.writeExcel(response, pointList, fileName, sheetName, PointRespAraVO.class);
}else if(CommonConstant.langTemp.DE_DE.equals(lang)){
fileName = "Punkttabellen";sheetName = "Daten";
EasyExcelUtil.writeExcel(response, pointList, fileName, sheetName, PointRespDeVO.class);
}else if(CommonConstant.langTemp.PL_PL.equals(lang)){
fileName = "Tabela punktowa";sheetName = "Dane";
EasyExcelUtil.writeExcel(response, pointList, fileName, sheetName, PointRespPlVO.class);
}else{
EasyExcelUtil.writeExcel(response, pointList, fileName, sheetName, PointRespVO.class);
}
@ -270,14 +286,14 @@ public class PointDemoController {
@LogAnnotation(title = "一体柜点表模块", action = "导出历史数据")
@HzPermission(PermissionConstant.DATA_HISCURVE_EXPORT)
public void hisExportExcel(@RequestBody @Valid PointCurveReq pointCurveReq, HttpServletResponse response, HttpServletRequest request) {
pointCurveReq.setLang(request.getHeader(RedisKeyConstant.User.LANG));
pointCurveReq.setLang(request.getHeader(CommonConstant.LANG));
pointDemoService.getHisExportExcel(pointCurveReq, response);
}
@PostMapping("pointCurve")
@ApiOperation(value = "点表曲线")
public DataResult<List<PointCurveResp>> pointCurve(@RequestBody @Valid PointCurveReq pointCurveReq, HttpServletRequest request) {
pointCurveReq.setLang(request.getHeader(RedisKeyConstant.User.LANG));
pointCurveReq.setLang(request.getHeader(CommonConstant.LANG));
List<PointCurveResp> pointCurveRespList = new ArrayList<>();
//对开始结束时间进行处理 对bug129
if (pointCurveReq.getBeginTime() != null) {
@ -344,7 +360,7 @@ public class PointDemoController {
@PostMapping("pointDataShowList")
@ApiOperation(value = "点表真实数据展示(每个点位分开)")
public DataResult<List<PageResult>> pointDataShowList(@RequestBody @Valid PointCurveReq pointCurveReq, HttpServletRequest request) {
pointCurveReq.setLang(request.getHeader(RedisKeyConstant.User.LANG));
pointCurveReq.setLang(request.getHeader(CommonConstant.LANG));
List<PageResult> pointCurveRespList = new ArrayList<>();
//对传输过来的col集合进行判断是否大于10个
if (pointCurveReq.getDeviceIdList().size() < 50) {

View File

@ -10,6 +10,7 @@ import com.ho.business.service.EarningsCalculateService;
import com.ho.business.vo.req.report.ReportReqVO;
import com.ho.business.vo.resp.income.RevenueOverview;
import com.ho.business.vo.resp.income.RevenueOverviewData;
import com.ho.common.tools.constant.CommonConstant;
import com.ho.common.tools.constant.ContextConstant;
import com.ho.common.tools.constant.RedisKeyConstant;
import com.ho.common.tools.exception.DataResult;
@ -93,7 +94,7 @@ public class RevenueOverviewController {
@PostMapping("export")
@ApiOperation(value = "导出")
public void export(@RequestBody @Valid ReportReqVO vo, HttpServletResponse response, HttpServletRequest request) {
String lang = request.getHeader(RedisKeyConstant.User.LANG);
String lang = request.getHeader(CommonConstant.LANG);
List<RevenueOverviewData> revenueOverviewData = earningsCalculateService.getRevenueOverviewData(vo);
RevenueOverview investment = earningsCalculateService.getInvestment(vo);
//在内存操作,写到浏览器
@ -106,8 +107,18 @@ public class RevenueOverviewController {
response.setHeader("Content-disposition", "attachment;filename=" + new String(fileName.getBytes("UTF-8")));
//文件模板输入流
String path="template/RevenueOverview.xlsx";
if(RedisKeyConstant.User.EN_US.equals(lang)){
if(CommonConstant.langTemp.EN_US.equals(lang)){
path="template/RevenueOverviewen_US.xlsx";
}else if (CommonConstant.langTemp.FR_FR.equals(lang)){
path="template/RevenueOverviewen_FRA.xlsx";
}else if (CommonConstant.langTemp.ES_ES.equals(lang)){
path="template/RevenueOverviewen_SPA.xlsx";
}else if (CommonConstant.langTemp.DE_DE.equals(lang)){
path="template/RevenueOverviewen_DE.xlsx";
}else if (CommonConstant.langTemp.PL_PL.equals(lang)){
path="template/RevenueOverviewen_PL.xlsx";
}else if (CommonConstant.langTemp.AR_EG.equals(lang)){
path="template/RevenueOverviewen_ARA.xlsx";
}
InputStream inputStream = new ClassPathResource(path).getInputStream();

View File

@ -21,6 +21,7 @@ import com.ho.business.vo.resp.station.NationStation;
import com.ho.business.vo.resp.station.StationResp;
import com.ho.business.vo.resp.station.StationStatus;
import com.ho.common.tools.annotation.LogAnnotation;
import com.ho.common.tools.annotation.NotSportEnOperation;
import com.ho.common.tools.annotation.TokenIgnore;
import com.ho.common.tools.constant.CommonConstant;
import com.ho.common.tools.constant.ContextConstant;
@ -95,6 +96,7 @@ public class StationController {
@ApiOperation(value = "新增电站接口")
@LogAnnotation(title = "电站管理", action = "新增电站信息")
//@HzPermission(PermissionConstant.SYS_STATIONMANAGE_ADD)
@NotSportEnOperation
public DataResult<Station> add(@RequestBody @Valid StationReqVO vo, HttpServletRequest request) {
DataResult<Station> result = new DataResult<>();
Station station = stationService.selectByName(vo.getName());
@ -146,6 +148,7 @@ public class StationController {
@PutMapping("update")
@ApiOperation(value = "更新电站接口")
@LogAnnotation(title = "电站管理", action = "更新电站信息")
@NotSportEnOperation
//@HzPermission(PermissionConstant.SYS_STATIONMANAGE_EDIT)
public DataResult update(@RequestBody @Valid StationPutReqVO vo, HttpServletRequest request) {
Station stationValue = stationService.selectById(vo.getId());
@ -304,6 +307,7 @@ public class StationController {
resp.setList(stationsList);
return DataResult.success(resp);
}
user.setLang(request.getHeader(CommonConstant.LANG));
resp = stationService.getNationStationList(user);
return DataResult.success(resp);
}

View File

@ -10,6 +10,7 @@ import com.ho.business.vo.req.device.DeviceTreeReq;
import com.ho.business.vo.req.device.StrategyOverviewUserSetVo;
import com.ho.business.vo.req.point.PointCurveReq;
import com.ho.business.vo.resp.cabin.TemperatureVoltageResp;
import com.ho.common.tools.constant.CommonConstant;
import com.ho.common.tools.constant.ContextConstant;
import com.ho.common.tools.constant.RedisKeyConstant;
import com.ho.common.tools.entity.SimpleUser;
@ -58,7 +59,7 @@ public class StrategyOverviewController {
@PostMapping("cellVoltageAndTemperature")
@ApiOperation("电芯电压/温度分布")
public DataResult<TemperatureVoltageResp> getCellVoltageAndTemperature(@RequestBody @Valid DeviceTreeReq vo,HttpServletRequest request) {
vo.setLang(request.getHeader(RedisKeyConstant.User.LANG));
vo.setLang(request.getHeader(CommonConstant.LANG));
TemperatureVoltageResp temperatureVoltageResp = deviceService.getCellVoltageAndTemperature(vo);
return DataResult.success(temperatureVoltageResp);
}
@ -66,7 +67,7 @@ public class StrategyOverviewController {
@PostMapping("cellVoltageAndTemperatureNum")
@ApiOperation("电芯电压/温度分布按序号")
public DataResult<TemperatureVoltageResp> getCellVoltageAndTemperatureNum(@RequestBody @Valid DeviceTreeReq vo,HttpServletRequest request) {
vo.setLang(request.getHeader(RedisKeyConstant.User.LANG));
vo.setLang(request.getHeader(CommonConstant.LANG));
TemperatureVoltageResp temperatureVoltageResp = deviceService.getCellVoltageAndTemperatureNum(vo);
return DataResult.success(temperatureVoltageResp);
}
@ -90,12 +91,12 @@ public class StrategyOverviewController {
@PostMapping("operatingStatistic2")
@ApiOperation("运行统计(soc,soh)")
public DataResult<List<OperatingStatistic>> getOperatingStatistic2(@RequestBody @Valid DeviceTreeReq vo,HttpServletRequest request) {
String lang = request.getHeader(RedisKeyConstant.User.LANG);
String lang = request.getHeader(CommonConstant.LANG);
List<OperatingStatistic> list = deviceService.getOperatingStatistic2(vo.getStationId());
//中英切换处理
//多语言切换处理
list.stream().forEach(s->{
if(RedisKeyConstant.User.EN_US.equals(lang)){
s.setName(dynamicConfigService.getNameEn(s.getName()));
if(!CommonConstant.langTemp.ZH_CN.equals(lang)){
s.setName(dynamicConfigService.getNameByLang(s.getName(),lang));
}
});
return DataResult.success(list);

View File

@ -0,0 +1,470 @@
package com.ho.business.task;
import com.fasterxml.jackson.databind.ObjectMapper;
public class Test {
static String json ="{\n" +
" \"homePage\": {\n" +
" \"home\": {\n" +
" \"esiCab\": \"خزانة تخزين الطاقة المدمجة\",\n" +
" \"gridCab\": \"خزانة توصيل الشبكة\",\n" +
" \"grid\": \"توزيع الطاقة للمستخدمين\",\n" +
" \"workStatus\": \"حالة التشغيل:\",\n" +
" \"activePower\": \"إجمالي الطاقة النشطة (كيلوواط):\",\n" +
" \"charge\": \"الشحن\",\n" +
" \"disCharge\": \"التفريغ\",\n" +
" \"standing\": \"خامل\",\n" +
" \"load\": \"تحميل\",\n" +
" \"gridCabSwitch\": \"مفتاح خزانة توصيل الشبكة:\",\n" +
" \"dCCabin\": \"حجرة التيار المستمر\",\n" +
" \"PCSCab\": \"حجرة PCS المدمجة المضغوطة\",\n" +
" \"legend\": \"المثال\",\n" +
" \"normal\": \"التشغيل العادي\",\n" +
" \"fault\": \"الأعطلء\",\n" +
" \"overhaul\": \"الصيانة\",\n" +
" \"shutStan\": \"الاستعداد/الإغلاق\",\n" +
" \"reactivePower\": \"الطاقة التفاعلية (كيلوواط):\",\n" +
" \"totalV\": \"إجمالي الجهد (فولت):\",\n" +
" \"current\": \"التيار (أمبير):\",\n" +
" \"maxCellVol\": \"الجهد الأقصى للخلية:\",\n" +
" \"minCellVol\": \"الجهد الأدنى للخلية:\",\n" +
" \"shutdown\": \"الإغلاق\",\n" +
" \"standby\": \"الاستعداد\",\n" +
" \"run\": \"تشغيل\",\n" +
" \"allActivePower\": \"إجمالي الطاقة النشطة (كيلوواط):\",\n" +
" \"cabinet\": \"خزانة تخزين الطاقة\",\n" +
" \"gridMeter\": \"عداد جانب الشبكة\",\n" +
" \"photovoltaic\": \"الطاقة الكهروضوئية\",\n" +
" \"battery\": \"البطارية\",\n" +
" \"status\": \"الحالة:\",\n" +
" \"busbar\": \"الناقل\",\n" +
" \"dieselGenerator\": \"مولد الديزل\",\n" +
" \"ammeter\": \"عداد الكهرباء\",\n" +
" \"device\": \"المعدات\",\n" +
" \"earning\": \"الإيرادات\",\n" +
" \"alarm\": \"إنذار\",\n" +
" \"policy\": \"استراتيجية\",\n" +
" \"stationTopo\": \"توبولوجيا محطة الطاقة\",\n" +
" \"deviceMonitor\": \"مراقبة المعدات\",\n" +
" \"runCurve\": \"منحنيات التشغيل\",\n" +
" \"chargeDisData\": \"بيانات الشحن والتفريغ\",\n" +
" \"stationData\": \"بيانات محطة الطاقة\",\n" +
" \"environmentalData\": \"بيانات التحكم البيئي\",\n" +
" \"sevenDay\": \"آخر سبعة أيام\",\n" +
" \"monthDay\": \"آخر شهر\",\n" +
" \"monthThree\": \"آخر ثلاثة أشهر\",\n" +
" \"yearDay\": \"العام الماضي\",\n" +
" \"tip\": \"تذكير\",\n" +
" \"loading\": \"تحميل الموارد...\",\n" +
" \"power\": \"الطاقة (كيلوواط)\",\n" +
" \"photovoltaicCharge\": \"الشحن الكهروضوئي\",\n" +
" \"chargingandDischarging\": \"حجم الشحن والتفريغ\",\n" +
" \"safeDaysUnit\": \"أيام التشغيل الآمن (أيام)\",\n" +
" \"totalCapacity\": \"إجمالي السعة المركبة\",\n" +
" \"systemConversionEfficiency\": \"كفاءة تحويل النظام\",\n" +
" \"currentPower\": \"الطاقة الحالية\",\n" +
" \"totalCharge\": \"إجمالي حجم الشحن\",\n" +
" \"totalDischarge\": \"إجمالي حجم التفريغ\",\n" +
" \"dailyCharge\": \"حجم الشحن اليومي\",\n" +
" \"dailyDischarge\": \"حجم التفريغ اليومي\",\n" +
" \"dayPhotovoltaic\": \"حجم التوليد الكهروضوئي\",\n" +
" \"noData\": \"لا توجد بيانات\",\n" +
" \"login\": \"تسجيل الدخول\",\n" +
" \"account\": \"الحساب\",\n" +
" \"password\": \"كلمة المرور\",\n" +
" \"placeAccount\": \"يرجى إدخال رقم الحساب\",\n" +
" \"placePassword\": \"يرجى إدخال كلمة المرور\",\n" +
" \"noLogin\": \"الوظيفة غير متاحة مؤقتًا\",\n" +
" \"station\": \"محطة الطاقة\",\n" +
" \"electricityPrice\": \"سعر الكهرباء الوطنية\",\n" +
" \"mine\": \"لي\",\n" +
" \"on\": \"مجمع\",\n" +
" \"off\": \"مجزأ\"\n" +
" },\n" +
" \"price\": {\n" +
" \"elePriceQuery\": \"استفسار عن سعر الكهرباء\",\n" +
" \"queryCriteria\": \"معايير البحث\",\n" +
" \"sift\": \"تصفية\",\n" +
" \"provinceRegion\": \"المناطق الإقليمية والبلدية\",\n" +
" \"selectProvinceRegion\": \"اختر المناطق الإقليمية والبلدية\",\n" +
" \"customerType\": \"مستهلك الكهرباء\",\n" +
" \"selectEleCustomers\": \"يرجى تحديد مستهلك الكهرباء\",\n" +
" \"eleType\": \"نظام/تصنيف إدارة الكهرباء\",\n" +
" \"selectEleType\": \"يرجى تحديد نظام/تصنيف إدارة الكهرباء\",\n" +
" \"volLevel\": \"مستوى الجهد\",\n" +
" \"selectVoltageLevel\": \"يرجى تحديد مستوى الجهد\",\n" +
" \"exeTime\": \"تاريخ التنفيذ\",\n" +
" \"selectExeTime\": \"يرجى تحديد تاريخ التنفيذ\",\n" +
" \"noData\": \"البيانات فارغة\",\n" +
" \"eleLevel\": \"مستوى سعر الكهرباء\",\n" +
" \"fsdd\": \"سعر الكهرباء حسب وقت الاستخدام\",\n" +
" \"dietailUnit\": \"(يوان صيني/كيلوواط ساعة)\",\n" +
" \"eleprice\": \"سعر الكهرباء\",\n" +
" \"nonTime\": \"سعر الكهرباء غير مرتبطة بوقت الاستخدام\",\n" +
" \"proxyPrice\": \"سعر شراء الكهرباء من الوكالة\",\n" +
" \"transmission\": \"سعر نقل الكهرباء\",\n" +
" \"attachPrice\": \"الأموال الحكومية والرسوم الإضافية\",\n" +
" \"curve\": \"منحنى\",\n" +
" \"list\": \"قائمة\",\n" +
" \"noMoreData\": \"لا توجد بيانات أخرى متاحة\",\n" +
" \"spike\": \"ذروة\",\n" +
" \"speak\": \"قمة\",\n" +
" \"regular\": \"عادية\",\n" +
" \"lowValley\": \"وادي\",\n" +
" \"deepValley\": \"وادي عميق\",\n" +
" \"peakDifference\": \"أقصى فرق بين الذروة والوادي\",\n" +
" \"peakDifferencePrice\": \"أقصى فرق في السعر بين الذروة والوادي\",\n" +
" \"dayHighPrice\": \"أعلى السعر اليومي\",\n" +
" \"dayLowtPrice\": \"أدنى السعر اليومي\",\n" +
" \"historytrend\": \"الاتجاهات التاريخية\",\n" +
" \"reset\": \"إعادة تعيين\",\n" +
" \"sure\": \"تأكيد\",\n" +
" \"sharp\": \"ذروة\",\n" +
" \"peak\": \"قمة\",\n" +
" \"flat\": \"عادية\",\n" +
" \"valley\": \"وادي\"\n" +
" },\n" +
" \"mine\": {\n" +
" \"accountSec\": \"أمان الحساب\",\n" +
" \"aboutUs\": \"معلومات عنا\",\n" +
" \"message\": \"إشعارات الرسائل\",\n" +
" \"changeLanguage\": \"تبديل لغة\",\n" +
" \"sysSetting\": \"إعدادات النظام\",\n" +
" \"messageAlerts\": \"تنبيهات الرسائل\",\n" +
" \"acceptMessageAlerts\": \"تلقي تنبيهات الرسائل\",\n" +
" \"messageDetail\": \"تفاصيل الرسالة\",\n" +
" \"closeMessage\": \"عند تعطيل هذه الميزة، سيظهر مؤشر الإشعار فقط عند تلقي الرسائل دون عرض المحتوى.\",\n" +
" \"sound\": \"الصوت والاهتزاز\",\n" +
" \"acceptSound\": \"تشغيل الصوت أو الاهتزاز عند استلام الرسالة\",\n" +
" \"settingSound\": \"تعديل الصوت والاهتزاز في إعدادات النظام\",\n" +
" \"update\": \"تذكير بتحديث البرنامج\",\n" +
" \"updateAlerts\": \"تلقي إشعارات عند توفر إصدارات جديدة من البرنامج\",\n" +
" \"noUpdate\": \"البرنامج المصغر أو إصدار H5 محدث بالفعل، لا داعي للتحقق من وجود تحديثات!\",\n" +
" \"general\": \"عام\",\n" +
" \"version\": \"الإصدار الحالي\",\n" +
" \"Privacy\": \"سياسة الخصوصية\",\n" +
" \"UserAgreement\": \"اتفاقية المستخدم\",\n" +
" \"logOut\": \"تسجيل الخروج\",\n" +
" \"notAva\": \"هذه الميزة غير متاحة حاليًا\",\n" +
" \"setPassword\": \"الرجاء تعيين كلمة مرور تسجيل الدخول\",\n" +
" \"passwordService\": \"تحديث كلمة المرور بانتظام لتعزيز الأمان\",\n" +
" \"oldPassword\": \"كلمة المرور القديمة\",\n" +
" \"inputOldPossword\": \"الرجاء إدخال كلمة المرور القديمة\",\n" +
" \"newPassword\": \"كلمة المرور الجديدة\",\n" +
" \"inputNewPassword\": \"الرجاء إدخال كلمة المرور الجديدة\",\n" +
" \"surePassword\": \"تأكيد كلمة المرور\",\n" +
" \"inputSurePassword\": \"يرجى تأكيد كلمة المرور\",\n" +
" \"PasswordError\": \"يجب أن تتكون كلمات المرور من 6 إلى 12 حرفًا وتشتمل على مزيج من الأرقام والحروف (وليس أرقامًا فقط)\",\n" +
" \"submit\": \"إرسال\",\n" +
" \"resetSubmit\": \"يرجى إعادة إدخال كلمة المرور\",\n" +
" \"passwordEqual\": \"كلمات المرور المدخلة غير متطابقة\",\n" +
" \"tip\": \"تذكير\",\n" +
" \"updateSuccess\": \"تم تغيير كلمة المرور بنجاح، يرجى تسجيل الدخول مرة أخرى.\",\n" +
" \"inputError\": \"المعلومات التي أدخلتها غير صحيحة، يرجى تصحيحها وفقًا للمطالبات.\",\n" +
" \"hoenergypower\": \"هونغتشنغ تخزين الطاقة\",\n" +
" \"companyHomepage\": \"الصفحة الرئيسية للشركة\",\n" +
" \"technicalServices\": \"الخدمات الفنية\",\n" +
" \"termsOfService\": \"شروط الخدمة\",\n" +
" \"downUpdate\": \"سواءًا تنزيل التحديثات؟\",\n" +
" \"appTitle\": \"منصة إدارة تخزين الطاقة الذكية\",\n" +
" \"lookDetail\": \"التحقق من التفاصيل\",\n" +
" \"noMessage\": \"لا توجد أخبار حاليًا\",\n" +
" \"sureRead\": \"تأكيد القراءة\",\n" +
" \"cancel\": \"إلغاء\",\n" +
" \"operateSuccess\": \"العملية ناجحة\",\n" +
" \"messageReaded\": \"تمت قراءة هذه الرسالة، لا داعي لتكرار الإجراء\"\n" +
" },\n" +
" \"device\": {\n" +
" \"inputNameQuery\": \"أدخل الاسم للبحث\",\n" +
" \"query\": \"بحث\",\n" +
" \"all\": \"جميع\",\n" +
" \"queryResult\": \"نتائج البحث\",\n" +
" \"pcsTopu\": \"مخطط طوبولوجيا PCS\",\n" +
" \"totalAcReaPower\": \"إجمالي الطاقة النشطة/التفاعلية\",\n" +
" \"timeGranularity\": \"دقة الوقت\",\n" +
" \"deviceData\": \"بيانات المعدات\",\n" +
" \"acPower\": \"الطاقة النشطة للتيار المتردد\",\n" +
" \"acRecPower\": \"الطاقة التفاعلية للتيار المتردد\",\n" +
" \"gridFrequency\": \"تردد الشبكة\",\n" +
" \"abLineVol\": \"جهد خط AB\",\n" +
" \"bcLineVol\": \"جهد خط BC\",\n" +
" \"caLineVol\": \"جهد خط CA\",\n" +
" \"acur\": \"تيار الطور A\",\n" +
" \"bcur\": \"تيار الطور B\",\n" +
" \"ccur\": \"تيار الطور C\",\n" +
" \"DCPower\": \"طاقة التيار المستمر\",\n" +
" \"DCVol\": \"جهد التيار المستمر\",\n" +
" \"DCCurrent\": \"تيار التيار المستمر\",\n" +
" \"acbreaker\": \"قاطع دائرة التيار المتردد\",\n" +
" \"dcbreaker\": \"قاطع دائرة التيار المستمر\",\n" +
" \"runState\": \"حالة التشغيل\",\n" +
" \"rsState\": \"الحالة عن بُعد/المحلية\",\n" +
" \"gridMode\": \"حالة التوصيل بالشبكة والانفصال عن الشبكة\",\n" +
" \"deviceState\": \"حالة الجهاز\",\n" +
" \"totalActivePower\": \"إجمالي الطاقة النشطة\",\n" +
" \"totalReactivePower\": \"إجمالي الطاقة التفاعلية\",\n" +
" \"local\": \"محلي\",\n" +
" \"distance\": \"عن بُعد\",\n" +
" \"grid\": \"متصل بالشبكة\",\n" +
" \"offGrid\": \"غير متصل بالشبكة\",\n" +
" \"standby\": \"الاستعداد\",\n" +
" \"shutdown\": \"الإغلاق\",\n" +
" \"run\": \"تشغيل\",\n" +
" \"fault\": \"الأعطلء\",\n" +
" \"charge\": \"الشحن\",\n" +
" \"discharge\": \"التفريغ\",\n" +
" \"standing\": \"خامل\",\n" +
" \"localAutomatic\": \"تلقائي محلي\",\n" +
" \"localManual\": \"يدوي محلي\",\n" +
" \"timesArr\": [\n" +
" {\n" +
" \"label\": \"1 دقيقة\",\n" +
" \"value\": 1\n" +
" },\n" +
" {\n" +
" \"label\": \"5 دقيقة\",\n" +
" \"value\": 5\n" +
" },\n" +
" {\n" +
" \"label\": \"10 دقيقة\",\n" +
" \"value\": 10\n" +
" },\n" +
" {\n" +
" \"label\": \"15 دقيقة\",\n" +
" \"value\": 15\n" +
" },\n" +
" {\n" +
" \"label\": \"20 دقيقة\",\n" +
" \"value\": 20\n" +
" },\n" +
" {\n" +
" \"label\": \"30 دقيقة\",\n" +
" \"value\": 30\n" +
" }\n" +
" ],\n" +
" \"yx\": \"التحكم عن بعد\",\n" +
" \"yc\": \"القياس عن بعد\",\n" +
" \"data\": \"البيانات\",\n" +
" \"noData\": \"لا توجد بيانات\",\n" +
" \"loadText\": {\n" +
" \"loadmore\": \"اسحب برفق\",\n" +
" \"loading\": \"محاولة التحميل\",\n" +
" \"nomore\": \"لا يوجد المزيد\"\n" +
" },\n" +
" \"clusterTotalVol\": \"إجمالي الجهد للمجموعة/SOC\",\n" +
" \"runData\": \"بيانات التشغيل\",\n" +
" \"cumCharge\": \"الشحن التراكمي\",\n" +
" \"cumDischarge\": \"التفريغ التراكمي\",\n" +
" \"avgTem\": \"متوسط درجة الحرارة\",\n" +
" \"avgVol\": \"متوسط الجهد\",\n" +
" \"maxCellVol\": \"الجهد الأقصى للخلية\",\n" +
" \"minCellVol\": \"الجهد الأدنى للخلية\",\n" +
" \"maxCellTem\": \"أعلى درجة حرارة للخلية\",\n" +
" \"minCellTem\": \"أدنى درجة حرارة للخلية\",\n" +
" \"maxvolDiff\": \"أقصى فرق جهد كهربائي\",\n" +
" \"maxTemDiff\": \"أقصى فرق درجة حرارة\",\n" +
" \"batteryGroupNum\": \"رقم حزمة البطارية\",\n" +
" \"cellPostion\": \"موضع CELL\",\n" +
" \"vol\": \"الجهد\",\n" +
" \"volqua\": \"جودة الجهد الكهربائي\",\n" +
" \"curqua\": \"جودة التيار\",\n" +
" \"acRea\": \"الطاقة النشطة/الطاقة التفاعلية\",\n" +
" \"avol\": \"جهد الطور A\",\n" +
" \"bvol\": \"جهد الطور B\",\n" +
" \"cvol\": \"جهد الطور C\",\n" +
" \"zxygzdl\": \"إجمالي الطاقة النشطة الأمامية\",\n" +
" \"dlj\": \"الطاقة (ذروة)\",\n" +
" \"dlf\": \"الطاقة (قمة)\",\n" +
" \"dlp\": \"الطاقة (عادية)\",\n" +
" \"dlg\": \"الطاقة (وادي)\",\n" +
" \"fxygzdl\": \"إجمالي الطاقة النشطة العكسية\",\n" +
" \"hxyggl\": \"الطاقة النشطة للطور المركب\",\n" +
" \"hxwggl\": \"الطاقة التفاعلية للطور المركب\",\n" +
" \"hxglys\": \"معامل القدرة للطور المركبة\",\n" +
" \"a\": \"الطور A\",\n" +
" \"b\": \"الطور B\",\n" +
" \"c\": \"الطور C\",\n" +
" \"active\": \"الطاقة النشطة\",\n" +
" \"reactive\": \"الطاقة التفاعلية\",\n" +
" \"current\": \"تيار\",\n" +
" \"EMU\": \"بيانات تشغيل خزانة توصيل الشبكة\",\n" +
" \"on\": \"مجمع\",\n" +
" \"off\": \"مجزأ\",\n" +
" \"emuSwitchPosition\": \"موضع مفتاح خزانة توصيل الشبكة\",\n" +
" \"emuRemoteOperation\": \"التشغيل عن بُعد لخزانة توصيل الشبكة\",\n" +
" \"emuKnifePosition\": \"موضع مفتاح التأريض لخزانة توصيل الشبكة\",\n" +
" \"online\": \"متصل\",\n" +
" \"offline\": \"غير متصل\",\n" +
" \"temConCabRunData\": \"بيانات تشغيل صندوق التحكم في درجة الحرارة\",\n" +
" \"aTem\": \"درجة حرارة الطور A\",\n" +
" \"bTem\": \"درجة حرارة الطور B\",\n" +
" \"cTem\": \"درجة حرارة الطور C\",\n" +
" \"dehumidifierRunData\": \"بيانات تشغيل مزيل الرطوبة\",\n" +
" \"tem\": \"درجة الحرارة\",\n" +
" \"hum\": \"الرطوبة\",\n" +
" \"humStartValue\": \"قيمة بدء الرطوبة\",\n" +
" \"humStopValue\": \"قيمة توقف الرطوبة\",\n" +
" \"ammeterRunData\": \"بيانات تشغيل عداد الكهرباء\",\n" +
" \"frequency\": \"التردد\",\n" +
" \"perceptualPower\": \"الطاقة الحثية\",\n" +
" \"CapacitivePower\": \"الطاقة السعوية\",\n" +
" \"volRatio\": \"نسبة توزيع مقدار الجهد\",\n" +
" \"maxVol\": \"الجهد الأقصى\",\n" +
" \"minVol\": \"الجهد الأدنى\",\n" +
" \"maxTem\": \"درجة الحرارة القصوى\",\n" +
" \"minTem\": \"درجة الحرارة الدنيا\",\n" +
" \"cellVolChart\": \"مخطط شريطي لجهد الخلية\",\n" +
" \"cellTemChart\": \"مخطط شريطي لدرجة حرارة الخلية\",\n" +
" \"volUnit\": \"الجهد/قطعة\",\n" +
" \"temUnit\": \"درجة الحرارة/قطعة\",\n" +
" \"num\": \"قطعة\",\n" +
" \"stackTotalVol\": \"الجهد الكلي للمجموعة\",\n" +
" \"leftTemCabin\": \"درجة حرارة المقصورة اليسرى\",\n" +
" \"leftHubCabin\": \"رطوبة المقصورة اليسرى\",\n" +
" \"rightTemCabin\": \"درجة حرارة المقصورة اليمنى\",\n" +
" \"rightHubCabin\": \"رطوبة المقصورة اليمنى\",\n" +
" \"stackCurrent\": \"تيار المجموعة\",\n" +
" \"stackTotalCurrent\": \"التيار الكلي للمجموعة\",\n" +
" \"stackSoc\": \"SOC المجموعة\",\n" +
" \"CumulativeCharge\": \"طاقة الشحن التراكمية\",\n" +
" \"CumulativeDischarge\": \"التفريغ التراكمي\",\n" +
" \"zdz\": \"المقاومة الإيجابية للعزل\",\n" +
" \"fdz\": \"المقاومة السلبية للعزل\",\n" +
" \"rechargeCapacity\": \"طاقة الشحن المتاحة\",\n" +
" \"dischargeCapacity\": \"طاقة التفريغ المتاحة\",\n" +
" \"totalMaxVolData\": \"الضغط الإجمالي الأقصى للمجموعة\",\n" +
" \"stackCell\": \"رقم المجموعة\",\n" +
" \"totalMinVolData\": \"الضغط الإجمالي الأدنى للمجموعة\",\n" +
" \"stackNum\": \"رقم مجموعة البطاريات\",\n" +
" \"groupNum\": \"رقم حزمة البطارية\",\n" +
" \"cellLocation\": \"موضع الخلية\",\n" +
" \"historyData\": \"البيانات التاريخية\"\n" +
" },\n" +
" \"earning\": {\n" +
" \"changeDischargePro\": \"نظرة عامة على شحن وتفريغ المشروع\",\n" +
" \"capacity\": \"السعة المركبة\",\n" +
" \"monthTotalCharge\": \"إجمالي طاقة الشحن لهذا الشهر\",\n" +
" \"monthTotalDischarge\": \"إجمالي طاقة التفريغ لهذا الشهر\",\n" +
" \"monthEff\": \"كفاءة تحويل النظام الشهرية\",\n" +
" \"chargeVol\": \"الشحن التراكمي\",\n" +
" \"dischargeVol\": \"التفريغ التراكمي\",\n" +
" \"totalEff\": \"كفاءة تحويل النظام التراكمية\",\n" +
" \"projectRevenue\": \"حالة إيرادات المشروع\",\n" +
" \"monthTotalChargePrice\": \"إجمالي المبلغ لإجمالي حجم الشحن الشهري (يوان صيني)\",\n" +
" \"monthTotalDisChargePrice\": \"إجمالي المبلغ لإجمالي حجم التفريغ الشهري (يوان صيني)\",\n" +
" \"earnings\": \"الإيرادات (يوان صيني)\",\n" +
" \"earningsDetail\": \"تفاصيل الإيرادات\",\n" +
" \"charge\": \"الشحن\",\n" +
" \"ele\": \"الطاقة (كيلوواط ساعة)\",\n" +
" \"expend\": \"المصروفات (يوان صيني)\",\n" +
" \"noChargeData\": \"لا توجد بيانات شحن متاحة\",\n" +
" \"disCharge\": \"التفريغ\",\n" +
" \"noDisChargeData\": \"لا توجد بيانات تفريغ متاحة\",\n" +
" \"year\": \"سنة\",\n" +
" \"month\": \"شهر\",\n" +
" \"day\": \"يوم\",\n" +
" \"hour\": \"ساعة\",\n" +
" \"minute\": \"دقيقة\",\n" +
" \"second\": \"ثوان\"\n" +
" },\n" +
" \"alarm\": {\n" +
" \"sift\": \"تصفية\",\n" +
" \"device\": \"المعدات المخصصة\",\n" +
" \"placeSelect\": \"الرجاء تحديد\",\n" +
" \"event\": \"الأحداث\",\n" +
" \"level\": \"مستوى الإنذار\",\n" +
" \"timeRange\": \"النطاق الزمني\",\n" +
" \"placeholderDate\": \"يرجى تحديد النطاق الزمني\",\n" +
" \"reset\": \"إعادة تعيين\",\n" +
" \"sure\": \"تأكيد\",\n" +
" \"noData\": \"البيانات فارغة\",\n" +
" \"confirm\": \"مؤكد\",\n" +
" \"noConfirmed\": \"غير مؤكد\",\n" +
" \"alarmTypeList\": [\n" +
" {\n" +
" \"name\": \"تنبيهات في الوقت الفعلي\"\n" +
" },\n" +
" {\n" +
" \"name\": \"تنبيهات تاريخية\"\n" +
" }\n" +
" ],\n" +
" \"loadText\": {\n" +
" \"loadmore\": \"اسحب برفق\",\n" +
" \"loading\": \"محاولة التحميل\",\n" +
" \"nomore\": \"لا يوجد المزيد\"\n" +
" },\n" +
" \"allStation\": \"جميع محطات الطاقة\",\n" +
" \"alarm\": \"إنذار\",\n" +
" \"noDevice\": \"لا توجد بيانات معدات متاحة\",\n" +
" \"placeholderInput\": \"يرجى إدخال محتوى الإنذار\",\n" +
" \"status\": \"الحالة\",\n" +
" \"station\": \"محطة الطاقة التابعة\",\n" +
" \"alarmTime\": \"وقت الإنذار\",\n" +
" \"confirmer\": \"تم التأكيد بواسطة\",\n" +
" \"confirmTime\": \"وقت التأكيد\"\n" +
" },\n" +
" \"policy\": {\n" +
" \"planCurve\": \"منحنى الجدول الزمني\",\n" +
" \"planCurveTem\": \"قالب منحنى الجدول الزمني\",\n" +
" \"IssueDevice\": \"جهاز إصدار الأوامر\",\n" +
" \"operateOrNot\": \"سواء في التشغيل\",\n" +
" \"socUplimit\": \"الحد الأعلى لـ SOC\",\n" +
" \"socDownlimit\": \"الحد الأدنى لـ SOC\",\n" +
" \"effectiveTime\": \"وقت السريان\",\n" +
" \"selectEffectiveTime\": \"يرجى تحديد وقت السريان\",\n" +
" \"distributeResult\": \"نتيجة الإصدار\",\n" +
" \"notDelivered\": \"لم يتم الإصدار\",\n" +
" \"commandDistribution\": \"إصدار الأوامر\",\n" +
" \"controlDistribution\": \"إصدار التحكم\",\n" +
" \"genSetting\": \"الإعدادات العامة\",\n" +
" \"save\": \"حفظ\",\n" +
" \"pleaseInputValue\": \"يرجى إدخال القيمة\",\n" +
" \"pleaseInputPassword\": \"يرجى إدخال كلمة المرور\",\n" +
" \"password\": \"كلمة المرور\",\n" +
" \"policyTypeList\": [\n" +
" {\n" +
" \"name\": \"إصدار الأوامر\"\n" +
" },\n" +
" {\n" +
" \"name\": \"الإعدادات العامة\"\n" +
" }\n" +
" ],\n" +
" \"radioList\": [\n" +
" {\n" +
" \"name\": \"التشغيل\",\n" +
" \"disabled\": false\n" +
" },\n" +
" {\n" +
" \"name\": \"لا تشغيل\",\n" +
" \"disabled\": false\n" +
" }\n" +
" ],\n" +
" \"selectIssueDevice\": \"يرجى تحديد جهاز إصدار الأوامر\",\n" +
" \"deliverErrorNewTip\": \"خطأ في تكوين التعيين أو لم يتم التكوين، يرجى التحقق وإعادة المحاولة!\",\n" +
" \"passwordSuccess\": \"كلمة المرور صحيحة\",\n" +
" \"passwordError\": \"كلمة المرور خاطئة\",\n" +
" \"isOpen\": \"سواء تمكين\",\n" +
" \"isClose\": \"سواء تعطيل\",\n" +
" \"distributeSuccess\": \"نجح الإصدار\",\n" +
" \"distributeFail\": \"فشل الإصدار\",\n" +
" \"isNum\": \"يرجى التحقق من أن قيمة الإدخال رقمية\",\n" +
" \"saveSuccess\": \"نجح الحفظ\",\n" +
" \"saveError\": \"فشل الحفظ\",\n" +
" \"delivered\": \"تم الإصدار\",\n" +
" \"selectPlanCurveTem\": \"يرجى تحديد قالب منحنى الجدول الزمني\",\n" +
" \"deliverErrorTip\": \"تتجاوز طاقة الشحن والتفريغ الطاقة المقدرة، يرجى التحقق من إعدادات منحنى الجدول الزمني!\",\n" +
" \"deliverTip\": \"سواء تأكيد إصدار الأمر؟\"\n" +
" }\n" +
" }\n" +
"}";
public static String compressJson(String jsonString) throws Exception {
ObjectMapper mapper = new ObjectMapper();
Object obj = mapper.readValue(jsonString, Object.class);
return mapper.writeValueAsString(obj);
}
public static void main(String[] args) throws Exception {
System.out.println(compressJson(json));
}
}

View File

@ -5,7 +5,7 @@ import java.lang.annotation.*;
/**
*
* 切换为英文环境后,不支持配置操作
* 切换为其它语言环境后,不支持配置操作
* @author kerwin
*/
@Target(ElementType.METHOD)

View File

@ -734,14 +734,30 @@ public interface CommonConstant {
String MSG = "设备接入通道";
String MSG_EN = "Equipment access channel ";
String MSG_FRA = "Canal d'accès à l'équipement ";
String MSG_SPA = "Canal de acceso al dispositivo ";
String MSG_DE = "Gerätezugriffskanal ";
String MSG_PL = "Dostęp do urządzeń ";
String MSG_ARA = "جهاز الوصول إلى القناة ";
String SUCCESS = "恢复";
String SUCCESS_EN = "recover";
String SUCCESS_EN = "Recover";
String SUCCESS_FRA = "Récupération";
String SUCCESS_SPA = "Recuperar";
String SUCCESS_DE = "Wiederherstellung";
String SUCCESS_PL = "Przywrócić";
String SUCCESS_ARA = "استعاد";
String FAIL = "断开";
String FAIL_EN = " disconnect";
String FAIL_EN = "Disconnect";
String FAIL_FRA = "Déconnecter";
String FAIL_SPA = " Desconexión";
String FAIL_DE = " Trennen";
String FAIL_PL = " Odłącz";
String FAIL_ARA = " قطع الاتصال";
String SN_FAIL = "设备接入点离线";
@ -768,6 +784,11 @@ public interface CommonConstant {
String DEVICE_NO_SN = "设备没有配置SN";
String DEVICE_NO_SN_EN = "The device is not configured with SN";
String DEVICE_NO_SN_FRA = "L'appareil n'est pas configuré SN";
String DEVICE_NO_SN_SPA = "El dispositivo no está configurado con SN";
String DEVICE_NO_SN_DE = "Gerät ohne SN konfiguriert";
String DEVICE_NO_SN_PL = "Urządzenie nie ma skonfigurowanego SN";
String DEVICE_NO_SN_ARA = "الجهاز لم يتم تكوين SN";
String NOT_SN = "没有配置站内接入点";
String INTERVAL = "间隔";
String STATION = "电站";
@ -1003,8 +1024,56 @@ public interface CommonConstant {
String JOIN_STATION_ID = "\\_";
String REPORT_NAME="月度报表";
String REPORT_NAME_EN="monthly report";
String REPORT_NAME_EN="Monthly report";
String REPORT_NAME_FRA="Déclaration mensuelle";
String REPORT_NAME_SPA="Estado mensual";
String REPORT_NAME_DE="Monatlicher Bericht";
String REPORT_NAME_PL="Raport miesięczny";
String REPORT_NAME_ARA="تقرير شهري";
String BILL_NAME="月度账单";
String BILL_NAME_EN="monthly bill";
String BILL_NAME_EN="Monthly bill";
String BILL_NAME_FRA="Facturation mensuelle";
String BILL_NAME_SPA="Factura mensual";
String BILL_NAME_DE="Monatliche Rechnung";
String BILL_NAME_PL="Rachunki miesięczne";
String BILL_NAME_ARA="فاتورة شهرية";
// 语言切换
String LANG = "lang";
// 调用api 需要用到的参数
interface lang{
// 中文
String ZH = "zh";
// 英语
String EN = "en";
// 法语
String FRA = "fra";
// 西班牙
String SPA = "spa";
// 德语
String DE = "de";
// 波兰
String PL = "pl";
// 阿拉伯语
String ARA = "ara";
}
// web / app 端切换语言用到的参数
interface langTemp{
// 简体中文
String ZH_CN="zh_CN";
// 美式英语
String EN_US="en_US";
// 法语
String FR_FR="fr_FR";
// 西班牙语
String ES_ES="es_ES";
// 德语
String DE_DE="de_DE";
// 波兰语
String PL_PL="pl_PL";
// 阿拉伯语
String AR_EG="ar_EG";
}
}

View File

@ -27,10 +27,20 @@ public interface DefineConstant {
String SUMMARY = "汇总";
String SUMMARY_EN = "Summary";
String SUMMARY_FRA = "résumé";
String SUMMARY_SPA = "Resumen";
String SUMMARY_DE = "Zusammenfassung";
String SUMMARY_PL = "Podsumowanie";
String SUMMARY_ARA = "ملخص";
String SUMMARY_DATA_STATION = "电站汇总数据";
String SUMMARY_DATA_STATION_EN = "Summary data of power station";
String SUMMARY_DATA_STATION_FRA = "Données sommaires de la station";
String SUMMARY_DATA_STATION_SPA = "Datos agregados de la central eléctrica";
String SUMMARY_DATA_STATION_DE = "Kraftwerksdaten zusammengefasst";
String SUMMARY_DATA_STATION_PL = "Podsumowanie danych elektrowni";
String SUMMARY_DATA_STATION_ARA = "محطة توليد الكهرباء بيانات موجزة";
interface PeakShaving {
String ADD_TEMPLATE_SUCCESS = "新增计划曲线模板成功";
@ -82,11 +92,21 @@ public interface DefineConstant {
String ANTI_BACKFLOW_METER = "防逆流表";
String TOTAL_ACTIVE_POWER = "总有功功率";
String BUILDING = "(在建)";
String BUILDING_EN = "(Under construction)";
String BUILDING_FRA = "(En construction)";
String BUILDING_SPA = "(En construcción)";
String BUILDING_DE = "(Im Bau)";
String BUILDING_PL = "(W budowie)";
String BUILDING_ARA = "(تحت الإنشاء)";
String BUILDING_EN = "(under construction)";
String PROPOSED = "(拟建)";
String PROPOSED_EN = "(proposed)";
String PROPOSED_EN = "(Proposed)";
String PROPOSED_FRA = "(Proposé)";
String PROPOSED_SPA = "(Propuesta)";
String PROPOSED_DE = "(Erstellbar)";
String PROPOSED_PL = "(Proponowane)";
String PROPOSED_ARA = "(مقترح)";
}
interface PlanningPolicy{
@ -108,7 +128,13 @@ public interface DefineConstant {
interface PointDemo{
String TIME = "时间";
String TIME_EN = "time";
String TIME_EN = "Time";
String TIME_FRA = "Données";
String TIME_SPA = "Datos";
String TIME_DE = "Daten";
String TIME_PL = "Dane";
String TIME_ARA = "داتا";
}
interface DeviceTypeCol{

View File

@ -221,10 +221,7 @@ public interface RedisKeyConstant {
String LOGIN_TYPE_ACCOUNT = "account";
//登陆方式 phone 手机号
String LOGIN_TYPE_PHONE = "phone";
// 语言切换
String LANG="lang";
String EN_US="en_US";
}
//设备相关

View File

@ -47,4 +47,7 @@ public class SimpleUser implements Serializable {
//工作流租户id
String tenantId;
@ApiModelProperty(value = "多语言切换-查询字段")
private String lang;
}

View File

@ -9,6 +9,10 @@ import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.*;
import java.util.Random;
import java.util.concurrent.ThreadLocalRandom;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* @author kerwin
@ -19,13 +23,17 @@ import java.net.*;
@Slf4j
public class AbroadAddressUtils {
static String apiKey = "AIzaSyAM4JOtE9yt48f60ATwByB7uWzTIrYSSUg";
static String APIKEY = "AIzaSyAM4JOtE9yt48f60ATwByB7uWzTIrYSSUg";
// 正则表达式-中文字符
static String PATTERN1 = "[\u4e00-\u9fff]";
// 正则表达式-数字
static String PATTERN2 = "\\d";
public static MyAddress getAddress(String lat, String lng){
// 构建API请求URL
String urlString = "https://maps.googleapis.com/maps/api/geocode/json?" +
"latlng=" + lat + "," + lng +
"&key=" + apiKey;
"&language=zh-CN&key=" + APIKEY;
// 发送HTTP请求
URL url = null;
StringBuilder response = new StringBuilder();
@ -57,8 +65,6 @@ public class AbroadAddressUtils {
} catch (IOException e) {
throw new RuntimeException(e);
}
// 解析JSON响应
return parseGeocodeResponse(response.toString());
}
@ -72,14 +78,20 @@ public class AbroadAddressUtils {
}
MyAddress address = new MyAddress();
// 获取第一个结果(最精确的匹配)
JSONObject firstResult = json.getJSONArray("results").getJSONObject(0);
JSONArray results = json.getJSONArray("results");
for (int j = 0; j < results.length(); j++){
JSONObject result = json.getJSONArray("results").getJSONObject(j);
// 解析地址组件
JSONArray components = firstResult.getJSONArray("address_components");
JSONArray components = result.getJSONArray("address_components");
for (int i = 0; i < components.length(); i++) {
JSONObject component = components.getJSONObject(i);
JSONArray types = component.getJSONArray("types");
String longName = component.getString("long_name");
Pattern p1 = Pattern.compile(PATTERN1);
Pattern p2 = Pattern.compile(PATTERN2);
Matcher m1 = p1.matcher(longName);
Matcher m2 = p2.matcher(longName);
if(m1.find() || m2.find()){
// 国家信息
if (types.toString().contains("country")) {
address.setNation(longName);
@ -101,13 +113,15 @@ public class AbroadAddressUtils {
address.setCityCode(longName);
}
}
}
}
return address;
}
public static void main(String[] args) {
// 示例坐标 - 纽约
String latitude = "48.877132";
String longitude = "2.356407";
String latitude = "49.102024";
String longitude = "31.136961";
try {
// 获取地址信息

View File

@ -21,10 +21,10 @@ public class TranslateUtils {
// 静态翻译方法:输入待翻译文本,返回目标语言文本
public static String translate(String text) {
public static String translate(String text,String lang) {
MediaType mediaType = MediaType.parse("application/json");
// 动态构建请求体(支持任意文本)
String jsonBody = String.format("{\"from\":\"zh\",\"to\":\"en\",\"q\":\"%s\"}", text);
String jsonBody = String.format("{\"from\":\"zh\",\"to\":\""+lang+"\",\"q\":\"%s\"}", text);
RequestBody body = RequestBody.create(mediaType, jsonBody);
Request request = null;
@ -63,7 +63,7 @@ public class TranslateUtils {
// 示例调用
public static void main(String[] args) throws IOException {
String translated = translate("PCS环境过温降额[恢复]");
String translated = translate("电站汇总数据","fra");
System.out.println("翻译结果: " + translated); // 输出: active power
}

View File

@ -4,6 +4,7 @@ import com.ho.business.constant.DeviceTypeConstant;
import com.ho.business.entity.Device;
import com.ho.business.entity.DeviceCall;
import com.ho.business.entity.Topology;
import com.ho.business.entity.TranslateName;
import com.ho.business.service.DeviceCallService;
import com.ho.business.service.DeviceService;
import com.ho.business.service.DynamicConfigService;
@ -96,7 +97,13 @@ public class DeviceDataCollectServiceImpl implements DataCollectService {
deviceCall.setStationId(stationId);
deviceCall.setSrcId(topology.getId());
deviceCall.setDeviceName(topology.getName());
deviceCall.setDeviceNameEn(dynamicConfigService.getNameEn(topology.getName()));
TranslateName translate = dynamicConfigService.getNameLanguage(topology.getName());
deviceCall.setDeviceNameEn(translate.getNameEn());
deviceCall.setDeviceNameFra(translate.getNameFra());
deviceCall.setDeviceNameSpa(translate.getNameSpa());
deviceCall.setDeviceNameDe(translate.getNameDe());
deviceCall.setDeviceNamePl(translate.getNamePl());
deviceCall.setDeviceNameAra(translate.getNameAra());
deviceCall.setPid(topology.getPid());
deviceCall.setCategory(topology.getCategory());
deviceCall.setCreateTime(new Date());
@ -116,7 +123,13 @@ public class DeviceDataCollectServiceImpl implements DataCollectService {
deviceCall.setStationId(stationId);
deviceCall.setSrcId(CommonConstant.ZERO);
deviceCall.setDeviceName(CommonConstant.ACCESSPOINT);
deviceCall.setDeviceNameEn(dynamicConfigService.getNameEn(CommonConstant.ACCESSPOINT));
TranslateName translate = dynamicConfigService.getNameLanguage(CommonConstant.ACCESSPOINT);
deviceCall.setDeviceNameEn(translate.getNameEn());
deviceCall.setDeviceNameFra(translate.getNameFra());
deviceCall.setDeviceNameSpa(translate.getNameSpa());
deviceCall.setDeviceNameDe(translate.getNameDe());
deviceCall.setDeviceNamePl(translate.getNamePl());
deviceCall.setDeviceNameAra(translate.getNameAra());
deviceCall.setDeviceType(DeviceTypeConstant.ACCESSPOINT);
deviceCall.setPid(pid);
deviceCall.setCreateTime(new Date());

View File

@ -59,6 +59,7 @@ public class FileController {
@Autowired
AnotherFileService anotherFileService;
@PostMapping("filePage")
@ApiOperation(value = "分页查询文件")
public DataResult<PageResult<MediaFile>> filePage(@RequestBody FilePageVO vo, HttpServletRequest request) {
@ -148,7 +149,7 @@ public class FileController {
@PostMapping("readFileAttribute")
@ApiOperation(value = "读取文件属性")
public DataResult<FileAttributeResp> readFileAttribute(@RequestBody FileAttributeReqVO vo, HttpServletRequest request) {
String lang = request.getHeader(RedisKeyConstant.User.LANG);
String lang = request.getHeader(CommonConstant.LANG);
FileAttributeResp fileAttributeResp = null;
String msg = CommonConstant.Heartbeat.MSG + vo.getSerialNo();
if (fileService.checkHeartbeat(vo.getSerialNo())) {
@ -157,20 +158,34 @@ public class FileController {
fileAttributeResp.setMsg(msg + CommonConstant.Heartbeat.FAIL);
fileAttributeResp.setResponse(CommonConstant.NEGATIV_ONE);
fileAttributeResp.setList(new ArrayList<>());
if(RedisKeyConstant.User.EN_US.equals(lang)){
fileAttributeResp.setMsg(TranslateUtils.translate(fileAttributeResp.getMsg()));
if(CommonConstant.langTemp.EN_US.equals(lang)){
fileAttributeResp.setMsg(TranslateUtils.translate(fileAttributeResp.getMsg(),CommonConstant.lang.EN));
}else if (CommonConstant.langTemp.FR_FR.equals(lang)){
fileAttributeResp.setMsg(TranslateUtils.translate(fileAttributeResp.getMsg(),CommonConstant.lang.FRA));
}else if (CommonConstant.langTemp.ES_ES.equals(lang)){
fileAttributeResp.setMsg(TranslateUtils.translate(fileAttributeResp.getMsg(),CommonConstant.lang.SPA));
}else if (CommonConstant.langTemp.DE_DE.equals(lang)){
fileAttributeResp.setMsg(TranslateUtils.translate(fileAttributeResp.getMsg(),CommonConstant.lang.DE));
}else if (CommonConstant.langTemp.PL_PL.equals(lang)){
fileAttributeResp.setMsg(TranslateUtils.translate(fileAttributeResp.getMsg(),CommonConstant.lang.PL));
}else if (CommonConstant.langTemp.AR_EG.equals(lang)){
fileAttributeResp.setMsg(TranslateUtils.translate(fileAttributeResp.getMsg(),CommonConstant.lang.ARA));
}
return DataResult.success(fileAttributeResp);
}
// String serialNo = vo.getSerialNo();
// List<String> snList = MqttConfigUtil.getSnList();
// if(snList.stream().anyMatch(s -> s.contains(serialNo))){
fileAttributeResp = fileService.getFileAttribute(vo);
// }else{
// fileAttributeResp = anotherFileService.getFileAttribute(vo);
// }
if(RedisKeyConstant.User.EN_US.equals(lang)){
fileAttributeResp.setMsg(TranslateUtils.translate(fileAttributeResp.getMsg()));
if(CommonConstant.langTemp.EN_US.equals(lang)){
fileAttributeResp.setMsg(TranslateUtils.translate(fileAttributeResp.getMsg(),CommonConstant.lang.EN));
}else if (CommonConstant.langTemp.FR_FR.equals(lang)){
fileAttributeResp.setMsg(TranslateUtils.translate(fileAttributeResp.getMsg(),CommonConstant.lang.FRA));
}else if (CommonConstant.langTemp.ES_ES.equals(lang)){
fileAttributeResp.setMsg(TranslateUtils.translate(fileAttributeResp.getMsg(),CommonConstant.lang.SPA));
}else if (CommonConstant.langTemp.DE_DE.equals(lang)){
fileAttributeResp.setMsg(TranslateUtils.translate(fileAttributeResp.getMsg(),CommonConstant.lang.DE));
}else if (CommonConstant.langTemp.PL_PL.equals(lang)){
fileAttributeResp.setMsg(TranslateUtils.translate(fileAttributeResp.getMsg(),CommonConstant.lang.PL));
}else if (CommonConstant.langTemp.AR_EG.equals(lang)){
fileAttributeResp.setMsg(TranslateUtils.translate(fileAttributeResp.getMsg(),CommonConstant.lang.ARA));
}
return DataResult.success(fileAttributeResp);
}
@ -179,20 +194,43 @@ public class FileController {
@ApiOperation(value = "删除文件(删除边端文件)")
@LogAnnotation(title = "文件服务", action = "删除文件(删除边端文件)")
public DataResult<FileDeleteResp> deleteDeviceFiles(@RequestBody FileForDeviceReqVO fileDeleteReqVO, HttpServletRequest request) {
String lang = request.getHeader(RedisKeyConstant.User.LANG);
String lang = request.getHeader(CommonConstant.LANG);
FileDeleteResp fileDeleteResp = null;
String msg = CommonConstant.Heartbeat.MSG + fileDeleteReqVO.getSerialNo();
if (fileService.checkHeartbeat(fileDeleteReqVO.getSerialNo())) {
fileDeleteResp = new FileDeleteResp();
fileDeleteResp.setDeleteStatus(CommonConstant.TWO);
fileDeleteResp.setMsg(msg + CommonConstant.Heartbeat.FAIL);
if(CommonConstant.langTemp.EN_US.equals(lang)){
fileDeleteResp.setMsg(TranslateUtils.translate(fileDeleteResp.getMsg(),CommonConstant.lang.EN));
}else if (CommonConstant.langTemp.FR_FR.equals(lang)){
fileDeleteResp.setMsg(TranslateUtils.translate(fileDeleteResp.getMsg(),CommonConstant.lang.FRA));
}else if (CommonConstant.langTemp.ES_ES.equals(lang)){
fileDeleteResp.setMsg(TranslateUtils.translate(fileDeleteResp.getMsg(),CommonConstant.lang.SPA));
}else if (CommonConstant.langTemp.DE_DE.equals(lang)){
fileDeleteResp.setMsg(TranslateUtils.translate(fileDeleteResp.getMsg(),CommonConstant.lang.DE));
}else if (CommonConstant.langTemp.PL_PL.equals(lang)){
fileDeleteResp.setMsg(TranslateUtils.translate(fileDeleteResp.getMsg(),CommonConstant.lang.PL));
}else if (CommonConstant.langTemp.AR_EG.equals(lang)){
fileDeleteResp.setMsg(TranslateUtils.translate(fileDeleteResp.getMsg(),CommonConstant.lang.ARA));
}
return DataResult.success(fileDeleteResp);
}
fileDeleteResp = fileService.deleteDeviceFiles(fileDeleteReqVO);
if(RedisKeyConstant.User.EN_US.equals(lang)){
fileDeleteResp.setMsg(TranslateUtils.translate(fileDeleteResp.getMsg()));
if(CommonConstant.langTemp.EN_US.equals(lang)){
fileDeleteResp.setMsg(TranslateUtils.translate(fileDeleteResp.getMsg(),CommonConstant.lang.EN));
}else if (CommonConstant.langTemp.FR_FR.equals(lang)){
fileDeleteResp.setMsg(TranslateUtils.translate(fileDeleteResp.getMsg(),CommonConstant.lang.FRA));
}else if (CommonConstant.langTemp.ES_ES.equals(lang)){
fileDeleteResp.setMsg(TranslateUtils.translate(fileDeleteResp.getMsg(),CommonConstant.lang.SPA));
}else if (CommonConstant.langTemp.DE_DE.equals(lang)){
fileDeleteResp.setMsg(TranslateUtils.translate(fileDeleteResp.getMsg(),CommonConstant.lang.DE));
}else if (CommonConstant.langTemp.PL_PL.equals(lang)){
fileDeleteResp.setMsg(TranslateUtils.translate(fileDeleteResp.getMsg(),CommonConstant.lang.PL));
}else if (CommonConstant.langTemp.AR_EG.equals(lang)){
fileDeleteResp.setMsg(TranslateUtils.translate(fileDeleteResp.getMsg(),CommonConstant.lang.ARA));
}
return DataResult.success(fileDeleteResp);
}
@ -202,7 +240,7 @@ public class FileController {
//@HzPermission(value = PermissionConstant.REMOTECONTROL_FILE_UPLOAD)
@LogAnnotation(title = "文件服务", action = "文件上传(向边端上传)")
public DataResult<HeartbeatResp> fileUploadForDevice(HttpServletRequest request,@RequestPart("file") MultipartFile file, @RequestParam("stationId") Integer stationId, @RequestParam("serialNo") String serialNo, @RequestParam("filePath") String filePath) {
String lang = request.getHeader(RedisKeyConstant.User.LANG);
String lang = request.getHeader(CommonConstant.LANG);
HeartbeatResp resp = fileService.checkHeartAndFileUsing(stationId, serialNo);
if (null == resp) {
resp = new HeartbeatResp();
@ -210,24 +248,38 @@ public class FileController {
if (file.isEmpty()) {
resp.setHeartbeatStatus(CommonConstant.ZERO);
resp.setMsg(BaseResponseCode.FILE_IS_EMPTY.getMsg());
if(CommonConstant.langTemp.EN_US.equals(lang)){
resp.setMsg(TranslateUtils.translate(resp.getMsg(),CommonConstant.lang.EN));
}else if (CommonConstant.langTemp.FR_FR.equals(lang)){
resp.setMsg(TranslateUtils.translate(resp.getMsg(),CommonConstant.lang.FRA));
}else if (CommonConstant.langTemp.ES_ES.equals(lang)){
resp.setMsg(TranslateUtils.translate(resp.getMsg(),CommonConstant.lang.SPA));
}else if (CommonConstant.langTemp.DE_DE.equals(lang)){
resp.setMsg(TranslateUtils.translate(resp.getMsg(),CommonConstant.lang.DE));
}else if (CommonConstant.langTemp.PL_PL.equals(lang)){
resp.setMsg(TranslateUtils.translate(resp.getMsg(),CommonConstant.lang.PL));
}else if (CommonConstant.langTemp.AR_EG.equals(lang)){
resp.setMsg(TranslateUtils.translate(resp.getMsg(),CommonConstant.lang.ARA));
}
return DataResult.success(resp);
}
// long fileSize = file.getSize();
// if (5 * 1024 * 1024 < fileSize) {
// throw new BusinessException(BaseResponseCode.FILE_IS_EXCEED_5M);
// }
resp.setMsg(CommonConstant.Heartbeat.MSG + serialNo + CommonConstant.Heartbeat.SUCCESS);
resp.setHeartbeatStatus(CommonConstant.ONE);
log.info("文件上传(向边端上传)开始上传");
// List<String> snList = MqttConfigUtil.getSnList();
// if(snList.stream().anyMatch(s -> s.contains(serialNo))){
fileService.fileUploadForDevice(file, stationId, serialNo, filePath);
// }else{
// anotherFileService.fileUploadForDevice(file, stationId, serialNo, filePath);
// }
}
if(RedisKeyConstant.User.EN_US.equals(lang)){
resp.setMsg(TranslateUtils.translate(resp.getMsg()));
if(CommonConstant.langTemp.EN_US.equals(lang)){
resp.setMsg(TranslateUtils.translate(resp.getMsg(),CommonConstant.lang.EN));
}else if (CommonConstant.langTemp.FR_FR.equals(lang)){
resp.setMsg(TranslateUtils.translate(resp.getMsg(),CommonConstant.lang.FRA));
}else if (CommonConstant.langTemp.ES_ES.equals(lang)){
resp.setMsg(TranslateUtils.translate(resp.getMsg(),CommonConstant.lang.SPA));
}else if (CommonConstant.langTemp.DE_DE.equals(lang)){
resp.setMsg(TranslateUtils.translate(resp.getMsg(),CommonConstant.lang.DE));
}else if (CommonConstant.langTemp.PL_PL.equals(lang)){
resp.setMsg(TranslateUtils.translate(resp.getMsg(),CommonConstant.lang.PL));
}else if (CommonConstant.langTemp.AR_EG.equals(lang)){
resp.setMsg(TranslateUtils.translate(resp.getMsg(),CommonConstant.lang.ARA));
}
return DataResult.success(resp);
}
@ -238,13 +290,7 @@ public class FileController {
@LogAnnotation(title = "文件服务", action = "文件下载")
public DataResult<HeartbeatResp> downloadFromDevice(@RequestBody FileForDeviceReqVO fileForDeviceReqVO,HttpServletRequest request) {
//todo 测试模拟返回成功
/*if(true){
HeartbeatResp heart = new HeartbeatResp();
heart.setHeartbeatStatus(1);
return DataResult.success(heart);
}*/
String lang = request.getHeader(RedisKeyConstant.User.LANG);
String lang = request.getHeader(CommonConstant.LANG);
HeartbeatResp resp = fileService.checkHeartAndFileUsing(fileForDeviceReqVO.getStationId(), fileForDeviceReqVO.getSerialNo());
if (null == resp) {
resp = new HeartbeatResp();
@ -252,16 +298,20 @@ public class FileController {
resp.setHeartbeatStatus(CommonConstant.ONE);
log.info("文件下载(从边端下载到云端)开始下载");
fileService.downloadFromDevice(fileForDeviceReqVO);
// String serialNo = fileForDeviceReqVO.getSerialNo();
// List<String> snList = MqttConfigUtil.getSnList();
// if(snList.stream().anyMatch(s -> s.contains(serialNo))){
fileService.downloadFromDevice(fileForDeviceReqVO);
// }else{
// anotherFileService.downloadFromDevice(fileForDeviceReqVO);
// }
}
if(RedisKeyConstant.User.EN_US.equals(lang)){
resp.setMsg(TranslateUtils.translate(resp.getMsg()));
if(CommonConstant.langTemp.EN_US.equals(lang)){
resp.setMsg(TranslateUtils.translate(resp.getMsg(),CommonConstant.lang.EN));
}else if (CommonConstant.langTemp.FR_FR.equals(lang)){
resp.setMsg(TranslateUtils.translate(resp.getMsg(),CommonConstant.lang.FRA));
}else if (CommonConstant.langTemp.ES_ES.equals(lang)){
resp.setMsg(TranslateUtils.translate(resp.getMsg(),CommonConstant.lang.SPA));
}else if (CommonConstant.langTemp.DE_DE.equals(lang)){
resp.setMsg(TranslateUtils.translate(resp.getMsg(),CommonConstant.lang.DE));
}else if (CommonConstant.langTemp.PL_PL.equals(lang)){
resp.setMsg(TranslateUtils.translate(resp.getMsg(),CommonConstant.lang.PL));
}else if (CommonConstant.langTemp.AR_EG.equals(lang)){
resp.setMsg(TranslateUtils.translate(resp.getMsg(),CommonConstant.lang.ARA));
}
return DataResult.success(resp);
}
@ -270,16 +320,20 @@ public class FileController {
@ApiOperation(value = "文件下载进度(从边端下载到浏览器)")
public DataResult<FileProcessRespVO> downloadProgressBar(@RequestBody FileProcessReqVO vo, HttpServletResponse response,HttpServletRequest request) {
//todo 测试模拟返回成功
/*if(true){
FileProcessRespVO file =new FileProcessRespVO();
file.setFileProcess(100);
file.setFileStatus(1);
return DataResult.success(file);
}*/
String lang = request.getHeader(RedisKeyConstant.User.LANG);
String lang = request.getHeader(CommonConstant.LANG);
FileProcessRespVO fileProcessRespVO = fileService.getDownloadProgress(vo);
if(RedisKeyConstant.User.EN_US.equals(lang)){
fileProcessRespVO.setMsg(TranslateUtils.translate(fileProcessRespVO.getMsg()));
if(CommonConstant.langTemp.EN_US.equals(lang)){
fileProcessRespVO.setMsg(TranslateUtils.translate(fileProcessRespVO.getMsg(),CommonConstant.lang.EN));
}else if (CommonConstant.langTemp.FR_FR.equals(lang)){
fileProcessRespVO.setMsg(TranslateUtils.translate(fileProcessRespVO.getMsg(),CommonConstant.lang.FRA));
}else if (CommonConstant.langTemp.ES_ES.equals(lang)){
fileProcessRespVO.setMsg(TranslateUtils.translate(fileProcessRespVO.getMsg(),CommonConstant.lang.SPA));
}else if (CommonConstant.langTemp.DE_DE.equals(lang)){
fileProcessRespVO.setMsg(TranslateUtils.translate(fileProcessRespVO.getMsg(),CommonConstant.lang.DE));
}else if (CommonConstant.langTemp.PL_PL.equals(lang)){
fileProcessRespVO.setMsg(TranslateUtils.translate(fileProcessRespVO.getMsg(),CommonConstant.lang.PL));
}else if (CommonConstant.langTemp.AR_EG.equals(lang)){
fileProcessRespVO.setMsg(TranslateUtils.translate(fileProcessRespVO.getMsg(),CommonConstant.lang.ARA));
}
return DataResult.success(fileProcessRespVO);
}

View File

@ -48,7 +48,7 @@ public class HeartbeatCheckController {
@PostMapping("getHeartbeat")
@ApiOperation(value = "心跳检测")
public DataResult<HeartbeatResp> getHeartbeat(@RequestBody HeartbeatReq vo, HttpServletRequest request) {
String lang = request.getHeader(RedisKeyConstant.User.LANG);
String lang = request.getHeader(CommonConstant.LANG);
HeartbeatResp heartbeatResp = new HeartbeatResp();
//检测心跳
DeviceReqVO deviceReqVO = new DeviceReqVO();
@ -59,16 +59,36 @@ public class HeartbeatCheckController {
log.info("getHeartbeat 当前设备没有配置SN");
heartbeatResp.setHeartbeatStatus(CommonConstant.ZERO);
heartbeatResp.setMsg(CommonConstant.DEVICE_NO_SN);
if(RedisKeyConstant.User.EN_US.equals(lang)){
if(CommonConstant.langTemp.EN_US.equals(lang)){
heartbeatResp.setMsg(CommonConstant.DEVICE_NO_SN_EN);
}else if(CommonConstant.langTemp.FR_FR.equals(lang)){
heartbeatResp.setMsg(CommonConstant.DEVICE_NO_SN_FRA);
}else if(CommonConstant.langTemp.ES_ES.equals(lang)){
heartbeatResp.setMsg(CommonConstant.DEVICE_NO_SN_SPA);
}else if(CommonConstant.langTemp.DE_DE.equals(lang)){
heartbeatResp.setMsg(CommonConstant.DEVICE_NO_SN_DE);
}else if(CommonConstant.langTemp.PL_PL.equals(lang)){
heartbeatResp.setMsg(CommonConstant.DEVICE_NO_SN_PL);
}else if(CommonConstant.langTemp.AR_EG.equals(lang)){
heartbeatResp.setMsg(CommonConstant.DEVICE_NO_SN_ARA);
}
return DataResult.success(heartbeatResp);
}
String sn = deviceList.get(0).getSerialNo();
String heartbeatKey = RedisKeyConstant.HEARTBEAT + sn;
String msg = CommonConstant.Heartbeat.MSG + sn;
if(RedisKeyConstant.User.EN_US.equals(lang)){
if(CommonConstant.langTemp.EN_US.equals(lang)){
msg = CommonConstant.Heartbeat.MSG_EN + sn;
}else if(CommonConstant.langTemp.FR_FR.equals(lang)){
msg = CommonConstant.Heartbeat.MSG_FRA + sn;
}else if(CommonConstant.langTemp.ES_ES.equals(lang)){
msg = CommonConstant.Heartbeat.MSG_SPA + sn;
}else if(CommonConstant.langTemp.DE_DE.equals(lang)){
msg = CommonConstant.Heartbeat.MSG_DE + sn;
}else if(CommonConstant.langTemp.PL_PL.equals(lang)){
msg = CommonConstant.Heartbeat.MSG_PL + sn;
}else if(CommonConstant.langTemp.AR_EG.equals(lang)){
msg = CommonConstant.Heartbeat.MSG_ARA + sn;
}
if (redisService.hasKey(heartbeatKey)) {
@ -79,15 +99,35 @@ public class HeartbeatCheckController {
if (between >= 5) {
heartbeatResp.setHeartbeatStatus(CommonConstant.ZERO);
heartbeatResp.setMsg(msg + CommonConstant.Heartbeat.FAIL);
if(RedisKeyConstant.User.EN_US.equals(lang)){
if(CommonConstant.langTemp.EN_US.equals(lang)){
heartbeatResp.setMsg(msg + CommonConstant.Heartbeat.FAIL_EN);
}else if(CommonConstant.langTemp.FR_FR.equals(lang)){
heartbeatResp.setMsg(msg + CommonConstant.Heartbeat.FAIL_FRA);
}else if(CommonConstant.langTemp.ES_ES.equals(lang)){
heartbeatResp.setMsg(msg + CommonConstant.Heartbeat.FAIL_SPA);
}else if(CommonConstant.langTemp.DE_DE.equals(lang)){
heartbeatResp.setMsg(msg + CommonConstant.Heartbeat.FAIL_DE);
}else if(CommonConstant.langTemp.PL_PL.equals(lang)){
heartbeatResp.setMsg(msg + CommonConstant.Heartbeat.FAIL_PL);
}else if(CommonConstant.langTemp.AR_EG.equals(lang)){
heartbeatResp.setMsg(msg + CommonConstant.Heartbeat.FAIL_ARA);
}
log.info("getHeartbeat 超过5分钟没有检测到心跳{}", between);
return DataResult.success(heartbeatResp);
}
heartbeatResp.setMsg(msg + CommonConstant.Heartbeat.SUCCESS);
if(RedisKeyConstant.User.EN_US.equals(lang)){
if(CommonConstant.langTemp.EN_US.equals(lang)){
heartbeatResp.setMsg(msg + CommonConstant.Heartbeat.SUCCESS_EN);
}else if(CommonConstant.langTemp.FR_FR.equals(lang)){
heartbeatResp.setMsg(msg + CommonConstant.Heartbeat.SUCCESS_FRA);
}else if(CommonConstant.langTemp.ES_ES.equals(lang)){
heartbeatResp.setMsg(msg + CommonConstant.Heartbeat.SUCCESS_SPA);
}else if(CommonConstant.langTemp.DE_DE.equals(lang)){
heartbeatResp.setMsg(msg + CommonConstant.Heartbeat.SUCCESS_DE);
}else if(CommonConstant.langTemp.PL_PL.equals(lang)){
heartbeatResp.setMsg(msg + CommonConstant.Heartbeat.SUCCESS_PL);
}else if(CommonConstant.langTemp.AR_EG.equals(lang)){
heartbeatResp.setMsg(msg + CommonConstant.Heartbeat.SUCCESS_ARA);
}
heartbeatResp.setHeartbeatStatus(CommonConstant.ONE);
return DataResult.success(heartbeatResp);
@ -95,8 +135,18 @@ public class HeartbeatCheckController {
log.info("getHeartbeat 没有检测到心跳{}", heartbeatKey);
heartbeatResp.setHeartbeatStatus(CommonConstant.ZERO);
heartbeatResp.setMsg(msg + CommonConstant.Heartbeat.FAIL);
if(RedisKeyConstant.User.EN_US.equals(lang)){
if(CommonConstant.langTemp.EN_US.equals(lang)){
heartbeatResp.setMsg(msg + CommonConstant.Heartbeat.FAIL_EN);
}else if(CommonConstant.langTemp.FR_FR.equals(lang)){
heartbeatResp.setMsg(msg + CommonConstant.Heartbeat.FAIL_FRA);
}else if(CommonConstant.langTemp.ES_ES.equals(lang)){
heartbeatResp.setMsg(msg + CommonConstant.Heartbeat.FAIL_SPA);
}else if(CommonConstant.langTemp.DE_DE.equals(lang)){
heartbeatResp.setMsg(msg + CommonConstant.Heartbeat.FAIL_DE);
}else if(CommonConstant.langTemp.PL_PL.equals(lang)){
heartbeatResp.setMsg(msg + CommonConstant.Heartbeat.FAIL_PL);
}else if(CommonConstant.langTemp.AR_EG.equals(lang)){
heartbeatResp.setMsg(msg + CommonConstant.Heartbeat.FAIL_ARA);
}
return DataResult.success(heartbeatResp);
}

View File

@ -79,11 +79,11 @@ public class OrderSendController {
// String userName = userDetailRespVO.getUsername();
// String userNameKey = redisService.getUserNameKey(userDetailRespVO, userName);
// SimpleUser user = (SimpleUser) redisService.get(userNameKey);
String lang = request.getHeader(RedisKeyConstant.User.LANG);
String lang = request.getHeader(CommonConstant.LANG);
DataResult result = getDataResult(vo);
if(RedisKeyConstant.User.EN_US.equals(lang)){
if(CommonConstant.langTemp.EN_US.equals(lang)){
HeartbeatResp heartbeatResp= (HeartbeatResp)result.getData();
heartbeatResp.setMsg(TranslateUtils.translate(heartbeatResp.getMsg()));
heartbeatResp.setMsg(TranslateUtils.translate(heartbeatResp.getMsg(),CommonConstant.lang.EN));
}
return result;
}
@ -236,7 +236,7 @@ public class OrderSendController {
@ApiOperation(value = "指令下发进度")
@TokenIgnore
public DataResult<OrderProcessResp> progressBar(@RequestBody OrderProgressReqVO vo, HttpServletRequest request) {
String lang = request.getHeader(RedisKeyConstant.User.LANG);
String lang = request.getHeader(CommonConstant.LANG);
String key = vo.getStationId() + ":" + vo.getSrcId();
log.info("指令下发进度 key:{}", key);
OrderProcessResp orderProcessResp = new OrderProcessResp();
@ -289,8 +289,8 @@ public class OrderSendController {
}
}
orderProcessResp.setProcessList(processDetailRespList);
if(RedisKeyConstant.User.EN_US.equals(lang)){
orderProcessResp.setMsg(TranslateUtils.translate(orderProcessResp.getMsg()));
if(CommonConstant.langTemp.EN_US.equals(lang)){
orderProcessResp.setMsg(TranslateUtils.translate(orderProcessResp.getMsg(),CommonConstant.lang.EN));
}
return DataResult.success(orderProcessResp);
}
@ -339,10 +339,10 @@ public class OrderSendController {
// @LogAnnotation(title = "命令下发曲线", action = "命令下发曲线")
@TokenIgnore
public DataResult<HeartbeatResp> sendPlanPowerOrder(@RequestBody OrderPlanPowerReq vo, HttpServletRequest request) {
String lang = request.getHeader(RedisKeyConstant.User.LANG);
String lang = request.getHeader(CommonConstant.LANG);
HeartbeatResp heartbeatResp = orderSendService.sendPlanPowerOrder(vo);
if(RedisKeyConstant.User.EN_US.equals(lang)){
heartbeatResp.setMsg(TranslateUtils.translate(heartbeatResp.getMsg()));
if(CommonConstant.langTemp.EN_US.equals(lang)){
heartbeatResp.setMsg(TranslateUtils.translate(heartbeatResp.getMsg(),CommonConstant.lang.EN));
}
return DataResult.success(heartbeatResp);
}
@ -351,10 +351,10 @@ public class OrderSendController {
@ApiOperation(value = "指令下发进度")
@TokenIgnore
public DataResult<OrderProcessResp> planPowerProgressBar(@RequestBody OrderPlanPowerReq vo, HttpServletRequest request) {
String lang = request.getHeader(RedisKeyConstant.User.LANG);
String lang = request.getHeader(CommonConstant.LANG);
OrderProcessResp orderProcessResp = orderSendService.planPowerProgressBar(vo);
if(RedisKeyConstant.User.EN_US.equals(lang)){
orderProcessResp.setMsg(TranslateUtils.translate(orderProcessResp.getMsg()));
if(CommonConstant.langTemp.EN_US.equals(lang)){
orderProcessResp.setMsg(TranslateUtils.translate(orderProcessResp.getMsg(),CommonConstant.lang.EN));
}
return DataResult.success(orderProcessResp);
}
@ -364,11 +364,11 @@ public class OrderSendController {
@ApiOperation(value = "指令下发")
@TokenIgnore
public DataResult<HeartbeatResp> orderIssued4plan(@RequestBody OrderIssuedReqVO vo, HttpServletRequest request) {
String lang = request.getHeader(RedisKeyConstant.User.LANG);
String lang = request.getHeader(CommonConstant.LANG);
DataResult result = getDataResult(vo);
if(RedisKeyConstant.User.EN_US.equals(lang)){
if(CommonConstant.langTemp.EN_US.equals(lang)){
HeartbeatResp heartbeatResp= (HeartbeatResp)result.getData();
heartbeatResp.setMsg(TranslateUtils.translate(heartbeatResp.getMsg()));
heartbeatResp.setMsg(TranslateUtils.translate(heartbeatResp.getMsg(),CommonConstant.lang.EN));
}
return result;
}

View File

@ -66,6 +66,16 @@ public class Event implements Serializable {
@ApiModelProperty(value = "事件描述-英文")
private String descriptionEn;
@ApiModelProperty(value = "事件描述-法语")
private String descriptionFra;
@ApiModelProperty(value = "事件描述-西班牙语")
private String descriptionSpa;
@ApiModelProperty(value = "事件描述-德语")
private String descriptionDe;
@ApiModelProperty(value = "事件描述-波兰语")
private String descriptionPl;
@ApiModelProperty(value = "事件描述-阿拉伯语")
private String descriptionAra;
@ApiModelProperty(value = "1 已确认 0 未确认")
private Integer confirmStatus;

View File

@ -20,6 +20,6 @@ public class DropDownReq {
String currentStep;
@ApiModelProperty(value = "中英切换-查询字段")
@ApiModelProperty(value = "多语言切换-查询字段")
private String lang;
}

View File

@ -63,7 +63,7 @@ public class EventReqPageVO {
@ApiModelProperty(value = "告警id集合")
private List<Long> ids;
@ApiModelProperty(value = "中英切换-查询字段")
@ApiModelProperty(value = "多语言切换-查询字段")
private String lang;
}

View File

@ -75,9 +75,4 @@ public interface EventMapper {
List<Integer> eventDeviceNum(@Param("vo") EventNumReq vo);
List<EventVo> selectTableList(@Param("tableName") String tableName, @Param("name") String name, @Param("nameEn") String nameEn);
int updateNameEnById(@Param("id") long id, @Param("tableName") String tableName,@Param("nameEn") String nameEn,@Param("translateName") String translateName);
}

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