Commit 0fad9fec authored by hangjun83's avatar hangjun83

zkh

parent 6d62f81c
...@@ -180,6 +180,8 @@ class ZhenkhApiService extends PlatformAbstractService ...@@ -180,6 +180,8 @@ class ZhenkhApiService extends PlatformAbstractService
{ {
try{ try{
if($this->checkPlatformStatus()){ if($this->checkPlatformStatus()){
SimpleLogs::writeLog('zkh api params => '.$orderId,__CLASS__.':sendDeliveryOrder');
$response = $this->clientRequest('get', $response = $this->clientRequest('get',
$this->getPlatformApiUrl().'/openPoApi/v1/purchaseOrder/getDeliveryOrderPart?purchaseOrderId='.$orderId, $this->getPlatformApiUrl().'/openPoApi/v1/purchaseOrder/getDeliveryOrderPart?purchaseOrderId='.$orderId,
[ [
...@@ -208,6 +210,7 @@ class ZhenkhApiService extends PlatformAbstractService ...@@ -208,6 +210,7 @@ class ZhenkhApiService extends PlatformAbstractService
{ {
try{ try{
if($this->checkPlatformStatus()){ if($this->checkPlatformStatus()){
SimpleLogs::writeLog('zkh api params => '.$deliveryOrder,__CLASS__.':ackDeliveryOrder');
$response = $this->getPostClient($this->getPlatformApiUrl().'/openPoApi/v1/purchaseOrder/ackDeliveryOrderPart', $response = $this->getPostClient($this->getPlatformApiUrl().'/openPoApi/v1/purchaseOrder/ackDeliveryOrderPart',
$deliveryOrder,null, $deliveryOrder,null,
[ [
...@@ -235,12 +238,15 @@ class ZhenkhApiService extends PlatformAbstractService ...@@ -235,12 +238,15 @@ class ZhenkhApiService extends PlatformAbstractService
} }
try{ try{
if($this->checkPlatformStatus()){ if($this->checkPlatformStatus()){
$response = $this->getPostClient($this->getPlatformApiUrl().'/openApi/v1/common/report/price',
[[ $params = [
'customPrice' => $params['price'], 'customPrice' => $params['price'],
'priceUnit' => $params['price_unit'], 'priceUnit' => $params['price_unit'],
'zkhSku' => $params['sku'] 'zkhSku' => $params['sku']
]],null, ];
SimpleLogs::writeLog('zkh api params => '.$params,__CLASS__.':updateReportProductPrice');
$response = $this->getPostClient($this->getPlatformApiUrl().'/openApi/v1/common/report/price',
[$params],null,
[ [
'honeycombToken' => $token, 'honeycombToken' => $token,
'Content-Type' => 'application/json;charset=UTF-8' 'Content-Type' => 'application/json;charset=UTF-8'
...@@ -267,13 +273,16 @@ class ZhenkhApiService extends PlatformAbstractService ...@@ -267,13 +273,16 @@ class ZhenkhApiService extends PlatformAbstractService
} }
try{ try{
if($this->checkPlatformStatus()){ if($this->checkPlatformStatus()){
$response = $this->getPostClient($this->getPlatformApiUrl().'/openApi/v2/common/report/stock',
[[ $params = [
'supplierWarehouseName' => $params['warehouse'], 'supplierWarehouseName' => $params['warehouse'],
'warehouseNameList' => $params['address'], 'warehouseNameList' => $params['address'],
'qty' => intval($params['qty']), 'qty' => intval($params['qty']),
'zkhSku' => $params['sku'] 'zkhSku' => $params['sku']
]],null, ];
SimpleLogs::writeLog('zkh api params => '.$params,__CLASS__.':updateReportProductStock');
$response = $this->getPostClient($this->getPlatformApiUrl().'/openApi/v2/common/report/stock',
[$params],null,
[ [
'honeycombToken' => $token, 'honeycombToken' => $token,
'Content-Type' => 'application/json;charset=UTF-8' 'Content-Type' => 'application/json;charset=UTF-8'
...@@ -330,6 +339,8 @@ class ZhenkhApiService extends PlatformAbstractService ...@@ -330,6 +339,8 @@ class ZhenkhApiService extends PlatformAbstractService
if($this->checkPlatformStatus()){ if($this->checkPlatformStatus()){
$params = []; $params = [];
$params['purchaseOrderId'] = $orderNo; $params['purchaseOrderId'] = $orderNo;
SimpleLogs::writeLog('zkh api params => '.$params,__CLASS__.':orderConfirm');
$response = $this->getPostClient($this->getPlatformApiUrl().'/openPoApi/v1/purchaseOrder/confirm', $response = $this->getPostClient($this->getPlatformApiUrl().'/openPoApi/v1/purchaseOrder/confirm',
$params,null, $params,null,
[ [
......
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 to comment