Data.go 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. //数据实时轨迹
  12. //beego.NSRouter("/GetNewLocus", &controllers.DataController{}, "*:GetNewLocus"), // 获取实时轨迹
  13. beego.NSRouter("/GetNewLocus", &controllers.DataController{}, "*:GetNewLocus_"),
  14. // 获取实时轨迹
  15. beego.NSRouter("/Device_Sensor", &controllers.DataController{}, "*:Device_Sensor_Get"), // 获取传感器
  16. beego.NSRouter("/Device_Sensor_Data_Real", &controllers.DataController{}, "*:Device_Sensor_Data_Real"), // 获取传感器
  17. beego.NSRouter("/Device_Sensor_List", &controllers.DataController{}, "*:Device_Sensor_List"), // 传感器列表
  18. beego.NSRouter("/Company_Device_Sensor_List", &controllers.DataController{}, "*:Company_Device_Sensor_List"), // 传感器列表
  19. beego.NSRouter("/Company_key_Device_Sensor_List", &controllers.DataController{}, "*:Company_Device_Sensor_List_ByKey"), // 传感器列表-通过公司key获取
  20. beego.NSRouter("/Device_Sensor_Data", &controllers.DataController{}, "*:Device_Sensor_Data"), // 传感器数据
  21. beego.NSRouter("/Device_Sensor_Data_Excel", &controllers.DataController{}, "*:Device_Sensor_Data_Excel"), // 导出传感器数据
  22. beego.NSRouter("/Device_Sensor_Data_Excel_m", &controllers.DataController{}, "*:Device_Sensor_Data_Excel_m"), // 导出传感器数据
  23. beego.NSRouter("/List", &controllers.DataController{}, "*:Device_Sensor_Data_More"), // 设备数据列表
  24. beego.NSRouter("/Excel", &controllers.DataController{}, "*:Device_Sensor_Data_Excel"), // 导出设备数据列表excel
  25. beego.NSRouter("/PDF", &controllers.DataController{}, "*:Device_Sensor_Data_PDF"), // 设备数据列表pdf
  26. beego.NSRouter("/ChartShow_PDF", &controllers.DataController{}, "*:Device_Sensor_Data_ChartShow_PDF"), // 图表展示下载pdf
  27. beego.NSRouter("/BackUp", &controllers.DataController{}, "*:Device_Sensor_Data_BackUp"), // 设备数据备份列表
  28. beego.NSRouter("/BackUp_PDF", &controllers.DataController{}, "*:Device_Sensor_Data_BackUp_PDF"), // 设备数据备份列表PDF
  29. beego.NSRouter("/DeviceSensor_Data_Print", &controllers.DataController{}, "*:DeviceSensor_Data_Print"), // 小程序 打印
  30. // 执行 SQL
  31. beego.NSRouter("/Raw", &controllers.RawSqlController{}, "*:Raw"), // 执行 SQL
  32. ),
  33. )
  34. beego.Router("/docking/Real_Data", &controllers.DataController{}, "*:Docking_Real_Data")
  35. beego.Router("/docking/Note_Data", &controllers.DataController{}, "*:Docking_Note_Data")
  36. beego.AddNamespace(ns)
  37. }