Browse Source

update 周统计 周数改为计算一年周数

A17404李放 3 years ago
parent
commit
c1370d8017
1 changed files with 8 additions and 6 deletions
  1. 8 6
      nb-system/src/main/resources/mapper/bus/BusDeviceMapper.xml

+ 8 - 6
nb-system/src/main/resources/mapper/bus/BusDeviceMapper.xml

@@ -73,12 +73,14 @@
         ) AS d
         LEFT JOIN (select * from bus_infusion_history) as i
         on i.id=d.infusion_id
-        <if test="query.deviceTypes != null and query.deviceTypes.size > 0">
-            and type in
-            <foreach item="type" index="index" collection="query.deviceTypes" open="(" separator="," close=")">
-                #{type, jdbcType=VARCHAR}
-            </foreach>
-        </if>
+        <where>
+            <if test="query.deviceTypes != null and query.deviceTypes.size > 0">
+                type in
+                <foreach item="type" index="index" collection="query.deviceTypes" open="(" separator="," close=")">
+                    #{type, jdbcType=VARCHAR}
+                </foreach>
+            </if>
+        </where>
         order by d.create_time desc
     </select>