更新云芯对接

parent 62ff82f8
...@@ -62,8 +62,10 @@ class ApiController extends Controller ...@@ -62,8 +62,10 @@ class ApiController extends Controller
(new ServerFinanceModel($request->appid,$request->key))->accountCheckingDetail($request->input()); (new ServerFinanceModel($request->appid,$request->key))->accountCheckingDetail($request->input());
} }
//退货列表明细 //退货列表明细
private function ApiAbnormalDetail($request, $id){ private function ApiAccountChangeChecking($request, $id){
(new ServerFinanceModel($request->appid,$request->key))->accountChangeChecking($request->input()); $input = $request->input();
$input['checking_name'] = $request->supplier_name;
(new ServerFinanceModel($request->appid,$request->key))->accountChangeChecking($input);
} }
......
...@@ -8,13 +8,13 @@ use DB; ...@@ -8,13 +8,13 @@ use DB;
//跟财务接口通讯模型 //跟财务接口通讯模型
class ServerFinanceModel class ServerFinanceModel
{ {
private $pur_url ; //采购网址 private $finance_url ; //采购网址
private $appid ; //APPID private $appid ; //APPID
private $key ; //密钥 private $key ; //密钥
const IS_DEBUG = 0; //是否调试 const IS_DEBUG = 0; //是否调试
public function __construct($appid,$key) public function __construct($appid,$key)
{ {
$this->pur_url = Config('website.URL_PUR'); $this->finance_url = Config('website.URL_FINANCE');
// $this->financeUrl = 'http://szfinance.ichunt.net'; // $this->financeUrl = 'http://szfinance.ichunt.net';
$this->appid = $appid; $this->appid = $appid;
$this->key = $key; $this->key = $key;
...@@ -22,7 +22,7 @@ class ServerFinanceModel ...@@ -22,7 +22,7 @@ class ServerFinanceModel
//发送请求 //发送请求
public function push($url,$data,$type = 1){ public function push($url,$data,$type = 1){
$data = ExcessEncryption($data,$this->appid,$this->key); $data = ExcessEncryption($data,$this->appid,$this->key);
$urls = $this->pur_url.$url; $urls = $this->finance_url.$url;
$res = (curl($urls,$data)); $res = (curl($urls,$data));
if (self::IS_DEBUG){ if (self::IS_DEBUG){
...@@ -42,18 +42,15 @@ class ServerFinanceModel ...@@ -42,18 +42,15 @@ class ServerFinanceModel
} }
//获取对账单列表 //获取对账单列表
public function accountCheckingList($input){ public function accountCheckingList($input){
$url = $this->financeUrl . '/webapi/accountCheckingList'; return $this->push('/thrid/accountCheckingList',$input);
return $this->push($url,$input);
} }
//获取对账单列表明细 //获取对账单列表明细
public function accountCheckingDetail($input){ public function accountCheckingDetail($input){
$url = $this->financeUrl . '/webapi/accountCheckingDetail'; return $this->push('/thrid/accountCheckingDetail',$input);
return $this->push($url,$input);
} }
//对账确定 //对账确定
public function accountChangeChecking($input){ public function accountChangeChecking($input){
$url = $this->financeUrl . '/webapi/accountChangeChecking'; return $this->push('/thrid/accountChangeChecking',$input);
return $this->push($url,$input);
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment