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

This commit is contained in:
2026-01-16 11:06:00 +08:00
parent c50a953d4a
commit bbcea1bbee
2 changed files with 20 additions and 4 deletions

View File

@ -209,35 +209,42 @@ public class EarningsCalculateServiceImpl implements EarningsCalculateService {
ec.setMonth(time.substring(time.length() - 2, time.length())); ec.setMonth(time.substring(time.length() - 2, time.length()));
String reportName = CommonConstant.REPORT_NAME; String reportName = CommonConstant.REPORT_NAME;
String billName = CommonConstant.BILL_NAME; String billName = CommonConstant.BILL_NAME;
String name = station.getName();
if(CommonConstant.langTemp.EN_US.equals(earningsCalculateReq.getLang())){ if(CommonConstant.langTemp.EN_US.equals(earningsCalculateReq.getLang())){
reportName = CommonConstant.REPORT_NAME_EN; reportName = CommonConstant.REPORT_NAME_EN;
billName = CommonConstant.BILL_NAME_EN; billName = CommonConstant.BILL_NAME_EN;
name = station.getNameEn();
} }
if(CommonConstant.langTemp.FR_FR.equals(earningsCalculateReq.getLang())){ if(CommonConstant.langTemp.FR_FR.equals(earningsCalculateReq.getLang())){
reportName = CommonConstant.REPORT_NAME_FRA; reportName = CommonConstant.REPORT_NAME_FRA;
billName = CommonConstant.BILL_NAME_FRA; billName = CommonConstant.BILL_NAME_FRA;
name = station.getNameFra();
} }
if(CommonConstant.langTemp.ES_ES.equals(earningsCalculateReq.getLang())){ if(CommonConstant.langTemp.ES_ES.equals(earningsCalculateReq.getLang())){
reportName = CommonConstant.REPORT_NAME_SPA; reportName = CommonConstant.REPORT_NAME_SPA;
billName = CommonConstant.BILL_NAME_SPA; billName = CommonConstant.BILL_NAME_SPA;
name = station.getNameSpa();
} }
if(CommonConstant.langTemp.AR_EG.equals(earningsCalculateReq.getLang())){ if(CommonConstant.langTemp.AR_EG.equals(earningsCalculateReq.getLang())){
reportName = CommonConstant.REPORT_NAME_ARA; reportName = CommonConstant.REPORT_NAME_ARA;
billName = CommonConstant.BILL_NAME_ARA; billName = CommonConstant.BILL_NAME_ARA;
name = station.getNameDe();
} }
if(CommonConstant.langTemp.DE_DE.equals(earningsCalculateReq.getLang())){ if(CommonConstant.langTemp.DE_DE.equals(earningsCalculateReq.getLang())){
reportName = CommonConstant.REPORT_NAME_DE; reportName = CommonConstant.REPORT_NAME_DE;
billName = CommonConstant.BILL_NAME_DE; billName = CommonConstant.BILL_NAME_DE;
name = station.getNamePl();
} }
if(CommonConstant.langTemp.PL_PL.equals(earningsCalculateReq.getLang())){ if(CommonConstant.langTemp.PL_PL.equals(earningsCalculateReq.getLang())){
reportName = CommonConstant.REPORT_NAME_PL; reportName = CommonConstant.REPORT_NAME_PL;
billName = CommonConstant.BILL_NAME_PL; billName = CommonConstant.BILL_NAME_PL;
name = station.getNameAra();
} }
// 电站名称(报表标题) // 电站名称(报表标题)
if (type == 0) { if (type == 0) {
ec.setStationName("( " + time + " ) "+reportName); ec.setStationName(name + "( " + time + " ) "+reportName);
} else { } else {
ec.setStationName("( " + time + " ) "+billName); ec.setStationName(name + "( " + time + " ) "+billName);
} }
ec.setList(list); ec.setList(list);
//充电收益 //充电收益

View File

@ -4,7 +4,16 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ho.business.mapper.StationMapper"> <mapper namespace="com.ho.business.mapper.StationMapper">
<sql id="Base_Column_List_All">
id
,pid,group_id,dept_id,address,longitude,latitude,capacity,rate_power,
name,name_en,name_fra,name_spa,name_de,name_pl,name_ara,
nation,nation_en,nation_fra,nation_spa,nation_de,nation_pl,nation_ara,
province,province_en,province_fra,province_spa,province_de,province_pl,province_ara,
status,type,create_time,contact,contact_details,grid_time,
update_time,deleted,is_enable,cabin_num,district,ad_code,is_daily_count,topology_type,cupboard_type,plan_version,inverter_flag,pv_power,icc_id,province,city,
electricity_type,customer_type,voltage_level,batch_number
</sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id id
,pid,group_id,dept_id,address,longitude,latitude,capacity,rate_power, ,pid,group_id,dept_id,address,longitude,latitude,capacity,rate_power,
@ -91,7 +100,7 @@
<select id="selectByPrimaryKey" resultType="com.ho.business.entity.Station"> <select id="selectByPrimaryKey" resultType="com.ho.business.entity.Station">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List_All"/>
from station from station
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</select> </select>