@@ -5,9 +5,10 @@ import com.tuoheng.admin.entity.domain.ThInspection; | |||
import com.tuoheng.admin.entity.domain.ThMission; | |||
import java.util.List; | |||
import java.util.Map; | |||
public interface ThInspectionMapper extends BaseMapper<ThInspection> { | |||
List<ThInspection> selectListByMissionId(Integer missionId, Integer tenantId); | |||
List<ThInspection> selectListByMissionId(Map<String, Object> map); | |||
} |
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||
import com.tuoheng.admin.conver.InspectionConverMapper; | |||
import com.tuoheng.admin.entity.domain.ThInspection; | |||
import com.tuoheng.admin.entity.domain.ThMission; | |||
import com.tuoheng.admin.entity.domain.WarningRecord; | |||
import com.tuoheng.admin.entity.vo.index.DroneDataVo; | |||
import com.tuoheng.admin.enums.MarkTypeEnum; | |||
import com.tuoheng.admin.enums.TaskStatusEnum; | |||
@@ -21,7 +22,9 @@ import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
import java.util.HashMap; | |||
import java.util.List; | |||
import java.util.Map; | |||
@Slf4j | |||
@Service | |||
@@ -44,7 +47,6 @@ public class QueryDroneDataService { | |||
// 读取不同租户的机场平台url | |||
User user = ShiroUtils.getUserInfo(); | |||
Integer tenantId = user.getTenantId(); | |||
ThMission mission = missionMapper.selectOne(new LambdaQueryWrapper<ThMission>() | |||
.eq(ThMission::getTenantId, tenantId) | |||
.eq(ThMission::getAirportId, airportId) | |||
@@ -55,7 +57,10 @@ public class QueryDroneDataService { | |||
throw new ServiceException("没有正在飞行的任务"); | |||
} | |||
List<ThInspection> inspectionList = inspectionMapper.selectListByMissionId(mission.getId(), ShiroUtils.getTenantId()); | |||
Map<String, Object> map = new HashMap<>(); | |||
map.put("id", mission.getId()); | |||
map.put("tenantId", tenantId); | |||
List<ThInspection> inspectionList = inspectionMapper.selectListByMissionId(map); | |||
if (CollectionUtil.isEmpty(inspectionList)) { | |||
log.info("获取无人机数据信息, 数据为空"); | |||
JsonResult.success("数据为空"); |
@@ -41,9 +41,7 @@ import org.springframework.http.HttpStatus; | |||
import org.springframework.stereotype.Service; | |||
import java.io.UnsupportedEncodingException; | |||
import java.util.ArrayList; | |||
import java.util.List; | |||
import java.util.Objects; | |||
import java.util.*; | |||
/** | |||
* @User qiujinyang | |||
@@ -257,7 +255,10 @@ public class ThInspectionServiceImpl extends BaseServiceImpl<ThInspectionMapper, | |||
throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL); | |||
} | |||
//根据任务id查询对应的遥测数据 | |||
List<ThInspection> listData = inspectionMapper.selectListByMissionId(id, ShiroUtils.getTenantId());//xz | |||
Map<String, Object> map = new HashMap<>(); | |||
map.put("id", id); | |||
map.put("tenantId", ShiroUtils.getTenantId()); | |||
List<ThInspection> listData = inspectionMapper.selectListByMissionId(map); | |||
return JsonResult.success(listData); | |||
} | |||
@@ -27,7 +27,7 @@ | |||
create_user, create_time, update_user, update_time, mark | |||
</sql> | |||
<select id="selectListByMissionId" resultType="com.tuoheng.admin.entity.domain.ThInspection"> | |||
<select id="selectListByMissionId" parameterType="java.util.Map" resultMap="BaseResultMap"> | |||
select | |||
<include refid="Base_Column_List"/> | |||
from th_inspection |