From bedd0a1cef215538df64470df6b8d4a022189136 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期三, 28 八月 2024 14:05:16 +0800
Subject: [PATCH] 代码提交
---
smartor/src/main/java/com/smartor/domain/VisitPlan.java | 82 +
ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/RouterVo.java | 73
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java | 31
smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateServiceImpl.java | 11
smartor/src/main/java/com/smartor/domain/PhoneRecordAccept.java | 84 +
smartor/src/main/java/com/smartor/service/impl/IvrTaskTemplateScriptServiceImpl.java | 17
smartor/src/main/resources/mapper/smartor/IvrLibaTemplateMapper.xml | 15
ruoyi-admin/src/main/java/com/ruoyi/web/controller/hanler/ChatWebSocketHandler.java | 2
smartor/src/main/java/com/smartor/domain/ServiceTaskVO.java | 11
ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java | 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMedRegistrationController.java | 9
smartor/src/main/java/com/smartor/domain/IvrTaskTemplateTargetoption.java | 8
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SmsParamController.java | 32
smartor/pom.xml | 12
smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml | 14
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDictTypeMapper.java | 22
smartor/src/main/java/com/smartor/service/impl/IvrTaskTemplateServiceImpl.java | 18
ruoyi-framework/src/main/java/com/ruoyi/framework/config/ServerConfig.java | 37
smartor/src/main/java/com/smartor/service/impl/ServiceTaskServiceImpl.java | 2
smartor/src/main/java/com/smartor/domain/PatArchiveVO.java | 125 +
smartor/src/main/java/com/smartor/domain/ServiceSubtaskDetailVO.java | 165 ++
smartor/src/main/resources/mapper/smartor/ServiceSubtaskDetailMapper.xml | 40
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java | 29
smartor/src/main/java/com/smartor/service/IPatArchiveService.java | 2
smartor/src/main/java/com/smartor/service/IServiceSubtaskAnswerService.java | 2
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskAnswerServiceImpl.java | 203 +--
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysLogininforMapper.java | 12
smartor/src/main/resources/mapper/smartor/IvrTaskTemplateMapper.xml | 7
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java | 28
smartor/src/main/java/com/smartor/common/SendService.java | 35
smartor/src/main/java/com/smartor/domain/PhoneCallReqYQVO.java | 131 ++
smartor/src/main/java/com/smartor/domain/SvyTaskTemplate.java | 3
smartor/src/main/java/com/smartor/service/impl/PatMedInspectionServiceImpl.java | 15
smartor/src/main/java/com/smartor/domain/SvyTaskTemplateVO.java | 2
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserPostMapper.java | 12
smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScript.java | 38
ruoyi-admin/src/main/resources/application.yml | 4
smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScriptVO.java | 13
smartor/src/main/java/com/smartor/domain/ServiceTask.java | 38
smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml | 6
ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java | 98 +
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysPostMapper.java | 26
ruoyi-admin/src/main/java/com/ruoyi/web/test/MQTest.java | 8
ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java | 2
smartor/src/main/resources/mapper/smartor/PatMedRegistrationMapper.xml | 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/BaseUserInfoController.java | 24
smartor/src/main/java/com/smartor/domain/ServiceSubtask.java | 9
smartor/src/main/java/com/smartor/service/impl/PatMedRegistrationServiceImpl.java | 1
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysMenuMapper.java | 7
smartor/src/main/java/com/smartor/domain/IvrLibaTemplateTargetoption.java | 2
smartor/src/main/java/com/smartor/domain/PullTaskVO.java | 71 +
smartor/src/main/java/com/smartor/service/IIvrTaskTemplateScriptService.java | 3
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java | 1
ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUtils.java | 7
smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java | 17
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/CommonTaskController.java | 1
smartor/src/main/java/com/smartor/domain/IvrLibaTemplate.java | 12
smartor/src/main/java/com/smartor/mapper/SmsParamMapper.java | 20
smartor/src/main/resources/mapper/smartor/IvrTaskTemplateScriptMapper.xml | 18
smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java | 155 ++
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java | 825 +++++++-----
smartor/src/main/java/com/smartor/service/ISmsParamService.java | 20
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/EquipmentinfoController.java | 2
smartor/src/main/java/com/smartor/service/impl/SmsParamServiceImpl.java | 68
ruoyi-system/src/main/java/com/ruoyi/system/mapper/EquipmentinfoMapper.java | 18
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java | 260 +--
smartor/src/main/resources/mapper/smartor/IvrTaskTemplateTargetoptionMapper.xml | 7
smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScriptVO.java | 4
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysNoticeMapper.java | 16
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMenuMapper.java | 12
smartor/src/main/java/com/smartor/domain/IvrTaskTemplate.java | 12
smartor/src/main/java/com/smartor/domain/SendMagParam.java | 2
smartor/src/main/resources/mapper/smartor/ServiceTaskMapper.xml | 12
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDictDataMapper.java | 25
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserRoleMapper.java | 17
smartor/src/main/java/com/smartor/domain/ServiceSubTaskAnswerReq.java | 6
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleDeptMapper.java | 12
smartor/src/main/java/com/smartor/service/IServiceSubtaskService.java | 15
smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml | 23
smartor/src/main/resources/mapper/smartor/IvrLibaScriptMapper.xml | 2
smartor/src/main/java/com/smartor/service/IPatMedInhospService.java | 26
smartor/src/main/resources/mapper/smartor/PatMedInspectionMapper.xml | 3
ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java | 286 ++++
smartor/src/main/java/com/smartor/domain/ServiceSubtaskDetail.java | 16
smartor/src/main/java/com/smartor/service/impl/IvrLibaTemplateServiceImpl.java | 18
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java | 33
ruoyi-system/src/main/java/com/ruoyi/system/mapper/BaseUserInfoMapper.java | 18
smartor/src/main/java/com/smartor/domain/PatMedInhosp.java | 12
ruoyi-admin/src/main/resources/application-druid.yml | 4
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibScriptCategoryController.java | 7
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveController.java | 2
smartor/src/main/java/com/smartor/domain/robot/RobotScritpTemplateVO.java | 7
smartor/src/main/java/com/smartor/domain/PhoneCallBackYQVO.java | 44
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysOperLogMapper.java | 12
smartor/src/main/java/com/smartor/service/impl/CommonTaskServiceImpl.java | 2
95 files changed, 2,630 insertions(+), 1,093 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 fe59bc9..f2fedf4 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
@@ -14,10 +14,7 @@
import com.smartor.mapper.ServiceTaskMapper;
import com.smartor.mapper.SvyTaskMapper;
import com.smartor.mapper.SvyTaskSingleMapper;
-import com.smartor.service.IBaseSmsaccountService;
-import com.smartor.service.IIvrTaskTemplateService;
-import com.smartor.service.IServiceSubtaskRecordService;
-import com.smartor.service.ISvyTaskTemplateService;
+import com.smartor.service.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@@ -26,10 +23,7 @@
import org.springframework.data.redis.listener.RedisMessageListenerContainer;
import org.springframework.stereotype.Component;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
+import java.util.*;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
@@ -143,7 +137,7 @@
*
* @param commonTaskcallMQ
*/
- private void sfHandle(CommonTaskcallMQ commonTaskcallMQ, String ip) {
+ public void sfHandle(CommonTaskcallMQ commonTaskcallMQ, String ip) {
//鍒ゆ柇涓�涓媍ommonTaskcallMQ涓殑stopstate鏄惁涓巌vr_task涓殑涓�鑷达紝涓嶄竴鑷达紝鍒欒鏄庢槸鏆傚仠浜�
ServiceTask ivrTask1 = ivrTaskMapper.selectServiceTaskByTaskid(commonTaskcallMQ.getTaskid());
if (ivrTask1.getStopState() != commonTaskcallMQ.getStopState()) {
@@ -159,10 +153,10 @@
String descByCode = ServiceFromEnum.getDescByCode(Integer.valueOf(serviceFrom));
//杩欓噷鍙互鑰冭檻鐢ㄧ瓥鐣ユā寮忎紭鍖栦竴涓嬶紝涓嶇劧澶毦鐪嬩簡
- //閫氳繃妯℃澘ID鑾峰彇妯℃澘闂
- IvrTaskTemplateVO ivrTaskTemplateVO = new IvrTaskTemplateVO();
- ivrTaskTemplateVO.setId(Long.valueOf(commonTaskcallMQ.getTemplateid()));
- IvrTaskTemplateVO ivrTaskTemplateVO1 = ivrTaskTemplateService.selectInfoByCondition(ivrTaskTemplateVO);
+// //閫氳繃妯℃澘ID鑾峰彇妯℃澘闂
+// IvrTaskTemplateVO ivrTaskTemplateVO = new IvrTaskTemplateVO();
+// ivrTaskTemplateVO.setId(Long.valueOf(commonTaskcallMQ.getTemplateid()));
+// IvrTaskTemplateVO ivrTaskTemplateVO1 = ivrTaskTemplateService.selectInfoByCondition(ivrTaskTemplateVO);
//閫氳繃浠诲姟ID鎷垮埌鎮h�呬俊鎭�
ServiceSubtask ivrTaskcall = new ServiceSubtask();
@@ -175,6 +169,37 @@
//濡備綍浠诲姟琚�滄殏鍋溾�濇垨鈥滅粓姝⑩��
break;
}
+ //鑾峰彇鍒皏alue鍊兼渶灏戠殑key
+ String key = getKey();
+ if (commonTaskcallMQ.getSendType().equals("2")) {
+ //璇存槑鏄珛鍗冲彂閫�
+ String value = redisCache.getCacheObject("cache-0");
+ ServiceSubtask serviceSubtask1 = new ServiceSubtask();
+ serviceSubtask1.setTaskid(commonTaskcallMQ.getTaskid());
+ List<ServiceSubtask> selectServiceSubtaskList1 = ivrTaskcallMapper.selectServiceSubtaskList(serviceSubtask1);
+ for (ServiceSubtask serviceSubtask2 : selectServiceSubtaskList1) {
+ if (StringUtils.isEmpty(value)) {
+ value = "," + serviceSubtask2.getId().toString() + ",";
+ } else {
+ value = value + "," + serviceSubtask2.getId().toString() + ",";
+ }
+ }
+ redisCache.setCacheObject("cache-0", value);
+ } else {
+ //闈炵珛鍗冲彂閫�
+ String value = redisCache.getCacheObject(key);
+ ServiceSubtask serviceSubtask1 = new ServiceSubtask();
+ serviceSubtask1.setTaskid(commonTaskcallMQ.getTaskid());
+ List<ServiceSubtask> selectServiceSubtaskList1 = ivrTaskcallMapper.selectServiceSubtaskList(serviceSubtask1);
+ for (ServiceSubtask serviceSubtask2 : selectServiceSubtaskList1) {
+ if (StringUtils.isEmpty(value)) {
+ value = "," + serviceSubtask2.getId().toString() + ",";
+ } else {
+ value = value + "," + serviceSubtask2.getId().toString() + ",";
+ }
+ }
+ redisCache.setCacheObject(key, value);
+ }
//浠诲姟鍙戦�佽褰曪紙杩欎釜浠g爜搴旇鍐欏湪phoneTask涓紝鍏堝啓鍦ㄨ繖锛屽悗闈㈠啀鏀癸級
ServiceSubtaskRecord serviceSubtaskRecord = new ServiceSubtaskRecord();
@@ -185,8 +210,8 @@
serviceSubtaskRecord.setStartTime(System.currentTimeMillis());
serviceSubtaskRecordService.insertServiceSubtaskRecord(serviceSubtaskRecord);
- //閫氳繃澶氱嚎绋嬬殑鏂瑰紡鍘绘墦鐢佃瘽
- executorService.submit(new PhoneTask(serviceSubtask, ivrTaskTemplateVO1, redisCache, sendService, phonePath, robotPhoneUtils));
+// //閫氳繃澶氱嚎绋嬬殑鏂瑰紡鍘绘墦鐢佃瘽
+// executorService.submit(new PhoneTask(serviceSubtask, ivrTaskTemplateVO1, redisCache, sendService, phonePath, robotPhoneUtils));
}
} else if (descByCode.equals("澶氬獟浣�")) {
//澶氬獟浣�
@@ -227,7 +252,7 @@
String patid = rsaPublicKeyExample.encryptedData(serviceSubtask.getPatid().toString(), pub_key);
SendMagParam sendMagParam = new SendMagParam();
sendMagParam.setType("5");
- sendMagParam.setUrl(ip + ":" + req_path + "/outsideChain?param1=" + ivrTask1.getTaskid().toString() + "¶m2=" + serviceSubtask.getPatid().toString() + "¶m3=" + ivrTask1.getTaskName() + "¶m5=false");
+ 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");
@@ -235,7 +260,6 @@
map.put("first", ivrTask1.getTaskName());
sendMagParam.setContent(JSON.toJSONString(map));
sendMagParam.setOpenid(serviceSubtask.getOpenid());
-
Boolean aBoolean = sendService.sendMsg(sendMagParam);
//浠诲姟鍙戦�佽褰�
@@ -276,10 +300,12 @@
//杩欓噷鍙互鑰冭檻鐢ㄧ瓥鐣ユā寮忎紭鍖栦竴涓嬶紝涓嶇劧澶毦鐪嬩簡
//閫氳繃妯℃澘ID鑾峰彇妯℃澘闂
- IvrTaskTemplateVO ivrTaskTemplateVO = new IvrTaskTemplateVO();
- ivrTaskTemplateVO.setId(Long.valueOf(commonTaskcallMQ.getTemplateid()));
- IvrTaskTemplateVO ivrTaskTemplateVO1 = ivrTaskTemplateService.selectInfoByCondition(ivrTaskTemplateVO);
-
+ IvrTaskTemplateVO ivrTaskTemplateVO1 = null;
+ if (commonTaskcallMQ.getTaskType().equals("1")) {
+ IvrTaskTemplateVO ivrTaskTemplateVO = new IvrTaskTemplateVO();
+ ivrTaskTemplateVO.setId(Long.valueOf(commonTaskcallMQ.getTemplateid()));
+ ivrTaskTemplateVO1 = ivrTaskTemplateService.selectInfoByCondition(ivrTaskTemplateVO);
+ }
//閫氳繃浠诲姟ID鎷垮埌鎮h�呬俊鎭�
ServiceSubtask ivrTaskcall = new ServiceSubtask();
ivrTaskcall.setTaskid(commonTaskcallMQ.getTaskid());
@@ -348,6 +374,7 @@
Map map = new HashMap();
map.put("first", ivrTask1.getTaskName());
sendMagParam.setContent(JSON.toJSONString(map));
+ sendMagParam.setOpenid(ivrTaskSingle.getOpenid());
Boolean aBoolean = sendService.sendMsg(sendMagParam);
//浠诲姟鍙戦�佽褰�
@@ -455,7 +482,7 @@
}
-// /**
+ // /**
// * 鏈哄櫒浜虹涓�鍙ヨ瘽璇煶
// * concurrency = "50" 骞跺彂鏁颁负50
// */
@@ -490,5 +517,32 @@
// channel.basicReject(message.getMessageProperties().getDeliveryTag(), true);
// }
// }
+ private String getKey() {
+ Map<String, String> map = new HashMap<>();
+ for (int i = 0; i < 6; i++) {
+ Boolean aBoolean = redisCache.hasKey("cache-" + i);
+ if (!aBoolean) {
+ redisCache.setCacheObject("cache-" + i, "");
+ map.put("cache-" + i, "");
+ } else {
+ map.put("cache-" + i, redisCache.getCacheObject("cache-" + i));
+ }
+ }
+
+ String key = null;
+ String value = "";
+ for (Map.Entry<String, String> entry : map.entrySet()) {
+ if (StringUtils.isEmpty(value)) {
+ value = entry.getValue();
+ key = entry.getKey();
+ } else {
+ if (entry.getValue().split(",").length < value.split(",").length) {
+ value = entry.getValue();
+ key = entry.getKey();
+ }
+ }
+ }
+ return key;
+ }
}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
index fc69251..ed0e4c9 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
@@ -222,6 +222,7 @@
public AjaxResult htmlContent(@RequestBody HtmlContentVO htmlContentVO) {
// 鑾峰彇鏂囦欢鐨勫師濮嬪悕绉�
String fileName = htmlContentVO.getFileName();
+ FileUtils.createFile(RuoYiConfig.getUploadPath() + "/show/" + fileName.split("\\.", 2)[0]);
// 灏嗘枃浠朵繚瀛樺埌鎸囧畾鐩綍
File outputFile = new File(RuoYiConfig.getUploadPath() + "/show/" + fileName.split("\\.", 2)[0] + "/" + fileName);
try (BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputFile), "UTF-8"))) {
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/hanler/ChatWebSocketHandler.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/hanler/ChatWebSocketHandler.java
index aafb101..37e4338 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/hanler/ChatWebSocketHandler.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/hanler/ChatWebSocketHandler.java
@@ -257,7 +257,7 @@
if (StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() && StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches() || StringUtils.isEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2()) && StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches()) {
//璇存槑鍖归厤姝g‘浜�
- ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).setIsUserOperation(true);
+ ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).setIsUserOperation(1);
List<IvrTaskTemplateScriptVO> backQuset = redisCache.getCacheObject(userId + "backQuset");
//鍖归厤瀹屾垚鍚�,灏嗙粨鏋滀繚瀛樺埌鏂扮殑鏁扮粍
backQuset.add(ivrTaskTemplateScriptVO);
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/BaseUserInfoController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/BaseUserInfoController.java
index 4ddc79d..8faf264 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/BaseUserInfoController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/BaseUserInfoController.java
@@ -4,6 +4,8 @@
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.utils.StringUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -22,6 +24,7 @@
* @author ruoyi
* @date 2023-05-25
*/
+@Api(description = "鏍囩鍒嗙被")
@RestController
@RequestMapping("/system/info")
public class BaseUserInfoController extends BaseController {
@@ -31,8 +34,9 @@
/**
* 鏌ヨ鐢ㄦ埛鍒楄〃
*/
+ @ApiOperation("鏌ヨ鐢ㄦ埛鍒楄〃")
@PreAuthorize("@ss.hasPermi('system:info:list')")
- @PostMapping("/list")
+ @PostMapping("/list")
public TableDataInfo list(@RequestBody BaseUserInfo baseUserInfo) {
startPage();
List<BaseUserInfo> list = baseUserInfoService.selectBaseUserInfoList(baseUserInfo);
@@ -42,8 +46,9 @@
/**
* 瀵煎嚭鐢ㄦ埛鍒楄〃
*/
+ @ApiOperation("瀵煎嚭鐢ㄦ埛鍒楄〃")
@PreAuthorize("@ss.hasPermi('system:info:export')")
- @Log(title = "鐢ㄦ埛", businessType = BusinessType.EXPORT)
+ @Log(title = "鐢ㄦ埛" , businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, BaseUserInfo baseUserInfo) {
List<BaseUserInfo> list = baseUserInfoService.selectBaseUserInfoList(baseUserInfo);
@@ -54,6 +59,7 @@
/**
* 鑾峰彇鐢ㄦ埛璇︾粏淇℃伅
*/
+ @ApiOperation("鑾峰彇鐢ㄦ埛璇︾粏淇℃伅")
@PreAuthorize("@ss.hasPermi('system:info:query')")
@GetMapping(value = "/{userid}")
public AjaxResult getInfo(@PathVariable("userid") Long userid) {
@@ -63,8 +69,9 @@
/**
* 鏂板鐢ㄦ埛
*/
+ @ApiOperation("鏂板鐢ㄦ埛")
@PreAuthorize("@ss.hasPermi('system:info:add')")
- @Log(title = "鐢ㄦ埛", businessType = BusinessType.INSERT)
+ @Log(title = "鐢ㄦ埛" , businessType = BusinessType.INSERT)
@PostMapping("/add")
public AjaxResult add(@RequestBody BaseUserInfo baseUserInfo) {
return toAjax(baseUserInfoService.insertBaseUserInfo(baseUserInfo));
@@ -73,8 +80,9 @@
/**
* 淇敼鐢ㄦ埛
*/
+ @ApiOperation("淇敼鐢ㄦ埛")
@PreAuthorize("@ss.hasPermi('system:info:edit')")
- @Log(title = "鐢ㄦ埛", businessType = BusinessType.UPDATE)
+ @Log(title = "鐢ㄦ埛" , businessType = BusinessType.UPDATE)
@PostMapping("/edit")
public AjaxResult edit(@RequestBody BaseUserInfo baseUserInfo) {
return toAjax(baseUserInfoService.updateBaseUserInfo(baseUserInfo));
@@ -83,8 +91,9 @@
/**
* 鍒犻櫎鐢ㄦ埛
*/
+ @ApiOperation("鍒犻櫎鐢ㄦ埛")
@PreAuthorize("@ss.hasPermi('system:info:remove')")
- @Log(title = "鐢ㄦ埛", businessType = BusinessType.DELETE)
+ @Log(title = "鐢ㄦ埛" , businessType = BusinessType.DELETE)
@GetMapping("/remove/{userids}")
public AjaxResult remove(@PathVariable Long[] userids) {
return toAjax(baseUserInfoService.deleteBaseUserInfoByUserids(userids));
@@ -93,10 +102,11 @@
/**
* 鑾峰彇浜哄憳鐨勮仈绯绘柟寮�
*
- * @param personCode 浜哄憳缂栧彿
- * @param noticeWay 閫氱煡鏂瑰紡
+ * @param personCode 浜哄憳缂栧彿
+ * @param noticeWay 閫氱煡鏂瑰紡
* @return
*/
+ @ApiOperation("鑾峰彇浜哄憳鐨勮仈绯绘柟寮�")
@GetMapping("/reportContent")
public AjaxResult getContact(@RequestParam("personCode") String personCode, @RequestParam("noticeWay") String noticeWay) {
if (StringUtils.isEmpty(personCode) || StringUtils.isEmpty(noticeWay)) {
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/CommonTaskController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/CommonTaskController.java
index 2005733..c0c378b 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/CommonTaskController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/CommonTaskController.java
@@ -36,6 +36,7 @@
/**
* 鏌ヨ棰樼洰鍒楄〃锛堜箟涔岀殑his鏁版嵁鑾峰彇鎯呭喌锛�
*/
+ @ApiOperation(" 鏌ヨ棰樼洰鍒楄〃锛堜箟涔岀殑his鏁版嵁鑾峰彇鎯呭喌锛�")
@PostMapping("/list")
public TableDataInfo list(@RequestBody ServiceThirdData serviceThirdData) {
List<ServiceThirdData> list = iServiceThirdDataService.queryList(serviceThirdData);
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/EquipmentinfoController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/EquipmentinfoController.java
index dfefed3..40125f8 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/EquipmentinfoController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/EquipmentinfoController.java
@@ -106,7 +106,7 @@
/**
* 闂涓婃姤
*/
- @RequestMapping("/reportContent")
+ @PostMapping("/reportContent")
public AjaxResult reportContent(@RequestBody ReportReqVo reportReqVo) {
if (StringUtils.isEmpty(reportReqVo.getDealDept()) && StringUtils.isEmpty(reportReqVo.getDealPersionNO())) {
return error("澶勭悊浜哄拰澶勭悊閮ㄩ棬涓嶈兘鍚屾椂涓虹┖锛�");
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveController.java
index 8c38bce..79c9d1a 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveController.java
@@ -207,7 +207,7 @@
@PostMapping("/getPatientInfo")
public TableDataInfo getPatientInfo(@RequestBody PatArchiveReq patArchiveReq) {
PageUtils.startPageByPost(patArchiveReq.getPageNum(), patArchiveReq.getPageSize());
- List<PatTaskRelevance> patientInfo = patArchiveService.getPatientInfo(patArchiveReq);
+ List<ServiceSubtask> patientInfo = patArchiveService.getPatientInfo(patArchiveReq);
long count = PageUtils.count(new ISelect() {
@Override
public void doSelect() {
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMedRegistrationController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMedRegistrationController.java
index 442fec0..887d19b 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMedRegistrationController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMedRegistrationController.java
@@ -8,6 +8,8 @@
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.smartor.domain.PatMedRegistration;
import com.smartor.service.IPatMedRegistrationService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
@@ -21,6 +23,7 @@
* @author ruoyi
* @date 2024-08-01
*/
+@Api(description = " 鎮h�呮寕鍙疯褰�")
@RestController
@RequestMapping("/smartor/registration")
public class PatMedRegistrationController extends BaseController {
@@ -30,6 +33,7 @@
/**
* 鏌ヨ鎮h�呮寕鍙疯褰曞垪琛�
*/
+ @ApiOperation("鏌ヨ鎮h�呮寕鍙疯褰曞垪琛�")
@PreAuthorize("@ss.hasPermi('system:registration:list')")
@GetMapping("/list")
public TableDataInfo list(PatMedRegistration patMedRegistration) {
@@ -41,6 +45,7 @@
/**
* 瀵煎嚭鎮h�呮寕鍙疯褰曞垪琛�
*/
+ @ApiOperation("瀵煎嚭鎮h�呮寕鍙疯褰曞垪琛�")
@PreAuthorize("@ss.hasPermi('system:registration:export')")
@Log(title = "鎮h�呮寕鍙疯褰�", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@@ -53,6 +58,7 @@
/**
* 鑾峰彇鎮h�呮寕鍙疯褰曡缁嗕俊鎭�
*/
+ @ApiOperation("鑾峰彇鎮h�呮寕鍙疯褰曡缁嗕俊鎭�")
@PreAuthorize("@ss.hasPermi('system:registration:query')")
@GetMapping(value = "/getInfo/{registid}")
public AjaxResult getInfo(@PathVariable("registid") Long registid) {
@@ -62,6 +68,7 @@
/**
* 鏂板鎮h�呮寕鍙疯褰�
*/
+ @ApiOperation("鏂板鎮h�呮寕鍙疯褰�")
@PreAuthorize("@ss.hasPermi('system:registration:add')")
@Log(title = "鎮h�呮寕鍙疯褰�", businessType = BusinessType.INSERT)
@PostMapping("/add")
@@ -72,6 +79,7 @@
/**
* 淇敼鎮h�呮寕鍙疯褰�
*/
+ @ApiOperation("淇敼鎮h�呮寕鍙疯褰�")
@PreAuthorize("@ss.hasPermi('system:registration:edit')")
@Log(title = "鎮h�呮寕鍙疯褰�", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@@ -82,6 +90,7 @@
/**
* 鍒犻櫎鎮h�呮寕鍙疯褰�
*/
+ @ApiOperation("鍒犻櫎鎮h�呮寕鍙疯褰�")
@PreAuthorize("@ss.hasPermi('system:registration:remove')")
@Log(title = "鎮h�呮寕鍙疯褰�", businessType = BusinessType.DELETE)
@GetMapping("/remove/{registids}")
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java
index b4a6887..5faa0b4 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java
@@ -20,6 +20,9 @@
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
+import java.time.LocalTime;
+import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
import java.util.List;
/**
@@ -101,9 +104,28 @@
@ApiOperation("鐢佃瘽鍥炶皟浠诲姟")
@PostMapping("/phoneCallBack")
public AjaxResult phoneCallBack(@RequestBody PhoneCallBackVO phoneCallBackVO) {
-// log.error("鐢佃瘽鍥炶皟浠诲姟鎴愬姛浜嗕笉锛焮}", phoneCallBackVO);
serviceSubtaskService.phoneCallBack(phoneCallBackVO);
return success();
+ }
+
+ @ApiOperation("鐢佃瘽ASR閫氳瘽鍥炶皟(闆ㄧ划)")
+ @PostMapping("/phoneCallBackYQ")
+ public PhoneCallBackYQVO phoneCallBackYQ(@RequestBody PhoneCallReqYQVO phoneCallReqYQVO) {
+ log.error("鐢佃瘽ASR閫氳瘽鍥炶皟(闆ㄧ划) 锛焮}", phoneCallReqYQVO);
+ PhoneCallBackYQVO phoneCallBackYQVO = serviceSubtaskService.phoneCallBackYQ(phoneCallReqYQVO);
+ return phoneCallBackYQVO;
+ }
+
+ /**
+ * 鐢佃瘽鍥炶皟浠诲姟(闆ㄧ划)
+ */
+ @ApiOperation("鐢佃瘽鍥炶皟浠诲姟(闆ㄧ划)")
+ @PostMapping("/taskPull")
+ public List<PullTaskVO> taskPull() {
+ log.error("鐢佃瘽鍥炶皟浠诲姟(闆ㄧ划)");
+ List<PullTaskVO> pullTaskVOList = serviceSubtaskService.taskPull();
+ log.error("鐢佃瘽鍥炶皟浠诲姟(闆ㄧ划):{}", pullTaskVOList);
+ return pullTaskVOList;
}
/**
@@ -115,4 +137,13 @@
return toAjax(serviceSubtaskService.saveQuestionAnswerPhone(serviceSubTaskDetailReq));
}
+ /**
+ * 閫氳瘽璁板綍鍥炶皟
+ */
+ @ApiOperation("閫氳瘽璁板綍鍥炶皟")
+ @PostMapping("/recordAccept")
+ public AjaxResult recordAccept(@RequestBody ServiceSubTaskDetailReq serviceSubTaskDetailReq) {
+ return toAjax(serviceSubtaskService.saveQuestionAnswerPhone(serviceSubTaskDetailReq));
+ }
+
}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SmsParamController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SmsParamController.java
index fd42a08..83db88a 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SmsParamController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SmsParamController.java
@@ -2,6 +2,7 @@
import java.util.List;
import javax.servlet.http.HttpServletResponse;
+
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@@ -23,14 +24,13 @@
/**
* 鐭俊鍙傛暟Controller
- *
+ *
* @author smartor
* @date 2023-03-06
*/
@RestController
@RequestMapping("/smartor/smsparam")
-public class SmsParamController extends BaseController
-{
+public class SmsParamController extends BaseController {
@Autowired
private ISmsParamService smsParamService;
@@ -38,9 +38,8 @@
* 鏌ヨ鐭俊鍙傛暟鍒楄〃
*/
@PreAuthorize("@ss.hasPermi('smartor:smsparam:list')")
- @PostMapping("/list")
- public TableDataInfo list(@RequestBody SmsParam smsParam)
- {
+ @PostMapping("/list")
+ public TableDataInfo list(@RequestBody SmsParam smsParam) {
startPage();
List<SmsParam> list = smsParamService.selectSmsParamList(smsParam);
return getDataTable(list);
@@ -52,8 +51,7 @@
@PreAuthorize("@ss.hasPermi('smartor:smsparam:export')")
@Log(title = "鐭俊鍙傛暟", businessType = BusinessType.EXPORT)
@PostMapping("/export")
- public void export(HttpServletResponse response, SmsParam smsParam)
- {
+ public void export(HttpServletResponse response, SmsParam smsParam) {
List<SmsParam> list = smsParamService.selectSmsParamList(smsParam);
ExcelUtil<SmsParam> util = new ExcelUtil<SmsParam>(SmsParam.class);
util.exportExcel(response, list, "鐭俊鍙傛暟鏁版嵁");
@@ -64,8 +62,7 @@
*/
@PreAuthorize("@ss.hasPermi('smartor:smsparam:query')")
@GetMapping(value = "/{paramid}")
- public AjaxResult getInfo(@PathVariable("paramid") Long paramid)
- {
+ public AjaxResult getInfo(@PathVariable("paramid") Long paramid) {
return success(smsParamService.selectSmsParamByParamid(paramid));
}
@@ -75,8 +72,7 @@
@PreAuthorize("@ss.hasPermi('smartor:smsparam:add')")
@Log(title = "鐭俊鍙傛暟", businessType = BusinessType.INSERT)
@PostMapping("/add")
- public AjaxResult add(@RequestBody SmsParam smsParam)
- {
+ public AjaxResult add(@RequestBody SmsParam smsParam) {
return toAjax(smsParamService.insertSmsParam(smsParam));
}
@@ -86,8 +82,7 @@
@PreAuthorize("@ss.hasPermi('smartor:smsparam:edit')")
@Log(title = "鐭俊鍙傛暟", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
- public AjaxResult edit(@RequestBody SmsParam smsParam)
- {
+ public AjaxResult edit(@RequestBody SmsParam smsParam) {
return toAjax(smsParamService.updateSmsParam(smsParam));
}
@@ -96,9 +91,12 @@
*/
@PreAuthorize("@ss.hasPermi('smartor:smsparam:remove')")
@Log(title = "鐭俊鍙傛暟", businessType = BusinessType.DELETE)
- @GetMapping("/remove/{paramids}")
- public AjaxResult remove(@PathVariable Long[] paramids)
- {
+ @GetMapping("/remove/{paramids}")
+ public AjaxResult remove(@PathVariable Long[] paramids) {
return toAjax(smsParamService.deleteSmsParamByParamids(paramids));
}
+
+ public AjaxResult sendSmsInfo() {
+ return null;
+ }
}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibScriptCategoryController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibScriptCategoryController.java
index 64d21de..852fb13 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibScriptCategoryController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibScriptCategoryController.java
@@ -11,11 +11,13 @@
import com.smartor.service.ISvyLibScriptCategoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
+import org.apache.commons.beanutils.ConvertUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
+import java.util.Arrays;
import java.util.List;
/**
@@ -92,8 +94,9 @@
@PreAuthorize("@ss.hasPermi('smartor:category:remove')")
@Log(title = "闂嵎棰樼洰鍒嗙被", businessType = BusinessType.DELETE)
@GetMapping("/remove/{ids}")
- public AjaxResult remove(@PathVariable Long[] ids) {
- return toAjax(svyLibScriptCategoryService.deleteSvyLibScriptCategoryByIds(ids));
+ public AjaxResult remove(@PathVariable String ids) {
+ Long[] idArray = (Long[]) ConvertUtils.convert(ids.split(","), Long.class);
+ return toAjax(svyLibScriptCategoryService.deleteSvyLibScriptCategoryByIds(idArray));
}
/**
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/test/MQTest.java b/ruoyi-admin/src/main/java/com/ruoyi/web/test/MQTest.java
index b9d0b75..95686f0 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/test/MQTest.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/test/MQTest.java
@@ -2,6 +2,9 @@
import org.junit.Test;
+import java.time.LocalTime;
+import java.time.format.DateTimeFormatter;
+
//@SpringBootTest
//@RunWith(SpringRunner.class)
public class MQTest {
@@ -9,7 +12,12 @@
@Test
public void testSend22() {
+ LocalTime now = LocalTime.now();
+ System.out.println("褰撳墠鏃跺垎: " + now.format(DateTimeFormatter.ofPattern("hh:mm")));
+ // 鑾峰彇涓嬩竴鍒嗛挓鐨勬椂鍒�
+ LocalTime nextMinute = now.plusMinutes(1);
+ System.out.println("涓嬩竴鍒嗛挓鐨勬椂鍒�: " + nextMinute.format(DateTimeFormatter.ofPattern("hh:mm")));
}
diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml
index 1945ae3..cfc57dd 100644
--- a/ruoyi-admin/src/main/resources/application-druid.yml
+++ b/ruoyi-admin/src/main/resources/application-druid.yml
@@ -1,4 +1,4 @@
-# 鏁版嵁婧愰厤缃�
+ # 鏁版嵁婧愰厤缃�
spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
@@ -135,4 +135,4 @@
#澶栭摼璇锋眰IP鍜岀鍙e彿
req_path: 8096
-localIP: 192.168.2.10
+localIP: 192.168.1.10
diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml
index 1e71978..bd33b65 100644
--- a/ruoyi-admin/src/main/resources/application.yml
+++ b/ruoyi-admin/src/main/resources/application.yml
@@ -76,7 +76,8 @@
# port: 6020
# 鍦板潃锛堝叕鍙革級
- host: 116.62.18.175
+ # host: 116.62.18.175
+ host: 192.168.1.10
port: 6020
# 鏁版嵁搴撶储寮�
database: 0
@@ -94,7 +95,6 @@
max-active: 8
# #杩炴帴姹犳渶澶ч樆濉炵瓑寰呮椂闂达紙浣跨敤璐熷�艰〃绀烘病鏈夐檺鍒讹級
max-wait: -1ms
-
# minio鏂囦欢绠$悊杩炴帴
minio:
endpoint: http://192.168.1.4
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java
index c1d3828..13210c8 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java
@@ -19,7 +19,7 @@
*
* @author ruoyi
**/
-@SuppressWarnings(value = {"unchecked", "rawtypes"})
+@SuppressWarnings(value = {"unchecked" , "rawtypes"})
@Component
public class RedisCache {
@Autowired
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUtils.java
index 12f2798..d4c415c 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUtils.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUtils.java
@@ -241,4 +241,11 @@
String baseName = FilenameUtils.getBaseName(fileName);
return baseName;
}
+
+ public static void createFile(String path) {
+ File file = new File(path);
+ if (!file.exists()) {
+ file.mkdirs();
+ }
+ }
}
diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
index 1992b25..24175a7 100644
--- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
+++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
@@ -108,7 +108,7 @@
// 杩囨护璇锋眰
.authorizeRequests()
// 瀵逛簬鐧诲綍login 娉ㄥ唽register 楠岃瘉鐮乧aptchaImage 鍏佽鍖垮悕璁块棶
- .antMatchers("/login", "/register", "/captchaImage", "/qrcode/generateStaticHtml", "/qrcode/getQRcode", "/qrcode/getFormDate", "/chat", "/system/file/admin/uploadFile", "/smartor/dingtalk/sendNotification", "/patient/read/patientInfo", "/socket", "/API_ESB_Service", "/API_ESB_Service/Run", "/magic/web/**", "/smartor/tasksingle/phoneCallBack", "/smartor/robot/callstatus", "/smartor/robot/aidialog", "/smartor/robot/cdrinfo", "/getToken", "/smartor/servicetask/getScriptInfoByCondition", "/smartor/serviceSubtask/saveQuestionAnswer").permitAll()
+ .antMatchers("/login", "/register", "/captchaImage", "/qrcode/generateStaticHtml", "/qrcode/getQRcode", "/qrcode/getFormDate", "/chat", "/system/file/admin/uploadFile", "/smartor/dingtalk/sendNotification", "/patient/read/patientInfo", "/socket", "/API_ESB_Service", "/API_ESB_Service/Run", "/magic/web/**", "/smartor/serviceSubtask/phoneCallBack", "/smartor/serviceSubtask/taskPull", "/smartor/serviceSubtask//phoneCallBackYQ", "/smartor/robot/callstatus", "/smartor/robot/aidialog", "/smartor/robot/cdrinfo", "/getToken", "/smartor/servicetask/getScriptInfoByCondition", "/smartor/serviceSubtask/saveQuestionAnswer").permitAll()
// 闈欐�佽祫婧愶紝鍙尶鍚嶈闂�
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll().antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
// 闄や笂闈㈠鐨勬墍鏈夎姹傚叏閮ㄩ渶瑕侀壌鏉冭璇�
diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ServerConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ServerConfig.java
index b5b7de3..e9b8cec 100644
--- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ServerConfig.java
+++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ServerConfig.java
@@ -1,32 +1,51 @@
package com.ruoyi.framework.config;
import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import com.ruoyi.common.utils.ServletUtils;
/**
* 鏈嶅姟鐩稿叧閰嶇疆
- *
+ *
* @author ruoyi
*/
@Component
-public class ServerConfig
-{
+public class ServerConfig {
+ @Value("${server.port}")
+ private String port;
+
/**
* 鑾峰彇瀹屾暣鐨勮姹傝矾寰勶紝鍖呮嫭锛氬煙鍚嶏紝绔彛锛屼笂涓嬫枃璁块棶璺緞
- *
+ *
* @return 鏈嶅姟鍦板潃
*/
- public String getUrl()
- {
+ public String getUrl() {
HttpServletRequest request = ServletUtils.getRequest();
- return getDomain(request);
+ String domain = getDomain(request);
+ //淇敼涓�涓鍙�
+ domain = replaceAfterSecondColon(domain, port);
+ return domain;
}
- public static String getDomain(HttpServletRequest request)
- {
+ public static String getDomain(HttpServletRequest request) {
StringBuffer url = request.getRequestURL();
String contextPath = request.getServletContext().getContextPath();
return url.delete(url.length() - request.getRequestURI().length(), url.length()).append(contextPath).toString();
}
+
+ public static String replaceAfterSecondColon(String str, String replacement) {
+ int firstColonIndex = str.indexOf(":");
+ if (firstColonIndex != -1) {
+ int secondColonIndex = str.indexOf(":", firstColonIndex + 1);
+ if (secondColonIndex != -1 && secondColonIndex + 1 < str.length()) {
+ // 鑾峰彇绗簩涓�滐細鈥濆墠鐨勯儴鍒�
+ String beforeSecondColon = str.substring(0, secondColonIndex + 1);
+ // 杩斿洖鏇挎崲鍚庣殑瀛楃涓�
+ return beforeSecondColon + replacement;
+ }
+ }
+ return str;
+ }
}
diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java
index 4179ed5..a28df21 100644
--- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java
+++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java
@@ -1,25 +1,68 @@
package com.ruoyi.quartz.task;
-import com.smartor.domain.ServiceThirdData;
-import com.smartor.service.IServiceSubtaskAnswerService;
-import com.smartor.service.IServiceThirdDataService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
+import com.alibaba.fastjson2.JSON;
+import com.ruoyi.common.core.redis.RedisCache;
+import com.ruoyi.common.enums.ServiceFromEnum;
+import com.ruoyi.common.utils.RSAPublicKeyExample;
import com.ruoyi.common.utils.StringUtils;
+import com.smartor.common.SendService;
+import com.smartor.domain.*;
+import com.smartor.mapper.ServiceSubtaskMapper;
+import com.smartor.mapper.ServiceTaskMapper;
+import com.smartor.service.*;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
-import java.util.Date;
+import java.util.*;
/**
* 瀹氭椂浠诲姟璋冨害娴嬭瘯
*
* @author ruoyi
*/
+@Slf4j
@Component("ryTask")
public class RyTask {
@Autowired
private IServiceThirdDataService iServiceThirdDataService;
+
@Autowired
private IServiceSubtaskAnswerService serviceSubtaskAnswerService;
+
+ @Autowired
+ private IPatMedInhospService iPatMedInhospService;
+
+ @Autowired
+ private IServiceSubtaskService iServiceSubtaskService;
+
+
+ @Value("${localIP}")
+ private String localIP;
+
+ @Value("${pub_key}")
+ private String pub_key;
+
+
+ @Value("${req_path}")
+ private String req_path;
+
+ @Autowired
+ private ServiceTaskMapper serviceTaskMapper;
+
+ @Autowired
+ private SendService sendService;
+
+ @Autowired
+ private RedisCache redisCache;
+
+ @Autowired
+ private IServiceSubtaskRecordService serviceSubtaskRecordService;
+
+ @Autowired
+ IBaseSmsaccountService baseSmsaccountService;
public void ryMultipleParams(String s, Boolean b, Long l, Double d, Integer i) {
System.out.println(StringUtils.format("鎵ц澶氬弬鏂规硶锛� 瀛楃涓茬被鍨媨}锛屽竷灏旂被鍨媨}锛岄暱鏁村瀷{}锛屾诞鐐瑰瀷{}锛屾暣褰}", s, b, l, d, i));
@@ -50,4 +93,235 @@
public void runServiceSubTaskAnswer() {
serviceSubtaskAnswerService.saveQuestionAnswer(null);
}
+
+
+ /**
+ * 澶勭悊his鏁版嵁
+ */
+ public void dealHisData() {
+ //灏嗘偅鑰呬俊鎭�佸嚭闄€�侀棬璇婃暟鎹叏閮ㄩ噰闆�
+
+
+ //璋冪敤dealOupHospInfo鏁版嵁澶勭悊鏂规硶锛屽鐞嗗畬鍚庯紝灏嗏�滃嚭闄㈣〃鐨刢heck_flag=1鈥�
+ //鑾峰彇褰撳墠鏃ユ湡 锛堢簿纭埌澶╋級寰�鍓嶆帹鐩稿簲澶╂暟锛堝湪鎸囧畾鐨勫熀纭�妯℃澘涓壘瀵瑰簲鐨勫ぉ鏁帮級锛�
+ //寰幆鎮h�呬俊鎭紝鏍规嵁鎮h��"鍑洪櫌璇婃柇ICD鍊尖�濊幏鍙栧埌鐩稿綋鐨勬ā鏉匡紙鑾峰彇鍙栫浉搴旂殑澶╂暟锛�;
+ //鏍规嵁鏌ヨ鍑烘潵鐨勬ā鏉匡紝鍘诲浐瀹氫换鍔★紙鍥哄畾浠诲姟锛屽凡缁忓皢妯℃澘涔熷浐瀹氫簡锛夊幓鍖归厤妯℃澘
+ //鏍规嵁鍖归厤鍑烘潵鐨勬ā鏉垮拰浠诲姟涓庢偅鑰呬俊鎭紝灏嗘暟鎹彃鍏ュ埌瀛愪换鍔¤〃涓�
+ iPatMedInhospService.dealOupHospInfo();
+ }
+
+ /**
+ * 闀挎湡浠诲姟鎵ц
+ */
+ public void longTaskSend() {
+ //鑾峰彇浠诲姟淇℃伅
+ ServiceTask st =new ServiceTask();
+ st.setDelFlag("0");
+ st.setLongTask(1);
+ List<ServiceTask> serviceTasks = serviceTaskMapper.selectServiceTaskList(st);
+ for (ServiceTask serviceTask : serviceTasks) {
+ //閫氳繃taskId,鑾峰彇鏈墽琛岀殑瀛愪换鍔′俊鎭�
+ ServiceSubtask serviceSubtask = new ServiceSubtask();
+ serviceSubtask.setTaskid(serviceTask.getTaskid());
+ serviceSubtask.setSendstate(2L);
+ List<ServiceSubtask> selectServiceSubtaskList = iServiceSubtaskService.selectServiceSubtaskList(serviceSubtask);
+ if (CollectionUtils.isNotEmpty(selectServiceSubtaskList)) {
+ for (ServiceSubtask serviceSubtask1 : selectServiceSubtaskList) {
+ //濡傛灉鎮h�呯殑鍙戦�佹棩鏈熸槸浠婂ぉ锛屽垯杩涜鍙戦��
+ boolean dateToday = isDateToday(serviceSubtask1.getLongSendTime());
+ if (dateToday) {
+ CommonTaskcallMQ commonTaskcallMQ = new CommonTaskcallMQ();
+ commonTaskcallMQ.setTaskid(serviceTask.getTaskid());
+ commonTaskcallMQ.setPreachform(serviceSubtask1.getServiceform());
+ sfHandle(commonTaskcallMQ, localIP);
+ //鍙戦�佸畬鎴愬悗锛屼慨鏀圭姸鎬�
+ serviceSubtask1.setSendstate(3L);
+ iServiceSubtaskService.updateServiceSubtask(serviceSubtask1);
+ }
+ }
+ }
+
+ }
+ }
+
+ /**
+ * 鍒ゆ柇鏃ユ湡鏄惁鏄粖澶�
+ *
+ * @param date
+ * @return
+ */
+ public boolean isDateToday(Date date) {
+ // 鑾峰彇褰撳墠鏃ユ湡
+ Calendar calendarNow = Calendar.getInstance();
+ int todayYear = calendarNow.get(Calendar.YEAR);
+ int todayMonth = calendarNow.get(Calendar.MONTH);
+ int todayDay = calendarNow.get(Calendar.DAY_OF_MONTH);
+
+ // 鍒涘缓涓�涓� Calendar 瀹炰緥鐢ㄤ簬妫�鏌ョ殑鏃ユ湡
+ Calendar calendarToCheck = Calendar.getInstance();
+ calendarToCheck.setTime(date);
+
+ // 姣旇緝骞淬�佹湀鍜屾棩
+ return (calendarToCheck.get(Calendar.YEAR) == todayYear && calendarToCheck.get(Calendar.MONTH) == todayMonth && calendarToCheck.get(Calendar.DAY_OF_MONTH) == todayDay);
+ }
+
+ public void sfHandle(CommonTaskcallMQ commonTaskcallMQ, String ip) {
+ //鍒ゆ柇涓�涓媍ommonTaskcallMQ涓殑stopstate鏄惁涓巌vr_task涓殑涓�鑷达紝涓嶄竴鑷达紝鍒欒鏄庢槸鏆傚仠浜�
+ ServiceTask ivrTask1 = serviceTaskMapper.selectServiceTaskByTaskid(commonTaskcallMQ.getTaskid());
+
+ if (StringUtils.isNotEmpty(commonTaskcallMQ.getPreachform())) {
+ //濡備綍浠诲姟鍙戦�佹柟寮忎笉涓虹┖
+ String[] split = commonTaskcallMQ.getPreachform().split(",");
+ System.out.println("split鐨勫�间负锛�" + split);
+ for (String serviceFrom : split) {
+ String descByCode = ServiceFromEnum.getDescByCode(Integer.valueOf(serviceFrom));
+ //杩欓噷鍙互鑰冭檻鐢ㄧ瓥鐣ユā寮忎紭鍖栦竴涓嬶紝涓嶇劧澶毦鐪嬩簡
+ //閫氳繃浠诲姟ID鎷垮埌鎮h�呬俊鎭�
+ ServiceSubtask ivrTaskcall = new ServiceSubtask();
+ ivrTaskcall.setTaskid(commonTaskcallMQ.getTaskid());
+ List<ServiceSubtask> selectServiceSubtaskList = iServiceSubtaskService.selectServiceSubtaskList(ivrTaskcall);
+ if (descByCode.equals("鐢佃瘽")) {
+ for (ServiceSubtask serviceSubtask : selectServiceSubtaskList) {
+ ServiceTask ivrTask = serviceTaskMapper.selectServiceTaskByTaskid(serviceSubtask.getTaskid());
+ if (ivrTask.getSendState() != null && ivrTask.getSendState() == 3 || ivrTask.getSendState() != null && ivrTask.getSendState() == 4) {
+ //濡備綍浠诲姟琚�滄殏鍋溾�濇垨鈥滅粓姝⑩��
+ break;
+ }
+ //鑾峰彇鍒皏alue鍊兼渶灏戠殑key
+ String key = getKey();
+ if (commonTaskcallMQ.getSendType().equals("2")) {
+ //璇存槑鏄珛鍗冲彂閫�
+ String value = redisCache.getCacheObject("cache-0");
+ ServiceSubtask serviceSubtask1 = new ServiceSubtask();
+ serviceSubtask1.setTaskid(commonTaskcallMQ.getTaskid());
+ List<ServiceSubtask> selectServiceSubtaskList1 = iServiceSubtaskService.selectServiceSubtaskList(serviceSubtask1);
+ for (ServiceSubtask serviceSubtask2 : selectServiceSubtaskList1) {
+ if (StringUtils.isEmpty(value)) {
+ value = "," + serviceSubtask2.getId().toString() + ",";
+ } else {
+ value = value + "," + serviceSubtask2.getId().toString() + ",";
+ }
+ }
+ redisCache.setCacheObject("cache-0", value);
+ } else {
+ //闈炵珛鍗冲彂閫�
+ String value = redisCache.getCacheObject(key);
+ ServiceSubtask serviceSubtask1 = new ServiceSubtask();
+ serviceSubtask1.setTaskid(commonTaskcallMQ.getTaskid());
+ List<ServiceSubtask> selectServiceSubtaskList1 = iServiceSubtaskService.selectServiceSubtaskList(serviceSubtask1);
+ for (ServiceSubtask serviceSubtask2 : selectServiceSubtaskList1) {
+ if (StringUtils.isEmpty(value)) {
+ value = "," + serviceSubtask2.getId().toString() + ",";
+ } else {
+ value = value + "," + serviceSubtask2.getId().toString() + ",";
+ }
+ }
+ redisCache.setCacheObject(key, value);
+ }
+
+ //浠诲姟鍙戦�佽褰曪紙杩欎釜浠g爜搴旇鍐欏湪phoneTask涓紝鍏堝啓鍦ㄨ繖锛屽悗闈㈠啀鏀癸級
+ ServiceSubtaskRecord serviceSubtaskRecord = new ServiceSubtaskRecord();
+ serviceSubtaskRecord.setTaskid(serviceSubtask.getTaskid().toString());
+ serviceSubtaskRecord.setUuid(UUID.randomUUID().toString());
+ serviceSubtaskRecord.setTasktype(serviceSubtask.getType());
+ serviceSubtaskRecord.setPreachform("3");
+ serviceSubtaskRecord.setStartTime(System.currentTimeMillis());
+ serviceSubtaskRecordService.insertServiceSubtaskRecord(serviceSubtaskRecord);
+
+// //閫氳繃澶氱嚎绋嬬殑鏂瑰紡鍘绘墦鐢佃瘽
+// executorService.submit(new PhoneTask(serviceSubtask, ivrTaskTemplateVO1, redisCache, sendService, phonePath, robotPhoneUtils));
+ }
+ } else if (descByCode.equals("澶氬獟浣�")) {
+ //澶氬獟浣�
+ return;
+ } else if (descByCode.equals("绾歌川")) {
+ //绾歌川
+ return;
+ } else if (descByCode.equals("鐭俊")) {
+ //鐭俊
+// http://localhost:8099/followvisit/particty?param1=3¶m2=348
+ //瀵箄rl涓袱涓弬鏁板姞瀵�
+ RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample();
+ 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("4");
+ sendMagParam.setPhone(serviceSubtask.getPhone());
+ sendMagParam.setUrl(ip + ":" + req_path + "/followvisit/particty?param1=" + taskId + "¶m2=" + patid + "¶m5=false");
+ Boolean aBoolean = sendService.sendMsg(sendMagParam);
+
+
+ //浠诲姟鍙戦�佽褰�
+ ServiceSubtaskRecord serviceSubtaskRecord = new ServiceSubtaskRecord();
+ serviceSubtaskRecord.setTaskid(serviceSubtask.getTaskid().toString());
+ serviceSubtaskRecord.setUuid(UUID.randomUUID().toString());
+ serviceSubtaskRecord.setTasktype(serviceSubtask.getType());
+ serviceSubtaskRecord.setPreachform("4");
+ serviceSubtaskRecord.setStartTime(System.currentTimeMillis());
+ serviceSubtaskRecord.setResult(aBoolean == true ? "鎴愬姛" : "澶辫触");
+ serviceSubtaskRecordService.insertServiceSubtaskRecord(serviceSubtaskRecord);
+ }
+ } else if (descByCode.equals("鍏紬鍙�")) {
+ //鍏紬鍙�
+ RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample();
+ 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);
+
+ //浠诲姟鍙戦�佽褰�
+ ServiceSubtaskRecord serviceSubtaskRecord = new ServiceSubtaskRecord();
+ serviceSubtaskRecord.setTaskid(serviceSubtask.getTaskid().toString());
+ serviceSubtaskRecord.setUuid(UUID.randomUUID().toString());
+ serviceSubtaskRecord.setTasktype(serviceSubtask.getType());
+ serviceSubtaskRecord.setPreachform("4");
+ serviceSubtaskRecord.setStartTime(System.currentTimeMillis());
+ serviceSubtaskRecord.setResult(aBoolean == true ? "鎴愬姛" : "澶辫触");
+ serviceSubtaskRecordService.insertServiceSubtaskRecord(serviceSubtaskRecord);
+ }
+ }
+ //閫氱煡 MQ 娑堟伅宸茶鎺ユ敹,鍙互ACK(浠庨槦鍒椾腑鍒犻櫎)浜� 锛堣繖涓渶瑕佹牴鎹笟鍔″啀鍘诲鐞咥CK锛�
+ }
+ }
+ }
+
+ private String getKey() {
+ Map<String, String> map = new HashMap<>();
+ for (int i = 0; i < 6; i++) {
+ Boolean aBoolean = redisCache.hasKey("cache-" + i);
+ if (!aBoolean) {
+ redisCache.setCacheObject("cache-" + i, "");
+ map.put("cache-" + i, "");
+ } else {
+ map.put("cache-" + i, redisCache.getCacheObject("cache-" + i));
+ }
+ }
+
+ String key = null;
+ String value = "";
+ for (Map.Entry<String, String> entry : map.entrySet()) {
+ if (StringUtils.isEmpty(value)) {
+ value = entry.getValue();
+ key = entry.getKey();
+ } else {
+ if (entry.getValue().split(",").length < value.split(",").length) {
+ value = entry.getValue();
+ key = entry.getKey();
+ }
+ }
+ }
+ return key;
+ }
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/RouterVo.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/RouterVo.java
index afff8c9..2ff4595 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/RouterVo.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/RouterVo.java
@@ -1,16 +1,16 @@
package com.ruoyi.system.domain.vo;
import com.fasterxml.jackson.annotation.JsonInclude;
+
import java.util.List;
/**
* 璺敱閰嶇疆淇℃伅
- *
+ *
* @author ruoyi
*/
@JsonInclude(JsonInclude.Include.NON_EMPTY)
-public class RouterVo
-{
+public class RouterVo {
/**
* 璺敱鍚嶅瓧
*/
@@ -56,93 +56,88 @@
*/
private List<RouterVo> children;
- public String getName()
- {
+ /**
+ * 瀛愯彍鍗曞悕闆嗗悎
+ */
+ private List<String> childName;
+
+ public List<String> getChildName() {
+ return childName;
+ }
+
+ public void setChildName(List<String> childName) {
+ this.childName = childName;
+ }
+
+ public String getName() {
return name;
}
- public void setName(String name)
- {
+ public void setName(String name) {
this.name = name;
}
- public String getPath()
- {
+ public String getPath() {
return path;
}
- public void setPath(String path)
- {
+ public void setPath(String path) {
this.path = path;
}
- public boolean getHidden()
- {
+ public boolean getHidden() {
return hidden;
}
- public void setHidden(boolean hidden)
- {
+ public void setHidden(boolean hidden) {
this.hidden = hidden;
}
- public String getRedirect()
- {
+ public String getRedirect() {
return redirect;
}
- public void setRedirect(String redirect)
- {
+ public void setRedirect(String redirect) {
this.redirect = redirect;
}
- public String getComponent()
- {
+ public String getComponent() {
return component;
}
- public void setComponent(String component)
- {
+ public void setComponent(String component) {
this.component = component;
}
- public String getQuery()
- {
+ public String getQuery() {
return query;
}
- public void setQuery(String query)
- {
+ public void setQuery(String query) {
this.query = query;
}
- public Boolean getAlwaysShow()
- {
+ public Boolean getAlwaysShow() {
return alwaysShow;
}
- public void setAlwaysShow(Boolean alwaysShow)
- {
+ public void setAlwaysShow(Boolean alwaysShow) {
this.alwaysShow = alwaysShow;
}
- public MetaVo getMeta()
- {
+ public MetaVo getMeta() {
return meta;
}
- public void setMeta(MetaVo meta)
- {
+ public void setMeta(MetaVo meta) {
this.meta = meta;
}
- public List<RouterVo> getChildren()
- {
+ public List<RouterVo> getChildren() {
return children;
}
- public void setChildren(List<RouterVo> children)
- {
+ public void setChildren(List<RouterVo> children) {
this.children = children;
}
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BaseUserInfoMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BaseUserInfoMapper.java
index cebbe2c..7388818 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BaseUserInfoMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BaseUserInfoMapper.java
@@ -2,18 +2,20 @@
import java.util.List;
import com.ruoyi.system.domain.BaseUserInfo;
+import org.apache.ibatis.annotations.Mapper;
/**
* 鐢ㄦ埛Mapper鎺ュ彛
- *
+ *
* @author ruoyi
* @date 2023-05-25
*/
-public interface BaseUserInfoMapper
+@Mapper
+public interface BaseUserInfoMapper
{
/**
* 鏌ヨ鐢ㄦ埛
- *
+ *
* @param userid 鐢ㄦ埛涓婚敭
* @return 鐢ㄦ埛
*/
@@ -21,7 +23,7 @@
/**
* 鏌ヨ鐢ㄦ埛鍒楄〃
- *
+ *
* @param baseUserInfo 鐢ㄦ埛
* @return 鐢ㄦ埛闆嗗悎
*/
@@ -29,7 +31,7 @@
/**
* 鏂板鐢ㄦ埛
- *
+ *
* @param baseUserInfo 鐢ㄦ埛
* @return 缁撴灉
*/
@@ -37,7 +39,7 @@
/**
* 淇敼鐢ㄦ埛
- *
+ *
* @param baseUserInfo 鐢ㄦ埛
* @return 缁撴灉
*/
@@ -45,7 +47,7 @@
/**
* 鍒犻櫎鐢ㄦ埛
- *
+ *
* @param userid 鐢ㄦ埛涓婚敭
* @return 缁撴灉
*/
@@ -53,7 +55,7 @@
/**
* 鎵归噺鍒犻櫎鐢ㄦ埛
- *
+ *
* @param userids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
* @return 缁撴灉
*/
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/EquipmentinfoMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/EquipmentinfoMapper.java
index 6470a62..93cfbaa 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/EquipmentinfoMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/EquipmentinfoMapper.java
@@ -2,18 +2,20 @@
import java.util.List;
import com.ruoyi.system.domain.Equipmentinfo;
+import org.apache.ibatis.annotations.Mapper;
/**
* 銆愯濉啓鍔熻兘鍚嶇О銆慚apper鎺ュ彛
- *
+ *
* @author ruoyi
* @date 2023-05-25
*/
-public interface EquipmentinfoMapper
+@Mapper
+public interface EquipmentinfoMapper
{
/**
* 鏌ヨ銆愯濉啓鍔熻兘鍚嶇О銆�
- *
+ *
* @param id 銆愯濉啓鍔熻兘鍚嶇О銆戜富閿�
* @return 銆愯濉啓鍔熻兘鍚嶇О銆�
*/
@@ -21,7 +23,7 @@
/**
* 鏌ヨ銆愯濉啓鍔熻兘鍚嶇О銆戝垪琛�
- *
+ *
* @param equipmentinfo 銆愯濉啓鍔熻兘鍚嶇О銆�
* @return 銆愯濉啓鍔熻兘鍚嶇О銆戦泦鍚�
*/
@@ -29,7 +31,7 @@
/**
* 鏂板銆愯濉啓鍔熻兘鍚嶇О銆�
- *
+ *
* @param equipmentinfo 銆愯濉啓鍔熻兘鍚嶇О銆�
* @return 缁撴灉
*/
@@ -37,7 +39,7 @@
/**
* 淇敼銆愯濉啓鍔熻兘鍚嶇О銆�
- *
+ *
* @param equipmentinfo 銆愯濉啓鍔熻兘鍚嶇О銆�
* @return 缁撴灉
*/
@@ -45,7 +47,7 @@
/**
* 鍒犻櫎銆愯濉啓鍔熻兘鍚嶇О銆�
- *
+ *
* @param id 銆愯濉啓鍔熻兘鍚嶇О銆戜富閿�
* @return 缁撴灉
*/
@@ -53,7 +55,7 @@
/**
* 鎵归噺鍒犻櫎銆愯濉啓鍔熻兘鍚嶇О銆�
- *
+ *
* @param ids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
* @return 缁撴灉
*/
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java
index 384a9b6..8db2353 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java
@@ -1,19 +1,22 @@
package com.ruoyi.system.mapper;
import java.util.List;
+
+import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.common.core.domain.entity.SysDept;
/**
* 閮ㄩ棬绠$悊 鏁版嵁灞�
- *
+ *
* @author ruoyi
*/
+@Mapper
public interface SysDeptMapper
{
/**
* 鏌ヨ閮ㄩ棬绠$悊鏁版嵁
- *
+ *
* @param dept 閮ㄩ棬淇℃伅
* @return 閮ㄩ棬淇℃伅闆嗗悎
*/
@@ -21,7 +24,7 @@
/**
* 鏍规嵁瑙掕壊ID鏌ヨ閮ㄩ棬鏍戜俊鎭�
- *
+ *
* @param roleId 瑙掕壊ID
* @param deptCheckStrictly 閮ㄩ棬鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�
* @return 閫変腑閮ㄩ棬鍒楄〃
@@ -30,7 +33,7 @@
/**
* 鏍规嵁閮ㄩ棬ID鏌ヨ淇℃伅
- *
+ *
* @param deptId 閮ㄩ棬ID
* @return 閮ㄩ棬淇℃伅
*/
@@ -38,7 +41,7 @@
/**
* 鏍规嵁ID鏌ヨ鎵�鏈夊瓙閮ㄩ棬
- *
+ *
* @param deptId 閮ㄩ棬ID
* @return 閮ㄩ棬鍒楄〃
*/
@@ -46,7 +49,7 @@
/**
* 鏍规嵁ID鏌ヨ鎵�鏈夊瓙閮ㄩ棬锛堟甯哥姸鎬侊級
- *
+ *
* @param deptId 閮ㄩ棬ID
* @return 瀛愰儴闂ㄦ暟
*/
@@ -54,7 +57,7 @@
/**
* 鏄惁瀛樺湪瀛愯妭鐐�
- *
+ *
* @param deptId 閮ㄩ棬ID
* @return 缁撴灉
*/
@@ -62,7 +65,7 @@
/**
* 鏌ヨ閮ㄩ棬鏄惁瀛樺湪鐢ㄦ埛
- *
+ *
* @param deptId 閮ㄩ棬ID
* @return 缁撴灉
*/
@@ -70,7 +73,7 @@
/**
* 鏍¢獙閮ㄩ棬鍚嶇О鏄惁鍞竴
- *
+ *
* @param deptName 閮ㄩ棬鍚嶇О
* @param parentId 鐖堕儴闂↖D
* @return 缁撴灉
@@ -79,7 +82,7 @@
/**
* 鏂板閮ㄩ棬淇℃伅
- *
+ *
* @param dept 閮ㄩ棬淇℃伅
* @return 缁撴灉
*/
@@ -87,7 +90,7 @@
/**
* 淇敼閮ㄩ棬淇℃伅
- *
+ *
* @param dept 閮ㄩ棬淇℃伅
* @return 缁撴灉
*/
@@ -95,14 +98,14 @@
/**
* 淇敼鎵�鍦ㄩ儴闂ㄦ甯哥姸鎬�
- *
+ *
* @param deptIds 閮ㄩ棬ID缁�
*/
public void updateDeptStatusNormal(Long[] deptIds);
/**
* 淇敼瀛愬厓绱犲叧绯�
- *
+ *
* @param depts 瀛愬厓绱�
* @return 缁撴灉
*/
@@ -110,7 +113,7 @@
/**
* 鍒犻櫎閮ㄩ棬绠$悊淇℃伅
- *
+ *
* @param deptId 閮ㄩ棬ID
* @return 缁撴灉
*/
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDictDataMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDictDataMapper.java
index a341f1e..1d45467 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDictDataMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDictDataMapper.java
@@ -1,19 +1,22 @@
package com.ruoyi.system.mapper;
import java.util.List;
+
+import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.common.core.domain.entity.SysDictData;
/**
* 瀛楀吀琛� 鏁版嵁灞�
- *
+ *
* @author ruoyi
*/
+@Mapper
public interface SysDictDataMapper
{
/**
* 鏍规嵁鏉′欢鍒嗛〉鏌ヨ瀛楀吀鏁版嵁
- *
+ *
* @param dictData 瀛楀吀鏁版嵁淇℃伅
* @return 瀛楀吀鏁版嵁闆嗗悎淇℃伅
*/
@@ -21,7 +24,7 @@
/**
* 鏍规嵁瀛楀吀绫诲瀷鏌ヨ瀛楀吀鏁版嵁
- *
+ *
* @param dictType 瀛楀吀绫诲瀷
* @return 瀛楀吀鏁版嵁闆嗗悎淇℃伅
*/
@@ -29,7 +32,7 @@
/**
* 鏍规嵁瀛楀吀绫诲瀷鍜屽瓧鍏搁敭鍊兼煡璇㈠瓧鍏告暟鎹俊鎭�
- *
+ *
* @param dictType 瀛楀吀绫诲瀷
* @param dictValue 瀛楀吀閿��
* @return 瀛楀吀鏍囩
@@ -38,7 +41,7 @@
/**
* 鏍规嵁瀛楀吀鏁版嵁ID鏌ヨ淇℃伅
- *
+ *
* @param dictCode 瀛楀吀鏁版嵁ID
* @return 瀛楀吀鏁版嵁
*/
@@ -46,7 +49,7 @@
/**
* 鏌ヨ瀛楀吀鏁版嵁
- *
+ *
* @param dictType 瀛楀吀绫诲瀷
* @return 瀛楀吀鏁版嵁
*/
@@ -54,7 +57,7 @@
/**
* 閫氳繃瀛楀吀ID鍒犻櫎瀛楀吀鏁版嵁淇℃伅
- *
+ *
* @param dictCode 瀛楀吀鏁版嵁ID
* @return 缁撴灉
*/
@@ -62,7 +65,7 @@
/**
* 鎵归噺鍒犻櫎瀛楀吀鏁版嵁淇℃伅
- *
+ *
* @param dictCodes 闇�瑕佸垹闄ょ殑瀛楀吀鏁版嵁ID
* @return 缁撴灉
*/
@@ -70,7 +73,7 @@
/**
* 鏂板瀛楀吀鏁版嵁淇℃伅
- *
+ *
* @param dictData 瀛楀吀鏁版嵁淇℃伅
* @return 缁撴灉
*/
@@ -78,7 +81,7 @@
/**
* 淇敼瀛楀吀鏁版嵁淇℃伅
- *
+ *
* @param dictData 瀛楀吀鏁版嵁淇℃伅
* @return 缁撴灉
*/
@@ -86,7 +89,7 @@
/**
* 鍚屾淇敼瀛楀吀绫诲瀷
- *
+ *
* @param oldDictType 鏃у瓧鍏哥被鍨�
* @param newDictType 鏂版棫瀛楀吀绫诲瀷
* @return 缁撴灉
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDictTypeMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDictTypeMapper.java
index 5fb48fb..dd7c4d9 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDictTypeMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDictTypeMapper.java
@@ -2,17 +2,19 @@
import java.util.List;
import com.ruoyi.common.core.domain.entity.SysDictType;
+import org.apache.ibatis.annotations.Mapper;
/**
* 瀛楀吀琛� 鏁版嵁灞�
- *
+ *
* @author ruoyi
*/
+@Mapper
public interface SysDictTypeMapper
{
/**
* 鏍规嵁鏉′欢鍒嗛〉鏌ヨ瀛楀吀绫诲瀷
- *
+ *
* @param dictType 瀛楀吀绫诲瀷淇℃伅
* @return 瀛楀吀绫诲瀷闆嗗悎淇℃伅
*/
@@ -20,14 +22,14 @@
/**
* 鏍规嵁鎵�鏈夊瓧鍏哥被鍨�
- *
+ *
* @return 瀛楀吀绫诲瀷闆嗗悎淇℃伅
*/
public List<SysDictType> selectDictTypeAll();
/**
* 鏍规嵁瀛楀吀绫诲瀷ID鏌ヨ淇℃伅
- *
+ *
* @param dictId 瀛楀吀绫诲瀷ID
* @return 瀛楀吀绫诲瀷
*/
@@ -35,7 +37,7 @@
/**
* 鏍规嵁瀛楀吀绫诲瀷鏌ヨ淇℃伅
- *
+ *
* @param dictType 瀛楀吀绫诲瀷
* @return 瀛楀吀绫诲瀷
*/
@@ -43,7 +45,7 @@
/**
* 閫氳繃瀛楀吀ID鍒犻櫎瀛楀吀淇℃伅
- *
+ *
* @param dictId 瀛楀吀ID
* @return 缁撴灉
*/
@@ -51,7 +53,7 @@
/**
* 鎵归噺鍒犻櫎瀛楀吀绫诲瀷淇℃伅
- *
+ *
* @param dictIds 闇�瑕佸垹闄ょ殑瀛楀吀ID
* @return 缁撴灉
*/
@@ -59,7 +61,7 @@
/**
* 鏂板瀛楀吀绫诲瀷淇℃伅
- *
+ *
* @param dictType 瀛楀吀绫诲瀷淇℃伅
* @return 缁撴灉
*/
@@ -67,7 +69,7 @@
/**
* 淇敼瀛楀吀绫诲瀷淇℃伅
- *
+ *
* @param dictType 瀛楀吀绫诲瀷淇℃伅
* @return 缁撴灉
*/
@@ -75,7 +77,7 @@
/**
* 鏍¢獙瀛楀吀绫诲瀷绉版槸鍚﹀敮涓�
- *
+ *
* @param dictType 瀛楀吀绫诲瀷
* @return 缁撴灉
*/
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysLogininforMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysLogininforMapper.java
index 629866f..553f2c6 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysLogininforMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysLogininforMapper.java
@@ -2,24 +2,26 @@
import java.util.List;
import com.ruoyi.system.domain.SysLogininfor;
+import org.apache.ibatis.annotations.Mapper;
/**
* 绯荤粺璁块棶鏃ュ織鎯呭喌淇℃伅 鏁版嵁灞�
- *
+ *
* @author ruoyi
*/
+@Mapper
public interface SysLogininforMapper
{
/**
* 鏂板绯荤粺鐧诲綍鏃ュ織
- *
+ *
* @param logininfor 璁块棶鏃ュ織瀵硅薄
*/
public void insertLogininfor(SysLogininfor logininfor);
/**
* 鏌ヨ绯荤粺鐧诲綍鏃ュ織闆嗗悎
- *
+ *
* @param logininfor 璁块棶鏃ュ織瀵硅薄
* @return 鐧诲綍璁板綍闆嗗悎
*/
@@ -27,7 +29,7 @@
/**
* 鎵归噺鍒犻櫎绯荤粺鐧诲綍鏃ュ織
- *
+ *
* @param infoIds 闇�瑕佸垹闄ょ殑鐧诲綍鏃ュ織ID
* @return 缁撴灉
*/
@@ -35,7 +37,7 @@
/**
* 娓呯┖绯荤粺鐧诲綍鏃ュ織
- *
+ *
* @return 缁撴灉
*/
public int cleanLogininfor();
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysMenuMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysMenuMapper.java
index 99c0c50..3130a7e 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysMenuMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysMenuMapper.java
@@ -1,6 +1,8 @@
package com.ruoyi.system.mapper;
import java.util.List;
+
+import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.common.core.domain.entity.SysMenu;
@@ -9,6 +11,7 @@
*
* @author ruoyi
*/
+@Mapper
public interface SysMenuMapper
{
/**
@@ -36,7 +39,7 @@
/**
* 鏍规嵁瑙掕壊ID鏌ヨ鏉冮檺
- *
+ *
* @param roleId 瑙掕壊ID
* @return 鏉冮檺鍒楄〃
*/
@@ -67,7 +70,7 @@
/**
* 鏍规嵁瑙掕壊ID鏌ヨ鑿滃崟鏍戜俊鎭�
- *
+ *
* @param roleId 瑙掕壊ID
* @param menuCheckStrictly 鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�
* @return 閫変腑鑿滃崟鍒楄〃
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysNoticeMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysNoticeMapper.java
index c34f0a2..3624a3c 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysNoticeMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysNoticeMapper.java
@@ -2,17 +2,19 @@
import java.util.List;
import com.ruoyi.system.domain.SysNotice;
+import org.apache.ibatis.annotations.Mapper;
/**
* 閫氱煡鍏憡琛� 鏁版嵁灞�
- *
+ *
* @author ruoyi
*/
+@Mapper
public interface SysNoticeMapper
{
/**
* 鏌ヨ鍏憡淇℃伅
- *
+ *
* @param noticeId 鍏憡ID
* @return 鍏憡淇℃伅
*/
@@ -20,7 +22,7 @@
/**
* 鏌ヨ鍏憡鍒楄〃
- *
+ *
* @param notice 鍏憡淇℃伅
* @return 鍏憡闆嗗悎
*/
@@ -28,7 +30,7 @@
/**
* 鏂板鍏憡
- *
+ *
* @param notice 鍏憡淇℃伅
* @return 缁撴灉
*/
@@ -36,7 +38,7 @@
/**
* 淇敼鍏憡
- *
+ *
* @param notice 鍏憡淇℃伅
* @return 缁撴灉
*/
@@ -44,7 +46,7 @@
/**
* 鎵归噺鍒犻櫎鍏憡
- *
+ *
* @param noticeId 鍏憡ID
* @return 缁撴灉
*/
@@ -52,7 +54,7 @@
/**
* 鎵归噺鍒犻櫎鍏憡淇℃伅
- *
+ *
* @param noticeIds 闇�瑕佸垹闄ょ殑鍏憡ID
* @return 缁撴灉
*/
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysOperLogMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysOperLogMapper.java
index 2ae6457..6970d8a 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysOperLogMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysOperLogMapper.java
@@ -2,24 +2,26 @@
import java.util.List;
import com.ruoyi.system.domain.SysOperLog;
+import org.apache.ibatis.annotations.Mapper;
/**
* 鎿嶄綔鏃ュ織 鏁版嵁灞�
- *
+ *
* @author ruoyi
*/
+@Mapper
public interface SysOperLogMapper
{
/**
* 鏂板鎿嶄綔鏃ュ織
- *
+ *
* @param operLog 鎿嶄綔鏃ュ織瀵硅薄
*/
public void insertOperlog(SysOperLog operLog);
/**
* 鏌ヨ绯荤粺鎿嶄綔鏃ュ織闆嗗悎
- *
+ *
* @param operLog 鎿嶄綔鏃ュ織瀵硅薄
* @return 鎿嶄綔鏃ュ織闆嗗悎
*/
@@ -27,7 +29,7 @@
/**
* 鎵归噺鍒犻櫎绯荤粺鎿嶄綔鏃ュ織
- *
+ *
* @param operIds 闇�瑕佸垹闄ょ殑鎿嶄綔鏃ュ織ID
* @return 缁撴灉
*/
@@ -35,7 +37,7 @@
/**
* 鏌ヨ鎿嶄綔鏃ュ織璇︾粏
- *
+ *
* @param operId 鎿嶄綔ID
* @return 鎿嶄綔鏃ュ織瀵硅薄
*/
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysPostMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysPostMapper.java
index 19be227..0e96b71 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysPostMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysPostMapper.java
@@ -2,17 +2,19 @@
import java.util.List;
import com.ruoyi.system.domain.SysPost;
+import org.apache.ibatis.annotations.Mapper;
/**
* 宀椾綅淇℃伅 鏁版嵁灞�
- *
+ *
* @author ruoyi
*/
+@Mapper
public interface SysPostMapper
{
/**
* 鏌ヨ宀椾綅鏁版嵁闆嗗悎
- *
+ *
* @param post 宀椾綅淇℃伅
* @return 宀椾綅鏁版嵁闆嗗悎
*/
@@ -20,14 +22,14 @@
/**
* 鏌ヨ鎵�鏈夊矖浣�
- *
+ *
* @return 宀椾綅鍒楄〃
*/
public List<SysPost> selectPostAll();
/**
* 閫氳繃宀椾綅ID鏌ヨ宀椾綅淇℃伅
- *
+ *
* @param postId 宀椾綅ID
* @return 瑙掕壊瀵硅薄淇℃伅
*/
@@ -35,7 +37,7 @@
/**
* 鏍规嵁鐢ㄦ埛ID鑾峰彇宀椾綅閫夋嫨妗嗗垪琛�
- *
+ *
* @param userId 鐢ㄦ埛ID
* @return 閫変腑宀椾綅ID鍒楄〃
*/
@@ -43,7 +45,7 @@
/**
* 鏌ヨ鐢ㄦ埛鎵�灞炲矖浣嶇粍
- *
+ *
* @param userName 鐢ㄦ埛鍚�
* @return 缁撴灉
*/
@@ -51,7 +53,7 @@
/**
* 鍒犻櫎宀椾綅淇℃伅
- *
+ *
* @param postId 宀椾綅ID
* @return 缁撴灉
*/
@@ -59,7 +61,7 @@
/**
* 鎵归噺鍒犻櫎宀椾綅淇℃伅
- *
+ *
* @param postIds 闇�瑕佸垹闄ょ殑宀椾綅ID
* @return 缁撴灉
*/
@@ -67,7 +69,7 @@
/**
* 淇敼宀椾綅淇℃伅
- *
+ *
* @param post 宀椾綅淇℃伅
* @return 缁撴灉
*/
@@ -75,7 +77,7 @@
/**
* 鏂板宀椾綅淇℃伅
- *
+ *
* @param post 宀椾綅淇℃伅
* @return 缁撴灉
*/
@@ -83,7 +85,7 @@
/**
* 鏍¢獙宀椾綅鍚嶇О
- *
+ *
* @param postName 宀椾綅鍚嶇О
* @return 缁撴灉
*/
@@ -91,7 +93,7 @@
/**
* 鏍¢獙宀椾綅缂栫爜
- *
+ *
* @param postCode 宀椾綅缂栫爜
* @return 缁撴灉
*/
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleDeptMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleDeptMapper.java
index f9d3a2f..a261266 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleDeptMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleDeptMapper.java
@@ -2,17 +2,19 @@
import java.util.List;
import com.ruoyi.system.domain.SysRoleDept;
+import org.apache.ibatis.annotations.Mapper;
/**
* 瑙掕壊涓庨儴闂ㄥ叧鑱旇〃 鏁版嵁灞�
- *
+ *
* @author ruoyi
*/
+@Mapper
public interface SysRoleDeptMapper
{
/**
* 閫氳繃瑙掕壊ID鍒犻櫎瑙掕壊鍜岄儴闂ㄥ叧鑱�
- *
+ *
* @param roleId 瑙掕壊ID
* @return 缁撴灉
*/
@@ -20,7 +22,7 @@
/**
* 鎵归噺鍒犻櫎瑙掕壊閮ㄩ棬鍏宠仈淇℃伅
- *
+ *
* @param ids 闇�瑕佸垹闄ょ殑鏁版嵁ID
* @return 缁撴灉
*/
@@ -28,7 +30,7 @@
/**
* 鏌ヨ閮ㄩ棬浣跨敤鏁伴噺
- *
+ *
* @param deptId 閮ㄩ棬ID
* @return 缁撴灉
*/
@@ -36,7 +38,7 @@
/**
* 鎵归噺鏂板瑙掕壊閮ㄩ棬淇℃伅
- *
+ *
* @param roleDeptList 瑙掕壊閮ㄩ棬鍒楄〃
* @return 缁撴灉
*/
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java
index cf2bd8c..8083105 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java
@@ -2,17 +2,19 @@
import java.util.List;
import com.ruoyi.common.core.domain.entity.SysRole;
+import org.apache.ibatis.annotations.Mapper;
/**
* 瑙掕壊琛� 鏁版嵁灞�
- *
+ *
* @author ruoyi
*/
+@Mapper
public interface SysRoleMapper
{
/**
* 鏍规嵁鏉′欢鍒嗛〉鏌ヨ瑙掕壊鏁版嵁
- *
+ *
* @param role 瑙掕壊淇℃伅
* @return 瑙掕壊鏁版嵁闆嗗悎淇℃伅
*/
@@ -20,7 +22,7 @@
/**
* 鏍规嵁鐢ㄦ埛ID鏌ヨ瑙掕壊
- *
+ *
* @param userId 鐢ㄦ埛ID
* @return 瑙掕壊鍒楄〃
*/
@@ -28,14 +30,14 @@
/**
* 鏌ヨ鎵�鏈夎鑹�
- *
+ *
* @return 瑙掕壊鍒楄〃
*/
public List<SysRole> selectRoleAll();
/**
* 鏍规嵁鐢ㄦ埛ID鑾峰彇瑙掕壊閫夋嫨妗嗗垪琛�
- *
+ *
* @param userId 鐢ㄦ埛ID
* @return 閫変腑瑙掕壊ID鍒楄〃
*/
@@ -43,7 +45,7 @@
/**
* 閫氳繃瑙掕壊ID鏌ヨ瑙掕壊
- *
+ *
* @param roleId 瑙掕壊ID
* @return 瑙掕壊瀵硅薄淇℃伅
*/
@@ -51,7 +53,7 @@
/**
* 鏍规嵁鐢ㄦ埛ID鏌ヨ瑙掕壊
- *
+ *
* @param userName 鐢ㄦ埛鍚�
* @return 瑙掕壊鍒楄〃
*/
@@ -59,7 +61,7 @@
/**
* 鏍¢獙瑙掕壊鍚嶇О鏄惁鍞竴
- *
+ *
* @param roleName 瑙掕壊鍚嶇О
* @return 瑙掕壊淇℃伅
*/
@@ -67,7 +69,7 @@
/**
* 鏍¢獙瑙掕壊鏉冮檺鏄惁鍞竴
- *
+ *
* @param roleKey 瑙掕壊鏉冮檺
* @return 瑙掕壊淇℃伅
*/
@@ -75,7 +77,7 @@
/**
* 淇敼瑙掕壊淇℃伅
- *
+ *
* @param role 瑙掕壊淇℃伅
* @return 缁撴灉
*/
@@ -83,7 +85,7 @@
/**
* 鏂板瑙掕壊淇℃伅
- *
+ *
* @param role 瑙掕壊淇℃伅
* @return 缁撴灉
*/
@@ -91,7 +93,7 @@
/**
* 閫氳繃瑙掕壊ID鍒犻櫎瑙掕壊
- *
+ *
* @param roleId 瑙掕壊ID
* @return 缁撴灉
*/
@@ -99,7 +101,7 @@
/**
* 鎵归噺鍒犻櫎瑙掕壊淇℃伅
- *
+ *
* @param roleIds 闇�瑕佸垹闄ょ殑瑙掕壊ID
* @return 缁撴灉
*/
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMenuMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMenuMapper.java
index 6602bee..614aff3 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMenuMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMenuMapper.java
@@ -2,17 +2,19 @@
import java.util.List;
import com.ruoyi.system.domain.SysRoleMenu;
+import org.apache.ibatis.annotations.Mapper;
/**
* 瑙掕壊涓庤彍鍗曞叧鑱旇〃 鏁版嵁灞�
- *
+ *
* @author ruoyi
*/
+@Mapper
public interface SysRoleMenuMapper
{
/**
* 鏌ヨ鑿滃崟浣跨敤鏁伴噺
- *
+ *
* @param menuId 鑿滃崟ID
* @return 缁撴灉
*/
@@ -20,7 +22,7 @@
/**
* 閫氳繃瑙掕壊ID鍒犻櫎瑙掕壊鍜岃彍鍗曞叧鑱�
- *
+ *
* @param roleId 瑙掕壊ID
* @return 缁撴灉
*/
@@ -28,7 +30,7 @@
/**
* 鎵归噺鍒犻櫎瑙掕壊鑿滃崟鍏宠仈淇℃伅
- *
+ *
* @param ids 闇�瑕佸垹闄ょ殑鏁版嵁ID
* @return 缁撴灉
*/
@@ -36,7 +38,7 @@
/**
* 鎵归噺鏂板瑙掕壊鑿滃崟淇℃伅
- *
+ *
* @param roleMenuList 瑙掕壊鑿滃崟鍒楄〃
* @return 缁撴灉
*/
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java
index 76e1c79..bfa7068 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java
@@ -1,19 +1,22 @@
package com.ruoyi.system.mapper;
import java.util.List;
+
+import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.common.core.domain.entity.SysUser;
/**
* 鐢ㄦ埛琛� 鏁版嵁灞�
- *
+ *
* @author ruoyi
*/
+@Mapper
public interface SysUserMapper
{
/**
* 鏍规嵁鏉′欢鍒嗛〉鏌ヨ鐢ㄦ埛鍒楄〃
- *
+ *
* @param sysUser 鐢ㄦ埛淇℃伅
* @return 鐢ㄦ埛淇℃伅闆嗗悎淇℃伅
*/
@@ -21,7 +24,7 @@
/**
* 鏍规嵁鏉′欢鍒嗛〉鏌ヨ宸查厤鐢ㄦ埛瑙掕壊鍒楄〃
- *
+ *
* @param user 鐢ㄦ埛淇℃伅
* @return 鐢ㄦ埛淇℃伅闆嗗悎淇℃伅
*/
@@ -29,7 +32,7 @@
/**
* 鏍规嵁鏉′欢鍒嗛〉鏌ヨ鏈垎閰嶇敤鎴疯鑹插垪琛�
- *
+ *
* @param user 鐢ㄦ埛淇℃伅
* @return 鐢ㄦ埛淇℃伅闆嗗悎淇℃伅
*/
@@ -37,7 +40,7 @@
/**
* 閫氳繃鐢ㄦ埛鍚嶆煡璇㈢敤鎴�
- *
+ *
* @param userName 鐢ㄦ埛鍚�
* @return 鐢ㄦ埛瀵硅薄淇℃伅
*/
@@ -45,7 +48,7 @@
/**
* 閫氳繃鐢ㄦ埛ID鏌ヨ鐢ㄦ埛
- *
+ *
* @param userId 鐢ㄦ埛ID
* @return 鐢ㄦ埛瀵硅薄淇℃伅
*/
@@ -53,7 +56,7 @@
/**
* 鏂板鐢ㄦ埛淇℃伅
- *
+ *
* @param user 鐢ㄦ埛淇℃伅
* @return 缁撴灉
*/
@@ -61,7 +64,7 @@
/**
* 淇敼鐢ㄦ埛淇℃伅
- *
+ *
* @param user 鐢ㄦ埛淇℃伅
* @return 缁撴灉
*/
@@ -69,7 +72,7 @@
/**
* 淇敼鐢ㄦ埛澶村儚
- *
+ *
* @param userName 鐢ㄦ埛鍚�
* @param avatar 澶村儚鍦板潃
* @return 缁撴灉
@@ -78,7 +81,7 @@
/**
* 閲嶇疆鐢ㄦ埛瀵嗙爜
- *
+ *
* @param userName 鐢ㄦ埛鍚�
* @param password 瀵嗙爜
* @return 缁撴灉
@@ -87,7 +90,7 @@
/**
* 閫氳繃鐢ㄦ埛ID鍒犻櫎鐢ㄦ埛
- *
+ *
* @param userId 鐢ㄦ埛ID
* @return 缁撴灉
*/
@@ -95,7 +98,7 @@
/**
* 鎵归噺鍒犻櫎鐢ㄦ埛淇℃伅
- *
+ *
* @param userIds 闇�瑕佸垹闄ょ殑鐢ㄦ埛ID
* @return 缁撴灉
*/
@@ -103,7 +106,7 @@
/**
* 鏍¢獙鐢ㄦ埛鍚嶇О鏄惁鍞竴
- *
+ *
* @param userName 鐢ㄦ埛鍚嶇О
* @return 缁撴灉
*/
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserPostMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserPostMapper.java
index e08991d..a6cf68f 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserPostMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserPostMapper.java
@@ -2,17 +2,19 @@
import java.util.List;
import com.ruoyi.system.domain.SysUserPost;
+import org.apache.ibatis.annotations.Mapper;
/**
* 鐢ㄦ埛涓庡矖浣嶅叧鑱旇〃 鏁版嵁灞�
- *
+ *
* @author ruoyi
*/
+@Mapper
public interface SysUserPostMapper
{
/**
* 閫氳繃鐢ㄦ埛ID鍒犻櫎鐢ㄦ埛鍜屽矖浣嶅叧鑱�
- *
+ *
* @param userId 鐢ㄦ埛ID
* @return 缁撴灉
*/
@@ -20,7 +22,7 @@
/**
* 閫氳繃宀椾綅ID鏌ヨ宀椾綅浣跨敤鏁伴噺
- *
+ *
* @param postId 宀椾綅ID
* @return 缁撴灉
*/
@@ -28,7 +30,7 @@
/**
* 鎵归噺鍒犻櫎鐢ㄦ埛鍜屽矖浣嶅叧鑱�
- *
+ *
* @param ids 闇�瑕佸垹闄ょ殑鏁版嵁ID
* @return 缁撴灉
*/
@@ -36,7 +38,7 @@
/**
* 鎵归噺鏂板鐢ㄦ埛宀椾綅淇℃伅
- *
+ *
* @param userPostList 鐢ㄦ埛瑙掕壊鍒楄〃
* @return 缁撴灉
*/
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserRoleMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserRoleMapper.java
index 3143ec8..1fb8ba8 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserRoleMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserRoleMapper.java
@@ -1,19 +1,22 @@
package com.ruoyi.system.mapper;
import java.util.List;
+
+import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.system.domain.SysUserRole;
/**
* 鐢ㄦ埛涓庤鑹插叧鑱旇〃 鏁版嵁灞�
- *
+ *
* @author ruoyi
*/
+@Mapper
public interface SysUserRoleMapper
{
/**
* 閫氳繃鐢ㄦ埛ID鍒犻櫎鐢ㄦ埛鍜岃鑹插叧鑱�
- *
+ *
* @param userId 鐢ㄦ埛ID
* @return 缁撴灉
*/
@@ -21,7 +24,7 @@
/**
* 鎵归噺鍒犻櫎鐢ㄦ埛鍜岃鑹插叧鑱�
- *
+ *
* @param ids 闇�瑕佸垹闄ょ殑鏁版嵁ID
* @return 缁撴灉
*/
@@ -29,7 +32,7 @@
/**
* 閫氳繃瑙掕壊ID鏌ヨ瑙掕壊浣跨敤鏁伴噺
- *
+ *
* @param roleId 瑙掕壊ID
* @return 缁撴灉
*/
@@ -37,7 +40,7 @@
/**
* 鎵归噺鏂板鐢ㄦ埛瑙掕壊淇℃伅
- *
+ *
* @param userRoleList 鐢ㄦ埛瑙掕壊鍒楄〃
* @return 缁撴灉
*/
@@ -45,7 +48,7 @@
/**
* 鍒犻櫎鐢ㄦ埛鍜岃鑹插叧鑱斾俊鎭�
- *
+ *
* @param userRole 鐢ㄦ埛鍜岃鑹插叧鑱斾俊鎭�
* @return 缁撴灉
*/
@@ -53,7 +56,7 @@
/**
* 鎵归噺鍙栨秷鎺堟潈鐢ㄦ埛瑙掕壊
- *
+ *
* @param roleId 瑙掕壊ID
* @param userIds 闇�瑕佸垹闄ょ殑鐢ㄦ埛鏁版嵁ID
* @return 缁撴灉
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java
index a85c350..dd0db70 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java
@@ -8,6 +8,8 @@
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
+
+import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.constant.Constants;
@@ -27,12 +29,11 @@
/**
* 鑿滃崟 涓氬姟灞傚鐞�
- *
+ *
* @author ruoyi
*/
@Service
-public class SysMenuServiceImpl implements ISysMenuService
-{
+public class SysMenuServiceImpl implements ISysMenuService {
public static final String PREMISSION_STRING = "perms[\"{0}\"]";
@Autowired
@@ -46,34 +47,29 @@
/**
* 鏍规嵁鐢ㄦ埛鏌ヨ绯荤粺鑿滃崟鍒楄〃
- *
+ *
* @param userId 鐢ㄦ埛ID
* @return 鑿滃崟鍒楄〃
*/
@Override
- public List<SysMenu> selectMenuList(Long userId)
- {
+ public List<SysMenu> selectMenuList(Long userId) {
return selectMenuList(new SysMenu(), userId);
}
/**
* 鏌ヨ绯荤粺鑿滃崟鍒楄〃
- *
+ *
* @param menu 鑿滃崟淇℃伅
* @return 鑿滃崟鍒楄〃
*/
@Override
- public List<SysMenu> selectMenuList(SysMenu menu, Long userId)
- {
+ public List<SysMenu> selectMenuList(SysMenu menu, Long userId) {
List<SysMenu> menuList = null;
// 绠$悊鍛樻樉绀烘墍鏈夎彍鍗曚俊鎭�
- if (SysUser.isAdmin(userId))
- {
+ if (SysUser.isAdmin(userId)) {
menuList = menuMapper.selectMenuList(menu);
- }
- else
- {
- menu.getParams().put("userId", userId);
+ } else {
+ menu.getParams().put("userId" , userId);
menuList = menuMapper.selectMenuListByUserId(menu);
}
return menuList;
@@ -81,19 +77,16 @@
/**
* 鏍规嵁鐢ㄦ埛ID鏌ヨ鏉冮檺
- *
+ *
* @param userId 鐢ㄦ埛ID
* @return 鏉冮檺鍒楄〃
*/
@Override
- public Set<String> selectMenuPermsByUserId(Long userId)
- {
+ public Set<String> selectMenuPermsByUserId(Long userId) {
List<String> perms = menuMapper.selectMenuPermsByUserId(userId);
Set<String> permsSet = new HashSet<>();
- for (String perm : perms)
- {
- if (StringUtils.isNotEmpty(perm))
- {
+ for (String perm : perms) {
+ if (StringUtils.isNotEmpty(perm)) {
permsSet.addAll(Arrays.asList(perm.trim().split(",")));
}
}
@@ -102,19 +95,16 @@
/**
* 鏍规嵁瑙掕壊ID鏌ヨ鏉冮檺
- *
+ *
* @param roleId 瑙掕壊ID
* @return 鏉冮檺鍒楄〃
*/
@Override
- public Set<String> selectMenuPermsByRoleId(Long roleId)
- {
+ public Set<String> selectMenuPermsByRoleId(Long roleId) {
List<String> perms = menuMapper.selectMenuPermsByRoleId(roleId);
Set<String> permsSet = new HashSet<>();
- for (String perm : perms)
- {
- if (StringUtils.isNotEmpty(perm))
- {
+ for (String perm : perms) {
+ if (StringUtils.isNotEmpty(perm)) {
permsSet.addAll(Arrays.asList(perm.trim().split(",")));
}
}
@@ -123,20 +113,16 @@
/**
* 鏍规嵁鐢ㄦ埛ID鏌ヨ鑿滃崟
- *
+ *
* @param userId 鐢ㄦ埛鍚嶇О
* @return 鑿滃崟鍒楄〃
*/
@Override
- public List<SysMenu> selectMenuTreeByUserId(Long userId)
- {
+ public List<SysMenu> selectMenuTreeByUserId(Long userId) {
List<SysMenu> menus = null;
- if (SecurityUtils.isAdmin(userId))
- {
+ if (SecurityUtils.isAdmin(userId)) {
menus = menuMapper.selectMenuTreeAll();
- }
- else
- {
+ } else {
menus = menuMapper.selectMenuTreeByUserId(userId);
}
return getChildPerms(menus, 0);
@@ -144,58 +130,50 @@
/**
* 鏍规嵁瑙掕壊ID鏌ヨ鑿滃崟鏍戜俊鎭�
- *
+ *
* @param roleId 瑙掕壊ID
* @return 閫変腑鑿滃崟鍒楄〃
*/
@Override
- public List<Long> selectMenuListByRoleId(Long roleId)
- {
+ public List<Long> selectMenuListByRoleId(Long roleId) {
SysRole role = roleMapper.selectRoleById(roleId);
return menuMapper.selectMenuListByRoleId(roleId, role.isMenuCheckStrictly());
}
/**
* 鏋勫缓鍓嶇璺敱鎵�闇�瑕佺殑鑿滃崟
- *
+ *
* @param menus 鑿滃崟鍒楄〃
* @return 璺敱鍒楄〃
*/
@Override
- public List<RouterVo> buildMenus(List<SysMenu> menus)
- {
+ public List<RouterVo> buildMenus(List<SysMenu> menus) {
List<RouterVo> routers = new LinkedList<RouterVo>();
- for (SysMenu menu : menus)
- {
+ for (SysMenu menu : menus) {
RouterVo router = new RouterVo();
router.setHidden("1".equals(menu.getVisible()));
router.setName(getRouteName(menu));
router.setPath(getRouterPath(menu));
router.setComponent(getComponent(menu));
router.setQuery(menu.getQuery());
- router.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), StringUtils.equals("1", menu.getIsCache()), menu.getPath()));
+ router.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), StringUtils.equals("1" , menu.getIsCache()), menu.getPath()));
List<SysMenu> cMenus = menu.getChildren();
- if (!cMenus.isEmpty() && cMenus.size() > 0 && UserConstants.TYPE_DIR.equals(menu.getMenuType()))
- {
+ if (!cMenus.isEmpty() && cMenus.size() > 0 && UserConstants.TYPE_DIR.equals(menu.getMenuType())) {
router.setAlwaysShow(true);
router.setRedirect("noRedirect");
router.setChildren(buildMenus(cMenus));
- }
- else if (isMenuFrame(menu))
- {
+ } else if (isMenuFrame(menu)) {
router.setMeta(null);
List<RouterVo> childrenList = new ArrayList<RouterVo>();
RouterVo children = new RouterVo();
children.setPath(menu.getPath());
children.setComponent(menu.getComponent());
children.setName(StringUtils.capitalize(menu.getPath()));
- children.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), StringUtils.equals("1", menu.getIsCache()), menu.getPath()));
+ children.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), StringUtils.equals("1" , menu.getIsCache()), menu.getPath()));
children.setQuery(menu.getQuery());
childrenList.add(children);
router.setChildren(childrenList);
- }
- else if (menu.getParentId().intValue() == 0 && isInnerLink(menu))
- {
+ } else if (menu.getParentId().intValue() == 0 && isInnerLink(menu)) {
router.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon()));
router.setPath("/");
List<RouterVo> childrenList = new ArrayList<RouterVo>();
@@ -210,32 +188,40 @@
}
routers.add(router);
}
+ for (RouterVo routerVo : routers) {
+ List<String> childName = new ArrayList<>();
+ List<RouterVo> childrens = routerVo.getChildren();
+ if (CollectionUtils.isNotEmpty(childrens)) {
+ for (RouterVo routerVo1 : childrens) {
+ if (!routerVo1.getHidden()) {
+ childName.add(routerVo1.getMeta().getTitle());
+ }
+ }
+ }
+ routerVo.setChildName(childName);
+ }
return routers;
}
/**
* 鏋勫缓鍓嶇鎵�闇�瑕佹爲缁撴瀯
- *
+ *
* @param menus 鑿滃崟鍒楄〃
* @return 鏍戠粨鏋勫垪琛�
*/
@Override
- public List<SysMenu> buildMenuTree(List<SysMenu> menus)
- {
+ public List<SysMenu> buildMenuTree(List<SysMenu> menus) {
List<SysMenu> returnList = new ArrayList<SysMenu>();
List<Long> tempList = menus.stream().map(SysMenu::getMenuId).collect(Collectors.toList());
- for (Iterator<SysMenu> iterator = menus.iterator(); iterator.hasNext();)
- {
+ for (Iterator<SysMenu> iterator = menus.iterator(); iterator.hasNext(); ) {
SysMenu menu = (SysMenu) iterator.next();
// 濡傛灉鏄《绾ц妭鐐�, 閬嶅巻璇ョ埗鑺傜偣鐨勬墍鏈夊瓙鑺傜偣
- if (!tempList.contains(menu.getParentId()))
- {
+ if (!tempList.contains(menu.getParentId())) {
recursionFn(menus, menu);
returnList.add(menu);
}
}
- if (returnList.isEmpty())
- {
+ if (returnList.isEmpty()) {
returnList = menus;
}
return returnList;
@@ -243,104 +229,95 @@
/**
* 鏋勫缓鍓嶇鎵�闇�瑕佷笅鎷夋爲缁撴瀯
- *
+ *
* @param menus 鑿滃崟鍒楄〃
* @return 涓嬫媺鏍戠粨鏋勫垪琛�
*/
@Override
- public List<TreeSelect> buildMenuTreeSelect(List<SysMenu> menus)
- {
+ public List<TreeSelect> buildMenuTreeSelect(List<SysMenu> menus) {
List<SysMenu> menuTrees = buildMenuTree(menus);
return menuTrees.stream().map(TreeSelect::new).collect(Collectors.toList());
}
/**
* 鏍规嵁鑿滃崟ID鏌ヨ淇℃伅
- *
+ *
* @param menuId 鑿滃崟ID
* @return 鑿滃崟淇℃伅
*/
@Override
- public SysMenu selectMenuById(Long menuId)
- {
+ public SysMenu selectMenuById(Long menuId) {
return menuMapper.selectMenuById(menuId);
}
/**
* 鏄惁瀛樺湪鑿滃崟瀛愯妭鐐�
- *
+ *
* @param menuId 鑿滃崟ID
* @return 缁撴灉
*/
@Override
- public boolean hasChildByMenuId(Long menuId)
- {
+ public boolean hasChildByMenuId(Long menuId) {
int result = menuMapper.hasChildByMenuId(menuId);
return result > 0;
}
/**
* 鏌ヨ鑿滃崟浣跨敤鏁伴噺
- *
+ *
* @param menuId 鑿滃崟ID
* @return 缁撴灉
*/
@Override
- public boolean checkMenuExistRole(Long menuId)
- {
+ public boolean checkMenuExistRole(Long menuId) {
int result = roleMenuMapper.checkMenuExistRole(menuId);
return result > 0;
}
/**
* 鏂板淇濆瓨鑿滃崟淇℃伅
- *
+ *
* @param menu 鑿滃崟淇℃伅
* @return 缁撴灉
*/
@Override
- public int insertMenu(SysMenu menu)
- {
+ public int insertMenu(SysMenu menu) {
return menuMapper.insertMenu(menu);
}
/**
* 淇敼淇濆瓨鑿滃崟淇℃伅
- *
+ *
* @param menu 鑿滃崟淇℃伅
* @return 缁撴灉
*/
@Override
- public int updateMenu(SysMenu menu)
- {
+ public int updateMenu(SysMenu menu) {
return menuMapper.updateMenu(menu);
}
/**
* 鍒犻櫎鑿滃崟绠$悊淇℃伅
- *
+ *
* @param menuId 鑿滃崟ID
* @return 缁撴灉
*/
@Override
- public int deleteMenuById(Long menuId)
- {
+ public int deleteMenuById(Long menuId) {
return menuMapper.deleteMenuById(menuId);
}
/**
* 鏍¢獙鑿滃崟鍚嶇О鏄惁鍞竴
- *
+ *
* @param menu 鑿滃崟淇℃伅
* @return 缁撴灉
*/
@Override
- public String checkMenuNameUnique(SysMenu menu)
- {
+ public String checkMenuNameUnique(SysMenu menu) {
Long menuId = StringUtils.isNull(menu.getMenuId()) ? -1L : menu.getMenuId();
SysMenu info = menuMapper.checkMenuNameUnique(menu.getMenuName(), menu.getParentId());
- if (StringUtils.isNotNull(info) && info.getMenuId().longValue() != menuId.longValue())
- {
+ if (StringUtils.isNotNull(info) && info.getMenuId().longValue() != menuId.longValue()) {
return UserConstants.NOT_UNIQUE;
}
return UserConstants.UNIQUE;
@@ -348,16 +325,14 @@
/**
* 鑾峰彇璺敱鍚嶇О
- *
+ *
* @param menu 鑿滃崟淇℃伅
* @return 璺敱鍚嶇О
*/
- public String getRouteName(SysMenu menu)
- {
+ public String getRouteName(SysMenu menu) {
String routerName = StringUtils.capitalize(menu.getPath());
// 闈炲閾惧苟涓旀槸涓�绾х洰褰曪紙绫诲瀷涓虹洰褰曪級
- if (isMenuFrame(menu))
- {
+ if (isMenuFrame(menu)) {
routerName = StringUtils.EMPTY;
}
return routerName;
@@ -365,27 +340,22 @@
/**
* 鑾峰彇璺敱鍦板潃
- *
+ *
* @param menu 鑿滃崟淇℃伅
* @return 璺敱鍦板潃
*/
- public String getRouterPath(SysMenu menu)
- {
+ public String getRouterPath(SysMenu menu) {
String routerPath = menu.getPath();
// 鍐呴摼鎵撳紑澶栫綉鏂瑰紡
- if (menu.getParentId().intValue() != 0 && isInnerLink(menu))
- {
+ if (menu.getParentId().intValue() != 0 && isInnerLink(menu)) {
routerPath = innerLinkReplaceEach(routerPath);
}
// 闈炲閾惧苟涓旀槸涓�绾х洰褰曪紙绫诲瀷涓虹洰褰曪級
- if (0 == menu.getParentId().intValue() && UserConstants.TYPE_DIR.equals(menu.getMenuType())
- && UserConstants.NO_FRAME.equals(menu.getIsFrame()))
- {
+ if (0 == menu.getParentId().intValue() && UserConstants.TYPE_DIR.equals(menu.getMenuType()) && UserConstants.NO_FRAME.equals(menu.getIsFrame())) {
routerPath = "/" + menu.getPath();
}
// 闈炲閾惧苟涓旀槸涓�绾х洰褰曪紙绫诲瀷涓鸿彍鍗曪級
- else if (isMenuFrame(menu))
- {
+ else if (isMenuFrame(menu)) {
routerPath = "/";
}
return routerPath;
@@ -393,23 +363,17 @@
/**
* 鑾峰彇缁勪欢淇℃伅
- *
+ *
* @param menu 鑿滃崟淇℃伅
* @return 缁勪欢淇℃伅
*/
- public String getComponent(SysMenu menu)
- {
+ public String getComponent(SysMenu menu) {
String component = UserConstants.LAYOUT;
- if (StringUtils.isNotEmpty(menu.getComponent()) && !isMenuFrame(menu))
- {
+ if (StringUtils.isNotEmpty(menu.getComponent()) && !isMenuFrame(menu)) {
component = menu.getComponent();
- }
- else if (StringUtils.isEmpty(menu.getComponent()) && menu.getParentId().intValue() != 0 && isInnerLink(menu))
- {
+ } else if (StringUtils.isEmpty(menu.getComponent()) && menu.getParentId().intValue() != 0 && isInnerLink(menu)) {
component = UserConstants.INNER_LINK;
- }
- else if (StringUtils.isEmpty(menu.getComponent()) && isParentView(menu))
- {
+ } else if (StringUtils.isEmpty(menu.getComponent()) && isParentView(menu)) {
component = UserConstants.PARENT_VIEW;
}
return component;
@@ -417,54 +381,47 @@
/**
* 鏄惁涓鸿彍鍗曞唴閮ㄨ烦杞�
- *
+ *
* @param menu 鑿滃崟淇℃伅
* @return 缁撴灉
*/
- public boolean isMenuFrame(SysMenu menu)
- {
- return menu.getParentId().intValue() == 0 && UserConstants.TYPE_MENU.equals(menu.getMenuType())
- && menu.getIsFrame().equals(UserConstants.NO_FRAME);
+ public boolean isMenuFrame(SysMenu menu) {
+ return menu.getParentId().intValue() == 0 && UserConstants.TYPE_MENU.equals(menu.getMenuType()) && menu.getIsFrame().equals(UserConstants.NO_FRAME);
}
/**
* 鏄惁涓哄唴閾剧粍浠�
- *
+ *
* @param menu 鑿滃崟淇℃伅
* @return 缁撴灉
*/
- public boolean isInnerLink(SysMenu menu)
- {
+ public boolean isInnerLink(SysMenu menu) {
return menu.getIsFrame().equals(UserConstants.NO_FRAME) && StringUtils.ishttp(menu.getPath());
}
/**
* 鏄惁涓簆arent_view缁勪欢
- *
+ *
* @param menu 鑿滃崟淇℃伅
* @return 缁撴灉
*/
- public boolean isParentView(SysMenu menu)
- {
+ public boolean isParentView(SysMenu menu) {
return menu.getParentId().intValue() != 0 && UserConstants.TYPE_DIR.equals(menu.getMenuType());
}
/**
* 鏍规嵁鐖惰妭鐐圭殑ID鑾峰彇鎵�鏈夊瓙鑺傜偣
- *
- * @param list 鍒嗙被琛�
+ *
+ * @param list 鍒嗙被琛�
* @param parentId 浼犲叆鐨勭埗鑺傜偣ID
* @return String
*/
- public List<SysMenu> getChildPerms(List<SysMenu> list, int parentId)
- {
+ public List<SysMenu> getChildPerms(List<SysMenu> list, int parentId) {
List<SysMenu> returnList = new ArrayList<SysMenu>();
- for (Iterator<SysMenu> iterator = list.iterator(); iterator.hasNext();)
- {
+ for (Iterator<SysMenu> iterator = list.iterator(); iterator.hasNext(); ) {
SysMenu t = (SysMenu) iterator.next();
// 涓�銆佹牴鎹紶鍏ョ殑鏌愪釜鐖惰妭鐐笽D,閬嶅巻璇ョ埗鑺傜偣鐨勬墍鏈夊瓙鑺傜偣
- if (t.getParentId() == parentId)
- {
+ if (t.getParentId() == parentId) {
recursionFn(list, t);
returnList.add(t);
}
@@ -474,19 +431,16 @@
/**
* 閫掑綊鍒楄〃
- *
+ *
* @param list 鍒嗙被琛�
- * @param t 瀛愯妭鐐�
+ * @param t 瀛愯妭鐐�
*/
- private void recursionFn(List<SysMenu> list, SysMenu t)
- {
+ private void recursionFn(List<SysMenu> list, SysMenu t) {
// 寰楀埌瀛愯妭鐐瑰垪琛�
List<SysMenu> childList = getChildList(list, t);
t.setChildren(childList);
- for (SysMenu tChild : childList)
- {
- if (hasChild(list, tChild))
- {
+ for (SysMenu tChild : childList) {
+ if (hasChild(list, tChild)) {
recursionFn(list, tChild);
}
}
@@ -495,15 +449,12 @@
/**
* 寰楀埌瀛愯妭鐐瑰垪琛�
*/
- private List<SysMenu> getChildList(List<SysMenu> list, SysMenu t)
- {
+ private List<SysMenu> getChildList(List<SysMenu> list, SysMenu t) {
List<SysMenu> tlist = new ArrayList<SysMenu>();
Iterator<SysMenu> it = list.iterator();
- while (it.hasNext())
- {
+ while (it.hasNext()) {
SysMenu n = (SysMenu) it.next();
- if (n.getParentId().longValue() == t.getMenuId().longValue())
- {
+ if (n.getParentId().longValue() == t.getMenuId().longValue()) {
tlist.add(n);
}
}
@@ -513,19 +464,16 @@
/**
* 鍒ゆ柇鏄惁鏈夊瓙鑺傜偣
*/
- private boolean hasChild(List<SysMenu> list, SysMenu t)
- {
+ private boolean hasChild(List<SysMenu> list, SysMenu t) {
return getChildList(list, t).size() > 0;
}
/**
* 鍐呴摼鍩熷悕鐗规畩瀛楃鏇挎崲
- *
+ *
* @return 鏇挎崲鍚庣殑鍐呴摼鍩熷悕
*/
- public String innerLinkReplaceEach(String path)
- {
- return StringUtils.replaceEach(path, new String[] { Constants.HTTP, Constants.HTTPS, Constants.WWW, "." },
- new String[] { "", "", "", "/" });
+ public String innerLinkReplaceEach(String path) {
+ return StringUtils.replaceEach(path, new String[]{Constants.HTTP, Constants.HTTPS, Constants.WWW, "."}, new String[]{"" , "" , "" , "/"});
}
}
diff --git a/smartor/pom.xml b/smartor/pom.xml
index cb88cb8..ba50b0b 100644
--- a/smartor/pom.xml
+++ b/smartor/pom.xml
@@ -120,7 +120,17 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-amqp</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.apache.axis</groupId>
+ <artifactId>axis</artifactId>
+ <version>1.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.axis</groupId>
+ <artifactId>axis-jaxrpc</artifactId>
+ <version>1.4</version>
+ </dependency>
</dependencies>
-</project>
\ No newline at end of file
+</project>
diff --git a/smartor/src/main/java/com/smartor/common/SendService.java b/smartor/src/main/java/com/smartor/common/SendService.java
index 12e0f3b..4a40d8b 100644
--- a/smartor/src/main/java/com/smartor/common/SendService.java
+++ b/smartor/src/main/java/com/smartor/common/SendService.java
@@ -1,11 +1,15 @@
package com.smartor.common;
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
import com.aliyun.dysmsapi20170525.models.SendSmsResponseBody;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
+import com.ruoyi.common.utils.http.HttpUtils;
import com.smartor.domain.*;
import com.smartor.mapper.PatWildcardMapper;
import com.smartor.service.DingTalkService;
+import com.smartor.service.ISmsParamService;
import com.smartor.service.WeChatService;
import com.smartor.service.impl.BaseSmsaccountServiceImpl;
import lombok.extern.slf4j.Slf4j;
@@ -36,6 +40,9 @@
@Autowired
private WeChatService weChatService;
+ @Autowired
+ ISmsParamService iSmsParamService;
+
public Boolean sendMsg(SendMagParam sendMagParam) {
// 1,澶氬獟浣� 2,绾歌川 3,鐢佃瘽 4,鐭俊 5.寰俊鍏紬鍙� 6.寰俊灏忕▼搴� 7.鏀粯瀹� 8.鏅鸿兘灏忕▼搴� 9.閽夐拤
switch (sendMagParam.getType()) {
@@ -46,23 +53,25 @@
case ("3"):
case ("4"):
-// BaseSmsRequest baseSmsRequest = new BaseSmsRequest();
-// baseSmsRequest.setPhoneNumber(sendMagParam.getPhone());
-// baseSmsRequest.setTemplateCode("SMS_461860582");
-// SendSmsResponseBody sendSmsResponseBody = baseSmsaccountService.sendMsg(baseSmsRequest);
-
- //涓嬮潰鐨勭煭淇″彂閫侊紝浠呮祴璇�
- BaseSmsRequest baseSmsRequest = new BaseSmsRequest();
- baseSmsRequest.setPhoneNumber("19157806063");
- baseSmsRequest.setTemplateCode("SMS_279456451");
- baseSmsRequest.setTemplateParam("{'code':'58965'}");
- SendSmsResponseBody sendSmsResponseBody = baseSmsaccountService.sendMsg(baseSmsRequest);
- log.error(sendSmsResponseBody.message);
- if (sendSmsResponseBody.getCode().equals("OK")) {
+ //鐭俊
+ int i = iSmsParamService.sendSmsInfo(sendMagParam.getUrl(), sendMagParam.getPhone());
+ if (i == 1) {
return true;
}
+
return false;
case ("5"):
+ //鍏紬鍙�
+// String params = "service=smarthos.yygh.ApiService.push&idcard=" + sendMagParam.getIdcard() + "&url=" + sendMagParam.getUrl() + "&keyword1=null&keyword2=null&keyword3=null&keyword4=null";
+// String result = HttpUtils.sendPost("/api", params);
+// JSONObject jsonObject = JSONObject.parseObject(result);
+// String code = (String) jsonObject.get("code");
+// if (!code.equals(0)) {
+// log.error("寰俊鍏紬鍙锋秷鎭彂閫佸け璐ヤ簡锛歿}", sendMagParam);
+// return false;
+// }
+// return true;
+
WeChatSendVo weChatSendVo = new WeChatSendVo();
weChatSendVo.setUrl(sendMagParam.getUrl());
weChatSendVo.setTemplateId(sendMagParam.getTmpCode());
diff --git a/smartor/src/main/java/com/smartor/domain/IvrLibaTemplate.java b/smartor/src/main/java/com/smartor/domain/IvrLibaTemplate.java
index bba299f..89252ea 100644
--- a/smartor/src/main/java/com/smartor/domain/IvrLibaTemplate.java
+++ b/smartor/src/main/java/com/smartor/domain/IvrLibaTemplate.java
@@ -342,6 +342,18 @@
private String revisitAfter;
/**
+ * 鍑洪櫌澶╂暟锛堥暱鏈熶换鍔★紝鍑哄畨闄㈠悗锛岀鍑犲ぉ鍙戦�佷俊鎭級
+ */
+ @ApiModelProperty(value = "鍑洪櫌澶╂暟锛堥暱鏈熶换鍔★紝鍑哄畨闄㈠悗锛岀鍑犲ぉ鍙戦�佷俊鎭級")
+ private Integer sendDay;
+
+ /**
+ * 鏄惁鏄暱鏈熸ā鏉匡細 0锛氫笉鏄� 1锛氭槸
+ */
+ @ApiModelProperty(value = "鏄惁鏄暱鏈熸ā鏉匡細 0锛氫笉鏄� 1锛氭槸")
+ private Integer longTemp;
+
+ /**
* pageNum
*/
@ApiModelProperty(value = "pageNum")
diff --git a/smartor/src/main/java/com/smartor/domain/IvrLibaTemplateTargetoption.java b/smartor/src/main/java/com/smartor/domain/IvrLibaTemplateTargetoption.java
index 224d36b..dc32f40 100644
--- a/smartor/src/main/java/com/smartor/domain/IvrLibaTemplateTargetoption.java
+++ b/smartor/src/main/java/com/smartor/domain/IvrLibaTemplateTargetoption.java
@@ -213,7 +213,7 @@
* 鏄惁鏄敤鎴烽�夋嫨鐨勯�夐」
*/
@ApiModelProperty(value = "鏄惁鏄敤鎴烽�夋嫨鐨勯�夐」")
- private Boolean isUserOperation = false;
+ private Integer isUserOperation = 0;
/**
* 涓嬩竴棰�
diff --git a/smartor/src/main/java/com/smartor/domain/IvrTaskTemplate.java b/smartor/src/main/java/com/smartor/domain/IvrTaskTemplate.java
index 9fa1c71..322a3c1 100644
--- a/smartor/src/main/java/com/smartor/domain/IvrTaskTemplate.java
+++ b/smartor/src/main/java/com/smartor/domain/IvrTaskTemplate.java
@@ -93,7 +93,7 @@
* 绗竴娆¢棶棰樼紪鍙�
*/
@Excel(name = "绗竴娆¢棶棰樼紪鍙�")
- @ApiModelProperty(value = "绗竴娆¢棶棰樼紪鍙�")
+ @ApiModelProperty(value = "绗竴娆¢棶棰樼紪鍙�(搴忓彿)")
private Long firstQuestionNum;
/**
@@ -337,7 +337,7 @@
private Long mateNum;
/**
- * 闅忚鍓�
+ * 闅忚鍓�,寮�鍦虹櫧
*/
@Excel(name = "闅忚鍓�")
@ApiModelProperty(value = "闅忚鍓�")
@@ -377,4 +377,12 @@
@ApiModelProperty(value = "鎸囧璇�")
private String instruction;
+
+ /**
+ * 鍑洪櫌澶╂暟锛堥暱鏈熶换鍔★紝鍑哄畨闄㈠悗锛岀鍑犲ぉ鍙戦�佷俊鎭級
+ */
+ @ApiModelProperty(value = "鍑洪櫌澶╂暟锛堥暱鏈熶换鍔★紝鍑哄畨闄㈠悗锛岀鍑犲ぉ鍙戦�佷俊鎭級")
+ private Integer sendDay;
+
+
}
diff --git a/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScript.java b/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScript.java
index 1bd1ca1..871ca1a 100644
--- a/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScript.java
+++ b/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScript.java
@@ -8,6 +8,7 @@
import lombok.Data;
import java.util.Date;
+import java.util.List;
/**
* 闅忚浠诲姟妯$増闂璇濇湳搴撳璞� ivr_task_template_script
@@ -16,7 +17,7 @@
* @date 2024-05-13
*/
@Data
-@ApiModel(value = "IvrTaskTemplateScript", description = "闅忚浠诲姟妯$増闂璇濇湳搴撳璞�")
+@ApiModel(value = "IvrTaskTemplateScript" , description = "闅忚浠诲姟妯$増闂璇濇湳搴撳璞�")
public class IvrTaskTemplateScript extends BaseEntity {
private static final long serialVersionUID = 1L;
@@ -56,6 +57,13 @@
@Excel(name = "闂鐐�")
@ApiModelProperty(value = "闂鐐�")
private String questionPoint;
+
+ /**
+ * 璇濇湳鍐呭
+ */
+ @Excel(name = "璇濇湳鍐呭")
+ @ApiModelProperty(value = "璇濇湳鍐呭")
+ private String scriptContent;
/**
* 鏃犲尮閰嶈瘽鏈�
@@ -144,7 +152,7 @@
/**
* 鍊肩被鍨嬶紙1 閫夐」 2 鏂囨湰 3 鏁板�硷級
*/
- @Excel(name = "鍊肩被鍨�", readConverterExp = "鍊肩被鍨嬶紙1 閫夐」 2 鏂囨湰 3 鏁板�硷級")
+ @Excel(name = "鍊肩被鍨�" , readConverterExp = "鍊肩被鍨嬶紙1 閫夐」 2 鏂囨湰 3 鏁板�硷級")
@ApiModelProperty(value = "涓婚敭")
private Long valueType;
@@ -165,7 +173,7 @@
* 涓婁紶鏃堕棿
*/
@JsonFormat(pattern = "yyyy-MM-dd")
- @Excel(name = " 涓婁紶鏃堕棿 ", width = 30, dateFormat = "yyyy-MM-dd")
+ @Excel(name = " 涓婁紶鏃堕棿 " , width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty(value = "涓婁紶鏃堕棿")
private Date uploadTime;
@@ -214,21 +222,21 @@
/**
* 鍏跺畠鏁版嵁锛堝瓨鍌ㄥ彉閲忥級
*/
- @Excel(name = "鍏跺畠鏁版嵁", readConverterExp = "瀛�=鍌ㄥ彉閲�")
+ @Excel(name = "鍏跺畠鏁版嵁" , readConverterExp = "瀛�=鍌ㄥ彉閲�")
@ApiModelProperty(value = "鍏跺畠鏁版嵁锛堝瓨鍌ㄥ彉閲忥級")
private String otherdata;
/**
* 鏄惁蹇呭~,1:蹇呭~ 2锛氬彲浠ヤ笉濉� 锛堢粰浜哄伐鐢ㄧ殑锛孉I涓嶇敤閬靛畧锛�
*/
- @Excel(name = "鏄惁蹇呭~,1:蹇呭~ 2锛氬彲浠ヤ笉濉� ", readConverterExp = "缁�=浜哄伐鐢ㄧ殑锛孉I涓嶇敤閬靛畧")
+ @Excel(name = "鏄惁蹇呭~,1:蹇呭~ 2锛氬彲浠ヤ笉濉� " , readConverterExp = "缁�=浜哄伐鐢ㄧ殑锛孉I涓嶇敤閬靛畧")
@ApiModelProperty(value = "鏄惁蹇呭~,1:蹇呭~ 2锛氬彲浠ヤ笉濉� 锛堢粰浜哄伐鐢ㄧ殑锛孉I涓嶇敤閬靛畧锛�")
private String isMust;
/**
* 闂缁撴灉锛堢粰鈥滃�肩被鍨嬧�濇槸鏂囨湰鎴栬�呮暟鍊肩敤鐨勶級
*/
- @Excel(name = "闂缁撴灉", readConverterExp = "缁�=鈥滃�肩被鍨嬧�濇槸鏂囨湰鎴栬�呮暟鍊肩敤鐨�")
+ @Excel(name = "闂缁撴灉" , readConverterExp = "缁�=鈥滃�肩被鍨嬧�濇槸鏂囨湰鎴栬�呮暟鍊肩敤鐨�")
@ApiModelProperty(value = "闂缁撴灉锛堢粰鈥滃�肩被鍨嬧�濇槸鏂囨湰鎴栬�呮暟鍊肩敤鐨勶級")
private String questionResult;
@@ -238,6 +246,12 @@
@ApiModelProperty(value = "鏄惁瀛樺湪鎿嶄綔锛�1 鏂板 2淇敼 3鍒犻櫎")
private Integer isoperation;
+
+ /**
+ * 搴忓彿
+ */
+ @ApiModelProperty(value = "搴忓彿")
+ private Integer sort;
/**
@@ -254,4 +268,16 @@
@ApiModelProperty(value = "閫夐」鍒嗘敮鐨勪笅涓�涓瘽鏈紪鍙�")
private String branchNextscriptno;
+ /**
+ * 閫夐」鍒嗘敮鐨勪笅涓�涓瘽鏈紪鍙�
+ */
+ @Excel(name = "閫夐」鍒嗘敮鐨勪笅涓�涓瘽鏈紪鍙�")
+ @ApiModelProperty(value = "閫夐」鍒嗘敮鐨勪笅涓�涓瘽鏈紪鍙�")
+ private Long nextScriptno;
+
+ /**
+ * 闂閫夐」
+ */
+ private List<IvrTaskTemplateTargetoption> ivrTaskTemplateTargetoptionList;
+
}
diff --git a/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScriptVO.java b/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScriptVO.java
index b711180..60d7a3a 100644
--- a/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScriptVO.java
+++ b/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScriptVO.java
@@ -282,6 +282,19 @@
private Integer isoperation;
/**
+ * 閫夐」鍒嗘敮鏍囪瘑(0:鏃犲垎鏀�1:鏈夊垎鏀�)
+ */
+ @Excel(name = "閫夐」鍒嗘敮鏍囪瘑(0:鏃犲垎鏀�1:鏈夊垎鏀�)")
+ @ApiModelProperty(value = "閫夐」鍒嗘敮鏍囪瘑(0:鏃犲垎鏀�1:鏈夊垎鏀�)")
+ private String branchFlag;
+
+ /**
+ * 搴忓彿
+ */
+ @ApiModelProperty(value = "搴忓彿")
+ private Integer sort;
+
+ /**
* 璇濇湳閫夐」
*/
@ApiModelProperty(value = "璇濇湳閫夐」")
diff --git a/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateTargetoption.java b/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateTargetoption.java
index 775f7a6..64f0c46 100644
--- a/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateTargetoption.java
+++ b/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateTargetoption.java
@@ -21,7 +21,7 @@
* @date 2024-05-13
*/
@Data
-@ApiModel(value = "IvrTaskTemplateTargetoption", description = "闅忚浠诲姟妯℃澘鎸囨爣閫夐」搴撳璞�")
+@ApiModel(value = "IvrTaskTemplateTargetoption" , description = "闅忚浠诲姟妯℃澘鎸囨爣閫夐」搴撳璞�")
public class IvrTaskTemplateTargetoption extends BaseEntity {
private static final long serialVersionUID = 1L;
@@ -167,7 +167,7 @@
* 涓婁紶鏃堕棿
*/
@JsonFormat(pattern = "yyyy-MM-dd")
- @Excel(name = " 涓婁紶鏃堕棿 ", width = 30, dateFormat = "yyyy-MM-dd")
+ @Excel(name = " 涓婁紶鏃堕棿 " , width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty(value = "涓婁紶鏃堕棿")
private Date uploadTime;
@@ -221,7 +221,7 @@
@ApiModelProperty(value = "姝e垯鍏抽敭瀛�(涓嶅惈)")
@Excel(name = "姝e垯鍏抽敭瀛�(涓嶅惈)")
- private List<String> dynamiccruxs= new ArrayList<>();
+ private List<String> dynamiccruxs = new ArrayList<>();
/**
* 涓嬩竴棰�
@@ -240,7 +240,7 @@
* 鏄惁鏄敤鎴烽�夋嫨鐨勯�夐」
*/
@ApiModelProperty(value = "鏄惁鏄敤鎴烽�夋嫨鐨勯�夐」")
- private Boolean isUserOperation = false;
+ private Integer isUserOperation;
/**
* 閫夐」缁彿
diff --git a/smartor/src/main/java/com/smartor/domain/PatArchiveVO.java b/smartor/src/main/java/com/smartor/domain/PatArchiveVO.java
index 84793b3..657c7ab 100644
--- a/smartor/src/main/java/com/smartor/domain/PatArchiveVO.java
+++ b/smartor/src/main/java/com/smartor/domain/PatArchiveVO.java
@@ -19,15 +19,14 @@
* @author smartor
* @date 2023-03-04
*/
-@ApiModel(value = "PatArchiveVO", description = "鎮h�呮。妗堝璞�")
+@ApiModel(value = "PatArchiveVO" , description = "鎮h�呮。妗堝璞�")
@Data
public class PatArchiveVO extends BaseEntity {
- private static final long serialVersionUID = 1L;
/**
* 鑷ID
*/
- @ApiModelProperty(value = "鑷ID")
+ @ApiModelProperty("鑷ID")
private Long id;
/**
@@ -45,26 +44,19 @@
private Long sex;
/**
+ * 璇佷欢绫诲瀷
+ */
+ @ApiModelProperty("璇佷欢绫诲瀷")
+ @Excel(name = " 璇佷欢绫诲瀷 ")
+ private String idcardtype;
+
+
+ /**
* 璇佷欢鍙风爜
*/
- @ApiModelProperty("璇佷欢鍙风爜")
- @Excel(name = " 璇佷欢鍙风爜 ")
- private String idcardno;
-
- /**
- * 鐢熸棩
- */
- @ApiModelProperty("鐢熸棩")
- @JsonFormat(pattern = "yyyy-MM-dd")
- @Excel(name = " 鐢熸棩 ", width = 30, dateFormat = "yyyy-MM-dd")
- private Date birthdate;
-
- /**
- * 骞撮緞
- */
- @ApiModelProperty("骞撮緞")
- @Excel(name = " 骞撮緞 ")
- private Long age;
+ @ApiModelProperty("绫嶈疮")
+ @Excel(name = " 绫嶈疮 ")
+ private String nativePlace;
/**
@@ -82,6 +74,37 @@
@Excel(name = " 鍑虹敓鍦� ")
private String birthplace;
+
+ /**
+ * 璇佷欢鍙风爜
+ */
+ @ApiModelProperty("璇佷欢鍙风爜")
+ @Excel(name = " 璇佷欢鍙风爜 ")
+ private String idcardno;
+
+ /**
+ * 鐢熸棩
+ */
+ @ApiModelProperty("鐢熸棩")
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @Excel(name = " 鐢熸棩 " , width = 30, dateFormat = "yyyy-MM-dd")
+ private Date birthdate;
+
+ /**
+ * 鍏ラ櫌鏃堕棿
+ */
+ @ApiModelProperty("鍏ラ櫌鏃堕棿")
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @Excel(name = " 鐢熸棩 " , width = 30, dateFormat = "yyyy-MM-dd")
+ private Date inhosptime;
+
+ /**
+ * 骞撮緞
+ */
+ @ApiModelProperty("骞撮緞")
+ @Excel(name = " 骞撮緞 ")
+ private Long age;
+
/**
* 鏉ユ簮
*/
@@ -89,9 +112,6 @@
@Excel(name = " 鏉ユ簮 ")
private Long sourcefrom;
- /**
- * 寤烘。鏃堕棿
- */
/**
* 寤烘。鏃堕棿
*/
@@ -104,6 +124,7 @@
* 寤烘。浜�
*/
@ApiModelProperty("寤烘。浜�")
+ @Excel(name = " 寤烘。浜� ")
private String archiveby;
/**
@@ -113,17 +134,20 @@
@Excel(name = " 鎵嬫満鍙风爜 ")
private String telcode;
+
/**
* 浜插睘鍙风爜
*/
@ApiModelProperty("浜插睘鍙风爜")
+ @Excel(name = " 浜插睘鍙风爜 ")
private String relativetelcode;
/**
- * 璇佷欢绫诲瀷
+ * 姘戞棌
*/
- @ApiModelProperty("璇佷欢绫诲瀷")
- private String idcardtype;
+ @ApiModelProperty("姘戞棌")
+ @Excel(name = " 姘戞棌 ")
+ private String nation;
/**
* 鏈烘瀯ID
@@ -136,6 +160,7 @@
* 寰俊openid
*/
@ApiModelProperty("寰俊openid")
+ @Excel(name = " 寰俊openid ")
private String openid;
/**
@@ -160,10 +185,54 @@
* 鏍囩
*/
@ApiModelProperty("鏍囩")
+ @Excel(name = " 鏍囩 " , cellType = Excel.ColumnType.STRING)
private String tag;
+ /**
+ * 鏍囩
+ */
+ @ApiModelProperty("鏍囩id")
+ @Excel(name = " 鏍囩id " , cellType = Excel.ColumnType.STRING)
+ private Long tagid;
+
@ApiModelProperty("鏍囩闆嗗悎")
- List<PatArchivetag> tagList = new ArrayList<>();
+ private List<PatArchivetag> tagList;
+
+ /**
+ * 鏍囩
+ */
+ @ApiModelProperty("鎮h�呯被鍨�")
+ @Excel(name = " 鎮h�呯被鍨� " , cellType = Excel.ColumnType.STRING)
+ private String pattype;
+
+ /**
+ * 閽夐拤鍙�
+ */
+ @ApiModelProperty("閽夐拤鍙�")
+ @Excel(name = " 閽夐拤鍙� ")
+ private String dduserid;
+
+ /**
+ * 閽夐拤鍙�
+ */
+ @ApiModelProperty("绉戝")
+ @Excel(name = " 绉戝 ")
+ private String dept;
+
+
+ /**
+ * 閽夐拤鍙�
+ */
+ @ApiModelProperty("绉戝")
+ @Excel(name = " 绉戝 ")
+ private String bedNo;
+
+ /**
+ * 浼氬憳灞炴��:0闈炰細鍛橈紝1涓�鑸細鍛樸��2閲嶈浼氬憳
+ */
+ @ApiModelProperty("浼氬憳灞炴��:0闈炰細鍛橈紝1涓�鑸細鍛樸��2閲嶈浼氬憳")
+ @Excel(name = " 浼氬憳灞炴��:0闈炰細鍛橈紝1涓�鑸細鍛樸��2閲嶈浼氬憳 ")
+ private String viptype;
@ApiModelProperty(value = "鏄惁瀛樺湪鎿嶄綔锛�1 鏂板 2淇敼 3鍒犻櫎")
private Integer isoperation;
diff --git a/smartor/src/main/java/com/smartor/domain/PatMedInhosp.java b/smartor/src/main/java/com/smartor/domain/PatMedInhosp.java
index 155e1d0..587059d 100644
--- a/smartor/src/main/java/com/smartor/domain/PatMedInhosp.java
+++ b/smartor/src/main/java/com/smartor/domain/PatMedInhosp.java
@@ -256,4 +256,16 @@
@ApiModelProperty(value = "鎮h�呯紪鍙�")
private String patno;
+ /**
+ * 浣忛櫌鏍囪瘑锛� 0锛氬湪闄� 1锛氬嚭闄� 2锛氳浆绉�
+ */
+ @ApiModelProperty(value = "浣忛櫌鏍囪瘑锛� 0锛氬湪闄� 1锛氬嚭闄� 2锛氳浆绉�")
+ private String inhospstate;
+
+ /**
+ * 闀挎湡浠诲姟锛屾槸鍚﹀鐞嗭細0鏈鐞� 1澶勭悊
+ */
+ @ApiModelProperty(value = "闀挎湡浠诲姟锛屾槸鍚﹀鐞嗭細0鏈鐞� 1澶勭悊")
+ private String checkFlag;
+
}
diff --git a/smartor/src/main/java/com/smartor/domain/PhoneCallBackYQVO.java b/smartor/src/main/java/com/smartor/domain/PhoneCallBackYQVO.java
new file mode 100644
index 0000000..25643aa
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/domain/PhoneCallBackYQVO.java
@@ -0,0 +1,44 @@
+package com.smartor.domain;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * 鐢佃瘽ASR鍥炶皟(闆ㄧ划)
+ *
+ * @author ls
+ * @date 2024-08-8
+ */
+@Data
+public class PhoneCallBackYQVO {
+
+ /**
+ * 鍙互瀵瑰綋鍓嶉�氶亾鐨勯煶閲忚繘琛岄�傚綋璋冩暣,鍙栧�艰寖鍥淬��-4,4銆�
+ */
+ @ApiModelProperty(value = "鍙互瀵瑰綋鍓嶉�氶亾鐨勯煶閲忚繘琛岄�傚綋璋冩暣,鍙栧�艰寖鍥淬��-4,4銆�")
+ private Integer volume = 0;
+
+ /**
+ * 鍙互璋冩暣褰撳墠閫氳瘽鐨勯潤榛樺洖璋冮棿闅旀椂闂达紝鍗曚綅涓烘绉掞紝榛樿涓�3000
+ */
+ @ApiModelProperty(value = "鍙互璋冩暣褰撳墠閫氳瘽鐨勯潤榛樺洖璋冮棿闅旀椂闂达紝鍗曚綅涓烘绉掞紝榛樿涓�3000")
+ private Integer silent_interval = 5000;
+
+ /**
+ * 杩斿洖褰撳墠鐨勬搷浣滅被鍨�,鍏蜂綋绫诲瀷
+ * 绫诲瀷鍚� 锛歵ext 鎿嶄綔 锛氶煶涔愭挱鏀� 鎻忚堪锛氬綋鍓嶅皢鍝嶅簲闊充箰鍐呭鐨勬挱鏀�,鏀寔鏂囨湰銆佹湰鍦伴煶涔愯矾寰勬垨http闊充箰璺緞锛涢煶涔愬唴瀹规枃浠舵牸寮忔敮鎸亀av鍜宮p3
+ * 绫诲瀷鍚� 锛歨angup 鎿嶄綔 锛氭寕鏂搷浣� 鎻忚堪锛氭鏃跺鏋渧alue瀛樺湪鍊兼椂锛岃〃绀烘寕鏂粨鏉熻鐨勫唴瀹�
+ * 绫诲瀷鍚� 锛歛gent 鎿嶄綔 锛氳浆鎺ラ�氳瘽 鎻忚堪锛氬皢褰撳墠閫氳瘽杞帴鍒颁汉宸ュ骇甯紝value鍊间负搴у腑鍙锋垨澶栫嚎鍙风爜锛屽鏋滀负澶栫嚎鍙风爜鏃讹紝鍒欓渶瑕佽惤鍦扮嚎璺敮鎸佸苟鍙戝懠鍙紝鍚﹀垯灏嗗懠鍙け璐ャ�傝鎿嶄綔鏀寔鍦ㄨ浆鎺ユ椂鎾斁闊充箰锛屽瓧娈典负music,濡傛灉瀛樺湪璇ュ瓧娈靛唴瀹规椂锛屽垯琛ㄧず涓鸿浆鎺ユ椂鍚戝绔挱鏀剧殑闊充箰鍐呭
+ * 绫诲瀷鍚� 锛歛nswer 鎿嶄綔 锛氬簲绛旈�氳瘽 鎻忚堪锛氬閫氳瘽鎵ц搴旂瓟鎿嶄綔锛屼簺鎿嶄綔閫傜敤浜庡懠鍏ユ椂棣栨璇锋眰鐨勫搷搴�
+ * 绫诲瀷鍚� 锛歜reakoff 鎿嶄綔 锛氫腑鏂挱鏀� 鎻忚堪锛氬褰撳墠姝e湪鎾斁鐨勯煶涔愯祫婧愶紝鎵ц鍋滄鎿嶄綔
+ */
+ @ApiModelProperty(value = "杩斿洖褰撳墠鐨勬搷浣滅被鍨�,鍏蜂綋绫诲瀷璇峰弬鑰冨悗璇昏鏄�")
+ private String type;
+
+ /**
+ * 涓嶅悓鎿嶄綔绫诲瀷鎵�瀵瑰簲鐨勫弬鏁板��
+ */
+ @ApiModelProperty(value = "涓嶅悓鎿嶄綔绫诲瀷鎵�瀵瑰簲鐨勫弬鏁板��")
+ private String value;
+
+}
diff --git a/smartor/src/main/java/com/smartor/domain/PhoneCallReqYQVO.java b/smartor/src/main/java/com/smartor/domain/PhoneCallReqYQVO.java
new file mode 100644
index 0000000..f1fab10
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/domain/PhoneCallReqYQVO.java
@@ -0,0 +1,131 @@
+package com.smartor.domain;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * 鐢佃瘽ASR鍥炶皟璇锋眰(闆ㄧ划)
+ *
+ * @author ls
+ * @date 2024-08-8
+ */
+@Data
+public class PhoneCallReqYQVO {
+
+ @ApiModelProperty(value = "浠诲姟缂栧彿(杩欓噷瀛樺湪鐨勫氨鏄痵ubtaskID)")
+ private String taskid;
+
+ // UUID
+ @ApiModelProperty(value = "uuid")
+ private String uuid;
+
+
+ /**
+ * 褰撳墠鍛煎彨鐨勭洰鏍囧彿鐮�
+ */
+ @ApiModelProperty(value = "褰撳墠鍛煎彨鐨勭洰鏍囧彿鐮�")
+ private String phone;
+
+ /**
+ * 褰撳墠鍥炶皟鐨勮姹傜被鍨嬶紝鍖呮嫭锛欰srCallback: ASR鏂囨湰鍥炶皟 DtmfCallback:鏀跺埌鎸夐敭鍥炶皟 SilentCallback:闈欓粯鍥炶皟 PlayEvent:闊充箰鎾斁寮�濮嬨�佺粨鏉熶簨浠跺洖璋�
+ */
+ @ApiModelProperty(value = "褰撳墠鍥炶皟鐨勮姹傜被鍨嬶紝鍖呮嫭锛欰srCallback: ASR鏂囨湰鍥炶皟 DtmfCallback:鏀跺埌鎸夐敭鍥炶皟 SilentCallback:闈欓粯鍥炶皟 PlayEvent:闊充箰鎾斁寮�濮嬨�佺粨鏉熶簨浠跺洖璋�")
+ private String operate;
+
+ /**
+ * 褰撳墠鍛煎彨鏃朵娇鐢ㄧ殑澶栨樉鍙风爜
+ */
+ @ApiModelProperty(value = "褰撳墠鍛煎彨鏃朵娇鐢ㄧ殑澶栨樉鍙风爜")
+ private String displayno;
+
+ /**
+ * 鏄惁鍛煎叆閫氳瘽
+ */
+ @ApiModelProperty(value = "鏄惁鍛煎叆閫氳瘽")
+ private Boolean inbound = false;
+
+ /**
+ * 鏄惁鍛煎叆閫氳瘽
+ */
+ @ApiModelProperty(value = "鏄惁涓哄懠鍏ヨ姹傛搷浣�")
+ private Boolean incoming = false;
+
+ /**
+ * 鍒嗛厤鏃堕棿,鍛煎叆鏃朵负0
+ */
+ @ApiModelProperty(value = "鍒嗛厤鏃堕棿,鍛煎叆鏃朵负0")
+ private Long assigntime;
+
+ /**
+ * 寮�濮嬫椂闂达紝濡傛灉鍛煎叆鐨勫垯涓哄懠鍏ュ紑濮嬫椂闂�
+ */
+ @ApiModelProperty(value = "寮�濮嬫椂闂达紝濡傛灉鍛煎叆鐨勫垯涓哄懠鍏ュ紑濮嬫椂闂�")
+ private Long starttime;
+
+ /**
+ * 搴旂瓟鏃堕棿
+ */
+ @ApiModelProperty(value = "搴旂瓟鏃堕棿")
+ private Long answertime;
+
+ /**
+ * 鏍囪瘑褰撳墠鏄惁涓洪潤榛樺洖璋�
+ */
+ @ApiModelProperty(value = "鏍囪瘑褰撳墠鏄惁涓洪潤榛樺洖璋�")
+ private Boolean silent = false;
+
+ /**
+ * 鏀跺埌鐨勬寜閿唴瀹�
+ */
+ @ApiModelProperty(value = "鏀跺埌鐨勬寜閿唴瀹�")
+ private String dtmf_key;
+
+ /**
+ * 闊充箰鎾斁鎴栧仠姝㈡椂鐩稿叧闊充箰鍚嶇О
+ */
+ @ApiModelProperty(value = "闊充箰鎾斁鎴栧仠姝㈡椂鐩稿叧闊充箰鍚嶇О")
+ private String musicpath;
+
+ /**
+ * 褰撳墠鍙ュ瓙鐨勭储寮曞彿
+ */
+ @ApiModelProperty(value = "褰撳墠鍙ュ瓙鐨勭储寮曞彿")
+ private Integer sent_index;
+
+ /**
+ * 褰撳墠鏄惁涓鸿璇濆紑濮�
+ */
+ @ApiModelProperty(value = "褰撳墠鏄惁涓鸿璇濆紑濮�")
+ private Boolean sent_begin;
+
+ /**
+ * 褰撳墠鏀跺埌鐨凙SR璇嗗埆鏂囨湰
+ */
+ @ApiModelProperty(value = "褰撳墠鏀跺埌鐨凙SR璇嗗埆鏂囨湰")
+ private String asrtext;
+
+ /**
+ * 褰撳墠asr鏂囨湰閫氳瘽寮�濮嬫椂闂寸偣锛屾绉掓暟
+ */
+ @ApiModelProperty(value = "褰撳墠asr鏂囨湰閫氳瘽寮�濮嬫椂闂寸偣锛屾绉掓暟")
+ private Long begin_time;
+
+ /**
+ * 褰撳墠asr鏂囨湰鎵�澶勭粨鏉熸椂闂寸偣锛屾绉掓暟锛屽綋鍓嶆枃鏈笉鏄彞瀛愮粨鏉熸椂锛屽垯涓�-1
+ */
+ @ApiModelProperty(value = "褰撳墠asr鏂囨湰鎵�澶勭粨鏉熸椂闂寸偣锛屾绉掓暟锛屽綋鍓嶆枃鏈笉鏄彞瀛愮粨鏉熸椂锛屽垯涓�-1")
+ private Long end_time;
+
+ /**
+ * 鏍囪瘑褰撳墠鏄惁涓哄彞瀛愮粨鏉�
+ */
+ @ApiModelProperty(value = "鏍囪瘑褰撳墠鏄惁涓哄彞瀛愮粨鏉�")
+ private Boolean send_end = false;
+
+ /**
+ * 褰撳墠鍙ュ瓙鐨勫綍闊虫枃浠惰矾寰勶紝鍙ュ瓙鏈粨鏉熸椂涓虹┖
+ */
+ @ApiModelProperty(value = "褰撳墠鍙ュ瓙鐨勫綍闊虫枃浠惰矾寰勶紝鍙ュ瓙鏈粨鏉熸椂涓虹┖")
+ private String recordpath;
+
+}
diff --git a/smartor/src/main/java/com/smartor/domain/PhoneRecordAccept.java b/smartor/src/main/java/com/smartor/domain/PhoneRecordAccept.java
new file mode 100644
index 0000000..9ff3d7c
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/domain/PhoneRecordAccept.java
@@ -0,0 +1,84 @@
+package com.smartor.domain;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * 鐢佃瘽ASR鍥炶皟璇锋眰(闆ㄧ划)
+ *
+ * @author ls
+ * @date 2024-08-8
+ */
+@Data
+public class PhoneRecordAccept {
+
+ @ApiModelProperty(value = "浠诲姟缂栧彿(杩欓噷瀛樺湪鐨勫氨鏄痵ubtaskID)")
+ private String taskid;
+
+ // UUID
+ @ApiModelProperty(value = "uuid")
+ private String uuid;
+
+
+ /**
+ * 褰撳墠鍛煎彨鐨勭洰鏍囧彿鐮�
+ */
+ @ApiModelProperty(value = "褰撳墠鍛煎彨鐨勭洰鏍囧彿鐮�")
+ private String phone;
+
+
+ /**
+ * 褰撳墠鍛煎彨鏃朵娇鐢ㄧ殑澶栨樉鍙风爜
+ */
+ @ApiModelProperty(value = "褰撳墠鍛煎彨鏃朵娇鐢ㄧ殑澶栨樉鍙风爜")
+ private String displayno;
+
+ /**
+ * 鏃╂湡鐨凙SR璇嗗埆鏂囨湰
+ */
+ private String early_asrtext;
+
+ /**
+ * 鍒嗛厤鏃堕棿,13浣島nix鏃堕棿鎴�
+ */
+ @ApiModelProperty(value = "鍒嗛厤鏃堕棿,13浣島nix鏃堕棿鎴�")
+ private Long assign_time;
+
+ /**
+ * 寮�濮嬫椂闂达紝濡傛灉鍛煎叆鐨勫垯涓哄懠鍏ュ紑濮嬫椂闂�
+ */
+ @ApiModelProperty(value = "寮�濮嬫椂闂达紝濡傛灉鍛煎叆鐨勫垯涓哄懠鍏ュ紑濮嬫椂闂�")
+ private Long start_time;
+
+ /**
+ * 搴旂瓟鏃堕棿
+ */
+ @ApiModelProperty(value = "搴旂瓟鏃堕棿")
+ private Long answer_time;
+
+ /**
+ * 鎸傛柇鏃堕棿
+ */
+ @ApiModelProperty(value = "鎸傛柇鏃堕棿")
+ private Long hangup_time;
+
+ /**
+ * 缁撴潫鏃堕棿
+ */
+ @ApiModelProperty(value = "缁撴潫鏃堕棿")
+ private Long end_time;
+
+ /**
+ * 鎸傛満鏃剁殑sip浠g爜鍊�
+ */
+ @ApiModelProperty(value = "鎸傛満鏃剁殑sip浠g爜鍊�")
+ private String hangup_sipcode;
+
+ /**
+ * 鎸傛満鍘熷洜瀛楃涓�
+ */
+ @ApiModelProperty(value = "鎸傛満鍘熷洜瀛楃涓�")
+ private String hangup_cause;
+
+
+}
diff --git a/smartor/src/main/java/com/smartor/domain/PullTaskVO.java b/smartor/src/main/java/com/smartor/domain/PullTaskVO.java
new file mode 100644
index 0000000..a29bfc6
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/domain/PullTaskVO.java
@@ -0,0 +1,71 @@
+package com.smartor.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 闆ㄧ划鐢佃瘽浠诲姟鎷夊彇 PullTaskVO
+ *
+ * @author ls
+ * @date 2024-08-07
+ */
+@Data
+@ApiModel(value = "PullTaskVO" , description = "闆ㄧ划鐢佃瘽浠诲姟鎷夊彇")
+public class PullTaskVO {
+
+ /**
+ * 浠诲姟ID
+ */
+ @ApiModelProperty(value = "浠诲姟ID")
+ private String taskid;
+
+ /**
+ * 浠诲姟id
+ */
+ @Excel(name = "鏈换鍔¢渶瑕佹挱鏀剧殑寮�鍦虹櫧")
+ @ApiModelProperty(value = "鏈换鍔¢渶瑕佹挱鏀剧殑寮�鍦虹櫧")
+ private String prologue;
+
+ /**
+ * 鍛煎彨鏃堕棿娈�,浠m-hh:mm鏍煎紡璁剧疆,鎸夊垎 鍙峰垎闅斿涓椂闂存,鏀寔鎸夋槦鏈熷垎娈�,1=8:00-12:30;
+ */
+ @Excel(name = "鍛煎彨鏃堕棿娈�,浠m-hh:mm鏍煎紡璁剧疆,鎸夊垎 鍙峰垎闅斿涓椂闂存,鏀寔鎸夋槦鏈熷垎娈�,1=8:00-12:30;")
+ @ApiModelProperty(value = "鍛煎彨鏃堕棿娈�,浠m-hh:mm鏍煎紡璁剧疆,鎸夊垎 鍙峰垎闅斿涓椂闂存,鏀寔鎸夋槦鏈熷垎娈�,1=8:00-12:30;")
+ private String sections;
+
+
+ /**
+ * 鏈浠诲姟鎵�浣跨敤鐨勯粯璁ゅ鏄惧彿鐮侊紝鐢ㄤ簬鍖归厤缃戝叧
+ */
+ @Excel(name = "鏈浠诲姟鎵�浣跨敤鐨勯粯璁ゅ鏄惧彿鐮侊紝鐢ㄤ簬鍖归厤缃戝叧")
+ @ApiModelProperty(value = "鏈浠诲姟鎵�浣跨敤鐨勯粯璁ゅ鏄惧彿鐮侊紝鐢ㄤ簬鍖归厤缃戝叧")
+ private String displayNo;
+
+ /**
+ * 闃块噷浜戝笎鍙穉ppkey鎴栭摑绠�,濡傛灉瀛樺湪璇ュ��,鍒欎粠鏈湴閰嶇疆鐨勯樋閲屼簯profile涓尮閰嶉�夋嫨,濡傛灉鏈缃垨鍖归厤涓嶅埌,鍒欎娇鐢ㄩ粯璁ょ1涓笎鍙�
+ */
+ @Excel(name = "闃块噷浜戝笎鍙穉ppkey鎴栭摑绠�,濡傛灉瀛樺湪璇ュ��,鍒欎粠鏈湴閰嶇疆鐨勯樋閲屼簯profile涓尮閰嶉�夋嫨,濡傛灉鏈缃垨鍖归厤涓嶅埌,鍒欎娇鐢ㄩ粯璁ょ1涓笎鍙�")
+ @ApiModelProperty(value = "闃块噷浜戝笎鍙穉ppkey鎴栭摑绠�,濡傛灉瀛樺湪璇ュ��,鍒欎粠鏈湴閰嶇疆鐨勯樋閲屼簯profile涓尮閰嶉�夋嫨,濡傛灉鏈缃垨鍖归厤涓嶅埌,鍒欎娇鐢ㄩ粯璁ょ1涓笎鍙�")
+ private String appkey;
+
+ /**
+ * 鏈浠诲姟闇�瑕佸鍛肩殑鍙风爜娓呭崟锛岃�冭檻缃戝叧鐨勫苟鍙戣兘鍔涳紝寤鸿鍙风爜鏁伴噺涓哄苟鍙戞暟鐨�3~5鍊�,濡傛灉鏈瓧娈电被鍨嬩负瀛楃涓诧紝鍒欎互鍒嗗彿浣滀负澶氫釜鍙风爜涔嬪墠鐨勫垎闅旂
+ */
+ @Excel(name = "鏈浠诲姟闇�瑕佸鍛肩殑鍙风爜娓呭崟锛岃�冭檻缃戝叧鐨勫苟鍙戣兘鍔涳紝寤鸿鍙风爜鏁伴噺涓哄苟鍙戞暟鐨�3~5鍊�,濡傛灉鏈瓧娈电被鍨嬩负瀛楃涓诧紝鍒欎互鍒嗗彿浣滀负澶氫釜鍙风爜涔嬪墠鐨勫垎闅旂")
+ @ApiModelProperty(value = "鏈浠诲姟闇�瑕佸鍛肩殑鍙风爜娓呭崟锛岃�冭檻缃戝叧鐨勫苟鍙戣兘鍔涳紝寤鸿鍙风爜鏁伴噺涓哄苟鍙戞暟鐨�3~5鍊�,濡傛灉鏈瓧娈电被鍨嬩负瀛楃涓诧紝鍒欎互鍒嗗彿浣滀负澶氫釜鍙风爜涔嬪墠鐨勫垎闅旂")
+ private String phones;
+
+ /**
+ * 鎸囧畾asr鐨剈rl璺緞锛堣繖涓矾寰勯渶瑕佹垜浠繖杈规彁渚涳紝鍏ュ弬鍙互鍙傝�冩枃妗o級
+ */
+ @ApiModelProperty(value = " 鎸囧畾asr鐨剈rl璺緞锛堣繖涓矾寰勯渶瑕佹垜浠繖杈规彁渚涳紝鍏ュ弬鍙互鍙傝�冩枃妗o級")
+ private String asrcallback = "http://35z1t16164.qicp.vip/smartor/serviceSubtask/phoneCallBackYQ";
+}
diff --git a/smartor/src/main/java/com/smartor/domain/SendMagParam.java b/smartor/src/main/java/com/smartor/domain/SendMagParam.java
index 60132b3..7f9ef6e 100644
--- a/smartor/src/main/java/com/smartor/domain/SendMagParam.java
+++ b/smartor/src/main/java/com/smartor/domain/SendMagParam.java
@@ -19,4 +19,6 @@
private String url;
private String openid;
+
+ private String idcard;
}
diff --git a/smartor/src/main/java/com/smartor/domain/ServiceSubTaskAnswerReq.java b/smartor/src/main/java/com/smartor/domain/ServiceSubTaskAnswerReq.java
index e48460d..6737d88 100644
--- a/smartor/src/main/java/com/smartor/domain/ServiceSubTaskAnswerReq.java
+++ b/smartor/src/main/java/com/smartor/domain/ServiceSubTaskAnswerReq.java
@@ -22,7 +22,9 @@
@ApiModelProperty(value = "鎮h�匢D")
private String param2;
- @ApiModelProperty(value = "璇曞嵎绫诲瀷:1 闅忚 2 闂嵎")
- private Integer type;
+// @ApiModelProperty(value = "璇曞嵎绫诲瀷:1 闅忚 2 闂嵎")
+// private Integer type;
+ @ApiModelProperty(value = "闂缁撴灉璇︽儏")
+ private List<ServiceSubtaskDetail> serviceSubtaskDetailList;
}
diff --git a/smartor/src/main/java/com/smartor/domain/ServiceSubtask.java b/smartor/src/main/java/com/smartor/domain/ServiceSubtask.java
index f9b6605..6fab3a3 100644
--- a/smartor/src/main/java/com/smartor/domain/ServiceSubtask.java
+++ b/smartor/src/main/java/com/smartor/domain/ServiceSubtask.java
@@ -17,7 +17,7 @@
*/
@ApiModel(value = "ServiceSubtask", description = "鍗曚竴闅忚浠诲姟")
@Data
-public class ServiceSubtask extends BaseEntity {
+public class ServiceSubtask extends PatArchive {
private static final long serialVersionUID = 1L;
/**
@@ -409,4 +409,11 @@
private String libtemplatename;
+ /**
+ * 闀挎湡浠诲姟锛岀粰鎮h�呭彂閫佺殑鏃堕棿
+ */
+ @Excel(name = " 闀挎湡浠诲姟锛岀粰鎮h�呭彂閫佺殑鏃堕棿")
+ @ApiModelProperty(value = "闀挎湡浠诲姟锛岀粰鎮h�呭彂閫佺殑鏃堕棿")
+ private Date longSendTime;
+
}
diff --git a/smartor/src/main/java/com/smartor/domain/ServiceSubtaskDetail.java b/smartor/src/main/java/com/smartor/domain/ServiceSubtaskDetail.java
index 3b4c2f4..8475762 100644
--- a/smartor/src/main/java/com/smartor/domain/ServiceSubtaskDetail.java
+++ b/smartor/src/main/java/com/smartor/domain/ServiceSubtaskDetail.java
@@ -28,6 +28,9 @@
@ApiModelProperty(value = "瀛愪换鍔D")
private Long subId;
+ @ApiModelProperty(value = "瀛愪换鍔D")
+ private Long taskid;
+
@ApiModelProperty(value = "鎷ㄥ彿uuid")
private String uuid;
@@ -147,4 +150,17 @@
private String valueType;
+ @ApiModelProperty(value = "闂绫诲瀷")
+ private Long scriptid;
+
+ @ApiModelProperty(value = "閫夐」绛旀鐨勯檮鍔犱俊鎭�")
+ private String answerps;
+
+ @ApiModelProperty(value = "瀵圭瓟妗堢殑璇勮")
+ private String comment;
+
+ @ApiModelProperty(value = "鎮h�匢D")
+ private Long patid;
+
+
}
diff --git a/smartor/src/main/java/com/smartor/domain/ServiceSubtaskDetailVO.java b/smartor/src/main/java/com/smartor/domain/ServiceSubtaskDetailVO.java
new file mode 100644
index 0000000..e308b4d
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/domain/ServiceSubtaskDetailVO.java
@@ -0,0 +1,165 @@
+package com.smartor.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 璇煶浠诲姟鍛煎彨鏄庣粏瀵硅薄 ivr_taskcalldetail
+ *
+ * @author smartor
+ * @date 2023-03-24
+ */
+@Data
+@ApiModel(value = "ServiceSubtaskDetail", description = "闂鍥炵瓟鏄庣粏")
+public class ServiceSubtaskDetailVO extends BaseEntity {
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty(value = "涓婚敭")
+ private String id;
+
+ @ApiModelProperty(value = "瀛愪换鍔D")
+ private Long subId;
+
+ @ApiModelProperty(value = "瀛愪换鍔D")
+ private Long taskid;
+
+ @ApiModelProperty(value = "鎷ㄥ彿uuid")
+ private String uuid;
+
+ @ApiModelProperty(value = "鐢佃瘽鍙风爜")
+ private String phone;
+
+ @ApiModelProperty(value = "鎿嶄綔浜� ")
+ private String operate;
+
+ @ApiModelProperty(value = "鏄剧ず鍙风爜")
+ private String displayno;
+
+ @ApiModelProperty(value = "")
+ private Long inbound;
+
+ @ApiModelProperty(value = "")
+ private Long incoming;
+
+ @ApiModelProperty(value = "")
+ private Long assigntime;
+
+ @ApiModelProperty(value = "寮�濮嬫椂闂�")
+ private Long starttime;
+
+ @ApiModelProperty(value = "鍥炵瓟鏃堕棿")
+ private Long answertime;
+
+ @ApiModelProperty(value = "")
+ private Long silent;
+
+ @ApiModelProperty(value = "")
+ private String dtmfKey;
+
+ @ApiModelProperty(value = "闊充箰璺緞")
+ private String musicpath;
+
+ @ApiModelProperty(value = "鍙戦�佺储寮�")
+ private Long sentIndex;
+
+ @ApiModelProperty(value = "鍙戦�佸紑濮嬬姸鎬�")
+ private Long sentBegin;
+
+ @ApiModelProperty(value = "鍥炵瓟缁撴灉")
+ private String asrtext;
+
+ @ApiModelProperty(value = "寮�濮嬫椂闂�")
+ private Long beginTime;
+
+ @ApiModelProperty(value = "缁撴潫鏃堕棿")
+ private Long endTime;
+
+ @ApiModelProperty(value = "鍙戦�佺粨鏉熺姸鎬�")
+ private Long sentEnd;
+
+ @ApiModelProperty(value = "鎻愪氦璺緞")
+ private String recordpath;
+
+ @ApiModelProperty(value = "鎻愪氦URL")
+ private String recordurl;
+
+ @ApiModelProperty(value = "妯℃澘ID")
+ private String templateid;
+
+ @ApiModelProperty(value = "妯℃澘闂缂栧彿")
+ private Long templatequestionnum;
+
+
+ @ApiModelProperty(value = "浜ゆ崲鏈篒D")
+ private Long switchid;
+
+ @ApiModelProperty(value = "闂鏂囨湰")
+ private String questiontext;
+
+
+ @ApiModelProperty(value = "闂璇煶")
+ private String questionvoice;
+
+
+ @ApiModelProperty(value = "绫诲埆")
+ private String categoryname;
+
+
+ @ApiModelProperty(value = "鎸囨爣閫夐」")
+ private String targetoptions;
+
+
+ @ApiModelProperty(value = "鎸囨爣鍊硷紙姝e垯鍖归厤鐨勯�夐」鍊硷級")
+ private String targetvalue;
+
+
+ @ApiModelProperty(value = "閫氳繃姝e垯瑙f瀽鐨勫��")
+ private String matchedtext;
+
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @Excel(name = " ", width = 30, dateFormat = "yyyy-MM-dd")
+ @ApiModelProperty(value = "娣诲姞鏃堕棿")
+ private Date addtime;
+
+
+ @ApiModelProperty(value = "涓婁紶鏍囪")
+ private Long isupload;
+
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @Excel(name = " 涓婁紶鏃堕棿 ", width = 30, dateFormat = "yyyy-MM-dd")
+ @ApiModelProperty(value = "涓婁紶鏃堕棿")
+ private Date uploadTime;
+
+
+ @ApiModelProperty(value = "鏈烘瀯ID")
+ private String orgid;
+
+
+ @ApiModelProperty(value = "鍒犻櫎鏍囪")
+ private String delFlag;
+
+ @ApiModelProperty(value = "闂绫诲瀷")
+ private String valueType;
+
+
+ @ApiModelProperty(value = "闂绫诲瀷")
+ private Long scriptid;
+
+ @ApiModelProperty(value = "閫夐」绛旀鐨勯檮鍔犱俊鎭�")
+ private String answerps;
+
+ @ApiModelProperty(value = "瀵圭瓟妗堢殑璇勮")
+ private String comment;
+
+ @ApiModelProperty(value = "鎮h�匢D")
+ private Long patid;
+
+ private List<SvyTaskTemplateTargetoption> svyTaskTemplateTargetoptions;
+}
diff --git a/smartor/src/main/java/com/smartor/domain/ServiceTask.java b/smartor/src/main/java/com/smartor/domain/ServiceTask.java
index f251ef0..fc7665e 100644
--- a/smartor/src/main/java/com/smartor/domain/ServiceTask.java
+++ b/smartor/src/main/java/com/smartor/domain/ServiceTask.java
@@ -15,7 +15,7 @@
* @author smartor
* @date 2023-03-24
*/
-@ApiModel(value = "ServiceTask", description = "浠诲姟瀵硅薄")
+@ApiModel(value = "ServiceTask" , description = "浠诲姟瀵硅薄")
@Data
public class ServiceTask extends BaseEntity {
private static final long serialVersionUID = 1L;
@@ -119,18 +119,18 @@
*
*/
@JsonFormat(pattern = "yyyy-MM-dd")
- @Excel(name = " ", width = 30, dateFormat = "yyyy-MM-dd")
+ @Excel(name = " " , width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty(value = "娣诲姞鏃堕棿")
private Date addtime;
@JsonFormat(pattern = "yyyy-MM-dd")
- @Excel(name = " ", width = 30, dateFormat = "yyyy-MM-dd")
+ @Excel(name = " " , width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty(value = "寮�濮嬫椂闂�")
private Date beginTime;
@JsonFormat(pattern = "yyyy-MM-dd")
- @Excel(name = " ", width = 30, dateFormat = "yyyy-MM-dd")
+ @Excel(name = " " , width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty(value = "缁撴潫鏃堕棿")
private Date endTime;
@@ -152,16 +152,23 @@
* 瀹℃牳浜烘椂闂�
*/
@JsonFormat(pattern = "yyyy-MM-dd")
- @Excel(name = " ", width = 30, dateFormat = "yyyy-MM-dd")
+ @Excel(name = " " , width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty(value = "瀹℃牳浜烘椂闂�")
private Date checktime;
/**
- * "1锛岄殢璁匡紱2锛岄棶鍗凤紱3.瀹f暀锛�
+ * 浠诲姟绫诲瀷:1銆佺洃娴嬭瘎浼�;2銆佸嚭闄㈤殢璁�;3銆侀棬璇婇殢璁�
*/
- @Excel(name = "1锛岄殢璁匡紱2锛岄棶鍗凤紱3.瀹f暀锛� ")
- @ApiModelProperty(value = "1锛岄殢璁匡紱2锛岄棶鍗凤紱3.瀹f暀锛�")
+ @Excel(name = "浠诲姟绫诲瀷(閫氱煡銆侀棶鍗枫�佹満鍣ㄤ汉璇煶)")
+ @ApiModelProperty(value = "浠诲姟绫诲瀷(閫氱煡銆侀棶鍗枫�佹満鍣ㄤ汉璇煶)")
private String type;
+
+ /**
+ * 鏈嶅姟绫诲瀷(1銆佺洃娴嬭瘎浼帮紱2銆佸嚭闄㈤殢璁匡紱3銆侀棬璇婇殢璁匡紱4銆佸鏁欏叧鎬�锛�5銆佸璇婇�氱煡锛�6銆佹弧鎰忓害璋冩煡锛�7銆佹偅鑰呮姤鍛婏紱 8銆佸叾浠栭�氱煡)
+ */
+ @Excel(name = "鏈嶅姟绫诲瀷(1銆佺洃娴嬭瘎浼帮紱2銆佸嚭闄㈤殢璁匡紱3銆侀棬璇婇殢璁匡紱4銆佸鏁欏叧鎬�锛�5銆佸璇婇�氱煡锛�6銆佹弧鎰忓害璋冩煡锛�7銆佹偅鑰呮姤鍛婏紱 8銆佸叾浠栭�氱煡)")
+ @ApiModelProperty(value = "鏈嶅姟绫诲瀷(1銆佺洃娴嬭瘎浼帮紱2銆佸嚭闄㈤殢璁匡紱3銆侀棬璇婇殢璁匡紱4銆佸鏁欏叧鎬�锛�5銆佸璇婇�氱煡锛�6銆佹弧鎰忓害璋冩煡锛�7銆佹偅鑰呮姤鍛婏紱 8銆佸叾浠栭�氱煡)")
+ private String serviceType;
/**
* 绫诲瀷鍚嶇О
@@ -169,7 +176,6 @@
@Excel(name = "绫诲瀷鍚嶇О")
@ApiModelProperty(value = "绫诲瀷鍚嶇О")
private String typename;
-
/**
* 绫诲瀷鍚嶇О
@@ -223,7 +229,7 @@
* 涓婁紶鏃堕棿
*/
@JsonFormat(pattern = "yyyy-MM-dd")
- @Excel(name = " 涓婁紶鏃堕棿 ", width = 30, dateFormat = "yyyy-MM-dd")
+ @Excel(name = " 涓婁紶鏃堕棿 " , width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty(value = "涓婁紶鏃堕棿")
private Date uploadTime;
@@ -256,10 +262,10 @@
private String preachform;
/**
- * 鍙戦�佺被鍨�: 1鎸囧畾鏃堕棿鍙戦�� 2鍗冲埢鍙戦��
+ * 鍙戦�佺被鍨�: 1鎸囧畾鏃堕棿娈靛彂閫� 2鍗冲埢鍙戦�� 3鏃堕棿鐐�
*/
- @Excel(name = " 鍙戦�佺被鍨�: 1鎸囧畾鏃堕棿鍙戦�� 2鍗冲埢鍙戦�� ")
- @ApiModelProperty(value = "鍙戦�佺被鍨�: 1鎸囧畾鏃堕棿鍙戦�� 2鍗冲埢鍙戦�� 3鏃堕棿鐐�")
+ @Excel(name = " 鍙戦�佺被鍨�: 1鎸囧畾鏃堕棿娈靛彂閫� 2鍗冲埢鍙戦�� 3鏃堕棿鐐�")
+ @ApiModelProperty(value = "鍙戦�佺被鍨�: 1鎸囧畾鏃堕棿娈靛彂閫� 2鍗冲埢鍙戦�� 3鏃堕棿鐐�")
private Long sendType;
/**
@@ -289,6 +295,12 @@
private Integer pageSize;
/**
+ * pageSize
+ */
+ @ApiModelProperty("鏄惁鏄暱鏈熶换鍔� 0锛氫笉鏄� 1锛氭槸")
+ private Integer longTask;
+
+ /**
* 灏辫瘖绫诲瀷锛�1闂ㄨ瘖 2鍑洪櫌锛�
*/
@Excel(name = " 灏辫瘖绫诲瀷锛�1闂ㄨ瘖 2鍑洪櫌锛�")
diff --git a/smartor/src/main/java/com/smartor/domain/ServiceTaskVO.java b/smartor/src/main/java/com/smartor/domain/ServiceTaskVO.java
index ec869a0..5d9191c 100644
--- a/smartor/src/main/java/com/smartor/domain/ServiceTaskVO.java
+++ b/smartor/src/main/java/com/smartor/domain/ServiceTaskVO.java
@@ -144,9 +144,9 @@
private Date checktime;
/**
- * 1锛屽嚭闄㈤殢璁匡紱2锛屼綋妫�閫氱煡锛�3锛屾弧鎰忓害璋冩煡锛�4锛屽鏁欙紱
+ * 浠诲姟绫诲瀷(閫氱煡銆侀棶鍗枫�佹満鍣ㄤ汉璇煶)
*/
- @Excel(name = " 1锛屽嚭闄㈤殢璁匡紱2锛屼綋妫�閫氱煡锛�3锛屾弧鎰忓害璋冩煡锛�4锛屽鏁欙紱 ")
+ @Excel(name = " 浠诲姟绫诲瀷(閫氱煡銆侀棶鍗枫�佹満鍣ㄤ汉璇煶) ")
private String type;
/**
@@ -282,5 +282,12 @@
@ApiModelProperty(value = "灞曠ず鏃ユ湡")
private String showDate;
+ /**
+ * 鏈嶅姟绫诲瀷(1銆佺洃娴嬭瘎浼帮紱2銆佸嚭闄㈤殢璁匡紱3銆侀棬璇婇殢璁匡紱4銆佸鏁欏叧鎬�锛�5銆佸璇婇�氱煡锛�6銆佹弧鎰忓害璋冩煡锛�7銆佹偅鑰呮姤鍛婏紱 8銆佸叾浠栭�氱煡)
+ */
+ @Excel(name = "鏈嶅姟绫诲瀷(1銆佺洃娴嬭瘎浼帮紱2銆佸嚭闄㈤殢璁匡紱3銆侀棬璇婇殢璁匡紱4銆佸鏁欏叧鎬�锛�5銆佸璇婇�氱煡锛�6銆佹弧鎰忓害璋冩煡锛�7銆佹偅鑰呮姤鍛婏紱 8銆佸叾浠栭�氱煡)")
+ @ApiModelProperty(value = "鏈嶅姟绫诲瀷(1銆佺洃娴嬭瘎浼帮紱2銆佸嚭闄㈤殢璁匡紱3銆侀棬璇婇殢璁匡紱4銆佸鏁欏叧鎬�锛�5銆佸璇婇�氱煡锛�6銆佹弧鎰忓害璋冩煡锛�7銆佹偅鑰呮姤鍛婏紱 8銆佸叾浠栭�氱煡)")
+ private String serviceType;
+
}
diff --git a/smartor/src/main/java/com/smartor/domain/SvyTaskTemplate.java b/smartor/src/main/java/com/smartor/domain/SvyTaskTemplate.java
index 7f9eb93..0a4a76f 100644
--- a/smartor/src/main/java/com/smartor/domain/SvyTaskTemplate.java
+++ b/smartor/src/main/java/com/smartor/domain/SvyTaskTemplate.java
@@ -88,7 +88,7 @@
*/
@Excel(name = " 鐗堟湰 ")
@ApiModelProperty(value = "鐗堟湰")
- private BigDecimal version;
+ private String version;
/**
* 涓績搴撲唬鐮�
@@ -231,7 +231,6 @@
@ApiModelProperty(value = "缁撴潫璇�")
private String conclusion;
-
}
diff --git a/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScriptVO.java b/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScriptVO.java
index 06514fe..deda792 100644
--- a/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScriptVO.java
+++ b/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScriptVO.java
@@ -140,9 +140,9 @@
private String targetOptions;
/**
- * 鍩虹鎸囨爣绫诲瀷锛�1 閫夐」 2 鏂囨湰 3 鏁板�硷級
+ * 棰樼洰绫诲瀷;鏋氫妇 1.鍗曢�� 2澶氶�� 3濉┖ 4鍏跺畠
*/
- @ApiModelProperty(value = "鍩虹鎸囨爣绫诲瀷 1=閫夐」,2=鏂囨湰,3=鏁板��")
+ @ApiModelProperty(value = "棰樼洰绫诲瀷;鏋氫妇 1.鍗曢�� 2澶氶�� 3濉┖ 4鍏跺畠")
private String scriptType;
/**
diff --git a/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateVO.java b/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateVO.java
index 0de95b7..ab92c22 100644
--- a/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateVO.java
+++ b/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateVO.java
@@ -90,7 +90,7 @@
*/
@Excel(name = " 鐗堟湰 ")
@ApiModelProperty(value = "鐗堟湰")
- private BigDecimal version;
+ private String version;
/**
* 涓績搴撲唬鐮�
diff --git a/smartor/src/main/java/com/smartor/domain/VisitPlan.java b/smartor/src/main/java/com/smartor/domain/VisitPlan.java
new file mode 100644
index 0000000..92ac27a
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/domain/VisitPlan.java
@@ -0,0 +1,82 @@
+package com.smartor.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 闅忚璁″垝瀵硅薄 visit_plan
+ *
+ * @author lihu
+ * @date 2024-08-26
+ */
+@Data
+@ApiModel("闅忚璁″垝")
+public class VisitPlan extends BaseEntity
+ {
+private static final long serialVersionUID = 1L;
+
+ /** 涓婚敭 */
+ @ApiModelProperty("涓婚敭")
+ //鏁版嵁搴撹嚜澧炴敼鎴怈TableId(type = IdType.AUTO)
+ private Long id;
+
+ /** 鍑洪櫌鏃ユ湡 */
+ @ApiModelProperty("鍑洪櫌鏃ユ湡")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @Excel(name = "鍑洪櫌鏃ユ湡", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+ private Date outHospDate;
+
+ /** 璁″垝闅忚鏃ユ湡 */
+ @ApiModelProperty("璁″垝闅忚鏃ユ湡")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @Excel(name = "璁″垝闅忚鏃ユ湡", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+ private Date planVisitDate;
+
+ /** 璇煶鍩虹妯℃澘ID锛堝晢璁殑鍥哄畾妯℃澘鏀捐繖涓〃閲岋級 */
+ @ApiModelProperty("璇煶鍩虹妯℃澘ID锛堝晢璁殑鍥哄畾妯℃澘鏀捐繖涓〃閲岋級")
+ @Excel(name = "璇煶鍩虹妯℃澘ID", readConverterExp = "鍟�=璁殑鍥哄畾妯℃澘鏀捐繖涓〃閲�")
+ private Long ivrLibaTemplateId;
+
+ /** 鎮h�匢D */
+ @ApiModelProperty("鎮h�匢D")
+ @Excel(name = "鎮h�匢D")
+ private Long patid;
+
+ /** 鎮h�呮墜鏈哄彿 */
+ @ApiModelProperty("鎮h�呮墜鏈哄彿")
+ @Excel(name = "鎮h�呮墜鏈哄彿")
+ private String phone;
+
+ /** service_task涓婚敭 */
+ @ApiModelProperty("service_task涓婚敭")
+ @Excel(name = "service_task涓婚敭")
+ private Long taskId;
+
+ /** 瀛愪换鍔D */
+ @ApiModelProperty("瀛愪换鍔D")
+ @Excel(name = "瀛愪换鍔D")
+ private Long subTaskId;
+
+ /** 浠诲姟妯℃澘ID */
+ @ApiModelProperty("浠诲姟妯℃澘ID")
+ @Excel(name = "浠诲姟妯℃澘ID")
+ private Long taskTemplateId;
+
+ /** 0 鏈墽琛� 1宸叉墽琛� */
+ @ApiModelProperty("0 鏈墽琛� 1宸叉墽琛�")
+ @Excel(name = "0 鏈墽琛� 1宸叉墽琛�")
+ private Long isExecute;
+
+ /** 鍏紬鍙稩D */
+ @ApiModelProperty("鍏紬鍙稩D")
+ @Excel(name = "鍏紬鍙稩D")
+ private String openid;
+
+ }
+
diff --git a/smartor/src/main/java/com/smartor/domain/robot/RobotScritpTemplateVO.java b/smartor/src/main/java/com/smartor/domain/robot/RobotScritpTemplateVO.java
index cda08da..925fe02 100644
--- a/smartor/src/main/java/com/smartor/domain/robot/RobotScritpTemplateVO.java
+++ b/smartor/src/main/java/com/smartor/domain/robot/RobotScritpTemplateVO.java
@@ -1,16 +1,9 @@
package com.smartor.domain.robot;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.ruoyi.common.annotation.Excel;
-import com.ruoyi.common.core.domain.BaseEntity;
-import com.smartor.domain.PatTaskRelevance;
-import com.smartor.domain.TaskSendTimeVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
-import java.util.Date;
-import java.util.List;
import java.util.Map;
/**
diff --git a/smartor/src/main/java/com/smartor/mapper/SmsParamMapper.java b/smartor/src/main/java/com/smartor/mapper/SmsParamMapper.java
index 044002c..a51444d 100644
--- a/smartor/src/main/java/com/smartor/mapper/SmsParamMapper.java
+++ b/smartor/src/main/java/com/smartor/mapper/SmsParamMapper.java
@@ -1,19 +1,21 @@
package com.smartor.mapper;
import java.util.List;
+
import com.smartor.domain.SmsParam;
+import org.apache.ibatis.annotations.Mapper;
/**
* 鐭俊鍙傛暟Mapper鎺ュ彛
- *
+ *
* @author smartor
* @date 2023-03-06
*/
-public interface SmsParamMapper
-{
+@Mapper
+public interface SmsParamMapper {
/**
* 鏌ヨ鐭俊鍙傛暟
- *
+ *
* @param paramid 鐭俊鍙傛暟涓婚敭
* @return 鐭俊鍙傛暟
*/
@@ -21,7 +23,7 @@
/**
* 鏌ヨ鐭俊鍙傛暟鍒楄〃
- *
+ *
* @param smsParam 鐭俊鍙傛暟
* @return 鐭俊鍙傛暟闆嗗悎
*/
@@ -29,7 +31,7 @@
/**
* 鏂板鐭俊鍙傛暟
- *
+ *
* @param smsParam 鐭俊鍙傛暟
* @return 缁撴灉
*/
@@ -37,7 +39,7 @@
/**
* 淇敼鐭俊鍙傛暟
- *
+ *
* @param smsParam 鐭俊鍙傛暟
* @return 缁撴灉
*/
@@ -45,7 +47,7 @@
/**
* 鍒犻櫎鐭俊鍙傛暟
- *
+ *
* @param paramid 鐭俊鍙傛暟涓婚敭
* @return 缁撴灉
*/
@@ -53,7 +55,7 @@
/**
* 鎵归噺鍒犻櫎鐭俊鍙傛暟
- *
+ *
* @param paramids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
* @return 缁撴灉
*/
diff --git a/smartor/src/main/java/com/smartor/service/IIvrTaskTemplateScriptService.java b/smartor/src/main/java/com/smartor/service/IIvrTaskTemplateScriptService.java
index 7a8b0e7..3e21a39 100644
--- a/smartor/src/main/java/com/smartor/service/IIvrTaskTemplateScriptService.java
+++ b/smartor/src/main/java/com/smartor/service/IIvrTaskTemplateScriptService.java
@@ -1,6 +1,7 @@
package com.smartor.service;
import com.smartor.domain.IvrTaskTemplateScript;
+import com.smartor.domain.IvrTaskTemplateScriptVO;
import java.util.List;
@@ -20,6 +21,8 @@
*/
public IvrTaskTemplateScript selectIvrTaskTemplateScriptByID(Long ID);
+ public IvrTaskTemplateScriptVO getTaskTempScriptInfoByid(Long ID);
+
/**
* 鏌ヨ闅忚浠诲姟妯$増闂璇濇湳搴撳垪琛�
*
diff --git a/smartor/src/main/java/com/smartor/service/IPatArchiveService.java b/smartor/src/main/java/com/smartor/service/IPatArchiveService.java
index 5d5fd83..5a047d1 100644
--- a/smartor/src/main/java/com/smartor/service/IPatArchiveService.java
+++ b/smartor/src/main/java/com/smartor/service/IPatArchiveService.java
@@ -93,5 +93,5 @@
public List<Object> getUserTreatmentInfo(String pid, String type);
- public List<PatTaskRelevance> getPatientInfo(PatArchiveReq patArchiveReq);
+ public List<ServiceSubtask> getPatientInfo(PatArchiveReq patArchiveReq);
}
diff --git a/smartor/src/main/java/com/smartor/service/IPatMedInhospService.java b/smartor/src/main/java/com/smartor/service/IPatMedInhospService.java
index 63bac56..f1dd58b 100644
--- a/smartor/src/main/java/com/smartor/service/IPatMedInhospService.java
+++ b/smartor/src/main/java/com/smartor/service/IPatMedInhospService.java
@@ -1,19 +1,19 @@
package com.smartor.service;
import java.util.List;
+
import com.smartor.domain.PatMedInhosp;
/**
* 鎮h�呬綇闄㈣褰昐ervice鎺ュ彛
- *
+ *
* @author smartor
* @date 2023-03-04
*/
-public interface IPatMedInhospService
-{
+public interface IPatMedInhospService {
/**
* 鏌ヨ鎮h�呬綇闄㈣褰�
- *
+ *
* @param inhospid 鎮h�呬綇闄㈣褰曚富閿�
* @return 鎮h�呬綇闄㈣褰�
*/
@@ -21,7 +21,7 @@
/**
* 鏌ヨ鎮h�呬綇闄㈣褰曞垪琛�
- *
+ *
* @param patMedInhosp 鎮h�呬綇闄㈣褰�
* @return 鎮h�呬綇闄㈣褰曢泦鍚�
*/
@@ -29,7 +29,7 @@
/**
* 鏂板鎮h�呬綇闄㈣褰�
- *
+ *
* @param patMedInhosp 鎮h�呬綇闄㈣褰�
* @return 缁撴灉
*/
@@ -37,7 +37,7 @@
/**
* 淇敼鎮h�呬綇闄㈣褰�
- *
+ *
* @param patMedInhosp 鎮h�呬綇闄㈣褰�
* @return 缁撴灉
*/
@@ -45,7 +45,7 @@
/**
* 鎵归噺鍒犻櫎鎮h�呬綇闄㈣褰�
- *
+ *
* @param inhospids 闇�瑕佸垹闄ょ殑鎮h�呬綇闄㈣褰曚富閿泦鍚�
* @return 缁撴灉
*/
@@ -53,9 +53,17 @@
/**
* 鍒犻櫎鎮h�呬綇闄㈣褰曚俊鎭�
- *
+ *
* @param inhospid 鎮h�呬綇闄㈣褰曚富閿�
* @return 缁撴灉
*/
public int deletePatMedInhospByInhospid(Long inhospid);
+
+ /**
+ * 澶勭悊浠巋is鍙栨潵鐨勫嚭闄㈡暟鎹�
+ *
+ * @param
+ * @return 缁撴灉
+ */
+ public int dealOupHospInfo();
}
diff --git a/smartor/src/main/java/com/smartor/service/IServiceSubtaskAnswerService.java b/smartor/src/main/java/com/smartor/service/IServiceSubtaskAnswerService.java
index a5ea506..c38e9f0 100644
--- a/smartor/src/main/java/com/smartor/service/IServiceSubtaskAnswerService.java
+++ b/smartor/src/main/java/com/smartor/service/IServiceSubtaskAnswerService.java
@@ -77,6 +77,6 @@
*/
public Integer saveQuestionCache(ServiceSubTaskCacheReq serviceSubTaskCacheReq);
- public List<ServiceSubtaskAnswer> selectPatQuestionResult(ServiceSubTaskQueryReq serviceSubTaskQueryReq);
+ public List<ServiceSubtaskDetailVO> selectPatQuestionResult(ServiceSubTaskQueryReq serviceSubTaskQueryReq);
}
diff --git a/smartor/src/main/java/com/smartor/service/IServiceSubtaskService.java b/smartor/src/main/java/com/smartor/service/IServiceSubtaskService.java
index b4d51d0..6f76ae8 100644
--- a/smartor/src/main/java/com/smartor/service/IServiceSubtaskService.java
+++ b/smartor/src/main/java/com/smartor/service/IServiceSubtaskService.java
@@ -82,6 +82,21 @@
*/
public void phoneCallBack(PhoneCallBackVO phoneCallBackVO);
+ /**
+ * 鐢佃瘽ASR閫氳瘽鍥炶皟(闆ㄧ划)
+ *
+ * @param phoneCallReqYQVO
+ * @return 缁撴灉
+ */
+ public PhoneCallBackYQVO phoneCallBackYQ(PhoneCallReqYQVO phoneCallReqYQVO);
+
+ /**
+ * 闆ㄧ划浠诲姟鎷夊彇
+ *
+ * @return
+ */
+ public List<PullTaskVO> taskPull();
+
public Integer saveQuestionAnswerPhone(ServiceSubTaskDetailReq serviceSubTaskDetailReq);
}
diff --git a/smartor/src/main/java/com/smartor/service/ISmsParamService.java b/smartor/src/main/java/com/smartor/service/ISmsParamService.java
index 437c0b7..31588a8 100644
--- a/smartor/src/main/java/com/smartor/service/ISmsParamService.java
+++ b/smartor/src/main/java/com/smartor/service/ISmsParamService.java
@@ -1,19 +1,19 @@
package com.smartor.service;
import java.util.List;
+
import com.smartor.domain.SmsParam;
/**
* 鐭俊鍙傛暟Service鎺ュ彛
- *
+ *
* @author smartor
* @date 2023-03-06
*/
-public interface ISmsParamService
-{
+public interface ISmsParamService {
/**
* 鏌ヨ鐭俊鍙傛暟
- *
+ *
* @param paramid 鐭俊鍙傛暟涓婚敭
* @return 鐭俊鍙傛暟
*/
@@ -21,7 +21,7 @@
/**
* 鏌ヨ鐭俊鍙傛暟鍒楄〃
- *
+ *
* @param smsParam 鐭俊鍙傛暟
* @return 鐭俊鍙傛暟闆嗗悎
*/
@@ -29,7 +29,7 @@
/**
* 鏂板鐭俊鍙傛暟
- *
+ *
* @param smsParam 鐭俊鍙傛暟
* @return 缁撴灉
*/
@@ -37,7 +37,7 @@
/**
* 淇敼鐭俊鍙傛暟
- *
+ *
* @param smsParam 鐭俊鍙傛暟
* @return 缁撴灉
*/
@@ -45,7 +45,7 @@
/**
* 鎵归噺鍒犻櫎鐭俊鍙傛暟
- *
+ *
* @param paramids 闇�瑕佸垹闄ょ殑鐭俊鍙傛暟涓婚敭闆嗗悎
* @return 缁撴灉
*/
@@ -53,9 +53,11 @@
/**
* 鍒犻櫎鐭俊鍙傛暟淇℃伅
- *
+ *
* @param paramid 鐭俊鍙傛暟涓婚敭
* @return 缁撴灉
*/
public int deleteSmsParamByParamid(Long paramid);
+
+ public int sendSmsInfo(String info,String phone);
}
diff --git a/smartor/src/main/java/com/smartor/service/impl/CommonTaskServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/CommonTaskServiceImpl.java
index 0ebbae6..668da8d 100644
--- a/smartor/src/main/java/com/smartor/service/impl/CommonTaskServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/CommonTaskServiceImpl.java
@@ -55,7 +55,7 @@
return wjSend(sendTaskVO);
} else if (sendTaskVO.getTaskType() == 3) {
//瀹f暀
- xjSend(sendTaskVO);
+ return xjSend(sendTaskVO);
}
}
return null;
diff --git a/smartor/src/main/java/com/smartor/service/impl/IvrLibaTemplateServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/IvrLibaTemplateServiceImpl.java
index 0db1933..76c081a 100644
--- a/smartor/src/main/java/com/smartor/service/impl/IvrLibaTemplateServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/IvrLibaTemplateServiceImpl.java
@@ -135,7 +135,7 @@
ivrLibaTemplateMapper.updateIvrLibaTemplate(ivrLibaTemplate);
i = ivrLibaTemplate.getId().intValue();
}
- log.info("鏂板鎴栦慨鏀规ā鏉胯鎯呯殑id涓猴細{}", ivrLibaTemplate.getId());
+ log.info("鏂板鎴栦慨鏀规ā鏉胯鎯呯殑id涓猴細{}" , ivrLibaTemplate.getId());
//瀵规ā鏉挎爣绛捐繘琛屽鐞�
if (CollectionUtils.isNotEmpty(ivrLibaTemplateVO.getIvrLibaTemplateTagList())) {
@@ -167,10 +167,10 @@
for (IvrLibaTemplateScriptVO ivrLibaTemplateScriptVO : ivrLibaTemplateVO.getIvrLibaTemplateScriptVOList()) {
if (ivrLibaTemplateScriptVO.getIsoperation() != null) {
IvrLibaTemplateScript ivrLibaTemplateScript = scriptHandle(ivrLibaTemplate, ivrLibaTemplateScriptVO, ivrLibaTemplateScriptVO.getIsoperation());
- dealOption(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList(), ivrLibaTemplateScript, ivrLibaTemplate.getId(),ivrLibaTemplateScriptVO.getIsoperation());
+// dealOption(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList(), ivrLibaTemplateScript, ivrLibaTemplate.getId(), ivrLibaTemplateScriptVO.getIsoperation());
} else {
IvrLibaTemplateScript ivrLibaTemplateScript = scriptHandle(ivrLibaTemplate, ivrLibaTemplateScriptVO, ivrLibaTemplateVO.getIsoperation());
- dealOption(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList(), ivrLibaTemplateScript, ivrLibaTemplate.getId(),ivrLibaTemplateVO.getIsoperation());
+// dealOption(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList(), ivrLibaTemplateScript, ivrLibaTemplate.getId(), ivrLibaTemplateVO.getIsoperation());
}
}
}
@@ -200,7 +200,7 @@
ivrLibaTemplateScript.setCreateTime(new Date());
ivrLibaTemplateScriptMapper.insertIvrLibaTemplateScript(ivrLibaTemplateScript);
//瀵归�夐」鐩繘琛屽鐞�
- dealOption(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList(), ivrLibaTemplateScript, ivrLibaTemplate.getId(),isoperation);
+ dealOption(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList(), ivrLibaTemplateScript, ivrLibaTemplate.getId(), isoperation);
} else if (isoperation == 2) {
//淇敼
@@ -230,7 +230,7 @@
* @param tmpID
*/
private void dealOption(List<IvrLibaTemplateTargetoption> ivrLibaTemplateTargetoptionList, IvrLibaTemplateScript ivrLibaTemplateScript, Long tmpID, Integer isoperation) {
- log.info("ivrLibaTemplateScript鐨勫�间负锛歿}", ivrLibaTemplateScript);
+ log.info("ivrLibaTemplateScript鐨勫�间负锛歿}" , ivrLibaTemplateScript);
//瀵规ā鏉挎寚鏍囬�夐」杩涜澶勭悊
Integer lsIsoperation = isoperation;
if (CollectionUtils.isNotEmpty(ivrLibaTemplateTargetoptionList)) {
@@ -275,12 +275,12 @@
*/
@Override
public IvrLibaTemplateVO selectInfoByCondition(IvrLibaTemplateVO ivrLibaTemplateVO) {
- log.info("鏌ヨ妯℃澘璇︽儏鏍规嵁鏉′欢鐨勫叆鍙備负 : {}", ivrLibaTemplateVO);
+ log.info("鏌ヨ妯℃澘璇︽儏鏍规嵁鏉′欢鐨勫叆鍙備负 : {}" , ivrLibaTemplateVO);
//鍏堟牴鎹潯浠舵煡璇㈤棶棰樿〃淇℃伅
IvrLibaTemplate ivrLibaTemplate = DtoConversionUtils.sourceToTarget(ivrLibaTemplateVO, IvrLibaTemplate.class);
List<IvrLibaTemplate> ivrLibaTemplates = selectIvrLibaTemplateList(ivrLibaTemplate);
if (CollectionUtils.isEmpty(ivrLibaTemplates)) {
- log.info("鎻愪緵鐨勬潯浠�,鏌ヨ妯℃澘璇︽儏鏁版嵁涓虹┖锛歿}", ivrLibaTemplates);
+ log.info("鎻愪緵鐨勬潯浠�,鏌ヨ妯℃澘璇︽儏鏁版嵁涓虹┖锛歿}" , ivrLibaTemplates);
throw new BaseException("鎻愪緵鐨勬潯浠�,鏌ヨ妯℃澘璇︽儏鏁版嵁涓虹┖");
}
//瀹氫箟IvrLibaTemplateVO 鐢ㄤ簬杩斿弬
@@ -299,7 +299,7 @@
//閫氳繃璇濇湳ID鑾峰彇閫夐」
for (IvrLibaTemplateScriptVO ivrLibaTemplateScriptVO : ivrLibaTemplateScriptVOS) {
- log.info("ivrLibaTemplateScriptVO鐨勪富閿甶d涓猴細{}", ivrLibaTemplateScriptVO.getId());
+ log.error("ivrLibaTemplateScriptVO鐨勪富閿甶d涓猴細{}" , ivrLibaTemplateScriptVO.getId());
IvrLibaTemplateTargetoption ivrLibaTemplateTargetoption = new IvrLibaTemplateTargetoption();
ivrLibaTemplateTargetoption.setScriptid(ivrLibaTemplateScriptVO.getId());
List<IvrLibaTemplateTargetoption> ivrLibaTemplateTargetoptions = ivrLibaTemplateTargetOptionMapper.selectIvrLibaTemplateTargetoptionList(ivrLibaTemplateTargetoption);
@@ -324,7 +324,7 @@
}
ivrLibaTemplateScriptVO.setIvrLibaScriptTargetoptionList(ivrLibaTemplateTargetoptions);
}
- Collections.sort(ivrLibaTemplateScriptVOS, Comparator.comparing(IvrLibaTemplateScriptVO::getTargetid));
+ Collections.sort(ivrLibaTemplateScriptVOS, Comparator.comparing(IvrLibaTemplateScriptVO::getSort));
//鏁版嵁缁勮
templateVO.setIvrLibaTemplateTagList(ivrLibaTemplateTags);
templateVO.setIvrLibaTemplateScriptVOList(ivrLibaTemplateScriptVOS);
diff --git a/smartor/src/main/java/com/smartor/service/impl/IvrTaskTemplateScriptServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/IvrTaskTemplateScriptServiceImpl.java
index d7b4a51..1c531b6 100644
--- a/smartor/src/main/java/com/smartor/service/impl/IvrTaskTemplateScriptServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/IvrTaskTemplateScriptServiceImpl.java
@@ -1,8 +1,12 @@
package com.smartor.service.impl;
import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.DtoConversionUtils;
import com.smartor.domain.IvrTaskTemplateScript;
+import com.smartor.domain.IvrTaskTemplateScriptVO;
+import com.smartor.domain.IvrTaskTemplateTargetoption;
import com.smartor.mapper.IvrTaskTemplateScriptMapper;
+import com.smartor.mapper.IvrTaskTemplateTargetoptionMapper;
import com.smartor.service.IIvrTaskTemplateScriptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -19,6 +23,8 @@
public class IvrTaskTemplateScriptServiceImpl implements IIvrTaskTemplateScriptService {
@Autowired
private IvrTaskTemplateScriptMapper ivrTaskTemplateScriptMapper;
+ @Autowired
+ private IvrTaskTemplateTargetoptionMapper ivrTaskTemplateTargetoptionMapper;
/**
* 鏌ヨ闅忚浠诲姟妯$増闂璇濇湳搴�
@@ -31,6 +37,17 @@
return ivrTaskTemplateScriptMapper.selectIvrTaskTemplateScriptByID(ID);
}
+ @Override
+ public IvrTaskTemplateScriptVO getTaskTempScriptInfoByid(Long ID) {
+ IvrTaskTemplateScript ivrTaskTemplateScript = selectIvrTaskTemplateScriptByID(ID);
+ IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO = DtoConversionUtils.sourceToTarget(ivrTaskTemplateScript, IvrTaskTemplateScriptVO.class);
+ IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption = new IvrTaskTemplateTargetoption();
+ ivrTaskTemplateTargetoption.setScriptid(ivrTaskTemplateScriptVO.getId());
+ List<IvrTaskTemplateTargetoption> ivrTaskTemplateTargetoptions = ivrTaskTemplateTargetoptionMapper.selectIvrTaskTemplateTargetoptionList(ivrTaskTemplateTargetoption);
+ ivrTaskTemplateScriptVO.setIvrTaskScriptTargetoptionList(ivrTaskTemplateTargetoptions);
+ return ivrTaskTemplateScriptVO;
+ }
+
/**
* 鏌ヨ闅忚浠诲姟妯$増闂璇濇湳搴撳垪琛�
*
diff --git a/smartor/src/main/java/com/smartor/service/impl/IvrTaskTemplateServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/IvrTaskTemplateServiceImpl.java
index 91d229a..0f56d06 100644
--- a/smartor/src/main/java/com/smartor/service/impl/IvrTaskTemplateServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/IvrTaskTemplateServiceImpl.java
@@ -78,6 +78,10 @@
public int saveOrUpdateTempScript(IvrTaskTemplateVO ivrTaskTemplateVO) {
Integer i = null;
IvrTaskTemplate ivrTaskTemplate = DtoConversionUtils.sourceToTarget(ivrTaskTemplateVO, IvrTaskTemplate.class);
+ //浼犺繃鏉ョ殑闈欓粯鏃堕棿鏄锛岄渶瑕佹敼鎴愭绉�
+ if (ivrTaskTemplate.getSilencetime() != null)
+ ivrTaskTemplate.setSilencetime(ivrTaskTemplate.getSilencetime() * 1000);
+
if (ivrTaskTemplateVO.getIsoperation() != null && ivrTaskTemplateVO.getIsoperation() == 1) {
//鏂板
ivrTaskTemplate.setCreateTime(new Date());
@@ -89,11 +93,11 @@
updateIvrTaskTemplate(ivrTaskTemplate);
i = ivrTaskTemplate.getId().intValue();
}
- log.info("鏂板闅忚浠诲姟闅忚妯℃澘鐨刬d涓猴細{}", ivrTaskTemplate.getId());
+ log.info("鏂板闅忚浠诲姟闅忚妯℃澘鐨刬d涓猴細{}" , ivrTaskTemplate.getId());
//瀵规ā鏉胯瘽鏈拰閫夐」杩涜澶勭悊锛堣瘽鏈〃涓庢寚鏍囪〃杩涜鍚堝苟浜嗭紝锛�
if (CollectionUtils.isNotEmpty(ivrTaskTemplateVO.getIvrTaskTemplateScriptVOList())) {
- log.error("ivrTaskTemplateVO.getIvrTaskTemplateScriptVOList()鏄惁鏈夋暟鎹搱锛歿}", ivrTaskTemplateVO.getIvrTaskTemplateScriptVOList());
+ log.error("ivrTaskTemplateVO.getIvrTaskTemplateScriptVOList()鏄惁鏈夋暟鎹搱锛歿}" , ivrTaskTemplateVO.getIvrTaskTemplateScriptVOList());
for (IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO : ivrTaskTemplateVO.getIvrTaskTemplateScriptVOList()) {
if (ivrTaskTemplateScriptVO.getIsoperation() != null) {
IvrTaskTemplateScript ivrTaskTemplateScript = scriptHandle(ivrTaskTemplate, ivrTaskTemplateScriptVO, ivrTaskTemplateScriptVO.getIsoperation());
@@ -148,16 +152,16 @@
*/
@Override
public IvrTaskTemplateVO selectInfoByCondition(IvrTaskTemplateVO ivrTaskTemplateVO) {
- log.info("鏌ヨ妯℃澘璇︽儏鏍规嵁鏉′欢鐨勫叆鍙備负 : {}", ivrTaskTemplateVO);
+ log.info("鏌ヨ妯℃澘璇︽儏鏍规嵁鏉′欢鐨勫叆鍙備负 : {}" , ivrTaskTemplateVO);
//鍏堟牴鎹潯浠舵煡璇㈤棶棰樿〃淇℃伅
IvrTaskTemplate ivrTaskTemplate = DtoConversionUtils.sourceToTarget(ivrTaskTemplateVO, IvrTaskTemplate.class);
List<IvrTaskTemplate> ivrTaskTemplates = selectIvrTaskTemplateList(ivrTaskTemplate);
if (CollectionUtils.isEmpty(ivrTaskTemplates)) {
- log.info("鎻愪緵鐨勬潯浠�,鏌ヨ妯℃澘璇︽儏鏁版嵁涓虹┖锛歿}", ivrTaskTemplates);
+ log.info("鎻愪緵鐨勬潯浠�,鏌ヨ妯℃澘璇︽儏鏁版嵁涓虹┖锛歿}" , ivrTaskTemplates);
throw new BaseException("鎻愪緵鐨勬潯浠�,鏌ヨ妯℃澘璇︽儏鏁版嵁涓虹┖");
}
- log.info("ivrLibaTemplates鐨勬煡璇㈢粨鏋滀负:{},鏁伴噺涓� : {}", ivrTaskTemplates.get(0), ivrTaskTemplates.size());
+ log.info("ivrLibaTemplates鐨勬煡璇㈢粨鏋滀负:{},鏁伴噺涓� : {}" , ivrTaskTemplates.get(0), ivrTaskTemplates.size());
//瀹氫箟IvrLibaTemplateVO 鐢ㄤ簬杩斿弬
IvrTaskTemplateVO templateVO = DtoConversionUtils.sourceToTarget(ivrTaskTemplates.get(0), IvrTaskTemplateVO.class);
//
@@ -174,7 +178,7 @@
//閫氳繃璇濇湳ID鑾峰彇閫夐」
for (IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO : ivrTaskTemplateScriptVOS) {
- log.info("ivrLibaTemplateScriptVO鐨勪富閿甶d涓猴細{}", ivrTaskTemplateScriptVO.getId());
+ log.info("ivrLibaTemplateScriptVO鐨勪富閿甶d涓猴細{}" , ivrTaskTemplateScriptVO.getId());
IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption = new IvrTaskTemplateTargetoption();
ivrTaskTemplateTargetoption.setScriptid(ivrTaskTemplateScriptVO.getId());
List<IvrTaskTemplateTargetoption> ivrTaskTemplateTargetoptions = ivrTaskTemplateTargetoptionMapper.selectIvrTaskTemplateTargetoptionList(ivrTaskTemplateTargetoption);
@@ -235,7 +239,7 @@
}
private void dealOption(List<IvrTaskTemplateTargetoption> ivrTaskTemplateTargetoptionList, IvrTaskTemplateScript ivrTaskTemplateScript, Long tmpID, Integer isoperation) {
- log.info("ivrLibaTemplateScript鐨勫�间负锛歿}", ivrTaskTemplateScript);
+ log.info("ivrLibaTemplateScript鐨勫�间负锛歿}" , ivrTaskTemplateScript);
Integer lsisoperation = isoperation;
//瀵规ā鏉挎寚鏍囬�夐」杩涜澶勭悊
if (CollectionUtils.isNotEmpty(ivrTaskTemplateTargetoptionList)) {
diff --git a/smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java
index 8dbefb7..201e911 100644
--- a/smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java
@@ -189,8 +189,8 @@
* @return
*/
@Override
- public List<PatTaskRelevance> getPatientInfo(PatArchiveReq patArchiveReq) {
- List<PatTaskRelevance> PatTaskRelevances = new ArrayList<>();
+ public List<ServiceSubtask> getPatientInfo(PatArchiveReq patArchiveReq) {
+ List<ServiceSubtask> serviceSubtaskList = new ArrayList<>();
List<PatArchive> patArchiveList = new ArrayList<>();
if (patArchiveReq.getAllhosp() != null && patArchiveReq.getAllhosp() == 1) {
@@ -213,14 +213,15 @@
}
}
for (PatArchive patArchive : patArchiveList) {
- PatTaskRelevance patTaskRelevance = DtoConversionUtils.sourceToTarget(patArchive, PatTaskRelevance.class);
- patTaskRelevance.setCreateTime(patArchive.getCreateTime());
- patTaskRelevance.setCreateBy(patArchive.getCreateBy());
- patTaskRelevance.setDeptName(patArchive.getDept());
- PatTaskRelevances.add(patTaskRelevance);
+ ServiceSubtask serviceSubtask = DtoConversionUtils.sourceToTarget(patArchive, ServiceSubtask.class);
+ serviceSubtask.setCreateTime(patArchive.getCreateTime());
+ serviceSubtask.setCreateBy(patArchive.getCreateBy());
+ serviceSubtask.setDeptname(patArchive.getDept());
+ serviceSubtask.setPhone(patArchive.getTelcode());
+ serviceSubtaskList.add(serviceSubtask);
}
- return PatTaskRelevances;
+ return serviceSubtaskList;
}
diff --git a/smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java
index 7853b90..27a3555 100644
--- a/smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java
@@ -1,96 +1,205 @@
package com.smartor.service.impl;
+import java.time.LocalDate;
+import java.time.ZoneOffset;
+import java.util.ArrayList;
+import java.util.Date;
import java.util.List;
+
import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.DtoConversionUtils;
+import com.ruoyi.common.utils.StringUtils;
+import com.smartor.domain.*;
+import com.smartor.mapper.*;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
-import com.smartor.mapper.PatMedInhospMapper;
-import com.smartor.domain.PatMedInhosp;
import com.smartor.service.IPatMedInhospService;
+import org.springframework.transaction.annotation.Transactional;
/**
* 鎮h�呬綇闄㈣褰昐ervice涓氬姟灞傚鐞�
- *
+ *
* @author smartor
* @date 2023-03-04
*/
+@Slf4j
@Service
-public class PatMedInhospServiceImpl implements IPatMedInhospService
-{
+public class PatMedInhospServiceImpl implements IPatMedInhospService {
@Autowired
private PatMedInhospMapper patMedInhospMapper;
+ @Autowired
+ private PatArchiveMapper patArchiveMapper;
+
+ @Autowired
+ private IvrLibaTemplateMapper ivrLibaTemplateMapper;
+
+ @Autowired
+ private IvrTaskTemplateMapper ivrTaskTemplateMapper;
+
+ @Autowired
+ private ServiceTaskMapper serviceTaskMapper;
+
+ @Autowired
+ private ServiceSubtaskMapper serviceSubtaskMapper;
+
+ //璁板綍闀挎湡浠诲姟鍩虹淇℃伅
+ List<IvrLibaTemplate> libaTemplates = new ArrayList<>();
+ List<IvrTaskTemplate> ivrTaskTemplates = new ArrayList<>();
+ List<ServiceTask> serviceTaskList = new ArrayList<>();
+
/**
* 鏌ヨ鎮h�呬綇闄㈣褰�
- *
+ *
* @param inhospid 鎮h�呬綇闄㈣褰曚富閿�
* @return 鎮h�呬綇闄㈣褰�
*/
@Override
- public PatMedInhosp selectPatMedInhospByInhospid(Long inhospid)
- {
+ public PatMedInhosp selectPatMedInhospByInhospid(Long inhospid) {
return patMedInhospMapper.selectPatMedInhospByInhospid(inhospid);
}
/**
* 鏌ヨ鎮h�呬綇闄㈣褰曞垪琛�
- *
+ *
* @param patMedInhosp 鎮h�呬綇闄㈣褰�
* @return 鎮h�呬綇闄㈣褰�
*/
@Override
- public List<PatMedInhosp> selectPatMedInhospList(PatMedInhosp patMedInhosp)
- {
+ public List<PatMedInhosp> selectPatMedInhospList(PatMedInhosp patMedInhosp) {
return patMedInhospMapper.selectPatMedInhospList(patMedInhosp);
}
/**
* 鏂板鎮h�呬綇闄㈣褰�
- *
+ *
* @param patMedInhosp 鎮h�呬綇闄㈣褰�
* @return 缁撴灉
*/
@Override
- public int insertPatMedInhosp(PatMedInhosp patMedInhosp)
- {
+ public int insertPatMedInhosp(PatMedInhosp patMedInhosp) {
patMedInhosp.setCreateTime(DateUtils.getNowDate());
+ patMedInhosp.setUpdateTime(DateUtils.getNowDate());
return patMedInhospMapper.insertPatMedInhosp(patMedInhosp);
}
/**
* 淇敼鎮h�呬綇闄㈣褰�
- *
+ *
* @param patMedInhosp 鎮h�呬綇闄㈣褰�
* @return 缁撴灉
*/
@Override
- public int updatePatMedInhosp(PatMedInhosp patMedInhosp)
- {
+ public int updatePatMedInhosp(PatMedInhosp patMedInhosp) {
patMedInhosp.setUpdateTime(DateUtils.getNowDate());
return patMedInhospMapper.updatePatMedInhosp(patMedInhosp);
}
/**
* 鎵归噺鍒犻櫎鎮h�呬綇闄㈣褰�
- *
+ *
* @param inhospids 闇�瑕佸垹闄ょ殑鎮h�呬綇闄㈣褰曚富閿�
* @return 缁撴灉
*/
@Override
- public int deletePatMedInhospByInhospids(Long[] inhospids)
- {
+ public int deletePatMedInhospByInhospids(Long[] inhospids) {
return patMedInhospMapper.deletePatMedInhospByInhospids(inhospids);
}
/**
* 鍒犻櫎鎮h�呬綇闄㈣褰曚俊鎭�
- *
+ *
* @param inhospid 鎮h�呬綇闄㈣褰曚富閿�
* @return 缁撴灉
*/
@Override
- public int deletePatMedInhospByInhospid(Long inhospid)
- {
+ public int deletePatMedInhospByInhospid(Long inhospid) {
return patMedInhospMapper.deletePatMedInhospByInhospid(inhospid);
}
+
+ @Transactional(rollbackFor = Exception.class)
+ @Override
+ public int dealOupHospInfo() {
+ //鑾峰彇闀挎湡妯℃澘
+ IvrLibaTemplate ivrTemp = new IvrLibaTemplate();
+ ivrTemp.setDelFlag("0");
+ ivrTemp.setLongTemp(1);
+ List<IvrLibaTemplate> ivrLibaTemplates = ivrLibaTemplateMapper.selectIvrLibaTemplateList(ivrTemp);
+
+ if (CollectionUtils.isNotEmpty(ivrLibaTemplates)) {
+ for (IvrLibaTemplate ivrLibaTemplate : ivrLibaTemplates) {
+ //鑾峰彇鍒颁换鍔℃ā鏉夸俊鎭�
+ IvrTaskTemplate ivrTaskTemplate = new IvrTaskTemplate();
+ ivrTaskTemplate.setLibtemplateid(ivrLibaTemplate.getId().toString());
+ List<IvrTaskTemplate> ivrTaskTemplates = ivrTaskTemplateMapper.selectIvrTaskTemplateList(ivrTaskTemplate);
+ if (CollectionUtils.isNotEmpty(ivrTaskTemplates)) {
+ IvrTaskTemplate ivrTaskTemplate1 = ivrTaskTemplates.get(0);
+ //閫氳繃浠诲姟妯℃澘ID鑾峰彇浠诲姟
+ ServiceTask ServiceTask = new ServiceTask();
+ ServiceTask.setTemplateid(ivrTaskTemplate1.getId());
+ List<ServiceTask> serviceTasks = serviceTaskMapper.selectServiceTaskList(ServiceTask);
+ if (CollectionUtils.isNotEmpty(serviceTasks)) {
+ serviceTaskList.add(serviceTasks.get(0));
+ }
+ ivrTaskTemplates.add(ivrTaskTemplate1);
+ }
+ libaTemplates.add(ivrLibaTemplate);
+ }
+ }
+
+ PatMedInhosp patMedInhosp = new PatMedInhosp();
+ //鑾峰彇鏈鐞嗙殑鏁版嵁
+ patMedInhosp.setCheckFlag("0");
+ patMedInhosp.setInhospstate("1");
+ List<PatMedInhosp> patMedInhosps = patMedInhospMapper.selectPatMedInhospList(patMedInhosp);
+ for (PatMedInhosp patMedInhosp1 : patMedInhosps) {
+ PatArchive patArchive = patArchiveMapper.selectPatArchiveByPatid(patMedInhosp1.getPatid());
+ //閫氳繃icd10code鍘昏幏鍙栫浉搴旂殑ivr_liba_template_id
+ if (StringUtils.isNotEmpty(patMedInhosp1.getIcd10code())) {
+ for (IvrLibaTemplate ivrLibaTemplate : libaTemplates) {
+ String icdCode = patMedInhosp1.getIcd10code().split(",")[0];
+ if (ivrLibaTemplate.getIcd10code().equals(icdCode)) {
+ //閫氳繃妯℃澘ID鑾峰彇浠诲姟妯℃澘
+ for (IvrTaskTemplate ivrTaskTemplate : ivrTaskTemplates) {
+ if (ivrTaskTemplate.getLibtemplateid().equals(ivrLibaTemplate.getId().toString())) {
+ for (ServiceTask serviceTask : serviceTaskList) {
+ if (serviceTask.getTemplateid() == ivrTaskTemplate.getId()) {
+ //灏嗚鎮h�咃紝鎻掑叆鍒板瓙浠诲姟琛ㄤ腑
+ ServiceSubtask serviceSubtask = DtoConversionUtils.sourceToTarget(serviceTask, ServiceSubtask.class);
+ serviceSubtask.setId(null);
+ serviceSubtask.setTaskid(serviceTask.getTaskid());
+ serviceSubtask.setLibtemplateid(ivrLibaTemplate.getId());
+ serviceSubtask.setTemplateid(ivrTaskTemplate.getId());
+ serviceSubtask.setTemplatename(ivrLibaTemplate.getTemplateName());
+ serviceSubtask.setPatid(patMedInhosp1.getPatid());
+ serviceSubtask.setSendname(patMedInhosp1.getPatname());
+ serviceSubtask.setPhone(patArchive.getTelcode());
+ serviceSubtask.setSex(patArchive.getSex());
+ serviceSubtask.setAge(patArchive.getAge());
+ serviceSubtask.setSendstate(2L);
+ serviceSubtask.setServiceform(serviceTask.getPreachform());
+ serviceSubtask.setHospType("2");
+ //鎮h�呭彂閫佹椂闂�
+ LocalDate currentDate = LocalDate.now();
+ LocalDate newDate = currentDate.plusDays(ivrTaskTemplate.getSendDay());
+ serviceSubtask.setLongSendTime(Date.from(newDate.atStartOfDay(ZoneOffset.ofHours(8)).toInstant()));
+ serviceSubtaskMapper.insertServiceSubtask(serviceSubtask);
+ //灏哻heck_flag鏀规垚1锛堝凡澶勭悊锛�
+ PatMedInhosp patMedInhosp2 = new PatMedInhosp();
+ patMedInhosp2.setInhospid(patMedInhosp1.getInhospid());
+ patMedInhosp2.setCheckFlag("1");
+ patMedInhospMapper.updatePatMedInhosp(patMedInhosp2);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return 1;
+ }
}
diff --git a/smartor/src/main/java/com/smartor/service/impl/PatMedInspectionServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/PatMedInspectionServiceImpl.java
index b08045a..342707e 100644
--- a/smartor/src/main/java/com/smartor/service/impl/PatMedInspectionServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/PatMedInspectionServiceImpl.java
@@ -11,7 +11,7 @@
/**
* 鎮h�呮鏌ユ楠岃褰昐ervice涓氬姟灞傚鐞�
- *
+ *
* @author ruoyi
* @date 2023-06-16
*/
@@ -23,7 +23,7 @@
/**
* 鏌ヨ鎮h�呮鏌ユ楠岃褰�
- *
+ *
* @param id 鎮h�呮鏌ユ楠岃褰曚富閿�
* @return 鎮h�呮鏌ユ楠岃褰�
*/
@@ -35,7 +35,7 @@
/**
* 鏌ヨ鎮h�呮鏌ユ楠岃褰曞垪琛�
- *
+ *
* @param patMedInspection 鎮h�呮鏌ユ楠岃褰�
* @return 鎮h�呮鏌ユ楠岃褰�
*/
@@ -47,7 +47,7 @@
/**
* 鏂板鎮h�呮鏌ユ楠岃褰�
- *
+ *
* @param patMedInspection 鎮h�呮鏌ユ楠岃褰�
* @return 缁撴灉
*/
@@ -55,12 +55,13 @@
public int insertPatMedInspection(PatMedInspection patMedInspection)
{
patMedInspection.setCreateTime(DateUtils.getNowDate());
+ patMedInspection.setUpdateTime(DateUtils.getNowDate());
return patMedInspectionMapper.insertPatMedInspection(patMedInspection);
}
/**
* 淇敼鎮h�呮鏌ユ楠岃褰�
- *
+ *
* @param patMedInspection 鎮h�呮鏌ユ楠岃褰�
* @return 缁撴灉
*/
@@ -73,7 +74,7 @@
/**
* 鎵归噺鍒犻櫎鎮h�呮鏌ユ楠岃褰�
- *
+ *
* @param ids 闇�瑕佸垹闄ょ殑鎮h�呮鏌ユ楠岃褰曚富閿�
* @return 缁撴灉
*/
@@ -85,7 +86,7 @@
/**
* 鍒犻櫎鎮h�呮鏌ユ楠岃褰曚俊鎭�
- *
+ *
* @param id 鎮h�呮鏌ユ楠岃褰曚富閿�
* @return 缁撴灉
*/
diff --git a/smartor/src/main/java/com/smartor/service/impl/PatMedRegistrationServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/PatMedRegistrationServiceImpl.java
index f224999..7d4aed1 100644
--- a/smartor/src/main/java/com/smartor/service/impl/PatMedRegistrationServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/PatMedRegistrationServiceImpl.java
@@ -55,6 +55,7 @@
public int insertPatMedRegistration(PatMedRegistration patMedRegistration)
{
patMedRegistration.setCreateTime(DateUtils.getNowDate());
+ patMedRegistration.setUpdateTime(DateUtils.getNowDate());
return patMedRegistrationMapper.insertPatMedRegistration(patMedRegistration);
}
diff --git a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskAnswerServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskAnswerServiceImpl.java
index ae06130..d090405 100644
--- a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskAnswerServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskAnswerServiceImpl.java
@@ -1,24 +1,16 @@
package com.smartor.service.impl;
import com.alibaba.fastjson2.JSON;
-import com.alibaba.fastjson2.JSONArray;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.google.gson.Gson;
-import com.google.gson.JsonArray;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.DtoConversionUtils;
import com.ruoyi.common.utils.RSAPublicKeyExample;
import com.ruoyi.common.utils.StringUtils;
import com.smartor.domain.*;
-import com.smartor.mapper.IvrTaskTemplateScriptMapper;
import com.smartor.mapper.ServiceSubtaskAnswerMapper;
-import com.smartor.mapper.ServiceSubtaskMapper;
-import com.smartor.mapper.ServiceTaskMapper;
-import com.smartor.service.IIvrTaskTemplateService;
+import com.smartor.mapper.ServiceSubtaskDetailMapper;
+import com.smartor.mapper.SvyTaskTemplateTargetoptionMapper;
import com.smartor.service.IServiceSubtaskAnswerService;
-import com.smartor.service.ISvyTaskTemplateService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
@@ -42,6 +34,12 @@
@Autowired
private RedisCache redisCache;
+
+ @Autowired
+ private ServiceSubtaskDetailMapper serviceSubtaskDetailMapper;
+
+ @Autowired
+ private SvyTaskTemplateTargetoptionMapper svyTaskTemplateTargetoptionMapper;
@Value("${pri_key}")
private String pri_key;
@@ -120,51 +118,22 @@
if (ObjectUtils.isNotEmpty(serviceSubTaskAnswerReq)) {
//闇�瑕佺珛鍗虫墽琛�
RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample();
-// Long tid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskAnswerReq.getParam1(), pri_key));
-// Long pid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskAnswerReq.getParam2(), pri_key));
-
- Long tid=Long.valueOf(serviceSubTaskAnswerReq.getParam1());
- Long pid=Long.valueOf(serviceSubTaskAnswerReq.getParam2());
-
+ Long tid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskAnswerReq.getParam1(), pri_key));
+ Long pid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskAnswerReq.getParam2(), pri_key));
allKeys = new HashSet<>();
- if (serviceSubTaskAnswerReq.getType() == 1) {
- allKeys.add(pid + "-" + tid + "-SFscriptCache");
- } else if (serviceSubTaskAnswerReq.getType() == 2) {
- allKeys.add(pid + "-" + tid + "-WJscriptCache");
- }
+ allKeys.add(pid + "-" + tid + "-WJscriptCache");
}
Long nextScriptno = null;
for (String key : allKeys) {
String[] split = key.split("-");
- if (key.contains("-SFscriptCache")) {
- //鍖呭惈浜�,璇存槑浜嗘槸闅忚闂
- List<IvrTaskTemplateScriptVO> cacheList = redisCache.getCacheObject(key);
- for (int i = 0; i < cacheList.size(); i++) {
- if (i == 0) {
- // 璇存槑鏄涓�棰�
- IvrTaskTemplateScriptVO ivrLibaTemplateScriptVO = cacheList.get(0);
- //灏嗙涓�棰樼殑淇℃伅鏀惧埌琛ㄤ腑
- setSFInfo(ivrLibaTemplateScriptVO, Long.valueOf(split[1]), Long.valueOf(split[0]));
- nextScriptno = cacheList.get(0).getNextScriptno();
- } else {
- //涓嶆槸绗� 涓� 棰�
- for (IvrTaskTemplateScriptVO ivrLibaTemplateScriptVO : cacheList) {
- if (ivrLibaTemplateScriptVO.getId() == nextScriptno) {
- setSFInfo(ivrLibaTemplateScriptVO, Long.valueOf(split[1]), Long.valueOf(split[0]));
- nextScriptno = ivrLibaTemplateScriptVO.getNextScriptno();
- }
- }
- }
- }
- } else if (key.contains("-WJscriptCache")) {
+ if (key.contains("-WJscriptCache")) {
List<SvyTaskTemplateScriptVO> cacheList = redisCache.getCacheList(key);
for (int i = 0; i < cacheList.size(); i++) {
if (i == 0) {
// 璇存槑鏄涓�棰�
//灏嗙涓�棰樼殑淇℃伅鏀惧埌琛ㄤ腑
- setWJInfo(cacheList.get(0), Long.valueOf(split[1]), Long.valueOf(split[0]));
- nextScriptno = Long.valueOf(cacheList.get(0).getNextScriptno());
+ nextScriptno = setWJInfo(cacheList.get(0), Long.valueOf(split[1]), Long.valueOf(split[0]));
} else {
for (SvyTaskTemplateScriptVO svyTaskTemplateScriptVO : cacheList) {
if (svyTaskTemplateScriptVO.getId() == nextScriptno) {
@@ -192,114 +161,84 @@
@Override
public Integer saveQuestionCache(ServiceSubTaskCacheReq serviceSubTaskCacheReq) {
RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample();
-// Long tid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskCacheReq.getParam1(), pri_key));
-// Long pid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskCacheReq.getParam2(), pri_key));
- Long tid=Long.valueOf(serviceSubTaskCacheReq.getParam1());
- Long pid=Long.valueOf(serviceSubTaskCacheReq.getParam2());
- if (CollectionUtils.isNotEmpty(serviceSubTaskCacheReq.getIvrTaskTemplateScriptVOList())) {
- //闅忚
- redisCache.setCacheObject(pid + "-" + tid + "-SFscriptCache", serviceSubTaskCacheReq.getIvrTaskTemplateScriptVOList());
- } else if (CollectionUtils.isNotEmpty(serviceSubTaskCacheReq.getSvyTaskTemplateScriptVOList())) {
- //闂嵎
- redisCache.setCacheObject(pid + "-" + tid + "-WJscriptCache", serviceSubTaskCacheReq.getSvyTaskTemplateScriptVOList());
- }
+ Long tid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskCacheReq.getParam1(), pri_key));
+ Long pid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskCacheReq.getParam2(), pri_key));
+ //闂嵎
+ redisCache.setCacheObject(pid + "-" + tid + "-WJscriptCache", serviceSubTaskCacheReq.getSvyTaskTemplateScriptVOList());
return 1;
}
@Override
- public List<ServiceSubtaskAnswer> selectPatQuestionResult(ServiceSubTaskQueryReq serviceSubTaskQueryReq) {
+ public List<ServiceSubtaskDetailVO> selectPatQuestionResult(ServiceSubTaskQueryReq serviceSubTaskQueryReq) {
log.error("selectPatQuesTionResult鐨勫叆鍙備负锛歿}", serviceSubTaskQueryReq);
- ServiceSubtaskAnswer serviceSubtaskAnswer = new ServiceSubtaskAnswer();
- serviceSubtaskAnswer.setTaskid(serviceSubTaskQueryReq.getTaskid());
- serviceSubtaskAnswer.setPatId(serviceSubTaskQueryReq.getPatId());
- serviceSubtaskAnswer.setScriptid(serviceSubTaskQueryReq.getScriptid());
- List<ServiceSubtaskAnswer> serviceSubtaskAnswerList = serviceSubtaskAnswerMapper.selectServiceSubtaskAnswerList(serviceSubtaskAnswer);
- for (ServiceSubtaskAnswer serviceSubtaskAnswer1 : serviceSubtaskAnswerList) {
- ObjectMapper mapper = new ObjectMapper();
- try {
- List<ServiceSubtaskOptionAnswer> serviceSubtaskOptionAnswer = mapper.readValue(serviceSubtaskAnswer1.getAnswer(), List.class);
- serviceSubtaskAnswer1.setOptionAnswer(serviceSubtaskOptionAnswer);
- } catch (JsonProcessingException e) {
- e.printStackTrace();
- }
+ List<ServiceSubtaskDetailVO> serviceSubtaskDetailVOList = new ArrayList<>();
+ ServiceSubtaskDetail serviceSubtaskDetail = new ServiceSubtaskDetail();
+ serviceSubtaskDetail.setTaskid(serviceSubTaskQueryReq.getTaskid());
+ serviceSubtaskDetail.setPatid(serviceSubTaskQueryReq.getPatId());
+ serviceSubtaskDetail.setScriptid(serviceSubTaskQueryReq.getScriptid());
+ List<ServiceSubtaskDetail> serviceSubtaskDetails = serviceSubtaskDetailMapper.selectServiceSubtaskDetailList(serviceSubtaskDetail);
+ for (ServiceSubtaskDetail serviceSubtaskDetail1 : serviceSubtaskDetails) {
+ ServiceSubtaskDetailVO serviceSubtaskDetailVO = DtoConversionUtils.sourceToTarget(serviceSubtaskDetail1, ServiceSubtaskDetailVO.class);
+ SvyTaskTemplateTargetoption svyTaskTemplateTargetoption = new SvyTaskTemplateTargetoption();
+ svyTaskTemplateTargetoption.setScriptid(serviceSubtaskDetailVO.getScriptid());
+ svyTaskTemplateTargetoption.setTaskid(serviceSubtaskDetailVO.getTaskid());
+ List<SvyTaskTemplateTargetoption> svyTaskTemplateTargetoptions = svyTaskTemplateTargetoptionMapper.selectSvyTaskTemplateTargetoptionList(svyTaskTemplateTargetoption);
+ serviceSubtaskDetailVO.setSvyTaskTemplateTargetoptions(svyTaskTemplateTargetoptions);
+ serviceSubtaskDetailVOList.add(serviceSubtaskDetailVO);
}
- return serviceSubtaskAnswerList;
+ return serviceSubtaskDetailVOList;
}
- private void setSFInfo(IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO, Long taskid, Long patid) {
- ServiceSubtaskAnswer serviceSubtaskAnswer = new ServiceSubtaskAnswer();
- List<ServiceSubtaskOptionAnswer> answerList = new ArrayList<>();
- if (StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getScriptType()) && ivrTaskTemplateScriptVO.getScriptType().equals("1") || StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getScriptType()) && ivrTaskTemplateScriptVO.getScriptType().equals("2")) {
- //1銆�2涓哄崟閫夋垨澶氶��
- for (IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption : ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList()) {
- //鑾峰彇鐢ㄦ埛閫変腑鐨勯�夐」鍙�
- if (ivrTaskTemplateTargetoption.getIsUserOperation() == true) {
- ServiceSubtaskOptionAnswer serviceSubtaskOptionAnswer = new ServiceSubtaskOptionAnswer();
- serviceSubtaskOptionAnswer.setId(ivrTaskTemplateTargetoption.getId());
- serviceSubtaskOptionAnswer.setCode(ivrTaskTemplateTargetoption.getOptionCode());
- serviceSubtaskOptionAnswer.setValue(ivrTaskTemplateTargetoption.getTargetvalue());
- serviceSubtaskOptionAnswer.setAppenddesc(ivrTaskTemplateTargetoption.getAppenddesc());
- answerList.add(serviceSubtaskOptionAnswer);
- }
- }
- } else {
- //闈炲崟澶氶��
- if (CollectionUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList())) {
- log.error("IvrTaskScriptTargetoptionList鐨勫�间负锛歿}", ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList());
- ServiceSubtaskOptionAnswer serviceSubtaskOptionAnswer = new ServiceSubtaskOptionAnswer();
- serviceSubtaskOptionAnswer.setId(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(0).getId());
- serviceSubtaskOptionAnswer.setCode(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(0).getOptionCode());
- serviceSubtaskOptionAnswer.setValue(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(0).getTargetvalue());
- serviceSubtaskOptionAnswer.setAppenddesc(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(0).getAppenddesc());
- answerList.add(serviceSubtaskOptionAnswer);
- }
- }
- //鏁版嵁淇濆瓨
- serviceSubtaskAnswer.setTaskid(taskid);
- serviceSubtaskAnswer.setPatId(patid);
- serviceSubtaskAnswer.setScriptid(ivrTaskTemplateScriptVO.getId());
- serviceSubtaskAnswer.setScriptType(Long.valueOf(ivrTaskTemplateScriptVO.getScriptType()));
- serviceSubtaskAnswer.setAnswer(JSON.toJSONString(answerList));
- serviceSubtaskAnswer.setComment(null);
- serviceSubtaskAnswer.setCreateTime(new Date());
- serviceSubtaskAnswer.setUpdateTime(new Date());
- serviceSubtaskAnswerMapper.insertServiceSubtaskAnswer(serviceSubtaskAnswer);
- }
+ private Long setWJInfo(SvyTaskTemplateScriptVO svyTaskTemplateScriptVO, Long taskid, Long patid) {
+ //涓嬮璺宠浆
+ Long nextScriptNo = null;
- private void setWJInfo(SvyTaskTemplateScriptVO svyTaskTemplateScriptVO, Long taskid, Long patid) {
- ServiceSubtaskAnswer serviceSubtaskAnswer = null;
+ ServiceSubtaskDetailVO serviceSubtaskDetailVO = new ServiceSubtaskDetailVO();
List<ServiceSubtaskOptionAnswer> answerList = new ArrayList<>();
if (svyTaskTemplateScriptVO.getScriptType().equals("1") || svyTaskTemplateScriptVO.getScriptType().equals("2")) {
//1銆�2涓哄崟閫夋垨澶氶��
for (SvyTaskTemplateTargetoption svyTaskTemplateTargetoption : svyTaskTemplateScriptVO.getSvyTaskTemplateTargetoptions()) {
+ //灏嗛棶棰橀�夐」璁板綍涓嬫潵
+ if (StringUtils.isEmpty(serviceSubtaskDetailVO.getTargetvalue())) {
+ serviceSubtaskDetailVO.setTargetvalue(svyTaskTemplateTargetoption.getTargetvalue());
+ } else {
+ serviceSubtaskDetailVO.setTargetvalue(serviceSubtaskDetailVO.getTargetvalue() + " " + svyTaskTemplateTargetoption.getTargetvalue());
+ }
+
if (svyTaskTemplateTargetoption.getIsUserOperation() == true) {
- ServiceSubtaskOptionAnswer serviceSubtaskOptionAnswer = new ServiceSubtaskOptionAnswer();
- serviceSubtaskOptionAnswer.setId(svyTaskTemplateTargetoption.getId());
- serviceSubtaskOptionAnswer.setCode(svyTaskTemplateTargetoption.getOptionCode());
- serviceSubtaskOptionAnswer.setValue(svyTaskTemplateTargetoption.getTargetvalue());
- serviceSubtaskOptionAnswer.setAppenddesc(svyTaskTemplateTargetoption.getAppenddesc());
- answerList.add(serviceSubtaskOptionAnswer);
+ //灏嗛�変腑鐨勭粨鏋滄斁鍒癮srtext涓�
+ if (StringUtils.isEmpty(serviceSubtaskDetailVO.getAsrtext())) {
+ serviceSubtaskDetailVO.setAsrtext(svyTaskTemplateTargetoption.getTargetvalue());
+ } else {
+ //濡傛灉鏄閫夛紝绛旀闇�瑕佺敤 & 杩涜鎷兼帴
+ serviceSubtaskDetailVO.setAsrtext(serviceSubtaskDetailVO.getAnswerps() + "&" + svyTaskTemplateTargetoption.getTargetvalue());
+ }
+ if (svyTaskTemplateScriptVO.getScriptType().equals("1") && svyTaskTemplateScriptVO.getBranchFlag().equals("1")) {
+ //鏄崟閫夛紝骞朵笖鏄湁鍒嗘敮鐨�
+ nextScriptNo = svyTaskTemplateTargetoption.getNextQuestion();
+ } else {
+ nextScriptNo = svyTaskTemplateScriptVO.getNextScriptno();
+ }
}
}
+ serviceSubtaskDetailVO.setSvyTaskTemplateTargetoptions(svyTaskTemplateScriptVO.getSvyTaskTemplateTargetoptions());
} else {
//闈炲崟澶氶��
if (CollectionUtils.isNotEmpty(svyTaskTemplateScriptVO.getSvyTaskTemplateTargetoptions())) {
- ServiceSubtaskOptionAnswer serviceSubtaskOptionAnswer = new ServiceSubtaskOptionAnswer();
- serviceSubtaskOptionAnswer.setId(svyTaskTemplateScriptVO.getSvyTaskTemplateTargetoptions().get(0).getId());
- serviceSubtaskOptionAnswer.setCode(svyTaskTemplateScriptVO.getSvyTaskTemplateTargetoptions().get(0).getOptionCode());
- serviceSubtaskOptionAnswer.setValue(svyTaskTemplateScriptVO.getSvyTaskTemplateTargetoptions().get(0).getTargetvalue());
- serviceSubtaskOptionAnswer.setAppenddesc(svyTaskTemplateScriptVO.getSvyTaskTemplateTargetoptions().get(0).getAppenddesc());
- answerList.add(serviceSubtaskOptionAnswer);
+ serviceSubtaskDetailVO.setAsrtext(svyTaskTemplateScriptVO.getScriptResult());
+ nextScriptNo = svyTaskTemplateScriptVO.getNextScriptno();
}
}
- serviceSubtaskAnswer.setTaskid(Long.valueOf(taskid));
- serviceSubtaskAnswer.setPatId(Long.valueOf(patid));
- serviceSubtaskAnswer.setScriptid(svyTaskTemplateScriptVO.getId());
- serviceSubtaskAnswer.setScriptType(Long.valueOf(svyTaskTemplateScriptVO.getScriptType()));
- serviceSubtaskAnswer.setAnswer(JSON.toJSONString(answerList));
- serviceSubtaskAnswer.setComment(null);
- serviceSubtaskAnswer.setCreateTime(new Date());
- serviceSubtaskAnswer.setUpdateTime(new Date());
- serviceSubtaskAnswerMapper.insertServiceSubtaskAnswer(serviceSubtaskAnswer);
+ serviceSubtaskDetailVO.setTaskid(Long.valueOf(taskid));
+ serviceSubtaskDetailVO.setPatid(Long.valueOf(patid));
+ serviceSubtaskDetailVO.setScriptid(svyTaskTemplateScriptVO.getId());
+ serviceSubtaskDetailVO.setValueType(svyTaskTemplateScriptVO.getScriptType());
+ serviceSubtaskDetailVO.setAsrtext(JSON.toJSONString(answerList));
+ serviceSubtaskDetailVO.setComment(null);
+ serviceSubtaskDetailVO.setCreateTime(new Date());
+ serviceSubtaskDetailVO.setUpdateTime(new Date());
+ ServiceSubtaskDetail serviceSubtaskDetail = DtoConversionUtils.sourceToTarget(serviceSubtaskDetailVO, ServiceSubtaskDetail.class);
+ serviceSubtaskDetailMapper.insertServiceSubtaskDetail(serviceSubtaskDetail);
+ return nextScriptNo;
}
}
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 4e8f587..2d4efa9 100644
--- a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
@@ -12,6 +12,8 @@
import com.smartor.config.PhoneUtils;
import com.smartor.domain.*;
import com.smartor.mapper.*;
+import com.smartor.service.IIvrTaskTemplateScriptService;
+import com.smartor.service.IIvrTaskTemplateService;
import com.smartor.service.IServiceSubtaskService;
import com.smartor.service.IServiceTaskService;
import lombok.extern.slf4j.Slf4j;
@@ -24,10 +26,15 @@
import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
+import java.time.LocalTime;
+import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+
+import static cn.hutool.poi.excel.sax.AttributeName.r;
+import static cn.hutool.poi.excel.sax.AttributeName.s;
/**
* 鍗曚竴浠诲姟锛堥殢璁匡級Service涓氬姟灞傚鐞�
@@ -42,7 +49,7 @@
private ServiceSubtaskMapper serviceSubtaskMapper;
@Autowired
- private ServiceSubtaskDetailMapper ivrTaskcalldetailMapper;
+ private ServiceSubtaskDetailMapper serviceSubtaskDetailMapper;
@Autowired
private IServiceTaskService serviceTaskService;
@@ -58,6 +65,11 @@
@Autowired
private IvrLibaExtemplatescriptMapper ivrLibaExtemplatescriptMapper;
+
+ @Autowired
+ private IIvrTaskTemplateService ivrTaskTemplateService;
+ @Autowired
+ private IIvrTaskTemplateScriptService iIvrTaskTemplateScriptService;
@Value("${pri_key}")
private String pri_key;
@@ -219,7 +231,8 @@
if (ObjectUtils.isNotEmpty(serviceTaskVO.getSendTimeslot()))
serviceTask.setSendTimeSlot(JSON.toJSONString(serviceTaskVO.getSendTimeslot()));
if (serviceTask.getSendState() == null) serviceTask.setSendState(1);
- serviceTask.setTemplateid(serviceTaskVO.getLibtemplateid());
+ serviceTask.setLibtemplateid(serviceTaskVO.getLibtemplateid().toString());
+ serviceTask.setTemplateid(serviceTaskVO.getTemplateid());
serviceTaskService.insertServiceTask(serviceTask);
//灏嗕换鍔′俊鎭斁鍒版湇鍔¤〃涓�
@@ -233,11 +246,6 @@
serviceSubtask.setSendname(patTaskRelevance.getName());
serviceSubtask.setAge(patTaskRelevance.getAge());
serviceSubtask.setSfzh(patTaskRelevance.getSfzh());
- serviceSubtask.setPhone(patTaskRelevance.getPhone());
- serviceSubtask.setAddr(patTaskRelevance.getAddr());
- serviceSubtask.setPatid(patTaskRelevance.getPatid());
- serviceSubtask.setCreateTime(DateUtils.getNowDate());
- serviceSubtask.setSendstate(1L);
serviceSubtask.setType(serviceTaskVO.getHospType());
serviceSubtask.setHospType(patTaskRelevance.getHospType());
serviceSubtask.setOpenid(patTaskRelevance.getOpenid());
@@ -255,15 +263,10 @@
serviceTask.setStopState(serviceTask1.getStopState() + 1);
serviceTask.setTemplateid(serviceTaskVO.getLibtemplateid());
serviceTaskService.updateServiceTask(serviceTask);
-
if (CollectionUtils.isNotEmpty(serviceTaskVO.getPatTaskRelevances())) {
for (PatTaskRelevance patTaskRelevance : serviceTaskVO.getPatTaskRelevances()) {
-
ServiceSubtask serviceSubtask = DtoConversionUtils.sourceToTarget(serviceTaskVO, ServiceSubtask.class);
serviceSubtask.setSendname(patTaskRelevance.getName());
- serviceSubtask.setAge(patTaskRelevance.getAge());
- serviceSubtask.setSfzh(patTaskRelevance.getSfzh());
- serviceSubtask.setPhone(patTaskRelevance.getPhone());
serviceSubtask.setAddr(patTaskRelevance.getAddr());
serviceSubtask.setPatid(patTaskRelevance.getPatid());
serviceSubtask.setOpenid(patTaskRelevance.getOpenid());
@@ -292,7 +295,6 @@
@Override
public void phoneCallBack(PhoneCallBackVO phoneCallBackVO) {
-
phoneCallBackVO.setTextResult(phoneCallBackVO.getTextResult().substring(0, phoneCallBackVO.getTextResult().length() - 1));
SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat("YYYY-MM-dd HH:mm:ss");
@@ -335,15 +337,10 @@
if (noVoice == ivrTaskTemplateVO.getNoVoiceNum().intValue()) {
//宸茬粡闂簡瀵瑰簲鐨勯亶鏁帮紝灏卞垽鏂槸鍚﹁繕鏈変笅涓�棰�
if (nowQuestion.getTargetid() == IvrTaskTemplateScriptVOs.size()) {
- //娌℃湁涓嬩竴棰樹簡锛屽氨鎸傛柇鐢佃瘽锛屾挱鏀剧粨鏉熻
- redisCache.setCacheObject(phoneCallBackVO.getUuid() + "hangup", 1, 120, TimeUnit.MINUTES);
phoneUtils.ttsPlayback(ivrTaskTemplateVO.getRevisitAfter(), phoneCallBackVO.getUuid());
return;
} else {
//鏈変笅涓�棰�
- redisCache.setCacheObject(phoneCallBackVO.getUuid() + "noVoice", 0, 120, TimeUnit.MINUTES);
- IvrTaskTemplateScriptVO nextQuestion = getNextQuestion(IvrTaskTemplateScriptVOs, nowQuestion);
- // 闂锛� 鍘昏皟鐢ㄢ�渢ts鍚堟垚鍜屾挱鏀锯�濇帴鍙�
String date = simpleDateFormat1.format(new Date());
log.info("鍘昏皟鐢╰ts鍚堟垚鍜屾挱鏀炬帴鍙�: {},uuid涓猴細{}", date, phoneCallBackVO.getUuid());
phoneUtils.ttsPlayback(nowQuestion.getScriptContent(), phoneCallBackVO.getUuid());
@@ -376,60 +373,6 @@
Pattern pattern2 = Pattern.compile(nowQuestion.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2());
matcher2 = pattern2.matcher(phoneCallBackVO.getTextResult());
}
- log.error("PCB--getQuestionText闂涓猴細{},UUID锛歿}", nowQuestion.getScriptContent(), phoneCallBackVO.getUuid());
- if (StringUtils.isNotEmpty(nowQuestion.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() && StringUtils.isNotEmpty(nowQuestion.getIvrTaskScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches() || StringUtils.isEmpty(nowQuestion.getIvrTaskScriptTargetoptionList().get(j).getTargetregex()) && StringUtils.isNotEmpty(nowQuestion.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() || StringUtils.isEmpty(nowQuestion.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2()) && StringUtils.isNotEmpty(nowQuestion.getIvrTaskScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches()) {
- //璇存槑鍖归厤姝g‘浜�
- //杩欓噷搴旇鍏堝垽鏂被鍨嬶紝鍘诲啀淇敼锛岃缃甀sUserOperation鏄崟閫夐鐨勬敼娉�
- nowQuestion.getIvrTaskScriptTargetoptionList().get(j).setIsUserOperation(true);
- serviceTaskScriptTargetoptionMapper.updateIvrTaskTemplateTargetoption(nowQuestion.getIvrTaskScriptTargetoptionList().get(j));
-
- //灏嗛潤榛樼疆涓�0
- redisCache.setCacheObject(phoneCallBackVO.getUuid() + "noVoice", 0, 120, TimeUnit.MINUTES);
- redisCache.setCacheObject(phoneCallBackVO.getUuid() + "mateNum", 0, 120, TimeUnit.MINUTES);
-
- //灏嗘偅鑰呯殑鍥炵鍐欒繘琛ㄩ噷
- IvrTaskVisitResult serviceTaskVisitResult = DtoConversionUtils.sourceToTarget(serviceSubtask, IvrTaskVisitResult.class);
- serviceTaskVisitResult.setId(null);
- serviceTaskVisitResult.setQuestion(nowQuestion.getScriptContent());
- serviceTaskVisitResult.setPatientAnswer(phoneCallBackVO.getTextResult());
- serviceTaskVisitResult.setCreateTime(new Date());
- serviceTaskVisitResult.setOptionResult(nowQuestion.getIvrTaskScriptTargetoptionList().get(j).getTargetvalue());
- serviceTaskVisitResultMapper.insertIvrTaskVisitResult(serviceTaskVisitResult);
-
- //灏嗗尮閰嶅埌鐨勬爣璇嗘敼鎴恡rue
- isppd = true;
-
- //鑾峰彇涓嬩竴棰�
- Long nextQuestion = nowQuestion.getIvrTaskScriptTargetoptionList().get(j).getNextQuestion();
- for (IvrTaskTemplateScriptVO script : IvrTaskTemplateScriptVOs) {
- if (script.getTargetid() == nextQuestion) {
- QuestionMessage questionMessage = new QuestionMessage();
- questionMessage.setNowQuestion(script);
- questionMessage.setQuestionList(IvrTaskTemplateScriptVOs);
- redisCache.setCacheObject(phoneCallBackVO.getUuid() + "returnQues", questionMessage, 120, TimeUnit.MINUTES);
- phoneUtils.ttsPlayback(script.getScriptContent(), phoneCallBackVO.getUuid());
- return;
- } else if (nextQuestion > IvrTaskTemplateScriptVOs.size()) {
- //娌℃湁涓嬩竴棰樹簡锛屽氨缁撴潫浜�
- String date = simpleDateFormat1.format(new Date());
- log.error("娌℃湁涓嬩竴棰樹簡锛屽氨缁撴潫浜�: {},uuid涓猴細{}", date, phoneCallBackVO.getUuid());
- redisCache.setCacheObject(phoneCallBackVO.getUuid() + "hangup", 1, 120, TimeUnit.MINUTES);
- phoneUtils.ttsPlayback(ivrTaskTemplateVO.getRevisitAfter(), phoneCallBackVO.getUuid());
- try {
- Thread.sleep(3000);
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- phoneUtils.hangup("", "", ivrTaskTemplateVO.getRevisitAfter(), "", "", "", "", phoneCallBackVO.getUuid());
- return;
- }
- }
- return;
- } else {
- //娌℃湁鍖归厤涓婂綋鍓峯ption
- //Targetregex2 涓篺alse锛岃〃绀哄湪Targetregex2涓瓨鍦� 璇彞涓殑鍏抽敭瀛楋紝杩欎釜option灏变笉鐢ㄥ啀缁х画鍖归厤浜嗭紝鐩存帴鍖归厤涓嬩竴涓猳ption
- continue;
- }
}
if (isppd != true) {
@@ -444,8 +387,6 @@
IvrTaskTemplateScriptVO nextQuestion = getNextQuestion(IvrTaskTemplateScriptVOs, nowQuestion);
questionMessage.setQuestionList(IvrTaskTemplateScriptVOs);
questionMessage.setNowQuestion(nextQuestion);
- redisCache.setCacheObject(phoneCallBackVO.getUuid() + "returnQues", questionMessage, 120, TimeUnit.MINUTES);
- redisCache.setCacheObject(phoneCallBackVO.getUuid() + "mateNum", 0, 120, TimeUnit.MINUTES);
String date = simpleDateFormat1.format(new Date());
log.info("濡傛灉涓嬩竴棰樹负绌�.鍒欐柊鐨勬暟鎹繑鍥�,骞跺姞涓婃劅璋㈣: {},uuid涓猴細{}", date, phoneCallBackVO.getUuid());
phoneUtils.ttsPlayback(nextQuestion.getScriptContent(), phoneCallBackVO.getUuid());
@@ -454,7 +395,6 @@
//灏卞彲浠ユ寕鏂數璇濅簡
String date = simpleDateFormat1.format(new Date());
log.info("灏卞彲浠ユ寕鏂數璇濅簡------: {},uuid涓猴細{}", date, phoneCallBackVO.getUuid());
- redisCache.setCacheObject(phoneCallBackVO.getUuid() + "hangup", 1, 120, TimeUnit.MINUTES);
phoneUtils.ttsPlayback(ivrTaskTemplateVO.getRevisitAfter(), phoneCallBackVO.getUuid());
try {
Thread.sleep(3000);
@@ -481,39 +421,16 @@
}
List<IvrLibaExtemplatescript> ivrLibaExtemplatescripts = ivrLibaExtemplatescriptMapper.queryIvrLibaExtemplatescriptList(list1);
for (IvrLibaExtemplatescript ivrLibaExtemplatescript : ivrLibaExtemplatescripts) {
- Matcher matcher = null;
if (StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex())) {
Pattern pattern = Pattern.compile(ivrLibaExtemplatescript.getSelfRegex());
- matcher = pattern.matcher(returnQues.getContent());
+ pattern.matcher(returnQues.getContent());
}
- Matcher matcher2 = null;
if (StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex2())) {
Pattern pattern2 = Pattern.compile(ivrLibaExtemplatescript.getSelfRegex2());
- matcher2 = pattern2.matcher(returnQues.getContent());
+ pattern2.matcher(returnQues.getContent());
}
log.info("++++++++++++++++++++++++++閫氱敤搴撴槸鍚︿负绌猴細selfRegex : {} , selfRegex2 : {}", ivrLibaExtemplatescript.getSelfRegex(), ivrLibaExtemplatescript.getSelfRegex2());
- if (StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex()) && matcher.matches() && StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex2()) && matcher2.matches() || StringUtils.isEmpty(ivrLibaExtemplatescript.getSelfRegex()) && StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex2()) && matcher2.matches() || StringUtils.isEmpty(ivrLibaExtemplatescript.getSelfRegex2()) && StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex()) && matcher.matches()) {
- QuestionMessage questionMessage = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "returnQues");
- IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO = returnQues.getNowQuestion();
- ivrTaskTemplateScriptVO.setSubmoduleText(ivrLibaExtemplatescript.getSwitchText());
- ivrTaskTemplateScriptVO.setSubmoduleVoice(ivrLibaExtemplatescript.getSwitchWav());
- redisCache.setCacheObject(phoneCallBackVO.getUuid() + "returnQues", questionMessage, 120, TimeUnit.MINUTES);
- if (ivrLibaExtemplatescript.getIsEnd() == 1) {
- //灏嗛棶棰樼疆绌�
- IvrTaskTemplateScriptVO nowQuestion1 = questionMessage.getNowQuestion();
- nowQuestion1.setScriptContent(null);
- nowQuestion1.setScriptVoice(null);
- questionMessage.setNowQuestion(nowQuestion1);
- redisCache.setCacheObject(phoneCallBackVO.getUuid() + "returnQues", questionMessage, 120, TimeUnit.MINUTES);
-
- redisCache.setCacheObject(phoneCallBackVO.getUuid() + "isOver", 1, 120, TimeUnit.MINUTES);
- }
- //璋冪敤鈥�15銆乼ts鍚堟垚鍜屾挱鏀撅紝 tts_playback鈥濆皢缁撴灉浼犲洖
- String date = simpleDateFormat1.format(new Date());
- log.info("璋冪敤鈥�15銆乼ts鍚堟垚鍜屾挱鏀�------: {},uuid涓猴細{}", date, phoneCallBackVO.getUuid());
- phoneUtils.ttsPlayback(nowQuestion.getScriptContent() + ivrTaskTemplateScriptVO.getSubmoduleText(), phoneCallBackVO.getUuid());
- }
break;
}
String date = simpleDateFormat1.format(new Date());
@@ -523,261 +440,432 @@
}
}
- //涓嬮潰鐨勪唬鐮佷笉鑳藉垹闄わ紝涓婇潰鐨勬柟娉曞彧鏄厤鍚堢數璇濈鑱旇皟鐢ㄧ殑锛�
-// @Override
-// public PhoneCallBackVO phoneCallBack(PhoneCallBackVO phoneCallBackVO) {
-// log.error("phoneCallBackVO鐨勫叆鍙傦細{},{},{},{},{},{},{}", phoneCallBackVO.getResultType(), phoneCallBackVO.getUuid(), phoneCallBackVO.getErrResult(), phoneCallBackVO.getTextResult(), phoneCallBackVO.getHangUpResult(), phoneCallBackVO.getEnumState(), phoneCallBackVO.getUint8());
-// //鑾峰彇鏁版嵁
-// Boolean aBoolean = redisCache.hasKey(phoneCallBackVO.getUuid());
-// if (!aBoolean) {
-// throw new BaseException("璇uid涓嶅瓨鍦�");
-// }
-// Integer hangupValue = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "hangup");
-// if (hangupValue != null && hangupValue == 1) {
-// //hangupValue == 1 闅忚缁撴潫锛岀洿鎺ュ彲浠ユ寕鐢佃瘽
-// PhoneUtils phoneUtils = new PhoneUtils();
-// phoneUtils.hangup(phoneCallBackVO.getUuid(), null, null, null, null, null, null, null);
+ /**
+ * 鐢佃瘽ASR閫氳瘽鍥炶皟(闆ㄧ划)
+ *
+ * @param phoneCallReqYQVO
+ */
+ @Override
+ public PhoneCallBackYQVO phoneCallBackYQ(PhoneCallReqYQVO phoneCallReqYQVO) {
+ PhoneCallBackYQVO phoneCallBackYQVO = new PhoneCallBackYQVO();
+ //channel_create 閫氶亾鍒涘缓鐨勬椂鍊欙紝鍙互鎵ц涓�浜涘叾瀹冩搷浣滐紝璀鍙戜釜鐭俊涔嬬被鐨�; 鎴戜滑鐨勪笟鍔″彲浠ヤ笉鐢ㄧ PlayEventCallback 杩欎釜鏄挱鏀捐闊崇殑,鏆傛椂鐢ㄤ笉鍒� End_time()= -1鎴杗ull琛ㄧず褰撳墠鐨刟srtext涓嶆槸涓�鍙ュ畬鏁寸殑璇�
+ if (phoneCallReqYQVO.getOperate().equals("channel_create") || phoneCallReqYQVO.getOperate().equals("PlayEventCallback") || phoneCallReqYQVO.getEnd_time() == null || phoneCallReqYQVO.getEnd_time() == -1) {
+ return phoneCallBackYQVO;
+ }
+ //閫氳繃瀛愪换鍔D鑾峰彇鍒版ā鏉夸俊鎭�
+ ServiceSubtask serviceSubtask = serviceSubtaskMapper.selectServiceSubtaskById(Long.valueOf(phoneCallReqYQVO.getTaskid()));
+ IvrTaskTemplate ivrTaskTemplate = ivrTaskTemplateService.selectIvrTaskTemplateByID(serviceSubtask.getTemplateid());
+ //鑾峰彇妯℃澘闂
+ IvrTaskTemplateScript ivrTaskTemplateScript = new IvrTaskTemplateScript();
+ ivrTaskTemplateScript.setTemplateID(serviceSubtask.getTemplateid());
+ List<IvrTaskTemplateScript> ivrTaskTemplateScripts = iIvrTaskTemplateScriptService.selectIvrTaskTemplateScriptList(ivrTaskTemplateScript);
+ //鑾峰彇闂ID 鍜� 搴忓彿
+ String scriptId = redisCache.getCacheObject(phoneCallReqYQVO.getTaskid().trim() + "-" + phoneCallReqYQVO.getPhone().trim());
+ log.error("scriptId鏄灏戯細{}", scriptId);
+ //褰撳墠棰樼殑淇℃伅
+ IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO = iIvrTaskTemplateScriptService.getTaskTempScriptInfoByid(Long.valueOf(scriptId));
+ //鍒ゆ柇UUID鏄惁瀛樺湪
+ Boolean aBoolean = redisCache.hasKey(phoneCallReqYQVO.getUuid());
+ if (!aBoolean) {
+ //缁欓潤榛樿缃竴涓粯璁ゆ鏁板湪redis涓�
+ redisCache.setCacheObject(phoneCallReqYQVO.getUuid() + "noVoice", 0, 120, TimeUnit.MINUTES);
+ }
+
+ if ("SilentCallback".equals(phoneCallReqYQVO.getOperate())) {
+ //濡傛灉鏄潤榛樺洖璋�
+ Integer num = redisCache.getCacheObject(phoneCallReqYQVO.getUuid() + "noVoice");
+ //鍒ゆ柇闈欓粯鍥炶皟娆℃暟鏄惁灏忎笌妯℃澘瑙勫畾鐨勬鏁�
+ if (num < ivrTaskTemplate.getNoVoiceNum()) {
+ //灏忎笌鐨勮瘽,灏辩户缁棶鎮h��
+ phoneCallBackYQVO.setType("text");
+ phoneCallBackYQVO.setSilent_interval(ivrTaskTemplate.getSilencetime().intValue());
+ String scriptContent = ivrTaskTemplateScriptVO.getScriptContent();
+ phoneCallBackYQVO.setValue(getObject(serviceSubtask, scriptContent));
+ //灏嗛潤榛樻鏁板姞1
+ Integer noVoiceNum = redisCache.getCacheObject(phoneCallReqYQVO.getUuid() + "noVoice");
+ redisCache.setCacheObject(phoneCallReqYQVO.getUuid() + "noVoice", noVoiceNum + 1, 120, TimeUnit.MINUTES);
+ } else {
+ log.error("闈欓粯娆℃暟杈惧埌,鎸傛帀鐢佃瘽锛歿}", num);
+ //澶т笌绛変簬鐨勮瘽,鐩存帴鎸傛柇
+ phoneCallBackYQVO.setType("hangup");
+ phoneCallBackYQVO.setSilent_interval(ivrTaskTemplate.getSilencetime().intValue());
+ phoneCallBackYQVO.setValue(ivrTaskTemplate.getRevisitAfter());
+ //灏嗙粨鏋滃啓鍒癲etail涓�
+ ServiceSubTaskDetailReq serviceSubTaskDetailReq = new ServiceSubTaskDetailReq();
+ List<ServiceSubtaskDetail> serviceSubtaskDetailList = new ArrayList<>();
+ serviceSubtaskDetailList.add(getServiceSubtaskDetail(phoneCallReqYQVO, ivrTaskTemplateScriptVO, serviceSubtask, ivrTaskTemplate));
+ serviceSubTaskDetailReq.setServiceSubtaskDetailList(serviceSubtaskDetailList);
+ saveQuestionAnswerPhone(serviceSubTaskDetailReq);
+ redisCache.deleteObject(serviceSubtask.getId() + "-" + serviceSubtask.getPhone());
+ }
+ return phoneCallBackYQVO;
+ } else if ("AsrCallback".equals(phoneCallReqYQVO.getOperate())) {
+ //濡傛灉鏄枃鏈洖璋�
+ //鏍规嵁闂ID鑾峰彇璇ラ棶棰樼殑绫诲瀷
+ if (ivrTaskTemplateScriptVO.getScriptType().equals("1")) {
+ //鏄�夋嫨棰�
+ for (int j = 0; j < ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().size(); j++) {
+ log.error("phoneCallReqYQVO.getAsrtext()鐨勫�间负锛歿}", phoneCallReqYQVO.getAsrtext());
+ if (StringUtils.isEmpty(phoneCallReqYQVO.getAsrtext())) {
+ continue;
+ }
+ //鍖呭惈
+ Matcher matcher = null;
+ if (StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex())) {
+ Pattern pattern = Pattern.compile(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex());
+ matcher = pattern.matcher(phoneCallReqYQVO.getAsrtext());
+ }
+ //涓嶅寘鍚�
+ Matcher matcher2 = null;
+ if (StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2())) {
+ Pattern pattern2 = Pattern.compile(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2());
+ matcher2 = pattern2.matcher(phoneCallReqYQVO.getAsrtext());
+ }
+ if (StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() && StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches() || StringUtils.isEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex()) && StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() || StringUtils.isEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2()) && StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches()) {
+ //璇存槑鍖归厤姝g‘浜�
+ //杩欓噷搴旇鍏堝垽鏂被鍨嬶紝鍘诲啀淇敼锛岃缃甀sUserOperation鏄崟閫夐鐨勬敼娉�
+ ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).setIsUserOperation(1);
+ serviceTaskScriptTargetoptionMapper.updateIvrTaskTemplateTargetoption(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j));
+
+ //灏嗘偅鑰呯殑鍥炵鍐欒繘service_subtask_detail涓�
+ ServiceSubTaskDetailReq serviceSubTaskDetailReq = new ServiceSubTaskDetailReq();
+ List<ServiceSubtaskDetail> serviceSubtaskDetailList = new ArrayList<>();
+ ivrTaskTemplateScriptVO.setQuestionResult(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getOptiondesc());
+ serviceSubtaskDetailList.add(getServiceSubtaskDetail(phoneCallReqYQVO, ivrTaskTemplateScriptVO, serviceSubtask, ivrTaskTemplate));
+ serviceSubTaskDetailReq.setServiceSubtaskDetailList(serviceSubtaskDetailList);
+ saveQuestionAnswerPhone(serviceSubTaskDetailReq);
//
-// }
-//
-// Map<String, Object> map = redisCache.getCacheObject(phoneCallBackVO.getUuid());
-//// ObjectMapper objectMapper = new ObjectMapper();
-//// Map<String, Object> map = null;
-//// try {
-//// map = objectMapper.readValue(cacheObject, Map.class);
-//// } catch (JsonProcessingException e) {
-//// e.printStackTrace();
-//// }
-//
-// ServiceSubtask ServiceSubtask = (ServiceSubtask) map.get("ServiceSubtask");
-// List<IvrLibaTemplateScriptVO> ivrLibaTemplateScriptVOs = (List<IvrLibaTemplateScriptVO>) map.get("ivrLibaTemplateScriptVO");
-// //灏唘uid鏇存柊鍒版暟鎹簱涓�
-// ServiceSubtask.setSenduuid(phoneCallBackVO.getUuid());
-// ServiceSubtaskMapper.updateServiceSubtask(ServiceSubtask);
-//
-// //鑾峰彇妯℃澘淇℃伅
-// IvrLibaTemplateVO ivrLibaTemplateVO = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "ivrLibaTemplateVO");
-//
-//
-// //棣栧厛鍒ゆ柇resultType
-// if (phoneCallBackVO.getResultType() == 1) {
-// //鍛煎彨缁撴灉鎺ュ彛: 1
-// if (phoneCallBackVO.getUint8() == 1) {
-// //鍛煎彨澶辫触锛屽幓redis涓褰曚竴涓嬪け璐ユ鏁帮紝杩涜鍐嶆鍛煎彨
-// Integer integer = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "uint8");
-// if (integer != null) {
-// redisCache.setCacheObject(phoneCallBackVO.getUuid() + "uint8", integer + 1, 120, TimeUnit.MINUTES);
-// } else {
-// redisCache.setCacheObject(phoneCallBackVO.getUuid() + "uint8", 1, 120, TimeUnit.MINUTES);
-// }
-//
-// if (integer != null && integer == ServiceSubtask.getRecallcount().intValue()) {
-// log.info("鏃犱汉鎺ュ惉锛歿}, {}", phoneCallBackVO.getErrResult(), phoneCallBackVO.getUuid());
-// //杩炵画鎵撹瀹氭锛屽鏋滆娌′汉鎺ワ紝閭e氨缁撴潫
-// ServiceSubtask.setResult(phoneCallBackVO.getErrResult());
-// ServiceSubtaskMapper.updateServiceSubtask(ServiceSubtask);
-// redisCache.deleteObject(phoneCallBackVO.getUuid() + "uint8");
-// } else if (integer != null && integer < ServiceSubtask.getRecallcount().intValue()) {
-// //杩涜閲嶆嫧
-// PhoneUtils phoneUtils = new PhoneUtils();
-// phoneUtils.ob(null, null, null, null, null, null, null, ServiceSubtask.getPhone(), phoneCallBackVO.getUuid(), true);
-// }
-// }
-//
-// } else if (phoneCallBackVO.getResultType() == 2) {
-// //閫氳瘽鐘舵�佹洿鏂版帴鍙�: 2
-// if (phoneCallBackVO.getEnumState() == 0) {
-// // 0-鎸搩
-// Integer integer = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "enumState");
-//
-// if (integer != null && integer < ServiceSubtask.getRecallcount().intValue()) {
-// redisCache.setCacheObject(phoneCallBackVO.getUuid() + "enumState", integer + 1, 120, TimeUnit.MINUTES);
-// } else if (integer == null) {
-// redisCache.setCacheObject(phoneCallBackVO.getUuid() + "enumState", 1, 120, TimeUnit.MINUTES);
-// } else if (integer != null && integer == ServiceSubtask.getRecallcount().intValue()) {
-// ServiceSubtask.setResult("鏃犱汉鎺ュ惉");
-// ServiceSubtaskMapper.updateServiceSubtask(ServiceSubtask);
-// redisCache.deleteObject(phoneCallBackVO.getUuid() + "enumState");
-// }
-// } else if (phoneCallBackVO.getEnumState() == 2) {
-// //鎮h�呮寕鏂數璇�
-// log.info("鎮h�呮寕鏂數璇濓細{}", phoneCallBackVO.getUuid());
-// ServiceSubtask.setResult(phoneCallBackVO.getHangUpResult());
-// ServiceSubtaskMapper.updateServiceSubtask(ServiceSubtask);
-// redisCache.deleteObject(phoneCallBackVO.getUuid() + "enumState");
-// }
-//
-//
-// } else if (phoneCallBackVO.getResultType() == 3) {
-// //璇煶璇嗗埆缁撴灉涓婃姤鎺ュ彛: 3
-// Integer noVoice = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "noVoice");
-// QuestionMessage returnQues = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "returnQues");
-// IvrLibaTemplateScriptVO nowQuestion = returnQues.getNowQuestion();
-// PhoneUtils phoneUtils = new PhoneUtils();
-//
-// if (StringUtils.isEmpty(phoneCallBackVO.getTextResult())) {
-// //鏃犲洖璇�
-// //鍒ゆ柇noVoice鏄惁宸茬粡鍒颁簡鏈�澶у��
-// if (noVoice == ivrLibaTemplateVO.getNoVoiceNum().intValue()) {
-// //宸茬粡闂簡瀵瑰簲鐨勯亶鏁帮紝灏卞垽鏂槸鍚﹁繕鏈変笅涓�棰�
-// if (nowQuestion.getTargetid() == ivrLibaTemplateScriptVOs.size()) {
-// //娌℃湁涓嬩竴棰樹簡锛屽氨鎸傛柇鐢佃瘽锛屾挱鏀剧粨鏉熻
-// redisCache.setCacheObject(phoneCallBackVO.getUuid() + "hangup", 1, 120, TimeUnit.MINUTES);
-// phoneUtils.ttsPlayback(ivrLibaTemplateVO.getRevisitAfter(), phoneCallBackVO.getUuid());
-// } else {
-// //鏈変笅涓�棰�
-// redisCache.setCacheObject(phoneCallBackVO.getUuid() + "noVoice", 0, 120, TimeUnit.MINUTES);
-// IvrLibaTemplateScriptVO nextQuestion = getNextQuestion(ivrLibaTemplateScriptVOs, nowQuestion);
-// // 闂锛� 鍘昏皟鐢ㄢ�渢ts鍚堟垚鍜屾挱鏀锯�濇帴鍙�
-// phoneUtils.ttsPlayback(nowQuestion.getQuestionText(), phoneCallBackVO.getUuid());
-// }
-// } else {
-// redisCache.setCacheObject(phoneCallBackVO.getUuid() + "noVoice", noVoice + 1, 120, TimeUnit.MINUTES);
-// //璋冪敤ivrLibaTemplateScriptVO涓殑slienceText(闈欓粯璇濇湳)
-// String slienceText = nowQuestion.getSlienceText();
-// //闈欓粯璇濇湳 + 闂锛� 鍘昏皟鐢ㄢ�渢ts鍚堟垚鍜屾挱鏀锯�濇帴鍙�
-// phoneUtils.ttsPlayback(slienceText + nowQuestion.getQuestionText(), phoneCallBackVO.getUuid());
-// return new PhoneCallBackVO();
-// }
-//
-// } else {
-// //鏈夊洖璇濓紝瀵瑰洖绛旂殑闂,杩涜姝e垯鍖归厤锛堣繖閲屽彧閽堝閫夋嫨棰橈紝鍏跺畠棰樺瀷涓嶈锛�
-// for (int j = 0; j < nowQuestion.getIvrLibaScriptTargetoptionList().size(); j++) {
-// //鍖呭惈
-// Matcher matcher = null;
-// if (StringUtils.isNotEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex())) {
-// Pattern pattern = Pattern.compile(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex());
-// matcher = pattern.matcher(phoneCallBackVO.getTextResult());
-// }
-// //涓嶅寘鍚�
-// Matcher matcher2 = null;
-// if (StringUtils.isNotEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2())) {
-// Pattern pattern2 = Pattern.compile(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2());
-// matcher2 = pattern2.matcher(phoneCallBackVO.getTextResult());
-// }
-// log.info("phoneCallBack--Targetregex鐨勫�间负锛歿}, phoneCallBack--Targetregex2鐨勫�间负锛歿}", nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex(), nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2());
-// if (StringUtils.isNotEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches() && StringUtils.isNotEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() || StringUtils.isEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && StringUtils.isNotEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() || StringUtils.isEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && StringUtils.isNotEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches()) {
-// //璇存槑鍖归厤姝g‘浜�
-// //杩欓噷搴旇鍏堝垽鏂被鍨嬶紝鍘诲啀淇敼锛岃缃甀sUserOperation鏄崟閫夐鐨勬敼娉�
-// nowQuestion.getIvrLibaScriptTargetoptionList().get(j).setIsUserOperation(true);
-// ivrLibaScriptTargetoptionMapper.updateIvrLibaTemplateTargetoption(nowQuestion.getIvrLibaScriptTargetoptionList().get(j));
-//
-//
-// //灏嗛潤榛樼疆涓�0
-// redisCache.setCacheObject(phoneCallBackVO.getUuid() + "noVoice", 0, 120, TimeUnit.MINUTES);
-// redisCache.setCacheObject(phoneCallBackVO.getUuid() + "mateNum", 0, 120, TimeUnit.MINUTES);
// //鑾峰彇涓嬩竴棰�
-// Integer nextQuestion = nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getNextQuestion();
-// for (IvrLibaTemplateScriptVO script : ivrLibaTemplateScriptVOs) {
-// if (script.getTargetid() == nextQuestion) {
-// QuestionMessage questionMessage = new QuestionMessage();
-// questionMessage.setNowQuestion(script);
-// questionMessage.setQuestionList(ivrLibaTemplateScriptVOs);
-// redisCache.setCacheObject(phoneCallBackVO.getUuid() + "returnQues", questionMessage, 120, TimeUnit.MINUTES);
-// break;
-// }
-// }
-// break;
-// } else {
-// //娌℃湁鍖归厤鍒�
-// Integer mateNum = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "mateNum");
-// //鏃犲尮閰嶆鏁板幓鍒ゆ柇鏄惁鍒版渶澶ц闂鏁帮紝骞朵笖鎵�鏈夌殑閫夐」閮藉尮閰嶅畬浜�
-// if (mateNum == ivrLibaTemplateVO.getMateNum().intValue() && j == nowQuestion.getIvrLibaScriptTargetoptionList().size() - 1) {
-// //濡傛灉涓嬩竴棰樹负绌�.鍒欐柊鐨勬暟鎹繑鍥�,骞跺姞涓婃劅璋㈣
-// if (nowQuestion.getTargetid() < ivrLibaTemplateScriptVOs.size()) {
-// QuestionMessage questionMessage = new QuestionMessage();
-// IvrLibaTemplateScriptVO nextQuestion = getNextQuestion(ivrLibaTemplateScriptVOs, nowQuestion);
-// questionMessage.setQuestionList(ivrLibaTemplateScriptVOs);
-// questionMessage.setNowQuestion(nextQuestion);
-// redisCache.setCacheObject(phoneCallBackVO.getUuid() + "returnQues", questionMessage, 120, TimeUnit.MINUTES);
-// redisCache.setCacheObject(phoneCallBackVO.getUuid() + "mateNum", 0, 120, TimeUnit.MINUTES);
-// } else {
-// //灏卞彲浠ユ寕鏂數璇濅簡
-// redisCache.setCacheObject(phoneCallBackVO.getUuid() + "hangup", 1, 120, TimeUnit.MINUTES);
-// phoneUtils.ttsPlayback(ivrLibaTemplateVO.getRevisitAfter(), phoneCallBackVO.getUuid());
-// break;
-// }
-// } else if (mateNum < ivrLibaTemplateVO.getMateNum().intValue() && j == nowQuestion.getIvrLibaScriptTargetoptionList().size() - 1) {
-// //娌℃湁闂埌瑙勫畾娆℃暟
-// mateNum = mateNum + 1;
-// redisCache.setCacheObject(phoneCallBackVO.getUuid() + "mateNum", mateNum, 120, TimeUnit.MINUTES);
-// }
-// }
-//
-// }
-// //閫夐」鍖归厤瀹屾垚鍚庯紝闇�瑕佸啀鍘婚�氳繃搴撳啀杩涜鍖归厤涓�娆�
-// String extemplateID = ivrLibaTemplateVO.getSubmoduleID();
-// String[] split = extemplateID.split(",");
-// List<String> list = Arrays.asList(split);
-// List<Long> list1 = new ArrayList<>();
-// if (StringUtils.isNotEmpty(extemplateID)) {
-// for (String str : list) {
-// list1.add(Long.valueOf(str));
-// }
-// List<IvrLibaExtemplatescript> ivrLibaExtemplatescripts = ivrLibaExtemplatescriptMapper.queryIvrLibaExtemplatescriptList(list1);
-// for (IvrLibaExtemplatescript ivrLibaExtemplatescript : ivrLibaExtemplatescripts) {
-// Matcher matcher = null;
-// if (StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex())) {
-// Pattern pattern = Pattern.compile(ivrLibaExtemplatescript.getSelfRegex());
-// matcher = pattern.matcher(returnQues.getContent());
-// }
-//
-// Matcher matcher2 = null;
-// if (StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex2())) {
-// Pattern pattern2 = Pattern.compile(ivrLibaExtemplatescript.getSelfRegex2());
-// matcher2 = pattern2.matcher(returnQues.getContent());
-// }
-// log.info("++++++++++++++++++++++++++閫氱敤搴撴槸鍚︿负绌猴細selfRegex : {} , selfRegex2 : {}", ivrLibaExtemplatescript.getSelfRegex(), ivrLibaExtemplatescript.getSelfRegex2());
-// if (StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex()) && matcher.matches() && StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex2()) && matcher2.matches() || StringUtils.isEmpty(ivrLibaExtemplatescript.getSelfRegex()) && StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex2()) && matcher2.matches() || StringUtils.isEmpty(ivrLibaExtemplatescript.getSelfRegex2()) && StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex()) && matcher.matches()) {
-// QuestionMessage questionMessage = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "returnQues");
-// IvrLibaTemplateScriptVO ivrLibaTemplateScriptVO = returnQues.getNowQuestion();
-// ivrLibaTemplateScriptVO.setSubmoduleText(ivrLibaExtemplatescript.getSwitchText());
-// ivrLibaTemplateScriptVO.setSubmoduleVoice(ivrLibaExtemplatescript.getSwitchWav());
-// redisCache.setCacheObject(phoneCallBackVO.getUuid() + "returnQues", questionMessage, 120, TimeUnit.MINUTES);
-// if (ivrLibaExtemplatescript.getIsEnd() == 1) {
-// //灏嗛棶棰樼疆绌�
-// IvrLibaTemplateScriptVO nowQuestion1 = questionMessage.getNowQuestion();
-// nowQuestion1.setQuestionText(null);
-// nowQuestion1.setQuestionVoice(null);
-// questionMessage.setNowQuestion(nowQuestion1);
-// redisCache.setCacheObject(phoneCallBackVO.getUuid() + "returnQues", questionMessage, 120, TimeUnit.MINUTES);
-//
-// redisCache.setCacheObject(phoneCallBackVO.getUuid() + "isOver", 1, 120, TimeUnit.MINUTES);
-// }
-//
-// //璋冪敤鈥�15銆乼ts鍚堟垚鍜屾挱鏀撅紝 tts_playback鈥濆皢缁撴灉浼犲洖
-//
-//
-// }
-// break;
-// }
-// }
-//
-// }
-// }
-// return phoneCallBackVO;
-// }
+ if (ivrTaskTemplateScriptVO.getBranchFlag().equals("1") || ivrTaskTemplateScriptVO.getBranchFlag().equals("0") && ivrTaskTemplateScriptVO.getNextScriptno() != 0) {
+ Long nextQuestion = null;
+ if (ivrTaskTemplateScriptVO.getBranchFlag().equals("1")) {
+ nextQuestion = ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getNextQuestion();
+ } else {
+ nextQuestion = ivrTaskTemplateScriptVO.getNextScriptno();
+ }
+
+
+ for (IvrTaskTemplateScript script : ivrTaskTemplateScripts) {
+ if (script.getSort() == nextQuestion.intValue()) {
+ phoneCallBackYQVO.setType("text");
+ phoneCallBackYQVO.setSilent_interval(ivrTaskTemplate.getSilencetime().intValue());
+ String scriptContent = script.getScriptContent();
+ phoneCallBackYQVO.setValue(getObject(serviceSubtask, scriptContent));
+ //灏嗚鎮h�呯殑Redis涓殑棰樼洰ID锛岃繘琛屼慨鏀�
+ redisCache.setCacheObject(phoneCallReqYQVO.getTaskid().trim() + "-" + phoneCallReqYQVO.getPhone().trim(), script.getId().toString(), 120, TimeUnit.MINUTES);
+ //鍒犻櫎鏃犲搷搴�
+ redisCache.deleteObject(phoneCallReqYQVO.getTaskid().trim() + "&&" + "mate" + "&&" + phoneCallReqYQVO.getUuid());
+ }
+ }
+ } else if (ivrTaskTemplateScriptVO.getBranchFlag().equals("0")) {
+ if (ivrTaskTemplateScriptVO.getNextScriptno() == 0 || ivrTaskTemplateScriptVO.getNextScriptno() == null) {
+ phoneCallBackYQVO.setType("hangup");
+ phoneCallBackYQVO.setSilent_interval(ivrTaskTemplate.getSilencetime().intValue());
+ //璁剧疆缁撴潫璇�
+ phoneCallBackYQVO.setValue(ivrTaskTemplate.getRevisitAfter());
+ Long id = serviceSubtask.getId();
+ Map<String, String> map = delRedisValue(null, id.toString());
+ redisCache.setCacheObject(map.get("cacheName"), map.get("val"));
+ redisCache.deleteObject(serviceSubtask.getId() + "-" + serviceSubtask.getPhone());
+ redisCache.deleteObject(phoneCallReqYQVO.getTaskid().trim() + "&&" + "mate" + "&&" + phoneCallReqYQVO.getUuid());
+// return phoneCallBackYQVO;
+ }
+ }
+ } else {
+ continue;
+ }
+ }
+ //閮芥病鏈夊尮閰嶅埌
+ if (StringUtils.isEmpty(phoneCallBackYQVO.getValue())) {
+ Integer count = redisCache.getCacheObject(phoneCallReqYQVO.getTaskid().trim() + "&&" + "mate" + "&&" + phoneCallReqYQVO.getUuid());
+ if (count != null && count >= ivrTaskTemplate.getMateNum()) {
+ //濡傛灉count宸茬粡澶т簬鎴栫瓑浜庢病鏈夊尮閰嶆鏁�
+ if (ivrTaskTemplateScriptVO.getBranchFlag().equals("0") && ivrTaskTemplateScriptVO.getNextScriptno() == null || ivrTaskTemplateScriptVO.getBranchFlag().equals("0") && ivrTaskTemplateScriptVO.getNextScriptno() == 0 || ivrTaskTemplateScriptVO.getBranchFlag().equals("1") && ivrTaskTemplateScriptVO.getNextScriptno() == null || ivrTaskTemplateScriptVO.getBranchFlag().equals("1") && ivrTaskTemplateScriptVO.getNextScriptno() == 0) {
+ //濡傛灉鏄渶鍚庝竴閬撻锛屾垨鑰呮病鏈変笅涓�棰樹簡锛屽氨鐩存帴鎸傛満
+ phoneCallBackYQVO.setType("hangup");
+ phoneCallBackYQVO.setSilent_interval(ivrTaskTemplate.getSilencetime().intValue());
+ if (StringUtils.isNotEmpty(phoneCallBackYQVO.getValue()))
+ phoneCallBackYQVO.setValue(phoneCallBackYQVO.getValue() + ivrTaskTemplate.getRevisitAfter());
+ else phoneCallBackYQVO.setValue(ivrTaskTemplate.getRevisitAfter());
+ //鍘籸edis涓紝鎶婅瀛愪换鍔D鍒犻櫎
+ Long id = serviceSubtask.getId();
+ Map<String, String> map = delRedisValue(null, id.toString());
+ redisCache.setCacheObject(map.get("cacheName"), map.get("val"));
+ redisCache.deleteObject(serviceSubtask.getId() + "-" + serviceSubtask.getPhone());
+// return phoneCallBackYQVO;
+ } else {
+ //鏍规嵁ivrTaskTemplateScriptVO.getNextScriptno()鑾峰彇涓嬩竴棰樿繘琛屾彁闂�
+ for (IvrTaskTemplateScript script : ivrTaskTemplateScripts) {
+ if (script.getSort() == ivrTaskTemplateScriptVO.getNextScriptno().intValue()) {
+ phoneCallBackYQVO.setType("text");
+ phoneCallBackYQVO.setSilent_interval(ivrTaskTemplate.getSilencetime().intValue());
+ String scriptContent = script.getScriptContent();
+ phoneCallBackYQVO.setValue(getObject(serviceSubtask, scriptContent));
+ //灏嗚鎮h�呯殑Redis涓殑棰樼洰ID锛岃繘琛屼慨鏀�
+ redisCache.setCacheObject(phoneCallReqYQVO.getTaskid().trim() + "-" + phoneCallReqYQVO.getPhone().trim(), script.getId().toString(), 120, TimeUnit.MINUTES);
+ }
+ }
+ }
+ } else {
+ if (count == null)
+ redisCache.setCacheObject(phoneCallReqYQVO.getTaskid().trim() + "&&" + "mate" + "&&" + phoneCallReqYQVO.getUuid(), 1, 120, TimeUnit.MINUTES);
+ else
+ redisCache.setCacheObject(phoneCallReqYQVO.getTaskid().trim() + "&&" + "mate" + "&&" + phoneCallReqYQVO.getUuid(), count + 1, 120, TimeUnit.MINUTES);
+
+ phoneCallBackYQVO.setType("text");
+ phoneCallBackYQVO.setValue(ivrTaskTemplateScriptVO.getNoMatchText() + getObject(serviceSubtask, ivrTaskTemplateScriptVO.getScriptContent()));
+ }
+ }
+
+ } else {
+ //涓嶆槸閫夋嫨棰�,鐩存帴璁板綍绛旀锛屽皢缁撴灉鍐欏埌detail涓�
+ ServiceSubTaskDetailReq serviceSubTaskDetailReq = new ServiceSubTaskDetailReq();
+ List<ServiceSubtaskDetail> serviceSubtaskDetailList = new ArrayList<>();
+ serviceSubtaskDetailList.add(getServiceSubtaskDetail(phoneCallReqYQVO, ivrTaskTemplateScriptVO, serviceSubtask, ivrTaskTemplate));
+ serviceSubTaskDetailReq.setServiceSubtaskDetailList(serviceSubtaskDetailList);
+ saveQuestionAnswerPhone(serviceSubTaskDetailReq);
+
+ //濡傛灉閫夐」鍒嗘敮涓�1鐨勮瘽锛屽垯闇�瑕佹牴鎹棶棰樹笂鐨刵extScriptno杩涜璺宠浆
+ //闂瓟棰樻病鏈夎烦杞�
+ if (ivrTaskTemplateScriptVO.getNextScriptno() != null || ivrTaskTemplateScriptVO.getNextScriptno() != 0) {
+ for (IvrTaskTemplateScript ivrTaskTemplateScript1 : ivrTaskTemplateScripts) {
+ if (ivrTaskTemplateScriptVO.getNextScriptno().intValue() == ivrTaskTemplateScript1.getSort()) {
+ phoneCallBackYQVO.setType("text");
+ phoneCallBackYQVO.setSilent_interval(ivrTaskTemplate.getSilencetime().intValue());
+ String scriptContent = ivrTaskTemplateScript1.getScriptContent();
+ phoneCallBackYQVO.setValue(getObject(serviceSubtask, scriptContent));
+ redisCache.deleteObject(phoneCallReqYQVO.getTaskid().trim() + "&&" + "mate" + "&&" + phoneCallReqYQVO.getUuid());
+ }
+ }
+ } else if (ivrTaskTemplateScriptVO.getNextScriptno() == null) {
+ //娌℃湁涓嬩竴棰樹簡锛屽氨缁撴潫浜�
+ phoneCallBackYQVO.setType("hangup");
+ phoneCallBackYQVO.setSilent_interval(ivrTaskTemplate.getSilencetime().intValue());
+ phoneCallBackYQVO.setValue(ivrTaskTemplate.getRevisitAfter());
+ //鍘籸edis涓紝鎶婅瀛愪换鍔D鍒犻櫎
+ Long id = serviceSubtask.getId();
+ redisCache.deleteObject(serviceSubtask.getId() + "-" + serviceSubtask.getPhone());
+ log.error("鐢佃瘽鎸傛柇4");
+ }
+
+ //閫夐」鍖归厤瀹屾垚鍚庯紝闇�瑕佸啀鍘婚�氳繃搴撳啀杩涜鍖归厤涓�娆�
+ String extemplateID = ivrTaskTemplate.getSubmoduleID();
+ String[] split = extemplateID.split(",");
+ List<String> list = Arrays.asList(split);
+ List<Long> list1 = new ArrayList<>();
+ if (StringUtils.isNotEmpty(extemplateID)) {
+ for (String str : list) {
+ list1.add(Long.valueOf(str));
+ }
+ List<IvrLibaExtemplatescript> ivrLibaExtemplatescripts = ivrLibaExtemplatescriptMapper.queryIvrLibaExtemplatescriptList(list1);
+ for (IvrLibaExtemplatescript ivrLibaExtemplatescript : ivrLibaExtemplatescripts) {
+ Matcher matcher = null;
+ if (StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex())) {
+ Pattern pattern = Pattern.compile(ivrLibaExtemplatescript.getSelfRegex());
+ matcher = pattern.matcher(phoneCallReqYQVO.getAsrtext());
+ }
+
+ Matcher matcher2 = null;
+ if (StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex2())) {
+ Pattern pattern2 = Pattern.compile(ivrLibaExtemplatescript.getSelfRegex2());
+ matcher2 = pattern2.matcher(phoneCallReqYQVO.getAsrtext());
+ }
+ if (StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex()) && matcher.matches() && StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex2()) && matcher2.matches() || StringUtils.isEmpty(ivrLibaExtemplatescript.getSelfRegex()) && StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex2()) && matcher2.matches() || StringUtils.isEmpty(ivrLibaExtemplatescript.getSelfRegex2()) && StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex()) && matcher.matches()) {
+ //灏嗛�氱敤搴撳尮閰嶇殑锛屾斁鍒拌繑鍥炲�间腑
+ phoneCallBackYQVO.setValue(phoneCallBackYQVO.getValue() + ivrLibaExtemplatescript.getSwitchText());
+ }
+ break;
+ }
+ }
+
+ }
+
+ }
+ return phoneCallBackYQVO;
+ }
+
+ private String getObject(ServiceSubtask serviceSubtask, String scriptContent) {
+ Map<String, Map<String, String>> param = getParam(serviceSubtask.getTaskid());
+ for (Map<String, String> map : param.values()) {
+ for (String key : map.keySet()) {
+ scriptContent = scriptContent.replace(key, StringUtils.isNotEmpty(map.get(key)) ? map.get(key) : "");
+ }
+ }
+ scriptContent.replace("${name}", StringUtils.isNotEmpty(serviceSubtask.getName()) ? serviceSubtask.getName() : "");
+ scriptContent.replace("${dzz}", StringUtils.isNotEmpty(serviceSubtask.getPlaceOfResidence()) ? serviceSubtask.getPlaceOfResidence() : "");
+ scriptContent.replace("${phone}", StringUtils.isNotEmpty(serviceSubtask.getTelcode()) ? serviceSubtask.getTelcode() : "");
+
+ return scriptContent;
+ }
+
+
+ /**
+ * 鑾峰彇浠诲姟閲岀殑閫氶厤绗�
+ *
+ * @param taskId
+ * @return
+ */
+ private Map<String, Map<String, String>> getParam(Long taskId) {
+ ServiceTask serviceTask = serviceTaskService.selectServiceTaskByTaskid(taskId);
+ ObjectMapper objectMapper = new ObjectMapper();
+ Map<String, Map<String, String>> serviceTaskMap = null;
+ try {
+ serviceTaskMap = objectMapper.readValue(serviceTask.getTextParam(), Map.class);
+ } catch (JsonProcessingException e) {
+ e.printStackTrace();
+ }
+ return serviceTaskMap;
+ }
+
+ private Map<String, String> delRedisValue(String cache, String id) {
+ id = "," + id + ",";
+ String val = "";
+ String cacheName = "";
+ Map<String, String> map = new HashMap<>();
+
+ if (StringUtils.isNotEmpty(cache)) {
+ val = redisCache.getCacheObject(cache);
+ if (!StringUtils.isEmpty(val)) {
+ if (val.contains(id)) {
+ val = val.replaceAll(id, "");
+ }
+ }
+ map.put("val", val);
+ map.put("cacheName", cache);
+ return map;
+ }
+
+ for (int i = 0; i < 6; i++) {
+ val = redisCache.getCacheObject("cache-0" + i);
+ if (!StringUtils.isEmpty(val)) {
+ if (val.contains(id)) {
+ val = val.replaceAll(id, "");
+ map.put("val", val);
+ map.put("cacheName", "cache-0" + i);
+ }
+ }
+ }
+ return map;
+ }
+
+
+ /**
+ * 闆ㄧ划浠诲姟鎷夊彇
+ *
+ * @return
+ */
+ @Override
+ public List<PullTaskVO> taskPull() {
+ //pullTaskVOList鐢ㄤ簬鏁版嵁杩斿洖
+ List<PullTaskVO> pullTaskVOList = new ArrayList<>();
+ String value0 = redisCache.getCacheObject("cache-0");
+ // cache-0涓虹珛鍗冲彂璧风殑,鍏跺畠鐨勫厛鎺ㄨ繜
+ if (!StringUtils.isEmpty(value0)) {
+ pullTaskVOList = getPullTaskList(value0, "cache-0");
+ //灏哻ache-0鐨勬暟鎹紝杞Щ涓嶅鍔瞔ache-00涓�
+ String cache00 = redisCache.getCacheObject("cache-0");
+ if (!StringUtils.isEmpty(cache00)) redisCache.setCacheObject("cache-0", cache00 + "," + value0);
+ else redisCache.setCacheObject("cache-0", value0);
+ redisCache.deleteObject("cache-0");
+ } else {
+ for (int i = 1; i < 6; i++) {
+ //鍙栧嚭浠巆ache-1 鍒� cache-5鐨勭涓�涓瓙浠诲姟淇℃伅
+ String value = redisCache.getCacheObject("cache-" + i);
+ if (StringUtils.isEmpty(value)) continue;
+ List<PullTaskVO> pullTaskVOList2 = getPullTaskList(value, "cache-" + i);
+ if (CollectionUtils.isNotEmpty(pullTaskVOList2) && pullTaskVOList2.size() > 0) {
+ pullTaskVOList.addAll(pullTaskVOList2);
+ }
+ redisCache.deleteObject("cache-" + i);
+ }
+ }
+
+ return pullTaskVOList;
+ }
+
+
+ private List<PullTaskVO> getPullTaskList(String subIds, String cacheName) {
+ //pullTaskVOList鐢ㄤ簬鏁版嵁杩斿洖
+ List<PullTaskVO> pullTaskVOList = new ArrayList<>();
+ //newValue0鐢ㄤ簬淇濆瓨娌℃湁澶勭悊鐨勫瓙 浠诲姟
+ String newValue0 = "";
+ //鏍规嵁,鑾峰彇瀛愪换鍔$殑ID
+ String[] split = subIds.split(",,");
+ for (int i = 0; i < split.length; i++) {
+ if (cacheName.equals("cache-0") && i < 5 || !cacheName.equals("cache-0") && i < 1) {
+ PullTaskVO pullTaskVO = new PullTaskVO();
+ String subId = split[i].trim().replace(",", "");
+
+ ServiceSubtask serviceSubtask = serviceSubtaskMapper.selectServiceSubtaskById(Long.valueOf(subId));
+ IvrTaskTemplate ivrTaskTemplate = ivrTaskTemplateService.selectIvrTaskTemplateByID(serviceSubtask.getTemplateid());
+ //閫氳繃浠诲姟妯℃澘涓殑"绗竴娆¢棶棰樼紪鍙�"鑾峰彇绗竴涓棶棰�;
+ IvrTaskTemplateScript ivrTaskTemplateScript = null;
+ IvrTaskTemplateScript ivrTaskTemplateScript1 = new IvrTaskTemplateScript();
+ ivrTaskTemplateScript1.setTemplateID(ivrTaskTemplate.getId());
+ List<IvrTaskTemplateScript> ivrTaskTemplateScripts = iIvrTaskTemplateScriptService.selectIvrTaskTemplateScriptList(ivrTaskTemplateScript1);
+ aa:
+ for (IvrTaskTemplateScript ivrTaskTemplateScript2 : ivrTaskTemplateScripts) {
+ if (ivrTaskTemplate.getFirstQuestionNum() == Long.valueOf(ivrTaskTemplateScript2.getSort())) {
+ ivrTaskTemplateScript = ivrTaskTemplateScript2;
+ break aa;
+ }
+ }
+ //濡傛灉ivrTaskTemplateScript涓虹┖锛屼篃灏辨病鏈夊線涓嬫墽琛岀殑蹇呰浜�
+ if (ObjectUtils.isEmpty(ivrTaskTemplateScript)) return null;
+ //鑾峰彇閫氶厤绗﹀尮閰嶈繃鍚庣殑闂
+ String scrContent = getObject(serviceSubtask, ivrTaskTemplateScript.getScriptContent());
+ String kcb = ivrTaskTemplate.getRevisitBefore() + "," + scrContent;
+
+ //灏佽杩斿洖鏁版嵁
+ //taskId = 瀛愪换鍔D + 闂ID +闂搴忓彿
+ pullTaskVO.setTaskid(subId);
+ pullTaskVO.setAppkey("ZurNHpaQLq6P55YS");
+ pullTaskVO.setSections(LocalTime.now().format(DateTimeFormatter.ofPattern("hh:mm")) + "-" + LocalTime.now().plusMinutes(1).format(DateTimeFormatter.ofPattern("hh:mm")));
+ pullTaskVO.setPhones(serviceSubtask.getPhone());
+ pullTaskVO.setPrologue(kcb);
+ pullTaskVO.setDisplayNo("85129866");
+ pullTaskVOList.add(pullTaskVO);
+ redisCache.setCacheObject(subId.trim() + "-" + serviceSubtask.getPhone().trim(), ivrTaskTemplateScript.getId().toString());
+ } else {
+ if (StringUtils.isEmpty(newValue0)) {
+ newValue0 = "," + split[i].trim() + ",";
+ } else {
+ newValue0 = newValue0 + "," + split[i].trim() + ",";
+ }
+ redisCache.setCacheObject(cacheName, newValue0);
+ }
+ }
+
+ return pullTaskVOList;
+ }
@Override
public Integer saveQuestionAnswerPhone(ServiceSubTaskDetailReq serviceSubTaskDetailReq) {
- RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample();
- Long tid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskDetailReq.getParam1(), pri_key));
- Long pid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskDetailReq.getParam2(), pri_key));
- ServiceSubtask ivrTaskSingle = new ServiceSubtask();
- ivrTaskSingle.setTaskid(tid);
- ivrTaskSingle.setPatid(pid);
- List<ServiceSubtask> selectServiceSubtaskList = serviceSubtaskMapper.selectServiceSubtaskList(ivrTaskSingle);
- if (CollectionUtils.isEmpty(selectServiceSubtaskList) || selectServiceSubtaskList.size() == 0) {
- log.error("鎶ラ敊浜嗭紝selectServiceSubtaskList鏁版嵁涓虹┖浜嗭細{}", ivrTaskSingle);
- return 0;
- }
int i = 0;
- //闅忚
- for (ServiceSubtaskDetail serviceSubtaskDetail : serviceSubTaskDetailReq.getServiceSubtaskDetailList()) {
- serviceSubtaskDetail.setSubId(selectServiceSubtaskList.get(0).getId());
- serviceSubtaskDetail.setId(UUID.randomUUID().toString());
- serviceSubtaskDetail.setCreateTime(new Date());
- i = ivrTaskcalldetailMapper.insertServiceSubtaskDetail(serviceSubtaskDetail);
+ if (StringUtils.isNotEmpty(serviceSubTaskDetailReq.getParam1())) {
+ RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample();
+ Long tid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskDetailReq.getParam1(), pri_key));
+ Long pid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskDetailReq.getParam2(), pri_key));
+ ServiceSubtask ivrTaskSingle = new ServiceSubtask();
+ ivrTaskSingle.setTaskid(tid);
+ ivrTaskSingle.setPatid(pid);
+ List<ServiceSubtask> selectServiceSubtaskList = serviceSubtaskMapper.selectServiceSubtaskList(ivrTaskSingle);
+ if (CollectionUtils.isEmpty(selectServiceSubtaskList) || selectServiceSubtaskList.size() == 0) {
+ log.error("鎶ラ敊浜嗭紝selectServiceSubtaskList鏁版嵁涓虹┖浜嗭細{}", ivrTaskSingle);
+ return 0;
+ }
+ //闅忚
+ for (ServiceSubtaskDetail serviceSubtaskDetail : serviceSubTaskDetailReq.getServiceSubtaskDetailList()) {
+ serviceSubtaskDetail.setSubId(selectServiceSubtaskList.get(0).getId());
+ serviceSubtaskDetail.setId(UUID.randomUUID().toString());
+ serviceSubtaskDetail.setCreateTime(new Date());
+ i = serviceSubtaskDetailMapper.insertServiceSubtaskDetail(serviceSubtaskDetail);
+ }
+ } else {
+ for (ServiceSubtaskDetail serviceSubtaskDetail : serviceSubTaskDetailReq.getServiceSubtaskDetailList()) {
+ serviceSubtaskDetail.setCreateTime(new Date());
+ i = serviceSubtaskDetailMapper.insertServiceSubtaskDetail(serviceSubtaskDetail);
+ }
}
return i;
}
@@ -793,4 +881,43 @@
return null;
}
+
+ private ServiceSubtaskDetail getServiceSubtaskDetail(PhoneCallReqYQVO phoneCallReqYQVO, IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO, ServiceSubtask serviceSubtask, IvrTaskTemplate ivrTaskTemplate) {
+ ServiceSubtaskDetail serviceSubtaskDetail = new ServiceSubtaskDetail();
+ serviceSubtaskDetail.setSubId(Long.valueOf(phoneCallReqYQVO.getTaskid()));
+ serviceSubtaskDetail.setUuid(phoneCallReqYQVO.getUuid());
+ serviceSubtaskDetail.setPhone(phoneCallReqYQVO.getPhone());
+ serviceSubtaskDetail.setOperate(serviceSubtask.getCreateBy());
+ serviceSubtaskDetail.setDisplayno(phoneCallReqYQVO.getPhone());
+ serviceSubtaskDetail.setAssigntime(System.currentTimeMillis());
+ serviceSubtaskDetail.setStarttime(System.currentTimeMillis());
+ serviceSubtaskDetail.setAnswertime(System.currentTimeMillis());
+ serviceSubtaskDetail.setAsrtext("鏃犲簲绛�");
+ if (StringUtils.isNotEmpty(phoneCallReqYQVO.getAsrtext()))
+ serviceSubtaskDetail.setAsrtext(phoneCallReqYQVO.getAsrtext());
+ serviceSubtaskDetail.setBeginTime(System.currentTimeMillis());
+ serviceSubtaskDetail.setEndTime(System.currentTimeMillis());
+ serviceSubtaskDetail.setSentEnd(1L);
+ serviceSubtaskDetail.setTemplateid(ivrTaskTemplate.getId().toString());
+ serviceSubtaskDetail.setTemplatequestionnum(ivrTaskTemplateScriptVO.getId());
+ serviceSubtaskDetail.setQuestiontext(ivrTaskTemplateScriptVO.getScriptContent());
+ serviceSubtaskDetail.setCategoryname(ivrTaskTemplateScriptVO.getScriptType());
+ serviceSubtaskDetail.setTargetoptions(ivrTaskTemplateScriptVO.getTargetOptions());
+
+ int i = 1;
+ for (IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption : ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList()) {
+ if (ivrTaskTemplateTargetoption.getIsUserOperation() == 1) {
+ serviceSubtaskDetail.setMatchedtext(ivrTaskTemplateTargetoption.getTargetvalue());
+ }
+ serviceSubtaskDetail.setTargetvalue(StringUtils.isEmpty(serviceSubtaskDetail.getTargetvalue()) ? i + ivrTaskTemplateTargetoption.getTargetvalue() : serviceSubtaskDetail.getTargetvalue() + " " + (i + 1) + ivrTaskTemplateTargetoption.getTargetvalue());
+ }
+
+ serviceSubtaskDetail.setAddtime(new Date());
+ serviceSubtaskDetail.setIsupload(0L);
+ serviceSubtaskDetail.setUploadTime(new Date());
+ serviceSubtaskDetail.setDelFlag("0");
+ serviceSubtaskDetail.setValueType(ivrTaskTemplateScriptVO.getScriptType());
+ return serviceSubtaskDetail;
+ }
+
}
diff --git a/smartor/src/main/java/com/smartor/service/impl/ServiceTaskServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/ServiceTaskServiceImpl.java
index 7e26736..861dcbb 100644
--- a/smartor/src/main/java/com/smartor/service/impl/ServiceTaskServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/ServiceTaskServiceImpl.java
@@ -172,7 +172,7 @@
public List sfInfo(ServiceTask serviceTask, Long patid) {
//閫氳繃妯℃澘ID鑾峰彇闂淇℃伅
IvrLibaTemplateScript ivrLibaTemplateScript = new IvrLibaTemplateScript();
- ivrLibaTemplateScript.setTemplateid(serviceTask.getTemplateid());
+ ivrLibaTemplateScript.setTemplateid(Long.valueOf(serviceTask.getLibtemplateid()));
ivrLibaTemplateScript.setDelFlag("0");
List<IvrLibaTemplateScript> ivrLibaTemplateScripts = ivrLibaTemplateScriptMapper.selectIvrLibaTemplateScriptList(ivrLibaTemplateScript);
if (CollectionUtils.isEmpty(ivrLibaTemplateScripts) || ivrLibaTemplateScripts.size() == 0) {
diff --git a/smartor/src/main/java/com/smartor/service/impl/SmsParamServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/SmsParamServiceImpl.java
index 776f9ad..8da6b44 100644
--- a/smartor/src/main/java/com/smartor/service/impl/SmsParamServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/SmsParamServiceImpl.java
@@ -1,96 +1,114 @@
package com.smartor.service.impl;
-import java.util.List;
+import WebServiceClient.MessagingInsertLocator;
+import WebServiceClient.MessagingInsertSoap12Stub;
import com.ruoyi.common.utils.DateUtils;
+import com.smartor.domain.SmsParam;
+import com.smartor.mapper.SmsParamMapper;
+import com.smartor.service.ISmsParamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
-import com.smartor.mapper.SmsParamMapper;
-import com.smartor.domain.SmsParam;
-import com.smartor.service.ISmsParamService;
+
+import javax.xml.rpc.holders.IntHolder;
+import java.rmi.RemoteException;
+import java.util.Date;
+import java.util.List;
/**
* 鐭俊鍙傛暟Service涓氬姟灞傚鐞�
- *
+ *
* @author smartor
* @date 2023-03-06
*/
@Service
-public class SmsParamServiceImpl implements ISmsParamService
-{
+public class SmsParamServiceImpl implements ISmsParamService {
@Autowired
private SmsParamMapper smsParamMapper;
/**
* 鏌ヨ鐭俊鍙傛暟
- *
+ *
* @param paramid 鐭俊鍙傛暟涓婚敭
* @return 鐭俊鍙傛暟
*/
@Override
- public SmsParam selectSmsParamByParamid(Long paramid)
- {
+ public SmsParam selectSmsParamByParamid(Long paramid) {
return smsParamMapper.selectSmsParamByParamid(paramid);
}
/**
* 鏌ヨ鐭俊鍙傛暟鍒楄〃
- *
+ *
* @param smsParam 鐭俊鍙傛暟
* @return 鐭俊鍙傛暟
*/
@Override
- public List<SmsParam> selectSmsParamList(SmsParam smsParam)
- {
+ public List<SmsParam> selectSmsParamList(SmsParam smsParam) {
return smsParamMapper.selectSmsParamList(smsParam);
}
/**
* 鏂板鐭俊鍙傛暟
- *
+ *
* @param smsParam 鐭俊鍙傛暟
* @return 缁撴灉
*/
@Override
- public int insertSmsParam(SmsParam smsParam)
- {
+ public int insertSmsParam(SmsParam smsParam) {
smsParam.setCreateTime(DateUtils.getNowDate());
return smsParamMapper.insertSmsParam(smsParam);
}
+
/**
* 淇敼鐭俊鍙傛暟
- *
+ *
* @param smsParam 鐭俊鍙傛暟
* @return 缁撴灉
*/
@Override
- public int updateSmsParam(SmsParam smsParam)
- {
+ public int updateSmsParam(SmsParam smsParam) {
smsParam.setUpdateTime(DateUtils.getNowDate());
return smsParamMapper.updateSmsParam(smsParam);
}
/**
* 鎵归噺鍒犻櫎鐭俊鍙傛暟
- *
+ *
* @param paramids 闇�瑕佸垹闄ょ殑鐭俊鍙傛暟涓婚敭
* @return 缁撴灉
*/
@Override
- public int deleteSmsParamByParamids(Long[] paramids)
- {
+ public int deleteSmsParamByParamids(Long[] paramids) {
return smsParamMapper.deleteSmsParamByParamids(paramids);
}
/**
* 鍒犻櫎鐭俊鍙傛暟淇℃伅
- *
+ *
* @param paramid 鐭俊鍙傛暟涓婚敭
* @return 缁撴灉
*/
@Override
- public int deleteSmsParamByParamid(Long paramid)
- {
+ public int deleteSmsParamByParamid(Long paramid) {
return smsParamMapper.deleteSmsParamByParamid(paramid);
}
+
+ @Override
+ public int sendSmsInfo(String info, String phone) {
+ MessagingInsertSoap12Stub binding = null;
+ try {
+ binding = (MessagingInsertSoap12Stub) new MessagingInsertLocator().getMessagingInsertSoap12();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ String aa = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + "<Request>\n" + "<operate>S001</operate>\n" + "<Sheets>\n" + "<Sheet>\n" + "<Content>" + info + "</Content>\n" + "<Mobile>" + phone + "</Mobile>\n" + "<DateTime>" + new Date() + "</DateTime>\n" + "<Type>棰勭害鎸傚彿</Type>\n" + "</Sheet>\n" + "</Sheets>\n" + "</Request>";
+ Integer integer = null;
+ try {
+ integer = binding.SMSMessageAccept(aa, new IntHolder(), new javax.xml.rpc.holders.StringHolder());
+ } catch (RemoteException e) {
+ e.printStackTrace();
+ }
+ return integer;
+ }
}
diff --git a/smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateServiceImpl.java
index 7baac3f..ad115ec 100644
--- a/smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateServiceImpl.java
@@ -14,9 +14,7 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
+import java.util.*;
import java.util.stream.Collectors;
/**
@@ -127,6 +125,13 @@
//鍐嶅皢鏁寸悊濂界殑鈥滅柧鐥呭悕绉扳�濇浛鎹�
libTemplates.get(i).setIcdname(icdname);
}
+ //灏嗛棶棰樻寜搴忓彿鎺掍竴涓嬪簭
+ Collections.sort(svyLibTemplateVOS.get(j).getSvyTemplateLibScripts(), new Comparator<SvyLibTemplateScript>() {
+ @Override
+ public int compare(SvyLibTemplateScript o1, SvyLibTemplateScript o2) {
+ return Integer.compare(o1.getSort().intValue(), o2.getSort().intValue());
+ }
+ });
}
}
diff --git a/smartor/src/main/resources/mapper/smartor/IvrLibaScriptMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrLibaScriptMapper.xml
index 55b62e1..ae9c65b 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrLibaScriptMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrLibaScriptMapper.xml
@@ -145,7 +145,7 @@
<if test="tag != null">tag,</if>
<if test="isAvailable != null">isAvailable,</if>
<if test="reply != null">reply,</if>
- <if test="scriptContent != null">script_topic,</if>
+ <if test="scriptContent != null">script_content,</if>
<if test="scriptDesc != null">script_desc,</if>
<if test="scriptVoice != null">script_voice,</if>
<if test="noMatchText != null">nomatchtext,</if>
diff --git a/smartor/src/main/resources/mapper/smartor/IvrLibaTemplateMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrLibaTemplateMapper.xml
index aa61a4b..65c41ef 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrLibaTemplateMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrLibaTemplateMapper.xml
@@ -41,12 +41,16 @@
<result property="revisitAfter" column="revisit_after"/>
<result property="noVoiceNum" column="no_voice_num"/>
<result property="silencetime" column="silencetime"/>
+ <result property="sendDay" column="send_day"/>
+ <result property="longTemp" column="long_temp"/>
</resultMap>
<sql id="selectIvrLibaTemplateVo">
select id,
revisit_before,
revisit_after,
+ send_day,
+ long_temp,
templateName,
firstQuestionNum,
version,
@@ -71,6 +75,8 @@
'%')
</if>
<if test="id != null ">and id = #{id}</if>
+ <if test="sendDay != null ">and send_day = #{sendDay}</if>
+ <if test="longTemp != null ">and long_temp = #{longTemp}</if>
<if test="revisitAfter != null ">and revisit_after = #{revisitAfter}</if>
<if test="revisitBefore != null ">and revisit_before = #{revisitBefore}</if>
<if test="mateNum != null and mateNum > 0">and mate_num = #{mateNum}</if>
@@ -150,6 +156,8 @@
<if test="revisitBefore != null ">revisit_before,</if>
<if test="noVoiceNum != null and noVoiceNum > 0 ">no_voice_num,</if>
<if test="silencetime != null ">silencetime,</if>
+ <if test="sendDay != null ">send_day,</if>
+ <if test="longTemp != null ">long_temp,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="templateName != null and templateName != ''">#{templateName},</if>
@@ -187,7 +195,8 @@
<if test="revisitBefore != null ">#{revisitBefore},</if>
<if test="noVoiceNum != null and noVoiceNum > 0">#{noVoiceNum},</if>
<if test="silencetime != null ">#{silencetime},</if>
-
+ <if test="sendDay != null ">#{sendDay},</if>
+ <if test="longTemp != null ">#{longTemp},</if>
</trim>
</insert>
@@ -229,7 +238,9 @@
<if test="revisitAfter != null ">revisit_after = #{revisitAfter},</if>
<if test="revisitBefore != null ">revisit_before = #{revisitBefore},</if>
<if test="noVoiceNum != null and noVoiceNum > 0 ">no_voice_num = #{noVoiceNum},</if>
- <if test="silencetime != null">silencetime = #{silencetime}</if>
+ <if test="silencetime != null">silencetime = #{silencetime},</if>
+ <if test="sendDay != null ">send_day = #{sendDay},</if>
+ <if test="longTemp != null ">long_temp = #{longTemp},</if>
</trim>
where id = #{id}
</update>
diff --git a/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateMapper.xml
index 0de43fd..e70c55c 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateMapper.xml
@@ -60,11 +60,14 @@
<result property="libtemplatename" column="libtemplatename"/>
<result property="recallcount" column="recallcount"/>
<result property="instruction" column="instruction"/>
+ <result property="sendDay" column="send_day"/>
+
</resultMap>
<sql id="selectIvrTaskTemplateVo">
select id,
taskid,
+ send_day,
recallcount,
instruction,
libtemplateid,
@@ -86,6 +89,7 @@
<include refid="selectIvrTaskTemplateVo"/>
<where>
<if test="taskid != null ">and taskid = #{taskid}</if>
+ <if test="sendDay != null ">and send_day = #{sendDay}</if>
<if test="id != null ">and id = #{id}</if>
<if test="taskname != null and taskname != ''">and taskname like concat('%', #{taskname}, '%')</if>
<if test="targetid != null ">and targetid = #{targetid}</if>
@@ -205,6 +209,7 @@
<if test="libtemplateid != null ">libtemplateid,</if>
<if test="libtemplatename != null ">libtemplatename,</if>
<if test="instruction != null ">instruction,</if>
+ <if test="sendDay != null ">send_day,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="taskid != null">#{taskid},</if>
@@ -261,6 +266,7 @@
<if test="libtemplateid != null ">#{libtemplateid},</if>
<if test="libtemplatename != null ">#{libtemplatename},</if>
<if test="instruction != null ">#{instruction},</if>
+ <if test="sendDay != null ">#{sendDay},</if>
</trim>
</insert>
@@ -321,6 +327,7 @@
<if test="libtemplateid != null ">libtemplateid = #{libtemplateid},</if>
<if test="libtemplatename != null ">libtemplatename = #{libtemplatename},</if>
<if test="instruction != null ">instruction = #{instruction},</if>
+ <if test="sendDay != null ">send_day = #{sendDay},</if>
</trim>
where id = #{id}
</update>
diff --git a/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateScriptMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateScriptMapper.xml
index c5afd34..5da543e 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateScriptMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateScriptMapper.xml
@@ -40,17 +40,23 @@
<result property="questionResult" column="question_result"/>
<result property="branchFlag" column="branch_flag"/>
<result property="branchNextscriptno" column="branch_nextscriptno"/>
+ <result property="nextScriptno" column="next_scriptno"/>
<result property="scriptType" column="script_type"/>
+ <result property="scriptContent" column="script_content"/>
+ <result property="sort" column="sort"/>
</resultMap>
<sql id="selectIvrTaskTemplateScriptVo">
select id,
taskid,
+ sort,
script_type,
branch_flag,
branch_nextscriptno,
+ next_scriptno,
templateID,
questionPoint,
+ script_content,
noMatchText,
noMatchVoice,
slienceText,
@@ -69,6 +75,7 @@
<include refid="selectIvrTaskTemplateScriptVo"/>
<where>
<if test="taskid != null ">and taskid = #{taskid}</if>
+ <if test="sort != null ">and sort = #{sort}</if>
<if test="templateID != null ">and templateID = #{templateID}</if>
<if test="questionPoint != null and questionPoint != ''">and questionPoint = #{questionPoint}</if>
<if test="noMatchText != null and noMatchText != ''">and noMatchText = #{noMatchText}</if>
@@ -99,6 +106,8 @@
<if test="questionResult != null and questionResult != ''">and question_result = #{questionResult}</if>
<if test="branchFlag != null and branchFlag != ''">and branch_flag = #{branchFlag}</if>
<if test="scriptType != null and scriptType != ''">and script_type = #{scriptType}</if>
+ <if test="scriptContent != null and scriptContent != ''">and script_content = #{scriptContent}</if>
+ <if test="nextScriptno != null and nextScriptno != ''">and next_scriptno = #{nextScriptno}</if>
<if test="branchNextscriptno != null and branchNextscriptno != ''">and branch_nextscriptno =
#{branchNextscriptno}
</if>
@@ -149,6 +158,9 @@
<if test="branchFlag != null and branchFlag != ''">branch_flag,</if>
<if test="branchNextscriptno != null and branchNextscriptno != ''">branch_nextscriptno,</if>
<if test="scriptType != null and scriptType != ''">script_type,</if>
+ <if test="scriptContent != null and scriptContent != ''">script_content,</if>
+ <if test="sort != null ">sort,</if>
+ <if test="nextScriptno != null and nextScriptno != ''">next_scriptno,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="taskid != null">#{taskid},</if>
@@ -186,6 +198,9 @@
<if test="branchFlag != null and branchFlag != ''">#{branchFlag},</if>
<if test="branchNextscriptno != null and branchNextscriptno != ''">#{branchNextscriptno},</if>
<if test="scriptType != null and scriptType != ''">#{scriptType},</if>
+ <if test="scriptContent != null and scriptContent != ''">#{scriptContent},</if>
+ <if test="sort != null">#{sort},</if>
+ <if test="nextScriptno != null and nextScriptno != ''">#{nextScriptno},</if>
</trim>
</insert>
@@ -229,6 +244,9 @@
#{branchNextscriptno},
</if>
<if test="scriptType != null and scriptType != ''">script_type = #{scriptType},</if>
+ <if test="scriptContent != null and scriptContent != ''">script_content = #{scriptContent},</if>
+ <if test="sort != null">sort = #{sort},</if>
+ <if test="nextScriptno != null and nextScriptno != ''">next_scriptno = #{nextScriptno},</if>
</trim>
where id = #{id}
</update>
diff --git a/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateTargetoptionMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateTargetoptionMapper.xml
index 4cac445..08e78a5 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateTargetoptionMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateTargetoptionMapper.xml
@@ -38,12 +38,14 @@
<result property="nextQuestion" column="next_question"/>
<result property="appenddesc" column="appenddesc"/>
<result property="optionCode" column="option_code"/>
+ <result property="isUserOperation" column="is_user_operation"/>
</resultMap>
<sql id="selectIvrTaskTemplateTargetoptionVo">
select id,
taskid,
templateID,
+ is_user_operation,
appenddesc,
targetid,
option_code,
@@ -92,6 +94,7 @@
<if test="nextQuestion != null ">and next_question = #{nextQuestion}</if>
<if test="appenddesc != null ">and appenddesc = #{appenddesc}</if>
<if test="optionCode != null ">and option_code = #{optionCode}</if>
+ <if test="isUserOperation != null ">and is_user_operation = #{isUserOperation}</if>
</where>
</select>
@@ -137,6 +140,7 @@
<if test="nextQuestion != null">next_question,</if>
<if test="appenddesc != null">appenddesc,</if>
<if test="optionCode != null ">option_code,</if>
+ <if test="isUserOperation != null ">is_user_operation,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="taskid != null">#{taskid},</if>
@@ -171,6 +175,7 @@
<if test="nextQuestion != null">#{nextQuestion},</if>
<if test="appenddesc != null">#{appenddesc},</if>
<if test="optionCode != null ">#{optionCode},</if>
+ <if test="isUserOperation != null ">#{isUserOperation},</if>
</trim>
</insert>
@@ -209,6 +214,8 @@
<if test="nextQuestion != null">next_question = #{nextQuestion},</if>
<if test="appenddesc != null">appenddesc = #{appenddesc},</if>
<if test="optionCode != null ">option_code = #{optionCode},</if>
+ <if test="isUserOperation != null ">is_user_operation = #{isUserOperation},</if>
+
</trim>
where id = #{id}
</update>
diff --git a/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml b/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
index ab22592..e8e8dc2 100644
--- a/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
@@ -81,6 +81,7 @@
<if test="isupload != null ">and isupload = #{isupload}</if>
<if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
<if test="viptype != null ">and viptype = #{viptype}</if>
+ <if test="pattype != null ">and pattype = #{pattype}</if>
</where>
</select>
@@ -271,6 +272,7 @@
</if>
</where>
+ order by a.update_time desc
</select>
@@ -359,6 +361,7 @@
AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid)
</if>
</where>
+ order by a.update_time desc
</select>
<select id="selectPatArchiveInfoByOuthosp" parameterType="com.smartor.domain.PatArchiveReq"
@@ -431,6 +434,7 @@
AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid)
</if>
</where>
+ order by a.update_time desc
</select>
<select id="selectPatArchiveInfoByPhysical" parameterType="com.smartor.domain.PatArchiveReq"
@@ -504,7 +508,7 @@
AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid)
</if>
</where>
-
+ order by a.update_time desc
</select>
</mapper>
diff --git a/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml b/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
index cd627b7..a9510ce 100644
--- a/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
@@ -46,10 +46,12 @@
<result property="schemetime" column="schemetime" />
<result property="patname" column="patname" />
<result property="patno" column="patno" />
+ <result property="inhospstate" column="inhospstate" />
+ <result property="checkFlag" column="check_flag" />
</resultMap>
<sql id="selectPatMedInhospVo">
- select inhospid,inhospno, serialnum, hospitalname, hospitalcode, hospitaldistrictcode, hospitaldistrictname, icd10code, diagname, starttime, endtime, deptcode, deptname, roomno, bed_no, orgid, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, patid, leavediagname, leaveicd10code, drcode, drname, schemestatus, generalschemestatus, leaveldeptcode, leaveldeptname, hospitaldistrictid, leavehospitaldistrictcode, leavehospitaldistrictname, leavehospitaldistrictid, deptid, leaveldeptid, schemetime from pat_med_inhosp
+ select inhospid,patname,check_flag,inhospstate,patno,inhospno, serialnum, hospitalname, hospitalcode, hospitaldistrictcode, hospitaldistrictname, icd10code, diagname, starttime, endtime, deptcode, deptname, roomno, bed_no, orgid, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, patid, leavediagname, leaveicd10code, drcode, drname, schemestatus, generalschemestatus, leaveldeptcode, leaveldeptname, hospitaldistrictid, leavehospitaldistrictcode, leavehospitaldistrictname, leavehospitaldistrictid, deptid, leaveldeptid, schemetime from pat_med_inhosp
</sql>
<select id="selectPatMedInhospList" parameterType="com.smartor.domain.PatMedInhosp" resultMap="PatMedInhospResult">
@@ -60,11 +62,15 @@
<if test="hospitaldistrictname != null and hospitaldistrictname != ''"> and hospitaldistrictname like concat('%', #{hospitaldistrictname}, '%')</if>
<if test="endtime != null "> and endtime = #{endtime}</if>
<if test="patno != null "> and patno = #{patno}</if>
+ <if test="checkFlag != null "> and check_flag = #{checkFlag}</if>
+ <if test="inhospstate != null "> and inhospstate = #{inhospstate}</if>
+ <if test="schemestatus != null "> and schemestatus = #{schemestatus}</if>
<if test="leavediagname != null and leavediagname != ''"> and leavediagname like concat('%', #{leavediagname}, '%')</if>
<if test="drname != null and drname != ''"> and drname like concat('%', #{drname}, '%')</if>
<if test="leaveldeptname != null and leaveldeptname != ''"> and leaveldeptname like concat('%', #{leaveldeptname}, '%')</if>
<if test="leavehospitaldistrictname != null and leavehospitaldistrictname != ''"> and leavehospitaldistrictname like concat('%', #{leavehospitaldistrictname}, '%')</if>
</where>
+ order by update_time desc
</select>
<select id="selectPatMedInhospByInhospid" parameterType="Long" resultMap="PatMedInhospResult">
@@ -114,6 +120,8 @@
<if test="schemetime != null">schemetime,</if>
<if test="patname!= null">patname,</if>
<if test="patno != null">patno,</if>
+ <if test="inhospstate != null">inhospstate,</if>
+ <if test="checkFlag != null">check_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="serialnum != null">#{serialnum},</if>
@@ -155,6 +163,8 @@
<if test="schemetime != null">#{schemetime},</if>
<if test="patname!= null">#{patname},</if>
<if test="patno != null">#{patno},</if>
+ <if test="inhospstate != null">#{inhospstate},</if>
+ <if test="checkFlag != null">#{checkFlag},</if>
</trim>
</insert>
@@ -200,6 +210,8 @@
<if test="schemetime != null">schemetime = #{schemetime},</if>
<if test="patname!= null">patname = #{patname},</if>
<if test="patno != null">patno = #{patno},</if>
+ <if test="inhospstate != null">inhospstate = #{inhospstate},</if>
+ <if test="checkFlag != null">check_flag = #{checkFlag},</if>
</trim>
where inhospid = #{inhospid}
</update>
diff --git a/smartor/src/main/resources/mapper/smartor/PatMedInspectionMapper.xml b/smartor/src/main/resources/mapper/smartor/PatMedInspectionMapper.xml
index 5491c78..651f36e 100644
--- a/smartor/src/main/resources/mapper/smartor/PatMedInspectionMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatMedInspectionMapper.xml
@@ -99,6 +99,7 @@
<if test="deptname != null and deptname != ''">and deptname like concat('%', #{deptname}, '%')</if>
<if test="deptid != null ">and deptid = #{deptid}</if>
</where>
+ order by update_time desc
</select>
<select id="selectPatMedInspectionById" parameterType="Long" resultMap="PatMedInspectionResult">
@@ -215,4 +216,4 @@
#{id}
</foreach>
</delete>
-</mapper>
\ No newline at end of file
+</mapper>
diff --git a/smartor/src/main/resources/mapper/smartor/PatMedRegistrationMapper.xml b/smartor/src/main/resources/mapper/smartor/PatMedRegistrationMapper.xml
index 66d4f3b..97ab1e8 100644
--- a/smartor/src/main/resources/mapper/smartor/PatMedRegistrationMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatMedRegistrationMapper.xml
@@ -84,6 +84,7 @@
<if test="pid != null ">and pid = #{pid}</if>
<if test="guid != null and guid != ''">and guid = #{guid}</if>
</where>
+ order by create_time desc
</select>
<select id="selectPatMedRegistrationByRegistid" parameterType="Long" resultMap="PatMedRegistrationResult">
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskDetailMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskDetailMapper.xml
index dc782d3..62c313b 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskDetailMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskDetailMapper.xml
@@ -7,6 +7,7 @@
<resultMap type="com.smartor.domain.ServiceSubtaskDetail" id="ServiceSubtaskDetailResult">
<result property="id" column="id"/>
<result property="subId" column="sub_id"/>
+ <result property="taskid" column="taskid"/>
<result property="uuid" column="uuid"/>
<result property="phone" column="phone"/>
<result property="operate" column="operate"/>
@@ -46,11 +47,20 @@
<result property="updateTime" column="update_time"/>
<result property="createBy" column="create_by"/>
<result property="valueType" column="value_type"/>
+ <result property="scriptid" column="scriptid"/>
+ <result property="answerps" column="answerps"/>
+ <result property="comment" column="comment"/>
+ <result property="patid" column="patid"/>
</resultMap>
<sql id="selectServiceSubtaskDetailVo">
select id,
sub_id,
+ answerps,
+ scriptid,
+ comment,
+ patid,
+ taskid,
uuid,
phone,
operate,
@@ -90,7 +100,7 @@
update_time,
value_type,
create_by
- from ivr_taskcalldetail
+ from service_subtask_detail
</sql>
<select id="selectServiceSubtaskDetailList" parameterType="com.smartor.domain.ServiceSubtaskDetail"
@@ -98,6 +108,7 @@
<include refid="selectServiceSubtaskDetailVo"/>
<where>
<if test="subId != null">and sub_id = #{subId}</if>
+ <if test="taskid != null">and taskid = #{taskid}</if>
<if test="uuid != null and uuid != ''">and uuid = #{uuid}</if>
<if test="phone != null and phone != ''">and phone = #{phone}</if>
<if test="operate != null and operate != ''">and operate = #{operate}</if>
@@ -134,6 +145,10 @@
<if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
<if test="orgid != null and orgid != ''">and orgid = #{orgid}</if>
<if test="valueType != null and valueType != ''">and value_type = #{valueType}</if>
+ <if test="answerps != null and answerps != ''">and answerps = #{answerps}</if>
+ <if test="comment != null and comment != ''">and comment = #{comment}</if>
+ <if test="scriptid != null ">and scriptid = #{scriptid}</if>
+ <if test=" patid != null">and patid = #{patid}</if>
</where>
</select>
@@ -143,10 +158,11 @@
</select>
<insert id="insertServiceSubtaskDetail" parameterType="com.smartor.domain.ServiceSubtaskDetail">
- insert into ivr_taskcalldetail
+ insert into service_subtask_detail
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="subId != null">sub_id,</if>
+ <if test="taskid != null">taskid,</if>
<if test="uuid != null">uuid,</if>
<if test="phone != null">phone,</if>
<if test="operate != null">operate,</if>
@@ -186,10 +202,15 @@
<if test="updateTime != null">update_time,</if>
<if test="createBy != null">create_by,</if>
<if test="valueType != null">value_type,</if>
+ <if test="answerps != null and answerps != ''">answerps,</if>
+ <if test="comment != null and comment != ''">comment,</if>
+ <if test="scriptid != null ">scriptid,</if>
+ <if test=" patid != null">patid,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="subId != null">#{subId},</if>
+ <if test="taskid != null">#{taskid},</if>
<if test="uuid != null">#{uuid},</if>
<if test="phone != null">#{phone},</if>
<if test="operate != null">#{operate},</if>
@@ -229,13 +250,18 @@
<if test="updateTime != null">#{updateTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="valueType != null">#{valueType},</if>
+ <if test="answerps != null and answerps != ''">#{answerps},</if>
+ <if test="comment != null and comment != ''">#{comment},</if>
+ <if test="scriptid != null ">#{scriptid},</if>
+ <if test=" patid != null">#{patid},</if>
</trim>
</insert>
<update id="updateServiceSubtaskDetail" parameterType="com.smartor.domain.ServiceSubtaskDetail">
- update ivr_taskcalldetail
+ update service_subtask_detail
<trim prefix="SET" suffixOverrides=",">
<if test="subId != null">sub_id = #{subId},</if>
+ <if test="taskid != null">taskid = #{taskid},</if>
<if test="uuid != null">uuid = #{uuid},</if>
<if test="phone != null">phone = #{phone},</if>
<if test="operate != null">operate = #{operate},</if>
@@ -275,18 +301,22 @@
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="valueType != null">value_type = #{valueType},</if>
+ <if test="answerps != null and answerps != ''">answerps = #{answerps},</if>
+ <if test="comment != null and comment != ''">comment = #{comment},</if>
+ <if test="scriptid != null ">scriptid = #{scriptid},</if>
+ <if test=" patid != null">patid = #{patid},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteServiceSubtaskDetailByCalldetailid" parameterType="String">
delete
- from ivr_taskcalldetail
+ from service_subtask_detail
where id = #{id}
</delete>
<delete id="deleteServiceSubtaskDetailByCalldetailids" parameterType="String">
- delete from ivr_taskcalldetail where id in
+ delete from service_subtask_detail where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
index 2f42f00..31dd9dc 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
@@ -55,11 +55,13 @@
<result property="libtemplatename" column="libtemplatename"/>
<result property="libtemplateid" column="libtemplateid"/>
<result property="openid" column="openid"/>
+ <result property="longSendTime" column="long_send_time"/>
</resultMap>
<sql id="selectServiceSubtaskVo">
select id,
hosp_type,
+ long_send_time,
openid,
libtemplateid,
libtemplatename,
@@ -112,7 +114,8 @@
from service_subtask
</sql>
- <select id="selectServiceSubtaskList" parameterType="com.smartor.domain.ServiceSubtask" resultMap="ServiceSubtaskResult">
+ <select id="selectServiceSubtaskList" parameterType="com.smartor.domain.ServiceSubtask"
+ resultMap="ServiceSubtaskResult">
<include refid="selectServiceSubtaskVo"/>
<where>
del_flag=0
@@ -152,9 +155,11 @@
<if test="operatorNo != null and operatorNo != ''">and operator_no = #{operatorNo}</if>
<if test="wechat != null and wechat != ''">and wechat = #{wechat}</if>
<if test="hospType != null and hospType != ''">and hosp_type = #{hospType}</if>
- <if test="libtemplateid != null ">and libtemplateid = #{libtemplateid},</if>
- <if test="libtemplatename != null ">and libtemplatename = #{libtemplatename},</if>
- <if test="openid != null ">and openid = #{openid},</if>
+ <if test="libtemplateid != null ">and libtemplateid = #{libtemplateid}</if>
+ <if test="libtemplatename != null ">and libtemplatename = #{libtemplatename}</if>
+ <if test="openid != null ">and openid = #{openid}</if>
+ <if test="longSendTime != null ">and long_send_time = #{longSendTime}</if>
+ <if test="sendstate != null ">and sendstate = #{sendstate}</if>
</where>
order by update_time desc,id desc
</select>
@@ -217,6 +222,8 @@
<if test="libtemplatename != null ">libtemplatename,</if>
<if test="patid != null ">patid,</if>
<if test="openid != null ">openid,</if>
+ <if test="longSendTime != null ">long_send_time,</if>
+
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="sendname != null">#{sendname},</if>
@@ -268,6 +275,8 @@
<if test="libtemplatename != null ">#{libtemplatename},</if>
<if test="patid != null ">#{patid},</if>
<if test="openid != null ">#{openid},</if>
+ <if test="longSendTime != null ">#{longSendTime},</if>
+
</trim>
</insert>
@@ -323,6 +332,8 @@
<if test="libtemplatename != null ">libtemplatename = #{libtemplatename},</if>
<if test="patid != null ">patid = #{patid},</if>
<if test="openid != null ">openid = #{openid},</if>
+ <if test="longSendTime != null ">long_send_time = #{longSendTime},</if>
+ <if test="sendstate != null ">sendstate = #{sendstate},</if>
</trim>
where id = #{id}
</update>
@@ -379,6 +390,7 @@
<if test="libtemplatename != null ">libtemplatename = #{libtemplatename},</if>
<if test="patid != null ">patid = #{patid},</if>
<if test="openid != null ">openid = #{openid},</if>
+ <if test="longSendTime != null ">long_send_time = #{longSendTime},</if>
</trim>
where patid = #{patid} and taskid = #{taskid}
</update>
@@ -391,7 +403,7 @@
where id = #{id}
</update>
- <update id="deleteServiceSubtaskByCondition" >
+ <update id="deleteServiceSubtaskByCondition">
update service_subtask
<trim prefix="SET" suffixOverrides=",">
del_flag =1
@@ -403,6 +415,7 @@
select id,
sendname,
+ long_send_time,
phone,
sex,
age,
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceTaskMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceTaskMapper.xml
index 33ef285..ec7a1dc 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceTaskMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceTaskMapper.xml
@@ -44,11 +44,14 @@
<result property="showTimeNoon" column="show_time_noon"/>
<result property="showTimeNight" column="show_time_night"/>
<result property="textParam" column="text_param"/>
+ <result property="serviceType" column="service_type"/>
+ <result property="longTask" column="long_task"/>
</resultMap>
<sql id="selectServiceTaskVo">
select taskid,
task_name,
+ long_task,
show_date,
show_time_morn,
show_time_noon,
@@ -85,6 +88,7 @@
send_type,
send_state,
send_time_slot,
+ service_type,
orgid
from service_task
</sql>
@@ -97,6 +101,8 @@
'%')
</if>
<if test="templateid != null and templateid != ''">and templateid = #{templateid}</if>
+ <if test="longTask != null and longTask != ''">and long_task = #{longTask}</if>
+ <if test="serviceType != null and serviceType != ''">and service_type = #{serviceType}</if>
<if test="templatename != null and templatename != ''">and templatename like concat('%', #{templatename},
'%')
</if>
@@ -178,6 +184,8 @@
<if test="showTimeNoon != null and showTimeNoon != ''">show_time_noon,</if>
<if test="showTimeMorn != null and showTimeMorn != ''">show_time_morn,</if>
<if test="textParam != null and textParam != ''">text_param,</if>
+ <if test="serviceType != null and serviceType != ''">service_type,</if>
+ <if test="longTask != null and longTask != ''">long_task,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="taskName != null">#{taskName},</if>
@@ -218,6 +226,8 @@
<if test="showTimeNoon != null and showTimeNoon != ''">#{showTimeNoon},</if>
<if test="showTimeMorn != null and showTimeMorn != ''">#{showTimeMorn},</if>
<if test="textParam != null and textParam != ''">#{textParam},</if>
+ <if test="serviceType != null and serviceType != ''">#{serviceType},</if>
+ <if test="longTask != null and longTask != ''">#{longTask},</if>
</trim>
</insert>
@@ -262,6 +272,8 @@
<if test="showTimeNoon != null and showTimeNoon != ''">show_time_noon=#{showTimeNoon},</if>
<if test="showTimeMorn != null and showTimeMorn != ''">show_time_morn=#{showTimeMorn},</if>
<if test="textParam != null and textParam != ''">text_param=#{textParam},</if>
+ <if test="serviceType != null and serviceType != ''">service_type = #{serviceType},</if>
+ <if test="longTask != null and longTask != ''">long_task = #{longTask},</if>
</trim>
where taskid = #{taskid}
</update>
--
Gitblit v1.9.3