增加加工工单创建接口

This commit is contained in:
ykxiao 2023-09-07 15:30:08 +08:00
parent 21e28aee92
commit 27bafb5d6d
3 changed files with 25 additions and 1 deletions

View File

@ -1 +1 @@
{"version":1,"defects":{"Feature\\OrderTest::testGetProductOrder":5},"times":{"Unit\\OrderTest::testGetWeatherWithInvalidType":0.041,"Feature\\OrderTest::testGetWeatherWithInvalidType":0.026,"Unit\\OrderTest::testGetWeatherWithInvalidFormat":0,"Feature\\OrderTest::testGetWeatherWithInvalidFormat":0,"Feature\\OrderTest::testGetWeatherWithGuzzleRuntimeException":0.074,"Feature\\OrderTest::testGetHttpClient":0.015,"Feature\\OrderTest::testSetGuzzleOptions":0.002,"Unit\\OrderTest::testGetWeatherWithGuzzleRuntimeException":0.101,"Unit\\OrderTest::testGetHttpClient":0.02,"Unit\\OrderTest::testSetGuzzleOptions":0.004,"Feature\\OrderTest::testGetProductOrder":0.202}} {"version":1,"defects":{"Feature\\OrderTest::testGetProductOrder":5},"times":{"Unit\\OrderTest::testGetWeatherWithInvalidType":0.041,"Feature\\OrderTest::testGetWeatherWithInvalidType":0.107,"Unit\\OrderTest::testGetWeatherWithInvalidFormat":0,"Feature\\OrderTest::testGetWeatherWithInvalidFormat":0,"Feature\\OrderTest::testGetWeatherWithGuzzleRuntimeException":0.217,"Feature\\OrderTest::testGetHttpClient":0.043,"Feature\\OrderTest::testSetGuzzleOptions":0.01,"Unit\\OrderTest::testGetWeatherWithGuzzleRuntimeException":0.101,"Unit\\OrderTest::testGetHttpClient":0.02,"Unit\\OrderTest::testSetGuzzleOptions":0.004,"Feature\\OrderTest::testGetProductOrder":0.491,"Feature\\OrderTest::testCreateProductOrder":0.146}}

View File

@ -114,4 +114,16 @@ class Order
]; ];
return $this->baseFun($data, 'production.status'); return $this->baseFun($data, 'production.status');
} }
/**
* 加工工单创建
* @return mixed|string
* @throws GuzzleException
* @throws HttpException
* @throws InvalidArgumentException
*/
public function createProductOrder($data)
{
return $this->baseFun($data, 'production.create');
}
} }

View File

@ -87,4 +87,16 @@ class OrderTest extends TestCase
$w->getProductOrder('SN23454324565432'); $w->getProductOrder('SN23454324565432');
$this->assertInstanceOf(ClientInterface::class, $w->getHttpClient()); $this->assertInstanceOf(ClientInterface::class, $w->getHttpClient());
} }
public function testCreateProductOrder()
{
$w = new Order('mock-key');
$data = [
'cube_plan' => 32.12,
'owner' => 'ykxiao'
];
$w->createProductOrder($data);
$this->assertInstanceOf(ClientInterface::class, $w->getHttpClient());
}
} }