huanghongfa
2021-09-29 7544673fcdf0b47524f09585a4529d2dd730ab4d
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));