提交 6c735563 authored 作者: chengye's avatar chengye

调整了付款信息接口功能

上级 b8a55f50
......@@ -11,61 +11,66 @@ class openfkinfoClassAction extends openapiAction
return $this->showreturn([],$msg,'201');
}
public function listAction(){
$post = $_POST;
if($post){
$arr=$post['docnum'];
$arr=explode(',', $arr);
$str = " ' " . join("','", array_values($arr) ) . " ' "; // 使用需要的符号拼接
$str = " ' ".str_replace( ",","','", implode(',',$arr)); //使用需要的符号替换
$str = join( ', ',array_map(function( $v ){ return "'".$v."'";},$arr) );
$sql='select a.id,a.docnum,a.status,b.nowcheckname from oa_c_fininfom_oafk as a INNER JOIN oa_flow_bill as b on a.docnum=b.sericnum where a.docnum in '."(".$str.")";
$data = $this->db->getall($sql);
foreach ($data as $key => $value) {
$data[$key]['url']="http://chengye-dev.gonn.tech/task.php?a=p&num=oafk&mid=".$value['id'];
}
}else{
$data = $this->db->getall('select a.id,a.docnum,a.status,b.nowcheckname from oa_c_fininfom_oafk as a INNER JOIN oa_flow_bill as b on a.docnum=b.sericnum ');
foreach ($data as $key => $value) {
$data[$key]['url']="http://chengye-dev.gonn.tech/task.php?a=p&num=oafk&mid=".$value['id'];
}
$post = $_POST;
if($post){
$arr=$post['docnum'];
$arr=explode(',', $arr);
$str = " ' " . join("','", array_values($arr) ) . " ' "; // 使用需要的符号拼接
$str = " ' ".str_replace( ",","','", implode(',',$arr)); //使用需要的符号替换
$str = join( ', ',array_map(function( $v ){ return "'".$v."'";},$arr) );
$sql='select a.id,a.docnum,a.status,b.nowcheckname from oa_c_fininfom_oafk as a INNER JOIN oa_flow_bill as b on a.docnum=b.sericnum where a.docnum in '."(".$str.")";
$data = $this->db->getall($sql);
foreach ($data as $key => $value) {
$info ='select * from [Q]c_fund_details_fk where mid='.$value['id'];
$info = $this->db->getall($info);
$data[$key]['info']=$info;
$data[$key]['url']="http://chengye-dev.gonn.tech/task.php?a=p&num=oafk&mid=".$value['id'];
}
return $this->showreturn($data,'SUCCESS','200');
}else{
$data = $this->db->getall('select * from oa_c_fininfom_oafk as a INNER JOIN oa_flow_bill as b on a.docnum=b.sericnum ');
foreach ($data as $key => $value) {
$info ='select * from [Q]c_fund_details_fk where mid='.$value['id'];
$info = $this->db->getall($info);
$data[$key]['info']=$info;
$data[$key]['url']="http://chengye-dev.gonn.tech/task.php?a=p&num=oafk&mid=".$value['id'];
}
}
return $this->showreturn($data,'SUCCESS','200');
}
public function fkinforAction(){
$post = $_POST;
switch ($post['type']) {
case '1':
public function fkinforAction(){
$post = $_POST;
switch ($post['type']) {
case '1':
$sql='select o.name,o.num from oa_option as o where o.pid=516';
$data = $this->db->getall($sql);
break;
case '2':
break;
case '2':
$sql='select o.name,o.num from oa_option as o where o.pid=933';
$data = $this->db->getall($sql);
break;
case '3':
break;
case '3':
$sql='select o.name,o.num from oa_option as o where o.pid=678';
$data = $this->db->getall($sql);
break;
default:
return $this->showreturn([],'error','201');
break;
}
return $this->showreturn($data,'SUCCESS','200');
}
break;
default:
return $this->showreturn([],'error','201');
break;
}
return $this->showreturn($data,'SUCCESS','200');
}
}
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论