修改平台端账单导出的错误,商户列表添加区域检索

This commit is contained in:
luofei 2023-06-05 17:17:28 +08:00
parent da1d8ebcb2
commit 86f069e6a7

View File

@ -406,31 +406,29 @@ class ExcelService
if (!$where['is_mer']) { if (!$where['is_mer']) {
$header = ['商户类别', '商户分类', '商户名称', '总订单号', '订单编号', '交易流水号', '交易时间', '对方信息', '交易类型', '收支金额', '备注']; $header = ['商户类别', '商户分类', '商户名称', '总订单号', '订单编号', '交易流水号', '交易时间', '对方信息', '交易类型', '收支金额', '备注'];
$list = $query->page($page, $limit)->order('create_time DESC')->select(); $list = $query->page($page, $limit)->order('create_time DESC')->select();
foreach ($list as $value) { foreach ($list as $k => $value) {
$order = $order_make->get($value['order_id']); $order = $order_make->get($value['order_id']);
if ($value['merchant']) { if ($value['merchant']) {
$export[] = [ $export[$k] = [
$value['merchant']['is_trader'] ? '自营' : '非自营', $value['merchant']['is_trader'] ? '自营' : '非自营',
$value['merchant']['merchantCategory']['category_name'] ?? '平台', $value['merchant']['merchantCategory']['category_name'] ?? '平台',
$value['merchant']['mer_name'] ?? '平台', $value['merchant']['mer_name'] ?? '平台',
]; ];
}else{ }else{
$export[] = [ $export[$k] = [
'平台', '平台',
'平台', '平台',
'平台', '平台',
]; ];
} }
$export[] = [ $export[$k][] = ['groupOrder']['group_order_sn'] ?? '无数据';
$order['groupOrder']['group_order_sn'] ?? '无数据', $export[$k][] = $value['order_sn'];
$value['order_sn'], $export[$k][] = $value['financial_record_sn'];
$value['financial_record_sn'], $export[$k][] = $value['create_time'];
$value['create_time'], $export[$k][] = $value['user_info'];
$value['user_info'], $export[$k][] = $financialType[$value['financial_type']];
$financialType[$value['financial_type']], $export[$k][] = (in_array($value['financial_type'], $sys_pm_1) ? '+' : '-') . $value['number'];
(in_array($value['financial_type'], $sys_pm_1) ? '+' : '-') . $value['number'], $export[$k][] = '';
''
];
} }
$foot = [ $foot = [
'合计:平台应入账手续费 ' . $charge, '合计:平台应入账手续费 ' . $charge,