From 13a3da9b4e9869f66ca40afed3ee90bbccbd5f07 Mon Sep 17 00:00:00 2001 From: hongwenwu Date: Mon, 11 Sep 2023 11:21:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=B7=A5=E5=8D=95=E6=92=A4=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 11 +++++++++++ src/OrderActions/Order.php | 20 ++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/README.md b/README.md index c98cda7..9bedd10 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,17 @@ $response = $w->createProductOrder([ 'number_pcs' => 10, 'owner' => 'ykxiao' ]); + +// 更新加工工单 +$response = $w->updateProductOrder([ + 'id' => 1, + 'company_id' => 1, +]); + +// 撤回加工工单 +$response = $w->revokeProductOrder([ + 'id' => 1 +]); ``` # 回调说明 diff --git a/src/OrderActions/Order.php b/src/OrderActions/Order.php index 73f8bd9..9433a4d 100644 --- a/src/OrderActions/Order.php +++ b/src/OrderActions/Order.php @@ -138,4 +138,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); + } }