|
|
|
@ -116,7 +116,7 @@ class FinancialSummarySetController extends \Think\Controller
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
$map = array(
|
|
|
|
|
"pay_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)),
|
|
|
|
|
"payed_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)),
|
|
|
|
|
"pay_status"=>1
|
|
|
|
|
);
|
|
|
|
|
$res = $this->SpendModel
|
|
|
|
@ -190,7 +190,7 @@ class FinancialSummarySetController extends \Think\Controller
|
|
|
|
|
}
|
|
|
|
|
//获取现金充值
|
|
|
|
|
$map = array(
|
|
|
|
|
"pay_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)),
|
|
|
|
|
"payed_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)),
|
|
|
|
|
"pay_status"=>1,
|
|
|
|
|
"pay_way"=>array("GT",0)
|
|
|
|
|
);
|
|
|
|
@ -213,12 +213,12 @@ class FinancialSummarySetController extends \Think\Controller
|
|
|
|
|
protected function getRewardRecordIncome()
|
|
|
|
|
{
|
|
|
|
|
$map = array(
|
|
|
|
|
"reward_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)),
|
|
|
|
|
"confirm_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)),
|
|
|
|
|
);
|
|
|
|
|
$rrres = M("RewardRecord","tab_")
|
|
|
|
|
$rrres = M("RewardDetail","tab_")
|
|
|
|
|
->field("
|
|
|
|
|
IFNULL(SUM(CASE WHEN reward_type = 1 THEN money ELSE 0 END),0) as reward_count,
|
|
|
|
|
IFNULL(SUM(CASE WHEN reward_type = 2 THEN money ELSE 0 END),0) as fine_count
|
|
|
|
|
IFNULL(SUM(CASE WHEN type = 1 THEN amount ELSE 0 END),0) as reward_count,
|
|
|
|
|
IFNULL(SUM(CASE WHEN type = 2 THEN amount ELSE 0 END),0) as fine_count
|
|
|
|
|
")
|
|
|
|
|
->where($map)
|
|
|
|
|
->find();
|
|
|
|
@ -242,7 +242,7 @@ class FinancialSummarySetController extends \Think\Controller
|
|
|
|
|
public function setPromoteMoney()
|
|
|
|
|
{
|
|
|
|
|
$map = array(
|
|
|
|
|
"pay_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)),
|
|
|
|
|
"payed_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)),
|
|
|
|
|
"pay_status"=>1
|
|
|
|
|
);
|
|
|
|
|
$res = $this->SpendModel
|
|
|
|
@ -395,7 +395,7 @@ class FinancialSummarySetController extends \Think\Controller
|
|
|
|
|
//获取spend表
|
|
|
|
|
protected function getSpendPayWay(&$moneyarry){
|
|
|
|
|
$map = array(
|
|
|
|
|
"pay_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)),
|
|
|
|
|
"payed_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)),
|
|
|
|
|
"pay_status"=>1,
|
|
|
|
|
"pay_way"=>array("IN","1,2,3,9,15,17")
|
|
|
|
|
);
|
|
|
|
|