From 048db32d9a965f1ef398a8aa02a012e9b968a6b1 Mon Sep 17 00:00:00 2001 From: liusheng <337615773@qq.com> Date: 星期五, 08 十一月 2024 18:39:04 +0800 Subject: [PATCH] 代码提交 --- smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java | 2 ruoyi-admin/src/main/resources/application-druid.yml | 4 ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java | 137 +++++++++++++++++++++++---------------------- ruoyi-admin/src/main/resources/application.yml | 2 4 files changed, 74 insertions(+), 71 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java b/ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java index f5cbbb7..56581fc 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java @@ -1,5 +1,6 @@ package com.ruoyi.web.component; +import com.alibaba.fastjson.JSON; import com.alibaba.fastjson2.JSONObject; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.gson.Gson; @@ -417,77 +418,77 @@ String taskId = rsaPublicKeyExample.encryptedData(ivrTask1.getTaskid().toString(), pub_key); for (ServiceSubtask serviceSubtask : selectServiceSubtaskList) { String patid = rsaPublicKeyExample.encryptedData(serviceSubtask.getPatid().toString(), pub_key); - -// SendMagParam sendMagParam = new SendMagParam(); -// sendMagParam.setType("5"); -// sendMagParam.setUrl(ip + ":" + req_path + "/outsideChain?param1=" + taskId + "¶m2=" + patid + "¶m3=" + ivrTask1.getTaskName() + "¶m5=false"); -// log.info("閾炬帴瀹屾暣璺緞锛歿}", ip + ":" + req_path + "/outsideChain?param1=" + taskId + "¶m2=" + patid + "¶m3=" + ivrTask1.getTaskName() + "¶m5=false"); -// //杩欎釜妯℃澘ID鍏堝啓姝伙紝鍚庨潰鍋氭垚鍙�� -// sendMagParam.setTmpCode("oG3pJHPVWpE81DmZsua_2tKwgJ97r0qz37z56ns7NB4"); -// Map map = new HashMap(); -// map.put("first", ivrTask1.getTaskName()); -// sendMagParam.setContent(JSON.toJSONString(map)); -// sendMagParam.setOpenid(serviceSubtask.getOpenid()); -// Boolean aBoolean = sendService.sendMsg(sendMagParam); - String url = null; try { -// if (type == 1) { -// url = ip + ":" + req_path + "/outsideChain?param1=" + taskId + "¶m2=" + patid + "¶m3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + "¶m5=false"; -// } else if (type == 2) { -// url = ip + ":" + req_path + "/outsideChainwt?param1=" + taskId + "¶m2=" + patid + "¶m3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + "¶m5=false"; -// } else if (type == 3) { -// url = ip + ":" + req_path + "/outsideChainxj?param1=" + taskId + "¶m2=" + patid + "¶m3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + "¶m5=false"; -// } - if (type == 1) { - //闅忚 - ServiceOutPath serviceOutPath = new ServiceOutPath(); - serviceOutPath.setParam1(taskId); - serviceOutPath.setParam2(patid); - serviceOutPath.setCreateTime(new Date()); - iServiceOutPathService.insertServiceOutPath(serviceOutPath); - String format = String.format("%03X", serviceOutPath.getId()); - serviceOutPath.setRadix(format); - serviceOutPath.setUpdateTime(new Date()); - iServiceOutPathService.updateServiceOutPath(serviceOutPath); -// sendMagParam.setUrl(ip + ":" + req_path + "/followvisit/particty?param1=" + taskId + "¶m2=" + patid + "¶m5=false"); - url = ip + ":" + req_path + "/sf?p=" + format; - } else if (type == 2) { - //闂埜 - ServiceOutPath serviceOutPath = new ServiceOutPath(); - serviceOutPath.setParam1(taskId); - serviceOutPath.setParam2(patid); -// serviceOutPath.setParam3(URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString())); - serviceOutPath.setParam3(ivrTask1.getTaskName()); - serviceOutPath.setCreateTime(new Date()); - iServiceOutPathService.insertServiceOutPath(serviceOutPath); - String format = String.format("%03X", serviceOutPath.getId()); - serviceOutPath.setRadix(format); - serviceOutPath.setUpdateTime(new Date()); - iServiceOutPathService.updateServiceOutPath(serviceOutPath); -// sendMagParam.setUrl(ip + ":" + req_path + "/outsideChainwt?param1=" + taskId + "¶m2=" + patid + "¶m3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + "¶m5=false"); - url = ip + ":" + req_path + "/wt?p=" + format; - } else if (type == 3) { - //瀹f暀 - ServiceOutPath serviceOutPath = new ServiceOutPath(); - serviceOutPath.setParam1(taskId); - serviceOutPath.setParam2(patid); -// serviceOutPath.setParam3(URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString())); - serviceOutPath.setParam3(ivrTask1.getTaskName()); - serviceOutPath.setCreateTime(new Date()); - iServiceOutPathService.insertServiceOutPath(serviceOutPath); - String format = String.format("%03X", serviceOutPath.getId()); - serviceOutPath.setRadix(format); - serviceOutPath.setUpdateTime(new Date()); - iServiceOutPathService.updateServiceOutPath(serviceOutPath); - url = ip + ":" + req_path + "/xj?p=" + format; - } + SendMagParam sendMagParam = new SendMagParam(); + sendMagParam.setType("5"); + sendMagParam.setUrl(ip + ":" + req_path + "/outsideChain?param1=" + taskId + "¶m2=" + patid + "¶m3=" + ivrTask1.getTaskName() + "¶m5=false"); + log.info("閾炬帴瀹屾暣璺緞锛歿}", ip + ":" + req_path + "/outsideChain?param1=" + taskId + "¶m2=" + patid + "¶m3=" + ivrTask1.getTaskName() + "¶m5=false"); + //杩欎釜妯℃澘ID鍏堝啓姝伙紝鍚庨潰鍋氭垚鍙�� + sendMagParam.setTmpCode("oG3pJHPVWpE81DmZsua_2tKwgJ97r0qz37z56ns7NB4"); + Map map = new HashMap(); + map.put("first", ivrTask1.getTaskName()); + sendMagParam.setContent(JSON.toJSONString(map)); + sendMagParam.setOpenid(serviceSubtask.getOpenid()); + Boolean aBoolean = sendService.sendMsg(sendMagParam); + String url = null; - String wxCode = getWXCode(serviceSubtask.getSfzh(), url, serviceSubtask.getTaskName(), serviceSubtask.getTaskDesc(), "鏃�"); - Map<String, Object> map = JSONObject.parseObject(wxCode, Map.class); - if (!map.isEmpty()) { +//// if (type == 1) { +//// url = ip + ":" + req_path + "/outsideChain?param1=" + taskId + "¶m2=" + patid + "¶m3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + "¶m5=false"; +//// } else if (type == 2) { +//// url = ip + ":" + req_path + "/outsideChainwt?param1=" + taskId + "¶m2=" + patid + "¶m3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + "¶m5=false"; +//// } else if (type == 3) { +//// url = ip + ":" + req_path + "/outsideChainxj?param1=" + taskId + "¶m2=" + patid + "¶m3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + "¶m5=false"; +//// } +// if (type == 1) { +// //闅忚 +// ServiceOutPath serviceOutPath = new ServiceOutPath(); +// serviceOutPath.setParam1(taskId); +// serviceOutPath.setParam2(patid); +// serviceOutPath.setCreateTime(new Date()); +// iServiceOutPathService.insertServiceOutPath(serviceOutPath); +// String format = String.format("%03X", serviceOutPath.getId()); +// serviceOutPath.setRadix(format); +// serviceOutPath.setUpdateTime(new Date()); +// iServiceOutPathService.updateServiceOutPath(serviceOutPath); +//// sendMagParam.setUrl(ip + ":" + req_path + "/followvisit/particty?param1=" + taskId + "¶m2=" + patid + "¶m5=false"); +// url = ip + ":" + req_path + "/sf?p=" + format; +// } else if (type == 2) { +// //闂埜 +// ServiceOutPath serviceOutPath = new ServiceOutPath(); +// serviceOutPath.setParam1(taskId); +// serviceOutPath.setParam2(patid); +//// serviceOutPath.setParam3(URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString())); +// serviceOutPath.setParam3(ivrTask1.getTaskName()); +// serviceOutPath.setCreateTime(new Date()); +// iServiceOutPathService.insertServiceOutPath(serviceOutPath); +// String format = String.format("%03X", serviceOutPath.getId()); +// serviceOutPath.setRadix(format); +// serviceOutPath.setUpdateTime(new Date()); +// iServiceOutPathService.updateServiceOutPath(serviceOutPath); +//// sendMagParam.setUrl(ip + ":" + req_path + "/outsideChainwt?param1=" + taskId + "¶m2=" + patid + "¶m3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + "¶m5=false"); +// url = ip + ":" + req_path + "/wt?p=" + format; +// } else if (type == 3) { +// //瀹f暀 +// ServiceOutPath serviceOutPath = new ServiceOutPath(); +// serviceOutPath.setParam1(taskId); +// serviceOutPath.setParam2(patid); +//// serviceOutPath.setParam3(URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString())); +// serviceOutPath.setParam3(ivrTask1.getTaskName()); +// serviceOutPath.setCreateTime(new Date()); +// iServiceOutPathService.insertServiceOutPath(serviceOutPath); +// String format = String.format("%03X", serviceOutPath.getId()); +// serviceOutPath.setRadix(format); +// serviceOutPath.setUpdateTime(new Date()); +// iServiceOutPathService.updateServiceOutPath(serviceOutPath); +// url = ip + ":" + req_path + "/xj?p=" + format; +// } +// +// String wxCode = getWXCode(serviceSubtask.getSfzh(), url, serviceSubtask.getTaskName(), serviceSubtask.getTaskDesc(), "鏃�"); +// Map<String, Object> map = JSONObject.parseObject(wxCode, Map.class); +// if (!map.isEmpty()) { serviceSubtask.setResult("success"); serviceSubtask.setSendstate(3L); - if ((Boolean) map.get("succ") == false) { + if (aBoolean == false) { ServiceSubtaskRecord serviceSubtaskRecord = new ServiceSubtaskRecord(); serviceSubtaskRecord.setTaskid(serviceSubtask.getTaskid().toString()); serviceSubtaskRecord.setSubtaskId(serviceSubtask.getId()); @@ -500,7 +501,7 @@ serviceSubtaskRecordService.insertServiceSubtaskRecord(serviceSubtaskRecord); continue; } - } +// } } catch (Exception e) { ServiceSubtaskRecord serviceSubtaskRecord = new ServiceSubtaskRecord(); serviceSubtaskRecord.setTaskid(serviceSubtask.getTaskid().toString()); diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index ec477ef..ff5289c 100644 --- a/ruoyi-admin/src/main/resources/application-druid.yml +++ b/ruoyi-admin/src/main/resources/application-druid.yml @@ -11,9 +11,9 @@ # username: root # password: 123456 # 鍏徃 - # url: jdbc:mysql://192.168.2.9:3308/smartor?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + url: jdbc:mysql://192.168.2.9:3308/smartor?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 # 鏂板崕 - url: jdbc:mysql://192.168.191.181:3308/smartor?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + # url: jdbc:mysql://192.168.191.181:3308/smartor?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 username: smartor password: Smartor.2023 driverClassName: com.mysql.cj.jdbc.Driver diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index be3e019..9ce2569 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -72,7 +72,7 @@ # redis 閰嶇疆 redis: # # 鍦板潃锛堜箟涔屼簩闄級 - host: 127.0.0.1 + host: 192.168.2.10 port: 6020 # 鍦板潃锛堝叕鍙革級 diff --git a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java index c1286ec..d5c88ea 100644 --- a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java +++ b/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java @@ -154,6 +154,7 @@ patTaskRelevance.setFinishtime(serviceSubtask1.getFinishtime()); patTaskRelevance.setSfzh(serviceSubtask1.getSfzh()); patTaskRelevance.setPhone(serviceSubtask1.getPhone()); + patTaskRelevance.setTelcode(serviceSubtask1.getPhone()); patTaskRelevance.setAddr(serviceSubtask1.getAddr()); patTaskRelevance.setDiagname(serviceSubtask1.getDiagname()); patTaskRelevance.setPatid(serviceSubtask1.getPatid()); @@ -176,6 +177,7 @@ patTaskRelevance.setAge(serviceSubtask1.getAge()); patTaskRelevance.setSfzh(serviceSubtask1.getSfzh()); patTaskRelevance.setPhone(serviceSubtask1.getPhone()); + patTaskRelevance.setTelcode(serviceSubtask1.getPhone()); patTaskRelevance.setFinishtime(serviceSubtask1.getFinishtime()); patTaskRelevance.setAddr(serviceSubtask1.getAddr()); patTaskRelevance.setDeptName(serviceSubtask1.getDeptname()); -- Gitblit v1.9.3