|
@@ -98,6 +98,8 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
ICommonService commonService;
|
|
|
@Autowired
|
|
|
IUserService userService;
|
|
|
+ @Autowired
|
|
|
+ IMqSendLogService mqSendLogService;
|
|
|
|
|
|
|
|
|
@Override
|
|
@@ -233,27 +235,28 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
HashMap<String,SceneColdStorage> coldStorageMap = null;
|
|
|
HashMap<Long, User> userMap = null;
|
|
|
HashMap<Long, Camera> cameraMap = null;
|
|
|
+ HashMap<String,JSONObject> ssSceneMap = null;
|
|
|
+ HashMap<String,MqSendLog> mqSendLogMap = null;
|
|
|
|
|
|
List<String> sceneNumList = page.getRecords().stream().map(SceneVo::getNum).collect(Collectors.toList());
|
|
|
- HashMap<String,JSONObject> ssSceneMap = new HashMap<>();
|
|
|
- if(param.getType() == 2 ){
|
|
|
- ssSceneMap = laserService.list(sceneNumList,4);
|
|
|
- }
|
|
|
- if(param.getType() == 6){
|
|
|
- ssSceneMap = laserService.list(sceneNumList,5);
|
|
|
- }
|
|
|
-
|
|
|
if(!records.isEmpty()){
|
|
|
- List<String> numList = records.parallelStream().map(SceneVo::getNum).collect(Collectors.toList());
|
|
|
- map = copyLogService.getByNewNumList(numList);
|
|
|
- coldStorageMap = sceneColdStorageService.getByNumList(numList);
|
|
|
-
|
|
|
+ map = copyLogService.getByNewNumList(sceneNumList);
|
|
|
+ coldStorageMap = sceneColdStorageService.getByNumList(sceneNumList);
|
|
|
List<Long> userIds = records.parallelStream().map(SceneVo::getUserId).collect(Collectors.toList());
|
|
|
userMap = userService.getByIds(userIds);
|
|
|
-
|
|
|
List<Long> cameraIds = records.parallelStream().map(SceneVo::getCameraId).collect(Collectors.toList());
|
|
|
cameraMap = cameraService.getByIds(cameraIds);
|
|
|
|
|
|
+ if(param.getType() == 2 ){
|
|
|
+ ssSceneMap = laserService.list(sceneNumList,4);
|
|
|
+ }
|
|
|
+ if(param.getType() == 6){
|
|
|
+ ssSceneMap = laserService.list(sceneNumList,5);
|
|
|
+ }
|
|
|
+ List<String> modelingNumList = page.getRecords().stream().filter(e -> e.getStatus() == 0).map(SceneVo::getNum).collect(Collectors.toList());
|
|
|
+ if(!modelingNumList.isEmpty()){
|
|
|
+ mqSendLogMap = mqSendLogService.getByNumList(modelingNumList);
|
|
|
+ }
|
|
|
}
|
|
|
for (SceneVo record : page.getRecords()) {
|
|
|
if(param.getType() == 2 || param.getType() == 6){
|
|
@@ -306,6 +309,14 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
}
|
|
|
//{"latitude":22.3672085,"longitude":113.595673,"altitude":9.275519,"horizontalAccuracy":65.0,"verticalAccuracy":10.0,"timestamp":1564381147.2775609}
|
|
|
record.setAddressComponent(commonService.getAddressComponent(record.getGps()));
|
|
|
+
|
|
|
+ if(mqSendLogMap!=null){
|
|
|
+ MqSendLog mqSendLog = mqSendLogMap.get(record.getNum());
|
|
|
+ if(mqSendLog != null){
|
|
|
+ record.setStatusString("排队中");
|
|
|
+ record.setStatus(-4);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
return PageInfo.PageInfo(page);
|
|
|
}
|