group_api.go 2.0 KB

1234567891011121314151617181920212223242526272829303132
  1. package routers
  2. import (
  3. "tmr-watch/http/handle/group"
  4. "github.com/gin-gonic/gin"
  5. )
  6. func GroupAPI(opts ...func(engine *gin.Engine)) func(s *gin.Engine) {
  7. return func(s *gin.Engine) {
  8. for _, opt := range opts {
  9. opt(s)
  10. }
  11. apiPasture := s.Group("/pasture")
  12. apiPasture.POST("feed_formula/distribute", group.DistributeFeedFormula) // 饲料配方下发
  13. apiPasture.POST("feed_formula/cancel/distribute", group.CancelDistributeFeedFormula) // 取消饲料配方下发
  14. apiPasture.POST("feed_formula/detail_list", group.FeedFormulaDetailList) // 配方详细
  15. apiPasture.POST("feed_formula/edit_recode/list", group.EditRecodeFeedFormula) // 饲料配方修改记录
  16. apiPasture.POST("feed_formula/is_modify", group.FeedFormulaIsModify) // 饲料配方是否可修改
  17. apiPasture.POST("feed_formula/async", group.FeedFormulaAsyncList) // 获取配方列表
  18. apiPasture.POST("feed/async", group.FeedAsyncList) // 获取饲料列表
  19. apiPasture.POST("dashboard/accuracy_data", group.AnalysisAccuracy) // 准确率分析
  20. apiPasture.POST("dashboard/process_analysis", group.ProcessAnalysis) // 执行时间
  21. apiPasture.POST("dashboard/sprinkle_statistics", group.SprinkleStatistics) // 撒料统计
  22. apiPasture.POST("forage_category/distribute", group.ForageCategoryDistribute) // 饲料分类下发
  23. apiPasture.POST("forage_category/delete", group.ForageCategoryDelete) // 饲料分类删除
  24. apiPasture.POST("cattle_category/distribute", group.CowCategoryDistribute) // 畜牧分类下发
  25. apiPasture.POST("cattle_category/delete", group.CowCategoryDelete) // 畜牧分类删除
  26. apiPasture.POST("feed/usage", group.FeedUsage) // 配方使用概况
  27. apiPasture.POST("feed_formula/version", group.FeedFormulaVersion) // 集团端配方信息更新同步
  28. }
  29. }