|
|
@@ -679,6 +679,7 @@ class ViolationProduct extends Controller
|
|
|
DB::beginTransaction();
|
|
|
try {
|
|
|
foreach ($data as $key => $item) {
|
|
|
+ $key_num = $key + 1;
|
|
|
if ($key < 2) continue;
|
|
|
//强制必传参数校验
|
|
|
$res_data = $this->import_data_check($key, $item);
|
|
|
@@ -719,10 +720,12 @@ class ViolationProduct extends Controller
|
|
|
$province_name = $province_name . '省';
|
|
|
}
|
|
|
}
|
|
|
+ if (!$province_name) return json_send(['code' => 'error', 'msg' => "第{$key_num}行省份信息错误", 'data' => '']);
|
|
|
$city_name = $item[14];
|
|
|
if ($city_name && !strpos($city_name, '市')) {
|
|
|
$city_name = $city_name . '市';
|
|
|
}
|
|
|
+ if (!$city_name) return json_send(['code' => 'error', 'msg' => "第{$key_num}行城市信息错误", 'data' => '']);
|
|
|
$insert_product_data['first_responsible_person'] = !empty($first_responsible_person_id) ? implode(',', $first_responsible_person_id) : ''; //第一责任人ID集合
|
|
|
$insert_product_data['responsible_person'] = !empty($responsible_person_id) ? implode(',', $responsible_person_id) : ''; //责任人ID集合
|
|
|
$insert_product_data['platform'] = isset($platform_data[$item[2]]) ? $platform_data[$item[2]] : '0'; // 平台
|