|
|
@@ -102,6 +102,7 @@ class ExportLowPriceGoodsJobs implements ShouldQueue
|
|
|
$platform = $message_data['platform'] ?? '';
|
|
|
$company_name = $message_data['company_name'] ?? '';
|
|
|
$store_name = $message_data['store_name'] ?? '';
|
|
|
+ $anonymous_store_name = $message_data['anonymous_store_name'] ?? '';
|
|
|
$store_names = $message_data['store_names'] ?? '';
|
|
|
$source_responsible_person = $message_data['source_responsible_person'] ?? '';
|
|
|
$processing_status = $message_data['processing_status'] ?? '';
|
|
|
@@ -120,6 +121,7 @@ class ExportLowPriceGoodsJobs implements ShouldQueue
|
|
|
// 其他条件
|
|
|
if ($product_name) $map[] = ['product_name', 'like', "%$product_name%"];
|
|
|
if ($store_name) $map[] = ['store_name', 'like', "%$store_name%"];
|
|
|
+ if ($anonymous_store_name) $map[] = ['anonymous_store_name', 'like', "%$anonymous_store_name%"];
|
|
|
if ($category_name) $map[] = ['category_name', 'like', "%$category_name%"];
|
|
|
if ($product_brand) $map[] = ['product_brand', 'like', "%$product_brand%"];
|
|
|
|
|
|
@@ -334,28 +336,30 @@ class ExportLowPriceGoodsJobs implements ShouldQueue
|
|
|
$sheet->setCellValue('B2', '责任人');
|
|
|
$sheet->setCellValue('C2', '平台');
|
|
|
$sheet->setCellValue('D2', '商品分类');
|
|
|
- $sheet->setCellValue('E2', '商品名称');
|
|
|
- $sheet->setCellValue('F2', '库存');
|
|
|
- $sheet->setCellValue('G2', '销量');
|
|
|
- $sheet->setCellValue('H2', '快照URL');
|
|
|
- $sheet->setCellValue('I2', '商品规格');
|
|
|
- $sheet->setCellValue('J2', '监控价格');
|
|
|
- $sheet->setCellValue('K2', '挂网价格');
|
|
|
- $sheet->setCellValue('L2', '累计挂网次数');
|
|
|
- $sheet->setCellValue('M2', '连续挂网次数');
|
|
|
- $sheet->setCellValue('N2', '链接地址');
|
|
|
- $sheet->setCellValue('O2', '店铺名称');
|
|
|
- $sheet->setCellValue('P2', '公司名称');
|
|
|
- $sheet->setCellValue('Q2', '公司分类');
|
|
|
- $sheet->setCellValue('R2', '信用代码');
|
|
|
- $sheet->setCellValue('S2', '省份');
|
|
|
- $sheet->setCellValue('T2', '城市');
|
|
|
- $sheet->setCellValue('U2', '溯源责任人');
|
|
|
- $sheet->setCellValue('V2', '处理状态');
|
|
|
- $sheet->setCellValue('W2', '任务状态');
|
|
|
- $sheet->setCellValue('X2', '记录时间');
|
|
|
- $sheet->setCellValue('Y2', '发货省份');
|
|
|
- $sheet->setCellValue('Z2', '发货城市');
|
|
|
+ $sheet->setCellValue('E2', '品牌名称');
|
|
|
+ $sheet->setCellValue('F2', '商品名称');
|
|
|
+ $sheet->setCellValue('G2', '库存');
|
|
|
+ $sheet->setCellValue('H2', '销量');
|
|
|
+ $sheet->setCellValue('I2', '快照URL');
|
|
|
+ $sheet->setCellValue('J2', '商品规格');
|
|
|
+ $sheet->setCellValue('K2', '监控价格');
|
|
|
+ $sheet->setCellValue('L2', '挂网价格');
|
|
|
+ $sheet->setCellValue('M2', '累计挂网次数');
|
|
|
+ $sheet->setCellValue('N2', '连续挂网次数');
|
|
|
+ $sheet->setCellValue('O2', '链接地址');
|
|
|
+ $sheet->setCellValue('P2', '店铺名称');
|
|
|
+ $sheet->setCellValue('Q2', '匿名店铺名称');
|
|
|
+ $sheet->setCellValue('R2', '公司名称');
|
|
|
+ $sheet->setCellValue('S2', '公司分类');
|
|
|
+ $sheet->setCellValue('T2', '信用代码');
|
|
|
+ $sheet->setCellValue('U2', '省份');
|
|
|
+ $sheet->setCellValue('V2', '城市');
|
|
|
+ $sheet->setCellValue('W2', '溯源责任人');
|
|
|
+ $sheet->setCellValue('X2', '处理状态');
|
|
|
+ $sheet->setCellValue('Y2', '任务状态');
|
|
|
+ $sheet->setCellValue('Z2', '记录时间');
|
|
|
+ $sheet->setCellValue('AA2', '发货省份');
|
|
|
+ $sheet->setCellValue('AB2', '发货城市');
|
|
|
|
|
|
//平台0=全部,1=淘宝,2=京东,3=拼多多,4=美团,5=药师帮,6=1药城,7=药久久,8=药易购,9=药帮忙,10=熊猫药药11=药房网
|
|
|
$platform_data = [
|
|
|
@@ -389,30 +393,35 @@ class ExportLowPriceGoodsJobs implements ShouldQueue
|
|
|
$sheet->setCellValue('B' . $row, $responsible_person_name);
|
|
|
$sheet->setCellValue('C' . $row, isset($platform_data[$item['platform']]) ? $platform_data[$item['platform']] : '');
|
|
|
$sheet->setCellValue('D' . $row, $item['category_name']);
|
|
|
- $sheet->setCellValue('E' . $row, $item['product_name']);
|
|
|
- $sheet->setCellValue('F' . $row, $item['inventory']);
|
|
|
- $sheet->setCellValue('G' . $row, $item['sales']);
|
|
|
- $sheet->setCellValue('H' . $row, $item['snapshot_url']);
|
|
|
- $sheet->setCellValue('I' . $row, $item['product_specs']);
|
|
|
- $sheet->setCellValue('J' . $row, $item['suggested_price']);
|
|
|
- $sheet->setCellValue('K' . $row, $item['online_posting_price']);
|
|
|
- $sheet->setCellValue('L' . $row, $item['online_posting_count']);
|
|
|
- $sheet->setCellValue('M' . $row, $item['continuous_listing_count']);
|
|
|
- $sheet->setCellValue('N' . $row, $item['link_url']);
|
|
|
- $sheet->setCellValue('O' . $row, $item['store_name']);
|
|
|
- $sheet->setCellValue('P' . $row, $item['company_name']);
|
|
|
- $sheet->setCellValue('Q' . $row, $item['company_category_name']);
|
|
|
- $sheet->setCellValue('R' . $row, $item['social_credit_code']);
|
|
|
- $sheet->setCellValue('S' . $row, $item['province_name']);
|
|
|
- $sheet->setCellValue('T' . $row, $item['city_name']);
|
|
|
- $sheet->setCellValue('U' . $row, $source_responsible_person_name);
|
|
|
- $sheet->setCellValue('V' . $row, isset($processing_status_text[$item['processing_status']]) ? $processing_status_text[$item['processing_status']] : '');
|
|
|
- $sheet->setCellValue('W' . $row, isset($status_text[$item['status']]) ? $status_text[$item['status']] : '');
|
|
|
- $sheet->setCellValue('X' . $row, date('Y-m-d H:i:s', $item['insert_time']));
|
|
|
- $sheet->setCellValue('Y' . $row, $item['shipment_city_name']);
|
|
|
- $sheet->setCellValue('Z' . $row, $item['shipment_city_name']);
|
|
|
+ $sheet->setCellValue('E' . $row, $item['product_brand']);
|
|
|
+ $sheet->setCellValue('F' . $row, $item['product_name']);
|
|
|
+ $sheet->setCellValue('G' . $row, $item['inventory']);
|
|
|
+ $sheet->setCellValue('H' . $row, $item['sales']);
|
|
|
+ $sheet->setCellValue('I' . $row, $item['snapshot_url']);
|
|
|
+ $sheet->setCellValue('J' . $row, $item['product_specs']);
|
|
|
+ $sheet->setCellValue('K' . $row, $item['suggested_price']);
|
|
|
+ $sheet->setCellValue('L' . $row, $item['online_posting_price']);
|
|
|
+ $sheet->setCellValue('M' . $row, $item['online_posting_count']);
|
|
|
+ $sheet->setCellValue('N' . $row, $item['continuous_listing_count']);
|
|
|
+ $sheet->setCellValue('O' . $row, $item['link_url']);
|
|
|
+ $sheet->setCellValue('P' . $row, $item['store_name']);
|
|
|
+ $sheet->setCellValue('Q' . $row, $item['anonymous_store_name']);
|
|
|
+ $sheet->setCellValue('R' . $row, $item['company_name']);
|
|
|
+ $sheet->setCellValue('S' . $row, $item['company_category_name']);
|
|
|
+ $sheet->setCellValue('T' . $row, $item['social_credit_code']);
|
|
|
+ $sheet->setCellValue('U' . $row, $item['province_name']);
|
|
|
+ $sheet->setCellValue('V' . $row, $item['city_name']);
|
|
|
+ $sheet->setCellValue('W' . $row, $source_responsible_person_name);
|
|
|
+ $sheet->setCellValue('X' . $row, isset($processing_status_text[$item['processing_status']]) ? $processing_status_text[$item['processing_status']] : '');
|
|
|
+ $sheet->setCellValue('Y' . $row, isset($status_text[$item['status']]) ? $status_text[$item['status']] : '');
|
|
|
+ $sheet->setCellValue('Z' . $row, date('Y-m-d H:i:s', $item['insert_time']));
|
|
|
+ $sheet->setCellValue('AA' . $row, $item['shipment_province_name']);
|
|
|
+ $sheet->setCellValue('AB' . $row, $item['shipment_city_name']);
|
|
|
$row++;
|
|
|
}
|
|
|
+ foreach (range('A', 'AB') as $column) {
|
|
|
+ $sheet->getColumnDimension($column)->setAutoSize(true);
|
|
|
+ }
|
|
|
// 创建Excel文件
|
|
|
$filename = '低价挂网商品数据' . $file_id . '.xlsx';
|
|
|
$path = public_path('uploads/exports/');
|