兴安优化车辆包兼容
This commit is contained in:
@@ -124,7 +124,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="enable != null">enable = #{enable},</if>
|
||||
<if test="plate != null and plate != ''">plate = #{plate},</if>
|
||||
<if test="timeSegEnable != null and timeSegEnable != ''">time_seg_enable = #{timeSegEnable},</if>
|
||||
<if test="segTime != null">seg_time = #{segTime},</if>
|
||||
seg_time = #{segTime},
|
||||
<if test="needAlarm != null">need_alarm = #{needAlarm},</if>
|
||||
<if test="vehicleCode != null">vehicle_code = #{vehicleCode},</if>
|
||||
<if test="vehicleComment != null">vehicle_comment = #{vehicleComment},</if>
|
||||
|
||||
@@ -21,6 +21,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<where>
|
||||
<if test="equipmentId != null "> and equipment_id = #{equipmentId}</if>
|
||||
<if test="parkId != null "> and park_id = #{parkId}</if>
|
||||
<if test="parkIds != null and parkIds.size() > 0"> and park_id in
|
||||
<foreach item="id" collection="parkIds" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="way != null and way != ''"> and way = #{way}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@@ -16,11 +16,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="spaceName" column="space_name" />
|
||||
<result property="autoLock" column="auto_lock" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCarParkVo">
|
||||
select cp.id, cp.name, cp.space_id, cp.cars_num, cp.surplus_num, cp.remark, cp.create_by, cp.create_time,
|
||||
cp.update_by, cp.update_time,ss.name space_name
|
||||
cp.update_by, cp.update_time,ss.name space_name,cp.auto_lock,cp.parent_id
|
||||
from car_park cp
|
||||
left join sys_space ss on cp.space_id=ss.id
|
||||
|
||||
@@ -51,6 +53,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="parentId != null">parent_id,</if>
|
||||
<if test="autoLock != null">auto_lock,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
@@ -63,6 +67,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="parentId != null">#{parentId},</if>
|
||||
<if test="autoLock != null">#{autoLock},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -78,6 +84,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="parentId != null">parent_id = #{parentId},</if>
|
||||
<if test="autoLock != null">auto_lock = #{autoLock},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
@@ -122,4 +130,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
where cp.name = #{name}
|
||||
</select>
|
||||
|
||||
<select id="selectByIds" resultType="com.dcsoft.system.vehicle.domain.CarPark">
|
||||
select cp.id, cp.name, cp.space_id, cp.cars_num, cp.surplus_num, cp.remark,cp.auto_lock,cp.parent_id
|
||||
from car_park cp
|
||||
where cp.id in
|
||||
<foreach item="id" collection="list" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="getCarParkSelect" resultType="com.dcsoft.system.vehicle.domain.CarPark">
|
||||
select cp.id, cp.name
|
||||
from car_park cp
|
||||
where cp.id != #{id}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -20,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
select cpg.id, cpg.park_id, cpg.area, cpg.license, cpg.join_time, cpg.sn,cp.name park_name,se.name equipment_name,HOUR(TIMEDIFF(NOW(),cpg.join_time)) AS time_long
|
||||
from car_pass_gather cpg
|
||||
left join car_park cp on cp.id=cpg.park_id
|
||||
left join sys_equipment se on se.sequence=cpg.sn
|
||||
left join sys_equipment se on se.sequence=cpg.sn and se.product_id = 4
|
||||
</sql>
|
||||
|
||||
<select id="selectCarPassGatherList" parameterType="CarPassGather" resultMap="CarPassGatherResult">
|
||||
|
||||
@@ -28,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
select cpr.id, cpr.park_id, cpr.unique_no, cpr.direction, cpr.license, cpr.pass_time, cpr.trigger_type, cpr.color_type,
|
||||
cpr.car_color, cpr.url, cpr.data_type, cpr.sn,cpi.way,cp.name park_name,se.name equipment_name,ci.unit,cpr.type
|
||||
from car_pass_record cpr
|
||||
left join sys_equipment se on cpr.sn=se.sequence
|
||||
left join sys_equipment se on cpr.sn=se.sequence and se.product_id = 4
|
||||
left join car_park_item cpi on cpi.equipment_id=se.id
|
||||
left join car_park cp on cp.id=cpi.park_id
|
||||
left join car_info ci on cpr.license=ci.plate
|
||||
|
||||
Reference in New Issue
Block a user