DataRouter.go 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. package routers
  2. import (
  3. "ColdP_server/controllers"
  4. beego "github.com/beego/beego/v2/server/web"
  5. )
  6. func init() {
  7. //获取数据列表页面,对应数据展示按钮
  8. beego.Router("/Data/DataList_html", &controllers.DataController{}, "*:DataList_html")
  9. //获取传感器列表
  10. beego.Router("/Data/Device_Sensor_List", &controllers.DataController{}, "POST:Device_Sensor_List")
  11. //获取更多传感器数据
  12. beego.Router("Data/Device_Sensor_Data_More", &controllers.DataController{}, "POST:Device_Sensor_Data_More")
  13. //删除记录
  14. beego.Router("/Data/Device_Sensor_List_Delete", &controllers.DataController{}, "POST:Device_Sensor_List_Delete")
  15. //更新记录
  16. beego.Router("/Data/Device_Sensor_Update", &controllers.DataController{}, "POST:Device_Sensor_Update")
  17. //数据记录
  18. beego.Router("/Data/Device_Sensor_Record", &controllers.DataController{}, "POST:Device_Sensor_Record")
  19. //数据导入
  20. beego.Router("/Data/importData", &controllers.DataController{}, "POST:ImportData")
  21. beego.Router("/Data/EXportData", &controllers.DataController{}, "*:Device_Sensor_Data_Excel")
  22. //获取公司信息
  23. beego.Router("/Data/GetCompanyBySn", &controllers.DataController{}, "GET:GetCompanyBySn")
  24. beego.Router("/Data/Device_Sensor_List_Delete_Time", &controllers.DataController{}, "*:Device_Sensor_List_Delete_Time")
  25. //数据生成
  26. beego.Router("/Data/DataGenerator_html", &controllers.DataGeneratorController{}, "*:GeneratorHtml")
  27. //获取对应设备探头数据
  28. beego.Router("/Data/DeviceSensorData", &controllers.DataGeneratorController{}, "POST:DeviceSensorData")
  29. //固定值偏移
  30. beego.Router("/Data/UpdateFix", &controllers.DataGeneratorController{}, "POST:UpdateFix")
  31. // 删除数据
  32. beego.Router("/Data/Delete", &controllers.DataGeneratorController{}, "POST:Delete")
  33. //随机偏移值
  34. beego.Router("/Data/UpdateRand", &controllers.DataGeneratorController{}, "POST:UpdateRand")
  35. //复制数据到另一时间起点中
  36. beego.Router("/Data/CopyFromPosition", &controllers.DataGeneratorController{}, "POST:CopyFromPosition")
  37. //数据补漏
  38. beego.Router("/Data/RepairSensorData", &controllers.DataGeneratorController{}, "POST:RepairSensorData")
  39. beego.Router("/Data/RepairAllSensorData", &controllers.DataGeneratorController{}, "POST:RepairAllSensorData")
  40. //数据平滑
  41. beego.Router("/Data/DataSensorDataSmooth", &controllers.DataGeneratorController{}, "POST:DataSensorDataSmooth")
  42. beego.Router("/Data/DataSensorDataTrend", &controllers.DataGeneratorController{}, "POST:DataSensorDataTrend")
  43. //数据导入
  44. beego.Router("/Data/ImportSensorData", &controllers.DataGeneratorController{}, "POST:ImportSensorData")
  45. }