Compare commits

..

5 Commits
master ... dev

Author SHA1 Message Date
hongwenwu 5541bd41b6 获取工单信息 2023-09-11 16:28:44 +08:00
hongwenwu 44fc0defb5 获取工单信息 2023-09-11 16:27:48 +08:00
hongwenwu e20f6b950e 获取工单信息 2023-09-11 13:53:27 +08:00
hongwenwu 8e972bb2dd Merge branch 'dev' of https://git.tool.dwoodauto.com/ykxiao/dmmes into dev 2023-09-11 11:21:08 +08:00
hongwenwu 13a3da9b4e 加工单撤回 2023-09-11 11:21:02 +08:00
2 changed files with 35 additions and 4 deletions

View File

@ -32,7 +32,7 @@ $options = [
$w = new Order($secretKey, 'callback url', $options);
// 获取工单数据
$response = $w->getProductOrder('SN5436745676543');
$response = $w->getProductOrder(1);
// 加工工单原木材种
$w->getWoodTypeOptions([
@ -57,6 +57,17 @@ $response = $w->createProductOrder([
'number_pcs' => 10,
'owner' => 'ykxiao'
]);
// 更新加工工单
$response = $w->updateProductOrder([
'id' => 1,
'company_id' => 1,
]);
// 撤回加工工单
$response = $w->revokeProductOrder([
'id' => 1
]);
```
# 回调说明

View File

@ -138,12 +138,12 @@ class Order
* @return mixed|string
* @throws GuzzleException
*/
public function getProductOrder($order_sn)
public function getProductOrder($orderId)
{
$data = [
'order_sn' => $order_sn
'id' => $orderId
];
return $this->sendRequest('production.status', $data);
return $this->sendRequest('production.info', $data);
}
/**
@ -175,4 +175,24 @@ class Order
{
return $this->sendRequest('production.create', $data);
}
/**
* 加工工单更新
* @return mixed|string
* @throws HttpException|GuzzleException
*/
public function updateProductOrder($data)
{
return $this->sendRequest('production.update', $data);
}
/**
* 加工工单撤回
* @return mixed|string
* @throws HttpException|GuzzleException
*/
public function revokeProductOrder($data)
{
return $this->sendRequest('production.revoke', $data);
}
}