| | |
| | | import com.smartor.mapper.ServiceTaskMapper; |
| | | import com.smartor.mapper.SvyTaskMapper; |
| | | import com.smartor.mapper.SvyTaskSingleMapper; |
| | | import com.smartor.service.IBaseSmsaccountService; |
| | | import com.smartor.service.IIvrTaskTemplateService; |
| | | import com.smartor.service.IServiceSubtaskRecordService; |
| | | import com.smartor.service.ISvyTaskTemplateService; |
| | | import com.smartor.service.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | import org.springframework.data.redis.listener.RedisMessageListenerContainer; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.UUID; |
| | | import java.util.*; |
| | | import java.util.concurrent.ExecutorService; |
| | | import java.util.concurrent.Executors; |
| | | import java.util.concurrent.TimeUnit; |
| | |
| | | * |
| | | * @param commonTaskcallMQ |
| | | */ |
| | | private void sfHandle(CommonTaskcallMQ commonTaskcallMQ, String ip) { |
| | | public void sfHandle(CommonTaskcallMQ commonTaskcallMQ, String ip) { |
| | | //夿ä¸ä¸commonTaskcallMQä¸çstopstateæ¯å¦ä¸ivr_taskä¸çä¸è´ï¼ä¸ä¸è´ï¼åè¯´ææ¯æåäº |
| | | ServiceTask ivrTask1 = ivrTaskMapper.selectServiceTaskByTaskid(commonTaskcallMQ.getTaskid()); |
| | | if (ivrTask1.getStopState() != commonTaskcallMQ.getStopState()) { |
| | |
| | | String descByCode = ServiceFromEnum.getDescByCode(Integer.valueOf(serviceFrom)); |
| | | //è¿éå¯ä»¥èèç¨çç¥æ¨¡å¼ä¼åä¸ä¸ï¼ä¸ç¶å¤ªé¾çäº |
| | | |
| | | //éè¿æ¨¡æ¿IDè·å模æ¿é®é¢ |
| | | IvrTaskTemplateVO ivrTaskTemplateVO = new IvrTaskTemplateVO(); |
| | | ivrTaskTemplateVO.setId(Long.valueOf(commonTaskcallMQ.getTemplateid())); |
| | | IvrTaskTemplateVO ivrTaskTemplateVO1 = ivrTaskTemplateService.selectInfoByCondition(ivrTaskTemplateVO); |
| | | // //éè¿æ¨¡æ¿IDè·å模æ¿é®é¢ |
| | | // IvrTaskTemplateVO ivrTaskTemplateVO = new IvrTaskTemplateVO(); |
| | | // ivrTaskTemplateVO.setId(Long.valueOf(commonTaskcallMQ.getTemplateid())); |
| | | // IvrTaskTemplateVO ivrTaskTemplateVO1 = ivrTaskTemplateService.selectInfoByCondition(ivrTaskTemplateVO); |
| | | |
| | | //éè¿ä»»å¡IDæ¿å°æ£è
ä¿¡æ¯ |
| | | ServiceSubtask ivrTaskcall = new ServiceSubtask(); |
| | |
| | | //å¦ä½ä»»å¡è¢«âæåâæâç»æ¢â |
| | | break; |
| | | } |
| | | //è·åå°value弿å°çkey |
| | | String key = getKey(); |
| | | if (commonTaskcallMQ.getSendType().equals("2")) { |
| | | //è¯´ææ¯ç«å³åé |
| | | String value = redisCache.getCacheObject("cache-0"); |
| | | ServiceSubtask serviceSubtask1 = new ServiceSubtask(); |
| | | serviceSubtask1.setTaskid(commonTaskcallMQ.getTaskid()); |
| | | List<ServiceSubtask> selectServiceSubtaskList1 = ivrTaskcallMapper.selectServiceSubtaskList(serviceSubtask1); |
| | | for (ServiceSubtask serviceSubtask2 : selectServiceSubtaskList1) { |
| | | if (StringUtils.isEmpty(value)) { |
| | | value = "," + serviceSubtask2.getId().toString() + ","; |
| | | } else { |
| | | value = value + "," + serviceSubtask2.getId().toString() + ","; |
| | | } |
| | | } |
| | | redisCache.setCacheObject("cache-0", value); |
| | | } else { |
| | | //éç«å³åé |
| | | String value = redisCache.getCacheObject(key); |
| | | ServiceSubtask serviceSubtask1 = new ServiceSubtask(); |
| | | serviceSubtask1.setTaskid(commonTaskcallMQ.getTaskid()); |
| | | List<ServiceSubtask> selectServiceSubtaskList1 = ivrTaskcallMapper.selectServiceSubtaskList(serviceSubtask1); |
| | | for (ServiceSubtask serviceSubtask2 : selectServiceSubtaskList1) { |
| | | if (StringUtils.isEmpty(value)) { |
| | | value = "," + serviceSubtask2.getId().toString() + ","; |
| | | } else { |
| | | value = value + "," + serviceSubtask2.getId().toString() + ","; |
| | | } |
| | | } |
| | | redisCache.setCacheObject(key, value); |
| | | } |
| | | |
| | | //ä»»å¡åéè®°å½ï¼è¿ä¸ªä»£ç åºè¯¥åå¨phoneTaskä¸ï¼å
åå¨è¿ï¼åé¢åæ¹ï¼ |
| | | ServiceSubtaskRecord serviceSubtaskRecord = new ServiceSubtaskRecord(); |
| | |
| | | serviceSubtaskRecord.setStartTime(System.currentTimeMillis()); |
| | | serviceSubtaskRecordService.insertServiceSubtaskRecord(serviceSubtaskRecord); |
| | | |
| | | //éè¿å¤çº¿ç¨çæ¹å¼å»æçµè¯ |
| | | executorService.submit(new PhoneTask(serviceSubtask, ivrTaskTemplateVO1, redisCache, sendService, phonePath, robotPhoneUtils)); |
| | | // //éè¿å¤çº¿ç¨çæ¹å¼å»æçµè¯ |
| | | // executorService.submit(new PhoneTask(serviceSubtask, ivrTaskTemplateVO1, redisCache, sendService, phonePath, robotPhoneUtils)); |
| | | } |
| | | } else if (descByCode.equals("å¤åªä½")) { |
| | | //å¤åªä½ |
| | |
| | | String patid = rsaPublicKeyExample.encryptedData(serviceSubtask.getPatid().toString(), pub_key); |
| | | SendMagParam sendMagParam = new SendMagParam(); |
| | | sendMagParam.setType("5"); |
| | | sendMagParam.setUrl(ip + ":" + req_path + "/outsideChain?param1=" + ivrTask1.getTaskid().toString() + "¶m2=" + serviceSubtask.getPatid().toString() + "¶m3=" + ivrTask1.getTaskName() + "¶m5=false"); |
| | | sendMagParam.setUrl(ip + ":" + req_path + "/outsideChain?param1=" + taskId + "¶m2=" + patid + "¶m3=" + ivrTask1.getTaskName() + "¶m5=false"); |
| | | log.info("龿¥å®æ´è·¯å¾ï¼{}", ip + ":" + req_path + "/outsideChain?param1=" + taskId + "¶m2=" + patid + "¶m3=" + ivrTask1.getTaskName() + "¶m5=false"); |
| | | //è¿ä¸ªæ¨¡æ¿IDå
åæ»ï¼åé¢åæå¯é |
| | | sendMagParam.setTmpCode("oG3pJHPVWpE81DmZsua_2tKwgJ97r0qz37z56ns7NB4"); |
| | |
| | | map.put("first", ivrTask1.getTaskName()); |
| | | sendMagParam.setContent(JSON.toJSONString(map)); |
| | | sendMagParam.setOpenid(serviceSubtask.getOpenid()); |
| | | |
| | | Boolean aBoolean = sendService.sendMsg(sendMagParam); |
| | | |
| | | //ä»»å¡åéè®°å½ |
| | |
| | | //è¿éå¯ä»¥èèç¨çç¥æ¨¡å¼ä¼åä¸ä¸ï¼ä¸ç¶å¤ªé¾çäº |
| | | |
| | | //éè¿æ¨¡æ¿IDè·å模æ¿é®é¢ |
| | | IvrTaskTemplateVO ivrTaskTemplateVO = new IvrTaskTemplateVO(); |
| | | ivrTaskTemplateVO.setId(Long.valueOf(commonTaskcallMQ.getTemplateid())); |
| | | IvrTaskTemplateVO ivrTaskTemplateVO1 = ivrTaskTemplateService.selectInfoByCondition(ivrTaskTemplateVO); |
| | | |
| | | IvrTaskTemplateVO ivrTaskTemplateVO1 = null; |
| | | if (commonTaskcallMQ.getTaskType().equals("1")) { |
| | | IvrTaskTemplateVO ivrTaskTemplateVO = new IvrTaskTemplateVO(); |
| | | ivrTaskTemplateVO.setId(Long.valueOf(commonTaskcallMQ.getTemplateid())); |
| | | ivrTaskTemplateVO1 = ivrTaskTemplateService.selectInfoByCondition(ivrTaskTemplateVO); |
| | | } |
| | | //éè¿ä»»å¡IDæ¿å°æ£è
ä¿¡æ¯ |
| | | ServiceSubtask ivrTaskcall = new ServiceSubtask(); |
| | | ivrTaskcall.setTaskid(commonTaskcallMQ.getTaskid()); |
| | |
| | | Map map = new HashMap(); |
| | | map.put("first", ivrTask1.getTaskName()); |
| | | sendMagParam.setContent(JSON.toJSONString(map)); |
| | | sendMagParam.setOpenid(ivrTaskSingle.getOpenid()); |
| | | Boolean aBoolean = sendService.sendMsg(sendMagParam); |
| | | |
| | | //ä»»å¡åéè®°å½ |
| | |
| | | } |
| | | |
| | | |
| | | // /** |
| | | // /** |
| | | // * æºå¨äººç¬¬ä¸å¥è¯è¯é³ |
| | | // * concurrency = "50" å¹¶åæ°ä¸º50 |
| | | // */ |
| | |
| | | // channel.basicReject(message.getMessageProperties().getDeliveryTag(), true); |
| | | // } |
| | | // } |
| | | private String getKey() { |
| | | Map<String, String> map = new HashMap<>(); |
| | | for (int i = 0; i < 6; i++) { |
| | | Boolean aBoolean = redisCache.hasKey("cache-" + i); |
| | | if (!aBoolean) { |
| | | redisCache.setCacheObject("cache-" + i, ""); |
| | | map.put("cache-" + i, ""); |
| | | } else { |
| | | map.put("cache-" + i, redisCache.getCacheObject("cache-" + i)); |
| | | } |
| | | } |
| | | |
| | | String key = null; |
| | | String value = ""; |
| | | for (Map.Entry<String, String> entry : map.entrySet()) { |
| | | if (StringUtils.isEmpty(value)) { |
| | | value = entry.getValue(); |
| | | key = entry.getKey(); |
| | | } else { |
| | | if (entry.getValue().split(",").length < value.split(",").length) { |
| | | value = entry.getValue(); |
| | | key = entry.getKey(); |
| | | } |
| | | } |
| | | } |
| | | return key; |
| | | } |
| | | |
| | | } |
| | |
| | | public AjaxResult htmlContent(@RequestBody HtmlContentVO htmlContentVO) { |
| | | // è·åæä»¶çåå§åç§° |
| | | String fileName = htmlContentVO.getFileName(); |
| | | FileUtils.createFile(RuoYiConfig.getUploadPath() + "/show/" + fileName.split("\\.", 2)[0]); |
| | | // å°æä»¶ä¿åå°æå®ç®å½ |
| | | File outputFile = new File(RuoYiConfig.getUploadPath() + "/show/" + fileName.split("\\.", 2)[0] + "/" + fileName); |
| | | try (BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputFile), "UTF-8"))) { |
| | |
| | | if (StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() && StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches() || StringUtils.isEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2()) && StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches()) { |
| | | |
| | | //说æå¹é
æ£ç¡®äº |
| | | ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).setIsUserOperation(true); |
| | | ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).setIsUserOperation(1); |
| | | List<IvrTaskTemplateScriptVO> backQuset = redisCache.getCacheObject(userId + "backQuset"); |
| | | //å¹é
宿å,å°ç»æä¿åå°æ°çæ°ç» |
| | | backQuset.add(ivrTaskTemplateScriptVO); |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | * @author ruoyi |
| | | * @date 2023-05-25 |
| | | */ |
| | | @Api(description = "æ ç¾åç±»") |
| | | @RestController |
| | | @RequestMapping("/system/info") |
| | | public class BaseUserInfoController extends BaseController { |
| | |
| | | /** |
| | | * æ¥è¯¢ç¨æ·å表 |
| | | */ |
| | | @ApiOperation("æ¥è¯¢ç¨æ·å表") |
| | | @PreAuthorize("@ss.hasPermi('system:info:list')") |
| | | @PostMapping("/list") |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody BaseUserInfo baseUserInfo) { |
| | | startPage(); |
| | | List<BaseUserInfo> list = baseUserInfoService.selectBaseUserInfoList(baseUserInfo); |
| | |
| | | /** |
| | | * 导åºç¨æ·å表 |
| | | */ |
| | | @ApiOperation("导åºç¨æ·å表") |
| | | @PreAuthorize("@ss.hasPermi('system:info:export')") |
| | | @Log(title = "ç¨æ·", businessType = BusinessType.EXPORT) |
| | | @Log(title = "ç¨æ·" , businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, BaseUserInfo baseUserInfo) { |
| | | List<BaseUserInfo> list = baseUserInfoService.selectBaseUserInfoList(baseUserInfo); |
| | |
| | | /** |
| | | * è·åç¨æ·è¯¦ç»ä¿¡æ¯ |
| | | */ |
| | | @ApiOperation("è·åç¨æ·è¯¦ç»ä¿¡æ¯") |
| | | @PreAuthorize("@ss.hasPermi('system:info:query')") |
| | | @GetMapping(value = "/{userid}") |
| | | public AjaxResult getInfo(@PathVariable("userid") Long userid) { |
| | |
| | | /** |
| | | * æ°å¢ç¨æ· |
| | | */ |
| | | @ApiOperation("æ°å¢ç¨æ·") |
| | | @PreAuthorize("@ss.hasPermi('system:info:add')") |
| | | @Log(title = "ç¨æ·", businessType = BusinessType.INSERT) |
| | | @Log(title = "ç¨æ·" , businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody BaseUserInfo baseUserInfo) { |
| | | return toAjax(baseUserInfoService.insertBaseUserInfo(baseUserInfo)); |
| | |
| | | /** |
| | | * ä¿®æ¹ç¨æ· |
| | | */ |
| | | @ApiOperation("ä¿®æ¹ç¨æ·") |
| | | @PreAuthorize("@ss.hasPermi('system:info:edit')") |
| | | @Log(title = "ç¨æ·", businessType = BusinessType.UPDATE) |
| | | @Log(title = "ç¨æ·" , businessType = BusinessType.UPDATE) |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody BaseUserInfo baseUserInfo) { |
| | | return toAjax(baseUserInfoService.updateBaseUserInfo(baseUserInfo)); |
| | |
| | | /** |
| | | * å é¤ç¨æ· |
| | | */ |
| | | @ApiOperation("å é¤ç¨æ·") |
| | | @PreAuthorize("@ss.hasPermi('system:info:remove')") |
| | | @Log(title = "ç¨æ·", businessType = BusinessType.DELETE) |
| | | @Log(title = "ç¨æ·" , businessType = BusinessType.DELETE) |
| | | @GetMapping("/remove/{userids}") |
| | | public AjaxResult remove(@PathVariable Long[] userids) { |
| | | return toAjax(baseUserInfoService.deleteBaseUserInfoByUserids(userids)); |
| | |
| | | /** |
| | | * è·å人åçèç³»æ¹å¼ |
| | | * |
| | | * @param personCode 人åç¼å· |
| | | * @param noticeWay éç¥æ¹å¼ |
| | | * @param personCode 人åç¼å· |
| | | * @param noticeWay éç¥æ¹å¼ |
| | | * @return |
| | | */ |
| | | @ApiOperation("è·å人åçèç³»æ¹å¼") |
| | | @GetMapping("/reportContent") |
| | | public AjaxResult getContact(@RequestParam("personCode") String personCode, @RequestParam("noticeWay") String noticeWay) { |
| | | if (StringUtils.isEmpty(personCode) || StringUtils.isEmpty(noticeWay)) { |
| | |
| | | /** |
| | | * æ¥è¯¢é¢ç®å表ï¼ä¹ä¹çhisæ°æ®è·åæ
åµï¼ |
| | | */ |
| | | @ApiOperation(" æ¥è¯¢é¢ç®å表ï¼ä¹ä¹çhisæ°æ®è·åæ
åµï¼") |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody ServiceThirdData serviceThirdData) { |
| | | List<ServiceThirdData> list = iServiceThirdDataService.queryList(serviceThirdData); |
| | |
| | | /** |
| | | * é®é¢ä¸æ¥ |
| | | */ |
| | | @RequestMapping("/reportContent") |
| | | @PostMapping("/reportContent") |
| | | public AjaxResult reportContent(@RequestBody ReportReqVo reportReqVo) { |
| | | if (StringUtils.isEmpty(reportReqVo.getDealDept()) && StringUtils.isEmpty(reportReqVo.getDealPersionNO())) { |
| | | return error("å¤ç人åå¤çé¨é¨ä¸è½åæ¶ä¸ºç©ºï¼"); |
| | |
| | | @PostMapping("/getPatientInfo") |
| | | public TableDataInfo getPatientInfo(@RequestBody PatArchiveReq patArchiveReq) { |
| | | PageUtils.startPageByPost(patArchiveReq.getPageNum(), patArchiveReq.getPageSize()); |
| | | List<PatTaskRelevance> patientInfo = patArchiveService.getPatientInfo(patArchiveReq); |
| | | List<ServiceSubtask> patientInfo = patArchiveService.getPatientInfo(patArchiveReq); |
| | | long count = PageUtils.count(new ISelect() { |
| | | @Override |
| | | public void doSelect() { |
| | |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.smartor.domain.PatMedRegistration; |
| | | import com.smartor.service.IPatMedRegistrationService; |
| | | 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.*; |
| | |
| | | * @author ruoyi |
| | | * @date 2024-08-01 |
| | | */ |
| | | @Api(description = " æ£è
æå·è®°å½") |
| | | @RestController |
| | | @RequestMapping("/smartor/registration") |
| | | public class PatMedRegistrationController extends BaseController { |
| | |
| | | /** |
| | | * æ¥è¯¢æ£è
æå·è®°å½å表 |
| | | */ |
| | | @ApiOperation("æ¥è¯¢æ£è
æå·è®°å½å表") |
| | | @PreAuthorize("@ss.hasPermi('system:registration:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(PatMedRegistration patMedRegistration) { |
| | |
| | | /** |
| | | * å¯¼åºæ£è
æå·è®°å½å表 |
| | | */ |
| | | @ApiOperation("å¯¼åºæ£è
æå·è®°å½å表") |
| | | @PreAuthorize("@ss.hasPermi('system:registration:export')") |
| | | @Log(title = "æ£è
æå·è®°å½", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | |
| | | /** |
| | | * è·åæ£è
æå·è®°å½è¯¦ç»ä¿¡æ¯ |
| | | */ |
| | | @ApiOperation("è·åæ£è
æå·è®°å½è¯¦ç»ä¿¡æ¯") |
| | | @PreAuthorize("@ss.hasPermi('system:registration:query')") |
| | | @GetMapping(value = "/getInfo/{registid}") |
| | | public AjaxResult getInfo(@PathVariable("registid") Long registid) { |
| | |
| | | /** |
| | | * æ°å¢æ£è
æå·è®°å½ |
| | | */ |
| | | @ApiOperation("æ°å¢æ£è
æå·è®°å½") |
| | | @PreAuthorize("@ss.hasPermi('system:registration:add')") |
| | | @Log(title = "æ£è
æå·è®°å½", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | |
| | | /** |
| | | * ä¿®æ¹æ£è
æå·è®°å½ |
| | | */ |
| | | @ApiOperation("ä¿®æ¹æ£è
æå·è®°å½") |
| | | @PreAuthorize("@ss.hasPermi('system:registration:edit')") |
| | | @Log(title = "æ£è
æå·è®°å½", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/edit") |
| | |
| | | /** |
| | | * å 餿£è
æå·è®°å½ |
| | | */ |
| | | @ApiOperation("å 餿£è
æå·è®°å½") |
| | | @PreAuthorize("@ss.hasPermi('system:registration:remove')") |
| | | @Log(title = "æ£è
æå·è®°å½", businessType = BusinessType.DELETE) |
| | | @GetMapping("/remove/{registids}") |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.time.LocalTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @ApiOperation("çµè¯åè°ä»»å¡") |
| | | @PostMapping("/phoneCallBack") |
| | | public AjaxResult phoneCallBack(@RequestBody PhoneCallBackVO phoneCallBackVO) { |
| | | // log.error("çµè¯åè°ä»»å¡æåäºä¸ï¼{}", phoneCallBackVO); |
| | | serviceSubtaskService.phoneCallBack(phoneCallBackVO); |
| | | return success(); |
| | | } |
| | | |
| | | @ApiOperation("çµè¯ASRéè¯åè°(é¨ç»®)") |
| | | @PostMapping("/phoneCallBackYQ") |
| | | public PhoneCallBackYQVO phoneCallBackYQ(@RequestBody PhoneCallReqYQVO phoneCallReqYQVO) { |
| | | log.error("çµè¯ASRéè¯åè°(é¨ç»®) ï¼{}", phoneCallReqYQVO); |
| | | PhoneCallBackYQVO phoneCallBackYQVO = serviceSubtaskService.phoneCallBackYQ(phoneCallReqYQVO); |
| | | return phoneCallBackYQVO; |
| | | } |
| | | |
| | | /** |
| | | * çµè¯åè°ä»»å¡(é¨ç»®) |
| | | */ |
| | | @ApiOperation("çµè¯åè°ä»»å¡(é¨ç»®)") |
| | | @PostMapping("/taskPull") |
| | | public List<PullTaskVO> taskPull() { |
| | | log.error("çµè¯åè°ä»»å¡(é¨ç»®)"); |
| | | List<PullTaskVO> pullTaskVOList = serviceSubtaskService.taskPull(); |
| | | log.error("çµè¯åè°ä»»å¡(é¨ç»®):{}", pullTaskVOList); |
| | | return pullTaskVOList; |
| | | } |
| | | |
| | | /** |
| | |
| | | return toAjax(serviceSubtaskService.saveQuestionAnswerPhone(serviceSubTaskDetailReq)); |
| | | } |
| | | |
| | | /** |
| | | * éè¯è®°å½åè° |
| | | */ |
| | | @ApiOperation("éè¯è®°å½åè°") |
| | | @PostMapping("/recordAccept") |
| | | public AjaxResult recordAccept(@RequestBody ServiceSubTaskDetailReq serviceSubTaskDetailReq) { |
| | | return toAjax(serviceSubtaskService.saveQuestionAnswerPhone(serviceSubTaskDetailReq)); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | |
| | | /** |
| | | * çä¿¡åæ°Controller |
| | | * |
| | | * |
| | | * @author smartor |
| | | * @date 2023-03-06 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/smartor/smsparam") |
| | | public class SmsParamController extends BaseController |
| | | { |
| | | public class SmsParamController extends BaseController { |
| | | @Autowired |
| | | private ISmsParamService smsParamService; |
| | | |
| | |
| | | * æ¥è¯¢çä¿¡åæ°å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('smartor:smsparam:list')") |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody SmsParam smsParam) |
| | | { |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody SmsParam smsParam) { |
| | | startPage(); |
| | | List<SmsParam> list = smsParamService.selectSmsParamList(smsParam); |
| | | return getDataTable(list); |
| | |
| | | @PreAuthorize("@ss.hasPermi('smartor:smsparam:export')") |
| | | @Log(title = "çä¿¡åæ°", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, SmsParam smsParam) |
| | | { |
| | | public void export(HttpServletResponse response, SmsParam smsParam) { |
| | | List<SmsParam> list = smsParamService.selectSmsParamList(smsParam); |
| | | ExcelUtil<SmsParam> util = new ExcelUtil<SmsParam>(SmsParam.class); |
| | | util.exportExcel(response, list, "çä¿¡åæ°æ°æ®"); |
| | |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('smartor:smsparam:query')") |
| | | @GetMapping(value = "/{paramid}") |
| | | public AjaxResult getInfo(@PathVariable("paramid") Long paramid) |
| | | { |
| | | public AjaxResult getInfo(@PathVariable("paramid") Long paramid) { |
| | | return success(smsParamService.selectSmsParamByParamid(paramid)); |
| | | } |
| | | |
| | |
| | | @PreAuthorize("@ss.hasPermi('smartor:smsparam:add')") |
| | | @Log(title = "çä¿¡åæ°", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody SmsParam smsParam) |
| | | { |
| | | public AjaxResult add(@RequestBody SmsParam smsParam) { |
| | | return toAjax(smsParamService.insertSmsParam(smsParam)); |
| | | } |
| | | |
| | |
| | | @PreAuthorize("@ss.hasPermi('smartor:smsparam:edit')") |
| | | @Log(title = "çä¿¡åæ°", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody SmsParam smsParam) |
| | | { |
| | | public AjaxResult edit(@RequestBody SmsParam smsParam) { |
| | | return toAjax(smsParamService.updateSmsParam(smsParam)); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('smartor:smsparam:remove')") |
| | | @Log(title = "çä¿¡åæ°", businessType = BusinessType.DELETE) |
| | | @GetMapping("/remove/{paramids}") |
| | | public AjaxResult remove(@PathVariable Long[] paramids) |
| | | { |
| | | @GetMapping("/remove/{paramids}") |
| | | public AjaxResult remove(@PathVariable Long[] paramids) { |
| | | return toAjax(smsParamService.deleteSmsParamByParamids(paramids)); |
| | | } |
| | | |
| | | public AjaxResult sendSmsInfo() { |
| | | return null; |
| | | } |
| | | } |
| | |
| | | import com.smartor.service.ISvyLibScriptCategoryService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.commons.beanutils.ConvertUtils; |
| | | 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.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @PreAuthorize("@ss.hasPermi('smartor:category:remove')") |
| | | @Log(title = "é®å·é¢ç®åç±»", businessType = BusinessType.DELETE) |
| | | @GetMapping("/remove/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) { |
| | | return toAjax(svyLibScriptCategoryService.deleteSvyLibScriptCategoryByIds(ids)); |
| | | public AjaxResult remove(@PathVariable String ids) { |
| | | Long[] idArray = (Long[]) ConvertUtils.convert(ids.split(","), Long.class); |
| | | return toAjax(svyLibScriptCategoryService.deleteSvyLibScriptCategoryByIds(idArray)); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | import org.junit.Test; |
| | | |
| | | import java.time.LocalTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | |
| | | //@SpringBootTest |
| | | //@RunWith(SpringRunner.class) |
| | | public class MQTest { |
| | |
| | | |
| | | @Test |
| | | public void testSend22() { |
| | | LocalTime now = LocalTime.now(); |
| | | System.out.println("å½åæ¶å: " + now.format(DateTimeFormatter.ofPattern("hh:mm"))); |
| | | |
| | | // è·åä¸ä¸åéçæ¶å |
| | | LocalTime nextMinute = now.plusMinutes(1); |
| | | System.out.println("ä¸ä¸åéçæ¶å: " + nextMinute.format(DateTimeFormatter.ofPattern("hh:mm"))); |
| | | } |
| | | |
| | | |
| | |
| | | # æ°æ®æºé
ç½® |
| | | # æ°æ®æºé
ç½® |
| | | spring: |
| | | datasource: |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | |
| | | |
| | | #å¤é¾è¯·æ±IPå端å£å· |
| | | req_path: 8096 |
| | | localIP: 192.168.2.10 |
| | | localIP: 192.168.1.10 |
| | |
| | | # port: 6020 |
| | | |
| | | # å°åï¼å
¬å¸ï¼ |
| | | host: 116.62.18.175 |
| | | # host: 116.62.18.175 |
| | | host: 192.168.1.10 |
| | | port: 6020 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | |
| | | max-active: 8 |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | | |
| | | # minioæä»¶ç®¡çè¿æ¥ |
| | | minio: |
| | | endpoint: http://192.168.1.4 |
| | |
| | | * |
| | | * @author ruoyi |
| | | **/ |
| | | @SuppressWarnings(value = {"unchecked", "rawtypes"}) |
| | | @SuppressWarnings(value = {"unchecked" , "rawtypes"}) |
| | | @Component |
| | | public class RedisCache { |
| | | @Autowired |
| | |
| | | String baseName = FilenameUtils.getBaseName(fileName); |
| | | return baseName; |
| | | } |
| | | |
| | | public static void createFile(String path) { |
| | | File file = new File(path); |
| | | if (!file.exists()) { |
| | | file.mkdirs(); |
| | | } |
| | | } |
| | | } |
| | |
| | | // è¿æ»¤è¯·æ± |
| | | .authorizeRequests() |
| | | // 对äºç»å½login 注åregister éªè¯ç captchaImage å
许å¿åè®¿é® |
| | | .antMatchers("/login", "/register", "/captchaImage", "/qrcode/generateStaticHtml", "/qrcode/getQRcode", "/qrcode/getFormDate", "/chat", "/system/file/admin/uploadFile", "/smartor/dingtalk/sendNotification", "/patient/read/patientInfo", "/socket", "/API_ESB_Service", "/API_ESB_Service/Run", "/magic/web/**", "/smartor/tasksingle/phoneCallBack", "/smartor/robot/callstatus", "/smartor/robot/aidialog", "/smartor/robot/cdrinfo", "/getToken", "/smartor/servicetask/getScriptInfoByCondition", "/smartor/serviceSubtask/saveQuestionAnswer").permitAll() |
| | | .antMatchers("/login", "/register", "/captchaImage", "/qrcode/generateStaticHtml", "/qrcode/getQRcode", "/qrcode/getFormDate", "/chat", "/system/file/admin/uploadFile", "/smartor/dingtalk/sendNotification", "/patient/read/patientInfo", "/socket", "/API_ESB_Service", "/API_ESB_Service/Run", "/magic/web/**", "/smartor/serviceSubtask/phoneCallBack", "/smartor/serviceSubtask/taskPull", "/smartor/serviceSubtask//phoneCallBackYQ", "/smartor/robot/callstatus", "/smartor/robot/aidialog", "/smartor/robot/cdrinfo", "/getToken", "/smartor/servicetask/getScriptInfoByCondition", "/smartor/serviceSubtask/saveQuestionAnswer").permitAll() |
| | | // éæèµæºï¼å¯å¿åè®¿é® |
| | | .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll().antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll() |
| | | // é¤ä¸é¢å¤çææè¯·æ±å
¨é¨éè¦é´æè®¤è¯ |
| | |
| | | package com.ruoyi.framework.config; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | | import com.ruoyi.common.utils.ServletUtils; |
| | | |
| | | /** |
| | | * æå¡ç¸å
³é
ç½® |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @Component |
| | | public class ServerConfig |
| | | { |
| | | public class ServerConfig { |
| | | @Value("${server.port}") |
| | | private String port; |
| | | |
| | | /** |
| | | * è·å宿´ç请æ±è·¯å¾ï¼å
æ¬ï¼ååï¼ç«¯å£ï¼ä¸ä¸æè®¿é®è·¯å¾ |
| | | * |
| | | * |
| | | * @return æå¡å°å |
| | | */ |
| | | public String getUrl() |
| | | { |
| | | public String getUrl() { |
| | | HttpServletRequest request = ServletUtils.getRequest(); |
| | | return getDomain(request); |
| | | String domain = getDomain(request); |
| | | //ä¿®æ¹ä¸ä¸ªç«¯å£ |
| | | domain = replaceAfterSecondColon(domain, port); |
| | | return domain; |
| | | } |
| | | |
| | | public static String getDomain(HttpServletRequest request) |
| | | { |
| | | public static String getDomain(HttpServletRequest request) { |
| | | StringBuffer url = request.getRequestURL(); |
| | | String contextPath = request.getServletContext().getContextPath(); |
| | | return url.delete(url.length() - request.getRequestURI().length(), url.length()).append(contextPath).toString(); |
| | | } |
| | | |
| | | public static String replaceAfterSecondColon(String str, String replacement) { |
| | | int firstColonIndex = str.indexOf(":"); |
| | | if (firstColonIndex != -1) { |
| | | int secondColonIndex = str.indexOf(":", firstColonIndex + 1); |
| | | if (secondColonIndex != -1 && secondColonIndex + 1 < str.length()) { |
| | | // è·å第äºä¸ªâï¼âåçé¨å |
| | | String beforeSecondColon = str.substring(0, secondColonIndex + 1); |
| | | // è¿åæ¿æ¢åçå符串 |
| | | return beforeSecondColon + replacement; |
| | | } |
| | | } |
| | | return str; |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.quartz.task; |
| | | |
| | | import com.smartor.domain.ServiceThirdData; |
| | | import com.smartor.service.IServiceSubtaskAnswerService; |
| | | import com.smartor.service.IServiceThirdDataService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import com.ruoyi.common.enums.ServiceFromEnum; |
| | | import com.ruoyi.common.utils.RSAPublicKeyExample; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.smartor.common.SendService; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.mapper.ServiceSubtaskMapper; |
| | | import com.smartor.mapper.ServiceTaskMapper; |
| | | import com.smartor.service.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Date; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 宿¶ä»»å¡è°åº¦æµè¯ |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @Slf4j |
| | | @Component("ryTask") |
| | | public class RyTask { |
| | | @Autowired |
| | | private IServiceThirdDataService iServiceThirdDataService; |
| | | |
| | | @Autowired |
| | | private IServiceSubtaskAnswerService serviceSubtaskAnswerService; |
| | | |
| | | @Autowired |
| | | private IPatMedInhospService iPatMedInhospService; |
| | | |
| | | @Autowired |
| | | private IServiceSubtaskService iServiceSubtaskService; |
| | | |
| | | |
| | | @Value("${localIP}") |
| | | private String localIP; |
| | | |
| | | @Value("${pub_key}") |
| | | private String pub_key; |
| | | |
| | | |
| | | @Value("${req_path}") |
| | | private String req_path; |
| | | |
| | | @Autowired |
| | | private ServiceTaskMapper serviceTaskMapper; |
| | | |
| | | @Autowired |
| | | private SendService sendService; |
| | | |
| | | @Autowired |
| | | private RedisCache redisCache; |
| | | |
| | | @Autowired |
| | | private IServiceSubtaskRecordService serviceSubtaskRecordService; |
| | | |
| | | @Autowired |
| | | IBaseSmsaccountService baseSmsaccountService; |
| | | |
| | | public void ryMultipleParams(String s, Boolean b, Long l, Double d, Integer i) { |
| | | System.out.println(StringUtils.format("æ§è¡å¤åæ¹æ³ï¼ å符串类å{}ï¼å¸å°ç±»å{}ï¼é¿æ´å{}ï¼æµ®ç¹å{}ï¼æ´å½¢{}", s, b, l, d, i)); |
| | |
| | | public void runServiceSubTaskAnswer() { |
| | | serviceSubtaskAnswerService.saveQuestionAnswer(null); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * å¤çhisæ°æ® |
| | | */ |
| | | public void dealHisData() { |
| | | //å°æ£è
ä¿¡æ¯ãåºé¢ãé¨è¯æ°æ®å
¨é¨éé |
| | | |
| | | |
| | | //è°ç¨dealOupHospInfoæ°æ®å¤çæ¹æ³ï¼å¤çå®åï¼å°âåºé¢è¡¨çcheck_flag=1â |
| | | //è·åå½åæ¥æ ï¼ç²¾ç¡®å°å¤©ï¼å¾åæ¨ç¸åºå¤©æ°ï¼å¨æå®çåºç¡æ¨¡æ¿ä¸æ¾å¯¹åºç天æ°ï¼ï¼ |
| | | //å¾ªç¯æ£è
ä¿¡æ¯ï¼æ ¹æ®æ£è
"åºé¢è¯æICDå¼âè·åå°ç¸å½ç模æ¿ï¼è·ååç¸åºç天æ°ï¼; |
| | | //æ ¹æ®æ¥è¯¢åºæ¥ç模æ¿ï¼å»åºå®ä»»å¡ï¼åºå®ä»»å¡ï¼å·²ç»å°æ¨¡æ¿ä¹åºå®äºï¼å»å¹é
æ¨¡æ¿ |
| | | //æ ¹æ®å¹é
åºæ¥ç模æ¿åä»»å¡ä¸æ£è
ä¿¡æ¯ï¼å°æ°æ®æå
¥å°åä»»å¡è¡¨ä¸ |
| | | iPatMedInhospService.dealOupHospInfo(); |
| | | } |
| | | |
| | | /** |
| | | * é¿æä»»å¡æ§è¡ |
| | | */ |
| | | public void longTaskSend() { |
| | | //è·åä»»å¡ä¿¡æ¯ |
| | | ServiceTask st =new ServiceTask(); |
| | | st.setDelFlag("0"); |
| | | st.setLongTask(1); |
| | | List<ServiceTask> serviceTasks = serviceTaskMapper.selectServiceTaskList(st); |
| | | for (ServiceTask serviceTask : serviceTasks) { |
| | | //éè¿taskId,è·åæªæ§è¡çåä»»å¡ä¿¡æ¯ |
| | | ServiceSubtask serviceSubtask = new ServiceSubtask(); |
| | | serviceSubtask.setTaskid(serviceTask.getTaskid()); |
| | | serviceSubtask.setSendstate(2L); |
| | | List<ServiceSubtask> selectServiceSubtaskList = iServiceSubtaskService.selectServiceSubtaskList(serviceSubtask); |
| | | if (CollectionUtils.isNotEmpty(selectServiceSubtaskList)) { |
| | | for (ServiceSubtask serviceSubtask1 : selectServiceSubtaskList) { |
| | | //妿æ£è
çåéæ¥ææ¯ä»å¤©ï¼åè¿è¡åé |
| | | boolean dateToday = isDateToday(serviceSubtask1.getLongSendTime()); |
| | | if (dateToday) { |
| | | CommonTaskcallMQ commonTaskcallMQ = new CommonTaskcallMQ(); |
| | | commonTaskcallMQ.setTaskid(serviceTask.getTaskid()); |
| | | commonTaskcallMQ.setPreachform(serviceSubtask1.getServiceform()); |
| | | sfHandle(commonTaskcallMQ, localIP); |
| | | //åé宿åï¼ä¿®æ¹ç¶æ |
| | | serviceSubtask1.setSendstate(3L); |
| | | iServiceSubtaskService.updateServiceSubtask(serviceSubtask1); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * å¤ææ¥ææ¯å¦æ¯ä»å¤© |
| | | * |
| | | * @param date |
| | | * @return |
| | | */ |
| | | public boolean isDateToday(Date date) { |
| | | // è·åå½åæ¥æ |
| | | Calendar calendarNow = Calendar.getInstance(); |
| | | int todayYear = calendarNow.get(Calendar.YEAR); |
| | | int todayMonth = calendarNow.get(Calendar.MONTH); |
| | | int todayDay = calendarNow.get(Calendar.DAY_OF_MONTH); |
| | | |
| | | // å建ä¸ä¸ª Calendar å®ä¾ç¨äºæ£æ¥çæ¥æ |
| | | Calendar calendarToCheck = Calendar.getInstance(); |
| | | calendarToCheck.setTime(date); |
| | | |
| | | // æ¯è¾å¹´ãæåæ¥ |
| | | return (calendarToCheck.get(Calendar.YEAR) == todayYear && calendarToCheck.get(Calendar.MONTH) == todayMonth && calendarToCheck.get(Calendar.DAY_OF_MONTH) == todayDay); |
| | | } |
| | | |
| | | public void sfHandle(CommonTaskcallMQ commonTaskcallMQ, String ip) { |
| | | //夿ä¸ä¸commonTaskcallMQä¸çstopstateæ¯å¦ä¸ivr_taskä¸çä¸è´ï¼ä¸ä¸è´ï¼åè¯´ææ¯æåäº |
| | | ServiceTask ivrTask1 = serviceTaskMapper.selectServiceTaskByTaskid(commonTaskcallMQ.getTaskid()); |
| | | |
| | | if (StringUtils.isNotEmpty(commonTaskcallMQ.getPreachform())) { |
| | | //å¦ä½ä»»å¡åéæ¹å¼ä¸ä¸ºç©º |
| | | String[] split = commonTaskcallMQ.getPreachform().split(","); |
| | | System.out.println("splitçå¼ä¸ºï¼" + split); |
| | | for (String serviceFrom : split) { |
| | | String descByCode = ServiceFromEnum.getDescByCode(Integer.valueOf(serviceFrom)); |
| | | //è¿éå¯ä»¥èèç¨çç¥æ¨¡å¼ä¼åä¸ä¸ï¼ä¸ç¶å¤ªé¾çäº |
| | | //éè¿ä»»å¡IDæ¿å°æ£è
ä¿¡æ¯ |
| | | ServiceSubtask ivrTaskcall = new ServiceSubtask(); |
| | | ivrTaskcall.setTaskid(commonTaskcallMQ.getTaskid()); |
| | | List<ServiceSubtask> selectServiceSubtaskList = iServiceSubtaskService.selectServiceSubtaskList(ivrTaskcall); |
| | | if (descByCode.equals("çµè¯")) { |
| | | for (ServiceSubtask serviceSubtask : selectServiceSubtaskList) { |
| | | ServiceTask ivrTask = serviceTaskMapper.selectServiceTaskByTaskid(serviceSubtask.getTaskid()); |
| | | if (ivrTask.getSendState() != null && ivrTask.getSendState() == 3 || ivrTask.getSendState() != null && ivrTask.getSendState() == 4) { |
| | | //å¦ä½ä»»å¡è¢«âæåâæâç»æ¢â |
| | | break; |
| | | } |
| | | //è·åå°value弿å°çkey |
| | | String key = getKey(); |
| | | if (commonTaskcallMQ.getSendType().equals("2")) { |
| | | //è¯´ææ¯ç«å³åé |
| | | String value = redisCache.getCacheObject("cache-0"); |
| | | ServiceSubtask serviceSubtask1 = new ServiceSubtask(); |
| | | serviceSubtask1.setTaskid(commonTaskcallMQ.getTaskid()); |
| | | List<ServiceSubtask> selectServiceSubtaskList1 = iServiceSubtaskService.selectServiceSubtaskList(serviceSubtask1); |
| | | for (ServiceSubtask serviceSubtask2 : selectServiceSubtaskList1) { |
| | | if (StringUtils.isEmpty(value)) { |
| | | value = "," + serviceSubtask2.getId().toString() + ","; |
| | | } else { |
| | | value = value + "," + serviceSubtask2.getId().toString() + ","; |
| | | } |
| | | } |
| | | redisCache.setCacheObject("cache-0", value); |
| | | } else { |
| | | //éç«å³åé |
| | | String value = redisCache.getCacheObject(key); |
| | | ServiceSubtask serviceSubtask1 = new ServiceSubtask(); |
| | | serviceSubtask1.setTaskid(commonTaskcallMQ.getTaskid()); |
| | | List<ServiceSubtask> selectServiceSubtaskList1 = iServiceSubtaskService.selectServiceSubtaskList(serviceSubtask1); |
| | | for (ServiceSubtask serviceSubtask2 : selectServiceSubtaskList1) { |
| | | if (StringUtils.isEmpty(value)) { |
| | | value = "," + serviceSubtask2.getId().toString() + ","; |
| | | } else { |
| | | value = value + "," + serviceSubtask2.getId().toString() + ","; |
| | | } |
| | | } |
| | | redisCache.setCacheObject(key, value); |
| | | } |
| | | |
| | | //ä»»å¡åéè®°å½ï¼è¿ä¸ªä»£ç åºè¯¥åå¨phoneTaskä¸ï¼å
åå¨è¿ï¼åé¢åæ¹ï¼ |
| | | ServiceSubtaskRecord serviceSubtaskRecord = new ServiceSubtaskRecord(); |
| | | serviceSubtaskRecord.setTaskid(serviceSubtask.getTaskid().toString()); |
| | | serviceSubtaskRecord.setUuid(UUID.randomUUID().toString()); |
| | | serviceSubtaskRecord.setTasktype(serviceSubtask.getType()); |
| | | serviceSubtaskRecord.setPreachform("3"); |
| | | serviceSubtaskRecord.setStartTime(System.currentTimeMillis()); |
| | | serviceSubtaskRecordService.insertServiceSubtaskRecord(serviceSubtaskRecord); |
| | | |
| | | // //éè¿å¤çº¿ç¨çæ¹å¼å»æçµè¯ |
| | | // executorService.submit(new PhoneTask(serviceSubtask, ivrTaskTemplateVO1, redisCache, sendService, phonePath, robotPhoneUtils)); |
| | | } |
| | | } else if (descByCode.equals("å¤åªä½")) { |
| | | //å¤åªä½ |
| | | return; |
| | | } else if (descByCode.equals("纸质")) { |
| | | //纸质 |
| | | return; |
| | | } else if (descByCode.equals("çä¿¡")) { |
| | | //çä¿¡ |
| | | // http://localhost:8099/followvisit/particty?param1=3¶m2=348 |
| | | //对urlä¸ä¸¤ä¸ªåæ°å å¯ |
| | | RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample(); |
| | | String taskId = rsaPublicKeyExample.encryptedData(ivrTask1.getTaskid().toString(), pub_key); |
| | | |
| | | for (ServiceSubtask serviceSubtask : selectServiceSubtaskList) { |
| | | String patid = rsaPublicKeyExample.encryptedData(serviceSubtask.getPatid().toString(), pub_key); |
| | | SendMagParam sendMagParam = new SendMagParam(); |
| | | sendMagParam.setType("4"); |
| | | sendMagParam.setPhone(serviceSubtask.getPhone()); |
| | | sendMagParam.setUrl(ip + ":" + req_path + "/followvisit/particty?param1=" + taskId + "¶m2=" + patid + "¶m5=false"); |
| | | Boolean aBoolean = sendService.sendMsg(sendMagParam); |
| | | |
| | | |
| | | //ä»»å¡åéè®°å½ |
| | | ServiceSubtaskRecord serviceSubtaskRecord = new ServiceSubtaskRecord(); |
| | | serviceSubtaskRecord.setTaskid(serviceSubtask.getTaskid().toString()); |
| | | serviceSubtaskRecord.setUuid(UUID.randomUUID().toString()); |
| | | serviceSubtaskRecord.setTasktype(serviceSubtask.getType()); |
| | | serviceSubtaskRecord.setPreachform("4"); |
| | | serviceSubtaskRecord.setStartTime(System.currentTimeMillis()); |
| | | serviceSubtaskRecord.setResult(aBoolean == true ? "æå" : "失败"); |
| | | serviceSubtaskRecordService.insertServiceSubtaskRecord(serviceSubtaskRecord); |
| | | } |
| | | } else if (descByCode.equals("å
¬ä¼å·")) { |
| | | //å
¬ä¼å· |
| | | RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample(); |
| | | String taskId = rsaPublicKeyExample.encryptedData(ivrTask1.getTaskid().toString(), pub_key); |
| | | for (ServiceSubtask serviceSubtask : selectServiceSubtaskList) { |
| | | String patid = rsaPublicKeyExample.encryptedData(serviceSubtask.getPatid().toString(), pub_key); |
| | | SendMagParam sendMagParam = new SendMagParam(); |
| | | sendMagParam.setType("5"); |
| | | sendMagParam.setUrl(ip + ":" + req_path + "/outsideChain?param1=" + taskId + "¶m2=" + patid + "¶m3=" + ivrTask1.getTaskName() + "¶m5=false"); |
| | | log.info("龿¥å®æ´è·¯å¾ï¼{}", ip + ":" + req_path + "/outsideChain?param1=" + taskId + "¶m2=" + patid + "¶m3=" + ivrTask1.getTaskName() + "¶m5=false"); |
| | | //è¿ä¸ªæ¨¡æ¿IDå
åæ»ï¼åé¢åæå¯é |
| | | sendMagParam.setTmpCode("oG3pJHPVWpE81DmZsua_2tKwgJ97r0qz37z56ns7NB4"); |
| | | Map map = new HashMap(); |
| | | map.put("first", ivrTask1.getTaskName()); |
| | | sendMagParam.setContent(JSON.toJSONString(map)); |
| | | sendMagParam.setOpenid(serviceSubtask.getOpenid()); |
| | | Boolean aBoolean = sendService.sendMsg(sendMagParam); |
| | | |
| | | //ä»»å¡åéè®°å½ |
| | | ServiceSubtaskRecord serviceSubtaskRecord = new ServiceSubtaskRecord(); |
| | | serviceSubtaskRecord.setTaskid(serviceSubtask.getTaskid().toString()); |
| | | serviceSubtaskRecord.setUuid(UUID.randomUUID().toString()); |
| | | serviceSubtaskRecord.setTasktype(serviceSubtask.getType()); |
| | | serviceSubtaskRecord.setPreachform("4"); |
| | | serviceSubtaskRecord.setStartTime(System.currentTimeMillis()); |
| | | serviceSubtaskRecord.setResult(aBoolean == true ? "æå" : "失败"); |
| | | serviceSubtaskRecordService.insertServiceSubtaskRecord(serviceSubtaskRecord); |
| | | } |
| | | } |
| | | //éç¥ MQ æ¶æ¯å·²è¢«æ¥æ¶,å¯ä»¥ACK(ä»éåä¸å é¤)äº ï¼è¿ä¸ªéè¦æ ¹æ®ä¸å¡åå»å¤çACKï¼ |
| | | } |
| | | } |
| | | } |
| | | |
| | | private String getKey() { |
| | | Map<String, String> map = new HashMap<>(); |
| | | for (int i = 0; i < 6; i++) { |
| | | Boolean aBoolean = redisCache.hasKey("cache-" + i); |
| | | if (!aBoolean) { |
| | | redisCache.setCacheObject("cache-" + i, ""); |
| | | map.put("cache-" + i, ""); |
| | | } else { |
| | | map.put("cache-" + i, redisCache.getCacheObject("cache-" + i)); |
| | | } |
| | | } |
| | | |
| | | String key = null; |
| | | String value = ""; |
| | | for (Map.Entry<String, String> entry : map.entrySet()) { |
| | | if (StringUtils.isEmpty(value)) { |
| | | value = entry.getValue(); |
| | | key = entry.getKey(); |
| | | } else { |
| | | if (entry.getValue().split(",").length < value.split(",").length) { |
| | | value = entry.getValue(); |
| | | key = entry.getKey(); |
| | | } |
| | | } |
| | | } |
| | | return key; |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.system.domain.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonInclude; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è·¯ç±é
ç½®ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @JsonInclude(JsonInclude.Include.NON_EMPTY) |
| | | public class RouterVo |
| | | { |
| | | public class RouterVo { |
| | | /** |
| | | * è·¯ç±åå |
| | | */ |
| | |
| | | */ |
| | | private List<RouterVo> children; |
| | | |
| | | public String getName() |
| | | { |
| | | /** |
| | | * åèååéå |
| | | */ |
| | | private List<String> childName; |
| | | |
| | | public List<String> getChildName() { |
| | | return childName; |
| | | } |
| | | |
| | | public void setChildName(List<String> childName) { |
| | | this.childName = childName; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) |
| | | { |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getPath() |
| | | { |
| | | public String getPath() { |
| | | return path; |
| | | } |
| | | |
| | | public void setPath(String path) |
| | | { |
| | | public void setPath(String path) { |
| | | this.path = path; |
| | | } |
| | | |
| | | public boolean getHidden() |
| | | { |
| | | public boolean getHidden() { |
| | | return hidden; |
| | | } |
| | | |
| | | public void setHidden(boolean hidden) |
| | | { |
| | | public void setHidden(boolean hidden) { |
| | | this.hidden = hidden; |
| | | } |
| | | |
| | | public String getRedirect() |
| | | { |
| | | public String getRedirect() { |
| | | return redirect; |
| | | } |
| | | |
| | | public void setRedirect(String redirect) |
| | | { |
| | | public void setRedirect(String redirect) { |
| | | this.redirect = redirect; |
| | | } |
| | | |
| | | public String getComponent() |
| | | { |
| | | public String getComponent() { |
| | | return component; |
| | | } |
| | | |
| | | public void setComponent(String component) |
| | | { |
| | | public void setComponent(String component) { |
| | | this.component = component; |
| | | } |
| | | |
| | | public String getQuery() |
| | | { |
| | | public String getQuery() { |
| | | return query; |
| | | } |
| | | |
| | | public void setQuery(String query) |
| | | { |
| | | public void setQuery(String query) { |
| | | this.query = query; |
| | | } |
| | | |
| | | public Boolean getAlwaysShow() |
| | | { |
| | | public Boolean getAlwaysShow() { |
| | | return alwaysShow; |
| | | } |
| | | |
| | | public void setAlwaysShow(Boolean alwaysShow) |
| | | { |
| | | public void setAlwaysShow(Boolean alwaysShow) { |
| | | this.alwaysShow = alwaysShow; |
| | | } |
| | | |
| | | public MetaVo getMeta() |
| | | { |
| | | public MetaVo getMeta() { |
| | | return meta; |
| | | } |
| | | |
| | | public void setMeta(MetaVo meta) |
| | | { |
| | | public void setMeta(MetaVo meta) { |
| | | this.meta = meta; |
| | | } |
| | | |
| | | public List<RouterVo> getChildren() |
| | | { |
| | | public List<RouterVo> getChildren() { |
| | | return children; |
| | | } |
| | | |
| | | public void setChildren(List<RouterVo> children) |
| | | { |
| | | public void setChildren(List<RouterVo> children) { |
| | | this.children = children; |
| | | } |
| | | } |
| | |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.system.domain.BaseUserInfo; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * ç¨æ·Mapperæ¥å£ |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | * @date 2023-05-25 |
| | | */ |
| | | public interface BaseUserInfoMapper |
| | | @Mapper |
| | | public interface BaseUserInfoMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢ç¨æ· |
| | | * |
| | | * |
| | | * @param userid ç¨æ·ä¸»é® |
| | | * @return ç¨æ· |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¨æ·å表 |
| | | * |
| | | * |
| | | * @param baseUserInfo ç¨æ· |
| | | * @return ç¨æ·éå |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ°å¢ç¨æ· |
| | | * |
| | | * |
| | | * @param baseUserInfo ç¨æ· |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * ä¿®æ¹ç¨æ· |
| | | * |
| | | * |
| | | * @param baseUserInfo ç¨æ· |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * å é¤ç¨æ· |
| | | * |
| | | * |
| | | * @param userid ç¨æ·ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éå é¤ç¨æ· |
| | | * |
| | | * |
| | | * @param userids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.system.domain.Equipmentinfo; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * ã请填ååè½åç§°ãMapperæ¥å£ |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | * @date 2023-05-25 |
| | | */ |
| | | public interface EquipmentinfoMapper |
| | | @Mapper |
| | | public interface EquipmentinfoMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢ã请填ååè½åç§°ã |
| | | * |
| | | * |
| | | * @param id ã请填ååè½åç§°ãä¸»é® |
| | | * @return ã请填ååè½åç§°ã |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¥è¯¢ã请填ååè½åç§°ãå表 |
| | | * |
| | | * |
| | | * @param equipmentinfo ã请填ååè½åç§°ã |
| | | * @return ã请填ååè½åç§°ãéå |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ°å¢ã请填ååè½åç§°ã |
| | | * |
| | | * |
| | | * @param equipmentinfo ã请填ååè½åç§°ã |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * ä¿®æ¹ã请填ååè½åç§°ã |
| | | * |
| | | * |
| | | * @param equipmentinfo ã请填ååè½åç§°ã |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * å é¤ã请填ååè½åç§°ã |
| | | * |
| | | * |
| | | * @param id ã请填ååè½åç§°ãä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éå é¤ã请填ååè½åç§°ã |
| | | * |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import com.ruoyi.common.core.domain.entity.SysDept; |
| | | |
| | | /** |
| | | * é¨é¨ç®¡ç æ°æ®å± |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @Mapper |
| | | public interface SysDeptMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢é¨é¨ç®¡çæ°æ® |
| | | * |
| | | * |
| | | * @param dept é¨é¨ä¿¡æ¯ |
| | | * @return é¨é¨ä¿¡æ¯éå |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®è§è²IDæ¥è¯¢é¨é¨æ ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param roleId è§è²ID |
| | | * @param deptCheckStrictly é¨é¨æ 鿩项æ¯å¦å
³èæ¾ç¤º |
| | | * @return éä¸é¨é¨å表 |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®é¨é¨IDæ¥è¯¢ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param deptId é¨é¨ID |
| | | * @return é¨é¨ä¿¡æ¯ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®IDæ¥è¯¢ææåé¨é¨ |
| | | * |
| | | * |
| | | * @param deptId é¨é¨ID |
| | | * @return é¨é¨å表 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®IDæ¥è¯¢ææåé¨é¨ï¼æ£å¸¸ç¶æï¼ |
| | | * |
| | | * |
| | | * @param deptId é¨é¨ID |
| | | * @return åé¨é¨æ° |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¯å¦åå¨åèç¹ |
| | | * |
| | | * |
| | | * @param deptId é¨é¨ID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¥è¯¢é¨é¨æ¯å¦åå¨ç¨æ· |
| | | * |
| | | * |
| | | * @param deptId é¨é¨ID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¡éªé¨é¨åç§°æ¯å¦å¯ä¸ |
| | | * |
| | | * |
| | | * @param deptName é¨é¨åç§° |
| | | * @param parentId ç¶é¨é¨ID |
| | | * @return ç»æ |
| | |
| | | |
| | | /** |
| | | * æ°å¢é¨é¨ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param dept é¨é¨ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * ä¿®æ¹é¨é¨ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param dept é¨é¨ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * ä¿®æ¹æå¨é¨é¨æ£å¸¸ç¶æ |
| | | * |
| | | * |
| | | * @param deptIds é¨é¨IDç» |
| | | */ |
| | | public void updateDeptStatusNormal(Long[] deptIds); |
| | | |
| | | /** |
| | | * ä¿®æ¹åå
ç´ å
³ç³» |
| | | * |
| | | * |
| | | * @param depts åå
ç´ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * å é¤é¨é¨ç®¡çä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param deptId é¨é¨ID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import com.ruoyi.common.core.domain.entity.SysDictData; |
| | | |
| | | /** |
| | | * åå
¸è¡¨ æ°æ®å± |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @Mapper |
| | | public interface SysDictDataMapper |
| | | { |
| | | /** |
| | | * æ ¹æ®æ¡ä»¶å页æ¥è¯¢åå
¸æ°æ® |
| | | * |
| | | * |
| | | * @param dictData åå
¸æ°æ®ä¿¡æ¯ |
| | | * @return åå
¸æ°æ®éåä¿¡æ¯ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®åå
¸ç±»åæ¥è¯¢åå
¸æ°æ® |
| | | * |
| | | * |
| | | * @param dictType åå
¸ç±»å |
| | | * @return åå
¸æ°æ®éåä¿¡æ¯ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®åå
¸ç±»åååå
¸é®å¼æ¥è¯¢åå
¸æ°æ®ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param dictType åå
¸ç±»å |
| | | * @param dictValue åå
¸é®å¼ |
| | | * @return åå
¸æ ç¾ |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®åå
¸æ°æ®IDæ¥è¯¢ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param dictCode åå
¸æ°æ®ID |
| | | * @return åå
¸æ°æ® |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¥è¯¢åå
¸æ°æ® |
| | | * |
| | | * |
| | | * @param dictType åå
¸ç±»å |
| | | * @return åå
¸æ°æ® |
| | | */ |
| | |
| | | |
| | | /** |
| | | * éè¿åå
¸IDå é¤åå
¸æ°æ®ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param dictCode åå
¸æ°æ®ID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éå é¤åå
¸æ°æ®ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param dictCodes éè¦å é¤çåå
¸æ°æ®ID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ°å¢åå
¸æ°æ®ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param dictData åå
¸æ°æ®ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * ä¿®æ¹åå
¸æ°æ®ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param dictData åå
¸æ°æ®ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * åæ¥ä¿®æ¹åå
¸ç±»å |
| | | * |
| | | * |
| | | * @param oldDictType æ§åå
¸ç±»å |
| | | * @param newDictType æ°æ§åå
¸ç±»å |
| | | * @return ç»æ |
| | |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.common.core.domain.entity.SysDictType; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * åå
¸è¡¨ æ°æ®å± |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @Mapper |
| | | public interface SysDictTypeMapper |
| | | { |
| | | /** |
| | | * æ ¹æ®æ¡ä»¶å页æ¥è¯¢åå
¸ç±»å |
| | | * |
| | | * |
| | | * @param dictType åå
¸ç±»åä¿¡æ¯ |
| | | * @return åå
¸ç±»åéåä¿¡æ¯ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®ææåå
¸ç±»å |
| | | * |
| | | * |
| | | * @return åå
¸ç±»åéåä¿¡æ¯ |
| | | */ |
| | | public List<SysDictType> selectDictTypeAll(); |
| | | |
| | | /** |
| | | * æ ¹æ®åå
¸ç±»åIDæ¥è¯¢ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param dictId åå
¸ç±»åID |
| | | * @return åå
¸ç±»å |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®åå
¸ç±»åæ¥è¯¢ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param dictType åå
¸ç±»å |
| | | * @return åå
¸ç±»å |
| | | */ |
| | |
| | | |
| | | /** |
| | | * éè¿åå
¸IDå é¤åå
¸ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param dictId åå
¸ID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éå é¤åå
¸ç±»åä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param dictIds éè¦å é¤çåå
¸ID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ°å¢åå
¸ç±»åä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param dictType åå
¸ç±»åä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * ä¿®æ¹åå
¸ç±»åä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param dictType åå
¸ç±»åä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¡éªåå
¸ç±»åç§°æ¯å¦å¯ä¸ |
| | | * |
| | | * |
| | | * @param dictType åå
¸ç±»å |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.system.domain.SysLogininfor; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * ç³»ç»è®¿é®æ¥å¿æ
åµä¿¡æ¯ æ°æ®å± |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @Mapper |
| | | public interface SysLogininforMapper |
| | | { |
| | | /** |
| | | * æ°å¢ç³»ç»ç»å½æ¥å¿ |
| | | * |
| | | * |
| | | * @param logininfor è®¿é®æ¥å¿å¯¹è±¡ |
| | | */ |
| | | public void insertLogininfor(SysLogininfor logininfor); |
| | | |
| | | /** |
| | | * æ¥è¯¢ç³»ç»ç»å½æ¥å¿éå |
| | | * |
| | | * |
| | | * @param logininfor è®¿é®æ¥å¿å¯¹è±¡ |
| | | * @return ç»å½è®°å½éå |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éå é¤ç³»ç»ç»å½æ¥å¿ |
| | | * |
| | | * |
| | | * @param infoIds éè¦å é¤çç»å½æ¥å¿ID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¸
空系ç»ç»å½æ¥å¿ |
| | | * |
| | | * |
| | | * @return ç»æ |
| | | */ |
| | | public int cleanLogininfor(); |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import com.ruoyi.common.core.domain.entity.SysMenu; |
| | | |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @Mapper |
| | | public interface SysMenuMapper |
| | | { |
| | | /** |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®è§è²IDæ¥è¯¢æé |
| | | * |
| | | * |
| | | * @param roleId è§è²ID |
| | | * @return æéå表 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®è§è²IDæ¥è¯¢èåæ ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param roleId è§è²ID |
| | | * @param menuCheckStrictly èåæ éæ©é¡¹æ¯å¦å
³èæ¾ç¤º |
| | | * @return éä¸èåå表 |
| | |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.system.domain.SysNotice; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * éç¥å
¬å表 æ°æ®å± |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @Mapper |
| | | public interface SysNoticeMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢å
¬åä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param noticeId å
ŒID |
| | | * @return å
¬åä¿¡æ¯ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¥è¯¢å
¬åå表 |
| | | * |
| | | * |
| | | * @param notice å
¬åä¿¡æ¯ |
| | | * @return å
¬åéå |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ°å¢å
Œ |
| | | * |
| | | * |
| | | * @param notice å
¬åä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * ä¿®æ¹å
Œ |
| | | * |
| | | * |
| | | * @param notice å
¬åä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éå é¤å
Œ |
| | | * |
| | | * |
| | | * @param noticeId å
ŒID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éå é¤å
¬åä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param noticeIds éè¦å é¤çå
ŒID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.system.domain.SysOperLog; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * æä½æ¥å¿ æ°æ®å± |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @Mapper |
| | | public interface SysOperLogMapper |
| | | { |
| | | /** |
| | | * æ°å¢æä½æ¥å¿ |
| | | * |
| | | * |
| | | * @param operLog æä½æ¥å¿å¯¹è±¡ |
| | | */ |
| | | public void insertOperlog(SysOperLog operLog); |
| | | |
| | | /** |
| | | * æ¥è¯¢ç³»ç»æä½æ¥å¿éå |
| | | * |
| | | * |
| | | * @param operLog æä½æ¥å¿å¯¹è±¡ |
| | | * @return æä½æ¥å¿éå |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éå é¤ç³»ç»æä½æ¥å¿ |
| | | * |
| | | * |
| | | * @param operIds éè¦å é¤çæä½æ¥å¿ID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¥è¯¢æä½æ¥å¿è¯¦ç» |
| | | * |
| | | * |
| | | * @param operId æä½ID |
| | | * @return æä½æ¥å¿å¯¹è±¡ |
| | | */ |
| | |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.system.domain.SysPost; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * å²ä½ä¿¡æ¯ æ°æ®å± |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @Mapper |
| | | public interface SysPostMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢å²ä½æ°æ®éå |
| | | * |
| | | * |
| | | * @param post å²ä½ä¿¡æ¯ |
| | | * @return å²ä½æ°æ®éå |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¥è¯¢ææå²ä½ |
| | | * |
| | | * |
| | | * @return å²ä½å表 |
| | | */ |
| | | public List<SysPost> selectPostAll(); |
| | | |
| | | /** |
| | | * éè¿å²ä½IDæ¥è¯¢å²ä½ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param postId å²ä½ID |
| | | * @return è§è²å¯¹è±¡ä¿¡æ¯ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·IDè·åå²ä½éæ©æ¡å表 |
| | | * |
| | | * |
| | | * @param userId ç¨æ·ID |
| | | * @return éä¸å²ä½IDå表 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¨æ·æå±å²ä½ç» |
| | | * |
| | | * |
| | | * @param userName ç¨æ·å |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * å é¤å²ä½ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param postId å²ä½ID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éå é¤å²ä½ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param postIds éè¦å é¤çå²ä½ID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * ä¿®æ¹å²ä½ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param post å²ä½ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ°å¢å²ä½ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param post å²ä½ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¡éªå²ä½åç§° |
| | | * |
| | | * |
| | | * @param postName å²ä½åç§° |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¡éªå²ä½ç¼ç |
| | | * |
| | | * |
| | | * @param postCode å²ä½ç¼ç |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.system.domain.SysRoleDept; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * è§è²ä¸é¨é¨å
³è表 æ°æ®å± |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @Mapper |
| | | public interface SysRoleDeptMapper |
| | | { |
| | | /** |
| | | * éè¿è§è²IDå é¤è§è²åé¨é¨å
³è |
| | | * |
| | | * |
| | | * @param roleId è§è²ID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éå é¤è§è²é¨é¨å
³èä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¥è¯¢é¨é¨ä½¿ç¨æ°é |
| | | * |
| | | * |
| | | * @param deptId é¨é¨ID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éæ°å¢è§è²é¨é¨ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param roleDeptList è§è²é¨é¨å表 |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.common.core.domain.entity.SysRole; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * è§è²è¡¨ æ°æ®å± |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @Mapper |
| | | public interface SysRoleMapper |
| | | { |
| | | /** |
| | | * æ ¹æ®æ¡ä»¶å页æ¥è¯¢è§è²æ°æ® |
| | | * |
| | | * |
| | | * @param role è§è²ä¿¡æ¯ |
| | | * @return è§è²æ°æ®éåä¿¡æ¯ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·IDæ¥è¯¢è§è² |
| | | * |
| | | * |
| | | * @param userId ç¨æ·ID |
| | | * @return è§è²å表 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¥è¯¢ææè§è² |
| | | * |
| | | * |
| | | * @return è§è²å表 |
| | | */ |
| | | public List<SysRole> selectRoleAll(); |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·IDè·åè§è²éæ©æ¡å表 |
| | | * |
| | | * |
| | | * @param userId ç¨æ·ID |
| | | * @return éä¸è§è²IDå表 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * éè¿è§è²IDæ¥è¯¢è§è² |
| | | * |
| | | * |
| | | * @param roleId è§è²ID |
| | | * @return è§è²å¯¹è±¡ä¿¡æ¯ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·IDæ¥è¯¢è§è² |
| | | * |
| | | * |
| | | * @param userName ç¨æ·å |
| | | * @return è§è²å表 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¡éªè§è²åç§°æ¯å¦å¯ä¸ |
| | | * |
| | | * |
| | | * @param roleName è§è²åç§° |
| | | * @return è§è²ä¿¡æ¯ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¡éªè§è²æéæ¯å¦å¯ä¸ |
| | | * |
| | | * |
| | | * @param roleKey è§è²æé |
| | | * @return è§è²ä¿¡æ¯ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * ä¿®æ¹è§è²ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param role è§è²ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ°å¢è§è²ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param role è§è²ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * éè¿è§è²IDå é¤è§è² |
| | | * |
| | | * |
| | | * @param roleId è§è²ID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éå é¤è§è²ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param roleIds éè¦å é¤çè§è²ID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.system.domain.SysRoleMenu; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * è§è²ä¸èåå
³è表 æ°æ®å± |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @Mapper |
| | | public interface SysRoleMenuMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢èåä½¿ç¨æ°é |
| | | * |
| | | * |
| | | * @param menuId èåID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * éè¿è§è²IDå é¤è§è²åèåå
³è |
| | | * |
| | | * |
| | | * @param roleId è§è²ID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éå é¤è§è²èåå
³èä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éæ°å¢è§è²èåä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param roleMenuList è§è²èåå表 |
| | | * @return ç»æ |
| | | */ |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | |
| | | /** |
| | | * ç¨æ·è¡¨ æ°æ®å± |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @Mapper |
| | | public interface SysUserMapper |
| | | { |
| | | /** |
| | | * æ ¹æ®æ¡ä»¶å页æ¥è¯¢ç¨æ·å表 |
| | | * |
| | | * |
| | | * @param sysUser ç¨æ·ä¿¡æ¯ |
| | | * @return ç¨æ·ä¿¡æ¯éåä¿¡æ¯ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®æ¡ä»¶å页æ¥è¯¢å·²é
ç¨æ·è§è²å表 |
| | | * |
| | | * |
| | | * @param user ç¨æ·ä¿¡æ¯ |
| | | * @return ç¨æ·ä¿¡æ¯éåä¿¡æ¯ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®æ¡ä»¶å页æ¥è¯¢æªåé
ç¨æ·è§è²å表 |
| | | * |
| | | * |
| | | * @param user ç¨æ·ä¿¡æ¯ |
| | | * @return ç¨æ·ä¿¡æ¯éåä¿¡æ¯ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * éè¿ç¨æ·åæ¥è¯¢ç¨æ· |
| | | * |
| | | * |
| | | * @param userName ç¨æ·å |
| | | * @return ç¨æ·å¯¹è±¡ä¿¡æ¯ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * éè¿ç¨æ·IDæ¥è¯¢ç¨æ· |
| | | * |
| | | * |
| | | * @param userId ç¨æ·ID |
| | | * @return ç¨æ·å¯¹è±¡ä¿¡æ¯ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ°å¢ç¨æ·ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param user ç¨æ·ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * ä¿®æ¹ç¨æ·ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param user ç¨æ·ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * ä¿®æ¹ç¨æ·å¤´å |
| | | * |
| | | * |
| | | * @param userName ç¨æ·å |
| | | * @param avatar 头åå°å |
| | | * @return ç»æ |
| | |
| | | |
| | | /** |
| | | * éç½®ç¨æ·å¯ç |
| | | * |
| | | * |
| | | * @param userName ç¨æ·å |
| | | * @param password å¯ç |
| | | * @return ç»æ |
| | |
| | | |
| | | /** |
| | | * éè¿ç¨æ·IDå é¤ç¨æ· |
| | | * |
| | | * |
| | | * @param userId ç¨æ·ID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éå é¤ç¨æ·ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param userIds éè¦å é¤çç¨æ·ID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¡éªç¨æ·åç§°æ¯å¦å¯ä¸ |
| | | * |
| | | * |
| | | * @param userName ç¨æ·åç§° |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.system.domain.SysUserPost; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * ç¨æ·ä¸å²ä½å
³è表 æ°æ®å± |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @Mapper |
| | | public interface SysUserPostMapper |
| | | { |
| | | /** |
| | | * éè¿ç¨æ·IDå é¤ç¨æ·åå²ä½å
³è |
| | | * |
| | | * |
| | | * @param userId ç¨æ·ID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * éè¿å²ä½IDæ¥è¯¢å²ä½ä½¿ç¨æ°é |
| | | * |
| | | * |
| | | * @param postId å²ä½ID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éå é¤ç¨æ·åå²ä½å
³è |
| | | * |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éæ°å¢ç¨æ·å²ä½ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param userPostList ç¨æ·è§è²å表 |
| | | * @return ç»æ |
| | | */ |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import com.ruoyi.system.domain.SysUserRole; |
| | | |
| | | /** |
| | | * ç¨æ·ä¸è§è²å
³è表 æ°æ®å± |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @Mapper |
| | | public interface SysUserRoleMapper |
| | | { |
| | | /** |
| | | * éè¿ç¨æ·IDå é¤ç¨æ·åè§è²å
³è |
| | | * |
| | | * |
| | | * @param userId ç¨æ·ID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éå é¤ç¨æ·åè§è²å
³è |
| | | * |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * éè¿è§è²IDæ¥è¯¢è§è²ä½¿ç¨æ°é |
| | | * |
| | | * |
| | | * @param roleId è§è²ID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éæ°å¢ç¨æ·è§è²ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param userRoleList ç¨æ·è§è²å表 |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * å é¤ç¨æ·åè§è²å
³èä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param userRole ç¨æ·åè§è²å
³èä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éåæ¶ææç¨æ·è§è² |
| | | * |
| | | * |
| | | * @param roleId è§è²ID |
| | | * @param userIds éè¦å é¤çç¨æ·æ°æ®ID |
| | | * @return ç»æ |
| | |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.ruoyi.common.constant.Constants; |
| | |
| | | |
| | | /** |
| | | * èå ä¸å¡å±å¤ç |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @Service |
| | | public class SysMenuServiceImpl implements ISysMenuService |
| | | { |
| | | public class SysMenuServiceImpl implements ISysMenuService { |
| | | public static final String PREMISSION_STRING = "perms[\"{0}\"]"; |
| | | |
| | | @Autowired |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·æ¥è¯¢ç³»ç»èåå表 |
| | | * |
| | | * |
| | | * @param userId ç¨æ·ID |
| | | * @return èåå表 |
| | | */ |
| | | @Override |
| | | public List<SysMenu> selectMenuList(Long userId) |
| | | { |
| | | public List<SysMenu> selectMenuList(Long userId) { |
| | | return selectMenuList(new SysMenu(), userId); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ç³»ç»èåå表 |
| | | * |
| | | * |
| | | * @param menu èåä¿¡æ¯ |
| | | * @return èåå表 |
| | | */ |
| | | @Override |
| | | public List<SysMenu> selectMenuList(SysMenu menu, Long userId) |
| | | { |
| | | public List<SysMenu> selectMenuList(SysMenu menu, Long userId) { |
| | | List<SysMenu> menuList = null; |
| | | // 管çåæ¾ç¤ºææèåä¿¡æ¯ |
| | | if (SysUser.isAdmin(userId)) |
| | | { |
| | | if (SysUser.isAdmin(userId)) { |
| | | menuList = menuMapper.selectMenuList(menu); |
| | | } |
| | | else |
| | | { |
| | | menu.getParams().put("userId", userId); |
| | | } else { |
| | | menu.getParams().put("userId" , userId); |
| | | menuList = menuMapper.selectMenuListByUserId(menu); |
| | | } |
| | | return menuList; |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·IDæ¥è¯¢æé |
| | | * |
| | | * |
| | | * @param userId ç¨æ·ID |
| | | * @return æéå表 |
| | | */ |
| | | @Override |
| | | public Set<String> selectMenuPermsByUserId(Long userId) |
| | | { |
| | | public Set<String> selectMenuPermsByUserId(Long userId) { |
| | | List<String> perms = menuMapper.selectMenuPermsByUserId(userId); |
| | | Set<String> permsSet = new HashSet<>(); |
| | | for (String perm : perms) |
| | | { |
| | | if (StringUtils.isNotEmpty(perm)) |
| | | { |
| | | for (String perm : perms) { |
| | | if (StringUtils.isNotEmpty(perm)) { |
| | | permsSet.addAll(Arrays.asList(perm.trim().split(","))); |
| | | } |
| | | } |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®è§è²IDæ¥è¯¢æé |
| | | * |
| | | * |
| | | * @param roleId è§è²ID |
| | | * @return æéå表 |
| | | */ |
| | | @Override |
| | | public Set<String> selectMenuPermsByRoleId(Long roleId) |
| | | { |
| | | public Set<String> selectMenuPermsByRoleId(Long roleId) { |
| | | List<String> perms = menuMapper.selectMenuPermsByRoleId(roleId); |
| | | Set<String> permsSet = new HashSet<>(); |
| | | for (String perm : perms) |
| | | { |
| | | if (StringUtils.isNotEmpty(perm)) |
| | | { |
| | | for (String perm : perms) { |
| | | if (StringUtils.isNotEmpty(perm)) { |
| | | permsSet.addAll(Arrays.asList(perm.trim().split(","))); |
| | | } |
| | | } |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·IDæ¥è¯¢èå |
| | | * |
| | | * |
| | | * @param userId ç¨æ·åç§° |
| | | * @return èåå表 |
| | | */ |
| | | @Override |
| | | public List<SysMenu> selectMenuTreeByUserId(Long userId) |
| | | { |
| | | public List<SysMenu> selectMenuTreeByUserId(Long userId) { |
| | | List<SysMenu> menus = null; |
| | | if (SecurityUtils.isAdmin(userId)) |
| | | { |
| | | if (SecurityUtils.isAdmin(userId)) { |
| | | menus = menuMapper.selectMenuTreeAll(); |
| | | } |
| | | else |
| | | { |
| | | } else { |
| | | menus = menuMapper.selectMenuTreeByUserId(userId); |
| | | } |
| | | return getChildPerms(menus, 0); |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®è§è²IDæ¥è¯¢èåæ ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param roleId è§è²ID |
| | | * @return éä¸èåå表 |
| | | */ |
| | | @Override |
| | | public List<Long> selectMenuListByRoleId(Long roleId) |
| | | { |
| | | public List<Long> selectMenuListByRoleId(Long roleId) { |
| | | SysRole role = roleMapper.selectRoleById(roleId); |
| | | return menuMapper.selectMenuListByRoleId(roleId, role.isMenuCheckStrictly()); |
| | | } |
| | | |
| | | /** |
| | | * æå»ºåç«¯è·¯ç±æéè¦çèå |
| | | * |
| | | * |
| | | * @param menus èåå表 |
| | | * @return è·¯ç±å表 |
| | | */ |
| | | @Override |
| | | public List<RouterVo> buildMenus(List<SysMenu> menus) |
| | | { |
| | | public List<RouterVo> buildMenus(List<SysMenu> menus) { |
| | | List<RouterVo> routers = new LinkedList<RouterVo>(); |
| | | for (SysMenu menu : menus) |
| | | { |
| | | for (SysMenu menu : menus) { |
| | | RouterVo router = new RouterVo(); |
| | | router.setHidden("1".equals(menu.getVisible())); |
| | | router.setName(getRouteName(menu)); |
| | | router.setPath(getRouterPath(menu)); |
| | | router.setComponent(getComponent(menu)); |
| | | router.setQuery(menu.getQuery()); |
| | | router.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), StringUtils.equals("1", menu.getIsCache()), menu.getPath())); |
| | | router.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), StringUtils.equals("1" , menu.getIsCache()), menu.getPath())); |
| | | List<SysMenu> cMenus = menu.getChildren(); |
| | | if (!cMenus.isEmpty() && cMenus.size() > 0 && UserConstants.TYPE_DIR.equals(menu.getMenuType())) |
| | | { |
| | | if (!cMenus.isEmpty() && cMenus.size() > 0 && UserConstants.TYPE_DIR.equals(menu.getMenuType())) { |
| | | router.setAlwaysShow(true); |
| | | router.setRedirect("noRedirect"); |
| | | router.setChildren(buildMenus(cMenus)); |
| | | } |
| | | else if (isMenuFrame(menu)) |
| | | { |
| | | } else if (isMenuFrame(menu)) { |
| | | router.setMeta(null); |
| | | List<RouterVo> childrenList = new ArrayList<RouterVo>(); |
| | | RouterVo children = new RouterVo(); |
| | | children.setPath(menu.getPath()); |
| | | children.setComponent(menu.getComponent()); |
| | | children.setName(StringUtils.capitalize(menu.getPath())); |
| | | children.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), StringUtils.equals("1", menu.getIsCache()), menu.getPath())); |
| | | children.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), StringUtils.equals("1" , menu.getIsCache()), menu.getPath())); |
| | | children.setQuery(menu.getQuery()); |
| | | childrenList.add(children); |
| | | router.setChildren(childrenList); |
| | | } |
| | | else if (menu.getParentId().intValue() == 0 && isInnerLink(menu)) |
| | | { |
| | | } else if (menu.getParentId().intValue() == 0 && isInnerLink(menu)) { |
| | | router.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon())); |
| | | router.setPath("/"); |
| | | List<RouterVo> childrenList = new ArrayList<RouterVo>(); |
| | |
| | | } |
| | | routers.add(router); |
| | | } |
| | | for (RouterVo routerVo : routers) { |
| | | List<String> childName = new ArrayList<>(); |
| | | List<RouterVo> childrens = routerVo.getChildren(); |
| | | if (CollectionUtils.isNotEmpty(childrens)) { |
| | | for (RouterVo routerVo1 : childrens) { |
| | | if (!routerVo1.getHidden()) { |
| | | childName.add(routerVo1.getMeta().getTitle()); |
| | | } |
| | | } |
| | | } |
| | | routerVo.setChildName(childName); |
| | | } |
| | | return routers; |
| | | } |
| | | |
| | | /** |
| | | * æå»ºå端æéè¦æ ç»æ |
| | | * |
| | | * |
| | | * @param menus èåå表 |
| | | * @return æ ç»æå表 |
| | | */ |
| | | @Override |
| | | public List<SysMenu> buildMenuTree(List<SysMenu> menus) |
| | | { |
| | | public List<SysMenu> buildMenuTree(List<SysMenu> menus) { |
| | | List<SysMenu> returnList = new ArrayList<SysMenu>(); |
| | | List<Long> tempList = menus.stream().map(SysMenu::getMenuId).collect(Collectors.toList()); |
| | | for (Iterator<SysMenu> iterator = menus.iterator(); iterator.hasNext();) |
| | | { |
| | | for (Iterator<SysMenu> iterator = menus.iterator(); iterator.hasNext(); ) { |
| | | SysMenu menu = (SysMenu) iterator.next(); |
| | | // 妿æ¯é¡¶çº§èç¹, éå该ç¶èç¹çææåèç¹ |
| | | if (!tempList.contains(menu.getParentId())) |
| | | { |
| | | if (!tempList.contains(menu.getParentId())) { |
| | | recursionFn(menus, menu); |
| | | returnList.add(menu); |
| | | } |
| | | } |
| | | if (returnList.isEmpty()) |
| | | { |
| | | if (returnList.isEmpty()) { |
| | | returnList = menus; |
| | | } |
| | | return returnList; |
| | |
| | | |
| | | /** |
| | | * æå»ºå端æéè¦ä¸ææ ç»æ |
| | | * |
| | | * |
| | | * @param menus èåå表 |
| | | * @return 䏿æ ç»æå表 |
| | | */ |
| | | @Override |
| | | public List<TreeSelect> buildMenuTreeSelect(List<SysMenu> menus) |
| | | { |
| | | public List<TreeSelect> buildMenuTreeSelect(List<SysMenu> menus) { |
| | | List<SysMenu> menuTrees = buildMenuTree(menus); |
| | | return menuTrees.stream().map(TreeSelect::new).collect(Collectors.toList()); |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®èåIDæ¥è¯¢ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param menuId èåID |
| | | * @return èåä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | public SysMenu selectMenuById(Long menuId) |
| | | { |
| | | public SysMenu selectMenuById(Long menuId) { |
| | | return menuMapper.selectMenuById(menuId); |
| | | } |
| | | |
| | | /** |
| | | * æ¯å¦åå¨èååèç¹ |
| | | * |
| | | * |
| | | * @param menuId èåID |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public boolean hasChildByMenuId(Long menuId) |
| | | { |
| | | public boolean hasChildByMenuId(Long menuId) { |
| | | int result = menuMapper.hasChildByMenuId(menuId); |
| | | return result > 0; |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢èåä½¿ç¨æ°é |
| | | * |
| | | * |
| | | * @param menuId èåID |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public boolean checkMenuExistRole(Long menuId) |
| | | { |
| | | public boolean checkMenuExistRole(Long menuId) { |
| | | int result = roleMenuMapper.checkMenuExistRole(menuId); |
| | | return result > 0; |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ä¿åèåä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param menu èåä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertMenu(SysMenu menu) |
| | | { |
| | | public int insertMenu(SysMenu menu) { |
| | | return menuMapper.insertMenu(menu); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ä¿åèåä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param menu èåä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateMenu(SysMenu menu) |
| | | { |
| | | public int updateMenu(SysMenu menu) { |
| | | return menuMapper.updateMenu(menu); |
| | | } |
| | | |
| | | /** |
| | | * å é¤èå管çä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param menuId èåID |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteMenuById(Long menuId) |
| | | { |
| | | public int deleteMenuById(Long menuId) { |
| | | return menuMapper.deleteMenuById(menuId); |
| | | } |
| | | |
| | | /** |
| | | * æ ¡éªèååç§°æ¯å¦å¯ä¸ |
| | | * |
| | | * |
| | | * @param menu èåä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public String checkMenuNameUnique(SysMenu menu) |
| | | { |
| | | public String checkMenuNameUnique(SysMenu menu) { |
| | | Long menuId = StringUtils.isNull(menu.getMenuId()) ? -1L : menu.getMenuId(); |
| | | SysMenu info = menuMapper.checkMenuNameUnique(menu.getMenuName(), menu.getParentId()); |
| | | if (StringUtils.isNotNull(info) && info.getMenuId().longValue() != menuId.longValue()) |
| | | { |
| | | if (StringUtils.isNotNull(info) && info.getMenuId().longValue() != menuId.longValue()) { |
| | | return UserConstants.NOT_UNIQUE; |
| | | } |
| | | return UserConstants.UNIQUE; |
| | |
| | | |
| | | /** |
| | | * è·åè·¯ç±åç§° |
| | | * |
| | | * |
| | | * @param menu èåä¿¡æ¯ |
| | | * @return è·¯ç±åç§° |
| | | */ |
| | | public String getRouteName(SysMenu menu) |
| | | { |
| | | public String getRouteName(SysMenu menu) { |
| | | String routerName = StringUtils.capitalize(menu.getPath()); |
| | | // éå¤é¾å¹¶ä¸æ¯ä¸çº§ç®å½ï¼ç±»å为ç®å½ï¼ |
| | | if (isMenuFrame(menu)) |
| | | { |
| | | if (isMenuFrame(menu)) { |
| | | routerName = StringUtils.EMPTY; |
| | | } |
| | | return routerName; |
| | |
| | | |
| | | /** |
| | | * è·åè·¯ç±å°å |
| | | * |
| | | * |
| | | * @param menu èåä¿¡æ¯ |
| | | * @return è·¯ç±å°å |
| | | */ |
| | | public String getRouterPath(SysMenu menu) |
| | | { |
| | | public String getRouterPath(SysMenu menu) { |
| | | String routerPath = menu.getPath(); |
| | | // å
龿å¼å¤ç½æ¹å¼ |
| | | if (menu.getParentId().intValue() != 0 && isInnerLink(menu)) |
| | | { |
| | | if (menu.getParentId().intValue() != 0 && isInnerLink(menu)) { |
| | | routerPath = innerLinkReplaceEach(routerPath); |
| | | } |
| | | // éå¤é¾å¹¶ä¸æ¯ä¸çº§ç®å½ï¼ç±»å为ç®å½ï¼ |
| | | if (0 == menu.getParentId().intValue() && UserConstants.TYPE_DIR.equals(menu.getMenuType()) |
| | | && UserConstants.NO_FRAME.equals(menu.getIsFrame())) |
| | | { |
| | | if (0 == menu.getParentId().intValue() && UserConstants.TYPE_DIR.equals(menu.getMenuType()) && UserConstants.NO_FRAME.equals(menu.getIsFrame())) { |
| | | routerPath = "/" + menu.getPath(); |
| | | } |
| | | // éå¤é¾å¹¶ä¸æ¯ä¸çº§ç®å½ï¼ç±»å为èåï¼ |
| | | else if (isMenuFrame(menu)) |
| | | { |
| | | else if (isMenuFrame(menu)) { |
| | | routerPath = "/"; |
| | | } |
| | | return routerPath; |
| | |
| | | |
| | | /** |
| | | * è·åç»ä»¶ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param menu èåä¿¡æ¯ |
| | | * @return ç»ä»¶ä¿¡æ¯ |
| | | */ |
| | | public String getComponent(SysMenu menu) |
| | | { |
| | | public String getComponent(SysMenu menu) { |
| | | String component = UserConstants.LAYOUT; |
| | | if (StringUtils.isNotEmpty(menu.getComponent()) && !isMenuFrame(menu)) |
| | | { |
| | | if (StringUtils.isNotEmpty(menu.getComponent()) && !isMenuFrame(menu)) { |
| | | component = menu.getComponent(); |
| | | } |
| | | else if (StringUtils.isEmpty(menu.getComponent()) && menu.getParentId().intValue() != 0 && isInnerLink(menu)) |
| | | { |
| | | } else if (StringUtils.isEmpty(menu.getComponent()) && menu.getParentId().intValue() != 0 && isInnerLink(menu)) { |
| | | component = UserConstants.INNER_LINK; |
| | | } |
| | | else if (StringUtils.isEmpty(menu.getComponent()) && isParentView(menu)) |
| | | { |
| | | } else if (StringUtils.isEmpty(menu.getComponent()) && isParentView(menu)) { |
| | | component = UserConstants.PARENT_VIEW; |
| | | } |
| | | return component; |
| | |
| | | |
| | | /** |
| | | * æ¯å¦ä¸ºèåå
é¨è·³è½¬ |
| | | * |
| | | * |
| | | * @param menu èåä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public boolean isMenuFrame(SysMenu menu) |
| | | { |
| | | return menu.getParentId().intValue() == 0 && UserConstants.TYPE_MENU.equals(menu.getMenuType()) |
| | | && menu.getIsFrame().equals(UserConstants.NO_FRAME); |
| | | public boolean isMenuFrame(SysMenu menu) { |
| | | return menu.getParentId().intValue() == 0 && UserConstants.TYPE_MENU.equals(menu.getMenuType()) && menu.getIsFrame().equals(UserConstants.NO_FRAME); |
| | | } |
| | | |
| | | /** |
| | | * æ¯å¦ä¸ºå
é¾ç»ä»¶ |
| | | * |
| | | * |
| | | * @param menu èåä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public boolean isInnerLink(SysMenu menu) |
| | | { |
| | | public boolean isInnerLink(SysMenu menu) { |
| | | return menu.getIsFrame().equals(UserConstants.NO_FRAME) && StringUtils.ishttp(menu.getPath()); |
| | | } |
| | | |
| | | /** |
| | | * æ¯å¦ä¸ºparent_viewç»ä»¶ |
| | | * |
| | | * |
| | | * @param menu èåä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public boolean isParentView(SysMenu menu) |
| | | { |
| | | public boolean isParentView(SysMenu menu) { |
| | | return menu.getParentId().intValue() != 0 && UserConstants.TYPE_DIR.equals(menu.getMenuType()); |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®ç¶èç¹çIDè·åææåèç¹ |
| | | * |
| | | * @param list å类表 |
| | | * |
| | | * @param list å类表 |
| | | * @param parentId ä¼ å
¥çç¶èç¹ID |
| | | * @return String |
| | | */ |
| | | public List<SysMenu> getChildPerms(List<SysMenu> list, int parentId) |
| | | { |
| | | public List<SysMenu> getChildPerms(List<SysMenu> list, int parentId) { |
| | | List<SysMenu> returnList = new ArrayList<SysMenu>(); |
| | | for (Iterator<SysMenu> iterator = list.iterator(); iterator.hasNext();) |
| | | { |
| | | for (Iterator<SysMenu> iterator = list.iterator(); iterator.hasNext(); ) { |
| | | SysMenu t = (SysMenu) iterator.next(); |
| | | // ä¸ãæ ¹æ®ä¼ å
¥çæä¸ªç¶èç¹ID,éå该ç¶èç¹çææåèç¹ |
| | | if (t.getParentId() == parentId) |
| | | { |
| | | if (t.getParentId() == parentId) { |
| | | recursionFn(list, t); |
| | | returnList.add(t); |
| | | } |
| | |
| | | |
| | | /** |
| | | * éå½å表 |
| | | * |
| | | * |
| | | * @param list å类表 |
| | | * @param t åèç¹ |
| | | * @param t åèç¹ |
| | | */ |
| | | private void recursionFn(List<SysMenu> list, SysMenu t) |
| | | { |
| | | private void recursionFn(List<SysMenu> list, SysMenu t) { |
| | | // å¾å°åèç¹å表 |
| | | List<SysMenu> childList = getChildList(list, t); |
| | | t.setChildren(childList); |
| | | for (SysMenu tChild : childList) |
| | | { |
| | | if (hasChild(list, tChild)) |
| | | { |
| | | for (SysMenu tChild : childList) { |
| | | if (hasChild(list, tChild)) { |
| | | recursionFn(list, tChild); |
| | | } |
| | | } |
| | |
| | | /** |
| | | * å¾å°åèç¹å表 |
| | | */ |
| | | private List<SysMenu> getChildList(List<SysMenu> list, SysMenu t) |
| | | { |
| | | private List<SysMenu> getChildList(List<SysMenu> list, SysMenu t) { |
| | | List<SysMenu> tlist = new ArrayList<SysMenu>(); |
| | | Iterator<SysMenu> it = list.iterator(); |
| | | while (it.hasNext()) |
| | | { |
| | | while (it.hasNext()) { |
| | | SysMenu n = (SysMenu) it.next(); |
| | | if (n.getParentId().longValue() == t.getMenuId().longValue()) |
| | | { |
| | | if (n.getParentId().longValue() == t.getMenuId().longValue()) { |
| | | tlist.add(n); |
| | | } |
| | | } |
| | |
| | | /** |
| | | * 夿æ¯å¦æåèç¹ |
| | | */ |
| | | private boolean hasChild(List<SysMenu> list, SysMenu t) |
| | | { |
| | | private boolean hasChild(List<SysMenu> list, SysMenu t) { |
| | | return getChildList(list, t).size() > 0; |
| | | } |
| | | |
| | | /** |
| | | * å
é¾ååç¹æ®åç¬¦æ¿æ¢ |
| | | * |
| | | * |
| | | * @return æ¿æ¢åçå
é¾åå |
| | | */ |
| | | public String innerLinkReplaceEach(String path) |
| | | { |
| | | return StringUtils.replaceEach(path, new String[] { Constants.HTTP, Constants.HTTPS, Constants.WWW, "." }, |
| | | new String[] { "", "", "", "/" }); |
| | | public String innerLinkReplaceEach(String path) { |
| | | return StringUtils.replaceEach(path, new String[]{Constants.HTTP, Constants.HTTPS, Constants.WWW, "."}, new String[]{"" , "" , "" , "/"}); |
| | | } |
| | | } |
| | |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-amqp</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.apache.axis</groupId> |
| | | <artifactId>axis</artifactId> |
| | | <version>1.4</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.apache.axis</groupId> |
| | | <artifactId>axis-jaxrpc</artifactId> |
| | | <version>1.4</version> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | |
| | | </project> |
| | | </project> |
| | |
| | | package com.smartor.common; |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.aliyun.dysmsapi20170525.models.SendSmsResponseBody; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.ruoyi.common.utils.http.HttpUtils; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.mapper.PatWildcardMapper; |
| | | import com.smartor.service.DingTalkService; |
| | | import com.smartor.service.ISmsParamService; |
| | | import com.smartor.service.WeChatService; |
| | | import com.smartor.service.impl.BaseSmsaccountServiceImpl; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | @Autowired |
| | | private WeChatService weChatService; |
| | | |
| | | @Autowired |
| | | ISmsParamService iSmsParamService; |
| | | |
| | | public Boolean sendMsg(SendMagParam sendMagParam) { |
| | | // 1,å¤åªä½ 2,纸质 3,çµè¯ 4,çä¿¡ 5.微信å
¬ä¼å· 6.微信å°ç¨åº 7.æ¯ä»å® 8.æºè½å°ç¨åº 9.éé |
| | | switch (sendMagParam.getType()) { |
| | |
| | | case ("3"): |
| | | |
| | | case ("4"): |
| | | // BaseSmsRequest baseSmsRequest = new BaseSmsRequest(); |
| | | // baseSmsRequest.setPhoneNumber(sendMagParam.getPhone()); |
| | | // baseSmsRequest.setTemplateCode("SMS_461860582"); |
| | | // SendSmsResponseBody sendSmsResponseBody = baseSmsaccountService.sendMsg(baseSmsRequest); |
| | | |
| | | //ä¸é¢ççä¿¡åéï¼ä»
æµè¯ |
| | | BaseSmsRequest baseSmsRequest = new BaseSmsRequest(); |
| | | baseSmsRequest.setPhoneNumber("19157806063"); |
| | | baseSmsRequest.setTemplateCode("SMS_279456451"); |
| | | baseSmsRequest.setTemplateParam("{'code':'58965'}"); |
| | | SendSmsResponseBody sendSmsResponseBody = baseSmsaccountService.sendMsg(baseSmsRequest); |
| | | log.error(sendSmsResponseBody.message); |
| | | if (sendSmsResponseBody.getCode().equals("OK")) { |
| | | //çä¿¡ |
| | | int i = iSmsParamService.sendSmsInfo(sendMagParam.getUrl(), sendMagParam.getPhone()); |
| | | if (i == 1) { |
| | | return true; |
| | | } |
| | | |
| | | return false; |
| | | case ("5"): |
| | | //å
¬ä¼å· |
| | | // String params = "service=smarthos.yygh.ApiService.push&idcard=" + sendMagParam.getIdcard() + "&url=" + sendMagParam.getUrl() + "&keyword1=null&keyword2=null&keyword3=null&keyword4=null"; |
| | | // String result = HttpUtils.sendPost("/api", params); |
| | | // JSONObject jsonObject = JSONObject.parseObject(result); |
| | | // String code = (String) jsonObject.get("code"); |
| | | // if (!code.equals(0)) { |
| | | // log.error("微信å
¬ä¼å·æ¶æ¯åé失败äºï¼{}", sendMagParam); |
| | | // return false; |
| | | // } |
| | | // return true; |
| | | |
| | | WeChatSendVo weChatSendVo = new WeChatSendVo(); |
| | | weChatSendVo.setUrl(sendMagParam.getUrl()); |
| | | weChatSendVo.setTemplateId(sendMagParam.getTmpCode()); |
| | |
| | | private String revisitAfter; |
| | | |
| | | /** |
| | | * åºé¢å¤©æ°ï¼é¿æä»»å¡ï¼åºå®é¢åï¼ç¬¬å 天åéä¿¡æ¯ï¼ |
| | | */ |
| | | @ApiModelProperty(value = "åºé¢å¤©æ°ï¼é¿æä»»å¡ï¼åºå®é¢åï¼ç¬¬å 天åéä¿¡æ¯ï¼") |
| | | private Integer sendDay; |
| | | |
| | | /** |
| | | * æ¯å¦æ¯é¿ææ¨¡æ¿ï¼ 0ï¼ä¸æ¯ 1ï¼æ¯ |
| | | */ |
| | | @ApiModelProperty(value = "æ¯å¦æ¯é¿ææ¨¡æ¿ï¼ 0ï¼ä¸æ¯ 1ï¼æ¯") |
| | | private Integer longTemp; |
| | | |
| | | /** |
| | | * pageNum |
| | | */ |
| | | @ApiModelProperty(value = "pageNum") |
| | |
| | | * æ¯å¦æ¯ç¨æ·éæ©çé项 |
| | | */ |
| | | @ApiModelProperty(value = "æ¯å¦æ¯ç¨æ·éæ©çé项") |
| | | private Boolean isUserOperation = false; |
| | | private Integer isUserOperation = 0; |
| | | |
| | | /** |
| | | * ä¸ä¸é¢ |
| | |
| | | * ç¬¬ä¸æ¬¡é®é¢ç¼å· |
| | | */ |
| | | @Excel(name = "ç¬¬ä¸æ¬¡é®é¢ç¼å·") |
| | | @ApiModelProperty(value = "ç¬¬ä¸æ¬¡é®é¢ç¼å·") |
| | | @ApiModelProperty(value = "ç¬¬ä¸æ¬¡é®é¢ç¼å·(åºå·)") |
| | | private Long firstQuestionNum; |
| | | |
| | | /** |
| | |
| | | private Long mateNum; |
| | | |
| | | /** |
| | | * é访å |
| | | * é访å,å¼åºç½ |
| | | */ |
| | | @Excel(name = "é访å") |
| | | @ApiModelProperty(value = "é访å") |
| | |
| | | @ApiModelProperty(value = "æå¯¼è¯") |
| | | private String instruction; |
| | | |
| | | |
| | | /** |
| | | * åºé¢å¤©æ°ï¼é¿æä»»å¡ï¼åºå®é¢åï¼ç¬¬å 天åéä¿¡æ¯ï¼ |
| | | */ |
| | | @ApiModelProperty(value = "åºé¢å¤©æ°ï¼é¿æä»»å¡ï¼åºå®é¢åï¼ç¬¬å 天åéä¿¡æ¯ï¼") |
| | | private Integer sendDay; |
| | | |
| | | |
| | | } |
| | |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * éè®¿ä»»å¡æ¨¡çé®é¢è¯æ¯åºå¯¹è±¡ ivr_task_template_script |
| | |
| | | * @date 2024-05-13 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "IvrTaskTemplateScript", description = "éè®¿ä»»å¡æ¨¡çé®é¢è¯æ¯åºå¯¹è±¡") |
| | | @ApiModel(value = "IvrTaskTemplateScript" , description = "éè®¿ä»»å¡æ¨¡çé®é¢è¯æ¯åºå¯¹è±¡") |
| | | public class IvrTaskTemplateScript extends BaseEntity { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | |
| | | @Excel(name = "é®é¢ç¹") |
| | | @ApiModelProperty(value = "é®é¢ç¹") |
| | | private String questionPoint; |
| | | |
| | | /** |
| | | * è¯æ¯å
容 |
| | | */ |
| | | @Excel(name = "è¯æ¯å
容") |
| | | @ApiModelProperty(value = "è¯æ¯å
容") |
| | | private String scriptContent; |
| | | |
| | | /** |
| | | * æ å¹é
è¯æ¯ |
| | |
| | | /** |
| | | * å¼ç±»åï¼1 é项 2 ææ¬ 3 æ°å¼ï¼ |
| | | */ |
| | | @Excel(name = "å¼ç±»å", readConverterExp = "å¼ç±»åï¼1 é项 2 ææ¬ 3 æ°å¼ï¼") |
| | | @Excel(name = "å¼ç±»å" , readConverterExp = "å¼ç±»åï¼1 é项 2 ææ¬ 3 æ°å¼ï¼") |
| | | @ApiModelProperty(value = "主é®") |
| | | private Long valueType; |
| | | |
| | |
| | | * ä¸ä¼ æ¶é´ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = " ä¸ä¼ æ¶é´ ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | @Excel(name = " ä¸ä¼ æ¶é´ " , width = 30, dateFormat = "yyyy-MM-dd") |
| | | @ApiModelProperty(value = "ä¸ä¼ æ¶é´") |
| | | private Date uploadTime; |
| | | |
| | |
| | | /** |
| | | * å
¶å®æ°æ®ï¼åå¨åéï¼ |
| | | */ |
| | | @Excel(name = "å
¶å®æ°æ®", readConverterExp = "å=å¨åé") |
| | | @Excel(name = "å
¶å®æ°æ®" , readConverterExp = "å=å¨åé") |
| | | @ApiModelProperty(value = "å
¶å®æ°æ®ï¼åå¨åéï¼") |
| | | private String otherdata; |
| | | |
| | | /** |
| | | * æ¯å¦å¿
å¡«,1:å¿
å¡« 2ï¼å¯ä»¥ä¸å¡« ï¼ç»äººå·¥ç¨çï¼AIä¸ç¨éµå®ï¼ |
| | | */ |
| | | @Excel(name = "æ¯å¦å¿
å¡«,1:å¿
å¡« 2ï¼å¯ä»¥ä¸å¡« ", readConverterExp = "ç»=人工ç¨çï¼AIä¸ç¨éµå®") |
| | | @Excel(name = "æ¯å¦å¿
å¡«,1:å¿
å¡« 2ï¼å¯ä»¥ä¸å¡« " , readConverterExp = "ç»=人工ç¨çï¼AIä¸ç¨éµå®") |
| | | @ApiModelProperty(value = "æ¯å¦å¿
å¡«,1:å¿
å¡« 2ï¼å¯ä»¥ä¸å¡« ï¼ç»äººå·¥ç¨çï¼AIä¸ç¨éµå®ï¼") |
| | | private String isMust; |
| | | |
| | | /** |
| | | * é®é¢ç»æï¼ç»âå¼ç±»åâæ¯ææ¬æè
æ°å¼ç¨çï¼ |
| | | */ |
| | | @Excel(name = "é®é¢ç»æ", readConverterExp = "ç»=âå¼ç±»åâæ¯ææ¬æè
æ°å¼ç¨ç") |
| | | @Excel(name = "é®é¢ç»æ" , readConverterExp = "ç»=âå¼ç±»åâæ¯ææ¬æè
æ°å¼ç¨ç") |
| | | @ApiModelProperty(value = "é®é¢ç»æï¼ç»âå¼ç±»åâæ¯ææ¬æè
æ°å¼ç¨çï¼") |
| | | private String questionResult; |
| | | |
| | |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å卿ä½ï¼1 æ°å¢ 2ä¿®æ¹ 3å é¤") |
| | | private Integer isoperation; |
| | | |
| | | /** |
| | | * åºå· |
| | | */ |
| | | @ApiModelProperty(value = "åºå·") |
| | | private Integer sort; |
| | | |
| | | |
| | | /** |
| | |
| | | @ApiModelProperty(value = "é项忝çä¸ä¸ä¸ªè¯æ¯ç¼å·") |
| | | private String branchNextscriptno; |
| | | |
| | | /** |
| | | * é项忝çä¸ä¸ä¸ªè¯æ¯ç¼å· |
| | | */ |
| | | @Excel(name = "é项忝çä¸ä¸ä¸ªè¯æ¯ç¼å·") |
| | | @ApiModelProperty(value = "é项忝çä¸ä¸ä¸ªè¯æ¯ç¼å·") |
| | | private Long nextScriptno; |
| | | |
| | | /** |
| | | * é®é¢é项 |
| | | */ |
| | | private List<IvrTaskTemplateTargetoption> ivrTaskTemplateTargetoptionList; |
| | | |
| | | } |
| | |
| | | private Integer isoperation; |
| | | |
| | | /** |
| | | * é项忝æ è¯(0:æ 忝1:æåæ¯) |
| | | */ |
| | | @Excel(name = "é项忝æ è¯(0:æ 忝1:æåæ¯)") |
| | | @ApiModelProperty(value = "é项忝æ è¯(0:æ 忝1:æåæ¯)") |
| | | private String branchFlag; |
| | | |
| | | /** |
| | | * åºå· |
| | | */ |
| | | @ApiModelProperty(value = "åºå·") |
| | | private Integer sort; |
| | | |
| | | /** |
| | | * è¯æ¯é项 |
| | | */ |
| | | @ApiModelProperty(value = "è¯æ¯é项") |
| | |
| | | * @date 2024-05-13 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "IvrTaskTemplateTargetoption", description = "éè®¿ä»»å¡æ¨¡æ¿ææ é项åºå¯¹è±¡") |
| | | @ApiModel(value = "IvrTaskTemplateTargetoption" , description = "éè®¿ä»»å¡æ¨¡æ¿ææ é项åºå¯¹è±¡") |
| | | public class IvrTaskTemplateTargetoption extends BaseEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | * ä¸ä¼ æ¶é´ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = " ä¸ä¼ æ¶é´ ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | @Excel(name = " ä¸ä¼ æ¶é´ " , width = 30, dateFormat = "yyyy-MM-dd") |
| | | @ApiModelProperty(value = "ä¸ä¼ æ¶é´") |
| | | private Date uploadTime; |
| | | |
| | |
| | | |
| | | @ApiModelProperty(value = "æ£åå
³é®å(ä¸å«)") |
| | | @Excel(name = "æ£åå
³é®å(ä¸å«)") |
| | | private List<String> dynamiccruxs= new ArrayList<>(); |
| | | private List<String> dynamiccruxs = new ArrayList<>(); |
| | | |
| | | /** |
| | | * ä¸ä¸é¢ |
| | |
| | | * æ¯å¦æ¯ç¨æ·éæ©çé项 |
| | | */ |
| | | @ApiModelProperty(value = "æ¯å¦æ¯ç¨æ·éæ©çé项") |
| | | private Boolean isUserOperation = false; |
| | | private Integer isUserOperation; |
| | | |
| | | /** |
| | | * é项ç»å· |
| | |
| | | * @author smartor |
| | | * @date 2023-03-04 |
| | | */ |
| | | @ApiModel(value = "PatArchiveVO", description = "æ£è
æ¡£æ¡å¯¹è±¡") |
| | | @ApiModel(value = "PatArchiveVO" , description = "æ£è
æ¡£æ¡å¯¹è±¡") |
| | | @Data |
| | | public class PatArchiveVO extends BaseEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * èªå¢ID |
| | | */ |
| | | @ApiModelProperty(value = "èªå¢ID") |
| | | @ApiModelProperty("èªå¢ID") |
| | | private Long id; |
| | | |
| | | /** |
| | |
| | | private Long sex; |
| | | |
| | | /** |
| | | * è¯ä»¶ç±»å |
| | | */ |
| | | @ApiModelProperty("è¯ä»¶ç±»å") |
| | | @Excel(name = " è¯ä»¶ç±»å ") |
| | | private String idcardtype; |
| | | |
| | | |
| | | /** |
| | | * è¯ä»¶å·ç |
| | | */ |
| | | @ApiModelProperty("è¯ä»¶å·ç ") |
| | | @Excel(name = " è¯ä»¶å·ç ") |
| | | private String idcardno; |
| | | |
| | | /** |
| | | * çæ¥ |
| | | */ |
| | | @ApiModelProperty("çæ¥") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = " çæ¥ ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private Date birthdate; |
| | | |
| | | /** |
| | | * å¹´é¾ |
| | | */ |
| | | @ApiModelProperty("å¹´é¾") |
| | | @Excel(name = " å¹´é¾ ") |
| | | private Long age; |
| | | @ApiModelProperty("ç±è´¯") |
| | | @Excel(name = " ç±è´¯ ") |
| | | private String nativePlace; |
| | | |
| | | |
| | | /** |
| | |
| | | @Excel(name = " åºçå° ") |
| | | private String birthplace; |
| | | |
| | | |
| | | /** |
| | | * è¯ä»¶å·ç |
| | | */ |
| | | @ApiModelProperty("è¯ä»¶å·ç ") |
| | | @Excel(name = " è¯ä»¶å·ç ") |
| | | private String idcardno; |
| | | |
| | | /** |
| | | * çæ¥ |
| | | */ |
| | | @ApiModelProperty("çæ¥") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = " çæ¥ " , width = 30, dateFormat = "yyyy-MM-dd") |
| | | private Date birthdate; |
| | | |
| | | /** |
| | | * å
¥é¢æ¶é´ |
| | | */ |
| | | @ApiModelProperty("å
¥é¢æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = " çæ¥ " , width = 30, dateFormat = "yyyy-MM-dd") |
| | | private Date inhosptime; |
| | | |
| | | /** |
| | | * å¹´é¾ |
| | | */ |
| | | @ApiModelProperty("å¹´é¾") |
| | | @Excel(name = " å¹´é¾ ") |
| | | private Long age; |
| | | |
| | | /** |
| | | * æ¥æº |
| | | */ |
| | |
| | | @Excel(name = " æ¥æº ") |
| | | private Long sourcefrom; |
| | | |
| | | /** |
| | | * 建档æ¶é´ |
| | | */ |
| | | /** |
| | | * 建档æ¶é´ |
| | | */ |
| | |
| | | * 建档人 |
| | | */ |
| | | @ApiModelProperty("建档人") |
| | | @Excel(name = " 建档人 ") |
| | | private String archiveby; |
| | | |
| | | /** |
| | |
| | | @Excel(name = " ææºå·ç ") |
| | | private String telcode; |
| | | |
| | | |
| | | /** |
| | | * 亲å±å·ç |
| | | */ |
| | | @ApiModelProperty("亲å±å·ç ") |
| | | @Excel(name = " 亲å±å·ç ") |
| | | private String relativetelcode; |
| | | |
| | | /** |
| | | * è¯ä»¶ç±»å |
| | | * æ°æ |
| | | */ |
| | | @ApiModelProperty("è¯ä»¶ç±»å") |
| | | private String idcardtype; |
| | | @ApiModelProperty("æ°æ") |
| | | @Excel(name = " æ°æ ") |
| | | private String nation; |
| | | |
| | | /** |
| | | * æºæID |
| | |
| | | * 微信openid |
| | | */ |
| | | @ApiModelProperty("微信openid") |
| | | @Excel(name = " 微信openid ") |
| | | private String openid; |
| | | |
| | | /** |
| | |
| | | * æ ç¾ |
| | | */ |
| | | @ApiModelProperty("æ ç¾") |
| | | @Excel(name = " æ ç¾ " , cellType = Excel.ColumnType.STRING) |
| | | private String tag; |
| | | |
| | | /** |
| | | * æ ç¾ |
| | | */ |
| | | @ApiModelProperty("æ ç¾id") |
| | | @Excel(name = " æ ç¾id " , cellType = Excel.ColumnType.STRING) |
| | | private Long tagid; |
| | | |
| | | @ApiModelProperty("æ ç¾éå") |
| | | List<PatArchivetag> tagList = new ArrayList<>(); |
| | | private List<PatArchivetag> tagList; |
| | | |
| | | /** |
| | | * æ ç¾ |
| | | */ |
| | | @ApiModelProperty("æ£è
ç±»å") |
| | | @Excel(name = " æ£è
ç±»å " , cellType = Excel.ColumnType.STRING) |
| | | private String pattype; |
| | | |
| | | /** |
| | | * ééå· |
| | | */ |
| | | @ApiModelProperty("ééå·") |
| | | @Excel(name = " ééå· ") |
| | | private String dduserid; |
| | | |
| | | /** |
| | | * ééå· |
| | | */ |
| | | @ApiModelProperty("ç§å®¤") |
| | | @Excel(name = " ç§å®¤ ") |
| | | private String dept; |
| | | |
| | | |
| | | /** |
| | | * ééå· |
| | | */ |
| | | @ApiModelProperty("ç§å®¤") |
| | | @Excel(name = " ç§å®¤ ") |
| | | private String bedNo; |
| | | |
| | | /** |
| | | * ä¼å屿§:0éä¼åï¼1ä¸è¬ä¼åã2éè¦ä¼å |
| | | */ |
| | | @ApiModelProperty("ä¼å屿§:0éä¼åï¼1ä¸è¬ä¼åã2éè¦ä¼å") |
| | | @Excel(name = " ä¼å屿§:0éä¼åï¼1ä¸è¬ä¼åã2éè¦ä¼å ") |
| | | private String viptype; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å卿ä½ï¼1 æ°å¢ 2ä¿®æ¹ 3å é¤") |
| | | private Integer isoperation; |
| | |
| | | @ApiModelProperty(value = "æ£è
ç¼å·") |
| | | private String patno; |
| | | |
| | | /** |
| | | * ä½é¢æ è¯ï¼ 0ï¼å¨é¢ 1ï¼åºé¢ 2ï¼è½¬ç§ |
| | | */ |
| | | @ApiModelProperty(value = "ä½é¢æ è¯ï¼ 0ï¼å¨é¢ 1ï¼åºé¢ 2ï¼è½¬ç§") |
| | | private String inhospstate; |
| | | |
| | | /** |
| | | * é¿æä»»å¡ï¼æ¯å¦å¤çï¼0æªå¤ç 1å¤ç |
| | | */ |
| | | @ApiModelProperty(value = "é¿æä»»å¡ï¼æ¯å¦å¤çï¼0æªå¤ç 1å¤ç") |
| | | private String checkFlag; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.domain; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * çµè¯ASRåè°(é¨ç»®) |
| | | * |
| | | * @author ls |
| | | * @date 2024-08-8 |
| | | */ |
| | | @Data |
| | | public class PhoneCallBackYQVO { |
| | | |
| | | /** |
| | | * å¯ä»¥å¯¹å½åééçé³éè¿è¡éå½è°æ´,åå¼èå´ã-4,4ã |
| | | */ |
| | | @ApiModelProperty(value = "å¯ä»¥å¯¹å½åééçé³éè¿è¡éå½è°æ´,åå¼èå´ã-4,4ã") |
| | | private Integer volume = 0; |
| | | |
| | | /** |
| | | * å¯ä»¥è°æ´å½åéè¯çéé»åè°é´éæ¶é´ï¼åä½ä¸ºæ¯«ç§ï¼é»è®¤ä¸º3000 |
| | | */ |
| | | @ApiModelProperty(value = "å¯ä»¥è°æ´å½åéè¯çéé»åè°é´éæ¶é´ï¼åä½ä¸ºæ¯«ç§ï¼é»è®¤ä¸º3000") |
| | | private Integer silent_interval = 5000; |
| | | |
| | | /** |
| | | * è¿åå½åçæä½ç±»å,å
·ä½ç±»å |
| | | * ç±»åå ï¼text æä½ ï¼é³ä¹ææ¾ æè¿°ï¼å½åå°ååºé³ä¹å
å®¹çææ¾,æ¯æææ¬ãæ¬å°é³ä¹è·¯å¾æhttpé³ä¹è·¯å¾ï¼é³ä¹å
容æä»¶æ ¼å¼æ¯æwavåmp3 |
| | | * ç±»åå ï¼hangup æä½ ï¼æææä½ æè¿°ï¼æ¤æ¶å¦ævalueåå¨å¼æ¶ï¼è¡¨ç¤ºææç»æè¯çå
容 |
| | | * ç±»åå ï¼agent æä½ ï¼è½¬æ¥éè¯ æè¿°ï¼å°å½åéè¯è½¬æ¥å°äººå·¥åº§å¸ï¼valueå¼ä¸ºåº§å¸å·æå¤çº¿å·ç ï¼å¦æä¸ºå¤çº¿å·ç æ¶ï¼åéè¦è½å°çº¿è·¯æ¯æå¹¶åå¼å«ï¼å¦åå°å¼å«å¤±è´¥ã该æä½æ¯æå¨è½¬æ¥æ¶ææ¾é³ä¹ï¼å段为music,妿åå¨è¯¥å段å
容æ¶ï¼åè¡¨ç¤ºä¸ºè½¬æ¥æ¶åå¯¹ç«¯ææ¾çé³ä¹å
容 |
| | | * ç±»åå ï¼answer æä½ ï¼åºçéè¯ æè¿°ï¼å¯¹éè¯æ§è¡åºçæä½ï¼äºæä½éç¨äºå¼å
¥æ¶é¦æ¬¡è¯·æ±çååº |
| | | * ç±»åå ï¼breakoff æä½ ï¼ä¸æææ¾ æè¿°ï¼å¯¹å½åæ£å¨ææ¾çé³ä¹èµæºï¼æ§è¡åæ¢æä½ |
| | | */ |
| | | @ApiModelProperty(value = "è¿åå½åçæä½ç±»å,å
·ä½ç±»å请åèå读说æ") |
| | | private String type; |
| | | |
| | | /** |
| | | * ä¸åæä½ç±»åæå¯¹åºçåæ°å¼ |
| | | */ |
| | | @ApiModelProperty(value = "ä¸åæä½ç±»åæå¯¹åºçåæ°å¼") |
| | | private String value; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.domain; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * çµè¯ASRåè°è¯·æ±(é¨ç»®) |
| | | * |
| | | * @author ls |
| | | * @date 2024-08-8 |
| | | */ |
| | | @Data |
| | | public class PhoneCallReqYQVO { |
| | | |
| | | @ApiModelProperty(value = "ä»»å¡ç¼å·(è¿éåå¨çå°±æ¯subtaskID)") |
| | | private String taskid; |
| | | |
| | | // UUID |
| | | @ApiModelProperty(value = "uuid") |
| | | private String uuid; |
| | | |
| | | |
| | | /** |
| | | * å½åå¼å«çç®æ å·ç |
| | | */ |
| | | @ApiModelProperty(value = "å½åå¼å«çç®æ å·ç ") |
| | | private String phone; |
| | | |
| | | /** |
| | | * å½ååè°ç请æ±ç±»åï¼å
æ¬ï¼AsrCallback: ASRææ¬åè° DtmfCallback:æ¶å°æé®åè° SilentCallback:éé»åè° PlayEvent:é³ä¹ææ¾å¼å§ãç»æäºä»¶åè° |
| | | */ |
| | | @ApiModelProperty(value = "å½ååè°ç请æ±ç±»åï¼å
æ¬ï¼AsrCallback: ASRææ¬åè° DtmfCallback:æ¶å°æé®åè° SilentCallback:éé»åè° PlayEvent:é³ä¹ææ¾å¼å§ãç»æäºä»¶åè°") |
| | | private String operate; |
| | | |
| | | /** |
| | | * å½åå¼å«æ¶ä½¿ç¨ç夿¾å·ç |
| | | */ |
| | | @ApiModelProperty(value = "å½åå¼å«æ¶ä½¿ç¨ç夿¾å·ç ") |
| | | private String displayno; |
| | | |
| | | /** |
| | | * æ¯å¦å¼å
¥éè¯ |
| | | */ |
| | | @ApiModelProperty(value = "æ¯å¦å¼å
¥éè¯") |
| | | private Boolean inbound = false; |
| | | |
| | | /** |
| | | * æ¯å¦å¼å
¥éè¯ |
| | | */ |
| | | @ApiModelProperty(value = "æ¯å¦ä¸ºå¼å
¥è¯·æ±æä½") |
| | | private Boolean incoming = false; |
| | | |
| | | /** |
| | | * åé
æ¶é´,å¼å
¥æ¶ä¸º0 |
| | | */ |
| | | @ApiModelProperty(value = "åé
æ¶é´,å¼å
¥æ¶ä¸º0") |
| | | private Long assigntime; |
| | | |
| | | /** |
| | | * å¼å§æ¶é´ï¼å¦æå¼å
¥çå为å¼å
¥å¼å§æ¶é´ |
| | | */ |
| | | @ApiModelProperty(value = "å¼å§æ¶é´ï¼å¦æå¼å
¥çå为å¼å
¥å¼å§æ¶é´") |
| | | private Long starttime; |
| | | |
| | | /** |
| | | * åºçæ¶é´ |
| | | */ |
| | | @ApiModelProperty(value = "åºçæ¶é´") |
| | | private Long answertime; |
| | | |
| | | /** |
| | | * æ è¯å½åæ¯å¦ä¸ºéé»åè° |
| | | */ |
| | | @ApiModelProperty(value = "æ è¯å½åæ¯å¦ä¸ºéé»åè°") |
| | | private Boolean silent = false; |
| | | |
| | | /** |
| | | * æ¶å°çæé®å
容 |
| | | */ |
| | | @ApiModelProperty(value = "æ¶å°çæé®å
容") |
| | | private String dtmf_key; |
| | | |
| | | /** |
| | | * é³ä¹ææ¾æåæ¢æ¶ç¸å
³é³ä¹åç§° |
| | | */ |
| | | @ApiModelProperty(value = "é³ä¹ææ¾æåæ¢æ¶ç¸å
³é³ä¹åç§°") |
| | | private String musicpath; |
| | | |
| | | /** |
| | | * å½åå¥åçç´¢å¼å· |
| | | */ |
| | | @ApiModelProperty(value = "å½åå¥åçç´¢å¼å·") |
| | | private Integer sent_index; |
| | | |
| | | /** |
| | | * å½åæ¯å¦ä¸ºè¯´è¯å¼å§ |
| | | */ |
| | | @ApiModelProperty(value = "å½åæ¯å¦ä¸ºè¯´è¯å¼å§") |
| | | private Boolean sent_begin; |
| | | |
| | | /** |
| | | * å½åæ¶å°çASRè¯å«ææ¬ |
| | | */ |
| | | @ApiModelProperty(value = "å½åæ¶å°çASRè¯å«ææ¬") |
| | | private String asrtext; |
| | | |
| | | /** |
| | | * å½åasrææ¬éè¯å¼å§æ¶é´ç¹ï¼æ¯«ç§æ° |
| | | */ |
| | | @ApiModelProperty(value = "å½åasrææ¬éè¯å¼å§æ¶é´ç¹ï¼æ¯«ç§æ°") |
| | | private Long begin_time; |
| | | |
| | | /** |
| | | * å½åasrææ¬æå¤ç»ææ¶é´ç¹ï¼æ¯«ç§æ°ï¼å½åææ¬ä¸æ¯å¥åç»ææ¶ï¼å为-1 |
| | | */ |
| | | @ApiModelProperty(value = "å½åasrææ¬æå¤ç»ææ¶é´ç¹ï¼æ¯«ç§æ°ï¼å½åææ¬ä¸æ¯å¥åç»ææ¶ï¼å为-1") |
| | | private Long end_time; |
| | | |
| | | /** |
| | | * æ è¯å½åæ¯å¦ä¸ºå¥åç»æ |
| | | */ |
| | | @ApiModelProperty(value = "æ è¯å½åæ¯å¦ä¸ºå¥åç»æ") |
| | | private Boolean send_end = false; |
| | | |
| | | /** |
| | | * å½åå¥åçå½é³æä»¶è·¯å¾ï¼å¥åæªç»ææ¶ä¸ºç©º |
| | | */ |
| | | @ApiModelProperty(value = "å½åå¥åçå½é³æä»¶è·¯å¾ï¼å¥åæªç»ææ¶ä¸ºç©º") |
| | | private String recordpath; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.domain; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * çµè¯ASRåè°è¯·æ±(é¨ç»®) |
| | | * |
| | | * @author ls |
| | | * @date 2024-08-8 |
| | | */ |
| | | @Data |
| | | public class PhoneRecordAccept { |
| | | |
| | | @ApiModelProperty(value = "ä»»å¡ç¼å·(è¿éåå¨çå°±æ¯subtaskID)") |
| | | private String taskid; |
| | | |
| | | // UUID |
| | | @ApiModelProperty(value = "uuid") |
| | | private String uuid; |
| | | |
| | | |
| | | /** |
| | | * å½åå¼å«çç®æ å·ç |
| | | */ |
| | | @ApiModelProperty(value = "å½åå¼å«çç®æ å·ç ") |
| | | private String phone; |
| | | |
| | | |
| | | /** |
| | | * å½åå¼å«æ¶ä½¿ç¨ç夿¾å·ç |
| | | */ |
| | | @ApiModelProperty(value = "å½åå¼å«æ¶ä½¿ç¨ç夿¾å·ç ") |
| | | private String displayno; |
| | | |
| | | /** |
| | | * æ©æçASRè¯å«ææ¬ |
| | | */ |
| | | private String early_asrtext; |
| | | |
| | | /** |
| | | * åé
æ¶é´,13ä½unixæ¶é´æ³ |
| | | */ |
| | | @ApiModelProperty(value = "åé
æ¶é´,13ä½unixæ¶é´æ³") |
| | | private Long assign_time; |
| | | |
| | | /** |
| | | * å¼å§æ¶é´ï¼å¦æå¼å
¥çå为å¼å
¥å¼å§æ¶é´ |
| | | */ |
| | | @ApiModelProperty(value = "å¼å§æ¶é´ï¼å¦æå¼å
¥çå为å¼å
¥å¼å§æ¶é´") |
| | | private Long start_time; |
| | | |
| | | /** |
| | | * åºçæ¶é´ |
| | | */ |
| | | @ApiModelProperty(value = "åºçæ¶é´") |
| | | private Long answer_time; |
| | | |
| | | /** |
| | | * æææ¶é´ |
| | | */ |
| | | @ApiModelProperty(value = "æææ¶é´") |
| | | private Long hangup_time; |
| | | |
| | | /** |
| | | * ç»ææ¶é´ |
| | | */ |
| | | @ApiModelProperty(value = "ç»ææ¶é´") |
| | | private Long end_time; |
| | | |
| | | /** |
| | | * ææºæ¶çsip代ç å¼ |
| | | */ |
| | | @ApiModelProperty(value = "ææºæ¶çsip代ç å¼") |
| | | private String hangup_sipcode; |
| | | |
| | | /** |
| | | * ææºåå å符串 |
| | | */ |
| | | @ApiModelProperty(value = "ææºåå å符串") |
| | | private String hangup_cause; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.domain; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * é¨ç»®çµè¯ä»»å¡æå PullTaskVO |
| | | * |
| | | * @author ls |
| | | * @date 2024-08-07 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "PullTaskVO" , description = "é¨ç»®çµè¯ä»»å¡æå") |
| | | public class PullTaskVO { |
| | | |
| | | /** |
| | | * ä»»å¡ID |
| | | */ |
| | | @ApiModelProperty(value = "ä»»å¡ID") |
| | | private String taskid; |
| | | |
| | | /** |
| | | * ä»»å¡id |
| | | */ |
| | | @Excel(name = "æ¬ä»»å¡éè¦ææ¾çå¼åºç½") |
| | | @ApiModelProperty(value = "æ¬ä»»å¡éè¦ææ¾çå¼åºç½") |
| | | private String prologue; |
| | | |
| | | /** |
| | | * å¼å«æ¶é´æ®µ,以mm-hh:mmæ ¼å¼è®¾ç½®,æå å·åéå¤ä¸ªæ¶é´æ®µ,æ¯ææææåæ®µ,1=8:00-12:30; |
| | | */ |
| | | @Excel(name = "å¼å«æ¶é´æ®µ,以mm-hh:mmæ ¼å¼è®¾ç½®,æå å·åéå¤ä¸ªæ¶é´æ®µ,æ¯ææææåæ®µ,1=8:00-12:30;") |
| | | @ApiModelProperty(value = "å¼å«æ¶é´æ®µ,以mm-hh:mmæ ¼å¼è®¾ç½®,æå å·åéå¤ä¸ªæ¶é´æ®µ,æ¯ææææåæ®µ,1=8:00-12:30;") |
| | | private String sections; |
| | | |
| | | |
| | | /** |
| | | * æ¬æ¬¡ä»»å¡æä½¿ç¨çé»è®¤å¤æ¾å·ç ï¼ç¨äºå¹é
ç½å
³ |
| | | */ |
| | | @Excel(name = "æ¬æ¬¡ä»»å¡æä½¿ç¨çé»è®¤å¤æ¾å·ç ï¼ç¨äºå¹é
ç½å
³") |
| | | @ApiModelProperty(value = "æ¬æ¬¡ä»»å¡æä½¿ç¨çé»è®¤å¤æ¾å·ç ï¼ç¨äºå¹é
ç½å
³") |
| | | private String displayNo; |
| | | |
| | | /** |
| | | * é¿éäºå¸å·appkeyæéç®,妿åå¨è¯¥å¼,å仿¬å°é
ç½®çé¿éäºprofileä¸å¹é
éæ©,妿æªè®¾ç½®æå¹é
ä¸å°,å使ç¨é»è®¤ç¬¬1个å¸å· |
| | | */ |
| | | @Excel(name = "é¿éäºå¸å·appkeyæéç®,妿åå¨è¯¥å¼,å仿¬å°é
ç½®çé¿éäºprofileä¸å¹é
éæ©,妿æªè®¾ç½®æå¹é
ä¸å°,å使ç¨é»è®¤ç¬¬1个å¸å·") |
| | | @ApiModelProperty(value = "é¿éäºå¸å·appkeyæéç®,妿åå¨è¯¥å¼,å仿¬å°é
ç½®çé¿éäºprofileä¸å¹é
éæ©,妿æªè®¾ç½®æå¹é
ä¸å°,å使ç¨é»è®¤ç¬¬1个å¸å·") |
| | | private String appkey; |
| | | |
| | | /** |
| | | * æ¬æ¬¡ä»»å¡éè¦å¤å¼çå·ç æ¸
åï¼èèç½å
³çå¹¶åè½åï¼å»ºè®®å·ç æ°éä¸ºå¹¶åæ°ç3~5å,妿æ¬å段类å为å符串ï¼å以åå·ä½ä¸ºå¤ä¸ªå·ç ä¹åçåé符 |
| | | */ |
| | | @Excel(name = "æ¬æ¬¡ä»»å¡éè¦å¤å¼çå·ç æ¸
åï¼èèç½å
³çå¹¶åè½åï¼å»ºè®®å·ç æ°éä¸ºå¹¶åæ°ç3~5å,妿æ¬å段类å为å符串ï¼å以åå·ä½ä¸ºå¤ä¸ªå·ç ä¹åçåé符") |
| | | @ApiModelProperty(value = "æ¬æ¬¡ä»»å¡éè¦å¤å¼çå·ç æ¸
åï¼èèç½å
³çå¹¶åè½åï¼å»ºè®®å·ç æ°éä¸ºå¹¶åæ°ç3~5å,妿æ¬å段类å为å符串ï¼å以åå·ä½ä¸ºå¤ä¸ªå·ç ä¹åçåé符") |
| | | private String phones; |
| | | |
| | | /** |
| | | * æå®asrçurlè·¯å¾ï¼è¿ä¸ªè·¯å¾éè¦æä»¬è¿è¾¹æä¾ï¼å
¥åå¯ä»¥åèææ¡£ï¼ |
| | | */ |
| | | @ApiModelProperty(value = " æå®asrçurlè·¯å¾ï¼è¿ä¸ªè·¯å¾éè¦æä»¬è¿è¾¹æä¾ï¼å
¥åå¯ä»¥åèææ¡£ï¼") |
| | | private String asrcallback = "http://35z1t16164.qicp.vip/smartor/serviceSubtask/phoneCallBackYQ"; |
| | | } |
| | |
| | | private String url; |
| | | |
| | | private String openid; |
| | | |
| | | private String idcard; |
| | | } |
| | |
| | | @ApiModelProperty(value = "æ£è
ID") |
| | | private String param2; |
| | | |
| | | @ApiModelProperty(value = "è¯å·ç±»å:1 é访 2 é®å·") |
| | | private Integer type; |
| | | // @ApiModelProperty(value = "è¯å·ç±»å:1 é访 2 é®å·") |
| | | // private Integer type; |
| | | |
| | | @ApiModelProperty(value = "é®é¢ç»æè¯¦æ
") |
| | | private List<ServiceSubtaskDetail> serviceSubtaskDetailList; |
| | | } |
| | |
| | | */ |
| | | @ApiModel(value = "ServiceSubtask", description = "åä¸é访任å¡") |
| | | @Data |
| | | public class ServiceSubtask extends BaseEntity { |
| | | public class ServiceSubtask extends PatArchive { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | |
| | | private String libtemplatename; |
| | | |
| | | |
| | | /** |
| | | * é¿æä»»å¡ï¼ç»æ£è
åéçæ¶é´ |
| | | */ |
| | | @Excel(name = " é¿æä»»å¡ï¼ç»æ£è
åéçæ¶é´") |
| | | @ApiModelProperty(value = "é¿æä»»å¡ï¼ç»æ£è
åéçæ¶é´") |
| | | private Date longSendTime; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "åä»»å¡ID") |
| | | private Long subId; |
| | | |
| | | @ApiModelProperty(value = "åä»»å¡ID") |
| | | private Long taskid; |
| | | |
| | | @ApiModelProperty(value = "æ¨å·uuid") |
| | | private String uuid; |
| | | |
| | |
| | | private String valueType; |
| | | |
| | | |
| | | @ApiModelProperty(value = "é®é¢ç±»å") |
| | | private Long scriptid; |
| | | |
| | | @ApiModelProperty(value = "éé¡¹çæ¡çéå ä¿¡æ¯") |
| | | private String answerps; |
| | | |
| | | @ApiModelProperty(value = "å¯¹çæ¡çè¯è¯") |
| | | private String comment; |
| | | |
| | | @ApiModelProperty(value = "æ£è
ID") |
| | | private Long patid; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.domain; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è¯é³ä»»å¡å¼å«æç»å¯¹è±¡ ivr_taskcalldetail |
| | | * |
| | | * @author smartor |
| | | * @date 2023-03-24 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "ServiceSubtaskDetail", description = "é®é¢åçæç»") |
| | | public class ServiceSubtaskDetailVO extends BaseEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "主é®") |
| | | private String id; |
| | | |
| | | @ApiModelProperty(value = "åä»»å¡ID") |
| | | private Long subId; |
| | | |
| | | @ApiModelProperty(value = "åä»»å¡ID") |
| | | private Long taskid; |
| | | |
| | | @ApiModelProperty(value = "æ¨å·uuid") |
| | | private String uuid; |
| | | |
| | | @ApiModelProperty(value = "çµè¯å·ç ") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "æä½äºº ") |
| | | private String operate; |
| | | |
| | | @ApiModelProperty(value = "æ¾ç¤ºå·ç ") |
| | | private String displayno; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | private Long inbound; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | private Long incoming; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | private Long assigntime; |
| | | |
| | | @ApiModelProperty(value = "å¼å§æ¶é´") |
| | | private Long starttime; |
| | | |
| | | @ApiModelProperty(value = "åçæ¶é´") |
| | | private Long answertime; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | private Long silent; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | private String dtmfKey; |
| | | |
| | | @ApiModelProperty(value = "é³ä¹è·¯å¾") |
| | | private String musicpath; |
| | | |
| | | @ApiModelProperty(value = "åéç´¢å¼") |
| | | private Long sentIndex; |
| | | |
| | | @ApiModelProperty(value = "åéå¼å§ç¶æ") |
| | | private Long sentBegin; |
| | | |
| | | @ApiModelProperty(value = "åçç»æ") |
| | | private String asrtext; |
| | | |
| | | @ApiModelProperty(value = "å¼å§æ¶é´") |
| | | private Long beginTime; |
| | | |
| | | @ApiModelProperty(value = "ç»ææ¶é´") |
| | | private Long endTime; |
| | | |
| | | @ApiModelProperty(value = "åéç»æç¶æ") |
| | | private Long sentEnd; |
| | | |
| | | @ApiModelProperty(value = "æäº¤è·¯å¾") |
| | | private String recordpath; |
| | | |
| | | @ApiModelProperty(value = "æäº¤URL") |
| | | private String recordurl; |
| | | |
| | | @ApiModelProperty(value = "模æ¿ID") |
| | | private String templateid; |
| | | |
| | | @ApiModelProperty(value = "模æ¿é®é¢ç¼å·") |
| | | private Long templatequestionnum; |
| | | |
| | | |
| | | @ApiModelProperty(value = "äº¤æ¢æºID") |
| | | private Long switchid; |
| | | |
| | | @ApiModelProperty(value = "é®é¢ææ¬") |
| | | private String questiontext; |
| | | |
| | | |
| | | @ApiModelProperty(value = "é®é¢è¯é³") |
| | | private String questionvoice; |
| | | |
| | | |
| | | @ApiModelProperty(value = "ç±»å«") |
| | | private String categoryname; |
| | | |
| | | |
| | | @ApiModelProperty(value = "ææ é项") |
| | | private String targetoptions; |
| | | |
| | | |
| | | @ApiModelProperty(value = "ææ å¼ï¼æ£åå¹é
çé项å¼ï¼") |
| | | private String targetvalue; |
| | | |
| | | |
| | | @ApiModelProperty(value = "éè¿æ£åè§£æçå¼") |
| | | private String matchedtext; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = " ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | @ApiModelProperty(value = "æ·»å æ¶é´") |
| | | private Date addtime; |
| | | |
| | | |
| | | @ApiModelProperty(value = "ä¸ä¼ æ è®°") |
| | | private Long isupload; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = " ä¸ä¼ æ¶é´ ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | @ApiModelProperty(value = "ä¸ä¼ æ¶é´") |
| | | private Date uploadTime; |
| | | |
| | | |
| | | @ApiModelProperty(value = "æºæID") |
| | | private String orgid; |
| | | |
| | | |
| | | @ApiModelProperty(value = "å 餿 è®°") |
| | | private String delFlag; |
| | | |
| | | @ApiModelProperty(value = "é®é¢ç±»å") |
| | | private String valueType; |
| | | |
| | | |
| | | @ApiModelProperty(value = "é®é¢ç±»å") |
| | | private Long scriptid; |
| | | |
| | | @ApiModelProperty(value = "éé¡¹çæ¡çéå ä¿¡æ¯") |
| | | private String answerps; |
| | | |
| | | @ApiModelProperty(value = "å¯¹çæ¡çè¯è¯") |
| | | private String comment; |
| | | |
| | | @ApiModelProperty(value = "æ£è
ID") |
| | | private Long patid; |
| | | |
| | | private List<SvyTaskTemplateTargetoption> svyTaskTemplateTargetoptions; |
| | | } |
| | |
| | | * @author smartor |
| | | * @date 2023-03-24 |
| | | */ |
| | | @ApiModel(value = "ServiceTask", description = "ä»»å¡å¯¹è±¡") |
| | | @ApiModel(value = "ServiceTask" , description = "ä»»å¡å¯¹è±¡") |
| | | @Data |
| | | public class ServiceTask extends BaseEntity { |
| | | private static final long serialVersionUID = 1L; |
| | |
| | | * |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = " ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | @Excel(name = " " , width = 30, dateFormat = "yyyy-MM-dd") |
| | | @ApiModelProperty(value = "æ·»å æ¶é´") |
| | | private Date addtime; |
| | | |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = " ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | @Excel(name = " " , width = 30, dateFormat = "yyyy-MM-dd") |
| | | @ApiModelProperty(value = "å¼å§æ¶é´") |
| | | private Date beginTime; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = " ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | @Excel(name = " " , width = 30, dateFormat = "yyyy-MM-dd") |
| | | @ApiModelProperty(value = "ç»ææ¶é´") |
| | | private Date endTime; |
| | | |
| | |
| | | * å®¡æ ¸äººæ¶é´ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = " ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | @Excel(name = " " , width = 30, dateFormat = "yyyy-MM-dd") |
| | | @ApiModelProperty(value = "å®¡æ ¸äººæ¶é´") |
| | | private Date checktime; |
| | | |
| | | /** |
| | | * "1ï¼é访ï¼2ï¼é®å·ï¼3.宣æï¼ |
| | | * ä»»å¡ç±»å:1ãçæµè¯ä¼°;2ãåºé¢é访;3ãé¨è¯é访 |
| | | */ |
| | | @Excel(name = "1ï¼é访ï¼2ï¼é®å·ï¼3.宣æï¼ ") |
| | | @ApiModelProperty(value = "1ï¼é访ï¼2ï¼é®å·ï¼3.宣æï¼") |
| | | @Excel(name = "ä»»å¡ç±»å(éç¥ãé®å·ãæºå¨äººè¯é³)") |
| | | @ApiModelProperty(value = "ä»»å¡ç±»å(éç¥ãé®å·ãæºå¨äººè¯é³)") |
| | | private String type; |
| | | |
| | | /** |
| | | * æå¡ç±»å(1ãçæµè¯ä¼°ï¼2ãåºé¢é访ï¼3ãé¨è¯é访ï¼4ã宣æå
³æï¼5ãå¤è¯éç¥ï¼6ãæ»¡æåº¦è°æ¥ï¼7ãæ£è
æ¥åï¼ 8ãå
¶ä»éç¥) |
| | | */ |
| | | @Excel(name = "æå¡ç±»å(1ãçæµè¯ä¼°ï¼2ãåºé¢é访ï¼3ãé¨è¯é访ï¼4ã宣æå
³æï¼5ãå¤è¯éç¥ï¼6ãæ»¡æåº¦è°æ¥ï¼7ãæ£è
æ¥åï¼ 8ãå
¶ä»éç¥)") |
| | | @ApiModelProperty(value = "æå¡ç±»å(1ãçæµè¯ä¼°ï¼2ãåºé¢é访ï¼3ãé¨è¯é访ï¼4ã宣æå
³æï¼5ãå¤è¯éç¥ï¼6ãæ»¡æåº¦è°æ¥ï¼7ãæ£è
æ¥åï¼ 8ãå
¶ä»éç¥)") |
| | | private String serviceType; |
| | | |
| | | /** |
| | | * ç±»ååç§° |
| | |
| | | @Excel(name = "ç±»ååç§°") |
| | | @ApiModelProperty(value = "ç±»ååç§°") |
| | | private String typename; |
| | | |
| | | |
| | | /** |
| | | * ç±»ååç§° |
| | |
| | | * ä¸ä¼ æ¶é´ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = " ä¸ä¼ æ¶é´ ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | @Excel(name = " ä¸ä¼ æ¶é´ " , width = 30, dateFormat = "yyyy-MM-dd") |
| | | @ApiModelProperty(value = "ä¸ä¼ æ¶é´") |
| | | private Date uploadTime; |
| | | |
| | |
| | | private String preachform; |
| | | |
| | | /** |
| | | * åéç±»å: 1æå®æ¶é´åé 2å³å»åé |
| | | * åéç±»å: 1æå®æ¶é´æ®µåé 2å³å»åé 3æ¶é´ç¹ |
| | | */ |
| | | @Excel(name = " åéç±»å: 1æå®æ¶é´åé 2å³å»åé ") |
| | | @ApiModelProperty(value = "åéç±»å: 1æå®æ¶é´åé 2å³å»åé 3æ¶é´ç¹") |
| | | @Excel(name = " åéç±»å: 1æå®æ¶é´æ®µåé 2å³å»åé 3æ¶é´ç¹") |
| | | @ApiModelProperty(value = "åéç±»å: 1æå®æ¶é´æ®µåé 2å³å»åé 3æ¶é´ç¹") |
| | | private Long sendType; |
| | | |
| | | /** |
| | |
| | | private Integer pageSize; |
| | | |
| | | /** |
| | | * pageSize |
| | | */ |
| | | @ApiModelProperty("æ¯å¦æ¯é¿æä»»å¡ 0ï¼ä¸æ¯ 1ï¼æ¯") |
| | | private Integer longTask; |
| | | |
| | | /** |
| | | * å°±è¯ç±»åï¼1é¨è¯ 2åºé¢ï¼ |
| | | */ |
| | | @Excel(name = " å°±è¯ç±»åï¼1é¨è¯ 2åºé¢ï¼") |
| | |
| | | private Date checktime; |
| | | |
| | | /** |
| | | * 1ï¼åºé¢é访ï¼2ï¼ä½æ£éç¥ï¼3ï¼æ»¡æåº¦è°æ¥ï¼4ï¼å®£æï¼ |
| | | * ä»»å¡ç±»å(éç¥ãé®å·ãæºå¨äººè¯é³) |
| | | */ |
| | | @Excel(name = " 1ï¼åºé¢é访ï¼2ï¼ä½æ£éç¥ï¼3ï¼æ»¡æåº¦è°æ¥ï¼4ï¼å®£æï¼ ") |
| | | @Excel(name = " ä»»å¡ç±»å(éç¥ãé®å·ãæºå¨äººè¯é³) ") |
| | | private String type; |
| | | |
| | | /** |
| | |
| | | @ApiModelProperty(value = "å±ç¤ºæ¥æ") |
| | | private String showDate; |
| | | |
| | | /** |
| | | * æå¡ç±»å(1ãçæµè¯ä¼°ï¼2ãåºé¢é访ï¼3ãé¨è¯é访ï¼4ã宣æå
³æï¼5ãå¤è¯éç¥ï¼6ãæ»¡æåº¦è°æ¥ï¼7ãæ£è
æ¥åï¼ 8ãå
¶ä»éç¥) |
| | | */ |
| | | @Excel(name = "æå¡ç±»å(1ãçæµè¯ä¼°ï¼2ãåºé¢é访ï¼3ãé¨è¯é访ï¼4ã宣æå
³æï¼5ãå¤è¯éç¥ï¼6ãæ»¡æåº¦è°æ¥ï¼7ãæ£è
æ¥åï¼ 8ãå
¶ä»éç¥)") |
| | | @ApiModelProperty(value = "æå¡ç±»å(1ãçæµè¯ä¼°ï¼2ãåºé¢é访ï¼3ãé¨è¯é访ï¼4ã宣æå
³æï¼5ãå¤è¯éç¥ï¼6ãæ»¡æåº¦è°æ¥ï¼7ãæ£è
æ¥åï¼ 8ãå
¶ä»éç¥)") |
| | | private String serviceType; |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | @Excel(name = " çæ¬ ") |
| | | @ApiModelProperty(value = "çæ¬") |
| | | private BigDecimal version; |
| | | private String version; |
| | | |
| | | /** |
| | | * ä¸å¿åºä»£ç |
| | |
| | | |
| | | @ApiModelProperty(value = "ç»æè¯") |
| | | private String conclusion; |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | private String targetOptions; |
| | | |
| | | /** |
| | | * åºç¡ææ ç±»åï¼1 é项 2 ææ¬ 3 æ°å¼ï¼ |
| | | * é¢ç®ç±»å;æä¸¾ 1.åé 2å¤é 3填空 4å
¶å® |
| | | */ |
| | | @ApiModelProperty(value = "åºç¡ææ ç±»å 1=é项,2=ææ¬,3=æ°å¼") |
| | | @ApiModelProperty(value = "é¢ç®ç±»å;æä¸¾ 1.åé 2å¤é 3填空 4å
¶å®") |
| | | private String scriptType; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Excel(name = " çæ¬ ") |
| | | @ApiModelProperty(value = "çæ¬") |
| | | private BigDecimal version; |
| | | private String version; |
| | | |
| | | /** |
| | | * ä¸å¿åºä»£ç |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.domain; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * é访计å对象 visit_plan |
| | | * |
| | | * @author lihu |
| | | * @date 2024-08-26 |
| | | */ |
| | | @Data |
| | | @ApiModel("é访计å") |
| | | public class VisitPlan extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** ä¸»é® */ |
| | | @ApiModelProperty("主é®") |
| | | //æ°æ®åºèªå¢æ¹æ@TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** åºé¢æ¥æ */ |
| | | @ApiModelProperty("åºé¢æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @Excel(name = "åºé¢æ¥æ", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | private Date outHospDate; |
| | | |
| | | /** 计åéè®¿æ¥æ */ |
| | | @ApiModelProperty("计åéè®¿æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @Excel(name = "计åéè®¿æ¥æ", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | private Date planVisitDate; |
| | | |
| | | /** è¯é³åºç¡æ¨¡æ¿IDï¼åè®®çåºå®æ¨¡æ¿æ¾è¿ä¸ªè¡¨éï¼ */ |
| | | @ApiModelProperty("è¯é³åºç¡æ¨¡æ¿IDï¼åè®®çåºå®æ¨¡æ¿æ¾è¿ä¸ªè¡¨éï¼") |
| | | @Excel(name = "è¯é³åºç¡æ¨¡æ¿ID", readConverterExp = "å=è®®çåºå®æ¨¡æ¿æ¾è¿ä¸ªè¡¨é") |
| | | private Long ivrLibaTemplateId; |
| | | |
| | | /** æ£è
ID */ |
| | | @ApiModelProperty("æ£è
ID") |
| | | @Excel(name = "æ£è
ID") |
| | | private Long patid; |
| | | |
| | | /** æ£è
ææºå· */ |
| | | @ApiModelProperty("æ£è
ææºå·") |
| | | @Excel(name = "æ£è
ææºå·") |
| | | private String phone; |
| | | |
| | | /** service_taskä¸»é® */ |
| | | @ApiModelProperty("service_task主é®") |
| | | @Excel(name = "service_task主é®") |
| | | private Long taskId; |
| | | |
| | | /** åä»»å¡ID */ |
| | | @ApiModelProperty("åä»»å¡ID") |
| | | @Excel(name = "åä»»å¡ID") |
| | | private Long subTaskId; |
| | | |
| | | /** 任塿¨¡æ¿ID */ |
| | | @ApiModelProperty("任塿¨¡æ¿ID") |
| | | @Excel(name = "任塿¨¡æ¿ID") |
| | | private Long taskTemplateId; |
| | | |
| | | /** 0 æªæ§è¡ 1å·²æ§è¡ */ |
| | | @ApiModelProperty("0 æªæ§è¡ 1å·²æ§è¡") |
| | | @Excel(name = "0 æªæ§è¡ 1å·²æ§è¡") |
| | | private Long isExecute; |
| | | |
| | | /** å
¬ä¼å·ID */ |
| | | @ApiModelProperty("å
¬ä¼å·ID") |
| | | @Excel(name = "å
¬ä¼å·ID") |
| | | private String openid; |
| | | |
| | | } |
| | | |
| | |
| | | package com.smartor.domain.robot; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import com.smartor.domain.PatTaskRelevance; |
| | | import com.smartor.domain.TaskSendTimeVO; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | package com.smartor.mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.smartor.domain.SmsParam; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * çä¿¡åæ°Mapperæ¥å£ |
| | | * |
| | | * |
| | | * @author smartor |
| | | * @date 2023-03-06 |
| | | */ |
| | | public interface SmsParamMapper |
| | | { |
| | | @Mapper |
| | | public interface SmsParamMapper { |
| | | /** |
| | | * æ¥è¯¢çä¿¡åæ° |
| | | * |
| | | * |
| | | * @param paramid çä¿¡åæ°ä¸»é® |
| | | * @return çä¿¡åæ° |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¥è¯¢çä¿¡åæ°å表 |
| | | * |
| | | * |
| | | * @param smsParam çä¿¡åæ° |
| | | * @return çä¿¡åæ°éå |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ°å¢çä¿¡åæ° |
| | | * |
| | | * |
| | | * @param smsParam çä¿¡åæ° |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * ä¿®æ¹çä¿¡åæ° |
| | | * |
| | | * |
| | | * @param smsParam çä¿¡åæ° |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * å é¤çä¿¡åæ° |
| | | * |
| | | * |
| | | * @param paramid çä¿¡åæ°ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éå é¤çä¿¡åæ° |
| | | * |
| | | * |
| | | * @param paramids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | |
| | | package com.smartor.service; |
| | | |
| | | import com.smartor.domain.IvrTaskTemplateScript; |
| | | import com.smartor.domain.IvrTaskTemplateScriptVO; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | */ |
| | | public IvrTaskTemplateScript selectIvrTaskTemplateScriptByID(Long ID); |
| | | |
| | | public IvrTaskTemplateScriptVO getTaskTempScriptInfoByid(Long ID); |
| | | |
| | | /** |
| | | * æ¥è¯¢éè®¿ä»»å¡æ¨¡çé®é¢è¯æ¯åºå表 |
| | | * |
| | |
| | | |
| | | public List<Object> getUserTreatmentInfo(String pid, String type); |
| | | |
| | | public List<PatTaskRelevance> getPatientInfo(PatArchiveReq patArchiveReq); |
| | | public List<ServiceSubtask> getPatientInfo(PatArchiveReq patArchiveReq); |
| | | } |
| | |
| | | package com.smartor.service; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.smartor.domain.PatMedInhosp; |
| | | |
| | | /** |
| | | * æ£è
ä½é¢è®°å½Serviceæ¥å£ |
| | | * |
| | | * |
| | | * @author smartor |
| | | * @date 2023-03-04 |
| | | */ |
| | | public interface IPatMedInhospService |
| | | { |
| | | public interface IPatMedInhospService { |
| | | /** |
| | | * æ¥è¯¢æ£è
ä½é¢è®°å½ |
| | | * |
| | | * |
| | | * @param inhospid æ£è
ä½é¢è®°å½ä¸»é® |
| | | * @return æ£è
ä½é¢è®°å½ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£è
ä½é¢è®°å½å表 |
| | | * |
| | | * |
| | | * @param patMedInhosp æ£è
ä½é¢è®°å½ |
| | | * @return æ£è
ä½é¢è®°å½éå |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ°å¢æ£è
ä½é¢è®°å½ |
| | | * |
| | | * |
| | | * @param patMedInhosp æ£è
ä½é¢è®°å½ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * ä¿®æ¹æ£è
ä½é¢è®°å½ |
| | | * |
| | | * |
| | | * @param patMedInhosp æ£è
ä½é¢è®°å½ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éå 餿£è
ä½é¢è®°å½ |
| | | * |
| | | * |
| | | * @param inhospids éè¦å é¤çæ£è
ä½é¢è®°å½ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * å 餿£è
ä½é¢è®°å½ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param inhospid æ£è
ä½é¢è®°å½ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deletePatMedInhospByInhospid(Long inhospid); |
| | | |
| | | /** |
| | | * å¤çä»his忥çåºé¢æ°æ® |
| | | * |
| | | * @param |
| | | * @return ç»æ |
| | | */ |
| | | public int dealOupHospInfo(); |
| | | } |
| | |
| | | */ |
| | | public Integer saveQuestionCache(ServiceSubTaskCacheReq serviceSubTaskCacheReq); |
| | | |
| | | public List<ServiceSubtaskAnswer> selectPatQuestionResult(ServiceSubTaskQueryReq serviceSubTaskQueryReq); |
| | | public List<ServiceSubtaskDetailVO> selectPatQuestionResult(ServiceSubTaskQueryReq serviceSubTaskQueryReq); |
| | | |
| | | } |
| | |
| | | */ |
| | | public void phoneCallBack(PhoneCallBackVO phoneCallBackVO); |
| | | |
| | | /** |
| | | * çµè¯ASRéè¯åè°(é¨ç»®) |
| | | * |
| | | * @param phoneCallReqYQVO |
| | | * @return ç»æ |
| | | */ |
| | | public PhoneCallBackYQVO phoneCallBackYQ(PhoneCallReqYQVO phoneCallReqYQVO); |
| | | |
| | | /** |
| | | * é¨ç»®ä»»å¡æå |
| | | * |
| | | * @return |
| | | */ |
| | | public List<PullTaskVO> taskPull(); |
| | | |
| | | public Integer saveQuestionAnswerPhone(ServiceSubTaskDetailReq serviceSubTaskDetailReq); |
| | | |
| | | } |
| | |
| | | package com.smartor.service; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.smartor.domain.SmsParam; |
| | | |
| | | /** |
| | | * çä¿¡åæ°Serviceæ¥å£ |
| | | * |
| | | * |
| | | * @author smartor |
| | | * @date 2023-03-06 |
| | | */ |
| | | public interface ISmsParamService |
| | | { |
| | | public interface ISmsParamService { |
| | | /** |
| | | * æ¥è¯¢çä¿¡åæ° |
| | | * |
| | | * |
| | | * @param paramid çä¿¡åæ°ä¸»é® |
| | | * @return çä¿¡åæ° |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¥è¯¢çä¿¡åæ°å表 |
| | | * |
| | | * |
| | | * @param smsParam çä¿¡åæ° |
| | | * @return çä¿¡åæ°éå |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ°å¢çä¿¡åæ° |
| | | * |
| | | * |
| | | * @param smsParam çä¿¡åæ° |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * ä¿®æ¹çä¿¡åæ° |
| | | * |
| | | * |
| | | * @param smsParam çä¿¡åæ° |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éå é¤çä¿¡åæ° |
| | | * |
| | | * |
| | | * @param paramids éè¦å é¤ççä¿¡åæ°ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * å é¤çä¿¡åæ°ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param paramid çä¿¡åæ°ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteSmsParamByParamid(Long paramid); |
| | | |
| | | public int sendSmsInfo(String info,String phone); |
| | | } |
| | |
| | | return wjSend(sendTaskVO); |
| | | } else if (sendTaskVO.getTaskType() == 3) { |
| | | //宣æ |
| | | xjSend(sendTaskVO); |
| | | return xjSend(sendTaskVO); |
| | | } |
| | | } |
| | | return null; |
| | |
| | | ivrLibaTemplateMapper.updateIvrLibaTemplate(ivrLibaTemplate); |
| | | i = ivrLibaTemplate.getId().intValue(); |
| | | } |
| | | log.info("æ°å¢æä¿®æ¹æ¨¡æ¿è¯¦æ
çid为ï¼{}", ivrLibaTemplate.getId()); |
| | | log.info("æ°å¢æä¿®æ¹æ¨¡æ¿è¯¦æ
çid为ï¼{}" , ivrLibaTemplate.getId()); |
| | | |
| | | //å¯¹æ¨¡æ¿æ ç¾è¿è¡å¤ç |
| | | if (CollectionUtils.isNotEmpty(ivrLibaTemplateVO.getIvrLibaTemplateTagList())) { |
| | |
| | | for (IvrLibaTemplateScriptVO ivrLibaTemplateScriptVO : ivrLibaTemplateVO.getIvrLibaTemplateScriptVOList()) { |
| | | if (ivrLibaTemplateScriptVO.getIsoperation() != null) { |
| | | IvrLibaTemplateScript ivrLibaTemplateScript = scriptHandle(ivrLibaTemplate, ivrLibaTemplateScriptVO, ivrLibaTemplateScriptVO.getIsoperation()); |
| | | dealOption(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList(), ivrLibaTemplateScript, ivrLibaTemplate.getId(),ivrLibaTemplateScriptVO.getIsoperation()); |
| | | // dealOption(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList(), ivrLibaTemplateScript, ivrLibaTemplate.getId(), ivrLibaTemplateScriptVO.getIsoperation()); |
| | | } else { |
| | | IvrLibaTemplateScript ivrLibaTemplateScript = scriptHandle(ivrLibaTemplate, ivrLibaTemplateScriptVO, ivrLibaTemplateVO.getIsoperation()); |
| | | dealOption(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList(), ivrLibaTemplateScript, ivrLibaTemplate.getId(),ivrLibaTemplateVO.getIsoperation()); |
| | | // dealOption(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList(), ivrLibaTemplateScript, ivrLibaTemplate.getId(), ivrLibaTemplateVO.getIsoperation()); |
| | | } |
| | | } |
| | | } |
| | |
| | | ivrLibaTemplateScript.setCreateTime(new Date()); |
| | | ivrLibaTemplateScriptMapper.insertIvrLibaTemplateScript(ivrLibaTemplateScript); |
| | | //对é项ç®è¿è¡å¤ç |
| | | dealOption(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList(), ivrLibaTemplateScript, ivrLibaTemplate.getId(),isoperation); |
| | | dealOption(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList(), ivrLibaTemplateScript, ivrLibaTemplate.getId(), isoperation); |
| | | |
| | | } else if (isoperation == 2) { |
| | | //ä¿®æ¹ |
| | |
| | | * @param tmpID |
| | | */ |
| | | private void dealOption(List<IvrLibaTemplateTargetoption> ivrLibaTemplateTargetoptionList, IvrLibaTemplateScript ivrLibaTemplateScript, Long tmpID, Integer isoperation) { |
| | | log.info("ivrLibaTemplateScriptçå¼ä¸ºï¼{}", ivrLibaTemplateScript); |
| | | log.info("ivrLibaTemplateScriptçå¼ä¸ºï¼{}" , ivrLibaTemplateScript); |
| | | //å¯¹æ¨¡æ¿ææ é项è¿è¡å¤ç |
| | | Integer lsIsoperation = isoperation; |
| | | if (CollectionUtils.isNotEmpty(ivrLibaTemplateTargetoptionList)) { |
| | |
| | | */ |
| | | @Override |
| | | public IvrLibaTemplateVO selectInfoByCondition(IvrLibaTemplateVO ivrLibaTemplateVO) { |
| | | log.info("æ¥è¯¢æ¨¡æ¿è¯¦æ
æ ¹æ®æ¡ä»¶çå
¥å为 : {}", ivrLibaTemplateVO); |
| | | log.info("æ¥è¯¢æ¨¡æ¿è¯¦æ
æ ¹æ®æ¡ä»¶çå
¥å为 : {}" , ivrLibaTemplateVO); |
| | | //å
æ ¹æ®æ¡ä»¶æ¥è¯¢é®é¢è¡¨ä¿¡æ¯ |
| | | IvrLibaTemplate ivrLibaTemplate = DtoConversionUtils.sourceToTarget(ivrLibaTemplateVO, IvrLibaTemplate.class); |
| | | List<IvrLibaTemplate> ivrLibaTemplates = selectIvrLibaTemplateList(ivrLibaTemplate); |
| | | if (CollectionUtils.isEmpty(ivrLibaTemplates)) { |
| | | log.info("æä¾çæ¡ä»¶,æ¥è¯¢æ¨¡æ¿è¯¦æ
æ°æ®ä¸ºç©ºï¼{}", ivrLibaTemplates); |
| | | log.info("æä¾çæ¡ä»¶,æ¥è¯¢æ¨¡æ¿è¯¦æ
æ°æ®ä¸ºç©ºï¼{}" , ivrLibaTemplates); |
| | | throw new BaseException("æä¾çæ¡ä»¶,æ¥è¯¢æ¨¡æ¿è¯¦æ
æ°æ®ä¸ºç©º"); |
| | | } |
| | | //å®ä¹IvrLibaTemplateVO ç¨äºè¿å |
| | |
| | | |
| | | //éè¿è¯æ¯IDè·åé项 |
| | | for (IvrLibaTemplateScriptVO ivrLibaTemplateScriptVO : ivrLibaTemplateScriptVOS) { |
| | | log.info("ivrLibaTemplateScriptVOç主é®id为ï¼{}", ivrLibaTemplateScriptVO.getId()); |
| | | log.error("ivrLibaTemplateScriptVOç主é®id为ï¼{}" , ivrLibaTemplateScriptVO.getId()); |
| | | IvrLibaTemplateTargetoption ivrLibaTemplateTargetoption = new IvrLibaTemplateTargetoption(); |
| | | ivrLibaTemplateTargetoption.setScriptid(ivrLibaTemplateScriptVO.getId()); |
| | | List<IvrLibaTemplateTargetoption> ivrLibaTemplateTargetoptions = ivrLibaTemplateTargetOptionMapper.selectIvrLibaTemplateTargetoptionList(ivrLibaTemplateTargetoption); |
| | |
| | | } |
| | | ivrLibaTemplateScriptVO.setIvrLibaScriptTargetoptionList(ivrLibaTemplateTargetoptions); |
| | | } |
| | | Collections.sort(ivrLibaTemplateScriptVOS, Comparator.comparing(IvrLibaTemplateScriptVO::getTargetid)); |
| | | Collections.sort(ivrLibaTemplateScriptVOS, Comparator.comparing(IvrLibaTemplateScriptVO::getSort)); |
| | | //æ°æ®ç»è£
|
| | | templateVO.setIvrLibaTemplateTagList(ivrLibaTemplateTags); |
| | | templateVO.setIvrLibaTemplateScriptVOList(ivrLibaTemplateScriptVOS); |
| | |
| | | package com.smartor.service.impl; |
| | | |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.DtoConversionUtils; |
| | | import com.smartor.domain.IvrTaskTemplateScript; |
| | | import com.smartor.domain.IvrTaskTemplateScriptVO; |
| | | import com.smartor.domain.IvrTaskTemplateTargetoption; |
| | | import com.smartor.mapper.IvrTaskTemplateScriptMapper; |
| | | import com.smartor.mapper.IvrTaskTemplateTargetoptionMapper; |
| | | import com.smartor.service.IIvrTaskTemplateScriptService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | public class IvrTaskTemplateScriptServiceImpl implements IIvrTaskTemplateScriptService { |
| | | @Autowired |
| | | private IvrTaskTemplateScriptMapper ivrTaskTemplateScriptMapper; |
| | | @Autowired |
| | | private IvrTaskTemplateTargetoptionMapper ivrTaskTemplateTargetoptionMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢éè®¿ä»»å¡æ¨¡çé®é¢è¯æ¯åº |
| | |
| | | return ivrTaskTemplateScriptMapper.selectIvrTaskTemplateScriptByID(ID); |
| | | } |
| | | |
| | | @Override |
| | | public IvrTaskTemplateScriptVO getTaskTempScriptInfoByid(Long ID) { |
| | | IvrTaskTemplateScript ivrTaskTemplateScript = selectIvrTaskTemplateScriptByID(ID); |
| | | IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO = DtoConversionUtils.sourceToTarget(ivrTaskTemplateScript, IvrTaskTemplateScriptVO.class); |
| | | IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption = new IvrTaskTemplateTargetoption(); |
| | | ivrTaskTemplateTargetoption.setScriptid(ivrTaskTemplateScriptVO.getId()); |
| | | List<IvrTaskTemplateTargetoption> ivrTaskTemplateTargetoptions = ivrTaskTemplateTargetoptionMapper.selectIvrTaskTemplateTargetoptionList(ivrTaskTemplateTargetoption); |
| | | ivrTaskTemplateScriptVO.setIvrTaskScriptTargetoptionList(ivrTaskTemplateTargetoptions); |
| | | return ivrTaskTemplateScriptVO; |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢éè®¿ä»»å¡æ¨¡çé®é¢è¯æ¯åºå表 |
| | | * |
| | |
| | | public int saveOrUpdateTempScript(IvrTaskTemplateVO ivrTaskTemplateVO) { |
| | | Integer i = null; |
| | | IvrTaskTemplate ivrTaskTemplate = DtoConversionUtils.sourceToTarget(ivrTaskTemplateVO, IvrTaskTemplate.class); |
| | | //ä¼ è¿æ¥çé黿¶é´æ¯ç§ï¼éè¦æ¹ææ¯«ç§ |
| | | if (ivrTaskTemplate.getSilencetime() != null) |
| | | ivrTaskTemplate.setSilencetime(ivrTaskTemplate.getSilencetime() * 1000); |
| | | |
| | | if (ivrTaskTemplateVO.getIsoperation() != null && ivrTaskTemplateVO.getIsoperation() == 1) { |
| | | //æ°å¢ |
| | | ivrTaskTemplate.setCreateTime(new Date()); |
| | |
| | | updateIvrTaskTemplate(ivrTaskTemplate); |
| | | i = ivrTaskTemplate.getId().intValue(); |
| | | } |
| | | log.info("æ°å¢é访任å¡é访模æ¿çid为ï¼{}", ivrTaskTemplate.getId()); |
| | | log.info("æ°å¢é访任å¡é访模æ¿çid为ï¼{}" , ivrTaskTemplate.getId()); |
| | | |
| | | //对模æ¿è¯æ¯åé项è¿è¡å¤çï¼è¯æ¯è¡¨ä¸ææ 表è¿è¡åå¹¶äºï¼ï¼ |
| | | if (CollectionUtils.isNotEmpty(ivrTaskTemplateVO.getIvrTaskTemplateScriptVOList())) { |
| | | log.error("ivrTaskTemplateVO.getIvrTaskTemplateScriptVOList()æ¯å¦ææ°æ®åï¼{}", ivrTaskTemplateVO.getIvrTaskTemplateScriptVOList()); |
| | | log.error("ivrTaskTemplateVO.getIvrTaskTemplateScriptVOList()æ¯å¦ææ°æ®åï¼{}" , ivrTaskTemplateVO.getIvrTaskTemplateScriptVOList()); |
| | | for (IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO : ivrTaskTemplateVO.getIvrTaskTemplateScriptVOList()) { |
| | | if (ivrTaskTemplateScriptVO.getIsoperation() != null) { |
| | | IvrTaskTemplateScript ivrTaskTemplateScript = scriptHandle(ivrTaskTemplate, ivrTaskTemplateScriptVO, ivrTaskTemplateScriptVO.getIsoperation()); |
| | |
| | | */ |
| | | @Override |
| | | public IvrTaskTemplateVO selectInfoByCondition(IvrTaskTemplateVO ivrTaskTemplateVO) { |
| | | log.info("æ¥è¯¢æ¨¡æ¿è¯¦æ
æ ¹æ®æ¡ä»¶çå
¥å为 : {}", ivrTaskTemplateVO); |
| | | log.info("æ¥è¯¢æ¨¡æ¿è¯¦æ
æ ¹æ®æ¡ä»¶çå
¥å为 : {}" , ivrTaskTemplateVO); |
| | | //å
æ ¹æ®æ¡ä»¶æ¥è¯¢é®é¢è¡¨ä¿¡æ¯ |
| | | IvrTaskTemplate ivrTaskTemplate = DtoConversionUtils.sourceToTarget(ivrTaskTemplateVO, IvrTaskTemplate.class); |
| | | List<IvrTaskTemplate> ivrTaskTemplates = selectIvrTaskTemplateList(ivrTaskTemplate); |
| | | if (CollectionUtils.isEmpty(ivrTaskTemplates)) { |
| | | log.info("æä¾çæ¡ä»¶,æ¥è¯¢æ¨¡æ¿è¯¦æ
æ°æ®ä¸ºç©ºï¼{}", ivrTaskTemplates); |
| | | log.info("æä¾çæ¡ä»¶,æ¥è¯¢æ¨¡æ¿è¯¦æ
æ°æ®ä¸ºç©ºï¼{}" , ivrTaskTemplates); |
| | | throw new BaseException("æä¾çæ¡ä»¶,æ¥è¯¢æ¨¡æ¿è¯¦æ
æ°æ®ä¸ºç©º"); |
| | | } |
| | | |
| | | log.info("ivrLibaTemplatesçæ¥è¯¢ç»æä¸º:{},æ°é为 : {}", ivrTaskTemplates.get(0), ivrTaskTemplates.size()); |
| | | log.info("ivrLibaTemplatesçæ¥è¯¢ç»æä¸º:{},æ°é为 : {}" , ivrTaskTemplates.get(0), ivrTaskTemplates.size()); |
| | | //å®ä¹IvrLibaTemplateVO ç¨äºè¿å |
| | | IvrTaskTemplateVO templateVO = DtoConversionUtils.sourceToTarget(ivrTaskTemplates.get(0), IvrTaskTemplateVO.class); |
| | | // |
| | |
| | | |
| | | //éè¿è¯æ¯IDè·åé项 |
| | | for (IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO : ivrTaskTemplateScriptVOS) { |
| | | log.info("ivrLibaTemplateScriptVOç主é®id为ï¼{}", ivrTaskTemplateScriptVO.getId()); |
| | | log.info("ivrLibaTemplateScriptVOç主é®id为ï¼{}" , ivrTaskTemplateScriptVO.getId()); |
| | | IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption = new IvrTaskTemplateTargetoption(); |
| | | ivrTaskTemplateTargetoption.setScriptid(ivrTaskTemplateScriptVO.getId()); |
| | | List<IvrTaskTemplateTargetoption> ivrTaskTemplateTargetoptions = ivrTaskTemplateTargetoptionMapper.selectIvrTaskTemplateTargetoptionList(ivrTaskTemplateTargetoption); |
| | |
| | | } |
| | | |
| | | private void dealOption(List<IvrTaskTemplateTargetoption> ivrTaskTemplateTargetoptionList, IvrTaskTemplateScript ivrTaskTemplateScript, Long tmpID, Integer isoperation) { |
| | | log.info("ivrLibaTemplateScriptçå¼ä¸ºï¼{}", ivrTaskTemplateScript); |
| | | log.info("ivrLibaTemplateScriptçå¼ä¸ºï¼{}" , ivrTaskTemplateScript); |
| | | Integer lsisoperation = isoperation; |
| | | //å¯¹æ¨¡æ¿ææ é项è¿è¡å¤ç |
| | | if (CollectionUtils.isNotEmpty(ivrTaskTemplateTargetoptionList)) { |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<PatTaskRelevance> getPatientInfo(PatArchiveReq patArchiveReq) { |
| | | List<PatTaskRelevance> PatTaskRelevances = new ArrayList<>(); |
| | | public List<ServiceSubtask> getPatientInfo(PatArchiveReq patArchiveReq) { |
| | | List<ServiceSubtask> serviceSubtaskList = new ArrayList<>(); |
| | | |
| | | List<PatArchive> patArchiveList = new ArrayList<>(); |
| | | if (patArchiveReq.getAllhosp() != null && patArchiveReq.getAllhosp() == 1) { |
| | |
| | | } |
| | | } |
| | | for (PatArchive patArchive : patArchiveList) { |
| | | PatTaskRelevance patTaskRelevance = DtoConversionUtils.sourceToTarget(patArchive, PatTaskRelevance.class); |
| | | patTaskRelevance.setCreateTime(patArchive.getCreateTime()); |
| | | patTaskRelevance.setCreateBy(patArchive.getCreateBy()); |
| | | patTaskRelevance.setDeptName(patArchive.getDept()); |
| | | PatTaskRelevances.add(patTaskRelevance); |
| | | ServiceSubtask serviceSubtask = DtoConversionUtils.sourceToTarget(patArchive, ServiceSubtask.class); |
| | | serviceSubtask.setCreateTime(patArchive.getCreateTime()); |
| | | serviceSubtask.setCreateBy(patArchive.getCreateBy()); |
| | | serviceSubtask.setDeptname(patArchive.getDept()); |
| | | serviceSubtask.setPhone(patArchive.getTelcode()); |
| | | serviceSubtaskList.add(serviceSubtask); |
| | | } |
| | | |
| | | return PatTaskRelevances; |
| | | return serviceSubtaskList; |
| | | } |
| | | |
| | | |
| | |
| | | package com.smartor.service.impl; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.ZoneOffset; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.DtoConversionUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.mapper.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import com.smartor.mapper.PatMedInhospMapper; |
| | | import com.smartor.domain.PatMedInhosp; |
| | | import com.smartor.service.IPatMedInhospService; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | /** |
| | | * æ£è
ä½é¢è®°å½Serviceä¸å¡å±å¤ç |
| | | * |
| | | * |
| | | * @author smartor |
| | | * @date 2023-03-04 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class PatMedInhospServiceImpl implements IPatMedInhospService |
| | | { |
| | | public class PatMedInhospServiceImpl implements IPatMedInhospService { |
| | | @Autowired |
| | | private PatMedInhospMapper patMedInhospMapper; |
| | | |
| | | @Autowired |
| | | private PatArchiveMapper patArchiveMapper; |
| | | |
| | | @Autowired |
| | | private IvrLibaTemplateMapper ivrLibaTemplateMapper; |
| | | |
| | | @Autowired |
| | | private IvrTaskTemplateMapper ivrTaskTemplateMapper; |
| | | |
| | | @Autowired |
| | | private ServiceTaskMapper serviceTaskMapper; |
| | | |
| | | @Autowired |
| | | private ServiceSubtaskMapper serviceSubtaskMapper; |
| | | |
| | | //è®°å½é¿æä»»å¡åºç¡ä¿¡æ¯ |
| | | List<IvrLibaTemplate> libaTemplates = new ArrayList<>(); |
| | | List<IvrTaskTemplate> ivrTaskTemplates = new ArrayList<>(); |
| | | List<ServiceTask> serviceTaskList = new ArrayList<>(); |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£è
ä½é¢è®°å½ |
| | | * |
| | | * |
| | | * @param inhospid æ£è
ä½é¢è®°å½ä¸»é® |
| | | * @return æ£è
ä½é¢è®°å½ |
| | | */ |
| | | @Override |
| | | public PatMedInhosp selectPatMedInhospByInhospid(Long inhospid) |
| | | { |
| | | public PatMedInhosp selectPatMedInhospByInhospid(Long inhospid) { |
| | | return patMedInhospMapper.selectPatMedInhospByInhospid(inhospid); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£è
ä½é¢è®°å½å表 |
| | | * |
| | | * |
| | | * @param patMedInhosp æ£è
ä½é¢è®°å½ |
| | | * @return æ£è
ä½é¢è®°å½ |
| | | */ |
| | | @Override |
| | | public List<PatMedInhosp> selectPatMedInhospList(PatMedInhosp patMedInhosp) |
| | | { |
| | | public List<PatMedInhosp> selectPatMedInhospList(PatMedInhosp patMedInhosp) { |
| | | return patMedInhospMapper.selectPatMedInhospList(patMedInhosp); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢æ£è
ä½é¢è®°å½ |
| | | * |
| | | * |
| | | * @param patMedInhosp æ£è
ä½é¢è®°å½ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertPatMedInhosp(PatMedInhosp patMedInhosp) |
| | | { |
| | | public int insertPatMedInhosp(PatMedInhosp patMedInhosp) { |
| | | patMedInhosp.setCreateTime(DateUtils.getNowDate()); |
| | | patMedInhosp.setUpdateTime(DateUtils.getNowDate()); |
| | | return patMedInhospMapper.insertPatMedInhosp(patMedInhosp); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹æ£è
ä½é¢è®°å½ |
| | | * |
| | | * |
| | | * @param patMedInhosp æ£è
ä½é¢è®°å½ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updatePatMedInhosp(PatMedInhosp patMedInhosp) |
| | | { |
| | | public int updatePatMedInhosp(PatMedInhosp patMedInhosp) { |
| | | patMedInhosp.setUpdateTime(DateUtils.getNowDate()); |
| | | return patMedInhospMapper.updatePatMedInhosp(patMedInhosp); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå 餿£è
ä½é¢è®°å½ |
| | | * |
| | | * |
| | | * @param inhospids éè¦å é¤çæ£è
ä½é¢è®°å½ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deletePatMedInhospByInhospids(Long[] inhospids) |
| | | { |
| | | public int deletePatMedInhospByInhospids(Long[] inhospids) { |
| | | return patMedInhospMapper.deletePatMedInhospByInhospids(inhospids); |
| | | } |
| | | |
| | | /** |
| | | * å 餿£è
ä½é¢è®°å½ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param inhospid æ£è
ä½é¢è®°å½ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deletePatMedInhospByInhospid(Long inhospid) |
| | | { |
| | | public int deletePatMedInhospByInhospid(Long inhospid) { |
| | | return patMedInhospMapper.deletePatMedInhospByInhospid(inhospid); |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public int dealOupHospInfo() { |
| | | //è·åé¿ææ¨¡æ¿ |
| | | IvrLibaTemplate ivrTemp = new IvrLibaTemplate(); |
| | | ivrTemp.setDelFlag("0"); |
| | | ivrTemp.setLongTemp(1); |
| | | List<IvrLibaTemplate> ivrLibaTemplates = ivrLibaTemplateMapper.selectIvrLibaTemplateList(ivrTemp); |
| | | |
| | | if (CollectionUtils.isNotEmpty(ivrLibaTemplates)) { |
| | | for (IvrLibaTemplate ivrLibaTemplate : ivrLibaTemplates) { |
| | | //è·åå°ä»»å¡æ¨¡æ¿ä¿¡æ¯ |
| | | IvrTaskTemplate ivrTaskTemplate = new IvrTaskTemplate(); |
| | | ivrTaskTemplate.setLibtemplateid(ivrLibaTemplate.getId().toString()); |
| | | List<IvrTaskTemplate> ivrTaskTemplates = ivrTaskTemplateMapper.selectIvrTaskTemplateList(ivrTaskTemplate); |
| | | if (CollectionUtils.isNotEmpty(ivrTaskTemplates)) { |
| | | IvrTaskTemplate ivrTaskTemplate1 = ivrTaskTemplates.get(0); |
| | | //éè¿ä»»å¡æ¨¡æ¿IDè·åä»»å¡ |
| | | ServiceTask ServiceTask = new ServiceTask(); |
| | | ServiceTask.setTemplateid(ivrTaskTemplate1.getId()); |
| | | List<ServiceTask> serviceTasks = serviceTaskMapper.selectServiceTaskList(ServiceTask); |
| | | if (CollectionUtils.isNotEmpty(serviceTasks)) { |
| | | serviceTaskList.add(serviceTasks.get(0)); |
| | | } |
| | | ivrTaskTemplates.add(ivrTaskTemplate1); |
| | | } |
| | | libaTemplates.add(ivrLibaTemplate); |
| | | } |
| | | } |
| | | |
| | | PatMedInhosp patMedInhosp = new PatMedInhosp(); |
| | | //è·åæªå¤ççæ°æ® |
| | | patMedInhosp.setCheckFlag("0"); |
| | | patMedInhosp.setInhospstate("1"); |
| | | List<PatMedInhosp> patMedInhosps = patMedInhospMapper.selectPatMedInhospList(patMedInhosp); |
| | | for (PatMedInhosp patMedInhosp1 : patMedInhosps) { |
| | | PatArchive patArchive = patArchiveMapper.selectPatArchiveByPatid(patMedInhosp1.getPatid()); |
| | | //éè¿icd10codeå»è·åç¸åºçivr_liba_template_id |
| | | if (StringUtils.isNotEmpty(patMedInhosp1.getIcd10code())) { |
| | | for (IvrLibaTemplate ivrLibaTemplate : libaTemplates) { |
| | | String icdCode = patMedInhosp1.getIcd10code().split(",")[0]; |
| | | if (ivrLibaTemplate.getIcd10code().equals(icdCode)) { |
| | | //éè¿æ¨¡æ¿IDè·å任塿¨¡æ¿ |
| | | for (IvrTaskTemplate ivrTaskTemplate : ivrTaskTemplates) { |
| | | if (ivrTaskTemplate.getLibtemplateid().equals(ivrLibaTemplate.getId().toString())) { |
| | | for (ServiceTask serviceTask : serviceTaskList) { |
| | | if (serviceTask.getTemplateid() == ivrTaskTemplate.getId()) { |
| | | //å°è¯¥æ£è
ï¼æå
¥å°åä»»å¡è¡¨ä¸ |
| | | ServiceSubtask serviceSubtask = DtoConversionUtils.sourceToTarget(serviceTask, ServiceSubtask.class); |
| | | serviceSubtask.setId(null); |
| | | serviceSubtask.setTaskid(serviceTask.getTaskid()); |
| | | serviceSubtask.setLibtemplateid(ivrLibaTemplate.getId()); |
| | | serviceSubtask.setTemplateid(ivrTaskTemplate.getId()); |
| | | serviceSubtask.setTemplatename(ivrLibaTemplate.getTemplateName()); |
| | | serviceSubtask.setPatid(patMedInhosp1.getPatid()); |
| | | serviceSubtask.setSendname(patMedInhosp1.getPatname()); |
| | | serviceSubtask.setPhone(patArchive.getTelcode()); |
| | | serviceSubtask.setSex(patArchive.getSex()); |
| | | serviceSubtask.setAge(patArchive.getAge()); |
| | | serviceSubtask.setSendstate(2L); |
| | | serviceSubtask.setServiceform(serviceTask.getPreachform()); |
| | | serviceSubtask.setHospType("2"); |
| | | //æ£è
åéæ¶é´ |
| | | LocalDate currentDate = LocalDate.now(); |
| | | LocalDate newDate = currentDate.plusDays(ivrTaskTemplate.getSendDay()); |
| | | serviceSubtask.setLongSendTime(Date.from(newDate.atStartOfDay(ZoneOffset.ofHours(8)).toInstant())); |
| | | serviceSubtaskMapper.insertServiceSubtask(serviceSubtask); |
| | | //å°check_flagæ¹æ1ï¼å·²å¤çï¼ |
| | | PatMedInhosp patMedInhosp2 = new PatMedInhosp(); |
| | | patMedInhosp2.setInhospid(patMedInhosp1.getInhospid()); |
| | | patMedInhosp2.setCheckFlag("1"); |
| | | patMedInhospMapper.updatePatMedInhosp(patMedInhosp2); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return 1; |
| | | } |
| | | } |
| | |
| | | |
| | | /** |
| | | * æ£è
æ£æ¥æ£éªè®°å½Serviceä¸å¡å±å¤ç |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | * @date 2023-06-16 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£è
æ£æ¥æ£éªè®°å½ |
| | | * |
| | | * |
| | | * @param id æ£è
æ£æ¥æ£éªè®°å½ä¸»é® |
| | | * @return æ£è
æ£æ¥æ£éªè®°å½ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£è
æ£æ¥æ£éªè®°å½å表 |
| | | * |
| | | * |
| | | * @param patMedInspection æ£è
æ£æ¥æ£éªè®°å½ |
| | | * @return æ£è
æ£æ¥æ£éªè®°å½ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ°å¢æ£è
æ£æ¥æ£éªè®°å½ |
| | | * |
| | | * |
| | | * @param patMedInspection æ£è
æ£æ¥æ£éªè®°å½ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | public int insertPatMedInspection(PatMedInspection patMedInspection) |
| | | { |
| | | patMedInspection.setCreateTime(DateUtils.getNowDate()); |
| | | patMedInspection.setUpdateTime(DateUtils.getNowDate()); |
| | | return patMedInspectionMapper.insertPatMedInspection(patMedInspection); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹æ£è
æ£æ¥æ£éªè®°å½ |
| | | * |
| | | * |
| | | * @param patMedInspection æ£è
æ£æ¥æ£éªè®°å½ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éå 餿£è
æ£æ¥æ£éªè®°å½ |
| | | * |
| | | * |
| | | * @param ids éè¦å é¤çæ£è
æ£æ¥æ£éªè®°å½ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * å 餿£è
æ£æ¥æ£éªè®°å½ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param id æ£è
æ£æ¥æ£éªè®°å½ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | |
| | | public int insertPatMedRegistration(PatMedRegistration patMedRegistration) |
| | | { |
| | | patMedRegistration.setCreateTime(DateUtils.getNowDate()); |
| | | patMedRegistration.setUpdateTime(DateUtils.getNowDate()); |
| | | return patMedRegistrationMapper.insertPatMedRegistration(patMedRegistration); |
| | | } |
| | | |
| | |
| | | package com.smartor.service.impl; |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.alibaba.fastjson2.JSONArray; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.JsonArray; |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.DtoConversionUtils; |
| | | import com.ruoyi.common.utils.RSAPublicKeyExample; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.mapper.IvrTaskTemplateScriptMapper; |
| | | import com.smartor.mapper.ServiceSubtaskAnswerMapper; |
| | | import com.smartor.mapper.ServiceSubtaskMapper; |
| | | import com.smartor.mapper.ServiceTaskMapper; |
| | | import com.smartor.service.IIvrTaskTemplateService; |
| | | import com.smartor.mapper.ServiceSubtaskDetailMapper; |
| | | import com.smartor.mapper.SvyTaskTemplateTargetoptionMapper; |
| | | import com.smartor.service.IServiceSubtaskAnswerService; |
| | | import com.smartor.service.ISvyTaskTemplateService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | |
| | | |
| | | @Autowired |
| | | private RedisCache redisCache; |
| | | |
| | | @Autowired |
| | | private ServiceSubtaskDetailMapper serviceSubtaskDetailMapper; |
| | | |
| | | @Autowired |
| | | private SvyTaskTemplateTargetoptionMapper svyTaskTemplateTargetoptionMapper; |
| | | |
| | | @Value("${pri_key}") |
| | | private String pri_key; |
| | |
| | | if (ObjectUtils.isNotEmpty(serviceSubTaskAnswerReq)) { |
| | | //éè¦ç«å³æ§è¡ |
| | | RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample(); |
| | | // Long tid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskAnswerReq.getParam1(), pri_key)); |
| | | // Long pid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskAnswerReq.getParam2(), pri_key)); |
| | | |
| | | Long tid=Long.valueOf(serviceSubTaskAnswerReq.getParam1()); |
| | | Long pid=Long.valueOf(serviceSubTaskAnswerReq.getParam2()); |
| | | |
| | | Long tid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskAnswerReq.getParam1(), pri_key)); |
| | | Long pid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskAnswerReq.getParam2(), pri_key)); |
| | | allKeys = new HashSet<>(); |
| | | if (serviceSubTaskAnswerReq.getType() == 1) { |
| | | allKeys.add(pid + "-" + tid + "-SFscriptCache"); |
| | | } else if (serviceSubTaskAnswerReq.getType() == 2) { |
| | | allKeys.add(pid + "-" + tid + "-WJscriptCache"); |
| | | } |
| | | allKeys.add(pid + "-" + tid + "-WJscriptCache"); |
| | | } |
| | | |
| | | Long nextScriptno = null; |
| | | for (String key : allKeys) { |
| | | String[] split = key.split("-"); |
| | | if (key.contains("-SFscriptCache")) { |
| | | //å
å«äº,说æäºæ¯é访é®é¢ |
| | | List<IvrTaskTemplateScriptVO> cacheList = redisCache.getCacheObject(key); |
| | | for (int i = 0; i < cacheList.size(); i++) { |
| | | if (i == 0) { |
| | | // è¯´ææ¯ç¬¬ä¸é¢ |
| | | IvrTaskTemplateScriptVO ivrLibaTemplateScriptVO = cacheList.get(0); |
| | | //å°ç¬¬ä¸é¢çä¿¡æ¯æ¾å°è¡¨ä¸ |
| | | setSFInfo(ivrLibaTemplateScriptVO, Long.valueOf(split[1]), Long.valueOf(split[0])); |
| | | nextScriptno = cacheList.get(0).getNextScriptno(); |
| | | } else { |
| | | //䏿¯ç¬¬ ä¸ é¢ |
| | | for (IvrTaskTemplateScriptVO ivrLibaTemplateScriptVO : cacheList) { |
| | | if (ivrLibaTemplateScriptVO.getId() == nextScriptno) { |
| | | setSFInfo(ivrLibaTemplateScriptVO, Long.valueOf(split[1]), Long.valueOf(split[0])); |
| | | nextScriptno = ivrLibaTemplateScriptVO.getNextScriptno(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } else if (key.contains("-WJscriptCache")) { |
| | | if (key.contains("-WJscriptCache")) { |
| | | List<SvyTaskTemplateScriptVO> cacheList = redisCache.getCacheList(key); |
| | | for (int i = 0; i < cacheList.size(); i++) { |
| | | if (i == 0) { |
| | | // è¯´ææ¯ç¬¬ä¸é¢ |
| | | //å°ç¬¬ä¸é¢çä¿¡æ¯æ¾å°è¡¨ä¸ |
| | | setWJInfo(cacheList.get(0), Long.valueOf(split[1]), Long.valueOf(split[0])); |
| | | nextScriptno = Long.valueOf(cacheList.get(0).getNextScriptno()); |
| | | nextScriptno = setWJInfo(cacheList.get(0), Long.valueOf(split[1]), Long.valueOf(split[0])); |
| | | } else { |
| | | for (SvyTaskTemplateScriptVO svyTaskTemplateScriptVO : cacheList) { |
| | | if (svyTaskTemplateScriptVO.getId() == nextScriptno) { |
| | |
| | | @Override |
| | | public Integer saveQuestionCache(ServiceSubTaskCacheReq serviceSubTaskCacheReq) { |
| | | RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample(); |
| | | // Long tid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskCacheReq.getParam1(), pri_key)); |
| | | // Long pid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskCacheReq.getParam2(), pri_key)); |
| | | Long tid=Long.valueOf(serviceSubTaskCacheReq.getParam1()); |
| | | Long pid=Long.valueOf(serviceSubTaskCacheReq.getParam2()); |
| | | if (CollectionUtils.isNotEmpty(serviceSubTaskCacheReq.getIvrTaskTemplateScriptVOList())) { |
| | | //é访 |
| | | redisCache.setCacheObject(pid + "-" + tid + "-SFscriptCache", serviceSubTaskCacheReq.getIvrTaskTemplateScriptVOList()); |
| | | } else if (CollectionUtils.isNotEmpty(serviceSubTaskCacheReq.getSvyTaskTemplateScriptVOList())) { |
| | | //é®å· |
| | | redisCache.setCacheObject(pid + "-" + tid + "-WJscriptCache", serviceSubTaskCacheReq.getSvyTaskTemplateScriptVOList()); |
| | | } |
| | | Long tid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskCacheReq.getParam1(), pri_key)); |
| | | Long pid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskCacheReq.getParam2(), pri_key)); |
| | | //é®å· |
| | | redisCache.setCacheObject(pid + "-" + tid + "-WJscriptCache", serviceSubTaskCacheReq.getSvyTaskTemplateScriptVOList()); |
| | | return 1; |
| | | } |
| | | |
| | | @Override |
| | | public List<ServiceSubtaskAnswer> selectPatQuestionResult(ServiceSubTaskQueryReq serviceSubTaskQueryReq) { |
| | | public List<ServiceSubtaskDetailVO> selectPatQuestionResult(ServiceSubTaskQueryReq serviceSubTaskQueryReq) { |
| | | log.error("selectPatQuesTionResultçå
¥å为ï¼{}", serviceSubTaskQueryReq); |
| | | ServiceSubtaskAnswer serviceSubtaskAnswer = new ServiceSubtaskAnswer(); |
| | | serviceSubtaskAnswer.setTaskid(serviceSubTaskQueryReq.getTaskid()); |
| | | serviceSubtaskAnswer.setPatId(serviceSubTaskQueryReq.getPatId()); |
| | | serviceSubtaskAnswer.setScriptid(serviceSubTaskQueryReq.getScriptid()); |
| | | List<ServiceSubtaskAnswer> serviceSubtaskAnswerList = serviceSubtaskAnswerMapper.selectServiceSubtaskAnswerList(serviceSubtaskAnswer); |
| | | for (ServiceSubtaskAnswer serviceSubtaskAnswer1 : serviceSubtaskAnswerList) { |
| | | ObjectMapper mapper = new ObjectMapper(); |
| | | try { |
| | | List<ServiceSubtaskOptionAnswer> serviceSubtaskOptionAnswer = mapper.readValue(serviceSubtaskAnswer1.getAnswer(), List.class); |
| | | serviceSubtaskAnswer1.setOptionAnswer(serviceSubtaskOptionAnswer); |
| | | } catch (JsonProcessingException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | List<ServiceSubtaskDetailVO> serviceSubtaskDetailVOList = new ArrayList<>(); |
| | | ServiceSubtaskDetail serviceSubtaskDetail = new ServiceSubtaskDetail(); |
| | | serviceSubtaskDetail.setTaskid(serviceSubTaskQueryReq.getTaskid()); |
| | | serviceSubtaskDetail.setPatid(serviceSubTaskQueryReq.getPatId()); |
| | | serviceSubtaskDetail.setScriptid(serviceSubTaskQueryReq.getScriptid()); |
| | | List<ServiceSubtaskDetail> serviceSubtaskDetails = serviceSubtaskDetailMapper.selectServiceSubtaskDetailList(serviceSubtaskDetail); |
| | | for (ServiceSubtaskDetail serviceSubtaskDetail1 : serviceSubtaskDetails) { |
| | | ServiceSubtaskDetailVO serviceSubtaskDetailVO = DtoConversionUtils.sourceToTarget(serviceSubtaskDetail1, ServiceSubtaskDetailVO.class); |
| | | SvyTaskTemplateTargetoption svyTaskTemplateTargetoption = new SvyTaskTemplateTargetoption(); |
| | | svyTaskTemplateTargetoption.setScriptid(serviceSubtaskDetailVO.getScriptid()); |
| | | svyTaskTemplateTargetoption.setTaskid(serviceSubtaskDetailVO.getTaskid()); |
| | | List<SvyTaskTemplateTargetoption> svyTaskTemplateTargetoptions = svyTaskTemplateTargetoptionMapper.selectSvyTaskTemplateTargetoptionList(svyTaskTemplateTargetoption); |
| | | serviceSubtaskDetailVO.setSvyTaskTemplateTargetoptions(svyTaskTemplateTargetoptions); |
| | | serviceSubtaskDetailVOList.add(serviceSubtaskDetailVO); |
| | | } |
| | | return serviceSubtaskAnswerList; |
| | | return serviceSubtaskDetailVOList; |
| | | } |
| | | |
| | | private void setSFInfo(IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO, Long taskid, Long patid) { |
| | | ServiceSubtaskAnswer serviceSubtaskAnswer = new ServiceSubtaskAnswer(); |
| | | List<ServiceSubtaskOptionAnswer> answerList = new ArrayList<>(); |
| | | if (StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getScriptType()) && ivrTaskTemplateScriptVO.getScriptType().equals("1") || StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getScriptType()) && ivrTaskTemplateScriptVO.getScriptType().equals("2")) { |
| | | //1ã2为åéæå¤é |
| | | for (IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption : ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList()) { |
| | | //è·åç¨æ·éä¸çéé¡¹å· |
| | | if (ivrTaskTemplateTargetoption.getIsUserOperation() == true) { |
| | | ServiceSubtaskOptionAnswer serviceSubtaskOptionAnswer = new ServiceSubtaskOptionAnswer(); |
| | | serviceSubtaskOptionAnswer.setId(ivrTaskTemplateTargetoption.getId()); |
| | | serviceSubtaskOptionAnswer.setCode(ivrTaskTemplateTargetoption.getOptionCode()); |
| | | serviceSubtaskOptionAnswer.setValue(ivrTaskTemplateTargetoption.getTargetvalue()); |
| | | serviceSubtaskOptionAnswer.setAppenddesc(ivrTaskTemplateTargetoption.getAppenddesc()); |
| | | answerList.add(serviceSubtaskOptionAnswer); |
| | | } |
| | | } |
| | | } else { |
| | | //éåå¤é |
| | | if (CollectionUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList())) { |
| | | log.error("IvrTaskScriptTargetoptionListçå¼ä¸ºï¼{}", ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList()); |
| | | ServiceSubtaskOptionAnswer serviceSubtaskOptionAnswer = new ServiceSubtaskOptionAnswer(); |
| | | serviceSubtaskOptionAnswer.setId(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(0).getId()); |
| | | serviceSubtaskOptionAnswer.setCode(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(0).getOptionCode()); |
| | | serviceSubtaskOptionAnswer.setValue(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(0).getTargetvalue()); |
| | | serviceSubtaskOptionAnswer.setAppenddesc(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(0).getAppenddesc()); |
| | | answerList.add(serviceSubtaskOptionAnswer); |
| | | } |
| | | } |
| | | //æ°æ®ä¿å |
| | | serviceSubtaskAnswer.setTaskid(taskid); |
| | | serviceSubtaskAnswer.setPatId(patid); |
| | | serviceSubtaskAnswer.setScriptid(ivrTaskTemplateScriptVO.getId()); |
| | | serviceSubtaskAnswer.setScriptType(Long.valueOf(ivrTaskTemplateScriptVO.getScriptType())); |
| | | serviceSubtaskAnswer.setAnswer(JSON.toJSONString(answerList)); |
| | | serviceSubtaskAnswer.setComment(null); |
| | | serviceSubtaskAnswer.setCreateTime(new Date()); |
| | | serviceSubtaskAnswer.setUpdateTime(new Date()); |
| | | serviceSubtaskAnswerMapper.insertServiceSubtaskAnswer(serviceSubtaskAnswer); |
| | | } |
| | | private Long setWJInfo(SvyTaskTemplateScriptVO svyTaskTemplateScriptVO, Long taskid, Long patid) { |
| | | //ä¸é¢è·³è½¬ |
| | | Long nextScriptNo = null; |
| | | |
| | | private void setWJInfo(SvyTaskTemplateScriptVO svyTaskTemplateScriptVO, Long taskid, Long patid) { |
| | | ServiceSubtaskAnswer serviceSubtaskAnswer = null; |
| | | ServiceSubtaskDetailVO serviceSubtaskDetailVO = new ServiceSubtaskDetailVO(); |
| | | List<ServiceSubtaskOptionAnswer> answerList = new ArrayList<>(); |
| | | if (svyTaskTemplateScriptVO.getScriptType().equals("1") || svyTaskTemplateScriptVO.getScriptType().equals("2")) { |
| | | //1ã2为åéæå¤é |
| | | for (SvyTaskTemplateTargetoption svyTaskTemplateTargetoption : svyTaskTemplateScriptVO.getSvyTaskTemplateTargetoptions()) { |
| | | //å°é®é¢é项记å½ä¸æ¥ |
| | | if (StringUtils.isEmpty(serviceSubtaskDetailVO.getTargetvalue())) { |
| | | serviceSubtaskDetailVO.setTargetvalue(svyTaskTemplateTargetoption.getTargetvalue()); |
| | | } else { |
| | | serviceSubtaskDetailVO.setTargetvalue(serviceSubtaskDetailVO.getTargetvalue() + " " + svyTaskTemplateTargetoption.getTargetvalue()); |
| | | } |
| | | |
| | | if (svyTaskTemplateTargetoption.getIsUserOperation() == true) { |
| | | ServiceSubtaskOptionAnswer serviceSubtaskOptionAnswer = new ServiceSubtaskOptionAnswer(); |
| | | serviceSubtaskOptionAnswer.setId(svyTaskTemplateTargetoption.getId()); |
| | | serviceSubtaskOptionAnswer.setCode(svyTaskTemplateTargetoption.getOptionCode()); |
| | | serviceSubtaskOptionAnswer.setValue(svyTaskTemplateTargetoption.getTargetvalue()); |
| | | serviceSubtaskOptionAnswer.setAppenddesc(svyTaskTemplateTargetoption.getAppenddesc()); |
| | | answerList.add(serviceSubtaskOptionAnswer); |
| | | //å°éä¸çç»ææ¾å°asrtextä¸ |
| | | if (StringUtils.isEmpty(serviceSubtaskDetailVO.getAsrtext())) { |
| | | serviceSubtaskDetailVO.setAsrtext(svyTaskTemplateTargetoption.getTargetvalue()); |
| | | } else { |
| | | //妿æ¯å¤éï¼çæ¡éè¦ç¨ & è¿è¡æ¼æ¥ |
| | | serviceSubtaskDetailVO.setAsrtext(serviceSubtaskDetailVO.getAnswerps() + "&" + svyTaskTemplateTargetoption.getTargetvalue()); |
| | | } |
| | | if (svyTaskTemplateScriptVO.getScriptType().equals("1") && svyTaskTemplateScriptVO.getBranchFlag().equals("1")) { |
| | | //æ¯åéï¼å¹¶ä¸æ¯æåæ¯ç |
| | | nextScriptNo = svyTaskTemplateTargetoption.getNextQuestion(); |
| | | } else { |
| | | nextScriptNo = svyTaskTemplateScriptVO.getNextScriptno(); |
| | | } |
| | | } |
| | | } |
| | | serviceSubtaskDetailVO.setSvyTaskTemplateTargetoptions(svyTaskTemplateScriptVO.getSvyTaskTemplateTargetoptions()); |
| | | } else { |
| | | //éåå¤é |
| | | if (CollectionUtils.isNotEmpty(svyTaskTemplateScriptVO.getSvyTaskTemplateTargetoptions())) { |
| | | ServiceSubtaskOptionAnswer serviceSubtaskOptionAnswer = new ServiceSubtaskOptionAnswer(); |
| | | serviceSubtaskOptionAnswer.setId(svyTaskTemplateScriptVO.getSvyTaskTemplateTargetoptions().get(0).getId()); |
| | | serviceSubtaskOptionAnswer.setCode(svyTaskTemplateScriptVO.getSvyTaskTemplateTargetoptions().get(0).getOptionCode()); |
| | | serviceSubtaskOptionAnswer.setValue(svyTaskTemplateScriptVO.getSvyTaskTemplateTargetoptions().get(0).getTargetvalue()); |
| | | serviceSubtaskOptionAnswer.setAppenddesc(svyTaskTemplateScriptVO.getSvyTaskTemplateTargetoptions().get(0).getAppenddesc()); |
| | | answerList.add(serviceSubtaskOptionAnswer); |
| | | serviceSubtaskDetailVO.setAsrtext(svyTaskTemplateScriptVO.getScriptResult()); |
| | | nextScriptNo = svyTaskTemplateScriptVO.getNextScriptno(); |
| | | } |
| | | } |
| | | serviceSubtaskAnswer.setTaskid(Long.valueOf(taskid)); |
| | | serviceSubtaskAnswer.setPatId(Long.valueOf(patid)); |
| | | serviceSubtaskAnswer.setScriptid(svyTaskTemplateScriptVO.getId()); |
| | | serviceSubtaskAnswer.setScriptType(Long.valueOf(svyTaskTemplateScriptVO.getScriptType())); |
| | | serviceSubtaskAnswer.setAnswer(JSON.toJSONString(answerList)); |
| | | serviceSubtaskAnswer.setComment(null); |
| | | serviceSubtaskAnswer.setCreateTime(new Date()); |
| | | serviceSubtaskAnswer.setUpdateTime(new Date()); |
| | | serviceSubtaskAnswerMapper.insertServiceSubtaskAnswer(serviceSubtaskAnswer); |
| | | serviceSubtaskDetailVO.setTaskid(Long.valueOf(taskid)); |
| | | serviceSubtaskDetailVO.setPatid(Long.valueOf(patid)); |
| | | serviceSubtaskDetailVO.setScriptid(svyTaskTemplateScriptVO.getId()); |
| | | serviceSubtaskDetailVO.setValueType(svyTaskTemplateScriptVO.getScriptType()); |
| | | serviceSubtaskDetailVO.setAsrtext(JSON.toJSONString(answerList)); |
| | | serviceSubtaskDetailVO.setComment(null); |
| | | serviceSubtaskDetailVO.setCreateTime(new Date()); |
| | | serviceSubtaskDetailVO.setUpdateTime(new Date()); |
| | | ServiceSubtaskDetail serviceSubtaskDetail = DtoConversionUtils.sourceToTarget(serviceSubtaskDetailVO, ServiceSubtaskDetail.class); |
| | | serviceSubtaskDetailMapper.insertServiceSubtaskDetail(serviceSubtaskDetail); |
| | | return nextScriptNo; |
| | | } |
| | | } |
| | |
| | | import com.smartor.config.PhoneUtils; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.mapper.*; |
| | | import com.smartor.service.IIvrTaskTemplateScriptService; |
| | | import com.smartor.service.IIvrTaskTemplateService; |
| | | import com.smartor.service.IServiceSubtaskService; |
| | | import com.smartor.service.IServiceTaskService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.regex.Matcher; |
| | | import java.util.regex.Pattern; |
| | | |
| | | import static cn.hutool.poi.excel.sax.AttributeName.r; |
| | | import static cn.hutool.poi.excel.sax.AttributeName.s; |
| | | |
| | | /** |
| | | * åä¸ä»»å¡ï¼é访ï¼Serviceä¸å¡å±å¤ç |
| | |
| | | private ServiceSubtaskMapper serviceSubtaskMapper; |
| | | |
| | | @Autowired |
| | | private ServiceSubtaskDetailMapper ivrTaskcalldetailMapper; |
| | | private ServiceSubtaskDetailMapper serviceSubtaskDetailMapper; |
| | | |
| | | @Autowired |
| | | private IServiceTaskService serviceTaskService; |
| | |
| | | |
| | | @Autowired |
| | | private IvrLibaExtemplatescriptMapper ivrLibaExtemplatescriptMapper; |
| | | |
| | | @Autowired |
| | | private IIvrTaskTemplateService ivrTaskTemplateService; |
| | | @Autowired |
| | | private IIvrTaskTemplateScriptService iIvrTaskTemplateScriptService; |
| | | |
| | | @Value("${pri_key}") |
| | | private String pri_key; |
| | |
| | | if (ObjectUtils.isNotEmpty(serviceTaskVO.getSendTimeslot())) |
| | | serviceTask.setSendTimeSlot(JSON.toJSONString(serviceTaskVO.getSendTimeslot())); |
| | | if (serviceTask.getSendState() == null) serviceTask.setSendState(1); |
| | | serviceTask.setTemplateid(serviceTaskVO.getLibtemplateid()); |
| | | serviceTask.setLibtemplateid(serviceTaskVO.getLibtemplateid().toString()); |
| | | serviceTask.setTemplateid(serviceTaskVO.getTemplateid()); |
| | | serviceTaskService.insertServiceTask(serviceTask); |
| | | |
| | | //å°ä»»å¡ä¿¡æ¯æ¾å°æå¡è¡¨ä¸ |
| | |
| | | serviceSubtask.setSendname(patTaskRelevance.getName()); |
| | | serviceSubtask.setAge(patTaskRelevance.getAge()); |
| | | serviceSubtask.setSfzh(patTaskRelevance.getSfzh()); |
| | | serviceSubtask.setPhone(patTaskRelevance.getPhone()); |
| | | serviceSubtask.setAddr(patTaskRelevance.getAddr()); |
| | | serviceSubtask.setPatid(patTaskRelevance.getPatid()); |
| | | serviceSubtask.setCreateTime(DateUtils.getNowDate()); |
| | | serviceSubtask.setSendstate(1L); |
| | | serviceSubtask.setType(serviceTaskVO.getHospType()); |
| | | serviceSubtask.setHospType(patTaskRelevance.getHospType()); |
| | | serviceSubtask.setOpenid(patTaskRelevance.getOpenid()); |
| | |
| | | serviceTask.setStopState(serviceTask1.getStopState() + 1); |
| | | serviceTask.setTemplateid(serviceTaskVO.getLibtemplateid()); |
| | | serviceTaskService.updateServiceTask(serviceTask); |
| | | |
| | | if (CollectionUtils.isNotEmpty(serviceTaskVO.getPatTaskRelevances())) { |
| | | for (PatTaskRelevance patTaskRelevance : serviceTaskVO.getPatTaskRelevances()) { |
| | | |
| | | ServiceSubtask serviceSubtask = DtoConversionUtils.sourceToTarget(serviceTaskVO, ServiceSubtask.class); |
| | | serviceSubtask.setSendname(patTaskRelevance.getName()); |
| | | serviceSubtask.setAge(patTaskRelevance.getAge()); |
| | | serviceSubtask.setSfzh(patTaskRelevance.getSfzh()); |
| | | serviceSubtask.setPhone(patTaskRelevance.getPhone()); |
| | | serviceSubtask.setAddr(patTaskRelevance.getAddr()); |
| | | serviceSubtask.setPatid(patTaskRelevance.getPatid()); |
| | | serviceSubtask.setOpenid(patTaskRelevance.getOpenid()); |
| | |
| | | |
| | | @Override |
| | | public void phoneCallBack(PhoneCallBackVO phoneCallBackVO) { |
| | | |
| | | phoneCallBackVO.setTextResult(phoneCallBackVO.getTextResult().substring(0, phoneCallBackVO.getTextResult().length() - 1)); |
| | | SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat("YYYY-MM-dd HH:mm:ss"); |
| | | |
| | |
| | | if (noVoice == ivrTaskTemplateVO.getNoVoiceNum().intValue()) { |
| | | //å·²ç»é®äºå¯¹åºçéæ°ï¼å°±å¤ææ¯å¦è¿æä¸ä¸é¢ |
| | | if (nowQuestion.getTargetid() == IvrTaskTemplateScriptVOs.size()) { |
| | | //没æä¸ä¸é¢äºï¼å°±ææçµè¯ï¼ææ¾ç»æè¯ |
| | | redisCache.setCacheObject(phoneCallBackVO.getUuid() + "hangup", 1, 120, TimeUnit.MINUTES); |
| | | phoneUtils.ttsPlayback(ivrTaskTemplateVO.getRevisitAfter(), phoneCallBackVO.getUuid()); |
| | | return; |
| | | } else { |
| | | //æä¸ä¸é¢ |
| | | redisCache.setCacheObject(phoneCallBackVO.getUuid() + "noVoice", 0, 120, TimeUnit.MINUTES); |
| | | IvrTaskTemplateScriptVO nextQuestion = getNextQuestion(IvrTaskTemplateScriptVOs, nowQuestion); |
| | | // é®é¢ï¼ å»è°ç¨âttsåæåææ¾âæ¥å£ |
| | | String date = simpleDateFormat1.format(new Date()); |
| | | log.info("å»è°ç¨ttsåæåææ¾æ¥å£: {},uuid为ï¼{}", date, phoneCallBackVO.getUuid()); |
| | | phoneUtils.ttsPlayback(nowQuestion.getScriptContent(), phoneCallBackVO.getUuid()); |
| | |
| | | Pattern pattern2 = Pattern.compile(nowQuestion.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2()); |
| | | matcher2 = pattern2.matcher(phoneCallBackVO.getTextResult()); |
| | | } |
| | | log.error("PCB--getQuestionTexté®é¢ä¸ºï¼{},UUIDï¼{}", nowQuestion.getScriptContent(), phoneCallBackVO.getUuid()); |
| | | if (StringUtils.isNotEmpty(nowQuestion.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() && StringUtils.isNotEmpty(nowQuestion.getIvrTaskScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches() || StringUtils.isEmpty(nowQuestion.getIvrTaskScriptTargetoptionList().get(j).getTargetregex()) && StringUtils.isNotEmpty(nowQuestion.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() || StringUtils.isEmpty(nowQuestion.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2()) && StringUtils.isNotEmpty(nowQuestion.getIvrTaskScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches()) { |
| | | //说æå¹é
æ£ç¡®äº |
| | | //è¿éåºè¯¥å
å¤æç±»åï¼å»åä¿®æ¹ï¼è®¾ç½®IsUserOperationæ¯åéé¢çæ¹æ³ |
| | | nowQuestion.getIvrTaskScriptTargetoptionList().get(j).setIsUserOperation(true); |
| | | serviceTaskScriptTargetoptionMapper.updateIvrTaskTemplateTargetoption(nowQuestion.getIvrTaskScriptTargetoptionList().get(j)); |
| | | |
| | | //å°éé»ç½®ä¸º0 |
| | | redisCache.setCacheObject(phoneCallBackVO.getUuid() + "noVoice", 0, 120, TimeUnit.MINUTES); |
| | | redisCache.setCacheObject(phoneCallBackVO.getUuid() + "mateNum", 0, 120, TimeUnit.MINUTES); |
| | | |
| | | //å°æ£è
çåç¾åè¿è¡¨é |
| | | IvrTaskVisitResult serviceTaskVisitResult = DtoConversionUtils.sourceToTarget(serviceSubtask, IvrTaskVisitResult.class); |
| | | serviceTaskVisitResult.setId(null); |
| | | serviceTaskVisitResult.setQuestion(nowQuestion.getScriptContent()); |
| | | serviceTaskVisitResult.setPatientAnswer(phoneCallBackVO.getTextResult()); |
| | | serviceTaskVisitResult.setCreateTime(new Date()); |
| | | serviceTaskVisitResult.setOptionResult(nowQuestion.getIvrTaskScriptTargetoptionList().get(j).getTargetvalue()); |
| | | serviceTaskVisitResultMapper.insertIvrTaskVisitResult(serviceTaskVisitResult); |
| | | |
| | | //å°å¹é
å°çæ è¯æ¹ætrue |
| | | isppd = true; |
| | | |
| | | //è·åä¸ä¸é¢ |
| | | Long nextQuestion = nowQuestion.getIvrTaskScriptTargetoptionList().get(j).getNextQuestion(); |
| | | for (IvrTaskTemplateScriptVO script : IvrTaskTemplateScriptVOs) { |
| | | if (script.getTargetid() == nextQuestion) { |
| | | QuestionMessage questionMessage = new QuestionMessage(); |
| | | questionMessage.setNowQuestion(script); |
| | | questionMessage.setQuestionList(IvrTaskTemplateScriptVOs); |
| | | redisCache.setCacheObject(phoneCallBackVO.getUuid() + "returnQues", questionMessage, 120, TimeUnit.MINUTES); |
| | | phoneUtils.ttsPlayback(script.getScriptContent(), phoneCallBackVO.getUuid()); |
| | | return; |
| | | } else if (nextQuestion > IvrTaskTemplateScriptVOs.size()) { |
| | | //没æä¸ä¸é¢äºï¼å°±ç»æäº |
| | | String date = simpleDateFormat1.format(new Date()); |
| | | log.error("没æä¸ä¸é¢äºï¼å°±ç»æäº: {},uuid为ï¼{}", date, phoneCallBackVO.getUuid()); |
| | | redisCache.setCacheObject(phoneCallBackVO.getUuid() + "hangup", 1, 120, TimeUnit.MINUTES); |
| | | phoneUtils.ttsPlayback(ivrTaskTemplateVO.getRevisitAfter(), phoneCallBackVO.getUuid()); |
| | | try { |
| | | Thread.sleep(3000); |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | phoneUtils.hangup("", "", ivrTaskTemplateVO.getRevisitAfter(), "", "", "", "", phoneCallBackVO.getUuid()); |
| | | return; |
| | | } |
| | | } |
| | | return; |
| | | } else { |
| | | //没æå¹é
ä¸å½åoption |
| | | //Targetregex2 为falseï¼è¡¨ç¤ºå¨Targetregex2ä¸åå¨ è¯å¥ä¸çå
³é®åï¼è¿ä¸ªoptionå°±ä¸ç¨åç»§ç»å¹é
äºï¼ç´æ¥å¹é
ä¸ä¸ä¸ªoption |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | if (isppd != true) { |
| | |
| | | IvrTaskTemplateScriptVO nextQuestion = getNextQuestion(IvrTaskTemplateScriptVOs, nowQuestion); |
| | | questionMessage.setQuestionList(IvrTaskTemplateScriptVOs); |
| | | 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.getScriptContent(), phoneCallBackVO.getUuid()); |
| | |
| | | //å°±å¯ä»¥ææçµè¯äº |
| | | String date = simpleDateFormat1.format(new Date()); |
| | | log.info("å°±å¯ä»¥ææçµè¯äº------: {},uuid为ï¼{}", date, phoneCallBackVO.getUuid()); |
| | | redisCache.setCacheObject(phoneCallBackVO.getUuid() + "hangup", 1, 120, TimeUnit.MINUTES); |
| | | phoneUtils.ttsPlayback(ivrTaskTemplateVO.getRevisitAfter(), phoneCallBackVO.getUuid()); |
| | | try { |
| | | Thread.sleep(3000); |
| | |
| | | } |
| | | List<IvrLibaExtemplatescript> ivrLibaExtemplatescripts = ivrLibaExtemplatescriptMapper.queryIvrLibaExtemplatescriptList(list1); |
| | | for (IvrLibaExtemplatescript ivrLibaExtemplatescript : ivrLibaExtemplatescripts) { |
| | | Matcher matcher = null; |
| | | if (StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex())) { |
| | | Pattern pattern = Pattern.compile(ivrLibaExtemplatescript.getSelfRegex()); |
| | | matcher = pattern.matcher(returnQues.getContent()); |
| | | pattern.matcher(returnQues.getContent()); |
| | | } |
| | | |
| | | Matcher matcher2 = null; |
| | | if (StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex2())) { |
| | | Pattern pattern2 = Pattern.compile(ivrLibaExtemplatescript.getSelfRegex2()); |
| | | matcher2 = pattern2.matcher(returnQues.getContent()); |
| | | pattern2.matcher(returnQues.getContent()); |
| | | } |
| | | log.info("++++++++++++++++++++++++++éç¨åºæ¯å¦ä¸ºç©ºï¼selfRegex : {} , selfRegex2 : {}", ivrLibaExtemplatescript.getSelfRegex(), ivrLibaExtemplatescript.getSelfRegex2()); |
| | | if (StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex()) && matcher.matches() && StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex2()) && matcher2.matches() || StringUtils.isEmpty(ivrLibaExtemplatescript.getSelfRegex()) && StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex2()) && matcher2.matches() || StringUtils.isEmpty(ivrLibaExtemplatescript.getSelfRegex2()) && StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex()) && matcher.matches()) { |
| | | QuestionMessage questionMessage = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "returnQues"); |
| | | IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO = returnQues.getNowQuestion(); |
| | | ivrTaskTemplateScriptVO.setSubmoduleText(ivrLibaExtemplatescript.getSwitchText()); |
| | | ivrTaskTemplateScriptVO.setSubmoduleVoice(ivrLibaExtemplatescript.getSwitchWav()); |
| | | redisCache.setCacheObject(phoneCallBackVO.getUuid() + "returnQues", questionMessage, 120, TimeUnit.MINUTES); |
| | | if (ivrLibaExtemplatescript.getIsEnd() == 1) { |
| | | //å°é®é¢ç½®ç©º |
| | | IvrTaskTemplateScriptVO nowQuestion1 = questionMessage.getNowQuestion(); |
| | | nowQuestion1.setScriptContent(null); |
| | | nowQuestion1.setScriptVoice(null); |
| | | questionMessage.setNowQuestion(nowQuestion1); |
| | | redisCache.setCacheObject(phoneCallBackVO.getUuid() + "returnQues", questionMessage, 120, TimeUnit.MINUTES); |
| | | |
| | | 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.getScriptContent() + ivrTaskTemplateScriptVO.getSubmoduleText(), phoneCallBackVO.getUuid()); |
| | | } |
| | | break; |
| | | } |
| | | String date = simpleDateFormat1.format(new Date()); |
| | |
| | | } |
| | | } |
| | | |
| | | //ä¸é¢ç代ç ä¸è½å é¤ï¼ä¸é¢çæ¹æ³åªæ¯é
åçµè¯ç«¯èè°ç¨çï¼ |
| | | // @Override |
| | | // public PhoneCallBackVO phoneCallBack(PhoneCallBackVO phoneCallBackVO) { |
| | | // log.error("phoneCallBackVOçå
¥åï¼{},{},{},{},{},{},{}", phoneCallBackVO.getResultType(), phoneCallBackVO.getUuid(), phoneCallBackVO.getErrResult(), phoneCallBackVO.getTextResult(), phoneCallBackVO.getHangUpResult(), phoneCallBackVO.getEnumState(), phoneCallBackVO.getUint8()); |
| | | // //è·åæ°æ® |
| | | // Boolean aBoolean = redisCache.hasKey(phoneCallBackVO.getUuid()); |
| | | // if (!aBoolean) { |
| | | // throw new BaseException("该uuidä¸åå¨"); |
| | | // } |
| | | // Integer hangupValue = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "hangup"); |
| | | // if (hangupValue != null && hangupValue == 1) { |
| | | // //hangupValue == 1 éè®¿ç»æï¼ç´æ¥å¯ä»¥æçµè¯ |
| | | // PhoneUtils phoneUtils = new PhoneUtils(); |
| | | // phoneUtils.hangup(phoneCallBackVO.getUuid(), null, null, null, null, null, null, null); |
| | | /** |
| | | * çµè¯ASRéè¯åè°(é¨ç»®) |
| | | * |
| | | * @param phoneCallReqYQVO |
| | | */ |
| | | @Override |
| | | public PhoneCallBackYQVO phoneCallBackYQ(PhoneCallReqYQVO phoneCallReqYQVO) { |
| | | PhoneCallBackYQVO phoneCallBackYQVO = new PhoneCallBackYQVO(); |
| | | //channel_create ééåå»ºçæ¶åï¼å¯ä»¥æ§è¡ä¸äºå
¶å®æä½ï¼è¬å¦å个çä¿¡ä¹ç±»ç; æä»¬çä¸å¡å¯ä»¥ä¸ç¨ç®¡ PlayEventCallback è¿ä¸ªæ¯ææ¾è¯é³ç,ææ¶ç¨ä¸å° End_time()= -1ænull表示å½åçasrtext䏿¯ä¸å¥å®æ´çè¯ |
| | | if (phoneCallReqYQVO.getOperate().equals("channel_create") || phoneCallReqYQVO.getOperate().equals("PlayEventCallback") || phoneCallReqYQVO.getEnd_time() == null || phoneCallReqYQVO.getEnd_time() == -1) { |
| | | return phoneCallBackYQVO; |
| | | } |
| | | //éè¿åä»»å¡IDè·åå°æ¨¡æ¿ä¿¡æ¯ |
| | | ServiceSubtask serviceSubtask = serviceSubtaskMapper.selectServiceSubtaskById(Long.valueOf(phoneCallReqYQVO.getTaskid())); |
| | | IvrTaskTemplate ivrTaskTemplate = ivrTaskTemplateService.selectIvrTaskTemplateByID(serviceSubtask.getTemplateid()); |
| | | //è·å模æ¿é®é¢ |
| | | IvrTaskTemplateScript ivrTaskTemplateScript = new IvrTaskTemplateScript(); |
| | | ivrTaskTemplateScript.setTemplateID(serviceSubtask.getTemplateid()); |
| | | List<IvrTaskTemplateScript> ivrTaskTemplateScripts = iIvrTaskTemplateScriptService.selectIvrTaskTemplateScriptList(ivrTaskTemplateScript); |
| | | //è·åé®é¢ID å åºå· |
| | | String scriptId = redisCache.getCacheObject(phoneCallReqYQVO.getTaskid().trim() + "-" + phoneCallReqYQVO.getPhone().trim()); |
| | | log.error("scriptIdæ¯å¤å°ï¼{}", scriptId); |
| | | //å½åé¢çä¿¡æ¯ |
| | | IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO = iIvrTaskTemplateScriptService.getTaskTempScriptInfoByid(Long.valueOf(scriptId)); |
| | | //夿UUIDæ¯å¦åå¨ |
| | | Boolean aBoolean = redisCache.hasKey(phoneCallReqYQVO.getUuid()); |
| | | if (!aBoolean) { |
| | | //ç»éé»è®¾ç½®ä¸ä¸ªé»è®¤æ¬¡æ°å¨redisä¸ |
| | | redisCache.setCacheObject(phoneCallReqYQVO.getUuid() + "noVoice", 0, 120, TimeUnit.MINUTES); |
| | | } |
| | | |
| | | if ("SilentCallback".equals(phoneCallReqYQVO.getOperate())) { |
| | | //妿æ¯éé»åè° |
| | | Integer num = redisCache.getCacheObject(phoneCallReqYQVO.getUuid() + "noVoice"); |
| | | //夿éé»åè°æ¬¡æ°æ¯å¦å°ä¸æ¨¡æ¿è§å®çæ¬¡æ° |
| | | if (num < ivrTaskTemplate.getNoVoiceNum()) { |
| | | //å°ä¸çè¯,就继ç»é®æ£è
|
| | | phoneCallBackYQVO.setType("text"); |
| | | phoneCallBackYQVO.setSilent_interval(ivrTaskTemplate.getSilencetime().intValue()); |
| | | String scriptContent = ivrTaskTemplateScriptVO.getScriptContent(); |
| | | phoneCallBackYQVO.setValue(getObject(serviceSubtask, scriptContent)); |
| | | //å°é黿¬¡æ°å 1 |
| | | Integer noVoiceNum = redisCache.getCacheObject(phoneCallReqYQVO.getUuid() + "noVoice"); |
| | | redisCache.setCacheObject(phoneCallReqYQVO.getUuid() + "noVoice", noVoiceNum + 1, 120, TimeUnit.MINUTES); |
| | | } else { |
| | | log.error("é黿¬¡æ°è¾¾å°,ææçµè¯ï¼{}", num); |
| | | //大ä¸çäºçè¯,ç´æ¥ææ |
| | | phoneCallBackYQVO.setType("hangup"); |
| | | phoneCallBackYQVO.setSilent_interval(ivrTaskTemplate.getSilencetime().intValue()); |
| | | phoneCallBackYQVO.setValue(ivrTaskTemplate.getRevisitAfter()); |
| | | //å°ç»æåå°detailä¸ |
| | | ServiceSubTaskDetailReq serviceSubTaskDetailReq = new ServiceSubTaskDetailReq(); |
| | | List<ServiceSubtaskDetail> serviceSubtaskDetailList = new ArrayList<>(); |
| | | serviceSubtaskDetailList.add(getServiceSubtaskDetail(phoneCallReqYQVO, ivrTaskTemplateScriptVO, serviceSubtask, ivrTaskTemplate)); |
| | | serviceSubTaskDetailReq.setServiceSubtaskDetailList(serviceSubtaskDetailList); |
| | | saveQuestionAnswerPhone(serviceSubTaskDetailReq); |
| | | redisCache.deleteObject(serviceSubtask.getId() + "-" + serviceSubtask.getPhone()); |
| | | } |
| | | return phoneCallBackYQVO; |
| | | } else if ("AsrCallback".equals(phoneCallReqYQVO.getOperate())) { |
| | | //å¦ææ¯ææ¬åè° |
| | | //æ ¹æ®é®é¢IDè·å该é®é¢çç±»å |
| | | if (ivrTaskTemplateScriptVO.getScriptType().equals("1")) { |
| | | //æ¯éæ©é¢ |
| | | for (int j = 0; j < ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().size(); j++) { |
| | | log.error("phoneCallReqYQVO.getAsrtext()çå¼ä¸ºï¼{}", phoneCallReqYQVO.getAsrtext()); |
| | | if (StringUtils.isEmpty(phoneCallReqYQVO.getAsrtext())) { |
| | | continue; |
| | | } |
| | | //å
å« |
| | | Matcher matcher = null; |
| | | if (StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex())) { |
| | | Pattern pattern = Pattern.compile(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex()); |
| | | matcher = pattern.matcher(phoneCallReqYQVO.getAsrtext()); |
| | | } |
| | | //ä¸å
å« |
| | | Matcher matcher2 = null; |
| | | if (StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2())) { |
| | | Pattern pattern2 = Pattern.compile(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2()); |
| | | matcher2 = pattern2.matcher(phoneCallReqYQVO.getAsrtext()); |
| | | } |
| | | if (StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() && StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches() || StringUtils.isEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex()) && StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() || StringUtils.isEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2()) && StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches()) { |
| | | //说æå¹é
æ£ç¡®äº |
| | | //è¿éåºè¯¥å
å¤æç±»åï¼å»åä¿®æ¹ï¼è®¾ç½®IsUserOperationæ¯åéé¢çæ¹æ³ |
| | | ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).setIsUserOperation(1); |
| | | serviceTaskScriptTargetoptionMapper.updateIvrTaskTemplateTargetoption(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j)); |
| | | |
| | | //å°æ£è
çåç¾åè¿service_subtask_detailä¸ |
| | | ServiceSubTaskDetailReq serviceSubTaskDetailReq = new ServiceSubTaskDetailReq(); |
| | | List<ServiceSubtaskDetail> serviceSubtaskDetailList = new ArrayList<>(); |
| | | ivrTaskTemplateScriptVO.setQuestionResult(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getOptiondesc()); |
| | | serviceSubtaskDetailList.add(getServiceSubtaskDetail(phoneCallReqYQVO, ivrTaskTemplateScriptVO, serviceSubtask, ivrTaskTemplate)); |
| | | serviceSubTaskDetailReq.setServiceSubtaskDetailList(serviceSubtaskDetailList); |
| | | saveQuestionAnswerPhone(serviceSubTaskDetailReq); |
| | | // |
| | | // } |
| | | // |
| | | // Map<String, Object> map = redisCache.getCacheObject(phoneCallBackVO.getUuid()); |
| | | //// ObjectMapper objectMapper = new ObjectMapper(); |
| | | //// Map<String, Object> map = null; |
| | | //// try { |
| | | //// map = objectMapper.readValue(cacheObject, Map.class); |
| | | //// } catch (JsonProcessingException e) { |
| | | //// e.printStackTrace(); |
| | | //// } |
| | | // |
| | | // ServiceSubtask ServiceSubtask = (ServiceSubtask) map.get("ServiceSubtask"); |
| | | // List<IvrLibaTemplateScriptVO> ivrLibaTemplateScriptVOs = (List<IvrLibaTemplateScriptVO>) map.get("ivrLibaTemplateScriptVO"); |
| | | // //å°uuidæ´æ°å°æ°æ®åºä¸ |
| | | // ServiceSubtask.setSenduuid(phoneCallBackVO.getUuid()); |
| | | // ServiceSubtaskMapper.updateServiceSubtask(ServiceSubtask); |
| | | // |
| | | // //è·å模æ¿ä¿¡æ¯ |
| | | // IvrLibaTemplateVO ivrLibaTemplateVO = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "ivrLibaTemplateVO"); |
| | | // |
| | | // |
| | | // //é¦å
夿resultType |
| | | // if (phoneCallBackVO.getResultType() == 1) { |
| | | // //å¼å«ç»ææ¥å£: 1 |
| | | // if (phoneCallBackVO.getUint8() == 1) { |
| | | // //å¼å«å¤±è´¥ï¼å»redisä¸è®°å½ä¸ä¸å¤±è´¥æ¬¡æ°ï¼è¿è¡å次å¼å« |
| | | // Integer integer = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "uint8"); |
| | | // if (integer != null) { |
| | | // redisCache.setCacheObject(phoneCallBackVO.getUuid() + "uint8", integer + 1, 120, TimeUnit.MINUTES); |
| | | // } else { |
| | | // redisCache.setCacheObject(phoneCallBackVO.getUuid() + "uint8", 1, 120, TimeUnit.MINUTES); |
| | | // } |
| | | // |
| | | // if (integer != null && integer == ServiceSubtask.getRecallcount().intValue()) { |
| | | // log.info("æ 人æ¥å¬ï¼{}, {}", phoneCallBackVO.getErrResult(), phoneCallBackVO.getUuid()); |
| | | // //è¿ç»æè§å®æ¬¡ï¼å¦æè¦æ²¡äººæ¥ï¼é£å°±ç»æ |
| | | // ServiceSubtask.setResult(phoneCallBackVO.getErrResult()); |
| | | // ServiceSubtaskMapper.updateServiceSubtask(ServiceSubtask); |
| | | // redisCache.deleteObject(phoneCallBackVO.getUuid() + "uint8"); |
| | | // } else if (integer != null && integer < ServiceSubtask.getRecallcount().intValue()) { |
| | | // //è¿è¡éæ¨ |
| | | // PhoneUtils phoneUtils = new PhoneUtils(); |
| | | // phoneUtils.ob(null, null, null, null, null, null, null, ServiceSubtask.getPhone(), phoneCallBackVO.getUuid(), true); |
| | | // } |
| | | // } |
| | | // |
| | | // } else if (phoneCallBackVO.getResultType() == 2) { |
| | | // //éè¯ç¶ææ´æ°æ¥å£: 2 |
| | | // if (phoneCallBackVO.getEnumState() == 0) { |
| | | // // 0-æ¯é |
| | | // Integer integer = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "enumState"); |
| | | // |
| | | // if (integer != null && integer < ServiceSubtask.getRecallcount().intValue()) { |
| | | // redisCache.setCacheObject(phoneCallBackVO.getUuid() + "enumState", integer + 1, 120, TimeUnit.MINUTES); |
| | | // } else if (integer == null) { |
| | | // redisCache.setCacheObject(phoneCallBackVO.getUuid() + "enumState", 1, 120, TimeUnit.MINUTES); |
| | | // } else if (integer != null && integer == ServiceSubtask.getRecallcount().intValue()) { |
| | | // ServiceSubtask.setResult("æ 人æ¥å¬"); |
| | | // ServiceSubtaskMapper.updateServiceSubtask(ServiceSubtask); |
| | | // redisCache.deleteObject(phoneCallBackVO.getUuid() + "enumState"); |
| | | // } |
| | | // } else if (phoneCallBackVO.getEnumState() == 2) { |
| | | // //æ£è
ææçµè¯ |
| | | // log.info("æ£è
ææçµè¯ï¼{}", phoneCallBackVO.getUuid()); |
| | | // ServiceSubtask.setResult(phoneCallBackVO.getHangUpResult()); |
| | | // ServiceSubtaskMapper.updateServiceSubtask(ServiceSubtask); |
| | | // redisCache.deleteObject(phoneCallBackVO.getUuid() + "enumState"); |
| | | // } |
| | | // |
| | | // |
| | | // } else if (phoneCallBackVO.getResultType() == 3) { |
| | | // //è¯é³è¯å«ç»æä¸æ¥æ¥å£: 3 |
| | | // Integer noVoice = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "noVoice"); |
| | | // QuestionMessage returnQues = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "returnQues"); |
| | | // IvrLibaTemplateScriptVO nowQuestion = returnQues.getNowQuestion(); |
| | | // PhoneUtils phoneUtils = new PhoneUtils(); |
| | | // |
| | | // if (StringUtils.isEmpty(phoneCallBackVO.getTextResult())) { |
| | | // //æ åè¯ |
| | | // //夿noVoiceæ¯å¦å·²ç»å°äºæå¤§å¼ |
| | | // if (noVoice == ivrLibaTemplateVO.getNoVoiceNum().intValue()) { |
| | | // //å·²ç»é®äºå¯¹åºçéæ°ï¼å°±å¤ææ¯å¦è¿æä¸ä¸é¢ |
| | | // if (nowQuestion.getTargetid() == ivrLibaTemplateScriptVOs.size()) { |
| | | // //没æä¸ä¸é¢äºï¼å°±ææçµè¯ï¼ææ¾ç»æè¯ |
| | | // redisCache.setCacheObject(phoneCallBackVO.getUuid() + "hangup", 1, 120, TimeUnit.MINUTES); |
| | | // phoneUtils.ttsPlayback(ivrLibaTemplateVO.getRevisitAfter(), phoneCallBackVO.getUuid()); |
| | | // } else { |
| | | // //æä¸ä¸é¢ |
| | | // redisCache.setCacheObject(phoneCallBackVO.getUuid() + "noVoice", 0, 120, TimeUnit.MINUTES); |
| | | // IvrLibaTemplateScriptVO nextQuestion = getNextQuestion(ivrLibaTemplateScriptVOs, nowQuestion); |
| | | // // é®é¢ï¼ å»è°ç¨âttsåæåææ¾âæ¥å£ |
| | | // phoneUtils.ttsPlayback(nowQuestion.getQuestionText(), phoneCallBackVO.getUuid()); |
| | | // } |
| | | // } else { |
| | | // redisCache.setCacheObject(phoneCallBackVO.getUuid() + "noVoice", noVoice + 1, 120, TimeUnit.MINUTES); |
| | | // //è°ç¨ivrLibaTemplateScriptVOä¸çslienceText(éé»è¯æ¯) |
| | | // String slienceText = nowQuestion.getSlienceText(); |
| | | // //éé»è¯æ¯ + é®é¢ï¼ å»è°ç¨âttsåæåææ¾âæ¥å£ |
| | | // phoneUtils.ttsPlayback(slienceText + nowQuestion.getQuestionText(), phoneCallBackVO.getUuid()); |
| | | // return new PhoneCallBackVO(); |
| | | // } |
| | | // |
| | | // } else { |
| | | // //æåè¯ï¼å¯¹åççé®é¢,è¿è¡æ£åå¹é
ï¼è¿éåªé坹鿩é¢ï¼å
¶å®é¢åä¸è¡ï¼ |
| | | // for (int j = 0; j < nowQuestion.getIvrLibaScriptTargetoptionList().size(); j++) { |
| | | // //å
å« |
| | | // Matcher matcher = null; |
| | | // if (StringUtils.isNotEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex())) { |
| | | // Pattern pattern = Pattern.compile(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()); |
| | | // matcher = pattern.matcher(phoneCallBackVO.getTextResult()); |
| | | // } |
| | | // //ä¸å
å« |
| | | // Matcher matcher2 = null; |
| | | // if (StringUtils.isNotEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2())) { |
| | | // 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).getTargetregex()) && matcher.matches() && StringUtils.isNotEmpty(nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.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); |
| | | // ivrLibaScriptTargetoptionMapper.updateIvrLibaTemplateTargetoption(nowQuestion.getIvrLibaScriptTargetoptionList().get(j)); |
| | | // |
| | | // |
| | | // //å°éé»ç½®ä¸º0 |
| | | // redisCache.setCacheObject(phoneCallBackVO.getUuid() + "noVoice", 0, 120, TimeUnit.MINUTES); |
| | | // redisCache.setCacheObject(phoneCallBackVO.getUuid() + "mateNum", 0, 120, TimeUnit.MINUTES); |
| | | // //è·åä¸ä¸é¢ |
| | | // Integer nextQuestion = nowQuestion.getIvrLibaScriptTargetoptionList().get(j).getNextQuestion(); |
| | | // for (IvrLibaTemplateScriptVO script : ivrLibaTemplateScriptVOs) { |
| | | // if (script.getTargetid() == nextQuestion) { |
| | | // QuestionMessage questionMessage = new QuestionMessage(); |
| | | // questionMessage.setNowQuestion(script); |
| | | // questionMessage.setQuestionList(ivrLibaTemplateScriptVOs); |
| | | // redisCache.setCacheObject(phoneCallBackVO.getUuid() + "returnQues", questionMessage, 120, TimeUnit.MINUTES); |
| | | // break; |
| | | // } |
| | | // } |
| | | // break; |
| | | // } else { |
| | | // //没æå¹é
å° |
| | | // Integer mateNum = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "mateNum"); |
| | | // //æ å¹é
次æ°å»å¤ææ¯å¦å°æå¤§è¯¢é®æ¬¡æ°ï¼å¹¶ä¸ææçé项é½å¹é
å®äº |
| | | // if (mateNum == ivrLibaTemplateVO.getMateNum().intValue() && j == nowQuestion.getIvrLibaScriptTargetoptionList().size() - 1) { |
| | | // //妿ä¸ä¸é¢ä¸ºç©º.åæ°çæ°æ®è¿å,å¹¶å ä¸æè°¢è¯ |
| | | // if (nowQuestion.getTargetid() < ivrLibaTemplateScriptVOs.size()) { |
| | | // QuestionMessage questionMessage = new QuestionMessage(); |
| | | // IvrLibaTemplateScriptVO nextQuestion = getNextQuestion(ivrLibaTemplateScriptVOs, nowQuestion); |
| | | // questionMessage.setQuestionList(ivrLibaTemplateScriptVOs); |
| | | // questionMessage.setNowQuestion(nextQuestion); |
| | | // redisCache.setCacheObject(phoneCallBackVO.getUuid() + "returnQues", questionMessage, 120, TimeUnit.MINUTES); |
| | | // redisCache.setCacheObject(phoneCallBackVO.getUuid() + "mateNum", 0, 120, TimeUnit.MINUTES); |
| | | // } else { |
| | | // //å°±å¯ä»¥ææçµè¯äº |
| | | // redisCache.setCacheObject(phoneCallBackVO.getUuid() + "hangup", 1, 120, TimeUnit.MINUTES); |
| | | // phoneUtils.ttsPlayback(ivrLibaTemplateVO.getRevisitAfter(), phoneCallBackVO.getUuid()); |
| | | // break; |
| | | // } |
| | | // } else if (mateNum < ivrLibaTemplateVO.getMateNum().intValue() && j == nowQuestion.getIvrLibaScriptTargetoptionList().size() - 1) { |
| | | // //没æé®å°è§å®æ¬¡æ° |
| | | // mateNum = mateNum + 1; |
| | | // redisCache.setCacheObject(phoneCallBackVO.getUuid() + "mateNum", mateNum, 120, TimeUnit.MINUTES); |
| | | // } |
| | | // } |
| | | // |
| | | // } |
| | | // //é项å¹é
宿åï¼éè¦åå»éè¿åºåè¿è¡å¹é
䏿¬¡ |
| | | // String extemplateID = ivrLibaTemplateVO.getSubmoduleID(); |
| | | // String[] split = extemplateID.split(","); |
| | | // List<String> list = Arrays.asList(split); |
| | | // List<Long> list1 = new ArrayList<>(); |
| | | // if (StringUtils.isNotEmpty(extemplateID)) { |
| | | // for (String str : list) { |
| | | // list1.add(Long.valueOf(str)); |
| | | // } |
| | | // List<IvrLibaExtemplatescript> ivrLibaExtemplatescripts = ivrLibaExtemplatescriptMapper.queryIvrLibaExtemplatescriptList(list1); |
| | | // for (IvrLibaExtemplatescript ivrLibaExtemplatescript : ivrLibaExtemplatescripts) { |
| | | // Matcher matcher = null; |
| | | // if (StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex())) { |
| | | // Pattern pattern = Pattern.compile(ivrLibaExtemplatescript.getSelfRegex()); |
| | | // matcher = pattern.matcher(returnQues.getContent()); |
| | | // } |
| | | // |
| | | // Matcher matcher2 = null; |
| | | // if (StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex2())) { |
| | | // Pattern pattern2 = Pattern.compile(ivrLibaExtemplatescript.getSelfRegex2()); |
| | | // matcher2 = pattern2.matcher(returnQues.getContent()); |
| | | // } |
| | | // log.info("++++++++++++++++++++++++++éç¨åºæ¯å¦ä¸ºç©ºï¼selfRegex : {} , selfRegex2 : {}", ivrLibaExtemplatescript.getSelfRegex(), ivrLibaExtemplatescript.getSelfRegex2()); |
| | | // if (StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex()) && matcher.matches() && StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex2()) && matcher2.matches() || StringUtils.isEmpty(ivrLibaExtemplatescript.getSelfRegex()) && StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex2()) && matcher2.matches() || StringUtils.isEmpty(ivrLibaExtemplatescript.getSelfRegex2()) && StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex()) && matcher.matches()) { |
| | | // QuestionMessage questionMessage = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "returnQues"); |
| | | // IvrLibaTemplateScriptVO ivrLibaTemplateScriptVO = returnQues.getNowQuestion(); |
| | | // ivrLibaTemplateScriptVO.setSubmoduleText(ivrLibaExtemplatescript.getSwitchText()); |
| | | // ivrLibaTemplateScriptVO.setSubmoduleVoice(ivrLibaExtemplatescript.getSwitchWav()); |
| | | // redisCache.setCacheObject(phoneCallBackVO.getUuid() + "returnQues", questionMessage, 120, TimeUnit.MINUTES); |
| | | // if (ivrLibaExtemplatescript.getIsEnd() == 1) { |
| | | // //å°é®é¢ç½®ç©º |
| | | // IvrLibaTemplateScriptVO nowQuestion1 = questionMessage.getNowQuestion(); |
| | | // nowQuestion1.setQuestionText(null); |
| | | // nowQuestion1.setQuestionVoice(null); |
| | | // questionMessage.setNowQuestion(nowQuestion1); |
| | | // redisCache.setCacheObject(phoneCallBackVO.getUuid() + "returnQues", questionMessage, 120, TimeUnit.MINUTES); |
| | | // |
| | | // redisCache.setCacheObject(phoneCallBackVO.getUuid() + "isOver", 1, 120, TimeUnit.MINUTES); |
| | | // } |
| | | // |
| | | // //è°ç¨â15ãttsåæåææ¾ï¼ tts_playbackâå°ç»æä¼ å |
| | | // |
| | | // |
| | | // } |
| | | // break; |
| | | // } |
| | | // } |
| | | // |
| | | // } |
| | | // } |
| | | // return phoneCallBackVO; |
| | | // } |
| | | if (ivrTaskTemplateScriptVO.getBranchFlag().equals("1") || ivrTaskTemplateScriptVO.getBranchFlag().equals("0") && ivrTaskTemplateScriptVO.getNextScriptno() != 0) { |
| | | Long nextQuestion = null; |
| | | if (ivrTaskTemplateScriptVO.getBranchFlag().equals("1")) { |
| | | nextQuestion = ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getNextQuestion(); |
| | | } else { |
| | | nextQuestion = ivrTaskTemplateScriptVO.getNextScriptno(); |
| | | } |
| | | |
| | | |
| | | for (IvrTaskTemplateScript script : ivrTaskTemplateScripts) { |
| | | if (script.getSort() == nextQuestion.intValue()) { |
| | | phoneCallBackYQVO.setType("text"); |
| | | phoneCallBackYQVO.setSilent_interval(ivrTaskTemplate.getSilencetime().intValue()); |
| | | String scriptContent = script.getScriptContent(); |
| | | phoneCallBackYQVO.setValue(getObject(serviceSubtask, scriptContent)); |
| | | //å°è¯¥æ£è
çRedisä¸çé¢ç®IDï¼è¿è¡ä¿®æ¹ |
| | | redisCache.setCacheObject(phoneCallReqYQVO.getTaskid().trim() + "-" + phoneCallReqYQVO.getPhone().trim(), script.getId().toString(), 120, TimeUnit.MINUTES); |
| | | //å 餿 ååº |
| | | redisCache.deleteObject(phoneCallReqYQVO.getTaskid().trim() + "&&" + "mate" + "&&" + phoneCallReqYQVO.getUuid()); |
| | | } |
| | | } |
| | | } else if (ivrTaskTemplateScriptVO.getBranchFlag().equals("0")) { |
| | | if (ivrTaskTemplateScriptVO.getNextScriptno() == 0 || ivrTaskTemplateScriptVO.getNextScriptno() == null) { |
| | | phoneCallBackYQVO.setType("hangup"); |
| | | phoneCallBackYQVO.setSilent_interval(ivrTaskTemplate.getSilencetime().intValue()); |
| | | //è®¾ç½®ç»æè¯ |
| | | phoneCallBackYQVO.setValue(ivrTaskTemplate.getRevisitAfter()); |
| | | Long id = serviceSubtask.getId(); |
| | | Map<String, String> map = delRedisValue(null, id.toString()); |
| | | redisCache.setCacheObject(map.get("cacheName"), map.get("val")); |
| | | redisCache.deleteObject(serviceSubtask.getId() + "-" + serviceSubtask.getPhone()); |
| | | redisCache.deleteObject(phoneCallReqYQVO.getTaskid().trim() + "&&" + "mate" + "&&" + phoneCallReqYQVO.getUuid()); |
| | | // return phoneCallBackYQVO; |
| | | } |
| | | } |
| | | } else { |
| | | continue; |
| | | } |
| | | } |
| | | //齿²¡æå¹é
å° |
| | | if (StringUtils.isEmpty(phoneCallBackYQVO.getValue())) { |
| | | Integer count = redisCache.getCacheObject(phoneCallReqYQVO.getTaskid().trim() + "&&" + "mate" + "&&" + phoneCallReqYQVO.getUuid()); |
| | | if (count != null && count >= ivrTaskTemplate.getMateNum()) { |
| | | //妿countå·²ç»å¤§äºæçäºæ²¡æå¹é
æ¬¡æ° |
| | | if (ivrTaskTemplateScriptVO.getBranchFlag().equals("0") && ivrTaskTemplateScriptVO.getNextScriptno() == null || ivrTaskTemplateScriptVO.getBranchFlag().equals("0") && ivrTaskTemplateScriptVO.getNextScriptno() == 0 || ivrTaskTemplateScriptVO.getBranchFlag().equals("1") && ivrTaskTemplateScriptVO.getNextScriptno() == null || ivrTaskTemplateScriptVO.getBranchFlag().equals("1") && ivrTaskTemplateScriptVO.getNextScriptno() == 0) { |
| | | //å¦ææ¯æåä¸éé¢ï¼æè
没æä¸ä¸é¢äºï¼å°±ç´æ¥ææº |
| | | phoneCallBackYQVO.setType("hangup"); |
| | | phoneCallBackYQVO.setSilent_interval(ivrTaskTemplate.getSilencetime().intValue()); |
| | | if (StringUtils.isNotEmpty(phoneCallBackYQVO.getValue())) |
| | | phoneCallBackYQVO.setValue(phoneCallBackYQVO.getValue() + ivrTaskTemplate.getRevisitAfter()); |
| | | else phoneCallBackYQVO.setValue(ivrTaskTemplate.getRevisitAfter()); |
| | | //å»redisä¸ï¼æè¯¥åä»»å¡IDå é¤ |
| | | Long id = serviceSubtask.getId(); |
| | | Map<String, String> map = delRedisValue(null, id.toString()); |
| | | redisCache.setCacheObject(map.get("cacheName"), map.get("val")); |
| | | redisCache.deleteObject(serviceSubtask.getId() + "-" + serviceSubtask.getPhone()); |
| | | // return phoneCallBackYQVO; |
| | | } else { |
| | | //æ ¹æ®ivrTaskTemplateScriptVO.getNextScriptno()è·åä¸ä¸é¢è¿è¡æé® |
| | | for (IvrTaskTemplateScript script : ivrTaskTemplateScripts) { |
| | | if (script.getSort() == ivrTaskTemplateScriptVO.getNextScriptno().intValue()) { |
| | | phoneCallBackYQVO.setType("text"); |
| | | phoneCallBackYQVO.setSilent_interval(ivrTaskTemplate.getSilencetime().intValue()); |
| | | String scriptContent = script.getScriptContent(); |
| | | phoneCallBackYQVO.setValue(getObject(serviceSubtask, scriptContent)); |
| | | //å°è¯¥æ£è
çRedisä¸çé¢ç®IDï¼è¿è¡ä¿®æ¹ |
| | | redisCache.setCacheObject(phoneCallReqYQVO.getTaskid().trim() + "-" + phoneCallReqYQVO.getPhone().trim(), script.getId().toString(), 120, TimeUnit.MINUTES); |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | if (count == null) |
| | | redisCache.setCacheObject(phoneCallReqYQVO.getTaskid().trim() + "&&" + "mate" + "&&" + phoneCallReqYQVO.getUuid(), 1, 120, TimeUnit.MINUTES); |
| | | else |
| | | redisCache.setCacheObject(phoneCallReqYQVO.getTaskid().trim() + "&&" + "mate" + "&&" + phoneCallReqYQVO.getUuid(), count + 1, 120, TimeUnit.MINUTES); |
| | | |
| | | phoneCallBackYQVO.setType("text"); |
| | | phoneCallBackYQVO.setValue(ivrTaskTemplateScriptVO.getNoMatchText() + getObject(serviceSubtask, ivrTaskTemplateScriptVO.getScriptContent())); |
| | | } |
| | | } |
| | | |
| | | } else { |
| | | //䏿¯éæ©é¢,ç´æ¥è®°å½çæ¡ï¼å°ç»æåå°detailä¸ |
| | | ServiceSubTaskDetailReq serviceSubTaskDetailReq = new ServiceSubTaskDetailReq(); |
| | | List<ServiceSubtaskDetail> serviceSubtaskDetailList = new ArrayList<>(); |
| | | serviceSubtaskDetailList.add(getServiceSubtaskDetail(phoneCallReqYQVO, ivrTaskTemplateScriptVO, serviceSubtask, ivrTaskTemplate)); |
| | | serviceSubTaskDetailReq.setServiceSubtaskDetailList(serviceSubtaskDetailList); |
| | | saveQuestionAnswerPhone(serviceSubTaskDetailReq); |
| | | |
| | | //妿éé¡¹åæ¯ä¸º1çè¯ï¼åéè¦æ ¹æ®é®é¢ä¸çnextScriptnoè¿è¡è·³è½¬ |
| | | //é®ç颿²¡æè·³è½¬ |
| | | if (ivrTaskTemplateScriptVO.getNextScriptno() != null || ivrTaskTemplateScriptVO.getNextScriptno() != 0) { |
| | | for (IvrTaskTemplateScript ivrTaskTemplateScript1 : ivrTaskTemplateScripts) { |
| | | if (ivrTaskTemplateScriptVO.getNextScriptno().intValue() == ivrTaskTemplateScript1.getSort()) { |
| | | phoneCallBackYQVO.setType("text"); |
| | | phoneCallBackYQVO.setSilent_interval(ivrTaskTemplate.getSilencetime().intValue()); |
| | | String scriptContent = ivrTaskTemplateScript1.getScriptContent(); |
| | | phoneCallBackYQVO.setValue(getObject(serviceSubtask, scriptContent)); |
| | | redisCache.deleteObject(phoneCallReqYQVO.getTaskid().trim() + "&&" + "mate" + "&&" + phoneCallReqYQVO.getUuid()); |
| | | } |
| | | } |
| | | } else if (ivrTaskTemplateScriptVO.getNextScriptno() == null) { |
| | | //没æä¸ä¸é¢äºï¼å°±ç»æäº |
| | | phoneCallBackYQVO.setType("hangup"); |
| | | phoneCallBackYQVO.setSilent_interval(ivrTaskTemplate.getSilencetime().intValue()); |
| | | phoneCallBackYQVO.setValue(ivrTaskTemplate.getRevisitAfter()); |
| | | //å»redisä¸ï¼æè¯¥åä»»å¡IDå é¤ |
| | | Long id = serviceSubtask.getId(); |
| | | redisCache.deleteObject(serviceSubtask.getId() + "-" + serviceSubtask.getPhone()); |
| | | log.error("çµè¯ææ4"); |
| | | } |
| | | |
| | | //é项å¹é
宿åï¼éè¦åå»éè¿åºåè¿è¡å¹é
䏿¬¡ |
| | | String extemplateID = ivrTaskTemplate.getSubmoduleID(); |
| | | String[] split = extemplateID.split(","); |
| | | List<String> list = Arrays.asList(split); |
| | | List<Long> list1 = new ArrayList<>(); |
| | | if (StringUtils.isNotEmpty(extemplateID)) { |
| | | for (String str : list) { |
| | | list1.add(Long.valueOf(str)); |
| | | } |
| | | List<IvrLibaExtemplatescript> ivrLibaExtemplatescripts = ivrLibaExtemplatescriptMapper.queryIvrLibaExtemplatescriptList(list1); |
| | | for (IvrLibaExtemplatescript ivrLibaExtemplatescript : ivrLibaExtemplatescripts) { |
| | | Matcher matcher = null; |
| | | if (StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex())) { |
| | | Pattern pattern = Pattern.compile(ivrLibaExtemplatescript.getSelfRegex()); |
| | | matcher = pattern.matcher(phoneCallReqYQVO.getAsrtext()); |
| | | } |
| | | |
| | | Matcher matcher2 = null; |
| | | if (StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex2())) { |
| | | Pattern pattern2 = Pattern.compile(ivrLibaExtemplatescript.getSelfRegex2()); |
| | | matcher2 = pattern2.matcher(phoneCallReqYQVO.getAsrtext()); |
| | | } |
| | | if (StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex()) && matcher.matches() && StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex2()) && matcher2.matches() || StringUtils.isEmpty(ivrLibaExtemplatescript.getSelfRegex()) && StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex2()) && matcher2.matches() || StringUtils.isEmpty(ivrLibaExtemplatescript.getSelfRegex2()) && StringUtils.isNotEmpty(ivrLibaExtemplatescript.getSelfRegex()) && matcher.matches()) { |
| | | //å°éç¨åºå¹é
çï¼æ¾å°è¿åå¼ä¸ |
| | | phoneCallBackYQVO.setValue(phoneCallBackYQVO.getValue() + ivrLibaExtemplatescript.getSwitchText()); |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | return phoneCallBackYQVO; |
| | | } |
| | | |
| | | private String getObject(ServiceSubtask serviceSubtask, String scriptContent) { |
| | | Map<String, Map<String, String>> param = getParam(serviceSubtask.getTaskid()); |
| | | for (Map<String, String> map : param.values()) { |
| | | for (String key : map.keySet()) { |
| | | scriptContent = scriptContent.replace(key, StringUtils.isNotEmpty(map.get(key)) ? map.get(key) : ""); |
| | | } |
| | | } |
| | | scriptContent.replace("${name}", StringUtils.isNotEmpty(serviceSubtask.getName()) ? serviceSubtask.getName() : ""); |
| | | scriptContent.replace("${dzz}", StringUtils.isNotEmpty(serviceSubtask.getPlaceOfResidence()) ? serviceSubtask.getPlaceOfResidence() : ""); |
| | | scriptContent.replace("${phone}", StringUtils.isNotEmpty(serviceSubtask.getTelcode()) ? serviceSubtask.getTelcode() : ""); |
| | | |
| | | return scriptContent; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * è·åä»»å¡éçéé
符 |
| | | * |
| | | * @param taskId |
| | | * @return |
| | | */ |
| | | private Map<String, Map<String, String>> getParam(Long taskId) { |
| | | ServiceTask serviceTask = serviceTaskService.selectServiceTaskByTaskid(taskId); |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | Map<String, Map<String, String>> serviceTaskMap = null; |
| | | try { |
| | | serviceTaskMap = objectMapper.readValue(serviceTask.getTextParam(), Map.class); |
| | | } catch (JsonProcessingException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return serviceTaskMap; |
| | | } |
| | | |
| | | private Map<String, String> delRedisValue(String cache, String id) { |
| | | id = "," + id + ","; |
| | | String val = ""; |
| | | String cacheName = ""; |
| | | Map<String, String> map = new HashMap<>(); |
| | | |
| | | if (StringUtils.isNotEmpty(cache)) { |
| | | val = redisCache.getCacheObject(cache); |
| | | if (!StringUtils.isEmpty(val)) { |
| | | if (val.contains(id)) { |
| | | val = val.replaceAll(id, ""); |
| | | } |
| | | } |
| | | map.put("val", val); |
| | | map.put("cacheName", cache); |
| | | return map; |
| | | } |
| | | |
| | | for (int i = 0; i < 6; i++) { |
| | | val = redisCache.getCacheObject("cache-0" + i); |
| | | if (!StringUtils.isEmpty(val)) { |
| | | if (val.contains(id)) { |
| | | val = val.replaceAll(id, ""); |
| | | map.put("val", val); |
| | | map.put("cacheName", "cache-0" + i); |
| | | } |
| | | } |
| | | } |
| | | return map; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * é¨ç»®ä»»å¡æå |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<PullTaskVO> taskPull() { |
| | | //pullTaskVOListç¨äºæ°æ®è¿å |
| | | List<PullTaskVO> pullTaskVOList = new ArrayList<>(); |
| | | String value0 = redisCache.getCacheObject("cache-0"); |
| | | // cache-0为ç«å³åèµ·ç,å
¶å®çå
æ¨è¿ |
| | | if (!StringUtils.isEmpty(value0)) { |
| | | pullTaskVOList = getPullTaskList(value0, "cache-0"); |
| | | //å°cache-0çæ°æ®ï¼è½¬ç§»ä¸å¯¹å²cache-00ä¸ |
| | | String cache00 = redisCache.getCacheObject("cache-0"); |
| | | if (!StringUtils.isEmpty(cache00)) redisCache.setCacheObject("cache-0", cache00 + "," + value0); |
| | | else redisCache.setCacheObject("cache-0", value0); |
| | | redisCache.deleteObject("cache-0"); |
| | | } else { |
| | | for (int i = 1; i < 6; i++) { |
| | | //ååºä»cache-1 å° cache-5ç第ä¸ä¸ªåä»»å¡ä¿¡æ¯ |
| | | String value = redisCache.getCacheObject("cache-" + i); |
| | | if (StringUtils.isEmpty(value)) continue; |
| | | List<PullTaskVO> pullTaskVOList2 = getPullTaskList(value, "cache-" + i); |
| | | if (CollectionUtils.isNotEmpty(pullTaskVOList2) && pullTaskVOList2.size() > 0) { |
| | | pullTaskVOList.addAll(pullTaskVOList2); |
| | | } |
| | | redisCache.deleteObject("cache-" + i); |
| | | } |
| | | } |
| | | |
| | | return pullTaskVOList; |
| | | } |
| | | |
| | | |
| | | private List<PullTaskVO> getPullTaskList(String subIds, String cacheName) { |
| | | //pullTaskVOListç¨äºæ°æ®è¿å |
| | | List<PullTaskVO> pullTaskVOList = new ArrayList<>(); |
| | | //newValue0ç¨äºä¿å没æå¤ççå ä»»å¡ |
| | | String newValue0 = ""; |
| | | //æ ¹æ®,è·ååä»»å¡çID |
| | | String[] split = subIds.split(",,"); |
| | | for (int i = 0; i < split.length; i++) { |
| | | if (cacheName.equals("cache-0") && i < 5 || !cacheName.equals("cache-0") && i < 1) { |
| | | PullTaskVO pullTaskVO = new PullTaskVO(); |
| | | String subId = split[i].trim().replace(",", ""); |
| | | |
| | | ServiceSubtask serviceSubtask = serviceSubtaskMapper.selectServiceSubtaskById(Long.valueOf(subId)); |
| | | IvrTaskTemplate ivrTaskTemplate = ivrTaskTemplateService.selectIvrTaskTemplateByID(serviceSubtask.getTemplateid()); |
| | | //éè¿ä»»å¡æ¨¡æ¿ä¸ç"ç¬¬ä¸æ¬¡é®é¢ç¼å·"è·å第ä¸ä¸ªé®é¢; |
| | | IvrTaskTemplateScript ivrTaskTemplateScript = null; |
| | | IvrTaskTemplateScript ivrTaskTemplateScript1 = new IvrTaskTemplateScript(); |
| | | ivrTaskTemplateScript1.setTemplateID(ivrTaskTemplate.getId()); |
| | | List<IvrTaskTemplateScript> ivrTaskTemplateScripts = iIvrTaskTemplateScriptService.selectIvrTaskTemplateScriptList(ivrTaskTemplateScript1); |
| | | aa: |
| | | for (IvrTaskTemplateScript ivrTaskTemplateScript2 : ivrTaskTemplateScripts) { |
| | | if (ivrTaskTemplate.getFirstQuestionNum() == Long.valueOf(ivrTaskTemplateScript2.getSort())) { |
| | | ivrTaskTemplateScript = ivrTaskTemplateScript2; |
| | | break aa; |
| | | } |
| | | } |
| | | //妿ivrTaskTemplateScript为空ï¼ä¹å°±æ²¡æå¾ä¸æ§è¡çå¿
è¦äº |
| | | if (ObjectUtils.isEmpty(ivrTaskTemplateScript)) return null; |
| | | //è·åéé
符å¹é
è¿åçé®é¢ |
| | | String scrContent = getObject(serviceSubtask, ivrTaskTemplateScript.getScriptContent()); |
| | | String kcb = ivrTaskTemplate.getRevisitBefore() + "," + scrContent; |
| | | |
| | | //å°è£
è¿åæ°æ® |
| | | //taskId = åä»»å¡ID + é®é¢ID +é®é¢åºå· |
| | | pullTaskVO.setTaskid(subId); |
| | | pullTaskVO.setAppkey("ZurNHpaQLq6P55YS"); |
| | | pullTaskVO.setSections(LocalTime.now().format(DateTimeFormatter.ofPattern("hh:mm")) + "-" + LocalTime.now().plusMinutes(1).format(DateTimeFormatter.ofPattern("hh:mm"))); |
| | | pullTaskVO.setPhones(serviceSubtask.getPhone()); |
| | | pullTaskVO.setPrologue(kcb); |
| | | pullTaskVO.setDisplayNo("85129866"); |
| | | pullTaskVOList.add(pullTaskVO); |
| | | redisCache.setCacheObject(subId.trim() + "-" + serviceSubtask.getPhone().trim(), ivrTaskTemplateScript.getId().toString()); |
| | | } else { |
| | | if (StringUtils.isEmpty(newValue0)) { |
| | | newValue0 = "," + split[i].trim() + ","; |
| | | } else { |
| | | newValue0 = newValue0 + "," + split[i].trim() + ","; |
| | | } |
| | | redisCache.setCacheObject(cacheName, newValue0); |
| | | } |
| | | } |
| | | |
| | | return pullTaskVOList; |
| | | } |
| | | |
| | | @Override |
| | | public Integer saveQuestionAnswerPhone(ServiceSubTaskDetailReq serviceSubTaskDetailReq) { |
| | | RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample(); |
| | | Long tid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskDetailReq.getParam1(), pri_key)); |
| | | Long pid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskDetailReq.getParam2(), pri_key)); |
| | | ServiceSubtask ivrTaskSingle = new ServiceSubtask(); |
| | | ivrTaskSingle.setTaskid(tid); |
| | | ivrTaskSingle.setPatid(pid); |
| | | List<ServiceSubtask> selectServiceSubtaskList = serviceSubtaskMapper.selectServiceSubtaskList(ivrTaskSingle); |
| | | if (CollectionUtils.isEmpty(selectServiceSubtaskList) || selectServiceSubtaskList.size() == 0) { |
| | | log.error("æ¥éäºï¼selectServiceSubtaskListæ°æ®ä¸ºç©ºäºï¼{}", ivrTaskSingle); |
| | | return 0; |
| | | } |
| | | int i = 0; |
| | | //é访 |
| | | for (ServiceSubtaskDetail serviceSubtaskDetail : serviceSubTaskDetailReq.getServiceSubtaskDetailList()) { |
| | | serviceSubtaskDetail.setSubId(selectServiceSubtaskList.get(0).getId()); |
| | | serviceSubtaskDetail.setId(UUID.randomUUID().toString()); |
| | | serviceSubtaskDetail.setCreateTime(new Date()); |
| | | i = ivrTaskcalldetailMapper.insertServiceSubtaskDetail(serviceSubtaskDetail); |
| | | if (StringUtils.isNotEmpty(serviceSubTaskDetailReq.getParam1())) { |
| | | RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample(); |
| | | Long tid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskDetailReq.getParam1(), pri_key)); |
| | | Long pid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskDetailReq.getParam2(), pri_key)); |
| | | ServiceSubtask ivrTaskSingle = new ServiceSubtask(); |
| | | ivrTaskSingle.setTaskid(tid); |
| | | ivrTaskSingle.setPatid(pid); |
| | | List<ServiceSubtask> selectServiceSubtaskList = serviceSubtaskMapper.selectServiceSubtaskList(ivrTaskSingle); |
| | | if (CollectionUtils.isEmpty(selectServiceSubtaskList) || selectServiceSubtaskList.size() == 0) { |
| | | log.error("æ¥éäºï¼selectServiceSubtaskListæ°æ®ä¸ºç©ºäºï¼{}", ivrTaskSingle); |
| | | return 0; |
| | | } |
| | | //é访 |
| | | for (ServiceSubtaskDetail serviceSubtaskDetail : serviceSubTaskDetailReq.getServiceSubtaskDetailList()) { |
| | | serviceSubtaskDetail.setSubId(selectServiceSubtaskList.get(0).getId()); |
| | | serviceSubtaskDetail.setId(UUID.randomUUID().toString()); |
| | | serviceSubtaskDetail.setCreateTime(new Date()); |
| | | i = serviceSubtaskDetailMapper.insertServiceSubtaskDetail(serviceSubtaskDetail); |
| | | } |
| | | } else { |
| | | for (ServiceSubtaskDetail serviceSubtaskDetail : serviceSubTaskDetailReq.getServiceSubtaskDetailList()) { |
| | | serviceSubtaskDetail.setCreateTime(new Date()); |
| | | i = serviceSubtaskDetailMapper.insertServiceSubtaskDetail(serviceSubtaskDetail); |
| | | } |
| | | } |
| | | return i; |
| | | } |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | private ServiceSubtaskDetail getServiceSubtaskDetail(PhoneCallReqYQVO phoneCallReqYQVO, IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO, ServiceSubtask serviceSubtask, IvrTaskTemplate ivrTaskTemplate) { |
| | | ServiceSubtaskDetail serviceSubtaskDetail = new ServiceSubtaskDetail(); |
| | | serviceSubtaskDetail.setSubId(Long.valueOf(phoneCallReqYQVO.getTaskid())); |
| | | serviceSubtaskDetail.setUuid(phoneCallReqYQVO.getUuid()); |
| | | serviceSubtaskDetail.setPhone(phoneCallReqYQVO.getPhone()); |
| | | serviceSubtaskDetail.setOperate(serviceSubtask.getCreateBy()); |
| | | serviceSubtaskDetail.setDisplayno(phoneCallReqYQVO.getPhone()); |
| | | serviceSubtaskDetail.setAssigntime(System.currentTimeMillis()); |
| | | serviceSubtaskDetail.setStarttime(System.currentTimeMillis()); |
| | | serviceSubtaskDetail.setAnswertime(System.currentTimeMillis()); |
| | | serviceSubtaskDetail.setAsrtext("æ åºç"); |
| | | if (StringUtils.isNotEmpty(phoneCallReqYQVO.getAsrtext())) |
| | | serviceSubtaskDetail.setAsrtext(phoneCallReqYQVO.getAsrtext()); |
| | | serviceSubtaskDetail.setBeginTime(System.currentTimeMillis()); |
| | | serviceSubtaskDetail.setEndTime(System.currentTimeMillis()); |
| | | serviceSubtaskDetail.setSentEnd(1L); |
| | | serviceSubtaskDetail.setTemplateid(ivrTaskTemplate.getId().toString()); |
| | | serviceSubtaskDetail.setTemplatequestionnum(ivrTaskTemplateScriptVO.getId()); |
| | | serviceSubtaskDetail.setQuestiontext(ivrTaskTemplateScriptVO.getScriptContent()); |
| | | serviceSubtaskDetail.setCategoryname(ivrTaskTemplateScriptVO.getScriptType()); |
| | | serviceSubtaskDetail.setTargetoptions(ivrTaskTemplateScriptVO.getTargetOptions()); |
| | | |
| | | int i = 1; |
| | | for (IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption : ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList()) { |
| | | if (ivrTaskTemplateTargetoption.getIsUserOperation() == 1) { |
| | | serviceSubtaskDetail.setMatchedtext(ivrTaskTemplateTargetoption.getTargetvalue()); |
| | | } |
| | | serviceSubtaskDetail.setTargetvalue(StringUtils.isEmpty(serviceSubtaskDetail.getTargetvalue()) ? i + ivrTaskTemplateTargetoption.getTargetvalue() : serviceSubtaskDetail.getTargetvalue() + " " + (i + 1) + ivrTaskTemplateTargetoption.getTargetvalue()); |
| | | } |
| | | |
| | | serviceSubtaskDetail.setAddtime(new Date()); |
| | | serviceSubtaskDetail.setIsupload(0L); |
| | | serviceSubtaskDetail.setUploadTime(new Date()); |
| | | serviceSubtaskDetail.setDelFlag("0"); |
| | | serviceSubtaskDetail.setValueType(ivrTaskTemplateScriptVO.getScriptType()); |
| | | return serviceSubtaskDetail; |
| | | } |
| | | |
| | | } |
| | |
| | | public List sfInfo(ServiceTask serviceTask, Long patid) { |
| | | //éè¿æ¨¡æ¿IDè·åé®é¢ä¿¡æ¯ |
| | | IvrLibaTemplateScript ivrLibaTemplateScript = new IvrLibaTemplateScript(); |
| | | ivrLibaTemplateScript.setTemplateid(serviceTask.getTemplateid()); |
| | | ivrLibaTemplateScript.setTemplateid(Long.valueOf(serviceTask.getLibtemplateid())); |
| | | ivrLibaTemplateScript.setDelFlag("0"); |
| | | List<IvrLibaTemplateScript> ivrLibaTemplateScripts = ivrLibaTemplateScriptMapper.selectIvrLibaTemplateScriptList(ivrLibaTemplateScript); |
| | | if (CollectionUtils.isEmpty(ivrLibaTemplateScripts) || ivrLibaTemplateScripts.size() == 0) { |
| | |
| | | package com.smartor.service.impl; |
| | | |
| | | import java.util.List; |
| | | import WebServiceClient.MessagingInsertLocator; |
| | | import WebServiceClient.MessagingInsertSoap12Stub; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.smartor.domain.SmsParam; |
| | | import com.smartor.mapper.SmsParamMapper; |
| | | import com.smartor.service.ISmsParamService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.smartor.mapper.SmsParamMapper; |
| | | import com.smartor.domain.SmsParam; |
| | | import com.smartor.service.ISmsParamService; |
| | | |
| | | import javax.xml.rpc.holders.IntHolder; |
| | | import java.rmi.RemoteException; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * çä¿¡åæ°Serviceä¸å¡å±å¤ç |
| | | * |
| | | * |
| | | * @author smartor |
| | | * @date 2023-03-06 |
| | | */ |
| | | @Service |
| | | public class SmsParamServiceImpl implements ISmsParamService |
| | | { |
| | | public class SmsParamServiceImpl implements ISmsParamService { |
| | | @Autowired |
| | | private SmsParamMapper smsParamMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢çä¿¡åæ° |
| | | * |
| | | * |
| | | * @param paramid çä¿¡åæ°ä¸»é® |
| | | * @return çä¿¡åæ° |
| | | */ |
| | | @Override |
| | | public SmsParam selectSmsParamByParamid(Long paramid) |
| | | { |
| | | public SmsParam selectSmsParamByParamid(Long paramid) { |
| | | return smsParamMapper.selectSmsParamByParamid(paramid); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢çä¿¡åæ°å表 |
| | | * |
| | | * |
| | | * @param smsParam çä¿¡åæ° |
| | | * @return çä¿¡åæ° |
| | | */ |
| | | @Override |
| | | public List<SmsParam> selectSmsParamList(SmsParam smsParam) |
| | | { |
| | | public List<SmsParam> selectSmsParamList(SmsParam smsParam) { |
| | | return smsParamMapper.selectSmsParamList(smsParam); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢çä¿¡åæ° |
| | | * |
| | | * |
| | | * @param smsParam çä¿¡åæ° |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertSmsParam(SmsParam smsParam) |
| | | { |
| | | public int insertSmsParam(SmsParam smsParam) { |
| | | smsParam.setCreateTime(DateUtils.getNowDate()); |
| | | return smsParamMapper.insertSmsParam(smsParam); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * ä¿®æ¹çä¿¡åæ° |
| | | * |
| | | * |
| | | * @param smsParam çä¿¡åæ° |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateSmsParam(SmsParam smsParam) |
| | | { |
| | | public int updateSmsParam(SmsParam smsParam) { |
| | | smsParam.setUpdateTime(DateUtils.getNowDate()); |
| | | return smsParamMapper.updateSmsParam(smsParam); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤çä¿¡åæ° |
| | | * |
| | | * |
| | | * @param paramids éè¦å é¤ççä¿¡åæ°ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteSmsParamByParamids(Long[] paramids) |
| | | { |
| | | public int deleteSmsParamByParamids(Long[] paramids) { |
| | | return smsParamMapper.deleteSmsParamByParamids(paramids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤çä¿¡åæ°ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param paramid çä¿¡åæ°ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteSmsParamByParamid(Long paramid) |
| | | { |
| | | public int deleteSmsParamByParamid(Long paramid) { |
| | | return smsParamMapper.deleteSmsParamByParamid(paramid); |
| | | } |
| | | |
| | | @Override |
| | | public int sendSmsInfo(String info, String phone) { |
| | | MessagingInsertSoap12Stub binding = null; |
| | | try { |
| | | binding = (MessagingInsertSoap12Stub) new MessagingInsertLocator().getMessagingInsertSoap12(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | String aa = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + "<Request>\n" + "<operate>S001</operate>\n" + "<Sheets>\n" + "<Sheet>\n" + "<Content>" + info + "</Content>\n" + "<Mobile>" + phone + "</Mobile>\n" + "<DateTime>" + new Date() + "</DateTime>\n" + "<Type>é¢çº¦æå·</Type>\n" + "</Sheet>\n" + "</Sheets>\n" + "</Request>"; |
| | | Integer integer = null; |
| | | try { |
| | | integer = binding.SMSMessageAccept(aa, new IntHolder(), new javax.xml.rpc.holders.StringHolder()); |
| | | } catch (RemoteException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return integer; |
| | | } |
| | | } |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | //åå°æ´ç好çâç¾ç
åç§°âæ¿æ¢ |
| | | libTemplates.get(i).setIcdname(icdname); |
| | | } |
| | | //å°é®é¢æåºå·æä¸ä¸åº |
| | | Collections.sort(svyLibTemplateVOS.get(j).getSvyTemplateLibScripts(), new Comparator<SvyLibTemplateScript>() { |
| | | @Override |
| | | public int compare(SvyLibTemplateScript o1, SvyLibTemplateScript o2) { |
| | | return Integer.compare(o1.getSort().intValue(), o2.getSort().intValue()); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | |
| | | <if test="tag != null">tag,</if> |
| | | <if test="isAvailable != null">isAvailable,</if> |
| | | <if test="reply != null">reply,</if> |
| | | <if test="scriptContent != null">script_topic,</if> |
| | | <if test="scriptContent != null">script_content,</if> |
| | | <if test="scriptDesc != null">script_desc,</if> |
| | | <if test="scriptVoice != null">script_voice,</if> |
| | | <if test="noMatchText != null">nomatchtext,</if> |
| | |
| | | <result property="revisitAfter" column="revisit_after"/> |
| | | <result property="noVoiceNum" column="no_voice_num"/> |
| | | <result property="silencetime" column="silencetime"/> |
| | | <result property="sendDay" column="send_day"/> |
| | | <result property="longTemp" column="long_temp"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectIvrLibaTemplateVo"> |
| | | select id, |
| | | revisit_before, |
| | | revisit_after, |
| | | send_day, |
| | | long_temp, |
| | | templateName, |
| | | firstQuestionNum, |
| | | version, |
| | |
| | | '%') |
| | | </if> |
| | | <if test="id != null ">and id = #{id}</if> |
| | | <if test="sendDay != null ">and send_day = #{sendDay}</if> |
| | | <if test="longTemp != null ">and long_temp = #{longTemp}</if> |
| | | <if test="revisitAfter != null ">and revisit_after = #{revisitAfter}</if> |
| | | <if test="revisitBefore != null ">and revisit_before = #{revisitBefore}</if> |
| | | <if test="mateNum != null and mateNum > 0">and mate_num = #{mateNum}</if> |
| | |
| | | <if test="revisitBefore != null ">revisit_before,</if> |
| | | <if test="noVoiceNum != null and noVoiceNum > 0 ">no_voice_num,</if> |
| | | <if test="silencetime != null ">silencetime,</if> |
| | | <if test="sendDay != null ">send_day,</if> |
| | | <if test="longTemp != null ">long_temp,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="templateName != null and templateName != ''">#{templateName},</if> |
| | |
| | | <if test="revisitBefore != null ">#{revisitBefore},</if> |
| | | <if test="noVoiceNum != null and noVoiceNum > 0">#{noVoiceNum},</if> |
| | | <if test="silencetime != null ">#{silencetime},</if> |
| | | |
| | | <if test="sendDay != null ">#{sendDay},</if> |
| | | <if test="longTemp != null ">#{longTemp},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="revisitAfter != null ">revisit_after = #{revisitAfter},</if> |
| | | <if test="revisitBefore != null ">revisit_before = #{revisitBefore},</if> |
| | | <if test="noVoiceNum != null and noVoiceNum > 0 ">no_voice_num = #{noVoiceNum},</if> |
| | | <if test="silencetime != null">silencetime = #{silencetime}</if> |
| | | <if test="silencetime != null">silencetime = #{silencetime},</if> |
| | | <if test="sendDay != null ">send_day = #{sendDay},</if> |
| | | <if test="longTemp != null ">long_temp = #{longTemp},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | <result property="libtemplatename" column="libtemplatename"/> |
| | | <result property="recallcount" column="recallcount"/> |
| | | <result property="instruction" column="instruction"/> |
| | | <result property="sendDay" column="send_day"/> |
| | | |
| | | </resultMap> |
| | | |
| | | <sql id="selectIvrTaskTemplateVo"> |
| | | select id, |
| | | taskid, |
| | | send_day, |
| | | recallcount, |
| | | instruction, |
| | | libtemplateid, |
| | |
| | | <include refid="selectIvrTaskTemplateVo"/> |
| | | <where> |
| | | <if test="taskid != null ">and taskid = #{taskid}</if> |
| | | <if test="sendDay != null ">and send_day = #{sendDay}</if> |
| | | <if test="id != null ">and id = #{id}</if> |
| | | <if test="taskname != null and taskname != ''">and taskname like concat('%', #{taskname}, '%')</if> |
| | | <if test="targetid != null ">and targetid = #{targetid}</if> |
| | |
| | | <if test="libtemplateid != null ">libtemplateid,</if> |
| | | <if test="libtemplatename != null ">libtemplatename,</if> |
| | | <if test="instruction != null ">instruction,</if> |
| | | <if test="sendDay != null ">send_day,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="taskid != null">#{taskid},</if> |
| | |
| | | <if test="libtemplateid != null ">#{libtemplateid},</if> |
| | | <if test="libtemplatename != null ">#{libtemplatename},</if> |
| | | <if test="instruction != null ">#{instruction},</if> |
| | | <if test="sendDay != null ">#{sendDay},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="libtemplateid != null ">libtemplateid = #{libtemplateid},</if> |
| | | <if test="libtemplatename != null ">libtemplatename = #{libtemplatename},</if> |
| | | <if test="instruction != null ">instruction = #{instruction},</if> |
| | | <if test="sendDay != null ">send_day = #{sendDay},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | <result property="questionResult" column="question_result"/> |
| | | <result property="branchFlag" column="branch_flag"/> |
| | | <result property="branchNextscriptno" column="branch_nextscriptno"/> |
| | | <result property="nextScriptno" column="next_scriptno"/> |
| | | <result property="scriptType" column="script_type"/> |
| | | <result property="scriptContent" column="script_content"/> |
| | | <result property="sort" column="sort"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectIvrTaskTemplateScriptVo"> |
| | | select id, |
| | | taskid, |
| | | sort, |
| | | script_type, |
| | | branch_flag, |
| | | branch_nextscriptno, |
| | | next_scriptno, |
| | | templateID, |
| | | questionPoint, |
| | | script_content, |
| | | noMatchText, |
| | | noMatchVoice, |
| | | slienceText, |
| | |
| | | <include refid="selectIvrTaskTemplateScriptVo"/> |
| | | <where> |
| | | <if test="taskid != null ">and taskid = #{taskid}</if> |
| | | <if test="sort != null ">and sort = #{sort}</if> |
| | | <if test="templateID != null ">and templateID = #{templateID}</if> |
| | | <if test="questionPoint != null and questionPoint != ''">and questionPoint = #{questionPoint}</if> |
| | | <if test="noMatchText != null and noMatchText != ''">and noMatchText = #{noMatchText}</if> |
| | |
| | | <if test="questionResult != null and questionResult != ''">and question_result = #{questionResult}</if> |
| | | <if test="branchFlag != null and branchFlag != ''">and branch_flag = #{branchFlag}</if> |
| | | <if test="scriptType != null and scriptType != ''">and script_type = #{scriptType}</if> |
| | | <if test="scriptContent != null and scriptContent != ''">and script_content = #{scriptContent}</if> |
| | | <if test="nextScriptno != null and nextScriptno != ''">and next_scriptno = #{nextScriptno}</if> |
| | | <if test="branchNextscriptno != null and branchNextscriptno != ''">and branch_nextscriptno = |
| | | #{branchNextscriptno} |
| | | </if> |
| | |
| | | <if test="branchFlag != null and branchFlag != ''">branch_flag,</if> |
| | | <if test="branchNextscriptno != null and branchNextscriptno != ''">branch_nextscriptno,</if> |
| | | <if test="scriptType != null and scriptType != ''">script_type,</if> |
| | | <if test="scriptContent != null and scriptContent != ''">script_content,</if> |
| | | <if test="sort != null ">sort,</if> |
| | | <if test="nextScriptno != null and nextScriptno != ''">next_scriptno,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="taskid != null">#{taskid},</if> |
| | |
| | | <if test="branchFlag != null and branchFlag != ''">#{branchFlag},</if> |
| | | <if test="branchNextscriptno != null and branchNextscriptno != ''">#{branchNextscriptno},</if> |
| | | <if test="scriptType != null and scriptType != ''">#{scriptType},</if> |
| | | <if test="scriptContent != null and scriptContent != ''">#{scriptContent},</if> |
| | | <if test="sort != null">#{sort},</if> |
| | | <if test="nextScriptno != null and nextScriptno != ''">#{nextScriptno},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | #{branchNextscriptno}, |
| | | </if> |
| | | <if test="scriptType != null and scriptType != ''">script_type = #{scriptType},</if> |
| | | <if test="scriptContent != null and scriptContent != ''">script_content = #{scriptContent},</if> |
| | | <if test="sort != null">sort = #{sort},</if> |
| | | <if test="nextScriptno != null and nextScriptno != ''">next_scriptno = #{nextScriptno},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | <result property="nextQuestion" column="next_question"/> |
| | | <result property="appenddesc" column="appenddesc"/> |
| | | <result property="optionCode" column="option_code"/> |
| | | <result property="isUserOperation" column="is_user_operation"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectIvrTaskTemplateTargetoptionVo"> |
| | | select id, |
| | | taskid, |
| | | templateID, |
| | | is_user_operation, |
| | | appenddesc, |
| | | targetid, |
| | | option_code, |
| | |
| | | <if test="nextQuestion != null ">and next_question = #{nextQuestion}</if> |
| | | <if test="appenddesc != null ">and appenddesc = #{appenddesc}</if> |
| | | <if test="optionCode != null ">and option_code = #{optionCode}</if> |
| | | <if test="isUserOperation != null ">and is_user_operation = #{isUserOperation}</if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | <if test="nextQuestion != null">next_question,</if> |
| | | <if test="appenddesc != null">appenddesc,</if> |
| | | <if test="optionCode != null ">option_code,</if> |
| | | <if test="isUserOperation != null ">is_user_operation,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="taskid != null">#{taskid},</if> |
| | |
| | | <if test="nextQuestion != null">#{nextQuestion},</if> |
| | | <if test="appenddesc != null">#{appenddesc},</if> |
| | | <if test="optionCode != null ">#{optionCode},</if> |
| | | <if test="isUserOperation != null ">#{isUserOperation},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="nextQuestion != null">next_question = #{nextQuestion},</if> |
| | | <if test="appenddesc != null">appenddesc = #{appenddesc},</if> |
| | | <if test="optionCode != null ">option_code = #{optionCode},</if> |
| | | <if test="isUserOperation != null ">is_user_operation = #{isUserOperation},</if> |
| | | |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | <if test="isupload != null ">and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> |
| | | <if test="viptype != null ">and viptype = #{viptype}</if> |
| | | <if test="pattype != null ">and pattype = #{pattype}</if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | </if> |
| | | |
| | | </where> |
| | | order by a.update_time desc |
| | | </select> |
| | | |
| | | |
| | |
| | | AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid) |
| | | </if> |
| | | </where> |
| | | order by a.update_time desc |
| | | </select> |
| | | |
| | | <select id="selectPatArchiveInfoByOuthosp" parameterType="com.smartor.domain.PatArchiveReq" |
| | |
| | | AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid) |
| | | </if> |
| | | </where> |
| | | order by a.update_time desc |
| | | </select> |
| | | |
| | | <select id="selectPatArchiveInfoByPhysical" parameterType="com.smartor.domain.PatArchiveReq" |
| | |
| | | AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid) |
| | | </if> |
| | | </where> |
| | | |
| | | order by a.update_time desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <result property="schemetime" column="schemetime" /> |
| | | <result property="patname" column="patname" /> |
| | | <result property="patno" column="patno" /> |
| | | <result property="inhospstate" column="inhospstate" /> |
| | | <result property="checkFlag" column="check_flag" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectPatMedInhospVo"> |
| | | select inhospid,inhospno, serialnum, hospitalname, hospitalcode, hospitaldistrictcode, hospitaldistrictname, icd10code, diagname, starttime, endtime, deptcode, deptname, roomno, bed_no, orgid, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, patid, leavediagname, leaveicd10code, drcode, drname, schemestatus, generalschemestatus, leaveldeptcode, leaveldeptname, hospitaldistrictid, leavehospitaldistrictcode, leavehospitaldistrictname, leavehospitaldistrictid, deptid, leaveldeptid, schemetime from pat_med_inhosp |
| | | select inhospid,patname,check_flag,inhospstate,patno,inhospno, serialnum, hospitalname, hospitalcode, hospitaldistrictcode, hospitaldistrictname, icd10code, diagname, starttime, endtime, deptcode, deptname, roomno, bed_no, orgid, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, patid, leavediagname, leaveicd10code, drcode, drname, schemestatus, generalschemestatus, leaveldeptcode, leaveldeptname, hospitaldistrictid, leavehospitaldistrictcode, leavehospitaldistrictname, leavehospitaldistrictid, deptid, leaveldeptid, schemetime from pat_med_inhosp |
| | | </sql> |
| | | |
| | | <select id="selectPatMedInhospList" parameterType="com.smartor.domain.PatMedInhosp" resultMap="PatMedInhospResult"> |
| | |
| | | <if test="hospitaldistrictname != null and hospitaldistrictname != ''"> and hospitaldistrictname like concat('%', #{hospitaldistrictname}, '%')</if> |
| | | <if test="endtime != null "> and endtime = #{endtime}</if> |
| | | <if test="patno != null "> and patno = #{patno}</if> |
| | | <if test="checkFlag != null "> and check_flag = #{checkFlag}</if> |
| | | <if test="inhospstate != null "> and inhospstate = #{inhospstate}</if> |
| | | <if test="schemestatus != null "> and schemestatus = #{schemestatus}</if> |
| | | <if test="leavediagname != null and leavediagname != ''"> and leavediagname like concat('%', #{leavediagname}, '%')</if> |
| | | <if test="drname != null and drname != ''"> and drname like concat('%', #{drname}, '%')</if> |
| | | <if test="leaveldeptname != null and leaveldeptname != ''"> and leaveldeptname like concat('%', #{leaveldeptname}, '%')</if> |
| | | <if test="leavehospitaldistrictname != null and leavehospitaldistrictname != ''"> and leavehospitaldistrictname like concat('%', #{leavehospitaldistrictname}, '%')</if> |
| | | </where> |
| | | order by update_time desc |
| | | </select> |
| | | |
| | | <select id="selectPatMedInhospByInhospid" parameterType="Long" resultMap="PatMedInhospResult"> |
| | |
| | | <if test="schemetime != null">schemetime,</if> |
| | | <if test="patname!= null">patname,</if> |
| | | <if test="patno != null">patno,</if> |
| | | <if test="inhospstate != null">inhospstate,</if> |
| | | <if test="checkFlag != null">check_flag,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="serialnum != null">#{serialnum},</if> |
| | |
| | | <if test="schemetime != null">#{schemetime},</if> |
| | | <if test="patname!= null">#{patname},</if> |
| | | <if test="patno != null">#{patno},</if> |
| | | <if test="inhospstate != null">#{inhospstate},</if> |
| | | <if test="checkFlag != null">#{checkFlag},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="schemetime != null">schemetime = #{schemetime},</if> |
| | | <if test="patname!= null">patname = #{patname},</if> |
| | | <if test="patno != null">patno = #{patno},</if> |
| | | <if test="inhospstate != null">inhospstate = #{inhospstate},</if> |
| | | <if test="checkFlag != null">check_flag = #{checkFlag},</if> |
| | | </trim> |
| | | where inhospid = #{inhospid} |
| | | </update> |
| | |
| | | <if test="deptname != null and deptname != ''">and deptname like concat('%', #{deptname}, '%')</if> |
| | | <if test="deptid != null ">and deptid = #{deptid}</if> |
| | | </where> |
| | | order by update_time desc |
| | | </select> |
| | | |
| | | <select id="selectPatMedInspectionById" parameterType="Long" resultMap="PatMedInspectionResult"> |
| | |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |
| | | </mapper> |
| | |
| | | <if test="pid != null ">and pid = #{pid}</if> |
| | | <if test="guid != null and guid != ''">and guid = #{guid}</if> |
| | | </where> |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | <select id="selectPatMedRegistrationByRegistid" parameterType="Long" resultMap="PatMedRegistrationResult"> |
| | |
| | | <resultMap type="com.smartor.domain.ServiceSubtaskDetail" id="ServiceSubtaskDetailResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="subId" column="sub_id"/> |
| | | <result property="taskid" column="taskid"/> |
| | | <result property="uuid" column="uuid"/> |
| | | <result property="phone" column="phone"/> |
| | | <result property="operate" column="operate"/> |
| | |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="valueType" column="value_type"/> |
| | | <result property="scriptid" column="scriptid"/> |
| | | <result property="answerps" column="answerps"/> |
| | | <result property="comment" column="comment"/> |
| | | <result property="patid" column="patid"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectServiceSubtaskDetailVo"> |
| | | select id, |
| | | sub_id, |
| | | answerps, |
| | | scriptid, |
| | | comment, |
| | | patid, |
| | | taskid, |
| | | uuid, |
| | | phone, |
| | | operate, |
| | |
| | | update_time, |
| | | value_type, |
| | | create_by |
| | | from ivr_taskcalldetail |
| | | from service_subtask_detail |
| | | </sql> |
| | | |
| | | <select id="selectServiceSubtaskDetailList" parameterType="com.smartor.domain.ServiceSubtaskDetail" |
| | |
| | | <include refid="selectServiceSubtaskDetailVo"/> |
| | | <where> |
| | | <if test="subId != null">and sub_id = #{subId}</if> |
| | | <if test="taskid != null">and taskid = #{taskid}</if> |
| | | <if test="uuid != null and uuid != ''">and uuid = #{uuid}</if> |
| | | <if test="phone != null and phone != ''">and phone = #{phone}</if> |
| | | <if test="operate != null and operate != ''">and operate = #{operate}</if> |
| | |
| | | <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | <if test="valueType != null and valueType != ''">and value_type = #{valueType}</if> |
| | | <if test="answerps != null and answerps != ''">and answerps = #{answerps}</if> |
| | | <if test="comment != null and comment != ''">and comment = #{comment}</if> |
| | | <if test="scriptid != null ">and scriptid = #{scriptid}</if> |
| | | <if test=" patid != null">and patid = #{patid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | </select> |
| | | |
| | | <insert id="insertServiceSubtaskDetail" parameterType="com.smartor.domain.ServiceSubtaskDetail"> |
| | | insert into ivr_taskcalldetail |
| | | insert into service_subtask_detail |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="subId != null">sub_id,</if> |
| | | <if test="taskid != null">taskid,</if> |
| | | <if test="uuid != null">uuid,</if> |
| | | <if test="phone != null">phone,</if> |
| | | <if test="operate != null">operate,</if> |
| | |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="createBy != null">create_by,</if> |
| | | <if test="valueType != null">value_type,</if> |
| | | <if test="answerps != null and answerps != ''">answerps,</if> |
| | | <if test="comment != null and comment != ''">comment,</if> |
| | | <if test="scriptid != null ">scriptid,</if> |
| | | <if test=" patid != null">patid,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | | <if test="subId != null">#{subId},</if> |
| | | <if test="taskid != null">#{taskid},</if> |
| | | <if test="uuid != null">#{uuid},</if> |
| | | <if test="phone != null">#{phone},</if> |
| | | <if test="operate != null">#{operate},</if> |
| | |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="createBy != null">#{createBy},</if> |
| | | <if test="valueType != null">#{valueType},</if> |
| | | <if test="answerps != null and answerps != ''">#{answerps},</if> |
| | | <if test="comment != null and comment != ''">#{comment},</if> |
| | | <if test="scriptid != null ">#{scriptid},</if> |
| | | <if test=" patid != null">#{patid},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateServiceSubtaskDetail" parameterType="com.smartor.domain.ServiceSubtaskDetail"> |
| | | update ivr_taskcalldetail |
| | | update service_subtask_detail |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="subId != null">sub_id = #{subId},</if> |
| | | <if test="taskid != null">taskid = #{taskid},</if> |
| | | <if test="uuid != null">uuid = #{uuid},</if> |
| | | <if test="phone != null">phone = #{phone},</if> |
| | | <if test="operate != null">operate = #{operate},</if> |
| | |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="createBy != null">create_by = #{createBy},</if> |
| | | <if test="valueType != null">value_type = #{valueType},</if> |
| | | <if test="answerps != null and answerps != ''">answerps = #{answerps},</if> |
| | | <if test="comment != null and comment != ''">comment = #{comment},</if> |
| | | <if test="scriptid != null ">scriptid = #{scriptid},</if> |
| | | <if test=" patid != null">patid = #{patid},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteServiceSubtaskDetailByCalldetailid" parameterType="String"> |
| | | delete |
| | | from ivr_taskcalldetail |
| | | from service_subtask_detail |
| | | where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteServiceSubtaskDetailByCalldetailids" parameterType="String"> |
| | | delete from ivr_taskcalldetail where id in |
| | | delete from service_subtask_detail where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | |
| | | <result property="libtemplatename" column="libtemplatename"/> |
| | | <result property="libtemplateid" column="libtemplateid"/> |
| | | <result property="openid" column="openid"/> |
| | | <result property="longSendTime" column="long_send_time"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectServiceSubtaskVo"> |
| | | select id, |
| | | hosp_type, |
| | | long_send_time, |
| | | openid, |
| | | libtemplateid, |
| | | libtemplatename, |
| | |
| | | from service_subtask |
| | | </sql> |
| | | |
| | | <select id="selectServiceSubtaskList" parameterType="com.smartor.domain.ServiceSubtask" resultMap="ServiceSubtaskResult"> |
| | | <select id="selectServiceSubtaskList" parameterType="com.smartor.domain.ServiceSubtask" |
| | | resultMap="ServiceSubtaskResult"> |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | <where> |
| | | del_flag=0 |
| | |
| | | <if test="operatorNo != null and operatorNo != ''">and operator_no = #{operatorNo}</if> |
| | | <if test="wechat != null and wechat != ''">and wechat = #{wechat}</if> |
| | | <if test="hospType != null and hospType != ''">and hosp_type = #{hospType}</if> |
| | | <if test="libtemplateid != null ">and libtemplateid = #{libtemplateid},</if> |
| | | <if test="libtemplatename != null ">and libtemplatename = #{libtemplatename},</if> |
| | | <if test="openid != null ">and openid = #{openid},</if> |
| | | <if test="libtemplateid != null ">and libtemplateid = #{libtemplateid}</if> |
| | | <if test="libtemplatename != null ">and libtemplatename = #{libtemplatename}</if> |
| | | <if test="openid != null ">and openid = #{openid}</if> |
| | | <if test="longSendTime != null ">and long_send_time = #{longSendTime}</if> |
| | | <if test="sendstate != null ">and sendstate = #{sendstate}</if> |
| | | </where> |
| | | order by update_time desc,id desc |
| | | </select> |
| | |
| | | <if test="libtemplatename != null ">libtemplatename,</if> |
| | | <if test="patid != null ">patid,</if> |
| | | <if test="openid != null ">openid,</if> |
| | | <if test="longSendTime != null ">long_send_time,</if> |
| | | |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="sendname != null">#{sendname},</if> |
| | |
| | | <if test="libtemplatename != null ">#{libtemplatename},</if> |
| | | <if test="patid != null ">#{patid},</if> |
| | | <if test="openid != null ">#{openid},</if> |
| | | <if test="longSendTime != null ">#{longSendTime},</if> |
| | | |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="libtemplatename != null ">libtemplatename = #{libtemplatename},</if> |
| | | <if test="patid != null ">patid = #{patid},</if> |
| | | <if test="openid != null ">openid = #{openid},</if> |
| | | <if test="longSendTime != null ">long_send_time = #{longSendTime},</if> |
| | | <if test="sendstate != null ">sendstate = #{sendstate},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | <if test="libtemplatename != null ">libtemplatename = #{libtemplatename},</if> |
| | | <if test="patid != null ">patid = #{patid},</if> |
| | | <if test="openid != null ">openid = #{openid},</if> |
| | | <if test="longSendTime != null ">long_send_time = #{longSendTime},</if> |
| | | </trim> |
| | | where patid = #{patid} and taskid = #{taskid} |
| | | </update> |
| | |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <update id="deleteServiceSubtaskByCondition" > |
| | | <update id="deleteServiceSubtaskByCondition"> |
| | | update service_subtask |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | del_flag =1 |
| | |
| | | |
| | | select id, |
| | | sendname, |
| | | long_send_time, |
| | | phone, |
| | | sex, |
| | | age, |
| | |
| | | <result property="showTimeNoon" column="show_time_noon"/> |
| | | <result property="showTimeNight" column="show_time_night"/> |
| | | <result property="textParam" column="text_param"/> |
| | | <result property="serviceType" column="service_type"/> |
| | | <result property="longTask" column="long_task"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectServiceTaskVo"> |
| | | select taskid, |
| | | task_name, |
| | | long_task, |
| | | show_date, |
| | | show_time_morn, |
| | | show_time_noon, |
| | |
| | | send_type, |
| | | send_state, |
| | | send_time_slot, |
| | | service_type, |
| | | orgid |
| | | from service_task |
| | | </sql> |
| | |
| | | '%') |
| | | </if> |
| | | <if test="templateid != null and templateid != ''">and templateid = #{templateid}</if> |
| | | <if test="longTask != null and longTask != ''">and long_task = #{longTask}</if> |
| | | <if test="serviceType != null and serviceType != ''">and service_type = #{serviceType}</if> |
| | | <if test="templatename != null and templatename != ''">and templatename like concat('%', #{templatename}, |
| | | '%') |
| | | </if> |
| | |
| | | <if test="showTimeNoon != null and showTimeNoon != ''">show_time_noon,</if> |
| | | <if test="showTimeMorn != null and showTimeMorn != ''">show_time_morn,</if> |
| | | <if test="textParam != null and textParam != ''">text_param,</if> |
| | | <if test="serviceType != null and serviceType != ''">service_type,</if> |
| | | <if test="longTask != null and longTask != ''">long_task,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="taskName != null">#{taskName},</if> |
| | |
| | | <if test="showTimeNoon != null and showTimeNoon != ''">#{showTimeNoon},</if> |
| | | <if test="showTimeMorn != null and showTimeMorn != ''">#{showTimeMorn},</if> |
| | | <if test="textParam != null and textParam != ''">#{textParam},</if> |
| | | <if test="serviceType != null and serviceType != ''">#{serviceType},</if> |
| | | <if test="longTask != null and longTask != ''">#{longTask},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="showTimeNoon != null and showTimeNoon != ''">show_time_noon=#{showTimeNoon},</if> |
| | | <if test="showTimeMorn != null and showTimeMorn != ''">show_time_morn=#{showTimeMorn},</if> |
| | | <if test="textParam != null and textParam != ''">text_param=#{textParam},</if> |
| | | <if test="serviceType != null and serviceType != ''">service_type = #{serviceType},</if> |
| | | <if test="longTask != null and longTask != ''">long_task = #{longTask},</if> |
| | | </trim> |
| | | where taskid = #{taskid} |
| | | </update> |