@@ -106,7 +106,7 @@ public class InspectionController { | |||
* @return | |||
*/ | |||
@GetMapping("/videoByAirportId/{id}") | |||
public JsonResult videoByAirportId(@PathVariable("id") String id){ | |||
public JsonResult videoByAirportId(@PathVariable("id") Integer id){ | |||
return iInspectionService.videoByAirportId(id); | |||
} | |||
@@ -118,6 +118,8 @@ public class Inspection extends BaseEntity { | |||
*/ | |||
private String equipmentMountName; | |||
/** | |||
* 5G云盒ID | |||
*/ |
@@ -75,4 +75,6 @@ public interface InspectionMapper extends BaseMapper<Inspection> { | |||
List<Inspection> selectListByDeptIdList(List<String> deptIdList); | |||
Inspection selectInspectionByAirport(@Param("id") Integer id); | |||
} |
@@ -151,5 +151,5 @@ public interface IInspectionService { | |||
* @param id | |||
* @return | |||
*/ | |||
JsonResult videoByAirportId(String id); | |||
JsonResult videoByAirportId(Integer id); | |||
} |
@@ -295,7 +295,7 @@ public class InspectionServiceImpl implements IInspectionService { | |||
* @return | |||
*/ | |||
@Override | |||
public JsonResult videoByAirportId(String id) { | |||
public JsonResult videoByAirportId(Integer id) { | |||
return queryVideoService.videoByAirportId(id); | |||
} | |||
@@ -73,15 +73,16 @@ public class QueryVideoService { | |||
return JsonResult.success(liveChannelVo); | |||
} | |||
public JsonResult videoByAirportId(String id) { | |||
if (StringUtils.isEmpty(id)) { | |||
public JsonResult videoByAirportId(Integer id) { | |||
if (id == null) { | |||
return JsonResult.error(QueryVideoServiceEnum.AIRPORT_ID_IS_NULL.getCode(), QueryVideoServiceEnum.AIRPORT_ID_IS_NULL.getMsg()); | |||
} | |||
//根据机场id查询对应正在巡检的任务 | |||
Inspection inspection = inspectionMapper.selectOne(Wrappers.<Inspection>lambdaQuery() | |||
.eq(Inspection::getAirportId, id) | |||
.eq(Inspection::getStatus, InspectionStatusEnum.IN_FLIGHT.getCode()) | |||
.eq(Inspection::getMark, MarkEnum.VALID.getCode())); | |||
Inspection inspection = inspectionMapper.selectInspectionByAirport(id); | |||
// Inspection inspection = inspectionMapper.selectOne(new LambdaQueryWrapper<Inspection>() | |||
// .eq(Inspection::getAirportId, id) | |||
// .eq(Inspection::getStatus, InspectionStatusEnum.IN_FLIGHT.getCode()) | |||
// .eq(Inspection::getMark, MarkEnum.VALID.getCode())); | |||
if(ObjectUtils.isEmpty(inspection)){ | |||
return JsonResult.error(QueryVideoServiceEnum.INSPECTION_IS_NOT_EXIST.getCode(), QueryVideoServiceEnum.INSPECTION_IS_NOT_EXIST.getMsg()); | |||
} |
@@ -58,7 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
<result property="createTime" column="create_time" /> | |||
<result property="updateUser" column="update_user" /> | |||
<result property="updateTime" column="update_time" /> | |||
<result property="emergencyDataMissionId" column="emergency_data_inspection_id" /> | |||
<result property="emergencyDataInspectionId" column="emergency_data_inspection_id" /> | |||
<result property="mark" column="mark" /> | |||
</resultMap> | |||
@@ -131,6 +131,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
</foreach> | |||
</select> | |||
<select id="selectInspectionByAirport" resultType="com.tuoheng.admin.entity.Inspection"> | |||
select | |||
<include refid="Base_Column_list"></include> | |||
from th_inspection | |||
where | |||
airport_id = #{id} | |||
AND STATUS = 10 | |||
AND mark = 1 | |||
</select> | |||
<update id="update" parameterType="com.tuoheng.admin.entity.Inspection"> | |||
update th_inspection | |||
<trim prefix="SET" suffixOverrides=","> |