优化重算,兼容wind

master
chenzhi 4 years ago
parent 7ceafb1d42
commit b88f2986bd

@ -20,7 +20,7 @@ class CmdTasksController extends Controller {
$cmd = $params['params']; $cmd = $params['params'];
$cmd = str_replace('{$taskid}',$taskid,$cmd); $cmd = str_replace('{$taskid}',$taskid,$cmd);
try { try {
system($cmd); exec($cmd);
} catch (\Exception $e) { } catch (\Exception $e) {
D("CmdTasks")->updateTask(['id'=>$params['id'],'status' => 3, 'end_time' => time(), 'result' => $e->getMessage()]); D("CmdTasks")->updateTask(['id'=>$params['id'],'status' => 3, 'end_time' => time(), 'result' => $e->getMessage()]);
} }

@ -537,16 +537,16 @@ class CompanyStatementSetController extends Controller {
$pc =[]; $pc =[];
$Promote = M("Promote","tab_"); $Promote = M("Promote","tab_");
foreach ($tmpp as $v) { foreach ($tmpp as $v) {
//获取会长的支付宝账号 // //获取会长的支付宝账号
$p_map = [ // $p_map = [
"company_id"=>$v['id'], // "company_id"=>$v['id'],
"withdraw_done"=>1 // "withdraw_done"=>1
]; // ];
$pres = $Promote->field("alipay_account,alipay_real_name")->where($p_map)->find(); // $pres = $Promote->field("alipay_account,alipay_real_name")->where($p_map)->find();
if(!empty($pres) && !empty($pres['alipay_account']) && !empty($pres['alipay_real_name'])){ // if(!empty($pres) && !empty($pres['alipay_account']) && !empty($pres['alipay_real_name'])){
$v['ali_user'] = $pres['alipay_real_name']; // $v['ali_user'] = $pres['alipay_real_name'];
$v['ali_account'] = $pres['alipay_account']; // $v['ali_account'] = $pres['alipay_account'];
} // }
if($v['has_ratio']){ if($v['has_ratio']){
$v['turnover_ratio'] = json_decode($v['turnover_ratio'],true); $v['turnover_ratio'] = json_decode($v['turnover_ratio'],true);
} }

@ -48,7 +48,12 @@ class CmdTasksModel extends Model{
return false; return false;
} }
if($need_path){ if($need_path){
$params = "cd ".ROOTTTTT.";".$params; if(IS_WIN){
$p = explode(':',ROOTTTTT);
$params = "{$p[0]}:&".'cd "'.$p[1].'"&'.$params;
}else{
$params = "cd ".ROOTTTTT.";".$params;
}
} }
if($need_tasksid){ if($need_tasksid){
$params = rtrim($params,";").'/taskid/{$taskid};'; $params = rtrim($params,";").'/taskid/{$taskid};';

Loading…
Cancel
Save