Commit 72a90c2a authored by zhuwei's avatar zhuwei

业绩修改,今天业绩

parent d64894e9
...@@ -2,12 +2,9 @@ ...@@ -2,12 +2,9 @@
namespace app\index\service; namespace app\index\service;
use app\model\AAgents; use app\model\AAgents;
use app\model\ASuperviseModel;
use app\model\GHouses; use app\model\GHouses;
use app\model\GHousesImgs;
use app\model\OBargainModel; use app\model\OBargainModel;
use app\model\OMarchInModel; use app\model\OMarchInModel;
use app\model\OPayLogModel;
use app\model\OReportModel; use app\model\OReportModel;
use app\model\TAgentTotalModel; use app\model\TAgentTotalModel;
use app\model\Users; use app\model\Users;
...@@ -30,24 +27,17 @@ class PerformanceService ...@@ -30,24 +27,17 @@ class PerformanceService
private $bargainModel; private $bargainModel;
private $reportModel; private $reportModel;
private $marchInModel; private $marchInModel;
private $payLogModel;
private $gHousesImgModel;
private $superviseModel;
public function __construct() public function __construct()
{ {
$this->totalModel = new TAgentTotalModel(); $this->totalModel = new TAgentTotalModel();
$this->agentModel = new AAgents(); $this->agentModel = new AAgents();
// $this->agentsModel = new AAgents(); $this->houseModel = new GHouses();
// $this->tAgentTotalModel = new TAgentTotalModel(); $this->userModel = new Users();
// $this->houseModel = new GHouses(); $this->bargainModel = new OBargainModel();
// $this->userModel = new Users(); $this->reportModel = new OReportModel();
// $this->bargainModel = new OBargainModel(); $this->marchInModel = new OMarchInModel();
// $this->reportModel = new OReportModel();
// $this->marchInModel = new OMarchInModel();
// $this->payLogModel = new OPayLogModel();
// $this->gHousesImgModel = new GHousesImgs();
// $this->superviseModel = new ASuperviseModel();
} }
...@@ -112,7 +102,8 @@ class PerformanceService ...@@ -112,7 +102,8 @@ class PerformanceService
//$where_["district_id"] = $district_id; //$where_["district_id"] = $district_id;
$where_["agent_id"] = $value["agent_id"]; $where_["agent_id"] = $value["agent_id"];
$where_['create_time'] = array( 'between', array( $time . " 04:00:00", $time . " 23:59:59" ) ); $where_['create_time'] = array( 'between', array( $time . " 04:00:00", $time . " 23:59:59" ) );
$obargain = new OBargainModel(); // $obargain = new OBargainModel();
$obargain = new OBargainModel();
$performanceSum = $obargain->getAddBargainNum($where_, 1);//1表示业绩 2表示实收 $performanceSum = $obargain->getAddBargainNum($where_, 1);//1表示业绩 2表示实收
$value["performance_total"] = isset($performanceSum[0]["num"]) ? $performanceSum[0]["num"] : 0; $value["performance_total"] = isset($performanceSum[0]["num"]) ? $performanceSum[0]["num"] : 0;
......
...@@ -139,7 +139,7 @@ class OMarchInModel extends Model ...@@ -139,7 +139,7 @@ class OMarchInModel extends Model
->join("o_order b", "a.order_id = b.id", "left") ->join("o_order b", "a.order_id = b.id", "left")
->where($where_) ->where($where_)
->select(); ->select();
dump($this->getLastSql($return)); //dump($this->getLastSql($return));
return $return; return $return;
} }
......
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