Merge branch 'fix/change_statement_time' of wmtx/platform into release

master
陈志 5 years ago committed by Gogs
commit 890499ce59

@ -593,8 +593,10 @@ class CompanyStatementController extends ThinkController
$StatementInfo = M("company_statement_info","tab_");
$company_info = $va['company_info'];
$LackStatement = M("company_lack_statement_info","tab_");
$no_pool_money = 300;
//统一比例字段
if($k == "up" || $k=="ups"){
$no_pool_money = 500;
foreach ($va['statement_info'] as $key => &$value) {
if($company_info['pay_type'] == 2){
$value["ratio"] = $value["second_ratio"];
@ -614,7 +616,7 @@ class CompanyStatementController extends ThinkController
}
//创建基础未满基础信息
if($va['statement_money'] < 300){
if($va['statement_money'] < $no_pool_money){
$lackcompany =[
"company_id"=>$company_info['id'],
"company_type"=>$v['company_type'],
@ -649,8 +651,8 @@ class CompanyStatementController extends ThinkController
array_multisort($last_names,SORT_DESC,SORT_STRING,$va['statement_info']);
}
}
if($va['statement_money'] < 300){
//依旧小于300存旧版
if($va['statement_money'] < $no_pool_money){
//依旧小于不结算金额存旧版
if($lackcompany['pay_amount'] > 0){
$lask_id = $LackStatement->add($lackcompany);
$v['create_lack_ids'][] =$lask_id;

@ -14,16 +14,6 @@ class FinancialSummaryController extends AdminController
"outer_count"=>"外团",
"outer_branch_count"=>"外团-分发",
"other_group_count"=>"无归属团",
// "inside_count"=>"内团",
// "outer_count"=>"外团",
"gfwx_count"=>"官方-微信",
"gfzfb_count"=>"官方-支付宝",
"sqzfb_count"=>"双乾-支付宝",
"sqkj_count"=>"双乾-快捷",
"wx_count"=>"微信",
"zfb_count"=>"支付宝",
"kj_count"=>"快捷",
"ybzf_count"=>"易宝支付",
);
public function _initialize()
{
@ -43,6 +33,9 @@ class FinancialSummaryController extends AdminController
//获取指定年份数据
public function getYearData()
{
$Channel = D("PaymentMerchant")->Channel;
$Ways = D("PaymentMerchant")->Ways;
$senddata = array(
"income"=>[
"count"=>['0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00']
@ -65,10 +58,16 @@ class FinancialSummaryController extends AdminController
//将商户插入到默认数组中
foreach ($merchant_data as $key => $value) {
$identifier = (string)$value['identifier'];
$this->keyname[$identifier] = $value['name'];
}
//其他信息插入默认
foreach ($Channel as $key => $value) {
$this->keyname["c".$key] = $value;
}
foreach ($Ways as $key => $value) {
$this->keyname["w".$key] = $value;
}
$data = [];
//初始化数据
@ -110,7 +109,6 @@ class FinancialSummaryController extends AdminController
$data[$v['key_name']]["money"][((int)$v['count_month']-1)] = $v['sum_money'];
# code...
}
foreach ($senddata as $k => $v) {
foreach ($v as $ke => $va) {
if($ke !='count'){
@ -127,7 +125,6 @@ class FinancialSummaryController extends AdminController
}
ksort($senddata[$k]['count']);
}
$this->assign('data', $senddata);
}
//获取历史年份

@ -21,7 +21,8 @@ class FinancialSummarySetController extends \Think\Controller
//初始化
$this->beginThismonth = mktime(0,0,0,date('m')-1,1,date('Y'));
$this->endThismonth = mktime(0,0,0,date('m'),1,date('Y'))-1;
$temp = strtotime(date('Y-m-01 00:00:00',strtotime('-1 month')));
$temp = strtotime(date('Y',time()).'-'.(date('m',time())-1).'-01');
$this->year= date('Y',$temp);
$this->month= date('m',$temp);
$this->date = $this->year."-".$this->month;
@ -32,7 +33,7 @@ class FinancialSummarySetController extends \Think\Controller
$this->SpendModel = M("Spend",'tab_');
$this->GameSupersignModel = M("GameSupersign",'tab_');
$this->CoinPayOrderModel = M("CoinPayOrder",'tab_');//会长充值平台币表
$this->TestOrderModel = M("TestOrder",'tab_');//测试订单录入
}
/**
@ -52,6 +53,7 @@ class FinancialSummarySetController extends \Think\Controller
$this->month= $tarry[1];
$this->beginThismonth=mktime(0,0,0,$tarry[1],1,$tarry[0]);
$this->endThismonth=mktime(0,0,0,$tarry[1]-0+1,1,$tarry[0])-1;
$this->reCount();
$this->setFinancialSummary();
}
@ -85,16 +87,23 @@ class FinancialSummarySetController extends \Think\Controller
if($countRes > 0){
die("error:Repeated statistics,msg:{$this->date}已经聚合过");
}
//按收入类型
echo "{$this->date}开始统计".PHP_EOL;
echo "--收入类型统计中".PHP_EOL;
$this->setIncomeMoney();
//按合作方类型
echo "--合作方类型统计中".PHP_EOL;
$this->setPromoteMoney();
//支付渠道/支付类型
$this->setPayWayMoney();
//按支付商户
//
echo "--支付渠道统计中".PHP_EOL;
$this->setChannelMoney();
echo "--支付类型统计中".PHP_EOL;
$this->setPaywayMoney();
echo "--支付商户统计中".PHP_EOL;
$this->setMerchantMoney();
//存入数据
echo "--数据保存".PHP_EOL;
$this->addDb();
$t2 = microtime(true);
@ -116,7 +125,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
@ -145,7 +154,7 @@ class FinancialSummarySetController extends \Think\Controller
"sort"=>3,
);
$map = array(
"create_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)),
"payed_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)),
"pay_status"=>1
);
$temparr['sum_money'] = $this->DepositModel->field("IFNULL(sum(pay_amount),0) pay_amount")->where($map)->find()['pay_amount'];
@ -190,7 +199,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)
);
@ -201,24 +210,31 @@ class FinancialSummarySetController extends \Think\Controller
->find()['pay_amount'];
//获取平台币充值
$map1 = array(
"create_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)),
"payed_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)),
"pay_status"=>1
);
if($testlist) $map1['user_id']=array("in",$testlist);
$deposit = $this->DepositModel->field("IFNULL(sum(pay_amount),0) pay_amount")->where($map1)->find()['pay_amount'];
$temparr['sum_money'] = number_format(($cash_spend*100+$deposit*100)/100, 2, '.', '');
//测试订单录入
$map2 = array(
"pay_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth))
);
$test_pay_amount = $this->TestOrderModel->where($map2)->field("IFNULL(sum(pay_amount),0) pay_amount")->find()['pay_amount'];
$temparr['sum_money'] = number_format(($cash_spend*100 + $deposit*100 + $test_pay_amount*100 )/100, 2, '.', '');
$this->adddata[]=$temparr;
}
//奖罚收入
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 +258,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
@ -326,159 +342,174 @@ class FinancialSummarySetController extends \Think\Controller
"sum_money"=>number_format($other_group_nobind_count/100, 2, '.', '')
);
}
/**
* 获取类型为4,5的数据/按支付渠道类型,支付类型类型
*/
public function setPayWayMoney()
{
$moneyarry=[
"wx"=>0,
"zfb"=>0,
"gfzfb"=>0,
"sqzfb"=>0,
"sqkj"=>0,
"ybzf"=>0,
];
$this->getSpendPayWay($moneyarry);
$this->getGameSupersignPayWay($moneyarry);
$this->getDepositPayWay($moneyarry);
$this->getCoinPayOrderPayWay($moneyarry);
//统计数据
$moneyarry['zfb'] = ($moneyarry['gfzfb']-0+$moneyarry['sqzfb']);
$this->adddata[] = array(
"key_name"=>'gfwx_count',
"type"=>4,"sort"=>1,
"sum_money"=>number_format($moneyarry['wx']/100, 2, '.', '')
);
$this->adddata[] = array(
"key_name"=>'gfzfb_count',
"type"=>4,"sort"=>2,
"sum_money"=>number_format($moneyarry['gfzfb']/100, 2, '.', '')
);
$this->adddata[] = array(
"key_name"=>'sqzfb_count',
"type"=>4,"sort"=>3,
"sum_money"=>number_format($moneyarry['sqzfb']/100, 2, '.', '')
);
$this->adddata[] = array(
"key_name"=>'sqkj_count',
"type"=>4,"sort"=>4,
"sum_money"=>number_format($moneyarry['sqkj']/100, 2, '.', '')
);
$this->adddata[] = array(
"key_name"=>'wx_count',
"type"=>5,"sort"=>1,
"sum_money"=>number_format($moneyarry['wx']/100, 2, '.', '')
);
$this->adddata[] = array(
"key_name"=>'zfb_count',
"type"=>5,"sort"=>2,
"sum_money"=>number_format($moneyarry['zfb']/100, 2, '.', '')
);
$this->adddata[] = array(
"key_name"=>'kj_count',
"type"=>5,"sort"=>3,
"sum_money"=>number_format($moneyarry['sqkj']/100, 2, '.', '')
);
$this->adddata[] = array(
"key_name"=>'ybzf_count',
"type"=>4,"sort"=>5,
"sum_money"=>number_format($moneyarry['ybzf']/100, 2, '.', '')
);
$this->adddata[] = array(
"key_name"=>'ybzf_count',
"type"=>5,"sort"=>4,
"sum_money"=>number_format($moneyarry['ybzf']/100, 2, '.', '')
);
echo 'success';
public function setChannelMoney(){
$Channel = $this->getChannelCount($Channel);
foreach( $Channel as $k=>$v){
$this->adddata[] = array(
"key_name"=>$k,
"type"=>4,
"sort"=>$k,
"sum_money"=>number_format($v, 2, '.', '')
);
}
}
//获取spend表
protected function getSpendPayWay(&$moneyarry){
//获取Channel
protected function getChannelCount(){
$map = array(
"pay_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)),
"pay_status"=>1,
"pay_way"=>array("IN","1,2,3,9,15,17")
"s.payed_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)),
"s.pay_status"=>1,
"s.merchant_id"=>["GT","0"]
);
$dbres=$this->SpendModel
->field("
IFNULL(SUM(CASE WHEN pay_way = 2 THEN pay_amount ELSE 0 END),0) as wxsm_count,
IFNULL(SUM(CASE WHEN pay_way = 3 THEN pay_amount ELSE 0 END),0) as wxapp_count,
IFNULL(SUM(CASE WHEN pay_way = 1 THEN pay_amount ELSE 0 END),0) as zfbgf_count,
IFNULL(SUM(CASE WHEN pay_way = 9 THEN pay_amount ELSE 0 END),0) as zfbsq_count,
IFNULL(SUM(CASE WHEN pay_way = 15 THEN pay_amount ELSE 0 END),0) as kjsq_count,
IFNULL(SUM(CASE WHEN pay_way = 17 THEN pay_amount ELSE 0 END),0) as ybzf_count
")
$spres=$this->SpendModel
->alias("s")
->field("SUM(s.pay_amount) pay_amount,p.channel")
->where($map)
->find();
$moneyarry['wx'] += ($dbres['wxsm_count']*100+$dbres['wxapp_count']*100);
$moneyarry['gfzfb'] += $dbres['zfbgf_count']*100;
$moneyarry['sqzfb'] += $dbres['zfbsq_count']*100;
$moneyarry['sqkj'] += $dbres['kjsq_count']*100;
$moneyarry['ybzf'] += $dbres['ybzf_count']*100;
->group("p.channel")
->join("left join tab_payment_merchant p ON p.id = s.merchant_id")
->select();
//超级签
$ss_map = [
"s.pay_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)),
"s.pay_status"=>1
];
$ssres=$this->GameSupersignModel
->alias("s")
->field("SUM(s.pay_price) pay_amount,p.channel")
->join("left join tab_payment_merchant p ON p.id = s.merchant_id")
->group("p.channel")
->where($ss_map)
->select();
//玩家购买平台币
$dp_map =[
"s.payed_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)),
"s.pay_status"=>1
];
$dpres=$this->DepositModel
->alias("s")
->field("SUM(s.pay_amount) pay_amount,p.channel")
->join("left join tab_payment_merchant p ON p.id = s.merchant_id")
->group("p.channel")
->where($dp_map)
->select();
//会长充值平台币
$co_map =[
"s.pay_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)),
"s.order_status"=>array("EGT",1)
];
$cores=$this->CoinPayOrderModel
->alias("s")
->field("SUM(s.pay_amount) pay_amount,p.channel")
->join("left join tab_payment_merchant p ON p.id = s.merchant_id")
->group("p.channel")
->where($co_map)
->select();
//测试的订单
$to_map =[
"s.pay_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)),
"s.merchant_id"=>["GT","0"]
];
$tores=$this->TestOrderModel
->alias("s")
->field("SUM(s.pay_amount) pay_amount,p.channel")
->join("left join tab_payment_merchant p ON p.id = s.merchant_id")
->group("p.channel")
->where($to_map)
->select();
$dbres = array_merge($spres,$ssres,$dpres,$cores,$tores);
$Channel = [];
foreach ($dbres as $k=>$v){
$Channel["c".$v['channel']] += $v['pay_amount'];
}
return $Channel;
}
//获取超级签购买
protected function getGameSupersignPayWay(&$moneyarry)
{
$map = array(
"pay_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)),
"pay_status"=>1
);
$dbres=$this->GameSupersignModel
->field("
IFNULL(SUM(CASE WHEN pay_way = 2 THEN pay_price ELSE 0 END),0) as wx_count,
IFNULL(SUM(CASE WHEN pay_way = 1 THEN pay_price ELSE 0 END),0) as zfb_count,
IFNULL(SUM(CASE WHEN pay_way = 17 THEN pay_price ELSE 0 END),0) as ybzf_count
")
->where($map)
->find();
$moneyarry['wx'] += $dbres['wx_count']*100;
$moneyarry['gfzfb'] += $dbres['zfb_count']*100;
$moneyarry['ybzf'] += $dbres['ybzf_count']*100;
public function setPaywayMoney(){
$Ways = $this->getPaywayCount();
foreach($Ways as $k=>$v){
$this->adddata[] = array(
"key_name"=>$k,
"type"=>5,
"sort"=>$k,
"sum_money"=>number_format($v, 2, '.', '')
);
}
}
//玩家购买平台币
protected function getDepositPayWay(&$moneyarry)
{
//获取Channel
protected function getPaywayCount(){
$map = array(
"create_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)),
"pay_status"=>1,
"pay_way"=>array("IN","1,2,3,9,15,17")
"s.payed_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)),
"s.pay_status"=>1,
"s.merchant_id"=>["GT","0"]
);
$dbres=$this->DepositModel
->field("
IFNULL(SUM(CASE WHEN pay_way = 2 THEN pay_amount ELSE 0 END),0) as wxsm_count,
IFNULL(SUM(CASE WHEN pay_way = 3 THEN pay_amount ELSE 0 END),0) as wxapp_count,
IFNULL(SUM(CASE WHEN pay_way = 1 THEN pay_amount ELSE 0 END),0) as zfbgf_count,
IFNULL(SUM(CASE WHEN pay_way = 9 THEN pay_amount ELSE 0 END),0) as zfbsq_count,
IFNULL(SUM(CASE WHEN pay_way = 15 THEN pay_amount ELSE 0 END),0) as kjsq_count,
IFNULL(SUM(CASE WHEN pay_way = 17 THEN pay_amount ELSE 0 END),0) as ybzf_count
")
$spres=$this->SpendModel
->alias("s")
->field("SUM(s.pay_amount) pay_amount,s.merchant_way")
->where($map)
->find();
$moneyarry['wx'] += ($dbres['wxsm_count']*100+$dbres['wxapp_count']*100);
$moneyarry['gfzfb'] += $dbres['zfbgf_count']*100;
$moneyarry['sqzfb'] += $dbres['zfbsq_count']*100;
$moneyarry['sqkj'] += $dbres['kjsq_count']*100;
$moneyarry['ybzf'] += $dbres['ybzf_count']*100;
}
//会长充值平台币
protected function getCoinPayOrderPayWay(&$moneyarry)
{
$map= array(
"pay_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)),
"order_status"=>array("EGT",1)
);
$dbres= $this->CoinPayOrderModel
->field("
IFNULL(SUM(CASE WHEN pay_way = 2 THEN pay_amount ELSE 0 END),0) as wx_count,
IFNULL(SUM(CASE WHEN pay_way = 1 THEN pay_amount ELSE 0 END),0) as zfb_count,
IFNULL(SUM(CASE WHEN pay_way = 17 THEN pay_amount ELSE 0 END),0) as ybzf_count
")
->where($map)
->find();
$moneyarry['wx'] += $dbres['wx_count']*100;
$moneyarry['gfzfb'] += $dbres['zfb_count']*100;
$moneyarry['ybzf'] += $dbres['ybzf_count']*100;
->group("s.merchant_way")
->select();
//超级签
$ss_map = [
"s.pay_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)),
"s.pay_status"=>1
];
$ssres=$this->GameSupersignModel
->alias("s")
->field("SUM(s.pay_price) pay_amount,s.merchant_way")
->group("s.merchant_way")
->where($ss_map)
->select();
//玩家购买平台币
$dp_map =[
"s.payed_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)),
"s.pay_status"=>1
];
$dpres=$this->DepositModel
->alias("s")
->field("SUM(s.pay_amount) pay_amount,s.merchant_way")
->group("s.merchant_way")
->where($dp_map)
->select();
//会长充值平台币
$co_map =[
"s.pay_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)),
"s.order_status"=>array("EGT",1)
];
$cores=$this->CoinPayOrderModel
->alias("s")
->field("SUM(s.pay_amount) pay_amount,s.merchant_way")
->group("s.merchant_way")
->where($co_map)
->select();
//测试的订单
$to_map =[
"s.pay_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)),
"s.merchant_id"=>["GT","0"]
];
$tores=$this->TestOrderModel
->alias("s")
->field("SUM(s.pay_amount) pay_amount,s.merchant_way")
->group("s.merchant_way")
->where($to_map)
->select();
$dbres = array_merge($spres,$ssres,$dpres,$cores,$tores);
$Ways = [];
foreach ($dbres as $k=>$v){
$Ways["w".$v['merchant_way']] += $v['pay_amount'];
}
return $Ways;
}
public function addDb()
{
foreach ($this->adddata as $k=> &$v) {
@ -513,13 +544,13 @@ class FinancialSummarySetController extends \Think\Controller
->select(false);
//平台币充值金额计算
$coinData = M('pay_info','tab_')
->join("inner join tab_deposit on tab_pay_info.order_id=tab_deposit.pay_order_number")
->join("left join tab_test_white_list on tab_test_white_list.user_id=tab_pay_info.user_id")
$coinData = M('deposit','tab_')
// ->join("inner join tab_deposit on tab_pay_info.order_id=tab_deposit.pay_order_number")
->join("left join tab_test_white_list on tab_test_white_list.user_id=tab_deposit.user_id")
->join("left join tab_payment_merchant merchant on merchant.id=tab_deposit.merchant_id")
->field("0 cash_amount,SUM(CASE WHEN merchant.id is not null and tab_test_white_list.user_id is not null THEN pay_amount ELSE 0 END) as test_amount,
SUM(CASE WHEN merchant.id is not null and tab_test_white_list.user_id is null and pay_source=0 THEN pay_amount ELSE 0 END) as coin_amount,
0 offcial_amount,0 spread_amount,0 supersign_amount,0 test_order_amount,merchant_id,name,channel,identifier,payed_time,game_id,main_name,merchant_way,merchant.account")
->field("0 cash_amount,SUM(CASE WHEN merchant.id is not null and pay_source=2 and tab_test_white_list.user_id is not null THEN pay_amount ELSE 0 END) as test_amount,
SUM(CASE WHEN merchant.id is not null and tab_test_white_list.user_id is null and pay_source=2 THEN pay_amount ELSE 0 END) as coin_amount,
0 offcial_amount,0 spread_amount,0 supersign_amount,0 test_order_amount,merchant_id,name,channel,identifier,payed_time,0 game_id,main_name,merchant_way,merchant.account")
->where(['pay_status'=>1,'tab_deposit.pay_way'=>['egt',1],'merchant.status'=>1,'merchant.type'=>1])
->where($map)
->group("merchant_id")
@ -528,8 +559,8 @@ class FinancialSummarySetController extends \Think\Controller
$officalData = M('deposit','tab_')
->join("left join tab_test_white_list on tab_test_white_list.user_id=tab_deposit.user_id")
->join("left join tab_payment_merchant merchant on merchant.id=tab_deposit.merchant_id")
->field("0 cash_amount,SUM(CASE WHEN merchant.id is not null and tab_test_white_list.user_id is not null THEN pay_amount ELSE 0 END) as test_amount,
0 as coin_amount,SUM(CASE WHEN merchant.id is not null and tab_test_white_list.user_id is null and pay_source=2 THEN pay_amount ELSE 0 END) as offcial_amount,
->field("0 cash_amount,SUM(CASE WHEN merchant.id is not null and pay_source=0 and tab_test_white_list.user_id is not null THEN pay_amount ELSE 0 END) as test_amount,
0 as coin_amount,SUM(CASE WHEN merchant.id is not null and tab_test_white_list.user_id is null and pay_source=0 THEN pay_amount ELSE 0 END) as offcial_amount,
0 spread_amount,0 supersign_amount,0 test_order_amount,merchant_id,name,channel,identifier,payed_time,0 as game_id,main_name,merchant_way,merchant.account")
->where(['pay_status'=>1,'tab_deposit.pay_way'=>['egt',1],'merchant.status'=>1,'merchant.type'=>1])
->where($map)

@ -0,0 +1,23 @@
<?php
namespace Admin\Model;
use Think\Model;
class PaymentMerchantModel extends Model
{
protected $tablePrefix = 'tab_';
public $Ways=[
"1"=>"支付宝",
"2"=>"微信",
"4"=>"快捷支付"
];
public $Channel=[
"1"=>"支付宝",
"2"=>"微信",
"3"=>"易宝支付",
"4"=>"双乾支付",
"5"=>"汇付宝支付"
];
}

@ -174,7 +174,7 @@
</tbody>
</table>
<table style="margin-top: 30px;">
<caption class="" style="text-align: left;font-size: 20px;font-weight: 600;">照支付类型</caption>
<caption class="" style="text-align: left;font-size: 20px;font-weight: 600;">支付渠道</caption>
<thead>
<tr>
<th>序号</th><th>流水类型</th><th>1月</th><th>2月</th><th>3月</th><th>4月</th><th>5月</th><th>6月</th><th>7月</th><th>8月</th><th>9月</th><th>10月</th><th>11月</th><th>12月</th><th>年度合计</th>
@ -199,7 +199,7 @@
</tbody>
</table>
<table style="margin-top: 30px;">
<caption class="" style="text-align: left;font-size: 20px;font-weight: 600;">支付类型类型</caption>
<caption class="" style="text-align: left;font-size: 20px;font-weight: 600;">支付类型</caption>
<thead>
<tr>
<th>序号</th><th>流水类型</th><th>1月</th><th>2月</th><th>3月</th><th>4月</th><th>5月</th><th>6月</th><th>7月</th><th>8月</th><th>9月</th><th>10月</th><th>11月</th><th>12月</th><th>年度合计</th>
@ -224,7 +224,7 @@
</tbody>
</table>
<table style="margin-top: 30px;">
<caption class="" style="text-align: left;font-size: 20px;font-weight: 600;">支付商户类型</caption>
<caption class="" style="text-align: left;font-size: 20px;font-weight: 600;">支付商户</caption>
<thead>
<tr>
<th>序号</th><th>流水类型</th><th>1月</th><th>2月</th><th>3月</th><th>4月</th><th>5月</th><th>6月</th><th>7月</th><th>8月</th><th>9月</th><th>10月</th><th>11月</th><th>12月</th><th>年度合计</th>

@ -258,9 +258,7 @@ class ExcelPaymentController extends BaseController
$val['ratio'] = $val['ratio']*100;
$val['increment_ratio'] = $val['increment_ratio']*100;
if($is_export){
//J3*(K3+L3)+M3-N3
$val['sum_money'] = "=J{$line}*(K{$line}+L{$line})+M{$line}-N{$line}";
// $val['sum_money'] = "=J{$line}*(K{$line}+L{$line})+M{$line}-N{$line}";
}else{
$count['platform_amount'] += $val['pay_amount'];
$count['sum_money'] += $val['sum_money'];

Loading…
Cancel
Save