| | |
| | | attach.setTenantId("000000"); |
| | | // 设置航线任务jobId |
| | | if (!Strings.isBlank(odmTaskInfo.getWaylineJobId())) { |
| | | attach.setWayLineJobId(odmTaskInfo.getWaylineJobId()); |
| | | attach.setPatrolTaskId(odmTaskInfo.getWaylineJobId()); |
| | | } |
| | | // 设置类型-切斜摄影 |
| | | if (odmTaskInfo.getType() == OdmTypeEnum.TILT.getType().intValue()) { |
| | | attach.setResultType(AttachResultTypeEnum.TILT.getType()); |
| | | attach.setResultType(null); |
| | | } |
| | | // 设置类型-三维白膜 |
| | | if (odmTaskInfo.getType() == OdmTypeEnum.ALB.getType().intValue()) { |
| | | attach.setResultType(AttachResultTypeEnum.ALB.getType()); |
| | | attach.setResultType(null); |
| | | } |
| | | // 设置区域编号 |
| | | attach.setAreaCode(odmTaskInfo.getAreaCode()); |
| | |
| | | attach.setUpdateTime(new Date()); |
| | | if (!Strings.isBlank(odmTaskInfo.getCompletedTime())) { |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
| | | attach.setMediaCreateTime(LocalDateTime.parse(odmTaskInfo.getCompletedTime(), formatter)); |
| | | } |
| | | // 设置设备编号 |
| | | if (!Strings.isBlank(odmTaskInfo.getDeviceSn())) { |
| | |
| | | attach.setNickName(odmTaskInfo.getWaylineJobName()); |
| | | attach.setOriginalName(path); |
| | | attach.setExtension(".tif"); |
| | | attach.setMediaCategory(2); |
| | | // 设置航线对应的机构 |
| | | attach.setAreaCode(odmTaskInfo.getAreaCode()); |
| | | attach.setCreateUser(odmTaskInfo.getCreateUser()); |
| | |
| | | attach.setTenantId("000000"); |
| | | // 设置航线任务jobId |
| | | if (!Strings.isBlank(odmTaskInfo.getWaylineJobId())) { |
| | | attach.setWayLineJobId(odmTaskInfo.getWaylineJobId()); |
| | | attach.setPatrolTaskId(odmTaskInfo.getWaylineJobId()); |
| | | } |
| | | // 设置类型 |
| | | attach.setResultType(AttachResultTypeEnum.ORT.getType()); |
| | | attach.setResultType(null); |
| | | // 设置设备编号 |
| | | if (!Strings.isBlank(odmTaskInfo.getDeviceSn())) { |
| | | attach.setDeviceSn(odmTaskInfo.getDeviceSn()); |
| | |
| | | } |
| | | if (!Strings.isBlank(odmTaskInfo.getCompletedTime())) { |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
| | | attach.setMediaCreateTime(LocalDateTime.parse(odmTaskInfo.getCompletedTime(), formatter)); |
| | | } |
| | | // 图片压缩 |
| | | log.info("开始压缩tif图片,路径:{}", path); |
| | |
| | | |
| | | // 设置类型-三维白膜 |
| | | // 测试用,临时用,用后需要手动数据库修改 |
| | | attach.setResultType(AttachResultTypeEnum.ALB.getType()); |
| | | attach.setResultType(null); |
| | | |
| | | log.info("发起远程调用保存三维白膜/倾斜附件信息,tif 路径:{}", path); |
| | | Boolean isSaveAttach = attachClient.saveAttachInfo(attach); |