From a777cbf23ac54f9e2c24bdbad102d45deb0b06b1 Mon Sep 17 00:00:00 2001
From: 罗元桥 <2376770955@qq.com>
Date: 星期三, 29 九月 2021 17:48:03 +0800
Subject: [PATCH] Merge branch 'test' into 'test_bak'

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngCarServiceImpl.java |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngCarServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngCarServiceImpl.java
index 3cc4723..8d708cc 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngCarServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngCarServiceImpl.java
@@ -4,6 +4,7 @@
 
 import javax.annotation.Resource;
 
+import com.panzhihua.common.utlis.StringUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
@@ -125,7 +126,20 @@
         }
         ComMngCarDO comMngCarDO = new ComMngCarDO();
         BeanUtils.copyProperties(comMngCarSaveDTO, comMngCarDO);
-        comMngCarDO.setAreaName(comMngVillageDO.getGroupAt());
+        //如果小区没有名字,则将街路巷和地区号拼接起来
+        if(comMngVillageDO.getName() != null && StringUtils.isNotEmpty(comMngVillageDO.getName())){
+            comMngCarDO.setAreaName(comMngVillageDO.getName());
+        }else{
+            StringBuilder sb = new StringBuilder();
+            sb.append(comMngVillageDO.getAlley());
+            if(!comMngVillageDO.getHouseNum().contains("号")){
+                sb.append(comMngVillageDO.getHouseNum() + "号");
+            }
+            comMngCarDO.setAreaName(sb.toString());
+        }
+//        if(comMngVillageDO.getGroupAt() == null){
+//            comMngCarDO.setAreaName(comMngVillageDO.getGroupAt());
+//        }
         comMngCarDO.setCommunityId(comMngVillageDO.getCommunityId());
         try {
             comMngCarDO.setCardNo(AESUtil.encrypt128(comMngCarSaveDTO.getCardNo(), aesKey));

--
Gitblit v1.7.1