Commit f6b69ed1 authored by zhuwei's avatar zhuwei

1

parent d5336ea0
......@@ -11,6 +11,7 @@ use app\model\CActivity;
use app\model\FApplyForFeeCheck;
use app\model\FStoreCost;
use app\model\FStoreCostExt;
use app\model\FStoreData;
use think\Request;
/**
......@@ -446,8 +447,8 @@ class CostDetail extends Basic
$conditions["b.district_id"] = $params["district_id"];
}
$field = 'a.store_id,b.district_id,c.district_name,b.store_name';
$m_store_cost = new FStoreCost();
$list = $m_store_cost->getAllStoreCost($field, $conditions);
$m_store_data = new FStoreData();
$list = $m_store_data->getAllStoreCost($field, $conditions);
$result["list"] = $list;
return $this->response("200", "success", $result);
}
......
......@@ -106,14 +106,5 @@ class FStoreCost extends BaseModel
->sum($field);
}
public function getAllStoreCost($field, $where)
{
$where['a.status'] = 0;
return $this->field($field)
->alias('a')
->join('a_store b', 'a.store_id=b.id', 'left')
->join('a_district c', 'b.district_id=c.id', 'left')
->where($where)
->select();
}
}
......@@ -126,4 +126,15 @@ class FStoreData extends BaseModel
{
return $this->where($where)->sum($field);
}
public function getAllStoreCost($field, $where)
{
$where['a.status'] = 0;
return $this->field($field)
->alias('a')
->join('a_store b', 'a.store_id=b.id', 'left')
->join('a_district c', 'b.district_id=c.id', 'left')
->where($where)
->select();
}
}
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