From cd5d537aadbe302fc8b62f87edd8aea81021930e Mon Sep 17 00:00:00 2001
From: qfrjava <13402782+qfrjava@user.noreply.gitee.com>
Date: 星期日, 27 四月 2025 13:38:22 +0800
Subject: [PATCH] feat(LightRAG): 新增 lightrag 服务管理接口并实现相关功能

---
 JAVA/SMTAIServer/src/main/java/com/smtaiserver/smtaiserver/control/SMTJavaAIControl.java |  177 +++++++++++++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 153 insertions(+), 24 deletions(-)

diff --git a/JAVA/SMTAIServer/src/main/java/com/smtaiserver/smtaiserver/control/SMTJavaAIControl.java b/JAVA/SMTAIServer/src/main/java/com/smtaiserver/smtaiserver/control/SMTJavaAIControl.java
index 2590b80..1543ffd 100644
--- a/JAVA/SMTAIServer/src/main/java/com/smtaiserver/smtaiserver/control/SMTJavaAIControl.java
+++ b/JAVA/SMTAIServer/src/main/java/com/smtaiserver/smtaiserver/control/SMTJavaAIControl.java
@@ -421,6 +421,133 @@
     return tranReq.returnJsonState(true, null, null);
   }
 
+
+	public ModelAndView updateOrder(SMTAIServerRequest tranReq) throws Exception {
+		String title = tranReq.convParamToString("title", true);
+		String orderId = tranReq.convParamToString("orderId", true);
+		String wstypeid = tranReq.convParamToString("wstypeid", false);
+		String wstypename = tranReq.convParamToString("wstypename", false);
+		String urgencylevel = tranReq.convParamToString("urgencylevel", false);
+		String shape = tranReq.convParamToString("shape", false);
+		String deadline = tranReq.convParamToString("deadline", false);
+		String stepstatus = tranReq.convParamToString("stepstatus", false);
+		String originatetypetext = tranReq.convParamToString("originatetypetext", false);
+		String content = tranReq.convParamToString("content", false);
+		String address = tranReq.convParamToString("address", false);
+		String stepid = tranReq.convParamToString("stepid", false);
+		String org = tranReq.convParamToString("org", false);
+		String deptname = tranReq.convParamToString("deptname", false);
+		String dealtime = tranReq.convParamToString("dealtime", false);
+		String username = tranReq.convParamToString("username", false);
+		String contactname = tranReq.convParamToString("contactname", false);
+		String contactphone = tranReq.convParamToString("contactphone", false);
+		String acceptuserid = tranReq.convParamToString("acceptuserid", false);
+		String acceptusername = tranReq.convParamToString("acceptusername", false);
+		String acceptuseraccount = tranReq.convParamToString("acceptuseraccount", false);
+		String dealuserid = tranReq.convParamToString("dealuserid", false);
+		String dealusername = tranReq.convParamToString("dealusername", false);
+		String dealuseraccount = tranReq.convParamToString("dealuseraccount", false);
+		String flowstatus = tranReq.convParamToString("flowstatus", false);
+		String attachment = tranReq.convParamToString("attachment", false);
+		String creator = tranReq.convParamToString("creator", false);
+		String isplan = tranReq.convParamToString("isplan", false);
+		String originateid = tranReq.convParamToString("originateid", false);
+		String appointstarttime = tranReq.convParamToString("appointstarttime", false);
+		String appointendtime = tranReq.convParamToString("appointendtime", false);
+		String parentid = tranReq.convParamToString("parentid", false);
+		String relateids = tranReq.convParamToString("relateids", false);
+		String oname = tranReq.convParamToString("oname", false);
+		String otype = tranReq.convParamToString("otype", false);
+		SMTDatabase db = SMTAIServerApp.getApp().allocDatabase();
+		try {
+
+			db.executeSQL(
+					"UPDATE work_order_list SET "
+							+ "title = ?, "
+							+ "wstypeid = ?, "
+							+ "wstypename = ?, "
+							+ "urgencylevel = ?, "
+							+ "shape = ?, "
+							+ "deadline = ?, "
+							+ "stepstatus = ?, "
+							+ "originatetypetext = ?, "
+							+ "content = ?, "
+							+ "address = ?, "
+							+ "step_id = ?, "
+							+ "org = ?, "
+							+ "deptname = ?, "
+							+ "dealtime = ?, "
+							+ "username = ?, "
+							+ "contactname = ?, "
+							+ "contactphone = ?, "
+							+ "acceptuserid = ?, "
+							+ "acceptusername = ?, "
+							+ "acceptuseraccount = ?, "
+							+ "dealuserid = ?, "
+							+ "dealusername = ?, "
+							+ "dealuseraccount = ?, "
+							+ "flowstatus = ?, "
+							+ "attachment = ?, "
+							+ "creator = ?, "
+							+ "createtime = ?, "
+							+ "isplan = ?, "
+							+ "originateid = ?, "
+							+ "appointstarttime = ?, "
+							+ "appointendtime = ?, "
+							+ "parentid = ?, "
+							+ "relateids = ?, "
+							+ "is_notify = ?, "
+							+ "oname = ?, "
+							+ "otype = ? "
+							+ "WHERE order_id = ?",
+					new Object[]{
+							title,
+							wstypeid,
+							wstypename,
+							urgencylevel,
+							shape,
+							deadline,
+							stepstatus,
+							originatetypetext,
+							content,
+							address,
+							stepid,
+							org,
+							deptname,
+							dealtime,
+							username,
+							contactname,
+							contactphone,
+							acceptuserid,
+							acceptusername,
+							acceptuseraccount,
+							dealuserid,
+							dealusername,
+							dealuseraccount,
+							flowstatus,
+							attachment,
+							creator,
+							new Date(),
+							isplan,
+							originateid,
+							appointstarttime,
+							appointendtime,
+							parentid,
+							relateids,
+							"N",
+							oname,
+							otype,
+							orderId
+					});
+
+
+		} finally {
+			db.close();
+		}
+
+		return tranReq.returnJsonState(true, null, null);
+	}
+
   /**
    * 鑺傜偣鐘舵�佹洿鏂�
    *
@@ -445,33 +572,35 @@
     return tranReq.returnJsonState(true, null, null);
   }
 
-	public ModelAndView getOrderList(SMTAIServerRequest tranReq) throws Exception {
-		SMTJsonWriter jsonWr = tranReq.newReturnJsonWriter(true, null, null);
-		SMTDatabase db = SMTAIServerApp.getApp().allocDatabase();
-		try {
-			DBRecords recs = db.querySQL("SELECT * FROM work_order_list", null);
-			if (recs.getRowCount() != 0) {
-				jsonWr.beginArray("values");  // 寮�濮嬩竴涓暟缁勶紝key涓� "values"
+  public ModelAndView getOrderList(SMTAIServerRequest tranReq) throws Exception {
+    SMTJsonWriter jsonWr = tranReq.newReturnJsonWriter(true, null, null);
+    SMTDatabase db = SMTAIServerApp.getApp().allocDatabase();
+    try {
+      DBRecords recs =
+          db.querySQL(
+              "SELECT *,ST_AsText(address_shape) as address_shape_str  ,ST_AsText(shape) as shape_str FROM work_order_list",
+              null);
+      if (recs.getRowCount() != 0) {
+        jsonWr.beginArray("values"); // 寮�濮嬩竴涓暟缁勶紝key涓� "values"
 
-				for (DBRecord rec : recs.getRecords()) {
-					jsonWr.beginMap(null);  // 姣忔潯璁板綍鏄竴涓璞�
-					for (String colName : rec.getColNames()) {
-						jsonWr.addKeyValue(colName, rec.getString(colName));  // 娣诲姞姣忎釜瀛楁
-					}
-					jsonWr.endMap();  // 缁撴潫涓�涓璞�
-				}
+        for (DBRecord rec : recs.getRecords()) {
+          jsonWr.beginMap(null); // 姣忔潯璁板綍鏄竴涓璞�
+          for (String colName : rec.getColNames()) {
+            jsonWr.addKeyValue(colName, rec.getString(colName)); // 娣诲姞姣忎釜瀛楁
+          }
+          jsonWr.endMap(); // 缁撴潫涓�涓璞�
+        }
 
-				jsonWr.endArray();  // 缁撴潫鏁扮粍
+        jsonWr.endArray(); // 缁撴潫鏁扮粍
 
-				return tranReq.returnJson(jsonWr);
-			} else {
-				return tranReq.returnJsonState(false, "鏈壘鍒板伐鍗�", null);
-			}
-		} catch (Exception e) {
-			throw new Exception("鏌ヨ宸ュ崟澶辫触", e);
-		}
-	}
-
+        return tranReq.returnJson(jsonWr);
+      } else {
+        return tranReq.returnJsonState(false, "鏈壘鍒板伐鍗�", null);
+      }
+    } catch (Exception e) {
+      throw new Exception("鏌ヨ宸ュ崟澶辫触", e);
+    }
+  }
 
 	public ModelAndView disconnectBroadcastChat(SMTAIServerRequest tranReq) throws Exception 
 	{

--
Gitblit v1.9.3