Browse Source

Merge branch 'feature_v1.0' into develop

tags/V1.0.1^2
chengwang 1 year ago
parent
commit
3a4b8d8d41
5 changed files with 21 additions and 14 deletions
  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 View File



List<Inspection> getListByBox(@Param("boxSn") String boxSn); 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 View File

*/ */
private Inspection buildInspection(User user, String tenantId, AddInspectionRequest addInspectionRequest) { private Inspection buildInspection(User user, String tenantId, AddInspectionRequest addInspectionRequest) {
Inspection inspection = InspectionConverMapper.INSTANCE.fromAddInspectionRequestToInspection(addInspectionRequest); Inspection inspection = InspectionConverMapper.INSTANCE.fromAddInspectionRequestToInspection(addInspectionRequest);
//Inspection inspection = new Inspection();
//BeanUtils.copyProperties(addInspectionRequest,inspection);
String code = DateUtils.generateCode("XJRW"); String code = DateUtils.generateCode("XJRW");
inspection.setType(1); inspection.setType(1);
inspection.setCode(code); inspection.setCode(code);
.eq(DspServiceInst::getIsDefault, CommonConstants.ONE)); .eq(DspServiceInst::getIsDefault, CommonConstants.ONE));
inspection.setDspServiceInstId(dspServiceInst.getDspServiceInstId()); 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); inspection.setIsLive(1);
} }
return inspection; return inspection;

+ 3
- 8
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryInspectionListDataService.java View File

log.info("进入查询任务列表数据失败:{}",jsonResult.getMsg()); log.info("进入查询任务列表数据失败:{}",jsonResult.getMsg());
return JsonResult.error("查询任务数据失败"); 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 View File

pilotTaskRequest.setTaskStartTime(inspection.getInspectionTime()); pilotTaskRequest.setTaskStartTime(inspection.getInspectionTime());
pilotTaskRequest.setRemark(inspection.getNote()); pilotTaskRequest.setRemark(inspection.getNote());


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


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

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

and status = 10 and status = 10
and mark = 1 and mark = 1
order by update_time desc 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> </select>


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

Loading…
Cancel
Save