Compare commits

...

2 Commits

Author SHA1 Message Date
hongwenwu 4829305a44 Merge branch 'dev' of https://git.tool.dwoodauto.com/ykxiao/dmmes into dev 2023-09-09 13:16:12 +08:00
hongwenwu c9484deaec 验证 2023-09-09 13:16:03 +08:00
2 changed files with 43 additions and 2 deletions

View File

@ -24,10 +24,28 @@ $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'
]);
```

View File

@ -106,6 +106,29 @@ class Order
return $this->sendRequest('production.status', $data);
}
/**
* 加工工单原木材种
* @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