瀏覽代碼

删除单次任务新增编辑时的关于name的参数的判断(某些功能里vo所需的name值可能为空)

pull/357/head
suqin 11 月之前
父節點
當前提交
2b7c628055
共有 4 個檔案被更改,包括 8 行新增48 行删除
  1. +0
    -20
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/request/inspection/AddInspectionRequest.java
  2. +0
    -20
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/request/inspection/EditInspectionRequest.java
  3. +4
    -4
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/add/AddInspectionService.java
  4. +4
    -4
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/UpdateInspectionService.java

+ 0
- 20
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/request/inspection/AddInspectionRequest.java 查看文件

@@ -33,21 +33,11 @@ public class AddInspectionRequest {
*/
private Integer droneId;

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

/**
* 巡检线路Id
*/
private Integer inspectionLine;

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

/**
* 巡检任务类型: 1 临时巡检(目前只有该一种类型)
*/
@@ -63,21 +53,11 @@ public class AddInspectionRequest {
*/
private String roadId;

/**
* 公路名称
*/
private String roadName;

/**
* 路段Id
*/
private String sectionId;

/**
* 路段名称
*/
private String sectionName;

/**
* 是否直播,1:实时 2:离线 默认:null
*/

+ 0
- 20
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/request/inspection/EditInspectionRequest.java 查看文件

@@ -37,21 +37,11 @@ public class EditInspectionRequest {
*/
private Integer airportId;

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

/**
* 巡检线路Id
*/
private Integer inspectionLine;

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

/**
* 巡检任务类型: 1 临时巡检(目前只有该一种类型)
*/
@@ -67,21 +57,11 @@ public class EditInspectionRequest {
*/
private String roadId;

/**
* 公路名称
*/
private String roadName;

/**
* 路段Id
*/
private String sectionId;

/**
* 路段名称
*/
private String sectionName;

/**
* 是否直播,1:实时 2:离线 默认:null
*/

+ 4
- 4
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/add/AddInspectionService.java 查看文件

@@ -107,20 +107,20 @@ public class AddInspectionService {
if (null == addInspectionRequest.getInspectionType()) {
return JsonResult.error(AddInspectionCodeEnum.INSPECTION_TYPE_IS_NULL.getCode(), AddInspectionCodeEnum.INSPECTION_TYPE_IS_NULL.getMsg());
}
if (null == addInspectionRequest.getRoadId() || StringUtils.isEmpty(addInspectionRequest.getRoadName())) {
if (null == addInspectionRequest.getRoadId()) {
return JsonResult.error(AddInspectionCodeEnum.ROAD_IS_NULL.getCode(), AddInspectionCodeEnum.ROAD_IS_NULL.getMsg());
}

if (null == addInspectionRequest.getSectionId() || StringUtils.isEmpty(addInspectionRequest.getSectionName())) {
if (null == addInspectionRequest.getSectionId()) {
return JsonResult.error(AddInspectionCodeEnum.SECTION_IS_NULL.getCode(), AddInspectionCodeEnum.SECTION_IS_NULL.getMsg());
}
if (InspectionTypeEnum.AIRPORT.getCode() == addInspectionRequest.getInspectionType()) {
// 巡检方式:机场巡逻,可选择巡检机场和巡检路线
if (null == addInspectionRequest.getAirportId() || StringUtils.isEmpty(addInspectionRequest.getAirportName())) {
if (null == addInspectionRequest.getAirportId()) {
return JsonResult.error(AddInspectionCodeEnum.AIRPORT_IS_NULL.getCode(), AddInspectionCodeEnum.AIRPORT_IS_NULL.getMsg());
}

if (null == addInspectionRequest.getInspectionLine() || StringUtils.isEmpty(addInspectionRequest.getInspectionLineName())) {
if (null == addInspectionRequest.getInspectionLine()) {
return JsonResult.error(AddInspectionCodeEnum.INSPECTION_LINE_IS_NULL.getCode(), AddInspectionCodeEnum.INSPECTION_LINE_IS_NULL.getMsg());
}
} else if (InspectionTypeEnum.MABNNEDFLIGHT.getCode() == addInspectionRequest.getInspectionType()) {

+ 4
- 4
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/UpdateInspectionService.java 查看文件

@@ -100,19 +100,19 @@ public class UpdateInspectionService {
return JsonResult.error(EditInspectionCodeEnum.ID_IS_NULL.getCode(), EditInspectionCodeEnum.ID_IS_NULL.getMsg());
}

if (null == editInspectionRequest.getRoadId() || StringUtils.isEmpty(editInspectionRequest.getRoadName())) {
if (null == editInspectionRequest.getRoadId()) {
return JsonResult.error(EditInspectionCodeEnum.ROAD_IS_NULL.getCode(), EditInspectionCodeEnum.ROAD_IS_NULL.getMsg());
}

if (null == editInspectionRequest.getSectionId() || StringUtils.isEmpty(editInspectionRequest.getSectionName()) ) {
if (null == editInspectionRequest.getSectionId() ) {
return JsonResult.error(EditInspectionCodeEnum.SECTION_IS_NULL.getCode(), EditInspectionCodeEnum.SECTION_IS_NULL.getMsg());
}

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

if (null == editInspectionRequest.getInspectionLine() || StringUtils.isEmpty(editInspectionRequest.getInspectionLineName())) {
if (null == editInspectionRequest.getInspectionLine()) {
return JsonResult.error(EditInspectionCodeEnum.INSPECTION_LINE_IS_NULL.getCode(), EditInspectionCodeEnum.INSPECTION_LINE_IS_NULL.getMsg());
}
if (null == editInspectionRequest.getInspectionTime()) {

Loading…
取消
儲存