Browse Source

Merge branch 'develop' of gitadmin/tuoheng_freeway into release

tags/v1.2.0^2
chengwang 1 year ago
parent
commit
b025b9de3c
7 changed files with 25 additions and 10 deletions
  1. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/InspectionController.java
  2. +2
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/Inspection.java
  3. +2
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/mapper/InspectionMapper.java
  4. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/IInspectionService.java
  5. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/InspectionServiceImpl.java
  6. +7
    -6
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryVideoService.java
  7. +11
    -1
      tuoheng-service/tuoheng-admin/src/main/resources/mapper/InspectionMapper.xml

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/InspectionController.java View File

@@ -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);
}


+ 2
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/Inspection.java View File

@@ -118,6 +118,8 @@ public class Inspection extends BaseEntity {
*/
private String equipmentMountName;



/**
* 5G云盒ID
*/

+ 2
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/mapper/InspectionMapper.java View File

@@ -75,4 +75,6 @@ public interface InspectionMapper extends BaseMapper<Inspection> {

List<Inspection> selectListByDeptIdList(List<String> deptIdList);

Inspection selectInspectionByAirport(@Param("id") Integer id);

}

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/IInspectionService.java View File

@@ -151,5 +151,5 @@ public interface IInspectionService {
* @param id
* @return
*/
JsonResult videoByAirportId(String id);
JsonResult videoByAirportId(Integer id);
}

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/InspectionServiceImpl.java View File

@@ -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);
}


+ 7
- 6
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryVideoService.java View File

@@ -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());
}

+ 11
- 1
tuoheng-service/tuoheng-admin/src/main/resources/mapper/InspectionMapper.xml View File

@@ -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=",">

Loading…
Cancel
Save