|
|
@@ -1012,23 +1012,15 @@ class LowPriceGoods extends Controller
|
|
|
}
|
|
|
}
|
|
|
$province_name = $item[15];
|
|
|
- if ($province_name && !strpos($province_name, '省')) {
|
|
|
- if (!in_array($province_name, ['北京', '天津', '上海', '重庆'])) {
|
|
|
- $province_name = $province_name . '省';
|
|
|
- }
|
|
|
- }
|
|
|
- if (!isset($city_id_data[$province_name])) return json_send(['code' => 'error', 'msg' => "第{$key_num}行省份信息错误", 'data' => '']);
|
|
|
+ if (!isset($city_id_data[$province_name])) return json_send(['code' => 'error', 'msg' => "第{$key_num}行省份信息不完整", 'data' => '']);
|
|
|
$city_name = $item[16];
|
|
|
- if ($city_name && !strpos($city_name, '市')) {
|
|
|
- $city_name = $city_name . '市';
|
|
|
+ if (!isset($city_id_data[$city_name])) return json_send(['code' => 'error', 'msg' => "第{$key_num}行城市信息不完整", 'data' => '']);
|
|
|
+ // 权限判断
|
|
|
+ if ($is_admin != 1 && $company_id != 0) {
|
|
|
+ $insert_product_data['company_id'] = $company_id;
|
|
|
+ } else {
|
|
|
+ $insert_product_data['company_id'] = $admin_company_id;
|
|
|
}
|
|
|
- // 权限判断
|
|
|
- if ($is_admin != 1 && $company_id != 0) {
|
|
|
- $insert_product_data['company_id'] = $company_id;
|
|
|
- } else {
|
|
|
- $insert_product_data['company_id'] = $admin_company_id;
|
|
|
- }
|
|
|
- if (!isset($city_id_data[$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'; // 平台
|