58 lines
1.5 KiB
Plaintext
58 lines
1.5 KiB
Plaintext
syntax = "v1"
|
|||
|
|
|
||
|
|
import (
|
||
|
|
"base.api"
|
||
|
|
)
|
||
|
|
|
||
|
|
type (
|
||
|
|
InspectionInfoReply {
|
||
|
|
OrderId int `json:"orderId"`
|
||
|
|
OrderNo string `json:"orderNo"`
|
||
|
|
WorkpieceType int `json:"workpieceType"`
|
||
|
|
ScanCode string `json:"scanCode"`
|
||
|
|
JobId int `json:"jobId"`
|
||
|
|
}
|
||
|
|
|
||
|
|
InspectionImageReply {
|
||
|
|
Id int `json:"id"`
|
||
|
|
JobId int `json:"jobId"`
|
||
|
|
WorkpieceNo string `json:"workpieceNo"`
|
||
|
|
WorkOrderNo string `json:"workOrderNo"`
|
||
|
|
PalletCode string `json:"palletCode"`
|
||
|
|
FileName string `json:"fileName"`
|
||
|
|
FilePath string `json:"filePath"`
|
||
|
|
FileSize int64 `json:"fileSize"`
|
||
|
|
CapturedAt string `json:"capturedAt"`
|
||
|
|
}
|
||
|
|
|
||
|
|
QueryInspectionImagesReq {
|
||
|
|
JobId int `form:"jobId,optional"`
|
||
|
|
Page int `form:"page,optional,default=1"`
|
||
|
|
Limit int `form:"limit,optional,default=20"`
|
||
|
|
StartDate string `form:"startDate,optional"`
|
||
|
|
EndDate string `form:"endDate,optional"`
|
||
|
|
WorkOrderNo string `form:"workOrderNo,optional"`
|
||
|
|
PalletCode string `form:"palletCode,optional"`
|
||
|
|
WorkpieceNo string `form:"workpieceNo,optional"`
|
||
|
|
}
|
||
|
|
|
||
|
|
QueryInspectionImagesReply {
|
||
|
|
Data []InspectionImageReply `json:"data"`
|
||
|
|
Total int `json:"total"`
|
||
|
|
}
|
||
|
|
)
|
||
|
|
|
||
|
|
@server(
|
||
|
|
jwt: Auth
|
||
|
|
group: inspection
|
||
|
|
prefix: /api/v1
|
||
|
|
)
|
||
|
|
service hougai-api {
|
||
|
|
@doc "获取当前检测信息"
|
||
|
|
@handler getInspectionInfo
|
||
|
|
get /inspection/info returns (InspectionInfoReply)
|
||
|
|
|
||
|
|
@doc "查询检测图片列表"
|
||
|
|
@handler queryInspectionImages
|
||
|
|
get /inspection/images (QueryInspectionImagesReq) returns (QueryInspectionImagesReply)
|
||
|
|
}
|