70 lines
1.5 KiB
Plaintext
70 lines
1.5 KiB
Plaintext
syntax = "v1"
|
|
|
|
import (
|
|
"base.api"
|
|
)
|
|
|
|
type (
|
|
PalletReply {
|
|
Id int `json:"id"`
|
|
PalletCode string `json:"palletCode"`
|
|
WorkOrderId int `json:"workOrderId"`
|
|
DockNo int `json:"dockNo"`
|
|
Status string `json:"status"`
|
|
PassQty int `json:"passQty"`
|
|
NgQty int `json:"ngQty"`
|
|
TotalQty int `json:"totalQty"`
|
|
ArrivedAt string `json:"arrivedAt"`
|
|
CompletedAt string `json:"completedAt,omitempty"`
|
|
ReportedAt string `json:"reportedAt,omitempty"`
|
|
}
|
|
|
|
PalletJobReply {
|
|
Id int `json:"id"`
|
|
WorkpieceNo string `json:"workpieceNo"`
|
|
Status string `json:"status"`
|
|
CurrentStepId string `json:"currentStepId"`
|
|
PositionType string `json:"positionType"`
|
|
}
|
|
|
|
PalletDetailReply {
|
|
PalletReply
|
|
Jobs []PalletJobReply `json:"jobs"`
|
|
}
|
|
|
|
QueryPalletsReq {
|
|
PageReq
|
|
WorkOrderId int `form:"workOrderId,optional"`
|
|
DockNo int `form:"dockNo,optional"`
|
|
Status string `form:"status,optional"`
|
|
}
|
|
|
|
QueryPalletsReply {
|
|
PageReply
|
|
Data []PalletReply `json:"data"`
|
|
}
|
|
|
|
ReportPalletReply {
|
|
Id int `json:"id"`
|
|
Status string `json:"status"`
|
|
}
|
|
)
|
|
|
|
@server (
|
|
jwt: Auth
|
|
group: pallet
|
|
prefix: /api/v1
|
|
)
|
|
service hougai-api {
|
|
@doc "查询托盘列表"
|
|
@handler queryPallets
|
|
get /pallets (QueryPalletsReq) returns (QueryPalletsReply)
|
|
|
|
@doc "获取托盘详情"
|
|
@handler getPallet
|
|
get /pallets/:id (PathId) returns (PalletDetailReply)
|
|
|
|
@doc "托盘报工"
|
|
@handler reportPallet
|
|
post /pallets/:id/report (PathId) returns (ReportPalletReply)
|
|
} |