多语言(英语、法语、西班牙语、德语、波兰语、阿拉伯语)处理
This commit is contained in:
@ -36,7 +36,7 @@ public interface StationMapper {
|
|||||||
|
|
||||||
List<Station> selectByDimName(String name,Integer groupId);
|
List<Station> selectByDimName(String name,Integer groupId);
|
||||||
|
|
||||||
List<Station> selectByIds(List<Integer> ids);
|
List<Station> selectByIds(List<Integer> ids,String lang);
|
||||||
|
|
||||||
Station selectByNameAndId(@Param("name") String name, @Param("id") Integer id, @Param("deptId") Integer deptId);
|
Station selectByNameAndId(@Param("name") String name, @Param("id") Integer id, @Param("deptId") Integer deptId);
|
||||||
|
|
||||||
|
|||||||
@ -121,7 +121,19 @@ public interface DynamicConfigService {
|
|||||||
*/
|
*/
|
||||||
int delDynamicConfigTitle(DynamicConfigTitle vo);
|
int delDynamicConfigTitle(DynamicConfigTitle vo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已知 name 参数是中文
|
||||||
|
* @param name 中文名称
|
||||||
|
* @return 返回得到中文翻译的结果(翻译结果为:英语、法语、西班牙语、德语、波兰语、阿拉伯语)
|
||||||
|
*/
|
||||||
TranslateName getNameLanguage(String name);
|
TranslateName getNameLanguage(String name);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已知 name 参数是中文 根据lang参数 得到翻译的结果
|
||||||
|
* @param name 中文名称
|
||||||
|
* @param lang 翻译语种(英语、法语、西班牙语、德语、波兰语、阿拉伯语)
|
||||||
|
* @return 返回的翻译语音结果
|
||||||
|
*/
|
||||||
String getNameByLang(String name,String lang);
|
String getNameByLang(String name,String lang);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -90,27 +90,27 @@ public interface IargeScreenShowService {
|
|||||||
* 查询收益按电站分组
|
* 查询收益按电站分组
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<Subdata> getCommonProfit(String beginString, String endString,List<Integer> stationIds);
|
List<Subdata> getCommonProfit(String beginString, String endString,List<Integer> stationIds,String lang);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通用系统转换率
|
* 通用系统转换率
|
||||||
* @param stationIds
|
* @param stationIds
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<Subdata> getCommonEfficiencyDate(List<Integer> stationIds);
|
List<Subdata> getCommonEfficiencyDate(List<Integer> stationIds,String lang);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取统计电站信息
|
* 获取统计电站信息
|
||||||
* @param stationIds
|
* @param stationIds
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<Station> getCountStations(List<Integer> stationIds);
|
List<Station> getCountStations(List<Integer> stationIds,String lang);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通用装机容量倒排
|
* 通用装机容量倒排
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<Subdata> getCommonCapacity(List<Integer> stationIds);
|
List<Subdata> getCommonCapacity(List<Integer> stationIds,String lang);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通用根据天获取告警数目曲线
|
* 通用根据天获取告警数目曲线
|
||||||
|
|||||||
@ -25,9 +25,9 @@ public interface StationService {
|
|||||||
|
|
||||||
Station selectById(Integer id);
|
Station selectById(Integer id);
|
||||||
|
|
||||||
List<StationRespVO> selectByIds(List<Integer> ids);
|
List<StationRespVO> selectByIds(List<Integer> ids,String lang);
|
||||||
|
|
||||||
List<Station> selectStationsByIds(List<Integer> ids);
|
List<Station> selectStationsByIds(List<Integer> ids,String lang);
|
||||||
|
|
||||||
Station insertStation(StationReqVO vo);
|
Station insertStation(StationReqVO vo);
|
||||||
|
|
||||||
|
|||||||
@ -1650,7 +1650,7 @@ public class DeviceServiceImpl implements DeviceService {
|
|||||||
}
|
}
|
||||||
}else if(CommonConstant.THREE.equals(vo.getType())){
|
}else if(CommonConstant.THREE.equals(vo.getType())){
|
||||||
//导出电站数据
|
//导出电站数据
|
||||||
List<Station> list = stationService.selectStationsByIds(vo.getStationIds());
|
List<Station> list = stationService.selectStationsByIds(vo.getStationIds(),null);
|
||||||
String fileName = "station";
|
String fileName = "station";
|
||||||
String sheetName = "data";
|
String sheetName = "data";
|
||||||
try {
|
try {
|
||||||
|
|||||||
@ -235,9 +235,9 @@ public class EarningsCalculateServiceImpl implements EarningsCalculateService {
|
|||||||
}
|
}
|
||||||
// 电站名称(报表标题)
|
// 电站名称(报表标题)
|
||||||
if (type == 0) {
|
if (type == 0) {
|
||||||
ec.setStationName(station.getName() + "( " + time + " ) "+reportName);
|
ec.setStationName("( " + time + " ) "+reportName);
|
||||||
} else {
|
} else {
|
||||||
ec.setStationName(station.getName() + "( " + time + " ) "+billName);
|
ec.setStationName("( " + time + " ) "+billName);
|
||||||
}
|
}
|
||||||
ec.setList(list);
|
ec.setList(list);
|
||||||
//充电收益
|
//充电收益
|
||||||
|
|||||||
@ -257,7 +257,7 @@ public class ElecPriceCurveServiceImpl implements ElecPriceCurveService {
|
|||||||
//电站id集合
|
//电站id集合
|
||||||
List<Integer> stationIds = elecTemplates.stream().map(ElecTemplate::getStationId).collect(Collectors.toList());
|
List<Integer> stationIds = elecTemplates.stream().map(ElecTemplate::getStationId).collect(Collectors.toList());
|
||||||
//查询电站
|
//查询电站
|
||||||
List<StationRespVO> stationRespVOS = stationService.selectByIds(stationIds);
|
List<StationRespVO> stationRespVOS = stationService.selectByIds(stationIds,null);
|
||||||
Map<Integer, List<StationRespVO>> stationMap = stationRespVOS.stream().collect(Collectors.groupingBy(StationRespVO::getId));
|
Map<Integer, List<StationRespVO>> stationMap = stationRespVOS.stream().collect(Collectors.groupingBy(StationRespVO::getId));
|
||||||
//模板id的集合
|
//模板id的集合
|
||||||
List<Integer> elecTemplateIds = elecTemplates.stream().map(ElecTemplate::getId).collect(Collectors.toList());
|
List<Integer> elecTemplateIds = elecTemplates.stream().map(ElecTemplate::getId).collect(Collectors.toList());
|
||||||
|
|||||||
@ -1450,7 +1450,7 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
|
|||||||
if (stationIds == null) {
|
if (stationIds == null) {
|
||||||
return new AnnualOverviewResp();
|
return new AnnualOverviewResp();
|
||||||
}
|
}
|
||||||
List<Station> list = stationService.selectStationsByIds(stationIds);
|
List<Station> list = stationService.selectStationsByIds(stationIds,null);
|
||||||
AnnualOverviewResp annualOverviewResp = getOverviewDatas(list);
|
AnnualOverviewResp annualOverviewResp = getOverviewDatas(list);
|
||||||
return annualOverviewResp;
|
return annualOverviewResp;
|
||||||
}
|
}
|
||||||
@ -1488,7 +1488,7 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
|
|||||||
if (stationIds == null) {
|
if (stationIds == null) {
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
List<Station> list = getCountStations(stationIds);
|
List<Station> list = getCountStations(stationIds,null);
|
||||||
List<Subdata> regionList = new ArrayList<>();
|
List<Subdata> regionList = new ArrayList<>();
|
||||||
Map<String, List<Station>> nationMap = list.stream().filter(i -> i.getProvince() != null).collect(Collectors.groupingBy(Station::getNation));
|
Map<String, List<Station>> nationMap = list.stream().filter(i -> i.getProvince() != null).collect(Collectors.groupingBy(Station::getNation));
|
||||||
if (nationMap.size() > CommonConstant.ONE) {
|
if (nationMap.size() > CommonConstant.ONE) {
|
||||||
@ -1577,7 +1577,7 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
|
|||||||
if (stationIds == null) {
|
if (stationIds == null) {
|
||||||
return new EnergySavingRespVo();
|
return new EnergySavingRespVo();
|
||||||
}
|
}
|
||||||
List<Station> list = getCountStations(stationIds);
|
List<Station> list = getCountStations(stationIds,null);
|
||||||
return getEnergySavingRespVo(list);
|
return getEnergySavingRespVo(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1586,7 +1586,7 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
|
|||||||
if (stationIds == null) {
|
if (stationIds == null) {
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
List<Station> list = getCountStations(stationIds);
|
List<Station> list = getCountStations(stationIds,null);
|
||||||
return getProfitCurve(vo, list);
|
return getProfitCurve(vo, list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1595,7 +1595,7 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
|
|||||||
if (stationIds == null) {
|
if (stationIds == null) {
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
return getAnnualChartValues(getCountStations(stationIds));
|
return getAnnualChartValues(getCountStations(stationIds,null));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -1652,12 +1652,12 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
|
|||||||
return subdata;
|
return subdata;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public List<Subdata> getCommonProfit(String beginString, String endString, List<Integer> stationIds) {
|
public List<Subdata> getCommonProfit(String beginString, String endString, List<Integer> stationIds,String lang) {
|
||||||
List<Subdata> subdata = new ArrayList<>();
|
List<Subdata> subdata = new ArrayList<>();
|
||||||
if (stationIds == null) {
|
if (stationIds == null) {
|
||||||
return subdata;
|
return subdata;
|
||||||
}
|
}
|
||||||
List<Station> countStations = getCountStations(stationIds);
|
List<Station> countStations = getCountStations(stationIds,lang);
|
||||||
if (countStations != null && !countStations.isEmpty()) {
|
if (countStations != null && !countStations.isEmpty()) {
|
||||||
if (countStations.size() >= CommonConstant.FIVE) {
|
if (countStations.size() >= CommonConstant.FIVE) {
|
||||||
subdata = getSubdata(beginString, endString, countStations);
|
subdata = getSubdata(beginString, endString, countStations);
|
||||||
@ -1675,12 +1675,12 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Subdata> getCommonEfficiencyDate(List<Integer> stationIds) {
|
public List<Subdata> getCommonEfficiencyDate(List<Integer> stationIds,String lang) {
|
||||||
List<Subdata> subdata = new ArrayList<>();
|
List<Subdata> subdata = new ArrayList<>();
|
||||||
if (stationIds == null) {
|
if (stationIds == null) {
|
||||||
return subdata;
|
return subdata;
|
||||||
}
|
}
|
||||||
List<Station> countStations = getCountStations(stationIds);
|
List<Station> countStations = getCountStations(stationIds,lang);
|
||||||
if (countStations != null && !countStations.isEmpty()) {
|
if (countStations != null && !countStations.isEmpty()) {
|
||||||
subdata = getEfficiencyDate(countStations);
|
subdata = getEfficiencyDate(countStations);
|
||||||
// if (countStations.size() >= CommonConstant.FIVE) {
|
// if (countStations.size() >= CommonConstant.FIVE) {
|
||||||
@ -2041,24 +2041,24 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<Station> getCountStations(List<Integer> stationIds) {
|
public List<Station> getCountStations(List<Integer> stationIds,String lang) {
|
||||||
List<Station> list = stationService.selectStationsByIds(stationIds);
|
List<Station> list = stationService.selectStationsByIds(stationIds,lang);
|
||||||
List<Station> oneList = list.stream().filter(i -> CommonConstant.ONE.equals(i.getStatus())).collect(Collectors.toList());
|
List<Station> oneList = list.stream().filter(i -> CommonConstant.ONE.equals(i.getStatus())).collect(Collectors.toList());
|
||||||
return oneList;
|
return oneList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Station> getCountPvStations(List<Integer> stationIds) {
|
public List<Station> getCountPvStations(List<Integer> stationIds) {
|
||||||
List<Station> list = stationService.selectStationsByIds(stationIds);
|
List<Station> list = stationService.selectStationsByIds(stationIds,null);
|
||||||
List<Station> oneList = list.stream().filter(i -> CommonConstant.ONE.equals(i.getStatus()) && CommonConstant.ONE.equals(i.getInverterFlag())).collect(Collectors.toList());
|
List<Station> oneList = list.stream().filter(i -> CommonConstant.ONE.equals(i.getStatus()) && CommonConstant.ONE.equals(i.getInverterFlag())).collect(Collectors.toList());
|
||||||
return oneList;
|
return oneList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Subdata> getCommonCapacity(List<Integer> stationIds) {
|
public List<Subdata> getCommonCapacity(List<Integer> stationIds,String lang) {
|
||||||
List<Subdata> subDataList = new ArrayList<>();
|
List<Subdata> subDataList = new ArrayList<>();
|
||||||
if (stationIds != null) {
|
if (stationIds != null) {
|
||||||
List<Station> stations = getCountStations(stationIds);
|
List<Station> stations = getCountStations(stationIds,lang);
|
||||||
subDataList = getSubdataList(stations);
|
subDataList = getSubdataList(stations);
|
||||||
}
|
}
|
||||||
return subDataList;
|
return subDataList;
|
||||||
|
|||||||
@ -598,7 +598,7 @@ public class OpenStationServiceImpl implements OpenStationService {
|
|||||||
public void exportEleData(PcsStationReq req, HttpServletResponse response,String lang) {
|
public void exportEleData(PcsStationReq req, HttpServletResponse response,String lang) {
|
||||||
try {
|
try {
|
||||||
List<Integer> stationIds = req.getStationIds();
|
List<Integer> stationIds = req.getStationIds();
|
||||||
List<Station> stations = stationService.selectStationsByIds(stationIds);
|
List<Station> stations = stationService.selectStationsByIds(stationIds,lang);
|
||||||
Map<Integer, String> idNameMap = getStationMap(stations);
|
Map<Integer, String> idNameMap = getStationMap(stations);
|
||||||
List<Map<String, Object>> sheetsList = new ArrayList<>();
|
List<Map<String, Object>> sheetsList = new ArrayList<>();
|
||||||
//汇总
|
//汇总
|
||||||
@ -750,7 +750,7 @@ public class OpenStationServiceImpl implements OpenStationService {
|
|||||||
PageResult pageResult = new PageResult<>();
|
PageResult pageResult = new PageResult<>();
|
||||||
try {
|
try {
|
||||||
List<Integer> stationIds = req.getStationIds();
|
List<Integer> stationIds = req.getStationIds();
|
||||||
List<Station> stations = stationService.selectStationsByIds(stationIds);
|
List<Station> stations = stationService.selectStationsByIds(stationIds,null);
|
||||||
Map<Integer, String> idNameMap = stations.stream().collect(Collectors.toMap(Station::getId, Station::getName));
|
Map<Integer, String> idNameMap = stations.stream().collect(Collectors.toMap(Station::getId, Station::getName));
|
||||||
List<PcsElecData> result = new ArrayList<>();
|
List<PcsElecData> result = new ArrayList<>();
|
||||||
String name = null;
|
String name = null;
|
||||||
@ -785,7 +785,7 @@ public class OpenStationServiceImpl implements OpenStationService {
|
|||||||
Object obj = new Object();
|
Object obj = new Object();
|
||||||
try {
|
try {
|
||||||
List<Integer> stationIds = req.getStationIds();
|
List<Integer> stationIds = req.getStationIds();
|
||||||
List<Station> stations = stationService.selectStationsByIds(stationIds);
|
List<Station> stations = stationService.selectStationsByIds(stationIds,req.getLang());
|
||||||
Map<Integer, String> idNameMap = getStationMap(stations);
|
Map<Integer, String> idNameMap = getStationMap(stations);
|
||||||
//汇总
|
//汇总
|
||||||
BigDecimal charge = BigDecimal.ZERO;
|
BigDecimal charge = BigDecimal.ZERO;
|
||||||
@ -935,7 +935,7 @@ public class OpenStationServiceImpl implements OpenStationService {
|
|||||||
Object obj = new Object();
|
Object obj = new Object();
|
||||||
try {
|
try {
|
||||||
List<Integer> stationIds = req.getStationIds();
|
List<Integer> stationIds = req.getStationIds();
|
||||||
List<Station> stations = stationService.selectStationsByIds(stationIds);
|
List<Station> stations = stationService.selectStationsByIds(stationIds,req.getLang());
|
||||||
Map<Integer, String> idNameMap = getStationMap(stations);
|
Map<Integer, String> idNameMap = getStationMap(stations);
|
||||||
//汇总
|
//汇总
|
||||||
String segmentType = req.getSegmentType();
|
String segmentType = req.getSegmentType();
|
||||||
|
|||||||
@ -424,7 +424,7 @@ public class OutApiServiceImpl implements OutApiService {
|
|||||||
ids.add(418);//新凤鸣电站
|
ids.add(418);//新凤鸣电站
|
||||||
ids.add(551);//江苏暨阳电力科技发展有限公司(1号柜)
|
ids.add(551);//江苏暨阳电力科技发展有限公司(1号柜)
|
||||||
ids.add(564);//江苏暨阳电力科技发展有限公司(2号柜)
|
ids.add(564);//江苏暨阳电力科技发展有限公司(2号柜)
|
||||||
List<Station> stations = stationService.selectStationsByIds(ids);
|
List<Station> stations = stationService.selectStationsByIds(ids,null);
|
||||||
String deviceType = DeviceTypeConstant.PCS;
|
String deviceType = DeviceTypeConstant.PCS;
|
||||||
for (Station station : stations) {
|
for (Station station : stations) {
|
||||||
//先删除站的当日数据
|
//先删除站的当日数据
|
||||||
|
|||||||
@ -214,8 +214,8 @@ public class StationServiceImpl implements StationService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<StationRespVO> selectByIds(List<Integer> ids) {
|
public List<StationRespVO> selectByIds(List<Integer> ids,String lang) {
|
||||||
List<Station> stations = stationMapper.selectByIds(ids);
|
List<Station> stations = stationMapper.selectByIds(ids,lang);
|
||||||
List<StationRespVO> stationRespVOS = getStationRespVOS(stations);
|
List<StationRespVO> stationRespVOS = getStationRespVOS(stations);
|
||||||
if (stationRespVOS != null) {
|
if (stationRespVOS != null) {
|
||||||
for (StationRespVO stationRespVO : stationRespVOS) {
|
for (StationRespVO stationRespVO : stationRespVOS) {
|
||||||
@ -237,8 +237,8 @@ public class StationServiceImpl implements StationService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Station> selectStationsByIds(List<Integer> ids) {
|
public List<Station> selectStationsByIds(List<Integer> ids,String lang) {
|
||||||
List<Station> stations = stationMapper.selectByIds(ids);
|
List<Station> stations = stationMapper.selectByIds(ids,lang);
|
||||||
return stations;
|
return stations;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
id
|
id
|
||||||
,pid,group_id,dept_id,address,longitude,latitude,capacity,rate_power,
|
,pid,group_id,dept_id,address,longitude,latitude,capacity,rate_power,
|
||||||
name,nation,province,
|
name,nation,province,
|
||||||
,status,type,create_time,contact,contact_details,grid_time,
|
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,
|
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
|
electricity_type,customer_type,voltage_level,batch_number
|
||||||
</sql>
|
</sql>
|
||||||
@ -17,7 +17,7 @@
|
|||||||
id
|
id
|
||||||
,pid,group_id,dept_id,address,longitude,latitude,capacity,rate_power,
|
,pid,group_id,dept_id,address,longitude,latitude,capacity,rate_power,
|
||||||
name_en name,nation_en nation ,province_en province,
|
name_en name,nation_en nation ,province_en province,
|
||||||
,status,type,create_time,contact,contact_details,grid_time,
|
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,
|
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
|
electricity_type,customer_type,voltage_level,batch_number
|
||||||
</sql>
|
</sql>
|
||||||
@ -25,7 +25,7 @@
|
|||||||
id
|
id
|
||||||
,pid,group_id,dept_id,address,longitude,latitude,capacity,rate_power,
|
,pid,group_id,dept_id,address,longitude,latitude,capacity,rate_power,
|
||||||
name_fra name,nation_fra nation ,province_fra province,
|
name_fra name,nation_fra nation ,province_fra province,
|
||||||
,status,type,create_time,contact,contact_details,grid_time,
|
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,
|
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
|
electricity_type,customer_type,voltage_level,batch_number
|
||||||
</sql>
|
</sql>
|
||||||
@ -33,7 +33,7 @@
|
|||||||
id
|
id
|
||||||
,pid,group_id,dept_id,address,longitude,latitude,capacity,rate_power,
|
,pid,group_id,dept_id,address,longitude,latitude,capacity,rate_power,
|
||||||
name_spa name,nation_spa nation ,province_spa province,
|
name_spa name,nation_spa nation ,province_spa province,
|
||||||
,status,type,create_time,contact,contact_details,grid_time,
|
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,
|
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
|
electricity_type,customer_type,voltage_level,batch_number
|
||||||
</sql>
|
</sql>
|
||||||
@ -41,7 +41,7 @@
|
|||||||
id
|
id
|
||||||
,pid,group_id,dept_id,address,longitude,latitude,capacity,rate_power,
|
,pid,group_id,dept_id,address,longitude,latitude,capacity,rate_power,
|
||||||
name_de name,nation_de nation ,province_de province,
|
name_de name,nation_de nation ,province_de province,
|
||||||
,status,type,create_time,contact,contact_details,grid_time,
|
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,
|
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
|
electricity_type,customer_type,voltage_level,batch_number
|
||||||
</sql>
|
</sql>
|
||||||
@ -49,7 +49,7 @@
|
|||||||
id
|
id
|
||||||
,pid,group_id,dept_id,address,longitude,latitude,capacity,rate_power,
|
,pid,group_id,dept_id,address,longitude,latitude,capacity,rate_power,
|
||||||
name_pl name,nation_pl nation ,province_pl province,
|
name_pl name,nation_pl nation ,province_pl province,
|
||||||
,status,type,create_time,contact,contact_details,grid_time,
|
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,
|
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
|
electricity_type,customer_type,voltage_level,batch_number
|
||||||
</sql>
|
</sql>
|
||||||
@ -57,7 +57,7 @@
|
|||||||
id
|
id
|
||||||
,pid,group_id,dept_id,address,longitude,latitude,capacity,rate_power,
|
,pid,group_id,dept_id,address,longitude,latitude,capacity,rate_power,
|
||||||
name_ara name,nation_ara nation ,province_ara province,
|
name_ara name,nation_ara nation ,province_ara province,
|
||||||
,status,type,create_time,contact,contact_details,grid_time,
|
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,
|
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
|
electricity_type,customer_type,voltage_level,batch_number
|
||||||
</sql>
|
</sql>
|
||||||
@ -98,7 +98,29 @@
|
|||||||
|
|
||||||
<select id="selectByIds" resultType="com.ho.business.entity.Station">
|
<select id="selectByIds" resultType="com.ho.business.entity.Station">
|
||||||
select
|
select
|
||||||
<include refid="Base_Column_List"/>
|
<choose>
|
||||||
|
<when test="lang != null and lang=='en_US' ">
|
||||||
|
<include refid="Base_Column_List1"/>
|
||||||
|
</when>
|
||||||
|
<when test="lang != null and lang=='fr_FR' ">
|
||||||
|
<include refid="Base_Column_List2"/>
|
||||||
|
</when>
|
||||||
|
<when test="lang != null and lang=='es_ES' ">
|
||||||
|
<include refid="Base_Column_List3"/>
|
||||||
|
</when>
|
||||||
|
<when test="lang != null and lang=='de_DE' ">
|
||||||
|
<include refid="Base_Column_List4"/>
|
||||||
|
</when>
|
||||||
|
<when test="lang != null and lang=='pl_PL' ">
|
||||||
|
<include refid="Base_Column_List5"/>
|
||||||
|
</when>
|
||||||
|
<when test="lang != null and lang=='ar_EG' ">
|
||||||
|
<include refid="Base_Column_List6"/>
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
from station
|
from station
|
||||||
<where>
|
<where>
|
||||||
<if test="ids != null and ids.size() != 0">
|
<if test="ids != null and ids.size() != 0">
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import com.ho.business.service.HisCurveRelateService;
|
|||||||
import com.ho.business.vo.req.modelType.ModelTypeQueryReq;
|
import com.ho.business.vo.req.modelType.ModelTypeQueryReq;
|
||||||
import com.ho.business.vo.req.point.HisPointReqVo;
|
import com.ho.business.vo.req.point.HisPointReqVo;
|
||||||
import com.ho.common.tools.annotation.LogAnnotation;
|
import com.ho.common.tools.annotation.LogAnnotation;
|
||||||
|
import com.ho.common.tools.annotation.NotSportEnOperation;
|
||||||
import com.ho.common.tools.constant.CommonConstant;
|
import com.ho.common.tools.constant.CommonConstant;
|
||||||
import com.ho.common.tools.constant.ContextConstant;
|
import com.ho.common.tools.constant.ContextConstant;
|
||||||
import com.ho.common.tools.constant.RedisKeyConstant;
|
import com.ho.common.tools.constant.RedisKeyConstant;
|
||||||
@ -43,6 +44,7 @@ public class HisCurveRelateController {
|
|||||||
@ApiOperation(value = "新增历史曲线字典模板")
|
@ApiOperation(value = "新增历史曲线字典模板")
|
||||||
@LogAnnotation(title = "业务模块-曲线相关衍生功能", action = "新增")
|
@LogAnnotation(title = "业务模块-曲线相关衍生功能", action = "新增")
|
||||||
//@TokenIgnore
|
//@TokenIgnore
|
||||||
|
@NotSportEnOperation
|
||||||
public DataResult add(@RequestBody @Valid HisPointReqVo hisPointReqVo, HttpServletRequest request) {
|
public DataResult add(@RequestBody @Valid HisPointReqVo hisPointReqVo, HttpServletRequest request) {
|
||||||
String token = request.getHeader(RedisKeyConstant.User.ACCESS_TOKEN);
|
String token = request.getHeader(RedisKeyConstant.User.ACCESS_TOKEN);
|
||||||
SimpleUser user = redisService.getSimpleUserByToken(token);
|
SimpleUser user = redisService.getSimpleUserByToken(token);
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import com.ho.business.vo.req.cockpit.CockpitReqVO;
|
|||||||
import com.ho.business.vo.resp.iargeScreen.*;
|
import com.ho.business.vo.resp.iargeScreen.*;
|
||||||
import com.ho.common.tools.annotation.CommonLargeScreenToken;
|
import com.ho.common.tools.annotation.CommonLargeScreenToken;
|
||||||
import com.ho.common.tools.annotation.TokenIgnore;
|
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.ContextConstant;
|
||||||
import com.ho.common.tools.constant.RedisKeyConstant;
|
import com.ho.common.tools.constant.RedisKeyConstant;
|
||||||
import com.ho.common.tools.entity.SimpleUser;
|
import com.ho.common.tools.entity.SimpleUser;
|
||||||
@ -239,7 +240,8 @@ public class IargeScreenShowController {
|
|||||||
@TokenIgnore
|
@TokenIgnore
|
||||||
@CommonLargeScreenToken
|
@CommonLargeScreenToken
|
||||||
public DataResult<List<Subdata>> getCommonIncomeList(HttpServletRequest request) {
|
public DataResult<List<Subdata>> getCommonIncomeList(HttpServletRequest request) {
|
||||||
List<Subdata> regionList = iargeScreenShowService.getCommonProfit(null, null, getSimpleUser(request));
|
String lang = request.getHeader(CommonConstant.LANG);
|
||||||
|
List<Subdata> regionList = iargeScreenShowService.getCommonProfit(null, null, getSimpleUser(request),lang);
|
||||||
if (regionList.size() > maxSize) {
|
if (regionList.size() > maxSize) {
|
||||||
regionList = regionList.subList(0, maxSize);
|
regionList = regionList.subList(0, maxSize);
|
||||||
}
|
}
|
||||||
@ -255,7 +257,8 @@ public class IargeScreenShowController {
|
|||||||
@TokenIgnore
|
@TokenIgnore
|
||||||
@CommonLargeScreenToken
|
@CommonLargeScreenToken
|
||||||
public DataResult<List<Subdata>> getCommonEfficiencyDate(HttpServletRequest request) {
|
public DataResult<List<Subdata>> getCommonEfficiencyDate(HttpServletRequest request) {
|
||||||
List<Subdata> efficiencyList = iargeScreenShowService.getCommonEfficiencyDate(getSimpleUser(request));
|
String lang = request.getHeader(CommonConstant.LANG);
|
||||||
|
List<Subdata> efficiencyList = iargeScreenShowService.getCommonEfficiencyDate(getSimpleUser(request),lang);
|
||||||
return DataResult.success(efficiencyList);
|
return DataResult.success(efficiencyList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -264,10 +267,11 @@ public class IargeScreenShowController {
|
|||||||
@TokenIgnore
|
@TokenIgnore
|
||||||
@CommonLargeScreenToken
|
@CommonLargeScreenToken
|
||||||
public DataResult<List<Station>> getCommonStationInfo(HttpServletRequest request) {
|
public DataResult<List<Station>> getCommonStationInfo(HttpServletRequest request) {
|
||||||
|
String lang = request.getHeader(CommonConstant.LANG);
|
||||||
List<Integer> ids = getSimpleUser(request);
|
List<Integer> ids = getSimpleUser(request);
|
||||||
List<Station> stations = new ArrayList<>();
|
List<Station> stations = new ArrayList<>();
|
||||||
if (ids != null) {
|
if (ids != null) {
|
||||||
stations = iargeScreenShowService.getCountStations(ids);
|
stations = iargeScreenShowService.getCountStations(ids,lang);
|
||||||
}
|
}
|
||||||
return DataResult.success(stations);
|
return DataResult.success(stations);
|
||||||
}
|
}
|
||||||
@ -277,7 +281,8 @@ public class IargeScreenShowController {
|
|||||||
@TokenIgnore
|
@TokenIgnore
|
||||||
@CommonLargeScreenToken
|
@CommonLargeScreenToken
|
||||||
public DataResult<List<Subdata>> getCommonCapacity(HttpServletRequest request) {
|
public DataResult<List<Subdata>> getCommonCapacity(HttpServletRequest request) {
|
||||||
List<Subdata> regionList = iargeScreenShowService.getCommonCapacity(getSimpleUser(request));
|
String lang = request.getHeader(CommonConstant.LANG);
|
||||||
|
List<Subdata> regionList = iargeScreenShowService.getCommonCapacity(getSimpleUser(request),lang);
|
||||||
return DataResult.success(regionList);
|
return DataResult.success(regionList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -375,8 +380,9 @@ public class IargeScreenShowController {
|
|||||||
@PostMapping("getZhongZiIncomeList")
|
@PostMapping("getZhongZiIncomeList")
|
||||||
@ApiOperation(value = "中自电站收益排名")
|
@ApiOperation(value = "中自电站收益排名")
|
||||||
@TokenIgnore
|
@TokenIgnore
|
||||||
public DataResult<List<Subdata>> getZhongZiIncomeList(@RequestBody CockpitReqVO vo) {
|
public DataResult<List<Subdata>> getZhongZiIncomeList(@RequestBody CockpitReqVO vo,HttpServletRequest request) {
|
||||||
List<Subdata> regionList = iargeScreenShowService.getCommonProfit(null, null, getByDeptId(vo.getDeptId()));
|
String lang = request.getHeader(CommonConstant.LANG);
|
||||||
|
List<Subdata> regionList = iargeScreenShowService.getCommonProfit(null, null, getByDeptId(vo.getDeptId()),lang);
|
||||||
if (regionList.size() > maxSize) {
|
if (regionList.size() > maxSize) {
|
||||||
regionList = regionList.subList(0, maxSize);
|
regionList = regionList.subList(0, maxSize);
|
||||||
}
|
}
|
||||||
@ -390,19 +396,21 @@ public class IargeScreenShowController {
|
|||||||
@PostMapping("getZhongZiEfficiencyDate")
|
@PostMapping("getZhongZiEfficiencyDate")
|
||||||
@ApiOperation(value = "中自系统转换率")
|
@ApiOperation(value = "中自系统转换率")
|
||||||
@TokenIgnore
|
@TokenIgnore
|
||||||
public DataResult<List<Subdata>> getZhongZiEfficiencyDate(@RequestBody CockpitReqVO vo) {
|
public DataResult<List<Subdata>> getZhongZiEfficiencyDate(@RequestBody CockpitReqVO vo,HttpServletRequest request) {
|
||||||
List<Subdata> efficiencyList = iargeScreenShowService.getCommonEfficiencyDate(getByDeptId(vo.getDeptId()));
|
String lang = request.getHeader(CommonConstant.LANG);
|
||||||
|
List<Subdata> efficiencyList = iargeScreenShowService.getCommonEfficiencyDate(getByDeptId(vo.getDeptId()),lang);
|
||||||
return DataResult.success(efficiencyList);
|
return DataResult.success(efficiencyList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("getZhongZiStationInfo")
|
@PostMapping("getZhongZiStationInfo")
|
||||||
@ApiOperation(value = "获取中自电站信息")
|
@ApiOperation(value = "获取中自电站信息")
|
||||||
@TokenIgnore
|
@TokenIgnore
|
||||||
public DataResult<List<Station>> getZhongZiStationInfo(@RequestBody CockpitReqVO vo) {
|
public DataResult<List<Station>> getZhongZiStationInfo(@RequestBody CockpitReqVO vo,HttpServletRequest request) {
|
||||||
|
String lang = request.getHeader(CommonConstant.LANG);
|
||||||
List<Integer> ids = getByDeptId(vo.getDeptId());
|
List<Integer> ids = getByDeptId(vo.getDeptId());
|
||||||
List<Station> stations = new ArrayList<>();
|
List<Station> stations = new ArrayList<>();
|
||||||
if (ids != null) {
|
if (ids != null) {
|
||||||
stations = iargeScreenShowService.getCountStations(ids);
|
stations = iargeScreenShowService.getCountStations(ids,lang);
|
||||||
}
|
}
|
||||||
return DataResult.success(stations);
|
return DataResult.success(stations);
|
||||||
}
|
}
|
||||||
@ -410,8 +418,9 @@ public class IargeScreenShowController {
|
|||||||
@PostMapping("getZhongZiCapacity")
|
@PostMapping("getZhongZiCapacity")
|
||||||
@ApiOperation(value = "中自装机容量倒排")
|
@ApiOperation(value = "中自装机容量倒排")
|
||||||
@TokenIgnore
|
@TokenIgnore
|
||||||
public DataResult<List<Subdata>> getZhongZiCapacity(@RequestBody CockpitReqVO vo) {
|
public DataResult<List<Subdata>> getZhongZiCapacity(@RequestBody CockpitReqVO vo,HttpServletRequest request) {
|
||||||
List<Subdata> regionList = iargeScreenShowService.getCommonCapacity(getByDeptId(vo.getDeptId()));
|
String lang = request.getHeader(CommonConstant.LANG);
|
||||||
|
List<Subdata> regionList = iargeScreenShowService.getCommonCapacity(getByDeptId(vo.getDeptId()),lang);
|
||||||
return DataResult.success(regionList);
|
return DataResult.success(regionList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -65,6 +65,7 @@ import org.springframework.beans.factory.annotation.Value;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
@ -218,8 +219,9 @@ public class OuterApiController {
|
|||||||
//根据电站id查电站
|
//根据电站id查电站
|
||||||
@PostMapping("selectByStationIds")
|
@PostMapping("selectByStationIds")
|
||||||
@TokenIgnore
|
@TokenIgnore
|
||||||
public DataResult<List<Station>> selectByStationIds(@RequestBody List<Integer> ids) {
|
public DataResult<List<Station>> selectByStationIds(@RequestBody List<Integer> ids, HttpServletRequest request) {
|
||||||
List<Station> stations = stationService.selectStationsByIds(ids);
|
String lang = request.getHeader(CommonConstant.LANG);
|
||||||
|
List<Station> stations = stationService.selectStationsByIds(ids,lang);
|
||||||
return DataResult.success(stations);
|
return DataResult.success(stations);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -259,15 +259,15 @@ public class PointDemoController {
|
|||||||
}else if(CommonConstant.langTemp.ES_ES.equals(lang)){
|
}else if(CommonConstant.langTemp.ES_ES.equals(lang)){
|
||||||
fileName = "Tabla de puntos";sheetName = "datos";
|
fileName = "Tabla de puntos";sheetName = "datos";
|
||||||
EasyExcelUtil.writeExcel(response, pointList, fileName, sheetName, PointRespSpaVO.class);
|
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)){
|
}else if(CommonConstant.langTemp.DE_DE.equals(lang)){
|
||||||
fileName = "Punkttabellen";sheetName = "Daten";
|
fileName = "Punkttabellen";sheetName = "Daten";
|
||||||
EasyExcelUtil.writeExcel(response, pointList, fileName, sheetName, PointRespDeVO.class);
|
EasyExcelUtil.writeExcel(response, pointList, fileName, sheetName, PointRespDeVO.class);
|
||||||
}else if(CommonConstant.langTemp.PL_PL.equals(lang)){
|
}else if(CommonConstant.langTemp.PL_PL.equals(lang)){
|
||||||
fileName = "Tabela punktowa";sheetName = "Dane";
|
fileName = "Tabela punktowa";sheetName = "Dane";
|
||||||
EasyExcelUtil.writeExcel(response, pointList, fileName, sheetName, PointRespPlVO.class);
|
EasyExcelUtil.writeExcel(response, pointList, fileName, sheetName, PointRespPlVO.class);
|
||||||
|
}else if(CommonConstant.langTemp.AR_EG.equals(lang)){
|
||||||
|
fileName = "نقطة الجدول";sheetName = "داتا";
|
||||||
|
EasyExcelUtil.writeExcel(response, pointList, fileName, sheetName, PointRespAraVO.class);
|
||||||
}else{
|
}else{
|
||||||
EasyExcelUtil.writeExcel(response, pointList, fileName, sheetName, PointRespVO.class);
|
EasyExcelUtil.writeExcel(response, pointList, fileName, sheetName, PointRespVO.class);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -177,7 +177,7 @@ public class StationController {
|
|||||||
DataResult<StationRespVO> result = DataResult.success();
|
DataResult<StationRespVO> result = DataResult.success();
|
||||||
List<Integer> ids = new ArrayList<>();
|
List<Integer> ids = new ArrayList<>();
|
||||||
ids.add(id);
|
ids.add(id);
|
||||||
List<StationRespVO> stations = stationService.selectByIds(ids);
|
List<StationRespVO> stations = stationService.selectByIds(ids,null);
|
||||||
StationRespVO stationRespVO = new StationRespVO();
|
StationRespVO stationRespVO = new StationRespVO();
|
||||||
if (!stations.isEmpty()) {
|
if (!stations.isEmpty()) {
|
||||||
stationRespVO = stations.get(0);
|
stationRespVO = stations.get(0);
|
||||||
@ -256,6 +256,7 @@ public class StationController {
|
|||||||
List<Station> stationsList = new ArrayList<>();
|
List<Station> stationsList = new ArrayList<>();
|
||||||
//根据所属集团查询电站
|
//根据所属集团查询电站
|
||||||
String token = request.getHeader(RedisKeyConstant.User.ACCESS_TOKEN);
|
String token = request.getHeader(RedisKeyConstant.User.ACCESS_TOKEN);
|
||||||
|
String lang = request.getHeader(CommonConstant.LANG);
|
||||||
SimpleUser user = redisService.getSimpleUserByToken(token);
|
SimpleUser user = redisService.getSimpleUserByToken(token);
|
||||||
if (user.getPlatSuper()) {
|
if (user.getPlatSuper()) {
|
||||||
return DataResult.success(stationsList);
|
return DataResult.success(stationsList);
|
||||||
@ -265,7 +266,7 @@ public class StationController {
|
|||||||
//OPEN环境需要只显示人员所属电站
|
//OPEN环境需要只显示人员所属电站
|
||||||
// if (EnvConstant.DEV.equals(env) || EnvConstant.OPEN.equals(env)) {
|
// if (EnvConstant.DEV.equals(env) || EnvConstant.OPEN.equals(env)) {
|
||||||
if (stationIds != null && !stationIds.isEmpty()) {
|
if (stationIds != null && !stationIds.isEmpty()) {
|
||||||
List<StationRespVO> stationRespVOS = stationService.selectByIds(stationIds);
|
List<StationRespVO> stationRespVOS = stationService.selectByIds(stationIds,lang);
|
||||||
for (StationRespVO stationRespVO : stationRespVOS) {
|
for (StationRespVO stationRespVO : stationRespVOS) {
|
||||||
Station station = new Station();
|
Station station = new Station();
|
||||||
BeanUtil.copyProperties(stationRespVO, station);
|
BeanUtil.copyProperties(stationRespVO, station);
|
||||||
|
|||||||
Reference in New Issue
Block a user