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.
 

2.5 KiB

批量删除原材料分批

此接口用于ERP删除发料数据,支持母批发料删除。
此接口需要认证,详情请查看《认证方式》。


基本信息

方法:POST
URL: http://localhost:8033/open/DeleteMaterialBatches


请求

请求参数

参数名 类型 必填 说明
profile String 厂区
workorder String 工单号
batches String 退料数据

batches

参数名 类型 必填 说明
workOrder String 工单号
batchNumber String 母批号
subBatchNumber String 子批号,发料对接子批号则传递子批号
materialCode String 物料编码
count Double 发料数量

请求示例:

{
  "data":{
    "profile": "测试",
    "batches":[
      {
        "profile": "测试",
        "workOrder": "12346",
        "batchNumber": "CELL1000",
        "subBatchNumber": "CELL1000-01",
        "materialCode": "CELL12",
        "uom": "块",
        "count": 100,
        "supplierBatchNo": "ZL0203001",
        "supplier": "中来",
        "secondSupplier": "中来",
        "remark": "这里是备注",
        "materialAttrs":[
          {
            "materialTypeCode": "CELL",
            "materialTypeDesc": "电池片",
            "attrCode": "GG",
            "attrName": "规格",
            "valueCode": "middle",
            "value": "中号"
          }
        ]
      }
    ]
  }
}

响应

响应字段

字段 类型 说明
clock string 当前服务器时钟。
status string 状态,ok:成功,error:错误,exception:异常
message string 返回报错信息
data object 成功后返回具体内容

data:

字段 类型 说明
{
	"clock": "2024-01-22 13:30:52.964",
	"duration": "1.56s",
	"status": "ok",
	"data": {}
}

{ "clock": "2024-01-22 13:28:13.928", "duration": "66.1s", "status": "exception", "message": "工单【SLTZ301-240100008】不存在。", "data": { "type": "System.Exception", "message": "工单【SLTZ301-240100008】不存在。", "stack": [ "at One.MesGroup.Web.OpenController.InvokeMesMain() in F:\Code管理\L8WebNew\L8WEB\webapi\One.MesGroup.Web\OpenController.cs:line 306", "at One.MesGroup.Web.OpenController.Default() in F:\Code管理\L8WebNew\L8WEB\webapi\One.MesGroup.Web\OpenController.cs:line 245" ] } }