新增公会旧数据归属刷新脚本

master
chenzhi 5 years ago
parent 61d0418340
commit f2148320a8

@ -9,7 +9,9 @@ namespace Admin\Controller;
*/ */
class OldCountController extends \Think\Controller class OldCountController extends \Think\Controller
{ {
//财务分类汇总统计旧数据聚合 /**
* 财务分类汇总统计旧数据聚合
*/
public function FinancialSummaryInit() public function FinancialSummaryInit()
{ {
//清空数据库 //清空数据库
@ -23,7 +25,9 @@ class OldCountController extends \Think\Controller
$Financial->setMonthFinancialSummary($v); $Financial->setMonthFinancialSummary($v);
} }
} }
//超级签订单新增识别微信或者支付宝2019-12-11 /*
*超级签订单新增识别微信或者支付宝2019-12-11
*/
public function gameSupersignPaywayInit() public function gameSupersignPaywayInit()
{ {
$map = array( $map = array(
@ -103,6 +107,25 @@ class OldCountController extends \Think\Controller
} }
die("init ok"); die("init ok");
} }
/**
* 修改公会内外团关系跟随公司 旧数据跟随 20200318
*/
public function promoteCompanyBelongInit()
{
//获取所有公司
$comoany = M("PromoteCompany","tab_")->field("id,company_belong")->select();
$comoany[] = ["id"=>0,"company_belong"=>0]; //海南万盟
$count = count($comoany);
$promote = M("Promote","tab_");
for ($i=0; $i < $count; $i++) {
$savedata = array(
"company_belong"=>$comoany[$i]['company_belong']
);
$tmpid = $comoany[$i]['id'];
$promote->where("company_id ='{$tmpid}'")->save($savedata);
}
die("promoteCompanyBelongInit success");
}
//获取公司月结所需要的所有月份截止至上个月 //获取公司月结所需要的所有月份截止至上个月
public function getMonthsList() public function getMonthsList()
{ {
@ -124,4 +147,5 @@ class OldCountController extends \Think\Controller
} }
} }

Loading…
Cancel
Save