优化公司单子为一单

master
chenzhi 4 years ago
parent ec7b333fa4
commit b3813dad4a

@ -488,25 +488,16 @@ class CompanyStatementController extends ThinkController
"op_time"=>time(),
"company_list"=>[]
];
$datas = ["ups","up","downs","down"];
$datas = ["up","down"];
//初始化数据
foreach($datas as $k=>$v){
if($v =="ups"){
$basedata['company_type']=3;
$basedata['is_payment']=1;
}
if($v =="up"){
$basedata['company_type']=3;
$basedata['is_payment']=2;
}
if($v =="downs"){
$basedata['company_type']=1;
$basedata['is_payment']=1;
}
if($v =="down"){
$basedata['company_type']=1;
$basedata['is_payment']=2;
$basedata['is_payment']=1;
}
$datas[$v]=$basedata;
unset($datas[$k]);
@ -516,18 +507,9 @@ class CompanyStatementController extends ThinkController
if($v['verify_status'] != 2) continue;
if($v['company_belong'] == 9){
//上游
if($v['is_payment'] == 1){
$this->setDf($datas['ups'],$v);
}else{
$this->setDf($datas['up'],$v);
}
$this->setDf($datas['up'],$v);
}else{
if($v['is_payment'] == 1){
$this->setDf($datas['downs'],$v);
}else{
$this->setDf($datas['down'],$v);
}
$this->setDf($datas['down'],$v);
}
}
$Pool = M("company_statement_pool","tab_");
@ -613,7 +595,7 @@ class CompanyStatementController extends ThinkController
unset($value["second_ratio"]);
}
}
if($k=="ups" || $k=='downs'){
if($va['is_payment'] == 1){
$is_payment = 1;
$verify_status = 0;
}else{
@ -747,7 +729,8 @@ class CompanyStatementController extends ThinkController
"fine"=>$fine,
"reward"=>$reward,
"statement_info"=>$v['statement_info'],
"statement_num"=>"JS_".date('Ymd').date('His').$v['company_id'].sp_random_string(5)
"statement_num"=>"JS_".date('Ymd').date('His').$v['company_id'].sp_random_string(5),
"is_payment"=>$v['is_payment']
];
$savedata['company_list'][$v['company_id']] = $tdata;
}

Loading…
Cancel
Save