From c626e3256f021253453ba89670460130354861a1 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 15 Jan 2026 16:22:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=9A=E8=AF=AD=E8=A8=80=EF=BC=88=E8=8B=B1?= =?UTF-8?q?=E8=AF=AD=E3=80=81=E6=B3=95=E8=AF=AD=E3=80=81=E8=A5=BF=E7=8F=AD?= =?UTF-8?q?=E7=89=99=E8=AF=AD=E3=80=81=E5=BE=B7=E8=AF=AD=E3=80=81=E6=B3=A2?= =?UTF-8?q?=E5=85=B0=E8=AF=AD=E3=80=81=E9=98=BF=E6=8B=89=E4=BC=AF=E8=AF=AD?= =?UTF-8?q?=EF=BC=89=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ho/business/mapper/StationMapper.java | 2 +- .../service/DynamicConfigService.java | 12 ++++++ .../service/IargeScreenShowService.java | 8 ++-- .../ho/business/service/StationService.java | 4 +- .../service/impl/DeviceServiceImpl.java | 2 +- .../impl/EarningsCalculateServiceImpl.java | 4 +- .../impl/ElecPriceCurveServiceImpl.java | 2 +- .../impl/IargeScreenShowServiceImpl.java | 28 +++++++------- .../service/impl/OpenStationServiceImpl.java | 8 ++-- .../service/impl/OutApiServiceImpl.java | 2 +- .../service/impl/StationServiceImpl.java | 8 ++-- .../main/resources/mapper/StationMapper.xml | 38 +++++++++++++++---- .../controller/HisCurveRelateController.java | 2 + .../controller/IargeScreenShowController.java | 33 ++++++++++------ .../controller/OuterApiController.java | 6 ++- .../controller/PointDemoController.java | 6 +-- .../controller/StationController.java | 5 ++- 17 files changed, 109 insertions(+), 61 deletions(-) diff --git a/business-service-dao/src/main/java/com/ho/business/mapper/StationMapper.java b/business-service-dao/src/main/java/com/ho/business/mapper/StationMapper.java index 599d6f3..23a990c 100644 --- a/business-service-dao/src/main/java/com/ho/business/mapper/StationMapper.java +++ b/business-service-dao/src/main/java/com/ho/business/mapper/StationMapper.java @@ -36,7 +36,7 @@ public interface StationMapper { List selectByDimName(String name,Integer groupId); - List selectByIds(List ids); + List selectByIds(List ids,String lang); Station selectByNameAndId(@Param("name") String name, @Param("id") Integer id, @Param("deptId") Integer deptId); diff --git a/business-service-dao/src/main/java/com/ho/business/service/DynamicConfigService.java b/business-service-dao/src/main/java/com/ho/business/service/DynamicConfigService.java index 0ded6f0..0018ca4 100644 --- a/business-service-dao/src/main/java/com/ho/business/service/DynamicConfigService.java +++ b/business-service-dao/src/main/java/com/ho/business/service/DynamicConfigService.java @@ -121,7 +121,19 @@ public interface DynamicConfigService { */ int delDynamicConfigTitle(DynamicConfigTitle vo); + /** + * 已知 name 参数是中文 + * @param name 中文名称 + * @return 返回得到中文翻译的结果(翻译结果为:英语、法语、西班牙语、德语、波兰语、阿拉伯语) + */ TranslateName getNameLanguage(String name); + /** + * 已知 name 参数是中文 根据lang参数 得到翻译的结果 + * @param name 中文名称 + * @param lang 翻译语种(英语、法语、西班牙语、德语、波兰语、阿拉伯语) + * @return 返回的翻译语音结果 + */ String getNameByLang(String name,String lang); + } diff --git a/business-service-dao/src/main/java/com/ho/business/service/IargeScreenShowService.java b/business-service-dao/src/main/java/com/ho/business/service/IargeScreenShowService.java index 2f0c579..586dd01 100644 --- a/business-service-dao/src/main/java/com/ho/business/service/IargeScreenShowService.java +++ b/business-service-dao/src/main/java/com/ho/business/service/IargeScreenShowService.java @@ -90,27 +90,27 @@ public interface IargeScreenShowService { * 查询收益按电站分组 * @return */ - List getCommonProfit(String beginString, String endString,List stationIds); + List getCommonProfit(String beginString, String endString,List stationIds,String lang); /** * 通用系统转换率 * @param stationIds * @return */ - List getCommonEfficiencyDate(List stationIds); + List getCommonEfficiencyDate(List stationIds,String lang); /** * 获取统计电站信息 * @param stationIds * @return */ - List getCountStations(List stationIds); + List getCountStations(List stationIds,String lang); /** * 通用装机容量倒排 * @return */ - List getCommonCapacity(List stationIds); + List getCommonCapacity(List stationIds,String lang); /** * 通用根据天获取告警数目曲线 diff --git a/business-service-dao/src/main/java/com/ho/business/service/StationService.java b/business-service-dao/src/main/java/com/ho/business/service/StationService.java index 6eadf9f..e364a7f 100644 --- a/business-service-dao/src/main/java/com/ho/business/service/StationService.java +++ b/business-service-dao/src/main/java/com/ho/business/service/StationService.java @@ -25,9 +25,9 @@ public interface StationService { Station selectById(Integer id); - List selectByIds(List ids); + List selectByIds(List ids,String lang); - List selectStationsByIds(List ids); + List selectStationsByIds(List ids,String lang); Station insertStation(StationReqVO vo); diff --git a/business-service-dao/src/main/java/com/ho/business/service/impl/DeviceServiceImpl.java b/business-service-dao/src/main/java/com/ho/business/service/impl/DeviceServiceImpl.java index 32df27f..3658681 100644 --- a/business-service-dao/src/main/java/com/ho/business/service/impl/DeviceServiceImpl.java +++ b/business-service-dao/src/main/java/com/ho/business/service/impl/DeviceServiceImpl.java @@ -1650,7 +1650,7 @@ public class DeviceServiceImpl implements DeviceService { } }else if(CommonConstant.THREE.equals(vo.getType())){ //导出电站数据 - List list = stationService.selectStationsByIds(vo.getStationIds()); + List list = stationService.selectStationsByIds(vo.getStationIds(),null); String fileName = "station"; String sheetName = "data"; try { diff --git a/business-service-dao/src/main/java/com/ho/business/service/impl/EarningsCalculateServiceImpl.java b/business-service-dao/src/main/java/com/ho/business/service/impl/EarningsCalculateServiceImpl.java index fa1e4f3..7eb1663 100644 --- a/business-service-dao/src/main/java/com/ho/business/service/impl/EarningsCalculateServiceImpl.java +++ b/business-service-dao/src/main/java/com/ho/business/service/impl/EarningsCalculateServiceImpl.java @@ -235,9 +235,9 @@ public class EarningsCalculateServiceImpl implements EarningsCalculateService { } // 电站名称(报表标题) if (type == 0) { - ec.setStationName(station.getName() + "( " + time + " ) "+reportName); + ec.setStationName("( " + time + " ) "+reportName); } else { - ec.setStationName(station.getName() + "( " + time + " ) "+billName); + ec.setStationName("( " + time + " ) "+billName); } ec.setList(list); //充电收益 diff --git a/business-service-dao/src/main/java/com/ho/business/service/impl/ElecPriceCurveServiceImpl.java b/business-service-dao/src/main/java/com/ho/business/service/impl/ElecPriceCurveServiceImpl.java index e21ab65..d833051 100644 --- a/business-service-dao/src/main/java/com/ho/business/service/impl/ElecPriceCurveServiceImpl.java +++ b/business-service-dao/src/main/java/com/ho/business/service/impl/ElecPriceCurveServiceImpl.java @@ -257,7 +257,7 @@ public class ElecPriceCurveServiceImpl implements ElecPriceCurveService { //电站id集合 List stationIds = elecTemplates.stream().map(ElecTemplate::getStationId).collect(Collectors.toList()); //查询电站 - List stationRespVOS = stationService.selectByIds(stationIds); + List stationRespVOS = stationService.selectByIds(stationIds,null); Map> stationMap = stationRespVOS.stream().collect(Collectors.groupingBy(StationRespVO::getId)); //模板id的集合 List elecTemplateIds = elecTemplates.stream().map(ElecTemplate::getId).collect(Collectors.toList()); diff --git a/business-service-dao/src/main/java/com/ho/business/service/impl/IargeScreenShowServiceImpl.java b/business-service-dao/src/main/java/com/ho/business/service/impl/IargeScreenShowServiceImpl.java index 259becd..b3c7b86 100644 --- a/business-service-dao/src/main/java/com/ho/business/service/impl/IargeScreenShowServiceImpl.java +++ b/business-service-dao/src/main/java/com/ho/business/service/impl/IargeScreenShowServiceImpl.java @@ -1450,7 +1450,7 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService { if (stationIds == null) { return new AnnualOverviewResp(); } - List list = stationService.selectStationsByIds(stationIds); + List list = stationService.selectStationsByIds(stationIds,null); AnnualOverviewResp annualOverviewResp = getOverviewDatas(list); return annualOverviewResp; } @@ -1488,7 +1488,7 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService { if (stationIds == null) { return new ArrayList<>(); } - List list = getCountStations(stationIds); + List list = getCountStations(stationIds,null); List regionList = new ArrayList<>(); Map> nationMap = list.stream().filter(i -> i.getProvince() != null).collect(Collectors.groupingBy(Station::getNation)); if (nationMap.size() > CommonConstant.ONE) { @@ -1577,7 +1577,7 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService { if (stationIds == null) { return new EnergySavingRespVo(); } - List list = getCountStations(stationIds); + List list = getCountStations(stationIds,null); return getEnergySavingRespVo(list); } @@ -1586,7 +1586,7 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService { if (stationIds == null) { return new ArrayList<>(); } - List list = getCountStations(stationIds); + List list = getCountStations(stationIds,null); return getProfitCurve(vo, list); } @@ -1595,7 +1595,7 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService { if (stationIds == null) { return new ArrayList<>(); } - return getAnnualChartValues(getCountStations(stationIds)); + return getAnnualChartValues(getCountStations(stationIds,null)); } @Override @@ -1652,12 +1652,12 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService { return subdata; } @Override - public List getCommonProfit(String beginString, String endString, List stationIds) { + public List getCommonProfit(String beginString, String endString, List stationIds,String lang) { List subdata = new ArrayList<>(); if (stationIds == null) { return subdata; } - List countStations = getCountStations(stationIds); + List countStations = getCountStations(stationIds,lang); if (countStations != null && !countStations.isEmpty()) { if (countStations.size() >= CommonConstant.FIVE) { subdata = getSubdata(beginString, endString, countStations); @@ -1675,12 +1675,12 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService { } @Override - public List getCommonEfficiencyDate(List stationIds) { + public List getCommonEfficiencyDate(List stationIds,String lang) { List subdata = new ArrayList<>(); if (stationIds == null) { return subdata; } - List countStations = getCountStations(stationIds); + List countStations = getCountStations(stationIds,lang); if (countStations != null && !countStations.isEmpty()) { subdata = getEfficiencyDate(countStations); // if (countStations.size() >= CommonConstant.FIVE) { @@ -2041,24 +2041,24 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService { * @return */ @Override - public List getCountStations(List stationIds) { - List list = stationService.selectStationsByIds(stationIds); + public List getCountStations(List stationIds,String lang) { + List list = stationService.selectStationsByIds(stationIds,lang); List oneList = list.stream().filter(i -> CommonConstant.ONE.equals(i.getStatus())).collect(Collectors.toList()); return oneList; } public List getCountPvStations(List stationIds) { - List list = stationService.selectStationsByIds(stationIds); + List list = stationService.selectStationsByIds(stationIds,null); List oneList = list.stream().filter(i -> CommonConstant.ONE.equals(i.getStatus()) && CommonConstant.ONE.equals(i.getInverterFlag())).collect(Collectors.toList()); return oneList; } @Override - public List getCommonCapacity(List stationIds) { + public List getCommonCapacity(List stationIds,String lang) { List subDataList = new ArrayList<>(); if (stationIds != null) { - List stations = getCountStations(stationIds); + List stations = getCountStations(stationIds,lang); subDataList = getSubdataList(stations); } return subDataList; diff --git a/business-service-dao/src/main/java/com/ho/business/service/impl/OpenStationServiceImpl.java b/business-service-dao/src/main/java/com/ho/business/service/impl/OpenStationServiceImpl.java index 2904a28..0461a99 100644 --- a/business-service-dao/src/main/java/com/ho/business/service/impl/OpenStationServiceImpl.java +++ b/business-service-dao/src/main/java/com/ho/business/service/impl/OpenStationServiceImpl.java @@ -598,7 +598,7 @@ public class OpenStationServiceImpl implements OpenStationService { public void exportEleData(PcsStationReq req, HttpServletResponse response,String lang) { try { List stationIds = req.getStationIds(); - List stations = stationService.selectStationsByIds(stationIds); + List stations = stationService.selectStationsByIds(stationIds,lang); Map idNameMap = getStationMap(stations); List> sheetsList = new ArrayList<>(); //汇总 @@ -750,7 +750,7 @@ public class OpenStationServiceImpl implements OpenStationService { PageResult pageResult = new PageResult<>(); try { List stationIds = req.getStationIds(); - List stations = stationService.selectStationsByIds(stationIds); + List stations = stationService.selectStationsByIds(stationIds,null); Map idNameMap = stations.stream().collect(Collectors.toMap(Station::getId, Station::getName)); List result = new ArrayList<>(); String name = null; @@ -785,7 +785,7 @@ public class OpenStationServiceImpl implements OpenStationService { Object obj = new Object(); try { List stationIds = req.getStationIds(); - List stations = stationService.selectStationsByIds(stationIds); + List stations = stationService.selectStationsByIds(stationIds,req.getLang()); Map idNameMap = getStationMap(stations); //汇总 BigDecimal charge = BigDecimal.ZERO; @@ -935,7 +935,7 @@ public class OpenStationServiceImpl implements OpenStationService { Object obj = new Object(); try { List stationIds = req.getStationIds(); - List stations = stationService.selectStationsByIds(stationIds); + List stations = stationService.selectStationsByIds(stationIds,req.getLang()); Map idNameMap = getStationMap(stations); //汇总 String segmentType = req.getSegmentType(); diff --git a/business-service-dao/src/main/java/com/ho/business/service/impl/OutApiServiceImpl.java b/business-service-dao/src/main/java/com/ho/business/service/impl/OutApiServiceImpl.java index 08444b7..bd6d484 100644 --- a/business-service-dao/src/main/java/com/ho/business/service/impl/OutApiServiceImpl.java +++ b/business-service-dao/src/main/java/com/ho/business/service/impl/OutApiServiceImpl.java @@ -424,7 +424,7 @@ public class OutApiServiceImpl implements OutApiService { ids.add(418);//新凤鸣电站 ids.add(551);//江苏暨阳电力科技发展有限公司(1号柜) ids.add(564);//江苏暨阳电力科技发展有限公司(2号柜) - List stations = stationService.selectStationsByIds(ids); + List stations = stationService.selectStationsByIds(ids,null); String deviceType = DeviceTypeConstant.PCS; for (Station station : stations) { //先删除站的当日数据 diff --git a/business-service-dao/src/main/java/com/ho/business/service/impl/StationServiceImpl.java b/business-service-dao/src/main/java/com/ho/business/service/impl/StationServiceImpl.java index 6675315..b1e58bb 100644 --- a/business-service-dao/src/main/java/com/ho/business/service/impl/StationServiceImpl.java +++ b/business-service-dao/src/main/java/com/ho/business/service/impl/StationServiceImpl.java @@ -214,8 +214,8 @@ public class StationServiceImpl implements StationService { } @Override - public List selectByIds(List ids) { - List stations = stationMapper.selectByIds(ids); + public List selectByIds(List ids,String lang) { + List stations = stationMapper.selectByIds(ids,lang); List stationRespVOS = getStationRespVOS(stations); if (stationRespVOS != null) { for (StationRespVO stationRespVO : stationRespVOS) { @@ -237,8 +237,8 @@ public class StationServiceImpl implements StationService { } @Override - public List selectStationsByIds(List ids) { - List stations = stationMapper.selectByIds(ids); + public List selectStationsByIds(List ids,String lang) { + List stations = stationMapper.selectByIds(ids,lang); return stations; } diff --git a/business-service-dao/src/main/resources/mapper/StationMapper.xml b/business-service-dao/src/main/resources/mapper/StationMapper.xml index 1d54dd5..96b99d2 100644 --- a/business-service-dao/src/main/resources/mapper/StationMapper.xml +++ b/business-service-dao/src/main/resources/mapper/StationMapper.xml @@ -9,7 +9,7 @@ id ,pid,group_id,dept_id,address,longitude,latitude,capacity,rate_power, 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, electricity_type,customer_type,voltage_level,batch_number @@ -17,7 +17,7 @@ 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, + 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 @@ -25,7 +25,7 @@ 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, + 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 @@ -33,7 +33,7 @@ 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, + 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 @@ -41,7 +41,7 @@ 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, + 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 @@ -49,7 +49,7 @@ 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, + 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 @@ -57,7 +57,7 @@ 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, + 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 @@ -98,7 +98,29 @@