From 0d10bc99eec75672b049339399e4f762fbd9746e Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期五, 11 九月 2026 11:45:54 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
smartor/src/main/java/com/smartor/domain/VO/DetailTraceDealVO.java | 56 +
smartor/src/main/java/com/smartor/service/IServicePhoneService.java | 22
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskAnswerController.java | 28
smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml | 2
smartor/src/main/resources/mapper/smartor/ServiceSubtaskDetailTraceMapper.xml | 150 +++
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java | 10
smartor/src/main/resources/mapper/smartor/IvrLibaTemplateScriptMapper.xml | 16
smartor/src/main/resources/mapper/smartor/SvyLibTemplateScriptMapper.xml | 25
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskAnswerServiceImpl.java | 30
smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScript.java | 13
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskDetailTraceController.java | 2
smartor/src/main/java/com/smartor/domain/ServiceSubtaskExport.java | 8
smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScript.java | 17
smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScriptVO.java | 14
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SmsTempletController.java | 7
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServicePhoneController.java | 63 +
ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java | 2
smartor/src/main/java/com/smartor/service/impl/PatArchiveImportServiceImpl.java | 7
smartor/src/main/java/com/smartor/domain/ServiceSubtaskDetailRatioExport.java | 9
smartor/src/main/java/com/smartor/domain/ServiceSubtask.java | 12
smartor/src/main/java/com/smartor/domain/ServiceSubtaskDetailTrace.java | 57 +
ruoyi-system/src/main/resources/mapper/system/SmsTempletMapper.xml | 1
smartor/src/main/java/com/smartor/domain/DTO/QuestionResultDTO.java | 36
smartor/src/main/resources/mapper/smartor/IvrTaskTemplateScriptMapper.xml | 18
ruoyi-admin/src/main/resources/application-xh.yml | 2
ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java | 4
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java | 419 +++++++++-
smartor/src/main/java/com/smartor/domain/PhoneCallBackSHVO.java | 50 +
smartor/src/main/java/com/smartor/domain/PhoneCallResultYQVO.java | 74 +
smartor/src/main/java/com/smartor/mapper/ServiceSubtaskMapper.java | 22
ruoyi-framework/src/main/java/com/ruoyi/framework/config/ThreadPoolConfig.java | 16
smartor/src/main/java/com/smartor/domain/IvrLibaTemplateScript.java | 14
smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScriptVO.java | 16
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskDetailController.java | 42 +
ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/TestController.java | 337 +++----
smartor/src/main/java/com/smartor/mapper/SvyLibTemplateScriptMapper.java | 1
smartor/src/main/java/com/smartor/domain/VO/QuestionResultVO.java | 96 ++
smartor/src/main/java/com/smartor/domain/ServiceOutPath.java | 16
smartor/src/main/resources/mapper/smartor/ServiceOutPathMapper.xml | 30
smartor/src/main/java/com/smartor/domain/SvyLibTemplateScript.java | 14
smartor/src/main/java/com/smartor/service/IServiceSubtaskService.java | 31
smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml | 119 ++
smartor/src/main/java/com/smartor/domain/SvyLibTemplateScriptVO.java | 16
smartor/src/main/java/com/smartor/domain/VO/ServiceSubtaskVO.java | 18
ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java | 4
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java | 13
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java | 131 +-
smartor/src/main/java/com/smartor/domain/PatMedInhosp.java | 4
smartor/src/main/java/com/smartor/domain/entity/ServiceSubtaskEntity.java | 13
smartor/src/main/resources/mapper/smartor/SvyTaskTemplateScriptMapper.xml | 15
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/LoginBody.java | 5
smartor/src/main/java/com/smartor/service/impl/ServicPhoneServiceImpl.java | 200 +++++
52 files changed, 1,961 insertions(+), 366 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServicePhoneController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServicePhoneController.java
new file mode 100644
index 0000000..af5416f
--- /dev/null
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServicePhoneController.java
@@ -0,0 +1,63 @@
+package com.ruoyi.web.controller.smartor;
+
+import com.ruoyi.common.core.controller.BaseController;
+import com.smartor.domain.OutboundConfigAddReqVO;
+import com.smartor.domain.OutboundInstanceResVO;
+import com.smartor.domain.PhoneCallBackSHVO;
+import com.smartor.domain.PhoneCallReqYQVO;
+import com.smartor.domain.PhoneCallResultYQVO;
+import com.smartor.service.IServicePhoneService;
+import com.smartor.service.IServiceSubtaskService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Map;
+
+/**
+ * 涓夋眹鐢佃瘽娴佺▼鏈嶅姟 Controller
+ *
+ * @author ls
+ * @date 2026-08-26
+ */
+@Slf4j
+@Api(description = "涓夋眹鐢佃瘽娴佺▼鏈嶅姟")
+@RestController
+@RequestMapping("/smartor/shphone")
+public class ServicePhoneController extends BaseController {
+ @Autowired
+ private IServiceSubtaskService serviceSubtaskService;
+
+ @Autowired
+ private IServicePhoneService iServicePhoneService;
+
+ @ApiOperation("鏍规嵁鐢佃瘽鍙风爜,鑾峰彇棣栦釜闂")
+ @PostMapping("/getFirstQues")
+ public Map<String, Object> getFirstQues(@RequestBody PhoneCallReqYQVO phoneCallReqYQVO) {
+ log.info("鏍规嵁鐢佃瘽鍙风爜,鑾峰彇棣栦釜闂锛焮}", phoneCallReqYQVO);
+ PhoneCallBackSHVO phoneCallBackSHVO = serviceSubtaskService.getFirstQues(phoneCallReqYQVO);
+ return success(phoneCallBackSHVO);
+ }
+
+ @ApiOperation("涓夋眹 ASR 缁撴灉澶勭悊")
+ @PostMapping("/processResust")
+ public Map<String, Object> processResust(@RequestBody PhoneCallResultYQVO resultYQVO) {
+ log.info("涓夋眹 ASR 缁撴灉澶勭悊 (涓夋眹)锛焮}", resultYQVO);
+ PhoneCallBackSHVO phoneCallBackSHVO = serviceSubtaskService.processResust(resultYQVO);
+ return success(phoneCallBackSHVO);
+ }
+
+ @ApiOperation("鏂板澶栧懠瀹炰緥閰嶇疆")
+ @PostMapping("/addOutboundInstance")
+ public Map<String, Object> addOutboundInstance(@RequestBody OutboundConfigAddReqVO request) {
+ log.info("鏂板澶栧懠瀹炰緥閰嶇疆锛歿}", request);
+ OutboundInstanceResVO outboundInstanceResVO = iServicePhoneService.addOutboundInstance(request);
+ return success(outboundInstanceResVO);
+ }
+
+}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskAnswerController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskAnswerController.java
index 6f2f428..04fb42d 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskAnswerController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskAnswerController.java
@@ -1,6 +1,7 @@
package com.ruoyi.web.controller.smartor;
import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.annotation.RepeatSubmit;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysUser;
@@ -114,15 +115,23 @@
return toAjax(serviceSubtaskAnswerService.deleteServiceSubtaskAnswerByIds(ids));
}
- @ApiOperation("鎮h�呴棶棰樼粨鏋滆褰�(澶栭摼)")
+ /**
+ * 鎮h�呴棶棰樼粨鏋滆褰� (澶栭摼) - 寮傛澶勭悊
+ */
+ @ApiOperation("鎮h�呴棶棰樼粨鏋滆褰� (澶栭摼)")
@PostMapping("/saveQuestionAnswer")
public AjaxResult saveQuestionAnswer(@RequestBody ServiceSubTaskAnswerReq serviceSubTaskAnswerReq) {
- log.info("銆恠aveQuestionCache-----saveQuestionAnswer銆戠殑鍏ュ弬涓簆rarm1锛歿},prarm2锛歿},type锛歿},isabnormal:{}", serviceSubTaskAnswerReq.getParam1(), serviceSubTaskAnswerReq.getParam2(), serviceSubTaskAnswerReq.getType(), serviceSubTaskAnswerReq.getIsabnormal());
- return toAjax(serviceSubtaskAnswerService.saveQuestionAnswer(serviceSubTaskAnswerReq, 0L));
+ log.info("銆恠aveQuestionAnswer銆戠殑鍏ュ弬涓� param1:{},param2:{},type:{},isabnormal:{}",
+ serviceSubTaskAnswerReq.getParam1(), serviceSubTaskAnswerReq.getParam2(),
+ serviceSubTaskAnswerReq.getType(), serviceSubTaskAnswerReq.getIsabnormal());
+ // 寮傛澶勭悊淇濆瓨閫昏緫锛岀珛鍗宠繑鍥炴垚鍔熸秷鎭�
+ serviceSubtaskAnswerService.saveQuestionAnswer(serviceSubTaskAnswerReq, 0L);
+ return success("鎻愪氦鎴愬姛锛屾鍦ㄥ鐞嗕腑...");
}
@ApiOperation("鎮h�呴棶棰樼粨鏋滆褰曠紦瀛�(灏忕▼搴忓閾�)")
+ @RepeatSubmit
@PostMapping("/saveQuestionCacheXCH")
public AjaxResult saveQuestionCacheXCH(@RequestBody ServiceSubTaskCacheReq serviceSubTaskCacheReq) {
log.info("銆恠aveQuestionCache-----saveQuestionCacheXCH銆戠殑鍏ュ弬涓猴細{}", serviceSubTaskCacheReq);
@@ -130,6 +139,7 @@
}
@ApiOperation("鎮h�呴棶棰樼粨鏋滀繚瀛�")
+ @RepeatSubmit
@PostMapping("/savequestiondetail")
public AjaxResult saveQuestionDetail(@RequestBody ServiceSubTaskCacheReq serviceSubTaskCacheReq) {
log.info("銆恠aveQuestionDetail-----saveQuestionCache銆戠殑prarm1锛歿},prarm2锛歿},type锛歿},prarm6:{}", serviceSubTaskCacheReq.getParam1(), serviceSubTaskCacheReq.getParam2(), serviceSubTaskCacheReq.getType(), serviceSubTaskCacheReq.getParam6());
@@ -137,11 +147,16 @@
}
- @ApiOperation("鎮h�呴棶棰樼粨鏋滆褰�(灏忕▼鍏呭閾�)")
+ /**
+ * 鎮h�呴棶棰樼粨鏋滆褰� (灏忕▼搴忓閾�) - 寮傛澶勭悊
+ */
+ @ApiOperation("鎮h�呴棶棰樼粨鏋滆褰� (灏忕▼鍏呭閾�)")
@PostMapping("/saveQuestionAnswerXCH")
public AjaxResult saveQuestionAnswerXCH(@RequestBody ServiceSubTaskAnswerReq serviceSubTaskAnswerReq) {
- log.info("銆恠aveQuestionCache-----saveQuestionAnswerXCH銆戠殑鍏ュ弬涓猴細{}", serviceSubTaskAnswerReq);
- return toAjax(serviceSubtaskAnswerService.saveQuestionAnswer(serviceSubTaskAnswerReq, 1L));
+ log.info("銆恠aveQuestionAnswerXCH銆戠殑鍏ュ弬涓猴細{}", serviceSubTaskAnswerReq);
+ // 寮傛澶勭悊淇濆瓨閫昏緫锛岀珛鍗宠繑鍥炴垚鍔熸秷鎭�
+ serviceSubtaskAnswerService.saveQuestionAnswer(serviceSubTaskAnswerReq, 1L);
+ return success("鎻愪氦鎴愬姛锛屾鍦ㄥ鐞嗕腑...");
}
@ApiOperation("鑾峰彇鎮h�呴棶棰樼粨鏋滆褰曠紦瀛�(灏忕▼搴忓閾�)")
@@ -179,6 +194,7 @@
@ApiOperation("鎮h�呮弧鎰忓害缁撴灉璁板綍(澶栭摼)")
+ @RepeatSubmit
@PostMapping("/saveMYDQuestionAnswer")
public AjaxResult saveMYDQuestionAnswer(@RequestBody ServiceSubTaskMYDAnswerReq serviceSubTaskAnswerReq) {
log.info("銆恠aveQuestionCache-----saveMYDQuestionAnswer銆戠殑鍏ュ弬涓猴細{}", serviceSubTaskAnswerReq);
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 169c80b..a4357cf 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
@@ -24,10 +24,8 @@
import com.ruoyi.system.service.ISysConfigService;
import com.ruoyi.system.service.ISysUserDeptService;
import com.smartor.domain.*;
-import com.smartor.domain.VO.HeLibraryCountVO;
-import com.smartor.domain.VO.ServiceSubtaskCotinueCountVO;
-import com.smartor.domain.VO.ServiceSubtaskVO;
-import com.smartor.domain.VO.TransferDeptVO;
+import com.smartor.domain.DTO.QuestionResultDTO;
+import com.smartor.domain.VO.*;
import com.smartor.domain.entity.ServiceSubtaskEntity;
import com.smartor.service.IServiceSubtaskRecordService;
import com.smartor.service.IServiceSubtaskService;
@@ -191,59 +189,6 @@
}
/**
- * 甯edis缂撳瓨鐨勭粺璁℃煡璇紝渚沺atItem鍜宲atItemCount鍏辩敤锛屾潯浠朵笉鍙樻椂鐩存帴鍛戒腑缂撳瓨
- */
- private Map<String, Object> getPatItemCountWithCache(ServiceSubtaskEntity serviceSubtaskEntity) {
- Map<String, Object> map = new HashMap<>();
- LoginUser loginUser = getLoginUser();
- Long userId = null;
- if (ObjectUtils.isNotEmpty(loginUser) && ObjectUtils.isNotEmpty(loginUser.getUser())) {
- userId = loginUser.getUser().getUserId();
- }
- if (serviceSubtaskEntity.getSendstateView() != null) {
- // 1锛氬緟闅忚锛�1 琚鍙栥��2 寰呭彂閫併��3 宸插彂閫併��5 鍙戦�佸け璐ャ��7銆佽秴鏃讹級锛�2锛氬凡瀹屾垚锛� 6 宸插畬鎴愶級銆�3锛氭棤闇�闅忚锛�4 涓嶆墽琛岋級
- if (serviceSubtaskEntity.getSendstateView() == 1)
- serviceSubtaskEntity.setSendstates(new ArrayList<>(Arrays.asList(1L, 2L, 3L, 5L, 7L)));
- if (serviceSubtaskEntity.getSendstateView() == 2)
- serviceSubtaskEntity.setSendstates(new ArrayList<>(Arrays.asList(6L)));
- if (serviceSubtaskEntity.getSendstateView() == 3)
- serviceSubtaskEntity.setSendstates(new ArrayList<>(Arrays.asList(4L)));
- }
- if (ObjectUtils.isNotEmpty(userId)) {
- Map<String, Object> redisMap = redisCache.getCacheObject(userId + "patItemCount");
- Boolean redisFlag = false;
- if (MapUtils.isNotEmpty(redisMap)) {
- ServiceSubtaskEntity oldCondition = (ServiceSubtaskEntity) redisMap.get("searchCondition");
- if (ObjectUtils.isNotEmpty(oldCondition) && isSameCondition(oldCondition, serviceSubtaskEntity)) {
- redisFlag = true;
- map = redisMap;
- redisCache.setCacheObject(userId + "patItemCount", map, 60, TimeUnit.MINUTES);
- }
- }
- if (!redisFlag) {
- map = serviceSubtaskService.patItemCount(serviceSubtaskEntity);
- map.put("searchCondition", serviceSubtaskEntity);
- redisCache.setCacheObject(userId + "patItemCount", map, 120, TimeUnit.MINUTES);
- }
- } else {
- map = serviceSubtaskService.patItemCount(serviceSubtaskEntity);
- }
- return map;
- }
-
- /**
- * 姣旇緝涓や釜ServiceSubtaskVO鐨勬煡璇㈡潯浠舵槸鍚︿竴鑷�
- * 浣跨敤鍙嶅皠姣旇緝鎵�鏈夊瓧娈碉紝鎺掗櫎鍒嗛〉鍙傛暟鍜屾棤鍏冲瓧娈�
- */
- private boolean isSameCondition(ServiceSubtaskEntity oldCondition, ServiceSubtaskEntity newCondition) {
- // 浣跨敤ReflectUtils鐨勯�氱敤鏂规硶姣旇緝锛屾帓闄ゅ垎椤靛弬鏁扮瓑鏃犲叧瀛楁
- return ReflectUtils.equalsAllFields(oldCondition, newCondition,
- // 鎺掗櫎鐨勫瓧娈碉細鍒嗛〉鍙傛暟銆佸簭鍒楀寲ID銆佹椂闂存埑绛�
- "pageNum", "pageSize", "serialVersionUID", "createBy", "createTime", "updateBy", "updateTime", "searchValue", "params");
- }
-
-
- /**
* 瀵煎嚭鍗曚竴浠诲姟鍒楄〃
*/
//@PreAuthorize("@ss.hasPermi('system:taskcall:export')")
@@ -275,11 +220,11 @@
serviceSubtaskExport.setEndDay(endDay);
}
}
-
- //鑾峰彇serviceSubtaskList涓殑鎵�鏈塼askid
- List<Long> taskIds = serviceSubtaskList.stream().map(ServiceSubtaskRes::getTaskid).filter(ObjectUtils::isNotEmpty).distinct().collect(Collectors.toList());
- serviceSubtaskDetailRatioExports = serviceSubtaskService.statQuestionOption(taskIds, serviceSubtaskVO.getStartOutHospTime(), serviceSubtaskVO.getEndOutHospTime());
-
+ QuestionResultVO questionResultVO = new QuestionResultVO();
+ questionResultVO.setServiceType(serviceSubtaskVO.getServiceType());
+ questionResultVO.setEndOutHospTime(serviceSubtaskVO.getEndOutHospTime());
+ questionResultVO.setStartOutHospTime(serviceSubtaskVO.getStartOutHospTime());
+ serviceSubtaskDetailRatioExports = serviceSubtaskService.getDetailRatio(questionResultVO, serviceSubtaskList);
}
@@ -472,6 +417,8 @@
if (ObjectUtils.isNotEmpty(user)) serviceSubtask.setOrgid(user.getOrgid());
if (ObjectUtils.isNotEmpty(user)) serviceSubtask.setCampusid(user.getCampusid());
serviceSubtask.setCampusid(user.getCampusid());
+ serviceSubtask.setCreateBy(user.getNickName());
+ serviceSubtask.setUpdateBy(user.getNickName());
return success(serviceSubtaskService.insertServiceSubtask(serviceSubtask));
}
@@ -990,11 +937,12 @@
return AjaxResult.success("銆恈ollectHISDaysBefore銆戝悓姝ヤ换鍔″凡鍚姩锛屽ぉ鏁颁负" + day + "澶╋紝璇风◢鍚庢煡鐪嬬粨鏋�");
}
-
@PostMapping("/syncMedOperForShiyi")
public AjaxResult syncMedOperForShiyi(@RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime) {
// 绔嬪嵆杩斿洖锛屽悗鍙板紓姝ユ墽琛�
- collectHISService.syncOper(startTime, endTime);
+ CompletableFuture.runAsync(() -> {
+ collectHISService.syncOper(startTime, endTime);
+ });
return AjaxResult.success("鍚屾浠诲姟宸插惎鍔紝璇风◢鍚庢煡鐪嬬粨鏋�");
}
@@ -1004,4 +952,59 @@
ryTask.dealSubtaskDeadline(orgid, day);
return AjaxResult.success("銆恉ealSubtaskDeadline銆戝悓姝ヤ换鍔″凡鍚姩锛屽ぉ鏁颁负" + day + "澶╋紝璇风◢鍚庢煡鐪嬬粨鏋�");
}
+ /**
+ * 甯edis缂撳瓨鐨勭粺璁℃煡璇紝渚沺atItem鍜宲atItemCount鍏辩敤锛屾潯浠朵笉鍙樻椂鐩存帴鍛戒腑缂撳瓨
+ */
+ private Map<String, Object> getPatItemCountWithCache(ServiceSubtaskEntity serviceSubtaskEntity) {
+ Map<String, Object> map = new HashMap<>();
+ LoginUser loginUser = getLoginUser();
+ Long userId = null;
+ if (ObjectUtils.isNotEmpty(loginUser) && ObjectUtils.isNotEmpty(loginUser.getUser())) {
+ userId = loginUser.getUser().getUserId();
+ }
+ if (serviceSubtaskEntity.getSendstateView() != null) {
+ // 1锛氬緟闅忚锛�1 琚鍙栥��2 寰呭彂閫併��3 宸插彂閫併��5 鍙戦�佸け璐ャ��7銆佽秴鏃讹級锛�2锛氬凡瀹屾垚锛� 6 宸插畬鎴愶級銆�3锛氭棤闇�闅忚锛�4 涓嶆墽琛岋級
+ if (serviceSubtaskEntity.getSendstateView() == 1)
+ serviceSubtaskEntity.setSendstates(new ArrayList<>(Arrays.asList(1L, 2L, 3L, 5L, 7L)));
+ if (serviceSubtaskEntity.getSendstateView() == 2)
+ serviceSubtaskEntity.setSendstates(new ArrayList<>(Arrays.asList(6L)));
+ if (serviceSubtaskEntity.getSendstateView() == 3)
+ serviceSubtaskEntity.setSendstates(new ArrayList<>(Arrays.asList(4L)));
+ }
+ if (ObjectUtils.isNotEmpty(userId)) {
+ Map<String, Object> redisMap = redisCache.getCacheObject(userId + "patItemCount");
+ Boolean redisFlag = false;
+ if (MapUtils.isNotEmpty(redisMap)) {
+ ServiceSubtaskEntity oldCondition = (ServiceSubtaskEntity) redisMap.get("searchCondition");
+ if (ObjectUtils.isNotEmpty(oldCondition) && isSameCondition(oldCondition, serviceSubtaskEntity)) {
+ redisFlag = true;
+ map = redisMap;
+ redisCache.setCacheObject(userId + "patItemCount", map, 60, TimeUnit.MINUTES);
+ }
+ }
+ if (!redisFlag) {
+ map = serviceSubtaskService.patItemCount(serviceSubtaskEntity);
+ map.put("searchCondition", serviceSubtaskEntity);
+ redisCache.setCacheObject(userId + "patItemCount", map, 120, TimeUnit.MINUTES);
+ }
+ } else {
+ map = serviceSubtaskService.patItemCount(serviceSubtaskEntity);
+ }
+ return map;
+ }
+
+
+ /**
+ * 姣旇緝涓や釜ServiceSubtaskVO鐨勬煡璇㈡潯浠舵槸鍚︿竴鑷�
+ * 浣跨敤鍙嶅皠姣旇緝鎵�鏈夊瓧娈碉紝鎺掗櫎鍒嗛〉鍙傛暟鍜屾棤鍏冲瓧娈�
+ */
+ private boolean isSameCondition(ServiceSubtaskEntity oldCondition, ServiceSubtaskEntity newCondition) {
+ // 浣跨敤ReflectUtils鐨勯�氱敤鏂规硶姣旇緝锛屾帓闄ゅ垎椤靛弬鏁扮瓑鏃犲叧瀛楁
+ return ReflectUtils.equalsAllFields(oldCondition, newCondition,
+ // 鎺掗櫎鐨勫瓧娈碉細鍒嗛〉鍙傛暟銆佸簭鍒楀寲ID銆佹椂闂存埑绛�
+ "pageNum", "pageSize", "serialVersionUID", "createBy", "createTime", "updateBy", "updateTime", "searchValue", "params");
+ }
+
+
+
}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskDetailController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskDetailController.java
index 86252e7..1141e12 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskDetailController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskDetailController.java
@@ -6,10 +6,14 @@
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.DtoConversionUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.service.ISysConfigService;
import com.smartor.domain.*;
+import com.smartor.domain.DTO.QuestionResultDTO;
import com.smartor.domain.DTO.ServiceSubtaskDetailDTO;
+import com.smartor.domain.VO.QuestionResultVO;
+import com.smartor.domain.entity.ServiceSubtaskEntity;
import com.smartor.service.IServiceSubtaskDetailService;
import com.smartor.service.IServiceSubtaskService;
import io.swagger.annotations.Api;
@@ -19,6 +23,7 @@
import org.springframework.web.bind.annotation.*;
import java.util.*;
+import java.util.stream.Collectors;
import static com.ruoyi.framework.datasource.DynamicDataSourceContextHolder.log;
@@ -192,4 +197,41 @@
map = ServiceSubtaskDetailService.getServiceSubtaskDetails(serviceSubtaskDetailVO);
return map;
}
+
+
+ /**
+ * 鏌ヨ鎮h�呴殢璁夸俊鎭�
+ */
+ @ApiOperation("鐪佺珛鍚屽痉婊℃剰搴︽暟鎹粺璁�")
+ @PostMapping("/sltaMydTotalByScore")
+ public Map<String, Object> sltaMydTotal(@RequestBody QuestionResultVO questionResultVO) {
+ List<ServiceSubtaskRes> serviceSubtaskResList = null;
+ ServiceSubtaskEntity serviceSubtaskEntity = new ServiceSubtaskEntity();
+ serviceSubtaskEntity.setServiceType(questionResultVO.getServiceType());
+ serviceSubtaskEntity.setEndOutHospTime(questionResultVO.getEndOutHospTime());
+ serviceSubtaskEntity.setStartOutHospTime(questionResultVO.getStartOutHospTime());
+ serviceSubtaskEntity.setDeptOrDistrict(questionResultVO.getDeptOrDistrict());
+ serviceSubtaskEntity.setLeavehospitaldistrictcodes(questionResultVO.getLeavehospitaldistrictcodes());
+ if (serviceSubtaskEntity != null) {
+ List<ServiceSubtask> serviceSubtasks = serviceSubtaskService.getServiceSubtasks(serviceSubtaskEntity);
+ serviceSubtaskResList = DtoConversionUtils.sourceToTarget(serviceSubtasks, ServiceSubtaskRes.class);
+ }
+ List<ServiceSubtaskDetailRatioExport> detailList = serviceSubtaskService.getDetailRatio(questionResultVO, serviceSubtaskResList);
+
+ // 鎸� questiontext 鍒嗙粍鍚庤浆鎹负 QuestionResultVO
+ List<QuestionResultDTO> result = new ArrayList<>();
+ if (!detailList.isEmpty()) {
+ Map<String, List<ServiceSubtaskDetailRatioExport>> groupedMap = detailList.stream()
+ .collect(Collectors.groupingBy(ServiceSubtaskDetailRatioExport::getQuestiontext));
+
+ groupedMap.forEach((questionText, exportList) -> {
+ QuestionResultDTO questionResultDTO = new QuestionResultDTO();
+ questionResultDTO.setQeustionText(questionText);
+ questionResultDTO.setSubtaskDetailRatioExportList(exportList);
+ result.add(questionResultDTO);
+ });
+ }
+
+ return success(result);
+ }
}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskDetailTraceController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskDetailTraceController.java
index a72eda8..eda9ed5 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskDetailTraceController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskDetailTraceController.java
@@ -4,11 +4,9 @@
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.smartor.domain.DTO.DetailTraceDealDTO;
import com.smartor.domain.ServiceSubtaskDetailTrace;
import com.smartor.domain.VO.DetailTraceDealVO;
import com.smartor.domain.VO.SatisfactionExceptConfigQuestionReqVO;
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SmsTempletController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SmsTempletController.java
index 1342158..27237df 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SmsTempletController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SmsTempletController.java
@@ -6,6 +6,7 @@
import cn.hutool.core.util.ObjectUtil;
import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@@ -41,16 +42,18 @@
//@PreAuthorize("@ss.hasPermi('smartor:smstemplet:list')")
@PostMapping("/list")
public Map<String, Object> list(@RequestBody SmsTemplet smsTemplet) {
+ smsTemplet.setPageNum(PageUtils.getOffset(smsTemplet.getPageNum(), smsTemplet.getPageSize()));
if (StringUtils.isEmpty(smsTemplet.getUserName()) && StringUtils.isEmpty(smsTemplet.getWardCode()) && StringUtils.isEmpty(smsTemplet.getDeptCode())) {
SysUser user = getLoginUser().getUser();
smsTemplet.setUserName(user.getUserName());
smsTemplet.setNickName(user.getNickName());
}
+ List<SmsTemplet> list = smsTempletService.selectSmsTempletList(smsTemplet);
//杩欎釜涓嶉渶瑕佸垎椤碉紝涓�涓瀹や篃涓嶄細鏈夊灏戞潯鐭俊妯℃澘
smsTemplet.setPageNum(null);
smsTemplet.setPageSize(null);
- List<SmsTemplet> list = smsTempletService.selectSmsTempletList(smsTemplet);
- return getDataTable3(ObjectUtil.isNotEmpty(list) ? list.size() : 0, list);
+ List<SmsTemplet> total = smsTempletService.selectSmsTempletList(smsTemplet);
+ return getDataTable3(ObjectUtil.isNotEmpty(total) ? total.size() : 0, list);
}
/**
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java
index 3cbb8b2..8db4d62 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java
@@ -79,7 +79,7 @@
//閫氱敤瀵嗙爜锛欻rs#褰撳墠骞存湀鏃�*
token = loginService.getTokenWN(loginBody.getUsername());
} else {
- token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(), loginBody.getUuid(), loginBody.getOrgid(), loginBody.getCampusid());
+ token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(), loginBody.getUuid(), loginBody.getOrgid(), loginBody.getCampusid(), loginBody.getUserType());
}
ajax.put(Constants.TOKEN, token);
return ajax;
@@ -123,12 +123,16 @@
*/
// @IpWhitelist
@GetMapping("/SSOLogin")
- public RedirectView SSOLogin(@RequestParam(required = false) String campusid, @RequestParam(required = false) String deptId, String orgid, String userName, String token) {
+ public RedirectView SSOLogin(@RequestParam(required = false) String campusid, @RequestParam(required = false) String deptId, @RequestParam(required = false) String systype, String orgid, String userName, String token) {
+ log.info("SSOLogin鐨勫叆鍙傦紝campusid锛歿}, deptId:{}, systype:{}, orgid:{}, userName:{}, token:{}",campusid,deptId,systype,orgid,userName,token);
if (StringUtils.isEmpty(userName) && StringUtils.isEmpty(token) && StringUtils.isEmpty(orgid)) {
throw new BaseException("鍙傛暟涓嶈兘涓虹┖");
}
+ String path = null;
+ if (StringUtils.isEmpty(systype)) path = sysConfigService.selectConfigByKey("sys.qddz");
+ else path = sysConfigService.selectConfigByKey("sys.qddz.yd");
+ log.info("qddz鐨勬煡璇㈠�间负锛宲ath锛歿}",path);
- String path = sysConfigService.selectConfigByKey("sys.qddz");
if (StringUtils.isEmpty(path)) {
throw new BaseException("璇烽厤缃墠绔湴鍧�");
}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/TestController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/TestController.java
index b4f6bac..b9ce0ce 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/TestController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/TestController.java
@@ -1,183 +1,154 @@
-package com.ruoyi.web.controller.tool;
-
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.ruoyi.common.core.controller.BaseController;
-import com.ruoyi.common.core.domain.R;
-import com.ruoyi.common.utils.StringUtils;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import io.swagger.annotations.ApiOperation;
-
-/**
- * swagger 鐢ㄦ埛娴嬭瘯鏂规硶
- *
- * @author ruoyi
- */
-@Api("鐢ㄦ埛淇℃伅绠$悊")
-@RestController
-@RequestMapping("/test/user")
-public class TestController extends BaseController
-{
- private final static Map<Integer, UserEntity> users = new LinkedHashMap<Integer, UserEntity>();
- {
- users.put(1, new UserEntity(1, "admin", "admin123", "15888888888"));
- users.put(2, new UserEntity(2, "ry", "admin123", "15666666666"));
- }
-
- @ApiOperation("鑾峰彇鐢ㄦ埛鍒楄〃")
- @GetMapping("/list")
- public R<List<UserEntity>> userList()
- {
- List<UserEntity> userList = new ArrayList<UserEntity>(users.values());
- return R.ok(userList);
- }
-
- @ApiOperation("鑾峰彇鐢ㄦ埛璇︾粏")
- @ApiImplicitParam(name = "userId", value = "鐢ㄦ埛ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
- @GetMapping("/{userId}")
- public R<UserEntity> getUser(@PathVariable Integer userId)
- {
- if (!users.isEmpty() && users.containsKey(userId))
- {
- return R.ok(users.get(userId));
- }
- else
- {
- return R.fail("鐢ㄦ埛涓嶅瓨鍦�");
- }
- }
-
- @ApiOperation("鏂板鐢ㄦ埛")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "userId", value = "鐢ㄦ埛id", dataType = "Integer", dataTypeClass = Integer.class),
- @ApiImplicitParam(name = "username", value = "鐢ㄦ埛鍚嶇О", dataType = "String", dataTypeClass = String.class),
- @ApiImplicitParam(name = "password", value = "鐢ㄦ埛瀵嗙爜", dataType = "String", dataTypeClass = String.class),
- @ApiImplicitParam(name = "mobile", value = "鐢ㄦ埛鎵嬫満", dataType = "String", dataTypeClass = String.class)
- })
- @PostMapping("/save")
- public R<String> save(UserEntity user)
- {
- if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId()))
- {
- return R.fail("鐢ㄦ埛ID涓嶈兘涓虹┖");
- }
- users.put(user.getUserId(), user);
- return R.ok();
- }
-
- @ApiOperation("鏇存柊鐢ㄦ埛")
- @PutMapping("/update")
- public R<String> update(@RequestBody UserEntity user)
- {
- if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId()))
- {
- return R.fail("鐢ㄦ埛ID涓嶈兘涓虹┖");
- }
- if (users.isEmpty() || !users.containsKey(user.getUserId()))
- {
- return R.fail("鐢ㄦ埛涓嶅瓨鍦�");
- }
- users.remove(user.getUserId());
- users.put(user.getUserId(), user);
- return R.ok();
- }
-
- @ApiOperation("鍒犻櫎鐢ㄦ埛淇℃伅")
- @ApiImplicitParam(name = "userId", value = "鐢ㄦ埛ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
- @DeleteMapping("/{userId}")
- public R<String> delete(@PathVariable Integer userId)
- {
- if (!users.isEmpty() && users.containsKey(userId))
- {
- users.remove(userId);
- return R.ok();
- }
- else
- {
- return R.fail("鐢ㄦ埛涓嶅瓨鍦�");
- }
- }
-}
-
-@ApiModel(value = "UserEntity", description = "鐢ㄦ埛瀹炰綋")
-class UserEntity
-{
- @ApiModelProperty("鐢ㄦ埛ID")
- private Integer userId;
-
- @ApiModelProperty("鐢ㄦ埛鍚嶇О")
- private String username;
-
- @ApiModelProperty("鐢ㄦ埛瀵嗙爜")
- private String password;
-
- @ApiModelProperty("鐢ㄦ埛鎵嬫満")
- private String mobile;
-
- public UserEntity()
- {
-
- }
-
- public UserEntity(Integer userId, String username, String password, String mobile)
- {
- this.userId = userId;
- this.username = username;
- this.password = password;
- this.mobile = mobile;
- }
-
- public Integer getUserId()
- {
- return userId;
- }
-
- public void setUserId(Integer userId)
- {
- this.userId = userId;
- }
-
- public String getUsername()
- {
- return username;
- }
-
- public void setUsername(String username)
- {
- this.username = username;
- }
-
- public String getPassword()
- {
- return password;
- }
-
- public void setPassword(String password)
- {
- this.password = password;
- }
-
- public String getMobile()
- {
- return mobile;
- }
-
- public void setMobile(String mobile)
- {
- this.mobile = mobile;
- }
-}
+//package com.ruoyi.web.controller.tool;
+//
+//import java.util.ArrayList;
+//import java.util.LinkedHashMap;
+//import java.util.List;
+//import java.util.Map;
+//
+//import org.springframework.web.bind.annotation.DeleteMapping;
+//import org.springframework.web.bind.annotation.GetMapping;
+//import org.springframework.web.bind.annotation.PathVariable;
+//import org.springframework.web.bind.annotation.PostMapping;
+//import org.springframework.web.bind.annotation.PutMapping;
+//import org.springframework.web.bind.annotation.RequestBody;
+//import org.springframework.web.bind.annotation.RequestMapping;
+//import org.springframework.web.bind.annotation.RestController;
+//import com.ruoyi.common.core.controller.BaseController;
+//import com.ruoyi.common.core.domain.R;
+//import com.ruoyi.common.utils.StringUtils;
+//import io.swagger.annotations.Api;
+//import io.swagger.annotations.ApiImplicitParam;
+//import io.swagger.annotations.ApiImplicitParams;
+//import io.swagger.annotations.ApiModel;
+//import io.swagger.annotations.ApiModelProperty;
+//import io.swagger.annotations.ApiOperation;
+//
+///**
+// * swagger 鐢ㄦ埛娴嬭瘯鏂规硶
+// *
+// * @author ruoyi
+// */
+//@Api("鐢ㄦ埛淇℃伅绠$悊")
+//@RestController
+//@RequestMapping("/test/user")
+//public class TestController extends BaseController {
+// private final static Map<Integer, UserEntity> users = new LinkedHashMap<Integer, UserEntity>();
+//
+// {
+// users.put(1, new UserEntity(1, "admin", "admin123", "15888888888"));
+// users.put(2, new UserEntity(2, "ry", "admin123", "15666666666"));
+// }
+//
+// @ApiOperation("鑾峰彇鐢ㄦ埛鍒楄〃")
+// @GetMapping("/list")
+// public R<List<UserEntity>> userList() {
+// List<UserEntity> userList = new ArrayList<UserEntity>(users.values());
+// return R.ok(userList);
+// }
+//
+// @ApiOperation("鑾峰彇鐢ㄦ埛璇︾粏")
+// @ApiImplicitParam(name = "userId", value = "鐢ㄦ埛ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
+// @GetMapping("/{userId}")
+// public R<UserEntity> getUser(@PathVariable Integer userId) {
+// if (!users.isEmpty() && users.containsKey(userId)) {
+// return R.ok(users.get(userId));
+// } else {
+// return R.fail("鐢ㄦ埛涓嶅瓨鍦�");
+// }
+// }
+//
+// @ApiOperation("鏂板鐢ㄦ埛")
+// @ApiImplicitParams({@ApiImplicitParam(name = "userId", value = "鐢ㄦ埛id", dataType = "Integer", dataTypeClass = Integer.class), @ApiImplicitParam(name = "username", value = "鐢ㄦ埛鍚嶇О", dataType = "String", dataTypeClass = String.class), @ApiImplicitParam(name = "password", value = "鐢ㄦ埛瀵嗙爜", dataType = "String", dataTypeClass = String.class), @ApiImplicitParam(name = "mobile", value = "鐢ㄦ埛鎵嬫満", dataType = "String", dataTypeClass = String.class)})
+// @PostMapping("/save")
+// public R<String> save(UserEntity user) {
+// if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId())) {
+// return R.fail("鐢ㄦ埛ID涓嶈兘涓虹┖");
+// }
+// users.put(user.getUserId(), user);
+// return R.ok();
+// }
+//
+// @ApiOperation("鏇存柊鐢ㄦ埛")
+// @PutMapping("/update")
+// public R<String> update(@RequestBody UserEntity user) {
+// if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId())) {
+// return R.fail("鐢ㄦ埛ID涓嶈兘涓虹┖");
+// }
+// if (users.isEmpty() || !users.containsKey(user.getUserId())) {
+// return R.fail("鐢ㄦ埛涓嶅瓨鍦�");
+// }
+// users.remove(user.getUserId());
+// users.put(user.getUserId(), user);
+// return R.ok();
+// }
+//
+// @ApiOperation("鍒犻櫎鐢ㄦ埛淇℃伅")
+// @ApiImplicitParam(name = "userId", value = "鐢ㄦ埛ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
+// @GetMapping("/{userId}")
+// public R<String> delete(@PathVariable Integer userId) {
+// if (!users.isEmpty() && users.containsKey(userId)) {
+// users.remove(userId);
+// return R.ok();
+// } else {
+// return R.fail("鐢ㄦ埛涓嶅瓨鍦�");
+// }
+// }
+//}
+//
+//@ApiModel(value = "UserEntity", description = "鐢ㄦ埛瀹炰綋")
+//class UserEntity {
+// @ApiModelProperty("鐢ㄦ埛ID")
+// private Integer userId;
+//
+// @ApiModelProperty("鐢ㄦ埛鍚嶇О")
+// private String username;
+//
+// @ApiModelProperty("鐢ㄦ埛瀵嗙爜")
+// private String password;
+//
+// @ApiModelProperty("鐢ㄦ埛鎵嬫満")
+// private String mobile;
+//
+// public UserEntity() {
+//
+// }
+//
+// public UserEntity(Integer userId, String username, String password, String mobile) {
+// this.userId = userId;
+// this.username = username;
+// this.password = password;
+// this.mobile = mobile;
+// }
+//
+// public Integer getUserId() {
+// return userId;
+// }
+//
+// public void setUserId(Integer userId) {
+// this.userId = userId;
+// }
+//
+// public String getUsername() {
+// return username;
+// }
+//
+// public void setUsername(String username) {
+// this.username = username;
+// }
+//
+// public String getPassword() {
+// return password;
+// }
+//
+// public void setPassword(String password) {
+// this.password = password;
+// }
+//
+// public String getMobile() {
+// return mobile;
+// }
+//
+// public void setMobile(String mobile) {
+// this.mobile = mobile;
+// }
+//}
diff --git a/ruoyi-admin/src/main/resources/application-xh.yml b/ruoyi-admin/src/main/resources/application-xh.yml
index 272f63c..49f9850 100644
--- a/ruoyi-admin/src/main/resources/application-xh.yml
+++ b/ruoyi-admin/src/main/resources/application-xh.yml
@@ -192,7 +192,7 @@
#鏈� 鍦� 鐭俊璇锋眰鍦板潃(杩欎釜鏈嶅姟鏄垜浠嚜宸卞啓鐨�)
#xhsmsPath: http://192.168.2.13:8092/sendSms
#鏂板崕鐭俊璇锋眰鍦板潃(杩欎釜鏈嶅姟鏄垜浠嚜宸卞啓鐨�)
-xhsmsPath: http://192.16.4.220:8092/sendSms
+xhsmsPath: http://192.16.4.220:8092/sms
#甯愬彿
xhsmsAccount: 911124
#鎺ュ彛瀵嗙爜
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/LoginBody.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/LoginBody.java
index a814c3a..b042879 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/LoginBody.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/LoginBody.java
@@ -44,4 +44,9 @@
*/
private String deptId;
+ /**
+ * 鐢ㄦ埛绫诲瀷
+ */
+ private String userType;
+
}
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 b5e2021..571f2ac 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","/test/**", "/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/subtaskAnswer/getQuestionCache", "/smartor/subtaskAnswer/saveQuestionCache", "/smartor/servicetask/getScriptInfoByCondition", "/smartor/subtaskAnswer/saveQuestionAnswer", "/smartor/import/download", "/smartor/serviceSubtask/recordAccept", "/smartor/outPath/getInfoByParam", "/smartor/serviceExternal/addDeptInfo", "/smartor/serviceExternal/**", "/sso/**","/smartor/sltdHealthcareRecord/**","/smartor/servicetask/getScriptByCondition","/smartor/subtaskAnswer/saveMYDQuestionAnswer","smartor/serviceSubtask/goSfRelay","/smartor/serviceSubtask/scanGenerateSubtask").permitAll()
+ .antMatchers("/login","/test/**", "/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/subtaskAnswer/getQuestionCache", "/smartor/subtaskAnswer/saveQuestionCache", "/smartor/servicetask/getScriptInfoByCondition", "/smartor/subtaskAnswer/saveQuestionAnswer", "/smartor/import/download", "/smartor/serviceSubtask/recordAccept", "/smartor/outPath/getInfoByParam", "/smartor/serviceExternal/addDeptInfo", "/smartor/serviceExternal/**", "/sso/**","/smartor/sltdHealthcareRecord/**","/smartor/servicetask/getScriptByCondition","/smartor/subtaskAnswer/saveMYDQuestionAnswer","smartor/serviceSubtask/goSfRelay","/smartor/serviceSubtask/scanGenerateSubtask","/smartor/shphone/getFirstQues","/smartor/shphone/processResust","/smartor/shphone/addOutboundInstance").permitAll()
// 闈欐�佽祫婧愶紝鍙尶鍚嶈闂�
// .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**","/getDept/*","/SSOLogin/**").permitAll().antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**","/getDept/*","/SSOLogin/**","/system/dict/data/typeout/*").permitAll().antMatchers( "/druid/**").permitAll()
diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ThreadPoolConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ThreadPoolConfig.java
index 36695a2..70633ec 100644
--- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ThreadPoolConfig.java
+++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ThreadPoolConfig.java
@@ -1,6 +1,7 @@
package com.ruoyi.framework.config;
import com.ruoyi.common.utils.Threads;
+import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.concurrent.BasicThreadFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@@ -15,6 +16,7 @@
*
* @author ruoyi
**/
+@Slf4j
@Configuration
public class ThreadPoolConfig
{
@@ -34,12 +36,22 @@
public ThreadPoolTaskExecutor threadPoolTaskExecutor()
{
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
- executor.setMaxPoolSize(maxPoolSize);
+ // 鏍稿績绾跨▼姹犲ぇ灏�
executor.setCorePoolSize(corePoolSize);
+ // 鏈�澶у彲鍒涘缓鐨勭嚎绋嬫暟
+ executor.setMaxPoolSize(maxPoolSize);
+ // 闃熷垪鏈�澶ч暱搴�
executor.setQueueCapacity(queueCapacity);
+ // 绾跨▼姹犵淮鎶ょ嚎绋嬫墍鍏佽鐨勭┖闂叉椂闂�
executor.setKeepAliveSeconds(keepAliveSeconds);
- // 绾跨▼姹犲鎷掔粷浠诲姟(鏃犵嚎绋嬪彲鐢�)鐨勫鐞嗙瓥鐣�
+ // 绾跨▼鍚嶇О鍓嶇紑
+ executor.setThreadNamePrefix("async-task-executor-");
+ // 璁剧疆绾跨▼宸ュ巶 (鐢ㄤ簬缁欑嚎绋嬪懡鍚嶏紝渚夸簬鎺掓煡闂)
+ executor.setThreadFactory(new BasicThreadFactory.Builder().namingPattern("async-task-%d").daemon(true).build());
+ // 绾跨▼姹犲鎷掔粷浠诲姟 (鏃犵嚎绋嬪彲鐢�) 鐨勫鐞嗙瓥鐣� - 璋冪敤鑰呰繍琛岀瓥鐣�
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
+ // 鍒濆鍖�
+ executor.initialize();
return executor;
}
diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java
index e0c3750..1ac77fb 100644
--- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java
+++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java
@@ -81,7 +81,7 @@
* @param uuid 鍞竴鏍囪瘑
* @return 缁撴灉
*/
- public String login(String username, String password, String code, String uuid, String orgid, String campusid) {
+ public String login(String username, String password, String code, String uuid, String orgid, String campusid, String userType) {
boolean captchaEnabled = configService.selectCaptchaEnabled();
// 楠岃瘉鐮佸紑鍏�
if (captchaEnabled) {
@@ -91,7 +91,7 @@
Authentication authentication = null;
try {
if (StringUtils.isEmpty(campusid)) campusid = "1";
- UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(username + "&" + orgid + "&" + campusid, password);
+ UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(username + "&" + orgid + "&" + campusid + "&" + userType, password);
AuthenticationContextHolder.setContext(authenticationToken);
// 璇ユ柟娉曚細鍘昏皟鐢║serDetailsServiceImpl.loadUserByUsername
authentication = authenticationManager.authenticate(authenticationToken);
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 805cca7..2f047a7 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
@@ -395,7 +395,7 @@
iIcd10Service.queryAddIcd10();
}
- // nhfy/sltd鍥炴函30澶╁垎娈甸噰闆嗗垽鏂紙姣忔鏈�澶�7澶╋級
+ // nhfy/sltd鍥炴函30澶╁垎娈甸噰闆嗗垽鏂紙姣忔鏈�澶�4澶╋級
boolean isBackfill = (active.trim().equals("nhfy") || active.trim().equals("sltd")) && StringUtils.isNotBlank(todayZeroStr);
if (isBackfill) {
DateTimeFormatter dateFmt = DateTimeFormatter.ofPattern("yyyy-MM-dd");
@@ -403,7 +403,7 @@
LocalDate segEndDate = todayZero.toLocalDate();
int segCount = 0;
while (!segStart.isAfter(segEndDate)) {
- LocalDate segEnd = segStart.plusDays(6);
+ LocalDate segEnd = segStart.plusDays(3);
if (segEnd.isAfter(segEndDate)) {
segEnd = segEndDate;
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java
index 797600a..dbb20cd 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java
@@ -4,6 +4,7 @@
import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.domain.entity.*;
import com.ruoyi.common.exception.ServiceException;
+import com.ruoyi.common.exception.base.BaseException;
import com.ruoyi.common.utils.DtoConversionUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
@@ -133,6 +134,7 @@
SysUserDept sysUserDept = new SysUserDept();
sysUserDept.setUserId(sysUser.getUserId());
sysUserDept.setDeptType(sysUser.getSearchscope());
+ sysUserDept.setOrgid(sysUser.getOrgid());
List<SysUserDept> sysUserDeptKSs = null;
List<SysUserDept> sysUserDeptBQs = null;
if (StringUtils.isNotEmpty(sysUser.getSearchscope()) && sysUser.getSearchscope().equals("0")) {
@@ -181,14 +183,16 @@
String[] split = userName.split("&");
SysUser sysUser = userMapper.selectUserByUserNameByCondition(split[0], split[1], null);
if (Objects.isNull(sysUser)) return sysUser;
+ //杩欓噷鍙崱鐢ㄦ埛绫诲瀷涓衡�滄偅鑰呪�濈殑
+ if (sysUser.getUserType().equals("鎮h��") && StringUtils.isNotEmpty(split[3]) && !split[3].equals("null") && !sysUser.getUserType().equals(split[3].trim()))
+ throw new BaseException("褰撳墠鐢ㄦ埛绫诲瀷涓庣櫥褰曠敤鎴风被鍨嬩笉涓�鑷�");
boolean isAdmin = StringUtils.isNotEmpty(split[0]) && "admin".equals(split[0]);
IUserExtInfoService userExtInfoService = SpringUtils.getBean(IUserExtInfoService.class);
Executor executor = SpringUtils.getBean("threadPoolTaskExecutor");
// === 骞惰鏌ヨ: 鐢ㄦ埛鏈烘瀯淇℃伅 + 閮ㄩ棬鍒楄〃 ===
- CompletableFuture<Map<String, String>> orgInfoFuture = CompletableFuture.supplyAsync(() ->
- userExtInfoService.getUserOrgInfo(sysUser.getUserId().toString(), split[1], split[2]), executor);
+ CompletableFuture<Map<String, String>> orgInfoFuture = CompletableFuture.supplyAsync(() -> userExtInfoService.getUserOrgInfo(sysUser.getUserId().toString(), split[1], split[2]), executor);
CompletableFuture<List<SysDept>> deptsFuture;
if (isAdmin) {
@@ -340,10 +344,7 @@
//鑾峰彇褰撳墠鐧婚檰浜虹殑鏈烘瀯鍜岄櫌锟�?
IUserExtInfoService userExtInfoService2 = SpringUtils.getBean(IUserExtInfoService.class);
- Map<String, String> userOrgInfo2 = userExtInfoService2.getUserOrgInfo(
- sysUser.getUserId().toString(),
- split[1],
- split[3]);
+ Map<String, String> userOrgInfo2 = userExtInfoService2.getUserOrgInfo(sysUser.getUserId().toString(), split[1], split[3]);
if (!userOrgInfo2.isEmpty()) {
sysUser.setOrgid(userOrgInfo2.get("orgid"));
sysUser.setCampusid(userOrgInfo2.get("campusid"));
diff --git a/ruoyi-system/src/main/resources/mapper/system/SmsTempletMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SmsTempletMapper.xml
index 3305c94..7dd1c07 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SmsTempletMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SmsTempletMapper.xml
@@ -67,6 +67,7 @@
<if test="wardCode != null and wardCode != ''">and ward_code = #{wardCode}</if>
<if test="userName != null and userName != ''">and user_name = #{userName}</if>
<if test="nickName != null and nickName != ''">and nick_name = #{nickName}</if>
+ <if test="pageSize != null and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if>
</select>
<select id="selectSmsTempletByTempletid" parameterType="Long" resultMap="SmsTempletResult">
diff --git a/smartor/src/main/java/com/smartor/domain/DTO/QuestionResultDTO.java b/smartor/src/main/java/com/smartor/domain/DTO/QuestionResultDTO.java
new file mode 100644
index 0000000..d352a44
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/domain/DTO/QuestionResultDTO.java
@@ -0,0 +1,36 @@
+package com.smartor.domain.DTO;
+
+import com.ruoyi.common.core.domain.BaseEntity;
+import com.smartor.domain.ServiceSubtaskDetailRatioExport;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 闂嵎缁撴灉
+ *
+ * @author ruoyi
+ * @date 2024-02-02
+ */
+
+@ApiModel(value = "QuestionResultDTO", description = "闂嵎缁撴灉")
+@Data
+public class QuestionResultDTO extends BaseEntity {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 闂嵎棰樼洰
+ */
+ @ApiModelProperty(value = "闂嵎棰樼洰")
+ private String qeustionText;
+
+ /**
+ * 闂嵎缁撴灉闆嗗悎
+ */
+ @ApiModelProperty(value = "闂嵎缁撴灉闆嗗悎")
+ private List<ServiceSubtaskDetailRatioExport> subtaskDetailRatioExportList;
+
+
+}
diff --git a/smartor/src/main/java/com/smartor/domain/IvrLibaTemplateScript.java b/smartor/src/main/java/com/smartor/domain/IvrLibaTemplateScript.java
index 8f8b80c..47e2ca5 100644
--- a/smartor/src/main/java/com/smartor/domain/IvrLibaTemplateScript.java
+++ b/smartor/src/main/java/com/smartor/domain/IvrLibaTemplateScript.java
@@ -372,6 +372,20 @@
@ApiModelProperty(value = "鎶ュ绉戝璐d换浜虹紪鐮侊紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
private String reportDeptPersonCode;
+ /**
+ * 娴佽浆绉戝璐d换浜虹紪鐮� (濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊)
+ */
+ @Excel(name = "娴佽浆绉戝璐d换浜虹紪鐮侊紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
+ @ApiModelProperty(value = "娴佽浆绉戝璐d换浜虹紪鐮侊紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
+ private String circulationDeptPersonCode;
+
+ /**
+ * 娴佽浆绉戝璐d换浜哄悕绉� (濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊)
+ */
+ @Excel(name = "娴佽浆绉戝璐d换浜哄悕绉帮紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
+ @ApiModelProperty(value = "娴佽浆绉戝璐d换浜哄悕绉帮紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
+ private String circulationDeptPersonName;
+
// /**
// * 闂缁撴灉锛堢粰鈥滃�肩被鍨嬧�濇槸鏂囨湰鎴栬�呮暟鍊肩敤鐨勶級
// */
diff --git a/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScript.java b/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScript.java
index 4681c79..1f699af 100644
--- a/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScript.java
+++ b/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScript.java
@@ -359,6 +359,23 @@
@ApiModelProperty(value = "鎶ュ绉戝璐d换浜虹紪鐮侊紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
private String reportDeptPersonCode;
+
+ /**
+ * 娴佽浆绉戝璐d换浜虹紪鐮� (濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊)
+ */
+ @Excel(name = "娴佽浆绉戝璐d换浜虹紪鐮侊紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
+ @ApiModelProperty(value = "娴佽浆绉戝璐d换浜虹紪鐮侊紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
+ private String circulationDeptPersonCode;
+
+ /**
+ * 娴佽浆绉戝璐d换浜哄悕绉� (濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊)
+ */
+ @Excel(name = "娴佽浆绉戝璐d换浜哄悕绉帮紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
+ @ApiModelProperty(value = "娴佽浆绉戝璐d换浜哄悕绉帮紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
+ private String circulationDeptPersonName;
+
+
+
/**
* 闂閫夐」
*/
diff --git a/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScriptVO.java b/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScriptVO.java
index e228248..cc39114 100644
--- a/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScriptVO.java
+++ b/smartor/src/main/java/com/smartor/domain/IvrTaskTemplateScriptVO.java
@@ -392,6 +392,20 @@
private String reportDeptPersonCode;
/**
+ * 娴佽浆绉戝璐d换浜虹紪鐮� (濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊)
+ */
+ @Excel(name = "娴佽浆绉戝璐d换浜虹紪鐮侊紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
+ @ApiModelProperty(value = "娴佽浆绉戝璐d换浜虹紪鐮侊紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
+ private String circulationDeptPersonCode;
+
+ /**
+ * 娴佽浆绉戝璐d换浜哄悕绉� (濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊)
+ */
+ @Excel(name = "娴佽浆绉戝璐d换浜哄悕绉帮紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
+ @ApiModelProperty(value = "娴佽浆绉戝璐d换浜哄悕绉帮紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
+ private String circulationDeptPersonName;
+
+ /**
* 璇濇湳閫夐」
*/
@ApiModelProperty(value = "璇濇湳閫夐」")
diff --git a/smartor/src/main/java/com/smartor/domain/PatMedInhosp.java b/smartor/src/main/java/com/smartor/domain/PatMedInhosp.java
index 74f2198..e76922f 100644
--- a/smartor/src/main/java/com/smartor/domain/PatMedInhosp.java
+++ b/smartor/src/main/java/com/smartor/domain/PatMedInhosp.java
@@ -331,7 +331,7 @@
*/
@ApiModelProperty(value = "鍏ラ櫌鐥呭尯闀挎湡浠诲姟锛屾槸鍚﹀鐞嗭細0 鏈鐞� 1 澶勭悊鎴愬姛 2 澶勭悊澶辫触 ")
private String inWardcheckFlag;
-
+
/**
* 鑽搧瀹f暀闀挎湡浠诲姟锛屾槸鍚﹀鐞嗭細0 鏈鐞� 1 澶勭悊
*/
@@ -396,7 +396,7 @@
/**
* 鍑哄叆闄㈡爣璇�
*/
- @ApiModelProperty("鍑哄叆闄㈡爣璇嗭細0鍏ラ櫌 1鍑洪櫌 2 杞 3 棰勫叆闄�")
+ @ApiModelProperty("鍑哄叆闄㈡爣璇嗭細0鍏ラ櫌 1鍑洪櫌 2 杞 3 棰勫叆闄� 4.婊℃剰搴�")
private Integer cry;
/**
diff --git a/smartor/src/main/java/com/smartor/domain/PhoneCallBackSHVO.java b/smartor/src/main/java/com/smartor/domain/PhoneCallBackSHVO.java
new file mode 100644
index 0000000..34dcb5a
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/domain/PhoneCallBackSHVO.java
@@ -0,0 +1,50 @@
+package com.smartor.domain;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * 鐢佃瘽闂鍝嶅簲(涓夋眹)
+ *
+ * @author ls
+ * 26
+ */
+@Data
+public class PhoneCallBackSHVO {
+
+ /**
+ * 瀛愪换鍔D
+ */
+ @ApiModelProperty(value = "瀛愪换鍔D")
+ private Long subId;
+
+ /**
+ * 闂ID
+ */
+ @ApiModelProperty(value = "闂ID")
+ private Long scriptId;
+
+ /**
+ * 浠诲姟妯℃澘ID
+ */
+ @ApiModelProperty(value = "浠诲姟妯℃澘ID")
+ private Long taskTemplateid;
+
+ /**
+ * 鍙互瀵瑰綋鍓嶉�氶亾鐨勯煶閲忚繘琛岄�傚綋璋冩暣,鍙栧�艰寖鍥淬��-4,4銆�
+ */
+ @ApiModelProperty(value = "搴忓彿")
+ private Integer sort;
+
+
+ @ApiModelProperty(value = "闂鍐呭")
+ private String scriptContent;
+
+
+ @ApiModelProperty(value = "閫夐」")
+ private String option;
+
+ @ApiModelProperty(value = "娴佺▼鐘舵�侊細0缁撴潫 1杩涜涓�")
+ private String status = "1";
+
+}
diff --git a/smartor/src/main/java/com/smartor/domain/PhoneCallResultYQVO.java b/smartor/src/main/java/com/smartor/domain/PhoneCallResultYQVO.java
new file mode 100644
index 0000000..18fbbb1
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/domain/PhoneCallResultYQVO.java
@@ -0,0 +1,74 @@
+package com.smartor.domain;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * 鐢佃瘽ASR鍥炶皟璇锋眰(闆ㄧ划)
+ *
+ * @author ls
+ * @date 2024-08-8
+ */
+@Data
+public class PhoneCallResultYQVO {
+
+ @ApiModelProperty(value = "浠诲姟缂栧彿(杩欓噷瀛樺湪鐨勫氨鏄痵ubtaskID)")
+ private String taskid;
+
+
+ /**
+ * 褰撳墠鍛煎彨鐨勭洰鏍囧彿鐮�
+ */
+ @ApiModelProperty(value = "褰撳墠鍛煎彨鐨勭洰鏍囧彿鐮�")
+ private String phone;
+
+ /**
+ * 褰撳墠鍥炶皟鐨勮姹傜被鍨嬶紝鍖呮嫭锛欰srCallback: ASR鏂囨湰鍥炶皟 DtmfCallback:鏀跺埌鎸夐敭鍥炶皟 SilentCallback:闈欓粯鍥炶皟 PlayEvent:闊充箰鎾斁寮�濮嬨�佺粨鏉熶簨浠跺洖璋�
+ */
+ @ApiModelProperty(value = "褰撳墠鍥炶皟鐨勮姹傜被鍨嬶紝鍖呮嫭锛欰srCallback: ASR鏂囨湰鍥炶皟 DtmfCallback:鏀跺埌鎸夐敭鍥炶皟 SilentCallback:闈欓粯鍥炶皟 PlayEvent:闊充箰鎾斁寮�濮嬨�佺粨鏉熶簨浠跺洖璋�")
+ private String operate;
+
+ /**
+ * asr鍥炵瓟鐨勫唴瀹�
+ */
+ @ApiModelProperty(value = "asr鍥炵瓟鐨勫唴瀹�")
+ private String asrResult;
+
+ /**
+ * 瀛愪换鍔D
+ */
+ @ApiModelProperty(value = "瀛愪换鍔D")
+ private Long subId;
+
+ /**
+ * 闂ID
+ */
+ @ApiModelProperty(value = "闂ID")
+ private Long scriptId;
+
+ /**
+ * 浠诲姟妯℃澘ID
+ */
+ @ApiModelProperty(value = "浠诲姟妯℃澘ID")
+ private Long taskTemplateid;
+
+ /**
+ * 鍙互瀵瑰綋鍓嶉�氶亾鐨勯煶閲忚繘琛岄�傚綋璋冩暣,鍙栧�艰寖鍥淬��-4,4銆�
+ */
+ @ApiModelProperty(value = "搴忓彿")
+ private Integer sort;
+
+
+ @ApiModelProperty(value = "閫氳繃搴撳尮閰嶇殑缁撴灉")
+ private String scriptContent;
+
+ @ApiModelProperty(value = "鏈烘瀯ID")
+ private String orgid;
+
+ @ApiModelProperty(value = "uuid")
+ private String uuid;
+
+ @ApiModelProperty(value = "guid")
+ private String guid;
+
+}
diff --git a/smartor/src/main/java/com/smartor/domain/ServiceOutPath.java b/smartor/src/main/java/com/smartor/domain/ServiceOutPath.java
index bf18264..5f04aa7 100644
--- a/smartor/src/main/java/com/smartor/domain/ServiceOutPath.java
+++ b/smartor/src/main/java/com/smartor/domain/ServiceOutPath.java
@@ -85,5 +85,21 @@
@ApiModelProperty(value = "鐥呬汉淇℃伅")
private PatArchive patArchive;
+
+ /**
+ * 鏈姞瀵嗙殑浠诲姟ID
+ */
+ @ApiModelProperty("鏈姞瀵嗙殑浠诲姟ID")
+ @Excel(name = "鏈姞瀵嗙殑浠诲姟ID")
+ private Long taskId;
+
+
+ /**
+ * 鏈姞瀵嗙殑瀛愪换鍔D
+ */
+ @ApiModelProperty("鏈姞瀵嗙殑瀛愪换鍔D")
+ @Excel(name = "鏈姞瀵嗙殑瀛愪换鍔D")
+ private Long subId;
+
}
diff --git a/smartor/src/main/java/com/smartor/domain/ServiceSubtask.java b/smartor/src/main/java/com/smartor/domain/ServiceSubtask.java
index 477e214..d2801da 100644
--- a/smartor/src/main/java/com/smartor/domain/ServiceSubtask.java
+++ b/smartor/src/main/java/com/smartor/domain/ServiceSubtask.java
@@ -1,15 +1,13 @@
package com.smartor.domain;
-import java.math.BigDecimal;
-import java.util.Date;
-import java.util.List;
-
import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
-import com.ruoyi.common.annotation.Excel;
-import com.ruoyi.common.core.domain.BaseEntity;
+
+import java.util.Date;
+import java.util.List;
/**
* 鍗曚竴浠诲姟锛堥殢璁匡級瀵硅薄 ivr_tasksingle
@@ -595,7 +593,7 @@
/**
* 鎮h�呮潵婧�
*/
- @ApiModelProperty(value = "鎮h�呮潵婧愶細0鏈湴鎮h�呰〃 1澶栭儴鎮h�呰〃")
+ @ApiModelProperty(value = "浠诲姟鐥呬汉鐨勬潵婧愶細0锛氬尰闄㈡偅鑰咃紱1锛氬閮ㄦ偅鑰� 2:瀵煎叆鎮h��")
private String patfrom;
/**
diff --git a/smartor/src/main/java/com/smartor/domain/ServiceSubtaskDetailRatioExport.java b/smartor/src/main/java/com/smartor/domain/ServiceSubtaskDetailRatioExport.java
index 57f2a47..aaaf228 100644
--- a/smartor/src/main/java/com/smartor/domain/ServiceSubtaskDetailRatioExport.java
+++ b/smartor/src/main/java/com/smartor/domain/ServiceSubtaskDetailRatioExport.java
@@ -35,6 +35,15 @@
@Excel(name = "姣斾緥")
private String ratio;
+ @Excel(name = "鍒嗘暟")
+ private String score;
+
+ @ApiModelProperty(value = "闂绫诲瀷锛�1.鍗曢�� 2澶氶�� 3闂瓟 4濉┖ 5鍏跺畠锛�")
+ private String valueType;
+
+ @Excel(name = "閫夐」")
+ private String targetvalue;
+
@Excel(name = "浠诲姟鍚嶇О")
private String taskname;
diff --git a/smartor/src/main/java/com/smartor/domain/ServiceSubtaskDetailTrace.java b/smartor/src/main/java/com/smartor/domain/ServiceSubtaskDetailTrace.java
index 1f1ae20..fc3afb9 100644
--- a/smartor/src/main/java/com/smartor/domain/ServiceSubtaskDetailTrace.java
+++ b/smartor/src/main/java/com/smartor/domain/ServiceSubtaskDetailTrace.java
@@ -370,13 +370,68 @@
private String dutyDeptPersonCode;
@Excel(name = "鎶ュ绉戝璐d换浜哄悕绉帮紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
- @ApiModelProperty(value = "鎶ュ绉戝鍚嶇О锛堝鏋滃涓瀹ょ敤閫楀彿鍒嗗壊锛�")
+ @ApiModelProperty(value = "鎶ュ绉戝璐d换浜哄悕绉帮紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
private String reportDeptPersonName;
@Excel(name = "鎶ュ绉戝缂栫爜锛堝鏋滃涓瀹ょ敤閫楀彿鍒嗗壊锛�")
@ApiModelProperty(value = "鎶ュ绉戝璐d换浜虹紪鐮侊紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
private String reportDeptPersonCode;
+ /**
+ * 娴佽浆绉戝璐d换浜虹紪鐮� (濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊)
+ */
+ @Excel(name = "娴佽浆绉戝璐d换浜虹紪鐮侊紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
+ @ApiModelProperty(value = "娴佽浆绉戝璐d换浜虹紪鐮侊紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
+ private String circulationDeptPersonCode;
+ /**
+ * 娴佽浆绉戝璐d换浜哄悕绉� (濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊)
+ */
+ @Excel(name = "娴佽浆绉戝璐d换浜哄悕绉帮紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
+ @ApiModelProperty(value = "娴佽浆绉戝璐d换浜哄悕绉帮紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
+ private String circulationDeptPersonName;
+
+ /**
+ * 娴佽浆绉戝璐d换浜虹紪鐮� (濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊)
+ */
+ @Excel(name = "娴佽浆绉戝缂栫爜锛堝鏋滃涓瀹ょ敤閫楀彿鍒嗗壊锛�")
+ @ApiModelProperty(value = "娴佽浆绉戝缂栫爜锛堝鏋滃涓瀹ょ敤閫楀彿鍒嗗壊锛�")
+ private String circulationDeptCode;
+
+ /**
+ * 娴佽浆绉戝璐d换浜哄悕绉� (濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊)
+ */
+ @Excel(name = "娴佽浆绉戝鍚嶇О锛堝鏋滃涓瀹ょ敤閫楀彿鍒嗗壊锛�")
+ @ApiModelProperty(value = "娴佽浆绉戝鍚嶇О锛堝鏋滃涓瀹ょ敤閫楀彿鍒嗗壊锛�")
+ private String circulationDeptName;
+
+ /**
+ * 娴佽浆绉戝璐d换浜哄悕绉� (濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊)
+ */
+ @Excel(name = "娴佽浆璇存槑")
+ @ApiModelProperty(value = "娴佽浆璇存槑")
+ private String circulationExplain;
+ /**
+ * 娴佽浆绉戝璐d换浜哄悕绉� (濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊)
+ */
+ @Excel(name = "娴佽浆鏃堕棿")
+ @ApiModelProperty(value = "娴佽浆鏃堕棿")
+ private Date circulationTime;
+
+ /**
+ * 娴佽浆鐘舵�侊細0涓嶆祦杞紙榛樿锛� 1娴佽浆
+ */
+ @Excel(name = "娴佽浆鐘舵�侊細0涓嶆祦杞紙榛樿锛� 1娴佽浆")
+ @ApiModelProperty(value = "娴佽浆鐘舵�侊細0涓嶆祦杞紙榛樿锛� 1娴佽浆")
+ private String circulationStatus;
+
+
+ @Excel(name = "娴佽浆浜哄鍚�")
+ @ApiModelProperty(value = "娴佽浆浜哄鍚�")
+ private String circulationPersonName;
+
+ @Excel(name = "娴佽浆浜虹紪鐮�")
+ @ApiModelProperty(value = "娴佽浆浜虹紪鐮�")
+ private String circulationPersonCode;
}
diff --git a/smartor/src/main/java/com/smartor/domain/ServiceSubtaskExport.java b/smartor/src/main/java/com/smartor/domain/ServiceSubtaskExport.java
index 7123091..fdb7c2d 100644
--- a/smartor/src/main/java/com/smartor/domain/ServiceSubtaskExport.java
+++ b/smartor/src/main/java/com/smartor/domain/ServiceSubtaskExport.java
@@ -19,6 +19,14 @@
@Data
public class ServiceSubtaskExport extends BaseEntity {
private static final long serialVersionUID = 1L;
+//
+// /**
+// * 绉戝鍚嶇О
+// */
+// @Excel(name = "涓婚敭")
+// @ApiModelProperty(value = "涓婚敭")
+// private Long id;
+
/**
* 绉戝鍚嶇О
diff --git a/smartor/src/main/java/com/smartor/domain/SvyLibTemplateScript.java b/smartor/src/main/java/com/smartor/domain/SvyLibTemplateScript.java
index 8eae615..ed891b3 100644
--- a/smartor/src/main/java/com/smartor/domain/SvyLibTemplateScript.java
+++ b/smartor/src/main/java/com/smartor/domain/SvyLibTemplateScript.java
@@ -315,6 +315,20 @@
private String reportDeptPersonCode;
/**
+ * 娴佽浆绉戝璐d换浜虹紪鐮� (濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊)
+ */
+ @Excel(name = "娴佽浆绉戝璐d换浜虹紪鐮侊紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
+ @ApiModelProperty(value = "娴佽浆绉戝璐d换浜虹紪鐮侊紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
+ private String circulationDeptPersonCode;
+
+ /**
+ * 娴佽浆绉戝璐d换浜哄悕绉� (濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊)
+ */
+ @Excel(name = "娴佽浆绉戝璐d换浜哄悕绉帮紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
+ @ApiModelProperty(value = "娴佽浆绉戝璐d换浜哄悕绉帮紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
+ private String circulationDeptPersonName;
+
+ /**
* 闂埜棰樼洰鍒嗙被ID闆嗗悎
*/
@ApiModelProperty("婊℃剰搴︽剰瑙佸紓甯革紙鍙拡瀵规枃鏈級")
diff --git a/smartor/src/main/java/com/smartor/domain/SvyLibTemplateScriptVO.java b/smartor/src/main/java/com/smartor/domain/SvyLibTemplateScriptVO.java
index 34861f5..2bdbe3b 100644
--- a/smartor/src/main/java/com/smartor/domain/SvyLibTemplateScriptVO.java
+++ b/smartor/src/main/java/com/smartor/domain/SvyLibTemplateScriptVO.java
@@ -331,6 +331,22 @@
@ApiModelProperty(value = "鎶ュ绉戝璐d换浜虹紪鐮侊紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
private String reportDeptPersonCode;
+
+ /**
+ * 娴佽浆绉戝璐d换浜虹紪鐮� (濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊)
+ */
+ @Excel(name = "娴佽浆绉戝璐d换浜虹紪鐮侊紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
+ @ApiModelProperty(value = "娴佽浆绉戝璐d换浜虹紪鐮侊紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
+ private String circulationDeptPersonCode;
+
+ /**
+ * 娴佽浆绉戝璐d换浜哄悕绉� (濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊)
+ */
+ @Excel(name = "娴佽浆绉戝璐d换浜哄悕绉帮紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
+ @ApiModelProperty(value = "娴佽浆绉戝璐d换浜哄悕绉帮紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
+ private String circulationDeptPersonName;
+
+
@Excel(name = "鍒嗙被ID闆嗗悎")
@ApiModelProperty(value = "鍒嗙被ID闆嗗悎")
private List<Long> categoryids;
diff --git a/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScript.java b/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScript.java
index d76921d..076d5bf 100644
--- a/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScript.java
+++ b/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScript.java
@@ -279,6 +279,19 @@
private String reportDeptPersonCode;
/**
+ * 娴佽浆绉戝璐d换浜虹紪鐮� (濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊)
+ */
+ @Excel(name = "娴佽浆绉戝璐d换浜虹紪鐮侊紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
+ @ApiModelProperty(value = "娴佽浆绉戝璐d换浜虹紪鐮侊紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
+ private String circulationDeptPersonCode;
+
+ /**
+ * 娴佽浆绉戝璐d换浜哄悕绉� (濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊)
+ */
+ @Excel(name = "娴佽浆绉戝璐d换浜哄悕绉帮紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
+ @ApiModelProperty(value = "娴佽浆绉戝璐d换浜哄悕绉帮紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
+ private String circulationDeptPersonName;
+ /**
* 闂埜棰樼洰鍒嗙被ID闆嗗悎
*/
@ApiModelProperty("婊℃剰搴︽剰瑙佸紓甯革紙鍙拡瀵规枃鏈級")
diff --git a/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScriptVO.java b/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScriptVO.java
index 4fa5793..774b826 100644
--- a/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScriptVO.java
+++ b/smartor/src/main/java/com/smartor/domain/SvyTaskTemplateScriptVO.java
@@ -359,11 +359,25 @@
@ApiModelProperty(value = "鎶ュ绉戝鍚嶇О锛堝鏋滃涓瀹ょ敤閫楀彿鍒嗗壊锛�")
private String reportDeptPersonName;
- @Excel(name = "鎶ュ绉戝缂栫爜锛堝鏋滃涓瀹ょ敤閫楀彿鍒嗗壊锛�")
+ @Excel(name = "鎶ュ绉戝璐d换浜虹紪鐮侊紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
@ApiModelProperty(value = "鎶ュ绉戝璐d换浜虹紪鐮侊紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
private String reportDeptPersonCode;
/**
+ * 娴佽浆绉戝璐d换浜虹紪鐮� (濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊)
+ */
+ @Excel(name = "娴佽浆绉戝璐d换浜虹紪鐮侊紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
+ @ApiModelProperty(value = "娴佽浆绉戝璐d换浜虹紪鐮侊紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
+ private String circulationDeptPersonCode;
+
+ /**
+ * 娴佽浆绉戝璐d换浜哄悕绉� (濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊)
+ */
+ @Excel(name = "娴佽浆绉戝璐d换浜哄悕绉帮紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
+ @ApiModelProperty(value = "娴佽浆绉戝璐d换浜哄悕绉帮紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
+ private String circulationDeptPersonName;
+
+ /**
* 闂埜棰樼洰鍒嗙被ID闆嗗悎
*/
@ApiModelProperty("婊℃剰搴︽剰瑙佸紓甯革紙鍙拡瀵规枃鏈級")
diff --git a/smartor/src/main/java/com/smartor/domain/VO/DetailTraceDealVO.java b/smartor/src/main/java/com/smartor/domain/VO/DetailTraceDealVO.java
index 98ab898..8fa031d 100644
--- a/smartor/src/main/java/com/smartor/domain/VO/DetailTraceDealVO.java
+++ b/smartor/src/main/java/com/smartor/domain/VO/DetailTraceDealVO.java
@@ -99,5 +99,61 @@
@Excel(name = "鎶ュ绉戝缂栫爜锛堝鏋滃涓瀹ょ敤閫楀彿鍒嗗壊锛�")
@ApiModelProperty(value = "鎶ュ绉戝璐d换浜虹紪鐮侊紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
private String reportDeptPersonCode;
+
+ /**
+ * 娴佽浆绉戝璐d换浜虹紪鐮� (濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊)
+ */
+ @Excel(name = "娴佽浆绉戝璐d换浜虹紪鐮侊紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
+ @ApiModelProperty(value = "娴佽浆绉戝璐d换浜虹紪鐮侊紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
+ private String circulationDeptPersonCode;
+
+ /**
+ * 娴佽浆绉戝璐d换浜哄悕绉� (濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊)
+ */
+ @Excel(name = "娴佽浆绉戝璐d换浜哄悕绉帮紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
+ @ApiModelProperty(value = "娴佽浆绉戝璐d换浜哄悕绉帮紙濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊锛�")
+ private String circulationDeptPersonName;
+
+ /**
+ * 娴佽浆绉戝璐d换浜虹紪鐮� (濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊)
+ */
+ @Excel(name = "娴佽浆绉戝缂栫爜锛堝鏋滃涓瀹ょ敤閫楀彿鍒嗗壊锛�")
+ @ApiModelProperty(value = "娴佽浆绉戝缂栫爜锛堝鏋滃涓瀹ょ敤閫楀彿鍒嗗壊锛�")
+ private String circulationDeptCode;
+
+ /**
+ * 娴佽浆绉戝璐d换浜哄悕绉� (濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊)
+ */
+ @Excel(name = "娴佽浆绉戝鍚嶇О锛堝鏋滃涓瀹ょ敤閫楀彿鍒嗗壊锛�")
+ @ApiModelProperty(value = "娴佽浆绉戝鍚嶇О锛堝鏋滃涓瀹ょ敤閫楀彿鍒嗗壊锛�")
+ private String circulationDeptName;
+
+ /**
+ * 娴佽浆绉戝璐d换浜哄悕绉� (濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊)
+ */
+ @Excel(name = "娴佽浆璇存槑")
+ @ApiModelProperty(value = "娴佽浆璇存槑")
+ private String circulationExplain;
+ /**
+ * 娴佽浆绉戝璐d换浜哄悕绉� (濡傛灉澶氫釜绉戝鐢ㄩ�楀彿鍒嗗壊)
+ */
+ @Excel(name = "娴佽浆鏃堕棿")
+ @ApiModelProperty(value = "娴佽浆鏃堕棿")
+ private Date circulationTime;
+
+ /**
+ * 娴佽浆鐘舵�侊細0涓嶆祦杞紙榛樿锛� 1娴佽浆
+ */
+ @Excel(name = "娴佽浆鐘舵�侊細0涓嶆祦杞紙榛樿锛� 1娴佽浆")
+ @ApiModelProperty(value = "娴佽浆鐘舵�侊細0涓嶆祦杞紙榛樿锛� 1娴佽浆")
+ private Integer circulationStatus;
+
+ @Excel(name = "娴佽浆浜哄鍚�")
+ @ApiModelProperty(value = "娴佽浆浜哄鍚�")
+ private String circulationPersonName;
+
+ @Excel(name = "娴佽浆浜虹紪鐮�")
+ @ApiModelProperty(value = "娴佽浆浜虹紪鐮�")
+ private String circulationPersonCode;
}
diff --git a/smartor/src/main/java/com/smartor/domain/VO/QuestionResultVO.java b/smartor/src/main/java/com/smartor/domain/VO/QuestionResultVO.java
new file mode 100644
index 0000000..bd82a67
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/domain/VO/QuestionResultVO.java
@@ -0,0 +1,96 @@
+package com.smartor.domain.VO;
+
+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 org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 闂缁撴灉DTO
+ *
+ * @author ruoyi
+ * @date 2024-02-02
+ */
+
+@ApiModel(value = "QuestionResultVO", description = "闂缁撴灉VO")
+@Data
+public class QuestionResultVO extends BaseEntity {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 绉戝涓庣梾鍖虹殑鏌ヨ鏄痮r杩樻槸and: 1:and(榛樿)(绂婚櫌鐥呭尯涓庣闄㈢瀹ょ粍鍚�) 2:or(绂婚櫌鐥呭尯涓庣闄㈢瀹ょ粍鍚�) 3:and(绂婚櫌鐥呭尯涓庨殢璁跨瀹ょ粍鍚�) 4:or(绂婚櫌鐥呭尯涓庨殢璁跨瀹ょ粍鍚�)
+ */
+ @ApiModelProperty(value = "绉戝涓庣梾鍖虹殑鏌ヨ鏄痮r杩樻槸and: 1:and(榛樿)(绂婚櫌鐥呭尯涓庣闄㈢瀹ょ粍鍚�) 2:or(绂婚櫌鐥呭尯涓庣闄㈢瀹ょ粍鍚�) 3:and(绂婚櫌鐥呭尯涓庨殢璁跨瀹ょ粍鍚�) 4:or(绂婚櫌鐥呭尯涓庨殢璁跨瀹ょ粍鍚�)")
+ private String deptOrDistrict = "1";
+
+ /**
+ *
+ */
+ @ApiModelProperty(value = "涓婚敭id")
+ private Long subId;
+
+ /**
+ * 鍑洪櫌鐥呭尯缂栧彿
+ */
+ @ApiModelProperty(value = "鍑洪櫌鐥呭尯闆嗗悎(蹇呭~)")
+ private List<String> leavehospitaldistrictcodes;
+
+
+ /**
+ * 涓婚敭id闆嗗悎
+ */
+ @ApiModelProperty(value = "涓婚敭id闆嗗悎")
+ private List<Long> subIdList;
+
+
+ /**
+ * 寮�濮嬪嚭闄㈡棩鏈�
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @DateTimeFormat(pattern = "yyyy-MM-dd")
+ @ApiModelProperty(value = "寮�濮嬪嚭闄㈡棩鏈�")
+ private Date startOutHospTime;
+
+ /**
+ * 缁撴潫鍑洪櫌鏃ユ湡
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @DateTimeFormat(pattern = "yyyy-MM-dd")
+ @ApiModelProperty(value = "缁撴潫鍑洪櫌鏃ユ湡")
+ private Date endOutHospTime;
+
+
+ /**
+ * 闂鍐呭
+ */
+ @ApiModelProperty(value = "闂鍐呭")
+ private String questionContent;
+
+ /**
+ * 鍒嗘暟鏌ヨ寮�濮�
+ */
+ @ApiModelProperty(value = "鍒嗘暟鏌ヨ寮�濮�")
+ private Double startScore;
+
+ /**
+ * 鍒嗘暟鏌ヨ缁撴潫
+ */
+ @ApiModelProperty(value = "鍒嗘暟鏌ヨ缁撴潫")
+ private Double endScore;
+
+ /**
+ * 鏈嶅姟绫诲瀷(1銆佺洃娴嬭瘎浼帮紱2銆佸嚭闄㈤殢璁匡紱3銆侀棬璇婇殢璁匡紱4銆佸鏁欏叧鎬�锛�5銆佸璇婇�氱煡锛�6銆佹弧鎰忓害璋冩煡锛�7銆佹偅鑰呮姤鍛婏紱 8銆佸叾浠栭�氱煡)
+ */
+ @Excel(name = "鏈嶅姟绫诲瀷(1銆佺洃娴嬭瘎浼帮紱2銆佸嚭闄㈤殢璁匡紱3銆侀棬璇婇殢璁匡紱4銆佸鏁欏叧鎬�锛�5銆佸璇婄鐞嗭紱6銆佹弧鎰忓害璋冩煡锛�7銆佹偅鑰呮姤鍛婏紱 8銆佸叾浠栭�氱煡 9浣撴闅忚 10.鍖绘妧闅忚 11锛屽奖鍍忎笓绉戦殢璁� 12銆佸績鐢典笓绉戦殢璁匡紝 13涓撶闅忚)")
+ @ApiModelProperty(value = "鏈嶅姟绫诲瀷(1銆佺洃娴嬭瘎浼帮紱2銆佸嚭闄㈤殢璁匡紱3銆侀棬璇婇殢璁匡紱4銆佸鏁欏叧鎬�锛�5銆佸璇婄鐞嗭紱6銆佹弧鎰忓害璋冩煡锛�7銆佹偅鑰呮姤鍛婏紱 8銆佸叾浠栭�氱煡 9浣撴闅忚 10.鍖绘妧闅忚 11锛屽奖鍍忎笓绉戦殢璁� 12銆佸績鐢典笓绉戦殢璁匡紝 13涓撶闅忚)")
+ private String serviceType;
+
+ @ApiModelProperty(value = "闂绫诲瀷锛�1.鍗曢�� 2澶氶�� 3闂瓟 4濉┖ 5鍏跺畠锛�")
+ private String valueType;
+}
diff --git a/smartor/src/main/java/com/smartor/domain/VO/ServiceSubtaskVO.java b/smartor/src/main/java/com/smartor/domain/VO/ServiceSubtaskVO.java
index 1483955..6946849 100644
--- a/smartor/src/main/java/com/smartor/domain/VO/ServiceSubtaskVO.java
+++ b/smartor/src/main/java/com/smartor/domain/VO/ServiceSubtaskVO.java
@@ -94,8 +94,8 @@
/**
* 鏈嶅姟绫诲瀷(1銆佺洃娴嬭瘎浼帮紱2銆佸嚭闄㈤殢璁匡紱3銆侀棬璇婇殢璁匡紱4銆佸鏁欏叧鎬�锛�5銆佸璇婇�氱煡锛�6銆佹弧鎰忓害璋冩煡锛�7銆佹偅鑰呮姤鍛婏紱 8銆佸叾浠栭�氱煡)
*/
- @Excel(name = "鏈嶅姟绫诲瀷(1銆佺洃娴嬭瘎浼帮紱2銆佸嚭闄㈤殢璁匡紱3銆侀棬璇婇殢璁匡紱4銆佸鏁欏叧鎬�锛�5銆佸璇婄鐞嗭紱6銆佹弧鎰忓害璋冩煡锛�7銆佹偅鑰呮姤鍛婏紱 8銆佸叾浠栭�氱煡 9浣撴闅忚 10.鍖绘妧闅忚 11锛屽奖鍍忎笓绉戦殢璁� 12銆佸績鐢典笓绉戦殢璁匡紝 13涓撶闅忚)")
- @ApiModelProperty(value = "鏈嶅姟绫诲瀷(1銆佺洃娴嬭瘎浼帮紱2銆佸嚭闄㈤殢璁匡紱3銆侀棬璇婇殢璁匡紱4銆佸鏁欏叧鎬�锛�5銆佸璇婄鐞嗭紱6銆佹弧鎰忓害璋冩煡锛�7銆佹偅鑰呮姤鍛婏紱 8銆佸叾浠栭�氱煡 9浣撴闅忚 10.鍖绘妧闅忚 11锛屽奖鍍忎笓绉戦殢璁� 12銆佸績鐢典笓绉戦殢璁匡紝 13涓撶闅忚)")
+ @Excel(name = "鏈嶅姟绫诲瀷(鏈嶅姟绫诲瀷(1銆佺洃娴嬭瘎浼帮紱2銆佸嚭闄㈤殢璁匡紱3銆侀棬璇婇殢璁匡紱4銆佸鏁欏叧鎬�(鍑洪櫌) 5銆佸璇婄鐞嗭紱6銆佷綇闄㈡弧鎰忓害璋冩煡锛�7銆佹偅鑰呮姤鍛婏紱 8銆佸叾浠栭�氱煡 9浣撴闅忚 10.鍖绘妧闅忚 11锛屽奖鍍忎笓绉戦殢璁� 12銆佸績鐢典笓绉戦殢璁匡紝 13涓撶闅忚 14銆侀棬璇婃弧鎰忓害璋冩煡 15鎶曡瘔寤鸿 16璇鹃闅忚 17銆佸鏁欏叧鎬�(鍏ラ櫌) 18銆佸叆闄㈤殢璁�)")
+ @ApiModelProperty(value = "鏈嶅姟绫诲瀷(鏈嶅姟绫诲瀷(1銆佺洃娴嬭瘎浼帮紱2銆佸嚭闄㈤殢璁匡紱3銆侀棬璇婇殢璁匡紱4銆佸鏁欏叧鎬�(鍑洪櫌) 5銆佸璇婄鐞嗭紱6銆佷綇闄㈡弧鎰忓害璋冩煡锛�7銆佹偅鑰呮姤鍛婏紱 8銆佸叾浠栭�氱煡 9浣撴闅忚 10.鍖绘妧闅忚 11锛屽奖鍍忎笓绉戦殢璁� 12銆佸績鐢典笓绉戦殢璁匡紝 13涓撶闅忚 14銆侀棬璇婃弧鎰忓害璋冩煡 15鎶曡瘔寤鸿 16璇鹃闅忚 17銆佸鏁欏叧鎬�(鍏ラ櫌) 18銆佸叆闄㈤殢璁� 19鎵嬫湳闅忚 20 鎮h�呭紓甯告姤鍛婅〃)")
private String serviceType;
/**
@@ -292,6 +292,20 @@
@ApiModelProperty(value = "瀹屾垚鏃堕棿")
private Date finishtime;
+ /**
+ * 瀹屾垚鏃堕棿
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @ApiModelProperty(value = "瀹屾垚鏃堕棿(寮�濮嬫煡璇�)")
+ private Date finishtimeStart;
+
+ /**
+ * 瀹屾垚鏃堕棿(缁撴潫鏌ヨ)
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @ApiModelProperty(value = "瀹屾垚鏃堕棿(缁撴潫鏌ヨ)")
+ private Date finishtimeEnd;
+
/**
* 灏辫瘖璁板綍缂栧彿
diff --git a/smartor/src/main/java/com/smartor/domain/entity/ServiceSubtaskEntity.java b/smartor/src/main/java/com/smartor/domain/entity/ServiceSubtaskEntity.java
index 0ff3281..90ca575 100644
--- a/smartor/src/main/java/com/smartor/domain/entity/ServiceSubtaskEntity.java
+++ b/smartor/src/main/java/com/smartor/domain/entity/ServiceSubtaskEntity.java
@@ -307,6 +307,19 @@
@ApiModelProperty(value = "瀹屾垚鏃堕棿")
private Date finishtime;
+ /**
+ * 瀹屾垚鏃堕棿
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @ApiModelProperty(value = "瀹屾垚鏃堕棿(寮�濮嬫煡璇�)")
+ private Date finishtimeStart;
+
+ /**
+ * 瀹屾垚鏃堕棿(缁撴潫鏌ヨ)
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @ApiModelProperty(value = "瀹屾垚鏃堕棿(缁撴潫鏌ヨ)")
+ private Date finishtimeEnd;
/**
* 灏辫瘖璁板綍缂栧彿
diff --git a/smartor/src/main/java/com/smartor/mapper/ServiceSubtaskMapper.java b/smartor/src/main/java/com/smartor/mapper/ServiceSubtaskMapper.java
index c57c908..3ea8b6c 100644
--- a/smartor/src/main/java/com/smartor/mapper/ServiceSubtaskMapper.java
+++ b/smartor/src/main/java/com/smartor/mapper/ServiceSubtaskMapper.java
@@ -78,14 +78,12 @@
* @param scheduleId 璁″垝涓婚敭
* @param loopCount 杞锛�0=棣栬疆锛�
*/
- public int countActiveByScheduleIdAndLoop(@Param("scheduleId") Long scheduleId,
- @Param("loopCount") Long loopCount);
+ public int countActiveByScheduleIdAndLoop(@Param("scheduleId") Long scheduleId, @Param("loopCount") Long loopCount);
/**
* 浠诲姟缁勶紙appltype=5锛夛細鎷夊彇鏌愪竴杞鐨勫叏閮� subtask锛堢敤浜庡厠闅嗗埌涓嬩竴杞級銆�
*/
- public List<ServiceSubtask> selectByScheduleIdAndLoop(@Param("scheduleId") Long scheduleId,
- @Param("loopCount") Long loopCount);
+ public List<ServiceSubtask> selectByScheduleIdAndLoop(@Param("scheduleId") Long scheduleId, @Param("loopCount") Long loopCount);
/**
* 闅忚鍙婃椂鐜囷細搴旈殢璁挎椂闂�<瀹為檯闅忚鏃堕棿
@@ -259,9 +257,21 @@
/**
* 缁熻闂鐨勯�夐」鐨勭櫨鍒嗘瘮
*
- * @param taskIds
+ * @param taskIds 浠诲姟 ID 鍒楄〃 (鐢ㄤ簬鏈嶅姟绫诲瀷 2)
+ * @param startOutHospTime
+ * @param endOutHospTime
* @return
*/
- List<ServiceSubtaskDetailRatioExport> statQuestionOption(@Param("taskIds") List<Long> taskIds, @Param("startOutHospTime") Date startOutHospTime, @Param("endOutHospTime") Date endOutHospTime);
+ List<ServiceSubtaskDetailRatioExport> statQuestionOption(@Param("taskIds") List<Long> taskIds, @Param("startOutHospTime") Date startOutHospTime, @Param("endOutHospTime") Date endOutHospTime, @Param("scoreStart") Double scoreStart, @Param("scoreEnd") Double scoreEnd, @Param("questiontext") String questiontext, @Param("valueType") String valueType);
+
+ /**
+ * 鏍规嵁瀛愪换鍔� ID 缁熻闂鐨勯�夐」鐨勭櫨鍒嗘瘮锛堢敤浜庢弧鎰忓害缁熻 serviceType=6锛�
+ *
+ * @param subtaskIds 瀛愪换鍔� ID 鍒楄〃 (鍙兘鍗曚釜 taskid 涓嬬殑鎵�鏈夊瓙浠诲姟 id)
+ * @param startOutHospTime
+ * @param endOutHospTime
+ * @return
+ */
+ List<ServiceSubtaskDetailRatioExport> statQuestionOptionBySubtaskIds(@Param("subtaskIds") List<Long> subtaskIds, @Param("startOutHospTime") Date startOutHospTime, @Param("endOutHospTime") Date endOutHospTime, @Param("scoreStart") Double scoreStart, @Param("scoreEnd") Double scoreEnd, @Param("questiontext") String questiontext, @Param("valueType") String valueType);
}
diff --git a/smartor/src/main/java/com/smartor/mapper/SvyLibTemplateScriptMapper.java b/smartor/src/main/java/com/smartor/mapper/SvyLibTemplateScriptMapper.java
index 301ab01..f78ef51 100644
--- a/smartor/src/main/java/com/smartor/mapper/SvyLibTemplateScriptMapper.java
+++ b/smartor/src/main/java/com/smartor/mapper/SvyLibTemplateScriptMapper.java
@@ -1,6 +1,5 @@
package com.smartor.mapper;
-import com.smartor.domain.IvrLibaTemplateScript;
import com.smartor.domain.SvyLibTemplateScript;
import com.smartor.domain.SvyLibTemplateScriptVO;
import org.apache.ibatis.annotations.Mapper;
diff --git a/smartor/src/main/java/com/smartor/service/IServicePhoneService.java b/smartor/src/main/java/com/smartor/service/IServicePhoneService.java
new file mode 100644
index 0000000..2899603
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/service/IServicePhoneService.java
@@ -0,0 +1,22 @@
+package com.smartor.service;
+
+import com.smartor.domain.*;
+import com.smartor.domain.VO.HeLibraryCountVO;
+import com.smartor.domain.VO.ServiceSubtaskCotinueCountVO;
+import com.smartor.domain.VO.TransferDeptVO;
+import com.smartor.domain.entity.ServiceSubtaskEntity;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 涓夋眹鐢佃瘽鏈嶅姟
+ *
+ * @author ruoyi
+ * @date 2026-08-27
+ */
+public interface IServicePhoneService {
+ OutboundInstanceResVO addOutboundInstance(OutboundConfigAddReqVO request);
+}
diff --git a/smartor/src/main/java/com/smartor/service/IServiceSubtaskService.java b/smartor/src/main/java/com/smartor/service/IServiceSubtaskService.java
index 93c578b..d1d22e1 100644
--- a/smartor/src/main/java/com/smartor/service/IServiceSubtaskService.java
+++ b/smartor/src/main/java/com/smartor/service/IServiceSubtaskService.java
@@ -2,8 +2,10 @@
import com.ruoyi.common.core.domain.AjaxResult;
import com.smartor.domain.*;
+import com.smartor.domain.DTO.QuestionResultDTO;
import com.smartor.domain.ServiceSubtask;
import com.smartor.domain.VO.HeLibraryCountVO;
+import com.smartor.domain.VO.QuestionResultVO;
import com.smartor.domain.VO.ServiceSubtaskCotinueCountVO;
import com.smartor.domain.VO.TransferDeptVO;
import com.smartor.domain.entity.ServiceSubtaskEntity;
@@ -53,8 +55,11 @@
*/
public List<ServiceSubtaskRes> patItem(ServiceSubtaskEntity serviceSubtaskEntity);
+ public List<ServiceSubtask> getServiceSubtasks(ServiceSubtaskEntity serviceSubtaskEntity);
+
/**
* 杞Щ绉戝鐥呭尯
+ *
* @param transferDeptVO
* @return
*/
@@ -129,6 +134,20 @@
*/
public PhoneCallBackYQVO phoneCallBackYQ(PhoneCallReqYQVO phoneCallReqYQVO);
+ public PhoneCallBackSHVO getFirstQues(PhoneCallReqYQVO phoneCallReqYQVO);
+
+ public PhoneCallBackSHVO processResust(PhoneCallResultYQVO phoneCallReqYQVO);
+
+ /**
+ * 闂缁撴灉鍗犳瘮
+ *
+ * @param QuestionResultVO
+ * @param serviceSubtaskRes
+ * @return
+ */
+ public List<ServiceSubtaskDetailRatioExport> getDetailRatio(QuestionResultVO questionResultVO, List<ServiceSubtaskRes> serviceSubtaskRes);
+
+
/**
* 闆ㄧ划浠诲姟鎷夊彇
*
@@ -202,12 +221,20 @@
Map<String, Object> smsSubTask(Long subid);
/**
- * 缁熻闂鐨勯�夐」鐨勭櫨鍒嗘瘮
+ * 缁熻闂鐨勯�夐」鐨勭櫨鍒嗘瘮 (鐢ㄤ簬鏈嶅姟绫诲瀷 2)
*
* @param taskIds
* @return
*/
- public List<ServiceSubtaskDetailRatioExport> statQuestionOption(List<Long> taskIds, Date startOutHospTime, Date endOutHospTime);
+ public List<ServiceSubtaskDetailRatioExport> statQuestionOption(List<Long> taskIds, Date startOutHospTime, Date endOutHospTime, String scriptContent, Double scoreStart, Double scoreEnd, String valueType);
+
+ /**
+ * 鏍规嵁瀛愪换鍔� ID 缁熻闂鐨勯�夐」鐨勭櫨鍒嗘瘮锛堢敤浜庢弧鎰忓害缁熻 serviceType=6锛�
+ *
+ * @param subtaskIds 瀛愪换鍔� ID 鍒楄〃
+ * @return
+ */
+ public List<ServiceSubtaskDetailRatioExport> statQuestionOptionBySubtaskIds(List<Long> subtaskIds, Date startOutHospTime, Date endOutHospTime, String scriptContent, Double scoreStart, Double scoreEnd, String valueType);
public String scanGenerateSubtask(ServiceTask serviceTaskVo);
diff --git a/smartor/src/main/java/com/smartor/service/impl/PatArchiveImportServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/PatArchiveImportServiceImpl.java
index bab045e..a778218 100644
--- a/smartor/src/main/java/com/smartor/service/impl/PatArchiveImportServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/PatArchiveImportServiceImpl.java
@@ -199,8 +199,11 @@
int start = patArchiveImport.getIdcardno().length() - 6;
String lastSixDigits = patArchiveImport.getIdcardno().substring(start, start + 6);
sysUser.setUserName(lastSixDigits);
- //瀵嗙爜锛歺h@123456
- sysUser.setPassword("$2a$10$zja67LEWTESHutljd8bqEeRy.VgWb./8iJPpFR6VjTUa7ZYNfRRrO");
+ //鍘熷瘑鐮侊細xh@123456
+ //sysUser.setPassword("$2a$10$zja67LEWTESHutljd8bqEeRy.VgWb./8iJPpFR6VjTUa7ZYNfRRrO");
+ //鏂板瘑鐮侊細123456
+ sysUser.setPassword("$2a$10$1CRhRCwPEqhEI4bkXYFOLu.ga0PLfDhI3pnvVQ1GX0sbHY3N/UJky");
+
sysUser.setPhonenumber(patArchiveImport.getTelcode());
sysUser.setUserType("鎮h��");
sysUser.setDeptId(395L);
diff --git a/smartor/src/main/java/com/smartor/service/impl/ServicPhoneServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/ServicPhoneServiceImpl.java
new file mode 100644
index 0000000..26a970c
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/service/impl/ServicPhoneServiceImpl.java
@@ -0,0 +1,200 @@
+package com.smartor.service.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.gson.Gson;
+import com.ruoyi.common.core.domain.entity.SysDept;
+import com.ruoyi.common.core.redis.RedisCache;
+import com.ruoyi.common.core.service.IConfigService;
+import com.ruoyi.common.dx.MessageSend;
+import com.ruoyi.common.exception.base.BaseException;
+import com.ruoyi.common.utils.*;
+import com.ruoyi.common.utils.http.HttpUtils;
+import com.ruoyi.common.utils.spring.SpringUtils;
+import com.ruoyi.system.domain.SysConfig;
+import com.ruoyi.system.mapper.SysConfigMapper;
+import com.ruoyi.system.service.ISysConfigService;
+import com.smartor.common.FtpService;
+import com.smartor.common.MtSubmitSmUtil;
+import com.smartor.common.ScheduleSubtaskBuilder;
+import com.smartor.config.PhoneUtils;
+import com.smartor.domain.DTO.ServiceSubtaskDetailDTO;
+import com.smartor.domain.*;
+import com.smartor.domain.VO.HeLibraryCountVO;
+import com.smartor.domain.VO.ServiceSubtaskCotinueCountVO;
+import com.smartor.domain.VO.TransferDeptVO;
+import com.smartor.domain.entity.ServiceSubtaskEntity;
+import com.smartor.mapper.*;
+import com.smartor.service.*;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.collections4.MapUtils;
+import org.apache.commons.lang3.ObjectUtils;
+import org.junit.Test;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.cache.annotation.Cacheable;
+import org.springframework.data.redis.core.ListOperations;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.text.DecimalFormat;
+import java.text.SimpleDateFormat;
+import java.time.*;
+import java.time.format.DateTimeFormatter;
+import java.time.temporal.ChronoUnit;
+import java.util.*;
+import java.util.concurrent.TimeUnit;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.stream.Collectors;
+
+/**
+ * 鍗曚竴浠诲姟锛堥殢璁匡級Service涓氬姟灞傚鐞�
+ *
+ * @author ruoyi
+ * @date 2024-02-02
+ */
+@Slf4j
+@Service
+public class ServicPhoneServiceImpl implements IServicePhoneService {
+ @Value("${shurl}")
+ private String shurl;
+
+ @Value("${shversion}")
+ private String shversion;
+
+ /**
+ * 鏂板澶栧懠瀹炰緥閰嶇疆
+ *
+ * @param request 澶栧懠瀹炰緥閰嶇疆璇锋眰瀵硅薄
+ * @return 澶栧懠瀹炰緥閰嶇疆缁撴灉
+ * @throws BaseException 鎺ュ彛璋冪敤澶辫触鎴栨暟鎹В鏋愬紓甯告椂鎶涘嚭
+ */
+ @Override
+ public OutboundInstanceResVO addOutboundInstance(OutboundConfigAddReqVO request) {
+ // 1. 鍙傛暟鏍¢獙
+ validateRequest(request);
+
+ // 2. 鍙戦�� HTTP 璇锋眰
+ String responseJson = sendHttpPostRequest(shurl + shversion + "/config/addOutboundInstance", request);
+
+ // 3. 瑙f瀽鍝嶅簲骞惰繑鍥炵粨鏋�
+ return parseResponse(responseJson);
+ }
+
+ /**
+ * 鍙傛暟鏍¢獙
+ */
+ private void validateRequest(OutboundConfigAddReqVO request) {
+ if (request == null) {
+ throw new BaseException("璇锋眰鍙傛暟涓嶈兘涓虹┖");
+ }
+
+ // 蹇呬紶鍙傛暟鏍¢獙
+ assertNotBlank(request.getName(), "椤圭洰鍚嶇О涓嶈兘涓虹┖");
+ assertNotBlank(request.getAgent(), "鍧愬腑鍙蜂笉鑳戒负绌�");
+ assertNotBlank(request.getTenantId(), "璧勬簮缁勫彿涓嶈兘涓虹┖");
+ assertNotBlank(request.getCallType(), "鍛煎彨绫诲瀷涓嶈兘涓虹┖");
+ assertNotBlank(request.getActionID(), "actionID 涓嶈兘涓虹┖");
+
+ // 鏉′欢蹇呭~鏍¢獙锛歩sVgc=0 鏃讹紝queueId 鍜� ratio 涓哄繀濉�
+ if ("0".equals(request.getIsVgc())) {
+ assertNotBlank(request.getQueueId(), "isVgc=0 鏃讹紝鎵ц鍧愬腑缁� ID 涓嶈兘涓虹┖");
+ assertNotBlank(request.getRatio(), "isVgc=0 鏃讹紝澶栧懠閫熺巼涓嶈兘涓虹┖");
+ }
+ // 鏉′欢蹇呭~鏍¢獙锛歩sVgc=1 鏃讹紝ivrId 涓哄繀濉�
+ else if ("1".equals(request.getIsVgc())) {
+ assertNotBlank(request.getIvrId(), "isVgc=1 鏃讹紝IVR 娴佺▼ ID 涓嶈兘涓虹┖");
+ }
+ }
+
+ /**
+ * 鍙戦�� POST HTTP 璇锋眰
+ *
+ * @param url API 鍦板潃
+ * @param request 璇锋眰瀵硅薄
+ * @return 鏈嶅姟鍣ㄥ搷搴� JSON 瀛楃涓�
+ */
+ private String sendHttpPostRequest(String url, Object request) {
+ log.info("寮�濮嬭皟鐢ㄥ鍛煎疄渚嬮厤缃帴鍙o紝URL: {}", url);
+
+ Map<String, String> headers = buildHeaders();
+ String requestBody = new Gson().toJson(request);
+
+ String response = HttpUtils.sendPostByHeader(url, requestBody, headers);
+
+ if (StringUtils.isEmpty(response)) {
+ log.error("澶栧懠瀹炰緥閰嶇疆鎺ュ彛璋冪敤澶辫触锛屾湭杩斿洖鏈夋晥鏁版嵁锛孶RL: {}", url);
+ throw new BaseException("鎺ュ彛璋冪敤澶辫触锛屾湭杩斿洖鏈夋晥鏁版嵁");
+ }
+
+ log.info("澶栧懠瀹炰緥閰嶇疆鎺ュ彛璋冪敤鎴愬姛锛屽搷搴旓細{}", response);
+ return response;
+ }
+
+ /**
+ * 鏋勫缓 HTTP 璇锋眰澶�
+ */
+ private Map<String, String> buildHeaders() {
+ Map<String, String> headers = new HashMap<>(1);
+ headers.put("Content-Type", "application/json; charset=UTF-8");
+ return headers;
+ }
+
+ /**
+ * 瑙f瀽 HTTP 鍝嶅簲骞惰浆鎹负 OutboundInstanceResVO
+ *
+ * @param responseJson 鍝嶅簲 JSON 瀛楃涓�
+ * @return 澶栧懠瀹炰緥閰嶇疆鍝嶅簲瀵硅薄
+ * @throws BaseException 褰撳搷搴旂爜涓嶄负 200 鎴栧搷搴旀暟鎹В鏋愬け璐ユ椂鎶涘嚭
+ */
+ private OutboundInstanceResVO parseResponse(String responseJson) {
+ try {
+ JSONObject response = JSON.parseObject(responseJson);
+
+ // 妫�鏌ュ搷搴旂爜
+ Integer code = response.getInteger("code");
+ if (!"200".equals(code.toString())) {
+ String message = response.getString("message");
+ log.error("澶栧懠瀹炰緥閰嶇疆鎺ュ彛杩斿洖澶辫触锛宑ode: {}, message: {}", code, message);
+ throw new BaseException("鏂板澶栧懠瀹炰緥閰嶇疆澶辫触锛�" + message);
+ }
+
+ // 瑙f瀽 data 瀛楁
+ JSONObject data = response.getJSONObject("data");
+ if (data == null || data.isEmpty()) {
+ throw new BaseException("鎺ュ彛杩斿洖鏁版嵁涓虹┖");
+ }
+
+ return data.toJavaObject(OutboundInstanceResVO.class);
+
+ } catch (BaseException e) {
+ throw e;
+ } catch (Exception e) {
+ log.error("瑙f瀽澶栧懠瀹炰緥閰嶇疆鍝嶅簲寮傚父锛宺esponse: {}", responseJson, e);
+ throw new BaseException("瑙f瀽鍝嶅簲鏁版嵁寮傚父锛�" + e.getMessage());
+ }
+ }
+
+ /**
+ * 鏂█瀛楃涓查潪绌哄伐鍏锋柟娉�
+ *
+ * @param value 寰呮鏌ョ殑鍊�
+ * @param message 鏂█澶辫触鏃剁殑閿欒娑堟伅
+ * @throws BaseException 褰撳�间负绌烘椂鎶涘嚭
+ */
+ private void assertNotBlank(String value, String message) {
+ if (StringUtils.isBlank(value)) {
+ throw new BaseException(message);
+ }
+ }
+}
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 4fb489d..bd62a45 100644
--- a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskAnswerServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskAnswerServiceImpl.java
@@ -21,6 +21,7 @@
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
+import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
@@ -163,8 +164,19 @@
return serviceSubtaskAnswerMapper.deleteServiceSubtaskAnswerById(id);
}
+ /**
+ * 淇濆瓨闂嵎绛旀 (寮傛澶勭悊锛屽揩閫熻繑鍥�)
+ *
+ * @param serviceSubTaskAnswerReq 绛旀璇锋眰
+ * @param flag 鏍囧織浣�
+ * @return 缁撴灉
+ */
@Override
+ @Async("threadPoolTaskExecutor")
public Integer saveQuestionAnswer(ServiceSubTaskAnswerReq serviceSubTaskAnswerReq, Long flag) {
+ String threadName = Thread.currentThread().getName();
+ log.info("[{}] 寮�濮嬪紓姝ュ鐞嗕繚瀛橀棶鍗风瓟妗�", threadName);
+ try {
//鍙傛暟瑙e瘑
Long tid = null;
Long pid = null;
@@ -365,16 +377,6 @@
log.error("灏嗚key鍜寁alue浠巖edis涓�,serviceSubtask鐨勫�间负--------锛歿}", serviceSubtask);
if (score != null && !score.isEmpty()) serviceSubtask.setScore(score);
serviceSubtaskMapper.updateServiceSubtaskByCondition(serviceSubtask);
- //淇敼浣忛櫌婊℃剰搴︾姸鎬侊紙閬垮厤閲嶅鏌ヨ锛�
- if (serviceSubtask.getServiceType() != null && "6".equals(serviceSubtask.getServiceType())) {
- Long inhospid = serviceSubtask.getInhospid();
- if (inhospid != null) {
- PatMedInhosp patMedInhosp = new PatMedInhosp();
- patMedInhosp.setInhospMydFlag("1");
- patMedInhosp.setInhospid(inhospid);
- patMedInhospMapper.updatePatMedInhosp(patMedInhosp);
- }
- }
//灏嗗綋鍓嶅彂閫佺姸鎬佹敼鎴� 9 瀹屾垚锛堢紦瀛� preachform 鏌ヨ锛�
String currentPreachform = serviceSubtask.getCurrentPreachform();
@@ -401,9 +403,13 @@
}
}
+ log.info("[{}] 瀹屾垚寮傛澶勭悊淇濆瓨闂嵎绛旀", Thread.currentThread().getName());
return 1;
+ } catch (Exception e) {
+ log.error("[{}] 寮傛澶勭悊淇濆瓨闂嵎绛旀鍙戠敓寮傚父 : {},璇锋眰鐨勫璞′负锛歿}", Thread.currentThread().getName(), e.getMessage(), e,serviceSubTaskAnswerReq);
+ throw new RuntimeException("淇濆瓨闂嵎绛旀澶辫触", e);
}
-
+}
@Override
public Integer saveQuestionDetail(ServiceSubTaskCacheReq serviceSubTaskCacheReq, Long flag) {
Long tid = Long.valueOf(serviceSubTaskCacheReq.getParam1());
@@ -1107,6 +1113,8 @@
subtaskDetailTrace.setDutyDeptPersonName(svyTaskTemplateScriptVO.getDutyDeptPersonName());
subtaskDetailTrace.setReportDeptPersonCode(svyTaskTemplateScriptVO.getReportDeptPersonCode());
subtaskDetailTrace.setReportDeptPersonName(svyTaskTemplateScriptVO.getReportDeptPersonName());
+ subtaskDetailTrace.setCirculationDeptPersonCode(svyTaskTemplateScriptVO.getCirculationDeptPersonCode());
+ subtaskDetailTrace.setCirculationDeptPersonName(svyTaskTemplateScriptVO.getCirculationDeptPersonName());
Long existTraceId = existingTraceIdMap.get(subtaskDetailTrace.getScriptid());
if (existTraceId != null) {
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 3f7999d..ad85650 100644
--- a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
@@ -8,6 +8,7 @@
import com.google.gson.Gson;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.redis.RedisCache;
+import com.ruoyi.common.core.service.IConfigService;
import com.ruoyi.common.dx.MessageSend;
import com.ruoyi.common.exception.base.BaseException;
import com.ruoyi.common.utils.*;
@@ -21,9 +22,11 @@
import com.smartor.common.MtSubmitSmUtil;
import com.smartor.common.ScheduleSubtaskBuilder;
import com.smartor.config.PhoneUtils;
+import com.smartor.domain.DTO.QuestionResultDTO;
import com.smartor.domain.DTO.ServiceSubtaskDetailDTO;
import com.smartor.domain.*;
import com.smartor.domain.VO.HeLibraryCountVO;
+import com.smartor.domain.VO.QuestionResultVO;
import com.smartor.domain.VO.ServiceSubtaskCotinueCountVO;
import com.smartor.domain.VO.TransferDeptVO;
import com.smartor.domain.entity.ServiceSubtaskEntity;
@@ -33,7 +36,9 @@
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.ObjectUtils;
+import org.checkerframework.checker.nullness.qual.NonNull;
import org.junit.Test;
+import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cache.annotation.Cacheable;
@@ -208,6 +213,8 @@
private PatMedOperationMapper patMedOperationMapper;
@Autowired
private PatMedOperationItemMapper patMedOperationItemMapper;
+ @Autowired
+ private ServiceOutPathMapper serviceOutPathMapper;
/**
* 鏌ヨ鍗曚竴浠诲姟锛堥殢璁匡級
@@ -410,26 +417,7 @@
@Override
public List<ServiceSubtaskRes> patItem(ServiceSubtaskEntity serviceSubtaskEntity) {
- if (serviceSubtaskEntity.getSendstateView() != null) {
- // 1锛氬緟闅忚锛�1 琚鍙栥��2 寰呭彂閫併��3 宸插彂閫併��5 鍙戦�佸け璐ャ��7銆佽秴鏃讹級锛�2锛氬凡瀹屾垚锛� 6 宸插畬鎴愶級銆�3锛氭棤闇�闅忚锛�4 涓嶆墽琛岋級
- if (serviceSubtaskEntity.getSendstateView() == 1)
- serviceSubtaskEntity.setSendstates(new ArrayList<>(Arrays.asList(1L, 2L, 3L, 5L, 7L)));
- if (serviceSubtaskEntity.getSendstateView() == 2)
- serviceSubtaskEntity.setSendstates(new ArrayList<>(Arrays.asList(6L)));
- if (serviceSubtaskEntity.getSendstateView() == 3)
- serviceSubtaskEntity.setSendstates(new ArrayList<>(Arrays.asList(4L)));
- }
- //鎮h�呰幏鍙栭殢璁夸换鍔�-闇�瑕佹煡璇㈠悓涓偅鑰咃紙韬唤璇侊級鎵�鏈夌殑浠诲姟 鏅畞
- if (StringUtils.isNotEmpty(serviceSubtaskEntity.getOrgid()) && serviceSubtaskEntity.getOrgid().equals("47255004333112711A1001")) {
- if (ObjectUtils.isNotEmpty(serviceSubtaskEntity.getPatid())) {
- PatArchive patArchive = patArchiveService.selectPatArchiveByPatid(serviceSubtaskEntity.getPatid());
- if (ObjectUtils.isNotEmpty(patArchive) && StringUtils.isNotEmpty(patArchive.getIdcardno())) {
- serviceSubtaskEntity.setPatid(null);
- serviceSubtaskEntity.setSfzh(patArchive.getIdcardno());
- }
- }
- }
- List<ServiceSubtask> selectServiceSubtaskList = this.selectServiceSubtaskList(serviceSubtaskEntity);
+ List<ServiceSubtask> selectServiceSubtaskList = getServiceSubtasks(serviceSubtaskEntity);
List<ServiceSubtaskRes> serviceSubtaskResList = new ArrayList<>();
for (ServiceSubtask serviceSubtask : selectServiceSubtaskList) {
@@ -465,6 +453,30 @@
serviceSubtaskResList.add(serviceSubtaskRes);
}
return serviceSubtaskResList;
+ }
+
+ public List<ServiceSubtask> getServiceSubtasks(ServiceSubtaskEntity serviceSubtaskEntity) {
+ if (serviceSubtaskEntity.getSendstateView() != null) {
+ // 1锛氬緟闅忚锛�1 琚鍙栥��2 寰呭彂閫併��3 宸插彂閫併��5 鍙戦�佸け璐ャ��7銆佽秴鏃讹級锛�2锛氬凡瀹屾垚锛� 6 宸插畬鎴愶級銆�3锛氭棤闇�闅忚锛�4 涓嶆墽琛岋級
+ if (serviceSubtaskEntity.getSendstateView() == 1)
+ serviceSubtaskEntity.setSendstates(new ArrayList<>(Arrays.asList(1L, 2L, 3L, 5L, 7L)));
+ if (serviceSubtaskEntity.getSendstateView() == 2)
+ serviceSubtaskEntity.setSendstates(new ArrayList<>(Arrays.asList(6L)));
+ if (serviceSubtaskEntity.getSendstateView() == 3)
+ serviceSubtaskEntity.setSendstates(new ArrayList<>(Arrays.asList(4L)));
+ }
+ //鎮h�呰幏鍙栭殢璁夸换鍔�-闇�瑕佹煡璇㈠悓涓偅鑰咃紙韬唤璇侊級鎵�鏈夌殑浠诲姟 鏅畞
+ if (StringUtils.isNotEmpty(serviceSubtaskEntity.getOrgid()) && serviceSubtaskEntity.getOrgid().equals("47255004333112711A1001")) {
+ if (ObjectUtils.isNotEmpty(serviceSubtaskEntity.getPatid())) {
+ PatArchive patArchive = patArchiveService.selectPatArchiveByPatid(serviceSubtaskEntity.getPatid());
+ if (ObjectUtils.isNotEmpty(patArchive) && StringUtils.isNotEmpty(patArchive.getIdcardno())) {
+ serviceSubtaskEntity.setPatid(null);
+ serviceSubtaskEntity.setSfzh(patArchive.getIdcardno());
+ }
+ }
+ }
+ List<ServiceSubtask> selectServiceSubtaskList = this.selectServiceSubtaskList(serviceSubtaskEntity);
+ return selectServiceSubtaskList;
}
@Override
@@ -632,9 +644,66 @@
*/
@Override
public Map<String, Object> insertServiceSubtask(ServiceSubtask serviceSubtask) {
- serviceSubtask.setCreateTime(DateUtils.getNowDate());
- serviceSubtaskMapper.insertServiceSubtask(serviceSubtask);
+ List<ServiceSubtask> serviceSubtasks = null;
+ //鍏堟煡璇竴涓嬭鎮h�呮槸鍚﹀凡缁忓垱寤烘牴鎹畇erviceType,sendstate,inhospid,patid,orgid
+ //杩欐牱鍒ゆ柇涓昏鏄负浜嗘兂璁╂柊鍗庡尰闄㈢殑澶栭儴瀵煎叆鎮h�呭垱寤轰换鍔★紝涔熻兘鐢ㄨ繖涓帴鍙�
+ if (StringUtils.isEmpty(serviceSubtask.getPatfrom()) || !serviceSubtask.getPatfrom().equals("2")) {
+ ServiceSubtaskEntity serviceSubtaskVO = new ServiceSubtaskEntity();
+ serviceSubtaskVO.setServiceType(serviceSubtask.getServiceType());
+ serviceSubtaskVO.setInhospid(serviceSubtask.getInhospid());
+ serviceSubtaskVO.setSendstates(new ArrayList<>(Arrays.asList(1L, 2L, 3L, 5L, 7L)));
+ serviceSubtaskVO.setPatid(serviceSubtask.getPatid());
+ serviceSubtaskVO.setOrgid(serviceSubtask.getOrgid());
+ serviceSubtaskVO.setCampusid(serviceSubtask.getCampusid());
+ serviceSubtasks = serviceSubtaskMapper.selectServiceSubtaskList(serviceSubtaskVO);
+ }
RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample();
+ String format = null;
+ if (CollectionUtils.isNotEmpty(serviceSubtasks)) {
+ ServiceSubtask serviceSubtask1 = serviceSubtasks.get(0);
+ ServiceOutPath serviceOutPath = new ServiceOutPath();
+ serviceOutPath.setSubId(serviceSubtask1.getId());
+ List<ServiceOutPath> serviceOutPaths = serviceOutPathMapper.selectServiceOutPathList(serviceOutPath);
+ if (CollectionUtils.isNotEmpty(serviceOutPaths))
+ format = String.format("%03X", serviceOutPaths.get(0).getId());
+ else format = getOutPath(serviceSubtask1, rsaPublicKeyExample);
+ serviceSubtask = serviceSubtask1;
+ } else {
+ //濡傛灉涓嶅瓨鍦紝鍒欐柊澧�
+ ServiceTask serviceTask = serviceTaskService.selectServiceTaskByTaskid(serviceSubtask.getTaskid());
+ if (ObjectUtils.isNotEmpty(serviceTask)) {
+ serviceSubtask.setDeptcode(serviceTask.getDeptcode());
+ serviceSubtask.setTaskDesc(serviceTask.getTaskDesc());
+ serviceSubtask.setTaskName(serviceTask.getTaskName());
+ serviceSubtask.setDeptname(serviceTask.getDeptname());
+ serviceSubtask.setTemplatename(serviceTask.getTemplatename());
+ }
+
+ serviceSubtask.setCreateTime(DateUtils.getNowDate());
+ serviceSubtaskMapper.insertServiceSubtask(serviceSubtask);
+ //淇敼浣忛櫌婊℃剰搴︾姸鎬侊紙閬垮厤閲嶅鏌ヨ锛�
+ if (serviceSubtask.getServiceType() != null && "6".equals(serviceSubtask.getServiceType())) {
+ Long inhospid = serviceSubtask.getInhospid();
+ if (inhospid != null) {
+ PatMedInhosp patMedInhosp = new PatMedInhosp();
+ patMedInhosp.setInhospMydFlag("1");
+ patMedInhosp.setInhospid(inhospid);
+ patMedInhospMapper.updatePatMedInhosp(patMedInhosp);
+ }
+ }
+ format = getOutPath(serviceSubtask, rsaPublicKeyExample);
+ }
+
+ Map<String, Object> result = new HashMap<>();
+ if (StringUtils.isNotEmpty(format))
+ result.put("url", StringUtils.isNotEmpty(req_path) ? localIP + ":" + req_path + "/wt?p=" + format : localIP + "/wt?p=" + format);
+ else result.put("url", null);
+ result.put("subId", serviceSubtask.getId());
+ return result;
+ }
+
+ private String getOutPath(ServiceSubtask serviceSubtask, RSAPublicKeyExample rsaPublicKeyExample) {
+ String format;
String taskId = rsaPublicKeyExample.encryptedData(serviceSubtask.getTaskid().toString(), pub_key);
String patid = rsaPublicKeyExample.encryptedData(serviceSubtask.getPatid().toString(), pub_key);
String subId = rsaPublicKeyExample.encryptedData(serviceSubtask.getId().toString(), pub_key);
@@ -644,17 +713,15 @@
serviceOutPath.setCreateTime(new Date());
serviceOutPath.setParam6(subId);
serviceOutPath.setOrgid(serviceSubtask.getOrgid());
+ serviceOutPath.setTaskId(serviceSubtask.getTaskid());
+ serviceOutPath.setSubId(serviceSubtask.getId());
iServiceOutPathService.insertServiceOutPath(serviceOutPath);
//杞垚16杩涘埗
- String format = String.format("%03X", serviceOutPath.getId());
+ format = String.format("%03X", serviceOutPath.getId());
serviceOutPath.setRadix(format);
serviceOutPath.setUpdateTime(new Date());
iServiceOutPathService.updateServiceOutPath(serviceOutPath);
-
- Map<String, Object> result = new HashMap<>();
- result.put("url", StringUtils.isNotEmpty(req_path) ? localIP + ":" + req_path + "/wt?p=" + format : localIP + "/wt?p=" + format);
- result.put("subId", serviceSubtask.getId());
- return result;
+ return format;
}
/**
@@ -1079,8 +1146,7 @@
}
}
- }
- else if (serviceTaskVO.getIsoperation() != null && serviceTaskVO.getIsoperation() == 2) {
+ } else if (serviceTaskVO.getIsoperation() != null && serviceTaskVO.getIsoperation() == 2) {
//浠诲姟淇敼
if (ObjectUtils.isNotEmpty(serviceTaskVO.getSendTimeslot()))
serviceTask.setSendTimeSlot(JSON.toJSONString(serviceTaskVO.getSendTimeslot()));
@@ -1129,15 +1195,6 @@
patMedOuthosp.setServerState("0");
patMedOuthospService.updatePatMedOuthosp(patMedOuthosp);
}
- }
- } else if (serviceSubtask.getServiceType().equals("19")) {
- ServiceTask st = serviceTaskService.selectServiceTaskByTaskid(serviceSubtask.getTaskid());
- //濡傛灉浠诲姟鏄暱鏈熶换鍔★紝闇�瑕佸皢璇ユ偅鑰呯殑鎵嬫湳璇︽儏鏁版嵁
- if (st != null && st.getLongTask() == 1 && ObjectUtils.isNotEmpty(serviceSubtask.getOperationItemId())) {
- PatMedOperationItem patMedOperationItem = new PatMedOperationItem();
- patMedOperationItem.setOpercheckFlag("0");
- patMedOperationItem.setId(serviceSubtask.getOperationItemId());
- patMedOperationItemMapper.updatePatMedOperationItem(patMedOperationItem);
}
}
}
@@ -4955,13 +5012,107 @@
}
@Override
- public List<ServiceSubtaskDetailRatioExport> statQuestionOption(List<Long> taskIds, Date startOutHospTime, Date endOutHospTime) {
+ public List<ServiceSubtaskDetailRatioExport> statQuestionOption(List<Long> taskIds, Date startOutHospTime, Date endOutHospTime, String scriptContent, Double scoreStart, Double scoreEnd,String valueType) {
//鍏堟竻鐞嗕竴涓嬮噸澶嶆暟鎹�
List<Long> repeatIds = serviceSubtaskDetailMapper.selectRepeatDetailIds();
if (!CollectionUtils.isEmpty(repeatIds)) {
serviceSubtaskDetailMapper.deleteRepeatDetailByIds(repeatIds);
}
- return serviceSubtaskMapper.statQuestionOption(taskIds, startOutHospTime, endOutHospTime);
+ List<ServiceSubtaskDetailRatioExport> serviceSubtaskDetailRatioExports = serviceSubtaskMapper.statQuestionOption(taskIds, startOutHospTime, endOutHospTime, scoreStart, scoreEnd, scriptContent, valueType);
+
+ // 澶勭悊 targetvalue锛氭寜 & 鍒嗗壊鎴愬鏉¤褰�
+ List<ServiceSubtaskDetailRatioExport> result = new ArrayList<>();
+ for (ServiceSubtaskDetailRatioExport export : serviceSubtaskDetailRatioExports) {
+ if (StringUtils.isNotEmpty(export.getTargetvalue()) && export.getTargetvalue().contains("&")) {
+ String[] values = export.getTargetvalue().split("&");
+ // 濡傛灉鏈夊鏉$洰鏍囧�硷紝鎷嗗垎鎴愬琛�
+ for (String value : values) {
+ //鍏堝幓 result 涓煡涓�涓嬶紝鏈夋病鏈夎繖涓� questiontext 鍜屽搴旂殑 targetvalue
+ ServiceSubtaskDetailRatioExport existingExport = result.stream()
+ .filter(e -> e.getQuestiontext().equals(export.getQuestiontext())
+ && value.trim().equals(e.getTargetvalue()))
+ .findFirst()
+ .orElse(null);
+ if (existingExport != null && existingExport.getRatio().equals("0") && existingExport.getCount().equals("0")) {
+ //濡傛灉瀛樺湪锛屽垯灏� result 閲岀殑杩欎釜闂鎵�瀵瑰簲鐨� Targetvalue=value 杩欐潯鏁版嵁鏇存柊鎴愬綋鍓嶈繖鏉℃暟鎹�
+ if(value.equals(export.getOptionresult())) {
+ existingExport.setRatio(export.getRatio());
+ existingExport.setScore(export.getScore());
+ existingExport.setCount(export.getCount());
+ existingExport.setOptionresult(export.getOptionresult());
+ }
+ } else if (existingExport != null && !existingExport.getRatio().equals("0")) {
+ continue;
+ } else {
+ ServiceSubtaskDetailRatioExport newExport = DtoConversionUtils.sourceToTarget(export, ServiceSubtaskDetailRatioExport.class);
+ newExport.setTargetvalue(value.trim()); // targetvalue 鏄剧ず鍗曚釜閫夐」
+ if (!value.equals(export.getOptionresult())) {
+ newExport.setOptionresult(null);
+ newExport.setCount("0");
+ newExport.setRatio("0");
+ }
+ result.add(newExport);
+ }
+ }
+ } else {
+ // targetvalue 涓嶅寘鍚� &锛岀洿鎺ユ坊鍔犲埌缁撴灉
+ result.add(export);
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public List<ServiceSubtaskDetailRatioExport> statQuestionOptionBySubtaskIds(List<Long> subtaskIds, Date startOutHospTime, Date endOutHospTime, String scriptContent, Double scoreStart, Double scoreEnd,String valueType) {
+ //鍏堟竻鐞嗕竴涓嬮噸澶嶆暟鎹�
+ List<Long> repeatIds = serviceSubtaskDetailMapper.selectRepeatDetailIds();
+ if (!CollectionUtils.isEmpty(repeatIds)) {
+ serviceSubtaskDetailMapper.deleteRepeatDetailByIds(repeatIds);
+ }
+
+ List<ServiceSubtaskDetailRatioExport> serviceSubtaskDetailRatioExports = serviceSubtaskMapper.statQuestionOptionBySubtaskIds(subtaskIds, startOutHospTime, endOutHospTime, scoreStart, scoreEnd, scriptContent,valueType);
+ // 澶勭悊 targetvalue锛氭寜 & 鍒嗗壊鎴愬鏉¤褰�
+ List<ServiceSubtaskDetailRatioExport> result = new ArrayList<>();
+ for (ServiceSubtaskDetailRatioExport export : serviceSubtaskDetailRatioExports) {
+ if (StringUtils.isNotEmpty(export.getTargetvalue()) && export.getTargetvalue().contains("&")) {
+ String[] values = export.getTargetvalue().split("&");
+ // 濡傛灉鏈夊鏉$洰鏍囧�硷紝鎷嗗垎鎴愬琛�
+ for (String value : values) {
+ //鍏堝幓 result 涓煡涓�涓嬶紝鏈夋病鏈夎繖涓� questiontext 鍜屽搴旂殑 targetvalue
+ ServiceSubtaskDetailRatioExport existingExport = result.stream()
+ .filter(e -> e.getQuestiontext().equals(export.getQuestiontext())
+ && value.trim().equals(e.getTargetvalue()))
+ .findFirst()
+ .orElse(null);
+ if (existingExport != null && existingExport.getRatio().equals("0") && existingExport.getCount().equals("0")) {
+ //濡傛灉瀛樺湪锛屽垯灏� result 閲岀殑杩欎釜闂鎵�瀵瑰簲鐨� Targetvalue=value 杩欐潯鏁版嵁鏇存柊鎴愬綋鍓嶈繖鏉℃暟鎹�
+ if(value.equals(export.getOptionresult())) {
+ existingExport.setRatio(export.getRatio());
+ existingExport.setScore(export.getScore());
+ existingExport.setCount(export.getCount());
+ existingExport.setOptionresult(export.getOptionresult());
+ }
+ } else if (existingExport != null && !existingExport.getRatio().equals("0")) {
+ continue;
+ } else {
+ ServiceSubtaskDetailRatioExport newExport = DtoConversionUtils.sourceToTarget(export, ServiceSubtaskDetailRatioExport.class);
+ newExport.setTargetvalue(value.trim()); // targetvalue 鏄剧ず鍗曚釜閫夐」
+ if (!value.equals(export.getOptionresult())) {
+ newExport.setOptionresult(null);
+ newExport.setCount("0");
+ newExport.setRatio("0");
+ }
+ result.add(newExport);
+ }
+ }
+ } else {
+ // targetvalue 涓嶅寘鍚� &锛岀洿鎺ユ坊鍔犲埌缁撴灉
+ result.add(export);
+ }
+ }
+
+ return result;
}
/**
@@ -5266,6 +5417,163 @@
}
}
+
+ public PhoneCallBackSHVO getFirstQues(PhoneCallReqYQVO phoneCallReqYQVO) {
+ //鐢ㄤ簬杩斿洖
+ PhoneCallBackSHVO phoneCallBackSHVO = new PhoneCallBackSHVO();
+
+ //鏍规嵁鎵嬫満鍙疯幏鍙栫敤鎴风殑鐨勫瓙浠诲姟淇℃伅
+ ServiceSubtaskEntity serviceSubtaskVO = new ServiceSubtaskEntity();
+ serviceSubtaskVO.setPhone(phoneCallReqYQVO.getPhone());
+ serviceSubtaskVO.setType("1");
+ serviceSubtaskVO.setSendstate(2L);
+ List<ServiceSubtask> serviceSubtasks = serviceSubtaskMapper.selectServiceSubtaskList(serviceSubtaskVO);
+ if (CollectionUtils.isNotEmpty(serviceSubtasks)) {
+ ServiceSubtask serviceSubtask = serviceSubtasks.get(0);
+ IvrTaskTemplate ivrTaskTemplate = ivrTaskTemplateService.selectIvrTaskTemplateByID(serviceSubtask.getTemplateid());
+
+ //閫氳繃浠诲姟妯℃澘涓殑"绗竴娆¢棶棰樼紪鍙�"鑾峰彇绗竴涓棶棰�;
+ IvrTaskTemplateScript ivrTaskTemplateScript = null;
+ IvrTaskTemplateScript ivrTaskTemplateScript1 = new IvrTaskTemplateScript();
+ ivrTaskTemplateScript1.setTemplateID(ivrTaskTemplate.getId());
+ List<IvrTaskTemplateScript> ivrTaskTemplateScripts = iIvrTaskTemplateScriptService.selectIvrTaskTemplateScriptList(ivrTaskTemplateScript1);
+
+ for (IvrTaskTemplateScript ivrTaskTemplateScript2 : ivrTaskTemplateScripts) {
+ if (ivrTaskTemplate.getFirstQuestionNum() == Long.valueOf(ivrTaskTemplateScript2.getSort())) {
+ ivrTaskTemplateScript = ivrTaskTemplateScript2;
+ break;
+ }
+ }
+ //鑾峰彇寮�鍦虹櫧
+ ServiceTask serviceTask = serviceTaskService.selectServiceTaskByTaskid(serviceSubtask.getTaskid());
+
+ phoneCallBackSHVO.setSubId(serviceSubtask.getId());
+ phoneCallBackSHVO.setScriptId(ivrTaskTemplateScript.getId());
+ phoneCallBackSHVO.setSort(ivrTaskTemplateScript.getSort());
+ phoneCallBackSHVO.setTaskTemplateid(ivrTaskTemplateScript.getTemplateID());
+ phoneCallBackSHVO.setScriptContent(serviceTask.getKcb() + "," + ivrTaskTemplateScript.getScriptContent());
+ }
+ return phoneCallBackSHVO;
+ }
+
+
+ /**
+ * 涓夋眹ASR缁撴灉澶勭悊
+ *
+ * @param phoneCallResultYQVO
+ * @return
+ */
+ public PhoneCallBackSHVO processResust(PhoneCallResultYQVO phoneCallResultYQVO) {
+ PhoneCallBackSHVO phoneCallBackSHVO = new PhoneCallBackSHVO();
+ //閫氳繃scriptid锛岃幏鍙栨墍鏈夌殑缁撴灉
+ String url = configService.selectConfigByKey("sys.voice.match.ai.url", phoneCallResultYQVO.getOrgid());
+ ServiceSubtask serviceSubtask = serviceSubtaskMapper.selectServiceSubtaskById(phoneCallResultYQVO.getSubId());
+ IvrTaskTemplate ivrTaskTemplate = ivrTaskTemplateService.selectIvrTaskTemplateByID(serviceSubtask.getTemplateid());
+ IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO = iIvrTaskTemplateScriptService.getTaskTempScriptInfoByid(Long.valueOf(phoneCallResultYQVO.getScriptId()));
+ Integer i = matchOptionIndex(url, phoneCallResultYQVO.getScriptContent(), phoneCallResultYQVO.getAsrResult(), ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList(), phoneCallResultYQVO.getUuid());
+ if (i >= 0) {
+ String optiondesc = ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(i).getOptiondesc();
+ //灏嗘偅鑰呯殑鍥炵瓟鍐欒繘service_subtask_detail涓�
+ ServiceSubTaskDetailReq serviceSubTaskDetailReq = new ServiceSubTaskDetailReq();
+ List<ServiceSubtaskDetail> serviceSubtaskDetailList = new ArrayList<>();
+ ivrTaskTemplateScriptVO.setQuestionResult(optiondesc);
+
+ PhoneCallReqYQVO phoneCallReqYQVO = new PhoneCallReqYQVO();
+ phoneCallReqYQVO.setTaskid("" + serviceSubtask.getId());
+ phoneCallReqYQVO.setPhone(phoneCallResultYQVO.getPhone());
+ phoneCallReqYQVO.setAsrtext(phoneCallResultYQVO.getAsrResult());
+ ServiceSubtaskDetail serviceSubtaskDetail = getServiceSubtaskDetail(phoneCallReqYQVO, ivrTaskTemplateScriptVO, serviceSubtask, ivrTaskTemplate);
+ //淇敼涓�涓嬭闊宠矾寰勶紙鏀规垚鍓嶇鍙互璁块棶鐨勶紝瀛樺埌鏁版嵁搴撲腑锛�
+ if (StringUtils.isNotEmpty(serviceSubtaskDetail.getQuestionvoice())) {
+ String questionvoice = serviceSubtaskDetail.getQuestionvoice();
+ String[] split = questionvoice.split("\\\\");
+ if (split.length > 0) {
+ String lastPart = split[split.length - 1];
+ serviceSubtaskDetail.setQuestionvoice(voicePathPrefix + lastPart);
+ }
+ }
+ serviceSubtaskDetailList.add(serviceSubtaskDetail);
+ serviceSubTaskDetailReq.setServiceSubtaskDetailList(serviceSubtaskDetailList);
+ serviceSubTaskDetailReq.setGuid(phoneCallResultYQVO.getGuid());
+ serviceSubTaskDetailReq.setOrgid(phoneCallResultYQVO.getOrgid());
+ saveQuestionAnswerPhone(serviceSubTaskDetailReq);
+
+ IvrTaskTemplateScript ivrTaskTemplateScript = new IvrTaskTemplateScript();
+ ivrTaskTemplateScript.setTemplateID(ivrTaskTemplateScriptVO.getTemplateID());
+ List<IvrTaskTemplateScript> ivrTaskTemplateScripts = iIvrTaskTemplateScriptService.selectIvrTaskTemplateScriptList(ivrTaskTemplateScript);
+
+ //鑾峰彇涓嬩竴棰�
+ for (IvrTaskTemplateScript script : ivrTaskTemplateScripts) {
+ if (ivrTaskTemplateScriptVO.getNextScriptno() == null || ivrTaskTemplateScriptVO.getNextScriptno() == 0) {
+ ServiceTask serviceTask = serviceTaskService.selectServiceTaskByTaskid(serviceSubtask.getTaskid());
+ phoneCallBackSHVO.setScriptContent(serviceTask.getJsy());
+ phoneCallBackSHVO.setTaskTemplateid(script.getTemplateID());
+ phoneCallBackSHVO.setSort(script.getSort());
+ phoneCallBackSHVO.setScriptId(script.getId());
+ phoneCallBackSHVO.setSubId(serviceSubtask.getId());
+ phoneCallBackSHVO.setStatus("0");
+ } else if (script.getSort() == ivrTaskTemplateScriptVO.getNextScriptno().intValue()) {
+ phoneCallBackSHVO.setScriptContent(script.getScriptContent());
+ phoneCallBackSHVO.setTaskTemplateid(script.getTemplateID());
+ phoneCallBackSHVO.setSort(script.getSort());
+ phoneCallBackSHVO.setScriptId(script.getId());
+ phoneCallBackSHVO.setSubId(serviceSubtask.getId());
+ break;
+ }
+ }
+ //鎶婄紦瀛樻竻闄�
+ redisCache.deleteObject(phoneCallResultYQVO.getSubId() + "-" + phoneCallResultYQVO.getScriptId());
+ } else {
+ //鍐嶅皢閲嶅璇㈤棶
+ //璁板綍涓�涓嬭繖涓棶棰樿闂鐨勬鏁�
+ Object cacheObject = redisCache.getCacheObject(phoneCallResultYQVO.getSubId() + "-" + phoneCallResultYQVO.getScriptId());
+ if (cacheObject == null || (Integer) cacheObject < ivrTaskTemplate.getMateNum()) {
+
+
+ // 鑾峰彇閫夐」闆嗗悎涓殑 optiondesc 鐢ㄤ簬寮曞鎮h��
+ List<IvrTaskTemplateTargetoption> optionList = ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList();
+ String optionDescStr = "";
+ if (optionList != null && !optionList.isEmpty()) {
+ optionDescStr = optionList.stream().map(IvrTaskTemplateTargetoption::getTargetvalue).filter(StringUtils::isNotEmpty).collect(Collectors.joining("鎴�"));
+ }
+
+ String scriptContent = "璇烽棶" + phoneCallResultYQVO.getScriptContent();
+ if (StringUtils.isNotEmpty(optionDescStr)) {
+ scriptContent += "锛屼綘鍙互鍥炵瓟锛�" + optionDescStr;
+ }
+ phoneCallBackSHVO.setScriptContent(scriptContent);
+ phoneCallBackSHVO.setTaskTemplateid(phoneCallResultYQVO.getTaskTemplateid());
+ phoneCallBackSHVO.setSort(phoneCallResultYQVO.getSort());
+ phoneCallBackSHVO.setScriptId(phoneCallResultYQVO.getScriptId());
+ phoneCallBackSHVO.setSubId(phoneCallResultYQVO.getSubId());
+ if (cacheObject == null)
+ redisCache.setCacheObject(phoneCallResultYQVO.getSubId() + "-" + phoneCallResultYQVO.getScriptId(), 1, 120, TimeUnit.MINUTES);
+ else
+ redisCache.setCacheObject(phoneCallResultYQVO.getSubId() + "-" + phoneCallResultYQVO.getScriptId(), (Integer) cacheObject + 1, 120, TimeUnit.MINUTES);
+ } else if ((Integer) cacheObject >= ivrTaskTemplate.getMateNum()) {
+ //濡傛灉宸茬粡闂簡瑙勫畾娆℃暟锛屽氨涓嶉棶浜嗭紝缁х画闂笅涓�棰橈紙杩欎釜瑕佸晢閲忎竴涓嬶紝鏄户缁棶涓嬩竴棰橈紝杩樻槸鍋滀簡锛屾槸涓嶆槸瑕佸仛涓紑鍏筹級
+ IvrTaskTemplateScript ivrTaskTemplateScript = new IvrTaskTemplateScript();
+ ivrTaskTemplateScript.setTemplateID(ivrTaskTemplateScriptVO.getTemplateID());
+ List<IvrTaskTemplateScript> ivrTaskTemplateScripts = iIvrTaskTemplateScriptService.selectIvrTaskTemplateScriptList(ivrTaskTemplateScript);
+ //鑾峰彇涓嬩竴棰�
+ for (IvrTaskTemplateScript script : ivrTaskTemplateScripts) {
+ if (script.getSort() == ivrTaskTemplateScriptVO.getNextScriptno().intValue()) {
+ phoneCallBackSHVO.setScriptContent(script.getScriptContent());
+ phoneCallBackSHVO.setTaskTemplateid(script.getTemplateID());
+ phoneCallBackSHVO.setSort(script.getSort());
+ phoneCallBackSHVO.setScriptId(script.getId());
+ phoneCallBackSHVO.setSubId(serviceSubtask.getId());
+ break;
+ }
+ }
+ //鎶婄紦瀛樻竻闄�
+ redisCache.deleteObject(phoneCallResultYQVO.getSubId() + "-" + phoneCallResultYQVO.getScriptId());
+ }
+ }
+ return phoneCallBackSHVO;
+ }
+
+
public PhoneCallBackYQVO AiMatch(String url, PhoneCallReqYQVO phoneCallReqYQVO, PhoneCallBackYQVO phoneCallBackYQVO, IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO, ServiceSubtask serviceSubtask, IvrTaskTemplate ivrTaskTemplate, List<IvrTaskTemplateScript> ivrTaskTemplateScripts, String scriptId, Integer flag, String uuid) {
PhoneCallBackYQVO back = null;
List<IvrTaskTemplateTargetoption> options = ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList();
@@ -5492,15 +5800,36 @@
return back;
}
+
+ /**
+ * 闂缁撴灉鍗犳瘮
+ *
+ * @param serviceSubtaskEntity
+ * @param serviceSubtaskRes
+ * @return
+ */
+ public List<ServiceSubtaskDetailRatioExport> getDetailRatio(QuestionResultVO questionResultVO, List<ServiceSubtaskRes> serviceSubtaskRes) {
+ List<ServiceSubtaskDetailRatioExport> serviceSubtaskDetailRatioExports = null;
+ if (StringUtils.isNotEmpty(questionResultVO.getServiceType()) && questionResultVO.getServiceType().equals("2")) {
+ //鑾峰彇serviceSubtaskList涓殑鎵�鏈塼askid
+ List<Long> taskIds = serviceSubtaskRes.stream().map(ServiceSubtaskRes::getTaskid).filter(ObjectUtils::isNotEmpty).distinct().collect(Collectors.toList());
+ serviceSubtaskDetailRatioExports = statQuestionOption(taskIds, questionResultVO.getStartOutHospTime(), questionResultVO.getEndOutHospTime(), questionResultVO.getQuestionContent(), questionResultVO.getStartScore(), questionResultVO.getEndScore(),questionResultVO.getValueType());
+ } else if (StringUtils.isNotEmpty(questionResultVO.getServiceType()) && questionResultVO.getServiceType().equals("6")) {
+ //婊℃剰搴︾粺璁� 锛堥�氳繃 subtask 鐨� id 鍘荤粺璁★級
+ List<Long> subtaskIds = serviceSubtaskRes.stream().map(ServiceSubtaskRes::getId).collect(Collectors.toList());
+ serviceSubtaskDetailRatioExports = statQuestionOptionBySubtaskIds(subtaskIds, questionResultVO.getStartOutHospTime(), questionResultVO.getEndOutHospTime(), questionResultVO.getQuestionContent(), questionResultVO.getStartScore(), questionResultVO.getEndScore(),questionResultVO.getValueType());
+ }
+ return serviceSubtaskDetailRatioExports;
+ }
+
//鑾峰彇浠诲姟缁勪俊鎭�
- private void findServiceTaskScheduleVO(ServiceTaskVO serviceTaskVO){
- if(StringUtils.isNotEmpty(serviceTaskVO.getAppltype()) && serviceTaskVO.getAppltype().equals("5")){
+ private void findServiceTaskScheduleVO(ServiceTaskVO serviceTaskVO) {
+ if (StringUtils.isNotEmpty(serviceTaskVO.getAppltype()) && serviceTaskVO.getAppltype().equals("5")) {
//浠诲姟缁勪俊鎭�
ServiceTaskSchedule schedule = serviceTaskScheduleService.selectByTaskid(serviceTaskVO.getTaskid());
if (ObjectUtils.isNotEmpty(schedule)) {
ServiceTaskScheduleVO serviceTaskScheduleVO = DtoConversionUtils.sourceToTarget(schedule, ServiceTaskScheduleVO.class);
- List<ServiceTaskScheduleDetail> scheduleDetailList =
- serviceTaskScheduleService.selectDetailByScheduleid(schedule.getId());
+ List<ServiceTaskScheduleDetail> scheduleDetailList = serviceTaskScheduleService.selectDetailByScheduleid(schedule.getId());
serviceTaskScheduleVO.setDetailList(scheduleDetailList);
serviceTaskVO.setServiceTaskScheduleVO(serviceTaskScheduleVO);
}
diff --git a/smartor/src/main/resources/mapper/smartor/IvrLibaTemplateScriptMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrLibaTemplateScriptMapper.xml
index 7a91b76..935c7f2 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrLibaTemplateScriptMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrLibaTemplateScriptMapper.xml
@@ -59,6 +59,8 @@
<result property="dutyDeptPersonCode" column="duty_dept_person_code"/>
<result property="reportDeptPersonCode" column="report_dept_person_name"/>
<result property="reportDeptPersonName" column="report_dept_person_code"/>
+ <result property="circulationDeptPersonCode" column="circulation_dept_person_code"/>
+ <result property="circulationDeptPersonName" column="circulation_dept_person_name"/>
</resultMap>
<sql id="selectIvrLibaTemplateScriptVo">
@@ -69,6 +71,8 @@
duty_dept_person_code,
report_dept_person_name,
report_dept_person_code,
+ circulation_dept_person_code,
+ circulation_dept_person_name,
dimension,
sort,
script_assortname,
@@ -193,6 +197,12 @@
<if test="reportDeptPersonCode != null and reportDeptPersonCode != ''">and report_dept_person_code like concat('%', #{reportDeptPersonCode},
'%')
</if>
+ <if test="circulationDeptPersonCode != null and circulationDeptPersonCode != ''">and circulation_dept_person_code like concat('%', #{circulationDeptPersonCode},
+ '%')
+ </if>
+ <if test="circulationDeptPersonName != null and circulationDeptPersonName != ''">and circulation_dept_person_name like concat('%', #{circulationDeptPersonName},
+ '%')
+ </if>
</select>
@@ -283,6 +293,8 @@
<if test="dutyDeptPersonCode != null and dutyDeptPersonCode != ''">duty_dept_person_code,</if>
<if test="reportDeptPersonName != null and reportDeptPersonName != ''">report_dept_person_name,</if>
<if test="reportDeptPersonCode != null and reportDeptPersonCode != ''">report_dept_person_code,</if>
+ <if test="circulationDeptPersonCode != null and circulationDeptPersonCode != ''">circulation_dept_person_code,</if>
+ <if test="circulationDeptPersonName != null and circulationDeptPersonName != ''">circulation_dept_person_name,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="scriptno != null">#{scriptno},</if>
@@ -337,6 +349,8 @@
<if test="dutyDeptPersonCode != null and dutyDeptPersonCode != ''">#{dutyDeptPersonCode},</if>
<if test="reportDeptPersonName != null and reportDeptPersonName != ''">#{reportDeptPersonName},</if>
<if test="reportDeptPersonCode != null and reportDeptPersonCode != ''">#{reportDeptPersonCode},</if>
+ <if test="circulationDeptPersonCode != null and circulationDeptPersonCode != ''">#{circulationDeptPersonCode},</if>
+ <if test="circulationDeptPersonName != null and circulationDeptPersonName != ''">#{circulationDeptPersonName},</if>
</trim>
</insert>
@@ -374,6 +388,8 @@
<if test="dutyDeptPersonCode != null and dutyDeptPersonCode != ''">duty_dept_person_code = #{dutyDeptPersonCode},</if>
<if test="reportDeptPersonName != null and reportDeptPersonName != ''">report_dept_person_name = #{reportDeptPersonName},</if>
<if test="reportDeptPersonCode != null and reportDeptPersonCode != ''">report_dept_person_code = #{reportDeptPersonCode},</if>
+ <if test="circulationDeptPersonName != null and circulationDeptPersonName != ''">circulation_dept_person_name = #{circulationDeptPersonName},</if>
+ <if test="circulationDeptPersonCode != null and circulationDeptPersonCode != ''">circulation_dept_person_code = #{circulationDeptPersonCode},</if>
<if test="targetid != null">targetid = #{targetid},</if>
<if test="scriptTopic != null">script_topic = #{scriptTopic},</if>
<if test="nextScriptno != null">next_scriptno = #{nextScriptno},</if>
diff --git a/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateScriptMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateScriptMapper.xml
index 5643206..1daca12 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateScriptMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrTaskTemplateScriptMapper.xml
@@ -59,6 +59,8 @@
<result property="dutyDeptPersonCode" column="duty_dept_person_code"/>
<result property="reportDeptPersonCode" column="report_dept_person_name"/>
<result property="reportDeptPersonName" column="report_dept_person_code"/>
+ <result property="circulationDeptPersonCode" column="circulation_dept_person_code"/>
+ <result property="circulationDeptPersonName" column="circulation_dept_person_name"/>
</resultMap>
<sql id="selectIvrTaskTemplateScriptVo">
@@ -75,6 +77,8 @@
duty_dept_person_code,
report_dept_person_name,
report_dept_person_code,
+ circulation_dept_person_code,
+ circulation_dept_person_name,
sort,
ivrtext,
script_type,
@@ -178,6 +182,14 @@
#{reportDeptPersonCode},
'%')
</if>
+ <if test="circulationDeptPersonCode != null and circulationDeptPersonCode != ''">and circulation_dept_person_code like concat('%',
+ #{circulationDeptPersonCode},
+ '%')
+ </if>
+ <if test="circulationDeptPersonName != null and circulationDeptPersonName != ''">and circulation_dept_person_name like concat('%',
+ #{circulationDeptPersonName},
+ '%')
+ </if>
</select>
<select id="selectIvrTaskTemplateScriptByID" parameterType="Long" resultMap="IvrTaskTemplateScriptResult">
@@ -241,6 +253,8 @@
<if test="dutyDeptPersonCode != null and dutyDeptPersonCode != ''">duty_dept_person_code,</if>
<if test="reportDeptPersonName != null and reportDeptPersonName != ''">report_dept_person_name,</if>
<if test="reportDeptPersonCode != null and reportDeptPersonCode != ''">report_dept_person_code,</if>
+ <if test="circulationDeptPersonCode != null and circulationDeptPersonCode != ''">circulation_dept_person_code,</if>
+ <if test="circulationDeptPersonName != null and circulationDeptPersonName != ''">circulation_dept_person_name,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="taskid != null">#{taskid},</if>
@@ -295,6 +309,8 @@
<if test="dutyDeptPersonCode != null and dutyDeptPersonCode != ''">#{dutyDeptPersonCode},</if>
<if test="reportDeptPersonName != null and reportDeptPersonName != ''">#{reportDeptPersonName},</if>
<if test="reportDeptPersonCode != null and reportDeptPersonCode != ''">#{reportDeptPersonCode},</if>
+ <if test="circulationDeptPersonCode != null and circulationDeptPersonCode != ''">#{circulationDeptPersonCode},</if>
+ <if test="circulationDeptPersonName != null and circulationDeptPersonName != ''">#{circulationDeptPersonName},</if>
</trim>
</insert>
@@ -355,6 +371,8 @@
<if test="dutyDeptPersonCode != null and dutyDeptPersonCode != ''">duty_dept_person_code = #{dutyDeptPersonCode},</if>
<if test="reportDeptPersonName != null and reportDeptPersonName != ''">report_dept_person_name = #{reportDeptPersonName},</if>
<if test="reportDeptPersonCode != null and reportDeptPersonCode != ''">report_dept_person_code = #{reportDeptPersonCode},</if>
+ <if test="circulationDeptPersonName != null and circulationDeptPersonName != ''">circulation_dept_person_name = #{circulationDeptPersonName},</if>
+ <if test="circulationDeptPersonCode != null and circulationDeptPersonCode != ''">circulation_dept_person_code = #{circulationDeptPersonCode},</if>
</trim>
where id = #{id}
</update>
diff --git a/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml b/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
index 8344a5f..e9f230f 100644
--- a/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
@@ -370,7 +370,7 @@
order by b.endtime desc
</if>
<if test="cry != null and cry==0">
- order by b.starttime desc
+ order by b.starttime desc , b.bed_no asc
</if>
</select>
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceOutPathMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceOutPathMapper.xml
index fd1a9fb..afedfde 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceOutPathMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceOutPathMapper.xml
@@ -22,6 +22,9 @@
<result property="wardName" column="ward_name"/>
<result property="deptCode" column="dept_code"/>
<result property="deptName" column="dept_name"/>
+ <result property="taskId" column="task_id"/>
+ <result property="subId" column="sub_id"/>
+
</resultMap>
<sql id="selectServiceOutPathVo">
@@ -31,6 +34,8 @@
param3,
param5,
param6,
+ task_id,
+ sub_id,
create_time,
update_time,
radix,
@@ -87,6 +92,12 @@
<if test="deptName != null and deptName != ''">
and dept_name=#{deptName}
</if>
+ <if test="subId != null">
+ and sub_id=#{subId}
+ </if>
+ <if test="taskId != null">
+ and task_id=#{taskId}
+ </if>
</select>
<select id="selectServiceOutPathById" parameterType="Long"
@@ -125,7 +136,12 @@
</if>
<if test="deptName != null">dept_name,
</if>
-
+ <if test="subId != null">
+ sub_id,
+ </if>
+ <if test="taskId != null ">
+ task_id,
+ </if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="param1 != null">#{param1},
@@ -153,6 +169,12 @@
<if test="deptCode != null">#{deptCode},
</if>
<if test="deptName != null">#{deptName},
+ </if>
+ <if test="subId != null ">
+ #{subId},
+ </if>
+ <if test="taskId != null ">
+ #{taskId},
</if>
</trim>
</insert>
@@ -202,6 +224,12 @@
<if test="deptName != null">dept_name =
#{deptName},
</if>
+ <if test="subId != null">
+ sub_id=#{subId},
+ </if>
+ <if test="taskId != null">
+ task_id=#{taskId},
+ </if>
</trim>
where id = #{id}
</update>
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskDetailTraceMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskDetailTraceMapper.xml
index 05dc624..79943e7 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskDetailTraceMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskDetailTraceMapper.xml
@@ -59,14 +59,33 @@
<result property="dutyDeptPersonCode" column="duty_dept_person_code"/>
<result property="reportDeptPersonCode" column="report_dept_person_name"/>
<result property="reportDeptPersonName" column="report_dept_person_code"/>
+ <result property="circulationDeptPersonCode" column="circulation_dept_person_code"/>
+ <result property="circulationDeptPersonName" column="circulation_dept_person_name"/>
+ <result property="circulationDeptCode" column="circulation_dept_code"/>
+ <result property="circulationDeptName" column="circulation_dept_name"/>
+ <result property="circulationExplain" column="circulation_explain"/>
+ <result property="circulationTime" column="circulation_time"/>
+ <result property="circulationStatus" column="circulation_status"/>
+ <result property="circulationPersonName" column="circulation_person_name"/>
+ <result property="circulationPersonCode" column="circulation_person_code"/>
+
</resultMap>
<sql id="selectServiceSubtaskDetailTtraceVo">
select id,
+ circulation_status,
+ circulation_person_name,
+ circulation_person_code,
duty_dept_person_name,
duty_dept_person_code,
report_dept_person_name,
report_dept_person_code,
+ circulation_dept_person_code,
+ circulation_dept_person_name,
+ circulation_dept_code,
+ circulation_dept_name,
+ circulation_explain,
+ circulation_time,
detail_id,
is_myd_exception,
dimension,
@@ -277,6 +296,33 @@
<if test="reportDeptPersonCode != null and reportDeptPersonCode != ''">
and report_dept_person_code like concat('%', #{reportDeptPersonCode}, '%')
</if>
+ <if test="circulationDeptPersonCode != null and circulationDeptPersonCode != ''">
+ and circulation_dept_person_code like concat('%', #{circulationDeptPersonCode}, '%')
+ </if>
+ <if test="circulationDeptPersonName != null and circulationDeptPersonName != ''">
+ and circulation_dept_person_name like concat('%', #{circulationDeptPersonName}, '%')
+ </if>
+ <if test="circulationDeptCode != null and circulationDeptCode != ''">
+ and circulation_dept_code like concat('%', #{circulationDeptCode}, '%')
+ </if>
+ <if test="circulationDeptName != null and circulationDeptName != ''">
+ and circulation_dept_name like concat('%', #{circulationDeptName}, '%')
+ </if>
+ <if test="circulationExplain != null and circulationExplain != ''">
+ and circulation_explain like concat('%', #{circulationExplain}, '%')
+ </if>
+ <if test="circulationTime != null ">
+ and circulation_time = #{circulationTime}
+ </if>
+ <if test="circulationStatus != null ">
+ and circulation_status = #{circulationStatus}
+ </if>
+ <if test="circulationPersonName != null and circulationPersonName != ''">
+ and circulation_person_name like concat('%', #{circulationPersonName}, '%')
+ </if>
+ <if test="circulationPersonCode != null and circulationPersonCode != ''">
+ and circulation_person_code =#{circulationPersonCode}
+ </if>
<if test="pageSize != null and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if>
</select>
@@ -325,6 +371,33 @@
</if>
<if test="reportDeptPersonCode != null and reportDeptPersonCode != ''">
and report_dept_person_code like concat('%', #{reportDeptPersonCode}, '%')
+ </if>
+ <if test="circulationDeptPersonCode != null and circulationDeptPersonCode != ''">
+ and circulation_dept_person_code like concat('%', #{circulationDeptPersonCode}, '%')
+ </if>
+ <if test="circulationDeptPersonName != null and circulationDeptPersonName != ''">
+ and circulation_dept_person_name like concat('%', #{circulationDeptPersonName}, '%')
+ </if>
+ <if test="circulationDeptCode != null and circulationDeptCode != ''">
+ and circulation_dept_code like concat('%', #{circulationDeptCode}, '%')
+ </if>
+ <if test="circulationDeptName != null and circulationDeptName != ''">
+ and circulation_dept_name like concat('%', #{circulationDeptName}, '%')
+ </if>
+ <if test="circulationExplain != null and circulationExplain != ''">
+ and circulation_explain like concat('%', #{circulationExplain}, '%')
+ </if>
+ <if test="circulationTime != null ">
+ and circulation_time = #{circulationTime}
+ </if>
+ <if test="circulationStatus != null ">
+ and circulation_status = #{circulationStatus}
+ </if>
+ <if test="circulationPersonName != null and circulationPersonName != ''">
+ and circulation_person_name like concat('%', #{circulationPersonName}, '%')
+ </if>
+ <if test="circulationPersonCode != null and circulationPersonCode != ''">
+ and circulation_person_code =#{circulationPersonCode}
</if>
</select>
@@ -447,6 +520,31 @@
</if>
<if test="reportDeptPersonCode != null">report_dept_person_code,
</if>
+ <if test="circulationDeptPersonCode != null">circulation_dept_person_code,
+ </if>
+ <if test="circulationDeptPersonName != null">circulation_dept_person_name,
+ </if>
+ <if test="circulationDeptCode != null ">
+ circulation_dept_code,
+ </if>
+ <if test="circulationDeptName != null">
+ circulation_dept_name,
+ </if>
+ <if test="circulationExplain != null ">
+ circulation_explain,
+ </if>
+ <if test="circulationTime != null ">
+ circulation_time,
+ </if>
+ <if test="circulationStatus != null ">
+ circulation_status,
+ </if>
+ <if test="circulationPersonName != null and circulationPersonName != ''">
+ circulation_person_name,
+ </if>
+ <if test="circulationPersonCode != null and circulationPersonCode != ''">
+ circulation_person_code,
+ </if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="detailId != null">#{detailId},
@@ -556,6 +654,31 @@
<if test="reportDeptPersonName != null">#{reportDeptPersonName},
</if>
<if test="reportDeptPersonCode != null">#{reportDeptPersonCode},
+ </if>
+ <if test="circulationDeptPersonCode != null">#{circulationDeptPersonCode},
+ </if>
+ <if test="circulationDeptPersonName != null">#{circulationDeptPersonName},
+ </if>
+ <if test="circulationDeptCode != null">
+ #{circulationDeptCode},
+ </if>
+ <if test="circulationDeptName != null">
+ #{circulationDeptName},
+ </if>
+ <if test="circulationExplain != null">
+ #{circulationExplain},
+ </if>
+ <if test="circulationTime != null ">
+ #{circulationTime},
+ </if>
+ <if test="circulationStatus != null ">
+ #{circulationStatus},
+ </if>
+ <if test="circulationPersonName != null and circulationPersonName != ''">
+ #{circulationPersonName},
+ </if>
+ <if test="circulationPersonCode != null and circulationPersonCode != ''">
+ #{circulationPersonCode},
</if>
</trim>
</insert>
@@ -725,6 +848,33 @@
<if test="reportDeptPersonCode != null">report_dept_person_code =
#{reportDeptPersonCode},
</if>
+ <if test="circulationDeptPersonCode != null">circulation_dept_person_code =
+ #{circulationDeptPersonCode},
+ </if>
+ <if test="circulationDeptPersonName != null">circulation_dept_person_name =
+ #{circulationDeptPersonName},
+ </if>
+ <if test="circulationDeptCode != null">circulation_dept_code =
+ #{circulationDeptCode},
+ </if>
+ <if test="circulationDeptName != null">circulation_dept_name =
+ #{circulationDeptName},
+ </if>
+ <if test="circulationExplain != null">circulation_explain =
+ #{circulationExplain},
+ </if>
+ <if test="circulationTime != null">circulation_time =
+ #{circulationTime},
+ </if>
+ <if test="circulationStatus != null ">
+ circulation_status = #{circulationStatus},
+ </if>
+ <if test="circulationPersonName != null and circulationPersonName != ''">
+ circulation_person_name =#{circulationPersonName},
+ </if>
+ <if test="circulationPersonCode != null and circulationPersonCode != ''">
+ circulation_person_code =#{circulationPersonCode},
+ </if>
</trim>
where id = #{id}
</update>
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
index 47bde97..31c1134 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
@@ -380,6 +380,12 @@
<if test="endSendDateTime != null">
AND date_format(visit_time,'%y%m%d') <= date_format(#{endSendDateTime},'%y%m%d')
</if>
+ <if test="finishtimeStart != null">
+ AND date_format(finishtime,'%y%m%d') >= date_format(#{finishtimeStart},'%y%m%d')
+ </if>
+ <if test="finishtimeEnd != null">
+ AND date_format(finishtime,'%y%m%d') <= date_format(#{finishtimeEnd},'%y%m%d')
+ </if>
<if test="longSendTime != null">
AND date_format(long_send_time,'%y%m%d') <= date_format(#{longSendTime},'%y%m%d')
</if>
@@ -402,7 +408,7 @@
</if>
<if test="deptOrDistrict==2">
AND (1=1
- <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0">
+ <if test="leavehospitaldistrictcodes != null">
AND leavehospitaldistrictcode IN
<foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="("
separator=","
@@ -410,7 +416,7 @@
#{leavehospitaldistrictcode}
</foreach>
</if>
- <if test=" leaveldeptcodes != null and leaveldeptcodes.size()>0">
+ <if test=" leaveldeptcodes != null">
OR deptcode IN
<foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator=","
close=")">
@@ -3050,6 +3056,9 @@
t.taskid AS taskid,
t.task_name AS taskName,
d.asrtext AS optionresult,
+ d.score AS score,
+ d.targetvalue AS targetvalue,
+ d.value_type AS valueType,
COUNT(*) AS count,
CONCAT(ROUND(COUNT(*) * 100.0 / t2.total_count, 2), '%') AS ratio
FROM
@@ -3065,22 +3074,110 @@
service_task t
INNER JOIN service_subtask s ON s.taskid = t.taskid
INNER JOIN service_subtask_detail d ON d.sub_id = s.id
- WHERE t.taskid IN
- <foreach collection="taskIds" item="taskId" open="(" separator="," close=")">
- #{taskId}
- </foreach>
+ WHERE 1=1
+ <if test="taskIds != null and taskIds.size() > 0">
+ AND t.taskid IN
+ <foreach collection="taskIds" item="taskId" open="(" separator="," close=")">
+ #{taskId}
+ </foreach>
+ </if>
+ <if test="valueType != null">AND d.value_type = #{valueType}</if>
+ <if test="scoreStart != null">AND d.score >= #{scoreStart}</if>
+ <if test="scoreEnd != null">AND d.score <= #{scoreEnd}</if>
+ <if test="questiontext != null and questiontext != ''">and d.questiontext like concat('%', #{questiontext},
+ '%')
+ </if>
and s.sendstate=6
and d.del_flag=0
GROUP BY
t.taskid,
d.questiontext
) t2 ON t2.taskid = t.taskid AND t2.questiontext = d.questiontext
- WHERE t.taskid IN
- <foreach collection="taskIds" item="taskId" open="(" separator="," close=")">
- #{taskId}
- </foreach>
+ WHERE 1=1
+ <if test="taskIds != null and taskIds.size() > 0">
+ AND t.taskid IN
+ <foreach collection="taskIds" item="taskId" open="(" separator="," close=")">
+ #{taskId}
+ </foreach>
+ </if>
+ <if test="valueType != null">AND d.value_type = #{valueType}</if>
+ <if test="scoreStart != null">AND d.score >= #{scoreStart}</if>
+ <if test="scoreEnd != null">AND d.score <= #{scoreEnd}</if>
+ <if test="questiontext != null and questiontext != ''">and d.questiontext like concat('%', #{questiontext},
+ '%')
+ </if>
AND s.sendstate = 6
and d.del_flag=0
+ <if test="startOutHospTime != null">
+ AND date_format(s.endtime,'%y%m%d') >= date_format(#{startOutHospTime},'%y%m%d')
+ </if>
+ <if test="endOutHospTime != null">
+ AND date_format(s.endtime,'%y%m%d') <= date_format(#{endOutHospTime},'%y%m%d')
+ </if>
+ GROUP BY
+ t.taskid,
+ d.questiontext,
+ d.score,
+ d.targetvalue,
+ d.asrtext,
+ d.value_type
+ ORDER BY
+ d.questiontext,
+ t.taskid
+ </select>
+
+ <!-- 鏂版柟娉曪細鏍规嵁瀛愪换鍔� ID 缁熻闂閫夐」鐧惧垎姣� (鐢ㄤ簬婊℃剰搴︾粺璁� serviceType=6) -->
+ <select id="statQuestionOptionBySubtaskIds" resultType="com.smartor.domain.ServiceSubtaskDetailRatioExport">
+ SELECT
+ d.questiontext AS questiontext,
+ t.taskid AS taskid,
+ t.task_name AS taskName,
+ d.asrtext AS optionresult,
+ d.score AS score,
+ d.targetvalue AS targetvalue,
+ d.value_type AS valueType,
+ COUNT(*) AS count,
+ CONCAT(ROUND(COUNT(*) * 100.0 / t2.total_count, 2), '%') AS ratio
+ FROM
+ service_task t
+ INNER JOIN service_subtask s ON s.taskid = t.taskid
+ INNER JOIN service_subtask_detail d ON d.sub_id = s.id
+ INNER JOIN (
+ SELECT
+ d.questiontext,
+ COUNT(*) AS total_count
+ FROM
+ service_task t
+ INNER JOIN service_subtask s ON s.taskid = t.taskid
+ INNER JOIN service_subtask_detail d ON d.sub_id = s.id
+ WHERE 1=1
+ <if test="subtaskIds != null and subtaskIds.size() > 0">
+ AND s.id IN
+ <foreach collection="subtaskIds" item="subtaskId" open="(" separator="," close=")">
+ #{subtaskId}
+ </foreach>
+ </if>
+ <if test="valueType != null">AND d.value_type >= #{valueType}</if>
+ <if test="scoreStart != null">AND d.score = #{scoreStart}</if>
+ <if test="scoreEnd != null">AND d.score <= #{scoreEnd}</if>
+ <if test="questiontext != null and questiontext != ''">and d.questiontext like concat('%', #{questiontext}, '%')</if>
+ AND s.sendstate = 6
+ AND d.del_flag=0
+ GROUP BY d.questiontext
+ ) t2 ON t2.questiontext = d.questiontext
+ WHERE 1=1
+ <if test="subtaskIds != null and subtaskIds.size() > 0">
+ AND s.id IN
+ <foreach collection="subtaskIds" item="subtaskId" open="(" separator="," close=")">
+ #{subtaskId}
+ </foreach>
+ </if>
+ AND s.sendstate = 6
+ AND d.del_flag=0
+ <if test="valueType != null">AND d.value_type >= #{valueType}</if>
+ <if test="scoreStart != null">AND d.score >= #{scoreStart}</if>
+ <if test="scoreEnd != null">AND d.score <= #{scoreEnd}</if>
+ <if test="questiontext != null and questiontext != ''">and d.questiontext like concat('%', #{questiontext}, '%')</if>
<if test="startOutHospTime != null">
AND date_format(s.endtime,'%y%m%d') >= date_format(#{startOutHospTime},'%y%m%d')
</if>
@@ -3090,6 +3187,8 @@
GROUP BY
t.taskid,
d.questiontext,
+ d.score,
+ d.targetvalue,
d.asrtext
ORDER BY
d.questiontext,
diff --git a/smartor/src/main/resources/mapper/smartor/SvyLibTemplateScriptMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyLibTemplateScriptMapper.xml
index 6698f3f..416c42d 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyLibTemplateScriptMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyLibTemplateScriptMapper.xml
@@ -56,6 +56,8 @@
<result property="reportDeptPersonName" column="report_dept_person_code"/>
<result property="isMydException" column="is_myd_exception"/>
<result property="dimension" column="dimension"/>
+ <result property="circulationDeptPersonCode" column="circulation_dept_person_code"/>
+ <result property="circulationDeptPersonName" column="circulation_dept_person_name"/>
</resultMap>
@@ -108,6 +110,7 @@
script_picture,
script_topic,
isavailable, language, otherdata, value_type, reply, scoretype
+ , circulation_dept_person_code, circulation_dept_person_name
from svy_lib_template_script
</sql>
@@ -192,6 +195,14 @@
#{reportDeptPersonCode},
'%')
</if>
+ <if test="circulationDeptPersonCode != null and circulationDeptPersonCode != ''">and circulation_dept_person_code like concat('%',
+ #{circulationDeptPersonCode},
+ '%')
+ </if>
+ <if test="circulationDeptPersonName != null and circulationDeptPersonName != ''">and circulation_dept_person_name like concat('%',
+ #{circulationDeptPersonName},
+ '%')
+ </if>
<if test="pageSize != null and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if>
</select>
@@ -218,6 +229,14 @@
</if>
<if test="reportDeptPersonCode != null and reportDeptPersonCode != ''">and report_dept_person_code like concat('%',
#{reportDeptPersonCode},
+ '%')
+ </if>
+ <if test="circulationDeptPersonCode != null and circulationDeptPersonCode != ''">and circulation_dept_person_code like concat('%',
+ #{circulationDeptPersonCode},
+ '%')
+ </if>
+ <if test="circulationDeptPersonName != null and circulationDeptPersonName != ''">and circulation_dept_person_name like concat('%',
+ #{circulationDeptPersonName},
'%')
</if>
<if test="dimensionList == null ">and dimension IS NOT NULL </if>
@@ -284,6 +303,8 @@
<if test="dutyDeptPersonCode != null and dutyDeptPersonCode != ''">duty_dept_person_code,</if>
<if test="reportDeptPersonName != null and reportDeptPersonName != ''">report_dept_person_name,</if>
<if test="reportDeptPersonCode != null and reportDeptPersonCode != ''">report_dept_person_code,</if>
+ <if test="circulationDeptPersonCode != null and circulationDeptPersonCode != ''">circulation_dept_person_code,</if>
+ <if test="circulationDeptPersonName != null and circulationDeptPersonName != ''">circulation_dept_person_name,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="nextScriptno != null">#{nextScriptno},</if>
@@ -337,6 +358,8 @@
<if test="dutyDeptPersonCode != null and dutyDeptPersonCode != ''">#{dutyDeptPersonCode},</if>
<if test="reportDeptPersonName != null and reportDeptPersonName != ''">#{reportDeptPersonName},</if>
<if test="reportDeptPersonCode != null and reportDeptPersonCode != ''">#{reportDeptPersonCode},</if>
+ <if test="circulationDeptPersonCode != null and circulationDeptPersonCode != ''">#{circulationDeptPersonCode},</if>
+ <if test="circulationDeptPersonName != null and circulationDeptPersonName != ''">#{circulationDeptPersonName},</if>
</trim>
</insert>
@@ -396,6 +419,8 @@
<if test="dutyDeptPersonCode != null and dutyDeptPersonCode != ''">duty_dept_person_code = #{dutyDeptPersonCode},</if>
<if test="reportDeptPersonName != null and reportDeptPersonName != ''">report_dept_person_name = #{reportDeptPersonName},</if>
<if test="reportDeptPersonCode != null and reportDeptPersonCode != ''">report_dept_person_code = #{reportDeptPersonCode},</if>
+ <if test="circulationDeptPersonName != null and circulationDeptPersonName != ''">circulation_dept_person_name = #{circulationDeptPersonName},</if>
+ <if test="circulationDeptPersonCode != null and circulationDeptPersonCode != ''">circulation_dept_person_code = #{circulationDeptPersonCode},</if>
</trim>
where id = #{id}
</update>
diff --git a/smartor/src/main/resources/mapper/smartor/SvyTaskTemplateScriptMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyTaskTemplateScriptMapper.xml
index 64ed434..cdfa059 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyTaskTemplateScriptMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyTaskTemplateScriptMapper.xml
@@ -55,6 +55,8 @@
<result property="reportDeptPersonName" column="report_dept_person_code"/>
<result property="isMydException" column="is_myd_exception"/>
<result property="dimension" column="dimension"/>
+ <result property="circulationDeptPersonCode" column="circulation_dept_person_code"/>
+ <result property="circulationDeptPersonName" column="circulation_dept_person_name"/>
</resultMap>
<sql id="selectSvyTaskTemplateScriptVo">
@@ -82,6 +84,7 @@
scriptid,
script_topic, language, categoryName, script_content, is_must, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid, value_type, targetoptions, script_type, targetid, targetvalue, next_scriptno, script_result, otherdata, picture_path
, duty_dept_person_name, duty_dept_person_code, report_dept_person_name, report_dept_person_code
+ , circulation_dept_person_code, circulation_dept_person_name
from svy_task_template_script
</sql>
@@ -152,6 +155,12 @@
<if test="reportDeptPersonCode != null and reportDeptPersonCode != ''">and report_dept_person_code like concat('%', #{reportDeptPersonCode},
'%')
</if>
+ <if test="circulationDeptPersonCode != null and circulationDeptPersonCode != ''">and circulation_dept_person_code like concat('%', #{circulationDeptPersonCode},
+ '%')
+ </if>
+ <if test="circulationDeptPersonName != null and circulationDeptPersonName != ''">and circulation_dept_person_name like concat('%', #{circulationDeptPersonName},
+ '%')
+ </if>
</select>
<select id="selectSvyTaskTemplateScriptByID" parameterType="Long" resultMap="SvyTaskTemplateScriptResult">
@@ -212,6 +221,8 @@
<if test="dutyDeptPersonCode != null and dutyDeptPersonCode != ''">duty_dept_person_code,</if>
<if test="reportDeptPersonName != null and reportDeptPersonName != ''">report_dept_person_name,</if>
<if test="reportDeptPersonCode != null and reportDeptPersonCode != ''">report_dept_person_code,</if>
+ <if test="circulationDeptPersonCode != null and circulationDeptPersonCode != ''">circulation_dept_person_code,</if>
+ <if test="circulationDeptPersonName != null and circulationDeptPersonName != ''">circulation_dept_person_name,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="taskid != null">#{taskid},</if>
@@ -263,6 +274,8 @@
<if test="dutyDeptPersonCode != null and dutyDeptPersonCode != ''">#{dutyDeptPersonCode},</if>
<if test="reportDeptPersonName != null and reportDeptPersonName != ''">#{reportDeptPersonName},</if>
<if test="reportDeptPersonCode != null and reportDeptPersonCode != ''">#{reportDeptPersonCode},</if>
+ <if test="circulationDeptPersonCode != null and circulationDeptPersonCode != ''">#{circulationDeptPersonCode},</if>
+ <if test="circulationDeptPersonName != null and circulationDeptPersonName != ''">#{circulationDeptPersonName},</if>
</trim>
</insert>
@@ -320,6 +333,8 @@
<if test="dutyDeptPersonCode != null and dutyDeptPersonCode != ''">duty_dept_person_code = #{dutyDeptPersonCode},</if>
<if test="reportDeptPersonName != null and reportDeptPersonName != ''">report_dept_person_name = #{reportDeptPersonName},</if>
<if test="reportDeptPersonCode != null and reportDeptPersonCode != ''">report_dept_person_code = #{reportDeptPersonCode},</if>
+ <if test="circulationDeptPersonName != null and circulationDeptPersonName != ''">circulation_dept_person_name = #{circulationDeptPersonName},</if>
+ <if test="circulationDeptPersonCode != null and circulationDeptPersonCode != ''">circulation_dept_person_code = #{circulationDeptPersonCode},</if>
</trim>
where id = #{d}
</update>
--
Gitblit v1.9.3