@@ -34,8 +34,14 @@ create table th_inspection_cycle | |||
mark tinyint unsigned default '1' null comment '有效标记:0删除 1启用 2禁用' | |||
) comment '周期任务表' collate = utf8mb4_bin; | |||
-- 任务表 | |||
alter table tuoheng_freeway.th_inspection add inspection_cycle_id varchar(36) default '' not null comment '周期性任务ID' after inspection_type; | |||
alter table tuoheng_freeway.th_inspection add airport_task_id int default 0 not null comment '机场任务ID' after inspection_cycle_id; | |||
alter table tuoheng_freeway.th_inspection add flytime varchar(50) default '' not null comment '总飞行时间(秒)' after fly_height; | |||
alter table tuoheng_freeway.th_inspection add mileage varchar(50) default '' not null comment '总飞行里程(米)' after flytime; | |||
alter table tuoheng_freeway.th_inspection drop column road_name; | |||
alter table tuoheng_freeway.th_inspection drop column section_name; | |||
alter table tuoheng_freeway.th_inspection drop column airport_name; | |||
alter table tuoheng_freeway.th_inspection drop column inspection_line_name; | |||
@@ -58,21 +58,11 @@ public class Inspection extends BaseEntity { | |||
*/ | |||
private String roadId; | |||
/** | |||
* 公路名称 | |||
*/ | |||
private String roadName; | |||
/** | |||
* 路段ID | |||
*/ | |||
private String sectionId; | |||
/** | |||
* 路段名称 | |||
*/ | |||
private String sectionName; | |||
/** | |||
* 巡检方式类型 1 无人机 2机场巡逻 3飞手值飞 | |||
*/ | |||
@@ -98,21 +88,11 @@ public class Inspection extends BaseEntity { | |||
*/ | |||
private Integer droneId; | |||
/** | |||
* 巡检机场名称 | |||
*/ | |||
private String airportName; | |||
/** | |||
* 巡检线路id | |||
*/ | |||
private Integer inspectionLine; | |||
/** | |||
* 巡检线路名称 | |||
*/ | |||
private String inspectionLineName; | |||
/** | |||
* 飞行设备 | |||
*/ |
@@ -111,9 +111,6 @@ public class QueryAccidentDetailsService { | |||
private void getInspectionById(Accident accident, AccidentDetailsVo vo) { | |||
if(StringUtils.isNotEmpty(accident.getInspectionId())){ | |||
Inspection inspection = inspectionMapper.selectById(accident.getInspectionId()); | |||
if(inspection.getAirportName() !=null){ | |||
vo.setAirPortName(inspection.getAirportName()); | |||
} | |||
if(inspection.getExecutionStartTime() !=null){ | |||
vo.setExecutionStartTime(inspection.getExecutionStartTime()); | |||
} |
@@ -182,17 +182,13 @@ public class AccidentVerifyService { | |||
inspection.setStatus(InspectionStatusEnum.IN_FLIGHT.getCode()); // 设置应急任务状态为飞行中 | |||
inspection.setInspectionType(InspectionTypeEnum.AIRPORT.getCode()); | |||
inspection.setAirportId(oldInspection.getAirportId()); | |||
inspection.setAirportName(oldInspection.getAirportName()); | |||
inspection.setInspectionLine(0); | |||
inspection.setInspectionLineName(""); | |||
inspection.setExecutionStartTime(DateUtils.now()); | |||
inspection.setCreateUser(user.getId()); | |||
inspection.setCreateTime(DateUtils.now()); | |||
inspection.setEmergencyDataInspectionId(oldInspection.getId()); | |||
inspection.setRoadId(""); | |||
inspection.setRoadName(""); | |||
inspection.setSectionId(""); | |||
inspection.setSectionName(""); | |||
inspection.setIsLive(1); | |||
Integer count = inspectionMapper.insert(inspection); | |||
if (count <= 0) { |
@@ -6,13 +6,13 @@ import com.alibaba.excel.EasyExcel; | |||
import com.alibaba.excel.write.style.HorizontalCellStyleStrategy; | |||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||
import com.tuoheng.admin.dto.InspectionFileExportExcelDto; | |||
import com.tuoheng.admin.entity.Inspection; | |||
import com.tuoheng.admin.entity.InspectionFile; | |||
import com.tuoheng.admin.entity.User; | |||
import com.tuoheng.admin.entity.*; | |||
import com.tuoheng.admin.enums.InspectionFileStatusEnum; | |||
import com.tuoheng.admin.enums.MarkEnum; | |||
import com.tuoheng.admin.mapper.InspectionFileMapper; | |||
import com.tuoheng.admin.mapper.InspectionMapper; | |||
import com.tuoheng.admin.mapper.RoadInformationMapper; | |||
import com.tuoheng.admin.mapper.SectionMapper; | |||
import com.tuoheng.admin.request.inspectionfile.ExportInspectionFileRequest; | |||
import com.tuoheng.admin.utils.CurrentUserUtil; | |||
import com.tuoheng.admin.utils.DownloadUtil; | |||
@@ -54,6 +54,10 @@ public class ExportInspectionFileByIdListService { | |||
private final InspectionFileMapper inspectionFileMapper; | |||
private final RoadInformationMapper roadInformationMapper; | |||
private final SectionMapper sectionMapper; | |||
/** | |||
* 修改任务问题类型 | |||
* | |||
@@ -116,6 +120,9 @@ public class ExportInspectionFileByIdListService { | |||
} | |||
private List<InspectionFileExportExcelDto> buildInspectionFileExportExcelDto(Inspection inspection, List<InspectionFile> inspectionFileList) { | |||
RoadInformation road = roadInformationMapper.selectById(inspection.getRoadId()); | |||
Section section = sectionMapper.selectById(inspection.getSectionId()); | |||
List<InspectionFileExportExcelDto> inspectionFileExportExcelDtoList = new ArrayList<>(); | |||
InspectionFile inspectionFile; | |||
InspectionFileExportExcelDto inspectionFileExportExcelDto; | |||
@@ -131,8 +138,12 @@ public class ExportInspectionFileByIdListService { | |||
throw new RuntimeException(e); | |||
} | |||
inspectionFileExportExcelDto.setLocation(inspectionFile.getLongitude() + "," + inspectionFile.getLatitude()); | |||
inspectionFileExportExcelDto.setSectionName(inspection.getSectionName()); | |||
inspectionFileExportExcelDto.setRoadName(inspection.getRoadName()); | |||
if (ObjectUtil.isNotEmpty(road)) { | |||
inspectionFileExportExcelDto.setRoadName(road.getName()); | |||
} | |||
if (ObjectUtil.isNotEmpty(section)) { | |||
inspectionFileExportExcelDto.setSectionName(section.getSectionRange()); | |||
} | |||
if (InspectionFileStatusEnum.WAIT_CONFIRMED.getCode() == inspectionFile.getStatus()) { | |||
inspectionFileExportExcelDto.setStatus("待确认"); | |||
} else if (InspectionFileStatusEnum.IGNORED.getCode() == inspectionFile.getStatus()) { |
@@ -145,9 +145,7 @@ public class PointFlightService { | |||
inspection.setSectionId(""); | |||
inspection.setInspectionType(2); | |||
inspection.setAirportId(request.getAirportId()); | |||
inspection.setAirportName(request.getAirportName()); | |||
inspection.setInspectionLine(0); | |||
inspection.setInspectionLineName(""); | |||
inspection.setExecutionStartTime(DateUtils.now()); | |||
inspection.setCreateUser(user.getId()); | |||
inspection.setCreateTime(DateUtils.now()); |
@@ -324,7 +324,6 @@ public class DspCallbackServiceImpl implements IDspCallbackService { | |||
if (ObjectUtils.isNotEmpty(inspection)) { | |||
accident.setRoadId(inspection.getRoadId()); | |||
accident.setSectionId(inspection.getSectionId()); | |||
accident.setSectionName(inspection.getSectionName()); | |||
//根据巡检任务类型判断当前应急事故类型flag设值 | |||
if (2 == inspection.getType()) { |
@@ -12,17 +12,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
<result property="name" column="name" /> | |||
<result property="type" column="type" /> | |||
<result property="roadId" column="road_id" /> | |||
<result property="roadName" column="road_name" /> | |||
<result property="sectionId" column="section_id" /> | |||
<result property="sectionName" column="section_name" /> | |||
<result property="inspectionType" column="inspection_type" /> | |||
<result property="inspectionCycleId" column="inspection_cycleId_id" /> | |||
<result property="airportTaskId" column="airport_task_id" /> | |||
<result property="airportId" column="airport_id" /> | |||
<result property="airportName" column="airport_name" /> | |||
<result property="droneId" column="drone_id" /> | |||
<result property="inspectionLine" column="inspection_line" /> | |||
<result property="inspectionLineName" column="inspection_line_name" /> | |||
<result property="equipmentId" column="equipment_id" /> | |||
<result property="equipmentName" column="equipment_name" /> | |||
<result property="equipmentMountId" column="equipment_mount_id" /> | |||
@@ -68,8 +64,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
</resultMap> | |||
<sql id="Base_Column_list"> | |||
id, tenant_id, dept_id, code, name, type, road_id, road_name, section_id, section_name, inspection_type, | |||
inspectionCycleI, airport_task_id, airport_id, drone_id, airport_name, inspection_line, inspection_line_name, | |||
id, tenant_id, dept_id, code, name, type, road_id, section_id, inspection_type, | |||
inspectionCycleI, airport_task_id, airport_id, drone_id, inspection_line, | |||
equipment_id, equipment_name, equipment_mount_id, equipment_mount_name, cloud_box_id, cloud_box_name, box_sn, | |||
flight_hand, flight_hand_name, inspection_time, execution_start_time, execution_end_time, is_live, is_taken, is_tilt, | |||
video_url, ai_video_url, report_url, srt_url, status, analyse_status, progressbar, note, weather, | |||
@@ -79,8 +75,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
</sql> | |||
<sql id="selectInspectionVo"> | |||
select id, tenant_id, dept_id, code, name, type, road_id, road_name, section_id, section_name, inspection_type, | |||
inspectionCycleI, airport_task_id, airport_id, drone_id, airport_name, inspection_line, inspection_line_name, | |||
select id, tenant_id, dept_id, code, name, type, road_id, section_id, inspection_type, | |||
inspectionCycleI, airport_task_id, airport_id, drone_id, inspection_line, | |||
equipment_id, equipment_name, equipment_mount_id, equipment_mount_name, cloud_box_id, cloud_box_name, box_sn, | |||
flight_hand, flight_hand_name, inspection_time, execution_start_time, execution_end_time, is_live, is_taken, is_tilt, | |||
video_url, ai_video_url, report_url, srt_url, status, analyse_status, progressbar, note, weather, | |||
@@ -153,16 +149,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
update th_inspection | |||
<trim prefix="SET" suffixOverrides=","> | |||
<if test="roadId != null and roadId != ''">road_id = #{roadId},</if> | |||
<if test="roadName != null">road_name = #{roadName},</if> | |||
<if test="sectionId != null and sectionId != ''">section_id = #{sectionId},</if> | |||
<if test="sectionName != null">section_name = #{sectionName},</if> | |||
<if test="inspectionType != null">inspection_type = #{inspectionType},</if> | |||
<if test="airportTaskId != null">airport_task_id = #{airportTaskId},</if> | |||
<if test="airportId != null">airport_id = #{airportId},</if> | |||
<if test="droneId != null">drone_id = #{droneId},</if> | |||
<if test="airportName != null">airport_name = #{airportName},</if> | |||
<if test="inspectionLine != null">inspection_line = #{inspectionLine},</if> | |||
<if test="inspectionLineName != null">inspection_line_name = #{inspectionLineName},</if> | |||
<if test="equipmentId != null">equipment_id = #{equipmentId},</if> | |||
<if test="equipmentName != null">equipment_name = #{equipmentName},</if> | |||
<if test="equipmentMountId != null">equipment_mount_id = #{equipmentMountId},</if> | |||
@@ -293,15 +285,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
<if test="droneId != null"> | |||
drone_id = #{droneId}, | |||
</if> | |||
<if test="airportName != null"> | |||
airport_name = #{airportName}, | |||
</if> | |||
<if test="inspectionLine != null"> | |||
inspection_line = #{inspectionLine}, | |||
</if> | |||
<if test="inspectionLineName != null"> | |||
inspection_line_name = #{inspectionLineName}, | |||
</if> | |||
<if test="progressbar != null"> | |||
progressbar = #{progressbar}, | |||
</if> |