|
@@ -141,6 +141,16 @@ func (c *DeviceController) DeviceWarning_List2() {
|
|
|
|
|
|
T_admin, _ := c.GetInt("T_admin")
|
|
|
T_history, _ := c.GetInt("T_history")
|
|
|
+ if len(Time_start) == 0 {
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "开始时间不能为空!"}
|
|
|
+ c.ServeJSON()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if len(Time_end) == 0 {
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "结束时间不能为空!"}
|
|
|
+ c.ServeJSON()
|
|
|
+ return
|
|
|
+ }
|
|
|
tpCount := Warning.Read_WarningType_Count()
|
|
|
var tpList []string
|
|
|
if len(T_tp) > 0 {
|
|
@@ -434,7 +444,16 @@ func (c *DeviceController) CompanyWarning_List2() {
|
|
|
Time_start := c.GetString("Time_start")
|
|
|
Time_end := c.GetString("Time_end")
|
|
|
T_handle, _ := c.GetInt("T_handle")
|
|
|
-
|
|
|
+ if len(Time_start) == 0 {
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "开始时间不能为空!"}
|
|
|
+ c.ServeJSON()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if len(Time_end) == 0 {
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "结束时间不能为空!"}
|
|
|
+ c.ServeJSON()
|
|
|
+ return
|
|
|
+ }
|
|
|
tpCount := Warning.Read_WarningType_Count()
|
|
|
var tpList []string
|
|
|
if len(T_tp) > 0 {
|
|
@@ -823,7 +842,16 @@ func (c *DeviceController) DeviceWarning_Data_Excel2() {
|
|
|
Time_start := c.GetString("Time_start")
|
|
|
Time_end := c.GetString("Time_end")
|
|
|
T_handle, _ := c.GetInt("T_handle")
|
|
|
-
|
|
|
+ if len(Time_start) == 0 {
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "开始时间不能为空!"}
|
|
|
+ c.ServeJSON()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if len(Time_end) == 0 {
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "结束时间不能为空!"}
|
|
|
+ c.ServeJSON()
|
|
|
+ return
|
|
|
+ }
|
|
|
T_admin, _ := c.GetInt("T_admin")
|
|
|
tpCount := Warning.Read_WarningType_Count()
|
|
|
var tpList []string
|
|
@@ -1041,6 +1069,16 @@ func (c *DeviceController) CompanyWarning_Data_Excel2() {
|
|
|
Time_start := c.GetString("Time_start")
|
|
|
Time_end := c.GetString("Time_end")
|
|
|
T_handle, _ := c.GetInt("T_handle")
|
|
|
+ if len(Time_start) == 0 {
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "开始时间不能为空!"}
|
|
|
+ c.ServeJSON()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if len(Time_end) == 0 {
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "结束时间不能为空!"}
|
|
|
+ c.ServeJSON()
|
|
|
+ return
|
|
|
+ }
|
|
|
tpCount := Warning.Read_WarningType_Count()
|
|
|
var tpList []string
|
|
|
if len(T_tp) > 0 {
|