吉安感知网项目-后端
xiebin
2026-01-30 b3edfcbd0267cf66d4a908d47dbe5d97533dcb33
drone-service/drone-fw/src/main/java/org/sxkj/fw/area/service/impl/FwPoliceStationServiceImpl.java
@@ -45,6 +45,11 @@
      return page.setRecords(baseMapper.selectFwPoliceStationPage(page, fwPoliceStation));
   }
   @Override
   public List<FwPoliceStationVO> selectFwPoliceStationList() {
      return baseMapper.selectFwPoliceStationList();
   }
   @Override
   public List<FwPoliceStationExcel> exportFwPoliceStation(Wrapper<FwPoliceStationEntity> queryWrapper) {
@@ -53,6 +58,12 @@
      //   fwPoliceStation.setTypeName(DictCache.getValue(DictEnum.YES_NO, FwPoliceStation.getType()));
      //});
      return fwPoliceStationList;
   }
   @Override
   public List<FwPoliceStationVO> selectByPolygons(List<String> polygons) {
      // 仅做空间过滤,具体坐标规则由 SQL 处理
      return baseMapper.selectByPolygons(polygons);
   }
   @Override
@@ -78,6 +89,7 @@
   }
   private void fillCreateFields(FwPoliceStationEntity fwPoliceStation) {
      // 创建/更新基础审计字段统一设置
      Long userId = AuthUtil.getUserId();
      String deptIdStr = AuthUtil.getDeptId();
      Long deptId = null;
@@ -88,19 +100,19 @@
            deptId = null;
         }
      }
      String areaCode = HeaderUtils.getAreaCode();
      if (StringUtil.isBlank(areaCode)) {
         areaCode = fwPoliceStation.getAreaCode();
      }
//      String areaCode = HeaderUtils.getAreaCode();
//      if (StringUtil.isBlank(areaCode)) {
//         areaCode = fwPoliceStation.getAreaCode();
//      }
      Date now = new Date();
      fwPoliceStation.setCreateUser(userId);
      fwPoliceStation.setUpdateUser(userId);
      if (deptId != null) {
         fwPoliceStation.setCreateDept(deptId);
      }
      if (StringUtil.isNotBlank(areaCode)) {
         fwPoliceStation.setAreaCode(areaCode);
      }
//      if (StringUtil.isNotBlank(areaCode)) {
//         fwPoliceStation.setAreaCode(areaCode);
//      }
      fwPoliceStation.setCreateTime(now);
      fwPoliceStation.setUpdateTime(now);
   }