Commit 10c008ef by 杨林龙

Merge remote-tracking branch 'origin/master'

2 parents e263e1b0 5f9e4804
......@@ -76,6 +76,10 @@ public class VehicleMonitorService {
List<DeviceLocationDTO> dataList = listR.getDataList(new TypeToken<List<DeviceLocationDTO>>() {
}.getType());
if(CollectionUtils.isEmpty(dataList)) {
return Lists.newArrayList();
}
List<String> snList = dataList.stream().map(DeviceLocationDTO::getSn).collect(Collectors.toList());
//查询设备,车辆,工单等信息
Map<String, VehicleDeviceWorkOrder> map = vehicleDeviceService.mapVehicleDeviceWorkOrderBySn(snList);
......
......@@ -82,5 +82,6 @@
from t_vehicle_shared tvs
where tvs.del_flag = 0
and tvs.shared_id = #{shareId}
order by tvs.created_date desc
</select>
</mapper>
\ No newline at end of file
package cn.com.glsx.app.modules.service;
import cn.com.glsx.Application;
import cn.com.glsx.app.modules.converter.VehicleMonitorConvert;
import cn.com.glsx.app.modules.model.view.LowPowerVO;
import cn.com.glsx.app.modules.model.view.StatisticalInfoVO;
......@@ -11,6 +12,12 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.glsx.plat.core.web.R;
import com.google.common.collect.Lists;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import java.util.List;
......@@ -18,8 +25,14 @@ import java.util.List;
* @author xiangyanlin
* @date 2022/7/4
*/
@Slf4j
@RunWith(SpringRunner.class)
@SpringBootTest(classes = Application.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
class VehicleMonitorServiceTest {
@Autowired
private VehicleMonitorService vehicleMonitorService;
public static void main(String[] args) {
// generateDeviceLocationDTOJSON();
// generateTrackPointVOJSON();
......@@ -68,4 +81,10 @@ class VehicleMonitorServiceTest {
SerializerFeature.WriteMapNullValue));
}
@Test
public void testListDeviceMonitorInfo() {
List<VehicleLocationDTO> vehicleLocations = vehicleMonitorService.getVehicleLocations("1700112234,2C1700000002");
System.out.println(vehicleLocations.toString());
}
}
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!