From 25a0ba7b2706db3c5ee546da3e0e7c909777b890 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期三, 29 七月 2026 15:37:32 +0800
Subject: [PATCH] 1,患者过滤状态修改(之前只支持发送之前的过滤,现在支持发送之后的过滤,如果任务发送后,外链不能再打开) 2.在出入院表新增入院申请单字段 3.采集入院数据时,同时要采集importanceFlagCode emergencyLevelCode 4.外链的发送,也要查询子任务状态,如果是不执行,也不能再发送
---
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/SmsController.java | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 54 insertions(+), 6 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/SmsController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/SmsController.java
index 9b3667f..6a16085 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/SmsController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/SmsController.java
@@ -12,12 +12,10 @@
import com.ruoyi.common.utils.sms.smsUtils;
import com.smartor.common.MtSubmitSmUtil;
import com.smartor.common.ShiyiSmsUtil;
-import com.smartor.domain.ServiceOutPath;
-import com.smartor.domain.ShiyiSmsRequest;
-import com.smartor.domain.ShiyiSmsResponse;
-import com.smartor.domain.smsVO;
+import com.smartor.domain.*;
import com.smartor.mapper.UtilsMapper;
import com.smartor.service.IServiceOutPathService;
+import com.smartor.service.IServiceSubtaskService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
@@ -71,6 +69,8 @@
@Autowired
private IServiceOutPathService iServiceOutPathService;
+ @Autowired
+ private IServiceSubtaskService iServiceSubtaskService;
@Value("${spring.profiles.active}")
private String active;
@@ -106,6 +106,12 @@
@PostMapping("/send")
public AjaxResult sendAsk(@RequestBody smsVO vo) throws UnsupportedEncodingException {
String content = "";
+ if (StringUtils.isNotEmpty(vo.getSubId())) {
+ ServiceSubtask serviceSubtask = iServiceSubtaskService.selectServiceSubtaskById(Long.valueOf(vo.getSubId()));
+ if (serviceSubtask.getSendstate() == 4L) content = "璇ヤ换鍔′笉鎵ц";
+ return AjaxResult.error(content);
+ }
+
if (StringUtils.isNotEmpty(vo.getTaskId()) && StringUtils.isNotEmpty(vo.getPatId()) && StringUtils.isNotEmpty(vo.getSubId())) {
RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample();
String taskId = rsaPublicKeyExample.encryptedData(vo.getTaskId().toString(), pub_key);
@@ -121,9 +127,10 @@
serviceOutPath.setRadix(format);
serviceOutPath.setCreateTime(new Date());
serviceOutPath.setOrgid(vo.getOrgid());
- iServiceOutPathService.insertServiceOutPath(serviceOutPath);
String url = ip + ":" + req_path + "/wt?p=" + format;
content = "鎮ㄥソ锛岄個璇锋偍濉啓鍑洪櫌璋冩煡琛紝璇风偣鍑�" + url + "濉啓銆傛劅璋㈡偍閰嶅悎锛�";
+ serviceOutPath.setUrl(url);
+ iServiceOutPathService.insertServiceOutPath(serviceOutPath);
}
if (ObjectUtils.isNotEmpty(vo.getContent())) content = vo.getContent();
@@ -192,8 +199,13 @@
*/
@ApiOperation("寰俊鍙戦��")
@PostMapping("/sendChat")
- public AjaxResult sendChat(@RequestBody smsVO vo) throws UnsupportedEncodingException {
+ public AjaxResult sendChat(@RequestBody smsVO vo) {
String sendMsg = "";
+ if (StringUtils.isNotEmpty(vo.getSubId())) {
+ ServiceSubtask serviceSubtask = iServiceSubtaskService.selectServiceSubtaskById(Long.valueOf(vo.getSubId()));
+ if (serviceSubtask.getSendstate() == 4L) sendMsg = "璇ヤ换鍔′笉鎵ц";
+ return AjaxResult.error(sendMsg);
+ }
if (StringUtils.isNotEmpty(vo.getTaskId()) && StringUtils.isNotEmpty(vo.getPatId()) && StringUtils.isNotEmpty(vo.getSubId())) {
RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample();
String taskId = rsaPublicKeyExample.encryptedData(vo.getTaskId().toString(), pub_key);
@@ -216,5 +228,41 @@
return AjaxResult.success(sendMsg);
}
+ /**
+ * @param
+ * @return
+ */
+ @ApiOperation("鐢熸垚澶栭摼")
+ @PostMapping("/getUrl")
+ public AjaxResult getUrl(@RequestBody smsVO vo) throws UnsupportedEncodingException {
+ String content = "";
+ if (StringUtils.isNotEmpty(vo.getTaskId()) && StringUtils.isNotEmpty(vo.getPatId()) && StringUtils.isNotEmpty(vo.getSubId())) {
+ RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample();
+ String taskId = rsaPublicKeyExample.encryptedData(vo.getTaskId().toString(), pub_key);
+ String patid = rsaPublicKeyExample.encryptedData(vo.getPatId().toString(), pub_key);
+ String subId = rsaPublicKeyExample.encryptedData(vo.getSubId().toString(), pub_key);
+ Integer radix = iServiceOutPathService.selectAutoId();
+ String format = String.format("%03X", radix);
+ ServiceOutPath serviceOutPath = new ServiceOutPath();
+ serviceOutPath.setParam1(taskId);
+ serviceOutPath.setParam2(patid);
+ serviceOutPath.setParam3(vo.getTaskName());
+ serviceOutPath.setParam6(subId);
+ serviceOutPath.setRadix(format);
+ serviceOutPath.setCreateTime(new Date());
+ serviceOutPath.setOrgid(vo.getOrgid());
+ String url = ip + ":" + req_path + "/wt?p=" + format;
+// content = "鎮ㄥソ锛岄個璇锋偍濉啓鍑洪櫌璋冩煡琛紝璇风偣鍑�" + url + "濉啓銆傛劅璋㈡偍閰嶅悎锛�";
+ content = url;
+ serviceOutPath.setUrl(url);
+ iServiceOutPathService.insertServiceOutPath(serviceOutPath);
+ }
+ if (StringUtils.isNotEmpty(vo.getSubId())) {
+ ServiceSubtask serviceSubtask = iServiceSubtaskService.selectServiceSubtaskById(Long.valueOf(vo.getSubId()));
+ if (serviceSubtask.getSendstate() == 4L) content = "璇ヤ换鍔′笉鎵ц";
+ }
+
+ return AjaxResult.success(content);
+ }
}
--
Gitblit v1.9.3