This commit is contained in:
parent
c760f26478
commit
c9484deaec
22
README.md
22
README.md
|
@ -22,9 +22,27 @@ $w = new Order($secretKey);
|
|||
// 获取工单数据
|
||||
$response = $w->getProductOrder('SN5436745676543');
|
||||
|
||||
// 加工工单原木材种
|
||||
$w->getWoodTypeOptions([
|
||||
'company_id' => 1
|
||||
]);
|
||||
|
||||
// 加工工单加工等级
|
||||
$w->getProductionLevelOptions([
|
||||
'company_id' => 1
|
||||
]);
|
||||
|
||||
// 创建加工工单
|
||||
$response = $w->createProductOrder([
|
||||
'cube_plan' => 32.23,
|
||||
'owner' => 'ykxiao'
|
||||
'company_id' => 1,
|
||||
'wood_type_id' => 1,
|
||||
'wood_level_id' => 1,
|
||||
'spec_thickness' => 12,
|
||||
'spec_width' => 22,
|
||||
'spec_length' => 38,
|
||||
'number_width' => 12,
|
||||
'number_height' => 22,
|
||||
'number_pcs' => 10,
|
||||
'owner' => 'ykxiao'
|
||||
]);
|
||||
```
|
||||
|
|
|
@ -115,6 +115,29 @@ class Order
|
|||
return $this->baseFun($data, 'production.status');
|
||||
}
|
||||
|
||||
/**
|
||||
* 加工工单原木材种
|
||||
* @return mixed|string
|
||||
* @throws GuzzleException
|
||||
* @throws HttpException
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
public function getWoodTypeOptions($data)
|
||||
{
|
||||
return $this->baseFun($data, 'Wood.types');
|
||||
}
|
||||
/**
|
||||
* 加工等级
|
||||
* @return mixed|string
|
||||
* @throws GuzzleException
|
||||
* @throws HttpException
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
public function getProductionLevelOptions($data)
|
||||
{
|
||||
return $this->baseFun($data, 'production.levels');
|
||||
}
|
||||
|
||||
/**
|
||||
* 加工工单创建
|
||||
* @return mixed|string
|
||||
|
|
Loading…
Reference in New Issue