fg电池监控平台的达梦数据库版本
whycxzp
2024-11-13 a0ccfe5dd2b4e952443caecc3177833e0cebc727
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.whyc.mapper.Fbs9100sFodParamMapper">
 
 
    <update id="startOrStopTest" parameterType="fbs9100sFodParam">
       <!-- replace into db_ram_db.tb_fbs9100s_fod_param(dev_id,GroupNum,BattGroupNum)
                 values(#{devId},#{GroupNum},#{BattGroupNum})-->
        merge into db_ram_db.tb_fbs9100s_fod_param tgt
        using (select #{devId} as dev_id) as src
        on tgt.dev_id = src.dev_id
        when matched then
            update set tgt.GroupNum = #{GroupNum},tgt.BattGroupNum = #{BattGroupNum}
        when not matched then
            insert(dev_id,GroupNum,BattGroupNum) values(#{devId},#{GroupNum},#{BattGroupNum})
    </update>
    <update id="replace" parameterType="fbs9100sFodParam">
        replace into db_ram_db.tb_fbs9100s_fod_param(dev_id,GroupNum,BattGroupNum,STDCap_one,FloatVol_one,Strength_one,YHStrength_one,TimeLong_one,STDCap_two,FloatVol_two,Strength_two,YHStrength_two,TimeLong_two
                ,STDCap_three,FloatVol_three,Strength_three,YHStrength_three,TimeLong_three,STDCap_four,FloatVol_four,Strength_four,YHStrength_four,TimeLong_four
                ,STDCap_five,FloatVol_five,Strength_five,YHStrength_five,TimeLong_five)
                  values(#{devId},#{GroupNum},#{BattGroupNum}
                ,#{stdcapOne},#{floatvolOne},#{strengthOne},#{yhstrengthOne},#{timelongOne}
                ,#{stdcapTwo},#{floatvolTwo},#{strengthTwo},#{yhstrengthTwo},#{timelongTwo}
               ,#{stdcapThree},#{floatvolThree},#{strengthThree},#{yhstrengthThree},#{timelongThree}
               ,#{stdcapFour},#{floatvolFour},#{strengthFour},#{yhstrengthFour},#{timelongFour}
               ,#{stdcapFive},#{floatvolFive},#{strengthFive},#{yhstrengthFive},#{timelongFive})
    </update>
</mapper>