Quellcode durchsuchen

补充提交xml文件

xiaoguohua vor 3 Monaten
Ursprung
Commit
a8bda47957

+ 133 - 0
forecast-dao/src/main/resources/mapper/biz/BizYkLogMapper.xml

@@ -0,0 +1,133 @@
+<?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="cn.oleauto.biz.mapper.BizYkLogMapper">
+    
+    <resultMap type="BizYkLog" id="BizYkLogResult">
+        <result property="id"    column="id"    />
+        <result property="configYkId"    column="dev_yk_id"    />
+        <result property="configDeviceId"    column="dev_device_id"    />
+        <result property="addrCode"    column="addr_code"    />
+        <result property="controlVal"    column="control_val"    />
+        <result property="controlStep"    column="control_step"    />
+        <result property="tmOut"    column="tm_out"    />
+        <result property="fun"    column="fun"    />
+        <result property="param"    column="param"    />
+        <result property="tmOperate"    column="tm_operate"    />
+        <result property="sysUserId"    column="sys_user_id"    />
+        <result property="state"    column="state"    />
+        <result property="remark"    column="remark"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="updateBy"    column="update_by"    />
+        <association property="configYk" javaType="ConfigYt" resultMap="ConfigYkResult"/>
+        <association property="sysUser" javaType="SysUser" resultMap="SysUserResult"/>
+    </resultMap>
+    <resultMap type="ConfigYk" id="ConfigYkResult">
+        <result property="id"    column="dev_yk_id"    />
+        <result property="name"    column="dev_yk_name"    />
+    </resultMap>
+    <resultMap type="SysUser" id="SysUserResult">
+        <result property="userId"    column="sys_user_id"    />
+        <result property="userName"    column="sys_user_name"    />
+    </resultMap>
+
+    <sql id="selectBizYkLogVoGen">
+        select id, dev_yk_id, dev_device_id, addr_code, control_val, control_step, tm_out, fun, param, tm_operate, sys_user_id, state, remark, create_time, update_time, create_by, update_by from biz_yk_log
+    </sql>
+
+    <sql id="selectBizYkLogVo">
+        select b.id, b.dev_yk_id, b.dev_device_id, b.addr_code, b.control_val, b.control_step, b.tm_out, b.fun, b.param, b.tm_operate, b.sys_user_id, b.state, b.remark, b.create_time, b.update_time, b.create_by, b.update_by,
+               d.name as dev_yk_name,
+               s.user_name as sys_user_name
+        from biz_yk_log b
+                 LEFT JOIN dev_yk d ON b.dev_yk_id = d.id
+                 LEFT JOIN sys_user s ON b.sys_user_id = s.user_id
+    </sql>
+
+    <select id="selectBizYkLogList" parameterType="BizYkLog" resultMap="BizYkLogResult">
+        <include refid="selectBizYkLogVo"/>
+        <where>  
+            <if test="configDeviceId != null "> and b.dev_device_id = #{configDeviceId}</if>
+            <if test="addrCode != null  and addrCode != ''"> and b.addr_code = #{addrCode}</if>
+            <if test="sysUserId != null "> and b.sys_user_id = #{sysUserId}</if>
+            <if test="state != null  and state != ''"> and b.state = #{state}</if>
+        </where>
+         order by b.id desc
+    </select>
+    
+    <select id="selectBizYkLogById" parameterType="Long" resultMap="BizYkLogResult">
+        <include refid="selectBizYkLogVo"/>
+        where b.id = #{id}
+    </select>
+
+    <insert id="insertBizYkLog" parameterType="BizYkLog" useGeneratedKeys="true" keyProperty="id">
+        insert into biz_yk_log
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="configYkId != null">dev_yk_id,</if>
+            <if test="configDeviceId != null">dev_device_id,</if>
+            <if test="addrCode != null and addrCode != ''">addr_code,</if>
+            <if test="controlVal != null and controlVal != ''">control_val,</if>
+            <if test="controlStep != null and controlStep != ''">control_step,</if>
+            <if test="tmOut != null">tm_out,</if>
+            <if test="fun != null and fun != ''">fun,</if>
+            <if test="param != null and param != ''">param,</if>
+            <if test="tmOperate != null">tm_operate,</if>
+            <if test="sysUserId != null">sys_user_id,</if>
+            <if test="state != null and state != ''">state,</if>
+            <if test="remark != null">remark,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="updateBy != null">update_by,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="configYkId != null">#{configYkId},</if>
+            <if test="configDeviceId != null">#{configDeviceId},</if>
+            <if test="addrCode != null and addrCode != ''">#{addrCode},</if>
+            <if test="controlVal != null and controlVal != ''">#{controlVal},</if>
+            <if test="controlStep != null and controlStep != ''">#{controlStep},</if>
+            <if test="tmOut != null">#{tmOut},</if>
+            <if test="fun != null and fun != ''">#{fun},</if>
+            <if test="param != null and param != ''">#{param},</if>
+            <if test="tmOperate != null">#{tmOperate},</if>
+            <if test="sysUserId != null">#{sysUserId},</if>
+            <if test="state != null and state != ''">#{state},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+         </trim>
+    </insert>
+
+    <update id="updateBizYkLog" parameterType="BizYkLog">
+        update biz_yk_log
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="configYkId != null">dev_yk_id = #{configYkId},</if>
+            <if test="configDeviceId != null">dev_device_id = #{configDeviceId},</if>
+            <if test="addrCode != null and addrCode != ''">addr_code = #{addrCode},</if>
+            <if test="controlVal != null and controlVal != ''">control_val = #{controlVal},</if>
+            <if test="controlStep != null and controlStep != ''">control_step = #{controlStep},</if>
+            <if test="tmOut != null">tm_out = #{tmOut},</if>
+            <if test="fun != null and fun != ''">fun = #{fun},</if>
+            <if test="param != null and param != ''">param = #{param},</if>
+            <if test="tmOperate != null">tm_operate = #{tmOperate},</if>
+            <if test="sysUserId != null">sys_user_id = #{sysUserId},</if>
+            <if test="state != null and state != ''">state = #{state},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteBizYkLogById" parameterType="Long">
+        delete from biz_yk_log where id = #{id}
+    </delete>
+
+    <delete id="deleteBizYkLogByIds" parameterType="String">
+        delete from biz_yk_log where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 128 - 0
forecast-dao/src/main/resources/mapper/biz/BizYtLogMapper.xml

@@ -0,0 +1,128 @@
+<?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="cn.oleauto.biz.mapper.BizYtLogMapper">
+    
+    <resultMap type="BizYtLog" id="BizYtLogResult">
+        <result property="id"    column="id"    />
+        <result property="configYtId"    column="dev_yt_id"    />
+        <result property="configDeviceId"    column="dev_device_id"    />
+        <result property="addrCode"    column="addr_code"    />
+        <result property="controlVal"    column="control_val"    />
+        <result property="tmOut"    column="tm_out"    />
+        <result property="fun"    column="fun"    />
+        <result property="param"    column="param"    />
+        <result property="tmOperate"    column="tm_operate"    />
+        <result property="sysUserId"    column="sys_user_id"    />
+        <result property="state"    column="state"    />
+        <result property="remark"    column="remark"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="updateBy"    column="update_by"    />
+        <association property="configYt" javaType="ConfigYt" resultMap="ConfigYtResult"/>
+        <association property="sysUser" javaType="SysUser" resultMap="SysUserResult"/>
+    </resultMap>
+    <resultMap type="ConfigYt" id="ConfigYtResult">
+        <result property="id"    column="dev_yt_id"    />
+        <result property="name"    column="dev_yt_name"    />
+    </resultMap>
+    <resultMap type="SysUser" id="SysUserResult">
+        <result property="userId"    column="sys_user_id"    />
+        <result property="userName"    column="sys_user_name"    />
+    </resultMap>
+
+    <sql id="selectBizYtLogVoGen">
+        select id, dev_yt_id, dev_device_id, addr_code, control_val, tm_out, fun, param, tm_operate, sys_user_id, state, remark, create_time, update_time, create_by, update_by from biz_yt_log
+    </sql>
+
+    <sql id="selectBizYtLogVo">
+        select b.id, b.dev_yt_id, b.dev_device_id, b.addr_code, b.control_val, b.tm_out, b.fun, b.param, b.tm_operate, b.sys_user_id, b.state, b.remark, b.create_time, b.update_time, b.create_by, b.update_by,
+               d.name as dev_yt_name,
+               s.user_name as sys_user_name
+        from biz_yt_log b
+                 LEFT JOIN dev_yt d on b.dev_yt_id = d.id
+                 LEFT JOIN sys_user s on b.sys_user_id = s.user_id
+    </sql>
+    <select id="selectBizYtLogList" parameterType="BizYtLog" resultMap="BizYtLogResult">
+        <include refid="selectBizYtLogVo"/>
+        <where>  
+            <if test="configYtId != null "> and b.dev_yt_id = #{configYtId}</if>
+            <if test="configDeviceId != null "> and b.dev_device_id = #{configDeviceId}</if>
+            <if test="addrCode != null  and addrCode != ''"> and b.addr_code = #{addrCode}</if>
+            <if test="state != null  and state != ''"> and b.state = #{state}</if>
+        </where>
+         order by b.id desc
+    </select>
+    
+    <select id="selectBizYtLogById" parameterType="Long" resultMap="BizYtLogResult">
+        <include refid="selectBizYtLogVo"/>
+        where b.id = #{id}
+    </select>
+
+    <insert id="insertBizYtLog" parameterType="BizYtLog" useGeneratedKeys="true" keyProperty="id">
+        insert into biz_yt_log
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="configYtId != null">dev_yt_id,</if>
+            <if test="configDeviceId != null">dev_device_id,</if>
+            <if test="addrCode != null and addrCode != ''">addr_code,</if>
+            <if test="controlVal != null and controlVal != ''">control_val,</if>
+            <if test="tmOut != null">tm_out,</if>
+            <if test="fun != null">fun,</if>
+            <if test="param != null">param,</if>
+            <if test="tmOperate != null">tm_operate,</if>
+            <if test="sysUserId != null">sys_user_id,</if>
+            <if test="state != null and state != ''">state,</if>
+            <if test="remark != null">remark,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="updateBy != null">update_by,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="configYtId != null">#{configYtId},</if>
+            <if test="configDeviceId != null">#{configDeviceId},</if>
+            <if test="addrCode != null and addrCode != ''">#{addrCode},</if>
+            <if test="controlVal != null and controlVal != ''">#{controlVal},</if>
+            <if test="tmOut != null">#{tmOut},</if>
+            <if test="fun != null">#{fun},</if>
+            <if test="param != null">#{param},</if>
+            <if test="tmOperate != null">#{tmOperate},</if>
+            <if test="sysUserId != null">#{sysUserId},</if>
+            <if test="state != null and state != ''">#{state},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+         </trim>
+    </insert>
+
+    <update id="updateBizYtLog" parameterType="BizYtLog">
+        update biz_yt_log
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="configYtId != null">dev_yt_id = #{configYtId},</if>
+            <if test="configDeviceId != null">dev_device_id = #{configDeviceId},</if>
+            <if test="addrCode != null and addrCode != ''">addr_code = #{addrCode},</if>
+            <if test="controlVal != null and controlVal != ''">control_val = #{controlVal},</if>
+            <if test="tmOut != null">tm_out = #{tmOut},</if>
+            <if test="fun != null">fun = #{fun},</if>
+            <if test="param != null">param = #{param},</if>
+            <if test="tmOperate != null">tm_operate = #{tmOperate},</if>
+            <if test="sysUserId != null">sys_user_id = #{sysUserId},</if>
+            <if test="state != null and state != ''">state = #{state},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteBizYtLogById" parameterType="Long">
+        delete from biz_yt_log where id = #{id}
+    </delete>
+
+    <delete id="deleteBizYtLogByIds" parameterType="String">
+        delete from biz_yt_log where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 121 - 0
forecast-dao/src/main/resources/mapper/config/ConfigChannelMapper.xml

@@ -0,0 +1,121 @@
+<?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="cn.oleauto.config.mapper.ConfigChannelMapper">
+    
+    <resultMap type="ConfigChannel" id="ConfigChannelResult">
+        <result property="id"    column="id"    />
+        <result property="code"    column="code"    />
+        <result property="name"    column="name"    />
+        <result property="configTransmitId"    column="config_transmit_id"    />
+        <result property="transmitConfig"    column="transmit_config"    />
+        <result property="configProtocolId"    column="config_protocol_id"    />
+        <result property="protocolConfig"    column="protocol_config"    />
+        <result property="remark"    column="remark"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="disabled"    column="disabled"    />
+        <association property="configProtocol"     javaType="ConfigProtocol"         resultMap="ConfigProtocolResult" />
+        <association property="configTransmit"     javaType="ConfigTransmit"         resultMap="ConfigTransmitResult" />
+    </resultMap>
+
+    <resultMap type="ConfigProtocol" id="ConfigProtocolResult">
+        <result property="id"    column="config_protocol_id"    />
+        <result property="name"    column="protocol_name"    />
+        <result property="protocolClass"    column="protocol_class"    />
+    </resultMap>
+    <resultMap type="ConfigTransmit" id="ConfigTransmitResult">
+        <result property="id"    column="config_transmit_id"    />
+        <result property="name"    column="transmit_name"    />
+        <result property="transmitClass"    column="transmit_class"    />
+    </resultMap>
+
+    <sql id="selectConfigChannelVoGen">
+        select id, code, name, config_transmit_id, transmit_config, config_protocol_id, protocol_config, remark, create_time, update_time, create_by, update_by, disabled from config_channel
+    </sql>
+    <sql id="selectConfigChannelVo">
+        select c.id, c.code, c.name, c.config_transmit_id, c.transmit_config, c.config_protocol_id, c.protocol_config, c.remark, c.create_time, c.update_time, c.create_by, c.update_by, c.disabled,
+               t.name as transmit_name, t.transmit_class,
+               p.name as protocol_name, p.protocol_class
+        from config_channel c
+                 LEFT JOIN config_transmit t on t.id = c.config_transmit_id
+                 LEFT JOIN config_protocol p on p.id = c.config_protocol_id
+    </sql>
+
+    <select id="selectConfigChannelList" parameterType="ConfigChannel" resultMap="ConfigChannelResult">
+        <include refid="selectConfigChannelVo"/>
+        <where>  
+            <if test="code != null  and code != ''"> and c.code = #{code}</if>
+            <if test="name != null  and name != ''"> and c.name like concat('%', #{name}, '%')</if>
+            <if test="configTransmitId != null "> and c.config_transmit_id = #{configTransmitId}</if>
+            <if test="transmitConfig != null  and transmitConfig != ''"> and c.transmit_config = #{transmitConfig}</if>
+            <if test="configProtocolId != null "> and c.config_protocol_id = #{configProtocolId}</if>
+            <if test="protocolConfig != null  and protocolConfig != ''"> and c.protocol_config = #{protocolConfig}</if>
+            <if test="disabled != null  and disabled != ''"> and c.disabled = #{disabled}</if>
+        </where>
+    </select>
+    
+    <select id="selectConfigChannelById" parameterType="Long" resultMap="ConfigChannelResult">
+        <include refid="selectConfigChannelVo"/>
+        where c.id = #{id}
+    </select>
+
+    <insert id="insertConfigChannel" parameterType="ConfigChannel" useGeneratedKeys="true" keyProperty="id">
+        insert into config_channel
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="code != null and code != ''">code,</if>
+            <if test="name != null and name != ''">name,</if>
+            <if test="configTransmitId != null">config_transmit_id,</if>
+            <if test="transmitConfig != null and transmitConfig != ''">transmit_config,</if>
+            <if test="configProtocolId != null">config_protocol_id,</if>
+            <if test="protocolConfig != null and protocolConfig != ''">protocol_config,</if>
+            <if test="remark != null and remark != ''">remark,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="disabled != null and disabled != ''">disabled,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="code != null and code != ''">#{code},</if>
+            <if test="name != null and name != ''">#{name},</if>
+            <if test="configTransmitId != null">#{configTransmitId},</if>
+            <if test="transmitConfig != null and transmitConfig != ''">#{transmitConfig},</if>
+            <if test="configProtocolId != null">#{configProtocolId},</if>
+            <if test="protocolConfig != null and protocolConfig != ''">#{protocolConfig},</if>
+            <if test="remark != null and remark != ''">#{remark},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="disabled != null and disabled != ''">#{disabled},</if>
+         </trim>
+    </insert>
+
+    <update id="updateConfigChannel" parameterType="ConfigChannel">
+        update config_channel
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="code != null and code != ''">code = #{code},</if>
+            <if test="name != null and name != ''">name = #{name},</if>
+            <if test="configTransmitId != null">config_transmit_id = #{configTransmitId},</if>
+            <if test="transmitConfig != null and transmitConfig != ''">transmit_config = #{transmitConfig},</if>
+            <if test="configProtocolId != null">config_protocol_id = #{configProtocolId},</if>
+            <if test="protocolConfig != null and protocolConfig != ''">protocol_config = #{protocolConfig},</if>
+            <if test="remark != null and remark != ''">remark = #{remark},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="disabled != null and disabled != ''">disabled = #{disabled},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteConfigChannelById" parameterType="Long">
+        delete from config_channel where id = #{id}
+    </delete>
+
+    <delete id="deleteConfigChannelByIds" parameterType="String">
+        delete from config_channel where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 88 - 0
forecast-dao/src/main/resources/mapper/config/ConfigDeviceMapper.xml

@@ -0,0 +1,88 @@
+<?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="cn.oleauto.config.mapper.ConfigDeviceMapper">
+    
+    <resultMap type="ConfigDevice" id="ConfigDeviceResult">
+        <result property="id"    column="id"    />
+        <result property="name"    column="name"    />
+        <result property="configChannelId"    column="config_channel_id"    />
+        <result property="ilk"    column="ilk"    />
+        <result property="configDeviceId"    column="config_device_id"    />
+        <result property="remark"    column="remark"    />
+        <association property="configChannel" javaType="ConfigChannel" resultMap="ConfigChannelResult" />
+    </resultMap>
+
+    <resultMap type="ConfigChannel" id="ConfigChannelResult">
+        <result property="id"    column="config_channel_id"    />
+        <result property="name"    column="config_channel_name"    />
+    </resultMap>
+
+    <sql id="selectConfigDeviceVoGen">
+        select id, name, config_channel_id, ilk, config_device_id, remark from config_device d
+    </sql>
+
+    <sql id="selectConfigDeviceVo">
+        select d.id, d.name, d.config_channel_id, d.ilk, d.config_device_id, d.remark,
+               c.name config_channel_name
+        from config_device d
+                 LEFT JOIN config_channel c on d.config_channel_id = c.id
+    </sql>
+
+    <select id="selectConfigDeviceList" parameterType="ConfigDevice" resultMap="ConfigDeviceResult">
+        <include refid="selectConfigDeviceVo"/>
+        <where>  
+            <if test="name != null  and name != ''"> and d.name like concat('%', #{name}, '%')</if>
+            <if test="configChannelId != null "> and d.config_channel_id = #{configChannelId}</if>
+            <if test="ilk != null  and ilk != ''"> and d.ilk = #{ilk}</if>
+            <if test="configDeviceId != null "> and d.config_device_id = #{configDeviceId}</if>
+        </where>
+    </select>
+    
+    <select id="selectConfigDeviceById" parameterType="Long" resultMap="ConfigDeviceResult">
+        <include refid="selectConfigDeviceVo"/>
+        where d.id = #{id}
+    </select>
+
+    <insert id="insertConfigDevice" parameterType="ConfigDevice" useGeneratedKeys="true" keyProperty="id">
+        insert into config_device
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="name != null and name != ''">name,</if>
+            <if test="configChannelId != null">config_channel_id,</if>
+            <if test="ilk != null and ilk != ''">ilk,</if>
+            <if test="configDeviceId != null">config_device_id,</if>
+            <if test="remark != null and remark != ''">remark,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="name != null and name != ''">#{name},</if>
+            <if test="configChannelId != null">#{configChannelId},</if>
+            <if test="ilk != null and ilk != ''">#{ilk},</if>
+            <if test="configDeviceId != null">#{configDeviceId},</if>
+            <if test="remark != null and remark != ''">#{remark},</if>
+         </trim>
+    </insert>
+
+    <update id="updateConfigDevice" parameterType="ConfigDevice">
+        update config_device
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="name != null and name != ''">name = #{name},</if>
+            <if test="configChannelId != null">config_channel_id = #{configChannelId},</if>
+            <if test="ilk != null and ilk != ''">ilk = #{ilk},</if>
+            <if test="configDeviceId != null">config_device_id = #{configDeviceId},</if>
+            <if test="remark != null and remark != ''">remark = #{remark},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteConfigDeviceById" parameterType="Long">
+        delete from config_device where id = #{id}
+    </delete>
+
+    <delete id="deleteConfigDeviceByIds" parameterType="String">
+        delete from config_device where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 102 - 0
forecast-dao/src/main/resources/mapper/config/ConfigElectricityLocalMapper.xml

@@ -0,0 +1,102 @@
+<?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="cn.oleauto.config.mapper.ConfigElectricityLocalMapper">
+    
+    <resultMap type="ConfigElectricityLocal" id="ConfigElectricityLocalResult">
+        <result property="id"    column="id"    />
+        <result property="configStationId"    column="config_station_id"    />
+        <result property="actualPower"    column="actual_power"    />
+        <result property="theoreticalPower"    column="theoretical_power"    />
+        <result property="curtailmentPower"    column="curtailment_power"    />
+        <result property="deviceStatus"    column="device_status"    />
+        <result property="gridStatus"    column="grid_status"    />
+        <result property="availability"    column="availability"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="updateBy"    column="update_by"    />
+    </resultMap>
+
+    <sql id="selectConfigElectricityLocalVo">
+        select id, config_station_id, actual_power, theoretical_power, curtailment_power, device_status, grid_status, availability, create_time, update_time, create_by, update_by from config_electricity_local
+    </sql>
+
+    <select id="selectConfigElectricityLocalList" parameterType="ConfigElectricityLocal" resultMap="ConfigElectricityLocalResult">
+        <include refid="selectConfigElectricityLocalVo"/>
+        <where>  
+            <if test="configStationId != null  and configStationId != ''"> and config_station_id = #{configStationId}</if>
+            <if test="actualPower != null  and actualPower != ''"> and actual_power = #{actualPower}</if>
+            <if test="theoreticalPower != null  and theoreticalPower != ''"> and theoretical_power = #{theoreticalPower}</if>
+            <if test="curtailmentPower != null  and curtailmentPower != ''"> and curtailment_power = #{curtailmentPower}</if>
+            <if test="deviceStatus != null  and deviceStatus != ''"> and device_status = #{deviceStatus}</if>
+            <if test="gridStatus != null  and gridStatus != ''"> and grid_status = #{gridStatus}</if>
+            <if test="availability != null  and availability != ''"> and availability = #{availability}</if>
+        </where>
+    </select>
+    
+    <select id="selectConfigElectricityLocalById" parameterType="Long" resultMap="ConfigElectricityLocalResult">
+        <include refid="selectConfigElectricityLocalVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertConfigElectricityLocal" parameterType="ConfigElectricityLocal" useGeneratedKeys="true" keyProperty="id">
+        insert into config_electricity_local
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="configStationId != null and configStationId != ''">config_station_id,</if>
+            <if test="actualPower != null">actual_power,</if>
+            <if test="theoreticalPower != null">theoretical_power,</if>
+            <if test="curtailmentPower != null">curtailment_power,</if>
+            <if test="deviceStatus != null">device_status,</if>
+            <if test="gridStatus != null">grid_status,</if>
+            <if test="availability != null">availability,</if>
+            <if test="createTime != null and createTime != ''">create_time,</if>
+            <if test="updateTime != null and updateTime != ''">update_time,</if>
+            <if test="createBy != null and createBy != ''">create_by,</if>
+            <if test="updateBy != null and updateBy != ''">update_by,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="configStationId != null and configStationId != ''">#{configStationId},</if>
+            <if test="actualPower != null">#{actualPower},</if>
+            <if test="theoreticalPower != null">#{theoreticalPower},</if>
+            <if test="curtailmentPower != null">#{curtailmentPower},</if>
+            <if test="deviceStatus != null">#{deviceStatus},</if>
+            <if test="gridStatus != null">#{gridStatus},</if>
+            <if test="availability != null">#{availability},</if>
+            <if test="createTime != null and createTime != ''">#{createTime},</if>
+            <if test="updateTime != null and updateTime != ''">#{updateTime},</if>
+            <if test="createBy != null and createBy != ''">#{createBy},</if>
+            <if test="updateBy != null and updateBy != ''">#{updateBy},</if>
+         </trim>
+    </insert>
+
+    <update id="updateConfigElectricityLocal" parameterType="ConfigElectricityLocal">
+        update config_electricity_local
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="configStationId != null and configStationId != ''">config_station_id = #{configStationId},</if>
+            <if test="actualPower != null">actual_power = #{actualPower},</if>
+            <if test="theoreticalPower != null">theoretical_power = #{theoreticalPower},</if>
+            <if test="curtailmentPower != null">curtailment_power = #{curtailmentPower},</if>
+            <if test="deviceStatus != null">device_status = #{deviceStatus},</if>
+            <if test="gridStatus != null">grid_status = #{gridStatus},</if>
+            <if test="availability != null">availability = #{availability},</if>
+            <if test="createTime != null and createTime != ''">create_time = #{createTime},</if>
+            <if test="updateTime != null and updateTime != ''">update_time = #{updateTime},</if>
+            <if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
+            <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteConfigElectricityLocalById" parameterType="Long">
+        delete from config_electricity_local where id = #{id}
+    </delete>
+
+    <delete id="deleteConfigElectricityLocalByIds" parameterType="String">
+        delete from config_electricity_local where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 177 - 0
forecast-dao/src/main/resources/mapper/config/ConfigPointMapper.xml

@@ -0,0 +1,177 @@
+<?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="cn.oleauto.config.mapper.ConfigPointMapper">
+    
+    <resultMap type="ConfigPoint" id="ConfigPointResult">
+        <result property="id"    column="id"    />
+        <result property="name"    column="name"    />
+        <result property="code"    column="code"    />
+        <result property="addr"    column="addr"    />
+        <result property="category"    column="category"    />
+        <result property="configDeviceId"    column="config_device_id"    />
+        <result property="willInverse"    column="will_inverse"    />
+        <result property="initValue"    column="init_value"    />
+        <result property="kbComposite"    column="kb_composite"    />
+        <result property="k"    column="k"    />
+        <result property="b"    column="b"    />
+        <result property="zeroFilter"    column="zero_filter"    />
+        <result property="willCheckUd"    column="will_check_ud"    />
+        <result property="up1"    column="up1"    />
+        <result property="up2"    column="up2"    />
+        <result property="down1"    column="down1"    />
+        <result property="down2"    column="down2"    />
+        <result property="hopFilter"    column="hop_filter"    />
+        <result property="lazyTm"    column="lazy_tm"    />
+        <result property="configAlarmTemplateId"    column="config_alarm_template_id"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="updateBy"    column="update_by"    />
+        <association property="configDevice"     javaType="ConfigDevice"         resultMap="ConfigDeviceResult" />
+    </resultMap>
+
+    <resultMap type="ConfigDevice" id="ConfigDeviceResult">
+        <result property="id"    column="config_device_id"    />
+        <result property="name"    column="config_device_name"    />
+    </resultMap>
+
+
+    <sql id="selectConfigPointVoGen">
+        select id, name, code, addr, category, config_device_id, will_inverse, init_value, kb_composite, k, b, zero_filter, will_check_ud, up1, up2, down1, down2, hop_filter, lazy_tm, config_alarm_template_id, create_time, update_time, create_by, update_by from config_point p
+    </sql>
+
+    <sql id="selectConfigPointVo">
+        select p.id, p.name, p.code, p.addr, p.category, p.config_device_id, p.will_inverse, p.init_value, p.kb_composite, p.k, p.b, p.zero_filter, p.will_check_ud, p.up1, p.up2, p.down1, p.down2, p.hop_filter, p.lazy_tm, p.config_alarm_template_id, p.create_time, p.update_time, p.create_by, p.update_by,
+               d.name as config_device_name, d.config_channel_id
+        from config_point p
+                 LEFT JOIN config_device d on p.config_device_id = d.id
+    </sql>
+
+    <select id="selectConfigPointList" parameterType="ConfigPoint" resultMap="ConfigPointResult">
+        <include refid="selectConfigPointVo"/>
+        <where>  
+            <if test="name != null  and name != ''"> and p.name like concat('%', #{name}, '%')</if>
+            <if test="code != null  and code != ''"> and p.code = #{code}</if>
+            <if test="addr != null "> and p.addr = #{addr}</if>
+            <if test="category != null  and category != ''"> and p.category = #{category}</if>
+            <if test="configDeviceId != null "> and p.config_device_id = #{configDeviceId}</if>
+            <if test="willInverse != null  and willInverse != ''"> and p.will_inverse = #{willInverse}</if>
+            <if test="initValue != null  and initValue != ''"> and p.init_value = #{initValue}</if>
+            <if test="kbComposite != null  and kbComposite != ''"> and p.kb_composite = #{kbComposite}</if>
+            <if test="k != null "> and p.k = #{k}</if>
+            <if test="b != null "> and p.b = #{b}</if>
+            <if test="zeroFilter != null "> and p.zero_filter = #{zeroFilter}</if>
+            <if test="willCheckUd != null "> and p.will_check_ud = #{willCheckUd}</if>
+            <if test="up1 != null "> and p.up1 = #{up1}</if>
+            <if test="up2 != null "> and p.up2 = #{up2}</if>
+            <if test="down1 != null "> and p.down1 = #{down1}</if>
+            <if test="down2 != null "> and p.down2 = #{down2}</if>
+            <if test="hopFilter != null "> and p.hop_filter = #{hopFilter}</if>
+            <if test="lazyTm != null "> and p.lazy_tm = #{lazyTm}</if>
+            <if test="configAlarmTemplateId != null "> and p.config_alarm_template_id = #{configAlarmTemplateId}</if>
+            <if test="configDevice != null and configDevice.configChannelId != null"> and d.config_channel_id = #{configDevice.configChannelId}</if>
+        </where>
+    </select>
+    
+    <select id="selectConfigPointById" parameterType="Long" resultMap="ConfigPointResult">
+        <include refid="selectConfigPointVo"/>
+        where p.id = #{id}
+    </select>
+
+    <insert id="insertConfigPoint" parameterType="ConfigPoint">
+        insert into config_point
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="name != null and name != ''">name,</if>
+            <if test="code != null and code != ''">code,</if>
+            <if test="addr != null">addr,</if>
+            <if test="category != null and category != ''">category,</if>
+            <if test="configDeviceId != null">config_device_id,</if>
+            <if test="willInverse != null and willInverse != ''">will_inverse,</if>
+            <if test="initValue != null and initValue != ''">init_value,</if>
+            <if test="kbComposite != null and kbComposite != ''">kb_composite,</if>
+            <if test="k != null">k,</if>
+            <if test="b != null">b,</if>
+            <if test="zeroFilter != null">zero_filter,</if>
+            <if test="willCheckUd != null "> will_check_ud,</if>
+            <if test="up1 != null">up1,</if>
+            <if test="up2 != null">up2,</if>
+            <if test="down1 != null">down1,</if>
+            <if test="down2 != null">down2,</if>
+            <if test="hopFilter != null">hop_filter,</if>
+            <if test="lazyTm != null">lazy_tm,</if>
+            <if test="configAlarmTemplateId != null">config_alarm_template_id,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="updateBy != null">update_by,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="name != null and name != ''">#{name},</if>
+            <if test="code != null and code != ''">#{code},</if>
+            <if test="addr != null">#{addr},</if>
+            <if test="category != null and category != ''">#{category},</if>
+            <if test="configDeviceId != null">#{configDeviceId},</if>
+            <if test="willInverse != null and willInverse != ''">#{willInverse},</if>
+            <if test="initValue != null and initValue != ''">#{initValue},</if>
+            <if test="kbComposite != null and kbComposite != ''">#{kbComposite},</if>
+            <if test="k != null">#{k},</if>
+            <if test="b != null">#{b},</if>
+            <if test="zeroFilter != null">#{zeroFilter},</if>
+            <if test="willCheckUd != null "> #{willCheckUd},</if>
+            <if test="up1 != null">#{up1},</if>
+            <if test="up2 != null">#{up2},</if>
+            <if test="down1 != null">#{down1},</if>
+            <if test="down2 != null">#{down2},</if>
+            <if test="hopFilter != null">#{hopFilter},</if>
+            <if test="lazyTm != null">#{lazyTm},</if>
+            <if test="configAlarmTemplateId != null">#{configAlarmTemplateId},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+         </trim>
+    </insert>
+
+    <update id="updateConfigPoint" parameterType="ConfigPoint">
+        update config_point
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="name != null and name != ''">name = #{name},</if>
+            <if test="code != null and code != ''">code = #{code},</if>
+            <if test="addr != null">addr = #{addr},</if>
+            <if test="category != null and category != ''">category = #{category},</if>
+            <if test="configDeviceId != null">config_device_id = #{configDeviceId},</if>
+            <if test="willInverse != null and willInverse != ''">will_inverse = #{willInverse},</if>
+            <if test="initValue != null and initValue != ''">init_value = #{initValue},</if>
+            <if test="kbComposite != null and kbComposite != ''">kb_composite = #{kbComposite},</if>
+            <if test="k != null">k = #{k},</if>
+            <if test="b != null">b = #{b},</if>
+            <if test="zeroFilter != null">zero_filter = #{zeroFilter},</if>
+            <if test="willCheckUd != null "> will_check_ud = #{willCheckUd},</if>
+            <if test="up1 != null">up1 = #{up1},</if>
+            <if test="up2 != null">up2 = #{up2},</if>
+            <if test="down1 != null">down1 = #{down1},</if>
+            <if test="down2 != null">down2 = #{down2},</if>
+            <if test="hopFilter != null">hop_filter = #{hopFilter},</if>
+            <if test="lazyTm != null">lazy_tm = #{lazyTm},</if>
+            <if test="configAlarmTemplateId != null">config_alarm_template_id = #{configAlarmTemplateId},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteConfigPointById" parameterType="Long">
+        delete from config_point where id = #{id}
+    </delete>
+
+    <delete id="deleteConfigPointByIds" parameterType="String">
+        delete from config_point where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+    <delete id="deleteConfigPointByDeviceId" parameterType="Long">
+        delete from config_point where config_device_id = #{id}
+    </delete>
+</mapper>

+ 66 - 0
forecast-dao/src/main/resources/mapper/config/ConfigProtocolMapper.xml

@@ -0,0 +1,66 @@
+<?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="cn.oleauto.config.mapper.ConfigProtocolMapper">
+    
+    <resultMap type="ConfigProtocol" id="ConfigProtocolResult">
+        <result property="id"    column="id"    />
+        <result property="name"    column="name"    />
+        <result property="protocolClass"    column="protocol_class"    />
+        <result property="configExample"    column="config_example"    />
+    </resultMap>
+
+    <sql id="selectConfigProtocolVo">
+        select id, name, protocol_class, config_example from config_protocol
+    </sql>
+
+    <select id="selectConfigProtocolList" parameterType="ConfigProtocol" resultMap="ConfigProtocolResult">
+        <include refid="selectConfigProtocolVo"/>
+        <where>  
+            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
+            <if test="protocolClass != null  and protocolClass != ''"> and protocol_class = #{protocolClass}</if>
+            <if test="configExample != null  and configExample != ''"> and config_example = #{configExample}</if>
+        </where>
+    </select>
+    
+    <select id="selectConfigProtocolById" parameterType="Long" resultMap="ConfigProtocolResult">
+        <include refid="selectConfigProtocolVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertConfigProtocol" parameterType="ConfigProtocol" useGeneratedKeys="true" keyProperty="id">
+        insert into config_protocol
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="name != null and name != ''">name,</if>
+            <if test="protocolClass != null and protocolClass != ''">protocol_class,</if>
+            <if test="configExample != null and configExample != ''">config_example,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="name != null and name != ''">#{name},</if>
+            <if test="protocolClass != null and protocolClass != ''">#{protocolClass},</if>
+            <if test="configExample != null and configExample != ''">#{configExample},</if>
+         </trim>
+    </insert>
+
+    <update id="updateConfigProtocol" parameterType="ConfigProtocol">
+        update config_protocol
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="name != null and name != ''">name = #{name},</if>
+            <if test="protocolClass != null and protocolClass != ''">protocol_class = #{protocolClass},</if>
+            <if test="configExample != null and configExample != ''">config_example = #{configExample},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteConfigProtocolById" parameterType="Long">
+        delete from config_protocol where id = #{id}
+    </delete>
+
+    <delete id="deleteConfigProtocolByIds" parameterType="String">
+        delete from config_protocol where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 204 - 0
forecast-dao/src/main/resources/mapper/config/ConfigStationMapper.xml

@@ -0,0 +1,204 @@
+<?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="cn.oleauto.config.mapper.ConfigStationMapper">
+
+    <resultMap type="ConfigStation" id="ConfigStationResult">
+        <result property="id"    column="id"    />
+        <result property="stationName"    column="station_name"    />
+        <result property="stationCode"    column="station_code"    />
+        <result property="superiorAreaId"    column="superior_area_id"    />
+        <result property="periodTotal"    column="period_total"    />
+        <result property="longitude"    column="longitude"    />
+        <result property="latitude"    column="latitude"    />
+        <result property="provinceNumber"    column="province_number"    />
+        <result property="cityNumber"    column="city_number"    />
+        <result property="position"    column="position"    />
+        <result property="installedCapacity"    column="installed_capacity"    />
+        <result property="gridConnectedCapacity"    column="grid_connected_capacity"    />
+        <result property="fansPvPanelquantity"    column="fans_pv_panelquantity"    />
+        <result property="elevation"    column="elevation"    />
+        <result property="operationTime"    column="operation_time"    />
+        <result property="boosterstationVoltageLevel"    column="boosterstation_voltage_level"    />
+        <result property="boosterStationLongitude"    column="booster_station_longitude"    />
+        <result property="boosterstationLatitude"    column="boosterstation_latitude"    />
+        <result property="responsiblePersonName"    column="responsible_person_name"    />
+        <result property="responsiblePersonPhone"    column="responsible_person_phone"    />
+        <result property="isEnable"    column="is_enable"    />
+        <result property="pushStatus"    column="push_status"    />
+        <result property="subjectTotal"    column="subject_total"    />
+        <result property="isFullPower"    column="is_full_power"    />
+        <result property="isDel"    column="is_del"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="stationType"    column="station_type"    />
+        <result property="systemPowerUuid"    column="system_power_uuid"    />
+        <result property="areaId"    column="area_id"    />
+    </resultMap>
+
+    <sql id="selectConfigStationVo">
+        select id, station_name, station_code, superior_area_id, period_total, longitude, latitude, province_number, city_number, position, installed_capacity, grid_connected_capacity, fans_pv_panelquantity, elevation, operation_time, boosterstation_voltage_level, booster_station_longitude, boosterstation_latitude, responsible_person_name, responsible_person_phone, is_enable, push_status, subject_total, is_full_power, is_del, create_by, create_time, update_by, update_time, station_type, system_power_uuid, area_id from config_station
+    </sql>
+
+    <select id="selectConfigStationList" parameterType="ConfigStation" resultMap="ConfigStationResult">
+        <include refid="selectConfigStationVo"/>
+        <where>
+            <if test="stationName != null  and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
+            <if test="stationCode != null  and stationCode != ''"> and station_code = #{stationCode}</if>
+            <if test="superiorAreaId != null  and superiorAreaId != ''"> and superior_area_id = #{superiorAreaId}</if>
+            <if test="periodTotal != null "> and period_total = #{periodTotal}</if>
+            <if test="longitude != null  and longitude != ''"> and longitude = #{longitude}</if>
+            <if test="latitude != null  and latitude != ''"> and latitude = #{latitude}</if>
+            <if test="provinceNumber != null  and provinceNumber != ''"> and province_number = #{provinceNumber}</if>
+            <if test="cityNumber != null  and cityNumber != ''"> and city_number = #{cityNumber}</if>
+            <if test="position != null  and position != ''"> and position = #{position}</if>
+            <if test="installedCapacity != null "> and installed_capacity = #{installedCapacity}</if>
+            <if test="gridConnectedCapacity != null "> and grid_connected_capacity = #{gridConnectedCapacity}</if>
+            <if test="fansPvPanelquantity != null "> and fans_pv_panelquantity = #{fansPvPanelquantity}</if>
+            <if test="elevation != null  and elevation != ''"> and elevation = #{elevation}</if>
+            <if test="operationTime != null  and operationTime != ''"> and operation_time = #{operationTime}</if>
+            <if test="boosterstationVoltageLevel != null  and boosterstationVoltageLevel != ''"> and boosterstation_voltage_level = #{boosterstationVoltageLevel}</if>
+            <if test="boosterStationLongitude != null  and boosterStationLongitude != ''"> and booster_station_longitude = #{boosterStationLongitude}</if>
+            <if test="boosterstationLatitude != null  and boosterstationLatitude != ''"> and boosterstation_latitude = #{boosterstationLatitude}</if>
+            <if test="responsiblePersonName != null  and responsiblePersonName != ''"> and responsible_person_name like concat('%', #{responsiblePersonName}, '%')</if>
+            <if test="responsiblePersonPhone != null  and responsiblePersonPhone != ''"> and responsible_person_phone = #{responsiblePersonPhone}</if>
+            <if test="isEnable != null  and isEnable != ''"> and is_enable = #{isEnable}</if>
+            <if test="pushStatus != null "> and push_status = #{pushStatus}</if>
+            <if test="subjectTotal != null "> and subject_total = #{subjectTotal}</if>
+            <if test="isFullPower != null  and isFullPower != ''"> and is_full_power = #{isFullPower}</if>
+            <if test="isDel != null  and isDel != ''"> and is_del = #{isDel}</if>
+            <if test="stationType != null "> and station_type = #{stationType}</if>
+            <if test="systemPowerUuid != null  and systemPowerUuid != ''"> and system_power_uuid = #{systemPowerUuid}</if>
+            <if test="areaId != null  and areaId != ''"> and area_id = #{areaId}</if>
+        </where>
+    </select>
+
+    <select id="selectConfigStationById" parameterType="Long" resultMap="ConfigStationResult">
+        <include refid="selectConfigStationVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertConfigStation" parameterType="ConfigStation">
+        insert into config_station
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="stationName != null and stationName != ''">station_name,</if>
+            <if test="stationCode != null">station_code,</if>
+            <if test="superiorAreaId != null">superior_area_id,</if>
+            <if test="periodTotal != null">period_total,</if>
+            <if test="longitude != null and longitude != ''">longitude,</if>
+            <if test="latitude != null and latitude != ''">latitude,</if>
+            <if test="provinceNumber != null and provinceNumber != ''">province_number,</if>
+            <if test="cityNumber != null and cityNumber != ''">city_number,</if>
+            <if test="position != null">position,</if>
+            <if test="installedCapacity != null">installed_capacity,</if>
+            <if test="gridConnectedCapacity != null">grid_connected_capacity,</if>
+            <if test="fansPvPanelquantity != null">fans_pv_panelquantity,</if>
+            <if test="elevation != null">elevation,</if>
+            <if test="operationTime != null">operation_time,</if>
+            <if test="boosterstationVoltageLevel != null">boosterstation_voltage_level,</if>
+            <if test="boosterStationLongitude != null">booster_station_longitude,</if>
+            <if test="boosterstationLatitude != null">boosterstation_latitude,</if>
+            <if test="responsiblePersonName != null">responsible_person_name,</if>
+            <if test="responsiblePersonPhone != null">responsible_person_phone,</if>
+            <if test="isEnable != null and isEnable != ''">is_enable,</if>
+            <if test="pushStatus != null">push_status,</if>
+            <if test="subjectTotal != null">subject_total,</if>
+            <if test="isFullPower != null and isFullPower != ''">is_full_power,</if>
+            <if test="isDel != null and isDel != ''">is_del,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null and createTime != ''">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null and updateTime != ''">update_time,</if>
+            <if test="stationType != null">station_type,</if>
+            <if test="systemPowerUuid != null">system_power_uuid,</if>
+            <if test="areaId != null">area_id,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="stationName != null and stationName != ''">#{stationName},</if>
+            <if test="stationCode != null">#{stationCode},</if>
+            <if test="superiorAreaId != null">#{superiorAreaId},</if>
+            <if test="periodTotal != null">#{periodTotal},</if>
+            <if test="longitude != null and longitude != ''">#{longitude},</if>
+            <if test="latitude != null and latitude != ''">#{latitude},</if>
+            <if test="provinceNumber != null and provinceNumber != ''">#{provinceNumber},</if>
+            <if test="cityNumber != null and cityNumber != ''">#{cityNumber},</if>
+            <if test="position != null">#{position},</if>
+            <if test="installedCapacity != null">#{installedCapacity},</if>
+            <if test="gridConnectedCapacity != null">#{gridConnectedCapacity},</if>
+            <if test="fansPvPanelquantity != null">#{fansPvPanelquantity},</if>
+            <if test="elevation != null">#{elevation},</if>
+            <if test="operationTime != null">#{operationTime},</if>
+            <if test="boosterstationVoltageLevel != null">#{boosterstationVoltageLevel},</if>
+            <if test="boosterStationLongitude != null">#{boosterStationLongitude},</if>
+            <if test="boosterstationLatitude != null">#{boosterstationLatitude},</if>
+            <if test="responsiblePersonName != null">#{responsiblePersonName},</if>
+            <if test="responsiblePersonPhone != null">#{responsiblePersonPhone},</if>
+            <if test="isEnable != null and isEnable != ''">#{isEnable},</if>
+            <if test="pushStatus != null">#{pushStatus},</if>
+            <if test="subjectTotal != null">#{subjectTotal},</if>
+            <if test="isFullPower != null and isFullPower != ''">#{isFullPower},</if>
+            <if test="isDel != null and isDel != ''">#{isDel},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null and createTime != ''">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null and updateTime != ''">#{updateTime},</if>
+            <if test="stationType != null">#{stationType},</if>
+            <if test="systemPowerUuid != null">#{systemPowerUuid},</if>
+            <if test="areaId != null">#{areaId},</if>
+        </trim>
+    </insert>
+
+    <update id="updateConfigStation" parameterType="ConfigStation">
+        update config_station
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="stationName != null and stationName != ''">station_name = #{stationName},</if>
+            <if test="stationCode != null">station_code = #{stationCode},</if>
+            <if test="superiorAreaId != null">superior_area_id = #{superiorAreaId},</if>
+            <if test="periodTotal != null">period_total = #{periodTotal},</if>
+            <if test="longitude != null and longitude != ''">longitude = #{longitude},</if>
+            <if test="latitude != null and latitude != ''">latitude = #{latitude},</if>
+            <if test="provinceNumber != null and provinceNumber != ''">province_number = #{provinceNumber},</if>
+            <if test="cityNumber != null and cityNumber != ''">city_number = #{cityNumber},</if>
+            <if test="position != null">position = #{position},</if>
+            <if test="installedCapacity != null">installed_capacity = #{installedCapacity},</if>
+            <if test="gridConnectedCapacity != null">grid_connected_capacity = #{gridConnectedCapacity},</if>
+            <if test="fansPvPanelquantity != null">fans_pv_panelquantity = #{fansPvPanelquantity},</if>
+            <if test="elevation != null">elevation = #{elevation},</if>
+            <if test="operationTime != null">operation_time = #{operationTime},</if>
+            <if test="boosterstationVoltageLevel != null">boosterstation_voltage_level = #{boosterstationVoltageLevel},</if>
+            <if test="boosterStationLongitude != null">booster_station_longitude = #{boosterStationLongitude},</if>
+            <if test="boosterstationLatitude != null">boosterstation_latitude = #{boosterstationLatitude},</if>
+            <if test="responsiblePersonName != null">responsible_person_name = #{responsiblePersonName},</if>
+            <if test="responsiblePersonPhone != null">responsible_person_phone = #{responsiblePersonPhone},</if>
+            <if test="isEnable != null and isEnable != ''">is_enable = #{isEnable},</if>
+            <if test="pushStatus != null">push_status = #{pushStatus},</if>
+            <if test="subjectTotal != null">subject_total = #{subjectTotal},</if>
+            <if test="isFullPower != null and isFullPower != ''">is_full_power = #{isFullPower},</if>
+            <if test="isDel != null and isDel != ''">is_del = #{isDel},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null and createTime != ''">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null and updateTime != ''">update_time = #{updateTime},</if>
+            <if test="stationType != null">station_type = #{stationType},</if>
+            <if test="systemPowerUuid != null">system_power_uuid = #{systemPowerUuid},</if>
+            <if test="areaId != null">area_id = #{areaId},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteConfigStationById" parameterType="Long">
+        delete from config_station where id = #{id}
+    </delete>
+
+    <delete id="deleteConfigStationByIds" parameterType="Long">
+        delete from config_station where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 66 - 0
forecast-dao/src/main/resources/mapper/config/ConfigTransmitMapper.xml

@@ -0,0 +1,66 @@
+<?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="cn.oleauto.config.mapper.ConfigTransmitMapper">
+    
+    <resultMap type="ConfigTransmit" id="ConfigTransmitResult">
+        <result property="id"    column="id"    />
+        <result property="name"    column="name"    />
+        <result property="transmitClass"    column="transmit_class"    />
+        <result property="configExample"    column="config_example"    />
+    </resultMap>
+
+    <sql id="selectConfigTransmitVo">
+        select id, name, transmit_class, config_example from config_transmit
+    </sql>
+
+    <select id="selectConfigTransmitList" parameterType="ConfigTransmit" resultMap="ConfigTransmitResult">
+        <include refid="selectConfigTransmitVo"/>
+        <where>  
+            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
+            <if test="transmitClass != null  and transmitClass != ''"> and transmit_class = #{transmitClass}</if>
+            <if test="configExample != null  and configExample != ''"> and config_example = #{configExample}</if>
+        </where>
+    </select>
+    
+    <select id="selectConfigTransmitById" parameterType="Long" resultMap="ConfigTransmitResult">
+        <include refid="selectConfigTransmitVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertConfigTransmit" parameterType="ConfigTransmit" useGeneratedKeys="true" keyProperty="id">
+        insert into config_transmit
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="name != null and name != ''">name,</if>
+            <if test="transmitClass != null and transmitClass != ''">transmit_class,</if>
+            <if test="configExample != null and configExample != ''">config_example,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="name != null and name != ''">#{name},</if>
+            <if test="transmitClass != null and transmitClass != ''">#{transmitClass},</if>
+            <if test="configExample != null and configExample != ''">#{configExample},</if>
+         </trim>
+    </insert>
+
+    <update id="updateConfigTransmit" parameterType="ConfigTransmit">
+        update config_transmit
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="name != null and name != ''">name = #{name},</if>
+            <if test="transmitClass != null and transmitClass != ''">transmit_class = #{transmitClass},</if>
+            <if test="configExample != null and configExample != ''">config_example = #{configExample},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteConfigTransmitById" parameterType="Long">
+        delete from config_transmit where id = #{id}
+    </delete>
+
+    <delete id="deleteConfigTransmitByIds" parameterType="String">
+        delete from config_transmit where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 107 - 0
forecast-dao/src/main/resources/mapper/config/ConfigWeatherLocalMapper.xml

@@ -0,0 +1,107 @@
+<?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="cn.oleauto.config.mapper.ConfigWeatherLocalMapper">
+    
+    <resultMap type="ConfigWeatherLocal" id="ConfigWeatherLocalResult">
+        <result property="id"    column="id"    />
+        <result property="configStationId"    column="config_station_id"    />
+        <result property="horizontalIrradiance"    column="horizontal_irradiance"    />
+        <result property="inclinedIrradiance"    column="inclined_irradiance"    />
+        <result property="temperature"    column="temperature"    />
+        <result property="pressure"    column="pressure"    />
+        <result property="humidity"    column="humidity"    />
+        <result property="windSpeed"    column="wind_speed"    />
+        <result property="windDirection"    column="wind_direction"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="updateBy"    column="update_by"    />
+    </resultMap>
+
+    <sql id="selectConfigWeatherLocalVo">
+        select id, config_station_id, horizontal_irradiance, inclined_irradiance, temperature, pressure, humidity, wind_speed, wind_direction, create_time, update_time, create_by, update_by from config_weather_local
+    </sql>
+
+    <select id="selectConfigWeatherLocalList" parameterType="ConfigWeatherLocal" resultMap="ConfigWeatherLocalResult">
+        <include refid="selectConfigWeatherLocalVo"/>
+        <where>  
+            <if test="configStationId != null  and configStationId != ''"> and config_station_id = #{configStationId}</if>
+            <if test="horizontalIrradiance != null  and horizontalIrradiance != ''"> and horizontal_irradiance = #{horizontalIrradiance}</if>
+            <if test="inclinedIrradiance != null  and inclinedIrradiance != ''"> and inclined_irradiance = #{inclinedIrradiance}</if>
+            <if test="temperature != null  and temperature != ''"> and temperature = #{temperature}</if>
+            <if test="pressure != null  and pressure != ''"> and pressure = #{pressure}</if>
+            <if test="humidity != null  and humidity != ''"> and humidity = #{humidity}</if>
+            <if test="windSpeed != null  and windSpeed != ''"> and wind_speed = #{windSpeed}</if>
+            <if test="windDirection != null  and windDirection != ''"> and wind_direction = #{windDirection}</if>
+        </where>
+    </select>
+    
+    <select id="selectConfigWeatherLocalById" parameterType="Long" resultMap="ConfigWeatherLocalResult">
+        <include refid="selectConfigWeatherLocalVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertConfigWeatherLocal" parameterType="ConfigWeatherLocal" useGeneratedKeys="true" keyProperty="id">
+        insert into config_weather_local
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="configStationId != null and configStationId != ''">config_station_id,</if>
+            <if test="horizontalIrradiance != null">horizontal_irradiance,</if>
+            <if test="inclinedIrradiance != null">inclined_irradiance,</if>
+            <if test="temperature != null">temperature,</if>
+            <if test="pressure != null">pressure,</if>
+            <if test="humidity != null">humidity,</if>
+            <if test="windSpeed != null">wind_speed,</if>
+            <if test="windDirection != null">wind_direction,</if>
+            <if test="createTime != null and createTime != ''">create_time,</if>
+            <if test="updateTime != null and updateTime != ''">update_time,</if>
+            <if test="createBy != null and createBy != ''">create_by,</if>
+            <if test="updateBy != null and updateBy != ''">update_by,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="configStationId != null and configStationId != ''">#{configStationId},</if>
+            <if test="horizontalIrradiance != null">#{horizontalIrradiance},</if>
+            <if test="inclinedIrradiance != null">#{inclinedIrradiance},</if>
+            <if test="temperature != null">#{temperature},</if>
+            <if test="pressure != null">#{pressure},</if>
+            <if test="humidity != null">#{humidity},</if>
+            <if test="windSpeed != null">#{windSpeed},</if>
+            <if test="windDirection != null">#{windDirection},</if>
+            <if test="createTime != null and createTime != ''">#{createTime},</if>
+            <if test="updateTime != null and updateTime != ''">#{updateTime},</if>
+            <if test="createBy != null and createBy != ''">#{createBy},</if>
+            <if test="updateBy != null and updateBy != ''">#{updateBy},</if>
+         </trim>
+    </insert>
+
+    <update id="updateConfigWeatherLocal" parameterType="ConfigWeatherLocal">
+        update config_weather_local
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="configStationId != null and configStationId != ''">config_station_id = #{configStationId},</if>
+            <if test="horizontalIrradiance != null">horizontal_irradiance = #{horizontalIrradiance},</if>
+            <if test="inclinedIrradiance != null">inclined_irradiance = #{inclinedIrradiance},</if>
+            <if test="temperature != null">temperature = #{temperature},</if>
+            <if test="pressure != null">pressure = #{pressure},</if>
+            <if test="humidity != null">humidity = #{humidity},</if>
+            <if test="windSpeed != null">wind_speed = #{windSpeed},</if>
+            <if test="windDirection != null">wind_direction = #{windDirection},</if>
+            <if test="createTime != null and createTime != ''">create_time = #{createTime},</if>
+            <if test="updateTime != null and updateTime != ''">update_time = #{updateTime},</if>
+            <if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
+            <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteConfigWeatherLocalById" parameterType="Long">
+        delete from config_weather_local where id = #{id}
+    </delete>
+
+    <delete id="deleteConfigWeatherLocalByIds" parameterType="String">
+        delete from config_weather_local where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 136 - 0
forecast-dao/src/main/resources/mapper/config/ConfigYkMapper.xml

@@ -0,0 +1,136 @@
+<?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="cn.oleauto.config.mapper.ConfigYkMapper">
+    
+    <resultMap type="ConfigYk" id="ConfigYkResult">
+        <result property="id"    column="id"    />
+        <result property="name"    column="name"    />
+        <result property="configDeviceId"    column="config_device_id"    />
+        <result property="addrCode"    column="addr_code"    />
+        <result property="controlStep"    column="control_step"    />
+        <result property="willWardship"    column="will_wardship"    />
+        <result property="controlType"    column="control_type"    />
+        <result property="fun"    column="fun"    />
+        <result property="param"    column="param"    />
+        <result property="tmOut"    column="tm_out"    />
+        <result property="remark"    column="remark"    />
+        <result property="precCheck"    column="prec_check"    />
+        <result property="precConfigPointId"    column="prec_config_point_id"    />
+        <result property="precValue"    column="prec_value"    />
+        <result property="postcCheck"    column="postc_check"    />
+        <result property="preoCheck"    column="preo_check"    />
+        <result property="preoConfigPointId"    column="preo_config_point_id"    />
+        <result property="preoValue"    column="preo_value"    />
+        <result property="postoCheck"    column="posto_check"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="updateBy"    column="update_by"    />
+    </resultMap>
+
+    <sql id="selectConfigYkVo">
+        select id, name, config_device_id, addr_code, control_step, will_wardship, control_type, fun, param, tm_out, remark, prec_check, prec_config_point_id, prec_value, postc_check, preo_check, preo_config_point_id, preo_value, posto_check, create_time, update_time, create_by, update_by from config_yk
+    </sql>
+
+    <select id="selectConfigYkList" parameterType="ConfigYk" resultMap="ConfigYkResult">
+        <include refid="selectConfigYkVo"/>
+        <where>  
+            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
+            <if test="configDeviceId != null "> and config_device_id = #{configDeviceId}</if>
+            <if test="addrCode != null  and addrCode != ''"> and addr_code = #{addrCode}</if>
+        </where>
+    </select>
+    
+    <select id="selectConfigYkById" parameterType="Long" resultMap="ConfigYkResult">
+        <include refid="selectConfigYkVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertConfigYk" parameterType="ConfigYk" useGeneratedKeys="true" keyProperty="id">
+        insert into config_yk
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="name != null and name != ''">name,</if>
+            <if test="configDeviceId != null">config_device_id,</if>
+            <if test="addrCode != null and addrCode != ''">addr_code,</if>
+            <if test="controlStep != null and controlStep != ''">control_step,</if>
+            <if test="willWardship != null and willWardship != ''">will_wardship,</if>
+            <if test="controlType != null and controlType != ''">control_type,</if>
+            <if test="fun != null and fun != ''">fun,</if>
+            <if test="param != null and param != ''">param,</if>
+            <if test="tmOut != null">tm_out,</if>
+            <if test="remark != null and remark != ''">remark,</if>
+            <if test="precCheck != null and precCheck != ''">prec_check,</if>
+            <if test="precConfigPointId != null">prec_config_point_id,</if>
+            <if test="precValue != null">prec_value,</if>
+            <if test="postcCheck != null and postcCheck != ''">postc_check,</if>
+            <if test="preoCheck != null and preoCheck != ''">preo_check,</if>
+            <if test="preoConfigPointId != null">preo_config_point_id,</if>
+            <if test="preoValue != null">preo_value,</if>
+            <if test="postoCheck != null and postoCheck != ''">posto_check,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="updateBy != null">update_by,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="name != null and name != ''">#{name},</if>
+            <if test="configDeviceId != null">#{configDeviceId},</if>
+            <if test="addrCode != null and addrCode != ''">#{addrCode},</if>
+            <if test="controlStep != null and controlStep != ''">#{controlStep},</if>
+            <if test="willWardship != null and willWardship != ''">#{willWardship},</if>
+            <if test="controlType != null and controlType != ''">#{controlType},</if>
+            <if test="fun != null and fun != ''">#{fun},</if>
+            <if test="param != null and param != ''">#{param},</if>
+            <if test="tmOut != null">#{tmOut},</if>
+            <if test="remark != null and remark != ''">#{remark},</if>
+            <if test="precCheck != null and precCheck != ''">#{precCheck},</if>
+            <if test="precConfigPointId != null">#{precConfigPointId},</if>
+            <if test="precValue != null">#{precValue},</if>
+            <if test="postcCheck != null and postcCheck != ''">#{postcCheck},</if>
+            <if test="preoCheck != null and preoCheck != ''">#{preoCheck},</if>
+            <if test="preoConfigPointId != null">#{preoConfigPointId},</if>
+            <if test="preoValue != null">#{preoValue},</if>
+            <if test="postoCheck != null and postoCheck != ''">#{postoCheck},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+         </trim>
+    </insert>
+
+    <update id="updateConfigYk" parameterType="ConfigYk">
+        update config_yk
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="name != null and name != ''">name = #{name},</if>
+            <if test="configDeviceId != null">config_device_id = #{configDeviceId},</if>
+            <if test="addrCode != null and addrCode != ''">addr_code = #{addrCode},</if>
+            <if test="controlStep != null and controlStep != ''">control_step = #{controlStep},</if>
+            <if test="willWardship != null and willWardship != ''">will_wardship = #{willWardship},</if>
+            <if test="controlType != null and controlType != ''">control_type = #{controlType},</if>
+            <if test="fun != null">fun = #{fun},</if>
+            <if test="param != null">param = #{param},</if>
+            <if test="tmOut != null">tm_out = #{tmOut},</if>
+            <if test="remark != null ">remark = #{remark},</if>
+            <if test="precCheck != null and precCheck != ''">prec_check = #{precCheck},</if>
+            <if test="precConfigPointId != null">prec_config_point_id = #{precConfigPointId},</if>
+            <if test="precValue != null">prec_value = #{precValue},</if>
+            <if test="postcCheck != null and postcCheck != ''">postc_check = #{postcCheck},</if>
+            <if test="preoCheck != null and preoCheck != ''">preo_check = #{preoCheck},</if>
+            <if test="preoConfigPointId != null">preo_config_point_id = #{preoConfigPointId},</if>
+            <if test="preoValue != null">preo_value = #{preoValue},</if>
+            <if test="postoCheck != null and postoCheck != ''">posto_check = #{postoCheck},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteConfigYkById" parameterType="Long">
+        delete from config_yk where id = #{id}
+    </delete>
+
+    <delete id="deleteConfigYkByIds" parameterType="String">
+        delete from config_yk where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 101 - 0
forecast-dao/src/main/resources/mapper/config/ConfigYtMapper.xml

@@ -0,0 +1,101 @@
+<?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="cn.oleauto.config.mapper.ConfigYtMapper">
+    
+    <resultMap type="ConfigYt" id="ConfigYtResult">
+        <result property="id"    column="id"    />
+        <result property="name"    column="name"    />
+        <result property="configDeviceId"    column="config_device_id"    />
+        <result property="addrCode"    column="addr_code"    />
+        <result property="controlVal"    column="control_val"    />
+        <result property="tmOut"    column="tm_out"    />
+        <result property="fun"    column="fun"    />
+        <result property="param"    column="param"    />
+        <result property="remark"    column="remark"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="updateBy"    column="update_by"    />
+    </resultMap>
+
+    <sql id="selectConfigYtVo">
+        select id, name, config_device_id, addr_code, control_val, tm_out, fun, param, remark, create_time, update_time, create_by, update_by from config_yt
+    </sql>
+
+    <select id="selectConfigYtList" parameterType="ConfigYt" resultMap="ConfigYtResult">
+        <include refid="selectConfigYtVo"/>
+        <where>  
+            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
+            <if test="configDeviceId != null "> and config_device_id = #{configDeviceId}</if>
+            <if test="addrCode != null  and addrCode != ''"> and addr_code = #{addrCode}</if>
+        </where>
+    </select>
+    
+    <select id="selectConfigYtById" parameterType="Long" resultMap="ConfigYtResult">
+        <include refid="selectConfigYtVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertConfigYt" parameterType="ConfigYt" useGeneratedKeys="true" keyProperty="id">
+        insert into config_yt
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="name != null and name != ''">name,</if>
+            <if test="configDeviceId != null">config_device_id,</if>
+            <if test="addrCode != null and addrCode != ''">addr_code,</if>
+            <if test="controlVal != null and controlVal != ''">control_val,</if>
+            <if test="tmOut != null">tm_out,</if>
+            <if test="fun != null">fun,</if>
+            <if test="param != null">param,</if>
+            <if test="remark != null">remark,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="updateBy != null">update_by,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="name != null and name != ''">#{name},</if>
+            <if test="configDeviceId != null">#{configDeviceId},</if>
+            <if test="addrCode != null and addrCode != ''">#{addrCode},</if>
+            <if test="controlVal != null and controlVal != ''">#{controlVal},</if>
+            <if test="tmOut != null">#{tmOut},</if>
+            <if test="fun != null">#{fun},</if>
+            <if test="param != null">#{param},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+         </trim>
+    </insert>
+
+    <update id="updateConfigYt" parameterType="ConfigYt">
+        update config_yt
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="name != null and name != ''">name = #{name},</if>
+            <if test="configDeviceId != null">config_device_id = #{configDeviceId},</if>
+            <if test="addrCode != null and addrCode != ''">addr_code = #{addrCode},</if>
+            <if test="controlVal != null and controlVal != ''">control_val = #{controlVal},</if>
+            <if test="tmOut != null">tm_out = #{tmOut},</if>
+            <if test="fun != null">fun = #{fun},</if>
+            <if test="param != null">param = #{param},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteConfigYtById" parameterType="Long">
+        delete from config_yt where id = #{id}
+    </delete>
+
+    <delete id="deleteConfigYtByIds" parameterType="string">
+        delete from config_yt where id in
+        <if test="array != null and array.length>0">
+            <foreach item="id" collection="array" open="(" separator="," close=")">
+                #{id}
+            </foreach>
+        </if>
+        <if test="array == null or array.length==0">
+        (-1)
+        </if>
+    </delete>
+</mapper>

+ 89 - 0
forecast-dao/src/main/resources/mapper/data/DataElectricityLocalMapper.xml

@@ -0,0 +1,89 @@
+<?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="cn.oleauto.data.mapper.DataElectricityLocalMapper">
+    
+    <resultMap type="DataElectricityLocal" id="DataElectricityLocalResult">
+        <result property="tm"    column="tm"    />
+        <result property="configStationId"    column="config_station_id"    />
+        <result property="actualPower"    column="actual_power"    />
+        <result property="theoreticalPower"    column="theoretical_power"    />
+        <result property="curtailmentPower"    column="curtailment_power"    />
+        <result property="availability"    column="availability"    />
+        <result property="deviceStatus"    column="device_status"    />
+        <result property="gridStatus"    column="grid_status"    />
+    </resultMap>
+
+    <sql id="selectDataElectricityLocalVo">
+        select tm, config_station_id, actual_power, theoretical_power, curtailment_power, availability, device_status, grid_status from data_electricity_local
+    </sql>
+
+    <select id="selectDataElectricityLocalList" parameterType="DataElectricityLocal" resultMap="DataElectricityLocalResult">
+        <include refid="selectDataElectricityLocalVo"/>
+        <where>  
+            <if test="tm != null "> and tm = #{tm}</if>
+            <if test="configStationId != null "> and config_station_id = #{configStationId}</if>
+            <if test="actualPower != null "> and actual_power = #{actualPower}</if>
+            <if test="theoreticalPower != null "> and theoretical_power = #{theoreticalPower}</if>
+            <if test="curtailmentPower != null "> and curtailment_power = #{curtailmentPower}</if>
+            <if test="availability != null "> and availability = #{availability}</if>
+            <if test="deviceStatus != null "> and device_status = #{deviceStatus}</if>
+            <if test="gridStatus != null "> and grid_status = #{gridStatus}</if>
+        </where>
+    </select>
+    
+    <select id="selectDataElectricityLocalByTm" parameterType="Date" resultMap="DataElectricityLocalResult">
+        <include refid="selectDataElectricityLocalVo"/>
+        where tm = #{tm}
+    </select>
+        
+    <insert id="insertDataElectricityLocal" parameterType="DataElectricityLocal">
+        insert into data_electricity_local
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="tm != null">tm,</if>
+            <if test="configStationId != null">config_station_id,</if>
+            <if test="actualPower != null">actual_power,</if>
+            <if test="theoreticalPower != null">theoretical_power,</if>
+            <if test="curtailmentPower != null">curtailment_power,</if>
+            <if test="availability != null">availability,</if>
+            <if test="deviceStatus != null">device_status,</if>
+            <if test="gridStatus != null">grid_status,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="tm != null">#{tm},</if>
+            <if test="configStationId != null">#{configStationId},</if>
+            <if test="actualPower != null">#{actualPower},</if>
+            <if test="theoreticalPower != null">#{theoreticalPower},</if>
+            <if test="curtailmentPower != null">#{curtailmentPower},</if>
+            <if test="availability != null">#{availability},</if>
+            <if test="deviceStatus != null">#{deviceStatus},</if>
+            <if test="gridStatus != null">#{gridStatus},</if>
+         </trim>
+    </insert>
+
+    <update id="updateDataElectricityLocal" parameterType="DataElectricityLocal">
+        update data_electricity_local
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="configStationId != null">config_station_id = #{configStationId},</if>
+            <if test="actualPower != null">actual_power = #{actualPower},</if>
+            <if test="theoreticalPower != null">theoretical_power = #{theoreticalPower},</if>
+            <if test="curtailmentPower != null">curtailment_power = #{curtailmentPower},</if>
+            <if test="availability != null">availability = #{availability},</if>
+            <if test="deviceStatus != null">device_status = #{deviceStatus},</if>
+            <if test="gridStatus != null">grid_status = #{gridStatus},</if>
+        </trim>
+        where tm = #{tm}
+    </update>
+
+    <delete id="deleteDataElectricityLocalByTm" parameterType="Date">
+        delete from data_electricity_local where tm = #{tm}
+    </delete>
+
+    <delete id="deleteDataElectricityLocalByTms" parameterType="String">
+        delete from data_electricity_local where tm in 
+        <foreach item="tm" collection="array" open="(" separator="," close=")">
+            #{tm}
+        </foreach>
+    </delete>
+</mapper>

+ 94 - 0
forecast-dao/src/main/resources/mapper/data/DataWeatherLocalMapper.xml

@@ -0,0 +1,94 @@
+<?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="cn.oleauto.data.mapper.DataWeatherLocalMapper">
+    
+    <resultMap type="DataWeatherLocal" id="DataWeatherLocalResult">
+        <result property="tm"    column="tm"    />
+        <result property="deviceId"    column="device_id"    />
+        <result property="horizontalIrradiance"    column="horizontal_irradiance"    />
+        <result property="inclinedIrradiance"    column="inclined_irradiance"    />
+        <result property="temperature"    column="temperature"    />
+        <result property="pressure"    column="pressure"    />
+        <result property="humidity"    column="humidity"    />
+        <result property="windSpeed"    column="wind_speed"    />
+        <result property="windDirection"    column="wind_direction"    />
+    </resultMap>
+
+    <sql id="selectDataWeatherLocalVo">
+        select tm, device_id, horizontal_irradiance, inclined_irradiance, temperature, pressure, humidity, wind_speed, wind_direction from data_weather_local
+    </sql>
+
+    <select id="selectDataWeatherLocalList" parameterType="DataWeatherLocal" resultMap="DataWeatherLocalResult">
+        <include refid="selectDataWeatherLocalVo"/>
+        <where>  
+            <if test="tm != null "> and tm = #{tm}</if>
+            <if test="deviceId != null "> and device_id = #{deviceId}</if>
+            <if test="horizontalIrradiance != null "> and horizontal_irradiance = #{horizontalIrradiance}</if>
+            <if test="inclinedIrradiance != null "> and inclined_irradiance = #{inclinedIrradiance}</if>
+            <if test="temperature != null "> and temperature = #{temperature}</if>
+            <if test="pressure != null "> and pressure = #{pressure}</if>
+            <if test="humidity != null "> and humidity = #{humidity}</if>
+            <if test="windSpeed != null "> and wind_speed = #{windSpeed}</if>
+            <if test="windDirection != null "> and wind_direction = #{windDirection}</if>
+        </where>
+    </select>
+    
+    <select id="selectDataWeatherLocalByTm" parameterType="Date" resultMap="DataWeatherLocalResult">
+        <include refid="selectDataWeatherLocalVo"/>
+        where tm = #{tm}
+    </select>
+        
+    <insert id="insertDataWeatherLocal" parameterType="DataWeatherLocal">
+        insert into data_weather_local
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="tm != null">tm,</if>
+            <if test="deviceId != null">device_id,</if>
+            <if test="horizontalIrradiance != null">horizontal_irradiance,</if>
+            <if test="inclinedIrradiance != null">inclined_irradiance,</if>
+            <if test="temperature != null">temperature,</if>
+            <if test="pressure != null">pressure,</if>
+            <if test="humidity != null">humidity,</if>
+            <if test="windSpeed != null">wind_speed,</if>
+            <if test="windDirection != null">wind_direction,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="tm != null">#{tm},</if>
+            <if test="deviceId != null">#{deviceId},</if>
+            <if test="horizontalIrradiance != null">#{horizontalIrradiance},</if>
+            <if test="inclinedIrradiance != null">#{inclinedIrradiance},</if>
+            <if test="temperature != null">#{temperature},</if>
+            <if test="pressure != null">#{pressure},</if>
+            <if test="humidity != null">#{humidity},</if>
+            <if test="windSpeed != null">#{windSpeed},</if>
+            <if test="windDirection != null">#{windDirection},</if>
+         </trim>
+    </insert>
+
+    <update id="updateDataWeatherLocal" parameterType="DataWeatherLocal">
+        update data_weather_local
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="deviceId != null">device_id = #{deviceId},</if>
+            <if test="horizontalIrradiance != null">horizontal_irradiance = #{horizontalIrradiance},</if>
+            <if test="inclinedIrradiance != null">inclined_irradiance = #{inclinedIrradiance},</if>
+            <if test="temperature != null">temperature = #{temperature},</if>
+            <if test="pressure != null">pressure = #{pressure},</if>
+            <if test="humidity != null">humidity = #{humidity},</if>
+            <if test="windSpeed != null">wind_speed = #{windSpeed},</if>
+            <if test="windDirection != null">wind_direction = #{windDirection},</if>
+        </trim>
+        where tm = #{tm}
+    </update>
+
+    <delete id="deleteDataWeatherLocalByTm" parameterType="Date">
+        delete from data_weather_local where tm = #{tm}
+    </delete>
+
+    <delete id="deleteDataWeatherLocalByTms" parameterType="String">
+        delete from data_weather_local where tm in 
+        <foreach item="tm" collection="array" open="(" separator="," close=")">
+            #{tm}
+        </foreach>
+    </delete>
+</mapper>