Commit 85b315d4 by duanhq

bug修改 v 1.2.0

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@21876 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 2ed20869
......@@ -281,14 +281,13 @@
sys_device_repertory sdr
LEFT JOIN sys_user su ON sdr.user_id = su.id
LEFT JOIN sys_dict_data sdd ON sdr.device_type = sdd.data_key
<where>
WHERE 1=1
<if test="name != null">
and su.name LIKE "%"#{name}"%"
</if>
<if test="deviceType != null and deviceType != ''">
and sdr.device_type = #{deviceType}
</if>
</where>
<choose>
<when test="sortType == 1">
ORDER BY device_num ASC
......@@ -310,15 +309,13 @@
FROM
sys_device sd
LEFT JOIN sys_dict_data sdd ON sd.device_type = sdd.data_key
<where>
sd.user_id = #{userId}
WHERE sd.user_id = #{userId}
<if test="deviceNo != null">
and sd.device_no LIKE "%"#{deviceNo}"%"
</if>
<if test="deviceType != null and deviceType != '' ">
and sdr.device_type = #{deviceType}
and sd.device_type = #{deviceType}
</if>
</where>
ORDER BY sd.stock_time DESC
</select>
......@@ -349,7 +346,7 @@
and sd.device_no LIKE "%"#{deviceNo}"%"
</if>
<if test="deviceType != null and deviceType != ''">
and sdr.device_type = #{deviceType}
and sd.device_type = #{deviceType}
</if>
ORDER BY sd.stock_time DESC
</select>
......@@ -364,18 +361,16 @@
FROM
sys_device sd
LEFT JOIN sys_dict_data sdd ON sd.device_type = sdd.data_key
<where>
sd.user_id = #{userId}
WHERE sd.user_id = #{userId}
<if test="deviceNo != null">
and sd.device_no LIKE "%"#{deviceNo}"%"
</if>
<if test="deviceType != null and deviceType != '' ">
and sdr.device_type = #{deviceType}
and sd.device_type = #{deviceType}
</if>
<if test="dateStart != null and dateEnd!=null and dateStart !='' and dateEnd !=''">
and sd.stock_time between #{dateStart,jdbcType=TIMESTAMP} and #{dateEnd,jdbcType=TIMESTAMP}
</if>
</where>
ORDER BY sd.stock_time DESC
</select>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!