From fc3cf8628d46b02a7c86c865889954fa6edb6c9a Mon Sep 17 00:00:00 2001 From: qfrjava <13402782+qfrjava@user.noreply.gitee.com> Date: 星期五, 18 四月 2025 14:28:06 +0800 Subject: [PATCH] feat(websocket): 实现 websocket广播功能 --- JAVA/SMTAIServer/src/main/java/com/smtaiserver/smtaiserver/control/SMTJavaAIControl.java | 96 ++++++++++++++++++++++++----------------------- 1 files changed, 49 insertions(+), 47 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 fce5d7a..4f672b7 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 @@ -295,53 +295,53 @@ return tranReq.returnJson(jsonWr); } - - public ModelAndView createOrder(SMTAIServerRequest tranReq) throws Exception - { - String title = tranReq.convParamToString("title", 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 createtime = tranReq.convParamToString("createtime", 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); - SMTDatabase db = SMTAIServerApp.getApp().allocDatabase(); - try - { + public ModelAndView createOrder(SMTAIServerRequest tranReq) throws Exception { + String title = tranReq.convParamToString("title", 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 createtime = tranReq.convParamToString("createtime", 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( "INSERT INTO work_order_list(" + "order_id, title, wstypeid, wstypename, urgencylevel, shape, deadline, stepstatus, " - + "originatetypetext, content, address, stepid, org, deptname, dealtime, username, contactname, " + + "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" + + "appointstarttime, appointendtime, parentid, relateids,is_notify,oname,otype" + ") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?)", new Object[] { SMTStatic.newUUID(), @@ -378,14 +378,16 @@ appointendtime, parentid, relateids, - "N" + "N", + oname, + otype }); - }catch (Exception e){ - throw new Exception("鏁版嵁搴撻敊璇�", e); - } + } catch (Exception e) { + throw new Exception("鏁版嵁搴撻敊璇�", e); + } - return tranReq.returnJsonState(true, null, null); - } + return tranReq.returnJsonState(true, null, null); + } public ModelAndView updateOrderStatus(SMTAIServerRequest tranReq) throws Exception { String id = tranReq.convParamToString("id", true); -- Gitblit v1.9.3