|
@@ -214,10 +214,8 @@ class ViolationProduct extends Controller
|
|
|
$specify_responsible_person = request('specify_responsible_person', '0');
|
|
$specify_responsible_person = request('specify_responsible_person', '0');
|
|
|
$all_data['specify_responsible_person'] = $specify_responsible_person;
|
|
$all_data['specify_responsible_person'] = $specify_responsible_person;
|
|
|
//查询是否存在
|
|
//查询是否存在
|
|
|
- $map = ['product_brand' => $all_data['product_brand'], 'product_name' => $all_data['product_name']];
|
|
|
|
|
- if(isset($all_data['product_specs']) && $all_data['product_specs'] !=''){
|
|
|
|
|
- $map['product_specs'] = $all_data['product_specs'];
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ $map = ['product_name' => $all_data['product_name']];
|
|
|
|
|
+ if ($all_data['product_brand'] !='') $map['product_brand'] = $all_data['product_brand'];
|
|
|
if ($is_admin != 1 && $company_id != 0) {
|
|
if ($is_admin != 1 && $company_id != 0) {
|
|
|
$map['company_id'] = $company_id;
|
|
$map['company_id'] = $company_id;
|
|
|
$all_data['company_id'] = $company_id;
|
|
$all_data['company_id'] = $company_id;
|
|
@@ -316,10 +314,8 @@ class ViolationProduct extends Controller
|
|
|
$specify_responsible_person = request('specify_responsible_person', '0');
|
|
$specify_responsible_person = request('specify_responsible_person', '0');
|
|
|
$all_data['specify_responsible_person'] = $specify_responsible_person;
|
|
$all_data['specify_responsible_person'] = $specify_responsible_person;
|
|
|
//查询是否存在
|
|
//查询是否存在
|
|
|
- $map = ['product_brand' => $all_data['product_brand'], 'product_name' => $all_data['product_name']];
|
|
|
|
|
- if(isset($all_data['product_specs']) && $all_data['product_specs'] !=''){
|
|
|
|
|
- $map['product_specs'] = $all_data['product_specs'];
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ $map = ['product_name' => $all_data['product_name']];
|
|
|
|
|
+ if ($all_data['product_brand'] !='') $map['product_brand'] = $all_data['product_brand'];
|
|
|
if ($is_admin != 1 && $company_id != 0) {
|
|
if ($is_admin != 1 && $company_id != 0) {
|
|
|
$map['company_id'] = $company_id;
|
|
$map['company_id'] = $company_id;
|
|
|
$all_data['company_id'] = $company_id;
|
|
$all_data['company_id'] = $company_id;
|