Explorar el Código

Merge branch 'develop' of http://192.168.11.14:51037/gitadmin/tuoheng_freeway into develop

tags/v1.2.0^2
wanjing hace 1 año
padre
commit
e1ac006b1c
Se han modificado 6 ficheros con 21 adiciones y 37 borrados
  1. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/enums/code/inspection/QueryVideoServiceEnum.java
  2. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/accident/query/QueryAccidentDetailsService.java
  3. +0
    -7
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/flightdata/query/QueryFlightDataTrackService.java
  4. +1
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/road/RoadInformationServiceImpl.java
  5. +2
    -13
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/GetDroneDataByIdService.java
  6. +16
    -13
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/dsp/DspCallbackServiceImpl.java

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/enums/code/inspection/QueryVideoServiceEnum.java Ver fichero

@@ -11,7 +11,7 @@ public enum QueryVideoServiceEnum {
LIVE_CHANNEL_IS_NOT_EXIST(1230702, "直播通道为空"),
AIPULL_URL_IS_NOT_NULL(1230703, "直播地址为空"),
AIVIDEO_URL_IS_NOT_NULL(1230704, "回放地址为空"),
INSPECTION_IS_NOT_EXIST(1230705, "任务不存在"),
INSPECTION_IS_NOT_EXIST(1230705,"没有正在直播的任务"),
AIRPORT_ID_IS_NULL(1230706, "机场id为空");

/**

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/accident/query/QueryAccidentDetailsService.java Ver fichero

@@ -124,7 +124,7 @@ public class QueryAccidentDetailsService {
vo.setInspectionName(inspection.getName());
}
if(inspection.getAiVideoUrl() !=null){
vo.setAiVideoUrl(inspection.getAiVideoUrl());
vo.setAiVideoUrl(CommonConfig.videoURL + inspection.getAiVideoUrl());
}
}
}

+ 0
- 7
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/flightdata/query/QueryFlightDataTrackService.java Ver fichero

@@ -54,16 +54,9 @@ public class QueryFlightDataTrackService {
log.info("云盒遥测数据,flightData={}",flightData);

//将最新一条数据放入缓存,并设置过期时间

log.info("云盒遥测数据11111------------");

redisUtils.set(String.valueOf(inspection.getId()), flightData, 10);
log.info("云盒遥测数据22222------------");

int result = flightDataMapper.insert(flightData);
log.info("云盒遥测数据22222------------result={}", result);
if(result<=0){
log.info("遥测数据保存失败33333");
return JsonResult.error("遥测数据保存失败");
}


+ 1
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/road/RoadInformationServiceImpl.java Ver fichero

@@ -213,8 +213,7 @@ public class RoadInformationServiceImpl extends BaseServiceImpl<RoadInformationM
@Override
public JsonResult getListByTenantId() {
//获取当前租户下id
//String tenantId = CurrentUserUtil.getTenantId();
String tenantId = "1";
String tenantId = CurrentUserUtil.getTenantId();
if(StringUtils.isEmpty(tenantId)){
throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL);
}

+ 2
- 13
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/GetDroneDataByIdService.java Ver fichero

@@ -73,20 +73,9 @@ public class GetDroneDataByIdService {
droneDataVo.setInspectionId(flightData.getInspectionId());
droneDataVo.setUavPower(79 + "%");
droneDataVo.setRange(6 + "km");
double dist = Integer.valueOf(flightData.getDistHome())/1000d;
droneDataVo.setTargetLocation(dist+ "km");
//距离机场的距离
droneDataVo.setTargetLocation(0 + "km");
droneDataVo.setYsingal(flightData.getYsingal() + "%");
// List<DroneDataVo> droneDataVoList = new ArrayList<>();
// for (FlightData flightData2 : flightDataList) {
// DroneDataVo droneDataVo = new DroneDataVo();
// droneDataVo.setInspectionId(flightData.getInspectionId());
// droneDataVo.setUavPower(79 + "%");
// droneDataVo.setRange(6 + "km");
// double dist = Integer.valueOf(flightData.getDistHome())/1000d;
// droneDataVo.setTargetLocation(dist+ "km");
// droneDataVo.setYsingal(flightData.getYsingal() + "%");
// droneDataVoList.add(droneDataVo);
// }

return JsonResult.success(droneDataVo);
}

+ 16
- 13
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/dsp/DspCallbackServiceImpl.java Ver fichero

@@ -142,6 +142,10 @@ public class DspCallbackServiceImpl implements IDspCallbackService {
}
inspection.setUpdateTime(DateUtils.now());
inspectionMapper.updateByPrimaryKey(inspection);

//获取当前任务对应的部门id
String deptId = inspection.getDeptId();

log.info("巡检任务状态更新成功");

log.info("巡检任务分析问题图片处理开始,此处图片数量为:{}张", StringUtils.isNull(dspCallbackRequest.getQuestionFiles()) ? 0 : dspCallbackRequest.getQuestionFiles().size());
@@ -267,8 +271,11 @@ public class DspCallbackServiceImpl implements IDspCallbackService {
log.info("批量插入问题图片数据");
CommonUtils.batchOperate((x) -> inspectionFileMapper.addBatch(x), thirstyQuestionFiles, 1000);

//批量插入问题之后调用saveAccidentData方法保存应急记录数据入库

log.info("调用saveAccidentData方法保存应急记录数据...");

Boolean flag = this.saveAccidentData(thirstyQuestionFiles);

log.info("预警数据入库结束,{}",flag);

}
@@ -281,14 +288,8 @@ public class DspCallbackServiceImpl implements IDspCallbackService {
* @return
*/
private Boolean saveAccidentData(List<InspectionFile> inspectionFileList){
log.info("应急数据入库开始....");
//获取当前登录用户
User user = CurrentUserUtil.getUserInfo();
//部门
String deptId = user.getDeptId();
if(StringUtils.isEmpty(deptId)){
throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL);
}
log.info("调用保存应急数据方法,应急数据入库开始....");

List<Accident> accidentList = new ArrayList<>();
List<QuestionType> questionTypeList = questionTypeMapper.selectList(Wrappers.<QuestionType>lambdaQuery()
.eq(QuestionType::getMark, MarkEnum.VALID.getCode()));
@@ -303,7 +304,7 @@ public class DspCallbackServiceImpl implements IDspCallbackService {
if(inspectionFile.getQuestionCode().equals(QuestionCodeEnum.PONDING.getCode())
|| inspectionFile.getQuestionCode().equals(QuestionCodeEnum.PIT_GROOVE.getCode())){
accident.setTenantId(inspectionFile.getTenantId());
accident.setDeptId(deptId);
accident.setInspectionId(inspectionFile.getInspectionId());
accident.setInspectionFileId(inspectionFile.getId());
//应急任务id
@@ -315,8 +316,8 @@ public class DspCallbackServiceImpl implements IDspCallbackService {
accident.setSectionId(inspection.getSectionId());
accident.setSectionName(inspection.getSectionName());

//根据巡检任务类型判断当前应急事故类型
if (AccidentTaskEnum.INSPECTION_ACCIDENT_TASK.getCode() == inspection.getType()) {
//根据巡检任务类型判断当前应急事故类型flag设值
if (AccidentTaskEnum.INSPECTION_ACCIDENT_TASK.getCode() == inspection.getAccidentTask()) {
accident.setFlag(FlagEnum.ACCIDENT.getCode());
} else {
// 该巡检任务存在应急任务,将后面发现的预警直接设置为不展示
@@ -329,6 +330,8 @@ public class DspCallbackServiceImpl implements IDspCallbackService {
accident.setFlag(FlagEnum.INSPECTION_ACCIDENT.getCode());
}
}
String deptId = inspection.getDeptId();
accident.setDeptId(deptId);
}

//公路代号
@@ -346,7 +349,7 @@ public class DspCallbackServiceImpl implements IDspCallbackService {
accident.setLatitude(inspectionFile.getLatitude());
accident.setUavReturn(UavReturnEnum.UAV_RETURN_IS_NOT.getCode());
accident.setStatus(AccidentStatusEnum.UNTREATED.getCode());
accident.setCreateUser(user.getUsername());
accident.setCreateUser(inspectionFile.getCreateUser());
accident.setCreateTime(inspectionFile.getCreateTime());
accidentList.add(accident);
}

Cargando…
Cancelar
Guardar