Warning.go 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. // 设备报警
  10. beego.NSNamespace("/DeviceWarning",
  11. beego.NSRouter("/List", &controllers.DeviceController{}, "*:DeviceWarning_List"), // 告警列表
  12. beego.NSRouter("/List2", &controllers.DeviceController{}, "*:DeviceWarning_List2"), // 告警列表 - 跨月查询
  13. beego.NSRouter("/List_sse", &controllers.DeviceController{}, "*:DeviceWarning_List_Sse"), // 告警列表 - 跨月查询
  14. beego.NSRouter("/Get", &controllers.DeviceController{}, "*:DeviceWarning_Get"), // 获取告警
  15. beego.NSRouter("/Edit", &controllers.DeviceController{}, "*:DeviceWarning_Post"), // 修改告警 报警处理
  16. beego.NSRouter("/BatchEdit", &controllers.DeviceController{}, "*:AppBatchWarning"), // 批量处理40天内的所有报警信息
  17. beego.NSRouter("/Del", &controllers.DeviceController{}, "*:DeviceWarning_Del"), // 删除告警
  18. beego.NSRouter("/ToExcel", &controllers.DeviceController{}, "*:DeviceWarning_Data_Excel"), // 导出excel
  19. beego.NSRouter("/ToExcel2", &controllers.DeviceController{}, "*:DeviceWarning_Data_Excel2"), // 导出excel
  20. beego.NSRouter("/DeviceSensor_List", &controllers.DeviceController{}, "*:Read_Warning_List_By_DS_T_type"), // 告警列表 - 小程序
  21. ),
  22. // 报警类型
  23. beego.NSNamespace("/WarningType",
  24. beego.NSRouter("/List_All", &controllers.DeviceController{}, "*:WarningType_List_All"), // 添加权限-告警类型列表
  25. beego.NSRouter("/Power_List", &controllers.DeviceController{}, "*:WarningType_Power_List_All"), // 报警搜索-告警类型列表
  26. ),
  27. // 报警发送
  28. beego.NSNamespace("/WarningSend",
  29. beego.NSRouter("/List", &controllers.DeviceController{}, "*:Read_WarningSend_List"), // 报警发送列表
  30. ),
  31. // 内部用户设备报警率
  32. beego.NSNamespace("/WarningRate",
  33. beego.NSRouter("/List", &controllers.DeviceController{}, "*:Read_WarningRate_List"), // 内部用户设备报警率列表
  34. beego.NSRouter("/User_List", &controllers.DeviceController{}, "*:Read_WarningRate_List"), // 内部用户设备报警率列表
  35. ),
  36. // 报警处理
  37. beego.NSNamespace("/WarningHandle",
  38. beego.NSRouter("/List", &controllers.DeviceController{}, "*:Read_WarningHandle_List"), // 内部用户设备报警率列表
  39. ),
  40. // 公司管理-设备报警
  41. beego.NSNamespace("/CompanyWarning",
  42. beego.NSRouter("/List", &controllers.DeviceController{}, "*:CompanyWarning_List"), // 告警列表
  43. beego.NSRouter("/List2", &controllers.DeviceController{}, "*:CompanyWarning_List2"), // 告警列表
  44. beego.NSRouter("/ToExcel", &controllers.DeviceController{}, "*:CompanyWarning_Data_Excel"), // 告警列表
  45. beego.NSRouter("/ToExcel2", &controllers.DeviceController{}, "*:CompanyWarning_Data_Excel2"), // 告警列表
  46. ),
  47. )
  48. beego.AddNamespace(ns)
  49. }