|
@@ -52,9 +52,9 @@ func (c *TaskDataController) TaskData_List() {
|
|
|
T_id := c.GetString("T_id")
|
|
|
|
|
|
T_task_id := c.GetString("T_task_id")
|
|
|
- Task_r, err := NatsServer.Read_Task(T_task_id)
|
|
|
+ Task_r, err := Task.Read_Task(T_task_id)
|
|
|
if err != nil {
|
|
|
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_task_id 错误!"}
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "获取任务信息失败!"}
|
|
|
c.ServeJSON()
|
|
|
return
|
|
|
}
|
|
@@ -124,9 +124,9 @@ func (c *TaskDataController) TaskData_Pdf(Time_start, Time_end, T_task_id, T_sni
|
|
|
Time_start_b := Time_start
|
|
|
Time_end_b := Time_end
|
|
|
|
|
|
- Task_r, err := NatsServer.Read_Task(T_task_id)
|
|
|
+ Task_r, err := Task.Read_Task(T_task_id)
|
|
|
if err != nil {
|
|
|
- return errors.New("T_task_id 错误!")
|
|
|
+ return errors.New("获取任务信息失败!")
|
|
|
}
|
|
|
if Task_r.T_collection_state == 2 {
|
|
|
return errors.New("数据采集中,请稍后!")
|
|
@@ -488,9 +488,9 @@ func (c *TaskDataController) TaskDataClass_List() {
|
|
|
page_z = conf.Page_size
|
|
|
}
|
|
|
T_task_id := c.GetString("T_task_id")
|
|
|
- Task_r, err := NatsServer.Read_Task(T_task_id)
|
|
|
+ Task_r, err := Task.Read_Task(T_task_id)
|
|
|
if err != nil {
|
|
|
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_task_id 错误!"}
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "获取任务信息失败!"}
|
|
|
c.ServeJSON()
|
|
|
return
|
|
|
}
|
|
@@ -513,9 +513,9 @@ func (c *TaskDataController) TaskDataClass_Edit() {
|
|
|
T_task_id := c.GetString("T_task_id")
|
|
|
T_sn := c.GetString("T_sn")
|
|
|
T_id := c.GetString("T_id")
|
|
|
- Task_r, err := NatsServer.Read_Task(T_task_id)
|
|
|
+ Task_r, err := Task.Read_Task(T_task_id)
|
|
|
if err != nil {
|
|
|
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_task_id 错误!"}
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "获取任务信息失败!"}
|
|
|
c.ServeJSON()
|
|
|
return
|
|
|
}
|
|
@@ -556,9 +556,9 @@ func (c *TaskDataController) TaskDataClass_Del() {
|
|
|
|
|
|
T_task_id := c.GetString("T_task_id")
|
|
|
T_sn := c.GetString("T_sn")
|
|
|
- Task_r, err := NatsServer.Read_Task(T_task_id)
|
|
|
+ Task_r, err := Task.Read_Task(T_task_id)
|
|
|
if err != nil {
|
|
|
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_task_id 错误!"}
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "获取任务信息失败!"}
|
|
|
c.ServeJSON()
|
|
|
return
|
|
|
}
|
|
@@ -583,9 +583,9 @@ func (c *TaskDataController) TaskData_AddS() {
|
|
|
T_uuid, _ := lib.GetAdminT_Uuid(c.Ctx.GetCookie("User_tokey"), c.GetString("User_tokey"))
|
|
|
|
|
|
T_task_id := c.GetString("T_task_id")
|
|
|
- Task_r, err := NatsServer.Read_Task(T_task_id)
|
|
|
+ Task_r, err := Task.Read_Task(T_task_id)
|
|
|
if err != nil {
|
|
|
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_task_id 错误!"}
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "获取任务信息失败!"}
|
|
|
c.ServeJSON()
|
|
|
return
|
|
|
}
|
|
@@ -603,7 +603,7 @@ func (c *TaskDataController) TaskData_AddS() {
|
|
|
println(len(T_Data_list), "len(T_Data_list)")
|
|
|
var T_Data_list_x = 0
|
|
|
|
|
|
- Task.UpdateAUTO_INCREMENT(conf.Local_AliasName,Task_r.T_task_id)
|
|
|
+ Task.UpdateAUTO_INCREMENT(conf.Local_AliasName, Task_r.T_task_id)
|
|
|
|
|
|
snMaps := make(map[string]string)
|
|
|
|
|
@@ -684,13 +684,13 @@ func (c *TaskDataController) TaskData_AddS_Excel() {
|
|
|
T_uuid, _ := lib.GetAdminT_Uuid(c.Ctx.GetCookie("User_tokey"), c.GetString("User_tokey"))
|
|
|
|
|
|
T_task_id := c.GetString("T_task_id")
|
|
|
- Task_r, err := NatsServer.Read_Task(T_task_id)
|
|
|
+ Task_r, err := Task.Read_Task(T_task_id)
|
|
|
if err != nil {
|
|
|
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_task_id 错误!"}
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "获取任务信息失败!"}
|
|
|
c.ServeJSON()
|
|
|
return
|
|
|
}
|
|
|
- Task.UpdateAUTO_INCREMENT(conf.Local_AliasName,Task_r.T_task_id)
|
|
|
+ Task.UpdateAUTO_INCREMENT(conf.Local_AliasName, Task_r.T_task_id)
|
|
|
|
|
|
// 获取上传的文件
|
|
|
file, _, err := c.GetFile("file")
|
|
@@ -844,13 +844,13 @@ func (c *TaskDataController) TaskData_Add() {
|
|
|
}
|
|
|
|
|
|
T_task_id := c.GetString("T_task_id")
|
|
|
- Task_r, err := NatsServer.Read_Task(T_task_id)
|
|
|
+ Task_r, err := Task.Read_Task(T_task_id)
|
|
|
if err != nil {
|
|
|
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_task_id 错误!"}
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "获取任务信息失败!"}
|
|
|
c.ServeJSON()
|
|
|
return
|
|
|
}
|
|
|
- Task.UpdateAUTO_INCREMENT(conf.Local_AliasName,Task_r.T_task_id)
|
|
|
+ Task.UpdateAUTO_INCREMENT(conf.Local_AliasName, Task_r.T_task_id)
|
|
|
|
|
|
sn, err := Task.Read_TaskData_ByT_id(Task_r.T_task_id, T_id)
|
|
|
if err != nil && !errors.Is(err, orm.ErrNoRows) {
|
|
@@ -923,9 +923,9 @@ func (c *TaskDataController) TaskData_Up() {
|
|
|
T_time := c.GetString("T_time")
|
|
|
|
|
|
T_task_id := c.GetString("T_task_id")
|
|
|
- Task_r, err := NatsServer.Read_Task(T_task_id)
|
|
|
+ Task_r, err := Task.Read_Task(T_task_id)
|
|
|
if err != nil {
|
|
|
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_task_id 错误!"}
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "获取任务信息失败!"}
|
|
|
c.ServeJSON()
|
|
|
return
|
|
|
}
|
|
@@ -957,9 +957,9 @@ func (c *TaskDataController) TaskData_Del() {
|
|
|
}
|
|
|
|
|
|
T_task_id := c.GetString("T_task_id")
|
|
|
- Task_r, err := NatsServer.Read_Task(T_task_id)
|
|
|
+ Task_r, err := Task.Read_Task(T_task_id)
|
|
|
if err != nil {
|
|
|
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_task_id 错误!"}
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "获取任务信息失败!"}
|
|
|
c.ServeJSON()
|
|
|
return
|
|
|
}
|
|
@@ -985,9 +985,9 @@ func (c *TaskDataController) TaskData_Del_t_id() {
|
|
|
Id := c.GetString("Id")
|
|
|
|
|
|
T_task_id := c.GetString("T_task_id")
|
|
|
- Task_r, err := NatsServer.Read_Task(T_task_id)
|
|
|
+ Task_r, err := Task.Read_Task(T_task_id)
|
|
|
if err != nil {
|
|
|
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_task_id 错误!"}
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "获取任务信息失败!"}
|
|
|
c.ServeJSON()
|
|
|
return
|
|
|
}
|
|
@@ -1018,9 +1018,9 @@ func (c *TaskDataController) Export_Data_Excel() {
|
|
|
//}
|
|
|
|
|
|
T_task_id := c.GetString("T_task_id")
|
|
|
- Task_r, err := NatsServer.Read_Task(T_task_id)
|
|
|
+ Task_r, err := Task.Read_Task(T_task_id)
|
|
|
if err != nil {
|
|
|
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_task_id 错误!"}
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "获取任务信息失败!"}
|
|
|
c.ServeJSON()
|
|
|
return
|
|
|
}
|
|
@@ -1092,14 +1092,14 @@ func (c *TaskDataController) Export_Data_Excel() {
|
|
|
|
|
|
func (c *TaskDataController) Check() {
|
|
|
T_task_id := c.GetString("T_task_id")
|
|
|
- Task_r, err := NatsServer.Read_Task(T_task_id)
|
|
|
+ Task_r, err := Task.Read_Task(T_task_id)
|
|
|
if Task_r.T_collection_state == 2 {
|
|
|
c.Data["json"] = lib.JSONS{Code: 202, Msg: "数据采集中,请稍后!"}
|
|
|
c.ServeJSON()
|
|
|
return
|
|
|
}
|
|
|
if err != nil {
|
|
|
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_task_id 错误!"}
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "获取任务信息失败!"}
|
|
|
c.ServeJSON()
|
|
|
return
|
|
|
}
|
|
@@ -1184,14 +1184,14 @@ func (c *TaskDataController) Check() {
|
|
|
|
|
|
func (c *TaskDataController) Check_Asyn() {
|
|
|
T_task_id := c.GetString("T_task_id")
|
|
|
- Task_r, err := NatsServer.Read_Task(T_task_id)
|
|
|
+ Task_r, err := Task.Read_Task(T_task_id)
|
|
|
if Task_r.T_collection_state == 2 {
|
|
|
c.Data["json"] = lib.JSONS{Code: 202, Msg: "数据采集中,请稍后!"}
|
|
|
c.ServeJSON()
|
|
|
return
|
|
|
}
|
|
|
if err != nil {
|
|
|
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_task_id 错误!"}
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "获取任务信息失败!"}
|
|
|
c.ServeJSON()
|
|
|
return
|
|
|
}
|
|
@@ -1305,9 +1305,9 @@ func (c *TaskDataController) TaskData_Import_TaskData() {
|
|
|
T_uuid, _ := lib.GetAdminT_Uuid(c.Ctx.GetCookie("User_tokey"), c.GetString("User_tokey"))
|
|
|
|
|
|
T_task_id := c.GetString("T_task_id")
|
|
|
- _, err := NatsServer.Read_Task(T_task_id)
|
|
|
+ _, err := Task.Read_Task(T_task_id)
|
|
|
if err != nil {
|
|
|
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_task_id 错误!"}
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "获取任务信息失败!"}
|
|
|
c.ServeJSON()
|
|
|
return
|
|
|
}
|
|
@@ -1362,9 +1362,9 @@ func (c *TaskDataController) TaskData_Up_TaskData() {
|
|
|
|
|
|
T_task_id := c.GetString("T_task_id")
|
|
|
|
|
|
- Task_r, err := NatsServer.Read_Task(T_task_id)
|
|
|
+ Task_r, err := Task.Read_Task(T_task_id)
|
|
|
if err != nil {
|
|
|
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_task_id 错误!"}
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "获取任务信息失败!"}
|
|
|
c.ServeJSON()
|
|
|
return
|
|
|
}
|
|
@@ -1430,9 +1430,9 @@ func (c *TaskDataController) TaskData_Up_TaskData_Back() {
|
|
|
|
|
|
T_task_id := c.GetString("T_task_id")
|
|
|
|
|
|
- Task_r, err := NatsServer.Read_Task(T_task_id)
|
|
|
+ Task_r, err := Task.Read_Task(T_task_id)
|
|
|
if err != nil {
|
|
|
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_task_id 错误!"}
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "获取任务信息失败!"}
|
|
|
c.ServeJSON()
|
|
|
return
|
|
|
}
|
|
@@ -1450,7 +1450,6 @@ func (c *TaskDataController) TaskData_Up_TaskData_Back() {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-
|
|
|
// 采集中
|
|
|
Task_r.T_delivery_state = 2
|
|
|
err = NatsServer.Update_Task(Task_r)
|
|
@@ -1460,8 +1459,6 @@ func (c *TaskDataController) TaskData_Up_TaskData_Back() {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
data := Nats.Up_TaskData_Back{
|
|
|
T_uuid: T_uuid,
|
|
|
Task: Task_r,
|
|
@@ -1511,9 +1508,9 @@ func (c *TaskDataController) CopyFromPosition() {
|
|
|
SN_List := strings.Split(strings.Trim(c.GetString("SN_List"), "|"), "|")
|
|
|
|
|
|
T_task_id := c.GetString("T_task_id")
|
|
|
- Task_r, err := NatsServer.Read_Task(T_task_id)
|
|
|
+ Task_r, err := Task.Read_Task(T_task_id)
|
|
|
if err != nil {
|
|
|
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_task_id 错误!"}
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "获取任务信息失败!"}
|
|
|
c.ServeJSON()
|
|
|
return
|
|
|
}
|
|
@@ -1575,9 +1572,9 @@ func (c *TaskDataController) RepairSensorData() {
|
|
|
SN_List := strings.Split(strings.Trim(c.GetString("SN_List"), "|"), "|")
|
|
|
|
|
|
T_task_id := c.GetString("T_task_id")
|
|
|
- Task_r, err := NatsServer.Read_Task(T_task_id)
|
|
|
+ Task_r, err := Task.Read_Task(T_task_id)
|
|
|
if err != nil {
|
|
|
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_task_id 错误!"}
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "获取任务信息失败!"}
|
|
|
c.ServeJSON()
|
|
|
return
|
|
|
}
|
|
@@ -1665,9 +1662,9 @@ func (c *TaskDataController) DataSensorDataTrend() {
|
|
|
SN_List := strings.Split(strings.Trim(c.GetString("SN_List"), "|"), "|")
|
|
|
|
|
|
T_task_id := c.GetString("T_task_id")
|
|
|
- Task_r, err := NatsServer.Read_Task(T_task_id)
|
|
|
+ Task_r, err := Task.Read_Task(T_task_id)
|
|
|
if err != nil {
|
|
|
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_task_id 错误!"}
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "获取任务信息失败!"}
|
|
|
c.ServeJSON()
|
|
|
return
|
|
|
}
|
|
@@ -1754,9 +1751,9 @@ func (c *TaskDataController) UpdateRand() {
|
|
|
SN_List := strings.Split(strings.Trim(c.GetString("SN_List"), "|"), "|")
|
|
|
|
|
|
T_task_id := c.GetString("T_task_id")
|
|
|
- Task_r, err := NatsServer.Read_Task(T_task_id)
|
|
|
+ Task_r, err := Task.Read_Task(T_task_id)
|
|
|
if err != nil {
|
|
|
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_task_id 错误!"}
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "获取任务信息失败!"}
|
|
|
c.ServeJSON()
|
|
|
return
|
|
|
}
|
|
@@ -1813,9 +1810,9 @@ func (c *TaskDataController) UpdateFix() {
|
|
|
SN_List := strings.Split(strings.Trim(c.GetString("SN_List"), "|"), "|")
|
|
|
|
|
|
T_task_id := c.GetString("T_task_id")
|
|
|
- Task_r, err := NatsServer.Read_Task(T_task_id)
|
|
|
+ Task_r, err := Task.Read_Task(T_task_id)
|
|
|
if err != nil {
|
|
|
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_task_id 错误!"}
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "获取任务信息失败!"}
|
|
|
c.ServeJSON()
|
|
|
return
|
|
|
}
|
|
@@ -1869,9 +1866,9 @@ func (c *TaskDataController) DataSensorDataSmooth() {
|
|
|
SN_List := strings.Split(strings.Trim(c.GetString("SN_List"), "|"), "|")
|
|
|
|
|
|
T_task_id := c.GetString("T_task_id")
|
|
|
- Task_r, err := NatsServer.Read_Task(T_task_id)
|
|
|
+ Task_r, err := Task.Read_Task(T_task_id)
|
|
|
if err != nil {
|
|
|
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_task_id 错误!"}
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "获取任务信息失败!"}
|
|
|
c.ServeJSON()
|
|
|
return
|
|
|
}
|
|
@@ -1968,9 +1965,9 @@ func (c *TaskDataController) CopyFromPositionAverageSN() {
|
|
|
return
|
|
|
}
|
|
|
T_task_id := c.GetString("T_task_id")
|
|
|
- Task_r, err := NatsServer.Read_Task(T_task_id)
|
|
|
+ Task_r, err := Task.Read_Task(T_task_id)
|
|
|
if err != nil {
|
|
|
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_task_id 错误!"}
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "获取任务信息失败!"}
|
|
|
c.ServeJSON()
|
|
|
return
|
|
|
}
|
|
@@ -2078,9 +2075,9 @@ func (c *TaskDataController) CopyFromPositionSN() {
|
|
|
return
|
|
|
}
|
|
|
T_task_id := c.GetString("T_task_id")
|
|
|
- Task_r, err := NatsServer.Read_Task(T_task_id)
|
|
|
+ Task_r, err := Task.Read_Task(T_task_id)
|
|
|
if err != nil {
|
|
|
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_task_id 错误!"}
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "获取任务信息失败!"}
|
|
|
c.ServeJSON()
|
|
|
return
|
|
|
}
|
|
@@ -2122,9 +2119,9 @@ func (c *TaskDataController) DataRemoveDuplicates() {
|
|
|
T_uuid, _ := lib.GetAdminT_Uuid(c.Ctx.GetCookie("User_tokey"), c.GetString("User_tokey"))
|
|
|
|
|
|
T_task_id := c.GetString("T_task_id")
|
|
|
- Task_r, err := NatsServer.Read_Task(T_task_id)
|
|
|
+ Task_r, err := Task.Read_Task(T_task_id)
|
|
|
if err != nil {
|
|
|
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_task_id 错误!"}
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "获取任务信息失败!"}
|
|
|
c.ServeJSON()
|
|
|
return
|
|
|
}
|
|
@@ -2178,9 +2175,9 @@ func (c *TaskDataController) DataSkewingInterval() {
|
|
|
SN_List := strings.Split(strings.Trim(c.GetString("SN_List"), "|"), "|")
|
|
|
|
|
|
T_task_id := c.GetString("T_task_id")
|
|
|
- Task_r, err := NatsServer.Read_Task(T_task_id)
|
|
|
+ Task_r, err := Task.Read_Task(T_task_id)
|
|
|
if err != nil {
|
|
|
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_task_id 错误!"}
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "获取任务信息失败!"}
|
|
|
c.ServeJSON()
|
|
|
return
|
|
|
}
|
|
@@ -2269,9 +2266,9 @@ func (c *TaskDataController) DataGeometricScale() {
|
|
|
SN_List := strings.Split(strings.Trim(c.GetString("SN_List"), "|"), "|")
|
|
|
|
|
|
T_task_id := c.GetString("T_task_id")
|
|
|
- Task_r, err := NatsServer.Read_Task(T_task_id)
|
|
|
+ Task_r, err := Task.Read_Task(T_task_id)
|
|
|
if err != nil {
|
|
|
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_task_id 错误!"}
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "获取任务信息失败!"}
|
|
|
c.ServeJSON()
|
|
|
return
|
|
|
}
|
|
@@ -2330,9 +2327,9 @@ func (c *TaskDataController) DataBatchDelete() {
|
|
|
SN_List := strings.Split(strings.Trim(c.GetString("SN_List"), "|"), "|")
|
|
|
|
|
|
T_task_id := c.GetString("T_task_id")
|
|
|
- Task_r, err := NatsServer.Read_Task(T_task_id)
|
|
|
+ Task_r, err := Task.Read_Task(T_task_id)
|
|
|
if err != nil {
|
|
|
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_task_id 错误!"}
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "获取任务信息失败!"}
|
|
|
c.ServeJSON()
|
|
|
return
|
|
|
}
|
|
@@ -2372,9 +2369,9 @@ func (c *TaskDataController) TaskDataCopy_List() {
|
|
|
}
|
|
|
|
|
|
T_task_id := c.GetString("T_task_id")
|
|
|
- Task_r, err := NatsServer.Read_Task(T_task_id)
|
|
|
+ Task_r, err := Task.Read_Task(T_task_id)
|
|
|
if err != nil {
|
|
|
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_task_id 错误!"}
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "获取任务信息失败!"}
|
|
|
c.ServeJSON()
|
|
|
return
|
|
|
}
|
|
@@ -2402,9 +2399,9 @@ func (c *TaskDataController) TaskDataCopy_List() {
|
|
|
func (c *TaskDataController) TaskDataCopy_Add() {
|
|
|
|
|
|
T_task_id := c.GetString("T_task_id")
|
|
|
- Task_r, err := NatsServer.Read_Task(T_task_id)
|
|
|
+ Task_r, err := Task.Read_Task(T_task_id)
|
|
|
if err != nil {
|
|
|
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_task_id 错误!"}
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "获取任务信息失败!"}
|
|
|
c.ServeJSON()
|
|
|
return
|
|
|
}
|
|
@@ -2465,9 +2462,9 @@ func (c *TaskDataController) TaskDataCopy_Del() {
|
|
|
func (c *TaskDataController) TaskDataCopy_Recover() {
|
|
|
T_task_id := c.GetString("T_task_id")
|
|
|
T_copy_id := c.GetString("T_copy_id")
|
|
|
- Task_r, err := NatsServer.Read_Task(T_task_id)
|
|
|
+ Task_r, err := Task.Read_Task(T_task_id)
|
|
|
if err != nil {
|
|
|
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_task_id 错误!"}
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "获取任务信息失败!"}
|
|
|
c.ServeJSON()
|
|
|
return
|
|
|
}
|
|
@@ -2537,9 +2534,9 @@ func (c *TaskDataController) TaskData_JPG() {
|
|
|
|
|
|
T_task_id := c.GetString("T_task_id")
|
|
|
SN_List := c.GetString("SN_List")
|
|
|
- Task_r, err := NatsServer.Read_Task(T_task_id)
|
|
|
+ Task_r, err := Task.Read_Task(T_task_id)
|
|
|
if err != nil {
|
|
|
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_task_id 错误!"}
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "获取任务信息失败!"}
|
|
|
c.ServeJSON()
|
|
|
return
|
|
|
}
|
|
@@ -2703,9 +2700,9 @@ func (c *TaskDataController) Certificate_List() {
|
|
|
if page_z < 1 {
|
|
|
page_z = conf.Page_size
|
|
|
}
|
|
|
- Task_r, err := NatsServer.Read_Task(T_task_id)
|
|
|
+ Task_r, err := Task.Read_Task(T_task_id)
|
|
|
if err != nil {
|
|
|
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_task_id 错误!"}
|
|
|
+ c.Data["json"] = lib.JSONS{Code: 202, Msg: "获取任务信息失败!"}
|
|
|
c.ServeJSON()
|
|
|
return
|
|
|
}
|