提交 9c827930 authored 作者: chengye's avatar chengye

修改供应商接口满足一次取出所有供应商数据

上级 45386241
...@@ -22,6 +22,7 @@ class opensupplierClassAction extends openapiAction ...@@ -22,6 +22,7 @@ class opensupplierClassAction extends openapiAction
$where = ''; $where = '';
if(!empty($post['email'])){ if(!empty($post['email'])){
$user = $this->db->getone('oa_userinfo', 'email = '.$post['email']); $user = $this->db->getone('oa_userinfo', 'email = '.$post['email']);
m('log')->addlogs('供应商接口调用', 'list: email '.$post['email'].'count '.$post['count'] , 2);
$where = ' deptname = '.$user['deptname']; $where = ' deptname = '.$user['deptname'];
} }
if($post['count'] == 'all') if($post['count'] == 'all')
...@@ -29,6 +30,7 @@ class opensupplierClassAction extends openapiAction ...@@ -29,6 +30,7 @@ class opensupplierClassAction extends openapiAction
else else
$sql = 'select id,number,name from [Q]supplier as c order by c.id '.$sort.' limit '.$page.','.$page_size; $sql = 'select id,number,name from [Q]supplier as c order by c.id '.$sort.' limit '.$page.','.$page_size;
$data = $this->db->getall($sql); $data = $this->db->getall($sql);
foreach ($data as $key => $vo){ foreach ($data as $key => $vo){
$supp ='select open_bank_name,bank_code,bank_holder,open_address from [Q]supplier_bank_info where mid='.$vo['id']; $supp ='select open_bank_name,bank_code,bank_holder,open_address from [Q]supplier_bank_info where mid='.$vo['id'];
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论