فهرست منبع

批量处理报警信息

huangyan 3 ماه پیش
والد
کامیت
25d59a3709

+ 1 - 1
Z_Build.bat

@@ -5,4 +5,4 @@ set GOPATH=E:\gopath
 set GO111MODULE=auto
 
 
-go build -o Cold_Api6200 main.go
+go build -o Cold_Api6200 main.go

+ 1 - 1
conf/app.conf

@@ -43,7 +43,7 @@ Panel_url = "http://127.0.0.1:6204/Cold_Panel"
 # 不验证登录的接口
 FilterExcludeURL = /Login_verification,/Data/List,/WxPay/Notify,/Data/Company_key_Device_Sensor_List,/docking/Real_Data,/docking/Note_Data,/Company/Transport/List,/DeviceSensor/List_BySN,/Data/GetNewLocus
 # 只验证登录不验证权限的接口
-FilterOnlyLoginCheckURL = /Menu/List,/User/Info,/User/Home,/User/Post,/UpFileToken,/User/WxQRCode,/Company/Get,/DataSource,/Company/Bill_Excel,/WarningSend/List,/WxPay/Get_QRCode,/WxPay/GetOrderState,/WarningHandle/List,/DeviceWarning/List_Count,/Bulletin/GetBulletinById,/Bulletin/IsReadBulletin,/Bulletin/GetBulletinList,/Data/GetNewLocusSSe
+FilterOnlyLoginCheckURL = /Menu/List,/User/Info,/User/Home,/User/Post,/UpFileToken,/User/WxQRCode,/Company/Get,/DataSource,/Company/Bill_Excel,/WarningSend/List,/WxPay/Get_QRCode,/WxPay/GetOrderState,/WarningHandle/List,/DeviceWarning/List_Count,/Bulletin/GetBulletinById,/Bulletin/IsReadBulletin,/Bulletin/GetBulletinList,/Data/GetNewLocusSSe,/DeviceWarning/BatchEdit,/Notice/WarinType
 
 
 MqttIds = tmqttjxit

+ 21 - 3
controllers/Data.go

@@ -2477,8 +2477,18 @@ func (c *DataController) Docking_Real_Data() {
 		Data []Device.DeviceData_Docking
 	}
 	var r_jsons R_JSONS
-
-	r_jsons.Data = Device.Read_Docking_Real_Data(T_pids)
+	var tempData []Device.DeviceData_Docking
+	tempData = Device.Read_Docking_Real_Data(T_pids)
+	for _, v := range tempData {
+		t, b := Device.Read_DeviceSensorParameter(v.T_sn, v.T_id)
+		if !b {
+			continue
+		}
+		if t.T_free == 1 {
+			continue
+		}
+		r_jsons.Data = append(r_jsons.Data, v)
+	}
 
 	c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: r_jsons}
 	c.ServeJSON()
@@ -2557,13 +2567,21 @@ func (c *DataController) Docking_Note_Data() {
 	var r_jsons R_JSONS
 	var cnt int
 	Device.Read_DeviceSensorParameter_All_Map(T_sn, T_id)
-	r_jsons.DeviceSensor_data, cnt = Device.Read_DeviceData_ById_List(T_sn, T_id, Time_start, Time_end, page, page_z)
+	var tempData []Device.DeviceData_R
+	tempData, cnt = Device.Read_DeviceData_ById_List(T_sn, T_id, Time_start, Time_end, page, page_z)
 
 	page_size := math.Ceil(float64(cnt) / float64(page_z))
 	r_jsons.Page = page
 	r_jsons.Page_size = int(page_size)
 	r_jsons.Pages = lib.Func_page(int64(page), int64(page_size))
 	r_jsons.Num = cnt
+	for _, v := range tempData {
+		if v.T_free == 1 {
+			continue
+		}
+		r_jsons.DeviceSensor_data = append(r_jsons.DeviceSensor_data, v)
+
+	}
 
 	c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: r_jsons}
 	c.ServeJSON()

+ 53 - 0
controllers/Device.go

@@ -246,6 +246,33 @@ func (c *DeviceController) Device_Edit() {
 		Device_r.T_PatrolTime = PatrolTime
 		clos = append(clos, "T_PatrolTime")
 	}
+	//金卫信数据对接
+	SensorIdNo := c.GetString("sensorIdNo")
+	if len(SensorIdNo) > 0 {
+		Device_r.SensorIdNo = SensorIdNo
+		clos = append(clos, "sensor_id_no")
+
+	}
+	IdNo := c.GetString("idNo")
+	if len(IdNo) > 0 {
+		Device_r.IdNo = IdNo
+		clos = append(clos, "id_no")
+	}
+	DepaCode := c.GetString("depaCode")
+	if len(DepaCode) > 0 {
+		Device_r.DepaCode = DepaCode
+		clos = append(clos, "depa_code")
+	}
+	DepaName := c.GetString("depaName")
+	if len(DepaName) > 0 {
+		Device_r.DepaName = DepaName
+		clos = append(clos, "depa_name")
+	}
+	sensorName := c.GetString("sensorName")
+	if len(sensorName) > 0 {
+		Device_r.SensorName = sensorName
+		clos = append(clos, "sensor_name")
+	}
 
 	if is := Device.Update_Device(Device_r, clos...); !is {
 		c.Data["json"] = lib.JSONS{Code: 202, Msg: "修改失败!"}
@@ -794,7 +821,14 @@ func (c *DeviceController) DeviceSensor_Edit() {
 		Device.Update_DeviceSensor(DeviceSensor, "T_3dview")
 		System.Add_UserLogs_T(c.Admin_r.T_uuid, "设备管理", "传感器 3D视图订阅", "SN:"+Sn+" ["+strconv.Itoa(Id)+"]"+v)
 	}
+	//金卫信对接数据
+	ProbeIdNo := c.GetString("probeIdNo")
+	if len(ProbeIdNo) > 0 {
+		DeviceSensor.ProbeIdNo = ProbeIdNo
+		Device.Update_DeviceSensor(DeviceSensor, "probe_id_no")
+		System.Add_UserLogs_T(c.Admin_r.T_uuid, "设备管理", "传感器 金卫信对接参数", "SN:"+Sn+" ["+strconv.Itoa(Id)+"]"+ProbeIdNo)
 
+	}
 	c.Data["json"] = lib.JSONS{Code: 200, Msg: "OK"}
 	c.ServeJSON()
 	return
@@ -2203,3 +2237,22 @@ func (c *DeviceController) DeviceSensor_List_BySN() {
 	c.ServeJSON()
 	return
 }
+func (c *DeviceController) CompanyNoticeByUser() {
+	type R_JSONS struct {
+		//必须的大写开头
+		Data      []Company.WarnTypes
+		Num       int64
+		Page      int
+		Page_size int
+	}
+
+	var r_jsons R_JSONS
+
+	T_name := c.GetString("T_name")
+
+	r_jsons.Data = Company.Read_CompanyNoticeByUser(c.T_pid, T_name)
+
+	c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: r_jsons.Data}
+	c.ServeJSON()
+	return
+}

+ 26 - 0
controllers/User.go

@@ -1461,6 +1461,32 @@ func (c *UserController) User_Menu_List() {
 	c.ServeJSON()
 	return
 }
+func (c *UserController) GetUserMenuList() {
+
+	type R_JSONS struct {
+		//必须的大写开头
+		Pid        int
+		Data       interface{}
+		Permission interface{}
+	}
+
+	var r_jsons R_JSONS
+	power, err := Account.Read_Power_ById(c.Admin_r.T_power)
+	if err != nil {
+		c.Data["json"] = lib.JSONS{Code: 202, Msg: "获取菜单失败"}
+		c.ServeJSON()
+		return
+	}
+	//logs.Info("登录用户 菜单 pid 为:", c.T_pid)
+	ret := Account.Read_Menu_Bind_List(power.Id, power.T_menu, c.T_pid)
+	r_jsons.Data = ret.Menu
+	//r_jsons.Permission = ret.Permission
+	r_jsons.Pid = c.T_pid
+
+	c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: r_jsons}
+	c.ServeJSON()
+	return
+}
 
 // 权限菜单列表
 func (c *UserController) Menu_List_All() {

+ 31 - 4
controllers/Warning.go

@@ -9,11 +9,9 @@ import (
 	"Cold_Api/models/Device"
 	"Cold_Api/models/System"
 	"Cold_Api/models/Warning"
-	"Cold_Api/models/openApi"
 	"encoding/json"
 	"fmt"
 	"github.com/beego/beego/v2/core/logs"
-	beego "github.com/beego/beego/v2/server/web"
 	"github.com/robfig/cron/v3"
 	"github.com/xuri/excelize/v2"
 	"math"
@@ -635,6 +633,35 @@ func (c *DeviceController) DeviceWarning_Post() {
 	return
 }
 
+// AppBatchWarning APP批量处理报警信息
+func (c *DeviceController) AppBatchWarning() {
+	T_Text := c.GetString("T_Text") //处理措施
+	T_tp, _ := c.GetInt("T_tp")     //处理类型
+	if len(T_Text) == 0 {
+		c.Data["json"] = lib.JSONS{Code: 202, Msg: "处理措施不能为空"}
+		c.ServeJSON()
+		return
+	}
+	if T_tp == 0 {
+		c.Data["json"] = lib.JSONS{Code: 202, Msg: "处理类型不能为空"}
+		c.ServeJSON()
+		return
+	}
+	handle := Warning.BatchHandle(c.T_pid, T_tp, T_Text, c.Admin_r.T_uuid)
+	if !handle {
+		c.Data["json"] = lib.JSONS{Code: 202, Msg: "处理报警信息失败"}
+		c.ServeJSON()
+		return
+	}
+	// 删除报警列表统计的缓存
+	Warning.Redis_WarningCount_DelK(c.T_pid)
+	Warning.Redis_WarningCount_DelK(c.Admin_r.Id)
+	System.Add_UserLogs(c.Admin_r.T_uuid, "设备管理", "app批量处理报警", T_Text)
+	c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!"}
+	c.ServeJSON()
+	return
+}
+
 // 删除告警
 func (c *DeviceController) DeviceWarning_Del() {
 	id, _ := c.GetInt("T_id")
@@ -1362,10 +1389,10 @@ func Cron_WarningRate() {
 	// @daily 每日运行一次
 	// c.AddFunc("0 */1 * * * ?", Cron_WarningRateDay_Add)
 	// c.AddFunc("0 */1 * * * ?", Cron_WarningRateMonth_Add)
-	jc, _ := beego.AppConfig.String("jcCron")
+	//jc, _ := beego.AppConfig.String("jcCron")
 	c.AddFunc("@daily", Cron_WarningRateDay_Add)
 	c.AddFunc("@monthly", Cron_WarningRateMonth_Add)
-	c.AddFunc(jc, openApi.GetRealtime)
+	//c.AddFunc(jc, openApi.GetRealtime)
 	// 启动定时任务
 	c.Start()
 	defer c.Stop()

+ 1 - 1
controllers/lib/Qiniu.go

@@ -83,7 +83,7 @@ func UploadToken(T_suffix string) string {
 		ForceSaveKey: true,
 		SaveKey:      "UpImage/" + Tokey + "." + T_suffix,
 		FsizeLimit:   1024 * 1024 * 100,
-		MimeLimit:    "image/*;application/pdf;application/octet-stream;application/zip;application/x-tar",
+		MimeLimit:    "image/*;application/pdf;application/octet-stream;application/zip;application/x-tar;application/msword",
 	}
 
 	upToken := putPolicy.UploadToken(Qiniu)

BIN
go_build_main_go.exe


+ 76 - 1
models/Company/CompanyNotice.go

@@ -3,6 +3,7 @@ package Company
 import (
 	"Cold_Api/conf"
 	"Cold_Api/controllers/lib"
+	"Cold_Api/models/Warning"
 	"encoding/json"
 	"fmt"
 	"github.com/astaxie/beego/cache"
@@ -48,6 +49,10 @@ type CompanyNotice_R struct {
 	T_Notice_bind      string // 绑定T_sn,Tid|
 	T_Notice_mechanism string // 报警机制
 }
+type WarnTypes struct {
+	Id     int
+	T_name string
+}
 
 func (t *CompanyNotice) TableName() string {
 	return "company_notice" // 数据库名称   // ************** 替换 DesignClass **************
@@ -270,8 +275,27 @@ func Read_CompanyNotice_All(T_pid int, T_name string) (r []CompanyNotice_R) {
 		logs.Error(lib.FuncName(), err)
 		return
 	}
-
+	m := make(map[string]int, 0)
 	for _, v := range map_r {
+		fmt.Println("报警策略======>", v.T_Notice_mechanism)
+		split := strings.Split(v.T_Notice_mechanism, "|")
+		if len(split) > 0 {
+			for _, v := range split {
+				i := strings.Split(v, ",")
+				if len(i) > 0 {
+					fmt.Println(i[0])
+					if len(i[0]) > 0 {
+						var warnType Warning.WarningType
+						table := o.QueryTable("warning_type")
+						err := table.Filter("t_name__exact", i[0]).One(&warnType)
+						if err != nil {
+							fmt.Println("")
+						}
+						m[i[0]] = warnType.Id
+					}
+				}
+			}
+		}
 		r = append(r, CompanyNoticeToCompanyNotice_R(v))
 	}
 
@@ -477,3 +501,54 @@ func Replice_T_Notice_Bind(T_uuid, T_Notice_Bind string, new string) string {
 	}
 	return T_Notice_Bind
 }
+func Read_CompanyNoticeByUser(T_pid int, T_name string) []WarnTypes {
+
+	o := orm.NewOrm()
+	// 也可以直接使用 Model 结构体作为表名
+	var map_r []CompanyNotice
+	qs := o.QueryTable(new(CompanyNotice))
+
+	cond := orm.NewCondition()
+
+	cond1 := cond.And("T_State", 1).And("T_pid", T_pid)
+
+	if len(T_name) > 0 {
+		cond1 = cond1.And("T_name", T_name)
+	}
+
+	_, err := qs.SetCond((*orm2.Condition)(cond1)).OrderBy("-Id").All(&map_r)
+	if err != nil {
+		logs.Error(lib.FuncName(), err)
+		return nil
+	}
+
+	var warnTy []WarnTypes
+	m := make(map[string]int, 0)
+	for _, v := range map_r {
+		split := strings.Split(v.T_Notice_mechanism, "|")
+		if len(split) > 0 {
+			for _, v := range split {
+				i := strings.Split(v, ",")
+				if len(i) > 0 {
+					fmt.Println(i[0])
+					if len(i[0]) > 0 && strings.EqualFold(i[1], "1") {
+						var warnType Warning.WarningType
+						table := o.QueryTable("warning_type")
+						err := table.Filter("t_name__exact", i[0]).One(&warnType)
+						if err != nil {
+							logs.Error(lib.FuncName(), err)
+						}
+						m[i[0]] = warnType.Id
+					}
+				}
+			}
+		}
+	}
+	for k, v := range m {
+		var warn WarnTypes
+		warn.T_name = k
+		warn.Id = v
+		warnTy = append(warnTy, warn)
+	}
+	return warnTy
+}

+ 18 - 0
models/Device/Device.go

@@ -49,6 +49,12 @@ type Device struct {
 	T_imei  string `orm:"size(200);null"` // "867387060327718",//模组imei
 	T_iccid string `orm:"size(200);null"` // "89860477102170049750",//sim卡号
 	T_rssi  string `orm:"size(200);null"` // "80",//信号强度
+	//金卫信对接信息
+	DepaName   string `json:"depaName" orm:"size(256);null"`         //单位名称
+	DepaCode   string `json:"depaCode" orm:"size(256);null"`         //单位编码
+	IdNo       string `json:"idNo" orm:"size(256);null"`             //设备唯一编号
+	SensorName string `json:"sensorName" orm:"size(256);null"`       //中继器网关名称
+	SensorIdNo string `json:"sensorIdNo" orm:"index;size(256);null"` //中继器网关序号
 
 	CreateTime time.Time `orm:"column(create_time);type(timestamp);null;auto_now_add"` //auto_now_add 第一次保存时才设置时间
 	UpdateTime time.Time `orm:"column(update_time);type(timestamp);null;auto_now"`     //auto_now 每次 model 保存时都会对时间自动更新
@@ -86,6 +92,13 @@ type Device_R struct {
 
 	T_DeviceSensor_Num int // 传感器数量
 
+	//金卫信
+	DepaName   string `json:"depaName"`   //单位名称
+	DepaCode   string `json:"depaCode"`   //单位编码
+	IdNo       string `json:"idNo"`       //设备唯一编号
+	SensorName string `json:"sensorName"` //中继器网关名称
+	SensorIdNo string `json:"sensorIdNo"` //中继器网关序号
+
 }
 
 type Device_task struct {
@@ -161,6 +174,11 @@ func DeviceToDevice_R(r Device) (t Device_R) {
 	t.CreateTime = r.CreateTime.Format("2006-01-02 15:04:05")
 	t.UpdateTime = r.UpdateTime.Format("2006-01-02 15:04:05")
 	t.T_DeviceSensor_Num = Read_DeviceSensor_Num_ByT_sn(r.T_sn)
+	t.DepaCode = r.DepaCode
+	t.SensorName = r.SensorName
+	t.IdNo = r.IdNo
+	t.SensorIdNo = r.SensorIdNo
+	t.DepaName = r.DepaName
 	return
 }
 

+ 1 - 1
models/Device/DeviceData.go

@@ -541,7 +541,7 @@ func Read_DeviceData_By_T_snid_List(T_snid string, Time_start_ string, Time_end_
 			maps_num = maps_num + int64(r_maps_num)
 
 			logs.Debug("加载数据:", sn_id[0], sn_id[1], r_maps_num)
-		} else {
+		} else if len(sn_id) == 2 {
 			Read_DeviceSensorParameter_All_Map(sn_id[0], lib.To_int(sn_id[1]))
 			r_maps, r_maps_num := Read_DeviceData_ById_List(sn_id[0], lib.To_int(sn_id[1]), Time_start_, Time_end_, 0, 9999)
 			maps = append(maps, r_maps...)

+ 15 - 12
models/Device/DeviceSensor.go

@@ -43,6 +43,8 @@ type DeviceSensor struct {
 	T_online   int    `orm:"size(2);default(1)"` // 在线状态 0 未启用  1 在线  2 离线
 	T_online_s int    `orm:"size(2);default(0)"` // 在线状态-备用  0 未启用  1 在线  2 离线
 
+	ProbeIdNo string `json:"probeIdNo" orm:"size(256);null"` //传感器探头序号
+
 	CreateTime time.Time `orm:"column(create_time);type(timestamp);null;auto_now_add"` //auto_now_add 第一次保存时才设置时间
 	UpdateTime time.Time `orm:"column(update_time);type(timestamp);null;auto_now"`     //auto_now 每次 model 保存时都会对时间自动更新
 }
@@ -65,18 +67,18 @@ type DeviceSensor_R struct {
 	T_pid      int    // 公司id
 	T_pid_name string // 公司名称
 
-	T_3dview   string // 3D 视图ID
-	T_sort     int    // 排序
-	T_Dattery  int    // 电量
-	T_Site     string // GPS
-	T_monitor  int    // 记录状态
-	T_online   int    // 在线状态 1 在线  0 离线
-	T_online_s int    // 在线状态-备用  0 未启用  1 在线  2 离线
-	T_datashow int    // 0 屏蔽数据展示  1 正常数据展示
-	T_type     int    // 类型
-	T_link     int    // 0:断开/故障 1连接 实时数据
-	T_State    int    // 0 屏蔽   1 正常  (屏蔽后 只有内部管理员才能看到,用户 输入SN\名称 搜索时 也能看到)
-
+	T_3dview                string                  // 3D 视图ID
+	T_sort                  int                     // 排序
+	T_Dattery               int                     // 电量
+	T_Site                  string                  // GPS
+	T_monitor               int                     // 记录状态
+	T_online                int                     // 在线状态 1 在线  0 离线
+	T_online_s              int                     // 在线状态-备用  0 未启用  1 在线  2 离线
+	T_datashow              int                     // 0 屏蔽数据展示  1 正常数据展示
+	T_type                  int                     // 类型
+	T_link                  int                     // 0:断开/故障 1连接 实时数据
+	T_State                 int                     // 0 屏蔽   1 正常  (屏蔽后 只有内部管理员才能看到,用户 输入SN\名称 搜索时 也能看到)
+	ProbeIdNo               string                  `json:"probeIdNo"`
 	T_DeviceSensorData      DeviceData_R            // 传感器最新数据
 	T_DeviceSensorParameter DeviceSensorParameter_R //  设备参数
 	T_DeviceSensorType      DeviceSensorType_R      //  传感器类型
@@ -263,6 +265,7 @@ func DeviceSensorToDeviceSensor_R(DeviceSensor_ DeviceSensor) (DeviceSensor_r De
 	DeviceSensor_r.T_online = DeviceSensor_.T_online
 	DeviceSensor_r.T_online_s = DeviceSensor_.T_online_s
 	DeviceSensor_r.T_monitor = DeviceSensor_.T_monitor
+	DeviceSensor_r.ProbeIdNo = DeviceSensor_.ProbeIdNo
 	//if DeviceSensor_.T_online == 2 && (DeviceSensor_.T_online_s == 0 || DeviceSensor_.T_online_s == 2) && DeviceSensor_.T_monitor == 1 {
 	//	DeviceSensor_r.T_monitor = 2
 	//}

+ 63 - 0
models/Warning/Warning.go

@@ -5,7 +5,9 @@ import (
 	"Cold_Api/controllers/lib"
 	db "Cold_Api/initialize"
 	"Cold_Api/models/Account"
+	"Cold_Api/models/System"
 	"encoding/json"
+	"errors"
 	"fmt"
 	"github.com/astaxie/beego/cache"
 	_ "github.com/astaxie/beego/cache/redis"
@@ -1751,3 +1753,64 @@ func checkStringListContinuous(nums []string) (int, int, bool) {
 
 	return intNums[0], intNums[len(intNums)-1], true
 }
+
+// BatchHandle 处理本公司指定类型40天内的所有报警数据
+func BatchHandle(Pid, T_tp int, T_Text, T_uuid string) bool {
+	var warings []Warning
+	var err error
+
+	begin := db.DB.Begin()
+	defer func() {
+		if err != nil {
+			begin.Rollback()
+		} else {
+			begin.Commit()
+		}
+	}()
+	err = begin.Model(&Warning{}).Where("t_pid =?", Pid).
+		Where("t__state != ?", 2).
+		Where("t_tp = ?", T_tp).Find(&warings).Updates(map[string]any{
+		"t__text":  T_Text,
+		"t__state": 2,
+	}).Error
+	if err != nil {
+		logs.Error("报警记录信息更新失败", err)
+		return false
+	}
+	for _, waring := range warings {
+		Wtab := "warning"
+		T_year, T_month := waring.CreateTime.Format("2006"), waring.CreateTime.Format("01")
+		Wtab += "_" + T_year + "_" + T_month
+		waring.T_State = 2
+		waring.UpdateTime = time.Now()
+		waring.T_Text = T_Text
+		backups := Update_Warning_Backups(waring, T_year, T_month)
+		if !backups {
+			err = errors.New("更新报警信息失败")
+			return false
+		}
+		System.Add_UserLogs(T_uuid, "设备管理", "40天内报警处理操作", Wtab+":"+strconv.Itoa(int(waring.Id))+"->"+T_Text)
+	}
+	return true
+}
+
+func IsWarn(Pid int) bool {
+	var warings []Warning
+	var err error
+
+	begin := db.DB.Begin()
+	defer func() {
+		if err != nil {
+			begin.Rollback()
+		} else {
+			begin.Commit()
+		}
+	}()
+	err = begin.Model(&Warning{}).Where("t_pid =?", Pid).
+		Where("t__state != ?", 2).Find(&warings).Error
+	if err != nil {
+		logs.Error("报警记录信息更新失败", err)
+		return false
+	}
+	return true
+}

+ 2 - 1
routers/Device.go

@@ -95,7 +95,8 @@ func init() {
 			beego.NSRouter("/Bind_Add", &controllers.DeviceController{}, "*:NoticeBind_Add"), // 添加报警策略绑定
 			beego.NSRouter("/Bind_Del", &controllers.DeviceController{}, "*:NoticeBind_Del"), // 删除报警策略绑定
 			// 报警通知用户列表
-			beego.NSRouter("/User_List", &controllers.UserController{}, "*:User_Notice_List"), // 报警通知用户列表
+			beego.NSRouter("/User_List", &controllers.UserController{}, "*:User_Notice_List"),      // 报警通知用户列表
+			beego.NSRouter("/WarinType", &controllers.DeviceController{}, "*:CompanyNoticeByUser"), // 报警策略类型
 		),
 	)
 

+ 1 - 0
routers/Warning.go

@@ -16,6 +16,7 @@ func init() {
 			beego.NSRouter("/List_sse", &controllers.DeviceController{}, "*:DeviceWarning_List_Sse"),                  // 告警列表 - 跨月查询
 			beego.NSRouter("/Get", &controllers.DeviceController{}, "*:DeviceWarning_Get"),                            // 获取告警
 			beego.NSRouter("/Edit", &controllers.DeviceController{}, "*:DeviceWarning_Post"),                          // 修改告警 报警处理
+			beego.NSRouter("/BatchEdit", &controllers.DeviceController{}, "*:AppBatchWarning"),                        // 批量处理40天内的所有报警信息
 			beego.NSRouter("/Del", &controllers.DeviceController{}, "*:DeviceWarning_Del"),                            // 删除告警
 			beego.NSRouter("/ToExcel", &controllers.DeviceController{}, "*:DeviceWarning_Data_Excel"),                 // 导出excel
 			beego.NSRouter("/ToExcel2", &controllers.DeviceController{}, "*:DeviceWarning_Data_Excel2"),               // 导出excel