Commit a25cd455 authored by hujun's avatar hujun

id

parent ecda759e
......@@ -63,7 +63,7 @@ class Cost extends Basic
$where = $this->buildWhere($this->params);
$field = 'a.id,a.count_time,a.source,a.type,a.create_time,a.agent_id,a.total_fee,a.fee_item,a.purpose,a.status,';
$field .= 'b.name as agent_name,a.site_id';
$field .= 'b.name as agent_name,a.site_id,a.payee_agent_id';
$cost_service = new CostService();
if (empty($this->params['excel'])) {
......@@ -73,9 +73,17 @@ class Cost extends Basic
$order = 'a.ID DESC';
}
$list = $this->fee_model->getJoinAgentList($pageNo, $pageSize, $order, $field, $where);
$s_redis = new RedisCacheService();
foreach($list as $k=>$v) {
$list[$k]['type_name'] = $cost_service->getFeeType($v['type']);
$list[$k]['fee_item_name'] = $cost_service->getFeeItem($v['fee_item']);
if (empty($v['payee_agent_id'])) {
$list[$k]['payee_agent_name'] = '';
} else {
$agent_data= $s_redis->getRedisCache(2, $v['payee_agent_id']);
$list[$k]['payee_agent_name'] = $agent_data['name'];
}
}
$data['list'] = $list;
$data['total'] = $this->fee_model->getJoinAgentListTotal($where);
......@@ -334,10 +342,22 @@ class Cost extends Basic
{
$code = 101;
$params = $this->params;
$params = &$this->params;
if (empty($params['id'] && empty($params['id_array']))) {
return $this->response($code, '参数错误');
}
if (isset($params['id_array'])) {
if (empty($params['id_array'])) {
return $this->response($code, '参数错误');
}
}
if (isset($params['id'])) {
if (empty($params['id'])) {
return $this->response($code, '参数错误');
}
}
switch($params['check_status']) {
case 1 :
......
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