@ -255,8 +255,8 @@ class CompanyStatementSetController extends Controller {
$GameDb = M("Game","tab_");
$GameDb = M("Game","tab_");
$StatementDb = M("CompanyStatement","tab_");
$StatementDb = M("CompanyStatement","tab_");
$statement_begin_time = date("Y-m- d",$begintime);
$statement_begin_time = date("Y.m. d",$begintime);
$statement_end_time = date("Y-m- d",$endtime);
$statement_end_time = date("Y.m. d",$endtime);
foreach($cpList as $k=>$v){
foreach($cpList as $k=>$v){
$add_data=[];
$add_data=[];
@ -566,8 +566,8 @@ class CompanyStatementSetController extends Controller {
$verify_log=json_encode(["create_user"=>"system","create_time"=>date("Y-m-d H:i:s")]);
$verify_log=json_encode(["create_user"=>"system","create_time"=>date("Y-m-d H:i:s")]);
$StatementDb = M("CompanyStatement","tab_");
$StatementDb = M("CompanyStatement","tab_");
$statement_begin_time = date("Y-m- d",$begintime);
$statement_begin_time = date("Y.m. d",$begintime);
$statement_end_time = date("Y-m- d",$endtime);
$statement_end_time = date("Y.m. d",$endtime);
$RewardRecord = M("RewardDetail","tab_");
$RewardRecord = M("RewardDetail","tab_");
foreach($pcList as $k=>$v){
foreach($pcList as $k=>$v){
if(!isset($pc[$k])){continue;}//不存在的公司不结算
if(!isset($pc[$k])){continue;}//不存在的公司不结算
@ -915,8 +915,8 @@ class CompanyStatementSetController extends Controller {
$this->getPromoteCompanySpend($pc,array_unique(array_keys($pc)),$begintime,$endtime);
$this->getPromoteCompanySpend($pc,array_unique(array_keys($pc)),$begintime,$endtime);
$StatementDb = M("CompanyStatement","tab_");
$StatementDb = M("CompanyStatement","tab_");
$statement_begin_time = date("Y-m- d",$begintime);
$statement_begin_time = date("Y.m. d",$begintime);
$statement_end_time = date("Y-m- d",$endtime);
$statement_end_time = date("Y.m. d",$endtime);
// $RewardRecord = M("RewardRecord","tab_");
// $RewardRecord = M("RewardRecord","tab_");
$LackStatement = M("company_lack_statement_info","tab_");
$LackStatement = M("company_lack_statement_info","tab_");
$StatementInfo = M("company_statement_info","tab_");
$StatementInfo = M("company_statement_info","tab_");
@ -1146,8 +1146,8 @@ class CompanyStatementSetController extends Controller {
$pl = M("promote_company","tab_")
$pl = M("promote_company","tab_")
->alias('pc')
->alias('pc')
->field("p.account,p.company_relation,IFNULL(s.nickname,'admin') nickname")
->field("p.account,p.company_relation,IFNULL(s.nickname,'admin') nickname")
->join("left join (select company_id,account,company_relation from tab_promote where level = 1 group by company_id ) p on p.company_id = pc.id")//获取会长
->join("left join (select company_id,account,company_relation,admin_id from tab_promote where level = 1 group by company_id ) p on p.company_id = pc.id")//获取会长
->join("left join sys_member s on s.uid = pc.u id")
->join("left join sys_member s on s.uid = p.admin_ id")
->where("pc.id = {$company_id}")
->where("pc.id = {$company_id}")
->find();
->find();
$company = array_merge($company_info,$pl);
$company = array_merge($company_info,$pl);