|
|
@@ -10,6 +10,9 @@ import org.dromara.common.core.utils.StringUtils;
|
|
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
|
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
|
import org.dromara.system.domain.GpsData;
|
|
|
+import org.dromara.system.domain.TblCarSchedule;
|
|
|
+import org.dromara.system.domain.bo.GpsDataBo;
|
|
|
+import org.dromara.system.domain.vo.GpsDataVo;
|
|
|
import org.dromara.system.mapper.TblGpsDataMapper;
|
|
|
import org.dromara.system.service.ITblGpsDataService;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
@@ -35,7 +38,7 @@ public class TblGpsDataServiceImpl implements ITblGpsDataService {
|
|
|
* 查询丢失货物
|
|
|
*/
|
|
|
@Override
|
|
|
- public GpsData queryById(Long id){
|
|
|
+ public GpsDataVo queryById(Long id){
|
|
|
return baseMapper.selectVoById(id);
|
|
|
}
|
|
|
|
|
|
@@ -43,9 +46,9 @@ public class TblGpsDataServiceImpl implements ITblGpsDataService {
|
|
|
* 查询丢失货物列表
|
|
|
*/
|
|
|
@Override
|
|
|
- public TableDataInfo<GpsData> queryPageList(GpsData bo, PageQuery pageQuery) {
|
|
|
+ public TableDataInfo<GpsDataVo> queryPageList(GpsDataBo bo, PageQuery pageQuery) {
|
|
|
LambdaQueryWrapper<GpsData> lqw = buildQueryWrapper(bo);
|
|
|
- Page<GpsData> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
|
|
+ Page<GpsDataVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
|
|
return TableDataInfo.build(result);
|
|
|
}
|
|
|
|
|
|
@@ -53,14 +56,20 @@ public class TblGpsDataServiceImpl implements ITblGpsDataService {
|
|
|
* 查询丢失货物列表
|
|
|
*/
|
|
|
@Override
|
|
|
- public List<GpsData> queryList(GpsData bo) {
|
|
|
+ public List<GpsDataVo> queryList(GpsDataBo bo) {
|
|
|
LambdaQueryWrapper<GpsData> lqw = buildQueryWrapper(bo);
|
|
|
return baseMapper.selectVoList(lqw);
|
|
|
}
|
|
|
|
|
|
- private LambdaQueryWrapper<GpsData> buildQueryWrapper(GpsData bo) {
|
|
|
+ private LambdaQueryWrapper<GpsData> buildQueryWrapper(GpsDataBo bo) {
|
|
|
LambdaQueryWrapper<GpsData> lqw = Wrappers.lambdaQuery();
|
|
|
-
|
|
|
+ lqw.eq(bo.getDevicecode()!=null,GpsData::getDevicecode, bo.getDevicecode());
|
|
|
+ if(bo.getParams()!=null && bo.getParams().keySet().size()>0) {
|
|
|
+ if (bo.getParams().get("starttime") != null && bo.getParams().get("endtime") != null) {
|
|
|
+ lqw.gt(bo.getParams().get("starttime") != null, GpsData::getTs, bo.getParams().get("starttime"));
|
|
|
+ lqw.lt(bo.getParams().get("endtime") != null, GpsData::getTs, bo.getParams().get("endtime"));
|
|
|
+ }
|
|
|
+ }
|
|
|
return lqw;
|
|
|
}
|
|
|
|