API
1. 登录接口
接口说明
此接口是登录接口,用于客户登录使用此接口是登录接口,用户需要先登录才能开始接下流程。
url | /api/admin/tryLogin |
---|---|
协议 | http |
请求方式 | POST |
请求说明
参数名称 | 是否必须 | 类型 | 描述 |
---|---|---|---|
ProductionStation | 是 | string | 工位 |
CardNo | 否 | String | 卡号 |
Name | 否 | string | 账号 |
Password | 否 | string | 密码 |
请求示例
{
"ProductionStation":10,
"CardNo":"0000"
}
返回说明
参数名称 | 类型 | 描述 |
---|---|---|
code | int | 状态码0成功;1错误 |
message | String | 信息描述 |
data | {} |
返回示例
{
"code":0,
"message":"登录成功",
"data":{
"id":0,
"name":"",
"chineseName":"",
"englishName":"",
"photo":"",
"staffNo":""
}
}
获取所有产线
接口说明
此接口用于初次登录时获取所有产线和工站信息,以便接进入接下来的流程
url | /api/infrastructure/getAllProductionLine |
---|---|
协议 | http |
请求方式 | POST |
请求说明
参数名称 | 是否必须 | 类型 | 描述 |
---|---|---|---|
无 |
返回说明
参数名称 | 类型 | 描述 |
---|---|---|
code | int | 状态码0成功;1错误 |
message | String | 信息描述 |
data | ProductionLine[] | 产线列表 |
返回示例
{
"code":0,
"message":"",
"data": [{
id: int,
code: string,
description: string,
identifier: string,
accountControl: Nullable<bool>,
materialControl: Nullable<bool>,
productionStations: [{
id: int,
code: string,
description: string,
stationType: string,
accountControl: Nullable<bool>,
materialControl: Nullable<bool>,
ProductionProcesses: [{
id: int,
code: string,
description: string,
processType: Nullable<int>,
vehicleType: Nullable<int>,
enableControl: Nullable<bool>
}...]
}...]
}...] //
}
获取产线工位信息
接口说明
url | /api/infrastructure/retrieveProductionStation |
---|---|
协议 | http |
请求方式 | POST |
请求说明
此接口是登录后,在首页中查看产线工站信息
参数名称 | 是否必须 | 类型 | 描述 |
---|---|---|---|
ProductionLine | 是 | string | 产线 |
StationType | 否 | String | 工位类型 |
返回说明
参数名称 | 类型 | 描述 |
---|---|---|
code | int | 状态码0成功;1错误 |
message | String | 信息描述 |
data | ProductionStation[] | 工位信息列表 |
返回示例
{
"code":0,
"message":"",
"data":[{
id: int,
code: string,
decription: string,
currentState: string,
stationType: string,
accountControl: Nullable<bool>,
materialControl: Nullable<bool>
}...]
}
请求进站
接口说明
url | /api/production/enterProductionStation |
---|---|
协议 | http |
请求方式 | POST |
请求说明
进入工位,判断工艺路线并自动生成节拍数据
参数名称 | 是否必须 | 类型 | 描述 |
---|---|---|---|
ProductionStation | 是 | string | 工位代号 |
TrayNo | 否 | String | 托盘号 |
ProductSerialNo | 否 | string | 产品序列号 |
PackageNo | 否 | string | 包装箱号 |
参数特殊说明
返回说明
参数名称 | 类型 | 描述 |
---|---|---|
code | int | 状态码: 0, 工艺路线正确; 1, 校验失败; 2, 返工产品;3,工艺路线错误; 4, 完工产品;5, 读取托盘信息失败 |
message | String | 信息描述 |
data | {} |
返回示例
{
"code":0,
"message":"",
"data":{
productOrderNo: string,
productSerialNo: string,
SalesOrderNo: string,
currentState: string,
itemNo: string,
orderTime: DateTime,
productCategory: string,
productModel: string,
materialNo: string,
materialDescription: string,
currentState: string,
propertyBrief: string,
remark: string,
productionProcess: {
code: string,
description: string,
sopLink: string
}
}
}
获取测试项接口数据
接口说明
测试工位需要单独获取一个测试项数据
url | /api/quality/getTestProjectWithParameter |
---|---|
协议 | http |
请求方式 | POST |
请求说明
参数名称 | 是否必须 | 类型 | 描述 |
---|---|---|---|
ProductionStation | 是 | string | 工位代号 |
TrayNo | 否 | String | 托盘号 |
ProductSerialNo | 否 | string | 产品序列号 |
参数特殊说明
返回说明
参数名称 | 类型 | 描述 |
---|---|---|
code | int | 状态码: 0, 成功; 1, 失败; |
message | String | 信息描述 |
data | TestProjects[] |
返回示例
{
"code":0,
"message":"",
"data":[{
id: int,
code: string,
description: string,
inputParameters: [{
code: string,
description: string,
standardValue: double,
maximumValue: double,
minimumValue: double,
unit: string,
groupCode: string
}...],
outputParameters: [{
code: string,
description: string,
standardValue: string.empty,
maximumValue: string.empty,
minimumValue: string.empty,
outputValue: string.empty,
unit: string,
boundsRequired: bool
groupCode: string
}...]
}...]
}
上报结果接口
接口说明
url | /api/production/createProductTestRecord |
---|---|
协议 | http |
请求方式 | POST |
请求说明
单个测试项步骤上报结果
参数名称 | 是否必须 | 类型 | 描述 |
---|---|---|---|
ProductSerialNo | 是 | string | 产品序列号 |
ProductionStation | 是 | String | 产线工位 |
TestProject | 是 | string | 测试项目 |
TestStartTime | 是 | DateTime | 起始时间 |
TestEndTime | 是 | DateTime | 结束时间 |
TestData | 是 | string | 测试数据 |
IsQualified | 是 | bool | 是否合格 |
返回说明
参数名称 | 类型 | 描述 |
---|---|---|
code | int | 状态码: 0, 成功; 1, 失败; |
message | String | 信息描述 |
返回示例
{
"code":0,
"message":""
}
出站
接口说明
url | /api/production/exitProductionStation |
---|---|
协议 | http |
请求方式 | POST |
请求说明
出站
参数名称 | 是否必须 | 类型 | 描述 |
---|---|---|---|
ProductionStation | 是 | string | 工位代号 |
TrayNo | 否 | String | 托盘号 |
ProductSerialNo | 否 | string | 产品序列号 |
PackageNo | 否 | string | 包装箱号 |
IsFail | 否 | bool | 是否失败;测试失败但不返工,需要人工确认后处理 |
IsRework | 否 | bool | 是否返工;测试失败并直接返工 |
ReworkReason | 否 | string | 返工原因 |
参数特殊说明
托盘号和产品序列号和包装箱号三个参数必选其一
IsRework为true时,IsFail为无效参数
IsRework为true时,ReworkReason必选
返回说明
参数名称 | 类型 | 描述 |
---|---|---|
code | int | 状态码: 0, 成功; 1, 失败; |
message | String | 信息描述 |
返回示例
{
"code":0,
"message":""
}
查询产线路口信息
接口说明
url | /api/infrastructure/retrieveProductionCrossway |
---|---|
协议 | http |
请求方式 | POST |
请求说明
出站
参数名称 | 是否必须 | 类型 | 描述 |
---|---|---|---|
ProductionLine | 是 | string | 产线 |
返回说明
参数名称 | 类型 | 描述 |
---|---|---|
code | int | 状态码: 0, 成功; 1, 失败; |
message | String | 信息描述 |
data | ProductionCrossways[] |
返回示例
{
"code":0,
"message":"",
"data": [{
"id": 0,
"code": "",
"description":"",
"defaultTurn":0,
"remark":""
}]
}
设置失败后续处理
接口说明
检查产品的工序失败,设定失败后续处理方式
url | /api/production/checkProductProcessRouteFailure |
---|---|
协议 | http |
请求方式 | POST |
请求说明
参数名称 | 是否必须 | 类型 | 描述 |
---|---|---|---|
ProductionStation | 是 | string | 工位代号 |
ProductSerialNo | 是 | String | 产品序列号 |
HandleMethod | 否 | int | 处理方式;默认为1,1表示重试,2表示返工,3表示忽略跳过 |
返回说明
参数名称 | 类型 | 描述 |
---|---|---|
code | int | 状态码: 0, 成功; 1, 失败; |
message | String | 信息描述 |
返回示例
{
"code":0,
"message":""
}