From 71cc6deae4b873c3382895054fe2bd6816290755 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期五, 22 九月 2023 20:25:25 +0800
Subject: [PATCH] 增加安全生产提示语配置

---
 conf/config.go           |    6 ++++++
 conf/apsClient.json      |    3 +++
 model/response/common.go |    2 ++
 api/v1/task.go           |    2 ++
 4 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/api/v1/task.go b/api/v1/task.go
index 8fbc448..675caa8 100644
--- a/api/v1/task.go
+++ b/api/v1/task.go
@@ -85,6 +85,8 @@
 		}
 	}
 
+	taskResponse.Prompt = conf.Conf.Prompt
+
 	ctx.OkWithDetailed(taskResponse)
 }
 
diff --git a/conf/apsClient.json b/conf/apsClient.json
index d7bc4bf..6517576 100644
--- a/conf/apsClient.json
+++ b/conf/apsClient.json
@@ -35,6 +35,9 @@
     "slaveId": 0,
     "package": "goborrow",
     "standbyTime": 300
+  },
+  "prompt": {
+    "safeProduce": "璇风‘璁ゅ畨鍏ㄧ敓浜э紒"
   }
 }
 
diff --git a/conf/config.go b/conf/config.go
index 9b10476..1f9122b 100644
--- a/conf/config.go
+++ b/conf/config.go
@@ -76,6 +76,10 @@
 		StandbyTime              int64
 	}
 
+	Prompt struct {
+		SafeProduce string `json:"safeProduce,omitempty"`
+	}
+
 	config struct {
 		// 绯荤粺閰嶇疆
 		System System
@@ -94,6 +98,8 @@
 
 		//PLC
 		PLC plc
+
+		Prompt Prompt
 	}
 )
 
diff --git a/model/response/common.go b/model/response/common.go
index 61bc97d..2779602 100644
--- a/model/response/common.go
+++ b/model/response/common.go
@@ -1,6 +1,7 @@
 package response
 
 import (
+	"apsClient/conf"
 	"apsClient/model"
 	"apsClient/model/common"
 )
@@ -33,6 +34,7 @@
 	Tasks     []*TaskData
 	TaskCount int64
 	Workers   []*common.ProcedureWorker `json:"workers"` // 浜哄憳鍒楄〃
+	Prompt    conf.Prompt
 }
 
 type Config struct {

--
Gitblit v1.8.0