多语言(英语、法语、西班牙语、德语、波兰语、阿拉伯语)处理
This commit is contained in:
@ -14,10 +14,14 @@
|
||||
</insert>
|
||||
|
||||
<insert id="insertList" keyColumn="id" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into curve_config (curve_type,curve_name,curve_name_en,auxiliary_value,is_hide,station_id,permission_id,page_location,device_id,sort)
|
||||
insert into curve_config (curve_type,curve_name,curve_name_en,
|
||||
curve_name_fra,curve_name_spa,curve_name_de,curve_name_pl,curve_name_ara,
|
||||
auxiliary_value,is_hide,station_id,permission_id,page_location,device_id,sort)
|
||||
values
|
||||
<foreach item="item" collection="list" index="index" separator=",">
|
||||
(#{item.curveType},#{item.curveName},#{item.curveNameEn},#{item.auxiliaryValue},#{item.isHide},#{item.stationId},#{item.permissionId},#{item.pageLocation},#{item.deviceId},#{item.sort})
|
||||
(#{item.curveType},#{item.curveName},#{item.curveNameEn},
|
||||
#{item.curveNameFra},#{item.curveNameSpa},#{item.curveNameDe},#{item.curveNamePl},#{item.curveNameAra},
|
||||
#{item.auxiliaryValue},#{item.isHide},#{item.stationId},#{item.permissionId},#{item.pageLocation},#{item.deviceId},#{item.sort})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
@ -39,6 +43,21 @@
|
||||
<when test="lang != null and lang=='en_US' ">
|
||||
c.curve_name_en curveName,
|
||||
</when>
|
||||
<when test="lang != null and lang=='fr_FR' ">
|
||||
c.curve_name_fra curveName,
|
||||
</when>
|
||||
<when test="lang != null and lang=='es_ES' ">
|
||||
c.curve_name_spa curveName,
|
||||
</when>
|
||||
<when test="lang != null and lang=='de_DE' ">
|
||||
c.curve_name_de curveName,
|
||||
</when>
|
||||
<when test="lang != null and lang=='pl_PL' ">
|
||||
c.curve_name_pl curveName,
|
||||
</when>
|
||||
<when test="lang != null and lang=='ar_EG' ">
|
||||
c.curve_name_ara curveName,
|
||||
</when>
|
||||
<otherwise>
|
||||
c.curve_name,
|
||||
</otherwise>
|
||||
@ -86,10 +105,14 @@
|
||||
</delete>
|
||||
|
||||
<insert id="updateList" keyColumn="id" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into curve_config (id,curve_type,curve_name,auxiliary_value,is_hide,station_id,permission_id,page_location,device_id,sort)
|
||||
insert into curve_config (id,curve_type,curve_name,auxiliary_value,is_hide,
|
||||
curve_name_en,curve_name_fra,curve_name_spa,curve_name_de,curve_name_pl,curve_name_ara,
|
||||
station_id,permission_id,page_location,device_id,sort)
|
||||
values
|
||||
<foreach item="item" collection="list" index="index" separator=",">
|
||||
(#{item.id},#{item.curveType},#{item.curveName},#{item.auxiliaryValue},#{item.isHide},#{item.stationId},#{item.permissionId},#{item.pageLocation},#{item.deviceId},#{item.sort})
|
||||
(#{item.id},#{item.curveType},#{item.curveName},
|
||||
#{item.curveNameEn},#{item.curveNameFra},#{item.curveNameSpa},#{item.curveNameDe},#{item.curveNamePl},#{item.curveNameAra},
|
||||
#{item.auxiliaryValue},#{item.isHide},#{item.stationId},#{item.permissionId},#{item.pageLocation},#{item.deviceId},#{item.sort})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
|
||||
@ -32,6 +32,36 @@
|
||||
producer,serial_no,status,device_json,`virtual`,from_id,hide,flow_direction,producer_type,unit_type
|
||||
</sql>
|
||||
|
||||
<sql id="Base_Column_List2">
|
||||
id,group_id,dept_id,src_id,pid,category,
|
||||
station_id,device_name_fra deviceName,device_type,
|
||||
producer,serial_no,status,device_json,`virtual`,from_id,hide,flow_direction,producer_type,unit_type
|
||||
</sql>
|
||||
|
||||
<sql id="Base_Column_List3">
|
||||
id,group_id,dept_id,src_id,pid,category,
|
||||
station_id,device_name_spa deviceName,device_type,
|
||||
producer,serial_no,status,device_json,`virtual`,from_id,hide,flow_direction,producer_type,unit_type
|
||||
</sql>
|
||||
|
||||
<sql id="Base_Column_List4">
|
||||
id,group_id,dept_id,src_id,pid,category,
|
||||
station_id,device_name_de deviceName,device_type,
|
||||
producer,serial_no,status,device_json,`virtual`,from_id,hide,flow_direction,producer_type,unit_type
|
||||
</sql>
|
||||
|
||||
<sql id="Base_Column_List5">
|
||||
id,group_id,dept_id,src_id,pid,category,
|
||||
station_id,device_name_pl deviceName,device_type,
|
||||
producer,serial_no,status,device_json,`virtual`,from_id,hide,flow_direction,producer_type,unit_type
|
||||
</sql>
|
||||
|
||||
<sql id="Base_Column_List6">
|
||||
id,group_id,dept_id,src_id,pid,category,
|
||||
station_id,device_name_ara deviceName,device_type,
|
||||
producer,serial_no,status,device_json,`virtual`,from_id,hide,flow_direction,producer_type,unit_type
|
||||
</sql>
|
||||
|
||||
<select id="selectByInfo" resultType="com.ho.business.vo.resp.DeviceRespVO">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
@ -91,6 +121,21 @@
|
||||
<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>
|
||||
@ -276,6 +321,21 @@
|
||||
<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>
|
||||
@ -355,6 +415,11 @@
|
||||
<if test="stationId != null">station_id,</if>
|
||||
<if test="deviceName != null">device_name,</if>
|
||||
<if test="deviceNameEn != null">device_name_en,</if>
|
||||
<if test="deviceNameFra != null">device_name_fra,</if>
|
||||
<if test="deviceNameSpa != null">device_name_spa,</if>
|
||||
<if test="deviceNameDe != null">device_name_de,</if>
|
||||
<if test="deviceNamePl != null">device_name_pl,</if>
|
||||
<if test="deviceNameAra != null">device_name_ara,</if>
|
||||
<if test="deviceType != null">device_type,</if>
|
||||
<if test="producer != null">producer,</if>
|
||||
<if test="serialNo != null">serial_no,</if>
|
||||
@ -373,6 +438,11 @@
|
||||
<if test="stationId != null">#{stationId,jdbcType=INTEGER},</if>
|
||||
<if test="deviceName != null">#{deviceName,jdbcType=VARCHAR},</if>
|
||||
<if test="deviceNameEn != null">#{deviceNameEn,jdbcType=VARCHAR},</if>
|
||||
<if test="deviceNameFra != null">#{deviceNameFra,jdbcType=VARCHAR},</if>
|
||||
<if test="deviceNameSpa != null">#{deviceNameSpa,jdbcType=VARCHAR},</if>
|
||||
<if test="deviceNameDe != null">#{deviceNameDe,jdbcType=VARCHAR},</if>
|
||||
<if test="deviceNamePl != null">#{deviceNamePl,jdbcType=VARCHAR},</if>
|
||||
<if test="deviceNameAra != null">#{deviceNameAra,jdbcType=VARCHAR},</if>
|
||||
<if test="deviceType != null">#{deviceType,jdbcType=VARCHAR},</if>
|
||||
<if test="producer != null">#{producer,jdbcType=VARCHAR},</if>
|
||||
<if test="serialNo != null">#{serialNo,jdbcType=VARCHAR},</if>
|
||||
@ -388,14 +458,16 @@
|
||||
<insert id="insertBatch">
|
||||
INSERT INTO device
|
||||
(group_id,dept_id,src_id,pid,category,
|
||||
station_id,device_name,device_name_en,device_type,
|
||||
serial_no,status,`virtual`,from_id,create_time)
|
||||
station_id,device_name,device_name_en,
|
||||
device_name_fra,device_name_spa,device_name_de,device_name_pl,device_name_ara,
|
||||
device_type,serial_no,status,`virtual`,from_id,create_time)
|
||||
VALUES
|
||||
<foreach item="item" collection="list" index="index" separator=",">
|
||||
(
|
||||
#{item.groupId},#{item.deptId},#{item.srcId},#{item.pid}
|
||||
,#{item.category} ,#{item.stationId},#{item.deviceName},#{item.deviceNameEn},#{item.deviceType}
|
||||
,#{item.serialNo},#{item.status},#{item.virtual},#{item.fromId},#{item.createTime}
|
||||
,#{item.category} ,#{item.stationId},#{item.deviceName},#{item.deviceNameEn}
|
||||
,#{item.deviceNameFra},#{item.deviceNameSpa},#{item.deviceNameDe},#{item.deviceNamePl},#{item.deviceNameAra}
|
||||
,#{item.deviceType},#{item.serialNo},#{item.status},#{item.virtual},#{item.fromId},#{item.createTime}
|
||||
)
|
||||
</foreach>
|
||||
|
||||
|
||||
@ -38,6 +38,41 @@
|
||||
max_value,min_value,specified_value,offset_value,factor,unit,
|
||||
data_type,filter_type
|
||||
</sql>
|
||||
<sql id="Base_Column_List2">
|
||||
id
|
||||
,device_type_id,device_type,
|
||||
device_type_name,col,col_fra colName,col_en,sens_type,is_show,is_save,
|
||||
max_value,min_value,specified_value,offset_value,factor,unit,
|
||||
data_type,filter_type
|
||||
</sql>
|
||||
<sql id="Base_Column_List3">
|
||||
id
|
||||
,device_type_id,device_type,
|
||||
device_type_name,col,col_spa colName,col_en,sens_type,is_show,is_save,
|
||||
max_value,min_value,specified_value,offset_value,factor,unit,
|
||||
data_type,filter_type
|
||||
</sql>
|
||||
<sql id="Base_Column_List4">
|
||||
id
|
||||
,device_type_id,device_type,
|
||||
device_type_name,col,col_de colName,col_en,sens_type,is_show,is_save,
|
||||
max_value,min_value,specified_value,offset_value,factor,unit,
|
||||
data_type,filter_type
|
||||
</sql>
|
||||
<sql id="Base_Column_List5">
|
||||
id
|
||||
,device_type_id,device_type,
|
||||
device_type_name,col,col_pl colName,col_en,sens_type,is_show,is_save,
|
||||
max_value,min_value,specified_value,offset_value,factor,unit,
|
||||
data_type,filter_type
|
||||
</sql>
|
||||
<sql id="Base_Column_List6">
|
||||
id
|
||||
,device_type_id,device_type,
|
||||
device_type_name,col,col_ara colName,col_en,sens_type,is_show,is_save,
|
||||
max_value,min_value,specified_value,offset_value,factor,unit,
|
||||
data_type,filter_type
|
||||
</sql>
|
||||
|
||||
<sql id="Base_List">
|
||||
id
|
||||
@ -85,6 +120,21 @@
|
||||
<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>
|
||||
@ -122,6 +172,21 @@
|
||||
<when test="deviceTypeColReqVO.lang != null and deviceTypeColReqVO.lang=='en_US' ">
|
||||
<include refid="Base_Column_List1"/>
|
||||
</when>
|
||||
<when test="deviceTypeColReqVO.lang != null and deviceTypeColReqVO.lang=='fr_FR' ">
|
||||
<include refid="Base_Column_List2"/>
|
||||
</when>
|
||||
<when test="deviceTypeColReqVO.lang != null and deviceTypeColReqVO.lang=='es_ES' ">
|
||||
<include refid="Base_Column_List3"/>
|
||||
</when>
|
||||
<when test="deviceTypeColReqVO.lang != null and deviceTypeColReqVO.lang=='de_DE' ">
|
||||
<include refid="Base_Column_List4"/>
|
||||
</when>
|
||||
<when test="deviceTypeColReqVO.lang != null and deviceTypeColReqVO.lang=='pl_PL' ">
|
||||
<include refid="Base_Column_List5"/>
|
||||
</when>
|
||||
<when test="deviceTypeColReqVO.lang != null and deviceTypeColReqVO.lang=='ar_EG' ">
|
||||
<include refid="Base_Column_List6"/>
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="Base_Column_List"/>
|
||||
</otherwise>
|
||||
@ -207,6 +272,21 @@
|
||||
<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>
|
||||
@ -230,6 +310,21 @@
|
||||
<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>
|
||||
|
||||
@ -19,12 +19,16 @@
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertList" keyColumn="id" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into dynamic_config (station_id,src_id,device_type,col,col_name,col_name_en,sens_type,permission_id,page_location,div_location,sort,device_id)
|
||||
insert into dynamic_config (station_id,src_id,device_type,col,col_name,col_name_en,
|
||||
col_name_fra,col_name_spa,col_name_de,col_name_pl,col_name_ara,
|
||||
sens_type,permission_id,page_location,div_location,sort,device_id)
|
||||
values
|
||||
<foreach item="item" collection="list" index="index" separator=",">
|
||||
(
|
||||
#{item.stationId},#{item.srcId},#{item.deviceType},#{item.col},
|
||||
#{item.colName},#{item.colNameEn},#{item.sensType},#{item.permissionId},#{item.pageLocation},#{item.divLocation},#{item.sort},#{item.deviceId}
|
||||
#{item.colName},#{item.colNameEn},
|
||||
#{item.colNameFra},#{item.colNameSpa},#{item.colNameDe},#{item.colNamePl},#{item.colNameAra},
|
||||
#{item.sensType},#{item.permissionId},#{item.pageLocation},#{item.divLocation},#{item.sort},#{item.deviceId}
|
||||
)
|
||||
</foreach>
|
||||
|
||||
|
||||
@ -28,19 +28,53 @@
|
||||
model_name_en model_name,src_id,col,station_id,device_type,
|
||||
col_name_en col_name
|
||||
</sql>
|
||||
<sql id="Base_Column_List2">
|
||||
id
|
||||
,user_id,model_id,
|
||||
model_name_fra model_name,src_id,col,station_id,device_type,
|
||||
col_name_en col_name
|
||||
</sql>
|
||||
<sql id="Base_Column_List3">
|
||||
id
|
||||
,user_id,model_id,
|
||||
model_name_spa model_name,src_id,col,station_id,device_type,
|
||||
col_name_en col_name
|
||||
</sql>
|
||||
<sql id="Base_Column_List4">
|
||||
id
|
||||
,user_id,model_id,
|
||||
model_name_de model_name,src_id,col,station_id,device_type,
|
||||
col_name_en col_name
|
||||
</sql>
|
||||
<sql id="Base_Column_List5">
|
||||
id
|
||||
,user_id,model_id,
|
||||
model_name_pl model_name,src_id,col,station_id,device_type,
|
||||
col_name_en col_name
|
||||
</sql>
|
||||
<sql id="Base_Column_List6">
|
||||
id
|
||||
,user_id,model_id,
|
||||
model_name_ara model_name,src_id,col,station_id,device_type,
|
||||
col_name_en col_name
|
||||
</sql>
|
||||
|
||||
|
||||
<insert id="insertBatch">
|
||||
INSERT INTO his_curve_relate
|
||||
(user_id,model_id,
|
||||
model_name,model_name_en,src_id,col,station_id,device_type,
|
||||
col_name,col_name_en)
|
||||
model_name,model_name_en,
|
||||
model_name_fra,model_name_spa,model_name_de,model_name_pl,model_name_ara,
|
||||
src_id,col,station_id,device_type,
|
||||
col_name,col_name_en,
|
||||
col_name_fra,col_name_spa,col_name_de,col_name_pl, col_name_ara)
|
||||
VALUES
|
||||
<foreach item="item" collection="list" index="index" separator=",">
|
||||
(
|
||||
#{item.userId},#{item.modelId},#{item.modelName},#{item.modelNameEn},#{item.srcId}
|
||||
,#{item.col} ,#{item.stationId},#{item.deviceType}
|
||||
,#{item.colName},#{item.colName}
|
||||
#{item.userId},#{item.modelId},#{item.modelName},#{item.modelNameEn},
|
||||
#{item.modelNameFra},#{item.modelNameSpa},#{item.modelNameDe},#{item.modelNamePl},#{item.modelNameAra},
|
||||
#{item.srcId},#{item.col} ,#{item.stationId},#{item.deviceType}
|
||||
,#{item.colName},#{item.colNameEn},#{item.colNameFra},#{item.colNameSpa},#{item.colNameDe},#{item.colNamePl},#{item.colNameAra}
|
||||
)
|
||||
</foreach>
|
||||
|
||||
@ -52,6 +86,21 @@
|
||||
<when test="hisCurveRelate.lang != null and hisCurveRelate.lang=='en_US' ">
|
||||
<include refid="Base_Column_List1"/>
|
||||
</when>
|
||||
<when test="hisCurveRelate.lang != null and hisCurveRelate.lang=='fr_FR' ">
|
||||
<include refid="Base_Column_List2"/>
|
||||
</when>
|
||||
<when test="hisCurveRelate.lang != null and hisCurveRelate.lang=='es_ES' ">
|
||||
<include refid="Base_Column_List3"/>
|
||||
</when>
|
||||
<when test="hisCurveRelate.lang != null and hisCurveRelate.lang=='de_DE' ">
|
||||
<include refid="Base_Column_List4"/>
|
||||
</when>
|
||||
<when test="hisCurveRelate.lang != null and hisCurveRelate.lang=='pl_PL' ">
|
||||
<include refid="Base_Column_List5"/>
|
||||
</when>
|
||||
<when test="hisCurveRelate.lang != null and hisCurveRelate.lang=='ar_EG' ">
|
||||
<include refid="Base_Column_List6"/>
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="Base_Column_List"/>
|
||||
</otherwise>
|
||||
|
||||
@ -11,6 +11,21 @@
|
||||
<when test="lang != null and lang=='en_US' ">
|
||||
device_name_en as label
|
||||
</when>
|
||||
<when test="lang != null and lang=='fr_FR' ">
|
||||
device_name_fra as label
|
||||
</when>
|
||||
<when test="lang != null and lang=='es_ES' ">
|
||||
device_name_spa as label
|
||||
</when>
|
||||
<when test="lang != null and lang=='de_DE' ">
|
||||
device_name_de as label
|
||||
</when>
|
||||
<when test="lang != null and lang=='pl_PL' ">
|
||||
device_name_pl as label
|
||||
</when>
|
||||
<when test="lang != null and lang=='ar_EG' ">
|
||||
device_name_ara as label
|
||||
</when>
|
||||
<otherwise>
|
||||
device_name as label
|
||||
</otherwise>
|
||||
@ -24,6 +39,21 @@
|
||||
<when test="lang != null and lang=='en_US' ">
|
||||
template_name_en as label
|
||||
</when>
|
||||
<when test="lang != null and lang=='fr_FR' ">
|
||||
template_name_fra as label
|
||||
</when>
|
||||
<when test="lang != null and lang=='es_ES' ">
|
||||
template_name_spa as label
|
||||
</when>
|
||||
<when test="lang != null and lang=='de_DE' ">
|
||||
template_name_de as label
|
||||
</when>
|
||||
<when test="lang != null and lang=='pl_PL' ">
|
||||
template_name_pl as label
|
||||
</when>
|
||||
<when test="lang != null and lang=='ar_EG' ">
|
||||
template_name_ara as label
|
||||
</when>
|
||||
<otherwise>
|
||||
template_name as label
|
||||
</otherwise>
|
||||
@ -127,10 +157,15 @@
|
||||
|
||||
<insert id="planCurveOperationRecord" useGeneratedKeys="true" keyColumn="id" keyProperty="id" parameterType="com.ho.business.vo.resp.planningCurve.PlanningIssueVo">
|
||||
insert into planning_curve_operation_record
|
||||
(user_id,user_name,operate_time,operate_content,operate_content_en,operate_result,operate_result_en,effective_time,status,previous_planning_curve,latest_planning_curve,station_id)
|
||||
(user_id,user_name,operate_time,operate_content,operate_content_en,
|
||||
operate_content_fra,operate_content_spa,operate_content_de,operate_content_pl,operate_content_ara,
|
||||
operate_result,operate_result_en,operate_result_fra,operate_result_spa,operate_result_de,operate_result_pl,operate_result_ara,
|
||||
effective_time,status,previous_planning_curve,latest_planning_curve,station_id)
|
||||
values (
|
||||
#{condition.userId},#{condition.userName},#{condition.operateTime},#{condition.operateContent},#{condition.operateContentEn},
|
||||
#{condition.operateResult},#{condition.operateResultEn},
|
||||
#{condition.userId},#{condition.userName},#{condition.operateTime},#{condition.operateContent},
|
||||
#{condition.operateContentEn},#{condition.operateContentFra},#{condition.operateContentSpa},#{condition.operateContentDe},#{condition.operateContentPl},#{condition.operateContentAra},
|
||||
#{condition.operateResult},
|
||||
#{condition.operateResultEn},#{condition.operateResultFra},#{condition.operateResultSpa},#{condition.operateResultDe},#{condition.operateResultPl},#{condition.operateResultAra},
|
||||
#{condition.effectiveTime},#{condition.status},#{condition.previousPlanningCurve},#{condition.latestPlanningCurve},#{condition.stationId}
|
||||
)
|
||||
</insert>
|
||||
@ -148,6 +183,21 @@
|
||||
<when test="lang != null and lang=='en_US' ">
|
||||
operate_content_en operate_content,
|
||||
</when>
|
||||
<when test="lang != null and lang=='fr_FR' ">
|
||||
operate_content_fra operate_content,
|
||||
</when>
|
||||
<when test="lang != null and lang=='es_ES' ">
|
||||
operate_content_spa operate_content,
|
||||
</when>
|
||||
<when test="lang != null and lang=='de_DE' ">
|
||||
operate_content_de operate_content,
|
||||
</when>
|
||||
<when test="lang != null and lang=='pl_PL' ">
|
||||
operate_content_pl operate_content,
|
||||
</when>
|
||||
<when test="lang != null and lang=='ar_EG' ">
|
||||
operate_content_ara operate_content,
|
||||
</when>
|
||||
<otherwise>
|
||||
operate_content,
|
||||
</otherwise>
|
||||
@ -156,6 +206,21 @@
|
||||
<when test="lang != null and lang=='en_US' ">
|
||||
operate_result_en operate_result,
|
||||
</when>
|
||||
<when test="lang != null and lang=='fr_FR' ">
|
||||
operate_result_fra operate_content,
|
||||
</when>
|
||||
<when test="lang != null and lang=='es_ES' ">
|
||||
operate_result_spa operate_content,
|
||||
</when>
|
||||
<when test="lang != null and lang=='de_DE' ">
|
||||
operate_result_de operate_content,
|
||||
</when>
|
||||
<when test="lang != null and lang=='pl_PL' ">
|
||||
operate_result_pl operate_content,
|
||||
</when>
|
||||
<when test="lang != null and lang=='ar_EG' ">
|
||||
operate_result_ara operate_content,
|
||||
</when>
|
||||
<otherwise>
|
||||
operate_result,
|
||||
</otherwise>
|
||||
|
||||
@ -40,6 +40,21 @@
|
||||
<when test="lang != null and lang=='en_US' ">
|
||||
template_name_en template_name,
|
||||
</when>
|
||||
<when test="lang != null and lang=='fr_FR' ">
|
||||
template_name_fra template_name,
|
||||
</when>
|
||||
<when test="lang != null and lang=='es_ES' ">
|
||||
template_name_spa template_name,
|
||||
</when>
|
||||
<when test="lang != null and lang=='de_DE' ">
|
||||
template_name_de template_name,
|
||||
</when>
|
||||
<when test="lang != null and lang=='pl_PL' ">
|
||||
template_name_pl template_name,
|
||||
</when>
|
||||
<when test="lang != null and lang=='ar_EG' ">
|
||||
template_name_ara template_name,
|
||||
</when>
|
||||
<otherwise>
|
||||
template_name,
|
||||
</otherwise>
|
||||
@ -51,7 +66,14 @@
|
||||
id = #{temId}
|
||||
</if>
|
||||
<if test="templateName != null and templateName != ''">
|
||||
and (template_name like concat('%',#{templateName},'%') or template_name_en like concat('%',#{templateName},'%'))
|
||||
and (template_name like concat('%',#{templateName},'%') or
|
||||
template_name_en like concat('%',#{templateName},'%') or
|
||||
template_name_fra like concat('%',#{templateName},'%')
|
||||
template_name_spa like concat('%',#{templateName},'%')
|
||||
template_name_de like concat('%',#{templateName},'%')
|
||||
template_name_pl like concat('%',#{templateName},'%')
|
||||
template_name_ara like concat('%',#{templateName},'%')
|
||||
)
|
||||
</if>
|
||||
<if test="status != null">
|
||||
and status = #{status}
|
||||
@ -76,7 +98,8 @@
|
||||
|
||||
<!-- 新增模板 -->
|
||||
<insert id="addPlanningCurveTemplate" parameterType="com.ho.business.entity.PlanningCurveTemplate">
|
||||
insert into planning_curve_template ( id,template_no,template_name,template_name_en,<!-- elec_template_id, -->
|
||||
insert into planning_curve_template ( id,template_no,template_name,template_name_en,
|
||||
template_name_fra,template_name_spa,template_name_de,template_name_pl,template_name_ara,
|
||||
<if test="stationId != null and stationId != ''">
|
||||
station_id,
|
||||
</if>
|
||||
@ -84,7 +107,8 @@
|
||||
group_id,
|
||||
</if>
|
||||
income,status,p,capacity,soc_upper,soc_lower,create_time )
|
||||
values( #{temId},#{templateNo},#{templateName},#{templateNameEn},<!-- #{elecTemplateId}, -->
|
||||
values( #{temId},#{templateNo},#{templateName},#{templateNameEn},
|
||||
#{templateNameFra},#{templateNameSpa},#{templateNameDe},#{templateNamePl},#{templateNameAra},
|
||||
<if test="stationId != null and stationId != ''">
|
||||
#{stationId},
|
||||
</if>
|
||||
@ -114,6 +138,21 @@
|
||||
<if test="templateNameEn != null and templateNameEn != ''">
|
||||
template_name_en = #{templateNameEn},
|
||||
</if>
|
||||
<if test="templateNameFra != null and templateNameFra != ''">
|
||||
template_name_fra = #{templateNameFra},
|
||||
</if>
|
||||
<if test="templateNameSpa != null and templateNameSpa != ''">
|
||||
template_name_spa = #{templateNameSpa},
|
||||
</if>
|
||||
<if test="templateNameDe != null and templateNameDe != ''">
|
||||
template_name_de = #{templateNameDe},
|
||||
</if>
|
||||
<if test="templateNamePl != null and templateNamePl != ''">
|
||||
template_name_pl = #{templateNamePl},
|
||||
</if>
|
||||
<if test="templateNameAra != null and templateNameAra != ''">
|
||||
template_name_ara = #{templateNameAra},
|
||||
</if>
|
||||
<!--
|
||||
<if test="elecTemplateId != null and elecTemplateId != ''">
|
||||
elec_template_id = #{elecTemplateId},
|
||||
@ -187,6 +226,21 @@
|
||||
<when test="lang != null and lang=='en_US' ">
|
||||
template_name_en template_name,
|
||||
</when>
|
||||
<when test="lang != null and lang=='fr_FR' ">
|
||||
template_name_fra template_name,
|
||||
</when>
|
||||
<when test="lang != null and lang=='es_ES' ">
|
||||
template_name_spa template_name,
|
||||
</when>
|
||||
<when test="lang != null and lang=='de_DE' ">
|
||||
template_name_de template_name,
|
||||
</when>
|
||||
<when test="lang != null and lang=='pl_PL' ">
|
||||
template_name_pl template_name,
|
||||
</when>
|
||||
<when test="lang != null and lang=='ar_EG' ">
|
||||
template_name_ara template_name,
|
||||
</when>
|
||||
<otherwise>
|
||||
template_name,
|
||||
</otherwise>
|
||||
|
||||
@ -27,12 +27,19 @@
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertList" keyColumn="id" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into point_config (name,name_en,default_value,default_value_en,point_type,station_id,permission_id,page_location,div_location,sort,device_id,offset_value,factor)
|
||||
insert into point_config (name,name_en,
|
||||
name_fra,name_spa,name_de,name_pl,name_ara,
|
||||
default_value,default_value_en,
|
||||
default_value_fra,default_value_spa,default_value_de,default_value_pl,default_value_ara,
|
||||
point_type,station_id,permission_id,page_location,div_location,sort,device_id,offset_value,factor)
|
||||
values
|
||||
<foreach item="item" collection="list" index="index" separator=",">
|
||||
(
|
||||
#{item.name},#{item.nameEn},#{item.defaultValue},#{item.defaultValueEn},#{item.pointType},
|
||||
#{item.stationId},#{item.permissionId},#{item.pageLocation},#{item.divLocation},#{item.sort},#{item.deviceId},#{item.offsetValue},#{item.factor}
|
||||
#{item.name},#{item.nameEn},
|
||||
#{item.nameFra},#{item.nameSpa},#{item.nameDe},#{item.namePl},#{item.nameAra},
|
||||
#{item.defaultValue},#{item.defaultValueEn},
|
||||
#{item.defaultValueFra},#{item.defaultValueSpa},#{item.defaultValueDe},#{item.defaultValuePl},#{item.defaultValueAra},
|
||||
#{item.pointType},#{item.stationId},#{item.permissionId},#{item.pageLocation},#{item.divLocation},#{item.sort},#{item.deviceId},#{item.offsetValue},#{item.factor}
|
||||
)
|
||||
</foreach>
|
||||
|
||||
@ -53,14 +60,6 @@
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<update id="updateNameEnById">
|
||||
update ${tableName} set ${nameEn}=#{translateName} where id = #{id}
|
||||
</update>
|
||||
<select id="selectTableList" resultType="com.ho.business.vo.resp.dynamicConfig.PointConfigResp">
|
||||
select
|
||||
id,${name} name
|
||||
from ${tableName} where (${nameEn} is null or ${nameEn}='') and ${name} is not null
|
||||
</select>
|
||||
|
||||
<select id="selectByParam" resultType="com.ho.business.vo.resp.dynamicConfig.PointConfigResp">
|
||||
SELECT
|
||||
@ -104,6 +103,31 @@
|
||||
d.col_name_en col_name,
|
||||
p.default_value_en default_value,
|
||||
</when>
|
||||
<when test="lang != null and lang=='fr_FR' ">
|
||||
p.name_fra name,
|
||||
d.col_name_fra col_name,
|
||||
p.default_value_fra default_value,
|
||||
</when>
|
||||
<when test="lang != null and lang=='es_ES' ">
|
||||
p.name_spa name,
|
||||
d.col_name_spa col_name,
|
||||
p.default_value_spa default_value,
|
||||
</when>
|
||||
<when test="lang != null and lang=='de_DE' ">
|
||||
p.name_de name,
|
||||
d.col_name_de col_name,
|
||||
p.default_value_de default_value,
|
||||
</when>
|
||||
<when test="lang != null and lang=='pl_PL' ">
|
||||
p.name_pl name,
|
||||
d.col_name_pl col_name,
|
||||
p.default_value_pl default_value,
|
||||
</when>
|
||||
<when test="lang != null and lang=='ar_EG' ">
|
||||
p.name_ara name,
|
||||
d.col_name_ara col_name,
|
||||
p.default_value_ara default_value,
|
||||
</when>
|
||||
<otherwise>
|
||||
p.name,
|
||||
d.col_name,
|
||||
@ -151,11 +175,18 @@
|
||||
</delete>
|
||||
|
||||
<insert id="updateList" keyColumn="id" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into point_config (id,name,name_en,default_value,default_value_en,point_type,station_id,permission_id,page_location,div_location,sort,device_id,offset_value,factor)
|
||||
insert into point_config (id,name,name_en,
|
||||
name_fra,name_spa,name_de,name_pl,name_ara,
|
||||
default_value,default_value_en,
|
||||
default_value_fra,default_value_spa,default_value_de,default_value_pl,default_value_ara,
|
||||
point_type,station_id,permission_id,page_location,div_location,sort,device_id,offset_value,factor)
|
||||
values
|
||||
<foreach item="item" collection="list" index="index" separator=",">
|
||||
(#{item.id},#{item.name},#{item.nameEn},#{item.defaultValue},#{item.defaultValueEn},#{item.pointType},
|
||||
#{item.stationId},#{item.permissionId},#{item.pageLocation},#{item.divLocation},#{item.sort},#{item.deviceId},#{item.offsetValue},#{item.factor}
|
||||
(#{item.id},#{item.name},#{item.nameEn},
|
||||
#{item.nameFra},#{item.nameSpa},#{item.nameDe},#{item.namePl},#{item.nameAra},
|
||||
#{item.defaultValue},#{item.defaultValueEn},
|
||||
#{item.defaultValueFra},#{item.defaultValueSpa},#{item.defaultValueDe},#{item.defaultValuePl},#{item.defaultValueAra},
|
||||
#{item.pointType},#{item.stationId},#{item.permissionId},#{item.pageLocation},#{item.divLocation},#{item.sort},#{item.deviceId},#{item.offsetValue},#{item.factor}
|
||||
)
|
||||
</foreach>
|
||||
|
||||
|
||||
@ -11,13 +11,33 @@
|
||||
<sql id="Base_Column_List1">
|
||||
id,point_id,value,name_en name,name as name_zh,name_en,symbol
|
||||
</sql>
|
||||
<sql id="Base_Column_List2">
|
||||
id,point_id,value,name_fra name,name as name_zh,name_en,symbol
|
||||
</sql>
|
||||
<sql id="Base_Column_List3">
|
||||
id,point_id,value,name_spa name,name as name_zh,name_en,symbol
|
||||
</sql>
|
||||
<sql id="Base_Column_List4">
|
||||
id,point_id,value,name_de name,name as name_zh,name_en,symbol
|
||||
</sql>
|
||||
<sql id="Base_Column_List5">
|
||||
id,point_id,value,name_pl name,name as name_zh,name_en,symbol
|
||||
</sql>
|
||||
<sql id="Base_Column_List6">
|
||||
id,point_id,value,name_ara name,name as name_zh,name_en,symbol
|
||||
</sql>
|
||||
|
||||
|
||||
<insert id="insertList" keyColumn="id" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into point_polysemy_config (point_id,value,name,name_en,symbol)
|
||||
insert into point_polysemy_config (point_id,value,name,name_en,
|
||||
name_fra,name_spa,name_de,name_pl,name_ara,
|
||||
symbol)
|
||||
values
|
||||
<foreach item="item" collection="list" index="index" separator=",">
|
||||
(
|
||||
#{item.pointId},#{item.value},#{item.name},#{item.nameEn},#{item.symbol}
|
||||
#{item.pointId},#{item.value},#{item.name},#{item.nameEn},
|
||||
#{item.nameFra},#{item.nameSpa},#{item.nameDe},#{item.namePl},#{item.nameAra},
|
||||
#{item.symbol}
|
||||
)
|
||||
</foreach>
|
||||
|
||||
@ -44,6 +64,21 @@
|
||||
<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>
|
||||
|
||||
@ -7,14 +7,62 @@
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
,pid,group_id,dept_id,
|
||||
`name`,name_en,address,address_en,longitude,
|
||||
latitude,capacity,rate_power,
|
||||
status,type,create_time,
|
||||
contact,contact_details,grid_time,
|
||||
,pid,group_id,dept_id,address,longitude,latitude,capacity,rate_power,
|
||||
name,nation,province,
|
||||
,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,nation
|
||||
electricity_type,customer_type,voltage_level,batch_number
|
||||
</sql>
|
||||
<sql id="Base_Column_List1">
|
||||
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,
|
||||
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_List2">
|
||||
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,
|
||||
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_List3">
|
||||
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,
|
||||
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_List4">
|
||||
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,
|
||||
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_List5">
|
||||
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,
|
||||
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_List6">
|
||||
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,
|
||||
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>
|
||||
|
||||
|
||||
|
||||
<select id="selectByName" resultType="com.ho.business.entity.Station">
|
||||
select
|
||||
@ -119,7 +167,30 @@
|
||||
</select>
|
||||
|
||||
<select id="selectByGroupIdNotExclude" resultType="com.ho.business.entity.Station">
|
||||
select <include refid="Base_Column_List"/>
|
||||
select
|
||||
<choose>
|
||||
<when test="record.lang != null and record.lang=='en_US' ">
|
||||
<include refid="Base_Column_List1"/>
|
||||
</when>
|
||||
<when test="record.lang != null and record.lang=='fr_FR' ">
|
||||
<include refid="Base_Column_List2"/>
|
||||
</when>
|
||||
<when test="record.lang != null and record.lang=='es_ES' ">
|
||||
<include refid="Base_Column_List3"/>
|
||||
</when>
|
||||
<when test="record.lang != null and record.lang=='de_DE' ">
|
||||
<include refid="Base_Column_List4"/>
|
||||
</when>
|
||||
<when test="record.lang != null and record.lang=='pl_PL' ">
|
||||
<include refid="Base_Column_List5"/>
|
||||
</when>
|
||||
<when test="record.lang != null and record.lang=='ar_EG' ">
|
||||
<include refid="Base_Column_List6"/>
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="Base_Column_List"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
FROM station
|
||||
<where>
|
||||
<if test="record.name != null and record.name != ''">
|
||||
@ -152,6 +223,7 @@
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM station
|
||||
where
|
||||
|
||||
deleted = #{deleted}
|
||||
and is_daily_count = #{dailyCount}
|
||||
</select>
|
||||
@ -195,6 +267,12 @@
|
||||
<if test="record.groupId != null">group_id,</if>
|
||||
<if test="record.deptId != null">dept_id,</if>
|
||||
<if test="record.name != null">name,</if>
|
||||
<if test="record.nameEn != null">name_en,</if>
|
||||
<if test="record.nameFra != null">name_fra,</if>
|
||||
<if test="record.nameSpa != null">name_spa,</if>
|
||||
<if test="record.nameDe != null">name_de,</if>
|
||||
<if test="record.namePl != null">name_pl,</if>
|
||||
<if test="record.nameAra != null">name_ara,</if>
|
||||
<if test="record.address != null">address,</if>
|
||||
<if test="record.longitude != null">longitude,</if>
|
||||
<if test="record.latitude != null">latitude,</if>
|
||||
@ -220,12 +298,24 @@
|
||||
<if test="record.pvPower != null">pv_power,</if>
|
||||
<if test="record.iccId != null">icc_id,</if>
|
||||
<if test="record.province != null">province,</if>
|
||||
<if test="record.provinceEn != null">province_en,</if>
|
||||
<if test="record.provinceFra != null">province_fra,</if>
|
||||
<if test="record.provinceSpa != null">province_spa,</if>
|
||||
<if test="record.provinceDe != null">province_de,</if>
|
||||
<if test="record.provincePl != null">province_pl,</if>
|
||||
<if test="record.provinceAra != null">province_ara,</if>
|
||||
<if test="record.city != null">city,</if>
|
||||
<if test="record.electricityType != null">electricity_type,</if>
|
||||
<if test="record.customerType != null">customer_type,</if>
|
||||
<if test="record.voltageLevel != null">voltage_level,</if>
|
||||
<if test="record.batchNumber != null">batch_number,</if>
|
||||
<if test="record.nation != null">nation,</if>
|
||||
<if test="record.nationEn != null">nation_en,</if>
|
||||
<if test="record.nationFra != null">nation_fra,</if>
|
||||
<if test="record.nationSpa != null">nation_spa,</if>
|
||||
<if test="record.nationDe != null">nation_de,</if>
|
||||
<if test="record.nationPl != null">nation_pl,</if>
|
||||
<if test="record.nationAra != null">nation_ara,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="record.id != null">#{record.id,jdbcType=INTEGER},</if>
|
||||
@ -233,6 +323,12 @@
|
||||
<if test="record.groupId != null">#{record.groupId,jdbcType=INTEGER},</if>
|
||||
<if test="record.deptId != null">#{record.deptId,jdbcType=INTEGER},</if>
|
||||
<if test="record.name != null">#{record.name,jdbcType=VARCHAR},</if>
|
||||
<if test="record.nameEn != null">#{record.nameEn,jdbcType=VARCHAR},</if>
|
||||
<if test="record.nameFra != null">#{record.nameFra,jdbcType=VARCHAR},</if>
|
||||
<if test="record.nameSpa != null">#{record.nameSpa,jdbcType=VARCHAR},</if>
|
||||
<if test="record.nameDe != null">#{record.nameDe,jdbcType=VARCHAR},</if>
|
||||
<if test="record.namePl != null">#{record.namePl,jdbcType=VARCHAR},</if>
|
||||
<if test="record.nameAra != null">#{record.nameAra,jdbcType=VARCHAR},</if>
|
||||
<if test="record.address != null">#{record.address,jdbcType=VARCHAR},</if>
|
||||
<if test="record.longitude != null">#{record.longitude,jdbcType=DECIMAL},</if>
|
||||
<if test="record.latitude != null">#{record.latitude,jdbcType=DECIMAL},</if>
|
||||
@ -258,12 +354,24 @@
|
||||
<if test="record.pvPower != null">#{record.pvPower},</if>
|
||||
<if test="record.iccId != null">#{record.iccId},</if>
|
||||
<if test="record.province != null">#{record.province},</if>
|
||||
<if test="record.provinceEn != null">#{record.provinceEn},</if>
|
||||
<if test="record.provinceFra != null">#{record.provinceFra},</if>
|
||||
<if test="record.provinceSpa != null">#{record.provinceSpa},</if>
|
||||
<if test="record.provinceDe != null">#{record.provinceDe},</if>
|
||||
<if test="record.provincePl != null">#{record.provincePl},</if>
|
||||
<if test="record.provinceAra != null">#{record.provinceAra},</if>
|
||||
<if test="record.city != null">#{record.city},</if>
|
||||
<if test="record.electricityType != null">#{record.electricityType},</if>
|
||||
<if test="record.customerType != null">#{record.customerType},</if>
|
||||
<if test="record.voltageLevel != null">#{record.voltageLevel},</if>
|
||||
<if test="record.batchNumber != null">#{record.batchNumber},</if>
|
||||
<if test="record.nation != null">#{record.nation},</if>
|
||||
<if test="record.nationEn != null">#{record.nationEn},</if>
|
||||
<if test="record.nationFra != null">#{record.nationFra},</if>
|
||||
<if test="record.nationSpa != null">#{record.nationSpa},</if>
|
||||
<if test="record.nationDe != null">#{record.nationDe},</if>
|
||||
<if test="record.nationPl != null">#{record.nationPl},</if>
|
||||
<if test="record.nationAra != null">#{record.nationAra},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -279,6 +387,24 @@
|
||||
<if test="record.name != null">
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.nameEn != null">
|
||||
name = #{record.nameEn,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.nameFra != null">
|
||||
name = #{record.nameFra,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.nameSpa != null">
|
||||
name = #{record.nameSpa,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.nameDe != null">
|
||||
name = #{record.nameDe,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.namePl != null">
|
||||
name = #{record.namePl,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.nameAra != null">
|
||||
name = #{record.nameAra,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.address != null">
|
||||
address = #{record.address,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@ -357,6 +483,24 @@
|
||||
<if test="record.province != null">
|
||||
province = #{record.province},
|
||||
</if>
|
||||
<if test="record.provinceEn != null">
|
||||
province = #{record.provinceEn},
|
||||
</if>
|
||||
<if test="record.provinceFra != null">
|
||||
province = #{record.provinceFra},
|
||||
</if>
|
||||
<if test="record.provinceSpa != null">
|
||||
province = #{record.provinceSpa},
|
||||
</if>
|
||||
<if test="record.provinceDe != null">
|
||||
province = #{record.provinceDe},
|
||||
</if>
|
||||
<if test="record.provincePl != null">
|
||||
province = #{record.provincePl},
|
||||
</if>
|
||||
<if test="record.provinceAra != null">
|
||||
province = #{record.provinceAra},
|
||||
</if>
|
||||
<if test="record.city != null">
|
||||
city = #{record.city},
|
||||
</if>
|
||||
@ -375,6 +519,24 @@
|
||||
<if test="record.nation != null">
|
||||
nation = #{record.nation},
|
||||
</if>
|
||||
<if test="record.nationEn != null">
|
||||
nation = #{record.nationEn},
|
||||
</if>
|
||||
<if test="record.nationFra != null">
|
||||
nation = #{record.nationFra},
|
||||
</if>
|
||||
<if test="record.nationSpa != null">
|
||||
nation = #{record.nationSpa},
|
||||
</if>
|
||||
<if test="record.nationDe != null">
|
||||
nation = #{record.nationDe},
|
||||
</if>
|
||||
<if test="record.nationPl != null">
|
||||
nation = #{record.nationPl},
|
||||
</if>
|
||||
<if test="record.nationAra != null">
|
||||
nation = #{record.nationAra},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{record.id,jdbcType=INTEGER}
|
||||
</update>
|
||||
|
||||
@ -5,26 +5,32 @@
|
||||
<mapper namespace="com.ho.business.mapper.TranslateNameMapper">
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,`name`,name_en
|
||||
id,`name`,name_en,name_fra,name_spa,name_de,name_pl,name_ara
|
||||
</sql>
|
||||
|
||||
<select id="getDictNation" resultType="com.ho.business.entity.TranslateName">
|
||||
select <include refid="Base_Column_List"/> from translate_name
|
||||
</select>
|
||||
|
||||
<select id="selectNameEN" resultType="com.ho.business.entity.TranslateName">
|
||||
<select id="selectNameLang" resultType="com.ho.business.entity.TranslateName">
|
||||
select <include refid="Base_Column_List"/> from translate_name where name = #{name} limit 1
|
||||
</select>
|
||||
|
||||
<update id="updateNameEnById">
|
||||
update translate_name set name_en=#{nameEn} where id = #{id}
|
||||
<update id="updateById">
|
||||
update translate_name
|
||||
set name_en=#{vo.nameEn},name_fra=#{vo.nameFra},
|
||||
name_spa = #{vo.nameSpa},name_de=#{vo.nameDe},
|
||||
name_pl = #{vo.namePl},name_ara = #{vo.nameAra}
|
||||
where id = #{vo.id}
|
||||
</update>
|
||||
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.ho.business.entity.TranslateName"
|
||||
useGeneratedKeys="true">
|
||||
insert into translate_name
|
||||
( id, name, name_en)
|
||||
values ( #{vo.id,jdbcType=INTEGER}, #{vo.name,jdbcType=VARCHAR}, #{vo.nameEn,jdbcType=VARCHAR})
|
||||
( id, name, name_en,name_fra,name_spa,name_de,name_pl,name_ara)
|
||||
values ( #{vo.id,jdbcType=INTEGER}, #{vo.name,jdbcType=VARCHAR}, #{vo.nameEn,jdbcType=VARCHAR},
|
||||
#{vo.nameFra,jdbcType=VARCHAR},#{vo.nameSpa,jdbcType=VARCHAR},#{vo.nameDe,jdbcType=VARCHAR},
|
||||
#{vo.namePl,jdbcType=VARCHAR},#{vo.nameAra,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
|
||||
@ -17,6 +17,21 @@
|
||||
<when test="lang != null and lang=='en_US' ">
|
||||
b.col_en col_name,
|
||||
</when>
|
||||
<when test="lang != null and lang=='fr_FR' ">
|
||||
b.col_fra col_name,
|
||||
</when>
|
||||
<when test="lang != null and lang=='es_ES' ">
|
||||
b.col_spa col_name,
|
||||
</when>
|
||||
<when test="lang != null and lang=='de_DE' ">
|
||||
b.col_de col_name,
|
||||
</when>
|
||||
<when test="lang != null and lang=='pl_PL' ">
|
||||
b.col_pl col_name,
|
||||
</when>
|
||||
<when test="lang != null and lang=='ar_EG' ">
|
||||
b.col_ara col_name,
|
||||
</when>
|
||||
<otherwise>
|
||||
a.col_name,
|
||||
</otherwise>
|
||||
|
||||
Reference in New Issue
Block a user