Commit 13f21af4 by 杨林龙

优化不在店数据统计BUG

1 parent a985f71a
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<select id="getInStoreDataList" resultMap="InStoreDataMap"> <select id="getInStoreDataList" resultMap="InStoreDataMap">
select select
sum(case when teid.gps_state = 1 then 0 when teid.gps_state = 2 then 1 else 0 end) as instoreCnt, case when sum(case when teid.gps_state = 2 then 1 else 0 end) = count(1) then 1 else 0 end as instoreCnt,
teid.gps_time , teid.gps_time ,
day(teid.gps_time) as dayOfMonth day(teid.gps_time) as dayOfMonth
from t_electric_instore_drive teid from t_electric_instore_drive teid
...@@ -74,6 +74,6 @@ ...@@ -74,6 +74,6 @@
</if> </if>
and tvd.vehicle_id = #{vehicleId} and tvd.vehicle_id = #{vehicleId}
</where> </where>
group by tvd.vehicle_id, left(teid.gps_time,10) group by left(teid.gps_time,10)
</select> </select>
</mapper> </mapper>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!