|
|
<?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.sunyo.wlpt.dispatch.mapper.DispatchNoteMapper">
|
|
|
<resultMap id="BaseResultMap" type="com.sunyo.wlpt.dispatch.domain.DispatchNote">
|
|
|
<!--@mbg.generated-->
|
|
|
<!--@Table dispatch_note-->
|
|
|
<id column="id" jdbcType="VARCHAR" property="id"/>
|
|
|
<result column="user_name" jdbcType="VARCHAR" property="userName"/>
|
|
|
<result column="user_mobile" jdbcType="VARCHAR" property="userMobile"/>
|
|
|
<result column="vehicle_number" jdbcType="INTEGER" property="vehicleNumber"/>
|
|
|
<result column="vehicle_type" jdbcType="VARCHAR" property="vehicleType"/>
|
|
|
<result column="license_plate_number" jdbcType="VARCHAR" property="licensePlateNumber"/>
|
|
|
<result column="driver_name" jdbcType="VARCHAR" property="driverName"/>
|
|
|
<result column="driver_mobile" jdbcType="VARCHAR" property="driverMobile"/>
|
|
|
<result column="dispatch_type" jdbcType="VARCHAR" property="dispatchType"/>
|
|
|
<result column="station" jdbcType="VARCHAR" property="station"/>
|
|
|
<result column="status" jdbcType="VARCHAR" property="status"/>
|
|
|
<result column="gmt_create" jdbcType="TIMESTAMP" property="gmtCreate"/>
|
|
|
<result column="gmt_modified" jdbcType="TIMESTAMP" property="gmtModified"/>
|
|
|
<result column="begin_time" jdbcType="TIMESTAMP" property="beginTime"/>
|
|
|
<result column="end_time" jdbcType="TIMESTAMP" property="endTime"/>
|
|
|
<result column="operation" jdbcType="VARCHAR" property="operation"/>
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
<!--@mbg.generated-->
|
|
|
id, user_name, user_mobile, vehicle_number, vehicle_type, license_plate_number, driver_name,
|
|
|
driver_mobile, dispatch_type, station, `status`, gmt_create, gmt_modified, begin_time,
|
|
|
end_time, `operation`
|
|
|
</sql>
|
|
|
<!-- 获取调度记录列表 -->
|
|
|
<select id="selectVehicleInfoList" parameterType="com.sunyo.wlpt.dispatch.domain.DispatchNote"
|
|
|
resultMap="BaseResultMap">
|
|
|
select
|
|
|
<include refid="Base_Column_List"/>
|
|
|
from dispatch_note
|
|
|
<where>
|
|
|
<trim suffixOverrides=",">
|
|
|
<!-- 用户姓名 -->
|
|
|
<if test="userName != null and userName != ''">
|
|
|
user_name = #{userName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<!-- 用户联系方式 -->
|
|
|
<if test="userMobile != null and userMobile != ''">
|
|
|
AND user_mobile = #{userMobile,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<!-- 业务类型 -->
|
|
|
<if test="dispatchType != null and dispatchType != ''">
|
|
|
AND dispatch_type = #{dispatchType,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<!-- 记录表状态 -->
|
|
|
<if test="status != null and status != ''">
|
|
|
AND status = #{status,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<!-- 任务创建时间 -->
|
|
|
<if test="gmtCreate != null">
|
|
|
AND DATE_FORMAT(gmt_create,'%Y-%m-%d') = #{gmtCreate,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
<!-- 任务(结束)完成时间 -->
|
|
|
<if test="endTime != null">
|
|
|
AND DATE_FORMAT(end_time,'%Y-%m-%d') = #{endTime,jdbcType=TIMESTAMP}
|
|
|
</if>
|
|
|
</trim>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
<!--@mbg.generated-->
|
|
|
select
|
|
|
<include refid="Base_Column_List"/>
|
|
|
from dispatch_note
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
<!--@mbg.generated-->
|
|
|
delete from dispatch_note
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.sunyo.wlpt.dispatch.domain.DispatchNote">
|
|
|
<!--@mbg.generated-->
|
|
|
insert into dispatch_note (id, user_name, user_mobile,
|
|
|
vehicle_number, vehicle_type, license_plate_number,
|
|
|
driver_name, driver_mobile, dispatch_type,
|
|
|
station, `status`, gmt_create,
|
|
|
gmt_modified, begin_time, end_time,
|
|
|
`operation`)
|
|
|
values (#{id,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR}, #{userMobile,jdbcType=VARCHAR},
|
|
|
#{vehicleNumber,jdbcType=INTEGER}, #{vehicleType,jdbcType=VARCHAR}, #{licensePlateNumber,jdbcType=VARCHAR},
|
|
|
#{driverName,jdbcType=VARCHAR}, #{driverMobile,jdbcType=VARCHAR}, #{dispatchType,jdbcType=VARCHAR},
|
|
|
#{station,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{gmtCreate,jdbcType=TIMESTAMP},
|
|
|
#{gmtModified,jdbcType=TIMESTAMP}, #{beginTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP},
|
|
|
#{operation,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.sunyo.wlpt.dispatch.domain.DispatchNote">
|
|
|
<!--@mbg.generated-->
|
|
|
insert into dispatch_note
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">
|
|
|
id,
|
|
|
</if>
|
|
|
<if test="userName != null">
|
|
|
user_name,
|
|
|
</if>
|
|
|
<if test="userMobile != null">
|
|
|
user_mobile,
|
|
|
</if>
|
|
|
<if test="vehicleNumber != null">
|
|
|
vehicle_number,
|
|
|
</if>
|
|
|
<if test="vehicleType != null">
|
|
|
vehicle_type,
|
|
|
</if>
|
|
|
<if test="licensePlateNumber != null">
|
|
|
license_plate_number,
|
|
|
</if>
|
|
|
<if test="driverName != null">
|
|
|
driver_name,
|
|
|
</if>
|
|
|
<if test="driverMobile != null">
|
|
|
driver_mobile,
|
|
|
</if>
|
|
|
<if test="dispatchType != null">
|
|
|
dispatch_type,
|
|
|
</if>
|
|
|
<if test="station != null">
|
|
|
station,
|
|
|
</if>
|
|
|
<if test="status != null">
|
|
|
`status`,
|
|
|
</if>
|
|
|
<if test="gmtCreate != null">
|
|
|
gmt_create,
|
|
|
</if>
|
|
|
<if test="gmtModified != null">
|
|
|
gmt_modified,
|
|
|
</if>
|
|
|
<if test="beginTime != null">
|
|
|
begin_time,
|
|
|
</if>
|
|
|
<if test="endTime != null">
|
|
|
end_time,
|
|
|
</if>
|
|
|
<if test="operation != null">
|
|
|
`operation`,
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">
|
|
|
#{id,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="userName != null">
|
|
|
#{userName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="userMobile != null">
|
|
|
#{userMobile,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="vehicleNumber != null">
|
|
|
#{vehicleNumber,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="vehicleType != null">
|
|
|
#{vehicleType,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="licensePlateNumber != null">
|
|
|
#{licensePlateNumber,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="driverName != null">
|
|
|
#{driverName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="driverMobile != null">
|
|
|
#{driverMobile,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="dispatchType != null">
|
|
|
#{dispatchType,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="station != null">
|
|
|
#{station,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="status != null">
|
|
|
#{status,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="gmtCreate != null">
|
|
|
#{gmtCreate,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
<if test="gmtModified != null">
|
|
|
#{gmtModified,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
<if test="beginTime != null">
|
|
|
#{beginTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
<if test="endTime != null">
|
|
|
#{endTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
<if test="operation != null">
|
|
|
#{operation,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.sunyo.wlpt.dispatch.domain.DispatchNote">
|
|
|
<!--@mbg.generated-->
|
|
|
update dispatch_note
|
|
|
<set>
|
|
|
<if test="userName != null">
|
|
|
user_name = #{userName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="userMobile != null">
|
|
|
user_mobile = #{userMobile,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="vehicleNumber != null">
|
|
|
vehicle_number = #{vehicleNumber,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="vehicleType != null">
|
|
|
vehicle_type = #{vehicleType,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="licensePlateNumber != null">
|
|
|
license_plate_number = #{licensePlateNumber,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="driverName != null">
|
|
|
driver_name = #{driverName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="driverMobile != null">
|
|
|
driver_mobile = #{driverMobile,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="dispatchType != null">
|
|
|
dispatch_type = #{dispatchType,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="station != null">
|
|
|
station = #{station,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="status != null">
|
|
|
`status` = #{status,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="gmtCreate != null">
|
|
|
gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
<if test="gmtModified != null">
|
|
|
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
<if test="beginTime != null">
|
|
|
begin_time = #{beginTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
<if test="endTime != null">
|
|
|
end_time = #{endTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
<if test="operation != null">
|
|
|
`operation` = #{operation,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.sunyo.wlpt.dispatch.domain.DispatchNote">
|
|
|
<!--@mbg.generated-->
|
|
|
update dispatch_note
|
|
|
set user_name = #{userName,jdbcType=VARCHAR},
|
|
|
user_mobile = #{userMobile,jdbcType=VARCHAR},
|
|
|
vehicle_number = #{vehicleNumber,jdbcType=INTEGER},
|
|
|
vehicle_type = #{vehicleType,jdbcType=VARCHAR},
|
|
|
license_plate_number = #{licensePlateNumber,jdbcType=VARCHAR},
|
|
|
driver_name = #{driverName,jdbcType=VARCHAR},
|
|
|
driver_mobile = #{driverMobile,jdbcType=VARCHAR},
|
|
|
dispatch_type = #{dispatchType,jdbcType=VARCHAR},
|
|
|
station = #{station,jdbcType=VARCHAR},
|
|
|
`status` = #{status,jdbcType=VARCHAR},
|
|
|
gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
|
|
|
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
|
|
|
begin_time = #{beginTime,jdbcType=TIMESTAMP},
|
|
|
end_time = #{endTime,jdbcType=TIMESTAMP},
|
|
|
`operation` = #{operation,jdbcType=VARCHAR}
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
<update id="updateBatch" parameterType="java.util.List">
|
|
|
<!--@mbg.generated-->
|
|
|
update dispatch_note
|
|
|
<trim prefix="set" suffixOverrides=",">
|
|
|
<trim prefix="user_name = case" suffix="end,">
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
when id = #{item.id,jdbcType=VARCHAR} then #{item.userName,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
<trim prefix="user_mobile = case" suffix="end,">
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
when id = #{item.id,jdbcType=VARCHAR} then #{item.userMobile,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
<trim prefix="vehicle_number = case" suffix="end,">
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
when id = #{item.id,jdbcType=VARCHAR} then #{item.vehicleNumber,jdbcType=INTEGER}
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
<trim prefix="vehicle_type = case" suffix="end,">
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
when id = #{item.id,jdbcType=VARCHAR} then #{item.vehicleType,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
<trim prefix="license_plate_number = case" suffix="end,">
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
when id = #{item.id,jdbcType=VARCHAR} then #{item.licensePlateNumber,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
<trim prefix="driver_name = case" suffix="end,">
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
when id = #{item.id,jdbcType=VARCHAR} then #{item.driverName,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
<trim prefix="driver_mobile = case" suffix="end,">
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
when id = #{item.id,jdbcType=VARCHAR} then #{item.driverMobile,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
<trim prefix="dispatch_type = case" suffix="end,">
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
when id = #{item.id,jdbcType=VARCHAR} then #{item.dispatchType,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
<trim prefix="station = case" suffix="end,">
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
when id = #{item.id,jdbcType=VARCHAR} then #{item.station,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
<trim prefix="`status` = case" suffix="end,">
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
when id = #{item.id,jdbcType=VARCHAR} then #{item.status,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
<trim prefix="gmt_create = case" suffix="end,">
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
when id = #{item.id,jdbcType=VARCHAR} then #{item.gmtCreate,jdbcType=TIMESTAMP}
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
<trim prefix="gmt_modified = case" suffix="end,">
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
when id = #{item.id,jdbcType=VARCHAR} then #{item.gmtModified,jdbcType=TIMESTAMP}
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
<trim prefix="begin_time = case" suffix="end,">
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
when id = #{item.id,jdbcType=VARCHAR} then #{item.beginTime,jdbcType=TIMESTAMP}
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
<trim prefix="end_time = case" suffix="end,">
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
when id = #{item.id,jdbcType=VARCHAR} then #{item.endTime,jdbcType=TIMESTAMP}
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
<trim prefix="`operation` = case" suffix="end,">
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
when id = #{item.id,jdbcType=VARCHAR} then #{item.operation,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
</trim>
|
|
|
where id in
|
|
|
<foreach close=")" collection="list" item="item" open="(" separator=", ">
|
|
|
#{item.id,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
</update>
|
|
|
<update id="updateBatchSelective" parameterType="java.util.List">
|
|
|
<!--@mbg.generated-->
|
|
|
update dispatch_note
|
|
|
<trim prefix="set" suffixOverrides=",">
|
|
|
<trim prefix="user_name = case" suffix="end,">
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
<if test="item.userName != null">
|
|
|
when id = #{item.id,jdbcType=VARCHAR} then #{item.userName,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
<trim prefix="user_mobile = case" suffix="end,">
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
<if test="item.userMobile != null">
|
|
|
when id = #{item.id,jdbcType=VARCHAR} then #{item.userMobile,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
<trim prefix="vehicle_number = case" suffix="end,">
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
<if test="item.vehicleNumber != null">
|
|
|
when id = #{item.id,jdbcType=VARCHAR} then #{item.vehicleNumber,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
<trim prefix="vehicle_type = case" suffix="end,">
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
<if test="item.vehicleType != null">
|
|
|
when id = #{item.id,jdbcType=VARCHAR} then #{item.vehicleType,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
<trim prefix="license_plate_number = case" suffix="end,">
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
<if test="item.licensePlateNumber != null">
|
|
|
when id = #{item.id,jdbcType=VARCHAR} then #{item.licensePlateNumber,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
<trim prefix="driver_name = case" suffix="end,">
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
<if test="item.driverName != null">
|
|
|
when id = #{item.id,jdbcType=VARCHAR} then #{item.driverName,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
<trim prefix="driver_mobile = case" suffix="end,">
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
<if test="item.driverMobile != null">
|
|
|
when id = #{item.id,jdbcType=VARCHAR} then #{item.driverMobile,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
<trim prefix="dispatch_type = case" suffix="end,">
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
<if test="item.dispatchType != null">
|
|
|
when id = #{item.id,jdbcType=VARCHAR} then #{item.dispatchType,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
<trim prefix="station = case" suffix="end,">
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
<if test="item.station != null">
|
|
|
when id = #{item.id,jdbcType=VARCHAR} then #{item.station,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
<trim prefix="`status` = case" suffix="end,">
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
<if test="item.status != null">
|
|
|
when id = #{item.id,jdbcType=VARCHAR} then #{item.status,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
<trim prefix="gmt_create = case" suffix="end,">
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
<if test="item.gmtCreate != null">
|
|
|
when id = #{item.id,jdbcType=VARCHAR} then #{item.gmtCreate,jdbcType=TIMESTAMP}
|
|
|
</if>
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
<trim prefix="gmt_modified = case" suffix="end,">
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
<if test="item.gmtModified != null">
|
|
|
when id = #{item.id,jdbcType=VARCHAR} then #{item.gmtModified,jdbcType=TIMESTAMP}
|
|
|
</if>
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
<trim prefix="begin_time = case" suffix="end,">
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
<if test="item.beginTime != null">
|
|
|
when id = #{item.id,jdbcType=VARCHAR} then #{item.beginTime,jdbcType=TIMESTAMP}
|
|
|
</if>
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
<trim prefix="end_time = case" suffix="end,">
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
<if test="item.endTime != null">
|
|
|
when id = #{item.id,jdbcType=VARCHAR} then #{item.endTime,jdbcType=TIMESTAMP}
|
|
|
</if>
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
<trim prefix="`operation` = case" suffix="end,">
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
<if test="item.operation != null">
|
|
|
when id = #{item.id,jdbcType=VARCHAR} then #{item.operation,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
</foreach>
|
|
|
</trim>
|
|
|
</trim>
|
|
|
where id in
|
|
|
<foreach close=")" collection="list" item="item" open="(" separator=", ">
|
|
|
#{item.id,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
</update>
|
|
|
<insert id="batchInsert" parameterType="map">
|
|
|
<!--@mbg.generated-->
|
|
|
insert into dispatch_note
|
|
|
(id, user_name, user_mobile, vehicle_number, vehicle_type, license_plate_number,
|
|
|
driver_name, driver_mobile, dispatch_type, station, `status`, gmt_create, gmt_modified,
|
|
|
begin_time, end_time, `operation`)
|
|
|
values
|
|
|
<foreach collection="list" item="item" separator=",">
|
|
|
(#{item.id,jdbcType=VARCHAR}, #{item.userName,jdbcType=VARCHAR}, #{item.userMobile,jdbcType=VARCHAR},
|
|
|
#{item.vehicleNumber,jdbcType=INTEGER}, #{item.vehicleType,jdbcType=VARCHAR},
|
|
|
#{item.licensePlateNumber,jdbcType=VARCHAR},
|
|
|
#{item.driverName,jdbcType=VARCHAR}, #{item.driverMobile,jdbcType=VARCHAR},
|
|
|
#{item.dispatchType,jdbcType=VARCHAR},
|
|
|
#{item.station,jdbcType=VARCHAR}, #{item.status,jdbcType=VARCHAR}, #{item.gmtCreate,jdbcType=TIMESTAMP},
|
|
|
#{item.gmtModified,jdbcType=TIMESTAMP}, #{item.beginTime,jdbcType=TIMESTAMP},
|
|
|
#{item.endTime,jdbcType=TIMESTAMP},
|
|
|
#{item.operation,jdbcType=VARCHAR})
|
|
|
</foreach>
|
|
|
</insert>
|
|
|
<insert id="insertOrUpdate" parameterType="com.sunyo.wlpt.dispatch.domain.DispatchNote">
|
|
|
<!--@mbg.generated-->
|
|
|
insert into dispatch_note
|
|
|
(id, user_name, user_mobile, vehicle_number, vehicle_type, license_plate_number,
|
|
|
driver_name, driver_mobile, dispatch_type, station, `status`, gmt_create, gmt_modified,
|
|
|
begin_time, end_time, `operation`)
|
|
|
values
|
|
|
(#{id,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR}, #{userMobile,jdbcType=VARCHAR},
|
|
|
#{vehicleNumber,jdbcType=INTEGER}, #{vehicleType,jdbcType=VARCHAR}, #{licensePlateNumber,jdbcType=VARCHAR},
|
|
|
#{driverName,jdbcType=VARCHAR}, #{driverMobile,jdbcType=VARCHAR}, #{dispatchType,jdbcType=VARCHAR},
|
|
|
#{station,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{gmtCreate,jdbcType=TIMESTAMP},
|
|
|
#{gmtModified,jdbcType=TIMESTAMP}, #{beginTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP},
|
|
|
#{operation,jdbcType=VARCHAR})
|
|
|
on duplicate key update
|
|
|
id = #{id,jdbcType=VARCHAR},
|
|
|
user_name = #{userName,jdbcType=VARCHAR},
|
|
|
user_mobile = #{userMobile,jdbcType=VARCHAR},
|
|
|
vehicle_number = #{vehicleNumber,jdbcType=INTEGER},
|
|
|
vehicle_type = #{vehicleType,jdbcType=VARCHAR},
|
|
|
license_plate_number = #{licensePlateNumber,jdbcType=VARCHAR},
|
|
|
driver_name = #{driverName,jdbcType=VARCHAR},
|
|
|
driver_mobile = #{driverMobile,jdbcType=VARCHAR},
|
|
|
dispatch_type = #{dispatchType,jdbcType=VARCHAR},
|
|
|
station = #{station,jdbcType=VARCHAR},
|
|
|
`status` = #{status,jdbcType=VARCHAR},
|
|
|
gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
|
|
|
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
|
|
|
begin_time = #{beginTime,jdbcType=TIMESTAMP},
|
|
|
end_time = #{endTime,jdbcType=TIMESTAMP},
|
|
|
`operation` = #{operation,jdbcType=VARCHAR}
|
|
|
</insert>
|
|
|
<insert id="insertOrUpdateSelective" parameterType="com.sunyo.wlpt.dispatch.domain.DispatchNote">
|
|
|
<!--@mbg.generated-->
|
|
|
insert into dispatch_note
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">
|
|
|
id,
|
|
|
</if>
|
|
|
<if test="userName != null">
|
|
|
user_name,
|
|
|
</if>
|
|
|
<if test="userMobile != null">
|
|
|
user_mobile,
|
|
|
</if>
|
|
|
<if test="vehicleNumber != null">
|
|
|
vehicle_number,
|
|
|
</if>
|
|
|
<if test="vehicleType != null">
|
|
|
vehicle_type,
|
|
|
</if>
|
|
|
<if test="licensePlateNumber != null">
|
|
|
license_plate_number,
|
|
|
</if>
|
|
|
<if test="driverName != null">
|
|
|
driver_name,
|
|
|
</if>
|
|
|
<if test="driverMobile != null">
|
|
|
driver_mobile,
|
|
|
</if>
|
|
|
<if test="dispatchType != null">
|
|
|
dispatch_type,
|
|
|
</if>
|
|
|
<if test="station != null">
|
|
|
station,
|
|
|
</if>
|
|
|
<if test="status != null">
|
|
|
`status`,
|
|
|
</if>
|
|
|
<if test="gmtCreate != null">
|
|
|
gmt_create,
|
|
|
</if>
|
|
|
<if test="gmtModified != null">
|
|
|
gmt_modified,
|
|
|
</if>
|
|
|
<if test="beginTime != null">
|
|
|
begin_time,
|
|
|
</if>
|
|
|
<if test="endTime != null">
|
|
|
end_time,
|
|
|
</if>
|
|
|
<if test="operation != null">
|
|
|
`operation`,
|
|
|
</if>
|
|
|
</trim>
|
|
|
values
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">
|
|
|
#{id,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="userName != null">
|
|
|
#{userName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="userMobile != null">
|
|
|
#{userMobile,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="vehicleNumber != null">
|
|
|
#{vehicleNumber,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="vehicleType != null">
|
|
|
#{vehicleType,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="licensePlateNumber != null">
|
|
|
#{licensePlateNumber,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="driverName != null">
|
|
|
#{driverName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="driverMobile != null">
|
|
|
#{driverMobile,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="dispatchType != null">
|
|
|
#{dispatchType,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="station != null">
|
|
|
#{station,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="status != null">
|
|
|
#{status,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="gmtCreate != null">
|
|
|
#{gmtCreate,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
<if test="gmtModified != null">
|
|
|
#{gmtModified,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
<if test="beginTime != null">
|
|
|
#{beginTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
<if test="endTime != null">
|
|
|
#{endTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
<if test="operation != null">
|
|
|
#{operation,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
</trim>
|
|
|
on duplicate key update
|
|
|
<trim suffixOverrides=",">
|
|
|
<if test="id != null">
|
|
|
id = #{id,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="userName != null">
|
|
|
user_name = #{userName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="userMobile != null">
|
|
|
user_mobile = #{userMobile,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="vehicleNumber != null">
|
|
|
vehicle_number = #{vehicleNumber,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="vehicleType != null">
|
|
|
vehicle_type = #{vehicleType,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="licensePlateNumber != null">
|
|
|
license_plate_number = #{licensePlateNumber,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="driverName != null">
|
|
|
driver_name = #{driverName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="driverMobile != null">
|
|
|
driver_mobile = #{driverMobile,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="dispatchType != null">
|
|
|
dispatch_type = #{dispatchType,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="station != null">
|
|
|
station = #{station,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="status != null">
|
|
|
`status` = #{status,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="gmtCreate != null">
|
|
|
gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
<if test="gmtModified != null">
|
|
|
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
<if test="beginTime != null">
|
|
|
begin_time = #{beginTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
<if test="endTime != null">
|
|
|
end_time = #{endTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
<if test="operation != null">
|
|
|
`operation` = #{operation,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
</mapper> |
...
|
...
|
|