
# 创建生产工单
接口地址：
https://v3-hw-openapi.blacklake.cn /api/openapi/domain/web/v1/route/med/open/v1/work_order/_doImport
接口功能描述： 导入创建生产工单
请求方式： POST
接口备注： 无
请求体参数（见MES接口文档）:
请求体样例：
{
"code": "13",
"planFinishTime": "2022-11-24 00:00:00",
"planStartTime": "2022-11-24 00:00:00",
"workOrderType": "普通",
"inputMaterialControlOpenCOs": \[
{
"inputAmountDenominator": "1",
"inputQcState": "\[1,2,3\]",
"limit": "1",
"lineSeq": "11",
"materialCode": "YY017",
"materialName": "Item4",
"seq": "20",
"workOrderCode": "1127"
}
\],
"inputMaterialOpenCOs": \[
{
"materialCode": "YY017",
"materialName": "Item4",
"seq": "sting",
"specificProcessInput": 1,
"splitSopControlInput": 1,
"subInputAmountDenominator": "1",
"subInputAmountNumerator": "1",
"suppliers": "sup1",
"unitName": "1",
"version": "v1",
"workOrderCode": "1127"
}
\],
"outputMaterialOpenCOs": \[
{
"lineSeq": "0",
"mainFlagInt": 1,
"mainFlag": "1",
"materialCode": "0000121221",
"plannedAmount": "1",
"workOrderCode": "1127"
}
\],
"processPlanOpenCOs": \[
{
"code": "1",
"processNum": "12",
"workOrderCode": "1127"
}
\]
}
响应体样例：
{
"code": 200,
"data": {
"list": \[{
"bomId": 0,
"bomVersion": "string",
"createdAt": 0,
"creator": {
"avatarUrl": "string",
"code": "string",
"id": 1,
"name": "string"
},
"customFields": \[{
"choiceValues": \[{
"choiceCode": "string",
"choiceValue": "string",
"id": 0,
"isDefault": 0,
"sequence": 0
}\],
"datetimeFormat": "string",
"decimalNumber": 0,
"defaultValue": "string",
"esField": "string",
"fieldCode": "string",
"fieldExportValue": "object",
"fieldId": 0,
"fieldName": "string",
"fieldRemind": "string",
"fieldType": 0,
"fieldValue": "object",
"id": 0,
"isRefer": 0,
"isRequired": 0,
"isUsed": 0,
"maxLength": 0,
"maxValue": 0,
"objectCode": "string",
"reference": "string",
"targetType": 0
}\],
"disqualifiedHoldAmount": {
"amount": 0,
"amountDisplay": "string",
"unitCode": "string",
"unitId": 0,
"unitName": "string"
},
"expectedAmount": {
"amount": 0,
"amountDisplay": "string",
"unitCode": "string",
"unitId": 0,
"unitName": "string"
},
"externalOrderCode": "string",
"mainOutputBatchNumber": "string",
"materialInfo": {
"attribute": \[{
"attributeItem": {
"content": "string",
"id": 1
},
"id": 1,
"name": "string"
}\],
"baseInfo": {
"bizRange": \[{
"code": 1,
"message": "string"
}\],
"bizType": {
"code": 1,
"message": "string"
},
"code": "string",
"enableFlag": {
"code": 1,
"message": "string"
},
"id": 1,
"name": "string",
"orgId": 1,
"remark": "string",
"specification": "string"
},
"batchManagementEnable": {
"code": 1,
"message": "string"
},
"category": {
"code": "string",
"count": "string",
"enableFlag": {
"code": 1,
"message": "string"
},
"id": 0,
"leaf": {
"code": 1,
"message": "string"
},
"level": 0,
"name": "string",
"orgId": 0,
"remark": "string"
},
"conversions": \[{
"fromUnitCount": 0,
"fromUnitId": 0,
"fromUnitName": "string",
"id": 0,
"orgId": 0,
"toUnitCount": 0,
"toUnitId": 0,
"toUnitName": "string"
}\],
"documents": \[{
"documentId": 0,
"documentPath": "string"
}\],
"unit": {
"code": "string",
"enableFlag": {
"code": 1,
"message": "string"
},
"enablePrecision": {
"code": 1,
"message": "string"
},
"id": 0,
"name": "string",
"orgId": 0,
"precisionFigure": 0,
"remark": "string",
"roundingRole": {
"code": 1,
"message": "string"
},
"unitType": 0
},
"unitList": \[{
"code": "string",
"enableFlag": {
"code": 1,
"message": "string"
},
"enablePrecision": {
"code": 1,
"message": "string"
},
"id": 0,
"name": "string",
"orgId": 0,
"precisionFigure": 0,
"remark": "string",
"roundingRole": {
"code": 1,
"message": "string"
},
"unitType": 0
}\]
},
"operator": {
"avatarUrl": "string",
"code": "string",
"id": 1,
"name": "string"
},
"pauseFlag": 0,
"pickOrderPreparedAmount": {
"amount": 0,
"amountDisplay": "string",
"unitCode": "string",
"unitId": 0,
"unitName": "string"
},
"plannedAmount": {
"amount": 0,
"amountDisplay": "string",
"unitCode": "string",
"unitId": 0,
"unitName": "string"
},
"plannedEndTime": 0,
"plannedStartTime": 0,
"planningDepartment": {
"code": "string",
"id": 1,
"name": "string"
},
"planningUser": {
"avatarUrl": "string",
"code": "string",
"id": 1,
"name": "string"
},
"processRoute": {
"code": "string",
"id": 0,
"name": "string",
"remark": "string",
"status": {
"code": 1,
"message": "string"
}
},
"productionDepartment": {
"code": "string",
"id": 1,
"name": "string"
},
"productionSupervisor": {
"avatarUrl": "string",
"code": "string",
"id": 1,
"name": "string"
},
"qualifiedHoldAmount": {
"amount": 0,
"amountDisplay": "string",
"unitCode": "string",
"unitId": 0,
"unitName": "string"
},
"resource": {
"code": "string",
"id": 0,
"name": "string"
},
"shift": {
"id": 1,
"name": "string"
},
"sonObjects": \[{
"customFields": \[{
"choiceValues": \[{
"choiceCode": "string",
"choiceValue": "string",
"id": 0,
"isDefault": 0,
"sequence": 0
}\],
"datetimeFormat": "string",
"decimalNumber": 0,
"defaultValue": "string",
"esField": "string",
"fieldCode": "string",
"fieldExportValue": "object",
"fieldId": 0,
"fieldName": "string",
"fieldRemind": "string",
"fieldType": 0,
"fieldValue": "object",
"id": 0,
"isRefer": 0,
"isRequired": 0,
"isUsed": 0,
"maxLength": 0,
"maxValue": 0,
"objectCode": "string",
"reference": "string",
"targetType": 0
}\],
"objectCode": "string"
}\],
"specifiedMaterial": 0,
"totalHoldAmount": {
"amount": 0,
"amountDisplay": "string",
"unitCode": "string",
"unitId": 0,
"unitName": "string"
},
"updatedAt": 0,
"warehousedAmount": {
"amount": 0,
"amountDisplay": "string",
"unitCode": "string",
"unitId": 0,
"unitName": "string"
},
"workOrderCloseType": {
"code": 1,
"message": "string"
},
"workOrderCode": "string",
"workOrderId": 0,
"workOrderStatus": {
"code": 1,
"message": "string"
},
"workOrderType": {
"code": 1,
"message": "string"
}
}\],
"page": 1,
"total": 1
},
"fieldPermission": {
"encoding": "string",
"noAccess": \[
"string"
\],
"readonly": \[
"string"
\]
},
"message": "string",
"needCheck": 0,
"subCode": "string"
}
