|
@@ -138,14 +138,12 @@ public class BaseCameraManagementController extends BaseController {
|
|
|
}
|
|
|
BaseDeviceDynamicManagement deviceDynamicManagement = baseDeviceDynamicManagementService.getOne(new LambdaQueryWrapper<BaseDeviceDynamicManagement>()
|
|
|
.eq(BaseDeviceDynamicManagement::getCameraCode, cameraCode));
|
|
|
- if (deviceDynamicManagement.getIsDisable()==2) {
|
|
|
- baseCameraManagement.setIsDisable(deviceDynamicManagement.getIsDisable());
|
|
|
- baseCameraManagement.setElectricity(deviceDynamicManagement.getElectricity());
|
|
|
- List<MqLog> list = mqLogService.list(new LambdaQueryWrapper<MqLog>()
|
|
|
- .eq(MqLog::getCameraCode, cameraCode));
|
|
|
- if (!ObjectUtils.isEmpty(list)) {
|
|
|
- baseCameraManagement.setHeartTime(list.get(0).getCreateTime());
|
|
|
- }
|
|
|
+ baseCameraManagement.setIsDisable(deviceDynamicManagement.getIsDisable());
|
|
|
+ baseCameraManagement.setElectricity(deviceDynamicManagement.getElectricity());
|
|
|
+ List<MqLog> list = mqLogService.list(new LambdaQueryWrapper<MqLog>()
|
|
|
+ .eq(MqLog::getCameraCode, cameraCode));
|
|
|
+ if (!ObjectUtils.isEmpty(list)) {
|
|
|
+ baseCameraManagement.setHeartTime(list.get(0).getCreateTime());
|
|
|
}
|
|
|
// 将字符串转换为浮点数
|
|
|
double installLatitude = Double.parseDouble(baseCameraManagement.getInstallLatitude());
|
|
@@ -189,6 +187,15 @@ public class BaseCameraManagementController extends BaseController {
|
|
|
String[] split = msgAlarm.getImageUrl().split(";");
|
|
|
ArrayList<String> objects = new ArrayList<>(Arrays.asList(split));
|
|
|
msgAlarmResp.setImageUrls(objects);
|
|
|
+ BaseDeviceDynamicManagement deviceDynamicManagement = baseDeviceDynamicManagementService.getOne(new LambdaQueryWrapper<BaseDeviceDynamicManagement>()
|
|
|
+ .eq(BaseDeviceDynamicManagement::getCameraCode, cameraCode));
|
|
|
+ msgAlarmResp.setIsDisable(deviceDynamicManagement.getIsDisable());
|
|
|
+ msgAlarmResp.setElectricity(deviceDynamicManagement.getElectricity());
|
|
|
+ List<MqLog> list = mqLogService.list(new LambdaQueryWrapper<MqLog>()
|
|
|
+ .eq(MqLog::getCameraCode, cameraCode));
|
|
|
+ if (!ObjectUtils.isEmpty(list)) {
|
|
|
+ msgAlarmResp.setHeartTime(list.get(0).getCreateTime());
|
|
|
+ }
|
|
|
return AjaxResult.success(msgAlarmResp);
|
|
|
}
|
|
|
return null;
|
|
@@ -588,6 +595,7 @@ public class BaseCameraManagementController extends BaseController {
|
|
|
}
|
|
|
BaseRailwayManagement baseRailwayManagement = baseRailwayManagementService.getOne(queryWrapper);
|
|
|
baseCameraManagement.setRailwayName(baseRailwayManagement.getRailwayName());
|
|
|
+ baseCameraManagement.setRailwayType(baseRailwayManagement.getRailwayType());
|
|
|
String mils = AppendUtils.stringAppend(baseCameraManagement.getInstallMile());
|
|
|
baseCameraManagement.setInstallMiles(mils);
|
|
|
if (!ObjectUtils.isEmpty(baseCameraManagement.getEndMile())) {
|
|
@@ -753,11 +761,24 @@ public class BaseCameraManagementController extends BaseController {
|
|
|
children.sort(new Comparator<CameraTree>() {
|
|
|
@Override
|
|
|
public int compare(CameraTree o1, CameraTree o2) {
|
|
|
- String name1 = PolyphoneHandler.getPolyphonePinyin(o1.getName());
|
|
|
- String substring1 = name1.substring(0, 1);
|
|
|
- String name2 = PolyphoneHandler.getPolyphonePinyin(o2.getName());
|
|
|
- String substring2 = name2.substring(0, 1);
|
|
|
- return substring1.compareTo(substring2);
|
|
|
+ if (ObjectUtils.isEmpty(o1.getNumber())&& ObjectUtils.isEmpty(o2.getNumber())) {
|
|
|
+ int mileageDiff = o1.getNumber() - o2.getNumber();
|
|
|
+ if (mileageDiff == 0) {
|
|
|
+ String name1 = ChineseToPingyin.convertHanziToPinyin(o1.getRailwayName());
|
|
|
+ String substring1 = name1.substring(0, 1);
|
|
|
+ String name2 = ChineseToPingyin.convertHanziToPinyin(o2.getRailwayName());
|
|
|
+ String substring2 = name2.substring(0, 1);
|
|
|
+ return substring1.compareTo(substring2);
|
|
|
+ } else {
|
|
|
+ return mileageDiff;
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ String name1 = ChineseToPingyin.convertHanziToPinyin(o1.getRailwayName());
|
|
|
+ String substring1 = name1.substring(0, 1);
|
|
|
+ String name2 = ChineseToPingyin.convertHanziToPinyin(o2.getRailwayName());
|
|
|
+ String substring2 = name2.substring(0, 1);
|
|
|
+ return substring1.compareTo(substring2);
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
for (CameraTree child : children) {
|