From 63e17909e1eee7ff54c38827a4096cbad82e5dad Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期二, 16 四月 2024 11:56:55 +0800
Subject: [PATCH] 代码提交
---
smartor/src/main/java/com/smartor/domain/TestVo.java | 32 +
smartor/src/main/java/com/smartor/mapper/IvrTaskSingleMapper.java | 63 ++
smartor/src/main/java/com/smartor/mapper/PatMedOuthospMapper.java | 18
smartor/src/main/resources/mapper/smartor/PatMedOuthospMapper.xml | 129 ++-
smartor/src/main/java/com/smartor/domain/IvrTaskSingle.java | 54 +
smartor/src/main/java/com/smartor/mapper/PatMedInhospMapper.java | 20
smartor/src/main/java/com/smartor/domain/IvrTaskSingleVO.java | 45 +
smartor/src/main/java/com/smartor/mapper/IvrTaskMapper.java | 18
smartor/src/main/java/com/smartor/domain/PatMedOuthosp.java | 318 ++-------
/dev/null | 66 --
smartor/src/main/java/com/smartor/service/IIvrTaskService.java | 20
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrLibaTemplateController.java | 19
smartor/src/main/java/com/smartor/service/IIvrTaskSingleService.java | 24
smartor/src/main/java/com/smartor/service/impl/IvrTaskServiceImpl.java | 55 +
ruoyi-admin/src/main/java/com/ruoyi/web/task/PhoneTask.java | 62 +
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrTaskController.java | 67 +
smartor/src/main/java/com/smartor/domain/IvrVisitInfoVo.java | 148 ++++
smartor/src/main/java/com/smartor/service/impl/IvrTaskSingleServiceImpl.java | 129 +++-
smartor/src/main/java/com/smartor/domain/IvrTaskVO.java | 192 ++++++
ruoyi-admin/src/main/java/com/ruoyi/web/component/RabbitMqReceiver.java | 71 +
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrTaskcallController.java | 40
smartor/src/main/resources/mapper/smartor/IvrTaskSingleMapper.xml | 52 +
smartor/src/main/java/com/smartor/domain/Test1Vo.java | 16
smartor/src/main/resources/mapper/smartor/IvrTaskMapper.xml | 192 +++--
24 files changed, 1,212 insertions(+), 638 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/component/RabbitMqReceiver.java b/ruoyi-admin/src/main/java/com/ruoyi/web/component/RabbitMqReceiver.java
index 4208bc2..fa8a7ec 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/component/RabbitMqReceiver.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/component/RabbitMqReceiver.java
@@ -3,21 +3,23 @@
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.ruoyi.common.core.redis.RedisCache;
-import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.web.task.PhoneTask;
import com.smartor.config.RabbitMqConfig;
import com.smartor.domain.IvrLibaTemplateVO;
-import com.smartor.domain.IvrTaskcall;
+import com.smartor.domain.IvrTaskSingle;
import com.smartor.domain.IvrTaskcallMQ;
-import com.smartor.mapper.IvrTaskcallMapper;
+import com.smartor.mapper.IvrTaskSingleMapper;
import com.smartor.service.IIvrLibaTemplateService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;
-import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
+import org.springframework.amqp.rabbit.config.SimpleRabbitListenerContainerFactory;
+import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
import com.rabbitmq.client.Channel;
+import org.springframework.amqp.rabbit.connection.ConnectionFactory;
import java.io.IOException;
import java.util.List;
@@ -30,7 +32,7 @@
private static IIvrLibaTemplateService ivrLibaTemplateService;
- private static IvrTaskcallMapper ivrTaskcallMapper;
+ private static IvrTaskSingleMapper ivrTaskcallMapper;
private static RedisCache redisCache;
@@ -44,7 +46,7 @@
}
@Autowired
- public void setIvrTaskcallMapper(IvrTaskcallMapper ivrTaskcallMapper) {
+ public void setIvrTaskcallMapper(IvrTaskSingleMapper ivrTaskcallMapper) {
RabbitMqReceiver.ivrTaskcallMapper = ivrTaskcallMapper;
}
@@ -78,31 +80,32 @@
*/
@RabbitListener(queues = RabbitMqConfig.phone_queue, concurrency = "50")
public void phoneVisit(String content, Message message, Channel channel) throws IOException {
-// System.out.println(content);
-// IvrTaskcallMQ ivrTaskcallMQ = null;
-// ObjectMapper mapper = new ObjectMapper();
-// try {
-// ivrTaskcallMQ = mapper.readValue(content, IvrTaskcallMQ.class);
-// } catch (JsonProcessingException e) {
-// e.printStackTrace();
-// }
-// //閫氳繃妯℃澘ID鑾峰彇妯℃澘闂
-// IvrLibaTemplateVO ivrLibaTemplateVO = new IvrLibaTemplateVO();
-// ivrLibaTemplateVO.setID(Long.valueOf(ivrTaskcallMQ.getTemplateid()));
-// IvrLibaTemplateVO ivrLibaTemplateVO1 = ivrLibaTemplateService.selectInfoByCondition(ivrLibaTemplateVO);
-//
-// //閫氳繃浠诲姟ID鎷垮埌鎮h�呬俊鎭�
-// IvrTaskcall ivrTaskcall = new IvrTaskcall();
-// ivrTaskcall.setTaskid(ivrTaskcallMQ.getTaskid());
-// List<IvrTaskcall> ivrTaskcalls = ivrTaskcallMapper.selectIvrTaskcallList(ivrTaskcall);
-//
-// for (IvrTaskcall ivrTaskcall1 : ivrTaskcalls) {
-// //閫氳繃澶氱嚎绋嬬殑鏂瑰紡鍘绘墦鐢佃瘽
-// executorService.submit(new PhoneTask(ivrTaskcall1, ivrLibaTemplateVO1, redisCache));
-// }
- //閫氱煡 MQ 娑堟伅宸茶鎺ユ敹,鍙互ACK(浠庨槦鍒椾腑鍒犻櫎)浜� 锛堣繖涓渶瑕佹牴鎹笟鍔″啀鍘诲鐞咥CK锛�
- channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
try {
+ IvrTaskcallMQ ivrTaskcallMQ = null;
+
+ ObjectMapper mapper = new ObjectMapper();
+ try {
+ ivrTaskcallMQ = mapper.readValue("{" + content + "}", IvrTaskcallMQ.class);
+ } catch (JsonProcessingException e) {
+ e.printStackTrace();
+ }
+ //閫氳繃妯℃澘ID鑾峰彇妯℃澘闂
+ IvrLibaTemplateVO ivrLibaTemplateVO = new IvrLibaTemplateVO();
+ ivrLibaTemplateVO.setID(Long.valueOf(ivrTaskcallMQ.getTemplateid()));
+ IvrLibaTemplateVO ivrLibaTemplateVO1 = ivrLibaTemplateService.selectInfoByCondition(ivrLibaTemplateVO);
+
+ //閫氳繃浠诲姟ID鎷垮埌鎮h�呬俊鎭�
+ IvrTaskSingle ivrTaskcall = new IvrTaskSingle();
+ ivrTaskcall.setTaskid(ivrTaskcallMQ.getTaskid());
+ List<IvrTaskSingle> ivrTaskcalls = ivrTaskcallMapper.selectIvrTaskcallList(ivrTaskcall);
+
+ for (IvrTaskSingle ivrTaskcall1 : ivrTaskcalls) {
+ //閫氳繃澶氱嚎绋嬬殑鏂瑰紡鍘绘墦鐢佃瘽
+ executorService.submit(new PhoneTask(ivrTaskcall1, ivrLibaTemplateVO1, redisCache, channel, message));
+ }
+ //閫氱煡 MQ 娑堟伅宸茶鎺ユ敹,鍙互ACK(浠庨槦鍒椾腑鍒犻櫎)浜� 锛堣繖涓渶瑕佹牴鎹笟鍔″啀鍘诲鐞咥CK锛�
+ channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
+
log.info("=============Do Something==============");
} catch (Exception e) {
log.error("============娑堣垂澶辫触,灏濊瘯娑堟伅琛ュ彂鍐嶆娑堣垂!==============");
@@ -115,4 +118,12 @@
channel.basicRecover(false);
}
}
+
+ @Bean
+ public SimpleRabbitListenerContainerFactory jsonContainerFactory(ConnectionFactory connectionFactory) {
+ SimpleRabbitListenerContainerFactory factory = new SimpleRabbitListenerContainerFactory();
+ factory.setConnectionFactory(connectionFactory);
+ factory.setMessageConverter(new Jackson2JsonMessageConverter());
+ return factory;
+ }
}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrLibaTemplateController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrLibaTemplateController.java
index 250db7d..19a3480 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrLibaTemplateController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrLibaTemplateController.java
@@ -1,5 +1,7 @@
package com.ruoyi.web.controller.smartor;
+import com.alibaba.fastjson2.JSON;
+import com.google.gson.Gson;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
@@ -10,6 +12,7 @@
import com.smartor.config.RabbitMqConfig;
import com.smartor.domain.IvrLibaTemplate;
import com.smartor.domain.IvrLibaTemplateVO;
+import com.smartor.domain.Test1Vo;
import com.smartor.service.IIvrLibaTemplateService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -17,6 +20,7 @@
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.amqp.AmqpException;
import org.springframework.amqp.core.Message;
+import org.springframework.amqp.core.MessageBuilder;
import org.springframework.amqp.core.MessagePostProcessor;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
@@ -24,7 +28,9 @@
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* 闅忚妯℃澘搴揅ontroller
@@ -139,8 +145,8 @@
/**
* 寮�濮嬫墽琛�(娴嬭瘯鐢�)
*/
- @GetMapping("/queryRabbitmq")
- public AjaxResult queryRabbitmq(@RequestParam("routintKey") String routintKey, @RequestParam("content") String content, @RequestParam("times") Long times) {
+ @PostMapping("/queryRabbitmq")
+ public AjaxResult queryRabbitmq(@RequestBody Test1Vo test1Vo) {
// rabbitTemplate.convertAndSend(RabbitMqConfig.EXCHANGE_NAME, "phone.001", "娴嬭瘯鏁版嵁001");
// rabbitTemplate.convertAndSend(RabbitMqConfig.EXCHANGE_NAME, "phone.002", "娴嬭瘯鏁版嵁002");
@@ -156,12 +162,15 @@
// });
log.info("-------------鍚姩鍜ㄨ搴旂瓟瓒呮椂鎻愰啋寤惰繜闃熷垪-------------");
- this.rabbitTemplate.convertAndSend(RabbitMqConfig.phone_exchange, RabbitMqConfig.routing_key, content, message -> {
+ String data = JSON.toJSONString(test1Vo.getTestVo());
+ String substring = data.substring(1, data.length() - 1);
+
+ this.rabbitTemplate.convertAndSend(RabbitMqConfig.phone_exchange, RabbitMqConfig.routing_key, substring, message -> {
//娉ㄦ剰杩欓噷鏃堕棿鍙互浣縧ong锛岃�屼笖鏄缃甴eader
- message.getMessageProperties().setHeader("x-delay", times);
+ message.getMessageProperties().setHeader("x-delay", test1Vo.getTimes());
return message;
});
- log.info("-------------寤惰繜闃熷垪{}ms鍚庢墽琛�.-------------", times);
+ log.info("-------------寤惰繜闃熷垪{}ms鍚庢墽琛�.-------------", test1Vo.getTimes());
return success();
}
}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrTaskController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrTaskController.java
index c7cdda1..98a7db5 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrTaskController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrTaskController.java
@@ -1,19 +1,26 @@
-package com.smartor.controller;
+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.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.DtoConversionUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.smartor.domain.IvrTask;
+import com.smartor.domain.IvrTaskVO;
+import com.smartor.domain.IvrTaskSingle;
import com.smartor.service.IIvrTaskService;
+import com.smartor.service.IIvrTaskSingleService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
+import java.util.stream.Collectors;
/**
* 闅忚浠诲姟Controller
@@ -21,26 +28,45 @@
* @author smartor
* @date 2023-03-24
*/
+@Api(description = "闅忚浠诲姟")
@RestController
@RequestMapping("/smartor/ivrtask")
public class IvrTaskController extends BaseController {
@Autowired
private IIvrTaskService ivrTaskService;
+ @Autowired
+ private IIvrTaskSingleService iIvrTaskCallService;
+
/**
* 鏌ヨ璇煶浠诲姟鍒楄〃
*/
+ @ApiOperation("鏌ヨ璇煶浠诲姟鍒楄〃")
@PreAuthorize("@ss.hasPermi('smartor:ivrtask:list')")
@PostMapping("/list")
public TableDataInfo list(@RequestBody IvrTask ivrTask) {
startPage();
List<IvrTask> list = ivrTaskService.selectIvrTaskList(ivrTask);
- return getDataTable(list);
+ List<IvrTaskVO> ivrTaskVOS = DtoConversionUtils.sourceToTarget(list, IvrTaskVO.class);
+ for (IvrTaskVO ivrTaskVO : ivrTaskVOS) {
+ IvrTaskSingle ivrTaskcall = new IvrTaskSingle();
+ ivrTaskcall.setTaskid(ivrTaskVO.getTaskid());
+ List<IvrTaskSingle> ivrTaskcalls = iIvrTaskCallService.selectIvrTaskcallList(ivrTaskcall);
+ //宸插彂閫�
+ long yfs = ivrTaskcalls.stream().filter(ivrTaskcall1 -> ivrTaskcall1.getSendstate() == 3L).collect(Collectors.toList()).stream().count();
+ //鏈彂閫�
+ long wfs = ivrTaskcalls.stream().filter(ivrTaskcall1 -> ivrTaskcall1.getSendstate() == 2L).collect(Collectors.toList()).stream().count();
+ ivrTaskVO.setYfs(yfs);
+ ivrTaskVO.setWfs(wfs);
+ }
+
+ return getDataTable(ivrTaskVOS);
}
/**
- * 瀵煎嚭璇煶浠诲姟鍒楄〃
+ * 瀵煎嚭浠诲姟鍒楄〃
*/
+ @ApiOperation("瀵煎嚭浠诲姟鍒楄〃")
@PreAuthorize("@ss.hasPermi('smartor:ivrtask:export')")
@Log(title = "璇煶浠诲姟", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@@ -51,8 +77,9 @@
}
/**
- * 鑾峰彇璇煶浠诲姟璇︾粏淇℃伅
+ * 鑾峰彇浠诲姟璇︾粏淇℃伅
*/
+ @ApiOperation("鑾峰彇浠诲姟璇︾粏淇℃伅")
@PreAuthorize("@ss.hasPermi('smartor:ivrtask:query')")
@GetMapping(value = "/{taskid}")
public AjaxResult getInfo(@PathVariable("taskid") Long taskid) {
@@ -60,8 +87,9 @@
}
/**
- * 鏂板璇煶浠诲姟
+ * 鏂板浠诲姟
*/
+ @ApiOperation("鏂板浠诲姟")
@PreAuthorize("@ss.hasPermi('smartor:ivrtask:add')")
@Log(title = "璇煶浠诲姟", businessType = BusinessType.INSERT)
@PostMapping("/add")
@@ -72,20 +100,39 @@
/**
* 淇敼璇煶浠诲姟
*/
+ @ApiOperation("淇敼浠诲姟")
@PreAuthorize("@ss.hasPermi('smartor:ivrtask:edit')")
- @Log(title = "璇煶浠诲姟", businessType = BusinessType.UPDATE)
+ @Log(title = "浠诲姟", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
public AjaxResult edit(@RequestBody IvrTask ivrTask) {
return toAjax(ivrTaskService.updateIvrTask(ivrTask));
}
+// /**
+// * 鍒犻櫎璇煶浠诲姟
+// */
+// @ApiOperation("鍒犻櫎浠诲姟")
+// @PreAuthorize("@ss.hasPermi('smartor:ivrtask:remove')")
+// @Log(title = "璇煶浠诲姟", businessType = BusinessType.DELETE)
+// @GetMapping("/remove/{taskids}")
+// public AjaxResult remove(@PathVariable Long[] taskids) {
+// return toAjax(ivrTaskService.deleteIvrTaskByTaskids(taskids));
+// }
+//
+
/**
- * 鍒犻櫎璇煶浠诲姟
+ * 鍒犻櫎浠诲姟(鍖呮嫭瀹冨搴旂殑鎮h�呬俊鎭�)
*/
+ @ApiOperation("鍒犻櫎浠诲姟(鍖呮嫭瀹冨搴旂殑鎮h�呬俊鎭�)")
@PreAuthorize("@ss.hasPermi('smartor:ivrtask:remove')")
@Log(title = "璇煶浠诲姟", businessType = BusinessType.DELETE)
- @GetMapping("/remove/{taskids}")
- public AjaxResult remove(@PathVariable Long[] taskids) {
- return toAjax(ivrTaskService.deleteIvrTaskByTaskids(taskids));
+ @GetMapping("/remove/{removeTask}")
+ public AjaxResult removeTask(@PathVariable Long taskId) {
+ return toAjax(ivrTaskService.deleteIvrTaskByTaskid(taskId));
}
+
+
+
+
+
}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrTaskcallController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrTaskcallController.java
index e4a0f9f..addc3e8 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrTaskcallController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrTaskcallController.java
@@ -2,19 +2,17 @@
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
-import com.google.gson.Gson;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
-import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.DtoConversionUtils;
import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.smartor.domain.*;
-import com.smartor.service.IIvrTaskcallService;
+import com.smartor.service.IIvrTaskSingleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
@@ -34,21 +32,21 @@
*/
@Api(description = "鍗曚竴浠诲姟锛堥殢璁垮鏁欙級")
@RestController
-@RequestMapping("/smartor/taskcall")
+@RequestMapping("/smartor/tasksingle")
public class IvrTaskcallController extends BaseController {
@Autowired
- private IIvrTaskcallService ivrTaskcallService;
+ private IIvrTaskSingleService ivrTaskcallService;
+
/**
- * 鏌ヨ鍗曚竴浠诲姟锛堥殢璁匡級鍒楄〃
+ * 鏌ヨ鎮h�呴殢璁夸俊鎭�
*/
- @ApiOperation("鏌ヨ鍗曚竴浠诲姟锛堥殢璁垮鏁欙級鍒楄〃")
+ @ApiOperation("鏌ヨ鎮h�呴殢璁夸俊鎭�")
@PreAuthorize("@ss.hasPermi('system:taskcall:list')")
- @PostMapping("/list")
- public TableDataInfo list(@RequestBody IvrTaskcall ivrTaskcall) {
+ @PostMapping("/patItem")
+ public TableDataInfo patItem(@RequestBody IvrTaskSingle ivrTaskcall) {
PageUtils.startPageByPost(ivrTaskcall.getPageNum(), ivrTaskcall.getPageSize());
- List<IvrTaskcall> list = ivrTaskcallService.selectIvrTaskcallList(ivrTaskcall);
- return getDataTable(list);
+ return getDataTable(ivrTaskcallService.patItem(ivrTaskcall));
}
/**
@@ -57,9 +55,9 @@
@PreAuthorize("@ss.hasPermi('system:taskcall:export')")
@Log(title = "鍗曚竴浠诲姟锛堥殢璁垮鏁欙級", businessType = BusinessType.EXPORT)
@PostMapping("/export")
- public void export(HttpServletResponse response, IvrTaskcall ivrTaskcall) {
- List<IvrTaskcall> list = ivrTaskcallService.selectIvrTaskcallList(ivrTaskcall);
- ExcelUtil<IvrTaskcall> util = new ExcelUtil<IvrTaskcall>(IvrTaskcall.class);
+ public void export(HttpServletResponse response, IvrTaskSingle ivrTaskcall) {
+ List<IvrTaskSingle> list = ivrTaskcallService.selectIvrTaskcallList(ivrTaskcall);
+ ExcelUtil<IvrTaskSingle> util = new ExcelUtil<IvrTaskSingle>(IvrTaskSingle.class);
util.exportExcel(response, list, "鍗曚竴浠诲姟锛堥殢璁匡級鏁版嵁");
}
@@ -79,7 +77,7 @@
@PreAuthorize("@ss.hasPermi('system:task:add')")
@Log(title = "鍗曚竴浠诲姟锛堥殢璁匡級", businessType = BusinessType.INSERT)
@PostMapping("/insertOrUpdateTask")
- public AjaxResult insertOrUpdateHeTask(@RequestBody IvrTaskcallVO ivrTaskcallVO) {
+ public AjaxResult insertOrUpdateHeTask(@RequestBody IvrTaskSingleVO ivrTaskcallVO) {
return toAjax(ivrTaskcallService.insertOrUpdateTask(ivrTaskcallVO));
}
@@ -89,16 +87,16 @@
*/
@ApiOperation("鏍规嵁鏉′欢鏌ヨ浠诲姟淇℃伅")
@PostMapping("/queryTaskByCondition")
- public AjaxResult queryTaskByCondition(@RequestBody IvrTaskcallVO ivrTaskcallVO) {
+ public AjaxResult queryTaskByCondition(@RequestBody IvrTaskSingleVO ivrTaskcallVO) {
//鏍规嵁鍏ュ弬鏌ヨ淇℃伅
- IvrTaskcall ivrTaskcall = DtoConversionUtils.sourceToTarget(ivrTaskcallVO, IvrTaskcall.class);
- List<IvrTaskcall> list = ivrTaskcallService.selectIvrTaskcallList(ivrTaskcall);
+ IvrTaskSingle ivrTaskcall = DtoConversionUtils.sourceToTarget(ivrTaskcallVO, IvrTaskSingle.class);
+ List<IvrTaskSingle> list = ivrTaskcallService.selectIvrTaskcallList(ivrTaskcall);
//瀹氫箟鎮h�呬笌鍗曚竴浠诲姟鍏宠仈琛ㄩ泦鍚�
List<PatTaskRelevance> patTaskRelevances = new ArrayList<>();
//灏嗘煡鍑烘潵鐨勬暟鎹�掑叆IvrTaskcallVO涓�
- IvrTaskcallVO ivrTaskcallVO2 = DtoConversionUtils.sourceToTarget(list.get(0), IvrTaskcallVO.class);
+ IvrTaskSingleVO ivrTaskcallVO2 = DtoConversionUtils.sourceToTarget(list.get(0), IvrTaskSingleVO.class);
String sendTimeSlot = list.get(0).getSendTimeSlot();
ObjectMapper objectMapper = new ObjectMapper();
try {
@@ -116,7 +114,7 @@
e.printStackTrace();
}
- for (IvrTaskcall ivrTaskcall1 : list) {
+ for (IvrTaskSingle ivrTaskcall1 : list) {
PatTaskRelevance patTaskRelevance = new PatTaskRelevance();
//鑾峰彇鍒版偅鑰呬俊鎭紝骞舵斁鍏ュ埌闆嗗悎涓�
patTaskRelevance.setName(ivrTaskcall1.getSendname());
@@ -137,7 +135,7 @@
*/
@ApiOperation("浠诲姟鍙戦�佹墽琛�")
@PostMapping("/heTaskSend")
- public AjaxResult heTaskSend(@RequestBody IvrTaskcallVO ivrTaskcallVO) {
+ public AjaxResult heTaskSend(@RequestBody IvrTaskSingleVO ivrTaskcallVO) {
return toAjax(ivrTaskcallService.heTaskSend(ivrTaskcallVO));
}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/task/PhoneTask.java b/ruoyi-admin/src/main/java/com/ruoyi/web/task/PhoneTask.java
index 2d8ef9f..b228061 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/task/PhoneTask.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/task/PhoneTask.java
@@ -1,57 +1,71 @@
package com.ruoyi.web.task;
+import com.rabbitmq.client.Channel;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.utils.uuid.IdUtils;
import com.smartor.config.PhoneUtils;
import com.smartor.domain.IvrLibaTemplateScriptVO;
import com.smartor.domain.IvrLibaTemplateVO;
-import com.smartor.domain.IvrTaskcall;
+import com.smartor.domain.IvrTaskSingle;
import com.smartor.domain.QuestionMessage;
+import org.springframework.amqp.core.Message;
+import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
public class PhoneTask implements Runnable {
- private IvrTaskcall ivrTaskcall;
+ private IvrTaskSingle ivrTaskcall;
private List<IvrLibaTemplateScriptVO> ivrLibaTemplateScriptVO;
private RedisCache redisCache;
private IvrLibaTemplateVO ivrLibaTemplateVO;
+ private Channel channel;
+ private Message message;
- public PhoneTask(IvrTaskcall ivrTaskcall, IvrLibaTemplateVO ivrLibaTemplateVO, RedisCache redisCache) {
+ public PhoneTask(IvrTaskSingle ivrTaskcall, IvrLibaTemplateVO ivrLibaTemplateVO, RedisCache redisCache, Channel channel, Message message) {
this.ivrTaskcall = ivrTaskcall;
this.ivrLibaTemplateScriptVO = ivrLibaTemplateVO.getIvrLibaTemplateScriptVOList();
this.ivrLibaTemplateVO = ivrLibaTemplateVO;
this.redisCache = redisCache;
+ this.channel = channel;
+ this.message = message;
}
@Override
public void run() {
- //鑾峰彇鐢佃瘽缁勶紝鏌ョ湅鍝簺鐢佃瘽鍙互浣跨敤
- PhoneUtils phoneUtils = new PhoneUtils();
- String uuid = IdUtils.randomUUID();
- Map<String, Object> objectMap = new HashMap<>();
- objectMap.put("ivrTaskcall", ivrTaskcall);
- objectMap.put("ivrLibaTemplateScriptVO", ivrLibaTemplateScriptVO);
- //灏嗘暟鎹斁鍒皉edis涓紝鏂逛究鍦ㄥ洖璋冩柟娉曢噷鑾峰彇
- redisCache.setCacheObject(uuid, objectMap, 120, TimeUnit.MINUTES);
+ try {
+ //鑾峰彇鐢佃瘽缁勶紝鏌ョ湅鍝簺鐢佃瘽鍙互浣跨敤
+ PhoneUtils phoneUtils = new PhoneUtils();
+ String uuid = IdUtils.randomUUID();
+ Map<String, Object> objectMap = new HashMap<>();
+ objectMap.put("ivrTaskcall", ivrTaskcall);
+ objectMap.put("ivrLibaTemplateScriptVO", ivrLibaTemplateScriptVO);
+ //灏嗘暟鎹斁鍒皉edis涓紝鏂逛究鍦ㄥ洖璋冩柟娉曢噷鑾峰彇
+ redisCache.setCacheObject(uuid, objectMap, 120, TimeUnit.MINUTES);
- //璁板綍棣栨闂
- QuestionMessage returnQues = new QuestionMessage();
- returnQues.setKcb(ivrLibaTemplateVO.getRevisitBefore());
- for (IvrLibaTemplateScriptVO ivrLibaTemplateScriptVO : ivrLibaTemplateScriptVO) {
- if (ivrLibaTemplateScriptVO.getTargetid() == ivrLibaTemplateVO.getFirstQuestionNum().intValue()) {
- returnQues.setNowQuestion(ivrLibaTemplateScriptVO);
+ //璁板綍棣栨闂
+ QuestionMessage returnQues = new QuestionMessage();
+ returnQues.setKcb(ivrLibaTemplateVO.getRevisitBefore());
+ for (IvrLibaTemplateScriptVO ivrLibaTemplateScriptVO : ivrLibaTemplateScriptVO) {
+ if (ivrLibaTemplateScriptVO.getTargetid() == ivrLibaTemplateVO.getFirstQuestionNum().intValue()) {
+ returnQues.setNowQuestion(ivrLibaTemplateScriptVO);
+ }
}
- }
- returnQues.setQuestionList(ivrLibaTemplateScriptVO);
- //灏嗛棶棰橈紝鍜屾ā鏉夸俊鎭斁鍒皉edis涓�
- redisCache.setCacheObject(uuid + "returnQues", returnQues, 120, TimeUnit.MINUTES);
- redisCache.setCacheObject(uuid + "ivrLibaTemplateVO", ivrLibaTemplateVO, 120, TimeUnit.MINUTES);
+ returnQues.setQuestionList(ivrLibaTemplateScriptVO);
+ //灏嗛棶棰橈紝鍜屾ā鏉夸俊鎭斁鍒皉edis涓�
+ redisCache.setCacheObject(uuid + "returnQues", returnQues, 120, TimeUnit.MINUTES);
+ redisCache.setCacheObject(uuid + "ivrLibaTemplateVO", ivrLibaTemplateVO, 120, TimeUnit.MINUTES);
- //璋冪敤鏈哄櫒浜虹數璇濓紝寮�濮嬬數璇濓紙闇�瑕佸皢鍥炶皟鏂规硶浼犲叆锛岃繖涓瓑鈥濈數璇濇柟鈥滃憡璇夋�庝箞浼狅紝鐜板湪鍏堢┖鐫�,杩樻湁绗竴鍙ラ棶棰樿瘽鏈級
- phoneUtils.ob(uuid, null, ivrTaskcall.getPhone(), null, null, null, null, null, null, null, null);
+ //璋冪敤鏈哄櫒浜虹數璇濓紝寮�濮嬬數璇濓紙闇�瑕佸皢鍥炶皟鏂规硶浼犲叆锛岃繖涓瓑鈥濈數璇濇柟鈥滃憡璇夋�庝箞浼狅紝鐜板湪鍏堢┖鐫�,杩樻湁绗竴鍙ラ棶棰樿瘽鏈級
+ phoneUtils.ob(uuid, null, ivrTaskcall.getPhone(), null, null, null, null, null, null, null, null);
+ //閫氱煡 MQ 娑堟伅宸茶鎺ユ敹,鍙互ACK(浠庨槦鍒椾腑鍒犻櫎)浜� 锛堣繖涓渶瑕佹牴鎹笟鍔″啀鍘诲鐞咥CK锛�
+
+ channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
}
diff --git a/smartor/src/main/java/com/smartor/domain/IvrTaskcall.java b/smartor/src/main/java/com/smartor/domain/IvrTaskSingle.java
similarity index 85%
rename from smartor/src/main/java/com/smartor/domain/IvrTaskcall.java
rename to smartor/src/main/java/com/smartor/domain/IvrTaskSingle.java
index 18a690a..b17b6da 100644
--- a/smartor/src/main/java/com/smartor/domain/IvrTaskcall.java
+++ b/smartor/src/main/java/com/smartor/domain/IvrTaskSingle.java
@@ -1,13 +1,10 @@
package com.smartor.domain;
import java.util.Date;
-import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
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;
@@ -18,7 +15,7 @@
* @date 2024-02-02
*/
@Data
-public class IvrTaskcall extends BaseEntity {
+public class IvrTaskSingle extends BaseEntity {
@ApiModelProperty(value = "鎷夊彇鏃堕棿")
private static final long serialVersionUID = 1L;
@@ -86,8 +83,8 @@
/**
* 浠诲姟绫诲瀷(闂ㄨ瘖锛屼綇闄紝澶嶈瘖鈥�)
*/
- @Excel(name = "浠诲姟绫诲瀷(闂ㄨ瘖锛屼綇闄紝澶嶈瘖鈥�)")
- @ApiModelProperty(value = "浠诲姟绫诲瀷(闂ㄨ瘖锛屼綇闄紝澶嶈瘖鈥�)")
+ @Excel(name = "浠诲姟绫诲瀷(0閫氱煡銆�1瀹f暀銆�2闂ㄨ瘖銆�3鍑洪櫌銆�4澶嶈瘖銆�5浣撴銆�6闂嵎銆�7鍖绘妧鈥︹��)")
+ @ApiModelProperty(value = "浠诲姟绫诲瀷(0閫氱煡銆�1瀹f暀銆�2闂ㄨ瘖銆�3鍑洪櫌銆�4澶嶈瘖銆�5浣撴銆�6闂嵎銆�7鍖绘妧鈥︹��)")
private String type;
@@ -159,7 +156,7 @@
* 鍙戦�佺姸鎬�
*/
@Excel(name = " 鍙戦�佺姸鎬� ")
- @ApiModelProperty(value = "鍙戦�佺姸鎬�")
+ @ApiModelProperty(value = "鍙戦�佺姸鎬� 1 琚鍙� 2 寰呭彂閫� 3 宸插彂閫�")
private Long sendstate;
/**
@@ -368,7 +365,6 @@
private String sendType;
-
/**
* 鍙戦�佹椂闂存
*/
@@ -376,4 +372,46 @@
@ApiModelProperty(value = "鍙戦�佹椂闂存")
private String sendTimeSlot;
+ /**
+ * 浠诲姟鍚嶇О
+ */
+ @Excel(name = "浠诲姟鍚嶇О")
+ @ApiModelProperty(value = "浠诲姟鍚嶇О")
+ private String taskName;
+
+ /**
+ * 浠诲姟鎻忚堪
+ */
+ @Excel(name = "浠诲姟鎻忚堪")
+ @ApiModelProperty(value = "浠诲姟鎻忚堪")
+ private String taskDesc;
+
+
+ /**
+ * 闅忚浜�
+ */
+ @Excel(name = " 闅忚浜� ")
+ @ApiModelProperty(value = "闅忚浜�")
+ private String operator;
+
+ /**
+ * 闅忚浜�
+ */
+ @Excel(name = " 闅忚浜虹紪鍙� ")
+ @ApiModelProperty(value = "闅忚浜虹紪鍙�")
+ private String operatorNo;
+
+ /**
+ * 灏辫瘖缂栧彿锛堝搴旂殑outhospno銆乮nhospno锛�
+ */
+ @Excel(name = " 灏辫瘖缂栧彿锛堝搴旂殑outhospno銆乮nhospno锛� ")
+ @ApiModelProperty(value = "灏辫瘖缂栧彿锛堝搴旂殑outhospno銆乮nhospno锛�")
+ private String hospno;
+
+ /**
+ * 灏辫瘖绫诲瀷锛�1闂ㄨ瘖 2鍑洪櫌锛�
+ */
+ @Excel(name = " 灏辫瘖绫诲瀷锛�1闂ㄨ瘖 2鍑洪櫌锛�")
+ @ApiModelProperty(value = "灏辫瘖绫诲瀷锛�1闂ㄨ瘖 2鍑洪櫌锛�")
+ private String hospType;
}
diff --git a/smartor/src/main/java/com/smartor/domain/IvrTaskcallVO.java b/smartor/src/main/java/com/smartor/domain/IvrTaskSingleVO.java
similarity index 90%
rename from smartor/src/main/java/com/smartor/domain/IvrTaskcallVO.java
rename to smartor/src/main/java/com/smartor/domain/IvrTaskSingleVO.java
index b24d03f..1036018 100644
--- a/smartor/src/main/java/com/smartor/domain/IvrTaskcallVO.java
+++ b/smartor/src/main/java/com/smartor/domain/IvrTaskSingleVO.java
@@ -19,7 +19,7 @@
* @date 2024-02-02
*/
@Data
-public class IvrTaskcallVO extends BaseEntity {
+public class IvrTaskSingleVO extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
@@ -373,6 +373,49 @@
@ApiModelProperty(value = "鍙戦�佹椂闂存 ")
private List<TaskSendTimeVO> sendTimeslot;
+ /**
+ * 浠诲姟鍚嶇О
+ */
+ @Excel(name = "浠诲姟鍚嶇О")
+ @ApiModelProperty(value = "浠诲姟鍚嶇О")
+ private String taskName;
+
+ /**
+ * 浠诲姟鎻忚堪
+ */
+ @Excel(name = "浠诲姟鎻忚堪")
+ @ApiModelProperty(value = "浠诲姟鎻忚堪")
+ private String taskDesc;
+
+
+ /**
+ * 闅忚浜�
+ */
+ @Excel(name = " 闅忚浜� ")
+ @ApiModelProperty(value = "闅忚浜�")
+ private String operator;
+
+ /**
+ * 闅忚浜�
+ */
+ @Excel(name = " 闅忚浜虹紪鍙� ")
+ @ApiModelProperty(value = "闅忚浜虹紪鍙�")
+ private String operatorNo;
+
+
+ /**
+ * 灏辫瘖缂栧彿锛堝搴旂殑outhospno銆乮nhospno锛�
+ */
+ @Excel(name = " 灏辫瘖缂栧彿锛堝搴旂殑outhospno銆乮nhospno锛� ")
+ @ApiModelProperty(value = "灏辫瘖缂栧彿锛堝搴旂殑outhospno銆乮nhospno锛�")
+ private String hospno;
+
+ /**
+ * 灏辫瘖绫诲瀷锛�1闂ㄨ瘖 2鍑洪櫌锛�
+ */
+ @Excel(name = " 灏辫瘖绫诲瀷锛�1闂ㄨ瘖 2鍑洪櫌锛�")
+ @ApiModelProperty(value = "灏辫瘖绫诲瀷锛�1闂ㄨ瘖 2鍑洪櫌锛�")
+ private String hospType;
@Override
public String toString() {
diff --git a/smartor/src/main/java/com/smartor/domain/IvrTaskVO.java b/smartor/src/main/java/com/smartor/domain/IvrTaskVO.java
new file mode 100644
index 0000000..11556a1
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/domain/IvrTaskVO.java
@@ -0,0 +1,192 @@
+package com.smartor.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import lombok.Data;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.util.Date;
+
+/**
+ * 璇煶浠诲姟瀵硅薄 ivr_task
+ *
+ * @author smartor
+ * @date 2023-03-24
+ */
+@Data
+public class IvrTaskVO extends BaseEntity {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ *
+ */
+ private Long taskid;
+
+ /**
+ *
+ */
+ @Excel(name = " ")
+ private String taskname;
+
+ /**
+ *
+ */
+ @Excel(name = " ")
+ private String templateid;
+
+ /**
+ *
+ */
+ @Excel(name = " ")
+ private String templatename;
+
+ /**
+ *
+ */
+ @Excel(name = " ")
+ private String labelinfo;
+
+ /**
+ *
+ */
+ @Excel(name = " ")
+ private Long state;
+
+ /**
+ *
+ */
+ @Excel(name = " ")
+ private Long count;
+
+ /**
+ *
+ */
+ @Excel(name = " ")
+ private Long executed;
+
+ /**
+ *
+ */
+ @Excel(name = " ")
+ private Long unexecuted;
+
+ /**
+ *
+ */
+ @Excel(name = " ")
+ private Long fail;
+
+ /**
+ *
+ */
+ @Excel(name = " ")
+ private String userid;
+
+ /**
+ *
+ */
+ @Excel(name = " ")
+ private String username;
+
+ /**
+ *
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @Excel(name = " ", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date addtime;
+
+ /**
+ *
+ */
+ @Excel(name = " ")
+ private String checkuserid;
+
+ /**
+ *
+ */
+ @Excel(name = " ")
+ private String checkusername;
+
+ /**
+ *
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @Excel(name = " ", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date checktime;
+
+ /**
+ * 1锛屽嚭闄㈤殢璁匡紱2锛屼綋妫�閫氱煡锛�3锛屾弧鎰忓害璋冩煡锛�4锛屽鏁欙紱
+ */
+ @Excel(name = " 1锛屽嚭闄㈤殢璁匡紱2锛屼綋妫�閫氱煡锛�3锛屾弧鎰忓害璋冩煡锛�4锛屽鏁欙紱 ")
+ private String type;
+
+ /**
+ *
+ */
+ @Excel(name = " ")
+ private String typename;
+
+ /**
+ * 0.涓嶄娇鐢ㄦ挱鍓嶇煭淇� 1.浣跨敤鎾墠鐭俊
+ */
+ @Excel(name = " 0.涓嶄娇鐢ㄦ挱鍓嶇煭淇� 1.浣跨敤鎾墠鐭俊 ")
+ private Long usebqsms;
+
+ /**
+ * 0.涓嶄娇鐢ㄦ挱鍚庣煭淇� 1.浣跨敤鎾墠鐭俊
+ */
+ @Excel(name = " 0.涓嶄娇鐢ㄦ挱鍚庣煭淇� 1.浣跨敤鎾墠鐭俊 ")
+ private Long usebhsms;
+
+ /**
+ *
+ */
+ @Excel(name = " ")
+ private Long usesendsms;
+
+ /**
+ *
+ */
+ @Excel(name = " ")
+ private String deptcode;
+
+ /**
+ * 鍒犻櫎鏍囪
+ */
+ private String delFlag;
+
+ /**
+ * 涓婁紶鏍囪
+ */
+ @Excel(name = " 涓婁紶鏍囪 ")
+ private Long isupload;
+
+ /**
+ * 涓婁紶鏃堕棿
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @Excel(name = " 涓婁紶鏃堕棿 ", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date uploadTime;
+
+ /**
+ * 鏈烘瀯ID
+ */
+ @Excel(name = " 鏈烘瀯ID ")
+ private String orgid;
+
+ /**
+ * 宸插彂閫�
+ */
+ @Excel(name = " 宸插彂閫� ")
+ private Long yfs;
+
+ /**
+ * 鏈彂閫�
+ */
+ @Excel(name = " 鏈彂閫� ")
+ private Long wfs;
+
+
+}
diff --git a/smartor/src/main/java/com/smartor/domain/IvrVisitInfoVo.java b/smartor/src/main/java/com/smartor/domain/IvrVisitInfoVo.java
new file mode 100644
index 0000000..c3a98ab
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/domain/IvrVisitInfoVo.java
@@ -0,0 +1,148 @@
+package com.smartor.domain;
+
+import com.ruoyi.common.annotation.Excel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 鎮h�呴殢璁夸俊鎭�
+ */
+@Data
+public class IvrVisitInfoVo {
+
+ /**
+ * 浠诲姟鍚嶇О
+ */
+ @Excel(name = "浠诲姟鍚嶇О(闅忚鏂规)")
+ @ApiModelProperty(value = "浠诲姟鍚嶇О(闅忚鏂规)")
+ private String taskName;
+
+ /**
+ * 浠诲姟鎻忚堪
+ */
+ @Excel(name = "浠诲姟鎻忚堪")
+ @ApiModelProperty(value = "浠诲姟鎻忚堪")
+ private String taskDesc;
+
+ /**
+ * 鍙戦�佷汉
+ */
+ @Excel(name = " 鍙戦�佷汉锛堟偅鑰咃級 ")
+ @ApiModelProperty(value = "鍙戦�佷汉锛堟偅鑰咃級")
+ private String patientName;
+
+ /**
+ * 鎵嬫満鍙�
+ */
+ @Excel(name = " 鎵嬫満鍙� ")
+ @ApiModelProperty(value = "鎵嬫満鍙�")
+ private String phone;
+
+ /**
+ * 鎬у埆
+ */
+ @Excel(name = " 鎬у埆")
+ @ApiModelProperty(value = "鎬у埆")
+ private String sex;
+
+ /**
+ * 骞撮緞
+ */
+ @Excel(name = " 骞撮緞 ")
+ @ApiModelProperty(value = "骞撮緞")
+ private Long age;
+
+ /**
+ * 韬唤璇佸彿
+ */
+ @Excel(name = " 韬唤璇佸彿 ")
+ @ApiModelProperty(value = "韬唤璇佸彿")
+ private String sfzh;
+
+ /**
+ * 鍦板潃
+ */
+ @Excel(name = " 鍦板潃 ")
+ @ApiModelProperty(value = "鍦板潃")
+ private String addr;
+
+ /**
+ * 鐤剧梾鍚嶇О
+ */
+ @Excel(name = " 鐤剧梾鍚嶇О ")
+ @ApiModelProperty(value = "鐤剧梾鍚嶇О")
+ private String diagname;
+
+ /**
+ * 鎴块棿鍙�
+ */
+ @Excel(name = " 鎴块棿鍙� ")
+ @ApiModelProperty(value = " 鎴块棿鍙� ")
+ private String roomno;
+
+ /**
+ * 搴婂彿
+ */
+ @Excel(name = " 搴婂彿 ")
+ @ApiModelProperty(value = "搴婂彿")
+ private String bedno;
+
+ /**
+ * 搴婂彿
+ */
+ @Excel(name = " 鍏ラ櫌绉戝鍚嶇О ")
+ @ApiModelProperty(value = " 鍏ラ櫌绉戝鍚嶇О ")
+ private String deptname;
+
+ /**
+ * 闅忚鏂瑰紡
+ */
+ @Excel(name = " 闅忚鏂瑰紡 ")
+ @ApiModelProperty(value = " 闅忚鏂瑰紡 1,鐭俊銆�2,绾夸笅銆�3,璇煶銆�4,瑙嗛銆�5,绾歌川 6.閾炬帴 7.閽夐拤 8.寰俊")
+ private String serviceform;
+
+ /**
+ * 闅忚浜�
+ */
+ @Excel(name = " 闅忚浜� ")
+ @ApiModelProperty(value = "闅忚浜�")
+ private String operator;
+
+ /**
+ * 闅忚浜�
+ */
+ @Excel(name = " 闅忚浜虹紪鍙� ")
+ @ApiModelProperty(value = "闅忚浜虹紪鍙�")
+ private String operatorNo;
+
+ /**
+ * 灏辫瘖鏃堕棿
+ */
+ @Excel(name = " 灏辫瘖鏃堕棿 ")
+ @ApiModelProperty(value = "灏辫瘖鏃堕棿")
+ private Date admitdate;
+
+ /**
+ * 闅忚鏃堕棿
+ */
+ @Excel(name = " 闅忚鏃堕棿 ")
+ @ApiModelProperty(value = "闅忚鏃堕棿")
+ private String visitTime;
+
+ /**
+ * 闅忚鐘舵��
+ */
+ @Excel(name = " 闅忚鐘舵�� 1 琚鍙� 2 寰呭彂閫� 3 宸插彂閫�")
+ @ApiModelProperty(value = "闅忚鐘舵��")
+ private Long state;
+
+ /**
+ * 闅忚鐘舵��
+ */
+ @Excel(name = " 灏辫瘖缂栧彿")
+ @ApiModelProperty(value = "灏辫瘖缂栧彿")
+ private String hospno;
+
+}
diff --git a/smartor/src/main/java/com/smartor/domain/PatMedOuthosp.java b/smartor/src/main/java/com/smartor/domain/PatMedOuthosp.java
index f298834..eee3675 100644
--- a/smartor/src/main/java/com/smartor/domain/PatMedOuthosp.java
+++ b/smartor/src/main/java/com/smartor/domain/PatMedOuthosp.java
@@ -1,9 +1,11 @@
package com.smartor.domain;
import java.util.Date;
+
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
@@ -11,322 +13,150 @@
/**
* 鎮h�呴棬璇婅褰曞璞� pat_med_outhosp
- *
+ *
* @author smartor
* @date 2023-03-04
*/
+@Data
@ApiModel(value = "PatMedOuthosp", description = "鎮h�呴棬璇婅褰曞璞�")
-public class PatMedOuthosp extends BaseEntity
-{
+public class PatMedOuthosp extends BaseEntity {
private static final long serialVersionUID = 1L;
- /** 鑷ID */
+ /**
+ * 鑷ID
+ */
@ApiModelProperty(value = "鑷ID")
private Long id;
- /** 娴佹按鍙� */
+ /**
+ * 闂ㄨ瘖缂栧彿
+ */
+ @ApiModelProperty(value = "闂ㄨ瘖缂栧彿")
+ private String outhospno;
+
+ /**
+ * 娴佹按鍙�
+ */
@ApiModelProperty(value = "娴佹按鍙�")
private String serialnum;
- /** 妗fID */
+ /**
+ * 妗fID
+ */
@ApiModelProperty(value = "妗fID")
private Long patid;
- /** 鍖婚櫌鍚嶇О */
+ /**
+ * 鍖婚櫌鍚嶇О
+ */
@ApiModelProperty(value = "鍖婚櫌鍚嶇О")
private String hospitalname;
- /** 鍖婚櫌缂栧彿 */
+ /**
+ * 鍖婚櫌缂栧彿
+ */
@ApiModelProperty(value = "鍖婚櫌缂栧彿")
private String hospitalcode;
- /** 璇婃柇ICD鍊� */
+ /**
+ * 璇婃柇ICD鍊�
+ */
@ApiModelProperty(value = "璇婃柇ICD鍊�")
private String icd10code;
- /** 璇婃柇鍚嶇О */
+ /**
+ * 璇婃柇鍚嶇О
+ */
@ApiModelProperty(value = "璇婃柇鍚嶇О")
private String diagname;
- /** 绉戝浠g爜 */
+ /**
+ * 绉戝浠g爜
+ */
@ApiModelProperty(value = "绉戝浠g爜")
private String deptcode;
- /** 绉戝鍚嶇О */
+ /**
+ * 绉戝鍚嶇О
+ */
@ApiModelProperty(value = "绉戝鍚嶇О")
@Excel(name = " 绉戝鍚嶇О ")
private String deptname;
- /** 鍖荤敓宸ュ彿 */
+ /**
+ * 鍖荤敓宸ュ彿
+ */
@ApiModelProperty(value = "鍖荤敓宸ュ彿")
private String drcode;
- /** 鍖荤敓鍚嶇О */
+ /**
+ * 鍖荤敓鍚嶇О
+ */
@ApiModelProperty(value = "鍖荤敓鍚嶇О")
private String drname;
- /** 灏辫瘖鏃ユ湡 */
+ /**
+ * 灏辫瘖鏃ユ湡
+ */
@ApiModelProperty(value = "灏辫瘖鏃ユ湡")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = " 灏辫瘖鏃ユ湡 ", width = 30, dateFormat = "yyyy-MM-dd")
private Date admitdate;
- /** 鏈烘瀯ID */
+ /**
+ * 鏈烘瀯ID
+ */
@ApiModelProperty(value = "鏈烘瀯ID")
private String orgid;
- /** 鍒犻櫎鏍囪 */
+ /**
+ * 鍒犻櫎鏍囪
+ */
@ApiModelProperty(value = "鍒犻櫎鏍囪")
private String delFlag;
- /** 涓婁紶鏍囪 */
+ /**
+ * 涓婁紶鏍囪
+ */
@ApiModelProperty(value = "涓婁紶鏍囪")
private Long isupload;
- /** 涓婁紶鏃堕棿 */
+ /**
+ * 涓婁紶鏃堕棿
+ */
@ApiModelProperty(value = "涓婁紶鏃堕棿")
private Date uploadTime;
- /** 鏄惁鐢熸垚鏂规鐘舵��;0鏈敓鎴� 1鐢熸垚灏辫瘖 9鏃犲尮閰嶆柟妗� */
+ /**
+ * 鏄惁鐢熸垚鏂规鐘舵��;0鏈敓鎴� 1鐢熸垚灏辫瘖 9鏃犲尮閰嶆柟妗�
+ */
@ApiModelProperty(value = "鏄惁鐢熸垚鏂规鐘舵��;0鏈敓鎴� 1鐢熸垚灏辫瘖 9鏃犲尮閰嶆柟妗�")
private Long schemestatus;
- /** 绉戝ID */
+ /**
+ * 绉戝ID
+ */
@ApiModelProperty(value = "绉戝ID")
private Long deptid;
- /** 鏂规鐘舵�佹搷浣滄椂闂� */
+ /**
+ * 鏂规鐘舵�佹搷浣滄椂闂�
+ */
@ApiModelProperty(value = "鏂规鐘舵�佹搷浣滄椂闂�")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = " 鏂规鐘舵�佹搷浣滄椂闂� ", width = 30, dateFormat = "yyyy-MM-dd")
private Date schemetime;
- /** 鐜扮梾鍙� */
+ /**
+ * 鐜扮梾鍙�
+ */
@ApiModelProperty(value = "鐜扮梾鍙�")
private String hpi;
- /** 涓昏堪 */
+ /**
+ * 涓昏堪
+ */
@ApiModelProperty(value = "涓昏堪")
private String mainsuit;
- public void setId(Long id)
- {
- this.id = id;
- }
-
- public Long getId()
- {
- return id;
- }
- public void setSerialnum(String serialnum)
- {
- this.serialnum = serialnum;
- }
-
- public String getSerialnum()
- {
- return serialnum;
- }
- public void setPatid(Long patid)
- {
- this.patid = patid;
- }
-
- public Long getPatid()
- {
- return patid;
- }
- public void setHospitalname(String hospitalname)
- {
- this.hospitalname = hospitalname;
- }
-
- public String getHospitalname()
- {
- return hospitalname;
- }
- public void setHospitalcode(String hospitalcode)
- {
- this.hospitalcode = hospitalcode;
- }
-
- public String getHospitalcode()
- {
- return hospitalcode;
- }
- public void setIcd10code(String icd10code)
- {
- this.icd10code = icd10code;
- }
-
- public String getIcd10code()
- {
- return icd10code;
- }
- public void setDiagname(String diagname)
- {
- this.diagname = diagname;
- }
-
- public String getDiagname()
- {
- return diagname;
- }
- public void setDeptcode(String deptcode)
- {
- this.deptcode = deptcode;
- }
-
- public String getDeptcode()
- {
- return deptcode;
- }
- public void setDeptname(String deptname)
- {
- this.deptname = deptname;
- }
-
- public String getDeptname()
- {
- return deptname;
- }
- public void setDrcode(String drcode)
- {
- this.drcode = drcode;
- }
-
- public String getDrcode()
- {
- return drcode;
- }
- public void setDrname(String drname)
- {
- this.drname = drname;
- }
-
- public String getDrname()
- {
- return drname;
- }
- public void setAdmitdate(Date admitdate)
- {
- this.admitdate = admitdate;
- }
-
- public Date getAdmitdate()
- {
- return admitdate;
- }
- 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;
- }
- public void setSchemestatus(Long schemestatus)
- {
- this.schemestatus = schemestatus;
- }
-
- public Long getSchemestatus()
- {
- return schemestatus;
- }
- public void setDeptid(Long deptid)
- {
- this.deptid = deptid;
- }
-
- public Long getDeptid()
- {
- return deptid;
- }
- public void setSchemetime(Date schemetime)
- {
- this.schemetime = schemetime;
- }
-
- public Date getSchemetime()
- {
- return schemetime;
- }
- public void setHpi(String hpi)
- {
- this.hpi = hpi;
- }
-
- public String getHpi()
- {
- return hpi;
- }
- public void setMainsuit(String mainsuit)
- {
- this.mainsuit = mainsuit;
- }
-
- public String getMainsuit()
- {
- return mainsuit;
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
- .append("id", getId())
- .append("serialnum", getSerialnum())
- .append("patid", getPatid())
- .append("hospitalname", getHospitalname())
- .append("hospitalcode", getHospitalcode())
- .append("icd10code", getIcd10code())
- .append("diagname", getDiagname())
- .append("deptcode", getDeptcode())
- .append("deptname", getDeptname())
- .append("drcode", getDrcode())
- .append("drname", getDrname())
- .append("admitdate", getAdmitdate())
- .append("orgid", getOrgid())
- .append("delFlag", getDelFlag())
- .append("updateBy", getUpdateBy())
- .append("updateTime", getUpdateTime())
- .append("createBy", getCreateBy())
- .append("createTime", getCreateTime())
- .append("isupload", getIsupload())
- .append("uploadTime", getUploadTime())
- .append("schemestatus", getSchemestatus())
- .append("deptid", getDeptid())
- .append("schemetime", getSchemetime())
- .append("hpi", getHpi())
- .append("mainsuit", getMainsuit())
- .toString();
- }
}
diff --git a/smartor/src/main/java/com/smartor/domain/Test1Vo.java b/smartor/src/main/java/com/smartor/domain/Test1Vo.java
new file mode 100644
index 0000000..5b3095f
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/domain/Test1Vo.java
@@ -0,0 +1,16 @@
+package com.smartor.domain;
+
+import com.ruoyi.common.annotation.Excel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class Test1Vo {
+
+
+ private TestVo testVo;
+
+ private Long times;
+
+
+}
diff --git a/smartor/src/main/java/com/smartor/domain/TestVo.java b/smartor/src/main/java/com/smartor/domain/TestVo.java
new file mode 100644
index 0000000..ea0a5ce
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/domain/TestVo.java
@@ -0,0 +1,32 @@
+package com.smartor.domain;
+
+import com.ruoyi.common.annotation.Excel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class TestVo {
+
+ /**
+ * 浠诲姟ID
+ */
+ @Excel(name = " 浠诲姟ID ")
+ @ApiModelProperty(value = "浠诲姟ID")
+ private Long taskid;
+
+ /**
+ * 妯℃澘ID
+ */
+ @Excel(name = " 妯℃澘ID")
+ @ApiModelProperty(value = "妯℃澘ID")
+ private String templateid;
+
+
+ /**
+ * 鍙戦�佺被鍨�: 1 鏃堕棿娈� 2 鏃堕棿鐐� 3 鍗冲埢鍙戦��
+ */
+ @ApiModelProperty(value = "鍙戦�佺被鍨�: 1 鏃堕棿娈� 2 鍗冲埢鍙戦��")
+ private String sendType;
+
+
+}
diff --git a/smartor/src/main/java/com/smartor/mapper/IvrTaskMapper.java b/smartor/src/main/java/com/smartor/mapper/IvrTaskMapper.java
index 64cb9d9..32ab20e 100644
--- a/smartor/src/main/java/com/smartor/mapper/IvrTaskMapper.java
+++ b/smartor/src/main/java/com/smartor/mapper/IvrTaskMapper.java
@@ -5,15 +5,15 @@
/**
* 璇煶浠诲姟Mapper鎺ュ彛
- *
+ *
* @author smartor
* @date 2023-03-24
*/
-public interface IvrTaskMapper
+public interface IvrTaskMapper
{
/**
* 鏌ヨ璇煶浠诲姟
- *
+ *
* @param taskid 璇煶浠诲姟涓婚敭
* @return 璇煶浠诲姟
*/
@@ -21,7 +21,7 @@
/**
* 鏌ヨ璇煶浠诲姟鍒楄〃
- *
+ *
* @param ivrTask 璇煶浠诲姟
* @return 璇煶浠诲姟闆嗗悎
*/
@@ -29,7 +29,7 @@
/**
* 鏂板璇煶浠诲姟
- *
+ *
* @param ivrTask 璇煶浠诲姟
* @return 缁撴灉
*/
@@ -37,7 +37,7 @@
/**
* 淇敼璇煶浠诲姟
- *
+ *
* @param ivrTask 璇煶浠诲姟
* @return 缁撴灉
*/
@@ -45,15 +45,15 @@
/**
* 鍒犻櫎璇煶浠诲姟
- *
+ *
* @param taskid 璇煶浠诲姟涓婚敭
* @return 缁撴灉
*/
- public int deleteIvrTaskByTaskid(Long taskid);
+ public Boolean deleteIvrTaskByTaskid(Long taskid);
/**
* 鎵归噺鍒犻櫎璇煶浠诲姟
- *
+ *
* @param taskids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
* @return 缁撴灉
*/
diff --git a/smartor/src/main/java/com/smartor/mapper/IvrTaskSingleMapper.java b/smartor/src/main/java/com/smartor/mapper/IvrTaskSingleMapper.java
new file mode 100644
index 0000000..e542fe5
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/mapper/IvrTaskSingleMapper.java
@@ -0,0 +1,63 @@
+package com.smartor.mapper;
+
+import com.smartor.domain.IvrTaskSingle;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 鍗曚竴浠诲姟锛堥殢璁匡級Mapper鎺ュ彛
+ *
+ * @author ruoyi
+ * @date 2024-02-02
+ */
+@Mapper
+public interface IvrTaskSingleMapper {
+ /**
+ * 鏌ヨ鍗曚竴浠诲姟锛堥殢璁匡級
+ *
+ * @param id 鍗曚竴浠诲姟锛堥殢璁匡級涓婚敭
+ * @return 鍗曚竴浠诲姟锛堥殢璁匡級
+ */
+ public IvrTaskSingle selectIvrTaskcallById(Long id);
+
+ /**
+ * 鏌ヨ鍗曚竴浠诲姟锛堥殢璁匡級鍒楄〃
+ *
+ * @param ivrTaskSingle 鍗曚竴浠诲姟锛堥殢璁匡級
+ * @return 鍗曚竴浠诲姟锛堥殢璁匡級闆嗗悎
+ */
+ public List<IvrTaskSingle> selectIvrTaskcallList(IvrTaskSingle ivrTaskSingle);
+
+ /**
+ * 鏂板鍗曚竴浠诲姟锛堥殢璁匡級
+ *
+ * @param ivrTaskSingle 鍗曚竴浠诲姟锛堥殢璁匡級
+ * @return 缁撴灉
+ */
+ public int insertIvrTaskcall(IvrTaskSingle ivrTaskSingle);
+
+ /**
+ * 淇敼鍗曚竴浠诲姟锛堥殢璁匡級
+ *
+ * @return 缁撴灉
+ */
+ public Boolean updateIvrTaskcall(IvrTaskSingle ivrTaskSingle);
+
+ /**
+ * 鍒犻櫎鍗曚竴浠诲姟锛堥殢璁匡級
+ *
+ * @param id 鍗曚竴浠诲姟锛堥殢璁匡級涓婚敭
+ * @return 缁撴灉
+ */
+ public int deleteIvrTaskcallById(Long id);
+
+ /**
+ * 鍒犻櫎鍗曚竴浠诲姟锛堥殢璁匡級
+ *
+ * @return 缁撴灉
+ */
+ public List<IvrTaskSingle> getDataByTime(@Param("beganTime") String beganTime, @Param("endTime") String endTime);
+
+}
diff --git a/smartor/src/main/java/com/smartor/mapper/IvrTaskcallMapper.java b/smartor/src/main/java/com/smartor/mapper/IvrTaskcallMapper.java
deleted file mode 100644
index abd9ebe..0000000
--- a/smartor/src/main/java/com/smartor/mapper/IvrTaskcallMapper.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package com.smartor.mapper;
-
-import com.smartor.domain.IvrTaskcall;
-import com.smartor.domain.IvrTaskcallVO;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * 鍗曚竴浠诲姟锛堥殢璁匡級Mapper鎺ュ彛
- *
- * @author ruoyi
- * @date 2024-02-02
- */
-@Mapper
-public interface IvrTaskcallMapper {
- /**
- * 鏌ヨ鍗曚竴浠诲姟锛堥殢璁匡級
- *
- * @param id 鍗曚竴浠诲姟锛堥殢璁匡級涓婚敭
- * @return 鍗曚竴浠诲姟锛堥殢璁匡級
- */
- public IvrTaskcall selectIvrTaskcallById(Long id);
-
- /**
- * 鏌ヨ鍗曚竴浠诲姟锛堥殢璁匡級鍒楄〃
- *
- * @param ivrTaskcall 鍗曚竴浠诲姟锛堥殢璁匡級
- * @return 鍗曚竴浠诲姟锛堥殢璁匡級闆嗗悎
- */
- public List<IvrTaskcall> selectIvrTaskcallList(IvrTaskcall ivrTaskcall);
-
- public IvrTaskcallVO queryTaskByCondition(IvrTaskcallVO ivrTaskcallVO);
-
- /**
- * 鏂板鍗曚竴浠诲姟锛堥殢璁匡級
- *
- * @param ivrTaskcall 鍗曚竴浠诲姟锛堥殢璁匡級
- * @return 缁撴灉
- */
- public int insertIvrTaskcall(IvrTaskcall ivrTaskcall);
-
- /**
- * 淇敼鍗曚竴浠诲姟锛堥殢璁匡級
- *
- * @return 缁撴灉
- */
- public int updateIvrTaskcall(IvrTaskcall ivrTaskcall);
-
- /**
- * 鍒犻櫎鍗曚竴浠诲姟锛堥殢璁匡級
- *
- * @param id 鍗曚竴浠诲姟锛堥殢璁匡級涓婚敭
- * @return 缁撴灉
- */
- public int deleteIvrTaskcallById(Long id);
-
- /**
- * 鍒犻櫎鍗曚竴浠诲姟锛堥殢璁匡級
- *
- * @return 缁撴灉
- */
- public List<IvrTaskcall> getDataByTime(@Param("beganTime") String beganTime, @Param("endTime") String endTime);
-
-}
diff --git a/smartor/src/main/java/com/smartor/mapper/PatMedInhospMapper.java b/smartor/src/main/java/com/smartor/mapper/PatMedInhospMapper.java
index 410c9b2..bb937b6 100644
--- a/smartor/src/main/java/com/smartor/mapper/PatMedInhospMapper.java
+++ b/smartor/src/main/java/com/smartor/mapper/PatMedInhospMapper.java
@@ -1,19 +1,21 @@
package com.smartor.mapper;
import java.util.List;
+
import com.smartor.domain.PatMedInhosp;
+import org.apache.ibatis.annotations.Mapper;
/**
* 鎮h�呬綇闄㈣褰昅apper鎺ュ彛
- *
+ *
* @author smartor
* @date 2023-03-04
*/
-public interface PatMedInhospMapper
-{
+@Mapper
+public interface PatMedInhospMapper {
/**
* 鏌ヨ鎮h�呬綇闄㈣褰�
- *
+ *
* @param inhospid 鎮h�呬綇闄㈣褰曚富閿�
* @return 鎮h�呬綇闄㈣褰�
*/
@@ -21,7 +23,7 @@
/**
* 鏌ヨ鎮h�呬綇闄㈣褰曞垪琛�
- *
+ *
* @param patMedInhosp 鎮h�呬綇闄㈣褰�
* @return 鎮h�呬綇闄㈣褰曢泦鍚�
*/
@@ -29,7 +31,7 @@
/**
* 鏂板鎮h�呬綇闄㈣褰�
- *
+ *
* @param patMedInhosp 鎮h�呬綇闄㈣褰�
* @return 缁撴灉
*/
@@ -37,7 +39,7 @@
/**
* 淇敼鎮h�呬綇闄㈣褰�
- *
+ *
* @param patMedInhosp 鎮h�呬綇闄㈣褰�
* @return 缁撴灉
*/
@@ -45,7 +47,7 @@
/**
* 鍒犻櫎鎮h�呬綇闄㈣褰�
- *
+ *
* @param inhospid 鎮h�呬綇闄㈣褰曚富閿�
* @return 缁撴灉
*/
@@ -53,7 +55,7 @@
/**
* 鎵归噺鍒犻櫎鎮h�呬綇闄㈣褰�
- *
+ *
* @param inhospids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
* @return 缁撴灉
*/
diff --git a/smartor/src/main/java/com/smartor/mapper/PatMedOuthospMapper.java b/smartor/src/main/java/com/smartor/mapper/PatMedOuthospMapper.java
index b22c37d..bb1a18c 100644
--- a/smartor/src/main/java/com/smartor/mapper/PatMedOuthospMapper.java
+++ b/smartor/src/main/java/com/smartor/mapper/PatMedOuthospMapper.java
@@ -2,18 +2,20 @@
import java.util.List;
import com.smartor.domain.PatMedOuthosp;
+import org.apache.ibatis.annotations.Mapper;
/**
* 鎮h�呴棬璇婅褰昅apper鎺ュ彛
- *
+ *
* @author smartor
* @date 2023-03-04
*/
-public interface PatMedOuthospMapper
+@Mapper
+public interface PatMedOuthospMapper
{
/**
* 鏌ヨ鎮h�呴棬璇婅褰�
- *
+ *
* @param id 鎮h�呴棬璇婅褰曚富閿�
* @return 鎮h�呴棬璇婅褰�
*/
@@ -21,7 +23,7 @@
/**
* 鏌ヨ鎮h�呴棬璇婅褰曞垪琛�
- *
+ *
* @param patMedOuthosp 鎮h�呴棬璇婅褰�
* @return 鎮h�呴棬璇婅褰曢泦鍚�
*/
@@ -29,7 +31,7 @@
/**
* 鏂板鎮h�呴棬璇婅褰�
- *
+ *
* @param patMedOuthosp 鎮h�呴棬璇婅褰�
* @return 缁撴灉
*/
@@ -37,7 +39,7 @@
/**
* 淇敼鎮h�呴棬璇婅褰�
- *
+ *
* @param patMedOuthosp 鎮h�呴棬璇婅褰�
* @return 缁撴灉
*/
@@ -45,7 +47,7 @@
/**
* 鍒犻櫎鎮h�呴棬璇婅褰�
- *
+ *
* @param id 鎮h�呴棬璇婅褰曚富閿�
* @return 缁撴灉
*/
@@ -53,7 +55,7 @@
/**
* 鎵归噺鍒犻櫎鎮h�呴棬璇婅褰�
- *
+ *
* @param ids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
* @return 缁撴灉
*/
diff --git a/smartor/src/main/java/com/smartor/service/IIvrTaskService.java b/smartor/src/main/java/com/smartor/service/IIvrTaskService.java
index 1d7cc13..5f4a77b 100644
--- a/smartor/src/main/java/com/smartor/service/IIvrTaskService.java
+++ b/smartor/src/main/java/com/smartor/service/IIvrTaskService.java
@@ -1,19 +1,19 @@
package com.smartor.service;
import java.util.List;
+
import com.smartor.domain.IvrTask;
/**
* 璇煶浠诲姟Service鎺ュ彛
- *
+ *
* @author smartor
* @date 2023-03-24
*/
-public interface IIvrTaskService
-{
+public interface IIvrTaskService {
/**
* 鏌ヨ璇煶浠诲姟
- *
+ *
* @param taskid 璇煶浠诲姟涓婚敭
* @return 璇煶浠诲姟
*/
@@ -21,7 +21,7 @@
/**
* 鏌ヨ璇煶浠诲姟鍒楄〃
- *
+ *
* @param ivrTask 璇煶浠诲姟
* @return 璇煶浠诲姟闆嗗悎
*/
@@ -29,7 +29,7 @@
/**
* 鏂板璇煶浠诲姟
- *
+ *
* @param ivrTask 璇煶浠诲姟
* @return 缁撴灉
*/
@@ -37,7 +37,7 @@
/**
* 淇敼璇煶浠诲姟
- *
+ *
* @param ivrTask 璇煶浠诲姟
* @return 缁撴灉
*/
@@ -45,7 +45,7 @@
/**
* 鎵归噺鍒犻櫎璇煶浠诲姟
- *
+ *
* @param taskids 闇�瑕佸垹闄ょ殑璇煶浠诲姟涓婚敭闆嗗悎
* @return 缁撴灉
*/
@@ -53,9 +53,9 @@
/**
* 鍒犻櫎璇煶浠诲姟淇℃伅
- *
+ *
* @param taskid 璇煶浠诲姟涓婚敭
* @return 缁撴灉
*/
- public int deleteIvrTaskByTaskid(Long taskid);
+ public Boolean deleteIvrTaskByTaskid(Long taskid);
}
diff --git a/smartor/src/main/java/com/smartor/service/IIvrTaskcallService.java b/smartor/src/main/java/com/smartor/service/IIvrTaskSingleService.java
similarity index 69%
rename from smartor/src/main/java/com/smartor/service/IIvrTaskcallService.java
rename to smartor/src/main/java/com/smartor/service/IIvrTaskSingleService.java
index d95f55a..61d59db 100644
--- a/smartor/src/main/java/com/smartor/service/IIvrTaskcallService.java
+++ b/smartor/src/main/java/com/smartor/service/IIvrTaskSingleService.java
@@ -1,9 +1,6 @@
package com.smartor.service;
-import com.smartor.domain.HeTaskVO;
-import com.smartor.domain.IvrTaskcall;
-import com.smartor.domain.IvrTaskcallVO;
-import com.smartor.domain.PhoneCallBackVO;
+import com.smartor.domain.*;
import java.util.List;
@@ -13,14 +10,14 @@
* @author ruoyi
* @date 2024-02-02
*/
-public interface IIvrTaskcallService {
+public interface IIvrTaskSingleService {
/**
* 鏌ヨ鍗曚竴浠诲姟锛堥殢璁匡級
*
* @param id 鍗曚竴浠诲姟锛堥殢璁匡級涓婚敭
* @return 鍗曚竴浠诲姟锛堥殢璁匡級
*/
- public IvrTaskcall selectIvrTaskcallById(Long id);
+ public IvrTaskSingle selectIvrTaskcallById(Long id);
/**
* 鏌ヨ鍗曚竴浠诲姟锛堥殢璁匡級鍒楄〃
@@ -28,7 +25,12 @@
* @param ivrTaskcall 鍗曚竴浠诲姟锛堥殢璁匡級
* @return 鍗曚竴浠诲姟锛堥殢璁匡級闆嗗悎
*/
- public List<IvrTaskcall> selectIvrTaskcallList(IvrTaskcall ivrTaskcall);
+ public List<IvrTaskSingle> selectIvrTaskcallList(IvrTaskSingle ivrTaskcall);
+
+ /**
+ * 鏌ヨ鎮h�呴殢璁夸俊鎭�
+ */
+ public List<IvrVisitInfoVo> patItem(IvrTaskSingle ivrTaskcall);
/**
* 鏂板鍗曚竴浠诲姟锛堥殢璁匡級
@@ -36,7 +38,7 @@
* @param ivrTaskcall 鍗曚竴浠诲姟锛堥殢璁匡級
* @return 缁撴灉
*/
- public int insertIvrTaskcall(IvrTaskcall ivrTaskcall);
+ public int insertIvrTaskcall(IvrTaskSingle ivrTaskcall);
/**
* 淇敼鍗曚竴浠诲姟锛堥殢璁匡級
@@ -44,7 +46,7 @@
* @param ivrTaskcall 鍗曚竴浠诲姟锛堥殢璁匡級
* @return 缁撴灉
*/
- public int updateIvrTaskcall(IvrTaskcall ivrTaskcall);
+ public Boolean updateIvrTaskcall(IvrTaskSingle ivrTaskcall);
/**
* 鎵归噺鍒犻櫎鍗曚竴浠诲姟锛堥殢璁匡級
@@ -60,7 +62,7 @@
* @param ivrTaskcallVO 鍗曚竴浠诲姟
* @return 缁撴灉
*/
- public int insertOrUpdateTask(IvrTaskcallVO ivrTaskcallVO);
+ public int insertOrUpdateTask(IvrTaskSingleVO ivrTaskcallVO);
/**
* 浠诲姟鍙戦�佹墽琛�
@@ -68,7 +70,7 @@
* @param ivrTaskcallVO
* @return 缁撴灉
*/
- public int heTaskSend(IvrTaskcallVO ivrTaskcallVO);
+ public int heTaskSend(IvrTaskSingleVO ivrTaskcallVO);
/**
* 浠诲姟鍙戦�佹墽琛�
diff --git a/smartor/src/main/java/com/smartor/service/impl/IvrTaskServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/IvrTaskServiceImpl.java
index 1001557..df92b6b 100644
--- a/smartor/src/main/java/com/smartor/service/impl/IvrTaskServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/IvrTaskServiceImpl.java
@@ -1,96 +1,107 @@
package com.smartor.service.impl;
import java.util.List;
+
+import com.ruoyi.common.exception.base.BaseException;
import com.ruoyi.common.utils.DateUtils;
+import com.smartor.domain.IvrTaskSingle;
+import com.smartor.mapper.IvrTaskSingleMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.smartor.mapper.IvrTaskMapper;
import com.smartor.domain.IvrTask;
import com.smartor.service.IIvrTaskService;
+import org.springframework.transaction.annotation.Transactional;
/**
* 璇煶浠诲姟Service涓氬姟灞傚鐞�
- *
+ *
* @author smartor
* @date 2023-03-24
*/
@Service
-public class IvrTaskServiceImpl implements IIvrTaskService
-{
+public class IvrTaskServiceImpl implements IIvrTaskService {
@Autowired
private IvrTaskMapper ivrTaskMapper;
+ @Autowired
+ private IvrTaskSingleMapper ivrTaskcallMapper;
+
/**
* 鏌ヨ璇煶浠诲姟
- *
+ *
* @param taskid 璇煶浠诲姟涓婚敭
* @return 璇煶浠诲姟
*/
@Override
- public IvrTask selectIvrTaskByTaskid(Long taskid)
- {
+ public IvrTask selectIvrTaskByTaskid(Long taskid) {
return ivrTaskMapper.selectIvrTaskByTaskid(taskid);
}
/**
* 鏌ヨ璇煶浠诲姟鍒楄〃
- *
+ *
* @param ivrTask 璇煶浠诲姟
* @return 璇煶浠诲姟
*/
@Override
- public List<IvrTask> selectIvrTaskList(IvrTask ivrTask)
- {
+ public List<IvrTask> selectIvrTaskList(IvrTask ivrTask) {
return ivrTaskMapper.selectIvrTaskList(ivrTask);
}
/**
* 鏂板璇煶浠诲姟
- *
+ *
* @param ivrTask 璇煶浠诲姟
* @return 缁撴灉
*/
@Override
- public int insertIvrTask(IvrTask ivrTask)
- {
+ public int insertIvrTask(IvrTask ivrTask) {
ivrTask.setCreateTime(DateUtils.getNowDate());
return ivrTaskMapper.insertIvrTask(ivrTask);
}
/**
* 淇敼璇煶浠诲姟
- *
+ *
* @param ivrTask 璇煶浠诲姟
* @return 缁撴灉
*/
@Override
- public int updateIvrTask(IvrTask ivrTask)
- {
+ public int updateIvrTask(IvrTask ivrTask) {
ivrTask.setUpdateTime(DateUtils.getNowDate());
return ivrTaskMapper.updateIvrTask(ivrTask);
}
/**
* 鎵归噺鍒犻櫎璇煶浠诲姟
- *
+ *
* @param taskids 闇�瑕佸垹闄ょ殑璇煶浠诲姟涓婚敭
* @return 缁撴灉
*/
@Override
- public int deleteIvrTaskByTaskids(Long[] taskids)
- {
+ public int deleteIvrTaskByTaskids(Long[] taskids) {
return ivrTaskMapper.deleteIvrTaskByTaskids(taskids);
}
/**
* 鍒犻櫎璇煶浠诲姟淇℃伅
- *
+ *
* @param taskid 璇煶浠诲姟涓婚敭
* @return 缁撴灉
*/
+ @Transactional(rollbackFor = Exception.class)
@Override
- public int deleteIvrTaskByTaskid(Long taskid)
- {
- return ivrTaskMapper.deleteIvrTaskByTaskid(taskid);
+ public Boolean deleteIvrTaskByTaskid(Long taskid) {
+ IvrTaskSingle ivrTaskcall = new IvrTaskSingle();
+ ivrTaskcall.setTaskid(taskid);
+ ivrTaskcall.setDelFlag("1");
+ Boolean aBoolean = ivrTaskcallMapper.updateIvrTaskcall(ivrTaskcall);
+ Boolean isSuccess = false;
+ if (!aBoolean) {
+ new BaseException("浠诲姟鍒犻櫎澶辫触");
+ }
+ isSuccess = ivrTaskMapper.deleteIvrTaskByTaskid(taskid);
+ return isSuccess;
}
}
diff --git a/smartor/src/main/java/com/smartor/service/impl/IvrTaskcallServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/IvrTaskSingleServiceImpl.java
similarity index 81%
rename from smartor/src/main/java/com/smartor/service/impl/IvrTaskcallServiceImpl.java
rename to smartor/src/main/java/com/smartor/service/impl/IvrTaskSingleServiceImpl.java
index 6d4f7bf..8fc80bd 100644
--- a/smartor/src/main/java/com/smartor/service/impl/IvrTaskcallServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/IvrTaskSingleServiceImpl.java
@@ -1,5 +1,6 @@
package com.smartor.service.impl;
+import com.alibaba.fastjson2.JSON;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.gson.Gson;
@@ -11,17 +12,13 @@
import com.smartor.config.PhoneUtils;
import com.smartor.config.RabbitMqConfig;
import com.smartor.domain.*;
-import com.smartor.mapper.IvrLibaExtemplatescriptMapper;
-import com.smartor.mapper.IvrLibaTemplateTargetoptionMapper;
-import com.smartor.mapper.IvrTaskcallMapper;
-import com.smartor.service.IIvrTaskcallService;
+import com.smartor.mapper.*;
+import com.smartor.service.IIvrTaskService;
+import com.smartor.service.IIvrTaskSingleService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
-import org.springframework.amqp.AmqpException;
-import org.springframework.amqp.core.Message;
-import org.springframework.amqp.core.MessagePostProcessor;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -41,9 +38,12 @@
*/
@Slf4j
@Service
-public class IvrTaskcallServiceImpl implements IIvrTaskcallService {
+public class IvrTaskSingleServiceImpl implements IIvrTaskSingleService {
@Autowired
- private IvrTaskcallMapper ivrTaskcallMapper;
+ private IvrTaskSingleMapper ivrTaskSingleMapper;
+
+ @Autowired
+ private IIvrTaskService ivrTaskService;
@Autowired
private IvrLibaTemplateTargetoptionMapper ivrLibaScriptTargetoptionMapper;
@@ -58,6 +58,13 @@
private RabbitTemplate rabbitTemplate;
+ @Autowired
+ private PatMedOuthospMapper patMedOuthospMapper;
+
+ @Autowired
+ private PatMedInhospMapper patMedInhospMapper;
+
+
/**
* 鏌ヨ鍗曚竴浠诲姟锛堥殢璁匡級
*
@@ -65,8 +72,8 @@
* @return 鍗曚竴浠诲姟锛堥殢璁匡級
*/
@Override
- public IvrTaskcall selectIvrTaskcallById(Long id) {
- return ivrTaskcallMapper.selectIvrTaskcallById(id);
+ public IvrTaskSingle selectIvrTaskcallById(Long id) {
+ return ivrTaskSingleMapper.selectIvrTaskcallById(id);
}
/**
@@ -76,8 +83,46 @@
* @return 鍗曚竴浠诲姟锛堥殢璁匡級
*/
@Override
- public List<IvrTaskcall> selectIvrTaskcallList(IvrTaskcall ivrTaskcall) {
- return ivrTaskcallMapper.selectIvrTaskcallList(ivrTaskcall);
+ public List<IvrTaskSingle> selectIvrTaskcallList(IvrTaskSingle ivrTaskcall) {
+ return ivrTaskSingleMapper.selectIvrTaskcallList(ivrTaskcall);
+ }
+
+ @Override
+ public List<IvrVisitInfoVo> patItem(IvrTaskSingle ivrTaskcall) {
+ List<IvrTaskSingle> list = this.selectIvrTaskcallList(ivrTaskcall);
+
+ //瀹氫箟杩斿弬鏁版嵁
+ List<IvrVisitInfoVo> visitInfoVos = new ArrayList<>();
+ for (IvrTaskSingle ivrTaskcall1 : list) {
+ IvrVisitInfoVo ivrVisitInfoVo = DtoConversionUtils.sourceToTarget(ivrTaskcall1, IvrVisitInfoVo.class);
+ ivrVisitInfoVo.setPatientName(ivrTaskcall1.getSendname());
+ if (ivrTaskcall.getRecordid() != null) {
+ if (ivrTaskcall1.getHospType().equals("1")) {
+ //闂ㄨ瘖闅忚
+ PatMedOuthosp patMedOuthosp = patMedOuthospMapper.selectPatMedOuthospById(ivrTaskcall.getRecordid());
+ ivrVisitInfoVo.setDiagname(patMedOuthosp.getDiagname());
+ ivrVisitInfoVo.setDeptname(patMedOuthosp.getDeptname());
+ ivrVisitInfoVo.setAdmitdate(patMedOuthosp.getAdmitdate());
+ ivrVisitInfoVo.setVisitTime(ivrTaskcall1.getSendTimeSlot());
+ ivrVisitInfoVo.setState(ivrTaskcall1.getSendstate());
+ ivrVisitInfoVo.setHospno(patMedOuthosp.getOuthospno());
+ visitInfoVos.add(ivrVisitInfoVo);
+ } else if (ivrTaskcall1.getHospType().equals("2")) {
+ //鍑洪櫌
+ PatMedInhosp patMedInhosp = patMedInhospMapper.selectPatMedInhospByInhospid(ivrTaskcall.getRecordid());
+ ivrVisitInfoVo.setDiagname(patMedInhosp.getDiagname());
+ ivrVisitInfoVo.setDeptname(patMedInhosp.getDeptname());
+ ivrVisitInfoVo.setAdmitdate(patMedInhosp.getStarttime());
+ ivrVisitInfoVo.setVisitTime(ivrTaskcall1.getSendTimeSlot());
+ ivrVisitInfoVo.setState(ivrTaskcall1.getSendstate());
+ ivrVisitInfoVo.setHospno(patMedInhosp.getInhospno());
+ ivrVisitInfoVo.setRoomno(patMedInhosp.getRoomno());
+ ivrVisitInfoVo.setBedno(patMedInhosp.getBedno());
+ visitInfoVos.add(ivrVisitInfoVo);
+ }
+ }
+ }
+ return visitInfoVos;
}
/**
@@ -87,9 +132,9 @@
* @return 缁撴灉
*/
@Override
- public int insertIvrTaskcall(IvrTaskcall ivrTaskcall) {
+ public int insertIvrTaskcall(IvrTaskSingle ivrTaskcall) {
ivrTaskcall.setCreateTime(DateUtils.getNowDate());
- return ivrTaskcallMapper.insertIvrTaskcall(ivrTaskcall);
+ return ivrTaskSingleMapper.insertIvrTaskcall(ivrTaskcall);
}
/**
@@ -99,9 +144,9 @@
* @return 缁撴灉
*/
@Override
- public int updateIvrTaskcall(IvrTaskcall ivrTaskcall) {
+ public Boolean updateIvrTaskcall(IvrTaskSingle ivrTaskcall) {
ivrTaskcall.setUpdateTime(DateUtils.getNowDate());
- return ivrTaskcallMapper.updateIvrTaskcall(ivrTaskcall);
+ return ivrTaskSingleMapper.updateIvrTaskcall(ivrTaskcall);
}
/**
@@ -114,7 +159,7 @@
public int deleteIvrTaskcallByIds(Long[] ids) {
Integer i = 0;
for (Long id : ids) {
- i = ivrTaskcallMapper.deleteIvrTaskcallById(id);
+ i = ivrTaskSingleMapper.deleteIvrTaskcallById(id);
}
return i;
}
@@ -127,18 +172,23 @@
*/
@Transactional(rollbackFor = Exception.class)
@Override
- public int insertOrUpdateTask(IvrTaskcallVO ivrTaskcallVO) {
+ public int insertOrUpdateTask(IvrTaskSingleVO ivrTaskcallVO) {
if (ObjectUtils.isEmpty(ivrTaskcallVO)) {
log.info("浠诲姟鍏ュ弬涓虹┖锛岃妫�鏌ュ叆鍙�");
throw new BaseException("浠诲姟鍏ュ弬涓虹┖锛岃妫�鏌ュ叆鍙�");
}
Integer integer = 0;
if (ivrTaskcallVO.getIsoperation() != null && ivrTaskcallVO.getIsoperation() == 1) {
+ //寰�浠诲姟琛ㄤ腑锛屾柊澧炰换鍔�
+ IvrTask ivrTask = DtoConversionUtils.sourceToTarget(ivrTaskcallVO, IvrTask.class);
+ Integer taskId = ivrTaskService.insertIvrTask(ivrTask);
+
+ ivrTaskcallVO.setTaskid(taskId.longValue());
//鏂板
if (CollectionUtils.isNotEmpty(ivrTaskcallVO.getPatTaskRelevances())) {
for (PatTaskRelevance patTaskRelevance : ivrTaskcallVO.getPatTaskRelevances()) {
//灏嗕换鍔′俊鎭柊澧炲埌瀹f暀浠诲姟琛ㄤ腑
- IvrTaskcall ivrTaskcall = DtoConversionUtils.sourceToTarget(ivrTaskcallVO, IvrTaskcall.class);
+ IvrTaskSingle ivrTaskcall = DtoConversionUtils.sourceToTarget(ivrTaskcallVO, IvrTaskSingle.class);
ivrTaskcall.setSendname(patTaskRelevance.getName());
ivrTaskcall.setAge(patTaskRelevance.getAge());
ivrTaskcall.setSfzh(patTaskRelevance.getSfzh());
@@ -149,15 +199,20 @@
if (CollectionUtils.isNotEmpty(ivrTaskcallVO.getSendTimeslot())) {
ivrTaskcall.setSendTimeSlot(ivrTaskcallVO.getSendTimeslot().toString());
}
- ivrTaskcallMapper.insertIvrTaskcall(ivrTaskcall);
+ ivrTaskSingleMapper.insertIvrTaskcall(ivrTaskcall);
integer = ivrTaskcall.getId().intValue();
}
}
} else if (ivrTaskcallVO.getIsoperation() != null && ivrTaskcallVO.getIsoperation() == 2) {
+ //浠诲姟淇敼
+ IvrTask ivrTask = DtoConversionUtils.sourceToTarget(ivrTaskcallVO, IvrTask.class);
+ ivrTaskService.updateIvrTask(ivrTask);
+
if (CollectionUtils.isNotEmpty(ivrTaskcallVO.getPatTaskRelevances())) {
for (PatTaskRelevance patTaskRelevance : ivrTaskcallVO.getPatTaskRelevances()) {
- IvrTaskcall ivrTaskcall = DtoConversionUtils.sourceToTarget(ivrTaskcallVO, IvrTaskcall.class);
+
+ IvrTaskSingle ivrTaskcall = DtoConversionUtils.sourceToTarget(ivrTaskcallVO, IvrTaskSingle.class);
ivrTaskcall.setSendname(patTaskRelevance.getName());
ivrTaskcall.setAge(patTaskRelevance.getAge());
ivrTaskcall.setSfzh(patTaskRelevance.getSfzh());
@@ -168,13 +223,14 @@
ivrTaskcall.setSendTimeSlot(ivrTaskcallVO.getSendTimeslot().toString());
}
ivrTaskcall.setTextParam(new Gson().toJson(ivrTaskcallVO.getTextParam()));
- ivrTaskcallMapper.updateIvrTaskcall(ivrTaskcall);
+ if (patTaskRelevance.getIsoperation() == 2) ivrTaskSingleMapper.updateIvrTaskcall(ivrTaskcall);
+ if (patTaskRelevance.getIsoperation() == 1) ivrTaskSingleMapper.insertIvrTaskcall(ivrTaskcall);
integer = ivrTaskcall.getId().intValue();
}
}
} else if (ivrTaskcallVO.getIsoperation() != null && ivrTaskcallVO.getIsoperation() == 3) {
- ivrTaskcallMapper.deleteIvrTaskcallById(ivrTaskcallVO.getId());
+ ivrTaskSingleMapper.deleteIvrTaskcallById(ivrTaskcallVO.getId());
integer = ivrTaskcallVO.getId().intValue();
}
@@ -187,7 +243,7 @@
* @return
*/
@Override
- public int heTaskSend(IvrTaskcallVO ivrTaskcallVO) {
+ public int heTaskSend(IvrTaskSingleVO ivrTaskcallVO) {
//鍒ゆ柇浠诲姟鏄惁鏄珛鍗冲彂閫�
if (ivrTaskcallVO.getSendType().equals("2") && ivrTaskcallVO.getSendstate() == 1) {
IvrTaskcallMQ ivrTaskcallMQ = new IvrTaskcallMQ();
@@ -195,16 +251,19 @@
ivrTaskcallMQ.setSendType("1");
ivrTaskcallMQ.setTemplateid(ivrTaskcallVO.getTemplateid());
+ String ivrTaskcallMQJson = JSON.toJSONString(ivrTaskcallMQ);
+ ivrTaskcallMQJson = ivrTaskcallMQJson.substring(1, ivrTaskcallMQJson.length() - 1);
//绔嬪嵆鍙戦��
- rabbitTemplate.convertAndSend(RabbitMqConfig.phone_exchange, RabbitMqConfig.routing_key, new Gson().toJson(ivrTaskcallMQ), message -> {
+ rabbitTemplate.convertAndSend(RabbitMqConfig.phone_exchange, RabbitMqConfig.routing_key, ivrTaskcallMQJson, message -> {
//娉ㄦ剰杩欓噷鏃堕棿鍙互浣縧ong锛岃�屼笖鏄缃甴eader
message.getMessageProperties().setHeader("x-delay", 0);
return message;
});
- } else if (ivrTaskcallVO.getSendType().equals("2") && ivrTaskcallVO.getSendstate() == 1) {
+ } else if (ivrTaskcallVO.getSendType().equals("1") && ivrTaskcallVO.getSendstate() == 1) {
//鏃堕棿娈靛彂閫�
if (CollectionUtils.isNotEmpty(ivrTaskcallVO.getSendTimeslot())) {
for (TaskSendTimeVO taskSendTimeVO : ivrTaskcallVO.getSendTimeslot()) {
+ //鍘籗endTimeslot涓紝鑾峰彇鎵�鏈夌殑鏃堕棿娈�
List<TaskSendTimeVO> list = new ArrayList<>();
list.add(taskSendTimeVO);
@@ -222,12 +281,14 @@
}
IvrTaskcallMQ ivrTaskcallMQ = new IvrTaskcallMQ();
ivrTaskcallMQ.setTaskid(ivrTaskcallVO.getTaskid());
- ivrTaskcallMQ.setSendType("2");
+ ivrTaskcallMQ.setSendType("1");
ivrTaskcallMQ.setTemplateid(ivrTaskcallVO.getTemplateid());
ivrTaskcallMQ.setSendTimeslot(list);
Long finalMilliseconds = milliseconds;
- rabbitTemplate.convertAndSend(RabbitMqConfig.phone_exchange, RabbitMqConfig.routing_key, new Gson().toJson(ivrTaskcallMQ), message -> {
+ String ivrTaskcallMQJson = JSON.toJSONString(ivrTaskcallMQ);
+ ivrTaskcallMQJson = ivrTaskcallMQJson.substring(1, ivrTaskcallMQJson.length() - 1);
+ rabbitTemplate.convertAndSend(RabbitMqConfig.phone_exchange, RabbitMqConfig.routing_key, ivrTaskcallMQJson, message -> {
//娉ㄦ剰杩欓噷鏃堕棿鍙互浣縧ong锛岃�屼笖鏄缃甴eader
message.getMessageProperties().setHeader("x-delay", finalMilliseconds);
return message;
@@ -264,11 +325,11 @@
e.printStackTrace();
}
- IvrTaskcall ivrTaskcall = (IvrTaskcall) map.get("ivrTaskcall");
+ IvrTaskSingle ivrTaskcall = (IvrTaskSingle) map.get("ivrTaskcall");
List<IvrLibaTemplateScriptVO> ivrLibaTemplateScriptVOs = (List<IvrLibaTemplateScriptVO>) map.get("ivrLibaTemplateScriptVO");
//灏唘uid鏇存柊鍒版暟鎹簱涓�
ivrTaskcall.setSenduuid(phoneCallBackVO.getUuid());
- ivrTaskcallMapper.updateIvrTaskcall(ivrTaskcall);
+ ivrTaskSingleMapper.updateIvrTaskcall(ivrTaskcall);
//鑾峰彇妯℃澘淇℃伅
IvrLibaTemplateVO ivrLibaTemplateVO = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "ivrLibaTemplateVO");
@@ -290,7 +351,7 @@
log.info("鏃犱汉鎺ュ惉锛歿}, {}", phoneCallBackVO.getErrResult(), phoneCallBackVO.getUuid());
//杩炵画鎵撹瀹氭锛屽鏋滆娌′汉鎺ワ紝閭e氨缁撴潫
ivrTaskcall.setResult(phoneCallBackVO.getErrResult());
- ivrTaskcallMapper.updateIvrTaskcall(ivrTaskcall);
+ ivrTaskSingleMapper.updateIvrTaskcall(ivrTaskcall);
redisCache.deleteObject(phoneCallBackVO.getUuid() + "uint8");
} else if (integer != null && integer < ivrTaskcall.getRecallcount().intValue()) {
//杩涜閲嶆嫧
@@ -311,14 +372,14 @@
redisCache.setCacheObject(phoneCallBackVO.getUuid() + "enumState", 1, 120, TimeUnit.MINUTES);
} else if (integer != null && integer == ivrTaskcall.getRecallcount().intValue()) {
ivrTaskcall.setResult("鏃犱汉鎺ュ惉");
- ivrTaskcallMapper.updateIvrTaskcall(ivrTaskcall);
+ ivrTaskSingleMapper.updateIvrTaskcall(ivrTaskcall);
redisCache.deleteObject(phoneCallBackVO.getUuid() + "enumState");
}
} else if (phoneCallBackVO.getEnumState() == 2) {
//鎮h�呮寕鏂數璇�
log.info("鎮h�呮寕鏂數璇濓細{}", phoneCallBackVO.getUuid());
ivrTaskcall.setResult(phoneCallBackVO.getHangUpResult());
- ivrTaskcallMapper.updateIvrTaskcall(ivrTaskcall);
+ ivrTaskSingleMapper.updateIvrTaskcall(ivrTaskcall);
redisCache.deleteObject(phoneCallBackVO.getUuid() + "enumState");
}
diff --git a/smartor/src/main/resources/mapper/smartor/IvrTaskMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrTaskMapper.xml
index 2926172..aac85aa 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrTaskMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrTaskMapper.xml
@@ -1,82 +1,118 @@
<?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">
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.smartor.mapper.IvrTaskMapper">
-
- <resultMap type="IvrTask" id="IvrTaskResult">
- <result property="taskid" column="taskid" />
- <result property="taskname" column="taskname" />
- <result property="templateid" column="templateid" />
- <result property="templatename" column="templatename" />
- <result property="labelinfo" column="labelinfo" />
- <result property="state" column="state" />
- <result property="count" column="count" />
- <result property="executed" column="executed" />
- <result property="unexecuted" column="unexecuted" />
- <result property="fail" column="fail" />
- <result property="userid" column="userid" />
- <result property="username" column="username" />
- <result property="addtime" column="addtime" />
- <result property="checkuserid" column="checkuserid" />
- <result property="checkusername" column="checkusername" />
- <result property="checktime" column="checktime" />
- <result property="type" column="type" />
- <result property="typename" column="typename" />
- <result property="usebqsms" column="usebqsms" />
- <result property="usebhsms" column="usebhsms" />
- <result property="usesendsms" column="usesendsms" />
- <result property="deptcode" column="deptcode" />
- <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="orgid" column="orgid" />
+
+ <resultMap type="com.smartor.domain.IvrTask" id="IvrTaskResult">
+ <result property="taskid" column="taskid"/>
+ <result property="taskname" column="taskname"/>
+ <result property="templateid" column="templateid"/>
+ <result property="templatename" column="templatename"/>
+ <result property="labelinfo" column="labelinfo"/>
+ <result property="state" column="state"/>
+ <result property="count" column="count"/>
+ <result property="executed" column="executed"/>
+ <result property="unexecuted" column="unexecuted"/>
+ <result property="fail" column="fail"/>
+ <result property="userid" column="userid"/>
+ <result property="username" column="username"/>
+ <result property="addtime" column="addtime"/>
+ <result property="checkuserid" column="checkuserid"/>
+ <result property="checkusername" column="checkusername"/>
+ <result property="checktime" column="checktime"/>
+ <result property="type" column="type"/>
+ <result property="typename" column="typename"/>
+ <result property="usebqsms" column="usebqsms"/>
+ <result property="usebhsms" column="usebhsms"/>
+ <result property="usesendsms" column="usesendsms"/>
+ <result property="deptcode" column="deptcode"/>
+ <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="orgid" column="orgid"/>
</resultMap>
<sql id="selectIvrTaskVo">
- select taskid, taskname, templateid, templatename, labelinfo, state, count, executed, unexecuted, fail, userid, username, addtime, checkuserid, checkusername, checktime, type, typename, usebqsms, usebhsms, usesendsms, deptcode, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid from ivr_task
+ select taskid,
+ taskname,
+ templateid,
+ templatename,
+ labelinfo,
+ state,
+ count,
+ executed,
+ unexecuted,
+ fail,
+ userid,
+ username,
+ addtime,
+ checkuserid,
+ checkusername,
+ checktime,
+ type,
+ typename,
+ usebqsms,
+ usebhsms,
+ usesendsms,
+ deptcode,
+ del_flag,
+ update_by,
+ update_time,
+ create_by,
+ create_time,
+ isupload,
+ upload_time,
+ orgid
+ from ivr_task
</sql>
- <select id="selectIvrTaskList" parameterType="IvrTask" resultMap="IvrTaskResult">
+ <select id="selectIvrTaskList" parameterType="com.smartor.domain.IvrTask" resultMap="IvrTaskResult">
<include refid="selectIvrTaskVo"/>
- <where>
- <if test="taskname != null and taskname != ''"> and taskname like concat('%', #{taskname}, '%')</if>
- <if test="templateid != null and templateid != ''"> and templateid = #{templateid}</if>
- <if test="templatename != null and templatename != ''"> and templatename like concat('%', #{templatename}, '%')</if>
- <if test="labelinfo != null and labelinfo != ''"> and labelinfo = #{labelinfo}</if>
- <if test="state != null "> and state = #{state}</if>
- <if test="count != null "> and count = #{count}</if>
- <if test="executed != null "> and executed = #{executed}</if>
- <if test="unexecuted != null "> and unexecuted = #{unexecuted}</if>
- <if test="fail != null "> and fail = #{fail}</if>
- <if test="userid != null and userid != ''"> and userid = #{userid}</if>
- <if test="username != null and username != ''"> and username like concat('%', #{username}, '%')</if>
- <if test="addtime != null "> and addtime = #{addtime}</if>
- <if test="checkuserid != null and checkuserid != ''"> and checkuserid = #{checkuserid}</if>
- <if test="checkusername != null and checkusername != ''"> and checkusername like concat('%', #{checkusername}, '%')</if>
- <if test="checktime != null "> and checktime = #{checktime}</if>
- <if test="type != null and type != ''"> and type = #{type}</if>
- <if test="typename != null and typename != ''"> and typename like concat('%', #{typename}, '%')</if>
- <if test="usebqsms != null "> and usebqsms = #{usebqsms}</if>
- <if test="usebhsms != null "> and usebhsms = #{usebhsms}</if>
- <if test="usesendsms != null "> and usesendsms = #{usesendsms}</if>
- <if test="deptcode != null and deptcode != ''"> and deptcode = #{deptcode}</if>
- <if test="isupload != null "> and isupload = #{isupload}</if>
- <if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
- <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
+ <where>
+ <if test="taskname != null and taskname != ''">and taskname like concat('%', #{taskname}, '%')</if>
+ <if test="templateid != null and templateid != ''">and templateid = #{templateid}</if>
+ <if test="templatename != null and templatename != ''">and templatename like concat('%', #{templatename},
+ '%')
+ </if>
+ <if test="labelinfo != null and labelinfo != ''">and labelinfo = #{labelinfo}</if>
+ <if test="state != null ">and state = #{state}</if>
+ <if test="count != null ">and count = #{count}</if>
+ <if test="executed != null ">and executed = #{executed}</if>
+ <if test="unexecuted != null ">and unexecuted = #{unexecuted}</if>
+ <if test="fail != null ">and fail = #{fail}</if>
+ <if test="userid != null and userid != ''">and userid = #{userid}</if>
+ <if test="username != null and username != ''">and username like concat('%', #{username}, '%')</if>
+ <if test="addtime != null ">and addtime = #{addtime}</if>
+ <if test="checkuserid != null and checkuserid != ''">and checkuserid = #{checkuserid}</if>
+ <if test="checkusername != null and checkusername != ''">and checkusername like concat('%',
+ #{checkusername}, '%')
+ </if>
+ <if test="checktime != null ">and checktime = #{checktime}</if>
+ <if test="type != null and type != ''">and type = #{type}</if>
+ <if test="typename != null and typename != ''">and typename like concat('%', #{typename}, '%')</if>
+ <if test="usebqsms != null ">and usebqsms = #{usebqsms}</if>
+ <if test="usebhsms != null ">and usebhsms = #{usebhsms}</if>
+ <if test="usesendsms != null ">and usesendsms = #{usesendsms}</if>
+ <if test="deptcode != null and deptcode != ''">and deptcode = #{deptcode}</if>
+ <if test="isupload != null ">and isupload = #{isupload}</if>
+ <if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
+ <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if>
</where>
+ order by upeate_time desc,taskid desc
</select>
-
+
<select id="selectIvrTaskByTaskid" parameterType="Long" resultMap="IvrTaskResult">
<include refid="selectIvrTaskVo"/>
where taskid = #{taskid}
</select>
-
- <insert id="insertIvrTask" parameterType="IvrTask">
+
+ <insert id="insertIvrTask" parameterType="com.smartor.domain.IvrTask" useGeneratedKeys="true"
+ keyProperty="taskid">
insert into ivr_task
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="taskid != null">taskid,</if>
@@ -109,7 +145,7 @@
<if test="isupload != null">isupload,</if>
<if test="uploadTime != null">upload_time,</if>
<if test="orgid != null">orgid,</if>
- </trim>
+ </trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="taskid != null">#{taskid},</if>
<if test="taskname != null">#{taskname},</if>
@@ -141,10 +177,10 @@
<if test="isupload != null">#{isupload},</if>
<if test="uploadTime != null">#{uploadTime},</if>
<if test="orgid != null">#{orgid},</if>
- </trim>
+ </trim>
</insert>
- <update id="updateIvrTask" parameterType="IvrTask">
+ <update id="updateIvrTask" parameterType="com.smartor.domain.IvrTask">
update ivr_task
<trim prefix="SET" suffixOverrides=",">
<if test="taskname != null">taskname = #{taskname},</if>
@@ -180,14 +216,22 @@
where taskid = #{taskid}
</update>
- <delete id="deleteIvrTaskByTaskid" parameterType="Long">
- delete from ivr_task where taskid = #{taskid}
- </delete>
+ <update id="deleteIvrTaskByTaskid" parameterType="Long">
+ update ivr_task
+ <trim prefix="SET" suffixOverrides=",">
+ del_flag =1
+ </trim>
+ where taskid = #{taskid}
+ </update>
- <delete id="deleteIvrTaskByTaskids" parameterType="String">
- delete from ivr_task where taskid in
+ <update id="deleteIvrTaskByTaskids" parameterType="String">
+ update ivr_task
+ <trim prefix="SET" suffixOverrides=",">
+ del_flag =1
+ </trim>
+ where taskid in
<foreach item="taskid" collection="array" open="(" separator="," close=")">
#{taskid}
</foreach>
- </delete>
-</mapper>
\ No newline at end of file
+ </update>
+</mapper>
diff --git a/smartor/src/main/resources/mapper/smartor/IvrTaskcallMapper.xml b/smartor/src/main/resources/mapper/smartor/IvrTaskSingleMapper.xml
similarity index 88%
rename from smartor/src/main/resources/mapper/smartor/IvrTaskcallMapper.xml
rename to smartor/src/main/resources/mapper/smartor/IvrTaskSingleMapper.xml
index c3222e9..d190734 100644
--- a/smartor/src/main/resources/mapper/smartor/IvrTaskcallMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/IvrTaskSingleMapper.xml
@@ -2,9 +2,9 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.smartor.mapper.IvrTaskcallMapper">
+<mapper namespace="com.smartor.mapper.IvrTaskSingleMapper">
- <resultMap type="com.smartor.domain.IvrTaskcall" id="IvrTaskcallResult">
+ <resultMap type="com.smartor.domain.IvrTaskSingle" id="IvrTaskcallResult">
<result property="id" column="id"/>
<result property="sendname" column="sendname"/>
<result property="phone" column="phone"/>
@@ -57,11 +57,19 @@
<result property="preachcontent" column="preachcontent"/>
<result property="sendType" column="send_type"/>
<result property="sendTimeSlot" column="send_time_slot"/>
+ <result property="taskName" column="task_name"/>
+ <result property="taskDesc" column="task_desc"/>
+ <result property="operator" column="operator"/>
+ <result property="operatorNo" column="operator_no"/>
+ <result property="hospno" column="hospno"/>
+ <result property="hospType" column="hosp_type"/>
</resultMap>
<sql id="selectIvrTaskcallVo">
select id,
sendname,
+ hosp_type,
+ hospno,
phone,
sex,
age,
@@ -111,11 +119,15 @@
send_type,
medical_record_no,
send_time_slot,
+ task_name,
+ task_desc,
+ operator_no,
+ operator,
preachcontent
from ivr_taskcall
</sql>
- <select id="selectIvrTaskcallList" parameterType="com.smartor.domain.IvrTaskcall" resultMap="IvrTaskcallResult">
+ <select id="selectIvrTaskcallList" parameterType="com.smartor.domain.IvrTaskSingle" resultMap="IvrTaskcallResult">
<include refid="selectIvrTaskcallVo"/>
<where>
<if test="sendname != null and sendname != ''">and sendname like concat('%', #{sendname}, '%')</if>
@@ -166,7 +178,10 @@
</if>
<if test="preachcontent != null and preachcontent != ''">and preachcontent = #{preachcontent}</if>
<if test="sendType != null and sendType != ''">and send_type = #{sendType}</if>
+ <if test="operator != null and operator != ''">and operator = #{operator}</if>
+ <if test="operatorNo != null and operatorNo != ''">and operator_no = #{operatorNo}</if>
</where>
+ order by update_time desc,id desc
</select>
<select id="selectIvrTaskcallById" parameterType="Long" resultMap="IvrTaskcallResult">
@@ -174,7 +189,8 @@
where id = #{id}
</select>
- <insert id="insertIvrTaskcall" parameterType="com.smartor.domain.IvrTaskcall" useGeneratedKeys="true" keyProperty="id">
+ <insert id="insertIvrTaskcall" parameterType="com.smartor.domain.IvrTaskSingle" useGeneratedKeys="true"
+ keyProperty="id">
insert into ivr_taskcall
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="sendname != null">sendname,</if>
@@ -227,6 +243,12 @@
<if test="medicalRecordNo != null and medicalRecordNo != ''">medical_record_no,</if>
<if test="preachcontent != null and preachcontent != ''">preachcontent,</if>
<if test="sendType != null and sendType != ''">send_type,</if>
+ <if test="taskName != null and taskName != ''">task_name,</if>
+ <if test="taskDesc != null and taskDesc != ''">task_desc,</if>
+ <if test="operator != null and operator != ''">operator,</if>
+ <if test="operatorNo != null and operatorNo != ''">operator_no,</if>
+ <if test="hospType != null and hospType != ''">hosp_type,</if>
+ <if test="hospno != null and hospno != ''">hospno,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="sendname != null">#{sendname},</if>
@@ -279,10 +301,16 @@
<if test="medicalRecordNo != null and medicalRecordNo != ''">#{medicalRecordNo},</if>
<if test="preachcontent != null and preachcontent != ''">#{preachcontent},</if>
<if test="sendType != null and sendType != ''">#{sendType},</if>
+ <if test="taskName != null and taskName != ''">#{taskName},</if>
+ <if test="taskDesc != null and taskDesc != ''">#{taskDesc},</if>
+ <if test="operator != null and operator != ''">#{operator},</if>
+ <if test="operatorNo != null and operatorNo != ''">#{operatorNo},</if>
+ <if test="hospType != null and hospType != ''">#{hospType},</if>
+ <if test="hospno != null and hospno != ''">#{hospno},</if>
</trim>
</insert>
- <update id="updateIvrTaskcall" parameterType="com.smartor.domain.IvrTaskcall">
+ <update id="updateIvrTaskcall" parameterType="com.smartor.domain.IvrTaskSingle">
update ivr_taskcall
<trim prefix="SET" suffixOverrides=",">
<if test="sendname != null">sendname = #{sendname},</if>
@@ -335,6 +363,12 @@
<if test="medicalRecordNo != null and medicalRecordNo != ''">medical_record_no = #{medicalRecordNo},</if>
<if test="preachcontent != null and preachcontent != ''">preachcontent = #{preachcontent},</if>
<if test="sendType != null and sendType != ''">send_type = #{sendType},</if>
+ <if test="taskName != null and taskName != ''">task_name = #{taskName},</if>
+ <if test="taskDesc != null and taskDesc != ''">task_desc = #{taskDesc},</if>
+ <if test="operatorNo != null and operatorNo != ''">operator_no = #{operatorNo},</if>
+ <if test="operator != null and operator != ''">operator = #{operator},</if>
+ <if test="hospType != null and hospType != ''">hosp_type = #{hospType},</if>
+ <if test="hospno != null and hospno != ''">hospno = #{hospno},</if>
</trim>
where id = #{id}
</update>
@@ -400,6 +434,12 @@
send_type,
medical_record_no,
preachcontent,
+ task_name,
+ task_desc,
+ operator_no,
+ operator,
+ hospno,
+ hosp_type,
send_time_slot
FROM ivr_taskcall,
JSON_TABLE(send_time_slot, '$[*]' COLUMNS (
@@ -412,4 +452,4 @@
</select>
-</mapper>
\ No newline at end of file
+</mapper>
diff --git a/smartor/src/main/resources/mapper/smartor/PatMedOuthospMapper.xml b/smartor/src/main/resources/mapper/smartor/PatMedOuthospMapper.xml
index 8e1b6fc..77ff8a3 100644
--- a/smartor/src/main/resources/mapper/smartor/PatMedOuthospMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatMedOuthospMapper.xml
@@ -1,58 +1,90 @@
<?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">
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.smartor.mapper.PatMedOuthospMapper">
-
- <resultMap type="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" />
+
+ <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"/>
</resultMap>
<sql id="selectPatMedOuthospVo">
- select id, serialnum, patid, hospitalname, hospitalcode, icd10code, diagname, deptcode, deptname, drcode, drname, admitdate, orgid, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, schemestatus, deptid, schemetime, hpi, mainsuit from pat_med_outhosp
+ select id,
+ outhospno,
+ serialnum,
+ patid,
+ hospitalname,
+ hospitalcode,
+ icd10code,
+ diagname,
+ deptcode,
+ deptname,
+ drcode,
+ drname,
+ admitdate,
+ orgid,
+ del_flag,
+ update_by,
+ update_time,
+ create_by,
+ create_time,
+ isupload,
+ upload_time,
+ schemestatus,
+ deptid,
+ schemetime,
+ hpi,
+ mainsuit
+ from pat_med_outhosp
</sql>
- <select id="selectPatMedOuthospList" parameterType="PatMedOuthosp" resultMap="PatMedOuthospResult">
+ <select id="selectPatMedOuthospList" parameterType="com.smartor.domain.PatMedOuthosp"
+ resultMap="PatMedOuthospResult">
<include refid="selectPatMedOuthospVo"/>
- <where>
- <if test="hospitalname != null and hospitalname != ''"> and hospitalname like concat('%', #{hospitalname}, '%')</if>
- <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="admitdate != null "> and admitdate = #{admitdate}</if>
- <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
+ <where>
+ <if test="hospitalname != null and hospitalname != ''">and hospitalname like concat('%', #{hospitalname},
+ '%')
+ </if>
+ <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="admitdate != null ">and admitdate = #{admitdate}</if>
+ <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if>
+ <if test="outhospno != null and outhospno != ''">and outhospno = #{outhospno}</if>
</where>
</select>
-
+
<select id="selectPatMedOuthospById" parameterType="Long" resultMap="PatMedOuthospResult">
<include refid="selectPatMedOuthospVo"/>
where id = #{id}
</select>
-
- <insert id="insertPatMedOuthosp" parameterType="PatMedOuthosp" useGeneratedKeys="true" keyProperty="id">
+
+ <insert id="insertPatMedOuthosp" parameterType="com.smartor.domain.PatMedOuthosp" useGeneratedKeys="true"
+ keyProperty="id">
insert into pat_med_outhosp
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="serialnum != null">serialnum,</if>
@@ -79,7 +111,8 @@
<if test="schemetime != null">schemetime,</if>
<if test="hpi != null">hpi,</if>
<if test="mainsuit != null">mainsuit,</if>
- </trim>
+ <if test="outhospno != null">outhospno,</if>
+ </trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="serialnum != null">#{serialnum},</if>
<if test="patid != null">#{patid},</if>
@@ -105,10 +138,11 @@
<if test="schemetime != null">#{schemetime},</if>
<if test="hpi != null">#{hpi},</if>
<if test="mainsuit != null">#{mainsuit},</if>
- </trim>
+ <if test="outhospno != null">#{outhospno},</if>
+ </trim>
</insert>
- <update id="updatePatMedOuthosp" parameterType="PatMedOuthosp">
+ <update id="updatePatMedOuthosp" parameterType="com.smartor.domain.PatMedOuthosp">
update pat_med_outhosp
<trim prefix="SET" suffixOverrides=",">
<if test="serialnum != null">serialnum = #{serialnum},</if>
@@ -135,18 +169,21 @@
<if test="schemetime != null">schemetime = #{schemetime},</if>
<if test="hpi != null">hpi = #{hpi},</if>
<if test="mainsuit != null">mainsuit = #{mainsuit},</if>
+ <if test="outhospno != null">outhospno = #{outhospno},</if>
</trim>
where id = #{id}
</update>
<delete id="deletePatMedOuthospById" parameterType="Long">
- delete from pat_med_outhosp where id = #{id}
+ delete
+ from pat_med_outhosp
+ where id = #{id}
</delete>
<delete id="deletePatMedOuthospByIds" parameterType="String">
- delete from pat_med_outhosp where id in
+ delete from pat_med_outhosp where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
-</mapper>
\ No newline at end of file
+</mapper>
--
Gitblit v1.9.3