|
@@ -1,7 +1,8 @@
|
|
|
-package com.ruizheng.clw.service.imple;
|
|
|
+package com.ruizheng.clw.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.ruizheng.clw.constant.ClwConstant;
|
|
|
import com.ruizheng.clw.domain.CarInfo;
|
|
|
import com.ruizheng.clw.mapper.CarInfoMapper;
|
|
|
import com.ruizheng.clw.service.CarInfoService;
|
|
@@ -12,14 +13,13 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
import java.util.Objects;
|
|
|
|
|
|
@Service
|
|
|
public class CarInfoServiceImpl extends ServiceImpl<CarInfoMapper, CarInfo> implements CarInfoService {
|
|
|
@Autowired
|
|
|
private SysDeptMapper sysDeptMapper;
|
|
|
- @Autowired
|
|
|
- private CarInfoMapper carInfoMapper;
|
|
|
|
|
|
/**
|
|
|
* 查询当前节点以及子节点ID
|
|
@@ -44,9 +44,19 @@ public class CarInfoServiceImpl extends ServiceImpl<CarInfoMapper, CarInfo> impl
|
|
|
lambdaQueryWrapper
|
|
|
.eq(CarInfo::getOnlineStatus, onlineStatus);
|
|
|
}
|
|
|
- return carInfoMapper
|
|
|
+ return baseMapper
|
|
|
.selectList(lambdaQueryWrapper);
|
|
|
}
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
+ public Map<String, Long> statistics(List<Long> ids) {
|
|
|
+ Map<String, Long> statistics = baseMapper.statistics(ids);
|
|
|
+ statistics.put(ClwConstant.TOTAL, statistics.get(ClwConstant.ONLINE) + statistics.get(ClwConstant.OFFLINE) + statistics.get(ClwConstant.OFFIOT));
|
|
|
+ statistics.put(ClwConstant.NOTICE, 0L);
|
|
|
+ return statistics;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|