|
|
|
@ -82,6 +82,7 @@ class CompanyStatementLackController extends ThinkController
|
|
|
|
|
$v['company_type_str'] = $this->CompanyType[$v['company_type']];
|
|
|
|
|
$v["valid"] = "{$v['statement_begin_time']}-{$v['statement_end_time']}";
|
|
|
|
|
$v['oplist'] = $this->OpAuth($v);
|
|
|
|
|
$v['withdraw_type_str'] = ($v['withdraw_type']==3?"特殊补点":"正常结算");;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$count = $this->DBModel->field("count(id) count,sum(statement_money) statement_money")->where($map)->find();
|
|
|
|
@ -136,6 +137,21 @@ class CompanyStatementLackController extends ThinkController
|
|
|
|
|
if(!isset($_REQUEST['ids'])) $this->error("参数错误");
|
|
|
|
|
$ids = $_REQUEST['ids'];
|
|
|
|
|
$dbres = $this->DBModel->field("*")->where("id in ({$ids})")->select();
|
|
|
|
|
|
|
|
|
|
$hav_special = 0;
|
|
|
|
|
$hav_common = 0;
|
|
|
|
|
foreach ($dbres as $key => $value) {
|
|
|
|
|
if ($value['withdraw_type'] == 3) {
|
|
|
|
|
$hav_special = 1;
|
|
|
|
|
} else {
|
|
|
|
|
$hav_common = 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($hav_special && $hav_common) {
|
|
|
|
|
$this->error("特殊补点不能与正常结算一起汇总");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//分单
|
|
|
|
|
$basedata = [
|
|
|
|
|
"pay_amount"=>0,
|
|
|
|
@ -152,7 +168,7 @@ class CompanyStatementLackController extends ThinkController
|
|
|
|
|
"verify_status"=>0,
|
|
|
|
|
"verify_log"=>json_encode(["create_user"=>$this->admininfo["username"],"create_time"=>date("Y.m.d H:i:s")]),
|
|
|
|
|
"op_time"=>time(),
|
|
|
|
|
"company_list"=>[]
|
|
|
|
|
"company_list"=>[],
|
|
|
|
|
];
|
|
|
|
|
$datas = ["ups","up","downs","down","user","users"];
|
|
|
|
|
//初始化数据
|
|
|
|
@ -269,6 +285,7 @@ class CompanyStatementLackController extends ThinkController
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected function addStatementInfo($va,$ke,&$v,$k){
|
|
|
|
|
|
|
|
|
|
if($k=="ups" || $k=='downs' || $k =="users"){
|
|
|
|
|
$verify_status = 0;
|
|
|
|
|
}else{
|
|
|
|
@ -294,8 +311,10 @@ class CompanyStatementLackController extends ThinkController
|
|
|
|
|
"statement_end_time"=>$v['statement_end_time'],
|
|
|
|
|
"statement_info"=>json_encode($va['statement_info'],JSON_UNESCAPED_UNICODE),
|
|
|
|
|
"statement_num"=>$va['statement_num'],
|
|
|
|
|
"verify_status"=>$verify_status
|
|
|
|
|
"verify_status"=>$verify_status,
|
|
|
|
|
"withdraw_type"=>$va['withdraw_type']
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
$companyid = $StatementInfo->add($company);
|
|
|
|
|
$v['info_ids'][] =$companyid;
|
|
|
|
|
$v['statement_money'] +=$va['statement_money'];
|
|
|
|
@ -337,7 +356,8 @@ class CompanyStatementLackController 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),
|
|
|
|
|
"withdraw_type"=>$v['withdraw_type'],
|
|
|
|
|
];
|
|
|
|
|
$savedata['company_list'][$v['company_id']] = $tdata;
|
|
|
|
|
}
|
|
|
|
|