Просмотр исходного кода

Merge branch 'feature_v1.0' into develop

tags/V1.0.1^2
chengwang 1 год назад
Родитель
Сommit
3a4b8d8d41
5 измененных файлов: 21 добавлений и 14 удалений
  1. +2
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/mapper/InspectionMapper.java
  2. +2
    -4
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/add/AddInspectionService.java
  3. +3
    -8
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryInspectionListDataService.java
  4. +3
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/pilot/AddPilotTaskService.java
  5. +11
    -0
      tuoheng-service/tuoheng-admin/src/main/resources/mapper/InspectionMapper.xml

+ 2
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/mapper/InspectionMapper.java Просмотреть файл

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

List<Inspection> getListByBox(@Param("boxSn") String boxSn);

List<Inspection> selectInspectionList(@Param("tenantId") String tenantId);

}

+ 2
- 4
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/add/AddInspectionService.java Просмотреть файл

@@ -166,8 +166,6 @@ public class AddInspectionService {
*/
private Inspection buildInspection(User user, String tenantId, AddInspectionRequest addInspectionRequest) {
Inspection inspection = InspectionConverMapper.INSTANCE.fromAddInspectionRequestToInspection(addInspectionRequest);
//Inspection inspection = new Inspection();
//BeanUtils.copyProperties(addInspectionRequest,inspection);
String code = DateUtils.generateCode("XJRW");
inspection.setType(1);
inspection.setCode(code);
@@ -182,8 +180,8 @@ public class AddInspectionService {
.eq(DspServiceInst::getIsDefault, CommonConstants.ONE));
inspection.setDspServiceInstId(dspServiceInst.getDspServiceInstId());
}
if (InspectionTypeEnum.AIRPORT.getCode() == addInspectionRequest.getInspectionType()) {
// 机场巡逻,只有直播,将isLive设置为1
if (InspectionTypeEnum.AIRPORT.getCode() == addInspectionRequest.getInspectionType() ||
InspectionTypeEnum.MABNNEDFLIGHT.getCode() == addInspectionRequest.getInspectionType()) {
inspection.setIsLive(1);
}
return inspection;

+ 3
- 8
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryInspectionListDataService.java Просмотреть файл

@@ -38,14 +38,9 @@ public class QueryInspectionListDataService {
log.info("进入查询任务列表数据失败:{}",jsonResult.getMsg());
return JsonResult.error("查询任务数据失败");
}
List<Inspection> inspectionList = inspectionMapper.selectList(Wrappers.<Inspection>lambdaQuery()
.eq(Inspection::getMark, MarkEnum.VALID.getCode())
.eq(Inspection::getTenantId, tenantId)
.notIn(Inspection::getStatus, InspectionStatusEnum.FLIGHT_FAILED.getCode())
.orderByAsc(Inspection::getStatus)
.orderByDesc(Inspection::getCreateTime)
.last("limit 5"));
return JsonResult.success(inspectionList);
List<Inspection> inspectionsList = inspectionMapper.selectInspectionList(tenantId);
log.info("查询出来任务列表:{}",inspectionsList);
return JsonResult.success(inspectionsList);
}



+ 3
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/pilot/AddPilotTaskService.java Просмотреть файл

@@ -44,8 +44,9 @@ public class AddPilotTaskService {
pilotTaskRequest.setTaskStartTime(inspection.getInspectionTime());
pilotTaskRequest.setRemark(inspection.getNote());

//直播
pilotTaskRequest.setIsLive(inspection.getIsLive());
//直播 大气飞手任务只有直播
pilotTaskRequest.setIsLive(1);
//pilotTaskRequest.setIsLive(inspection.getIsLive());

//经纬度
pilotTaskRequest.setStartLatitude(inspection.getStartLatitude());

+ 11
- 0
tuoheng-service/tuoheng-admin/src/main/resources/mapper/InspectionMapper.xml Просмотреть файл

@@ -107,6 +107,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and status = 10
and mark = 1
order by update_time desc

</select>
<!--根据任务状态进行自定义排序-->
<select id="selectInspectionList" resultType="com.tuoheng.admin.entity.domain.Inspection">
<include refid="selectInspectionVo"/>
<where>
mark = 1 and status in (5,6,10,15)
<if test="tenantId != null and tenantId != ''">and tenant_id = #{tenantId}</if>
</where>
order by field(status,10,6,5,15), create_time desc
limit 5
</select>

<update id="update" parameterType="com.tuoheng.admin.entity.domain.Inspection">

Загрузка…
Отмена
Сохранить