已添加5个文件
已删除1个文件
已修改13个文件
已重命名5个文件
| | |
| | | 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; |
| | |
| | | |
| | | private static IIvrLibaTemplateService ivrLibaTemplateService; |
| | | |
| | | private static IvrTaskcallMapper ivrTaskcallMapper; |
| | | private static IvrTaskSingleMapper ivrTaskcallMapper; |
| | | |
| | | private static RedisCache redisCache; |
| | | |
| | |
| | | } |
| | | |
| | | @Autowired |
| | | public void setIvrTaskcallMapper(IvrTaskcallMapper ivrTaskcallMapper) { |
| | | public void setIvrTaskcallMapper(IvrTaskSingleMapper ivrTaskcallMapper) { |
| | | RabbitMqReceiver.ivrTaskcallMapper = ivrTaskcallMapper; |
| | | } |
| | | |
| | |
| | | */ |
| | | @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æ¿å°æ£è
ä¿¡æ¯ |
| | | // 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(ä»éåä¸å é¤)äº ï¼è¿ä¸ªéè¦æ ¹æ®ä¸å¡åå»å¤çACKï¼ |
| | | 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æ¿å°æ£è
ä¿¡æ¯ |
| | | 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(ä»éåä¸å é¤)äº ï¼è¿ä¸ªéè¦æ ¹æ®ä¸å¡åå»å¤çACKï¼ |
| | | channel.basicAck(message.getMessageProperties().getDeliveryTag(), false); |
| | | |
| | | log.info("=============Do Something=============="); |
| | | } catch (Exception e) { |
| | | log.error("============æ¶è´¹å¤±è´¥,å°è¯æ¶æ¯è¡¥å忬¡æ¶è´¹!=============="); |
| | |
| | | channel.basicRecover(false); |
| | | } |
| | | } |
| | | |
| | | @Bean |
| | | public SimpleRabbitListenerContainerFactory jsonContainerFactory(ConnectionFactory connectionFactory) { |
| | | SimpleRabbitListenerContainerFactory factory = new SimpleRabbitListenerContainerFactory(); |
| | | factory.setConnectionFactory(connectionFactory); |
| | | factory.setMessageConverter(new Jackson2JsonMessageConverter()); |
| | | return factory; |
| | | } |
| | | } |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * é访模æ¿åºController |
| | |
| | | /** |
| | | * å¼å§æ§è¡(æµè¯ç¨) |
| | | */ |
| | | @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"); |
| | |
| | | // }); |
| | | |
| | | 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 -> { |
| | | //注æè¿éæ¶é´å¯ä»¥ä½¿longï¼è䏿¯è®¾ç½®header |
| | | 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(); |
| | | } |
| | | } |
| | |
| | | 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 |
| | |
| | | * @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") |
| | |
| | | } |
| | | |
| | | /** |
| | | * è·åè¯é³ä»»å¡è¯¦ç»ä¿¡æ¯ |
| | | * è·åä»»å¡è¯¦ç»ä¿¡æ¯ |
| | | */ |
| | | @ApiOperation("è·åä»»å¡è¯¦ç»ä¿¡æ¯") |
| | | @PreAuthorize("@ss.hasPermi('smartor:ivrtask:query')") |
| | | @GetMapping(value = "/{taskid}") |
| | | public AjaxResult getInfo(@PathVariable("taskid") Long taskid) { |
| | |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è¯é³ä»»å¡ |
| | | * æ°å¢ä»»å¡ |
| | | */ |
| | | @ApiOperation("æ°å¢ä»»å¡") |
| | | @PreAuthorize("@ss.hasPermi('smartor:ivrtask:add')") |
| | | @Log(title = "è¯é³ä»»å¡", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | |
| | | /** |
| | | * ä¿®æ¹è¯é³ä»»å¡ |
| | | */ |
| | | @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)); |
| | | // } |
| | | // |
| | | |
| | | /** |
| | | * å é¤è¯é³ä»»å¡ |
| | | * å é¤ä»»å¡(å
æ¬å®å¯¹åºçæ£è
ä¿¡æ¯) |
| | | */ |
| | | @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)); |
| | | @GetMapping("/remove/{removeTask}") |
| | | public AjaxResult removeTask(@PathVariable Long taskId) { |
| | | return toAjax(ivrTaskService.deleteIvrTaskByTaskid(taskId)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | 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; |
| | |
| | | */ |
| | | @Api(description = "åä¸ä»»å¡ï¼é访宣æï¼") |
| | | @RestController |
| | | @RequestMapping("/smartor/taskcall") |
| | | @RequestMapping("/smartor/tasksingle") |
| | | public class IvrTaskcallController extends BaseController { |
| | | @Autowired |
| | | private IIvrTaskcallService ivrTaskcallService; |
| | | private IIvrTaskSingleService ivrTaskcallService; |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢åä¸ä»»å¡ï¼é访ï¼å表 |
| | | * æ¥è¯¢æ£è
éè®¿ä¿¡æ¯ |
| | | */ |
| | | @ApiOperation("æ¥è¯¢åä¸ä»»å¡ï¼é访宣æï¼å表") |
| | | @ApiOperation("æ¥è¯¢æ£è
é访信æ¯") |
| | | @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)); |
| | | } |
| | | |
| | | /** |
| | |
| | | @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, "åä¸ä»»å¡ï¼éè®¿ï¼æ°æ®"); |
| | | } |
| | | |
| | |
| | | @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)); |
| | | } |
| | | |
| | |
| | | */ |
| | | @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); |
| | | |
| | | //å®ä¹æ£è
ä¸åä¸ä»»å¡å
³è表éå |
| | | 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 { |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | for (IvrTaskcall ivrTaskcall1 : list) { |
| | | for (IvrTaskSingle ivrTaskcall1 : list) { |
| | | PatTaskRelevance patTaskRelevance = new PatTaskRelevance(); |
| | | //è·åå°æ£è
ä¿¡æ¯ï¼å¹¶æ¾å
¥å°éåä¸ |
| | | patTaskRelevance.setName(ivrTaskcall1.getSendname()); |
| | |
| | | */ |
| | | @ApiOperation("ä»»å¡åéæ§è¡") |
| | | @PostMapping("/heTaskSend") |
| | | public AjaxResult heTaskSend(@RequestBody IvrTaskcallVO ivrTaskcallVO) { |
| | | public AjaxResult heTaskSend(@RequestBody IvrTaskSingleVO ivrTaskcallVO) { |
| | | return toAjax(ivrTaskcallService.heTaskSend(ivrTaskcallVO)); |
| | | } |
| | | |
| | |
| | | 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); |
| | | //å°æ°æ®æ¾å°redisä¸ï¼æ¹ä¾¿å¨åè°æ¹æ³éè·å |
| | | 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); |
| | | //å°æ°æ®æ¾å°redisä¸ï¼æ¹ä¾¿å¨åè°æ¹æ³éè·å |
| | | 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); |
| | | //å°é®é¢ï¼å模æ¿ä¿¡æ¯æ¾å°redisä¸ |
| | | redisCache.setCacheObject(uuid + "returnQues", returnQues, 120, TimeUnit.MINUTES); |
| | | redisCache.setCacheObject(uuid + "ivrLibaTemplateVO", ivrLibaTemplateVO, 120, TimeUnit.MINUTES); |
| | | returnQues.setQuestionList(ivrLibaTemplateScriptVO); |
| | | //å°é®é¢ï¼å模æ¿ä¿¡æ¯æ¾å°redisä¸ |
| | | 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(ä»éåä¸å é¤)äº ï¼è¿ä¸ªéè¦æ ¹æ®ä¸å¡åå»å¤çACKï¼ |
| | | |
| | | channel.basicAck(message.getMessageProperties().getDeliveryTag(), false); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | |
| | | } |
ÎļþÃû´Ó smartor/src/main/java/com/smartor/domain/IvrTaskcall.java ÐÞ¸Ä |
| | |
| | | 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; |
| | | |
| | |
| | | * @date 2024-02-02 |
| | | */ |
| | | @Data |
| | | public class IvrTaskcall extends BaseEntity { |
| | | public class IvrTaskSingle extends BaseEntity { |
| | | @ApiModelProperty(value = "æåæ¶é´") |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | /** |
| | | * ä»»å¡ç±»å(é¨è¯ï¼ä½é¢ï¼å¤è¯â¦) |
| | | */ |
| | | @Excel(name = "ä»»å¡ç±»å(é¨è¯ï¼ä½é¢ï¼å¤è¯â¦)") |
| | | @ApiModelProperty(value = "ä»»å¡ç±»å(é¨è¯ï¼ä½é¢ï¼å¤è¯â¦)") |
| | | @Excel(name = "ä»»å¡ç±»å(0éç¥ã1宣æã2é¨è¯ã3åºé¢ã4å¤è¯ã5使£ã6é®å·ã7廿â¦â¦)") |
| | | @ApiModelProperty(value = "ä»»å¡ç±»å(0éç¥ã1宣æã2é¨è¯ã3åºé¢ã4å¤è¯ã5使£ã6é®å·ã7廿â¦â¦)") |
| | | private String type; |
| | | |
| | | |
| | |
| | | * åéç¶æ |
| | | */ |
| | | @Excel(name = " åéç¶æ ") |
| | | @ApiModelProperty(value = "åéç¶æ") |
| | | @ApiModelProperty(value = "åéç¶æ 1 被é¢å 2 å¾
åé 3 å·²åé") |
| | | private Long sendstate; |
| | | |
| | | /** |
| | |
| | | private String sendType; |
| | | |
| | | |
| | | |
| | | /** |
| | | * åéæ¶é´æ®µ |
| | | */ |
| | |
| | | @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ãinhospnoï¼ |
| | | */ |
| | | @Excel(name = " å°±è¯ç¼å·ï¼å¯¹åºçouthospnoãinhospnoï¼ ") |
| | | @ApiModelProperty(value = "å°±è¯ç¼å·ï¼å¯¹åºçouthospnoãinhospnoï¼") |
| | | private String hospno; |
| | | |
| | | /** |
| | | * å°±è¯ç±»åï¼1é¨è¯ 2åºé¢ï¼ |
| | | */ |
| | | @Excel(name = " å°±è¯ç±»åï¼1é¨è¯ 2åºé¢ï¼") |
| | | @ApiModelProperty(value = "å°±è¯ç±»åï¼1é¨è¯ 2åºé¢ï¼") |
| | | private String hospType; |
| | | } |
ÎļþÃû´Ó smartor/src/main/java/com/smartor/domain/IvrTaskcallVO.java ÐÞ¸Ä |
| | |
| | | * @date 2024-02-02 |
| | | */ |
| | | @Data |
| | | public class IvrTaskcallVO extends BaseEntity { |
| | | public class IvrTaskSingleVO extends BaseEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | |
| | | @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ãinhospnoï¼ |
| | | */ |
| | | @Excel(name = " å°±è¯ç¼å·ï¼å¯¹åºçouthospnoãinhospnoï¼ ") |
| | | @ApiModelProperty(value = "å°±è¯ç¼å·ï¼å¯¹åºçouthospnoãinhospnoï¼") |
| | | private String hospno; |
| | | |
| | | /** |
| | | * å°±è¯ç±»åï¼1é¨è¯ 2åºé¢ï¼ |
| | | */ |
| | | @Excel(name = " å°±è¯ç±»åï¼1é¨è¯ 2åºé¢ï¼") |
| | | @ApiModelProperty(value = "å°±è¯ç±»åï¼1é¨è¯ 2åºé¢ï¼") |
| | | private String hospType; |
| | | |
| | | @Override |
| | | public String toString() { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.domain; |
| | | |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * æ£è
éè®¿ä¿¡æ¯ |
| | | */ |
| | | @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; |
| | | |
| | | } |
| | |
| | | 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; |
| | |
| | | |
| | | /** |
| | | * æ£è
é¨è¯è®°å½å¯¹è±¡ pat_med_outhosp |
| | | * |
| | | * |
| | | * @author smartor |
| | | * @date 2023-03-04 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "PatMedOuthosp", description = "æ£è
é¨è¯è®°å½å¯¹è±¡") |
| | | 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; |
| | | |
| | | /** æ¡£æ¡ID */ |
| | | /** |
| | | * æ¡£æ¡ID |
| | | */ |
| | | @ApiModelProperty(value = "æ¡£æ¡ID") |
| | | 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; |
| | | |
| | | /** ç§å®¤ä»£ç */ |
| | | /** |
| | | * ç§å®¤ä»£ç |
| | | */ |
| | | @ApiModelProperty(value = "ç§å®¤ä»£ç ") |
| | | 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(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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; |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | /** |
| | | * è¯é³ä»»å¡Mapperæ¥å£ |
| | | * |
| | | * |
| | | * @author smartor |
| | | * @date 2023-03-24 |
| | | */ |
| | | public interface IvrTaskMapper |
| | | public interface IvrTaskMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢è¯é³ä»»å¡ |
| | | * |
| | | * |
| | | * @param taskid è¯é³ä»»å¡ä¸»é® |
| | | * @return è¯é³ä»»å¡ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¥è¯¢è¯é³ä»»å¡å表 |
| | | * |
| | | * |
| | | * @param ivrTask è¯é³ä»»å¡ |
| | | * @return è¯é³ä»»å¡éå |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ°å¢è¯é³ä»»å¡ |
| | | * |
| | | * |
| | | * @param ivrTask è¯é³ä»»å¡ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * ä¿®æ¹è¯é³ä»»å¡ |
| | | * |
| | | * |
| | | * @param ivrTask è¯é³ä»»å¡ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * å é¤è¯é³ä»»å¡ |
| | | * |
| | | * |
| | | * @param taskid è¯é³ä»»å¡ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteIvrTaskByTaskid(Long taskid); |
| | | public Boolean deleteIvrTaskByTaskid(Long taskid); |
| | | |
| | | /** |
| | | * æ¹éå é¤è¯é³ä»»å¡ |
| | | * |
| | | * |
| | | * @param taskids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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); |
| | | |
| | | } |
| | |
| | | package com.smartor.mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.smartor.domain.PatMedInhosp; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * æ£è
ä½é¢è®°å½Mapperæ¥å£ |
| | | * |
| | | * |
| | | * @author smartor |
| | | * @date 2023-03-04 |
| | | */ |
| | | public interface PatMedInhospMapper |
| | | { |
| | | @Mapper |
| | | public interface PatMedInhospMapper { |
| | | /** |
| | | * æ¥è¯¢æ£è
ä½é¢è®°å½ |
| | | * |
| | | * |
| | | * @param inhospid æ£è
ä½é¢è®°å½ä¸»é® |
| | | * @return æ£è
ä½é¢è®°å½ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£è
ä½é¢è®°å½å表 |
| | | * |
| | | * |
| | | * @param patMedInhosp æ£è
ä½é¢è®°å½ |
| | | * @return æ£è
ä½é¢è®°å½éå |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ°å¢æ£è
ä½é¢è®°å½ |
| | | * |
| | | * |
| | | * @param patMedInhosp æ£è
ä½é¢è®°å½ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * ä¿®æ¹æ£è
ä½é¢è®°å½ |
| | | * |
| | | * |
| | | * @param patMedInhosp æ£è
ä½é¢è®°å½ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * å 餿£è
ä½é¢è®°å½ |
| | | * |
| | | * |
| | | * @param inhospid æ£è
ä½é¢è®°å½ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éå 餿£è
ä½é¢è®°å½ |
| | | * |
| | | * |
| | | * @param inhospids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | import java.util.List; |
| | | import com.smartor.domain.PatMedOuthosp; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * æ£è
é¨è¯è®°å½Mapperæ¥å£ |
| | | * |
| | | * |
| | | * @author smartor |
| | | * @date 2023-03-04 |
| | | */ |
| | | public interface PatMedOuthospMapper |
| | | @Mapper |
| | | public interface PatMedOuthospMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢æ£è
é¨è¯è®°å½ |
| | | * |
| | | * |
| | | * @param id æ£è
é¨è¯è®°å½ä¸»é® |
| | | * @return æ£è
é¨è¯è®°å½ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£è
é¨è¯è®°å½å表 |
| | | * |
| | | * |
| | | * @param patMedOuthosp æ£è
é¨è¯è®°å½ |
| | | * @return æ£è
é¨è¯è®°å½éå |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ°å¢æ£è
é¨è¯è®°å½ |
| | | * |
| | | * |
| | | * @param patMedOuthosp æ£è
é¨è¯è®°å½ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * ä¿®æ¹æ£è
é¨è¯è®°å½ |
| | | * |
| | | * |
| | | * @param patMedOuthosp æ£è
é¨è¯è®°å½ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * å 餿£è
é¨è¯è®°å½ |
| | | * |
| | | * |
| | | * @param id æ£è
é¨è¯è®°å½ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éå 餿£è
é¨è¯è®°å½ |
| | | * |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | |
| | | 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 è¯é³ä»»å¡ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¥è¯¢è¯é³ä»»å¡å表 |
| | | * |
| | | * |
| | | * @param ivrTask è¯é³ä»»å¡ |
| | | * @return è¯é³ä»»å¡éå |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ°å¢è¯é³ä»»å¡ |
| | | * |
| | | * |
| | | * @param ivrTask è¯é³ä»»å¡ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * ä¿®æ¹è¯é³ä»»å¡ |
| | | * |
| | | * |
| | | * @param ivrTask è¯é³ä»»å¡ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éå é¤è¯é³ä»»å¡ |
| | | * |
| | | * |
| | | * @param taskids éè¦å é¤çè¯é³ä»»å¡ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * å é¤è¯é³ä»»å¡ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param taskid è¯é³ä»»å¡ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteIvrTaskByTaskid(Long taskid); |
| | | public Boolean deleteIvrTaskByTaskid(Long taskid); |
| | | } |
ÎļþÃû´Ó smartor/src/main/java/com/smartor/service/IIvrTaskcallService.java ÐÞ¸Ä |
| | |
| | | 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; |
| | | |
| | |
| | | * @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); |
| | | |
| | | /** |
| | | * æ¥è¯¢åä¸ä»»å¡ï¼é访ï¼å表 |
| | |
| | | * @param ivrTaskcall åä¸ä»»å¡ï¼éè®¿ï¼ |
| | | * @return åä¸ä»»å¡ï¼é访ï¼éå |
| | | */ |
| | | public List<IvrTaskcall> selectIvrTaskcallList(IvrTaskcall ivrTaskcall); |
| | | public List<IvrTaskSingle> selectIvrTaskcallList(IvrTaskSingle ivrTaskcall); |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£è
éè®¿ä¿¡æ¯ |
| | | */ |
| | | public List<IvrVisitInfoVo> patItem(IvrTaskSingle ivrTaskcall); |
| | | |
| | | /** |
| | | * æ°å¢åä¸ä»»å¡ï¼éè®¿ï¼ |
| | |
| | | * @param ivrTaskcall åä¸ä»»å¡ï¼éè®¿ï¼ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertIvrTaskcall(IvrTaskcall ivrTaskcall); |
| | | public int insertIvrTaskcall(IvrTaskSingle ivrTaskcall); |
| | | |
| | | /** |
| | | * ä¿®æ¹åä¸ä»»å¡ï¼éè®¿ï¼ |
| | |
| | | * @param ivrTaskcall åä¸ä»»å¡ï¼éè®¿ï¼ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateIvrTaskcall(IvrTaskcall ivrTaskcall); |
| | | public Boolean updateIvrTaskcall(IvrTaskSingle ivrTaskcall); |
| | | |
| | | /** |
| | | * æ¹éå é¤åä¸ä»»å¡ï¼éè®¿ï¼ |
| | |
| | | * @param ivrTaskcallVO åä¸ä»»å¡ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertOrUpdateTask(IvrTaskcallVO ivrTaskcallVO); |
| | | public int insertOrUpdateTask(IvrTaskSingleVO ivrTaskcallVO); |
| | | |
| | | /** |
| | | * ä»»å¡åéæ§è¡ |
| | |
| | | * @param ivrTaskcallVO |
| | | * @return ç»æ |
| | | */ |
| | | public int heTaskSend(IvrTaskcallVO ivrTaskcallVO); |
| | | public int heTaskSend(IvrTaskSingleVO ivrTaskcallVO); |
| | | |
| | | /** |
| | | * ä»»å¡åéæ§è¡ |
| | |
| | | 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; |
| | | } |
| | | } |
ÎļþÃû´Ó smartor/src/main/java/com/smartor/service/impl/IvrTaskcallServiceImpl.java ÐÞ¸Ä |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | */ |
| | | @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; |
| | |
| | | private RabbitTemplate rabbitTemplate; |
| | | |
| | | |
| | | @Autowired |
| | | private PatMedOuthospMapper patMedOuthospMapper; |
| | | |
| | | @Autowired |
| | | private PatMedInhospMapper patMedInhospMapper; |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢åä¸ä»»å¡ï¼éè®¿ï¼ |
| | | * |
| | |
| | | * @return åä¸ä»»å¡ï¼éè®¿ï¼ |
| | | */ |
| | | @Override |
| | | public IvrTaskcall selectIvrTaskcallById(Long id) { |
| | | return ivrTaskcallMapper.selectIvrTaskcallById(id); |
| | | public IvrTaskSingle selectIvrTaskcallById(Long id) { |
| | | return ivrTaskSingleMapper.selectIvrTaskcallById(id); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @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; |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertIvrTaskcall(IvrTaskcall ivrTaskcall) { |
| | | public int insertIvrTaskcall(IvrTaskSingle ivrTaskcall) { |
| | | ivrTaskcall.setCreateTime(DateUtils.getNowDate()); |
| | | return ivrTaskcallMapper.insertIvrTaskcall(ivrTaskcall); |
| | | return ivrTaskSingleMapper.insertIvrTaskcall(ivrTaskcall); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateIvrTaskcall(IvrTaskcall ivrTaskcall) { |
| | | public Boolean updateIvrTaskcall(IvrTaskSingle ivrTaskcall) { |
| | | ivrTaskcall.setUpdateTime(DateUtils.getNowDate()); |
| | | return ivrTaskcallMapper.updateIvrTaskcall(ivrTaskcall); |
| | | return ivrTaskSingleMapper.updateIvrTaskcall(ivrTaskcall); |
| | | } |
| | | |
| | | /** |
| | |
| | | public int deleteIvrTaskcallByIds(Long[] ids) { |
| | | Integer i = 0; |
| | | for (Long id : ids) { |
| | | i = ivrTaskcallMapper.deleteIvrTaskcallById(id); |
| | | i = ivrTaskSingleMapper.deleteIvrTaskcallById(id); |
| | | } |
| | | return i; |
| | | } |
| | |
| | | */ |
| | | @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()) { |
| | | //å°ä»»å¡ä¿¡æ¯æ°å¢å°å®£æä»»å¡è¡¨ä¸ |
| | | 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()); |
| | |
| | | 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()); |
| | |
| | | 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(); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public int heTaskSend(IvrTaskcallVO ivrTaskcallVO) { |
| | | public int heTaskSend(IvrTaskSingleVO ivrTaskcallVO) { |
| | | //夿任塿¯å¦æ¯ç«å³åé |
| | | if (ivrTaskcallVO.getSendType().equals("2") && ivrTaskcallVO.getSendstate() == 1) { |
| | | IvrTaskcallMQ ivrTaskcallMQ = new IvrTaskcallMQ(); |
| | |
| | | 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 -> { |
| | | //注æè¿éæ¶é´å¯ä»¥ä½¿longï¼è䏿¯è®¾ç½®header |
| | | 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()) { |
| | | //å»SendTimeslotä¸ï¼è·åææçæ¶é´æ®µ |
| | | List<TaskSendTimeVO> list = new ArrayList<>(); |
| | | list.add(taskSendTimeVO); |
| | | |
| | |
| | | } |
| | | 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 -> { |
| | | //注æè¿éæ¶é´å¯ä»¥ä½¿longï¼è䏿¯è®¾ç½®header |
| | | message.getMessageProperties().setHeader("x-delay", finalMilliseconds); |
| | | return message; |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | IvrTaskcall ivrTaskcall = (IvrTaskcall) map.get("ivrTaskcall"); |
| | | IvrTaskSingle ivrTaskcall = (IvrTaskSingle) map.get("ivrTaskcall"); |
| | | List<IvrLibaTemplateScriptVO> ivrLibaTemplateScriptVOs = (List<IvrLibaTemplateScriptVO>) map.get("ivrLibaTemplateScriptVO"); |
| | | //å°uuidæ´æ°å°æ°æ®åºä¸ |
| | | ivrTaskcall.setSenduuid(phoneCallBackVO.getUuid()); |
| | | ivrTaskcallMapper.updateIvrTaskcall(ivrTaskcall); |
| | | ivrTaskSingleMapper.updateIvrTaskcall(ivrTaskcall); |
| | | |
| | | //è·å模æ¿ä¿¡æ¯ |
| | | IvrLibaTemplateVO ivrLibaTemplateVO = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "ivrLibaTemplateVO"); |
| | |
| | | log.info("æ 人æ¥å¬ï¼{}, {}", phoneCallBackVO.getErrResult(), phoneCallBackVO.getUuid()); |
| | | //è¿ç»æè§å®æ¬¡ï¼å¦æè¦æ²¡äººæ¥ï¼é£å°±ç»æ |
| | | ivrTaskcall.setResult(phoneCallBackVO.getErrResult()); |
| | | ivrTaskcallMapper.updateIvrTaskcall(ivrTaskcall); |
| | | ivrTaskSingleMapper.updateIvrTaskcall(ivrTaskcall); |
| | | redisCache.deleteObject(phoneCallBackVO.getUuid() + "uint8"); |
| | | } else if (integer != null && integer < ivrTaskcall.getRecallcount().intValue()) { |
| | | //è¿è¡éæ¨ |
| | |
| | | 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) { |
| | | //æ£è
ææçµè¯ |
| | | log.info("æ£è
ææçµè¯ï¼{}", phoneCallBackVO.getUuid()); |
| | | ivrTaskcall.setResult(phoneCallBackVO.getHangUpResult()); |
| | | ivrTaskcallMapper.updateIvrTaskcall(ivrTaskcall); |
| | | ivrTaskSingleMapper.updateIvrTaskcall(ivrTaskcall); |
| | | redisCache.deleteObject(phoneCallBackVO.getUuid() + "enumState"); |
| | | } |
| | | |
| | |
| | | <?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> |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | 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> |
| | | </update> |
| | | </mapper> |
ÎļþÃû´Ó smartor/src/main/resources/mapper/smartor/IvrTaskcallMapper.xml ÐÞ¸Ä |
| | |
| | | <!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"/> |
| | |
| | | <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, |
| | |
| | | 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> |
| | |
| | | </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"> |
| | |
| | | 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> |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | 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 ( |
| | |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | | </mapper> |
| | |
| | | <?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> |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | <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> |
| | | </mapper> |