diff --git a/Application/Admin/Controller/FinancialSummaryController.class.php b/Application/Admin/Controller/FinancialSummaryController.class.php
new file mode 100644
index 000000000..14e43755b
--- /dev/null
+++ b/Application/Admin/Controller/FinancialSummaryController.class.php
@@ -0,0 +1,126 @@
+"现金充值收入",
+ "balance_coin_spend"=>"平台币充值收入",
+ "balance_coin_income"=>"平台币消耗",
+ "game_supersign_income"=>"超级签购买收入",
+ "test_user_income"=>"测试收入",
+ "reward_count"=>"奖励",
+ "fine_count"=>"违规处罚",
+ "inside_count"=>"内团",
+ "outer_count"=>"外团",
+ "inside_count"=>"内团",
+ "outer_count"=>"外团",
+ "gfwx_count"=>"官方-微信",
+ "gfzfb_count"=>"官方-支付宝",
+ "sqzfb_count"=>"双乾-支付宝",
+ "sqkj_count"=>"双乾-快捷",
+ "wx_count"=>"微信",
+ "zfb_count"=>"支付宝",
+ "kj_count"=>"快捷"
+ );
+ public function _initialize()
+ {
+ parent::_initialize();
+ // echo "
";
+ }
+ public function index($p=1)
+ {
+ if(!array_key_exists("year",$_REQUEST) || !array_key_exists("type",$_REQUEST)){
+ $this->redirect(ACTION_NAME, array('year' => date('Y',time()),"type"=>2));
+ }
+ $this->getYearList();
+ $this->getYearData();
+ $this->display();
+
+ }
+ //获取指定年份数据
+ public function getYearData()
+ {
+ $senddata = array(
+ "income"=>[
+ "count"=>[0,0,0,0,0,0,0,0,0,0,0,0,0]
+ ],
+ "promote"=>[
+ "count"=>[0,0,0,0,0,0,0,0,0,0,0,0,0]
+ ],
+ "channel"=>[
+ "count"=>[0,0,0,0,0,0,0,0,0,0,0,0,0]
+ ],
+ "payway"=>[
+ "count"=>[0,0,0,0,0,0,0,0,0,0,0,0,0]
+ ]
+ );
+ $data = [];
+ //初始化数据
+ foreach ($this->keyname as $k => $v) {
+ $data[$k] = array("name"=>$v,"money"=>[0,0,0,0,0,0,0,0,0,0,0,0,0]);
+ }
+ $map = array(
+ "count_year"=>$_REQUEST['year'],
+ "type"=>array("IN","1,{$_REQUEST['type']},4,5")
+ );
+ $dbres = M("FinancialSummary","tab_")->field("*")->where($map)->select();
+ foreach ($dbres as $k => $v) {
+ if($v['type'] == 1){
+ if(!in_array($v['key_name'],$senddata['income']['list'])){
+ $senddata['income']['list'][] = $v['key_name'];
+ }
+ }
+ if($v['type'] == 4){
+ if(!in_array($v['key_name'],$senddata['channel']['list'])){
+ $senddata['channel']['list'][] = $v['key_name'];
+ }
+ }
+ if($v['type'] == 5){
+ if(!in_array($v['key_name'],$senddata['payway']['list'])){
+ $senddata['payway']['list'][] = $v['key_name'];
+ }
+ }
+ if($v['type'] == $_REQUEST['type']){
+ if(!in_array($v['key_name'],$senddata['promote']['list'])){
+ $senddata['promote']['list'][] = $v['key_name'];
+ }
+ }
+ $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'){
+ foreach ($va as $key => $val) {
+ for ($i=0; $i < 12; $i++) {
+ $data[$val]["money"][12] += $data[$val]["money"][$i];
+ $senddata[$k]['count'][$i] += $data[$val]["money"][$i];
+ $senddata[$k]['count'][12] +=$data[$val]["money"][$i];
+ }
+ $senddata[$k][$ke][$key] = $data[$val];
+ }
+ }
+
+ }
+ }
+ $this->assign('data', $senddata);
+ }
+ //获取历史年份
+ public function getYearList()
+ {
+ $star = 2019;
+ $end = date("Y",time());
+ $list = [];
+ for ($i=$star; $i <= $end; $i++) {
+ $temp = array(
+ "value"=>$i,
+ "name"=>"{$i}年"
+ );
+ $list[] = $temp ;
+ }
+ $this->assign('YearList', $list);
+ }
+
+
+
+}
\ No newline at end of file
diff --git a/Application/Admin/View/FinancialSummary/index.html b/Application/Admin/View/FinancialSummary/index.html
new file mode 100644
index 000000000..a94577f7d
--- /dev/null
+++ b/Application/Admin/View/FinancialSummary/index.html
@@ -0,0 +1,442 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 按收入类型
+
+
+ 序号 | 流水类型 | 1月 | 2月 | 3月 | 4月 | 5月 | 6月 | 7月 | 8月 | 9月 | 10月 | 11月 | 12月 | 年度合计 |
+
+
+
+
+
+ {$incomekey} |
+ {$income.name} |
+
+ {$incomemoney} |
+
+
+
+
+ 合计: |
+
+ {$incomecount} |
+
+
+
+
+
+ 按合作方类型
+
+
+ 序号 | 流水类型 | 1月 | 2月 | 3月 | 4月 | 5月 | 6月 | 7月 | 8月 | 9月 | 10月 | 11月 | 12月 | 年度合计 |
+
+
+
+
+
+ {$promotekey} |
+ {$promote.name} |
+
+ {$promotemoney} |
+
+
+
+
+ 合计: |
+
+ {$promotecount} |
+
+
+
+
+
+ 按支付渠道类型
+
+
+ 序号 | 流水类型 | 1月 | 2月 | 3月 | 4月 | 5月 | 6月 | 7月 | 8月 | 9月 | 10月 | 11月 | 12月 | 年度合计 |
+
+
+
+
+
+ {$channelkey} |
+ {$channel.name} |
+
+ {$channelmoney} |
+
+
+
+
+ 合计: |
+
+ {$channelcount} |
+
+
+
+
+
+ 支付类型类型
+
+
+ 序号 | 流水类型 | 1月 | 2月 | 3月 | 4月 | 5月 | 6月 | 7月 | 8月 | 9月 | 10月 | 11月 | 12月 | 年度合计 |
+
+
+
+
+
+ {$paywaykey} |
+ {$payway.name} |
+
+ {$paywaymoney} |
+
+
+
+
+ 合计: |
+
+ {$paywaycount} |
+
+
+
+
+
+
+
+
+
+
+
+ if(C('COLOR_STYLE')=='blue_color') echo '
+ ';
+
+
+
+
+
+
+
+
\ No newline at end of file