|
@@ -2936,6 +2936,8 @@ func (c *TaskDataController) ListJson() {
|
|
|
"监测系统配置的测点终端参数及安装位置确认(满载)结束时间",
|
|
|
"监测系统配置的测点终端参数及安装位置确认(空载)开始时间",
|
|
|
"监测系统配置的测点终端参数及安装位置确认(空载)结束时间",
|
|
|
+ "培训讲师",
|
|
|
+ "培训时间",
|
|
|
}
|
|
|
|
|
|
c.Data["json"] = mySlice
|
|
@@ -5876,3 +5878,49 @@ func (c *TaskDataController) A监测系统配置的测点终端参数及安装
|
|
|
|
|
|
c.Ctx.ResponseWriter.WriteHeader(http.StatusOK)
|
|
|
}
|
|
|
+func (c *TaskDataController) A培训讲师() {
|
|
|
+
|
|
|
+ T_task_id := c.GetString("T_task_id") // v26nplogbwt1
|
|
|
+ println("T_task_id:", T_task_id)
|
|
|
+ c.Ctx.ResponseWriter.Header().Set("Content-Type", "text/event-stream")
|
|
|
+ c.Ctx.ResponseWriter.Header().Set("Cache-Control", "no-cache")
|
|
|
+ c.Ctx.ResponseWriter.Header().Set("Connection", "keep-alive")
|
|
|
+
|
|
|
+ Task_r, err := Task.Read_Task(T_task_id)
|
|
|
+ if err != nil {
|
|
|
+ lib.SseWriteJSON(c.Ctx.ResponseWriter, lib.JSONSSE{State: 2, Msg: "获取任务信息失败!"})
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ // 数据采集工程师
|
|
|
+ user, err := NatsServer.Read_Admin(Task_r.T_collection)
|
|
|
+ if err != nil {
|
|
|
+ lib.SseWriteJSON(c.Ctx.ResponseWriter, lib.JSONSSE{State: 2, Msg: "获取数据采集工程师信息失败!"})
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ lib.SseWriteJSON(c.Ctx.ResponseWriter, lib.JSONSSE{State: 1, Msg: user.T_name})
|
|
|
+
|
|
|
+ // Close the connection
|
|
|
+ c.Ctx.ResponseWriter.WriteHeader(http.StatusOK)
|
|
|
+}
|
|
|
+func (c *TaskDataController) A培训时间() {
|
|
|
+
|
|
|
+ T_task_id := c.GetString("T_task_id") // v26nplogbwt1
|
|
|
+ println("T_task_id:", T_task_id)
|
|
|
+ c.Ctx.ResponseWriter.Header().Set("Content-Type", "text/event-stream")
|
|
|
+ c.Ctx.ResponseWriter.Header().Set("Cache-Control", "no-cache")
|
|
|
+ c.Ctx.ResponseWriter.Header().Set("Connection", "keep-alive")
|
|
|
+
|
|
|
+ 现场测试开始时间_ := c.GetString("现场测试开始时间") // v26nplogbwt1
|
|
|
+ 现场测试开始时间, err := time.Parse("2006-01-02 15:04", 现场测试开始时间_)
|
|
|
+ if err != nil {
|
|
|
+ lib.SseWriteJSON(c.Ctx.ResponseWriter, lib.JSONSSE{State: 2, Msg: "获取 现场测试开始时间 失败!"})
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ lib.SseWriteJSON(c.Ctx.ResponseWriter, lib.JSONSSE{State: 1, Msg: 现场测试开始时间.Format("2006年01月")})
|
|
|
+
|
|
|
+ // Close the connection
|
|
|
+ c.Ctx.ResponseWriter.WriteHeader(http.StatusOK)
|
|
|
+}
|