php-wms-client/src/WmsStrategy.php

56 lines
1.4 KiB
PHP
Raw Normal View History

2020-03-19 09:05:29 +00:00
<?php
namespace PdWms;
class WmsStrategy
{
public $wmsClient;
public function __construct($warehouseId)
{
switch ($warehouseId)
{
case 1:
$this->wmsClient = new XinyiWms();
break;
case 2:
$this->wmsClient = new GwallWms();
break;
default:
throw new \Exception('仓库不存在');
}
}
public function saleOrderCreate($params) {
return $this->wmsClient->saleOrderCreate($params);
}
public function goodsStockInfoSingle($wmsCode, $inventoryType = 'ZP') {
return $this->wmsClient->goodsStockInfoSingle($wmsCode, $inventoryType);
}
public function goodsStockInfo($params, $inventoryType = 'ZP') {
return $this->wmsClient->goodsStockInfo($params, $inventoryType);
}
public function goodsSync($params) {
return $this->wmsClient->goodsSync($params);
}
public function orderCancel($params) {
return $this->wmsClient->orderCancel($params);
}
public function saleReturnOrderCreate($params) {
return $this->wmsClient->saleReturnOrderCreate($params);
}
public function stockInCreate($params, $type = 0) {
return $this->wmsClient->stockInCreate($params, $type);
}
public function stockOutCreate($params) {
return $this->wmsClient->stockOutCreate($params);
}
}