Data.go 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package routers
  2. import (
  3. "Cold_Api/conf"
  4. "Cold_Api/controllers"
  5. beego "github.com/beego/beego/v2/server/web"
  6. )
  7. func init() {
  8. ns := beego.NewNamespace(conf.Version,
  9. beego.NSNamespace("/Data",
  10. beego.NSBefore(T_pidFilter),
  11. beego.NSRouter("/Device_Sensor", &controllers.DataController{}, "*:Device_Sensor_Get"), // 获取传感器
  12. beego.NSRouter("/Device_Sensor_Data_Real", &controllers.DataController{}, "*:Device_Sensor_Data_Real"), // 获取传感器
  13. beego.NSRouter("/Device_Sensor_List", &controllers.DataController{}, "*:Device_Sensor_List"), // 传感器列表
  14. beego.NSRouter("/Company_Device_Sensor_List", &controllers.DataController{}, "*:Company_Device_Sensor_List"), // 传感器列表
  15. beego.NSRouter("/Company_key_Device_Sensor_List", &controllers.DataController{}, "*:Company_Device_Sensor_List_ByKey"), // 传感器列表-通过公司key获取
  16. beego.NSRouter("/Device_Sensor_Data", &controllers.DataController{}, "*:Device_Sensor_Data"), // 传感器数据
  17. beego.NSRouter("/Device_Sensor_Data_Excel", &controllers.DataController{}, "*:Device_Sensor_Data_Excel"), // 导出传感器数据
  18. beego.NSRouter("/Device_Sensor_Data_Excel_m", &controllers.DataController{}, "*:Device_Sensor_Data_Excel_m"), // 导出传感器数据
  19. beego.NSRouter("/List", &controllers.DataController{}, "*:Device_Sensor_Data_More"), // 设备数据列表
  20. beego.NSRouter("/Excel", &controllers.DataController{}, "*:Device_Sensor_Data_Excel"), // 导出设备数据列表excel
  21. beego.NSRouter("/PDF", &controllers.DataController{}, "*:Device_Sensor_Data_PDF"), // 设备数据列表pdf
  22. beego.NSRouter("/ChartShow_PDF", &controllers.DataController{}, "*:Device_Sensor_Data_ChartShow_PDF"), // 图表展示下载pdf
  23. beego.NSRouter("/BackUp", &controllers.DataController{}, "*:Device_Sensor_Data_BackUp"), // 设备数据备份列表
  24. beego.NSRouter("/BackUp_PDF", &controllers.DataController{}, "*:Device_Sensor_Data_BackUp_PDF"), // 设备数据备份列表PDF
  25. beego.NSRouter("/DeviceSensor_Data_Print", &controllers.DataController{}, "*:DeviceSensor_Data_Print"), // 小程序 打印
  26. // 执行 SQL
  27. beego.NSRouter("/Raw", &controllers.RawSqlController{}, "*:Raw"), // 执行 SQL
  28. ),
  29. )
  30. beego.Router("/docking/Real_Data", &controllers.DataController{}, "*:Docking_Real_Data")
  31. beego.Router("/docking/Note_Data", &controllers.DataController{}, "*:Docking_Note_Data")
  32. beego.AddNamespace(ns)
  33. }