From e6e8e1d0b399326c343faf12290bec690d19fce2 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Wed, 24 Feb 2021 16:32:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...SubCompanyStatementSetController.class.php | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/Application/Admin/Controller/SubCompanyStatementSetController.class.php b/Application/Admin/Controller/SubCompanyStatementSetController.class.php index 9fbce7e8c..d528b68a5 100644 --- a/Application/Admin/Controller/SubCompanyStatementSetController.class.php +++ b/Application/Admin/Controller/SubCompanyStatementSetController.class.php @@ -264,7 +264,30 @@ class SubCompanyStatementSetController extends Controller { $StatementDb = SM("CompanyStatement","tab_"); $statement_begin_time = date("Y.m.d",$begintime); $statement_end_time = date("Y.m.d",$endtime); + $MainStatementDb = M("CompanyStatement","tab_"); //主站结算单 + // dd($cpList); foreach($cpList as $k=>$v){ + // + $company_id = ($v['first_company_type'] == 1 ? $v['first_company_id'] : $v['second_company_id']); + $mainWhere = [ + "company_id" => $company_id, + "statement_begin_time"=>$begintime, + "statement_end_time"=>$endtime + ]; + $add_data = $MainStatementDb->where($mainWhere)->find(); + if(empty($add_data)) return false; //主站必须有数据 + $add_data['statement_info'] = json_decode($add_data['statement_info'],true); + if (isset($v['list'])) { + dd($v['list']); + dd($add_data); + }else{ + continue; + } + + + + + //条件ok $add_data=[]; $handleed_data = []; //1.获取甲乙方信息