|
@@ -148,7 +148,7 @@ class InspectionApplication extends Model
|
|
|
public function getProvinceNameAttr($value, $data)
|
|
|
{
|
|
|
if (!empty($data['province_adcode'])) {
|
|
|
- $area = \app\common\model\Area::where('adcode', $data['province_adcode'])->find();
|
|
|
+ $area = \app\common\model\Area::where('id', $data['province_adcode'])->find();
|
|
|
return $area ? $area['name'] : '';
|
|
|
}
|
|
|
return '';
|
|
@@ -160,7 +160,7 @@ class InspectionApplication extends Model
|
|
|
public function getCityNameAttr($value, $data)
|
|
|
{
|
|
|
if (!empty($data['city_adcode'])) {
|
|
|
- $area = \app\common\model\Area::where('adcode', $data['city_adcode'])->find();
|
|
|
+ $area = \app\common\model\Area::where('id', $data['city_adcode'])->find();
|
|
|
return $area ? $area['name'] : '';
|
|
|
}
|
|
|
return '';
|
|
@@ -172,7 +172,7 @@ class InspectionApplication extends Model
|
|
|
public function getDistrictNameAttr($value, $data)
|
|
|
{
|
|
|
if (!empty($data['district_adcode'])) {
|
|
|
- $area = \app\common\model\Area::where('adcode', $data['district_adcode'])->find();
|
|
|
+ $area = \app\common\model\Area::where('id', $data['district_adcode'])->find();
|
|
|
return $area ? $area['name'] : '';
|
|
|
}
|
|
|
return '';
|