From 1e1814178edf84090b28492bbad340ab13e5c169 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期二, 22 七月 2025 18:16:34 +0800
Subject: [PATCH] 代码提交
---
smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateServiceImpl.java | 24
ruoyi-admin/src/main/java/com/ruoyi/web/controller/hanler/ChatWebSocketHandler.java | 8
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskAnswerController.java | 1
ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java | 17
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskDetailServiceImpl.java | 3
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SmsParamController.java | 7
smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml | 37
ruoyi-system/src/main/java/com/ruoyi/system/service/ISmsParamService.java | 4
smartor/src/main/java/com/smartor/service/impl/IvrTaskTemplateServiceImpl.java | 13
smartor/src/main/java/com/smartor/service/impl/ServiceTaskServiceImpl.java | 33
ruoyi-system/src/main/java/com/ruoyi/system/domain/SmsTemplet.java | 32
ruoyi-system/src/main/java/com/ruoyi/system/service/ISmsTempletService.java | 20
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SmsRecordsServiceImpl.java | 207 ++++
smartor/src/main/java/com/smartor/domain/PatSatisfaction.java | 17
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SmsTempletMapper.java | 21
smartor/src/main/resources/mapper/smartor/Icd10Mapper.xml | 4
ruoyi-admin/src/main/resources/application.yml | 6
ruoyi-system/src/main/java/com/ruoyi/system/domain/SmsRecords.java | 170 +++
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SmsTempletController.java | 10
smartor/src/main/java/com/smartor/domain/IvrLibaTemplateScriptVO.java | 2
smartor/src/main/java/com/smartor/service/impl/SvyTaskSingleServiceImpl.java | 5
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/HNGatherPatArchiveController.java | 56 +
.idea/compiler.xml | 14
smartor/src/main/java/com/smartor/mapper/HNGatherPatArchiveMapper.java | 75 +
smartor/src/main/java/com/smartor/domain/ServiceSubtask.java | 24
smartor/src/main/resources/mapper/smartor/HNGatherPatArchiveMapper.xml | 611 ++++++++++++++
smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java | 10
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SmsParamMapper.java | 4
ruoyi-system/src/main/resources/mapper/system/SmsParamMapper.xml | 2
smartor/src/main/java/com/smartor/service/IHNGatherPatArchiveService.java | 67 +
ruoyi-system/src/main/resources/mapper/system/SmsTempletMapper.xml | 2
ruoyi-admin/src/main/resources/application-xh.yml | 11
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SmsRecordsMapper.java | 21
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SmsRecordsController.java | 7
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java | 115 +-
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceTaskController.java | 13
smartor/src/main/java/com/smartor/mapper/ServiceSubtaskMapper.java | 17
ruoyi-system/src/main/java/com/ruoyi/system/domain/SmsParam.java | 36
smartor/src/main/java/com/smartor/domain/IvrLibaTemplateScript.java | 2
smartor/src/main/java/com/smartor/service/impl/HNGatherPatArchiveServiceImpl.java | 121 ++
ruoyi-framework/src/main/java/com/ruoyi/framework/interceptor/HospitalFilterInterceptor.java | 10
ruoyi-admin/src/main/resources/application-ls.yml | 5
ruoyi-system/src/main/resources/mapper/system/SmsRecordsMapper.xml | 212 ++++
smartor/src/main/java/com/smartor/domain/ServiceSubtaskVO.java | 10
ServiceTaskHandler.java | 23
ruoyi-admin/src/main/resources/application-hn.yml | 20
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SmsParamServiceImpl.java | 8
smartor/src/main/java/com/smartor/domain/ServiceSubtaskStatistic.java | 48
ruoyi-system/src/main/java/com/ruoyi/system/service/ISmsRecordsService.java | 30
smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml | 58 +
smartor/src/main/java/com/smartor/mapper/PatMedInhospMapper.java | 3
/dev/null | 177 ----
ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java | 6
smartor/src/main/java/com/smartor/service/impl/IvrLibaTemplateServiceImpl.java | 18
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java | 6
smartor/src/main/java/com/smartor/domain/PatMedInhosp.java | 12
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SmsTempletServiceImpl.java | 24
ruoyi-admin/src/main/resources/application-druid.yml | 22
smartor/src/main/java/com/smartor/service/IServiceTaskService.java | 6
smartor/src/main/java/com/smartor/service/impl/CommonTaskServiceImpl.java | 3
60 files changed, 2,047 insertions(+), 503 deletions(-)
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index f985bed..6ef4c26 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -2,6 +2,7 @@
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
+ <profile default="true" name="Default" enabled="true" />
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
@@ -9,21 +10,12 @@
<module name="ruoyi-framework" />
<module name="ruoyi-system" />
<module name="smartor" />
- <module name="smartor-admin" />
<module name="ruoyi-common" />
<module name="ruoyi-generator" />
+ <module name="smartor-admin" />
+ <module name="smartor-suifang" />
<module name="ruoyi-quartz" />
</profile>
</annotationProcessing>
- <bytecodeTargetLevel>
- <module name="ruoyi" target="1.8" />
- <module name="ruoyi-common" target="1.8" />
- <module name="ruoyi-framework" target="1.8" />
- <module name="ruoyi-generator" target="1.8" />
- <module name="ruoyi-quartz" target="1.8" />
- <module name="ruoyi-system" target="1.8" />
- <module name="smartor" target="1.8" />
- <module name="smartor-admin" target="1.8" />
- </bytecodeTargetLevel>
</component>
</project>
\ No newline at end of file
diff --git a/ServiceTaskHandler.java b/ServiceTaskHandler.java
new file mode 100644
index 0000000..2c50ba3
--- /dev/null
+++ b/ServiceTaskHandler.java
@@ -0,0 +1,23 @@
+private boolean sendLishuiSms(ServiceSubtask serviceSubtask, SendMagParam sendMagParam) {
+ Map<String, String> map = MsgLSEnum.getAddressByCode(serviceSubtask.getOrgid());
+ String token = LSHospTokenUtil.getToken(serviceSubtask.getOrgid());
+ if (ObjectUtils.isNotEmpty(map) && StringUtils.isEmpty(map.get("address"))) {
+ ServiceSubtask ss = new ServiceSubtask();
+ ss.setResult("error");
+ ss.setRemark("鐭俊鍙戦�佸け璐�,璇ユ満鏋勬病鏈夐厤缃煭淇″湴鍧�");
+ ss.setSendstate(5L);
+ ss.setId(serviceSubtask.getId());
+ serviceSubtaskMapper.updateServiceSubtask(ss);
+ return false;
+ }
+ log.info("銆恠fHandlle銆戜附姘寸煭淇″彂閫侊紝鍦板潃锛歿}锛屽弬鏁帮細{}锛屾満鏋処D锛歿}", map.get("address"), sendMagParam, serviceSubtask.getOrgid());
+ String dxCode = getDXCode(map.get("address"), sendMagParam.getPhone(), sendMagParam.getContent(), map.get("sendPersonId"), map.get("sendPersonName"), MsgLSEnum.getHeaderByCode(serviceSubtask.getOrgid()), token);
+ log.info("銆恠fHandlle銆戜附姘寸煭淇″彂閫佺粨鏋滐細{}", dxCode);
+ ObjectMapper objectMapper = new ObjectMapper();
+ Map<String, Object> textParam = objectMapper.readValue(dxCode, Map.class);
+ String code = textParam.get("Code").toString();
+ return code.equals("0");
+}
+
+// 鍦ㄥ師鏈変唬鐮佷腑璋冪敤杩欎釜鏂规硶
+boolean isSuccess = sendLishuiSms(serviceSubtask, sendMagParam);
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/hanler/ChatWebSocketHandler.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/hanler/ChatWebSocketHandler.java
index 8c4b521..5ef354f 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/hanler/ChatWebSocketHandler.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/hanler/ChatWebSocketHandler.java
@@ -322,11 +322,7 @@
}
log.info("==============================Targetregex鐨勫�间负锛歿}, Targetregex2鐨勫�间负锛歿}", ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex(), ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2());
- if (StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() &&
- StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches() ||
- StringUtils.isEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) &&
- StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) &&
- matcher.matches()) {
+ if (StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() && StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches() || StringUtils.isEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches()) {
log.info("鍖归厤姝g‘浜�");
//璇存槑鍖归厤姝g‘浜�
ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).setIsUserOperation(1);
@@ -358,7 +354,7 @@
redisCache.setCacheObject(userId + "isOver", 1, 120, TimeUnit.MINUTES);
} else {
for (IvrLibaTemplateScriptVO script : ivrLibaTemplateScriptVOList) {
- if (script.getSort() == nextQuestion) {
+ if (script.getSort().intValue() == nextQuestion) {
QuestionMessagePhone returnQues = new QuestionMessagePhone();
returnQues.setNowQuestion(script);
redisCache.setCacheObject(userId + "returnQues", returnQues, 120, TimeUnit.MINUTES);
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/HNGatherPatArchiveController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/HNGatherPatArchiveController.java
new file mode 100644
index 0000000..6b3a9ed
--- /dev/null
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/HNGatherPatArchiveController.java
@@ -0,0 +1,56 @@
+package com.ruoyi.web.controller.smartor;
+
+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.domain.entity.SysDept;
+import com.ruoyi.common.core.domain.entity.SysUser;
+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.PatMedInhosp;
+import com.smartor.domain.PatMedOuthosp;
+import com.smartor.domain.PatMedReq;
+import com.smartor.domain.PatMedRes;
+import com.smartor.service.IHNGatherPatArchiveService;
+import com.smartor.service.IPatMedOuthospService;
+import com.smartor.service.impl.HNGatherPatArchiveServiceImpl;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.lang.reflect.Array;
+import java.util.List;
+
+/**
+ * 娌冲崡閲囬泦鎮h�呬俊鎭帴鍙ontroller
+ *
+ * @author smartor
+ * @date 2025-07-09
+ */
+@RestController
+@RequestMapping("/smartor/hngather")
+@Api(description = "娌冲崡閲囬泦鎮h�呬俊鎭帴鍙�")
+public class HNGatherPatArchiveController extends BaseController {
+ @Autowired
+ private IHNGatherPatArchiveService ihnGatherPatArchiveService;
+
+ /**
+ * 娌冲崡鏁版嵁閲囬泦
+ */
+ //@PreAuthorize("@ss.hasPermi('smartor:patouthosp:list')")
+ @PostMapping("/selectGatherList")
+ @ApiOperation("娌冲崡鏁版嵁閲囬泦")
+ public Integer selectUserList(@RequestBody SysUser sysUser) {
+// Integer integer = ihnGatherPatArchiveService.selectUserList(null);
+// Integer deptInt = ihnGatherPatArchiveService.selectDeptList(null);
+// Integer icdInt = ihnGatherPatArchiveService.selectIcd10List(null);
+ Integer integer = ihnGatherPatArchiveService.selectPatMedInhospList(new PatMedInhosp());
+ return integer;
+ }
+
+}
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 0dafc62..f88bb2a 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
@@ -152,5 +152,4 @@
return AjaxResult.success(serviceSubtaskAnswerService.selectPatQuestionResult(serviceSubTaskQueryReq));
}
-
}
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 69c6051..850c856 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
@@ -55,14 +55,18 @@
//@PreAuthorize("@ss.hasPermi('system:taskcall:list')")
@PostMapping("/patItem")
public TableDataInfo patItem(@RequestBody ServiceSubtaskVO serviceSubtaskVO) {
+ PageUtils.startPageByPost(serviceSubtaskVO.getPageNum(), serviceSubtaskVO.getPageSize());
List<ServiceSubtask> serviceSubtaskList = null;
+ LoginUser loginUser = getLoginUser();
+ SysUser user = loginUser.getUser();
+ serviceSubtaskVO.setOrgid(user.getOrgid());
if (serviceSubtaskVO != null) {
- PageUtils.startPageByPost(serviceSubtaskVO.getPageNum(), serviceSubtaskVO.getPageSize());
serviceSubtaskList = serviceSubtaskService.patItem(serviceSubtaskVO);
}
for (ServiceSubtask serviceSubtask : serviceSubtaskList) {
ServiceSubtaskRecord serviceSubtaskRecord = new ServiceSubtaskRecord();
serviceSubtaskRecord.setSubtaskId(serviceSubtask.getId());
+ serviceSubtaskRecord.setOrgid(serviceSubtask.getOrgid());
if (ObjectUtils.isNotEmpty((serviceSubtask.getTaskid())))
serviceSubtaskRecord.setTaskid(serviceSubtask.getTaskid().toString());
serviceSubtask.setServiceSubtaskRecordList(serviceSubtaskRecordService.selectServiceSubtaskRecordList(serviceSubtaskRecord));
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceTaskController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceTaskController.java
index 90b3e21..36c5479 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceTaskController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceTaskController.java
@@ -135,6 +135,19 @@
}
/**
+ * 鑾峰彇闅忚鍙婃椂鐜�
+ */
+ @ApiOperation("鑾峰彇闅忚鍙婃椂鐜�")
+ //@PreAuthorize("@ss.hasPermi('smartor:ServiceTask:add')")
+ @Log(title = "鑾峰彇闅忚鍙婃椂鐜�", businessType = BusinessType.INSERT)
+ @PostMapping("/selectTimelyRate")
+ public AjaxResult selectTimelyRate(@RequestBody ServiceSubtask serviceSubtask) {
+ SysUser user = getLoginUser().getUser();
+ serviceSubtask.setOrgid(user.getOrgid());
+ return success(serviceTaskService.selectTimelyRate(serviceSubtask));
+ }
+
+ /**
* 淇敼璇煶浠诲姟
*/
@ApiOperation("淇敼浠诲姟")
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SmsParamController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SmsParamController.java
index 6a48136..1cdacc4 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SmsParamController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SmsParamController.java
@@ -3,12 +3,9 @@
import java.util.List;
import javax.servlet.http.HttpServletResponse;
-import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -17,8 +14,8 @@
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
-import com.smartor.domain.SmsParam;
-import com.smartor.service.ISmsParamService;
+import com.ruoyi.system.domain.SmsParam;
+import com.ruoyi.system.service.ISmsParamService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SmsRecordsController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SmsRecordsController.java
index 2ec145d..49c66af 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SmsRecordsController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SmsRecordsController.java
@@ -3,12 +3,9 @@
import java.util.List;
import javax.servlet.http.HttpServletResponse;
-import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -17,8 +14,8 @@
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
-import com.smartor.domain.SmsRecords;
-import com.smartor.service.ISmsRecordsService;
+import com.ruoyi.system.domain.SmsRecords;
+import com.ruoyi.system.service.ISmsRecordsService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
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 fd3276f..0ad0f48 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
@@ -2,12 +2,10 @@
import java.util.List;
import javax.servlet.http.HttpServletResponse;
-import org.springframework.security.access.prepost.PreAuthorize;
+
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -16,14 +14,14 @@
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
-import com.smartor.domain.SmsTemplet;
-import com.smartor.service.ISmsTempletService;
+import com.ruoyi.system.domain.SmsTemplet;
+import com.ruoyi.system.service.ISmsTempletService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 鐭俊妯℃澘Controller
- *
+ *
* @author smartor
* @date 2023-03-06
*/
diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml
index ee1857f..da4ddd3 100644
--- a/ruoyi-admin/src/main/resources/application-druid.yml
+++ b/ruoyi-admin/src/main/resources/application-druid.yml
@@ -13,10 +13,10 @@
# 鍏徃
# url: jdbc:mysql://192.168.2.9:3308/smartor?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
# 涓芥按
-# url: jdbc:mysql://127.0.0.1:3308/smartor-lisui?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-# username: smartor
-# password: Smartor.2023
-# driverClassName: com.mysql.cj.jdbc.Driver
+ # url: jdbc:mysql://127.0.0.1:3308/smartor-lisui?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+ # username: smartor
+ # password: Smartor.2023
+ # driverClassName: com.mysql.cj.jdbc.Driver
# 娌冲崡
# url: jdbc:mysql://127.0.0.1:3308/smartor_hn?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
# username: root
@@ -34,11 +34,11 @@
password: Hxerp2000
driverClassName: com.mysql.cj.jdbc.Driver
-# # 楂樻柉鏁版嵁搴撻厤缃�
-# url: jdbc:postgresql://127.0.0.1:5432/smartorlishui
-# username: gaussdb
-# password: Ls@123456
-# driverClassName: org.postgresql.Driver
+ # # 楂樻柉鏁版嵁搴撻厤缃�
+ # url: jdbc:postgresql://127.0.0.1:5432/smartorlishui
+ # username: gaussdb
+ # password: Ls@123456
+ # driverClassName: org.postgresql.Driver
# 浠庡簱鏁版嵁婧�
slave:
@@ -197,10 +197,10 @@
hosp_info_url: http://esb-core-rest.wowjoy.cn/esb/exchange
# 0浠h〃璧伴粯璁ょ殑涓婁紶 1 浠g爜璧版柊鍗庡尰闄㈢殑涓婁紶
-uploadSwitch: 1
+uploadSwitch: 0
# 鎸囧畾asr鍥炶皟鐨剈rl璺緞(鏈湴)
-ASRCallBackPath: http://127.0.0.1:8095/smartor/serviceSubtask/phoneCallBackYQ
+ASRCallBackPath: http://192.168.100.10:8095/smartor/serviceSubtask/phoneCallBackYQ
#鎸傛柇IP(鏈湴)
hangup: http://192.168.100.6:8089/hangup
#fs鎵�浣跨敤鐨勯樋閲岀殑app_key(鏈湴)
diff --git a/ruoyi-admin/src/main/resources/application-hn.yml b/ruoyi-admin/src/main/resources/application-hn.yml
index 120741d..3610632 100644
--- a/ruoyi-admin/src/main/resources/application-hn.yml
+++ b/ruoyi-admin/src/main/resources/application-hn.yml
@@ -7,7 +7,7 @@
# 涓诲簱鏁版嵁婧�
master:
# 娌冲崡
- url: jdbc:mysql://127.0.0.1:3308/smartor_hn?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+ url: jdbc:mysql://127.0.0.1:3308/smartor_hn?useUnicode=true&characterEncoding=utf8&&rewriteBatchedStatements=true&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root
password: 123456
driverClassName: com.mysql.cj.jdbc.Driver
@@ -15,12 +15,12 @@
# 浠庡簱鏁版嵁婧�
slave:
- # 浠庢暟鎹簮寮�鍏�/榛樿鍏抽棴(鍏徃)
- # enabled: true
- # url: jdbc:sqlserver://116.62.18.175:6001;DatabaseName=iv-ywey;encrypt=false;SelectMethod=cursor
- # username: sa
- # password: Hxerp2000
- # driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
+ # 浠庢暟鎹簮寮�鍏�/榛樿鍏抽棴(鍏徃)
+ enabled: true
+ url: jdbc:postgresql://10.10.13.108:5432/hdr
+ username: mbsjjk
+ password: sjjk@2025
+ driver-class-name: org.postgresql.Driver
# 浠庢暟鎹簮寮�鍏�/榛樿鍏抽棴(涔変箤浜岄櫌)
# enabled: true
@@ -91,6 +91,12 @@
# #杩炴帴姹犳渶澶ч樆濉炵瓑寰呮椂闂达紙浣跨敤璐熷�艰〃绀烘病鏈夐檺鍒讹級
max-wait: -1ms
+# PageHelper鍒嗛〉鎻掍欢
+pagehelper:
+ helperDialect: postgresql
+ supportMethodsArguments: true
+ params: count=countSql
+
# Swagger閰嶇疆
swagger:
# 鏄惁寮�鍚痵wagger
diff --git a/ruoyi-admin/src/main/resources/application-ls.yml b/ruoyi-admin/src/main/resources/application-ls.yml
index fdd19d6..c04e756 100644
--- a/ruoyi-admin/src/main/resources/application-ls.yml
+++ b/ruoyi-admin/src/main/resources/application-ls.yml
@@ -103,6 +103,11 @@
# 璇锋眰鍓嶇紑
pathMapping: /dev-api
+# PageHelper鍒嗛〉鎻掍欢
+pagehelper:
+ helperDialect: mysql
+ supportMethodsArguments: true
+ params: count=countSql
magic-api:
web: /magic/web
diff --git a/ruoyi-admin/src/main/resources/application-xh.yml b/ruoyi-admin/src/main/resources/application-xh.yml
index 752671f..2e50c44 100644
--- a/ruoyi-admin/src/main/resources/application-xh.yml
+++ b/ruoyi-admin/src/main/resources/application-xh.yml
@@ -111,6 +111,12 @@
default-page: 1
default-size: 10
+# PageHelper鍒嗛〉鎻掍欢
+pagehelper:
+ helperDialect: mysql
+ supportMethodsArguments: true
+ params: count=countSql
+
#閽夐拤鐨勫瘑閽�
dingAppid: dingn8iip5ubj7clrrsv
dingAppSecret: qlEK8D3oOVwGPOTiBQIBYTqQVlAfy9S_qQizEQFjJdSScwemWFryg4gbneu-NqWD
@@ -160,9 +166,8 @@
#鏂板崕鍖婚櫌澶栭摼璇锋眰IP鍜岀鍙e彿
req_path: 8093
-#localIP: https://wx.lihusmart.com
-#涓芥按澶栭摼璇锋眰IP鍜岀鍙e彿
-localIP: http://221.12.19.26
+localIP: https://wx.lihusmart.com
+
#鑾峰彇鎮h�呬俊鎭疷RL(鍗庡崜鎻愪緵)
hosp_info_url: http://esb-core-rest.wowjoy.cn/esb/exchange
diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml
index 9641646..04e1cc9 100644
--- a/ruoyi-admin/src/main/resources/application.yml
+++ b/ruoyi-admin/src/main/resources/application.yml
@@ -117,11 +117,7 @@
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
-# PageHelper鍒嗛〉鎻掍欢
-pagehelper:
- helperDialect: mysql
- supportMethodsArguments: true
- params: count=countSql
+
# 闃叉XSS鏀诲嚮
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java
index 5eecedc..8955e98 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java
@@ -5,6 +5,7 @@
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.connection.DataType;
import org.springframework.data.redis.core.*;
import org.springframework.stereotype.Component;
@@ -141,21 +142,23 @@
/**
* 缂撳瓨List鏁版嵁
*
- * @param cacheKey 缂撳瓨鐨勯敭鍊�
- * @param list 寰呯紦瀛樼殑List鏁版嵁(杩欓噷濡傛灉鏂板鐨勮瘽锛屾槸寰�澶撮儴鏂板)骞跺幓閲�
+ * @param cacheKey 缂撳瓨鐨勯敭鍊�
+ * @param list 寰呯紦瀛樼殑List鏁版嵁(杩欓噷濡傛灉鏂板鐨勮瘽锛屾槸寰�澶撮儴鏂板)骞跺幓閲�
* @return 缂撳瓨鐨勫璞�
*/
public void setCacheListLeftAndDistinct(String cacheKey, List<String> list) {
- // 鑾峰彇 ListOperations 瀵硅薄锛岀敤浜庢搷浣� Redis List
- ListOperations<String, String> listOps = redisTemplate.opsForList();
+ // 妫�鏌� key 绫诲瀷
+ DataType keyType = redisTemplate.type(cacheKey);
+ if (keyType != DataType.NONE && keyType != DataType.LIST) {
+ // 濡傛灉宸茬粡瀛樺湪浣嗕笉鏄� list 绫诲瀷锛屽垹闄ゅ畠锛堟垨鐩存帴鎶涘紓甯镐篃鍙級
+ redisTemplate.delete(cacheKey);
+ }
- // 鑾峰彇鐜版湁鐨� cache-0 鍒楄〃涓殑鎵�鏈夊��
+ ListOperations<String, String> listOps = redisTemplate.opsForList();
List<String> existingValues = listOps.range(cacheKey, 0, -1);
- // 杩囨护鍑轰笉鍦� Redis 鍒楄〃涓殑鍊�
List<String> newValues = list.stream().filter(value -> !existingValues.contains(value)).collect(Collectors.toList());
- // 灏嗘柊鐨勫�兼坊鍔犲埌 Redis 鍒楄〃鐨勫乏渚�
if (!newValues.isEmpty()) {
listOps.leftPushAll(cacheKey, newValues);
}
diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/interceptor/HospitalFilterInterceptor.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/interceptor/HospitalFilterInterceptor.java
index 7ddca76..cc3dbe2 100644
--- a/ruoyi-framework/src/main/java/com/ruoyi/framework/interceptor/HospitalFilterInterceptor.java
+++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/interceptor/HospitalFilterInterceptor.java
@@ -54,7 +54,7 @@
}
// 淇敼 SQL锛屾坊鍔� orgid 鏉′欢
- String modifiedSql = modifySqlWithorgidId(originalSql, orgid);
+ String modifiedSql = modifySqlWithOrgId(originalSql, orgid);
// 灏嗕慨鏀瑰悗鐨� SQL 鍐欏洖
metaObject.setValue("delegate.boundSql.sql", modifiedSql);
@@ -67,11 +67,11 @@
* 淇敼 SQL锛屾敞鍏� orgid 鏉′欢
*
* @param originalSql 鍘熷 SQL
- * @param orgid 褰撳墠鍖婚櫌 ID
+ * @param orgId 褰撳墠鍖婚櫌 ID
* @return 淇敼鍚庣殑 SQL
*/
- private String modifySqlWithorgidId(String originalSql, String orgid) {
- if (originalSql.contains("insert into") || originalSql.contains("INSERT INTO") || originalSql.contains("from sys_menu") || originalSql.contains("sys_job") || originalSql.contains("update sys_menu") || originalSql.contains("information_schema.tables") || originalSql.contains("information_schema.columns") || originalSql.contains("gen_table") || originalSql.toUpperCase().contains("ORGID IS NULL")) {
+ private String modifySqlWithOrgId(String originalSql, String orgid) {
+ if (originalSql.contains("insert into") || originalSql.contains("INSERT INTO") || originalSql.contains("from sys_menu") || originalSql.contains("sys_job") || originalSql.contains("update sys_menu") || originalSql.contains("information_schema.tables") || originalSql.contains("information_schema.columns") || originalSql.contains("gen_table") || originalSql.toUpperCase().contains("ORGID IS NULL") || originalSql.toUpperCase().contains("FROM CRYXX") || originalSql.toUpperCase().contains("FROM MZXX") || originalSql.toUpperCase().contains("FROM JBXX") || originalSql.toUpperCase().contains("FROM BMXX")) {
return originalSql;
}
// 鎻愬彇 orgid 鐨� WHERE 瀛愬彞
@@ -97,7 +97,7 @@
}
// 淇敼 SQL
- if (originalSql.toUpperCase().contains("ORGID =") || originalSql.toUpperCase().contains("ORGID=")) {
+ if (originalSql.toUpperCase().contains("ORGID =") || originalSql.toUpperCase().contains("ORGID=") || originalSql.toUpperCase().contains("ORGID IN")) {
return originalSql;
} else if (originalSql.toUpperCase().contains("WHERE")) {
// 鍦ㄥ凡鏈� WHERE 鍚庢坊鍔� orgid 鏉′欢
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 2ce4c4d..64240b7 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
@@ -548,7 +548,6 @@
serviceSubtask.setResult("error");
serviceSubtask.setRemark("绯荤粺閿欒");
serviceSubtask.setSendstate(5L);
-// serviceSubtask.setFinishtime(new Date());
serviceSubtask.setGuid(guid);
iServiceSubtaskService.updateServiceSubtask(serviceSubtask);
}
@@ -570,14 +569,12 @@
serviceSubtask.setResult("error");
serviceSubtask.setRemark(patArchive.getNotrequiredreason());
serviceSubtask.setSendstate(4L);
-// serviceSubtask.setFinishtime(new Date());
iServiceSubtaskService.insertServiceSubtask(serviceSubtask);
continue;
}
String patid = rsaPublicKeyExample.encryptedData(serviceSubtask.getPatid().toString(), pub_key);
String url = null;
url = ip + ":" + req_path + "/outsideChainwt?param1=" + taskId + "¶m2=" + patid + "¶m3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + "¶m5=false";
-// String wxCode = getWXCode(serviceSubtask.getSfzh(), url, serviceSubtask.getTaskName(), serviceSubtask.getTaskDesc(), "鏃�");
//鑾峰彇寰俊鍏紬鍙疯姹備俊鎭牴鎹満鏋処D
List<String> wxqqxx = WxGZHEnum.getDescByCode(patArchive.getOrgid());
@@ -587,7 +584,6 @@
ss.setRemark("璇ユ満鏋勭殑鍏紬鍙烽厤缃俊鎭笉鍏紝鏃犳硶閫氳繃鍏紬鍙峰彂閫�");
ss.setSendstate(5L);
ss.setId(serviceSubtask.getId());
-// ss.setFinishtime(new Date());
serviceSubtaskMapper.updateServiceSubtask(ss);
continue;
}
@@ -598,7 +594,6 @@
ss.setRemark("鍏紬鍙峰彂閫佸け璐�,his绯荤粺鐨勬偅鑰卛d涓虹┖");
ss.setSendstate(5L);
ss.setId(serviceSubtask.getId());
-// ss.setFinishtime(new Date());
serviceSubtaskMapper.updateServiceSubtask(ss);
continue;
}
@@ -634,7 +629,6 @@
serviceSubtask.setResult("error");
serviceSubtask.setRemark("绯荤粺閿欒");
serviceSubtask.setSendstate(5L);
-// serviceSubtask.setFinishtime(new Date());
serviceSubtask.setGuid(guid);
iServiceSubtaskService.updateServiceSubtask(serviceSubtask);
}
diff --git a/smartor/src/main/java/com/smartor/domain/SmsParam.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/SmsParam.java
similarity index 81%
rename from smartor/src/main/java/com/smartor/domain/SmsParam.java
rename to ruoyi-system/src/main/java/com/ruoyi/system/domain/SmsParam.java
index cb50289..b2e907b 100644
--- a/smartor/src/main/java/com/smartor/domain/SmsParam.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/SmsParam.java
@@ -1,4 +1,4 @@
-package com.smartor.domain;
+package com.ruoyi.system.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
@@ -9,7 +9,7 @@
/**
* 鐭俊鍙傛暟瀵硅薄 sms_param
- *
+ *
* @author smartor
* @date 2023-03-06
*/
@@ -47,75 +47,75 @@
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private Date uploadTime;
- public void setParamid(Long paramid)
+ public void setParamid(Long paramid)
{
this.paramid = paramid;
}
- public Long getParamid()
+ public Long getParamid()
{
return paramid;
}
- public void setParamname(String paramname)
+ public void setParamname(String paramname)
{
this.paramname = paramname;
}
- public String getParamname()
+ public String getParamname()
{
return paramname;
}
- public void setParamval(String paramval)
+ public void setParamval(String paramval)
{
this.paramval = paramval;
}
- public String getParamval()
+ public String getParamval()
{
return paramval;
}
- public void setDescirbe(String descirbe)
+ public void setDescirbe(String descirbe)
{
this.descirbe = descirbe;
}
- public String getDescirbe()
+ public String getDescirbe()
{
return descirbe;
}
- public void setUsestatus(Long usestatus)
+ public void setUsestatus(Long usestatus)
{
this.usestatus = usestatus;
}
- public Long getUsestatus()
+ public Long getUsestatus()
{
return usestatus;
}
- public void setDelFlag(String delFlag)
+ public void setDelFlag(String delFlag)
{
this.delFlag = delFlag;
}
- public String getDelFlag()
+ public String getDelFlag()
{
return delFlag;
}
- public void setIsupload(Long isupload)
+ public void setIsupload(Long isupload)
{
this.isupload = isupload;
}
- public Long getIsupload()
+ public Long getIsupload()
{
return isupload;
}
- public void setUploadTime(Date uploadTime)
+ public void setUploadTime(Date uploadTime)
{
this.uploadTime = uploadTime;
}
- public Date getUploadTime()
+ public Date getUploadTime()
{
return uploadTime;
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/SmsRecords.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/SmsRecords.java
new file mode 100644
index 0000000..af4354d
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/SmsRecords.java
@@ -0,0 +1,170 @@
+package com.ruoyi.system.domain;
+
+import java.util.Date;
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 鐭俊璁板綍瀵硅薄 sms_records
+ *
+ * @author smartor
+ * @date 2023-03-06
+ */
+@Data
+public class SmsRecords extends BaseEntity {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 璁板綍ID
+ */
+ private Long recordid;
+
+ /**
+ * 瀛愪换鍔D
+ */
+ private Long subId;
+
+ /**
+ *
+ */
+ @Excel(name = "鐢ㄦ埛ID")
+ private String userid;
+
+ /**
+ *
+ */
+ @Excel(name = "鐢ㄦ埛鍚�")
+ private String username;
+
+ /**
+ *
+ */
+ @Excel(name = "鎵嬫満鍙�")
+ private String phone;
+
+ /**
+ * 鐭俊缂栧彿
+ */
+ @Excel(name = "鐭俊缂栧彿")
+ private String msgno;
+
+ /**
+ * 鐭俊鍐呭
+ */
+ @Excel(name = "鐭俊鍐呭")
+ private String msg;
+
+ /**
+ * 鏂板鏃堕棿
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date inserttime;
+
+ /**
+ * 鍙戦�佹椂闂�
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date sendtime;
+
+ /**
+ * 鍙戦�佸け璐ユ鏁�
+ */
+ @Excel(name = "鍙戦�佸け璐ユ鏁�")
+ private Long sendfailedcount;
+
+ /**
+ * 缁撴灉鏃堕棿
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date resulttime;
+
+ /**
+ * 缁撴灉鍐呭
+ */
+ @Excel(name = "")
+ private String resultmsg;
+
+ /**
+ * 鍙戦�佺姸鎬�
+ */
+ @Excel(name = "鍙戦�佺姸鎬�: 0鏈彂閫� 1.宸插彂閫�")
+ private Long sendstate;
+
+ /**
+ *
+ */
+ @Excel(name = "")
+ private Long inserttype;
+
+ /**
+ *
+ */
+ @Excel(name = "")
+ private Long insertsystem;
+
+ /**
+ *
+ */
+ @Excel(name = "")
+ private String insertmodule;
+
+ /**
+ *
+ */
+ @Excel(name = "")
+ private String moduleid;
+
+ /**
+ *
+ */
+ @Excel(name = "")
+ private String msgidentify;
+
+ /**
+ * $column.columnComment
+ */
+ @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+ private Long accountid;
+
+ /**
+ * 鏈烘瀯ID
+ */
+ @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+ private String orgid;
+
+ private List<String> orgidList;
+
+ /**
+ * 鍒犻櫎鏍囧織
+ */
+ private String delFlag;
+
+ /**
+ *
+ */
+ @Excel(name = "")
+ private Long isupload;
+
+ /**
+ *
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date uploadTime;
+ /**
+ *
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date visitTime;
+
+}
diff --git a/smartor/src/main/java/com/smartor/domain/SmsTemplet.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/SmsTemplet.java
similarity index 80%
rename from smartor/src/main/java/com/smartor/domain/SmsTemplet.java
rename to ruoyi-system/src/main/java/com/ruoyi/system/domain/SmsTemplet.java
index fab9ae1..ff6ca24 100644
--- a/smartor/src/main/java/com/smartor/domain/SmsTemplet.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/SmsTemplet.java
@@ -1,4 +1,4 @@
-package com.smartor.domain;
+package com.ruoyi.system.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
@@ -9,7 +9,7 @@
/**
* 鐭俊妯℃澘瀵硅薄 sms_templet
- *
+ *
* @author smartor
* @date 2023-03-06
*/
@@ -43,66 +43,66 @@
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private Date uploadTime;
- public void setTempletid(Long templetid)
+ public void setTempletid(Long templetid)
{
this.templetid = templetid;
}
- public Long getTempletid()
+ public Long getTempletid()
{
return templetid;
}
- public void setTempletno(String templetno)
+ public void setTempletno(String templetno)
{
this.templetno = templetno;
}
- public String getTempletno()
+ public String getTempletno()
{
return templetno;
}
- public void setTempletname(String templetname)
+ public void setTempletname(String templetname)
{
this.templetname = templetname;
}
- public String getTempletname()
+ public String getTempletname()
{
return templetname;
}
- public void setTempletcontent(String templetcontent)
+ public void setTempletcontent(String templetcontent)
{
this.templetcontent = templetcontent;
}
- public String getTempletcontent()
+ public String getTempletcontent()
{
return templetcontent;
}
- public void setDelFlag(String delFlag)
+ public void setDelFlag(String delFlag)
{
this.delFlag = delFlag;
}
- public String getDelFlag()
+ public String getDelFlag()
{
return delFlag;
}
- public void setIsupload(Long isupload)
+ public void setIsupload(Long isupload)
{
this.isupload = isupload;
}
- public Long getIsupload()
+ public Long getIsupload()
{
return isupload;
}
- public void setUploadTime(Date uploadTime)
+ public void setUploadTime(Date uploadTime)
{
this.uploadTime = uploadTime;
}
- public Date getUploadTime()
+ public Date getUploadTime()
{
return uploadTime;
}
diff --git a/smartor/src/main/java/com/smartor/mapper/SmsParamMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SmsParamMapper.java
similarity index 93%
rename from smartor/src/main/java/com/smartor/mapper/SmsParamMapper.java
rename to ruoyi-system/src/main/java/com/ruoyi/system/mapper/SmsParamMapper.java
index a51444d..2897247 100644
--- a/smartor/src/main/java/com/smartor/mapper/SmsParamMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SmsParamMapper.java
@@ -1,8 +1,8 @@
-package com.smartor.mapper;
+package com.ruoyi.system.mapper;
import java.util.List;
-import com.smartor.domain.SmsParam;
+import com.ruoyi.system.domain.SmsParam;
import org.apache.ibatis.annotations.Mapper;
/**
diff --git a/smartor/src/main/java/com/smartor/mapper/SmsRecordsMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SmsRecordsMapper.java
similarity index 87%
rename from smartor/src/main/java/com/smartor/mapper/SmsRecordsMapper.java
rename to ruoyi-system/src/main/java/com/ruoyi/system/mapper/SmsRecordsMapper.java
index fdc5c91..c5636ca 100644
--- a/smartor/src/main/java/com/smartor/mapper/SmsRecordsMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SmsRecordsMapper.java
@@ -1,19 +1,20 @@
-package com.smartor.mapper;
+package com.ruoyi.system.mapper;
+
+import com.ruoyi.system.domain.SmsRecords;
import java.util.List;
-import com.smartor.domain.SmsRecords;
/**
* 鐭俊璁板綍Mapper鎺ュ彛
- *
+ *
* @author smartor
* @date 2023-03-06
*/
-public interface SmsRecordsMapper
+public interface SmsRecordsMapper
{
/**
* 鏌ヨ鐭俊璁板綍
- *
+ *
* @param recordid 鐭俊璁板綍涓婚敭
* @return 鐭俊璁板綍
*/
@@ -21,7 +22,7 @@
/**
* 鏌ヨ鐭俊璁板綍鍒楄〃
- *
+ *
* @param smsRecords 鐭俊璁板綍
* @return 鐭俊璁板綍闆嗗悎
*/
@@ -29,7 +30,7 @@
/**
* 鏂板鐭俊璁板綍
- *
+ *
* @param smsRecords 鐭俊璁板綍
* @return 缁撴灉
*/
@@ -37,7 +38,7 @@
/**
* 淇敼鐭俊璁板綍
- *
+ *
* @param smsRecords 鐭俊璁板綍
* @return 缁撴灉
*/
@@ -45,7 +46,7 @@
/**
* 鍒犻櫎鐭俊璁板綍
- *
+ *
* @param recordid 鐭俊璁板綍涓婚敭
* @return 缁撴灉
*/
@@ -53,7 +54,7 @@
/**
* 鎵归噺鍒犻櫎鐭俊璁板綍
- *
+ *
* @param recordids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
* @return 缁撴灉
*/
diff --git a/smartor/src/main/java/com/smartor/mapper/SmsTempletMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SmsTempletMapper.java
similarity index 87%
rename from smartor/src/main/java/com/smartor/mapper/SmsTempletMapper.java
rename to ruoyi-system/src/main/java/com/ruoyi/system/mapper/SmsTempletMapper.java
index c39464e..99eb155 100644
--- a/smartor/src/main/java/com/smartor/mapper/SmsTempletMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SmsTempletMapper.java
@@ -1,19 +1,20 @@
-package com.smartor.mapper;
+package com.ruoyi.system.mapper;
+
+import com.ruoyi.system.domain.SmsTemplet;
import java.util.List;
-import com.smartor.domain.SmsTemplet;
/**
* 鐭俊妯℃澘Mapper鎺ュ彛
- *
+ *
* @author smartor
* @date 2023-03-06
*/
-public interface SmsTempletMapper
+public interface SmsTempletMapper
{
/**
* 鏌ヨ鐭俊妯℃澘
- *
+ *
* @param templetid 鐭俊妯℃澘涓婚敭
* @return 鐭俊妯℃澘
*/
@@ -21,7 +22,7 @@
/**
* 鏌ヨ鐭俊妯℃澘鍒楄〃
- *
+ *
* @param smsTemplet 鐭俊妯℃澘
* @return 鐭俊妯℃澘闆嗗悎
*/
@@ -29,7 +30,7 @@
/**
* 鏂板鐭俊妯℃澘
- *
+ *
* @param smsTemplet 鐭俊妯℃澘
* @return 缁撴灉
*/
@@ -37,7 +38,7 @@
/**
* 淇敼鐭俊妯℃澘
- *
+ *
* @param smsTemplet 鐭俊妯℃澘
* @return 缁撴灉
*/
@@ -45,7 +46,7 @@
/**
* 鍒犻櫎鐭俊妯℃澘
- *
+ *
* @param templetid 鐭俊妯℃澘涓婚敭
* @return 缁撴灉
*/
@@ -53,7 +54,7 @@
/**
* 鎵归噺鍒犻櫎鐭俊妯℃澘
- *
+ *
* @param templetids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
* @return 缁撴灉
*/
diff --git a/smartor/src/main/java/com/smartor/service/ISmsParamService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISmsParamService.java
similarity index 93%
rename from smartor/src/main/java/com/smartor/service/ISmsParamService.java
rename to ruoyi-system/src/main/java/com/ruoyi/system/service/ISmsParamService.java
index 31588a8..9f3daa3 100644
--- a/smartor/src/main/java/com/smartor/service/ISmsParamService.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISmsParamService.java
@@ -1,8 +1,8 @@
-package com.smartor.service;
+package com.ruoyi.system.service;
import java.util.List;
-import com.smartor.domain.SmsParam;
+import com.ruoyi.system.domain.SmsParam;
/**
* 鐭俊鍙傛暟Service鎺ュ彛
diff --git a/smartor/src/main/java/com/smartor/service/ISmsRecordsService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISmsRecordsService.java
similarity index 79%
rename from smartor/src/main/java/com/smartor/service/ISmsRecordsService.java
rename to ruoyi-system/src/main/java/com/ruoyi/system/service/ISmsRecordsService.java
index 2669621..dfa88c3 100644
--- a/smartor/src/main/java/com/smartor/service/ISmsRecordsService.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISmsRecordsService.java
@@ -1,19 +1,19 @@
-package com.smartor.service;
+package com.ruoyi.system.service;
import java.util.List;
-import com.smartor.domain.SmsRecords;
+
+import com.ruoyi.system.domain.SmsRecords;
/**
* 鐭俊璁板綍Service鎺ュ彛
- *
+ *
* @author smartor
* @date 2023-03-06
*/
-public interface ISmsRecordsService
-{
+public interface ISmsRecordsService {
/**
* 鏌ヨ鐭俊璁板綍
- *
+ *
* @param recordid 鐭俊璁板綍涓婚敭
* @return 鐭俊璁板綍
*/
@@ -21,7 +21,7 @@
/**
* 鏌ヨ鐭俊璁板綍鍒楄〃
- *
+ *
* @param smsRecords 鐭俊璁板綍
* @return 鐭俊璁板綍闆嗗悎
*/
@@ -29,15 +29,23 @@
/**
* 鏂板鐭俊璁板綍
- *
+ *
* @param smsRecords 鐭俊璁板綍
* @return 缁撴灉
*/
public int insertSmsRecords(SmsRecords smsRecords);
/**
+ * 鐭俊鍙戦��
+ *
+ * @param smsRecords
+ * @return
+ */
+ public Boolean sendSmsRecords(SmsRecords smsRecords);
+
+ /**
* 淇敼鐭俊璁板綍
- *
+ *
* @param smsRecords 鐭俊璁板綍
* @return 缁撴灉
*/
@@ -45,7 +53,7 @@
/**
* 鎵归噺鍒犻櫎鐭俊璁板綍
- *
+ *
* @param recordids 闇�瑕佸垹闄ょ殑鐭俊璁板綍涓婚敭闆嗗悎
* @return 缁撴灉
*/
@@ -53,7 +61,7 @@
/**
* 鍒犻櫎鐭俊璁板綍淇℃伅
- *
+ *
* @param recordid 鐭俊璁板綍涓婚敭
* @return 缁撴灉
*/
diff --git a/smartor/src/main/java/com/smartor/service/ISmsTempletService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISmsTempletService.java
similarity index 87%
rename from smartor/src/main/java/com/smartor/service/ISmsTempletService.java
rename to ruoyi-system/src/main/java/com/ruoyi/system/service/ISmsTempletService.java
index 55059d4..4d5e12b 100644
--- a/smartor/src/main/java/com/smartor/service/ISmsTempletService.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISmsTempletService.java
@@ -1,19 +1,19 @@
-package com.smartor.service;
+package com.ruoyi.system.service;
import java.util.List;
-import com.smartor.domain.SmsTemplet;
+import com.ruoyi.system.domain.SmsTemplet;
/**
* 鐭俊妯℃澘Service鎺ュ彛
- *
+ *
* @author smartor
* @date 2023-03-06
*/
-public interface ISmsTempletService
+public interface ISmsTempletService
{
/**
* 鏌ヨ鐭俊妯℃澘
- *
+ *
* @param templetid 鐭俊妯℃澘涓婚敭
* @return 鐭俊妯℃澘
*/
@@ -21,7 +21,7 @@
/**
* 鏌ヨ鐭俊妯℃澘鍒楄〃
- *
+ *
* @param smsTemplet 鐭俊妯℃澘
* @return 鐭俊妯℃澘闆嗗悎
*/
@@ -29,7 +29,7 @@
/**
* 鏂板鐭俊妯℃澘
- *
+ *
* @param smsTemplet 鐭俊妯℃澘
* @return 缁撴灉
*/
@@ -37,7 +37,7 @@
/**
* 淇敼鐭俊妯℃澘
- *
+ *
* @param smsTemplet 鐭俊妯℃澘
* @return 缁撴灉
*/
@@ -45,7 +45,7 @@
/**
* 鎵归噺鍒犻櫎鐭俊妯℃澘
- *
+ *
* @param templetids 闇�瑕佸垹闄ょ殑鐭俊妯℃澘涓婚敭闆嗗悎
* @return 缁撴灉
*/
@@ -53,7 +53,7 @@
/**
* 鍒犻櫎鐭俊妯℃澘淇℃伅
- *
+ *
* @param templetid 鐭俊妯℃澘涓婚敭
* @return 缁撴灉
*/
diff --git a/smartor/src/main/java/com/smartor/service/impl/SmsParamServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SmsParamServiceImpl.java
similarity index 94%
rename from smartor/src/main/java/com/smartor/service/impl/SmsParamServiceImpl.java
rename to ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SmsParamServiceImpl.java
index 8da6b44..aa70c84 100644
--- a/smartor/src/main/java/com/smartor/service/impl/SmsParamServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SmsParamServiceImpl.java
@@ -1,11 +1,11 @@
-package com.smartor.service.impl;
+package com.ruoyi.system.service.impl;
import WebServiceClient.MessagingInsertLocator;
import WebServiceClient.MessagingInsertSoap12Stub;
import com.ruoyi.common.utils.DateUtils;
-import com.smartor.domain.SmsParam;
-import com.smartor.mapper.SmsParamMapper;
-import com.smartor.service.ISmsParamService;
+import com.ruoyi.system.domain.SmsParam;
+import com.ruoyi.system.mapper.SmsParamMapper;
+import com.ruoyi.system.service.ISmsParamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SmsRecordsServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SmsRecordsServiceImpl.java
new file mode 100644
index 0000000..7d59715
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SmsRecordsServiceImpl.java
@@ -0,0 +1,207 @@
+package com.ruoyi.system.service.impl;
+
+import java.io.IOException;
+import java.sql.Date;
+import java.time.LocalDate;
+import java.util.Arrays;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.alibaba.fastjson2.JSONObject;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.gson.Gson;
+import com.ruoyi.common.enums.MsgLSEnum;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.OkHttpExample;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.system.service.ISysConfigService;
+import com.smartor.common.LSHospTokenUtil;
+import com.smartor.domain.ServiceSubtask;
+import com.smartor.mapper.ServiceSubtaskMapper;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.ObjectUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.system.mapper.SmsRecordsMapper;
+import com.ruoyi.system.domain.SmsRecords;
+import com.ruoyi.system.service.ISmsRecordsService;
+
+/**
+ * 鐭俊璁板綍Service涓氬姟灞傚鐞�
+ *
+ * @author smartor
+ * @date 2023-03-06
+ */
+@Slf4j
+@Service
+public class SmsRecordsServiceImpl implements ISmsRecordsService {
+ @Autowired
+ private SmsRecordsMapper smsRecordsMapper;
+
+ @Autowired
+ private ISysConfigService iSysConfigService;
+
+ @Autowired
+ private ServiceSubtaskMapper serviceSubtaskMapper;
+
+ /**
+ * 鏌ヨ鐭俊璁板綍
+ *
+ * @param recordid 鐭俊璁板綍涓婚敭
+ * @return 鐭俊璁板綍
+ */
+ @Override
+ public SmsRecords selectSmsRecordsByRecordid(Long recordid) {
+ return smsRecordsMapper.selectSmsRecordsByRecordid(recordid);
+ }
+
+ /**
+ * 鏌ヨ鐭俊璁板綍鍒楄〃
+ *
+ * @param smsRecords 鐭俊璁板綍
+ * @return 鐭俊璁板綍
+ */
+ @Override
+ public List<SmsRecords> selectSmsRecordsList(SmsRecords smsRecords) {
+ return smsRecordsMapper.selectSmsRecordsList(smsRecords);
+ }
+
+ /**
+ * 鏂板鐭俊璁板綍
+ *
+ * @param smsRecords 鐭俊璁板綍
+ * @return 缁撴灉
+ */
+ @Override
+ public int insertSmsRecords(SmsRecords smsRecords) {
+ smsRecords.setCreateTime(DateUtils.getNowDate());
+ return smsRecordsMapper.insertSmsRecords(smsRecords);
+ }
+
+ /**
+ * 鏂板鐭俊璁板綍
+ *
+ * @param smsRecords 鐭俊璁板綍
+ * @return 缁撴灉
+ */
+ @Override
+ public Boolean sendSmsRecords(SmsRecords smsRecords) {
+ //鑾峰彇閫氱煡鐭俊鎻愬墠"鍑犲ぉ"鍙戦��
+ Integer days = 0;
+ String noticeSmsBeforeSend = iSysConfigService.selectConfigByKey("notice_sms_before_send");
+ //鑾峰彇鍖婚櫌鏈烘瀯ID
+ String hospOrgid = iSysConfigService.selectConfigByKey("hosp_orgid");
+ if (StringUtils.isNotEmpty(noticeSmsBeforeSend)) days = Integer.valueOf(noticeSmsBeforeSend);
+
+ //閫氳繃褰撳墠鏃ユ湡锛屽姞涓婃彁鍓嶇殑澶╂暟锛岃幏鍙栬
+ LocalDate newDate = LocalDate.now().plusDays(days);
+ Date date = Date.valueOf(newDate);
+ smsRecords.setVisitTime(date);
+
+ List<String> orgidList = null;
+ if (StringUtils.isNotEmpty(hospOrgid)) {
+ orgidList = Arrays.asList(hospOrgid.split(","));
+ smsRecords.setOrgidList(orgidList);
+ }
+ List<SmsRecords> selectSmsRecordsList = smsRecordsMapper.selectSmsRecordsList(smsRecords);
+ for (SmsRecords record : selectSmsRecordsList) {
+ Boolean aBoolean = sendSMS(record.getOrgid(), record.getPhone(), record.getMsg());
+ ServiceSubtask serviceSubtask = new ServiceSubtask();
+ serviceSubtask.setId(record.getSubId());
+ if (aBoolean) serviceSubtask.setVisitNotice(1);
+ serviceSubtaskMapper.updateServiceSubtask(serviceSubtask);
+ }
+
+ return true;
+ }
+
+
+ public Boolean sendSMS(String orgid, String phone, String content) {
+ //涓芥按鐨勭煭淇″彂閫佹柟寮�
+ Boolean isSuccess = false;
+ try {
+ Map<String, String> map = MsgLSEnum.getAddressByCode(orgid);
+ String token = LSHospTokenUtil.getToken(orgid);
+ log.info("銆恠fHandlle銆戜附姘寸煭淇″彂閫侊紝鍦板潃锛歿}锛屽弬鏁帮細{}锛屾満鏋処D锛歿}", map.get("address"), orgid);
+ String dxCode = getDXCode(map.get("address"), phone, content, map.get("sendPersonId"), map.get("sendPersonName"), MsgLSEnum.getHeaderByCode(orgid), token);
+ log.info("銆恠fHandlle銆戜附姘寸煭淇″彂閫佺粨鏋滐細{}", dxCode);
+ ObjectMapper objectMapper = new ObjectMapper();
+ Map<String, Object> textParam = null;
+ textParam = objectMapper.readValue(dxCode, Map.class);
+ String code = textParam.get("Code").toString();
+ if (code.equals("0")) {
+ isSuccess = true;
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return isSuccess;
+ }
+
+ /**
+ * 淇敼鐭俊璁板綍
+ *
+ * @param smsRecords 鐭俊璁板綍
+ * @return 缁撴灉
+ */
+ @Override
+ public int updateSmsRecords(SmsRecords smsRecords) {
+ smsRecords.setUpdateTime(DateUtils.getNowDate());
+ return smsRecordsMapper.updateSmsRecords(smsRecords);
+ }
+
+ /**
+ * 鎵归噺鍒犻櫎鐭俊璁板綍
+ *
+ * @param recordids 闇�瑕佸垹闄ょ殑鐭俊璁板綍涓婚敭
+ * @return 缁撴灉
+ */
+ @Override
+ public int deleteSmsRecordsByRecordids(Long[] recordids) {
+ return smsRecordsMapper.deleteSmsRecordsByRecordids(recordids);
+ }
+
+ /**
+ * 鍒犻櫎鐭俊璁板綍淇℃伅
+ *
+ * @param recordid 鐭俊璁板綍涓婚敭
+ * @return 缁撴灉
+ */
+ @Override
+ public int deleteSmsRecordsByRecordid(Long recordid) {
+ return smsRecordsMapper.deleteSmsRecordsByRecordid(recordid);
+ }
+
+
+ private String getDXCode(String address, String ShouJiHM, String FaSongNR, String FaSongRID, String FaSongRXM, Map<String, Object> headerMap, String token) {
+ Map<String, Object> map = new LinkedHashMap<>();
+
+ Map<String, Object> YeWuXX = new LinkedHashMap<>();
+ Map<String, Object> DuanXinXX = new LinkedHashMap<>();
+ DuanXinXX.put("ShouJiHM", ShouJiHM);
+ DuanXinXX.put("FaSongNR", FaSongNR);
+ DuanXinXX.put("FaSongRID", FaSongRID);
+ DuanXinXX.put("FaSongRXM", FaSongRXM);
+ YeWuXX.put("DuanXinXX", DuanXinXX);
+
+ map.put("XiaoXiTou", headerMap);
+ map.put("YeWuXX", YeWuXX);
+
+ String body = new Gson().toJson(map);
+
+// String result = HttpUtils.sendPost(address, body);
+ String result = null;
+ try {
+ result = OkHttpExample.sendPostRequest(address, body, token);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ log.info("銆恎etDXCode銆戠煭淇″彂閫佺粨鏋滐細{}", result);
+
+ JSONObject jsonObject = JSONObject.parseObject(result);
+ String code = (String) jsonObject.toString();
+ return code;
+ }
+}
diff --git a/smartor/src/main/java/com/smartor/service/impl/SmsTempletServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SmsTempletServiceImpl.java
similarity index 89%
rename from smartor/src/main/java/com/smartor/service/impl/SmsTempletServiceImpl.java
rename to ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SmsTempletServiceImpl.java
index dd05e90..d070d37 100644
--- a/smartor/src/main/java/com/smartor/service/impl/SmsTempletServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SmsTempletServiceImpl.java
@@ -1,28 +1,28 @@
-package com.smartor.service.impl;
+package com.ruoyi.system.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
-import com.smartor.mapper.SmsTempletMapper;
-import com.smartor.domain.SmsTemplet;
-import com.smartor.service.ISmsTempletService;
+import com.ruoyi.system.mapper.SmsTempletMapper;
+import com.ruoyi.system.domain.SmsTemplet;
+import com.ruoyi.system.service.ISmsTempletService;
/**
* 鐭俊妯℃澘Service涓氬姟灞傚鐞�
- *
+ *
* @author smartor
* @date 2023-03-06
*/
@Service
-public class SmsTempletServiceImpl implements ISmsTempletService
+public class SmsTempletServiceImpl implements ISmsTempletService
{
@Autowired
private SmsTempletMapper smsTempletMapper;
/**
* 鏌ヨ鐭俊妯℃澘
- *
+ *
* @param templetid 鐭俊妯℃澘涓婚敭
* @return 鐭俊妯℃澘
*/
@@ -34,7 +34,7 @@
/**
* 鏌ヨ鐭俊妯℃澘鍒楄〃
- *
+ *
* @param smsTemplet 鐭俊妯℃澘
* @return 鐭俊妯℃澘
*/
@@ -46,7 +46,7 @@
/**
* 鏂板鐭俊妯℃澘
- *
+ *
* @param smsTemplet 鐭俊妯℃澘
* @return 缁撴灉
*/
@@ -59,7 +59,7 @@
/**
* 淇敼鐭俊妯℃澘
- *
+ *
* @param smsTemplet 鐭俊妯℃澘
* @return 缁撴灉
*/
@@ -72,7 +72,7 @@
/**
* 鎵归噺鍒犻櫎鐭俊妯℃澘
- *
+ *
* @param templetids 闇�瑕佸垹闄ょ殑鐭俊妯℃澘涓婚敭
* @return 缁撴灉
*/
@@ -84,7 +84,7 @@
/**
* 鍒犻櫎鐭俊妯℃澘淇℃伅
- *
+ *
* @param templetid 鐭俊妯℃澘涓婚敭
* @return 缁撴灉
*/
diff --git a/smartor/src/main/resources/mapper/smartor/SmsParamMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SmsParamMapper.xml
similarity index 98%
rename from smartor/src/main/resources/mapper/smartor/SmsParamMapper.xml
rename to ruoyi-system/src/main/resources/mapper/system/SmsParamMapper.xml
index 70ed15f..76df18d 100644
--- a/smartor/src/main/resources/mapper/smartor/SmsParamMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SmsParamMapper.xml
@@ -2,7 +2,7 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.smartor.mapper.SmsParamMapper">
+<mapper namespace="com.ruoyi.system.mapper.SmsParamMapper">
<resultMap type="SmsParam" id="SmsParamResult">
<result property="paramid" column="paramid" />
diff --git a/ruoyi-system/src/main/resources/mapper/system/SmsRecordsMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SmsRecordsMapper.xml
new file mode 100644
index 0000000..5d54eff
--- /dev/null
+++ b/ruoyi-system/src/main/resources/mapper/system/SmsRecordsMapper.xml
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.system.mapper.SmsRecordsMapper">
+
+ <resultMap type="com.ruoyi.system.domain.SmsRecords" id="SmsRecordsResult">
+ <result property="recordid" column="recordid"/>
+ <result property="userid" column="userid"/>
+ <result property="username" column="username"/>
+ <result property="phone" column="phone"/>
+ <result property="msgno" column="msgno"/>
+ <result property="msg" column="msg"/>
+ <result property="inserttime" column="inserttime"/>
+ <result property="sendtime" column="sendtime"/>
+ <result property="sendfailedcount" column="sendfailedcount"/>
+ <result property="resulttime" column="resulttime"/>
+ <result property="resultmsg" column="resultmsg"/>
+ <result property="sendstate" column="sendstate"/>
+ <result property="inserttype" column="inserttype"/>
+ <result property="insertsystem" column="insertsystem"/>
+ <result property="insertmodule" column="insertmodule"/>
+ <result property="moduleid" column="moduleid"/>
+ <result property="msgidentify" column="msgidentify"/>
+ <result property="accountid" column="accountid"/>
+ <result property="orgid" column="orgid"/>
+ <result property="delFlag" column="del_flag"/>
+ <result property="updateBy" column="update_by"/>
+ <result property="updateTime" column="update_time"/>
+ <result property="createBy" column="create_by"/>
+ <result property="createTime" column="create_time"/>
+ <result property="isupload" column="isupload"/>
+ <result property="uploadTime" column="upload_time"/>
+ <result property="guid" column="guid"/>
+ <result property="visitTime" column="visit_time"/>
+ </resultMap>
+
+ <sql id="selectSmsRecordsVo">
+ select recordid,
+ userid,
+ guid,
+ username,
+ phone,
+ msgno,
+ msg,
+ inserttime,
+ sendtime,
+ sendfailedcount,
+ resulttime,
+ resultmsg,
+ sendstate,
+ inserttype,
+ insertsystem,
+ insertmodule,
+ moduleid,
+ msgidentify,
+ accountid,
+ orgid,
+ del_flag,
+ update_by,
+ update_time,
+ create_by,
+ create_time,
+ isupload,
+ visit_time,
+ upload_time
+ from sms_records
+ </sql>
+
+ <select id="selectSmsRecordsList" parameterType="com.ruoyi.system.domain.SmsRecords" resultMap="SmsRecordsResult">
+ <include refid="selectSmsRecordsVo"/>
+ <where>
+ del_flag=0
+ <if test="userid != null and userid != ''">and userid = #{userid}</if>
+ <if test="username != null and username != ''">and username like concat('%', #{username}, '%')</if>
+ <if test="phone != null and phone != ''">and phone = #{phone}</if>
+ <if test="msgno != null and msgno != ''">and msgno = #{msgno}</if>
+ <if test="msg != null and msg != ''">and msg = #{msg}</if>
+ <if test="inserttime != null ">and inserttime = #{inserttime}</if>
+ <if test="sendtime != null ">and sendtime = #{sendtime}</if>
+ <if test="sendfailedcount != null ">and sendfailedcount = #{sendfailedcount}</if>
+ <if test="resulttime != null ">and resulttime = #{resulttime}</if>
+ <if test="resultmsg != null and resultmsg != ''">and resultmsg = #{resultmsg}</if>
+ <if test="sendstate != null ">and sendstate = #{sendstate}</if>
+ <if test="inserttype != null ">and inserttype = #{inserttype}</if>
+ <if test="insertsystem != null ">and insertsystem = #{insertsystem}</if>
+ <if test="insertmodule != null and insertmodule != ''">and insertmodule = #{insertmodule}</if>
+ <if test="moduleid != null and moduleid != ''">and moduleid = #{moduleid}</if>
+ <if test="msgidentify != null and msgidentify != ''">and msgidentify = #{msgidentify}</if>
+ <if test="accountid != null ">and accountid = #{accountid}</if>
+ <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if>
+ <if test="isupload != null ">and isupload = #{isupload}</if>
+ <if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
+ <if test="visitTime != null ">and date_format(visit_time,'%y%m%d') =
+ date_format(#{visitTime},'%y%m%d')
+ </if>
+ </where>
+ </select>
+
+ <select id="selectSmsRecordsByRecordid" parameterType="Long" resultMap="SmsRecordsResult">
+ <include refid="selectSmsRecordsVo"/>
+ where del_flag=0 and recordid = #{recordid}
+ </select>
+
+ <insert id="insertSmsRecords" parameterType="com.ruoyi.system.domain.SmsRecords">
+ insert into sms_records
+ <trim prefix="(" suffix=")" suffixOverrides=",">
+ <if test="recordid != null">recordid,</if>
+ <if test="userid != null">userid,</if>
+ <if test="username != null">username,</if>
+ <if test="phone != null">phone,</if>
+ <if test="msgno != null">msgno,</if>
+ <if test="msg != null">msg,</if>
+ <if test="inserttime != null">inserttime,</if>
+ <if test="sendtime != null">sendtime,</if>
+ <if test="sendfailedcount != null">sendfailedcount,</if>
+ <if test="resulttime != null">resulttime,</if>
+ <if test="resultmsg != null">resultmsg,</if>
+ <if test="sendstate != null">sendstate,</if>
+ <if test="inserttype != null">inserttype,</if>
+ <if test="insertsystem != null">insertsystem,</if>
+ <if test="insertmodule != null">insertmodule,</if>
+ <if test="moduleid != null">moduleid,</if>
+ <if test="msgidentify != null">msgidentify,</if>
+ <if test="accountid != null">accountid,</if>
+ <if test="orgid != null">orgid,</if>
+ <if test="delFlag != null">del_flag,</if>
+ <if test="updateBy != null">update_by,</if>
+ <if test="updateTime != null">update_time,</if>
+ <if test="createBy != null">create_by,</if>
+ <if test="createTime != null">create_time,</if>
+ <if test="isupload != null">isupload,</if>
+ <if test="uploadTime != null">upload_time,</if>
+ <if test="guid != null">guid,</if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
+ <if test="recordid != null">#{recordid},</if>
+ <if test="userid != null">#{userid},</if>
+ <if test="username != null">#{username},</if>
+ <if test="phone != null">#{phone},</if>
+ <if test="msgno != null">#{msgno},</if>
+ <if test="msg != null">#{msg},</if>
+ <if test="inserttime != null">#{inserttime},</if>
+ <if test="sendtime != null">#{sendtime},</if>
+ <if test="sendfailedcount != null">#{sendfailedcount},</if>
+ <if test="resulttime != null">#{resulttime},</if>
+ <if test="resultmsg != null">#{resultmsg},</if>
+ <if test="sendstate != null">#{sendstate},</if>
+ <if test="inserttype != null">#{inserttype},</if>
+ <if test="insertsystem != null">#{insertsystem},</if>
+ <if test="insertmodule != null">#{insertmodule},</if>
+ <if test="moduleid != null">#{moduleid},</if>
+ <if test="msgidentify != null">#{msgidentify},</if>
+ <if test="accountid != null">#{accountid},</if>
+ <if test="orgid != null">#{orgid},</if>
+ <if test="delFlag != null">#{delFlag},</if>
+ <if test="updateBy != null">#{updateBy},</if>
+ <if test="updateTime != null">#{updateTime},</if>
+ <if test="createBy != null">#{createBy},</if>
+ <if test="createTime != null">#{createTime},</if>
+ <if test="isupload != null">#{isupload},</if>
+ <if test="uploadTime != null">#{uploadTime},</if>
+ <if test="guid != null">#{guid},</if>
+ </trim>
+ </insert>
+
+ <update id="updateSmsRecords" parameterType="com.ruoyi.system.domain.SmsRecords">
+ update sms_records
+ <trim prefix="SET" suffixOverrides=",">
+ <if test="userid != null">userid = #{userid},</if>
+ <if test="username != null">username = #{username},</if>
+ <if test="phone != null">phone = #{phone},</if>
+ <if test="msgno != null">msgno = #{msgno},</if>
+ <if test="msg != null">msg = #{msg},</if>
+ <if test="inserttime != null">inserttime = #{inserttime},</if>
+ <if test="sendtime != null">sendtime = #{sendtime},</if>
+ <if test="sendfailedcount != null">sendfailedcount = #{sendfailedcount},</if>
+ <if test="resulttime != null">resulttime = #{resulttime},</if>
+ <if test="resultmsg != null">resultmsg = #{resultmsg},</if>
+ <if test="sendstate != null">sendstate = #{sendstate},</if>
+ <if test="inserttype != null">inserttype = #{inserttype},</if>
+ <if test="insertsystem != null">insertsystem = #{insertsystem},</if>
+ <if test="insertmodule != null">insertmodule = #{insertmodule},</if>
+ <if test="moduleid != null">moduleid = #{moduleid},</if>
+ <if test="msgidentify != null">msgidentify = #{msgidentify},</if>
+ <if test="accountid != null">accountid = #{accountid},</if>
+ <if test="orgid != null">orgid = #{orgid},</if>
+ <if test="delFlag != null">del_flag = #{delFlag},</if>
+ <if test="updateBy != null">update_by = #{updateBy},</if>
+ <if test="updateTime != null">update_time = #{updateTime},</if>
+ <if test="createBy != null">create_by = #{createBy},</if>
+ <if test="createTime != null">create_time = #{createTime},</if>
+ <if test="isupload != null">isupload = #{isupload},</if>
+ <if test="uploadTime != null">upload_time = #{uploadTime},</if>
+ <if test="guid != null">guid = #{guid},</if>
+ </trim>
+ where recordid = #{recordid}
+ </update>
+
+ <delete id="deleteSmsRecordsByRecordid" parameterType="Long">
+ delete
+ from sms_records
+ where recordid = #{recordid}
+ </delete>
+
+ <delete id="deleteSmsRecordsByRecordids" parameterType="String">
+ delete from sms_records where recordid in
+ <foreach item="recordid" collection="array" open="(" separator="," close=")">
+ #{recordid}
+ </foreach>
+ </delete>
+</mapper>
diff --git a/smartor/src/main/resources/mapper/smartor/SmsTempletMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SmsTempletMapper.xml
similarity index 98%
rename from smartor/src/main/resources/mapper/smartor/SmsTempletMapper.xml
rename to ruoyi-system/src/main/resources/mapper/system/SmsTempletMapper.xml
index 339695d..7d3e789 100644
--- a/smartor/src/main/resources/mapper/smartor/SmsTempletMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SmsTempletMapper.xml
@@ -2,7 +2,7 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.smartor.mapper.SmsTempletMapper">
+<mapper namespace="com.ruoyi.system.mapper.SmsTempletMapper">
<resultMap type="SmsTemplet" id="SmsTempletResult">
<result property="templetid" column="templetid" />
diff --git a/smartor/src/main/java/com/smartor/domain/IvrLibaTemplateScript.java b/smartor/src/main/java/com/smartor/domain/IvrLibaTemplateScript.java
index eb5dc3b..fbe550c 100644
--- a/smartor/src/main/java/com/smartor/domain/IvrLibaTemplateScript.java
+++ b/smartor/src/main/java/com/smartor/domain/IvrLibaTemplateScript.java
@@ -280,7 +280,7 @@
* 搴忓彿
*/
@ApiModelProperty(value = "搴忓彿")
- private Integer sort;
+ private Long sort;
/**
diff --git a/smartor/src/main/java/com/smartor/domain/IvrLibaTemplateScriptVO.java b/smartor/src/main/java/com/smartor/domain/IvrLibaTemplateScriptVO.java
index 7615f0c..4bfbb67 100644
--- a/smartor/src/main/java/com/smartor/domain/IvrLibaTemplateScriptVO.java
+++ b/smartor/src/main/java/com/smartor/domain/IvrLibaTemplateScriptVO.java
@@ -283,7 +283,7 @@
* 搴忓彿
*/
@ApiModelProperty(value = "搴忓彿")
- private Integer sort;
+ private Long sort;
// /**
// * 鍩虹鎸囨爣绫诲瀷
diff --git a/smartor/src/main/java/com/smartor/domain/PatMedInhosp.java b/smartor/src/main/java/com/smartor/domain/PatMedInhosp.java
index c108280..94f4791 100644
--- a/smartor/src/main/java/com/smartor/domain/PatMedInhosp.java
+++ b/smartor/src/main/java/com/smartor/domain/PatMedInhosp.java
@@ -327,6 +327,18 @@
*/
@ApiModelProperty("pageSize")
private Integer pageSize;
+
+ /**
+ * pageNum
+ */
+ @ApiModelProperty("pn")
+ private Integer pn;
+
+ /**
+ * pageSize
+ */
+ @ApiModelProperty("ps")
+ private Integer ps;
/**
* 鍑洪櫌鏂瑰紡搴忓彿
*/
diff --git a/smartor/src/main/java/com/smartor/domain/PatSatisfaction.java b/smartor/src/main/java/com/smartor/domain/PatSatisfaction.java
index a51537e..f2ec591 100644
--- a/smartor/src/main/java/com/smartor/domain/PatSatisfaction.java
+++ b/smartor/src/main/java/com/smartor/domain/PatSatisfaction.java
@@ -28,49 +28,49 @@
* $column.columnComment
*/
@ApiModelProperty("鎮h�呭鍚�")
- @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+ @Excel(name = "鎮h�呭鍚�")
private String patName;
/**
* $column.columnComment
*/
@ApiModelProperty("鎮h�呯紪鐮�")
- @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+ @Excel(name = "鎮h�呯紪鐮�")
private String patCode;
/**
* $column.columnComment
*/
@ApiModelProperty("鎵嬫満鍙�")
- @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+ @Excel(name = "鎵嬫満鍙�")
private String phone;
/**
* $column.columnComment
*/
@ApiModelProperty("鐥呭尯鍚嶇О")
- @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+ @Excel(name = "鐥呭尯鍚嶇О")
private String hospitaldistrictname;
/**
* $column.columnComment
*/
@ApiModelProperty("鐥呭尯缂栫爜")
- @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+ @Excel(name = "鐥呭尯缂栫爜")
private String hospitaldistrictcode;
/**
* $column.columnComment
*/
@ApiModelProperty("閮ㄩ棬鍚嶇О")
- @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+ @Excel(name = "閮ㄩ棬鍚嶇О")
private String deptname;
/**
* 閮ㄩ棬缂栫爜
*/
@ApiModelProperty("閮ㄩ棬缂栫爜")
- @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+ @Excel(name = "閮ㄩ棬缂栫爜")
private String deptcode;
/**
@@ -126,10 +126,11 @@
* $column.columnComment
*/
@ApiModelProperty("鎶ゅ+婊℃剰搴�")
- @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+ @Excel(name = "鎶ゅ+婊℃剰搴�")
private double nurseSatisfaction;
@ApiModelProperty("鎬诲垎")
+ @Excel(name = "鎬诲垎")
private double total;
/**
diff --git a/smartor/src/main/java/com/smartor/domain/ServiceSubtask.java b/smartor/src/main/java/com/smartor/domain/ServiceSubtask.java
index 97c62ff..f21c3af 100644
--- a/smartor/src/main/java/com/smartor/domain/ServiceSubtask.java
+++ b/smartor/src/main/java/com/smartor/domain/ServiceSubtask.java
@@ -76,12 +76,14 @@
* 鍑洪櫌鏃堕棿
*/
@ApiModelProperty(value = "鍑洪櫌鏃堕棿")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date endtime;
/**
* 鍏ラ櫌鏃堕棿
*/
@ApiModelProperty(value = "鍏ラ櫌鏃堕棿")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date starttime;
/**
@@ -573,6 +575,12 @@
private Integer visitCount;
/**
+ * 澶嶈瘖閫氱煡锛�0宸查�氱煡 1鏈�氱煡
+ */
+ @ApiModelProperty(value = "澶嶈瘖閫氱煡锛�0宸查�氱煡 1鏈�氱煡")
+ private Integer visitNotice;
+
+ /**
* 鏄惁鍦ㄦ闅忚锛�1鍚� 2鏄�
*/
@ApiModelProperty(value = "鏄惁鍦ㄦ闅忚锛�1鏄� 2鍚�")
@@ -585,6 +593,7 @@
private Integer upid;
@ApiModelProperty(value = "闅忚鏃堕棿")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date visitTime;
/**
@@ -592,7 +601,6 @@
*/
@ApiModelProperty(value = "闅忚鏂瑰紡")
private String visitType;
-
@ApiModelProperty(value = "闅忚閮ㄩ棬缂栫爜")
@@ -603,4 +611,18 @@
@ApiModelProperty(value = "闅忚閮ㄩ棬缂栫爜闆嗗悎")
private List<String> visitDeptCodes;
+
+ /**
+ * pageNum
+ */
+ @Excel(name = "pn")
+ @ApiModelProperty(value = "pn")
+ private Integer pn;
+
+ /**
+ * pageSize
+ */
+ @Excel(name = "ps")
+ @ApiModelProperty(value = "ps")
+ private Integer ps;
}
diff --git a/smartor/src/main/java/com/smartor/domain/ServiceSubtaskStatistic.java b/smartor/src/main/java/com/smartor/domain/ServiceSubtaskStatistic.java
index 1ae34c6..b185332 100644
--- a/smartor/src/main/java/com/smartor/domain/ServiceSubtaskStatistic.java
+++ b/smartor/src/main/java/com/smartor/domain/ServiceSubtaskStatistic.java
@@ -17,36 +17,28 @@
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "鏈嶅姟鎬婚噺")
- @Excel(name = " 鏈嶅姟鎬婚噺 ")
private Integer serviceCount = 0;
@ApiModelProperty(value = "鎮h�呰繃婊ら噺锛堜笉鎵ц鏁伴噺锛�")
- @Excel(name = " 鎮h�呰繃婊ら噺 ")
private Long bzxCount = 0L;
@ApiModelProperty(value = "搴旈殢璁块噺")
- @Excel(name = " 搴旈殢璁块噺 ")
private Long ysfCount = 0L;
@ApiModelProperty(value = "鍙戦�佸け璐ヨ閲�")
- @Excel(name = " 鍙戦�佸け璐� ")
private Long fssbCount = 0L;
@ApiModelProperty(value = "寰呭彂閫佹暟閲�")
- @Excel(name = " 寰呭彂閫� ")
private Long dfsCount = 0L;
@ApiModelProperty(value = "宸插彂閫佹暟閲�")
- @Excel(name = " 宸插彂閫� ")
private Long yfsCount = 0L;
@ApiModelProperty(value = "宸插畬鎴愭暟閲�")
- @Excel(name = " 宸插畬鎴� ")
private Long ywcCount = 0L;
@ApiModelProperty(value = "闅忚瀹屾垚鐜�")
- @Excel(name = " 闅忚瀹屾垚鐜� ")
private String sfwcl;
@ApiModelProperty(value = "鐭俊鍙戦�佹鏁�")
@@ -68,15 +60,17 @@
private Long dhsfwcl = 0L;
@ApiModelProperty(value = "寮傚父鎬绘暟")
- @Excel(name = " 寮傚父鎬绘暟 ")
private Long yczs = 0L;
@ApiModelProperty(value = "鍥炲寮傚父鏁�")
- @Excel(name = " 鍥炲寮傚父鏁� ")
private Long hfycs = 0L;
+ @ApiModelProperty(value = "鍙婃椂鐜�")
+ @Excel(name = " 鍙婃椂鐜� ")
+ private Double rate = 0.0;
+
/**
- * 06-04鏂扮粺璁¢〉闈㈠瓧娈�
+ * 06-04鏂扮粺璁¢〉闈㈠瓧娈�
*/
@ApiModelProperty(value = "鍑洪櫌鐥呭尯缂栧彿")
@@ -106,40 +100,72 @@
private Long followUpNeeded = 0L;
@ApiModelProperty(value = "棣栨搴旈殢璁�")
+ @Excel(name = " 棣栨搴旈殢璁� ")
private Long needFollowUp = 0L;
+
@ApiModelProperty(value = "棣栨寰呴殢璁�")
+ @Excel(name = " 棣栨寰呴殢璁� ")
private Long pendingFollowUp = 0L;
+
@ApiModelProperty(value = "棣栨闅忚鎴愬姛")
+ @Excel(name = " 棣栨闅忚鎴愬姛 ")
private Long followUpSuccess = 0L;
+
@ApiModelProperty(value = "棣栨闅忚澶辫触")
+ @Excel(name = " 棣栨闅忚澶辫触 ")
private Long followUpFail = 0L;
+
@ApiModelProperty(value = "棣栨闅忚鐜�")
+ @Excel(name = " 棣栨闅忚鐜� ")
private String followUpRate;
+
@ApiModelProperty(value = "棣栨浜哄伐")
+ @Excel(name = " 棣栨浜哄伐 ")
private Long manual = 0L;
+
@ApiModelProperty(value = "棣栨鐭俊")
+ @Excel(name = " 棣栨鐭俊 ")
private Long sms = 0L;
+
@ApiModelProperty(value = "棣栨寰俊")
+ @Excel(name = " 棣栨寰俊 ")
private Long weChat = 0L;
+
@ApiModelProperty(value = "缁撴灉寮傚父")
private Long abnormal = 0L;
@ApiModelProperty(value = "浜屾搴旈殢璁�")
+ @Excel(name = " 浜屾搴旈殢璁� ")
private Long needFollowUpAgain = 0L;
+
@ApiModelProperty(value = "浜屾寰呴殢璁�")
+ @Excel(name = " 浜屾寰呴殢璁� ")
private Long pendingFollowUpAgain = 0L;
+
@ApiModelProperty(value = "浜屾闅忚鎴愬姛")
+ @Excel(name = " 浜屾闅忚鎴愬姛 ")
private Long followUpSuccessAgain = 0L;
+
@ApiModelProperty(value = "浜屾闅忚澶辫触")
+ @Excel(name = " 浜屾闅忚澶辫触 ")
private Long followUpFailAgain = 0L;
+
@ApiModelProperty(value = "浜屾闅忚鐜�")
+ @Excel(name = " 浜屾闅忚鐜� ")
private String followUpRateAgain;
+
@ApiModelProperty(value = "浜屾浜哄伐")
+ @Excel(name = " 浜屾浜哄伐 ")
private Long manualAgain = 0L;
+
@ApiModelProperty(value = "浜屾鐭俊")
+ @Excel(name = " 浜屾鐭俊 ")
private Long smsAgain = 0L;
+
@ApiModelProperty(value = "浜屾寰俊")
+ @Excel(name = " 浜屾寰俊 ")
private Long weChatAgain = 0L;
+
@ApiModelProperty(value = "缁撴灉寮傚父")
private Long abnormalAgain = 0L;
diff --git a/smartor/src/main/java/com/smartor/domain/ServiceSubtaskVO.java b/smartor/src/main/java/com/smartor/domain/ServiceSubtaskVO.java
index 05abda3..d4486fd 100644
--- a/smartor/src/main/java/com/smartor/domain/ServiceSubtaskVO.java
+++ b/smartor/src/main/java/com/smartor/domain/ServiceSubtaskVO.java
@@ -42,6 +42,12 @@
private Integer visitCount;
/**
+ * 澶嶈瘖閫氱煡锛�0宸查�氱煡 1鏈�氱煡
+ */
+ @ApiModelProperty(value = "澶嶈瘖閫氱煡锛�0宸查�氱煡 1鏈�氱煡")
+ private Integer visitNotice;
+
+ /**
* 鏄惁鍦ㄦ闅忚锛�1鍚� 2鏄�
*/
@ApiModelProperty(value = "鏄惁鍦ㄦ闅忚锛�1鏄� 2鍚�")
@@ -603,12 +609,14 @@
* 鍑洪櫌鏃堕棿
*/
@ApiModelProperty(value = "鍑洪櫌鏃堕棿")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date endtime;
/**
* 鍏ラ櫌鏃堕棿
*/
@ApiModelProperty(value = "鍏ラ櫌鏃堕棿")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date starttime;
@@ -695,7 +703,7 @@
*/
@ApiModelProperty(value = "闅忚鏂瑰紡")
private String visitType;
-
+
@ApiModelProperty(value = "闅忚閮ㄩ棬缂栫爜")
private String visitDeptCode;
diff --git a/smartor/src/main/java/com/smartor/domain/SmsRecords.java b/smartor/src/main/java/com/smartor/domain/SmsRecords.java
deleted file mode 100644
index b07d505..0000000
--- a/smartor/src/main/java/com/smartor/domain/SmsRecords.java
+++ /dev/null
@@ -1,340 +0,0 @@
-package com.smartor.domain;
-
-import java.util.Date;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import com.ruoyi.common.annotation.Excel;
-import com.ruoyi.common.core.domain.BaseEntity;
-
-/**
- * 鐭俊璁板綍瀵硅薄 sms_records
- *
- * @author smartor
- * @date 2023-03-06
- */
-public class SmsRecords extends BaseEntity
-{
- private static final long serialVersionUID = 1L;
-
- /** $column.columnComment */
- private Long recordid;
-
- /** */
- @Excel(name = "")
- private String userid;
-
- /** */
- @Excel(name = "")
- private String username;
-
- /** */
- @Excel(name = "")
- private String phone;
-
- /** */
- @Excel(name = "")
- private String msgno;
-
- /** */
- @Excel(name = "")
- private String msg;
-
- /** */
- @JsonFormat(pattern = "yyyy-MM-dd")
- @Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd")
- private Date inserttime;
-
- /** */
- @JsonFormat(pattern = "yyyy-MM-dd")
- @Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd")
- private Date sendtime;
-
- /** */
- @Excel(name = "")
- private Long sendfailedcount;
-
- /** */
- @JsonFormat(pattern = "yyyy-MM-dd")
- @Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd")
- private Date resulttime;
-
- /** */
- @Excel(name = "")
- private String resultmsg;
-
- /** */
- @Excel(name = "")
- private Long sendstate;
-
- /** */
- @Excel(name = "")
- private Long inserttype;
-
- /** */
- @Excel(name = "")
- private Long insertsystem;
-
- /** */
- @Excel(name = "")
- private String insertmodule;
-
- /** */
- @Excel(name = "")
- private String moduleid;
-
- /** */
- @Excel(name = "")
- private String msgidentify;
-
- /** $column.columnComment */
- @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
- private Long accountid;
-
- /** $column.columnComment */
- @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
- private String orgid;
-
- /** */
- private String delFlag;
-
- /** */
- @Excel(name = "")
- private Long isupload;
-
- /** */
- @JsonFormat(pattern = "yyyy-MM-dd")
- @Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd")
- private Date uploadTime;
-
- public void setRecordid(Long recordid)
- {
- this.recordid = recordid;
- }
-
- public Long getRecordid()
- {
- return recordid;
- }
- public void setUserid(String userid)
- {
- this.userid = userid;
- }
-
- public String getUserid()
- {
- return userid;
- }
- public void setUsername(String username)
- {
- this.username = username;
- }
-
- public String getUsername()
- {
- return username;
- }
- public void setPhone(String phone)
- {
- this.phone = phone;
- }
-
- public String getPhone()
- {
- return phone;
- }
- public void setMsgno(String msgno)
- {
- this.msgno = msgno;
- }
-
- public String getMsgno()
- {
- return msgno;
- }
- public void setMsg(String msg)
- {
- this.msg = msg;
- }
-
- public String getMsg()
- {
- return msg;
- }
- public void setInserttime(Date inserttime)
- {
- this.inserttime = inserttime;
- }
-
- public Date getInserttime()
- {
- return inserttime;
- }
- public void setSendtime(Date sendtime)
- {
- this.sendtime = sendtime;
- }
-
- public Date getSendtime()
- {
- return sendtime;
- }
- public void setSendfailedcount(Long sendfailedcount)
- {
- this.sendfailedcount = sendfailedcount;
- }
-
- public Long getSendfailedcount()
- {
- return sendfailedcount;
- }
- public void setResulttime(Date resulttime)
- {
- this.resulttime = resulttime;
- }
-
- public Date getResulttime()
- {
- return resulttime;
- }
- public void setResultmsg(String resultmsg)
- {
- this.resultmsg = resultmsg;
- }
-
- public String getResultmsg()
- {
- return resultmsg;
- }
- public void setSendstate(Long sendstate)
- {
- this.sendstate = sendstate;
- }
-
- public Long getSendstate()
- {
- return sendstate;
- }
- public void setInserttype(Long inserttype)
- {
- this.inserttype = inserttype;
- }
-
- public Long getInserttype()
- {
- return inserttype;
- }
- public void setInsertsystem(Long insertsystem)
- {
- this.insertsystem = insertsystem;
- }
-
- public Long getInsertsystem()
- {
- return insertsystem;
- }
- public void setInsertmodule(String insertmodule)
- {
- this.insertmodule = insertmodule;
- }
-
- public String getInsertmodule()
- {
- return insertmodule;
- }
- public void setModuleid(String moduleid)
- {
- this.moduleid = moduleid;
- }
-
- public String getModuleid()
- {
- return moduleid;
- }
- public void setMsgidentify(String msgidentify)
- {
- this.msgidentify = msgidentify;
- }
-
- public String getMsgidentify()
- {
- return msgidentify;
- }
- public void setAccountid(Long accountid)
- {
- this.accountid = accountid;
- }
-
- public Long getAccountid()
- {
- return accountid;
- }
- public void setOrgid(String orgid)
- {
- this.orgid = orgid;
- }
-
- public String getOrgid()
- {
- return orgid;
- }
- public void setDelFlag(String delFlag)
- {
- this.delFlag = delFlag;
- }
-
- public String getDelFlag()
- {
- return delFlag;
- }
- public void setIsupload(Long isupload)
- {
- this.isupload = isupload;
- }
-
- public Long getIsupload()
- {
- return isupload;
- }
- public void setUploadTime(Date uploadTime)
- {
- this.uploadTime = uploadTime;
- }
-
- public Date getUploadTime()
- {
- return uploadTime;
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
- .append("recordid", getRecordid())
- .append("userid", getUserid())
- .append("username", getUsername())
- .append("phone", getPhone())
- .append("msgno", getMsgno())
- .append("msg", getMsg())
- .append("inserttime", getInserttime())
- .append("sendtime", getSendtime())
- .append("sendfailedcount", getSendfailedcount())
- .append("resulttime", getResulttime())
- .append("resultmsg", getResultmsg())
- .append("sendstate", getSendstate())
- .append("inserttype", getInserttype())
- .append("insertsystem", getInsertsystem())
- .append("insertmodule", getInsertmodule())
- .append("moduleid", getModuleid())
- .append("msgidentify", getMsgidentify())
- .append("accountid", getAccountid())
- .append("orgid", getOrgid())
- .append("delFlag", getDelFlag())
- .append("updateBy", getUpdateBy())
- .append("updateTime", getUpdateTime())
- .append("createBy", getCreateBy())
- .append("createTime", getCreateTime())
- .append("isupload", getIsupload())
- .append("uploadTime", getUploadTime())
- .toString();
- }
-}
diff --git a/smartor/src/main/java/com/smartor/mapper/HNGatherPatArchiveMapper.java b/smartor/src/main/java/com/smartor/mapper/HNGatherPatArchiveMapper.java
new file mode 100644
index 0000000..171fa9f
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/mapper/HNGatherPatArchiveMapper.java
@@ -0,0 +1,75 @@
+package com.smartor.mapper;
+
+import com.ruoyi.common.annotation.DataSource;
+import com.ruoyi.common.core.domain.entity.SysDept;
+import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.common.enums.DataSourceType;
+import com.smartor.domain.*;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * 娌冲崡閲囬泦鎮h�呬俊鎭疢apper鎺ュ彛
+ *
+ * @author smartor
+ * @date 2025-07-09
+ */
+@DataSource(value = DataSourceType.SLAVE)
+@Mapper
+public interface HNGatherPatArchiveMapper {
+
+ /**
+ * 鏌ヨ鎮h�呮。妗堝垪琛�
+ *
+ * @param patArchive 鎮h�呮。妗�
+ * @return 鎮h�呮。妗堥泦鍚�
+ */
+ public List<PatArchive> selectPatArchiveList(PatArchive patArchive);
+
+ /**
+ * 鍑哄叆闄俊鎭�
+ *
+ * @param patMedInhosp
+ * @return
+ */
+ public List<PatMedInhosp> selectPatMedInhospList(PatMedInhosp patMedInhosp);
+
+ public Long selectPatMedInhospListCount(PatMedInhosp patMedInhosp);
+
+ /**
+ * 闂ㄦ�ヨ瘖淇℃伅
+ *
+ * @param patMedOuthosp
+ * @return
+ */
+ public List<PatMedOuthosp> selectPatMedOuthospList(PatMedOuthosp patMedOuthosp);
+
+
+ /**
+ * /**
+ * 鏌ヨ鐤剧梾鍒楄〃
+ *
+ * @param icd10 鐤剧梾
+ * @return 鐤剧梾闆嗗悎
+ */
+ public List<Icd10> selectIcd10List(Icd10 icd10);
+
+ /**
+ * 鏍规嵁鏉′欢鍒嗛〉鏌ヨ鐢ㄦ埛鍒楄〃
+ *
+ * @param sysUser 鐢ㄦ埛淇℃伅
+ * @return 鐢ㄦ埛淇℃伅闆嗗悎淇℃伅
+ */
+ public List<SysUser> selectUserList(SysUser sysUser);
+
+ /**
+ * 鏌ヨ閮ㄩ棬绠$悊鏁版嵁
+ *
+ * @param dept 閮ㄩ棬淇℃伅
+ * @return 閮ㄩ棬淇℃伅闆嗗悎
+ */
+ public List<SysDept> selectDeptList(SysDept dept);
+
+
+}
diff --git a/smartor/src/main/java/com/smartor/mapper/PatMedInhospMapper.java b/smartor/src/main/java/com/smartor/mapper/PatMedInhospMapper.java
index acb6246..8f5b310 100644
--- a/smartor/src/main/java/com/smartor/mapper/PatMedInhospMapper.java
+++ b/smartor/src/main/java/com/smartor/mapper/PatMedInhospMapper.java
@@ -7,6 +7,7 @@
import com.smartor.domain.PatMedReq;
import com.smartor.domain.PatMedRes;
import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
/**
* 鎮h�呬綇闄㈣褰昅apper鎺ュ彛
@@ -44,6 +45,8 @@
*/
public int insertPatMedInhosp(PatMedInhosp patMedInhosp);
+ public int insertPatMedInhospBatch(@Param("list") List<PatMedInhosp> list);
+
/**
* 淇敼鎮h�呬綇闄㈣褰�
*
diff --git a/smartor/src/main/java/com/smartor/mapper/ServiceSubtaskMapper.java b/smartor/src/main/java/com/smartor/mapper/ServiceSubtaskMapper.java
index fc42015..a1c2dbf 100644
--- a/smartor/src/main/java/com/smartor/mapper/ServiceSubtaskMapper.java
+++ b/smartor/src/main/java/com/smartor/mapper/ServiceSubtaskMapper.java
@@ -45,11 +45,28 @@
public int insertServiceSubtask(ServiceSubtask ServiceSubtask);
/**
+ * 闅忚鍙婃椂鐜囷細搴旈殢璁挎椂闂�<瀹為檯闅忚鏃堕棿
+ *
+ * @param ServiceSubtask
+ * @return
+ */
+ public Double selectTimelyRate(ServiceSubtask ServiceSubtask);
+
+ /**
+ * 闅忚鍙婃椂鐜囪鎯�
+ *
+ * @param ServiceSubtask
+ * @return
+ */
+ public List<ServiceSubtask> selectTimelyRateDetail(ServiceSubtask ServiceSubtask);
+
+ /**
* 淇敼鍗曚竴浠诲姟锛堥殢璁匡級
*
* @return 缁撴灉
*/
public Boolean updateServiceSubtask(ServiceSubtask ServiceSubtask);
+
public Boolean updateServiceSubtaskByPatId(ServiceSubtask ServiceSubtask);
public Boolean updateServiceSubtaskByCondition(ServiceSubtask ServiceSubtask);
diff --git a/smartor/src/main/java/com/smartor/service/IHNGatherPatArchiveService.java b/smartor/src/main/java/com/smartor/service/IHNGatherPatArchiveService.java
new file mode 100644
index 0000000..44427b0
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/service/IHNGatherPatArchiveService.java
@@ -0,0 +1,67 @@
+package com.smartor.service;
+
+import com.ruoyi.common.core.domain.entity.SysDept;
+import com.ruoyi.common.core.domain.entity.SysUser;
+import com.smartor.domain.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.List;
+
+/**
+ * 娌冲崡閲囬泦鎮h�呬俊鎭帴鍙�
+ *
+ * @author smartor
+ * @date 2023-03-04
+ */
+public interface IHNGatherPatArchiveService {
+
+ /**
+ * 鏌ヨ鎮h�呮。妗堝垪琛�
+ *
+ * @param patArchive 鎮h�呮。妗�
+ * @return 鎮h�呮。妗堥泦鍚�
+ */
+ public List<PatArchive> selectPatArchiveList(PatArchive patArchive);
+
+ /**
+ * 鍑哄叆闄俊鎭�
+ *
+ * @param patMedInhosp
+ * @return
+ */
+ public Integer selectPatMedInhospList(PatMedInhosp patMedInhosp);
+
+ /**
+ * 闂ㄦ�ヨ瘖淇℃伅
+ *
+ * @param id
+ * @return
+ */
+ public Integer selectPatMedOuthospList(PatMedOuthosp patMedOuthosp);
+
+
+ /**
+ * 鏌ヨ鐤剧梾鍒楄〃
+ *
+ * @param icd10 鐤剧梾
+ * @return 鐤剧梾闆嗗悎
+ */
+ public Integer selectIcd10List(Icd10 icd10);
+
+ /**
+ * 鏍规嵁鏉′欢鍒嗛〉鏌ヨ鐢ㄦ埛鍒楄〃
+ *
+ * @param sysUser 鐢ㄦ埛淇℃伅
+ * @return 鐢ㄦ埛淇℃伅闆嗗悎淇℃伅
+ */
+ public Integer selectUserList(SysUser sysUser);
+
+ /**
+ * 鏌ヨ閮ㄩ棬绠$悊鏁版嵁
+ *
+ * @param dept 閮ㄩ棬淇℃伅
+ * @return 閮ㄩ棬淇℃伅闆嗗悎
+ */
+ public Integer selectDeptList(SysDept dept);
+
+}
diff --git a/smartor/src/main/java/com/smartor/service/IServiceTaskService.java b/smartor/src/main/java/com/smartor/service/IServiceTaskService.java
index 3f58d2e..703bb77 100644
--- a/smartor/src/main/java/com/smartor/service/IServiceTaskService.java
+++ b/smartor/src/main/java/com/smartor/service/IServiceTaskService.java
@@ -4,6 +4,7 @@
import java.util.Map;
import com.smartor.domain.IvrLibaTemplateScriptVO;
+import com.smartor.domain.ServiceSubtask;
import com.smartor.domain.ServiceTask;
import com.smartor.domain.SvyLibTemplateScriptVO;
@@ -65,6 +66,11 @@
public Boolean deleteServiceTaskByTaskid(Long taskid);
/**
+ * 鑾峰彇闅忚鍙婃椂鐜�
+ */
+ public Map<String, Object> selectTimelyRate(ServiceSubtask serviceSubtask);
+
+ /**
* @param taskid
* @param patid
* @return
diff --git a/smartor/src/main/java/com/smartor/service/impl/CommonTaskServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/CommonTaskServiceImpl.java
index 79d6259..54b30ff 100644
--- a/smartor/src/main/java/com/smartor/service/impl/CommonTaskServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/CommonTaskServiceImpl.java
@@ -10,9 +10,7 @@
import com.smartor.domain.*;
import com.smartor.mapper.ServiceSubtaskMapper;
import com.smartor.service.CommonTaskService;
-import com.smartor.service.IServiceSubtaskService;
import com.smartor.service.IServiceTaskService;
-import com.smartor.service.ISvyTaskService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
@@ -20,7 +18,6 @@
import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
-import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.concurrent.TimeUnit;
diff --git a/smartor/src/main/java/com/smartor/service/impl/HNGatherPatArchiveServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/HNGatherPatArchiveServiceImpl.java
new file mode 100644
index 0000000..8c42b45
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/service/impl/HNGatherPatArchiveServiceImpl.java
@@ -0,0 +1,121 @@
+package com.smartor.service.impl;
+
+import com.ruoyi.common.core.domain.entity.SysDept;
+import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.common.core.redis.RedisCache;
+import com.ruoyi.common.exception.base.BaseException;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.DtoConversionUtils;
+import com.ruoyi.common.utils.StringUtils;
+import com.smartor.domain.*;
+import com.smartor.mapper.*;
+import com.smartor.service.IHNGatherPatArchiveService;
+import com.smartor.service.IPatArchiveService;
+import com.smartor.service.IPatMedInhospService;
+import com.smartor.service.IPatMedPhysicalService;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.lang3.ObjectUtils;
+import org.apache.poi.hssf.usermodel.HSSFDateUtil;
+import org.apache.poi.ss.usermodel.DataFormatter;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.FileOutputStream;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.stream.Collectors;
+
+/**
+ * 鎮h�呮。妗圫ervice涓氬姟灞傚鐞�
+ *
+ * @author smartor
+ * @date 2023-03-04
+ */
+@Slf4j
+@Service
+public class HNGatherPatArchiveServiceImpl implements IHNGatherPatArchiveService {
+ @Autowired
+ private HNGatherPatArchiveMapper hnGatherPatArchiveMapper;
+
+ @Autowired
+ private SysUser2Mapper sysUser2Mapper;
+
+ @Autowired
+ private SysDept2Mapper sysDept2Mapper;
+
+ @Autowired
+ private Icd10Mapper icd10Mapper;
+
+ @Autowired
+ private PatMedOuthospMapper patMedOuthospMapper;
+
+ @Autowired
+ private PatMedInhospMapper patMedInhospMapper;
+
+
+ @Override
+ public List<PatArchive> selectPatArchiveList(PatArchive patArchive) {
+ return hnGatherPatArchiveMapper.selectPatArchiveList(patArchive);
+ }
+
+ @Override
+ public Integer selectPatMedInhospList(PatMedInhosp patMedInhosp) {
+ Long count = hnGatherPatArchiveMapper.selectPatMedInhospListCount(null);
+ Long aa = (count + 1000 - 1) / 1000;
+ //杩涜鍒嗛〉鏌ヨ
+ for (int i = 0; i <= aa; i++) {
+ patMedInhosp.setPs(1000);
+ patMedInhosp.setPn(1000 * i);
+ List<PatMedInhosp> patMedInhospList = hnGatherPatArchiveMapper.selectPatMedInhospList(patMedInhosp);
+ if (patMedInhospList != null && !patMedInhospList.isEmpty()) {
+ patMedInhospMapper.insertPatMedInhospBatch(patMedInhospList);
+ }
+ }
+
+ return null;
+ }
+
+ @Override
+ public Integer selectPatMedOuthospList(PatMedOuthosp patMedOuthosp) {
+ List<PatMedOuthosp> patMedOuthosps = hnGatherPatArchiveMapper.selectPatMedOuthospList(patMedOuthosp);
+ log.info("selectPatMedOuthospList鐨勯噰闆嗗埌鐨勬暟閲忎负锛歿}", patMedOuthosps.size());
+ int i = patMedOuthospMapper.batchPatMedOuthosp(patMedOuthosps);
+
+ return i;
+ }
+
+ @Override
+ public Integer selectIcd10List(Icd10 icd10) {
+ List<Icd10> icd10s = hnGatherPatArchiveMapper.selectIcd10List(icd10);
+ log.info("selectIcd10List鐨勯噰闆嗗埌鐨勬暟閲忎负锛歿}", icd10s.size());
+ int i = icd10Mapper.batchIcd10(icd10s);
+ return i;
+ }
+
+ @Override
+ public Integer selectUserList(SysUser sysUser) {
+ List<SysUser> sysUserList = hnGatherPatArchiveMapper.selectUserList(sysUser);
+ log.info("sysUserList鐨勯噰闆嗗埌鐨勬暟閲忎负锛歿}", sysUserList.size());
+ int i = sysUser2Mapper.batchUser(sysUserList);
+ return i;
+ }
+
+ @Override
+ public Integer selectDeptList(SysDept dept) {
+ List<SysDept> sysDepts = hnGatherPatArchiveMapper.selectDeptList(dept);
+ log.info("selectDeptList鐨勯噰闆嗗埌鐨勬暟閲忎负锛歿}", sysDepts.size());
+ int i = sysDept2Mapper.batchDept(sysDepts);
+ return i;
+ }
+}
+
diff --git a/smartor/src/main/java/com/smartor/service/impl/IvrLibaTemplateServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/IvrLibaTemplateServiceImpl.java
index a729666..2291d42 100644
--- a/smartor/src/main/java/com/smartor/service/impl/IvrLibaTemplateServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/IvrLibaTemplateServiceImpl.java
@@ -39,9 +39,6 @@
@Autowired
private IvrLibaTemplateScriptMapper ivrLibaTemplateScriptMapper;
- @Autowired
- private TemplateDeptMapper tempDetpRelevanceMapper;
-
/**
* 鏌ヨ妯℃澘搴�
*
@@ -179,25 +176,12 @@
}
}
- //瀵圭瀹よ繘琛屽鐞�
- for (TemplateDept tempDetpRelevance : ivrLibaTemplateVO.getTempDetpRelevances()) {
- if (tempDetpRelevance.getId() == null) {
- //鏂板
- tempDetpRelevance.setTempid(ivrLibaTemplate.getId());
- tempDetpRelevance.setType(2L);
- tempDetpRelevance.setCreateTime(new Date());
- tempDetpRelevanceMapper.insertTemplateDept(tempDetpRelevance);
- } else {
- tempDetpRelevance.setUpdateTime(new Date());
- tempDetpRelevanceMapper.updateTemplateDept(tempDetpRelevance);
- }
- }
-
return i;
}
private IvrLibaTemplateScript scriptHandle(IvrLibaTemplate ivrLibaTemplate, IvrLibaTemplateScriptVO ivrLibaTemplateScriptVO, Integer isoperation) {
IvrLibaTemplateScript ivrLibaTemplateScript = DtoConversionUtils.sourceToTarget(ivrLibaTemplateScriptVO, IvrLibaTemplateScript.class);
+ ivrLibaTemplateScript.setScriptno(ivrLibaTemplateScript.getSort());
if (isoperation == 1) {
//鏂板
ivrLibaTemplateScript.setTemplateid(ivrLibaTemplate.getId());
diff --git a/smartor/src/main/java/com/smartor/service/impl/IvrTaskTemplateServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/IvrTaskTemplateServiceImpl.java
index ea4cfb4..76da7ad 100644
--- a/smartor/src/main/java/com/smartor/service/impl/IvrTaskTemplateServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/IvrTaskTemplateServiceImpl.java
@@ -11,7 +11,6 @@
import com.smartor.mapper.IvrTaskTemplateMapper;
import com.smartor.mapper.IvrTaskTemplateScriptMapper;
import com.smartor.mapper.IvrTaskTemplateTargetoptionMapper;
-import com.smartor.mapper.TemplateDeptMapper;
import com.smartor.service.IIvrTaskTemplateService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
@@ -41,8 +40,6 @@
@Autowired
private IvrTaskTemplateTargetoptionMapper ivrTaskTemplateTargetoptionMapper;
- @Autowired
- private TemplateDeptMapper templateDeptMapper;
/**
* 鏌ヨ闅忚浠诲姟闅忚妯℃澘搴�
@@ -177,16 +174,6 @@
*/
@Override
public int deleteIvrTaskTemplateByIDs(Long[] IDs) {
- if (IDs[0] != null) {
- IvrTaskTemplate ivrTaskTemplate = selectIvrTaskTemplateByID(IDs[0]);
- if (StringUtils.isNotEmpty(ivrTaskTemplate.getLongTemp()) && ivrTaskTemplate.getLongTemp().equals("1")) {
- //濡傛灉杩欎釜妯℃澘鏄暱鏈熶换鍔★紝鍒欓渶瑕佸垹闄ゆā鏉夸笌閮ㄩ棬鐨勫叧鑱�
- TemplateDept templateDept = new TemplateDept();
- templateDept.setType(21L);
- templateDept.setTempid(IDs[0]);
- templateDeptMapper.deleteTemplateDeptByTemplateId(templateDept);
- }
- }
return ivrTaskTemplateMapper.deleteIvrTaskTemplateByIDs(IDs);
}
diff --git a/smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java
index b6e641e..ebc4af6 100644
--- a/smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java
@@ -396,6 +396,9 @@
//鏂板鎮h�呭熀鏈俊鎭柊澧炴垨淇敼
PatArchive patArchive = addPatArchive(externalInHospPatientInfo, externalInHospPatientAddrInfo, externalInHospPatientLiaisonInfo);
+
+
+
PatMedInhosp patMedInhosp = new PatMedInhosp();
patMedInhosp.setInhospno(externalInHospPatientInfo.getBingAnHao());
patMedInhosp.setSerialnum(externalInHospPatientInfo.getJiuZhenYWID());
@@ -939,12 +942,13 @@
// 4. 鏂板缓(姝ゆ椂鍙墿鍐疯〃锛孭atMedOuthosp娌′簡锛岄渶瑕佹柊寤轰竴涓�)
patMedOuthospMapper.createPatMedOuthosp(newName, oldName);
- //璁剧疆鏂拌〃鑷涓婚敭
+
+ //5.璁剧疆鏂拌〃鑷涓婚敭
patMedOuthospMapper.createPatMedOuthospAutoAdd(oldName);
- // 5. 璁剧疆鏂拌〃鑷璧峰鍊�
+ //6. 璁剧疆鏂拌〃鑷璧峰鍊�
patMedOuthospMapper.setAutoIncrement(oldName, maxId + 1);
- // 6. 鏇存柊/鏂板缓瑙嗗浘
+ // 7. 鏇存柊/鏂板缓瑙嗗浘
// 閲嶆柊鑾峰彇鎵�鏈夎〃鍚嶏紙鍖呭惈鍒氭柊寤虹殑涓昏〃锛�
List<String> allTables = patMedOuthospMapper.getAllOuthospTableNames();
StringBuilder sb = new StringBuilder();
diff --git a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskDetailServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskDetailServiceImpl.java
index 706566b..599d1ef 100644
--- a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskDetailServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskDetailServiceImpl.java
@@ -109,7 +109,8 @@
}
}
}
- Collections.sort(serviceSubtaskDetailSET, Comparator.comparingLong(ServiceSubtaskDetail::getTemplatequestionnum));
+ Collections.sort(serviceSubtaskDetailSET,
+ Comparator.comparing(ServiceSubtaskDetail::getTemplatequestionnum, Comparator.nullsLast(Long::compareTo)));
map1.put("filteredDetails", serviceSubtaskDetailSET);
map1.put("voice", "");
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 4123c7d..de6eb96 100644
--- a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
@@ -1243,6 +1243,7 @@
}
break;
}
+ log.info("鏄惁闇�瑕佹寕鏈猴細{}", les);
if (ObjectUtils.isNotEmpty(les)) {
//瀵瑰尮閰嶇殑缁撴灉澶勭悊涓�涓�(鐪嬬湅鏄笉鏄渶瑕佹寕鏈�)
if (les.getIsEnd() != null && les.getIsEnd() == 1) {
@@ -1301,6 +1302,7 @@
if (StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() && StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches() || StringUtils.isEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex()) && StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() || StringUtils.isEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2()) && StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches()) {
//璇存槑鍖归厤姝g‘浜�
//杩欓噷搴旇鍏堝垽鏂被鍨嬶紝鍘诲啀淇敼锛岃缃甀sUserOperation鏄崟閫夐鐨勬敼娉�
+ log.info("鍖归厤姝g‘浜嗗悧--------------");
ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).setIsUserOperation(1);
serviceTaskScriptTargetoptionMapper.updateIvrTaskTemplateTargetoption(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j));
@@ -1389,8 +1391,9 @@
if (script.getSort() == nextQuestion.intValue()) {
phoneCallBackYQVO.setType("text");
phoneCallBackYQVO.setSilent_interval(ivrTaskTemplate.getSilencetime().intValue());
- String scriptContent = script.getIvrtext();
+ String scriptContent = StringUtils.isNotEmpty(script.getIvrtext()) ? script.getIvrtext() : script.getScriptContent();
log.error("涓嬩竴棰橀棶棰橈細{}", scriptContent);
+ log.error("涓嬩竴棰樼殑瀛愪换鍔℃槸锛歿}", serviceSubtask);
phoneCallBackYQVO.setValue(phoneCallBackYQVO.getCommonValue() + getObject(serviceSubtask, scriptContent));
//灏嗚鎮h�呯殑Redis涓殑棰樼洰ID锛岃繘琛屼慨鏀�
redisCache.setCacheObject(phoneCallReqYQVO.getTaskid().trim() + "-" + phoneCallReqYQVO.getPhone().trim(), script.getId().toString(), 120, TimeUnit.MINUTES);
@@ -1429,6 +1432,7 @@
}
} else {
+ log.info("娌℃湁鍖归厤涓�----------------------------");
//flag=0,璇存槑娌� 鍖归厤涓婏紝涔熻鎶婃偅鑰呰鐨勮瘽璁板綍涓嬫潵
if (j == ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().size() - 1 && flag == 0) {
ServiceSubTaskDetailReq serviceSubTaskDetailReq = new ServiceSubTaskDetailReq();
@@ -1456,6 +1460,7 @@
}
//閮芥病鏈夊尮閰嶅埌
if (StringUtils.isEmpty(phoneCallBackYQVO.getValue())) {
+ log.info("閮芥病鏈夊尮閰嶅埌-------------------------");
Integer count = null;
Object countObj = redisCache.getCacheObject(phoneCallReqYQVO.getTaskid().trim() + "&&" + "mate" + "&&" + phoneCallReqYQVO.getUuid());
if (ObjectUtils.isNotEmpty(countObj)) count = (Integer) countObj;
@@ -1486,9 +1491,11 @@
//鍘籸edis涓紝鎶婅瀛愪换鍔D鍒犻櫎
Long id = serviceSubtask.getId();
Map<String, String> map = delRedisValue(null, id.toString());
- redisCache.setCacheObject(map.get("cacheName"), map.get("val"));
- redisCache.deleteObject(serviceSubtask.getId() + "-" + serviceSubtask.getPhone());
- redisCache.deleteObject(phoneCallReqYQVO.getUuid() + "SCORE");
+ if (ObjectUtils.isNotEmpty(map)) {
+ redisCache.setCacheObject(map.get("cacheName"), map.get("val"));
+ redisCache.deleteObject(serviceSubtask.getId() + "-" + serviceSubtask.getPhone());
+ redisCache.deleteObject(phoneCallReqYQVO.getUuid() + "SCORE");
+ }
// return phoneCallBackYQVO;
} else {
//鏍规嵁ivrTaskTemplateScriptVO.getNextScriptno()鑾峰彇涓嬩竴棰樿繘琛屾彁闂�
@@ -1496,7 +1503,7 @@
if (script.getSort() == ivrTaskTemplateScriptVO.getNextScriptno().intValue()) {
phoneCallBackYQVO.setType("text");
phoneCallBackYQVO.setSilent_interval(ivrTaskTemplate.getSilencetime().intValue());
- String scriptContent = script.getIvrtext();
+ String scriptContent = StringUtils.isNotEmpty(script.getIvrtext()) ? script.getIvrtext() : script.getScriptContent();
phoneCallBackYQVO.setValue(phoneCallBackYQVO.getCommonValue() + getObject(serviceSubtask, scriptContent));
//灏嗚鎮h�呯殑Redis涓殑棰樼洰ID锛岃繘琛屼慨鏀�
redisCache.setCacheObject(phoneCallReqYQVO.getTaskid().trim() + "-" + phoneCallReqYQVO.getPhone().trim(), script.getId().toString(), 120, TimeUnit.MINUTES);
@@ -1550,7 +1557,8 @@
if (ivrTaskTemplateScriptVO.getNextScriptno().intValue() == ivrTaskTemplateScript1.getSort()) {
phoneCallBackYQVO.setType("text");
phoneCallBackYQVO.setSilent_interval(ivrTaskTemplate.getSilencetime().intValue());
- String scriptContent = ivrTaskTemplateScript1.getIvrtext();
+ String scriptContent = StringUtils.isNotEmpty(ivrTaskTemplateScript1.getIvrtext()) ? ivrTaskTemplateScript1.getIvrtext() : ivrTaskTemplateScript1.getScriptContent();
+
phoneCallBackYQVO.setValue(phoneCallBackYQVO.getCommonValue() + getObject(serviceSubtask, scriptContent));
redisCache.deleteObject(phoneCallReqYQVO.getTaskid().trim() + "&&" + "mate" + "&&" + phoneCallReqYQVO.getUuid());
redisCache.setCacheObject(serviceSubtask.getId() + "-" + serviceSubtask.getPhone(), ivrTaskTemplateScript1.getId().toString());
@@ -1603,6 +1611,9 @@
for (String key : map.keySet()) {
scriptContent = scriptContent.replace(key, StringUtils.isNotEmpty(map.get(key)) ? map.get(key) : "");
}
+ }
+ if (StringUtils.isEmpty(scriptContent)) {
+ return scriptContent;
}
scriptContent = scriptContent.replace("${name}", StringUtils.isNotEmpty(serviceSubtask.getSendname()) ? serviceSubtask.getSendname() : "");
scriptContent = scriptContent.replace("${dzz}", StringUtils.isNotEmpty(serviceSubtask.getAddr()) ? serviceSubtask.getAddr() : "");
@@ -1676,10 +1687,9 @@
//蹇呴』绛塧che-exist鍏ㄩ儴鎵撳畬鎵嶈兘鎷夊彇涓嬩竴鎵癸紙涓昏鏄�曟墍鏈夌殑鏁版嵁閮藉爢鍦ㄧ數璇濈殑缂撳瓨閲岋紝鍦ㄨ瀹氱殑鏃堕棿鎵撲笉瀹岋級
long existSize = listOps.size("cache-exist");
if (existSize > 0) return pullTaskVOList;
-
+ int count = 0;
long size = listOps.size("cache-0");
log.error("---------鎵撶數璇濅箣鍓嶇紦瀛樹腑鐨勬暟鎹噺锛歿}", size);
- int count = 0;
if (size > 0) {
//phoneCount() 閫氳繃缁欏嚭鐨勬瘡涓皬鏃堕渶瑕佹墦鍑虹殑鐢佃瘽閲忥紝绠楀嚭鍒版櫄涓�8鐐逛竴鐐硅兘鎵撳嚭澶氬皯涓數璇濓紝鑾峰彇鍒版�婚噺
//濡傛灉闇�瑕佺珛鍗虫墽琛岀殑鏁版嵁閲忓ぇ浜庝竴澶╄鎵ц鐨勪笂闄愶紝鍒欏彧鍙栦笂闄愮殑鏁伴噺锛屽叾瀹冪殑鍒欐斁鍥瀝edis涓�
@@ -1688,6 +1698,7 @@
cacheList = listOps.range("cache-0", 0, count - 1);
}
}
+
log.error("浠诲姟鎷夊彇cache-0鐨勫�兼槸澶氬皯锛歿}", cacheList);
// cache-0涓虹珛鍗冲彂璧风殑,鍏跺畠鐨勫厛鎺ㄨ繜
@@ -1699,17 +1710,21 @@
} else {
for (int i = 1; i < 6; i++) {
//鍙栧嚭浠巆ache-1 鍒� cache-5鐨勭涓�涓瓙浠诲姟淇℃伅
- Long size1 = listOps.size("cache-" + i);
- if (size1 == null || size1 == 0) continue;
- int count1 = Math.min(phoneCount(), size1.intValue());
- List<String> value = listOps.range("cache-0" + i, 0, count1 - 1);
+ try {
+ Long size1 = listOps.size("cache-" + i);
+ if (size1 == null || size1 == 0) continue;
+ int count1 = Math.min(phoneCount(), size1.intValue());
+ List<String> value = listOps.range("cache-0" + i, 0, count1 - 1);
- List<PullTaskVO> pullTaskVOList2 = getPullTaskList(value, "cache-" + i);
- if (CollectionUtils.isNotEmpty(pullTaskVOList2) && pullTaskVOList2.size() > 0) {
- pullTaskVOList.addAll(pullTaskVOList2);
+ List<PullTaskVO> pullTaskVOList2 = getPullTaskList(value, "cache-" + i);
+ if (CollectionUtils.isNotEmpty(pullTaskVOList2) && pullTaskVOList2.size() > 0) {
+ pullTaskVOList.addAll(pullTaskVOList2);
+ }
+ //灏嗗鐞嗚繃鐨勬暟鎹垹闄�
+ listOps.trim("cache-0" + i, count1, -1);
+ } catch (Exception e) {
+// log.error("鐪嬬潃鐑�");
}
- //灏嗗鐞嗚繃鐨勬暟鎹垹闄�
- listOps.trim("cache-0" + i, count1, -1);
}
}
//existList鐢ㄦ潵璁板綍鎺ヤ笅鏉ラ渶瑕佹墽琛岀殑瀛愪换鍔D
@@ -2068,7 +2083,7 @@
ServiceSubtaskDetail ssd = new ServiceSubtaskDetail();
ssd.setSubId(serviceSubtaskDetail.getSubId());
ssd.setTaskid(serviceSubtaskDetail.getTaskid());
- ssd.setTemplatequestionnum(serviceSubtaskDetail.getTemplatequestionnum());
+ ssd.setScriptid(serviceSubtaskDetail.getScriptid());
if (serviceSubtaskDetail.getSubId() != null) {
ServiceSubtask serviceSubtask = serviceSubtaskMapper.selectServiceSubtaskById(serviceSubtaskDetail.getSubId());
ssd.setGuid(serviceSubtask.getGuid());
@@ -2194,6 +2209,23 @@
continue;
}
ServiceSubtaskStatistic statistic = getStatistic(serviceSubtaskList);
+
+ //鍙婃椂鐜�
+ ServiceSubtask ss = new ServiceSubtask();
+ ss.setOrgid(serviceSubtaskList.get(0).getOrgid());
+ if (CollectionUtils.isNotEmpty(serviceSubtaskCountReq.getLeavehospitaldistrictcodes())) {
+ ss.setLeavehospitaldistrictcode(serviceSubtaskList.get(0).getLeavehospitaldistrictcode());
+ } else {
+ ss.setDeptcode(serviceSubtaskList.get(0).getDeptcode());
+ }
+ ss.setStarttime(serviceSubtaskCountReq.getStartTime());
+ ss.setEndtime(serviceSubtaskCountReq.getEndTime());
+ if (serviceSubtaskCountReq.getEndTime() != null && new Date().before(serviceSubtaskCountReq.getEndTime())) {
+ ss.setEndtime(new Date());
+ }
+ Double jsRate = serviceSubtaskMapper.selectTimelyRate(ss);
+ statistic.setRate(jsRate);
+
if (ObjectUtils.isNotEmpty(statistic)) {
serviceSubtaskStatistics.add(statistic);
}
@@ -2220,6 +2252,7 @@
if (serviceSubtask.getSendstate() != null && serviceSubtask.getSendstate() != 4) {
serviceSubtaskStatistic.setFollowUpNeeded(serviceSubtaskStatistic.getFollowUpNeeded() + 1L);
}
+
//棣栨鍑洪櫌闅忚
if (serviceSubtask.getVisitCount() != null && serviceSubtask.getVisitCount() == 1) {
if (serviceSubtask.getSendstate() != null && serviceSubtask.getSendstate() != 4) {
@@ -2288,48 +2321,6 @@
}
- /*serviceSubtaskStatistic.setServiceCount(serviceSubtaskList.size());
- for (ServiceSubtask serviceSubtask : serviceSubtaskList) {
- //涓嶉殢璁挎暟閲�
- if (serviceSubtask.getSendstate() != null && serviceSubtask.getSendstate() == 4) {
- serviceSubtaskStatistic.setBzxCount(serviceSubtaskStatistic.getBzxCount() + 1L);
- }
- //搴旈殢璁挎暟閲�
- if (serviceSubtask.getSendstate() != null && serviceSubtask.getSendstate() != 4) {
- serviceSubtaskStatistic.setYsfCount(serviceSubtaskStatistic.getYsfCount() + 1L);
- }
- //鍙戦�佸け璐ユ暟閲�
- if (serviceSubtask.getSendstate() != null && serviceSubtask.getSendstate() == 5) {
- serviceSubtaskStatistic.setFssbCount(serviceSubtaskStatistic.getFssbCount() + 1L);
- }
- //寰呭彂閫佹暟閲�
- if (serviceSubtask.getSendstate() != null && serviceSubtask.getSendstate() == 2) {
- serviceSubtaskStatistic.setDfsCount(serviceSubtaskStatistic.getDfsCount() + 1L);
- }
- //宸插彂閫佹暟閲�
- if (serviceSubtask.getSendstate() != null && serviceSubtask.getSendstate() == 3) {
- serviceSubtaskStatistic.setYfsCount(serviceSubtaskStatistic.getYfsCount() + 1L);
- }
- //宸插畬鎴愭暟閲�
- if (serviceSubtask.getSendstate() != null && serviceSubtask.getSendstate() == 6) {
- //宸插彂閫侊紝鍖呭惈宸插畬鎴�
- serviceSubtaskStatistic.setYfsCount(serviceSubtaskStatistic.getYfsCount() + 1L);
- serviceSubtaskStatistic.setYwcCount(serviceSubtaskStatistic.getYwcCount() + 1L);
- }
-
- if (StringUtils.isNotEmpty(serviceSubtask.getExcep()) && serviceSubtask.getExcep().equals("1")) {
- //寮傚父鏍囪瘑
- serviceSubtaskStatistic.setYczs(serviceSubtaskStatistic.getYczs() + 1L);
- }
- }
- //闅忚瀹屾垚鐜�=宸插畬鎴�/搴旈殢璁块噺
- if (serviceSubtaskStatistic.getYwcCount() == 0 || CollectionUtils.isEmpty(serviceSubtaskList)) {
- serviceSubtaskStatistic.setSfwcl("0");
- } else {
-// BigDecimal multiply = BigDecimal.valueOf(serviceSubtaskStatistic.getYfsCount()).divide(BigDecimal.valueOf(serviceSubtaskList.size()), 2, BigDecimal.ROUND_HALF_UP);
- BigDecimal multiply = new BigDecimal(serviceSubtaskStatistic.getYwcCount().toString()).divide(new BigDecimal(serviceSubtaskStatistic.getYsfCount().toString()), 2, BigDecimal.ROUND_HALF_UP);
- serviceSubtaskStatistic.setSfwcl(multiply.toString());
- }*/
return serviceSubtaskStatistic;
@@ -2347,6 +2338,8 @@
}
private ServiceSubtaskDetail getServiceSubtaskDetail(PhoneCallReqYQVO phoneCallReqYQVO, IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO, ServiceSubtask serviceSubtask, IvrTaskTemplate ivrTaskTemplate) {
+ log.info("-----------------phoneCallReqYQVO鐨勫�间负锛歿}", phoneCallReqYQVO);
+
ServiceSubtaskDetail serviceSubtaskDetail = new ServiceSubtaskDetail();
serviceSubtaskDetail.setSubId(Long.valueOf(phoneCallReqYQVO.getTaskid()));
ServiceSubtask serviceSubtask1 = serviceSubtaskMapper.selectServiceSubtaskById(Long.valueOf(phoneCallReqYQVO.getTaskid()));
@@ -2370,7 +2363,7 @@
serviceSubtaskDetail.setSentEnd(1L);
serviceSubtaskDetail.setTemplateid(ivrTaskTemplate.getId().toString());
serviceSubtaskDetail.setTemplatequestionnum(ivrTaskTemplateScriptVO.getScriptno());
- serviceSubtaskDetail.setQuestiontext(ivrTaskTemplateScriptVO.getIvrtext());
+ serviceSubtaskDetail.setQuestiontext(StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrtext()) ? ivrTaskTemplateScriptVO.getIvrtext() : ivrTaskTemplateScriptVO.getScriptContent());
serviceSubtaskDetail.setQuestionvoice(phoneCallReqYQVO.getRecordpath());
serviceSubtaskDetail.setCategoryname(ivrTaskTemplateScriptVO.getScriptType());
serviceSubtaskDetail.setTargetoptions(ivrTaskTemplateScriptVO.getTargetOptions());
diff --git a/smartor/src/main/java/com/smartor/service/impl/ServiceTaskServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/ServiceTaskServiceImpl.java
index d560ef9..1aba511 100644
--- a/smartor/src/main/java/com/smartor/service/impl/ServiceTaskServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/ServiceTaskServiceImpl.java
@@ -187,6 +187,37 @@
return isSuccess;
}
+
+ /**
+ * 鑾峰彇闅忚鍙婃椂鐜�
+ *
+ * @param serviceSubtask
+ * @return
+ */
+ public Map<String, Object> selectTimelyRate(ServiceSubtask serviceSubtask) {
+ if (serviceSubtask.getEndtime() != null && new Date().before(serviceSubtask.getEndtime())) {
+ serviceSubtask.setEndtime(new Date());
+ }
+ Double dob = serviceSubtaskMapper.selectTimelyRate(serviceSubtask);
+ // 1. 鏌ヨ鍏ㄩ儴鏁版嵁锛圫QL涓嶅垎椤碉級
+ List<ServiceSubtask> allList = serviceSubtaskMapper.selectTimelyRateDetail(serviceSubtask);
+ // 2. Java浠g爜鍒嗛〉
+ int pageNum = serviceSubtask.getPn() != null ? serviceSubtask.getPn() : 1;
+ int pageSize = serviceSubtask.getPs() != null ? serviceSubtask.getPs() : 10;
+ int fromIndex = (pageNum - 1) * pageSize;
+ int toIndex = Math.min(fromIndex + pageSize, allList.size());
+ List<ServiceSubtask> pageList = new ArrayList<>();
+ if (fromIndex < allList.size()) {
+ pageList = allList.subList(fromIndex, toIndex);
+ }
+ log.info("浠g爜鍒嗛〉鍙傛暟: pageNum={}, pageSize={}, fromIndex={}, toIndex={}, total={}", pageNum, pageSize, fromIndex, toIndex, allList.size());
+ Map<String, Object> map = new HashMap<>();
+ map.put("rate", dob);
+ map.put("detail", pageList);
+ map.put("total", allList.size()); // 鍙�夛細杩斿洖鎬绘暟
+ return map;
+ }
+
@Override
public Map<String, Object> getScriptInfoByCondition(Long taskid, Long patid, Boolean isFinish, String patfrom) {
Map<String, Object> map = new HashMap<>();
@@ -303,7 +334,7 @@
ivrLibaTemplateScriptVO.setIvrLibaScriptTargetoptionList(ivrLibaTemplateTargetoptions);
}
}
- Collections.sort(ivrLibaTemplateScriptVOS, Comparator.comparingInt(IvrLibaTemplateScriptVO::getSort));
+ Collections.sort(ivrLibaTemplateScriptVOS, Comparator.comparingLong(IvrLibaTemplateScriptVO::getSort));
return ivrLibaTemplateScriptVOS;
}
diff --git a/smartor/src/main/java/com/smartor/service/impl/SmsRecordsServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/SmsRecordsServiceImpl.java
deleted file mode 100644
index 766e5ac..0000000
--- a/smartor/src/main/java/com/smartor/service/impl/SmsRecordsServiceImpl.java
+++ /dev/null
@@ -1,96 +0,0 @@
-package com.smartor.service.impl;
-
-import java.util.List;
-import com.ruoyi.common.utils.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.smartor.mapper.SmsRecordsMapper;
-import com.smartor.domain.SmsRecords;
-import com.smartor.service.ISmsRecordsService;
-
-/**
- * 鐭俊璁板綍Service涓氬姟灞傚鐞�
- *
- * @author smartor
- * @date 2023-03-06
- */
-@Service
-public class SmsRecordsServiceImpl implements ISmsRecordsService
-{
- @Autowired
- private SmsRecordsMapper smsRecordsMapper;
-
- /**
- * 鏌ヨ鐭俊璁板綍
- *
- * @param recordid 鐭俊璁板綍涓婚敭
- * @return 鐭俊璁板綍
- */
- @Override
- public SmsRecords selectSmsRecordsByRecordid(Long recordid)
- {
- return smsRecordsMapper.selectSmsRecordsByRecordid(recordid);
- }
-
- /**
- * 鏌ヨ鐭俊璁板綍鍒楄〃
- *
- * @param smsRecords 鐭俊璁板綍
- * @return 鐭俊璁板綍
- */
- @Override
- public List<SmsRecords> selectSmsRecordsList(SmsRecords smsRecords)
- {
- return smsRecordsMapper.selectSmsRecordsList(smsRecords);
- }
-
- /**
- * 鏂板鐭俊璁板綍
- *
- * @param smsRecords 鐭俊璁板綍
- * @return 缁撴灉
- */
- @Override
- public int insertSmsRecords(SmsRecords smsRecords)
- {
- smsRecords.setCreateTime(DateUtils.getNowDate());
- return smsRecordsMapper.insertSmsRecords(smsRecords);
- }
-
- /**
- * 淇敼鐭俊璁板綍
- *
- * @param smsRecords 鐭俊璁板綍
- * @return 缁撴灉
- */
- @Override
- public int updateSmsRecords(SmsRecords smsRecords)
- {
- smsRecords.setUpdateTime(DateUtils.getNowDate());
- return smsRecordsMapper.updateSmsRecords(smsRecords);
- }
-
- /**
- * 鎵归噺鍒犻櫎鐭俊璁板綍
- *
- * @param recordids 闇�瑕佸垹闄ょ殑鐭俊璁板綍涓婚敭
- * @return 缁撴灉
- */
- @Override
- public int deleteSmsRecordsByRecordids(Long[] recordids)
- {
- return smsRecordsMapper.deleteSmsRecordsByRecordids(recordids);
- }
-
- /**
- * 鍒犻櫎鐭俊璁板綍淇℃伅
- *
- * @param recordid 鐭俊璁板綍涓婚敭
- * @return 缁撴灉
- */
- @Override
- public int deleteSmsRecordsByRecordid(Long recordid)
- {
- return smsRecordsMapper.deleteSmsRecordsByRecordid(recordid);
- }
-}
diff --git a/smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateServiceImpl.java
index d6f2e8d..92f5d51 100644
--- a/smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateServiceImpl.java
@@ -33,8 +33,6 @@
@Autowired
private SvyLibTemplateTargetoptionMapper svyLibTemplateTargetoptionMapper;
@Autowired
- private TemplateDeptMapper templateDeptMapper;
- @Autowired
private SvyLibTemplateTagMapper svyLibTemplateTagMapper;
@Autowired
private Icd10AssociationMapper icd10AssociationMapper;
@@ -108,12 +106,6 @@
}
//灏嗛鐩斁鍒伴棶鍗峰垪琛ㄤ腑
svyLibTemplateVOS.get(i).setSvyTemplateLibScripts(svyLibTemplateScripts);
-
- //鑾峰彇姣忎釜闂嵎瀵瑰簲鐨勭瀹�
- TemplateDept templateDept = new TemplateDept();
- templateDept.setTempid(svyLibTemplateVOS.get(i).getSvyid());
- List<TemplateDept> tempDetpRelevances = templateDeptMapper.selectTemplateDeptList(templateDept);
- svyLibTemplateVOS.get(i).setTempDetpRelevances(CollectionUtils.isNotEmpty(tempDetpRelevances) ? tempDetpRelevances : new ArrayList<>());
//鑾峰彇鏍囩
SvyLibTemplateTag svyLibTemplateTag = new SvyLibTemplateTag();
@@ -211,22 +203,6 @@
}
}
}
- }
-
- if (CollectionUtils.isNotEmpty(svyLibTemplate.getTempDetpRelevances())) {
- for (TemplateDept tempDetpRelevance : svyLibTemplate.getTempDetpRelevances()) {
- tempDetpRelevance.setGuid(svyLibTemplateVO.getGuid());
- tempDetpRelevance.setOrgid(svyLibTemplateVO.getOrgid());
- if (tempDetpRelevance.getId() == null) {
- //鏂板
- tempDetpRelevance.setTempid(svyLibTemplate.getSvyid());
- tempDetpRelevance.setType(1L);
- templateDeptMapper.insertTemplateDept(tempDetpRelevance);
- } else {
- templateDeptMapper.updateTemplateDept(tempDetpRelevance);
- }
- }
-
}
//鏍囩澶勭悊
diff --git a/smartor/src/main/java/com/smartor/service/impl/SvyTaskSingleServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/SvyTaskSingleServiceImpl.java
index 6868773..b3560a8 100644
--- a/smartor/src/main/java/com/smartor/service/impl/SvyTaskSingleServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/SvyTaskSingleServiceImpl.java
@@ -279,6 +279,7 @@
serviceSubtask.setDeptname(serviceTaskVO.getDeptname());
serviceSubtask.setDeptcode(serviceTaskVO.getDeptcode());
serviceSubtask.setSendstate(6L);
+ serviceSubtask.setVisitTime(serviceTaskVO.getVisittime());
serviceSubtask.setCreateTime(new Date());
serviceSubtask.setLeavehospitaldistrictcode(serviceTaskVO.getDistrictcode());
//鍏堟煡璇竴閬嶏紝璇askGuid鏄惁瀛樺湪
@@ -343,9 +344,9 @@
String jsonString = objectMapper.writeValueAsString(serviceQueryInfo);
log.error("token鐨勫�间负锛歿}", token);
if (serviceQueryInfo.getXiaoXiTou().getFaSongJGID().equals("47255004333112711A1001")) //鏅畞
- result = OkHttpExample.sendPostRequest("https://9.0.124.104:13021/mediinfo-grus-fuwuzxwg/api/esb/lyraSyncRun", jsonString, token);
+ result = OkHttpExample.sendPostRequest("https://9.0.124.104:13021/mediinfo-grus-fuwuzxwg/api/esb/lyraSyncRun", jsonString, token);
if (serviceQueryInfo.getXiaoXiTou().getFaSongJGID().equals("47231022633110211A2101")) //涓尰闄�
- result = OkHttpExample.sendPostRequest("https://9.0.124.104:13011/mediinfo-grus-fuwuzxwg/api/esb/lyraSyncRun", jsonString, token);
+ result = OkHttpExample.sendPostRequest("https://9.0.124.104:13011/mediinfo-grus-fuwuzxwg/api/esb/lyraSyncRun", jsonString, token);
map = objectMapper.readValue(result, Map.class);
} catch (Exception e) {
e.printStackTrace();
diff --git a/smartor/src/main/resources/mapper/smartor/HNGatherPatArchiveMapper.xml b/smartor/src/main/resources/mapper/smartor/HNGatherPatArchiveMapper.xml
new file mode 100644
index 0000000..8fd6c45
--- /dev/null
+++ b/smartor/src/main/resources/mapper/smartor/HNGatherPatArchiveMapper.xml
@@ -0,0 +1,611 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.smartor.mapper.HNGatherPatArchiveMapper">
+
+ <resultMap type="com.smartor.domain.PatArchive" id="PatArchiveResult">
+ <result property="id" column="id"/>
+ <result property="patientno" column="patientno"/>
+ <result property="sourcefrom" column="sourcefrom"/>
+ <result property="notrequiredFlag" column="notrequired_flag"/>
+ <result property="notrequiredreason" column="notrequiredreason"/>
+ <result property="patidHis" column="patid_his"/>
+ <result property="sdFlag" column="sd_flag"/>
+ <result property="pattype" column="pattype"/>
+ <result property="viptype" column="viptype"/>
+ <result property="name" column="name"/>
+ <result property="sex" column="sex"/>
+ <result property="nation" column="nation"/>
+ <result property="nativePlace" column="native_place"/>
+ <result property="placeOfResidence" column="place_of_residence"/>
+ <result property="birthplace" column="birthplace"/>
+ <result property="idcardno" column="idcardno"/>
+ <result property="birthdate" column="birthdate"/>
+ <result property="age" column="age"/>
+ <result property="age2" column="age2"/>
+ <result property="sourcefrom" column="sourcefrom"/>
+ <result property="archivetime" column="archivetime"/>
+ <result property="archiveby" column="archiveby"/>
+ <result property="telcode" column="telcode"/>
+ <result property="relativetelcode" column="relativetelcode"/>
+ <result property="idcardtype" column="idcardtype"/>
+ <result property="orgid" column="orgid"/>
+ <result property="openid" column="openid"/>
+ <result property="delFlag" column="del_flag"/>
+ <result property="dept" column="deptname"/>
+ <result property="deptcode" column="deptcode"/>
+ <result property="drcode" column="drcode"/>
+ <result property="drname" column="drname"/>
+ <result property="updateBy" column="update_by"/>
+ <result property="updateTime" column="update_time"/>
+ <result property="createBy" column="create_by"/>
+ <result property="createTime" column="create_time"/>
+ <result property="isupload" column="isupload"/>
+ <result property="uploadTime" column="upload_time"/>
+ <result property="tag" column="tag"/>
+ <result property="pattype" column="pattype"/>
+ <result property="bedNo" column="bedno"/>
+ <result property="inhosptime" column="inhosptime"/>
+ <result property="ageUnit" column="age_unit"/>
+ <result property="ageUnit2" column="age_unit2"/>
+ <result property="leavehospitaldistrictname" column="leavehospitaldistrictname"/>
+ <result property="leavehospitaldistrictcode" column="leavehospitaldistrictcode"/>
+ <result property="careFacilities" column="care_facilities"/>
+ <result property="casePath" column="case_path"/>
+ <result property="degreeOfEducation" column="degree_of_education"/>
+ <result property="maritalStatus" column="marital_status"/>
+ <result property="income" column="income"/>
+ <result property="medicareType" column="medicare_type"/>
+ <result property="carePerson" column="care_person"/>
+ <result property="casePersonAge" column="case_person_age"/>
+ <result property="guid" column="guid"/>
+ <result property="filterDrname" column="filter_drname"/>
+ <result property="filterDrcode" column="filter_drcode"/>
+ </resultMap>
+
+
+ <resultMap type="com.smartor.domain.PatArchiveOthreInfo" id="PatArchiveOthreInfoResult">
+ <result property="id" column="id"/>
+ <result property="notrequiredFlag" column="notrequired_flag"/>
+ <result property="notrequiredreason" column="notrequiredreason"/>
+ <result property="patientno" column="patientno"/>
+ <result property="sourcefrom" column="sourcefrom"/>
+ <result property="patidHis" column="patid_his"/>
+ <result property="sdFlag" column="sd_flag"/>
+ <result property="pattype" column="pattype"/>
+ <result property="viptype" column="viptype"/>
+ <result property="name" column="name"/>
+ <result property="sex" column="sex"/>
+ <result property="nation" column="nation"/>
+ <result property="nativePlace" column="native_place"/>
+ <result property="placeOfResidence" column="place_of_residence"/>
+ <result property="birthplace" column="birthplace"/>
+ <result property="idcardno" column="idcardno"/>
+ <result property="birthdate" column="birthdate"/>
+ <result property="age" column="age"/>
+ <result property="age2" column="age2"/>
+ <result property="sourcefrom" column="sourcefrom"/>
+ <result property="archivetime" column="archivetime"/>
+ <result property="archiveby" column="archiveby"/>
+ <result property="telcode" column="telcode"/>
+ <result property="relativetelcode" column="relativetelcode"/>
+ <result property="idcardtype" column="idcardtype"/>
+ <result property="orgid" column="orgid"/>
+ <result property="openid" column="openid"/>
+ <result property="delFlag" column="del_flag"/>
+ <result property="dept" column="deptname"/>
+ <result property="deptcode" column="deptcode"/>
+ <result property="drcode" column="drcode"/>
+ <result property="drname" column="drname"/>
+ <result property="updateBy" column="update_by"/>
+ <result property="updateTime" column="update_time"/>
+ <result property="createBy" column="create_by"/>
+ <result property="createTime" column="create_time"/>
+ <result property="isupload" column="isupload"/>
+ <result property="uploadTime" column="upload_time"/>
+ <result property="tag" column="tag"/>
+ <result property="pattype" column="pattype"/>
+ <result property="bedNo" column="bedno"/>
+ <result property="starttime" column="starttime"/>
+ <result property="endtime" column="endtime"/>
+ <result property="ageUnit" column="age_unit"/>
+ <result property="ageUnit2" column="age_unit2"/>
+ <result property="inhospno" column="inhospno"/>
+ <result property="nurseId" column="nurse_id"/>
+ <result property="nurseName" column="nurse_name"/>
+ <result property="outWayName" column="out_way_name"/>
+ <result property="outWayId" column="out_way_id"/>
+ <result property="leavehospitaldistrictname" column="leavehospitaldistrictname"/>
+ <result property="leavehospitaldistrictcode" column="leavehospitaldistrictcode"/>
+ <result property="guid" column="guid"/>
+ <result property="leavediagname" column="leavediagname"/>
+ <result property="leaveicd10code" column="leaveicd10code"/>
+ <result property="filterDrname" column="filter_drname"/>
+ <result property="filterDrcode" column="filter_drcode"/>
+ </resultMap>
+
+ <resultMap type="com.smartor.domain.PatMedInhosp" id="PatMedInhospResult">
+ <result property="inhospid" column="inhospid"/>
+ <result property="inhospno" column="inhospno"/>
+ <result property="serialnum" column="serialnum"/>
+ <result property="hospitalname" column="hospitalname"/>
+ <result property="hospitalcode" column="hospitalcode"/>
+ <result property="hospitaldistrictcode" column="hospitaldistrictcode"/>
+ <result property="hospitaldistrictname" column="hospitaldistrictname"/>
+ <result property="icd10code" column="icd10code"/>
+ <result property="diagname" column="diagname"/>
+ <result property="starttime" column="starttime"/>
+ <result property="endtime" column="endtime"/>
+ <result property="deptcode" column="deptcode"/>
+ <result property="deptname" column="deptname"/>
+ <result property="roomno" column="roomno"/>
+ <result property="bedNo" column="bed_no"/>
+ <result property="orgid" column="orgid"/>
+ <result property="delFlag" column="del_flag"/>
+ <result property="updateBy" column="update_by"/>
+ <result property="updateTime" column="update_time"/>
+ <result property="createBy" column="create_by"/>
+ <result property="createTime" column="create_time"/>
+ <result property="isupload" column="isupload"/>
+ <result property="uploadTime" column="upload_time"/>
+ <result property="patid" column="patid"/>
+ <result property="leavediagname" column="leavediagname"/>
+ <result property="leaveicd10code" column="leaveicd10code"/>
+ <result property="drcode" column="drcode"/>
+ <result property="drname" column="drname"/>
+ <result property="schemestatus" column="schemestatus"/>
+ <result property="generalschemestatus" column="generalschemestatus"/>
+ <result property="leaveldeptcode" column="leaveldeptcode"/>
+ <result property="leaveldeptname" column="leaveldeptname"/>
+ <result property="hospitaldistrictid" column="hospitaldistrictid"/>
+ <result property="leavehospitaldistrictcode" column="leavehospitaldistrictcode"/>
+ <result property="leavehospitaldistrictname" column="leavehospitaldistrictname"/>
+ <result property="leavehospitaldistrictid" column="leavehospitaldistrictid"/>
+ <result property="deptid" column="deptid"/>
+ <result property="leaveldeptid" column="leaveldeptid"/>
+ <result property="schemetime" column="schemetime"/>
+ <result property="patname" column="patname"/>
+ <result property="patno" column="patno"/>
+ <result property="inhospstate" column="inhospstate"/>
+ <result property="deptcheckFlag" column="deptcheck_flag"/>
+ <result property="wardcheckFlag" column="wardcheck_flag"/>
+ <result property="diagcheckFlag" column="diagcheck_flag"/>
+ <result property="age" column="age"/>
+ <result property="sex" column="sex"/>
+ <result property="telcode" column="telcode"/>
+ <result property="longTaskReason" column="long_task_reason"/>
+ <result property="nurseId" column="nurse_id"/>
+ <result property="nurseName" column="nurse_name"/>
+ <result property="outWayId" column="out_way_id"/>
+ <result property="outWayName" column="out_way_name"/>
+ <result property="guid" column="guid"/>
+ <result property="operator" column="operator"/>
+ <result property="operatorId" column="operator_id"/>
+ <result property="remark" column="remark"/>
+ <result property="tagname" column="tagname"/>
+ <result property="fuflag" column="fuflag"/>
+ <result property="fudate" column="fudate"/>
+ <result property="fuperiod" column="fuperiod"/>
+ <result property="futypecode" column="futypecode"/>
+ <result property="futypedesc" column="futypedesc"/>
+ <result property="fuadvice" column="fuadvice"/>
+ <result property="fuspecialadvice" column="fuspecialadvice"/>
+ </resultMap>
+
+ <resultMap type="com.smartor.domain.PatMedOuthosp" id="PatMedOuthospResult">
+ <result property="id" column="id"/>
+ <result property="serialnum" column="serialnum"/>
+ <result property="patid" column="patid"/>
+ <result property="hospitalname" column="hospitalname"/>
+ <result property="hospitalcode" column="hospitalcode"/>
+ <result property="icd10code" column="icd10code"/>
+ <result property="diagname" column="diagname"/>
+ <result property="deptcode" column="deptcode"/>
+ <result property="deptname" column="deptname"/>
+ <result property="drcode" column="drcode"/>
+ <result property="drname" column="drname"/>
+ <result property="admitdate" column="admitdate"/>
+ <result property="orgid" column="orgid"/>
+ <result property="delFlag" column="del_flag"/>
+ <result property="updateBy" column="update_by"/>
+ <result property="updateTime" column="update_time"/>
+ <result property="createBy" column="create_by"/>
+ <result property="createTime" column="create_time"/>
+ <result property="isupload" column="isupload"/>
+ <result property="uploadTime" column="upload_time"/>
+ <result property="schemestatus" column="schemestatus"/>
+ <result property="deptid" column="deptid"/>
+ <result property="schemetime" column="schemetime"/>
+ <result property="hpi" column="hpi"/>
+ <result property="mainsuit" column="mainsuit"/>
+ <result property="outhospno" column="outhospno"/>
+ <result property="patname" column="patname"/>
+ <result property="guid" column="guid"/>
+ <result property="patno" column="patno"/>
+ <result property="diagcheckFlag" column="diagcheck_flag"/>
+ <result property="idcardno" column="idcardno"/>
+ <result property="remark" column="remark"/>
+ </resultMap>
+
+
+ <resultMap type="com.smartor.domain.Icd10" id="Icd10Result">
+ <result property="icdid" column="icdid"/>
+ <result property="icdcode" column="icdcode"/>
+ <result property="icdname" column="icdname"/>
+ <result property="icdpym" column="icdpym"/>
+ <result property="icdwbm" column="icdwbm"/>
+ <result property="orgid" column="orgid"/>
+ <result property="delFlag" column="del_flag"/>
+ <result property="createBy" column="create_by"/>
+ <result property="createTime" column="create_time"/>
+ <result property="updateBy" column="update_by"/>
+ <result property="updateTime" column="update_time"/>
+ <result property="pid" column="pid"/>
+ <result property="guid" column="guid"/>
+ <result property="lastflag" column="lastflag"/>
+ <result property="chimedflag" column="chimedflag"/>
+ <result property="hisIcdid" column="his_icdid"/>
+ </resultMap>
+
+
+ <resultMap type="com.ruoyi.common.core.domain.entity.SysDept" id="SysDeptResult">
+ <id property="deptId" column="dept_id"/>
+ <id property="hisDeptId" column="his_dept_id"/>
+ <result property="parentId" column="parent_id"/>
+ <result property="hisParentId" column="his_parent_id"/>
+ <result property="ancestors" column="ancestors"/>
+ <result property="deptName" column="dept_name"/>
+ <result property="orderNum" column="order_num"/>
+ <result property="leader" column="leader"/>
+ <result property="phone" column="phone"/>
+ <result property="email" column="email"/>
+ <result property="status" column="status"/>
+ <result property="delFlag" column="del_flag"/>
+ <result property="parentName" column="parent_name"/>
+ <result property="createBy" column="create_by"/>
+ <result property="createTime" column="create_time"/>
+ <result property="updateBy" column="update_by"/>
+ <result property="updateTime" column="update_time"/>
+ <result property="deptCode" column="dept_code"/>
+ <result property="deptType" column="dept_type"/>
+ <result property="guid" column="guid"/>
+ <result property="orgid" column="orgid"/>
+ <result property="type" column="type"/>
+ </resultMap>
+
+ <resultMap type="com.ruoyi.common.core.domain.entity.SysUser" id="SysUserResult">
+ <id property="userId" column="user_id"/>
+ <id property="orgid" column="orgid"/>
+ <id property="hisUserId" column="his_user_id"/>
+ <result property="deptId" column="dept_id"/>
+ <result property="hospInfo" column="hosp_info"/>
+ <result property="deptInfo" column="dept_info"/>
+ <result property="userName" column="user_name"/>
+ <result property="nickName" column="nick_name"/>
+ <result property="email" column="email"/>
+ <result property="phonenumber" column="phonenumber"/>
+ <result property="sex" column="sex"/>
+ <result property="avatar" column="avatar"/>
+ <result property="password" column="password"/>
+ <result property="status" column="status"/>
+ <result property="delFlag" column="del_flag"/>
+ <result property="loginIp" column="login_ip"/>
+ <result property="loginDate" column="login_date"/>
+ <result property="createBy" column="create_by"/>
+ <result property="idCard" column="id_card"/>
+ <result property="createTime" column="create_time"/>
+ <result property="updateBy" column="update_by"/>
+ <result property="title" column="title"/>
+ <result property="birthday" column="birthday"/>
+ <result property="jobPhone" column="job_phone"/>
+ <result property="updateTime" column="update_time"/>
+ <result property="remark" column="remark"/>
+ <result property="userType" column="user_type"/>
+ <result property="searchscope" column="searchscope"/>
+ <result property="guid" column="guid"/>
+ </resultMap>
+
+ <sql id="selectPatArchiveVo">
+ select id,
+ notrequired_flag,
+ notrequiredreason,
+ patientno,
+ filter_drname,
+ filter_drcode,
+ patid_his,
+ age_unit,
+ age_unit2,
+ sd_flag,
+ name,
+ sex,
+ idcardno,
+ birthdate,
+ age,
+ age2,
+ nation,
+ native_place,
+ place_of_residence,
+ birthplace,
+ sourcefrom,
+ archivetime,
+ archiveby,
+ telcode,
+ relativetelcode,
+ idcardtype,
+ orgid,
+ openid,
+ del_flag,
+ update_by,
+ update_time,
+ create_by,
+ create_time,
+ isupload,
+ pattype,
+ viptype,
+ upload_time,
+ care_facilities,
+ case_path,
+ degree_of_education,
+ marital_status,
+ income,
+ medicare_type,
+ care_person,
+ guid,
+ case_person_age
+ from mbsjjk.hzjbxx
+ </sql>
+
+ <select id="selectPatArchiveList" parameterType="com.smartor.domain.PatArchive" resultMap="PatArchiveResult">
+ <include refid="selectPatArchiveVo"/>
+ <where>
+ <if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
+ <if test="idcardno != null and idcardno != ''">and idcardno = #{idcardno}</if>
+ <if test="sourcefrom != null ">and sourcefrom = #{sourcefrom}</if>
+ <if test="telcode != null and telcode != ''">and telcode = #{telcode}</if>
+ <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if>
+ <if test="id != null and id != ''">and id = #{id}</if>
+ <if test="isupload != null ">and isupload = #{isupload}</if>
+ <if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
+ <if test="viptype != null ">and viptype = #{viptype}</if>
+ <if test="pattype != null ">and pattype = #{pattype}</if>
+ <if test="patientno != null ">and patientno = #{patientno}</if>
+ <if test="patidHis != null ">and patid_his = #{patidHis}</if>
+ <if test="sdFlag != null ">and sd_flag = #{sdFlag}</if>
+ <if test="ageUnit != null ">and age_unit = #{ageUnit}</if>
+ <if test="age != null ">and age = #{age}</if>
+ <if test="age2 != null ">and age2 = #{age2}</if>
+ <if test="ageUnit2 != null ">and age_unit2 = #{ageUnit2}</if>
+ <if test="notrequiredFlag != null ">and notrequired_flag = #{notrequiredFlag}</if>
+ <if test="notrequiredreason != null ">and notrequiredreason = #{notrequiredreason}</if>
+ <if test="careFacilities != null ">and care_facilities = #{careFacilities}</if>
+ <if test="casePath != null ">and case_path = #{casePath}</if>
+ <if test="degreeOfEducation != null ">and degree_of_education = #{degreeOfEducation}</if>
+ <if test="maritalStatus != null ">and marital_status = #{maritalStatus}</if>
+ <if test="income != null ">and income = #{income}</if>
+ <if test="medicareType != null ">and medicare_type = #{medicareType}</if>
+ <if test="carePerson != null ">and care_person = #{carePerson}</if>
+ <if test="casePersonAge != null ">and case_person_age = #{casePersonAge}</if>
+ <if test="filterDrname != null ">and filter_drname = #{filterDrname}</if>
+ <if test="filterDrcode != null ">and filter_drcode = #{filterDrcode}</if>
+ </where>
+ </select>
+
+
+ <select id="selectPatMedInhospListCount" parameterType="com.smartor.domain.PatMedInhosp" resultType="Long">
+ select count(*)
+ FROM cryxx
+ </select>
+
+
+ <select id="selectPatMedInhospList" parameterType="com.smartor.domain.PatMedInhosp" resultMap="PatMedInhospResult">
+ select
+ b.nurse_id,
+ b.nurse_name,
+ b.patname,
+ b.out_way_id,
+ b.out_way_name,
+ b.inhospstate,
+ b.patno,
+ b.inhospno,
+ b.serialnum,
+ b.hospitalname,
+ b.hospitalcode,
+ b.hospitaldistrictcode,
+ b.hospitaldistrictname,
+ b.icd10code,
+ b.diagname,
+ b.starttime,
+ b.endtime,
+ b.deptcode,
+ b.deptname,
+ b.roomno,
+ b.bed_no,
+ b.orgid,
+ b.leavediagname,
+ b.leaveicd10code,
+ b.drcode,
+ b.drname,
+ b.leaveldeptcode,
+ b.leaveldeptname,
+ b.hospitaldistrictid,
+ b.leavehospitaldistrictcode,
+ b.leavehospitaldistrictname,
+ b.leavehospitaldistrictid,
+ b.deptid,
+ b.leaveldeptid,
+ b.schemetime,
+ b.fuflag,
+ b.fudate,
+ b.fuperiod,
+ b.futypecode,
+ b.futypedesc,
+ b.fuadvice
+ FROM
+ cryxx b
+ <where>
+ <if test="startOutHospTime != null ">and date_format(b.endtime,'%y%m%d') >=
+ date_format(#{startOutHospTime},'%y%m%d')
+ </if>
+ <if test="endOutHospTime != null ">and date_format(b.endtime,'%y%m%d') <=
+ date_format(#{endOutHospTime},'%y%m%d')
+ </if>
+ <if test="startInHospTime != null ">and date_format(b.starttime,'%y%m%d') >=
+ date_format(#{startInHospTime},'%y%m%d')
+ </if>
+ <if test="endInHospTime != null ">and date_format(b.starttime,'%y%m%d') <=
+ date_format(#{endInHospTime},'%y%m%d')
+ </if>
+ <if test="inhospno != null ">and b.inhospno = #{inhospno}</if>
+ <if test="fuflag != null ">and b.fuflag = #{fuflag}</if>
+ <if test="serialnum != null ">and b.serialnum = #{serialnum}</if>
+ <if test="patno != null ">and b.patno = #{patno}</if>
+ <if test="nurseId != null ">and b.nurse_id = #{nurseId}</if>
+ <if test="nurseName != null and nurseName != ''">and b.nurse_name = #{nurseName}</if>
+ <if test="inhospstate != null ">and b.inhospstate = #{inhospstate}</if>
+ <if test="outWayId != null ">and b.out_way_id = #{outWayId}</if>
+ <if test="outWayName != null ">and b.out_way_name = #{outWayName}</if>
+ <if test="orgid != null ">and b.orgid = #{orgid}</if>
+ </where>
+ limit #{ps} OFFSET #{pn}
+ </select>
+
+
+ <select id="selectPatMedOuthospList" parameterType="com.smartor.domain.PatMedOuthosp"
+ resultMap="PatMedOuthospResult">
+ select
+ outhospno,
+ patno,
+ remark,
+ serialnum,
+ hospitalname,
+ hospitalcode,
+ icd10code,
+ diagname,
+ deptcode,
+ deptname,
+ drcode,
+ drname,
+ admitdate,
+ orgid,
+ update_by,
+ update_time,
+ create_by,
+ create_time,
+ isupload,
+ upload_time,
+ schemestatus,
+ deptid,
+ schemetime,
+ hpi,
+ patname,
+ mainsuit
+ from mzxx
+ <where>
+ <if test="deptname != null and deptname != ''">and deptname like concat('%', #{deptname}, '%')</if>
+ <if test="drname != null and drname != ''">and drname like concat('%', #{drname}, '%')</if>
+ <if test="patname != null and patname != ''">and patname like concat('%', #{patname}, '%')</if>
+ <if test="beginTime != null ">and date_format( admitdate,'%y%m%d') >=
+ date_format(#{beginTime},'%y%m%d')
+ </if>
+ <if test="endTime != null ">and date_format( admitdate,'%y%m%d') <=
+ date_format(#{endTime},'%y%m%d')
+ </if>
+ <if test="patid != null ">and patid = #{patid}</if>
+ <if test="patno != null ">and patno = #{patno}</if>
+ <if test="outhospno != null and outhospno != ''">and outhospno = #{outhospno}</if>
+ <if test="diagcheckFlag != null and diagcheckFlag != ''">and diagcheck_flag = #{diagcheckFlag}</if>
+ </where>
+ </select>
+
+
+ <select id="selectIcd10List" parameterType="com.smartor.domain.Icd10" resultMap="Icd10Result">
+ select
+ icdcode,
+ his_icdid,
+ lastflag,
+ chimedflag,
+ icdname,
+ icdpym
+ from jbxx
+ <where>
+ <if test="icdcode != null and icdcode != ''">and icdcode = #{icdcode}</if>
+ <if test="lastflag != null and lastflag != ''">and lastflag = #{lastflag}</if>
+ <if test="chimedflag != null and chimedflag != ''">and chimedflag = #{chimedflag}</if>
+ <if test="icdname != null and icdname != ''">and icdname like concat('%', #{icdname}, '%')</if>
+ <if test="icdpym != null and icdpym != ''">and icdpym = #{icdpym}</if>
+ <if test="icdwbm != null and icdwbm != ''">and icdwbm = #{icdwbm}</if>
+ <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if>
+ <if test="pid != null ">and pid = #{pid}</if>
+ <if test="guid != null and guid != ''">and guid = #{guid}</if>
+ <if test="hisIcdid != null and hisIcdid != ''">and his_icdid = #{hisIcdid}</if>
+ </where>
+ </select>
+
+
+ <select id="selectUserList" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserResult">
+ select
+ u.title,u.his_user_id, u.searchscope, u.dept_id, u.user_type,
+ u.nick_name, u.user_name, u.email,u.id_card, u.avatar,
+ u.birthday,u.orgid,u.job_phone,u.phonenumber, u.sex, u.status,
+ u.login_ip, u.login_date, u.create_by, u.create_time, u.remark
+ from ryxx u
+ <where>
+ <if test="userId != null and userId != 0">
+ AND u.user_id = #{userId}
+ </if>
+ <if test="userName != null and userName != ''">
+ AND u.user_name like concat('%', #{userName}, '%')
+ </if>
+ <if test="nickName != null and nickName != ''">
+ AND u.nick_name like concat('%', #{nickName}, '%')
+ </if>
+ <if test="status != null and status != ''">
+ AND u.status = #{status}
+ </if>
+ <if test="idCard != null and idCard != ''">
+ AND u.id_card = #{idCard}
+ </if>
+ <if test="title != null and title != ''">
+ AND u.title = #{title}
+ </if>
+ <if test="jobPhone != null and jobPhone != ''">
+ AND u.job_phone = #{jobPhone}
+ </if>
+ <if test="birthday != null and birthday != ''">
+ AND u.birthday = #{birthday}
+ </if>
+ <if test="hisUserId != null and hisUserId != ''">
+ AND u.his_user_id = #{hisUserId}
+ </if>
+ <if test="phonenumber != null and phonenumber != ''">
+ AND u.phonenumber like concat('%', #{phonenumber}, '%')
+ </if>
+ <if test="params.beginTime != null and params.beginTime != ''"><!-- 寮�濮嬫椂闂存绱� -->
+ AND date_format(u.create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
+ </if>
+ <if test="params.endTime != null and params.endTime != ''"><!-- 缁撴潫鏃堕棿妫�绱� -->
+ AND date_format(u.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
+ </if>
+ </where>
+ </select>
+
+ <select id="selectDeptList" parameterType="com.ruoyi.common.core.domain.entity.SysDept" resultMap="SysDeptResult">
+ SELECT d.dept_code,
+ d.TYPE,
+ d.ancestors,
+ d.dept_name,
+ d.order_num,
+ d.leader,
+ d.phone,
+ d.dept_type,
+ d.email,
+ d.status,
+ d.create_by,
+ d.create_time,
+ d.his_dept_id,
+ d.his_parent_id
+ FROM bmxx d
+
+ </select>
+</mapper>
diff --git a/smartor/src/main/resources/mapper/smartor/Icd10Mapper.xml b/smartor/src/main/resources/mapper/smartor/Icd10Mapper.xml
index 3447bc3..ef995e2 100644
--- a/smartor/src/main/resources/mapper/smartor/Icd10Mapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/Icd10Mapper.xml
@@ -131,14 +131,14 @@
#{item.orgid},
#{item.delFlag},
#{item.createBy},
- #{item. createTime},
+ #{item.createTime},
#{item.updateBy},
#{item.updateTime},
#{item.pid},
#{item.guid},
#{item.lastflag},
#{item.chimedflag},
- #{item. hisIcdid,}
+ #{item.hisIcdid}
)
</foreach>
</insert>
diff --git a/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml b/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
index 0314b0c..28364e0 100644
--- a/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
@@ -425,6 +425,9 @@
where inhospid = #{inhospid}
</select>
+
+
+
<insert id="insertPatMedInhosp" parameterType="com.smartor.domain.PatMedInhosp" useGeneratedKeys="true"
keyProperty="inhospid">
insert into pat_med_inhosp
@@ -554,6 +557,40 @@
</trim>
</insert>
+
+ <insert id="insertPatMedInhospBatch" parameterType="java.util.List">
+ insert into pat_med_inhosp (
+ serialnum, hospitalname, hospitalcode, hospitaldistrictcode, hospitaldistrictname,
+ icd10code, diagname, starttime, endtime, deptcode, deptname, roomno, bed_no,
+ orgid, del_flag, update_by, update_time, create_by, create_time, isupload,
+ upload_time, patid, leavediagname, leaveicd10code, drcode, drname,
+ schemestatus, generalschemestatus, leaveldeptcode, leaveldeptname, hospitaldistrictid,
+ leavehospitaldistrictcode, leavehospitaldistrictname, leavehospitaldistrictid,
+ deptid, leaveldeptid, schemetime, patname, patno, inhospstate,
+ deptcheck_flag, wardcheck_flag, diagcheck_flag, long_task_reason,
+ nurse_id, nurse_name, out_way_id, out_way_name, guid,
+ operator, operator_id, inhospno, remark,
+ fuflag, fudate, fuperiod, futypecode, futypedesc, fuadvice, fuspecialadvice
+ )
+ values
+ <foreach collection="list" item="item" separator=",">
+ (
+ #{item.serialnum}, #{item.hospitalname}, #{item.hospitalcode}, #{item.hospitaldistrictcode}, #{item.hospitaldistrictname},
+ #{item.icd10code}, #{item.diagname}, #{item.starttime}, #{item.endtime}, #{item.deptcode}, #{item.deptname}, #{item.roomno}, #{item.bedNo},
+ #{item.orgid}, #{item.delFlag}, #{item.updateBy}, #{item.updateTime}, #{item.createBy}, #{item.createTime}, #{item.isupload},
+ #{item.uploadTime}, #{item.patid}, #{item.leavediagname}, #{item.leaveicd10code}, #{item.drcode}, #{item.drname},
+ #{item.schemestatus}, #{item.generalschemestatus}, #{item.leaveldeptcode}, #{item.leaveldeptname}, #{item.hospitaldistrictid},
+ #{item.leavehospitaldistrictcode}, #{item.leavehospitaldistrictname}, #{item.leavehospitaldistrictid},
+ #{item.deptid}, #{item.leaveldeptid}, #{item.schemetime}, #{item.patname}, #{item.patno}, #{item.inhospstate},
+ #{item.deptcheckFlag}, #{item.wardcheckFlag}, #{item.diagcheckFlag}, #{item.longTaskReason},
+ #{item.nurseId}, #{item.nurseName}, #{item.outWayId}, #{item.outWayName}, #{item.guid},
+ #{item.operator}, #{item.operatorId}, #{item.inhospno}, #{item.remark},
+ #{item.fuflag}, #{item.fudate}, #{item.fuperiod}, #{item.futypecode}, #{item.futypedesc}, #{item.fuadvice}, #{item.fuspecialadvice}
+ )
+ </foreach>
+ </insert>
+
+
<update id="updatePatMedInhosp" parameterType="com.smartor.domain.PatMedInhosp">
update pat_med_inhosp
<trim prefix="SET" suffixOverrides=",">
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
index 72dba4f..b043a6b 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
@@ -170,6 +170,7 @@
leavehospitaldistrictname,
leavediagname,
leaveicd10code,
+ orgid,
visit_type
from service_subtask
</sql>
@@ -414,6 +415,63 @@
and b.patid = #{patid}
</select>
+ <select id="selectTimelyRate" parameterType="com.smartor.domain.ServiceSubtask" resultType="double">
+ SELECT sum( a.finished )/ sum( 1 ) FROM
+ (SELECT id, visit_time, finishtime,
+ (CASE WHEN ( DATE_FORMAT( visit_time, '%y%m%d' )< DATE_FORMAT( IF ( ISNULL( finishtime ), NOW(), finishtime
+ ), '%y%m%d' ) )
+ THEN 1 ELSE 0 END ) finished,1 AS tasknumber FROM service_subtask
+ WHERE del_flag=0
+ <if test="starttime == null and endtime==null">
+ AND visit_time < NOW()
+ </if>
+ <if test="starttime != null and endtime!=null">
+ AND date_format(visit_time,'%y%m%d') >= date_format(#{starttime},'%y%m%d')
+ AND date_format(visit_time,'%y%m%d') <= date_format(#{endtime},'%y%m%d')
+ </if>
+ <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if>
+ <if test="deptcode != null and deptcode != ''">and deptcode = #{deptcode}</if>
+ <if test="deptname != null and deptname != ''">and deptname = #{deptname}</if>
+ <if test="leavehospitaldistrictcode != null and leavehospitaldistrictcode != ''">and
+ leavehospitaldistrictcode = #{leavehospitaldistrictcode}
+ </if>
+ <if test="leavehospitaldistrictname != null and leavehospitaldistrictname != ''">and
+ leavehospitaldistrictname = #{leavehospitaldistrictname}
+ </if>
+ ) a
+ </select>
+
+ <select id="selectTimelyRateDetail" parameterType="com.smartor.domain.ServiceSubtask"
+ resultMap="ServiceSubtaskResult">
+ <include refid="selectServiceSubtaskVo"/>
+ <where>
+ id in (
+ SELECT id FROM
+ (SELECT id, visit_time, finishtime,
+ (CASE WHEN ( DATE_FORMAT( visit_time, '%y%m%d' ) < DATE_FORMAT( IF ( ISNULL( finishtime ), NOW(),
+ finishtime
+ ), '%y%m%d' ) )
+ THEN 1 ELSE 0 END ) finished,1 AS tasknumber FROM service_subtask
+ WHERE del_flag=0
+ -- AND visit_time < NOW()
+ <if test="starttime != null and endtime!=null">
+ AND date_format(visit_time,'%y%m%d') >= date_format(#{starttime},'%y%m%d')
+ AND date_format(visit_time,'%y%m%d') <= date_format(#{endtime},'%y%m%d')
+ </if>
+ <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if>
+ <if test="deptcode != null and deptcode != ''">and deptcode = #{deptcode}</if>
+ <if test="deptname != null and deptname != ''">and deptname = #{deptname}</if>
+ <if test="leavehospitaldistrictcode != null and leavehospitaldistrictcode != ''">and
+ leavehospitaldistrictcode = #{leavehospitaldistrictcode}
+ </if>
+ <if test="leavehospitaldistrictname != null and leavehospitaldistrictname != ''">and
+ leavehospitaldistrictname = #{leavehospitaldistrictname}
+ </if>
+
+ ) a where a.finished =1)
+ </where>
+ </select>
+
<select id="selectServiceSubtaskById" parameterType="Long" resultMap="ServiceSubtaskResult">
<include refid="selectServiceSubtaskVo"/>
where id = #{id}
diff --git a/smartor/src/main/resources/mapper/smartor/SmsRecordsMapper.xml b/smartor/src/main/resources/mapper/smartor/SmsRecordsMapper.xml
deleted file mode 100644
index 7ccb847..0000000
--- a/smartor/src/main/resources/mapper/smartor/SmsRecordsMapper.xml
+++ /dev/null
@@ -1,177 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.smartor.mapper.SmsRecordsMapper">
-
- <resultMap type="SmsRecords" id="SmsRecordsResult">
- <result property="recordid" column="recordid" />
- <result property="userid" column="userid" />
- <result property="username" column="username" />
- <result property="phone" column="phone" />
- <result property="msgno" column="msgno" />
- <result property="msg" column="msg" />
- <result property="inserttime" column="inserttime" />
- <result property="sendtime" column="sendtime" />
- <result property="sendfailedcount" column="sendfailedcount" />
- <result property="resulttime" column="resulttime" />
- <result property="resultmsg" column="resultmsg" />
- <result property="sendstate" column="sendstate" />
- <result property="inserttype" column="inserttype" />
- <result property="insertsystem" column="insertsystem" />
- <result property="insertmodule" column="insertmodule" />
- <result property="moduleid" column="moduleid" />
- <result property="msgidentify" column="msgidentify" />
- <result property="accountid" column="accountid" />
- <result property="orgid" column="orgid" />
- <result property="delFlag" column="del_flag" />
- <result property="updateBy" column="update_by" />
- <result property="updateTime" column="update_time" />
- <result property="createBy" column="create_by" />
- <result property="createTime" column="create_time" />
- <result property="isupload" column="isupload" />
- <result property="uploadTime" column="upload_time" />
- <result property="guid" column="guid" />
- </resultMap>
-
- <sql id="selectSmsRecordsVo">
- select recordid, userid, guid, username, phone, msgno, msg, inserttime, sendtime, sendfailedcount, resulttime, resultmsg, sendstate, inserttype, insertsystem, insertmodule, moduleid, msgidentify, accountid, orgid, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time from sms_records
- </sql>
-
- <select id="selectSmsRecordsList" parameterType="SmsRecords" resultMap="SmsRecordsResult">
- <include refid="selectSmsRecordsVo"/>
- <where>
- <if test="userid != null and userid != ''"> and userid = #{userid}</if>
- <if test="username != null and username != ''"> and username like concat('%', #{username}, '%')</if>
- <if test="phone != null and phone != ''"> and phone = #{phone}</if>
- <if test="msgno != null and msgno != ''"> and msgno = #{msgno}</if>
- <if test="msg != null and msg != ''"> and msg = #{msg}</if>
- <if test="inserttime != null "> and inserttime = #{inserttime}</if>
- <if test="sendtime != null "> and sendtime = #{sendtime}</if>
- <if test="sendfailedcount != null "> and sendfailedcount = #{sendfailedcount}</if>
- <if test="resulttime != null "> and resulttime = #{resulttime}</if>
- <if test="resultmsg != null and resultmsg != ''"> and resultmsg = #{resultmsg}</if>
- <if test="sendstate != null "> and sendstate = #{sendstate}</if>
- <if test="inserttype != null "> and inserttype = #{inserttype}</if>
- <if test="insertsystem != null "> and insertsystem = #{insertsystem}</if>
- <if test="insertmodule != null and insertmodule != ''"> and insertmodule = #{insertmodule}</if>
- <if test="moduleid != null and moduleid != ''"> and moduleid = #{moduleid}</if>
- <if test="msgidentify != null and msgidentify != ''"> and msgidentify = #{msgidentify}</if>
- <if test="accountid != null "> and accountid = #{accountid}</if>
- <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
- <if test="isupload != null "> and isupload = #{isupload}</if>
- <if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
- </where>
- </select>
-
- <select id="selectSmsRecordsByRecordid" parameterType="Long" resultMap="SmsRecordsResult">
- <include refid="selectSmsRecordsVo"/>
- where recordid = #{recordid}
- </select>
-
- <insert id="insertSmsRecords" parameterType="SmsRecords">
- insert into sms_records
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="recordid != null">recordid,</if>
- <if test="userid != null">userid,</if>
- <if test="username != null">username,</if>
- <if test="phone != null">phone,</if>
- <if test="msgno != null">msgno,</if>
- <if test="msg != null">msg,</if>
- <if test="inserttime != null">inserttime,</if>
- <if test="sendtime != null">sendtime,</if>
- <if test="sendfailedcount != null">sendfailedcount,</if>
- <if test="resulttime != null">resulttime,</if>
- <if test="resultmsg != null">resultmsg,</if>
- <if test="sendstate != null">sendstate,</if>
- <if test="inserttype != null">inserttype,</if>
- <if test="insertsystem != null">insertsystem,</if>
- <if test="insertmodule != null">insertmodule,</if>
- <if test="moduleid != null">moduleid,</if>
- <if test="msgidentify != null">msgidentify,</if>
- <if test="accountid != null">accountid,</if>
- <if test="orgid != null">orgid,</if>
- <if test="delFlag != null">del_flag,</if>
- <if test="updateBy != null">update_by,</if>
- <if test="updateTime != null">update_time,</if>
- <if test="createBy != null">create_by,</if>
- <if test="createTime != null">create_time,</if>
- <if test="isupload != null">isupload,</if>
- <if test="uploadTime != null">upload_time,</if>
- <if test="guid != null">guid,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="recordid != null">#{recordid},</if>
- <if test="userid != null">#{userid},</if>
- <if test="username != null">#{username},</if>
- <if test="phone != null">#{phone},</if>
- <if test="msgno != null">#{msgno},</if>
- <if test="msg != null">#{msg},</if>
- <if test="inserttime != null">#{inserttime},</if>
- <if test="sendtime != null">#{sendtime},</if>
- <if test="sendfailedcount != null">#{sendfailedcount},</if>
- <if test="resulttime != null">#{resulttime},</if>
- <if test="resultmsg != null">#{resultmsg},</if>
- <if test="sendstate != null">#{sendstate},</if>
- <if test="inserttype != null">#{inserttype},</if>
- <if test="insertsystem != null">#{insertsystem},</if>
- <if test="insertmodule != null">#{insertmodule},</if>
- <if test="moduleid != null">#{moduleid},</if>
- <if test="msgidentify != null">#{msgidentify},</if>
- <if test="accountid != null">#{accountid},</if>
- <if test="orgid != null">#{orgid},</if>
- <if test="delFlag != null">#{delFlag},</if>
- <if test="updateBy != null">#{updateBy},</if>
- <if test="updateTime != null">#{updateTime},</if>
- <if test="createBy != null">#{createBy},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="isupload != null">#{isupload},</if>
- <if test="uploadTime != null">#{uploadTime},</if>
- <if test="guid != null">#{guid},</if>
- </trim>
- </insert>
-
- <update id="updateSmsRecords" parameterType="SmsRecords">
- update sms_records
- <trim prefix="SET" suffixOverrides=",">
- <if test="userid != null">userid = #{userid},</if>
- <if test="username != null">username = #{username},</if>
- <if test="phone != null">phone = #{phone},</if>
- <if test="msgno != null">msgno = #{msgno},</if>
- <if test="msg != null">msg = #{msg},</if>
- <if test="inserttime != null">inserttime = #{inserttime},</if>
- <if test="sendtime != null">sendtime = #{sendtime},</if>
- <if test="sendfailedcount != null">sendfailedcount = #{sendfailedcount},</if>
- <if test="resulttime != null">resulttime = #{resulttime},</if>
- <if test="resultmsg != null">resultmsg = #{resultmsg},</if>
- <if test="sendstate != null">sendstate = #{sendstate},</if>
- <if test="inserttype != null">inserttype = #{inserttype},</if>
- <if test="insertsystem != null">insertsystem = #{insertsystem},</if>
- <if test="insertmodule != null">insertmodule = #{insertmodule},</if>
- <if test="moduleid != null">moduleid = #{moduleid},</if>
- <if test="msgidentify != null">msgidentify = #{msgidentify},</if>
- <if test="accountid != null">accountid = #{accountid},</if>
- <if test="orgid != null">orgid = #{orgid},</if>
- <if test="delFlag != null">del_flag = #{delFlag},</if>
- <if test="updateBy != null">update_by = #{updateBy},</if>
- <if test="updateTime != null">update_time = #{updateTime},</if>
- <if test="createBy != null">create_by = #{createBy},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="isupload != null">isupload = #{isupload},</if>
- <if test="uploadTime != null">upload_time = #{uploadTime},</if>
- <if test="guid != null">guid = #{guid},</if>
- </trim>
- where recordid = #{recordid}
- </update>
-
- <delete id="deleteSmsRecordsByRecordid" parameterType="Long">
- delete from sms_records where recordid = #{recordid}
- </delete>
-
- <delete id="deleteSmsRecordsByRecordids" parameterType="String">
- delete from sms_records where recordid in
- <foreach item="recordid" collection="array" open="(" separator="," close=")">
- #{recordid}
- </foreach>
- </delete>
-</mapper>
--
Gitblit v1.9.3