|
|
@@ -14,6 +14,7 @@ use App\Models\Manager\Personnel\Employee as EmployeeModel;
|
|
|
use App\Models\Api\Process\ExecuteLog as ExecuteLogModel;
|
|
|
use App\Models\Manager\Process\ScrapeData as ScrapeDataModel;
|
|
|
use App\Models\Manager\WashConfig\ViolationCompanyMember as ViolationCompanyMemberModel;
|
|
|
+use App\Models\Manager\WashConfig\ViolationStore as WashConfigViolationStoreModel;
|
|
|
use App\Models\Manager\Citys as CitysModel;
|
|
|
use App\Models\Manager\Personnel\EmployeePlatform as EmployeePlatformModel;
|
|
|
use App\Models\Manager\Personnel\EmployeeArea as EmployeeAreaModel;
|
|
|
@@ -70,6 +71,7 @@ class ViolationCompanyDataJobs implements ShouldQueue
|
|
|
$ViolationCompanyMemberModel = new ViolationCompanyMemberModel();
|
|
|
$EmployeePlatformModel = new EmployeePlatformModel();
|
|
|
$EmployeeAreaModel = new EmployeeAreaModel();
|
|
|
+ $WashConfigViolationStoreModel = new WashConfigViolationStoreModel();
|
|
|
$platform = $message_data['platform']; //多个平台配置
|
|
|
$company_name = $message_data['company_name']; //公司名称
|
|
|
$social_credit_code = $message_data['social_credit_code']; //社会信用代码
|
|
|
@@ -106,6 +108,18 @@ class ViolationCompanyDataJobs implements ShouldQueue
|
|
|
return true;
|
|
|
}
|
|
|
foreach ($product_datas as $product_data) {
|
|
|
+ $store_name = $product_data['store_name'];
|
|
|
+ $anonymous_store_name = $product_data['anonymous_store_name'];
|
|
|
+ if ($anonymous_store_name != '') {
|
|
|
+ $store_name = $anonymous_store_name;
|
|
|
+ }
|
|
|
+ //获取店铺是否有独立的人员责任人配置信息
|
|
|
+ $platform_id = $product_data['platform_id'];
|
|
|
+ $store_responsible_person_config = $WashConfigViolationStoreModel->where('store_name', $store_name)->where('company_id', $company_id)
|
|
|
+ ->whereRaw("FIND_IN_SET(?, platform)", [$platform_id])->where('status', 0)->first();
|
|
|
+ if (!empty($store_responsible_person_config)) {
|
|
|
+ continue; //如果店铺有独立的人员责任人配置信息,则跳过公司层级的责任人分配,直接走店铺层级的责任人分配
|
|
|
+ }
|
|
|
//-------------------------------------- 处理营业执照地区信息(开始) --------------------------------------
|
|
|
$province_name = $product_data['province_name'];
|
|
|
$city_name = $product_data['city_name'];
|
|
|
@@ -215,11 +229,6 @@ class ViolationCompanyDataJobs implements ShouldQueue
|
|
|
if (!empty($matches)) {
|
|
|
$product_data['link_url'] = $matches[0];
|
|
|
}
|
|
|
- $store_name = $product_data['store_name'];
|
|
|
- $anonymous_store_name = $product_data['anonymous_store_name'];
|
|
|
- if ($anonymous_store_name != '') {
|
|
|
- $store_name = $anonymous_store_name;
|
|
|
- }
|
|
|
$insert_product_data = [
|
|
|
'company_id' => $company_id,
|
|
|
'source_id' => $product_data['id'],
|