MES标准开放接口
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

150 lines
3.9 KiB

1 year ago
### 查询工单BOM信息(getWorkorderBom)
1 year ago
1 year ago
此接口用于查询对应工单号的bom信息
1 year ago
---
### 基本信息
方法:POST
1 year ago
URL: http://localhost:8033/open/getWorkorderBom
1 year ago
---
### 请求
请求参数
| 参数名 | 类型 | 必填 | 说明 |
| :-- | :-- | :-- | :-- |
| profile | string | 是 | 厂区代码 |
| workorder | string | 是 | 工单号 |
1 year ago
示例 1:查询对应工单号的bom信息
1 year ago
```
{
"data": {
"profile": "测试",
"workorder": "workorders"
1 year ago
}
}
```
---
### 响应
响应字段
| 参数名 | 类型 | 说明 |
| :-- | :-- | :-- |
| workorder | string | 工单号 |
| productCode | string | 产品编码 |
| materialCode | string | 物料编码 |
| isPrimary | int | 是否主料 0否,1是|
| primaryPart | string | 主料物料编码,如果isPrimary=1,则与materialCode相同 |
| ProcessCode | string | 工序代码 |
| SerialRequirement | double | 物料单耗 |
| uom | string | 单位 |
| PartType | string | 物料类别编码 |
| partTypeDesc | string | 物料类别描述 |
| lostRatio | string | 物料损耗 |
| origBatchNbr | string | 母批号 |
1 year ago
查询成功时,响应如下:
```
{
"clock": "2023-07-04 18:07:52.287",
"status": "ok",
"data": {
"list": [
{
"workorder": "workorders",
"productCode": "prodect_code",
"materialCode": "1002211010018723",
"isPrimary": 1,
"primaryPart": "1002211010018723",
"processCode": "M15",
"serialRequirement": 1.0,
"uom": "m2",
"partType": "EVA",
"partTypeDesc": "EVA",
"lostRatio": 0.0,
"origBatchNbr": "1002211010018723"
},
{
"workorder": "workorders",
"productCode": "prodect_code",
"materialCode": "333",
"isPrimary": 1,
"primaryPart": "333",
"processCode": "M10",
"serialRequirement": 1.0,
"uom": "pcs",
"partType": "CELL",
"partTypeDesc": "电池片",
"lostRatio": 0.0,
"origBatchNbr": "333"
},
{
"workorder": "workorders",
"productCode": "prodect_code",
"materialCode": "boli001",
"isPrimary": 1,
"primaryPart": "boli001",
"processCode": "M10",
"serialRequirement": 1.0,
"uom": "pcs",
"partType": "GLASS",
"partTypeDesc": "玻璃",
"lostRatio": 0.0,
"origBatchNbr": "boli001"
},
{
"workorder": "workorders",
"productCode": "prodect_code",
"materialCode": "flux_materials_class",
"isPrimary": 1,
"primaryPart": "flux_materials_class",
"processCode": "M10",
"serialRequirement": 1.0,
"uom": "桶_describe",
"partType": "Solder",
"partTypeDesc": "助焊剂",
"lostRatio": 0.0,
"origBatchNbr": "flux_materials_class"
},
{
"workorder": "workorders",
"productCode": "prodect_code",
"materialCode": "flux_materials_class_2",
"isPrimary": 1,
"primaryPart": "flux_materials_class_2",
"processCode": "M10",
"serialRequirement": 100.0,
"uom": "桶_describe",
"partType": "Solder",
"partTypeDesc": "助焊剂",
"lostRatio": 0.0,
"origBatchNbr": "flux_materials_class_2"
}
]
}
1 year ago
}
```
查询报错:
```
{
"clock": "2023-06-25 20:00:00.000",
"status": "exception",
"message": "错误信息",
"data": {}
}
```