package com.xxfc.platform.vehicle.pojo;

import com.xxfc.platform.vehicle.entity.BranchCompany;
import com.xxfc.platform.vehicle.entity.SysRegion;
import lombok.Data;

import java.util.List;

@Data
public class CompanyDetail extends BranchCompany {
    List<SysRegion> sysRegions;

    public String detailAddr() {
        StringBuilder detailAddrStr = new StringBuilder("");
        if(null != this.getSysRegions() && this.getSysRegions().size() > 0) {
            for(SysRegion sysRegion : this.getSysRegions()) {
//                if(0 != detailAddrStr.length()) {
//
//                }
                detailAddrStr.append(sysRegion.getName());
            }
        }

        detailAddrStr.append(this.getAddrDetail());
        return detailAddrStr.toString();
    }
}