feat/java_ai: 添加修改工单内容功能
- 在 SMTJavaAIControl 类中新增 updateOrder 方法,用于更新工单信息
- 在 java_ai.json 中添加相应的请求映射和 Swagger 文档
- 优化 SMTJsonFlowNodeScript 类中的 llmAnswerToJson 方法
| | |
| | | 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);
|
| | | }
|
| | |
|
| | | public ModelAndView getOrderList(SMTAIServerRequest tranReq) throws Exception {
|
| | | SMTJsonWriter jsonWr = tranReq.newReturnJsonWriter(true, null, null);
|
| | | SMTDatabase db = SMTAIServerApp.getApp().allocDatabase();
|
| | |
| | |
|
| | | public Object llmAnswerToJson(String sJson)
|
| | | {
|
| | | return SMTAIServerApp.convJsonToJS(SMTStatic.convLLMAnswerToJson(sJson, false));
|
| | | Object object = SMTAIServerApp.convJsonToJS(SMTStatic.convLLMAnswerToJson(sJson, false));
|
| | | return object;
|
| | | }
|
| | |
|
| | | public Object getArg(String key)
|
| | |
| | | ]
|
| | | }
|
| | | ]
|
| | | },
|
| | | "sys/update_order":{
|
| | | "map":{"class":"#SMTJavaAIControl", "method":"updateOrder"}, "no_shrio":false,
|
| | | "swaggers":[
|
| | | {
|
| | | "tags" : ["修改工单内容"],
|
| | | "title" : "修改工单内容",
|
| | | "parameters" : [
|
| | | {"name": "title", "title": "标题", "required": false},
|
| | | {"name": "wstypeid", "title": "类型编号", "required": false},
|
| | | {"name": "wstypename", "title": "类型名称", "required": false},
|
| | | {"name": "urgencylevel", "title": "紧急级别", "required": false},
|
| | | {"name": "shape", "title": "派单坐标", "required": false},
|
| | | {"name": "deadline", "title": "处理时限", "required": false},
|
| | | {"name": "stepstatus", "title": "工单进度状态", "required": false},
|
| | | {"name": "originatetypetext", "title": "来源类型", "required": false},
|
| | | {"name": "content", "title": "内容", "required": false},
|
| | | {"name": "address", "title": "地址", "required": false},
|
| | | {"name": "stepid", "title": "工单步骤", "required": false},
|
| | | {"name": "org", "title": "所属分公司", "required": false},
|
| | | {"name": "deptname", "title": "工单所属部门名称", "required": false},
|
| | | {"name": "dealtime", "title": "处理时间", "required": false},
|
| | | {"name": "username", "title": "用户名称", "required": false},
|
| | | {"name": "contactname", "title": "联系人", "required": false},
|
| | | {"name": "contactphone", "title": "联系电话", "required": false},
|
| | | {"name": "acceptuserid", "title": "接单人id", "required": false},
|
| | | {"name": "acceptusername", "title": "接单人名称", "required": false},
|
| | | {"name": "acceptuseraccount", "title": "接单人账号", "required": false},
|
| | | {"name": "dealuserid", "title": "处理人id", "required": false},
|
| | | {"name": "dealusername", "title": "处理人名称", "required": false},
|
| | | {"name": "dealuseraccount", "title": "处理人账号", "required": false},
|
| | | {"name": "flowstatus", "title": "工单状态", "required": false},
|
| | | {"name": "attachment", "title": "附件", "required": false},
|
| | | {"name": "creator", "title": "创建人", "required": false},
|
| | | {"name": "createtime", "title": "创建时间", "required": false},
|
| | | {"name": "isplan", "title": "是否计划工单", "required": false},
|
| | | {"name": "originateid", "title": "来源编号", "required": false},
|
| | | {"name": "appointstarttime", "title": "预约开始时间", "required": false},
|
| | | {"name": "appointendtime", "title": "预约结束时间", "required": false},
|
| | | {"name": "parentid", "title": "父级编号", "required": false},
|
| | | {"name": "relateids", "title": "关联编号", "required": false},
|
| | | {"name": "orderId", "title": "工单id", "required": true}
|
| | | ]
|
| | | }
|
| | | ]
|
| | | }
|
| | |
|
| | |
|