Bladeren bron

Merge branch 'feature_v1.0' into develop

tags/V1.0.1^2
chengwang 1 jaar geleden
bovenliggende
commit
ac7c818a98
3 gewijzigde bestanden met toevoegingen van 18 en 0 verwijderingen
  1. +5
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/inspection/AddInspectionRequest.java
  2. +4
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/airportline/query/inspection/QueryAirportLineByInspectionIdFactory.java
  3. +9
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/add/AddInspectionService.java

+ 5
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/inspection/AddInspectionRequest.java Bestand weergeven

@@ -94,6 +94,11 @@ public class AddInspectionRequest {
*/
private String note;

/**
* 算法实例
*/
private String dspServiceInstId;

/**
* 联系方式
*/

+ 4
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/airportline/query/inspection/QueryAirportLineByInspectionIdFactory.java Bestand weergeven

@@ -46,6 +46,10 @@ public class QueryAirportLineByInspectionIdFactory {
return result;
}
Inspection inspection = (Inspection) result.getData();
if(inspection.getType() == null){
return JsonResult.error("创建的巡检任务类型为空");

}
//目前只有巡检任务
if (1 == inspection.getType()) {
log.info("根据任务ID获取航线业务,日常巡检,inspectionId={},inspectionLine={}", inspection.getId(), inspection.getInspectionLine());

+ 9
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/add/AddInspectionService.java Bestand weergeven

@@ -4,6 +4,7 @@ import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.tuoheng.admin.conver.InspectionConverMapper;
import com.tuoheng.admin.entity.domain.AirportLine;
import com.tuoheng.admin.entity.domain.DspServiceInst;
import com.tuoheng.admin.entity.domain.Inspection;
import com.tuoheng.admin.entity.domain.User;
import com.tuoheng.admin.entity.request.inspection.AddInspectionRequest;
@@ -14,6 +15,7 @@ import com.tuoheng.admin.mapper.*;
import com.tuoheng.admin.service.third.pilot.PilotService;
import com.tuoheng.admin.utils.CurrentUserUtil;
import com.tuoheng.admin.utils.GaodeUtil;
import com.tuoheng.common.core.constant.CommonConstants;
import com.tuoheng.common.core.utils.DateUtils;
import com.tuoheng.common.core.utils.JsonResult;
import com.tuoheng.common.core.utils.StringUtils;
@@ -167,12 +169,19 @@ public class AddInspectionService {
//Inspection inspection = new Inspection();
//BeanUtils.copyProperties(addInspectionRequest,inspection);
String code = DateUtils.generateCode("XJRW");
inspection.setType(1);
inspection.setCode(code);
inspection.setTenantId(tenantId);
inspection.setCreateUser(user.getId());
inspection.setCreateTime(DateUtils.now());
inspection.setMobile(user.getMobile());
inspection.setStatus(InspectionStatusEnum.WAIT_FLIGHT.getCode());
if (StringUtils.isEmpty(addInspectionRequest.getDspServiceInstId())) {
//提供默认服务实例id
DspServiceInst dspServiceInst = dspServiceInstMapper.selectOne(Wrappers.<DspServiceInst>lambdaQuery()
.eq(DspServiceInst::getIsDefault, CommonConstants.ONE));
inspection.setDspServiceInstId(dspServiceInst.getDspServiceInstId());
}
if (InspectionTypeEnum.AIRPORT.getCode() == addInspectionRequest.getInspectionType()) {
// 机场巡逻,只有直播,将isLive设置为1
inspection.setIsLive(1);

Laden…
Annuleren
Opslaan