Commit 0ab47d33 authored by hujun's avatar hujun

office

parent 878fafda
......@@ -830,7 +830,7 @@ class OfficeBargain extends Basic
if (!empty($where)) {
//获取被修改人信息
$m_agent = new AAgents();
$agent_data = $m_agent->agentBargainAll('a.id,a.store_id,a.district_id,b.create_time', $where);
$agent_data = $m_agent->agentBargainOfficeAll('a.id,a.store_id,a.district_id,b.create_time', $where);
foreach ($agent_data as $k=>$v) {
$create_time = date('Y-m-d', strtotime($v['create_time']));
$this->totalOfficialReceipts($v['id'], $v['district_id'], $v['store_id'], $create_time);
......
......@@ -1354,6 +1354,24 @@ class AAgents extends BaseModel
return $data;
}
/**
* @param $field
* @param $where
* @return array|false|\PDOStatement|string|\think\Model
*/
public function agentBargainOfficeAll($field, $where) {
try {
$data = $this->alias('a')
->field($field)
->join('office_o_bargain b', 'a.id = b.agent_id', 'left')
->where($where)
->select();
} catch (\Exception $e) {
$data = [];
}
return $data;
}
/**
* 获取绑定号码
*
......
......@@ -365,7 +365,7 @@ class ResultsSummaryOfficeTask
}
if (!empty($where)) {
//获取被修改人信息
$agent_data = $this->agentsModel->agentBargainAll('a.id,a.store_id,a.district_id,b.create_time', $where);
$agent_data = $this->agentsModel->agentBargainOfficeAll('a.id,a.store_id,a.district_id,b.create_time', $where);
foreach ($agent_data as $k => $v) {
$create_time = date('Y-m-d', strtotime($v['create_time']));
$this->totalOfficialReceipts($v['id'], $v['district_id'], $v['store_id'], $create_time);
......
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