From 876ffe6934a0dd680c380c5ec866c26ba349dbd1 Mon Sep 17 00:00:00 2001
From: zrj <646384940@qq.com>
Date: Wed, 30 Oct 2024 11:51:13 +0800
Subject: [PATCH] 区域及企业查询调整(字典和区域解析)
---
src/main/java/org/springblade/modules/yw/service/impl/IndParkInfoServiceImpl.java | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/src/main/java/org/springblade/modules/yw/service/impl/IndParkInfoServiceImpl.java b/src/main/java/org/springblade/modules/yw/service/impl/IndParkInfoServiceImpl.java
index 0a61934..462b88b 100644
--- a/src/main/java/org/springblade/modules/yw/service/impl/IndParkInfoServiceImpl.java
+++ b/src/main/java/org/springblade/modules/yw/service/impl/IndParkInfoServiceImpl.java
@@ -124,7 +124,23 @@
long count = firmInfoService.count();
// 设置企业数量
indParkInfoVO.setFirmNum((int) count);
+ // 设置行政区划
+ setRegionInfo(indParkInfoVO);
// 返回
return indParkInfoVO;
}
+
+ /**
+ * 设置行政区划
+ * @param indParkInfoVO
+ */
+ private void setRegionInfo(IndParkInfoVO indParkInfoVO) {
+ QueryWrapper<Region> wrapper = new QueryWrapper<>();
+ wrapper.eq("ancestors","000000000000,"+indParkInfoVO.getAreaCode());
+ List<Region> list = regionService.list(wrapper);
+ if (list.size()>0){
+ Region region = list.get(0);
+ indParkInfoVO.setRegionName(region.getProvinceName()+"-"+region.getCityName());
+ }
+ }
}
--
Gitblit v1.9.3