Ver código fonte

Merge branch 'develop' of gitadmin/tuoheng_air_monitor into release

pull/101/head
wanjing 10 meses atrás
pai
commit
07c84685e2
4 arquivos alterados com 15 adições e 30 exclusões
  1. +0
    -5
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/inspection/AddInspectionRequest.java
  2. +0
    -10
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/inspection/EditInspectionRequest.java
  3. +5
    -5
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/add/AddInspectionService.java
  4. +10
    -10
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/UpdateInspectionService.java

+ 0
- 5
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/inspection/AddInspectionRequest.java Ver arquivo

@@ -31,11 +31,6 @@ public class AddInspectionRequest {
*/
private Integer airportId;

/**
* 巡检机场名称
*/
private String airportName;

/**
* 无人机id
*/

+ 0
- 10
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/inspection/EditInspectionRequest.java Ver arquivo

@@ -32,11 +32,6 @@ public class EditInspectionRequest {
*/
private Integer airportId;

/**
* 巡检机场名称
*/
private String airportName;

/**
* 无人机id
*/
@@ -47,11 +42,6 @@ public class EditInspectionRequest {
*/
private Integer inspectionLine;

/**
* 巡检线路名称
*/
private String inspectionLineName;

/**
* 巡检方式类型: 1 无人机 2机场巡逻 3 飞手值飞
*/

+ 5
- 5
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/add/AddInspectionService.java Ver arquivo

@@ -114,16 +114,16 @@ public class AddInspectionService {
if (StringUtils.isEmpty(addInspectionRequest.getName())) {
return JsonResult.error(AddInspectionCodeEnum.NAME_IS_NULL.getCode(), AddInspectionCodeEnum.NAME_IS_NULL.getMsg());
}
if(null == addInspectionRequest.getInspectionType()){
if(ObjectUtil.isEmpty(addInspectionRequest.getInspectionType()) || 0 == addInspectionRequest.getInspectionType()){
return JsonResult.error(AddInspectionCodeEnum.INSPECTION_TYPE_IS_NULL.getCode(),AddInspectionCodeEnum.INSPECTION_TYPE_IS_NULL.getMsg());
}
if (InspectionTypeEnum.AIRPORT.getCode() == addInspectionRequest.getInspectionType()) {
// 巡检方式:机场巡逻,可选择巡检机场和巡检路线
if (null == addInspectionRequest.getAirportId() || StringUtils.isEmpty(addInspectionRequest.getAirportName())) {
// 巡检方式:机场巡逻,可选择巡检机场
if (ObjectUtil.isEmpty(addInspectionRequest.getAirportId()) || 0 == addInspectionRequest.getAirportId()) {
return JsonResult.error(AddInspectionCodeEnum.AIRPORT_IS_NULL.getCode(), AddInspectionCodeEnum.AIRPORT_IS_NULL.getMsg());
}

if (null == addInspectionRequest.getInspectionLine()) {
if (ObjectUtil.isEmpty(addInspectionRequest.getInspectionLine()) || 0 == addInspectionRequest.getInspectionLine()) {
return JsonResult.error(AddInspectionCodeEnum.INSPECTION_LINE_IS_NULL.getCode(), AddInspectionCodeEnum.INSPECTION_LINE_IS_NULL.getMsg());
}
if(StringUtils.isEmpty(addInspectionRequest.getFlyHeight())){
@@ -150,7 +150,7 @@ public class AddInspectionService {
// return JsonResult.error(AddInspectionCodeEnum.INSPECTION_NOTE_IS_NOT_EXIST.getCode(),AddInspectionCodeEnum.INSPECTION_NOTE_IS_NOT_EXIST.getMsg());
// }
}
if (null == addInspectionRequest.getInspectionTime()) {
if (ObjectUtil.isEmpty(addInspectionRequest.getInspectionTime())) {
return JsonResult.error(AddInspectionCodeEnum.INSPECTION_TIME_IS_NULL.getCode(), AddInspectionCodeEnum.INSPECTION_TIME_IS_NULL.getMsg());
}
return JsonResult.success();

+ 10
- 10
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/UpdateInspectionService.java Ver arquivo

@@ -73,39 +73,39 @@ public class UpdateInspectionService {
/**
* 检查参数
* @param tenantId
* @param editInspectionRequest
* @param request
* @return
*/
private JsonResult check(String tenantId, EditInspectionRequest editInspectionRequest) {
if (StringUtils.isEmpty(editInspectionRequest.getId())) {
private JsonResult check(String tenantId, EditInspectionRequest request) {
if (StringUtils.isEmpty(request.getId())) {
return JsonResult.error(EditInspectionCodeEnum.ID_IS_NULL.getCode(), EditInspectionCodeEnum.ID_IS_NULL.getMsg());
}
if(StringUtils.isEmpty(editInspectionRequest.getName())){
if(StringUtils.isEmpty(request.getName())){
return JsonResult.error(EditInspectionCodeEnum.INSPECTION_NAME_IS_NULL.getCode(),EditInspectionCodeEnum.INSPECTION_NAME_IS_NULL.getMsg());
}

if (null == editInspectionRequest.getAirportId() || StringUtils.isEmpty(editInspectionRequest.getAirportName())) {
if (ObjectUtil.isEmpty(request.getAirportId()) || 0 == request.getAirportId()) {
return JsonResult.error(EditInspectionCodeEnum.AIRPORT_IS_NULL.getCode(), EditInspectionCodeEnum.AIRPORT_IS_NULL.getMsg());
}

if (null == editInspectionRequest.getInspectionLine() || StringUtils.isEmpty(editInspectionRequest.getInspectionLineName())) {
if (ObjectUtil.isEmpty(request.getInspectionLine()) || 0 == request.getInspectionLine()) {
return JsonResult.error(EditInspectionCodeEnum.INSPECTION_LINE_IS_NULL.getCode(), EditInspectionCodeEnum.INSPECTION_LINE_IS_NULL.getMsg());
}
if (null == editInspectionRequest.getInspectionTime()) {
if (ObjectUtil.isEmpty(request.getInspectionTime())) {
return JsonResult.error(EditInspectionCodeEnum.INSPECTION_TIME_IS_NULL.getCode(), EditInspectionCodeEnum.INSPECTION_TIME_IS_NULL.getMsg());
}
int timaDiff = DateUtils.compareToDate(editInspectionRequest.getInspectionTime(), DateUtils.now());
int timaDiff = DateUtils.compareToDate(request.getInspectionTime(), DateUtils.now());
if (2 != timaDiff) {
return JsonResult.error(EditInspectionCodeEnum.INSPECTION_TIME_NOT_AFTER_THAN_CURRENT_TIME.getCode(), EditInspectionCodeEnum.INSPECTION_TIME_NOT_AFTER_THAN_CURRENT_TIME.getMsg());
}
//飞行高度
if(StringUtils.isEmpty(editInspectionRequest.getFlyHeight())){
if(StringUtils.isEmpty(request.getFlyHeight())){
return JsonResult.error(EditInspectionCodeEnum.INSPECTION_FLY_HEIGHT_IS_NULL.getCode(),EditInspectionCodeEnum.INSPECTION_FLY_HEIGHT_IS_NULL.getMsg());
}

//查询当前对应的任务
Inspection inspection = inspectionMapper.selectOne(Wrappers.<Inspection>lambdaQuery()
.eq(Inspection::getId, editInspectionRequest.getId())
.eq(Inspection::getId, request.getId())
.eq(Inspection::getTenantId,tenantId)
.eq(Inspection::getMark, MarkEnum.VALID.getCode()));
if (ObjectUtil.isNull(inspection)) {

Carregando…
Cancelar
Salvar