编辑 | blame | 历史 | 原始文档

MES实验室检测数据API接口文档

1. 保存实验室检测数据

请求地址: POST /api/MesLaboratory/saveLaboratory

请求参数:
json { "createUser": "string", // 创建人 "orderNo": "string" // 工单号 }

返回数据:
json { "status": 0, "message": "OK", "data": { "result": true // 操作是否成功 } }


2. 分页查询实验室检测数据

请求地址: POST /api/MesLaboratory/GetPage

请求参数:
json { "pageIndex": 1, // 页码 "limit": 10, // 每页记录数 "id": "string" // 记录ID(可选) }

返回数据:
json { "status": 0, "message": "OK", "data": { "tbBillList": [ { "billNo": "string", // 工单号 "lineNo": "string", // 生产线体编码 "itemId": 1001, // 物料ID "itemNo": "string", // 物料编码 "itemName": "string", // 物料名称 "itemModel": "string", // 物料规格 "departmentId": 1, // 生产车间ID "departmentCode": "string", // 生产车间编码 "saleOrderNoc": "string", // 销售订单号 "inspectionResult": "string", // 检验结果 "createTime": "2024-01-01 12:00:00", // 创建时间 "createUser": "string", // 创建人 "inspectionTime": "2024-01-01 12:00:00", // 检验时间 "inspectionUser": "string" // 检验人 } ], "totalCount": 100 // 总记录数 } }


3. 录入检验结果

请求地址: POST /api/MesLaboratory/UpdateInspectionResult

请求参数:
json { "id": 1, // 记录ID(必填) "inspectionResult": "string", // 检验结果(可选) "inspectionBy": "string" // 检验人(可选) }

返回数据:
json { "status": 0, "message": "OK", "data": { "result": true // 操作是否成功 } }


通用说明

响应状态码

  • status: 0 - 操作成功
  • status: 1 - 操作失败

错误响应格式

{
  "status": 1,
  "message": "错误信息",
  "data": null
}

注意事项

  1. 所有接口均使用POST方法
  2. 请求头需设置 Content-Type: application/json
  3. 日期时间格式为 yyyy-MM-dd HH:mm:ss
  4. UpdateInspectionResult接口会自动设置检验时间为当前时间