小车设备表初始化
This commit is contained in:
@@ -0,0 +1,233 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.device.srgv.mapper.DeviceSrgvMapper">
|
||||
|
||||
<resultMap type="DeviceSrgv" id="DeviceSrgvResult">
|
||||
<result property="guid" column="guid" />
|
||||
<result property="deviceId" column="device_id" />
|
||||
<result property="deviceName" column="device_name" />
|
||||
<result property="ip" column="ip" />
|
||||
<result property="port" column="port" />
|
||||
<result property="type" column="type" />
|
||||
<result property="setFloor" column="set_floor" />
|
||||
<result property="powerTime" column="power_time" />
|
||||
<result property="lastTime" column="last_time" />
|
||||
<result property="agvStatus" column="agv_status" />
|
||||
<result property="taskNo" column="task_no" />
|
||||
<result property="srcSite" column="src_site" />
|
||||
<result property="tarSite" column="tar_site" />
|
||||
<result property="currSite" column="curr_site" />
|
||||
<result property="taskType" column="task_type" />
|
||||
<result property="battery" column="battery" />
|
||||
<result property="workMode" column="work_mode" />
|
||||
<result property="alarm" column="alarm" />
|
||||
<result property="status" column="status" />
|
||||
<result property="finish" column="finish" />
|
||||
<result property="chargeFlag" column="charge_flag" />
|
||||
<result property="workPhase" column="work_phase" />
|
||||
<result property="errMsg" column="err_msg" />
|
||||
<result property="ssjRequest" column="ssj_request" />
|
||||
<result property="changeLayer" column="change_layer" />
|
||||
<result property="cargoFlag" column="cargo_flag" />
|
||||
<result property="manualCharge" column="manual_charge" />
|
||||
<result property="path" column="path" />
|
||||
<result property="allowSend" column="allow_send" />
|
||||
<result property="currFloor" column="curr_floor" />
|
||||
<result property="offlineSite" column="offline_site" />
|
||||
<result property="locked" column="locked" />
|
||||
<result property="spare1" column="spare1" />
|
||||
<result property="spare2" column="spare2" />
|
||||
<result property="spare3" column="spare3" />
|
||||
<result property="spare4" column="spare4" />
|
||||
<result property="spare5" column="spare5" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDeviceSrgvVo">
|
||||
select guid, device_id, device_name, ip, port, type, set_floor, power_time, last_time, agv_status, task_no, src_site, tar_site, curr_site, task_type, battery, work_mode, alarm, status, finish, charge_flag, work_phase, err_msg, ssj_request, change_layer, cargo_flag, manual_charge, path, allow_send, curr_floor, offline_site, locked, spare1, spare2, spare3, spare4, spare5 from device_srgv
|
||||
</sql>
|
||||
|
||||
<select id="selectDeviceSrgvList" parameterType="DeviceSrgv" resultMap="DeviceSrgvResult">
|
||||
<include refid="selectDeviceSrgvVo"/>
|
||||
<where>
|
||||
<if test="deviceId != null "> and device_id = #{deviceId}</if>
|
||||
<if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
|
||||
<if test="ip != null and ip != ''"> and ip = #{ip}</if>
|
||||
<if test="port != null "> and port = #{port}</if>
|
||||
<if test="type != null and type != ''"> and type = #{type}</if>
|
||||
<if test="setFloor != null "> and set_floor = #{setFloor}</if>
|
||||
<if test="powerTime != null and powerTime != ''"> and power_time = #{powerTime}</if>
|
||||
<if test="lastTime != null and lastTime != ''"> and last_time = #{lastTime}</if>
|
||||
<if test="agvStatus != null and agvStatus != ''"> and agv_status = #{agvStatus}</if>
|
||||
<if test="taskNo != null "> and task_no = #{taskNo}</if>
|
||||
<if test="srcSite != null and srcSite != ''"> and src_site = #{srcSite}</if>
|
||||
<if test="tarSite != null and tarSite != ''"> and tar_site = #{tarSite}</if>
|
||||
<if test="currSite != null and currSite != ''"> and curr_site = #{currSite}</if>
|
||||
<if test="taskType != null "> and task_type = #{taskType}</if>
|
||||
<if test="battery != null "> and battery = #{battery}</if>
|
||||
<if test="workMode != null "> and work_mode = #{workMode}</if>
|
||||
<if test="alarm != null "> and alarm = #{alarm}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="finish != null "> and finish = #{finish}</if>
|
||||
<if test="chargeFlag != null "> and charge_flag = #{chargeFlag}</if>
|
||||
<if test="workPhase != null "> and work_phase = #{workPhase}</if>
|
||||
<if test="errMsg != null "> and err_msg = #{errMsg}</if>
|
||||
<if test="ssjRequest != null "> and ssj_request = #{ssjRequest}</if>
|
||||
<if test="changeLayer != null "> and change_layer = #{changeLayer}</if>
|
||||
<if test="cargoFlag != null "> and cargo_flag = #{cargoFlag}</if>
|
||||
<if test="manualCharge != null "> and manual_charge = #{manualCharge}</if>
|
||||
<if test="path != null and path != ''"> and path = #{path}</if>
|
||||
<if test="allowSend != null "> and allow_send = #{allowSend}</if>
|
||||
<if test="currFloor != null "> and curr_floor = #{currFloor}</if>
|
||||
<if test="offlineSite != null and offlineSite != ''"> and offline_site = #{offlineSite}</if>
|
||||
<if test="locked != null "> and locked = #{locked}</if>
|
||||
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
|
||||
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
|
||||
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
|
||||
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
|
||||
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDeviceSrgvByGuid" parameterType="String" resultMap="DeviceSrgvResult">
|
||||
<include refid="selectDeviceSrgvVo"/>
|
||||
where guid = #{guid}
|
||||
</select>
|
||||
|
||||
<insert id="insertDeviceSrgv" parameterType="DeviceSrgv">
|
||||
insert into device_srgv
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="guid != null">guid,</if>
|
||||
<if test="deviceId != null">device_id,</if>
|
||||
<if test="deviceName != null">device_name,</if>
|
||||
<if test="ip != null">ip,</if>
|
||||
<if test="port != null">port,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="setFloor != null">set_floor,</if>
|
||||
<if test="powerTime != null">power_time,</if>
|
||||
<if test="lastTime != null">last_time,</if>
|
||||
<if test="agvStatus != null">agv_status,</if>
|
||||
<if test="taskNo != null">task_no,</if>
|
||||
<if test="srcSite != null">src_site,</if>
|
||||
<if test="tarSite != null">tar_site,</if>
|
||||
<if test="currSite != null">curr_site,</if>
|
||||
<if test="taskType != null">task_type,</if>
|
||||
<if test="battery != null">battery,</if>
|
||||
<if test="workMode != null">work_mode,</if>
|
||||
<if test="alarm != null">alarm,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="finish != null">finish,</if>
|
||||
<if test="chargeFlag != null">charge_flag,</if>
|
||||
<if test="workPhase != null">work_phase,</if>
|
||||
<if test="errMsg != null">err_msg,</if>
|
||||
<if test="ssjRequest != null">ssj_request,</if>
|
||||
<if test="changeLayer != null">change_layer,</if>
|
||||
<if test="cargoFlag != null">cargo_flag,</if>
|
||||
<if test="manualCharge != null">manual_charge,</if>
|
||||
<if test="path != null">path,</if>
|
||||
<if test="allowSend != null">allow_send,</if>
|
||||
<if test="currFloor != null">curr_floor,</if>
|
||||
<if test="offlineSite != null">offline_site,</if>
|
||||
<if test="locked != null">locked,</if>
|
||||
<if test="spare1 != null">spare1,</if>
|
||||
<if test="spare2 != null">spare2,</if>
|
||||
<if test="spare3 != null">spare3,</if>
|
||||
<if test="spare4 != null">spare4,</if>
|
||||
<if test="spare5 != null">spare5,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="guid != null">#{guid},</if>
|
||||
<if test="deviceId != null">#{deviceId},</if>
|
||||
<if test="deviceName != null">#{deviceName},</if>
|
||||
<if test="ip != null">#{ip},</if>
|
||||
<if test="port != null">#{port},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="setFloor != null">#{setFloor},</if>
|
||||
<if test="powerTime != null">#{powerTime},</if>
|
||||
<if test="lastTime != null">#{lastTime},</if>
|
||||
<if test="agvStatus != null">#{agvStatus},</if>
|
||||
<if test="taskNo != null">#{taskNo},</if>
|
||||
<if test="srcSite != null">#{srcSite},</if>
|
||||
<if test="tarSite != null">#{tarSite},</if>
|
||||
<if test="currSite != null">#{currSite},</if>
|
||||
<if test="taskType != null">#{taskType},</if>
|
||||
<if test="battery != null">#{battery},</if>
|
||||
<if test="workMode != null">#{workMode},</if>
|
||||
<if test="alarm != null">#{alarm},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="finish != null">#{finish},</if>
|
||||
<if test="chargeFlag != null">#{chargeFlag},</if>
|
||||
<if test="workPhase != null">#{workPhase},</if>
|
||||
<if test="errMsg != null">#{errMsg},</if>
|
||||
<if test="ssjRequest != null">#{ssjRequest},</if>
|
||||
<if test="changeLayer != null">#{changeLayer},</if>
|
||||
<if test="cargoFlag != null">#{cargoFlag},</if>
|
||||
<if test="manualCharge != null">#{manualCharge},</if>
|
||||
<if test="path != null">#{path},</if>
|
||||
<if test="allowSend != null">#{allowSend},</if>
|
||||
<if test="currFloor != null">#{currFloor},</if>
|
||||
<if test="offlineSite != null">#{offlineSite},</if>
|
||||
<if test="locked != null">#{locked},</if>
|
||||
<if test="spare1 != null">#{spare1},</if>
|
||||
<if test="spare2 != null">#{spare2},</if>
|
||||
<if test="spare3 != null">#{spare3},</if>
|
||||
<if test="spare4 != null">#{spare4},</if>
|
||||
<if test="spare5 != null">#{spare5},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDeviceSrgv" parameterType="DeviceSrgv">
|
||||
update device_srgv
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="deviceId != null">device_id = #{deviceId},</if>
|
||||
<if test="deviceName != null">device_name = #{deviceName},</if>
|
||||
<if test="ip != null">ip = #{ip},</if>
|
||||
<if test="port != null">port = #{port},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="setFloor != null">set_floor = #{setFloor},</if>
|
||||
<if test="powerTime != null">power_time = #{powerTime},</if>
|
||||
<if test="lastTime != null">last_time = #{lastTime},</if>
|
||||
<if test="agvStatus != null">agv_status = #{agvStatus},</if>
|
||||
<if test="taskNo != null">task_no = #{taskNo},</if>
|
||||
<if test="srcSite != null">src_site = #{srcSite},</if>
|
||||
<if test="tarSite != null">tar_site = #{tarSite},</if>
|
||||
<if test="currSite != null">curr_site = #{currSite},</if>
|
||||
<if test="taskType != null">task_type = #{taskType},</if>
|
||||
<if test="battery != null">battery = #{battery},</if>
|
||||
<if test="workMode != null">work_mode = #{workMode},</if>
|
||||
<if test="alarm != null">alarm = #{alarm},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="finish != null">finish = #{finish},</if>
|
||||
<if test="chargeFlag != null">charge_flag = #{chargeFlag},</if>
|
||||
<if test="workPhase != null">work_phase = #{workPhase},</if>
|
||||
<if test="errMsg != null">err_msg = #{errMsg},</if>
|
||||
<if test="ssjRequest != null">ssj_request = #{ssjRequest},</if>
|
||||
<if test="changeLayer != null">change_layer = #{changeLayer},</if>
|
||||
<if test="cargoFlag != null">cargo_flag = #{cargoFlag},</if>
|
||||
<if test="manualCharge != null">manual_charge = #{manualCharge},</if>
|
||||
<if test="path != null">path = #{path},</if>
|
||||
<if test="allowSend != null">allow_send = #{allowSend},</if>
|
||||
<if test="currFloor != null">curr_floor = #{currFloor},</if>
|
||||
<if test="offlineSite != null">offline_site = #{offlineSite},</if>
|
||||
<if test="locked != null">locked = #{locked},</if>
|
||||
<if test="spare1 != null">spare1 = #{spare1},</if>
|
||||
<if test="spare2 != null">spare2 = #{spare2},</if>
|
||||
<if test="spare3 != null">spare3 = #{spare3},</if>
|
||||
<if test="spare4 != null">spare4 = #{spare4},</if>
|
||||
<if test="spare5 != null">spare5 = #{spare5},</if>
|
||||
</trim>
|
||||
where guid = #{guid}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDeviceSrgvByGuid" parameterType="String">
|
||||
delete from device_srgv where guid = #{guid}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDeviceSrgvByGuids" parameterType="String">
|
||||
delete from device_srgv where guid in
|
||||
<foreach item="guid" collection="array" open="(" separator="," close=")">
|
||||
#{guid}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user