Commit 7eac0b57 authored by hujun's avatar hujun

同步

parent adb514d3
......@@ -1973,21 +1973,32 @@ class OfficePayLog extends Basic
$fields .= 'd.income_time,a.type,c.store_id';
$list = $refund->getCheckRefundList($pageNo, $pageSize, 'a.id DESC', $fields, $where);
foreach ($list as $k => $v) {
if (empty($v['house_id'])) {
$list[$k]['address'] = '';
} else {
$address = $m_house->getHouseDetail('address', ['a.id' => $v['house_id']]);
$list[$k]['address'] = empty($address['address']) ? '' : $address['address'];
}
$store_id[] = $v['store_id'];
$house_id[] = $v['house_id'];
}
if (empty($v['store_id'])) {
$list[$k]['store_name'] = '';
} else {
$list[$k]['store_name'] = $m_store->getStoreKeyById('store_name', ['id' => $v['store_id']]);
}
if (isset($store_id)) {
$store_id = array_unique($store_id);
$store_id = array_filter($store_id);
$store_data = $m_store->getColumn('id,store_name', ['id'=>['in', $store_id]]);
} else {
$store_data = [];
}
if (isset($house_id)) {
$house_id = array_unique($house_id);
$house_id = array_filter($house_id);
$house_data = $m_house->getHouseColumn('id,internal_address', ['id'=>['in', $house_id]]);
} else {
$house_data = [];
}
foreach($list as $k2=>$v2) {
$list[$k2]['store_name'] = array_key_exists($v2['store_id'], $store_data) ? $store_data[$v2['store_id']] : '';
$list[$k2]['address'] = array_key_exists($v2['house_id'], $house_data) ? $house_data[$v2['house_id']] : '';
}
$data['data']['list'] = $list;
$data['data']['total_money'] = $refund->getSumMoney($where);
$data['data']['total'] = $refund->getCheckRefundListTotal($where);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment