package route import ( "kpt-pasture/http/handler/analysis" "github.com/gin-gonic/gin" ) func AnalysisAPI(opts ...func(engine *gin.Engine)) func(s *gin.Engine) { return func(s *gin.Engine) { for _, opt := range opts { opt(s) } // analysis API 组 analysisRoute := authRouteGroup(s, "/api/v1/analysis/") analysisRoute.POST("/weight/scatter/plot", analysis.WeightScatterPlot) // 体重散点图 analysisRoute.POST("/weight/range", analysis.WeightRange) // 体重区间图 analysisRoute.POST("/mating/timely", analysis.MatingTimeLy) // 配种及时性 analysisRoute.POST("/pen/weight", analysis.PenWeight) // 栏舍体重 analysisRoute.POST("/abortion/rate", analysis.AbortionRate) // 流产率 analysisRoute.POST("/twenty/one/pregnant/rate", analysis.TwentyOnePregnantRate) // 21天怀孕率 analysisRoute.POST("/pregnancy/report", analysis.PregnancyReport) // 孕检报告 analysisRoute.POST("/calving/report", analysis.CalvingReport) // 产犊报告 analysisRoute.POST("/disease/cure/report", analysis.DiseaseCureReport) // 疾病治疗报告 analysisRoute.POST("/sale/cow/report", analysis.SaleCowReport) // 销售牛牛报告 analysisRoute.POST("/single/factor/pregnant/report", analysis.SingleFactorInfantSurvivalRate) // 单因素受胎率 analysisRoute.POST("/multi/factor/pregnant/report", analysis.MultiFactorInfantSurvivalRate) // 多因素受胎率 analysisRoute.POST("/pen/behavior", analysis.PenBehaviorAnalysis) // 栏舍行为数据 analysisRoute.POST("/pen/behavior/monitor", analysis.PenBehaviorDaily) // 栏舍饲喂监测 } }