| | |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.web.task.PhoneTask; |
| | | import com.ruoyi.web.task.PhoneTask2; |
| | | import com.smartor.common.SendService; |
| | | import com.smartor.config.RabbitMqConfig; |
| | | import com.smartor.domain.IvrLibaTemplateVO; |
| | | import com.smartor.domain.IvrTask; |
| | | import com.smartor.domain.IvrTaskSingle; |
| | | import com.smartor.domain.IvrTaskcallMQ; |
| | | import com.smartor.mapper.IvrTaskMapper; |
| | | import com.smartor.mapper.IvrTaskSingleMapper; |
| | | import com.smartor.service.IIvrLibaTemplateService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | |
| | | private static IvrTaskSingleMapper ivrTaskcallMapper; |
| | | |
| | | private static IvrTaskMapper ivrTaskMapper; |
| | | |
| | | private static SendService sendService; |
| | | |
| | | private static RedisCache redisCache; |
| | | |
| | | // å建åºå®å¤§å°ççº¿ç¨æ± |
| | |
| | | } |
| | | |
| | | @Autowired |
| | | public void setSendService(SendService sendService) { |
| | | RabbitMqReceiver.sendService = sendService; |
| | | } |
| | | |
| | | @Autowired |
| | | public void setIvrTaskcallMapper(IvrTaskSingleMapper ivrTaskcallMapper) { |
| | | RabbitMqReceiver.ivrTaskcallMapper = ivrTaskcallMapper; |
| | | } |
| | | |
| | | @Autowired |
| | | public void setIvrTaskMapper(IvrTaskMapper ivrTaskMapper) { |
| | | RabbitMqReceiver.ivrTaskMapper = ivrTaskMapper; |
| | | } |
| | | |
| | | @Autowired |
| | |
| | | List<IvrTaskSingle> ivrTaskcalls = ivrTaskcallMapper.selectIvrTaskcallList(ivrTaskcall); |
| | | |
| | | for (IvrTaskSingle ivrTaskcall1 : ivrTaskcalls) { |
| | | //éè¿å¤çº¿ç¨çæ¹å¼å»æçµè¯ |
| | | executorService.submit(new PhoneTask(ivrTaskcall1, ivrLibaTemplateVO1, redisCache, channel, message)); |
| | | IvrTask ivrTask = ivrTaskMapper.selectIvrTaskByTaskid(ivrTaskcall1.getTaskid()); |
| | | if (StringUtils.isNotEmpty(ivrTask.getSendState()) && ivrTask.getSendState().equals(3) || StringUtils.isNotEmpty(ivrTask.getSendState()) && ivrTask.getSendState().equals(4)) { |
| | | //å¦ä½ä»»å¡è¢«âæåâæâç»æ¢â |
| | | break; |
| | | } |
| | | // //éè¿å¤çº¿ç¨çæ¹å¼å»æçµè¯ |
| | | // executorService.submit(new PhoneTask(ivrTaskcall1, ivrLibaTemplateVO1, redisCache, channel, message, sendService)); |
| | | new PhoneTask2().runPhone(ivrTaskcall1, ivrLibaTemplateVO1, redisCache, channel, message, sendService); |
| | | } |
| | | //éç¥ MQ æ¶æ¯å·²è¢«æ¥æ¶,å¯ä»¥ACK(ä»éåä¸å é¤)äº ï¼è¿ä¸ªéè¦æ ¹æ®ä¸å¡åå»å¤çACKï¼ |
| | | channel.basicAck(message.getMessageProperties().getDeliveryTag(), false); |
| | |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.core.domain.model.LoginUser; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.DtoConversionUtils; |
| | |
| | | @Log(title = "åä¸ä»»å¡ï¼é访ï¼", businessType = BusinessType.INSERT) |
| | | @PostMapping("/insertOrUpdateTask") |
| | | public AjaxResult insertOrUpdateHeTask(@RequestBody IvrTaskSingleVO ivrTaskcallVO) { |
| | | |
| | | LoginUser loginUser = getLoginUser(); |
| | | SysUser user = loginUser.getUser(); |
| | | ivrTaskcallVO.setCreateBy(user.getNickName()); |
| | | return toAjax(ivrTaskcallService.insertOrUpdateTask(ivrTaskcallVO)); |
| | | } |
| | | |
| | |
| | | * ä»»å¡åéæ§è¡ |
| | | */ |
| | | @ApiOperation("ä»»å¡åéæ§è¡") |
| | | @PostMapping("/heTaskSend") |
| | | @PostMapping("/taskSend") |
| | | public AjaxResult heTaskSend(@RequestBody IvrTaskSingleVO ivrTaskcallVO) { |
| | | return toAjax(ivrTaskcallService.heTaskSend(ivrTaskcallVO)); |
| | | } |
| | |
| | | @ApiOperation("çµè¯åè°ä»»å¡") |
| | | @PostMapping("/phoneCallBack") |
| | | public AjaxResult phoneCallBack(@RequestBody PhoneCallBackVO phoneCallBackVO) { |
| | | log.error("çµè¯åè°ä»»å¡æåäºä¸ï¼{}", phoneCallBackVO); |
| | | // log.error("çµè¯åè°ä»»å¡æåäºä¸ï¼{}", phoneCallBackVO); |
| | | ivrTaskcallService.phoneCallBack(phoneCallBackVO); |
| | | return success(); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.poi.ExcelUtil; |
| | | import com.smartor.domain.PatWildcard; |
| | | import com.smartor.service.IPatWildcardService; |
| | | 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; |
| | | |
| | | /** |
| | | * æ£è
ä¿¡æ¯éé
符Controller |
| | | * |
| | | * @author ruoyi |
| | | * @date 2024-05-09 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/smartor/wildcard") |
| | | public class PatWildcardController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IPatWildcardService patWildcardService; |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£è
ä¿¡æ¯éé
符å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:wildcard:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(PatWildcard patWildcard) |
| | | { |
| | | startPage(); |
| | | List<PatWildcard> list = patWildcardService.selectPatWildcardList(patWildcard); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * å¯¼åºæ£è
ä¿¡æ¯éé
符å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:wildcard:export')") |
| | | @Log(title = "æ£è
ä¿¡æ¯éé
符", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, PatWildcard patWildcard) |
| | | { |
| | | List<PatWildcard> list = patWildcardService.selectPatWildcardList(patWildcard); |
| | | ExcelUtil<PatWildcard> util = new ExcelUtil<PatWildcard>(PatWildcard.class); |
| | | util.exportExcel(response, list, "æ£è
ä¿¡æ¯éé
ç¬¦æ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·åæ£è
ä¿¡æ¯éé
符详ç»ä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:wildcard:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(patWildcardService.selectPatWildcardById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢æ£è
ä¿¡æ¯éé
符 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:wildcard:add')") |
| | | @Log(title = "æ£è
ä¿¡æ¯éé
符", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody PatWildcard patWildcard) |
| | | { |
| | | return toAjax(patWildcardService.insertPatWildcard(patWildcard)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹æ£è
ä¿¡æ¯éé
符 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:wildcard:edit')") |
| | | @Log(title = "æ£è
ä¿¡æ¯éé
符", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody PatWildcard patWildcard) |
| | | { |
| | | return toAjax(patWildcardService.updatePatWildcard(patWildcard)); |
| | | } |
| | | |
| | | /** |
| | | * å 餿£è
ä¿¡æ¯éé
符 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:wildcard:remove')") |
| | | @Log(title = "æ£è
ä¿¡æ¯éé
符", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(patWildcardService.deletePatWildcardByIds(ids)); |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.web.task; |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.rabbitmq.client.Channel; |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import com.ruoyi.common.utils.DtoConversionUtils; |
| | | import com.ruoyi.common.utils.uuid.IdUtils; |
| | | import com.smartor.common.SendService; |
| | | import com.smartor.config.PhoneUtils; |
| | | import com.smartor.domain.IvrLibaTemplateScriptVO; |
| | | import com.smartor.domain.IvrLibaTemplateVO; |
| | | import com.smartor.domain.IvrTaskSingle; |
| | | import com.smartor.domain.QuestionMessage; |
| | | import com.smartor.mapper.IvrTaskSingleMapper; |
| | | import com.smartor.domain.*; |
| | | import org.springframework.amqp.core.Message; |
| | | import org.springframework.data.convert.Jsr310Converters; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | public class PhoneTask implements Runnable { |
| | | private IvrTaskSingle ivrTaskcall; |
| | | private IvrTaskSingle ivrTaskSingle; |
| | | private List<IvrLibaTemplateScriptVO> ivrLibaTemplateScriptVO; |
| | | private RedisCache redisCache; |
| | | private IvrLibaTemplateVO ivrLibaTemplateVO; |
| | | private Channel channel; |
| | | private Message message; |
| | | private SendService sendService; |
| | | |
| | | public PhoneTask(IvrTaskSingle ivrTaskcall, IvrLibaTemplateVO ivrLibaTemplateVO, RedisCache redisCache, Channel channel, Message message) { |
| | | this.ivrTaskcall = ivrTaskcall; |
| | | this.ivrLibaTemplateScriptVO = ivrLibaTemplateVO.getIvrLibaTemplateScriptVOList(); |
| | | this.ivrLibaTemplateVO = ivrLibaTemplateVO; |
| | | |
| | | public PhoneTask(IvrTaskSingle ivrTaskSingle, IvrLibaTemplateVO ivrLibaTemplateVO, RedisCache redisCache, Channel channel, Message message, SendService sendService) { |
| | | this.ivrTaskSingle = DtoConversionUtils.sourceToTarget(ivrTaskSingle, IvrTaskSingle.class); |
| | | this.ivrLibaTemplateScriptVO = DtoConversionUtils.sourceToTarget(ivrLibaTemplateVO.getIvrLibaTemplateScriptVOList(), IvrLibaTemplateScriptVO.class); |
| | | this.ivrLibaTemplateVO = DtoConversionUtils.sourceToTarget(ivrLibaTemplateVO, IvrLibaTemplateVO.class); |
| | | this.redisCache = redisCache; |
| | | this.channel = channel; |
| | | this.message = message; |
| | | this.sendService = sendService; |
| | | } |
| | | |
| | | @Override |
| | |
| | | try { |
| | | //è·åçµè¯ç»ï¼æ¥çåªäºçµè¯å¯ä»¥ä½¿ç¨ |
| | | PhoneUtils phoneUtils = new PhoneUtils(); |
| | | String uuid = IdUtils.randomUUID(); |
| | | final String uuid = IdUtils.randomUUID(); |
| | | //è·åææçâéé
符âé®å¼å¯¹ |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | Map<String, Map<String, String>> ivrTaskSingleMmap = objectMapper.readValue(ivrTaskSingle.getTextParam(), Map.class); |
| | | List<Map<String, String>> mapList = new ArrayList<>(); |
| | | if (!Objects.isNull(ivrTaskSingleMmap)) { |
| | | for (Map<String, String> map : ivrTaskSingleMmap.values()) { |
| | | mapList.add(map); |
| | | } |
| | | //å°æ¨¡æ¿é®é¢è¯æ¯éçéé
ç¬¦æ¿æ¢ |
| | | for (IvrLibaTemplateScriptVO ivrLibaTemplateScriptVO : ivrLibaTemplateScriptVO) { |
| | | for (Map<String, String> map : mapList) { |
| | | for (String key : map.keySet()) { |
| | | ivrLibaTemplateScriptVO.setQuestionText(ivrLibaTemplateScriptVO.getQuestionText().replace(key, map.get(key))); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | Map<String, Object> objectMap = new HashMap<>(); |
| | | objectMap.put("ivrTaskcall", ivrTaskcall); |
| | | objectMap.put("ivrTaskSingle", ivrTaskSingle); |
| | | objectMap.put("ivrLibaTemplateScriptVO", ivrLibaTemplateScriptVO); |
| | | //å°æ°æ®æ¾å°redisä¸ï¼æ¹ä¾¿å¨åè°æ¹æ³éè·å |
| | | redisCache.setCacheObject(uuid, objectMap, 120, TimeUnit.MINUTES); |
| | |
| | | redisCache.setCacheObject(uuid + "returnQues", returnQues, 120, TimeUnit.MINUTES); |
| | | redisCache.setCacheObject(uuid + "ivrLibaTemplateVO", ivrLibaTemplateVO, 120, TimeUnit.MINUTES); |
| | | |
| | | System.out.println("----------------uuID为 ï¼" + uuid + " " + ivrTaskSingle.getSendname() + " " + returnQues.getNowQuestion().getQuestionText() + " " + ivrTaskSingle.getPhone()); |
| | | |
| | | //è°ç¨æºå¨äººçµè¯ï¼å¼å§çµè¯ï¼éè¦å°åè°æ¹æ³ä¼ å
¥ï¼è¿ä¸ªçâçµè¯æ¹âåè¯æä¹ä¼ ï¼ç°å¨å
空ç,è¿æç¬¬ä¸å¥é®é¢è¯æ¯ï¼ |
| | | String ob = phoneUtils.ob("", "", "", "", "", "", "", ivrTaskcall.getPhone(), uuid, true); |
| | | String ob = phoneUtils.ob("", "", "", "", "", "", "", ivrTaskSingle.getPhone(), uuid, true); |
| | | System.out.println("OBçå¼ä¸ºï¼" + ob); |
| | | //éäºä¹åï¼ç«é©¬å»è°å¼åºç½ |
| | | System.out.println("é®é¢çå¼ä¸ºï¼" + returnQues.getNowQuestion().getQuestionText() + " " + uuid); |
| | | phoneUtils.ttsPlayback(ivrLibaTemplateVO.getRevisitBefore()+returnQues.getNowQuestion().getQuestionText(), uuid); |
| | | |
| | | //éç¥ MQ æ¶æ¯å·²è¢«æ¥æ¶,å¯ä»¥ACK(ä»éåä¸å é¤)äº ï¼è¿ä¸ªéè¦æ ¹æ®ä¸å¡åå»å¤çACKï¼ |
| | | |
| | | channel.basicAck(message.getMessageProperties().getDeliveryTag(), false); |
| | | } catch (IOException e) { |
| | | // //éç¥ MQ æ¶æ¯å·²è¢«æ¥æ¶,å¯ä»¥ACK(ä»éåä¸å é¤)äº ï¼è¿ä¸ªéè¦æ ¹æ®ä¸å¡åå»å¤çACKï¼ |
| | | // channel.basicAck(message.getMessageProperties().getDeliveryTag(), false); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.web.task; |
| | | |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.rabbitmq.client.Channel; |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import com.ruoyi.common.utils.uuid.IdUtils; |
| | | import com.smartor.common.SendService; |
| | | import com.smartor.config.PhoneUtils; |
| | | import com.smartor.domain.IvrLibaTemplateScriptVO; |
| | | import com.smartor.domain.IvrLibaTemplateVO; |
| | | import com.smartor.domain.IvrTaskSingle; |
| | | import com.smartor.domain.QuestionMessage; |
| | | import org.springframework.amqp.core.Message; |
| | | |
| | | import java.util.*; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | public class PhoneTask2 { |
| | | // private IvrTaskSingle ivrTaskSingle; |
| | | // private List<IvrLibaTemplateScriptVO> ivrLibaTemplateScriptVO; |
| | | // private RedisCache redisCache; |
| | | // private IvrLibaTemplateVO ivrLibaTemplateVO; |
| | | // private Channel channel; |
| | | // private Message message; |
| | | // private SendService sendService; |
| | | |
| | | |
| | | public void runPhone(IvrTaskSingle ivrTaskSingle, IvrLibaTemplateVO ivrLibaTemplateVO, RedisCache redisCache, Channel channel, Message message, SendService sendService) { |
| | | |
| | | try { |
| | | //è·åçµè¯ç»ï¼æ¥çåªäºçµè¯å¯ä»¥ä½¿ç¨ |
| | | PhoneUtils phoneUtils = new PhoneUtils(); |
| | | String uuid = IdUtils.randomUUID(); |
| | | //è·åææçâéé
符âé®å¼å¯¹ |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | Map<String, Map<String, String>> ivrTaskSingleMmap = objectMapper.readValue(ivrTaskSingle.getTextParam(), Map.class); |
| | | List<Map<String, String>> mapList = new ArrayList<>(); |
| | | if (!Objects.isNull(ivrTaskSingleMmap)) { |
| | | for (Map<String, String> map : ivrTaskSingleMmap.values()) { |
| | | mapList.add(map); |
| | | } |
| | | //å°æ¨¡æ¿é®é¢è¯æ¯éçéé
ç¬¦æ¿æ¢ |
| | | for (IvrLibaTemplateScriptVO ivrLibaTemplateScriptVO : ivrLibaTemplateVO.getIvrLibaTemplateScriptVOList()) { |
| | | for (Map<String, String> map : mapList) { |
| | | for (String key : map.keySet()) { |
| | | ivrLibaTemplateScriptVO.setQuestionText(ivrLibaTemplateScriptVO.getQuestionText().replace(key, map.get(key))); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | Map<String, Object> objectMap = new HashMap<>(); |
| | | objectMap.put("ivrTaskSingle", ivrTaskSingle); |
| | | objectMap.put("ivrLibaTemplateScriptVO", ivrLibaTemplateVO.getIvrLibaTemplateScriptVOList()); |
| | | //å°æ°æ®æ¾å°redisä¸ï¼æ¹ä¾¿å¨åè°æ¹æ³éè·å |
| | | redisCache.setCacheObject(uuid, objectMap, 120, TimeUnit.MINUTES); |
| | | |
| | | //è®°å½é¦æ¬¡é®é¢ |
| | | QuestionMessage returnQues = new QuestionMessage(); |
| | | returnQues.setKcb(ivrLibaTemplateVO.getRevisitBefore()); |
| | | for (IvrLibaTemplateScriptVO ivrLibaTemplateScriptVO : ivrLibaTemplateVO.getIvrLibaTemplateScriptVOList()) { |
| | | if (ivrLibaTemplateScriptVO.getTargetid() == ivrLibaTemplateVO.getFirstQuestionNum().intValue()) { |
| | | returnQues.setNowQuestion(ivrLibaTemplateScriptVO); |
| | | } |
| | | } |
| | | returnQues.setQuestionList(ivrLibaTemplateVO.getIvrLibaTemplateScriptVOList()); |
| | | //å°é®é¢ï¼å模æ¿ä¿¡æ¯æ¾å°redisä¸ |
| | | redisCache.setCacheObject(uuid + "returnQues", returnQues, 120, TimeUnit.MINUTES); |
| | | redisCache.setCacheObject(uuid + "ivrLibaTemplateVO", ivrLibaTemplateVO, 120, TimeUnit.MINUTES); |
| | | |
| | | System.out.println("----------------uuID为 ï¼" + uuid + " " + ivrTaskSingle.getSendname() + " " + returnQues.getNowQuestion().getQuestionText() + " " + ivrTaskSingle.getPhone()); |
| | | |
| | | //è°ç¨æºå¨äººçµè¯ï¼å¼å§çµè¯ï¼éè¦å°åè°æ¹æ³ä¼ å
¥ï¼è¿ä¸ªçâçµè¯æ¹âåè¯æä¹ä¼ ï¼ç°å¨å
空ç,è¿æç¬¬ä¸å¥é®é¢è¯æ¯ï¼ |
| | | String ob = phoneUtils.ob("", "", "", "", "", "", "", ivrTaskSingle.getPhone(), uuid, true); |
| | | System.out.println("OBçå¼ä¸ºï¼" + ob); |
| | | //éäºä¹åï¼ç«é©¬å»è°å¼åºç½ |
| | | System.out.println("é®é¢çå¼ä¸ºï¼" + returnQues.getNowQuestion().getQuestionText() + " " + uuid); |
| | | phoneUtils.ttsPlayback(ivrLibaTemplateVO.getRevisitBefore() + returnQues.getNowQuestion().getQuestionText(), uuid); |
| | | |
| | | // //éç¥ MQ æ¶æ¯å·²è¢«æ¥æ¶,å¯ä»¥ACK(ä»éåä¸å é¤)äº ï¼è¿ä¸ªéè¦æ ¹æ®ä¸å¡åå»å¤çACKï¼ |
| | | // channel.basicAck(message.getMessageProperties().getDeliveryTag(), false); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.web.test; |
| | | |
| | | import com.smartor.config.RabbitMqConfig; |
| | | import com.ruoyi.web.task.PhoneTask; |
| | | import org.junit.Test; |
| | | import org.springframework.amqp.rabbit.core.RabbitTemplate; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.core.SpringVersion; |
| | | |
| | | import java.util.regex.Matcher; |
| | | import java.util.regex.Pattern; |
| | | import java.util.concurrent.ExecutorService; |
| | | import java.util.concurrent.Executors; |
| | | |
| | | //@SpringBootTest |
| | | //@RunWith(SpringRunner.class) |
| | |
| | | |
| | | @Test |
| | | public void testSend() { |
| | | |
| | | |
| | | Pattern pattern = Pattern.compile("(?=.*(?:è¿è¡|æºå¥½|å¯ä»¥|ä¸é)).*$"); |
| | | Matcher matcher = pattern.matcher("è¿è¡å§ï¼å°±æ¯è¿æç¹ç¼"); |
| | | System.out.println(matcher.matches()); |
| | | System.out.println("Spring Frameworkçæ¬ï¼" + SpringVersion.getVersion()); |
| | | // rabbitTemplate.convertAndSend(RabbitMqConfig.EXCHANGE_NAME, "phone.001", "æµè¯æ°æ®001"); |
| | | // rabbitTemplate.convertAndSend(RabbitMqConfig.EXCHANGE_NAME, "phone.002", "æµè¯æ°æ®002"); |
| | | // rabbitTemplate.convertAndSend(RabbitMqConfig.EXCHANGE_NAME, "phone.003", "æµè¯æ°æ®003"); |
| | | String str = "absdf"; |
| | | String c = Character.toUpperCase(str.charAt(0)) + str.substring(1); |
| | | System.out.println(c); |
| | | "æ¨å¥½ï¼ææ¯æµäºå»é¢å¼ å»çï¼æ¨æ¯${name}åï¼è¿æ¯å®¶å±?".replaceAll("$$*variable", "AA"); |
| | | // Pattern pattern = Pattern.compile("^(?!.*(好|太好)).*$"); |
| | | // Matcher matcher = pattern.matcher("ç¡ç ä¸å¥½"); |
| | | // System.out.println(matcher.matches()); |
| | | // å建åºå®å¤§å°ççº¿ç¨æ± |
| | | // ExecutorService executorService = Executors.newFixedThreadPool(10); |
| | | // |
| | | // executorService.submit(new PhoneTask()); |
| | | } |
| | | } |
| | |
| | | // æ°å¢åæ°é
ç½® |
| | | export function addConfig(data) { |
| | | return request({ |
| | | url: '/system/config', |
| | | url: '/system/config/add', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | |
| | | // ä¿®æ¹åæ°é
ç½® |
| | | export function updateConfig(data) { |
| | | return request({ |
| | | url: '/system/config', |
| | | method: 'put', |
| | | url: '/system/config/edit', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | |
| | | export function delConfig(configId) { |
| | | return request({ |
| | | url: '/system/config/' + configId, |
| | | method: 'delete' |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | |
| | | export function refreshCache() { |
| | | return request({ |
| | | url: '/system/config/refreshCache', |
| | | method: 'delete' |
| | | method: 'get' |
| | | }) |
| | | } |
| | |
| | | // æ°å¢åå
¸ç±»å |
| | | export function addType(data) { |
| | | return request({ |
| | | url: '/system/dict/type', |
| | | url: '/system/dict/type/add', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | |
| | | // ä¿®æ¹åå
¸ç±»å |
| | | export function updateType(data) { |
| | | return request({ |
| | | url: '/system/dict/type', |
| | | method: 'put', |
| | | url: '/system/dict/type/edit', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | |
| | | export function delType(dictId) { |
| | | return request({ |
| | | url: '/system/dict/type/' + dictId, |
| | | method: 'delete' |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | |
| | | export function refreshCache() { |
| | | return request({ |
| | | url: '/system/dict/type/refreshCache', |
| | | method: 'delete' |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | |
| | | package com.smartor.common; |
| | | |
| | | import com.aliyun.dysmsapi20170525.models.SendSmsResponseBody; |
| | | import com.smartor.domain.BaseSmsRequest; |
| | | import com.smartor.domain.DingTalkReqVo; |
| | | import com.smartor.domain.SendMagParam; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.mapper.PatWildcardMapper; |
| | | import com.smartor.service.DingTalkService; |
| | | import com.smartor.service.impl.BaseSmsaccountServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.lang.reflect.Field; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * åéæå¡å·¥å
·ç±» |
| | |
| | | |
| | | @Autowired |
| | | private DingTalkService dingTalkService; |
| | | |
| | | @Autowired |
| | | private PatWildcardMapper patWildcardMapper; |
| | | |
| | | public Boolean sendMsg(SendMagParam sendMagParam) { |
| | | switch (sendMagParam.getType()) { |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 对é®é¢ä¸çéé
符è¿è¡å¹é
|
| | | * |
| | | * @param script |
| | | * @param patArchive |
| | | * @return |
| | | */ |
| | | public String patWildcard(String script, PatArchive patArchive) { |
| | | List<PatWildcard> patWildcards = patWildcardMapper.selectPatWildcardList(new PatWildcard()); |
| | | for (PatWildcard patWildcard : patWildcards) { |
| | | try { |
| | | //è·åæ£è
对åºçåæ®µçå¼ |
| | | Field field = patArchive.getClass().getField(patWildcard.getPatField()); |
| | | field.setAccessible(true); |
| | | String value = field.get(patArchive).toString(); |
| | | //å°é®é¢ä¸çéé
符è¿è¡æ¿æ¢ |
| | | script.replaceAll(patWildcard.getWildcard(), value); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | return script; |
| | | } |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | public String ttsPlayback(String fileText, String uuid) { |
| | | System.out.println("=====================é®é¢å
容ï¼" + fileText + "UUID ; " + uuid); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("text", fileText); |
| | | map.put("uuid", uuid); |
| | |
| | | */ |
| | | @Excel(name = " æ¯å¦åé ï¼ 0 æååé 1 宿¶åé 2 ç«å³åé ") |
| | | @ApiModelProperty(value = "æ¯å¦åé ï¼ 0 æååé 1 宿¶åé 2 ç«å³åé ") |
| | | private Integer isSend; |
| | | private Integer sendType; |
| | | |
| | | /** |
| | | * åéç¶æï¼ 0 失败 1æå |
| | | */ |
| | | @Excel(name = " åéç¶æï¼ 0 失败 1æå ") |
| | | @ApiModelProperty(value = "åéç¶æï¼ 0 失败 1æå ") |
| | | @Excel(name = " åéç¶æï¼ 1å建 2æ§è¡ä¸ 3 æå 4ç»æ¢ 5宿 ") |
| | | @ApiModelProperty(value = "åéç¶æï¼ 1å建 2æ§è¡ä¸ 3 æå 4ç»æ¢ 5宿 ") |
| | | private String sendState; |
| | | |
| | | /** |
| | |
| | | @ApiModelProperty(value = "å°±è¯ç¼å·ï¼å¯¹åºçouthospnoãinhospnoï¼") |
| | | private String hospno; |
| | | |
| | | |
| | | /** |
| | | * ä»»å¡æè¿° |
| | | */ |
| | | @Excel(name = "ä»»å¡æè¿°") |
| | | @ApiModelProperty(value = "ä»»å¡æè¿°") |
| | | private String taskDesc; |
| | | } |
| | |
| | | private String username; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @Excel(name = " outbounduuid ") |
| | | @ApiModelProperty(value = "outbounduuid") |
| | | private String outbounduuid; |
| | | |
| | | /** |
| | | * å°±è¯è®°å½ç¼å· |
| | | */ |
| | | @Excel(name = " å°±è¯è®°å½ç¼å· ") |
| | |
| | | */ |
| | | @Excel(name = "åºå·") |
| | | @ApiModelProperty(value = "åºå·") |
| | | private String badNo; |
| | | private String bedNo; |
| | | |
| | | /** |
| | | * ç¾ç
åç§° |
| | |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | @ApiModelProperty(value = "ç¨æ·å") |
| | | private String username; |
| | | |
| | | /** |
| | | * outbounduuid |
| | | */ |
| | | @Excel(name = " outbounduuid ") |
| | | @ApiModelProperty(value = "outbounduuid") |
| | | private String outbounduuid; |
| | | |
| | | /** |
| | | * å°±è¯è®°å½ç¼å· |
| | |
| | | @ApiModelProperty(value = "æ£è
ä¸åä¸ä»»å¡å
³è表éå") |
| | | private List<PatTaskRelevance> patTaskRelevances; |
| | | |
| | | /** |
| | | * åºå· |
| | | */ |
| | | @Excel(name = "åºå·") |
| | | @ApiModelProperty(value = "åºå·") |
| | | private Long badNo; |
| | | |
| | | /** |
| | | * ç¾ç
åç§° |
| | | */ |
| | | @Excel(name = "ç¾ç
åç§°") |
| | | @ApiModelProperty(value = "ç¾ç
åç§°") |
| | | private String icdName; |
| | | |
| | | /** |
| | | * ç
åå· |
| | | */ |
| | | @Excel(name = "ç
åå·") |
| | | @ApiModelProperty(value = "ç
åå·") |
| | | private String medicalRecordNo; |
| | | |
| | | /** |
| | | * 宣æå
容 |
| | | */ |
| | | @Excel(name = "宣æå
容") |
| | | @ApiModelProperty(value = "宣æå
容") |
| | | private String preachcontent; |
| | | |
| | | |
| | | // /** |
| | | // * åºå· |
| | | // */ |
| | | // @Excel(name = "åºå·") |
| | | // @ApiModelProperty(value = "åºå·") |
| | | // private Long bedNo; |
| | | // |
| | | // /** |
| | | // * ç¾ç
åç§° |
| | | // */ |
| | | // @Excel(name = "ç¾ç
åç§°") |
| | | // @ApiModelProperty(value = "ç¾ç
åç§°") |
| | | // private String icdName; |
| | | // |
| | | // /** |
| | | // * ç
åå· |
| | | // */ |
| | | // @Excel(name = "ç
åå·") |
| | | // @ApiModelProperty(value = "ç
åå·") |
| | | // private String medicalRecordNo; |
| | | // |
| | | // /** |
| | | // * 宣æå
容 |
| | | // */ |
| | | // @Excel(name = "宣æå
容") |
| | | // @ApiModelProperty(value = "宣æå
容") |
| | | // private String preachcontent; |
| | | // |
| | | // |
| | | /** |
| | | * åéæ¶é´æ®µ |
| | | */ |
| | |
| | | @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åºé¢ 3.ä¸ç
ï¼") |
| | | @ApiModelProperty(value = "å°±è¯ç±»åï¼1é¨è¯ 2åºé¢ 3.ä¸ç
ï¼") |
| | | private String hospType; |
| | | |
| | | /** |
| | | * 微信 |
| | | */ |
| | | @Excel(name = " 微信") |
| | | @ApiModelProperty(value = "微信") |
| | | private String wechat; |
| | | |
| | | |
| | | /** |
| | | * è¯æåç§° |
| | | */ |
| | | @Excel(name = " è¯æåç§°") |
| | | @ApiModelProperty(value = "è¯æåç§°") |
| | | private String diagname; |
| | | |
| | | /** |
| | | * ç§å®¤åç§° |
| | | */ |
| | | @Excel(name = "ç§å®¤åç§°") |
| | | @ApiModelProperty(value = "ç§å®¤åç§°") |
| | | private String deptname; |
| | | |
| | | /** |
| | | * å°±è¯æ¥æ |
| | | */ |
| | | @Excel(name = " å°±è¯æ¥æ") |
| | | @ApiModelProperty(value = "å°±è¯æ¥æ") |
| | | private Date admindate; |
| | | |
| | | /** |
| | | * ç
æ¿å· |
| | | */ |
| | | @Excel(name = " ç
æ¿å·") |
| | | @ApiModelProperty(value = "ç
æ¿å·") |
| | | private String roomno; |
| | | |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("id", getId()).append("sendname", getSendname()).append("phone", getPhone()).append("sex", getSex()).append("age", getAge()).append("sfzh", getSfzh()).append("addr", getAddr()).append("senderdetail", getSenderdetail()).append("type", getType()).append("taskid", getTaskid()).append("templateid", getTemplateid()).append("templatename", getTemplatename()).append("senddate", getSenddate()).append("sendlimitabegin", getSendlimitabegin()).append("sendlimitaend", getSendlimitaend()).append("sendlimitpbegin", getSendlimitpbegin()).append("sendlimitpend", getSendlimitpend()).append("sendlimitnbegin", getSendlimitnbegin()).append("sendlimitnend", getSendlimitnend()).append("sendstate", getSendstate()).append("senduuid", getSenduuid()).append("result", getResult()).append("finishtime", getFinishtime()).append("userid", getUserid()).append("username", getUsername()).append("outbounduuid", getOutbounduuid()).append("recordid", getRecordid()).append("recallcount", getRecallcount()).append("exrecallcount", getExrecallcount()).append("pulltime", getPulltime()).append("bqsms", getBqsms()).append("bhsms", getBhsms()).append("deptcode", getDeptcode()).append("labelstatus", getLabelstatus()).append("delFlag", getDelFlag()).append("updateBy", getUpdateBy()).append("updateTime", getUpdateTime()).append("createBy", getCreateBy()).append("createTime", getCreateTime()).append("isupload", getIsupload()).append("uploadTime", getUploadTime()).append("orgid", getOrgid()).append("pid", getPid()).append("guid", getGuid()).append("textParam", getTextParam()).toString(); |
| | | } |
| | | // |
| | | // /** |
| | | // * é访人 |
| | | // */ |
| | | // @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åºé¢ 3.ä¸ç
ï¼") |
| | | // @ApiModelProperty(value = "å°±è¯ç±»åï¼1é¨è¯ 2åºé¢ 3.ä¸ç
ï¼") |
| | | // private String hospType; |
| | | // |
| | | // /** |
| | | // * 微信 |
| | | // */ |
| | | // @Excel(name = " 微信") |
| | | // @ApiModelProperty(value = "微信") |
| | | // private String wechat; |
| | | // |
| | | // |
| | | // /** |
| | | // * è¯æåç§° |
| | | // */ |
| | | // @Excel(name = " è¯æåç§°") |
| | | // @ApiModelProperty(value = "è¯æåç§°") |
| | | // private String diagname; |
| | | // |
| | | // /** |
| | | // * ç§å®¤åç§° |
| | | // */ |
| | | // @Excel(name = "ç§å®¤åç§°") |
| | | // @ApiModelProperty(value = "ç§å®¤åç§°") |
| | | // private String deptname; |
| | | // |
| | | // /** |
| | | // * å°±è¯æ¥æ |
| | | // */ |
| | | // @Excel(name = " å°±è¯æ¥æ") |
| | | // @ApiModelProperty(value = "å°±è¯æ¥æ") |
| | | // private Date admindate; |
| | | // |
| | | // /** |
| | | // * ç
æ¿å· |
| | | // */ |
| | | // @Excel(name = " ç
æ¿å·") |
| | | // @ApiModelProperty(value = "ç
æ¿å·") |
| | | // private String roomno; |
| | | } |
| | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ä»»å¡æè¿° |
| | | */ |
| | | @Excel(name = "ä»»å¡æè¿°") |
| | | @ApiModelProperty(value = "ä»»å¡æè¿°") |
| | | private String taskDesc; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Long taskid; |
| | |
| | | * |
| | | */ |
| | | @Excel(name = " ") |
| | | private String taskname; |
| | | private String taskName; |
| | | |
| | | /** |
| | | * |
| | |
| | | */ |
| | | @ApiModelProperty("æ¥æº") |
| | | @Excel(name = " æ¥æº ") |
| | | private Long source; |
| | | private Long sourcefrom; |
| | | |
| | | /** |
| | | * 建档æ¶é´ |
| | |
| | | */ |
| | | @ApiModelProperty("ä¼å屿§:0éä¼åï¼1ä¸è¬ä¼åã2éè¦ä¼å") |
| | | @Excel(name = " ä¼å屿§:0éä¼åï¼1ä¸è¬ä¼åã2éè¦ä¼å ") |
| | | private String membertype; |
| | | private String viptype; |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("patid", getPatid()).append("name", getName()).append("sex", getSex()).append("idcardno", getIdcardno()).append("birthdate", getBirthdate()).append("age", getAge()).append("source", getSource()).append("archivetime", getArchivetime()).append("archiveby", getArchiveby()).append("telcode", getTelcode()).append("relativetelcode", getRelativetelcode()).append("idcardtype", getIdcardtype()).append("orgid", getOrgid()).append("openid", getOpenid()).append("delFlag", getDelFlag()).append("updateBy", getUpdateBy()).append("updateTime", getUpdateTime()).append("createBy", getCreateBy()).append("createTime", getCreateTime()).append("isupload", getIsupload()).append("uploadTime", getUploadTime()).toString(); |
| | | return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("patid", getPatid()).append("name", getName()).append("sex", getSex()).append("idcardno", getIdcardno()).append("birthdate", getBirthdate()).append("age", getAge()).append("sourcefrom", getSourcefrom()).append("archivetime", getArchivetime()).append("archiveby", getArchiveby()).append("telcode", getTelcode()).append("relativetelcode", getRelativetelcode()).append("idcardtype", getIdcardtype()).append("orgid", getOrgid()).append("openid", getOpenid()).append("delFlag", getDelFlag()).append("updateBy", getUpdateBy()).append("updateTime", getUpdateTime()).append("createBy", getCreateBy()).append("createTime", getCreateTime()).append("isupload", getIsupload()).append("uploadTime", getUploadTime()).toString(); |
| | | } |
| | | } |
| | |
| | | */ |
| | | @ApiModelProperty("æ¥æº") |
| | | @Excel(name = " æ¥æº ") |
| | | private Long source; |
| | | private Long sourcefrom; |
| | | |
| | | /** |
| | | * 建档æ¶é´ |
| | |
| | | @ApiModelProperty(value = "æ¯å¦å卿ä½ï¼1 æ°å¢ 2ä¿®æ¹ 3å é¤") |
| | | private Integer isoperation; |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("patid", getPatid()).append("name", getName()).append("sex", getSex()).append("iccardno", getIdcardno()).append("birthdate", getBirthdate()).append("age", getAge()).append("source", getSource()).append("archivetime", getArchivetime()).append("archiveby", getArchiveby()).append("telcode", getTelcode()).append("relativetelcode", getRelativetelcode()).append("iccardtype", getIdcardtype()).append("orgid", getOrgid()).append("openid", getOpenid()).append("delFlag", getDelFlag()).append("updateBy", getUpdateBy()).append("updateTime", getUpdateTime()).append("createBy", getCreateBy()).append("createTime", getCreateTime()).append("isupload", getIsupload()).append("uploadTime", getUploadTime()).toString(); |
| | | } |
| | | } |
| | |
| | | @ApiModelProperty(value = "ç
æ¿å·") |
| | | private String roomno; |
| | | |
| | | /** |
| | | * ææ¬åéåæ° |
| | | */ |
| | | @Excel(name = "ææ¬åéåæ°") |
| | | @ApiModelProperty(value = "ææ¬åéåæ°") |
| | | private String textParam; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.domain; |
| | | |
| | | 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; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | |
| | | /** |
| | | * æ£è
ä¿¡æ¯éé
符对象 pat_wildcard |
| | | * |
| | | * @author ruoyi |
| | | * @date 2024-05-09 |
| | | */ |
| | | @ApiModel(value = "PatWildcard", description = "æ£è
ä¿¡æ¯éé
符对象") |
| | | @Data |
| | | public class PatWildcard extends BaseEntity { |
| | | |
| | | /** |
| | | * èªå¢ID |
| | | */ |
| | | @ApiModelProperty(value = "èªå¢ID") |
| | | private Long id; |
| | | |
| | | /** |
| | | * éé
符 |
| | | */ |
| | | @Excel(name = "éé
符") |
| | | @ApiModelProperty(value = "éé
符") |
| | | private String wildcard; |
| | | |
| | | /** |
| | | * æ£è
对åºçåæ®µ |
| | | */ |
| | | @Excel(name = "æ£è
对åºçåæ®µ") |
| | | @ApiModelProperty(value = "æ£è
对åºçåæ®µ") |
| | | private String patField; |
| | | |
| | | /** |
| | | * å 餿 è®° |
| | | */ |
| | | @ApiModelProperty(value = "å 餿 è®°") |
| | | private String delFlag; |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import java.util.List; |
| | | import com.smartor.domain.IvrTask; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * è¯é³ä»»å¡Mapperæ¥å£ |
| | |
| | | * @author smartor |
| | | * @date 2023-03-24 |
| | | */ |
| | | @Mapper |
| | | public interface IvrTaskMapper |
| | | { |
| | | /** |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.mapper; |
| | | |
| | | import com.smartor.domain.PatWildcard; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æ£è
ä¿¡æ¯éé
符Mapperæ¥å£ |
| | | * |
| | | * @author ruoyi |
| | | * @date 2024-05-09 |
| | | */ |
| | | @Mapper |
| | | public interface PatWildcardMapper { |
| | | /** |
| | | * æ¥è¯¢æ£è
ä¿¡æ¯éé
符 |
| | | * |
| | | * @param id æ£è
ä¿¡æ¯éé
ç¬¦ä¸»é® |
| | | * @return æ£è
ä¿¡æ¯éé
符 |
| | | */ |
| | | public PatWildcard selectPatWildcardById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£è
ä¿¡æ¯éé
符å表 |
| | | * |
| | | * @param patWildcard æ£è
ä¿¡æ¯éé
符 |
| | | * @return æ£è
ä¿¡æ¯éé
符éå |
| | | */ |
| | | public List<PatWildcard> selectPatWildcardList(PatWildcard patWildcard); |
| | | |
| | | /** |
| | | * æ°å¢æ£è
ä¿¡æ¯éé
符 |
| | | * |
| | | * @param patWildcard æ£è
ä¿¡æ¯éé
符 |
| | | * @return ç»æ |
| | | */ |
| | | public int insertPatWildcard(PatWildcard patWildcard); |
| | | |
| | | /** |
| | | * ä¿®æ¹æ£è
ä¿¡æ¯éé
符 |
| | | * |
| | | * @param patWildcard æ£è
ä¿¡æ¯éé
符 |
| | | * @return ç»æ |
| | | */ |
| | | public int updatePatWildcard(PatWildcard patWildcard); |
| | | |
| | | /** |
| | | * å 餿£è
ä¿¡æ¯éé
符 |
| | | * |
| | | * @param id æ£è
ä¿¡æ¯éé
ç¬¦ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deletePatWildcardById(Long id); |
| | | |
| | | /** |
| | | * æ¹éå 餿£è
ä¿¡æ¯éé
符 |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deletePatWildcardByIds(Long[] ids); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.service; |
| | | |
| | | import com.smartor.domain.PatWildcard; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æ£è
ä¿¡æ¯éé
符Serviceæ¥å£ |
| | | * |
| | | * @author ruoyi |
| | | * @date 2024-05-09 |
| | | */ |
| | | public interface IPatWildcardService |
| | | { |
| | | /** |
| | | * æ¥è¯¢æ£è
ä¿¡æ¯éé
符 |
| | | * |
| | | * @param id æ£è
ä¿¡æ¯éé
ç¬¦ä¸»é® |
| | | * @return æ£è
ä¿¡æ¯éé
符 |
| | | */ |
| | | public PatWildcard selectPatWildcardById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£è
ä¿¡æ¯éé
符å表 |
| | | * |
| | | * @param patWildcard æ£è
ä¿¡æ¯éé
符 |
| | | * @return æ£è
ä¿¡æ¯éé
符éå |
| | | */ |
| | | public List<PatWildcard> selectPatWildcardList(PatWildcard patWildcard); |
| | | |
| | | /** |
| | | * æ°å¢æ£è
ä¿¡æ¯éé
符 |
| | | * |
| | | * @param patWildcard æ£è
ä¿¡æ¯éé
符 |
| | | * @return ç»æ |
| | | */ |
| | | public int insertPatWildcard(PatWildcard patWildcard); |
| | | |
| | | /** |
| | | * ä¿®æ¹æ£è
ä¿¡æ¯éé
符 |
| | | * |
| | | * @param patWildcard æ£è
ä¿¡æ¯éé
符 |
| | | * @return ç»æ |
| | | */ |
| | | public int updatePatWildcard(PatWildcard patWildcard); |
| | | |
| | | /** |
| | | * æ¹éå 餿£è
ä¿¡æ¯éé
符 |
| | | * |
| | | * @param ids éè¦å é¤çæ£è
ä¿¡æ¯éé
符主é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deletePatWildcardByIds(Long[] ids); |
| | | |
| | | /** |
| | | * å 餿£è
ä¿¡æ¯éé
ç¬¦ä¿¡æ¯ |
| | | * |
| | | * @param id æ£è
ä¿¡æ¯éé
ç¬¦ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deletePatWildcardById(Long id); |
| | | } |
| | |
| | | matcher2 = pattern2.matcher(ivrLibaTargetVO.getContent()); |
| | | } |
| | | if (StringUtils.isNotEmpty(ivrLibaTargetoption.getTargetregex2()) && matcher2.matches() && StringUtils.isNotEmpty(ivrLibaTargetoption.getTargetregex()) && matcher.matches() || StringUtils.isEmpty(ivrLibaTargetoption.getTargetregex2()) && StringUtils.isNotEmpty(ivrLibaTargetoption.getTargetregex()) && matcher.matches()) { |
| | | return ivrLibaTargetoption.getOptiondesc(); |
| | | return ivrLibaTargetoption.getTargetvalue(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.google.gson.Gson; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.core.domain.model.LoginUser; |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | |
| | | private IvrLibaTemplateTargetoptionMapper ivrLibaScriptTargetoptionMapper; |
| | | |
| | | @Autowired |
| | | private IvrLibaTemplateScriptMapper ivrLibaTemplateScriptMapper; |
| | | |
| | | @Autowired |
| | | private IvrTaskVisitResultMapper ivrTaskVisitResultMapper; |
| | | |
| | | @Autowired |
| | |
| | | |
| | | @Autowired |
| | | private RabbitTemplate rabbitTemplate; |
| | | |
| | | |
| | | @Autowired |
| | | private PatMedOuthospMapper patMedOuthospMapper; |
| | | |
| | | @Autowired |
| | | private PatMedInhospMapper patMedInhospMapper; |
| | | |
| | | |
| | | /** |
| | |
| | | patTaskRelevance.setPhone(ivrTaskcall1.getPhone()); |
| | | patTaskRelevance.setAddr(ivrTaskcall1.getAddr()); |
| | | patTaskRelevance.setDeptName(ivrTaskcall1.getDeptname()); |
| | | patTaskRelevance.setBedNo(ivrTaskcall1.getBadNo()); |
| | | patTaskRelevance.setBedNo(ivrTaskcall1.getBedNo()); |
| | | patTaskRelevance.setDiagname(ivrTaskcall1.getDiagname()); |
| | | patTaskRelevances.add(patTaskRelevance); |
| | | } |
| | |
| | | if (ivrTaskcallVO.getIsoperation() != null && ivrTaskcallVO.getIsoperation() == 1) { |
| | | //å¾ä»»å¡è¡¨ä¸ï¼æ°å¢ä»»å¡ |
| | | IvrTask ivrTask = DtoConversionUtils.sourceToTarget(ivrTaskcallVO, IvrTask.class); |
| | | Integer taskId = ivrTaskService.insertIvrTask(ivrTask); |
| | | ivrTaskService.insertIvrTask(ivrTask); |
| | | |
| | | ivrTaskcallVO.setTaskid(ivrTask.getTaskid().longValue()); |
| | | //æ°å¢ |
| | |
| | | ivrTaskcall.setPhone(patTaskRelevance.getPhone()); |
| | | ivrTaskcall.setAddr(patTaskRelevance.getAddr()); |
| | | ivrTaskcall.setCreateTime(DateUtils.getNowDate()); |
| | | ivrTaskcall.setTextParam(new Gson().toJson(ivrTaskcallVO.getTextParam())); |
| | | ivrTaskcall.setTextParam(new Gson().toJson(patTaskRelevance.getTextParam())); |
| | | if (CollectionUtils.isNotEmpty(ivrTaskcallVO.getSendTimeslot())) { |
| | | ivrTaskcall.setSendTimeSlot(ivrTaskcallVO.getSendTimeslot().toString()); |
| | | } |
| | |
| | | @Override |
| | | public int heTaskSend(IvrTaskSingleVO ivrTaskcallVO) { |
| | | //夿任塿¯å¦æ¯ç«å³åé |
| | | if (ivrTaskcallVO.getSendType().equals("2") && ivrTaskcallVO.getSendstate() == 1) { |
| | | if (ivrTaskcallVO.getSendType().equals("2")) { |
| | | IvrTaskcallMQ ivrTaskcallMQ = new IvrTaskcallMQ(); |
| | | ivrTaskcallMQ.setTaskid(ivrTaskcallVO.getTaskid()); |
| | | ivrTaskcallMQ.setSendType("1"); |
| | |
| | | message.getMessageProperties().setHeader("x-delay", 0); |
| | | return message; |
| | | }); |
| | | } else if (ivrTaskcallVO.getSendType().equals("1") && ivrTaskcallVO.getSendstate() == 1) { |
| | | } else if (ivrTaskcallVO.getSendType().equals("1")) { |
| | | //æ¶é´æ®µåé |
| | | if (CollectionUtils.isNotEmpty(ivrTaskcallVO.getSendTimeslot())) { |
| | | for (TaskSendTimeVO taskSendTimeVO : ivrTaskcallVO.getSendTimeslot()) { |
| | |
| | | return message; |
| | | }); |
| | | } |
| | | //å°ä»»å¡ç¶æä¿®æ¹ææ§è¡ä¸ |
| | | IvrTask ivrTask = new IvrTask(); |
| | | ivrTask.setTaskid(ivrTaskcallVO.getTaskid()); |
| | | ivrTask.setSendState("2"); |
| | | ivrTaskService.updateIvrTask(ivrTask); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | @Override |
| | | public void phoneCallBack(PhoneCallBackVO phoneCallBackVO) { |
| | | synchronized (new IvrTaskSingleServiceImpl()) { |
| | | phoneCallBackVO.setTextResult(phoneCallBackVO.getTextResult().substring(0, phoneCallBackVO.getTextResult().length() - 1)); |
| | | SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat("YYYY-MM-dd HH:mm:ss"); |
| | | |
| | | //è·åæ°æ® |
| | | Boolean aBoolean = redisCache.hasKey(phoneCallBackVO.getUuid()); |
| | |
| | | Integer hangupValue = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "hangup"); |
| | | PhoneUtils phoneUtils = new PhoneUtils(); |
| | | if (hangupValue != null && hangupValue == 1) { |
| | | log.info("çµè¯è¦ææäº"); |
| | | String date = simpleDateFormat1.format(new Date()); |
| | | log.info("çµè¯è¦ææäº: {}", date); |
| | | //hangupValue == 1 éè®¿ç»æï¼ç´æ¥å¯ä»¥æçµè¯ |
| | | phoneUtils.hangup("", "", "", "", "", "", "", phoneCallBackVO.getUuid()); |
| | | return; |
| | | } |
| | | |
| | | Map<String, Object> map = redisCache.getCacheObject(phoneCallBackVO.getUuid()); |
| | | IvrTaskSingle ivrTaskcall = (IvrTaskSingle) map.get("ivrTaskcall"); |
| | | IvrTaskSingle ivrTaskcall = (IvrTaskSingle) map.get("ivrTaskSingle"); |
| | | List<IvrLibaTemplateScriptVO> ivrLibaTemplateScriptVOs = (List<IvrLibaTemplateScriptVO>) map.get("ivrLibaTemplateScriptVO"); |
| | | //å°uuidæ´æ°å°æ°æ®åºä¸ |
| | | ivrTaskcall.setSenduuid(phoneCallBackVO.getUuid()); |
| | |
| | | redisCache.setCacheObject(phoneCallBackVO.getUuid() + "noVoice", 0, 120, TimeUnit.MINUTES); |
| | | IvrLibaTemplateScriptVO nextQuestion = getNextQuestion(ivrLibaTemplateScriptVOs, nowQuestion); |
| | | // é®é¢ï¼ å»è°ç¨âttsåæåææ¾âæ¥å£ |
| | | String date = simpleDateFormat1.format(new Date()); |
| | | log.info("å»è°ç¨ttsåæåææ¾æ¥å£: {},uuid为ï¼{}", date, phoneCallBackVO.getUuid()); |
| | | phoneUtils.ttsPlayback(nowQuestion.getQuestionText(), phoneCallBackVO.getUuid()); |
| | | } |
| | | } else { |
| | |
| | | //è°ç¨ivrLibaTemplateScriptVOä¸çslienceText(éé»è¯æ¯) |
| | | String slienceText = nowQuestion.getSlienceText(); |
| | | //éé»è¯æ¯ + é®é¢ï¼ å»è°ç¨âttsåæåææ¾âæ¥å£ |
| | | String date = simpleDateFormat1.format(new Date()); |
| | | log.info("éé»è¯æ¯ + é®é¢,å»è°ç¨ttsåæåææ¾æ¥å£: {},uuid为ï¼{}", date, phoneCallBackVO.getUuid()); |
| | | phoneUtils.ttsPlayback(slienceText + nowQuestion.getQuestionText(), phoneCallBackVO.getUuid()); |
| | | return; |
| | | } |
| | |
| | | Pattern pattern2 = Pattern.compile(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()); |
| | | matcher2 = pattern2.matcher(phoneCallBackVO.getTextResult()); |
| | | } |
| | | log.info("phoneCallBack--Targetregexçå¼ä¸ºï¼{}, phoneCallBack--Targetregex2çå¼ä¸ºï¼{}", nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex(), nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()); |
| | | if (StringUtils.isNotEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() && StringUtils.isNotEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches() |
| | | || StringUtils.isEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && StringUtils.isNotEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() |
| | | || StringUtils.isEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && StringUtils.isNotEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches()) { |
| | | log.error("PCB--getQuestionTexté®é¢ä¸ºï¼{},UUIDï¼{}", nowQuestion.getQuestionText(), phoneCallBackVO.getUuid()); |
| | | if (StringUtils.isNotEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() && StringUtils.isNotEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches() || StringUtils.isEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && StringUtils.isNotEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() || StringUtils.isEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && StringUtils.isNotEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches()) { |
| | | //说æå¹é
æ£ç¡®äº |
| | | //è¿éåºè¯¥å
å¤æç±»åï¼å»åä¿®æ¹ï¼è®¾ç½®IsUserOperationæ¯åéé¢çæ¹æ³ |
| | | nowQuestion.getIvrLibaScriptTargetoptionList().get(j).setIsUserOperation(true); |
| | |
| | | return; |
| | | } else if (nextQuestion > ivrLibaTemplateScriptVOs.size()) { |
| | | //没æä¸ä¸é¢äºï¼å°±ç»æäº |
| | | String date = simpleDateFormat1.format(new Date()); |
| | | log.error("没æä¸ä¸é¢äºï¼å°±ç»æäº: {},uuid为ï¼{}", date, phoneCallBackVO.getUuid()); |
| | | redisCache.setCacheObject(phoneCallBackVO.getUuid() + "hangup", 1, 120, TimeUnit.MINUTES); |
| | | phoneUtils.ttsPlayback(ivrLibaTemplateVO.getRevisitAfter(), phoneCallBackVO.getUuid()); |
| | | try { |
| | |
| | | questionMessage.setNowQuestion(nextQuestion); |
| | | redisCache.setCacheObject(phoneCallBackVO.getUuid() + "returnQues", questionMessage, 120, TimeUnit.MINUTES); |
| | | redisCache.setCacheObject(phoneCallBackVO.getUuid() + "mateNum", 0, 120, TimeUnit.MINUTES); |
| | | String date = simpleDateFormat1.format(new Date()); |
| | | log.info("妿ä¸ä¸é¢ä¸ºç©º.åæ°çæ°æ®è¿å,å¹¶å ä¸æè°¢è¯: {},uuid为ï¼{}", date, phoneCallBackVO.getUuid()); |
| | | phoneUtils.ttsPlayback(nextQuestion.getQuestionText(), phoneCallBackVO.getUuid()); |
| | | return; |
| | | } else { |
| | | //å°±å¯ä»¥ææçµè¯äº |
| | | String date = simpleDateFormat1.format(new Date()); |
| | | log.info("å°±å¯ä»¥ææçµè¯äº------: {},uuid为ï¼{}", date, phoneCallBackVO.getUuid()); |
| | | redisCache.setCacheObject(phoneCallBackVO.getUuid() + "hangup", 1, 120, TimeUnit.MINUTES); |
| | | phoneUtils.ttsPlayback(ivrLibaTemplateVO.getRevisitAfter(), phoneCallBackVO.getUuid()); |
| | | try { |
| | |
| | | redisCache.setCacheObject(phoneCallBackVO.getUuid() + "isOver", 1, 120, TimeUnit.MINUTES); |
| | | } |
| | | //è°ç¨â15ãttsåæåææ¾ï¼ tts_playbackâå°ç»æä¼ å |
| | | String date = simpleDateFormat1.format(new Date()); |
| | | log.info("è°ç¨â15ãttsåæåææ¾------: {},uuid为ï¼{}", date, phoneCallBackVO.getUuid()); |
| | | phoneUtils.ttsPlayback(nowQuestion.getQuestionText() + ivrLibaTemplateScriptVO.getSubmoduleText(), phoneCallBackVO.getUuid()); |
| | | } |
| | | break; |
| | | } |
| | | String date = simpleDateFormat1.format(new Date()); |
| | | log.info("æåçä¿¡æ¯åå¤-: {},uuid为ï¼{}", date, phoneCallBackVO.getUuid()); |
| | | phoneUtils.ttsPlayback(nowQuestion.getQuestionText(), phoneCallBackVO.getUuid()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | //ä¸é¢ç代ç ä¸è½å é¤ï¼ä¸é¢çæ¹æ³åªæ¯é
åçµè¯ç«¯èè°ç¨çï¼ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.service.impl; |
| | | |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.smartor.domain.PatWildcard; |
| | | import com.smartor.mapper.PatWildcardMapper; |
| | | import com.smartor.service.IPatWildcardService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æ£è
ä¿¡æ¯éé
符Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author ruoyi |
| | | * @date 2024-05-09 |
| | | */ |
| | | @Service |
| | | public class PatWildcardServiceImpl implements IPatWildcardService { |
| | | @Autowired |
| | | private PatWildcardMapper patWildcardMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£è
ä¿¡æ¯éé
符 |
| | | * |
| | | * @param id æ£è
ä¿¡æ¯éé
ç¬¦ä¸»é® |
| | | * @return æ£è
ä¿¡æ¯éé
符 |
| | | */ |
| | | @Override |
| | | public PatWildcard selectPatWildcardById(Long id) { |
| | | return patWildcardMapper.selectPatWildcardById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£è
ä¿¡æ¯éé
符å表 |
| | | * |
| | | * @param patWildcard æ£è
ä¿¡æ¯éé
符 |
| | | * @return æ£è
ä¿¡æ¯éé
符 |
| | | */ |
| | | @Override |
| | | public List<PatWildcard> selectPatWildcardList(PatWildcard patWildcard) { |
| | | return patWildcardMapper.selectPatWildcardList(patWildcard); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢æ£è
ä¿¡æ¯éé
符 |
| | | * |
| | | * @param patWildcard æ£è
ä¿¡æ¯éé
符 |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertPatWildcard(PatWildcard patWildcard) { |
| | | patWildcard.setCreateTime(DateUtils.getNowDate()); |
| | | return patWildcardMapper.insertPatWildcard(patWildcard); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹æ£è
ä¿¡æ¯éé
符 |
| | | * |
| | | * @param patWildcard æ£è
ä¿¡æ¯éé
符 |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updatePatWildcard(PatWildcard patWildcard) { |
| | | patWildcard.setUpdateTime(DateUtils.getNowDate()); |
| | | return patWildcardMapper.updatePatWildcard(patWildcard); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå 餿£è
ä¿¡æ¯éé
符 |
| | | * |
| | | * @param ids éè¦å é¤çæ£è
ä¿¡æ¯éé
ç¬¦ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deletePatWildcardByIds(Long[] ids) { |
| | | return patWildcardMapper.deletePatWildcardByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å 餿£è
ä¿¡æ¯éé
ç¬¦ä¿¡æ¯ |
| | | * |
| | | * @param id æ£è
ä¿¡æ¯éé
ç¬¦ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deletePatWildcardById(Long id) { |
| | | return patWildcardMapper.deletePatWildcardById(id); |
| | | } |
| | | } |
| | |
| | | |
| | | <resultMap type="com.smartor.domain.IvrTask" id="IvrTaskResult"> |
| | | <result property="taskid" column="taskid"/> |
| | | <result property="taskName" column="taskname"/> |
| | | <result property="taskName" column="task_name"/> |
| | | <result property="templateid" column="templateid"/> |
| | | <result property="templatename" column="templatename"/> |
| | | <result property="labelinfo" column="labelinfo"/> |
| | |
| | | <result property="pid" column="pid"/> |
| | | <result property="guid" column="guid"/> |
| | | <result property="preachform" column="preachform"/> |
| | | <result property="isSend" column="is_send"/> |
| | | <result property="sendType" column="send_type"/> |
| | | <result property="sendState" column="send_state"/> |
| | | <result property="param" column="param"/> |
| | | <result property="hospType" column="hosp_type"/> |
| | | <result property="hospno" column="hospno"/> |
| | | <result property="taskDesc" column="task_desc"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectIvrTaskVo"> |
| | | select taskid, |
| | | taskname, |
| | | task_name, |
| | | templateid, |
| | | templatename, |
| | | labelinfo, |
| | |
| | | checkusername, |
| | | checktime, |
| | | type, |
| | | task_desc, |
| | | hosp_type, |
| | | hospno, |
| | | typename, |
| | |
| | | pid, |
| | | guid, |
| | | preachform, |
| | | is_send, |
| | | send_type, |
| | | send_state, |
| | | param, |
| | | orgid |
| | |
| | | <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="taskName != null and taskName != ''">and task_name 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}, |
| | | '%') |
| | |
| | | keyProperty="taskid"> |
| | | insert into ivr_task |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="taskName != null">taskname,</if> |
| | | <if test="taskName != null">task_name,</if> |
| | | <if test="templateid != null">templateid,</if> |
| | | <if test="templatename != null">templatename,</if> |
| | | <if test="labelinfo != null">labelinfo,</if> |
| | |
| | | <if test="pid != null">pid,</if> |
| | | <if test="guid != null">guid,</if> |
| | | <if test="preachform != null">preachform,</if> |
| | | <if test="isSend != null">is_send,</if> |
| | | <if test="sendType != null">send_type,</if> |
| | | <if test="sendState != null">send_state,</if> |
| | | <if test="param != null">param,</if> |
| | | <if test="hospType != null and hospType != ''">hosp_type,</if> |
| | | <if test="hospno != null and hospno != ''">hospno,</if> |
| | | <if test="taskDesc != null and taskDesc != ''">task_desc,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="taskName != null">#{taskName},</if> |
| | |
| | | <if test="pid != null">#{pid},</if> |
| | | <if test="guid != null">#{guid},</if> |
| | | <if test="preachform != null">#{preachform},</if> |
| | | <if test="isSend != null">#{isSend},</if> |
| | | <if test="sendType != null">#{sendType},</if> |
| | | <if test="sendState != null">#{sendState},</if> |
| | | <if test="param != null">#{param},</if> |
| | | <if test="hospType != null and hospType != ''">#{hospType},</if> |
| | | <if test="hospno != null and hospno != ''">#{hospno},</if> |
| | | <if test="taskDesc != null and taskDesc != ''">#{taskDesc},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateIvrTask" parameterType="com.smartor.domain.IvrTask"> |
| | | update ivr_task |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="taskName != null">taskname = #{taskName},</if> |
| | | <if test="taskName != null">task_name = #{taskName},</if> |
| | | <if test="templateid != null">templateid = #{templateid},</if> |
| | | <if test="templatename != null">templatename = #{templatename},</if> |
| | | <if test="labelinfo != null">labelinfo = #{labelinfo},</if> |
| | |
| | | <if test="pid != null">pid = #{pid},</if> |
| | | <if test="guid != null">guid = #{guid},</if> |
| | | <if test="preachform != null">preachform = #{preachform},</if> |
| | | <if test="isSend != null">is_send = #{isSend},</if> |
| | | <if test="sendType != null">send_type = #{sendType},</if> |
| | | <if test="sendState != null">send_state = #{sendState},</if> |
| | | <if test="param != null">param = #{param},</if> |
| | | <if test="hospType != null and hospType != ''">hosp_type = #{hospType},</if> |
| | | <if test="hospno != null and hospno != ''">hospno = #{hospno},</if> |
| | | <if test="taskDesc != null and taskDesc != ''">task_desc= #{taskDesc},</if> |
| | | </trim> |
| | | where taskid = #{taskid} |
| | | </update> |
| | |
| | | <result property="sendlimitpend" column="sendlimitpend"/> |
| | | <result property="sendlimitnbegin" column="sendlimitnbegin"/> |
| | | <result property="sendlimitnend" column="sendlimitnend"/> |
| | | <result property="sendstate" column="sendstate"/> |
| | | <result property="senduuid" column="senduuid"/> |
| | | <result property="result" column="result"/> |
| | | <result property="finishtime" column="finishtime"/> |
| | | <result property="userid" column="userid"/> |
| | | <result property="username" column="username"/> |
| | | <result property="outbounduuid" column="outbounduuid"/> |
| | | <result property="recordid" column="recordid"/> |
| | | <result property="recallcount" column="recallcount"/> |
| | | <result property="exrecallcount" column="exrecallcount"/> |
| | |
| | | <result property="guid" column="guid"/> |
| | | <result property="textParam" column="text_param"/> |
| | | <result property="serviceform" column="serviceform"/> |
| | | <result property="badNo" column="bad_no"/> |
| | | <result property="bedNo" column="bed_no"/> |
| | | <result property="icdName" column="icd_name"/> |
| | | <result property="medicalRecordNo" column="medical_record_no"/> |
| | | <result property="preachcontent" column="preachcontent"/> |
| | |
| | | sendlimitpend, |
| | | sendlimitnbegin, |
| | | sendlimitnend, |
| | | sendstate, |
| | | senduuid, |
| | | result, |
| | | finishtime, |
| | | userid, |
| | | username, |
| | | outbounduuid, |
| | | recordid, |
| | | recallcount, |
| | | exrecallcount, |
| | |
| | | guid, |
| | | text_param, |
| | | serviceform, |
| | | bad_no, |
| | | bed_no, |
| | | icd_name, |
| | | send_type, |
| | | medical_record_no, |
| | |
| | | <if test="sendlimitpend != null and sendlimitpend != ''">and sendlimitpend = #{sendlimitpend}</if> |
| | | <if test="sendlimitnbegin != null and sendlimitnbegin != ''">and sendlimitnbegin = #{sendlimitnbegin}</if> |
| | | <if test="sendlimitnend != null and sendlimitnend != ''">and sendlimitnend = #{sendlimitnend}</if> |
| | | <if test="sendstate != null ">and sendstate = #{sendstate}</if> |
| | | <if test="senduuid != null and senduuid != ''">and senduuid = #{senduuid}</if> |
| | | <if test="result != null and result != ''">and result = #{result}</if> |
| | | <if test="finishtime != null ">and finishtime = #{finishtime}</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="outbounduuid != null and outbounduuid != ''">and outbounduuid = #{outbounduuid}</if> |
| | | <if test="recordid != null ">and recordid = #{recordid}</if> |
| | | <if test="recallcount != null ">and recallcount = #{recallcount}</if> |
| | | <if test="exrecallcount != null ">and exrecallcount = #{exrecallcount}</if> |
| | |
| | | <if test="serviceform != null ">and serviceform = #{serviceform}</if> |
| | | <if test="guid != null and guid != ''">and guid = #{guid}</if> |
| | | <if test="textParam != null and textParam != ''">and text_param = #{textParam}</if> |
| | | <if test="badNo != null">and bad_no = #{badNo}</if> |
| | | <if test="bedNo != null">and bed_no = #{bedNo}</if> |
| | | <if test="icdName != null and icdName != ''">and icd_name = #{icdName}</if> |
| | | <if test="medicalRecordNo != null and medicalRecordNo != ''">and medical_record_no = #{medicalRecordNo} |
| | | </if> |
| | |
| | | <if test="sendlimitpend != null">sendlimitpend,</if> |
| | | <if test="sendlimitnbegin != null">sendlimitnbegin,</if> |
| | | <if test="sendlimitnend != null">sendlimitnend,</if> |
| | | <if test="sendstate != null">sendstate,</if> |
| | | <if test="senduuid != null">senduuid,</if> |
| | | <if test="result != null">result,</if> |
| | | <if test="finishtime != null">finishtime,</if> |
| | | <if test="userid != null">userid,</if> |
| | | <if test="username != null">username,</if> |
| | | <if test="outbounduuid != null">outbounduuid,</if> |
| | | <if test="recordid != null">recordid,</if> |
| | | <if test="recallcount != null">recallcount,</if> |
| | | <if test="exrecallcount != null">exrecallcount,</if> |
| | |
| | | <if test="guid != null">guid,</if> |
| | | <if test="textParam != null">text_param,</if> |
| | | <if test="serviceform != null">serviceform,</if> |
| | | <if test="badNo != null">bad_no,</if> |
| | | <if test="bedNo != null">bed_no,</if> |
| | | <if test="icdName != null and icdName != ''">icd_name,</if> |
| | | <if test="medicalRecordNo != null and medicalRecordNo != ''">medical_record_no,</if> |
| | | <if test="preachcontent != null and preachcontent != ''">preachcontent,</if> |
| | |
| | | <if test="sendlimitpend != null">#{sendlimitpend},</if> |
| | | <if test="sendlimitnbegin != null">#{sendlimitnbegin},</if> |
| | | <if test="sendlimitnend != null">#{sendlimitnend},</if> |
| | | <if test="sendstate != null">#{sendstate},</if> |
| | | <if test="senduuid != null">#{senduuid},</if> |
| | | <if test="result != null">#{result},</if> |
| | | <if test="finishtime != null">#{finishtime},</if> |
| | | <if test="userid != null">#{userid},</if> |
| | | <if test="username != null">#{username},</if> |
| | | <if test="outbounduuid != null">#{outbounduuid},</if> |
| | | <if test="recordid != null">#{recordid},</if> |
| | | <if test="recallcount != null">#{recallcount},</if> |
| | | <if test="exrecallcount != null">#{exrecallcount},</if> |
| | |
| | | <if test="guid != null">#{guid},</if> |
| | | <if test="textParam != null">#{textParam},</if> |
| | | <if test="serviceform != null">#{serviceform},</if> |
| | | <if test="badNo != null">#{badNo},</if> |
| | | <if test="bedNo != null">#{bedNo},</if> |
| | | <if test="icdName != null and icdName != ''">#{icdName},</if> |
| | | <if test="medicalRecordNo != null and medicalRecordNo != ''">#{medicalRecordNo},</if> |
| | | <if test="preachcontent != null and preachcontent != ''">#{preachcontent},</if> |
| | |
| | | <if test="sendlimitpend != null">sendlimitpend = #{sendlimitpend},</if> |
| | | <if test="sendlimitnbegin != null">sendlimitnbegin = #{sendlimitnbegin},</if> |
| | | <if test="sendlimitnend != null">sendlimitnend = #{sendlimitnend},</if> |
| | | <if test="sendstate != null">sendstate = #{sendstate},</if> |
| | | <if test="senduuid != null">senduuid = #{senduuid},</if> |
| | | <if test="result != null">result = #{result},</if> |
| | | <if test="finishtime != null">finishtime = #{finishtime},</if> |
| | | <if test="userid != null">userid = #{userid},</if> |
| | | <if test="username != null">username = #{username},</if> |
| | | <if test="outbounduuid != null">outbounduuid = #{outbounduuid},</if> |
| | | <if test="recordid != null">recordid = #{recordid},</if> |
| | | <if test="recallcount != null">recallcount = #{recallcount},</if> |
| | | <if test="exrecallcount != null">exrecallcount = #{exrecallcount},</if> |
| | |
| | | <if test="guid != null">guid = #{guid},</if> |
| | | <if test="textParam != null">text_param = #{textParam},</if> |
| | | <if test="serviceform != null">serviceform = #{serviceform},</if> |
| | | <if test="badNo != null">bad_no = #{badNo},</if> |
| | | <if test="bedNo != null">bed_no = #{bedNo},</if> |
| | | <if test="icdName != null and icdName != ''">icd_name = #{icdName},</if> |
| | | <if test="medicalRecordNo != null and medicalRecordNo != ''">medical_record_no = #{medicalRecordNo},</if> |
| | | <if test="preachcontent != null and preachcontent != ''">preachcontent = #{preachcontent},</if> |
| | |
| | | sendlimitpend, |
| | | sendlimitnbegin, |
| | | sendlimitnend, |
| | | sendstate, |
| | | senduuid, |
| | | result, |
| | | finishtime, |
| | | userid, |
| | | username, |
| | | outbounduuid, |
| | | recordid, |
| | | recallcount, |
| | | exrecallcount, |
| | |
| | | guid, |
| | | text_param, |
| | | serviceform, |
| | | bad_no, |
| | | bed_no, |
| | | icd_name, |
| | | send_type, |
| | | medical_record_no, |
| | |
| | | )) AS jt |
| | | WHERE jt.begantime > #{beganTime} |
| | | AND jt.begantime <= #{endTime} |
| | | AND sendstate IS NULL |
| | | AND del_flag = 0 |
| | | </select> |
| | | |
| | |
| | | <result property="idcardno" column="idcardno"/> |
| | | <result property="birthdate" column="birthdate"/> |
| | | <result property="age" column="age"/> |
| | | <result property="source" column="source"/> |
| | | <result property="sourcefrom" column="sourcefrom"/> |
| | | <result property="archivetime" column="archivetime"/> |
| | | <result property="archiveby" column="archiveby"/> |
| | | <result property="telcode" column="telcode"/> |
| | |
| | | <result property="pattype" column="pattype"/> |
| | | <result property="bedNo" column="bedno"/> |
| | | <result property="inhosptime" column="inhosptime"/> |
| | | <result property="membertype" column="membertype"/> |
| | | <result property="viptype" column="viptype"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectPatArchiveVo"> |
| | |
| | | native_place, |
| | | place_of_residence, |
| | | birthplace, |
| | | source, |
| | | sourcefrom, |
| | | archivetime, |
| | | archiveby, |
| | | telcode, |
| | |
| | | create_time, |
| | | isupload, |
| | | pattype, |
| | | membertype, |
| | | viptype, |
| | | upload_time |
| | | from pat_archive |
| | | </sql> |
| | |
| | | <where> |
| | | <if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if> |
| | | <if test="idcardno != null and idcardno != ''">and idcardno = #{idcardno}</if> |
| | | <if test="source != null ">and source = #{source}</if> |
| | | <if test="sourcefrom != null ">and sourcefrom = #{sourcefrom}</if> |
| | | <if test="telcode != null and telcode != ''">and telcode = #{telcode}</if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | <if test="patid != null and patid != ''">and patid = #{patid}</if> |
| | | <if test="isupload != null ">and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> |
| | | <if test="membertype != null ">and membertype = #{membertype}</if> |
| | | <if test="viptype != null ">and viptype = #{viptype}</if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | a.telcode, |
| | | a.create_time, |
| | | a.update_time, |
| | | a.membertype, |
| | | a.viptype, |
| | | a.birthdate |
| | | from pat_archive a,pat_archivetag b ,base_tag c |
| | | <where> |
| | |
| | | <!-- iccardno--> |
| | | <!--<!– <if test="birthdate != null">birthdate,</if>–>--> |
| | | <!--<!– <if test="age != null">age,</if>–>--> |
| | | <!--<!– <if test="source != null">source,</if>–>--> |
| | | <!--<!– <if test="sourcefrom != null">sourcefrom,</if>–>--> |
| | | <!--<!– <if test="archivetime != null">archivetime,</if>–>--> |
| | | <!--<!– <if test="archiveby != null">archiveby,</if>–>--> |
| | | <!--<!– <if test="telcode != null">telcode,</if>–>--> |
| | |
| | | <!-- <if test="iccardno != null">#{item.iccardno},</if>--> |
| | | <!--<!– <if test="birthdate != null">#{birthdate},</if>–>--> |
| | | <!--<!– <if test="age != null">#{item.age},</if>–>--> |
| | | <!--<!– <if test="source != null">#{item.source},</if>–>--> |
| | | <!--<!– <if test="sourcefrom != null">#{item.sourcefrom},</if>–>--> |
| | | <!--<!– <if test="archivetime != null">#{item.archivetime},</if>–>--> |
| | | <!--<!– <if test="archiveby != null">#{item.archiveby},</if>–>--> |
| | | <!--<!– <if test="telcode != null">#{item.telcode},</if>–>--> |
| | |
| | | <!-- </trim>--> |
| | | |
| | | insert into |
| | | pat_archive(name,membertype,sex,idcardno,birthdate,age,source,archivetime,archiveby,telcode,relativetelcode,idcardtype,orgid,openid,dduserid,update_by,update_time |
| | | pat_archive(name,viptype,sex,idcardno,birthdate,age,sourcefrom,archivetime,archiveby,telcode,relativetelcode,idcardtype,orgid,openid,dduserid,update_by,update_time |
| | | ,create_by,create_time,isupload,upload_time,pattype,place_of_residence,nation,birthplace,native_place) values |
| | | <foreach item="item" index="index" collection="list" separator=","> |
| | | (#{item.name},#{item.membertype},#{item.sex},#{item.idcardno},#{item.birthdate},#{item.age},#{item.source},#{item.archivetime},#{item.archiveby} |
| | | (#{item.name},#{item.viptype},#{item.sex},#{item.idcardno},#{item.birthdate},#{item.age},#{item.sourcefrom},#{item.archivetime},#{item.archiveby} |
| | | ,#{item.telcode},#{item.archiveby},#{item.idcardtype},#{item.orgid},#{item.openid},#{item.dduserid},#{item.updateBy}, |
| | | #{item.updateTime},#{item.createBy},#{item.createTime},#{item.isupload},#{item.uploadTime},#{item.pattype},#{item.placeOfResidence},#{item.nation},#{item.birthplace},#{item.nativePlace} |
| | | ) |
| | |
| | | <if test="idcardno != null">idcardno = #{idcardno},</if> |
| | | <if test="birthdate != null">birthdate = #{birthdate},</if> |
| | | <if test="age != null">age = #{age},</if> |
| | | <if test="source != null">source = #{source},</if> |
| | | <if test="sourcefrom != null">sourcefrom = #{sourcefrom},</if> |
| | | <if test="archivetime != null">archivetime = #{archivetime},</if> |
| | | <if test="archiveby != null">archiveby = #{archiveby},</if> |
| | | <if test="telcode != null">telcode = #{telcode},</if> |
| | |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="isupload != null">isupload = #{isupload},</if> |
| | | <if test="uploadTime != null">upload_time = #{uploadTime},</if> |
| | | <if test="membertype != null">membertype = #{membertype},</if> |
| | | <if test="viptype != null">viptype = #{viptype},</if> |
| | | </trim> |
| | | where patid = #{patid} |
| | | </update> |
| | |
| | | a.idcardno, |
| | | a.birthdate, |
| | | a.age, |
| | | a.source, |
| | | a.sourcefrom, |
| | | a.archivetime, |
| | | a.archiveby, |
| | | a.telcode, |
| | |
| | | a.create_time, |
| | | a.isupload, |
| | | a.upload_time, |
| | | a.membertype, |
| | | a.viptype, |
| | | a.pattype |
| | | from pat_archive a,pat_archivetag b ,base_tag c |
| | | <where> |
| | |
| | | a.idcardno, |
| | | a.birthdate, |
| | | a.age, |
| | | a.source, |
| | | a.sourcefrom, |
| | | a.archivetime, |
| | | a.archiveby, |
| | | a.telcode, |
| | | a.relativetelcode, |
| | | a.idcardtype, |
| | | a.orgid, |
| | | a.membertype, |
| | | a.viptype, |
| | | a.openid, |
| | | a.del_flag, |
| | | a.update_by, |
| | |
| | | a.idcardno, |
| | | a.birthdate, |
| | | a.age, |
| | | a.membertype, |
| | | a.source, |
| | | a.viptype, |
| | | a.sourcefrom, |
| | | a.archivetime, |
| | | a.archiveby, |
| | | a.telcode, |
| | |
| | | a.native_place, |
| | | a.place_of_residence, |
| | | a.birthplace, |
| | | a.membertype, |
| | | a.viptype, |
| | | a.idcardno, |
| | | a.birthdate, |
| | | a.age, |
| | | a.source, |
| | | a.sourcefrom, |
| | | a.archivetime, |
| | | a.archiveby, |
| | | a.telcode, |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.smartor.mapper.PatWildcardMapper"> |
| | | |
| | | <resultMap type="com.smartor.domain.PatWildcard" id="PatWildcardResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="wildcard" column="wildcard"/> |
| | | <result property="patField" column="pat_field"/> |
| | | <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"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectPatWildcardVo"> |
| | | select id, |
| | | wildcard, |
| | | pat_field, |
| | | del_flag, |
| | | update_by, |
| | | update_time, |
| | | create_by, |
| | | create_time |
| | | from pat_wildcard |
| | | </sql> |
| | | |
| | | <select id="selectPatWildcardList" parameterType="com.smartor.domain.PatWildcard" resultMap="PatWildcardResult"> |
| | | <include refid="selectPatWildcardVo"/> |
| | | <where> |
| | | <if test="wildcard != null and wildcard != ''">and wildcard = #{wildcard}</if> |
| | | <if test="patField != null and patField != ''">and pat_field = #{patField}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectPatWildcardById" parameterType="Long" resultMap="PatWildcardResult"> |
| | | <include refid="selectPatWildcardVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertPatWildcard" parameterType="com.smartor.domain.PatWildcard" useGeneratedKeys="true" |
| | | keyProperty="id"> |
| | | insert into pat_wildcard |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="wildcard != null">wildcard,</if> |
| | | <if test="patField != null">pat_field,</if> |
| | | <if test="delFlag != null and delFlag != ''">del_flag,</if> |
| | | <if test="updateBy != null">update_by,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="createBy != null">create_by,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="wildcard != null">#{wildcard},</if> |
| | | <if test="patField != null">#{patField},</if> |
| | | <if test="delFlag != null and delFlag != ''">#{delFlag},</if> |
| | | <if test="updateBy != null">#{updateBy},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="createBy != null">#{createBy},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updatePatWildcard" parameterType="com.smartor.domain.PatWildcard"> |
| | | update pat_wildcard |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="wildcard != null">wildcard = #{wildcard},</if> |
| | | <if test="patField != null">pat_field = #{patField},</if> |
| | | <if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="createBy != null">create_by = #{createBy},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deletePatWildcardById" parameterType="Long"> |
| | | delete |
| | | from pat_wildcard |
| | | where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deletePatWildcardByIds" parameterType="String"> |
| | | delete from pat_wildcard where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |
| | |
| | | <if test="oldid != null ">and oldid = #{oldid}</if> |
| | | <if test="topictype != null and topictype != ''">and topictype = #{topictype}</if> |
| | | <if test="categoryid != null ">and categoryid = #{categoryid}</if> |
| | | <if test="topic != null and topic != ''">and topic = #{topic}</if> |
| | | <if test="topic != null and topic != ''">and topic like concat('%', #{topic}, '%')</if> |
| | | |
| | | <if test="ishide != null ">and ishide = #{ishide}</if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | <if test="svyid != null and svyid != ''">and svyid = #{svyid}</if> |