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,44 @@
|
||||
syntax = "v1"
|
||||
|
||||
import (
|
||||
"base.api"
|
||||
)
|
||||
|
||||
type (
|
||||
ProductionReportReq {
|
||||
StartTime string `form:"startTime,optional"` // YYYY-MM
|
||||
EndTime string `form:"endTime,optional"` // YYYY-MM
|
||||
Granularity string `form:"granularity,optional"` // month 或 day,默认 month
|
||||
}
|
||||
ProductionReportSummary {
|
||||
TotalCompleted int `json:"totalCompleted"`
|
||||
TotalScrapped int `json:"totalScrapped"`
|
||||
QualificationRate float64 `json:"qualificationRate"`
|
||||
PlanAchievementRate float64 `json:"planAchievementRate"`
|
||||
}
|
||||
CategoryStat {
|
||||
Category string `json:"category"`
|
||||
Completed int `json:"completed"`
|
||||
Scrapped int `json:"scrapped"`
|
||||
QualificationRate float64 `json:"qualificationRate"`
|
||||
}
|
||||
ProductionTrendItem {
|
||||
Period string `json:"period"`
|
||||
Categories []CategoryStat `json:"categories"`
|
||||
}
|
||||
ProductionReportReply {
|
||||
Summary ProductionReportSummary `json:"summary"`
|
||||
Trend []ProductionTrendItem `json:"trend"`
|
||||
}
|
||||
)
|
||||
|
||||
@server (
|
||||
jwt: Auth
|
||||
group: reports
|
||||
prefix: /api/v1
|
||||
)
|
||||
service hougai-api {
|
||||
@doc "产量报表(按月/日+大类统计)"
|
||||
@handler productionReport
|
||||
get /reports/production (ProductionReportReq) returns (ProductionReportReply)
|
||||
}
|
||||
Reference in New Issue
Block a user