添加英文大屏接口修改

This commit is contained in:
2026-03-07 11:14:02 +08:00
parent b8a3f9e0f9
commit 21a3c2f9cf
12 changed files with 87 additions and 47 deletions

View File

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

View File

@ -62,7 +62,7 @@ public interface IargeScreenShowService {
* @param stationIds
* @return
*/
List<Subdata> getCommonRegionList(List<Integer> stationIds);
List<Subdata> getCommonRegionList(List<Integer> stationIds,String lang);
/**
* 获取节能减排数据
@ -90,27 +90,27 @@ public interface IargeScreenShowService {
* 查询收益按电站分组
* @return
*/
List<Subdata> getCommonProfit(String beginString, String endString,List<Integer> stationIds);
List<Subdata> getCommonProfit(String beginString, String endString,List<Integer> stationIds,String lang);
/**
* 通用系统转换率
* @param stationIds
* @return
*/
List<Subdata> getCommonEfficiencyDate(List<Integer> stationIds);
List<Subdata> getCommonEfficiencyDate(List<Integer> stationIds,String lang);
/**
* 获取统计电站信息
* @param stationIds
* @return
*/
List<Station> getCountStations(List<Integer> stationIds);
List<Station> getCountStations(List<Integer> stationIds,String lang);
/**
* 通用装机容量倒排
* @return
*/
List<Subdata> getCommonCapacity(List<Integer> stationIds);
List<Subdata> getCommonCapacity(List<Integer> stationIds,String lang);
/**
* 通用根据天获取告警数目曲线

View File

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

View File

@ -1623,7 +1623,7 @@ public class DeviceServiceImpl implements DeviceService {
}
}else if(CommonConstant.THREE.equals(vo.getType())){
//导出电站数据
List<Station> list = stationService.selectStationsByIds(vo.getStationIds());
List<Station> list = stationService.selectStationsByIds(vo.getStationIds(),null);
String fileName = "station";
String sheetName = "data";
try {

View File

@ -1295,17 +1295,17 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
if (stationIds == null) {
return new AnnualOverviewResp();
}
List<Station> list = stationService.selectStationsByIds(stationIds);
List<Station> list = stationService.selectStationsByIds(stationIds,null);
AnnualOverviewResp annualOverviewResp = getOverviewDatas(list);
return annualOverviewResp;
}
@Override
public List<Subdata> getCommonRegionList(List<Integer> stationIds) {
public List<Subdata> getCommonRegionList(List<Integer> stationIds,String lang) {
if (stationIds == null) {
return new ArrayList<>();
}
List<Station> list = getCountStations(stationIds);
List<Station> list = getCountStations(stationIds,lang);
List<Subdata> regionList = new ArrayList<>();
Map<String, List<Station>> provinceMap = list.stream().filter(i -> i.getProvince() != null).collect(Collectors.groupingBy(Station::getProvince));
if (provinceMap.size() > CommonConstant.ONE) {
@ -1356,7 +1356,7 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
if (stationIds == null) {
return new EnergySavingRespVo();
}
List<Station> list = getCountStations(stationIds);
List<Station> list = getCountStations(stationIds,null);
return getEnergySavingRespVo(list);
}
@ -1365,7 +1365,7 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
if (stationIds == null) {
return new ArrayList<>();
}
List<Station> list = getCountStations(stationIds);
List<Station> list = getCountStations(stationIds,null);
return getProfitCurve(vo, list);
}
@ -1374,16 +1374,16 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
if (stationIds == null) {
return new ArrayList<>();
}
return getAnnualChartValues(getCountStations(stationIds));
return getAnnualChartValues(getCountStations(stationIds,null));
}
@Override
public List<Subdata> getCommonProfit(String beginString, String endString, List<Integer> stationIds) {
public List<Subdata> getCommonProfit(String beginString, String endString, List<Integer> stationIds,String lang) {
List<Subdata> subdata = new ArrayList<>();
if (stationIds == null) {
return subdata;
}
List<Station> countStations = getCountStations(stationIds);
List<Station> countStations = getCountStations(stationIds,lang);
if (countStations != null && !countStations.isEmpty()) {
if (countStations.size() >= CommonConstant.FIVE) {
subdata = getSubdata(beginString, endString, countStations);
@ -1401,12 +1401,12 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
}
@Override
public List<Subdata> getCommonEfficiencyDate(List<Integer> stationIds) {
public List<Subdata> getCommonEfficiencyDate(List<Integer> stationIds,String lang) {
List<Subdata> subdata = new ArrayList<>();
if (stationIds == null) {
return subdata;
}
List<Station> countStations = getCountStations(stationIds);
List<Station> countStations = getCountStations(stationIds,lang);
if (countStations != null && !countStations.isEmpty()) {
subdata = getEfficiencyDate(countStations);
// if (countStations.size() >= CommonConstant.FIVE) {
@ -1718,17 +1718,17 @@ public class IargeScreenShowServiceImpl implements IargeScreenShowService {
* @return
*/
@Override
public List<Station> getCountStations(List<Integer> stationIds) {
List<Station> list = stationService.selectStationsByIds(stationIds);
public List<Station> getCountStations(List<Integer> stationIds,String lang) {
List<Station> list = stationService.selectStationsByIds(stationIds,lang);
List<Station> oneList = list.stream().filter(i -> CommonConstant.ONE.equals(i.getStatus())).collect(Collectors.toList());
return oneList;
}
@Override
public List<Subdata> getCommonCapacity(List<Integer> stationIds) {
public List<Subdata> getCommonCapacity(List<Integer> stationIds,String lang) {
List<Subdata> subDataList = new ArrayList<>();
if (stationIds != null) {
List<Station> stations = getCountStations(stationIds);
List<Station> stations = getCountStations(stationIds,lang);
subDataList = getSubdataList(stations);
}
return subDataList;

View File

@ -557,7 +557,7 @@ public class OpenStationServiceImpl implements OpenStationService {
public void exportEleData(PcsStationReq req, HttpServletResponse response) {
try {
List<Integer> stationIds = req.getStationIds();
List<Station> stations = stationService.selectStationsByIds(stationIds);
List<Station> stations = stationService.selectStationsByIds(stationIds,null);
Map<Integer, String> idNameMap = getStationMap(stations);
List<Map<String, Object>> sheetsList = new ArrayList<>();
//汇总
@ -685,7 +685,7 @@ public class OpenStationServiceImpl implements OpenStationService {
PageResult pageResult = new PageResult<>();
try {
List<Integer> stationIds = req.getStationIds();
List<Station> stations = stationService.selectStationsByIds(stationIds);
List<Station> stations = stationService.selectStationsByIds(stationIds,null);
Map<Integer, String> idNameMap = stations.stream().collect(Collectors.toMap(Station::getId, Station::getName));
List<PcsElecData> result = new ArrayList<>();
String name = null;
@ -720,7 +720,7 @@ public class OpenStationServiceImpl implements OpenStationService {
Object obj = new Object();
try {
List<Integer> stationIds = req.getStationIds();
List<Station> stations = stationService.selectStationsByIds(stationIds);
List<Station> stations = stationService.selectStationsByIds(stationIds,null);
Map<Integer, String> idNameMap = getStationMap(stations);
//汇总
BigDecimal charge = BigDecimal.ZERO;
@ -857,7 +857,7 @@ public class OpenStationServiceImpl implements OpenStationService {
Object obj = new Object();
try {
List<Integer> stationIds = req.getStationIds();
List<Station> stations = stationService.selectStationsByIds(stationIds);
List<Station> stations = stationService.selectStationsByIds(stationIds,null);
Map<Integer, String> idNameMap = getStationMap(stations);
//汇总
String segmentType = req.getSegmentType();

View File

@ -464,7 +464,7 @@ public class OutApiServiceImpl implements OutApiService {
ids.add(418);//新凤鸣电站
ids.add(551);//江苏暨阳电力科技发展有限公司1号柜
ids.add(564);//江苏暨阳电力科技发展有限公司2号柜
List<Station> stations = stationService.selectStationsByIds(ids);
List<Station> stations = stationService.selectStationsByIds(ids,null);
String deviceType = DeviceTypeConstant.PCS;
for (Station station : stations) {
//先删除站的当日数据

View File

@ -213,7 +213,7 @@ public class StationServiceImpl implements StationService {
@Override
public List<StationRespVO> selectByIds(List<Integer> ids) {
List<Station> stations = stationMapper.selectByIds(ids);
List<Station> stations = stationMapper.selectByIds(ids,null);
List<StationRespVO> stationRespVOS = getStationRespVOS(stations);
if (stationRespVOS != null) {
for (StationRespVO stationRespVO : stationRespVOS) {
@ -235,8 +235,8 @@ public class StationServiceImpl implements StationService {
}
@Override
public List<Station> selectStationsByIds(List<Integer> ids) {
List<Station> stations = stationMapper.selectByIds(ids);
public List<Station> selectStationsByIds(List<Integer> ids,String lang) {
List<Station> stations = stationMapper.selectByIds(ids,lang);
return stations;
}

View File

@ -16,6 +16,18 @@
electricity_type,customer_type,voltage_level,batch_number,nation
</sql>
<sql id="Base_Column_List1">
id
,pid,group_id,dept_id,
name_en `name`,name_en,address,address_en,longitude,
latitude,capacity,rate_power,
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,icc_id,province_en province,city,
electricity_type,customer_type,voltage_level,batch_number,nation
</sql>
<select id="selectByName" resultType="com.ho.business.entity.Station">
select
<include refid="Base_Column_List"/>
@ -50,7 +62,14 @@
<select id="selectByIds" resultType="com.ho.business.entity.Station">
select
<include refid="Base_Column_List"/>
<choose>
<when test="lang != null and lang=='en_US' ">
<include refid="Base_Column_List1"></include>
</when>
<otherwise>
<include refid="Base_Column_List"></include>
</otherwise>
</choose>
from station
<where>
<if test="ids != null and ids.size() != 0">