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 @@ ...@@ -281,14 +281,13 @@
sys_device_repertory sdr sys_device_repertory sdr
LEFT JOIN sys_user su ON sdr.user_id = su.id LEFT JOIN sys_user su ON sdr.user_id = su.id
LEFT JOIN sys_dict_data sdd ON sdr.device_type = sdd.data_key LEFT JOIN sys_dict_data sdd ON sdr.device_type = sdd.data_key
<where> WHERE 1=1
<if test="name != null"> <if test="name != null">
and su.name LIKE "%"#{name}"%" and su.name LIKE "%"#{name}"%"
</if> </if>
<if test="deviceType != null and deviceType != ''"> <if test="deviceType != null and deviceType != ''">
and sdr.device_type = #{deviceType} and sdr.device_type = #{deviceType}
</if> </if>
</where>
<choose> <choose>
<when test="sortType == 1"> <when test="sortType == 1">
ORDER BY device_num ASC ORDER BY device_num ASC
...@@ -310,15 +309,13 @@ ...@@ -310,15 +309,13 @@
FROM FROM
sys_device sd sys_device sd
LEFT JOIN sys_dict_data sdd ON sd.device_type = sdd.data_key LEFT JOIN sys_dict_data sdd ON sd.device_type = sdd.data_key
<where> WHERE sd.user_id = #{userId}
sd.user_id = #{userId}
<if test="deviceNo != null"> <if test="deviceNo != null">
and sd.device_no LIKE "%"#{deviceNo}"%" and sd.device_no LIKE "%"#{deviceNo}"%"
</if> </if>
<if test="deviceType != null and deviceType != '' "> <if test="deviceType != null and deviceType != '' ">
and sdr.device_type = #{deviceType} and sd.device_type = #{deviceType}
</if> </if>
</where>
ORDER BY sd.stock_time DESC ORDER BY sd.stock_time DESC
</select> </select>
...@@ -349,7 +346,7 @@ ...@@ -349,7 +346,7 @@
and sd.device_no LIKE "%"#{deviceNo}"%" and sd.device_no LIKE "%"#{deviceNo}"%"
</if> </if>
<if test="deviceType != null and deviceType != ''"> <if test="deviceType != null and deviceType != ''">
and sdr.device_type = #{deviceType} and sd.device_type = #{deviceType}
</if> </if>
ORDER BY sd.stock_time DESC ORDER BY sd.stock_time DESC
</select> </select>
...@@ -364,18 +361,16 @@ ...@@ -364,18 +361,16 @@
FROM FROM
sys_device sd sys_device sd
LEFT JOIN sys_dict_data sdd ON sd.device_type = sdd.data_key LEFT JOIN sys_dict_data sdd ON sd.device_type = sdd.data_key
<where> WHERE sd.user_id = #{userId}
sd.user_id = #{userId}
<if test="deviceNo != null"> <if test="deviceNo != null">
and sd.device_no LIKE "%"#{deviceNo}"%" and sd.device_no LIKE "%"#{deviceNo}"%"
</if> </if>
<if test="deviceType != null and deviceType != '' "> <if test="deviceType != null and deviceType != '' ">
and sdr.device_type = #{deviceType} and sd.device_type = #{deviceType}
</if> </if>
<if test="dateStart != null and dateEnd!=null and dateStart !='' and dateEnd !=''"> <if test="dateStart != null and dateEnd!=null and dateStart !='' and dateEnd !=''">
and sd.stock_time between #{dateStart,jdbcType=TIMESTAMP} and #{dateEnd,jdbcType=TIMESTAMP} and sd.stock_time between #{dateStart,jdbcType=TIMESTAMP} and #{dateEnd,jdbcType=TIMESTAMP}
</if> </if>
</where>
ORDER BY sd.stock_time DESC ORDER BY sd.stock_time DESC
</select> </select>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!