Commit 964facd1 authored by hujun's avatar hujun

办公室名

parent d1156ff6
...@@ -13,6 +13,7 @@ use app\api_broker\extend\Basic; ...@@ -13,6 +13,7 @@ use app\api_broker\extend\Basic;
use app\api_broker\service\RedisCacheService; use app\api_broker\service\RedisCacheService;
use app\api_broker\service\VipService; use app\api_broker\service\VipService;
use app\index\service\CostService; use app\index\service\CostService;
use app\model\AStore;
use app\model\FApplyForFee; use app\model\FApplyForFee;
use app\model\FApplyForFeeCheck; use app\model\FApplyForFeeCheck;
use app\model\FImg; use app\model\FImg;
...@@ -65,11 +66,12 @@ class ApplyForCost extends Basic ...@@ -65,11 +66,12 @@ class ApplyForCost extends Basic
} }
$field = 'a.id,a.count_time,a.source,a.type,a.create_time,a.agent_id,a.total_fee,a.fee_item,a.purpose,'; $field = 'a.id,a.count_time,a.source,a.type,a.create_time,a.agent_id,a.total_fee,a.fee_item,a.purpose,';
$field .= 'b.name as agent_name,a.card_name,a.bank,a.card_no,a.source'; $field .= 'b.name as agent_name,a.card_name,a.bank,a.card_no,a.source,a.store_id';
$fee_model = new FApplyForFee(); $fee_model = new FApplyForFee();
$cost_service = new CostService(); $cost_service = new CostService();
$m_img = new FImg(); $m_img = new FImg();
$m_check = new FApplyForFeeCheck(); $m_check = new FApplyForFeeCheck();
$m_store = new AStore();
$list = $fee_model->getJoinAgentList($pageNo, $pageSize, 'a.ID DESC', $field, $where); $list = $fee_model->getJoinAgentList($pageNo, $pageSize, 'a.ID DESC', $field, $where);
$source = [ $source = [
...@@ -97,11 +99,12 @@ class ApplyForCost extends Basic ...@@ -97,11 +99,12 @@ class ApplyForCost extends Basic
]; ];
} }
} }
$office_name = $m_store->getStoreCost('b.office_name', ['a.id'=>$v['store_id']]);
$list[$k]['office_name'] = empty($office_name['office_name']) ? '':$office_name['office_name'];
$list[$k]['image_array'] = $image_array; $list[$k]['image_array'] = $image_array;
$list[$k]['check_image_array'] = $check_image_array; $list[$k]['check_image_array'] = $check_image_array;
$list[$k]['check_list'] = $m_check->findByAll('a.remark,a.create_time,b.name as agent_name',['apply_for_id'=>$v['id']]); $list[$k]['check_list'] = $m_check->findByAll('a.remark,a.create_time,b.name as agent_name',['apply_for_id'=>$v['id']]);
$list[$k]['image_base_url'] = ''; $list[$k]['image_base_url'] = ROOT_PATH . 'public/static/chat_image/';
} }
return $this->response(200, '', $list); return $this->response(200, '', $list);
} }
......
...@@ -404,4 +404,21 @@ class AStore extends BaseModel ...@@ -404,4 +404,21 @@ class AStore extends BaseModel
->count(); ->count();
return $result; return $result;
} }
/**
* @param $field
* @param $params
* @return array|false|\PDOStatement|string|\think\Model
*/
public function getStoreCost($field,$params)
{
$params["a.status"] = 0;
$result = Db::table($this->table)
->field($field)
->alias('a')
->join('f_office b', 'a.office_id = b.id', 'left')
->where($params)
->find();
return $result;
}
} }
\ No newline at end of file
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