statistics_router.go 1.2 KB
package routers

import (
	"github.com/beego/beego/v2/server/web"
	"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/port/beego/controllers"
)

func init() {
	web.Router("/statistics", &controllers.StatisticsController{}, "Post:CommonStatisticsService")
	c := &controllers.StatisticsController{}
	web.Post("/statistics/hour-productive", c.CommonStatisticsHandler("HourProductiveStatistics"))
	web.Post("/statistics/daily-productive-statistics", c.CommonStatisticsHandler("DailyProductiveStatistics"))
	web.Post("/statistics/proportion-of-second-level-statistics", c.CommonStatisticsHandler("ProportionOfSecondLevelStatistics"))
	web.Post("/statistics/workshop-production-efficiency-statistics", c.CommonStatisticsHandler("WorkshopProductionEfficiencyStatistics"))
	web.Post("/statistics/device-production-efficiency-statistics", c.CommonStatisticsHandler("DeviceProductionEfficiencyStatistics"))
	web.Post("/statistics/device-running-statistics", c.CommonStatisticsHandler("DeviceRunningStatistics"))
	web.Post("/statistics/device-running-info", c.CommonStatisticsHandler("DeviceRunningInfo"))

	web.Post("/statistics/internal/:actionType", c.InternalRedirectHandler())
}