fix: rebuild MES as compilable go-zero+ent backend (renamed bj_power_mes), restore 3 workstation projects from pristine original, align naming; all Go projects go build clean
This commit is contained in:
@@ -0,0 +1,139 @@
|
||||
syntax = "v1"
|
||||
|
||||
import (
|
||||
"base.api"
|
||||
)
|
||||
|
||||
type (
|
||||
// 人工交互信息(对齐 frontend-api.md 第 9 节)
|
||||
ManualAction {
|
||||
Id int `json:"id"`
|
||||
ActionType string `json:"actionType"`
|
||||
Status string `json:"status"`
|
||||
OrderId int `json:"orderId"`
|
||||
JobId int `json:"jobId"`
|
||||
WorkpieceNo string `json:"workpieceNo,optional"`
|
||||
EquipmentId int `json:"equipmentId"`
|
||||
Context interface{} `json:"context,omitempty"`
|
||||
ResolvedAction string `json:"resolvedAction,omitempty"`
|
||||
ResolvedBy string `json:"resolvedBy,omitempty"`
|
||||
CreatedAt string `json:"createdAt"`
|
||||
ResolvedAt string `json:"resolvedAt,omitempty"`
|
||||
}
|
||||
|
||||
// 人工交互查询参数
|
||||
QueryManualActionsReq {
|
||||
PageReq
|
||||
SortReq
|
||||
ActionType string `form:"actionType,optional"`
|
||||
Resolved *bool `form:"resolved,optional"`
|
||||
StartTime *int64 `form:"startTime,optional"`
|
||||
EndTime *int64 `form:"endTime,optional"`
|
||||
}
|
||||
|
||||
// 人工交互查询响应
|
||||
QueryManualActionsReply {
|
||||
PageReply
|
||||
Data []ManualAction `json:"data"`
|
||||
}
|
||||
|
||||
// 扫码失败处理请求
|
||||
ResolveScanFailedReq {
|
||||
PathId
|
||||
Action string `json:"action"` // RETRY_SCAN | RETURN_BAY | SCRAP
|
||||
Remark string `json:"remark,optional"`
|
||||
}
|
||||
|
||||
// 扫码失败处理响应
|
||||
ResolveScanFailedReply {
|
||||
Id int `json:"id"`
|
||||
Status string `json:"status"`
|
||||
ResolvedAction string `json:"resolvedAction"`
|
||||
ResolvedAt int64 `json:"resolvedAt"`
|
||||
}
|
||||
|
||||
// L3 恢复确认请求
|
||||
ConfirmRecoveryReq {
|
||||
PathId
|
||||
Decision string `json:"decision"` // RESUME | WAIT_UNLOAD | SUSPEND | SCRAP
|
||||
ConfirmedPosition string `json:"confirmedPosition,optional"`
|
||||
Remark string `json:"remark,optional"`
|
||||
}
|
||||
|
||||
// L3 恢复确认响应
|
||||
ConfirmRecoveryReply {
|
||||
OrderId int `json:"orderId"`
|
||||
Decision string `json:"decision"`
|
||||
NewStatus string `json:"newStatus"`
|
||||
}
|
||||
|
||||
// 修复工件位置请求 (tempSlotNo/stepId 可选,不传则使用 job 当前值)
|
||||
FixPositionReq {
|
||||
JobId int `json:"jobId"`
|
||||
TempSlotNo int `json:"tempSlotNo,optional"`
|
||||
StepId string `json:"stepId,optional"`
|
||||
PositionType string `json:"positionType"`
|
||||
}
|
||||
|
||||
// 修复工件位置响应
|
||||
FixPositionReply {
|
||||
JobId int `json:"jobId"`
|
||||
}
|
||||
|
||||
// 恢复作业信息
|
||||
RecoveryJobInfo {
|
||||
JobID int `json:"jobId"`
|
||||
WorkpieceNo string `json:"workpieceNo"`
|
||||
WorkOrderID int `json:"workOrderId"`
|
||||
WorkOrderNo string `json:"workOrderNo"`
|
||||
Status string `json:"status"`
|
||||
PositionType string `json:"positionType"`
|
||||
PositionRefID string `json:"positionRefId"`
|
||||
TempSlotNo int `json:"tempSlotNo"`
|
||||
CurrentStepID string `json:"currentStepId"`
|
||||
CurrentStepName string `json:"currentStepName"`
|
||||
DockNo int `json:"dockNo"`
|
||||
DockSlotNo int `json:"dockSlotNo"`
|
||||
ProductTypeID int `json:"productTypeId"`
|
||||
Mismatch string `json:"mismatch,omitempty"`
|
||||
}
|
||||
// 查询恢复作业响应
|
||||
QueryRecoveryJobsReply {
|
||||
Data []RecoveryJobInfo `json:"data"`
|
||||
}
|
||||
// 完成恢复响应
|
||||
CompleteRecoveryReply {
|
||||
Success bool `json:"success"`
|
||||
}
|
||||
)
|
||||
|
||||
@server (
|
||||
jwt: Auth
|
||||
group: manual_action
|
||||
prefix: /api/v1
|
||||
)
|
||||
service hougai-api {
|
||||
@doc "查询人工交互列表"
|
||||
@handler queryManualActions
|
||||
get /manual-actions (QueryManualActionsReq) returns (QueryManualActionsReply)
|
||||
|
||||
@doc "处理扫码失败"
|
||||
@handler resolveScanFailed
|
||||
post /manual-actions/:id/resolve-scan-failed (ResolveScanFailedReq) returns (ResolveScanFailedReply)
|
||||
|
||||
@doc "确认 L3 恢复"
|
||||
@handler confirmRecovery
|
||||
post /recovery/actions/:id/confirm (ConfirmRecoveryReq) returns (ConfirmRecoveryReply)
|
||||
|
||||
@doc "修复工件位置"
|
||||
@handler fixPosition
|
||||
post /recovery/fix-position (FixPositionReq) returns (FixPositionReply)
|
||||
|
||||
@doc "查询恢复作业列表"
|
||||
@handler queryRecoveryJobs
|
||||
get /recovery/jobs returns (QueryRecoveryJobsReply)
|
||||
|
||||
@doc "完成恢复"
|
||||
@handler completeRecovery
|
||||
post /recovery/complete returns (CompleteRecoveryReply)
|
||||
}
|
||||
Reference in New Issue
Block a user