Commit 598a4f79 by 杨林龙

优化设备类型对应字段

1 parent ec07ccab
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
<result column="owner_name" jdbcType="VARCHAR" property="ownerName"/> <result column="owner_name" jdbcType="VARCHAR" property="ownerName"/>
<result column="vin" jdbcType="VARCHAR" property="vin"/> <result column="vin" jdbcType="VARCHAR" property="vin"/>
<result column="sn" jdbcType="VARCHAR" property="sn"/> <result column="sn" jdbcType="VARCHAR" property="sn"/>
<result column="device_type" jdbcType="INTEGER" property="deviceType"/> <result column="source" jdbcType="INTEGER" property="deviceType"/>
<result column="model_name" jdbcType="VARCHAR" property="modelName"/> <result column="model_name" jdbcType="VARCHAR" property="modelName"/>
<result column="vehicle_type" jdbcType="INTEGER" property="vehicleType"/> <result column="vehicle_type" jdbcType="INTEGER" property="vehicleType"/>
<result column="vehicle_usages" jdbcType="INTEGER" property="vehicleUsages"/> <result column="vehicle_usages" jdbcType="INTEGER" property="vehicleUsages"/>
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
<result column="owner_name" jdbcType="VARCHAR" property="ownerName"/> <result column="owner_name" jdbcType="VARCHAR" property="ownerName"/>
<result column="vin" jdbcType="VARCHAR" property="vin"/> <result column="vin" jdbcType="VARCHAR" property="vin"/>
<result column="sn" jdbcType="VARCHAR" property="sn"/> <result column="sn" jdbcType="VARCHAR" property="sn"/>
<result column="device_type" jdbcType="INTEGER" property="deviceType"/> <result column="source" jdbcType="INTEGER" property="deviceType"/>
<result column="model_name" jdbcType="VARCHAR" property="modelName"/> <result column="model_name" jdbcType="VARCHAR" property="modelName"/>
<result column="vehicle_type" jdbcType="INTEGER" property="vehicleType"/> <result column="vehicle_type" jdbcType="INTEGER" property="vehicleType"/>
<result column="vehicle_usages" jdbcType="VARCHAR" property="vehicleUsages"/> <result column="vehicle_usages" jdbcType="VARCHAR" property="vehicleUsages"/>
...@@ -290,9 +290,14 @@ ...@@ -290,9 +290,14 @@
resultMap="VehicleInfoMap"> resultMap="VehicleInfoMap">
select tv.id , select tv.id ,
tvd.id vdId , tvd.id vdId ,
tv.workorder_id ,tv.owner_name ,tv.vin ,td.sn , tv.workorder_id ,
td.device_type ,tv.model_name ,tv.vehicle_type , tv.owner_name ,
tv.vehicle_usages ,td.activate_time, tv.vin ,td.sn ,
td.source ,
tv.model_name ,
tv.vehicle_type ,
tv.vehicle_usages ,
td.activate_time ,
ddf.`status` AS freqStatus ddf.`status` AS freqStatus
from t_vehicle tv from t_vehicle tv
left join t_vehicle_device tvd on tvd.vehicle_id = tv.id left join t_vehicle_device tvd on tvd.vehicle_id = tv.id
...@@ -315,7 +320,7 @@ ...@@ -315,7 +320,7 @@
and left(td.activate_time,10) &lt;= #{activateTimeEnd} and left(td.activate_time,10) &lt;= #{activateTimeEnd}
</if> </if>
<if test="deviceType != null"> <if test="deviceType != null">
and td.device_type = #{deviceType} and td.source = #{deviceType}
</if> </if>
<if test="vehicleType != null"> <if test="vehicleType != null">
and tv.vehicle_type = #{vehicleType} and tv.vehicle_type = #{vehicleType}
...@@ -327,9 +332,16 @@ ...@@ -327,9 +332,16 @@
<select id="exportVehicleInfo" parameterType="cn.com.glsx.admin.modules.model.param.VehicleInfoSearch" <select id="exportVehicleInfo" parameterType="cn.com.glsx.admin.modules.model.param.VehicleInfoSearch"
resultMap="VehicleInfoReportExportMap"> resultMap="VehicleInfoReportExportMap">
select tv.id ,tv.workorder_id ,tv.owner_name ,tv.vin ,td.sn , select tv.id ,
td.device_type ,tv.model_name ,tv.vehicle_type , tv.workorder_id ,
tv.vehicle_usages ,td.activate_time, tv.owner_name ,
tv.vin ,
td.sn ,
td.source ,
tv.model_name ,
tv.vehicle_type ,
tv.vehicle_usages ,
td.activate_time ,
ddf.`status` AS freqStatus ddf.`status` AS freqStatus
from t_vehicle tv from t_vehicle tv
left join t_vehicle_device tvd on tvd.vehicle_id = tv.id left join t_vehicle_device tvd on tvd.vehicle_id = tv.id
...@@ -352,7 +364,7 @@ ...@@ -352,7 +364,7 @@
and left(td.activate_time,10) &lt;= #{activateTimeEnd} and left(td.activate_time,10) &lt;= #{activateTimeEnd}
</if> </if>
<if test="deviceType != null"> <if test="deviceType != null">
and td.device_type = #{deviceType} and td.source = #{deviceType}
</if> </if>
<if test="vehicleType != null"> <if test="vehicleType != null">
and tv.vehicle_type = #{vehicleType} and tv.vehicle_type = #{vehicleType}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!