吉安感知网项目-后端
linwei
2026-06-09 b486873000ea043f159c8de5c0edb123c0f38a87
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/service/impl/GdPatrolTaskServiceImpl.java
@@ -603,7 +603,7 @@
      attach.setOriginalName(bladeFile.getOriginalName());
      attach.setAttachSize(reportFile.length());
      attach.setExtension(FileUtil.getFileExtension(reportFile.getName()));
      attach.setResultType(JSON.toJSONString(resultType));
      attach.setResultType(resultType);
      attach.setPatrolTaskId(String.valueOf(taskEntity != null ? taskEntity.getId() : null));
      Long createUser = taskEntity != null ? taskEntity.getCreateUser() : null;
      Long updateUser = taskEntity != null ? taskEntity.getUpdateUser() : null;
@@ -801,6 +801,11 @@
      // 去除空格并确保长度为6位
      String cleanCode = areaCode.trim();
      // 如果长度大于6位,只取前6位
      if (cleanCode.length() > 6) {
         log.warn("区域编码长度超过6位,截取前6位: {}", cleanCode);
         cleanCode = cleanCode.substring(0, 6);
      }
      if (cleanCode.length() != 6) {
         log.warn("区域编码格式不正确,期望6位数字,实际为: {}", cleanCode);
         return cleanCode;
@@ -809,7 +814,7 @@
      try {
         // 提取省、市、区三级编码
         String provinceCode = cleanCode.substring(0, 2) + "00";      // 省级编码(如:3600)
         String cityCode = cleanCode.substring(0, 4) + "0";           // 市级编码(如:3608)
         String cityCode = cleanCode.substring(0, 4);           // 市级编码(如:3608)
         String districtCode = cleanCode;                             // 区级编码(如:360802)
         return provinceCode + "," + cityCode + "," + districtCode;