* @return | * @return | ||||
*/ | */ | ||||
@GetMapping("/videoByAirportId/{id}") | @GetMapping("/videoByAirportId/{id}") | ||||
public JsonResult videoByAirportId(@PathVariable("id") String id){ | |||||
public JsonResult videoByAirportId(@PathVariable("id") Integer id){ | |||||
return iInspectionService.videoByAirportId(id); | return iInspectionService.videoByAirportId(id); | ||||
} | } | ||||
*/ | */ | ||||
private String equipmentMountName; | private String equipmentMountName; | ||||
/** | /** | ||||
* 5G云盒ID | * 5G云盒ID | ||||
*/ | */ |
List<Inspection> selectListByDeptIdList(List<String> deptIdList); | List<Inspection> selectListByDeptIdList(List<String> deptIdList); | ||||
Inspection selectInspectionByAirport(@Param("id") Integer id); | |||||
} | } |
* @param id | * @param id | ||||
* @return | * @return | ||||
*/ | */ | ||||
JsonResult videoByAirportId(String id); | |||||
JsonResult videoByAirportId(Integer id); | |||||
} | } |
* @return | * @return | ||||
*/ | */ | ||||
@Override | @Override | ||||
public JsonResult videoByAirportId(String id) { | |||||
public JsonResult videoByAirportId(Integer id) { | |||||
return queryVideoService.videoByAirportId(id); | return queryVideoService.videoByAirportId(id); | ||||
} | } | ||||
return JsonResult.success(liveChannelVo); | 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()); | return JsonResult.error(QueryVideoServiceEnum.AIRPORT_ID_IS_NULL.getCode(), QueryVideoServiceEnum.AIRPORT_ID_IS_NULL.getMsg()); | ||||
} | } | ||||
//根据机场id查询对应正在巡检的任务 | //根据机场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)){ | if(ObjectUtils.isEmpty(inspection)){ | ||||
return JsonResult.error(QueryVideoServiceEnum.INSPECTION_IS_NOT_EXIST.getCode(), QueryVideoServiceEnum.INSPECTION_IS_NOT_EXIST.getMsg()); | return JsonResult.error(QueryVideoServiceEnum.INSPECTION_IS_NOT_EXIST.getCode(), QueryVideoServiceEnum.INSPECTION_IS_NOT_EXIST.getMsg()); | ||||
} | } |
<result property="createTime" column="create_time" /> | <result property="createTime" column="create_time" /> | ||||
<result property="updateUser" column="update_user" /> | <result property="updateUser" column="update_user" /> | ||||
<result property="updateTime" column="update_time" /> | <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" /> | <result property="mark" column="mark" /> | ||||
</resultMap> | </resultMap> | ||||
</foreach> | </foreach> | ||||
</select> | </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 id="update" parameterType="com.tuoheng.admin.entity.Inspection"> | ||||
update th_inspection | update th_inspection | ||||
<trim prefix="SET" suffixOverrides=","> | <trim prefix="SET" suffixOverrides=","> |