123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- package route
- import (
- "kpt-tmr-group/http/handler/dashboard"
- "kpt-tmr-group/http/handler/feed"
- "kpt-tmr-group/http/handler/pasture"
- "kpt-tmr-group/http/handler/statistic"
- "github.com/gin-gonic/gin"
- )
- func OpsAPI(opts ...func(engine *gin.Engine)) func(s *gin.Engine) {
- return func(s *gin.Engine) {
- for _, opt := range opts {
- opt(s)
- }
- // 牧场管理
- opsRoute := authRouteGroup(s, "/api/v1/ops/")
- opsRoute.POST("/pasture/add", pasture.AddGroupPasture)
- opsRoute.POST("/pasture/edit", pasture.EditGroupPasture)
- opsRoute.POST("/pasture/list", pasture.SearchGroupPastureList)
- opsRoute.DELETE("/pasture/:pasture_id", pasture.DeleteGroupPasture)
- opsRoute.POST("/pasture/rest_password/:pasture_id", pasture.ResetPasswordGroupPasture)
- opsRoute.POST("/pasture/is_show", pasture.IsShowGroupPasture)
- // 牲牧类型
- opsRoute.POST("/cattle/category/add", pasture.AddCattleCategory)
- opsRoute.POST("/cattle/category/edit", pasture.EditCattleCategory)
- opsRoute.POST("/cattle/category/is_show", pasture.IsShowCattleCategory)
- opsRoute.DELETE("/cattle/category/:cattle_category_id", pasture.DeleteCattleCategory)
- opsRoute.POST("/cattle/category/list", pasture.SearchCattleCategory)
- // 饲料类别
- opsRoute.POST("/forage/category/add", pasture.AddForageCategory)
- opsRoute.POST("/forage/category/edit", pasture.EditForageCategory)
- opsRoute.POST("/forage/category/is_show", pasture.IsShowForageCategory)
- opsRoute.DELETE("/forage/category/:forage_category_id", pasture.DeleteForageCategory)
- opsRoute.POST("/forage/category/list", pasture.SearchForageCategory)
- // 饲料列表
- opsRoute.POST("/forage/add", pasture.AddForage)
- opsRoute.POST("/forage/edit", pasture.EditForage)
- opsRoute.POST("/forage/list", pasture.SearchForageList)
- opsRoute.POST("forage/delete", pasture.DeleteForageList)
- opsRoute.POST("forage/is_show", pasture.IsShowForage)
- opsRoute.POST("forage/excel_import", pasture.ExcelImportForage)
- opsRoute.POST("forage/excel_export", pasture.ExcelExportForage)
- opsRoute.POST("forage/excel_template", pasture.ExcelTemplateForage)
- opsRoute.POST("/forage/small_material", pasture.SmallMaterial)
- opsRoute.POST("/forage/sort", pasture.ForageListSort)
- opsRoute.GET("/forage/enum/list", pasture.SearchForageEnumList)
- // 饲料配方
- opsRoute.POST("/feed_formula/add", feed.AddFeedFormula)
- opsRoute.POST("/feed_formula/edit", feed.EditFeedFormula)
- opsRoute.POST("/feed_formula/list", feed.SearchFeedFormulaList)
- opsRoute.DELETE("/feed_formula/delete/:feed_formula_id", feed.DeleteFeedFormula)
- opsRoute.POST("/feed_formula/is_modify_show", feed.IsShowModifyFeedFormula)
- opsRoute.POST("/feed_formula/excel_export", feed.ExcelExportFeedFormula)
- opsRoute.POST("/feed_formula/excel_import", feed.ExcelImportFeedFormula)
- opsRoute.POST("/feed_formula/excel_template", feed.ExcelTemplateFeedFormula)
- opsRoute.GET("/feed_formula/encode_number", feed.EncodeNumber)
- opsRoute.POST("/feed_formula/distribute", feed.DistributeFeedFormula)
- opsRoute.POST("/feed_formula/usage", feed.Usage)
- //统计分析 statistic analysis
- opsRoute.POST("/feed_estimate/list", statistic.SearchFormulaEstimateList)
- opsRoute.POST("/inventory/statistics", statistic.SearchInventoryStatistics)
- opsRoute.POST("/inventory/statistics/excel_export", statistic.SearchInventoryStatisticsExcelExport)
- opsRoute.POST("/inventory/user_materials_statistics", statistic.SearchUserMaterialsStatistics)
- opsRoute.POST("/inventory/user_materials_statistics/excel_export", statistic.SearchUserMaterialsStatisticsExcelExport)
- opsRoute.POST("/inventory/price_statistics", statistic.SearchPriceStatistics)
- opsRoute.POST("/feed_efficiency/statistics", statistic.SearchFeedStatistics)
- opsRoute.POST("/feed_efficiency/chart_statistics", statistic.SearchFeedChartStatistics)
- opsRoute.POST("/feed_efficiency/cows_analysis", statistic.SearchCowsAnalysis)
- opsRoute.POST("/accuracy/agg_statistics", statistic.SearchAccuracyAggStatistics)
- opsRoute.POST("/accuracy/mixed_statistics", statistic.SearchMixFeedStatistics)
- opsRoute.POST("/accuracy/sprinkle_statistics", statistic.SearchSprinkleStatistics)
- opsRoute.POST("/accuracy/data_by_name", statistic.GetDataByName)
- opsRoute.POST("/process/analysis", statistic.SearchProcessAnalysis)
- opsRoute.POST("/statistics/train_number", statistic.TrainNumber)
- // 首页仪表盘
- opsRoute.POST("/dashboard/accuracy", dashboard.AnalysisAccuracy)
- opsRoute.POST("/dashboard/top_pasture", dashboard.TopPasture)
- opsRoute.POST("/dashboard/exec_time", dashboard.ExecutionTime)
- opsRoute.POST("/dashboard/sprinkle_time", dashboard.SprinkleFeedTime)
- }
- }
|