海外平台-数据全英文化

This commit is contained in:
2025-09-18 14:05:01 +08:00
parent e6b6ccd804
commit 83eff7d1ee
112 changed files with 2151 additions and 344 deletions

View File

@ -35,14 +35,23 @@
tem.elec_template_id elec_template_id, tem.status status, date_format(tem.update_time,'%Y-%m-%d %H:%i:%s') update_time, tem.p tem_p, tem.capacity, tem.soc_upper,
tem.soc_lower, cur.id id, cur.start_time start_time, cur.end_time end_time, cur.p p, cur.q q, cur.soc soc,cur.planning_template_id
from (
select id,template_no,template_name,elec_template_id,station_id,group_id,income,status,p,capacity,soc_upper,soc_lower,create_time,update_time
select id,template_no,
<choose>
<when test="lang != null and lang=='en_US' ">
template_name_en template_name,
</when>
<otherwise>
template_name,
</otherwise>
</choose>
elec_template_id,station_id,group_id,income,status,p,capacity,soc_upper,soc_lower,create_time,update_time
from planning_curve_template
<where>
<if test="temId != null and temId != ''">
id = #{temId}
</if>
<if test="templateName != null and templateName != ''">
and template_name like concat('%',#{templateName},'%')
and (template_name like concat('%',#{templateName},'%') or template_name_en like concat('%',#{templateName},'%'))
</if>
<if test="status != null">
and status = #{status}
@ -57,7 +66,7 @@
<if test="pageNum != null and pageSize != null" >
limit ${pageNum},${pageSize}
</if>
)tem left join planning_curve cur on cur.planning_template_id = tem.id
)tem left join planning_curve cur on cur.planning_template_id = tem.id
order by tem.create_time,tem.update_time desc, cur.start_time
</select>
@ -67,22 +76,22 @@
<!-- 新增模板 -->
<insert id="addPlanningCurveTemplate" parameterType="com.ho.business.entity.PlanningCurveTemplate">
insert into planning_curve_template ( id,template_no,template_name,<!-- elec_template_id, -->
<if test="stationId != null and stationId != ''">
station_id,
</if>
<if test="groupId != null and groupId != ''">
group_id,
</if>
income,status,p,capacity,soc_upper,soc_lower,create_time )
values( #{temId},#{templateNo},#{templateName},<!-- #{elecTemplateId}, -->
<if test="stationId != null and stationId != ''">
#{stationId},
</if>
<if test="groupId != null and groupId != ''">
#{groupId},
</if>
#{income},#{status},#{temP},#{capacity},#{socUpper},#{socLower},sysdate() )
insert into planning_curve_template ( id,template_no,template_name,template_name_en,<!-- elec_template_id, -->
<if test="stationId != null and stationId != ''">
station_id,
</if>
<if test="groupId != null and groupId != ''">
group_id,
</if>
income,status,p,capacity,soc_upper,soc_lower,create_time )
values( #{temId},#{templateNo},#{templateName},#{templateNameEn},<!-- #{elecTemplateId}, -->
<if test="stationId != null and stationId != ''">
#{stationId},
</if>
<if test="groupId != null and groupId != ''">
#{groupId},
</if>
#{income},#{status},#{temP},#{capacity},#{socUpper},#{socLower},sysdate() )
</insert>
<!-- 新增曲线 -->
@ -102,6 +111,9 @@
<if test="templateName != null and templateName != ''">
template_name = #{templateName},
</if>
<if test="templateNameEn != null and templateNameEn != ''">
template_name_en = #{templateNameEn},
</if>
<!--
<if test="elecTemplateId != null and elecTemplateId != ''">
elec_template_id = #{elecTemplateId},
@ -170,7 +182,16 @@
tem.elec_template_id elec_template_id, tem.status status, tem.update_time update_time, tem.p tem_p, tem.capacity, tem.soc_upper,
tem.soc_lower, cur.id id, cur.start_time start_time, cur.end_time end_time, ifnull(cur.p,0) p, ifnull(cur.q,0) q, cur.soc soc,cur.planning_template_id
from (
select id,template_no,template_name,elec_template_id,station_id,group_id,income,status,p,capacity,soc_upper,soc_lower,create_time,update_time
select id,template_no,
<choose>
<when test="lang != null and lang=='en_US' ">
template_name_en template_name,
</when>
<otherwise>
template_name,
</otherwise>
</choose>
elec_template_id,station_id,group_id,income,status,p,capacity,soc_upper,soc_lower,create_time,update_time
from planning_curve_template
<where>
<if test="temId != null and temId != ''">
@ -189,7 +210,7 @@
and group_id = #{groupId} or group_id is null
</if>
</where>
) tem left join planning_curve cur on cur.planning_template_id = tem.id
) tem left join planning_curve cur on cur.planning_template_id = tem.id
order by tem.create_time,tem.update_time desc, cur.start_time
</select>