|
@@ -194,10 +194,13 @@ namespace TEAMModelBI.Controllers.BITmid
|
|
string city = doc.GetProperty("city").GetString();
|
|
string city = doc.GetProperty("city").GetString();
|
|
string district = string.Empty;
|
|
string district = string.Empty;
|
|
if (!string.IsNullOrWhiteSpace(country) && country.Equals("TW"))
|
|
if (!string.IsNullOrWhiteSpace(country) && country.Equals("TW"))
|
|
- {
|
|
|
|
- district = city;
|
|
|
|
- city = province;
|
|
|
|
- province = string.Empty;
|
|
|
|
|
|
+ { //TW有兩種格式 (1)無province => 無須變更 (2)有province => city = province,district = city
|
|
|
|
+ if(!string.IsNullOrWhiteSpace(province))
|
|
|
|
+ {
|
|
|
|
+ district = city;
|
|
|
|
+ city = province;
|
|
|
|
+ province = string.Empty;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
tmidStics.country = (!string.IsNullOrWhiteSpace(country) && regionData.country.ContainsKey(country)) ? regionData.country[country].name.Replace("地區", "").Replace("地区", "") : country;
|
|
tmidStics.country = (!string.IsNullOrWhiteSpace(country) && regionData.country.ContainsKey(country)) ? regionData.country[country].name.Replace("地區", "").Replace("地区", "") : country;
|
|
tmidStics.province = (!string.IsNullOrWhiteSpace(country) && regionData.country.ContainsKey(country) && !string.IsNullOrWhiteSpace(province) && regionData.province.ContainsKey(country) && regionData.province[country].ContainsKey(province)) ? regionData.province[country][province].name : province;
|
|
tmidStics.province = (!string.IsNullOrWhiteSpace(country) && regionData.country.ContainsKey(country) && !string.IsNullOrWhiteSpace(province) && regionData.province.ContainsKey(country) && regionData.province[country].ContainsKey(province)) ? regionData.province[country][province].name : province;
|