吉安感知网项目-后端
linwei
2026-06-04 ad935c07a6cabf05fed9c615c7bd4f67f6d65293
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/service/impl/GdPatrolTaskServiceImpl.java
@@ -547,8 +547,8 @@
      if (bladeFile == null || StringUtil.isBlank(bladeFile.getLink())) {
         throw new RuntimeException("附件上传失败");
      }
      Integer resultType = parseResultType(taskEntity != null ? taskEntity.getPatrolTaskType() : null);
      Attach attach = buildAttachInfo(taskEntity, reportFile, bladeFile, resultType, desiredName);
      // Integer resultType = parseResultType(taskEntity != null ? taskEntity.getPatrolTaskType() : null);
       Attach attach = buildAttachInfo(taskEntity, reportFile, bladeFile, taskEntity.getPatrolTaskType(), desiredName);
      Boolean saved = attachClient.saveAttachInfo(attach);
      if (!Boolean.TRUE.equals(saved)) {
         log.error("附件信息保存失败,报告文件:" + desiredName);
@@ -567,7 +567,7 @@
    * @param desiredName 期望文件名
    * @return 附件信息
    */
   private Attach buildAttachInfo(GdPatrolTaskEntity taskEntity, File reportFile, BladeFile bladeFile, Integer resultType, String desiredName) {
   private Attach buildAttachInfo(GdPatrolTaskEntity taskEntity, File reportFile, BladeFile bladeFile, List<List<String>> resultType, String desiredName) {
      Attach attach = new Attach();
      attach.setDomainUrl(bladeFile.getDomain());
      attach.setLink(bladeFile.getLink());
@@ -575,7 +575,7 @@
      attach.setOriginalName(bladeFile.getOriginalName());
      attach.setAttachSize(reportFile.length());
      attach.setExtension(FileUtil.getFileExtension(reportFile.getName()));
      attach.setResultType(resultType);
      attach.setResultType(JSON.toJSONString(resultType));
      attach.setPatrolTaskId(String.valueOf(taskEntity != null ? taskEntity.getId() : null));
      Long createUser = taskEntity != null ? taskEntity.getCreateUser() : null;
      Long updateUser = taskEntity != null ? taskEntity.getUpdateUser() : null;
@@ -660,9 +660,9 @@
      } else if (StringUtil.isNotBlank(gdPatrolTaskVO.getTaskNo())) {
         param.setName(gdPatrolTaskVO.getTaskNo());
      }
      if (StringUtil.isNotBlank(gdPatrolTaskVO.getPatrolTaskType())) {
         param.setInspectionType(gdPatrolTaskVO.getPatrolTaskType());
      }
      // if (StringUtil.isNotBlank(gdPatrolTaskVO.getPatrolTaskType())) {
      //    param.setInspectionType(gdPatrolTaskVO.getPatrolTaskType());
      // }
      if ((gdPatrolTaskVO.getId() != null)) {
         param.setPatrolTaskId(String.valueOf(gdPatrolTaskVO.getId()));
      }
@@ -690,8 +690,8 @@
      // 机构
      param.setDeptId(gdPatrolTaskVO.getCreateDept());
      // 巡检类型
      // param.setInspectionTypeArr(gdPatrolTaskVO.getPatrolTaskType());
      param.setInspectionType(gdPatrolTaskVO.getPatrolTaskType());
      param.setInspectionTypeArr(gdPatrolTaskVO.getPatrolTaskType());
      // param.setInspectionType(gdPatrolTaskVO.getPatrolTaskType());
      // 机巢名称
      param.setAirportName(gdPatrolTaskVO.getDeviceName());
      param.setStatus("待执行");