Merge branch 'feature/platfrom_aggregate_finance' of wmtx/platform into release

优化比例
master
廖金灵 4 years ago committed by Gogs
commit 30d5182381

@ -72,7 +72,7 @@ class CompanyRelationController extends AdminController
$where['is_payment'] = $params['is_payment'];
}
$this->checkListOrCountAuthRestMap($where);//导出权限
// $this->checkListOrCountAuthRestMap($where);//导出权限
$dbres = $this->DBModel->where($where)->order("id desc");;
if(isset($params['export'])){
$dbres = $dbres->select();
@ -153,7 +153,7 @@ class CompanyRelationController extends AdminController
if(isset($params['status'])){
$where['status'] = $params['status'];
}
$this->checkListOrCountAuthRestMap($where);//导出权限
// $this->checkListOrCountAuthRestMap($where);//导出权限
$dbres = $this->DBlogModel->where($where)->order("FIELD(status,0,1,-1,-2,2),id desc");;
if(isset($params['export'])){
$dbres = $dbres->select();

@ -727,7 +727,7 @@ class CompanyStatementController extends ThinkController
$upwhere = "(first_company_type = 1 AND first_company_id NOT IN ({$up_company_id}) ) OR ( second_company_type = 1 AND second_company_id NOT IN ({$up_company_id}) )";
}
$uprelation = M("company_relation","tab_")->field("first_company_id,first_company_type,second_company_id,second_company_type")->where($upwhere)->select();
foreach($uprelation as $k=>$v){
if($v['first_company_type'] == 0){
$senddata["up_company_id"][] = $v['second_company_id'];
@ -741,7 +741,7 @@ class CompanyStatementController extends ThinkController
$downwhere = "1=1";
}else{
$dowm_company_id =implode(",",$dowm_company_id);
$downwhere = "(first_company_type = 1 AND first_company_id NOT IN ({$dowm_company_id}) ) OR ( second_company_type = 1 AND second_company_id NOT IN ({$dowm_company_id}) )";
$downwhere = "(first_company_type = 2 AND first_company_id NOT IN ({$dowm_company_id}) ) OR ( second_company_type = 2 AND second_company_id NOT IN ({$dowm_company_id}) )";
}
$downrelation = M("company_relation","tab_")->field("first_company_id,first_company_type,second_company_id,second_company_type")->where($downwhere)->select();

@ -467,7 +467,7 @@
}
//数据类
var DATAOBJ = {$data|json_encode=###,JSON_UNESCAPED_UNICODE};
var DATAOBJ = {$data|json_encode=###,JSON_UNESCAPED_UNICODE};
var YDATAOBJ = {$data|json_encode=###,JSON_UNESCAPED_UNICODE};
//事件类
var EVENT = {
@ -548,8 +548,15 @@
var td = DATAOBJ.statement_info[index];
var rname = $(this).attr("name");
var ratio = 0;
if( rname == "increment_ratio" || rname == "ratio"){
var ratio = val;
ratio = val;
}else{
if(DATAOBJ.withdraw_type==2){
ratio = td['increment_ratio'];
}else{
ratio = td['ratio'];
}
}
DATAOBJ.statement_money = PUBLIC.floatCut(DATAOBJ.statement_money,td['sum_money']);
td['sum_money'] = Math.round(td['pay_amount']*ratio*(100-td['fax_ratio'])/100,2)/100;

@ -372,8 +372,11 @@
var td = DATAOBJ.statement_info[index];
var rname = $(this).attr("name");
var ratio = 0;
if( rname == "increment_ratio" || rname == "ratio"){
var ratio = val;
ratio = val;
}else{
ratio = td['ratio'];
}
DATAOBJ.statement_money = PUBLIC.floatCut(DATAOBJ.statement_money,td['sum_money']);
td['sum_money'] = Math.round(td['pay_amount']*ratio)/100 - td['fine'] + (td['reward']-0);

@ -153,27 +153,20 @@ class WithdrawController extends BaseController
* 整合数据,全部成功则支付成功,否则为支付中
*/
public function poolCount($poolid){
$pool_id = $poolid;
$CompanyInfo = M("company_statement_info","tab_");
if(count($pool_id) > 0){
foreach($pool_id as $k=>$v){
$f = $CompanyInfo->where("pool_id = {$v} AND pay_status <> 1")->find();
if(empty($f)){
//全部完成
$this->setOneVerifyStatus(4,"payment",$v);
}else{
//打款中
$this->setOneVerifyStatus(3,"payment",$v);
}
}
$f = M("company_statement_info","tab_")->where("pool_id = {$poolid} AND pay_status <> 1")->find();
if(empty($f)){
//全部完成
$this->setOneVerifyStatus(4,"payment",$poolid);
}else{
//打款中
$this->setOneVerifyStatus(3,"payment",$poolid);
}
}
protected function setOneVerifyStatus($change_status,$op_pre,$id)
{
$dbres = M("company_statement_pool","tab_")->field("id,verify_status,verify_log")->where("id = {$id}")->find();
$dbres['verify_log'] = json_decode($dbres['verify_log'],true);
$dbres['verify_log'][$op_pre.'_user']=$this->admininfo["mobile"];
$dbres['verify_log'][$op_pre.'_user']=$_SESSION['onethink_home']['promote_auth']['account'];
$dbres['verify_log'][$op_pre.'_time']=date("Y-m-d H:i:s");
$dbres['verify_log'] = json_encode($dbres['verify_log']);
$dbres['verify_status']=$change_status;

Loading…
Cancel
Save