Commit a387f2f7 authored by hujun's avatar hujun

开业审核跳转财务日报

parent fd4c9067
......@@ -168,14 +168,14 @@ class PayLogOpen extends Basic
}
$where['a.is_del'] = 0;
$fields = 'a.id,a.create_time,a.agent_id,a.pay_log_id,a.bargain_id,a.order_id,a.house_id,a.status,a.house_address,c.name';
$fields = 'a.id,a.create_time,a.pay_log_id,a.bargain_id,a.order_id,a.house_id,a.status,a.house_address,c.name';
$list = $this->m_pay_open->getListCheck($pageNo, $pageSize, 'a.id desc', $fields, $where);
if ($this->params['excel'] == 0) {
$m_pay = new OPayLogModel();
$m_store = new AStore();
$m_daily = new ODaily();
$redis = new RedisCacheService();
foreach ($list as $k=>$v) {
$log_where['open_id'] = $v['id'];
$log_where['is_del'] = 0;
......@@ -191,14 +191,14 @@ class PayLogOpen extends Basic
}
$list[$k]['agent_name'] = $v['name'];
//跳转财务日报页面数据
$pay_data = $m_pay->getPayLogByUserId('b.report_store_id,a.create_time', ['id'=>$v['pay_log_id']]);
$daily_where['store_id'] = $pay_data['report_store_id'];
$daily_where['daily_date'] = date('Y-m-d', strtotime($pay_data['create_time']));
$pay_data = $m_pay->selectPayLogByOrderNo('agent_id,create_time', ['id'=>$v['pay_log_id']]);
$daily_where['daily_date'] = date('Y-m-d', strtotime($pay_data[0]['create_time']));
$num = $m_daily->getTotal($daily_where); //是否提交财务日报
if ($num) {
$list[$k]['daily_date'] = date('Y-m-d', strtotime($pay_data['create_time']));
$list[$k]['store_id'] = $pay_data['report_store_id'];
$list[$k]['store_name'] = $m_store->getStoreKeyById('store_name', ['id'=>$pay_data['report_store_id']]);
$list[$k]['daily_date'] = date('Y-m-d', strtotime($pay_data[0]['create_time']));
$agent_data = $redis->getRedisCache(2, $pay_data[0]['agent_id']);
$list[$k]['store_id'] = $agent_data['store_id'];
$list[$k]['store_name'] = $agent_data['store_name'];
} else {
$list[$k]['daily_date'] = '';
$list[$k]['store_id'] = '';
......
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