Commit d5a4151c authored by hujun's avatar hujun

开业审核详情

parent bf6ac410
...@@ -5153,7 +5153,7 @@ class Finance extends Basic ...@@ -5153,7 +5153,7 @@ class Finance extends Basic
if (empty($this->params['open_id'])) { if (empty($this->params['open_id'])) {
return $this->response($code, '参数错误'); return $this->response($code, '参数错误');
} }
$m_pay_open = new OPayOpen(); $m_pay_open = new OPayLogOpen();
$where['is_del'] = 0; $where['is_del'] = 0;
$where['id'] = $this->params['open_id']; $where['id'] = $this->params['open_id'];
...@@ -5170,4 +5170,60 @@ class Finance extends Basic ...@@ -5170,4 +5170,60 @@ class Finance extends Basic
return $this->response($code, $msg); return $this->response($code, $msg);
} }
/**
* 开业审核详情
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
* User HuJun
* Date 19-5-17 上午10:34
*/
public function getPayCheckDetail()
{
$code = 101;
if (empty($this->params['open_id'])) {
return $this->response($code, '参数错误');
}
$m_pay_open = new OPayLogOpen();
$m_pay_open_log = new OPayLogOpenLog();
$m_pay_log = new OPayLogModel();
$m_house = new GHouses();
$redis_service = new RedisCacheService();
$field = 'id,agent_id,pay_log_id,order_id,bargain_id,intro,house_id,status';
$pay_open_data = $m_pay_open->getFind($field, $this->params['open_id']);
if ($pay_open_data['agent_id']) {
$agent_data = $redis_service->getRedisCache(2, $pay_open_data['agent_id']);
$pay_open_data['agent_name'] = $agent_data['name'];
$pay_open_data['store_name'] = $agent_data['store_name'];
} else {
$pay_open_data['agent_name'] = '';
$pay_open_data['store_name'] = '';
}
if ($pay_open_data['pay_log_id']) {
$pay_log_data = $m_pay_log->selectPayLogByOrderNo('income_time,create_time', ['id'=>$pay_open_data['pay_log_id']]);
$pay_open_data['income_time'] = isset($pay_log_data[0]['income_time']) ? $pay_log_data[0]['income_time'] : '';
$pay_open_data['create_time'] = isset($pay_log_data[0]['create_time']) ? $pay_log_data[0]['create_time'] : '';
} else {
$pay_open_data['income_time'] = '';
$pay_open_data['create_time'] = '';
}
if ($pay_open_data['house_id']) {
$house_data = $m_house->getHouseDetail('internal_title,province,city,disc', ['id'=>$pay_open_data['house_id']]);
$pay_open_data['house_address'] = $house_data['province'].$house_data['city'].$house_data['disc'].$house_data['internal_title'];
} else {
$pay_open_data['house_address'] = '';
}
$pay_open_data['check_log'] = $m_pay_open_log->getAllList('operation_name,create_time', $this->params['push_id']);
return $this->response(200, '', $pay_open_data);
}
} }
...@@ -72,6 +72,26 @@ class OPayLogOpen extends BaseModel ...@@ -72,6 +72,26 @@ class OPayLogOpen extends BaseModel
->where($params) ->where($params)
->group('a.id') ->group('a.id')
->count($field); ->count($field);
}
/**
* @param $field
* @param $params
* @return array|false|\PDOStatement|string|\think\Model
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
* User HuJun
* Date 19-5-16 下午4:51
*/
public function getFind($field, $id, $params = []) {
if ($id) {
$params['id'] = $id;
}
$params['is_del'] = 0;
return $this->field($field)
->where($params)
->find();
} }
} }
\ No newline at end of file
...@@ -18,6 +18,12 @@ class OPayLogOpenLog extends BaseModel ...@@ -18,6 +18,12 @@ class OPayLogOpenLog extends BaseModel
$this->db_ = Db::name($this->table); $this->db_ = Db::name($this->table);
} }
/**
* @param $params
* @return int|string
* User HuJun
* Date 19-5-17 上午10:30
*/
public function addOpenCheck($params){ public function addOpenCheck($params){
Db::startTrans(); Db::startTrans();
try { try {
...@@ -30,6 +36,24 @@ class OPayLogOpenLog extends BaseModel ...@@ -30,6 +36,24 @@ class OPayLogOpenLog extends BaseModel
} }
} }
/**
* @param $field
* @param $id
* @param array $params
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
* User HuJun
* Date 19-5-17 上午10:30
*/
public function getAllList($field, $id, $params = []) {
if ($id) {
$params['id'] = $id;
}
$params['is_del'] = 0;
return $this->db_->field($field)
->where($params)
->select();
}
} }
\ No newline at end of file
...@@ -298,6 +298,7 @@ Route::group('index', [ ...@@ -298,6 +298,7 @@ Route::group('index', [
'payCheckListAll' => ['index/Finance/payCheckList', ['method' => 'GET']],//收款开业审核-全部 'payCheckListAll' => ['index/Finance/payCheckList', ['method' => 'GET']],//收款开业审核-全部
'payCheckListDisc/:check_status' => ['index/Finance/payCheckList', ['method' => 'GET'], ['check_status' => 4]],//收款开业审核-总监 'payCheckListDisc/:check_status' => ['index/Finance/payCheckList', ['method' => 'GET'], ['check_status' => 4]],//收款开业审核-总监
'delPayCheck' => ['index/Finance/delPayCheck', ['method' => 'POST']],//删除收款开业审核 'delPayCheck' => ['index/Finance/delPayCheck', ['method' => 'POST']],//删除收款开业审核
'getPayCheckDetail' => ['index/Finance/getPayCheckDetail', ['method' => 'GET']],//开业审核详情
'performanceInfo' => ['index/PerformanceInfo/performanceInfo', ['method' => 'post|get']],//业绩明细 'performanceInfo' => ['index/PerformanceInfo/performanceInfo', ['method' => 'post|get']],//业绩明细
'getPerformanceInfoExcel' => ['index/PerformanceInfo/getPerformanceInfoExcel', ['method' => 'post|get']],//业绩明细 'getPerformanceInfoExcel' => ['index/PerformanceInfo/getPerformanceInfoExcel', ['method' => 'post|get']],//业绩明细
......
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