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.
 

1.8 KiB

添加工单BOM信息(AddWorkorderBom)

此接口仅用于增加工单的BOM,需要工单存在


基本信息

方法:POST

URL: http://localhost:8033/open/AddWorkorderBom


请求

请求参数

参数名 类型 必填 说明
profile string 厂区代码
workorder string 工单号
bom Array bom信息

bom字段

参数名 类型 必填 说明
productCode string 产品编码
materialCode string 物料编码
isPrimary int 是否主料 0否,1是
primaryPart string 主料物料编码,如果isPrimary=1,则与materialCode相同
ProcessCode string 工序代码
serialRequirement double 物料单耗
uom string 单位
partType string 物料类别
lostRatio string 物料损耗
origBatchNbr string 母批号

示例 1:保存工单bom信息

{
	"data": {
		"profile": "测试厂区",
		"workorder": "1407",
		"bom": [{
			"productCode": "PD004",
			"materialCode": "CELL001",
			"isPrimary": 1,
			"primaryPart": "CELL001",
			"ProcessCode": "M15",
			"SerialRequirement": 3.2,
			"Uom": "pcs",
			"PartType": "CELL",
			"LostRatio": 0.01,
			"OrigBatchNbr": ""
		}, {
			"productCode": "PD004",
			"materialCode": "CELL002",
			"isPrimary": 0,
			"primaryPart": "CELL001",
			"ProcessCode": "M15",
			"SerialRequirement": 3.2,
			"Uom": "pcs",
			"PartType": "CELL",
			"LostRatio": 0.01,
			"OrigBatchNbr": ""
		}]
	}
}

响应

执行成功时,响应如下:

{
	"clock": "2023-06-25 20:00:00.000",
	"status": "ok",
	"data": {}
}

执行报错:

{
  "clock": "2023-06-25 20:00:00.000",
  "status": "exception",
  "message": "错误信息",
  "data": {}
}