已删除6个文件
已添加19个文件
已修改29个文件
已重命名10个文件
| | |
| | | import com.smartor.common.SendService; |
| | | import com.smartor.config.RobotPhoneUtils; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.mapper.IvrTaskMapper; |
| | | import com.smartor.mapper.IvrTaskSingleMapper; |
| | | import com.smartor.mapper.ServiceSubtaskMapper; |
| | | import com.smartor.mapper.ServiceTaskMapper; |
| | | import com.smartor.mapper.SvyTaskMapper; |
| | | import com.smartor.mapper.SvyTaskSingleMapper; |
| | | import com.smartor.service.IIvrTaskTemplateService; |
| | | import com.smartor.service.IServiceSubtaskRecordService; |
| | | import com.smartor.service.ISvyTaskTemplateService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | 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.*; |
| | | import java.util.concurrent.ExecutorService; |
| | | import java.util.concurrent.Executors; |
| | | import java.util.concurrent.TimeUnit; |
| | |
| | | |
| | | private static IIvrTaskTemplateService ivrTaskTemplateService; |
| | | |
| | | private static IvrTaskSingleMapper ivrTaskcallMapper; |
| | | private static ServiceSubtaskMapper ivrTaskcallMapper; |
| | | |
| | | private static IvrTaskMapper ivrTaskMapper; |
| | | private static ServiceTaskMapper ivrTaskMapper; |
| | | |
| | | private static SendService sendService; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private ISvyTaskTemplateService iSvyTaskTemplateService; |
| | | |
| | | @Autowired |
| | | private IServiceSubtaskRecordService serviceSubtaskRecordService; |
| | | |
| | | // å建åºå®å¤§å°ççº¿ç¨æ± |
| | | private static final ExecutorService executorService = Executors.newFixedThreadPool(10); |
| | |
| | | } |
| | | |
| | | @Autowired |
| | | public void setIvrTaskcallMapper(IvrTaskSingleMapper ivrTaskcallMapper) { |
| | | public void setIvrTaskcallMapper(ServiceSubtaskMapper ivrTaskcallMapper) { |
| | | RedisMqReceiver.ivrTaskcallMapper = ivrTaskcallMapper; |
| | | } |
| | | |
| | | @Autowired |
| | | public void setIvrTaskMapper(IvrTaskMapper ivrTaskMapper) { |
| | | public void setIvrTaskMapper(ServiceTaskMapper ivrTaskMapper) { |
| | | RedisMqReceiver.ivrTaskMapper = ivrTaskMapper; |
| | | } |
| | | |
| | |
| | | */ |
| | | private void sfHandle(CommonTaskcallMQ commonTaskcallMQ) { |
| | | //夿ä¸ä¸commonTaskcallMQä¸çstopstateæ¯å¦ä¸ivr_taskä¸çä¸è´ï¼ä¸ä¸è´ï¼åè¯´ææ¯æåäº |
| | | IvrTask ivrTask1 = ivrTaskMapper.selectIvrTaskByTaskid(commonTaskcallMQ.getTaskid()); |
| | | ServiceTask ivrTask1 = ivrTaskMapper.selectServiceTaskByTaskid(commonTaskcallMQ.getTaskid()); |
| | | if (ivrTask1.getStopState() != commonTaskcallMQ.getStopState()) { |
| | | //å°æ¶æ¯ä»éåä¸åé¤ |
| | | return; |
| | |
| | | IvrTaskTemplateVO ivrTaskTemplateVO1 = ivrTaskTemplateService.selectInfoByCondition(ivrTaskTemplateVO); |
| | | |
| | | //éè¿ä»»å¡IDæ¿å°æ£è
ä¿¡æ¯ |
| | | IvrTaskSingle ivrTaskcall = new IvrTaskSingle(); |
| | | ServiceSubtask ivrTaskcall = new ServiceSubtask(); |
| | | ivrTaskcall.setTaskid(commonTaskcallMQ.getTaskid()); |
| | | List<IvrTaskSingle> ivrTaskcalls = ivrTaskcallMapper.selectIvrTaskcallList(ivrTaskcall); |
| | | List<ServiceSubtask> ivrTaskcalls = ivrTaskcallMapper.selectServiceSubtaskList(ivrTaskcall); |
| | | if (descByCode.equals("çµè¯")) { |
| | | for (IvrTaskSingle ivrTaskcall1 : ivrTaskcalls) { |
| | | IvrTask ivrTask = ivrTaskMapper.selectIvrTaskByTaskid(ivrTaskcall1.getTaskid()); |
| | | for (ServiceSubtask ivrTaskcall1 : ivrTaskcalls) { |
| | | ServiceTask ivrTask = ivrTaskMapper.selectServiceTaskByTaskid(ivrTaskcall1.getTaskid()); |
| | | if (ivrTask.getSendState() != null && ivrTask.getSendState() == 3 || ivrTask.getSendState() != null && ivrTask.getSendState() == 4) { |
| | | //å¦ä½ä»»å¡è¢«âæåâæâç»æ¢â |
| | | break; |
| | | } |
| | | |
| | | //ä»»å¡åéè®°å½ï¼è¿ä¸ªä»£ç åºè¯¥åå¨phoneTaskä¸ï¼å
åå¨è¿ï¼åé¢åæ¹ï¼ |
| | | ServiceSubtaskRecord serviceSubtaskRecord = new ServiceSubtaskRecord(); |
| | | serviceSubtaskRecord.setTaskid(ivrTaskcall1.getTaskid().toString()); |
| | | serviceSubtaskRecord.setUuid(UUID.randomUUID().toString()); |
| | | serviceSubtaskRecord.setTasktype(ivrTaskcall1.getType()); |
| | | serviceSubtaskRecord.setPreachform("3"); |
| | | serviceSubtaskRecord.setStartTime(System.currentTimeMillis()); |
| | | serviceSubtaskRecordService.insertServiceSubtaskRecord(serviceSubtaskRecord); |
| | | |
| | | //éè¿å¤çº¿ç¨çæ¹å¼å»æçµè¯ |
| | | executorService.submit(new PhoneTask(ivrTaskcall1, ivrTaskTemplateVO1, redisCache, sendService, phonePath, robotPhoneUtils)); |
| | | } |
| | |
| | | String taskId = rsaPublicKeyExample.encryptedData(ivrTask1.getTaskid().toString(), pub_key); |
| | | |
| | | |
| | | for (IvrTaskSingle ivrTaskSingle : ivrTaskcalls) { |
| | | for (ServiceSubtask ivrTaskSingle : ivrTaskcalls) { |
| | | String patid = rsaPublicKeyExample.encryptedData(ivrTaskSingle.getPatid().toString(), pub_key); |
| | | SendMagParam sendMagParam = new SendMagParam(); |
| | | sendMagParam.setType("4"); |
| | | sendMagParam.setUrl(req_path + "/followvisit/particty?param1=" + taskId + "¶m2=" + patid); |
| | | sendService.sendMsg(sendMagParam); |
| | | Boolean aBoolean = sendService.sendMsg(sendMagParam); |
| | | |
| | | //ä»»å¡åéè®°å½ |
| | | ServiceSubtaskRecord serviceSubtaskRecord = new ServiceSubtaskRecord(); |
| | | serviceSubtaskRecord.setTaskid(ivrTaskSingle.getTaskid().toString()); |
| | | serviceSubtaskRecord.setUuid(UUID.randomUUID().toString()); |
| | | serviceSubtaskRecord.setTasktype(ivrTaskSingle.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 (IvrTaskSingle ivrTaskSingle : ivrTaskcalls) { |
| | | for (ServiceSubtask ivrTaskSingle : ivrTaskcalls) { |
| | | String patid = rsaPublicKeyExample.encryptedData(ivrTaskSingle.getPatid().toString(), pub_key); |
| | | SendMagParam sendMagParam = new SendMagParam(); |
| | | sendMagParam.setType("5"); |
| | |
| | | Map map = new HashMap(); |
| | | map.put("first", ivrTask1.getTaskName()); |
| | | sendMagParam.setContent(JSON.toJSONString(map)); |
| | | sendService.sendMsg(sendMagParam); |
| | | Boolean aBoolean = sendService.sendMsg(sendMagParam); |
| | | |
| | | //ä»»å¡åéè®°å½ |
| | | ServiceSubtaskRecord serviceSubtaskRecord = new ServiceSubtaskRecord(); |
| | | serviceSubtaskRecord.setTaskid(ivrTaskSingle.getTaskid().toString()); |
| | | serviceSubtaskRecord.setUuid(UUID.randomUUID().toString()); |
| | | serviceSubtaskRecord.setTasktype(ivrTaskSingle.getType()); |
| | | serviceSubtaskRecord.setPreachform("4"); |
| | | serviceSubtaskRecord.setStartTime(System.currentTimeMillis()); |
| | | serviceSubtaskRecord.setResult(aBoolean == true ? "æå" : "失败"); |
| | | serviceSubtaskRecordService.insertServiceSubtaskRecord(serviceSubtaskRecord); |
| | | } |
| | | } |
| | | //éç¥ MQ æ¶æ¯å·²è¢«æ¥æ¶,å¯ä»¥ACK(ä»éåä¸å é¤)äº ï¼è¿ä¸ªéè¦æ ¹æ®ä¸å¡åå»å¤çACKï¼ |
| | |
| | | //å¦ä½ä»»å¡è¢«âæåâæâç»æ¢â |
| | | break; |
| | | } |
| | | |
| | | //ä»»å¡åéè®°å½ï¼è¿ä¸ªä»£ç åºè¯¥åå¨phoneTaskä¸ï¼å
åå¨è¿ï¼åé¢åæ¹ï¼ |
| | | ServiceSubtaskRecord serviceSubtaskRecord = new ServiceSubtaskRecord(); |
| | | serviceSubtaskRecord.setTaskid(svyTaskSingle1.getTaskid().toString()); |
| | | serviceSubtaskRecord.setUuid(UUID.randomUUID().toString()); |
| | | serviceSubtaskRecord.setTasktype(svyTaskSingle1.getType()); |
| | | serviceSubtaskRecord.setPreachform("3"); |
| | | serviceSubtaskRecord.setStartTime(System.currentTimeMillis()); |
| | | serviceSubtaskRecordService.insertServiceSubtaskRecord(serviceSubtaskRecord); |
| | | //éè¿å¤çº¿ç¨çæ¹å¼å»æçµè¯ |
| | | // executorService.submit(new PhoneTask(ivrTaskcall1, ivrTaskTemplateVO1, redisCache, sendService, phonePath, robotPhoneUtils)); |
| | | } |
| | |
| | | Map map = new HashMap(); |
| | | map.put("first", svyTask.getTaskName()); |
| | | sendMagParam.setContent(JSON.toJSONString(map)); |
| | | sendService.sendMsg(sendMagParam); |
| | | Boolean aBoolean = sendService.sendMsg(sendMagParam); |
| | | |
| | | //ä»»å¡åéè®°å½ |
| | | ServiceSubtaskRecord serviceSubtaskRecord = new ServiceSubtaskRecord(); |
| | | serviceSubtaskRecord.setTaskid(svyTaskSingle1.getTaskid().toString()); |
| | | serviceSubtaskRecord.setUuid(UUID.randomUUID().toString()); |
| | | serviceSubtaskRecord.setTasktype(svyTaskSingle1.getType()); |
| | | serviceSubtaskRecord.setPreachform("4"); |
| | | serviceSubtaskRecord.setStartTime(System.currentTimeMillis()); |
| | | serviceSubtaskRecord.setResult(aBoolean == true ? "æå" : "失败"); |
| | | serviceSubtaskRecordService.insertServiceSubtaskRecord(serviceSubtaskRecord); |
| | | } |
| | | } |
| | | //éç¥ MQ æ¶æ¯å·²è¢«æ¥æ¶,å¯ä»¥ACK(ä»éåä¸å é¤)äº ï¼è¿ä¸ªéè¦æ ¹æ®ä¸å¡åå»å¤çACKï¼ |
| | |
| | | package com.ruoyi.web.controller.smartor.AIRobot; |
| | | |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.core.domain.model.LoginUser; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.DtoConversionUtils; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.smartor.config.RobotPhoneUtils; |
| | | import com.smartor.domain.IvrTaskSingle; |
| | | import com.smartor.domain.IvrTaskSingleVO; |
| | | import com.smartor.domain.PhoneCallBackVO; |
| | | import com.smartor.domain.SendTaskVO; |
| | | import com.smartor.domain.robot.RobotScritpTemplateVO; |
| | | import com.smartor.domain.robot.back.RobotAIDialogBack; |
| | | import com.smartor.domain.robot.back.RobotCallBack; |
| | | import com.smartor.domain.robot.back.RobotcdrInfoBack; |
| | | import com.smartor.service.AIRobotPhoneCallBackService; |
| | | import com.smartor.service.IIvrTaskSingleService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * åä¸ä»»å¡ï¼é访ï¼Controller |
| | |
| | | * @author ruoyi |
| | | * @date 2023-06-26 |
| | | */ |
| | | @Api(description = "CommonTaskController") |
| | | @Api(description = "éç¨ä»»å¡Controller") |
| | | @RestController |
| | | @RequestMapping("/commonTask") |
| | | @RequestMapping("/smartor/commonTask") |
| | | public class CommonTaskController extends BaseController { |
| | | @Autowired |
| | | private IServiceThirdDataService iServiceThirdDataService; |
| | |
| | | package com.smartor.controller; |
| | | package com.ruoyi.web.controller.smartor; |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.smartor.domain.IvrTaskcalldetailReq; |
| | | import com.smartor.domain.PhoneCallBackVO; |
| | | 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.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.smartor.domain.IvrTaskcalldetail; |
| | | import com.smartor.service.IIvrTaskcalldetailService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è¯é³ä»»å¡å¼å«æç»Controller |
| | |
| | | @GetMapping("/remove/{calldetailids}") |
| | | public AjaxResult remove(@PathVariable String[] calldetailids) { |
| | | return toAjax(ivrTaskcalldetailService.deleteIvrTaskcalldetailByCalldetailids(calldetailids)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ£è
é®é¢ç»æè®°å½ |
| | | */ |
| | | @ApiOperation("æ£è
é®é¢ç»æè®°å½") |
| | | @PostMapping("/saveQuestionAnswer") |
| | | public AjaxResult saveQuestionAnswer(@RequestBody IvrTaskcalldetailReq ivrTaskcalldetailReq) { |
| | | return toAjax(ivrTaskcalldetailService.saveQuestionAnswer(ivrTaskcalldetailReq)); |
| | | } |
| | | |
| | | } |
ÎļþÃû´Ó ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrTaskSingleController.java ÐÞ¸Ä |
| | |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.domain.robot.back.RobotAIDialogBack; |
| | | import com.smartor.domain.robot.back.RobotCallBack; |
| | | import com.smartor.service.IIvrTaskSingleService; |
| | | import com.smartor.service.IServiceSubtaskService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | @Slf4j |
| | | @Api(description = "åä¸ä»»å¡ï¼é访宣æï¼") |
| | | @RestController |
| | | @RequestMapping("/smartor/tasksingle") |
| | | public class IvrTaskSingleController extends BaseController { |
| | | @RequestMapping("/smartor/serviceSubtask") |
| | | public class ServiceSubtaskController extends BaseController { |
| | | @Autowired |
| | | private IIvrTaskSingleService ivrTaskcallService; |
| | | private IServiceSubtaskService serviceSubtaskService; |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£è
éè®¿ä¿¡æ¯ |
| | |
| | | @ApiOperation("æ¥è¯¢æ£è
é访信æ¯") |
| | | @PreAuthorize("@ss.hasPermi('system:taskcall:list')") |
| | | @PostMapping("/patItem") |
| | | public TableDataInfo patItem(@RequestBody IvrTaskSingle ivrTaskcall) { |
| | | public TableDataInfo patItem(@RequestBody ServiceSubtask ivrTaskcall) { |
| | | PageUtils.startPageByPost(ivrTaskcall.getPageNum(), ivrTaskcall.getPageSize()); |
| | | return getDataTable(ivrTaskcallService.patItem(ivrTaskcall)); |
| | | return getDataTable(serviceSubtaskService.patItem(ivrTaskcall)); |
| | | } |
| | | |
| | | /** |
| | |
| | | @PreAuthorize("@ss.hasPermi('system:taskcall:export')") |
| | | @Log(title = "åä¸ä»»å¡ï¼é访宣æï¼", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, IvrTaskSingle ivrTaskcall) { |
| | | List<IvrTaskSingle> list = ivrTaskcallService.selectIvrTaskcallList(ivrTaskcall); |
| | | ExcelUtil<IvrTaskSingle> util = new ExcelUtil<IvrTaskSingle>(IvrTaskSingle.class); |
| | | public void export(HttpServletResponse response, ServiceSubtask ivrTaskcall) { |
| | | List<ServiceSubtask> list = serviceSubtaskService.selectServiceSubtaskList(ivrTaskcall); |
| | | ExcelUtil<ServiceSubtask> util = new ExcelUtil<ServiceSubtask>(ServiceSubtask.class); |
| | | util.exportExcel(response, list, "åä¸ä»»å¡ï¼éè®¿ï¼æ°æ®"); |
| | | } |
| | | |
| | |
| | | @PreAuthorize("@ss.hasPermi('system:taskcall:query')") |
| | | @GetMapping(value = "/getInfo/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) { |
| | | return success(ivrTaskcallService.selectIvrTaskcallById(id)); |
| | | return success(serviceSubtaskService.selectServiceSubtaskById(id)); |
| | | } |
| | | |
| | | /** |
| | |
| | | @PreAuthorize("@ss.hasPermi('system:task:add')") |
| | | @Log(title = "åä¸ä»»å¡ï¼é访ï¼", businessType = BusinessType.INSERT) |
| | | @PostMapping("/insertOrUpdateTask") |
| | | public AjaxResult insertOrUpdateHeTask(@RequestBody IvrTaskVO ivrTaskVO) { |
| | | public AjaxResult insertOrUpdateHeTask(@RequestBody ServiceTaskVO ivrTaskVO) { |
| | | |
| | | LoginUser loginUser = getLoginUser(); |
| | | SysUser user = loginUser.getUser(); |
| | | ivrTaskVO.setCreateBy(user.getNickName()); |
| | | return toAjax(ivrTaskcallService.insertOrUpdateTask(ivrTaskVO)); |
| | | return toAjax(serviceSubtaskService.insertOrUpdateTask(ivrTaskVO)); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @ApiOperation("æ ¹æ®æ¡ä»¶æ¥è¯¢ä»»å¡ä¿¡æ¯") |
| | | @PostMapping("/queryTaskByCondition") |
| | | public AjaxResult queryTaskByCondition(@RequestBody IvrTaskSingleVO ivrTaskcallVO) { |
| | | public AjaxResult queryTaskByCondition(@RequestBody ServiceSubtaskVO ivrTaskcallVO) { |
| | | //æ ¹æ®å
¥åæ¥è¯¢ä¿¡æ¯ |
| | | IvrTaskSingle ivrTaskcall = DtoConversionUtils.sourceToTarget(ivrTaskcallVO, IvrTaskSingle.class); |
| | | IvrTaskVO ivrTaskVO = ivrTaskcallService.queryTaskByCondition(ivrTaskcall); |
| | | ServiceSubtask ivrTaskcall = DtoConversionUtils.sourceToTarget(ivrTaskcallVO, ServiceSubtask.class); |
| | | ServiceTaskVO ivrTaskVO = serviceSubtaskService.queryTaskByCondition(ivrTaskcall); |
| | | return success(ivrTaskVO); |
| | | } |
| | | |
| | |
| | | @PostMapping("/phoneCallBack") |
| | | public AjaxResult phoneCallBack(@RequestBody PhoneCallBackVO phoneCallBackVO) { |
| | | // log.error("çµè¯åè°ä»»å¡æåäºä¸ï¼{}", phoneCallBackVO); |
| | | ivrTaskcallService.phoneCallBack(phoneCallBackVO); |
| | | serviceSubtaskService.phoneCallBack(phoneCallBackVO); |
| | | return success(); |
| | | } |
| | | /** |
| | | * æ£è
é®é¢ç»æè®°å½ |
| | | */ |
| | | @ApiOperation("æ£è
é®é¢ç»æè®°å½") |
| | | @PostMapping("/saveQuestionAnswer") |
| | | public AjaxResult saveQuestionAnswer(@RequestBody ServiceSubTaskDetailReq serviceSubTaskDetailReq) { |
| | | return toAjax(serviceSubtaskService.saveQuestionAnswer(serviceSubTaskDetailReq)); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.web.controller.smartor; |
| | | |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.smartor.domain.ServiceSubtaskRecord; |
| | | import com.smartor.service.IServiceSubtaskRecordService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ã请填ååè½åç§°ãController |
| | | * |
| | | * @author ruoyi |
| | | * @date 2024-07-01 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/smartor/subTaskRecord") |
| | | public class ServiceSubtaskRecordController extends BaseController { |
| | | @Autowired |
| | | private IServiceSubtaskRecordService serviceSubtaskRecordService; |
| | | |
| | | /** |
| | | * æ¥è¯¢ã请填ååè½åç§°ãå表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:record:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ServiceSubtaskRecord serviceSubtaskRecord) { |
| | | startPage(); |
| | | List<ServiceSubtaskRecord> list = serviceSubtaskRecordService.selectServiceSubtaskRecordList(serviceSubtaskRecord); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºã请填ååè½åç§°ãå表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:record:export')") |
| | | @Log(title = "ã请填ååè½åç§°ã", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, ServiceSubtaskRecord serviceSubtaskRecord) { |
| | | List<ServiceSubtaskRecord> list = serviceSubtaskRecordService.selectServiceSubtaskRecordList(serviceSubtaskRecord); |
| | | ExcelUtil<ServiceSubtaskRecord> util = new ExcelUtil<ServiceSubtaskRecord>(ServiceSubtaskRecord.class); |
| | | util.exportExcel(response, list, "ã请填ååè½åç§°ãæ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·åã请填ååè½åç§°ã详ç»ä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:record:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) { |
| | | return success(serviceSubtaskRecordService.selectServiceSubtaskRecordById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ã请填ååè½åç§°ã |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:record:add')") |
| | | @Log(title = "ã请填ååè½åç§°ã", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody ServiceSubtaskRecord serviceSubtaskRecord) { |
| | | return toAjax(serviceSubtaskRecordService.insertServiceSubtaskRecord(serviceSubtaskRecord)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ã请填ååè½åç§°ã |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:record:edit')") |
| | | @Log(title = "ã请填ååè½åç§°ã", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody ServiceSubtaskRecord serviceSubtaskRecord) { |
| | | return toAjax(serviceSubtaskRecordService.updateServiceSubtaskRecord(serviceSubtaskRecord)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ã请填ååè½åç§°ã |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:record:remove')") |
| | | @Log(title = "ã请填ååè½åç§°ã", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) { |
| | | return toAjax(serviceSubtaskRecordService.deleteServiceSubtaskRecordByIds(ids)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.web.controller.smartor; |
| | | |
| | | import com.github.pagehelper.ISelect; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.DtoConversionUtils; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.RSAPublicKeyExample; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.service.IServiceSubtaskService; |
| | | import com.smartor.service.IServiceTaskService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | 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.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * é访任å¡Controller |
| | | * |
| | | * @author smartor |
| | | * @date 2023-03-24 |
| | | */ |
| | | @Slf4j |
| | | @Api(description = "é访任å¡") |
| | | @RestController |
| | | @RequestMapping("/smartor/servicetask") |
| | | public class ServiceTaskController extends BaseController { |
| | | @Autowired |
| | | private IServiceTaskService serviceTaskService; |
| | | |
| | | @Autowired |
| | | private IServiceSubtaskService iServiceTaskCallService; |
| | | |
| | | @Value("${pub_key}") |
| | | private String pub_key; |
| | | |
| | | @Value("${pri_key}") |
| | | private String pri_key; |
| | | |
| | | /** |
| | | * æ¥è¯¢è¯é³ä»»å¡å表 |
| | | */ |
| | | @ApiOperation("æ¥è¯¢ä»»å¡å表") |
| | | @PreAuthorize("@ss.hasPermi('smartor:ServiceTask:list')") |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody ServiceTask serviceTask) { |
| | | PageUtils.startPageByPost(serviceTask.getPageNum(), serviceTask.getPageSize()); |
| | | List<ServiceTask> list = serviceTaskService.selectServiceTaskList(serviceTask); |
| | | List<ServiceTaskVO> ServiceTaskVOS = DtoConversionUtils.sourceToTarget(list, ServiceTaskVO.class); |
| | | |
| | | if (CollectionUtils.isNotEmpty(ServiceTaskVOS)) { |
| | | for (ServiceTaskVO ServiceTaskVO : ServiceTaskVOS) { |
| | | ServiceSubtask ServiceTaskcall = new ServiceSubtask(); |
| | | ServiceTaskcall.setTaskid(ServiceTaskVO.getTaskid()); |
| | | List<ServiceSubtask> ServiceTaskcalls = iServiceTaskCallService.selectServiceSubtaskList(ServiceTaskcall); |
| | | if (CollectionUtils.isNotEmpty(ServiceTaskcalls)) { |
| | | //å·²åé |
| | | long yfs = ServiceTaskcalls.stream().filter(serviceTaskcall1 -> serviceTaskcall1.getSendstate() != null && serviceTaskcall1.getSendstate() == 3L).collect(Collectors.toList()).stream().count(); |
| | | //æªåé |
| | | long wfs = ServiceTaskcalls.stream().filter(serviceTaskcall1 -> serviceTaskcall1.getSendstate() != null && serviceTaskcall1.getSendstate() == 2L).collect(Collectors.toList()).stream().count(); |
| | | ServiceTaskVO.setYfs(yfs); |
| | | ServiceTaskVO.setWfs(wfs); |
| | | } |
| | | } |
| | | //è·åtotal |
| | | long total = PageUtils.count(new ISelect() { |
| | | @Override |
| | | public void doSelect() { |
| | | serviceTask.setPageNum(null); |
| | | serviceTask.setPageSize(null); |
| | | serviceTaskService.selectServiceTaskList(serviceTask); |
| | | } |
| | | }); |
| | | |
| | | return getDataTable2(total, ServiceTaskVOS); |
| | | } |
| | | |
| | | return getDataTable2(0, ServiceTaskVOS); |
| | | } |
| | | |
| | | /** |
| | | * 导åºä»»å¡å表 |
| | | */ |
| | | @ApiOperation("导åºä»»å¡å表") |
| | | @PreAuthorize("@ss.hasPermi('smartor:ServiceTask:export')") |
| | | @Log(title = "è¯é³ä»»å¡", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, ServiceTask ServiceTask) { |
| | | List<ServiceTask> list = serviceTaskService.selectServiceTaskList(ServiceTask); |
| | | ExcelUtil<ServiceTask> util = new ExcelUtil<ServiceTask>(ServiceTask.class); |
| | | util.exportExcel(response, list, "è¯é³ä»»å¡æ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·åä»»å¡è¯¦ç»ä¿¡æ¯ |
| | | */ |
| | | @ApiOperation("è·åä»»å¡è¯¦ç»ä¿¡æ¯") |
| | | @PreAuthorize("@ss.hasPermi('smartor:ServiceTask:query')") |
| | | @GetMapping(value = "/{taskid}") |
| | | public AjaxResult getInfo(@PathVariable("taskid") Long taskid) { |
| | | return success(serviceTaskService.selectServiceTaskByTaskid(taskid)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ä»»å¡ |
| | | */ |
| | | @ApiOperation("æ°å¢ä»»å¡") |
| | | @PreAuthorize("@ss.hasPermi('smartor:ServiceTask:add')") |
| | | @Log(title = "è¯é³ä»»å¡", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody ServiceTask ServiceTask) { |
| | | return toAjax(serviceTaskService.insertServiceTask(ServiceTask)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹è¯é³ä»»å¡ |
| | | */ |
| | | @ApiOperation("ä¿®æ¹ä»»å¡") |
| | | @PreAuthorize("@ss.hasPermi('smartor:ServiceTask:edit')") |
| | | @Log(title = "ä»»å¡", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody ServiceTask ServiceTask) { |
| | | return toAjax(serviceTaskService.updateServiceTask(ServiceTask)); |
| | | } |
| | | |
| | | // /** |
| | | // * å é¤è¯é³ä»»å¡ |
| | | // */ |
| | | // @ApiOperation("å é¤ä»»å¡") |
| | | // @PreAuthorize("@ss.hasPermi('smartor:ServiceTask:remove')") |
| | | // @Log(title = "è¯é³ä»»å¡", businessType = BusinessType.DELETE) |
| | | // @GetMapping("/remove/{taskids}") |
| | | // public AjaxResult remove(@PathVariable Long[] taskids) { |
| | | // return toAjax(ServiceTaskService.deleteServiceTaskByTaskids(taskids)); |
| | | // } |
| | | // |
| | | |
| | | /** |
| | | * å é¤ä»»å¡(å
æ¬å®å¯¹åºçæ£è
ä¿¡æ¯) |
| | | */ |
| | | @ApiOperation("å é¤ä»»å¡(å
æ¬å®å¯¹åºçæ£è
ä¿¡æ¯)") |
| | | @PreAuthorize("@ss.hasPermi('smartor:ServiceTask:remove')") |
| | | @Log(title = "è¯é³ä»»å¡", businessType = BusinessType.DELETE) |
| | | @GetMapping("/remove/{removeTask}") |
| | | public AjaxResult removeTask(@PathVariable Long taskId) { |
| | | return toAjax(serviceTaskService.deleteServiceTaskByTaskid(taskId)); |
| | | } |
| | | |
| | | /** |
| | | * éè¿ä»»å¡ID忣è
IDè·åå个人çé¢ç®ä¿¡æ¯ |
| | | * |
| | | * @return |
| | | */ |
| | | @ApiOperation("éè¿ä»»å¡ID忣è
IDè·åå个人çé¢ç®ä¿¡æ¯") |
| | | @PostMapping("/getScriptInfoByCondition") |
| | | public TableDataInfo getScriptInfoByCondition(@RequestBody ServiceTaskScriptQues serviceTaskScriptQues) { |
| | | RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample(); |
| | | Long tid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceTaskScriptQues.getParam1(), pri_key)); |
| | | Long pid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceTaskScriptQues.getParam2(), pri_key)); |
| | | log.info("tidåpidçå¼ä¸ºï¼{},{}", tid, pid); |
| | | return getDataTable(serviceTaskService.getScriptInfoByCondition(tid, pid)); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.web.controller.smartor; |
| | | |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.smartor.domain.SvyTaskAnswer; |
| | | import com.smartor.service.ISvyTaskAnswerService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ä»»å¡é®å·é®é¢é项Controller |
| | | * |
| | | * @author ruoyi |
| | | * @date 2024-06-27 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/system/answer") |
| | | public class SvyTaskAnswerController extends BaseController { |
| | | @Autowired |
| | | private ISvyTaskAnswerService svyTaskAnswerService; |
| | | |
| | | /** |
| | | * æ¥è¯¢ä»»å¡é®å·é®é¢é项å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:answer:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(SvyTaskAnswer svyTaskAnswer) { |
| | | startPage(); |
| | | List<SvyTaskAnswer> list = svyTaskAnswerService.selectSvyTaskAnswerList(svyTaskAnswer); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºä»»å¡é®å·é®é¢é项å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:answer:export')") |
| | | @Log(title = "ä»»å¡é®å·é®é¢é项", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, SvyTaskAnswer svyTaskAnswer) { |
| | | List<SvyTaskAnswer> list = svyTaskAnswerService.selectSvyTaskAnswerList(svyTaskAnswer); |
| | | ExcelUtil<SvyTaskAnswer> util = new ExcelUtil<SvyTaskAnswer>(SvyTaskAnswer.class); |
| | | util.exportExcel(response, list, "ä»»å¡é®å·é®é¢éé¡¹æ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·åä»»å¡é®å·é®é¢é项详ç»ä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:answer:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) { |
| | | return success(svyTaskAnswerService.selectSvyTaskAnswerById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ä»»å¡é®å·é®é¢é项 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:answer:add')") |
| | | @Log(title = "ä»»å¡é®å·é®é¢é项", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody SvyTaskAnswer svyTaskAnswer) { |
| | | return toAjax(svyTaskAnswerService.insertSvyTaskAnswer(svyTaskAnswer)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ä»»å¡é®å·é®é¢é项 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:answer:edit')") |
| | | @Log(title = "ä»»å¡é®å·é®é¢é项", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody SvyTaskAnswer svyTaskAnswer) { |
| | | return toAjax(svyTaskAnswerService.updateSvyTaskAnswer(svyTaskAnswer)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ä»»å¡é®å·é®é¢é项 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:answer:remove')") |
| | | @Log(title = "ä»»å¡é®å·é®é¢é项", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) { |
| | | return toAjax(svyTaskAnswerService.deleteSvyTaskAnswerByIds(ids)); |
| | | } |
| | | } |
| | |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.DtoConversionUtils; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.RSAPublicKeyExample; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.service.ISvyTaskService; |
| | | import com.smartor.service.ISvyTaskSingleService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | 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.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | * @author ruoyi |
| | | * @date 2024-06-12 |
| | | */ |
| | | @Slf4j |
| | | @Api(description = " é®å·ä»»å¡ï¼ä»»å¡ï¼") |
| | | @RestController |
| | | @RequestMapping("/smartor/svytask") |
| | | public class SvyTaskController extends BaseController { |
| | | @Autowired |
| | | private ISvyTaskService svyTaskService; |
| | | |
| | | @Autowired |
| | | private ISvyTaskSingleService iSvyTaskSingleService; |
| | | |
| | | @Value("${pub_key}") |
| | | private String pub_key; |
| | | |
| | | @Value("${pri_key}") |
| | | private String pri_key; |
| | | |
| | | /** |
| | | * æ¥è¯¢é®å·ä»»å¡ï¼ä»»å¡ï¼å表 |
| | |
| | | public AjaxResult remove(@PathVariable Long[] taskids) { |
| | | return toAjax(svyTaskService.deleteSvyTaskByTaskids(taskids)); |
| | | } |
| | | |
| | | /** |
| | | * éè¿ä»»å¡ID忣è
IDè·åå个人çé¢ç®ä¿¡æ¯ |
| | | * |
| | | * @return |
| | | */ |
| | | @ApiOperation("éè¿ä»»å¡ID忣è
IDè·åå个人çé¢ç®ä¿¡æ¯") |
| | | @PostMapping("/getSvyScriptInfoByCondition") |
| | | public TableDataInfo getScriptInfoByCondition(@RequestBody ServiceTaskScriptQues ivrTaskScriptQues) { |
| | | RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample(); |
| | | Long tid = Long.valueOf(rsaPublicKeyExample.decryptedData(ivrTaskScriptQues.getParam1(), pri_key)); |
| | | Long pid = Long.valueOf(rsaPublicKeyExample.decryptedData(ivrTaskScriptQues.getParam2(), pri_key)); |
| | | log.info("tidåpidçå¼ä¸ºï¼{},{}", tid, pid); |
| | | return getDataTable(svyTaskService.getScriptInfoByCondition(tid, pid)); |
| | | } |
| | | } |
| | |
| | | { |
| | | return toAjax(svyTasksingledetailService.deleteSvyTasksingledetailByCalldetailids(calldetailids)); |
| | | } |
| | | // |
| | | // /** |
| | | // * æ£è
é®é¢ç»æè®°å½ |
| | | // */ |
| | | // @ApiOperation("æ£è
é®é¢ç»æè®°å½") |
| | | // @PostMapping("/saveQuestionAnswer") |
| | | // public AjaxResult saveQuestionAnswer(@RequestBody IvrTaskcalldetailReq ivrTaskcalldetailReq) { |
| | | // return toAjax(ivrTaskcalldetailService.saveQuestionAnswer(ivrTaskcalldetailReq)); |
| | | // } |
| | | } |
| | |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | public class PhoneTask implements Runnable { |
| | | private IvrTaskSingle ivrTaskSingle; |
| | | private ServiceSubtask ivrTaskSingle; |
| | | private List<IvrTaskTemplateScriptVO> ivrTaskTemplateScriptVO; |
| | | private RedisCache redisCache; |
| | | private IvrTaskTemplateVO ivrTaskTemplateVO; |
| | |
| | | private RobotPhoneUtils robotPhoneUtils; |
| | | |
| | | |
| | | public PhoneTask(IvrTaskSingle ivrTaskSingle, IvrTaskTemplateVO ivrTaskTemplateVO, RedisCache redisCache, SendService sendService, String phonePath, RobotPhoneUtils robotPhoneUtils) { |
| | | this.ivrTaskSingle = DtoConversionUtils.sourceToTarget(ivrTaskSingle, IvrTaskSingle.class); |
| | | public PhoneTask(ServiceSubtask ivrTaskSingle, IvrTaskTemplateVO ivrTaskTemplateVO, RedisCache redisCache, SendService sendService, String phonePath, RobotPhoneUtils robotPhoneUtils) { |
| | | this.ivrTaskSingle = DtoConversionUtils.sourceToTarget(ivrTaskSingle, ServiceSubtask.class); |
| | | this.ivrTaskTemplateScriptVO = DtoConversionUtils.sourceToTarget(ivrTaskTemplateVO.getIvrTaskTemplateScriptVOList(), IvrTaskTemplateScriptVO.class); |
| | | this.ivrTaskTemplateVO = DtoConversionUtils.sourceToTarget(ivrTaskTemplateVO, IvrTaskTemplateVO.class); |
| | | this.redisCache = redisCache; |
| | |
| | | import com.dingtalk.api.request.OapiGettokenRequest; |
| | | import com.dingtalk.api.request.OapiMessageCorpconversationAsyncsendV2Request; |
| | | import com.dingtalk.api.request.OapiUserListidRequest; |
| | | import com.dingtalk.api.response.*; |
| | | import com.dingtalk.api.response.OapiGettokenResponse; |
| | | import com.dingtalk.api.response.OapiMessageCorpconversationAsyncsendV2Response; |
| | | import com.dingtalk.api.response.OapiUserListidResponse; |
| | | import com.taobao.api.ApiException; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.poi.ss.usermodel.Cell; |
| | | import org.apache.poi.ss.usermodel.Row; |
| | | import org.apache.poi.ss.usermodel.Sheet; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.apache.poi.xssf.usermodel.XSSFWorkbook; |
| | | |
| | | import java.io.FileOutputStream; |
| | | import java.io.IOException; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | |
| | | // è¿æ»¤è¯·æ± |
| | | .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/ivrtask/getScriptInfoByCondition","/smartor/ivrtaskcalldetail/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/tasksingle/phoneCallBack", "/smartor/robot/callstatus", "/smartor/robot/aidialog", "/smartor/robot/cdrinfo", "/getToken", "/smartor/serviceTask/getScriptInfoByCondition", "/smartor/ivrtaskcalldetail/saveQuestionAnswer").permitAll() |
| | | // éæèµæºï¼å¯å¿åè®¿é® |
| | | .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll().antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll() |
| | | // é¤ä¸é¢å¤çææè¯·æ±å
¨é¨éè¦é´æè®¤è¯ |
| | |
| | | private Long noVoiceNum; |
| | | |
| | | /** |
| | | * å¼åºç½ |
| | | */ |
| | | @Excel(name = "å¼åºç½") |
| | | @ApiModelProperty(value = "å¼åºç½") |
| | | private String prologue; |
| | | |
| | | /** |
| | | * 模æ¿åºæ¨¡çID |
| | | */ |
| | | @Excel(name = "模æ¿åºæ¨¡çID") |
| | |
| | | @ApiModelProperty(value = "模æ¿åºæ¨¡çåç§°") |
| | | private String libtemplatename; |
| | | |
| | | /** |
| | | * æå¯¼è¯ |
| | | */ |
| | | @ApiModelProperty(value = "æå¯¼è¯") |
| | | private String instruction; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "æ¯å¦å卿ä½ï¼1 æ°å¢ 2ä¿®æ¹ 3å é¤") |
| | | private Integer isoperation; |
| | | |
| | | /** |
| | | * æå¯¼è¯ |
| | | */ |
| | | @ApiModelProperty(value = "æå¯¼è¯") |
| | | private String instruction; |
| | | |
| | | /** |
| | | * å
è®¸éæ¨æ¬¡æ° |
| | |
| | | package com.smartor.domain; |
| | | |
| | | 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 org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | |
| | | import java.util.Date; |
| | | |
| | |
| | | */ |
| | | @Excel(name = "åéç¶æ ï¼1 被é¢å 2 å¾
åé 3 å·²åé") |
| | | @ApiModelProperty("åéç¶æ ï¼1 被é¢å 2 å¾
åé 3 å·²åé") |
| | | private Integer sendStatus; |
| | | private Long sendState; |
| | | |
| | | |
| | | /** |
| | |
| | | @ApiModelProperty("æä½äºº") |
| | | private String operatePerson; |
| | | |
| | | /** |
| | | * å°±è¯ç±»åï¼1é¨è¯ 2åºé¢ï¼ |
| | | */ |
| | | @Excel(name = "å°±è¯ç±»åï¼1é¨è¯ 2åºé¢ï¼") |
| | | @ApiModelProperty("å°±è¯ç±»åï¼1é¨è¯ 2åºé¢ï¼") |
| | | private String hospType; |
| | | |
| | | |
| | | /** |
| | | * æ¥æ¶æ¶é´ |
ÎļþÃû´Ó smartor/src/main/java/com/smartor/domain/IvrTaskcalldetailReq.java ÐÞ¸Ä |
| | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * é®é¢åçæç» ivr_taskcalldetailReq |
| | | * é®é¢åçæç» |
| | | * |
| | | * @author ls |
| | | * @date 2023-06-05 |
| | | */ |
| | | @ApiModel(value = "IvrTaskcalldetailReq", description = "é®é¢åçæç»") |
| | | @ApiModel(value = "ServiceSubTaskDetailReq", description = "é®é¢åçæç»") |
| | | @Data |
| | | public class IvrTaskcalldetailReq { |
| | | public class ServiceSubTaskDetailReq { |
| | | |
| | | @ApiModelProperty(value = "ä»»å¡ID") |
| | | private String param1; |
| | |
| | | @ApiModelProperty(value = "æ£è
ID") |
| | | private String param2; |
| | | |
| | | @ApiModelProperty(value = "é®é¢åçæç»") |
| | | @ApiModelProperty(value = "é访é®é¢åçæç»") |
| | | private List<IvrTaskcalldetail> ivrTaskcalldetailList; |
| | | |
| | | @ApiModelProperty(value = "é®å·é®é¢åçæç»") |
| | | private List<SvyTasksingledetail> svyTasksingledetailList; |
| | | |
| | | } |
ÎļþÃû´Ó smartor/src/main/java/com/smartor/domain/IvrTaskSingle.java ÐÞ¸Ä |
| | |
| | | * @author ruoyi |
| | | * @date 2024-02-02 |
| | | */ |
| | | @ApiModel(value = "IvrTaskSingle", description = "åä¸é访任å¡") |
| | | @ApiModel(value = "ServiceSubtask", description = "åä¸é访任å¡") |
| | | @Data |
| | | public class IvrTaskSingle extends BaseEntity { |
| | | public class ServiceSubtask extends BaseEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.domain; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | |
| | | /** |
| | | * ã请填ååè½åç§°ã对象 service_subtask_records |
| | | * |
| | | * @author ruoyi |
| | | * @date 2024-07-01 |
| | | */ |
| | | @Data |
| | | public class ServiceSubtaskRecord extends BaseEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 任塿§è¡è®°å½ID |
| | | */ |
| | | @ApiModelProperty(value = "主é®") |
| | | private Long id; |
| | | |
| | | /** |
| | | * åä»»å¡ID |
| | | */ |
| | | @Excel(name = "åä»»å¡ID") |
| | | @ApiModelProperty(value = "åä»»å¡ID") |
| | | private String taskid; |
| | | |
| | | /** |
| | | * ä»»å¡UUID |
| | | */ |
| | | @Excel(name = "ä»»å¡UUID ") |
| | | @ApiModelProperty(value = "ä»»å¡UUID") |
| | | private String uuid; |
| | | |
| | | /** |
| | | * ä»»å¡ç±»å(0éç¥ã1宣æã2é¨è¯ã3åºé¢ã4å¤è¯ã5使£ã6é®å·ã7廿â¦â¦) |
| | | */ |
| | | @Excel(name = "ä»»å¡ç±»å(0éç¥ã1宣æã2é¨è¯ã3åºé¢ã4å¤è¯ã5使£ã6é®å·ã7廿â¦â¦)") |
| | | @ApiModelProperty(value = "ä»»å¡ç±»å(0éç¥ã1宣æã2é¨è¯ã3åºé¢ã4å¤è¯ã5使£ã6é®å·ã7廿â¦â¦)") |
| | | private String tasktype; |
| | | |
| | | /** |
| | | * ä»»å¡å½¢å¼ 1,å¤åªä½ 2,纸质 3,çµè¯ 4,çä¿¡ 5.微信å
¬ä¼å· 6.微信å°ç¨åº 7.æ¯ä»å® 8.æºè½å°ç¨åº 9.éé |
| | | */ |
| | | @Excel(name = "ä»»å¡å½¢å¼ 1,å¤åªä½ 2,纸质 3,çµè¯ 4,çä¿¡ 5.微信å
¬ä¼å· 6.微信å°ç¨åº 7.æ¯ä»å® 8.æºè½å°ç¨åº 9.éé") |
| | | @ApiModelProperty(value = "ä»»å¡å½¢å¼ 1,å¤åªä½ 2,纸质 3,çµè¯ 4,çä¿¡ 5.微信å
¬ä¼å· 6.微信å°ç¨åº 7.æ¯ä»å® 8.æºè½å°ç¨åº 9.éé") |
| | | private String preachform; |
| | | |
| | | /** |
| | | * è®°å½å±æ§ï¼0-ææ°è®°å½ï¼1-åå²è®°å½ |
| | | */ |
| | | @Excel(name = "è®°å½å±æ§ï¼0-ææ°è®°å½ï¼1-åå²è®°å½") |
| | | @ApiModelProperty(value = "è®°å½å±æ§ï¼0-ææ°è®°å½ï¼1-åå²è®°å½") |
| | | private String recordtype; |
| | | |
| | | /** |
| | | * å¼å§æ¶é´ |
| | | */ |
| | | @Excel(name = "å¼å§æ¶é´") |
| | | @ApiModelProperty(value = "å¼å§æ¶é´") |
| | | private Long startTime; |
| | | |
| | | /** |
| | | * ç»ææ¶é´ |
| | | */ |
| | | @Excel(name = "ç»ææ¶é´") |
| | | @ApiModelProperty(value = "ç»ææ¶é´") |
| | | private Long endTime; |
| | | |
| | | /** |
| | | * æ§è¡ç»æ |
| | | */ |
| | | @Excel(name = "æ§è¡ç»æ") |
| | | @ApiModelProperty(value = "æ§è¡ç»æ") |
| | | private String result; |
| | | |
| | | /** |
| | | * å 餿 å¿ï¼0ï¼æªå é¤ 1ï¼å·²å é¤ï¼ |
| | | */ |
| | | @ApiModelProperty(value = "å 餿 å¿ï¼0ï¼æªå é¤ 1ï¼å·²å é¤ï¼") |
| | | private String delFlag; |
| | | |
| | | /** |
| | | * ä¸ä¼ æ å¿ï¼0ï¼æªä¸ä¼ 1ï¼å·²ä¸ä¼ ï¼ |
| | | */ |
| | | @Excel(name = "ä¸ä¼ æ å¿", readConverterExp = "0=ï¼æªä¸ä¼ ,1=ï¼å·²ä¸ä¼ ") |
| | | @ApiModelProperty(value = "ä¸ä¼ æ å¿ï¼0ï¼æªä¸ä¼ 1ï¼å·²ä¸ä¼ ï¼") |
| | | private Long isupload; |
| | | |
| | | /** |
| | | * ä¸ä¼ æ¶é´ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "ä¸ä¼ æ¶é´", width = 30, dateFormat = "yyyy-MM-dd") |
| | | @ApiModelProperty(value = "ä¸ä¼ æ¶é´") |
| | | private Date uploadTime; |
| | | |
| | | /** |
| | | * æºæID |
| | | */ |
| | | @Excel(name = "æºæID") |
| | | @ApiModelProperty(value = "æºæID") |
| | | private String orgid; |
| | | |
| | | /** |
| | | * ç¶ID |
| | | */ |
| | | @Excel(name = "ç¶ID") |
| | | @ApiModelProperty(value = "ç¶ID") |
| | | private Long pid; |
| | | |
| | | /** |
| | | * GUID |
| | | */ |
| | | @Excel(name = "GUID") |
| | | @ApiModelProperty(value = "GUID") |
| | | private String guid; |
| | | |
| | | |
| | | } |
ÎļþÃû´Ó smartor/src/main/java/com/smartor/domain/IvrTaskSingleVO.java ÐÞ¸Ä |
| | |
| | | * @author ruoyi |
| | | * @date 2024-02-02 |
| | | */ |
| | | @ApiModel(value = "IvrTaskSingleVO", description = "åä¸é访任å¡å
¥å") |
| | | @ApiModel(value = "ServiceSubtaskVO", description = "åä¸é访任å¡å
¥å") |
| | | @Data |
| | | public class IvrTaskSingleVO extends BaseEntity { |
| | | public class ServiceSubtaskVO extends BaseEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
ÎļþÃû´Ó smartor/src/main/java/com/smartor/domain/IvrTask.java ÐÞ¸Ä |
| | |
| | | * @author smartor |
| | | * @date 2023-03-24 |
| | | */ |
| | | @ApiModel(value = "IvrTask", description = "ä»»å¡å¯¹è±¡") |
| | | @ApiModel(value = "ServiceTask", description = "ä»»å¡å¯¹è±¡") |
| | | @Data |
| | | public class IvrTask extends BaseEntity { |
| | | public class ServiceTask extends BaseEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | |
| | | private Date checktime; |
| | | |
| | | /** |
| | | * 1ï¼åºé¢é访ï¼2ï¼ä½æ£éç¥ï¼3ï¼æ»¡æåº¦è°æ¥ï¼4ï¼å®£æï¼ |
| | | * "1ï¼é访ï¼2ï¼é®å·ï¼3.宣æï¼ |
| | | */ |
| | | @Excel(name = " 1ï¼åºé¢é访ï¼2ï¼ä½æ£éç¥ï¼3ï¼æ»¡æåº¦è°æ¥ï¼4ï¼å®£æï¼ ") |
| | | @ApiModelProperty(value = "1ï¼åºé¢é访ï¼2ï¼ä½æ£éç¥ï¼3ï¼æ»¡æåº¦è°æ¥ï¼4ï¼å®£æï¼") |
| | | @Excel(name = "1ï¼é访ï¼2ï¼é®å·ï¼3.宣æï¼ ") |
| | | @ApiModelProperty(value = "1ï¼é访ï¼2ï¼é®å·ï¼3.宣æï¼") |
| | | private String type; |
| | | |
| | | /** |
ÎļþÃû´Ó smartor/src/main/java/com/smartor/domain/IvrTaskScriptQues.java ÐÞ¸Ä |
| | |
| | | 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; |
| | | |
| | | /** |
| | | * è¯é³ä»»å¡å¯¹è±¡ ivr_task |
| | | * è¯é³ä»»å¡å¯¹è±¡ service_task |
| | | * |
| | | * @author smartor |
| | | * @date 2023-03-24 |
| | | */ |
| | | @ApiModel(value = "IvrTaskScriptQues", description = "ä»»å¡å¯¹è±¡") |
| | | @ApiModel(value = "ServiceTaskScriptQues", description = "ä»»å¡å¯¹è±¡") |
| | | @Data |
| | | public class IvrTaskScriptQues { |
| | | public class ServiceTaskScriptQues { |
| | | |
| | | /** |
| | | * taskid |
ÎļþÃû´Ó smartor/src/main/java/com/smartor/domain/IvrTaskVO.java ÐÞ¸Ä |
| | |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | * @date 2023-03-24 |
| | | */ |
| | | @Data |
| | | public class IvrTaskVO extends BaseEntity { |
| | | public class ServiceTaskVO extends BaseEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Excel(name = " 宣æ£è
ä¸åä¸ä»»å¡å
³è表éå") |
| | | @ApiModelProperty(value = "æ£è
ä¸åä¸ä»»å¡å
³è表éå") |
| | | private List<PatTaskRelevance> patTaskRelevances; |
| | | private List<PatTaskRelevance> patTaskRelevances = new ArrayList<>(); |
| | | |
| | | /** |
| | | * æ¯å¦å卿ä½ï¼1 æ°å¢ 2ä¿®æ¹ 3å é¤ |
| | |
| | | /** |
| | | * é®å·ID |
| | | */ |
| | | @Excel(name = " é®å·ID ") |
| | | @ApiModelProperty("é®å·ID") |
| | | @Excel(name = " é®å·æ¨¡æ¿ID ") |
| | | @ApiModelProperty("é®å·æ¨¡æ¿ID") |
| | | private Long svyid; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Excel(name = " é¢ç®Code ") |
| | | @ApiModelProperty("é¢ç®Code") |
| | | private String scriptCode; |
| | | private String seqno; |
| | | |
| | | /** |
| | | * æ¯å¦å卿ä½ï¼1 æ°å¢ 2ä¿®æ¹ 3å é¤ |
| | |
| | | */ |
| | | @Excel(name = " é¢ç® ") |
| | | @ApiModelProperty("é¢ç®") |
| | | private String script; |
| | | private String scriptContent; |
| | | |
| | | /** |
| | | * é¢ç®æ ç¾ |
| | |
| | | */ |
| | | @Excel(name = "é¢ç®å
容") |
| | | @ApiModelProperty("é¢ç®æè¿°") |
| | | private String scriptContent; |
| | | private String scriptDesc; |
| | | |
| | | /** |
| | | * é¢ç®å¾ç |
| | |
| | | */ |
| | | @Excel(name = "é¢ç®ä¸»é¢") |
| | | @ApiModelProperty("é¢ç®ä¸»é¢") |
| | | private String topic; |
| | | private String scriptTopic; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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; |
| | | |
| | | /** |
| | | * 模æ¿é®å·é¢ç®å¯¹è±¡ svy_lib_template_script |
| | | * |
| | | * @author ruoyi |
| | | * @date 2024-06-18 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "SvyLibTemplateScriptVO", description = "模æ¿é®å·é¢ç®å¯¹è±¡") |
| | | public class SvyLibTemplateScriptVO extends BaseEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * èªå¢ID |
| | | */ |
| | | @ApiModelProperty("èªå¢ID") |
| | | private Long id; |
| | | |
| | | /** |
| | | * èçæ¬ID |
| | | */ |
| | | @Excel(name = " èçæ¬ID ") |
| | | @ApiModelProperty("èçæ¬ID") |
| | | private Long oldid; |
| | | |
| | | /** |
| | | * é®å·ID |
| | | */ |
| | | @Excel(name = " é®å·æ¨¡æ¿ID ") |
| | | @ApiModelProperty("é®å·æ¨¡æ¿ID") |
| | | private Long svyid; |
| | | |
| | | /** |
| | | * é¢ç®ç±»å;æä¸¾ 1.åé 2å¤é 3填空 4å
¶å® |
| | | */ |
| | | @Excel(name = " é¢ç®ç±»å;æä¸¾ 1.åé 2å¤é 3填空 4å
¶å®") |
| | | @ApiModelProperty("é¢ç®ç±»å;æä¸¾ 1.åé 2å¤é 3填空 4å
¶å®") |
| | | private String scriptType; |
| | | |
| | | /** |
| | | * é¢ç®Code |
| | | */ |
| | | @Excel(name = " é¢ç®Code ") |
| | | @ApiModelProperty("é¢ç®Code") |
| | | private String seqno; |
| | | |
| | | /** |
| | | * æ¯å¦å卿ä½ï¼1 æ°å¢ 2ä¿®æ¹ 3å é¤ |
| | | */ |
| | | @ApiModelProperty(value = "æ¯å¦å卿ä½ï¼1 æ°å¢ 2ä¿®æ¹ 3å é¤") |
| | | private Integer isoperation; |
| | | |
| | | /** |
| | | * é¢ç® |
| | | */ |
| | | @Excel(name = " é¢ç® ") |
| | | @ApiModelProperty("é¢ç®") |
| | | private String scriptContent; |
| | | |
| | | /** |
| | | * é¢ç®æ ç¾ |
| | | */ |
| | | @Excel(name = "é¢ç®æ ç¾") |
| | | @ApiModelProperty("é¢ç®æ ç¾") |
| | | private String tag; |
| | | |
| | | /** |
| | | * æåº |
| | | */ |
| | | @Excel(name = " æåº ") |
| | | @ApiModelProperty("æåº") |
| | | private Long sort; |
| | | |
| | | /** |
| | | * æ¯å¦å¿
å¡« 0å¿
å¡« 1ä¸å¿
å¡« |
| | | */ |
| | | @Excel(name = " æ¯å¦å¿
å¡« 0å¿
å¡« 1ä¸å¿
å¡«") |
| | | @ApiModelProperty("æ¯å¦å¿
å¡« 0å¿
å¡« 1ä¸å¿
å¡«") |
| | | private String ismandatory; |
| | | |
| | | /** |
| | | * æ¯å¦éè |
| | | */ |
| | | @Excel(name = " æ¯å¦éè ") |
| | | @ApiModelProperty("æ¯å¦éè") |
| | | private Long ishide; |
| | | |
| | | /** |
| | | * å 餿 è®° |
| | | */ |
| | | @ApiModelProperty("å 餿 è®°") |
| | | private String delFlag; |
| | | |
| | | /** |
| | | * æºæID |
| | | */ |
| | | @Excel(name = " æºæID ") |
| | | @ApiModelProperty("æºæID") |
| | | private String orgid; |
| | | |
| | | /** |
| | | * ä¸ä¼ æ è®° |
| | | */ |
| | | @Excel(name = " ä¸ä¼ æ è®° ") |
| | | @ApiModelProperty("ä¸ä¼ æ è®°") |
| | | private Long isupload; |
| | | |
| | | /** |
| | | * ä¸ä¼ æ¶é´ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = " ä¸ä¼ æ¶é´ ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | @ApiModelProperty("ä¸ä¼ æ¶é´") |
| | | private Date uploadTime; |
| | | |
| | | /** |
| | | * åºå¼ |
| | | */ |
| | | @ApiModelProperty("ï¼åºå¼ï¼") |
| | | private Long svyTopicid; |
| | | |
| | | /** |
| | | * ç¶ID |
| | | */ |
| | | @Excel(name = "ç¶ID") |
| | | @ApiModelProperty("ç¶ID") |
| | | private Long pid; |
| | | |
| | | /** |
| | | * GUID |
| | | */ |
| | | @Excel(name = "GUID") |
| | | @ApiModelProperty("GUID") |
| | | private String guid; |
| | | |
| | | /** |
| | | * åç±»id |
| | | */ |
| | | @Excel(name = "åç±»id") |
| | | @ApiModelProperty("åç±»id") |
| | | private Long categoryid; |
| | | |
| | | /** |
| | | * é¢ç®å
容 |
| | | */ |
| | | @Excel(name = "é¢ç®å
容") |
| | | @ApiModelProperty("é¢ç®æè¿°") |
| | | private String scriptDesc; |
| | | |
| | | /** |
| | | * é¢ç®å¾ç |
| | | */ |
| | | @Excel(name = "é¢ç®å¾ç") |
| | | @ApiModelProperty("é¢ç®å¾ç") |
| | | private String scriptPicture; |
| | | |
| | | /** |
| | | * éç¨æ¹å¼ï¼è°æ¥è¡¨1ï¼æºè½è¯é³2ã人工3 |
| | | */ |
| | | @Excel(name = "éç¨æ¹å¼ï¼è°æ¥è¡¨1ï¼æºè½è¯é³2ã人工3") |
| | | @ApiModelProperty("éç¨æ¹å¼ï¼è°æ¥è¡¨1ï¼æºè½è¯é³2ã人工3") |
| | | private String suitway; |
| | | |
| | | /** |
| | | * æ¯å¦å¯ç¨ 0å¯ç¨ 1ä¸å¯ç¨ |
| | | */ |
| | | @Excel(name = "æ¯å¦å¯ç¨ 0å¯ç¨ 1ä¸å¯ç¨") |
| | | @ApiModelProperty("æ¯å¦å¯ç¨ 0å¯ç¨ 1ä¸å¯ç¨") |
| | | private String isavailable; |
| | | |
| | | /** |
| | | * è¯è¨ |
| | | */ |
| | | @Excel(name = "è¯è¨") |
| | | @ApiModelProperty("è¯è¨") |
| | | private String language; |
| | | |
| | | /** |
| | | * å
¶å®æ°æ®ï¼åå¨åéï¼ |
| | | */ |
| | | @Excel(name = "å
¶å®æ°æ®", readConverterExp = "å=å¨åé") |
| | | @ApiModelProperty("å
¶å®æ°æ®ï¼åå¨åéï¼") |
| | | private String otherdata; |
| | | |
| | | /** |
| | | * å¼ç±»åï¼1 é项 2 ææ¬ 3 æ°å¼ï¼ |
| | | */ |
| | | @Excel(name = "å¼ç±»å", readConverterExp = "1=,é=项,2=,æ=æ¬,3=,æ°=å¼") |
| | | @ApiModelProperty("å¼ç±»åï¼1 é项 2 ææ¬ 3 æ°å¼ï¼") |
| | | private String valueType; |
| | | |
| | | /** |
| | | * åå¤ï¼æé®é¢çåå¤ï¼ç»é®çé¢ç¨çï¼ |
| | | */ |
| | | @Excel(name = "åå¤", readConverterExp = "æ=é®é¢çåå¤ï¼ç»é®çé¢ç¨ç") |
| | | @ApiModelProperty("åå¤ï¼æé®é¢çåå¤ï¼ç»é®çé¢ç¨çï¼") |
| | | private String reply; |
| | | |
| | | /** |
| | | * åå¼ç±»åï¼1ï¼æ°åï¼2ï¼ç级 |
| | | */ |
| | | @Excel(name = "åå¼ç±»åï¼1ï¼æ°åï¼2ï¼ç级") |
| | | @ApiModelProperty("åå¼ç±»åï¼1ï¼æ°åï¼2ï¼ç级") |
| | | private String scoretype; |
| | | |
| | | /** |
| | | * 模æ¿é®é¢é项éå |
| | | */ |
| | | @Excel(name = "模æ¿é®é¢é项éå") |
| | | @ApiModelProperty("模æ¿é®é¢é项éå") |
| | | private List<SvyLibTemplateTargetoption> svyLibTemplateTargetoptions = new ArrayList<>(); |
| | | |
| | | /** |
| | | * é¢ç®åå¼ï¼æ°å1,2çï¼åæ¯AãBï¼Cï¼Dçï¼ |
| | | */ |
| | | @Excel(name = "é¢ç®åå¼ï¼æ°å1,2çï¼åæ¯AãBï¼Cï¼Dçï¼") |
| | | @ApiModelProperty("é¢ç®åå¼ï¼æ°å1,2çï¼åæ¯AãBï¼Cï¼Dçï¼") |
| | | private String score; |
| | | |
| | | /** |
| | | * é¢ç®ä¸»é¢ |
| | | */ |
| | | @Excel(name = "é¢ç®ä¸»é¢") |
| | | @ApiModelProperty("é¢ç®ä¸»é¢") |
| | | private String scriptTopic; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.domain; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * ä»»å¡é®å·é®é¢é项对象 svy_task_answer |
| | | * |
| | | * @author ruoyi |
| | | * @date 2024-06-27 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "SvyTaskAnswer", description = "ä»»å¡é®å·é®é¢é项对象") |
| | | public class SvyTaskAnswer extends BaseEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | @ApiModelProperty(value = "èªå¢ID") |
| | | private Long id; |
| | | |
| | | /** |
| | | * ä»»å¡ID |
| | | */ |
| | | @ApiModelProperty(value = "ä»»å¡ID") |
| | | private Long taskid; |
| | | |
| | | /** |
| | | * åä»»å¡ID |
| | | */ |
| | | @ApiModelProperty(value = "åä»»å¡ID") |
| | | private Long singleid; |
| | | |
| | | /** |
| | | * é¢ç®ID |
| | | */ |
| | | @ApiModelProperty(value = "é¢ç®ID") |
| | | private Long scriptid; |
| | | |
| | | /** |
| | | * é¢ç®ç±»å |
| | | */ |
| | | @ApiModelProperty(value = "é¢ç®ç±»å") |
| | | private Long scriptType; |
| | | |
| | | /** |
| | | * å¾åï¼1ã2ã3ï¼æAãBãCï¼æä¼ãè¯ãåæ ¼ï¼ |
| | | */ |
| | | @ApiModelProperty(value = "å¾å 1=ã2ã3ï¼æAãBãCï¼æä¼ãè¯ãåæ ¼") |
| | | private String score; |
| | | |
| | | /** |
| | | * åçï¼å
许å¤éï¼ |
| | | */ |
| | | @ApiModelProperty(value = "åç å
=许å¤é") |
| | | private String answer; |
| | | |
| | | /** |
| | | * è¯è¯ |
| | | */ |
| | | @ApiModelProperty(value = "è¯è¯") |
| | | private String comment; |
| | | |
| | | /** |
| | | * éè¦è·è¿ï¼æ¯ï¼1ãå¦ï¼0ï¼ |
| | | */ |
| | | @ApiModelProperty(value = "éè¦è·è¿ æ¯=ï¼1ãå¦ï¼0") |
| | | private String istrack; |
| | | |
| | | /** |
| | | * å¼å¸¸é¢è¦ï¼æ¯ï¼1ãå¦ï¼0ï¼ |
| | | */ |
| | | @ApiModelProperty(value = "å¼å¸¸é¢è¦ æ¯=ï¼1ãå¦ï¼0") |
| | | private String isabnormal; |
| | | |
| | | /** |
| | | * å 餿 å¿ï¼0ï¼æªå é¤ 1ï¼å·²å é¤ï¼ |
| | | */ |
| | | private String delFlag; |
| | | |
| | | /** |
| | | * ä¸ä¼ æ å¿ï¼0ï¼æªä¸ä¼ 1ï¼å·²ä¸ä¼ ï¼ |
| | | */ |
| | | @ApiModelProperty(value = "ä¸ä¼ æ å¿ 0=ï¼æªä¸ä¼ ,1=ï¼å·²ä¸ä¼ ") |
| | | private Long isupload; |
| | | |
| | | /** |
| | | * ä¸ä¼ æ¶é´ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @ApiModelProperty(value = "ä¸ä¼ æ¶é´") |
| | | private Date uploadTime; |
| | | |
| | | /** |
| | | * ç¶ID |
| | | */ |
| | | @ApiModelProperty(value = "ç¶ID") |
| | | private String pid; |
| | | |
| | | /** |
| | | * GUID |
| | | */ |
| | | @ApiModelProperty(value = "GUID") |
| | | private String guid; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "ä»»å¡ID") |
| | | private Long taskid; |
| | | |
| | | @ApiModelProperty(value = "å¼åºç½") |
| | | private String prologue; |
| | | |
| | | @ApiModelProperty(value = "æå¯¼è¯") |
| | | private String instruction; |
| | | |
| | | @ApiModelProperty(value = "ç»æè¯") |
| | | private String conclusion; |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "æ¯å¦å卿ä½ï¼1 æ°å¢ 2ä¿®æ¹ 3å é¤") |
| | | private Integer isoperation; |
| | | |
| | | @ApiModelProperty(value = "å¼åºç½") |
| | | private String prologue; |
| | | |
| | | @ApiModelProperty(value = "æå¯¼è¯") |
| | | private String instruction; |
| | | |
| | | @ApiModelProperty(value = "ç»æè¯") |
| | | private String conclusion; |
| | | |
| | | |
| | | @ApiModelProperty(value = "模æ¿é®é¢éå") |
| | | private List<SvyTaskTemplateScriptVO> svyTaskTemplateScriptVOS = new ArrayList<>(); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.mapper; |
| | | |
| | | import com.smartor.domain.ServiceSubtask; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * åä¸ä»»å¡ï¼é访ï¼Mapperæ¥å£ |
| | | * |
| | | * @author ruoyi |
| | | * @date 2024-02-02 |
| | | */ |
| | | @Mapper |
| | | public interface ServiceSubtaskMapper { |
| | | /** |
| | | * æ¥è¯¢åä¸ä»»å¡ï¼éè®¿ï¼ |
| | | * |
| | | * @param id åä¸ä»»å¡ï¼é访ï¼ä¸»é® |
| | | * @return åä¸ä»»å¡ï¼éè®¿ï¼ |
| | | */ |
| | | public ServiceSubtask selectServiceSubtaskById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢åä¸ä»»å¡ï¼é访ï¼å表 |
| | | * |
| | | * @param serviceSubtask åä¸ä»»å¡ï¼éè®¿ï¼ |
| | | * @return åä¸ä»»å¡ï¼é访ï¼éå |
| | | */ |
| | | public List<ServiceSubtask> selectServiceSubtaskList(ServiceSubtask serviceSubtask); |
| | | |
| | | /** |
| | | * æ°å¢åä¸ä»»å¡ï¼éè®¿ï¼ |
| | | * |
| | | * @param ServiceSubtask åä¸ä»»å¡ï¼éè®¿ï¼ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertServiceSubtask(ServiceSubtask ServiceSubtask); |
| | | |
| | | /** |
| | | * ä¿®æ¹åä¸ä»»å¡ï¼éè®¿ï¼ |
| | | * |
| | | * @return ç»æ |
| | | */ |
| | | public Boolean updateServiceSubtask(ServiceSubtask ServiceSubtask); |
| | | |
| | | public Boolean updateServiceSubtaskByCondition(ServiceSubtask ServiceSubtask); |
| | | |
| | | /** |
| | | * å é¤åä¸ä»»å¡ï¼éè®¿ï¼ |
| | | * |
| | | * @param id åä¸ä»»å¡ï¼é访ï¼ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteServiceSubtaskById(Long id); |
| | | |
| | | public int deleteServiceSubtaskByCondition(@Param("taskid") Long id, @Param("patid") Long patid); |
| | | |
| | | /** |
| | | * å é¤åä¸ä»»å¡ï¼éè®¿ï¼ |
| | | * |
| | | * @return ç»æ |
| | | */ |
| | | public List<ServiceSubtask> getDataByTime(@Param("beganTime") String beganTime, @Param("endTime") String endTime); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.mapper; |
| | | |
| | | import com.smartor.domain.ServiceSubtaskRecord; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ã请填ååè½åç§°ãMapperæ¥å£ |
| | | * |
| | | * @author ruoyi |
| | | * @date 2024-07-01 |
| | | */ |
| | | @Mapper |
| | | public interface ServiceSubtaskRecordMapper { |
| | | /** |
| | | * æ¥è¯¢ã请填ååè½åç§°ã |
| | | * |
| | | * @param id ã请填ååè½åç§°ãä¸»é® |
| | | * @return ã请填ååè½åç§°ã |
| | | */ |
| | | public ServiceSubtaskRecord selectServiceSubtaskRecordById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢ã请填ååè½åç§°ãå表 |
| | | * |
| | | * @param serviceSubtaskRecord ã请填ååè½åç§°ã |
| | | * @return ã请填ååè½åç§°ãéå |
| | | */ |
| | | public List<ServiceSubtaskRecord> selectServiceSubtaskRecordList(ServiceSubtaskRecord serviceSubtaskRecord); |
| | | |
| | | /** |
| | | * æ°å¢ã请填ååè½åç§°ã |
| | | * |
| | | * @param serviceSubtaskRecord ã请填ååè½åç§°ã |
| | | * @return ç»æ |
| | | */ |
| | | public int insertServiceSubtaskRecord(ServiceSubtaskRecord serviceSubtaskRecord); |
| | | |
| | | /** |
| | | * ä¿®æ¹ã请填ååè½åç§°ã |
| | | * |
| | | * @param serviceSubtaskRecord ã请填ååè½åç§°ã |
| | | * @return ç»æ |
| | | */ |
| | | public int updateServiceSubtaskRecord(ServiceSubtaskRecord serviceSubtaskRecord); |
| | | |
| | | /** |
| | | * å é¤ã请填ååè½åç§°ã |
| | | * |
| | | * @param id ã请填ååè½åç§°ãä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteServiceSubtaskRecordById(Long id); |
| | | |
| | | /** |
| | | * æ¹éå é¤ã请填ååè½åç§°ã |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteServiceSubtaskRecordByIds(Long[] ids); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.mapper; |
| | | |
| | | import java.util.List; |
| | | import com.smartor.domain.ServiceTask; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * è¯é³ä»»å¡Mapperæ¥å£ |
| | | * |
| | | * @author smartor |
| | | * @date 2023-03-24 |
| | | */ |
| | | @Mapper |
| | | public interface ServiceTaskMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢è¯é³ä»»å¡ |
| | | * |
| | | * @param taskid è¯é³ä»»å¡ä¸»é® |
| | | * @return è¯é³ä»»å¡ |
| | | */ |
| | | public ServiceTask selectServiceTaskByTaskid(Long taskid); |
| | | |
| | | /** |
| | | * æ¥è¯¢è¯é³ä»»å¡å表 |
| | | * |
| | | * @param ServiceTask è¯é³ä»»å¡ |
| | | * @return è¯é³ä»»å¡éå |
| | | */ |
| | | public List<ServiceTask> selectServiceTaskList(ServiceTask ServiceTask); |
| | | |
| | | /** |
| | | * æ°å¢è¯é³ä»»å¡ |
| | | * |
| | | * @param ServiceTask è¯é³ä»»å¡ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertServiceTask(ServiceTask ServiceTask); |
| | | |
| | | /** |
| | | * ä¿®æ¹è¯é³ä»»å¡ |
| | | * |
| | | * @param ServiceTask è¯é³ä»»å¡ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateServiceTask(ServiceTask ServiceTask); |
| | | |
| | | /** |
| | | * å é¤è¯é³ä»»å¡ |
| | | * |
| | | * @param taskid è¯é³ä»»å¡ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public Boolean deleteServiceTaskByTaskid(Long taskid); |
| | | |
| | | /** |
| | | * æ¹éå é¤è¯é³ä»»å¡ |
| | | * |
| | | * @param taskids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteServiceTaskByTaskids(Long[] taskids); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.mapper; |
| | | |
| | | import com.smartor.domain.SvyTaskAnswer; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ä»»å¡é®å·é®é¢é项Mapperæ¥å£ |
| | | * |
| | | * @author ruoyi |
| | | * @date 2024-06-27 |
| | | */ |
| | | @Mapper |
| | | public interface SvyTaskAnswerMapper { |
| | | /** |
| | | * æ¥è¯¢ä»»å¡é®å·é®é¢é项 |
| | | * |
| | | * @param id ä»»å¡é®å·é®é¢éé¡¹ä¸»é® |
| | | * @return ä»»å¡é®å·é®é¢é项 |
| | | */ |
| | | public SvyTaskAnswer selectSvyTaskAnswerById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢ä»»å¡é®å·é®é¢é项å表 |
| | | * |
| | | * @param svyTaskAnswer ä»»å¡é®å·é®é¢é项 |
| | | * @return ä»»å¡é®å·é®é¢é项éå |
| | | */ |
| | | public List<SvyTaskAnswer> selectSvyTaskAnswerList(SvyTaskAnswer svyTaskAnswer); |
| | | |
| | | /** |
| | | * æ°å¢ä»»å¡é®å·é®é¢é项 |
| | | * |
| | | * @param svyTaskAnswer ä»»å¡é®å·é®é¢é项 |
| | | * @return ç»æ |
| | | */ |
| | | public int insertSvyTaskAnswer(SvyTaskAnswer svyTaskAnswer); |
| | | |
| | | /** |
| | | * ä¿®æ¹ä»»å¡é®å·é®é¢é项 |
| | | * |
| | | * @param svyTaskAnswer ä»»å¡é®å·é®é¢é项 |
| | | * @return ç»æ |
| | | */ |
| | | public int updateSvyTaskAnswer(SvyTaskAnswer svyTaskAnswer); |
| | | |
| | | /** |
| | | * å é¤ä»»å¡é®å·é®é¢é项 |
| | | * |
| | | * @param id ä»»å¡é®å·é®é¢éé¡¹ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteSvyTaskAnswerById(Long id); |
| | | |
| | | /** |
| | | * æ¹éå é¤ä»»å¡é®å·é®é¢é项 |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteSvyTaskAnswerByIds(Long[] ids); |
| | | } |
| | |
| | | package com.smartor.service; |
| | | |
| | | import com.smartor.domain.IvrTaskSingle; |
| | | import com.smartor.domain.IvrTaskSingleVO; |
| | | import com.smartor.domain.PhoneCallBackVO; |
| | | import com.smartor.domain.SendTaskVO; |
| | | import com.smartor.domain.robot.back.RobotAIDialogBack; |
| | | import com.smartor.domain.robot.back.RobotCallBack; |
| | | import com.smartor.domain.robot.back.RobotcdrInfoBack; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æå¡åè°Serviceæ¥å£ |
| | |
| | | |
| | | /** |
| | | * ææºè®¡è´¹ä¿¡æ¯è¿åæ°æ®æ¥å£ |
| | | * |
| | | * @param robotcdrInfoBack |
| | | * @return |
| | | */ |
| | |
| | | package com.smartor.service; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.smartor.domain.IvrTaskcalldetail; |
| | | import com.smartor.domain.IvrTaskcalldetailReq; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è¯é³ä»»å¡å¼å«æç»Serviceæ¥å£ |
| | |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteIvrTaskcalldetailByCalldetailid(String calldetailid); |
| | | |
| | | public Integer saveQuestionAnswer(IvrTaskcalldetailReq ivrTaskcalldetailReq); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.service; |
| | | |
| | | import com.smartor.domain.ServiceSubtaskRecord; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ã请填ååè½åç§°ãServiceæ¥å£ |
| | | * |
| | | * @author ruoyi |
| | | * @date 2024-07-01 |
| | | */ |
| | | public interface IServiceSubtaskRecordService |
| | | { |
| | | /** |
| | | * æ¥è¯¢ã请填ååè½åç§°ã |
| | | * |
| | | * @param id ã请填ååè½åç§°ãä¸»é® |
| | | * @return ã请填ååè½åç§°ã |
| | | */ |
| | | public ServiceSubtaskRecord selectServiceSubtaskRecordById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢ã请填ååè½åç§°ãå表 |
| | | * |
| | | * @param serviceSubtaskRecord ã请填ååè½åç§°ã |
| | | * @return ã请填ååè½åç§°ãéå |
| | | */ |
| | | public List<ServiceSubtaskRecord> selectServiceSubtaskRecordList(ServiceSubtaskRecord serviceSubtaskRecord); |
| | | |
| | | /** |
| | | * æ°å¢ã请填ååè½åç§°ã |
| | | * |
| | | * @param serviceSubtaskRecord ã请填ååè½åç§°ã |
| | | * @return ç»æ |
| | | */ |
| | | public int insertServiceSubtaskRecord(ServiceSubtaskRecord serviceSubtaskRecord); |
| | | |
| | | /** |
| | | * ä¿®æ¹ã请填ååè½åç§°ã |
| | | * |
| | | * @param serviceSubtaskRecord ã请填ååè½åç§°ã |
| | | * @return ç»æ |
| | | */ |
| | | public int updateServiceSubtaskRecord(ServiceSubtaskRecord serviceSubtaskRecord); |
| | | |
| | | /** |
| | | * æ¹éå é¤ã请填ååè½åç§°ã |
| | | * |
| | | * @param ids éè¦å é¤çã请填ååè½åç§°ã主é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteServiceSubtaskRecordByIds(Long[] ids); |
| | | |
| | | /** |
| | | * å é¤ã请填ååè½åç§°ãä¿¡æ¯ |
| | | * |
| | | * @param id ã请填ååè½åç§°ãä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteServiceSubtaskRecordById(Long id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.service; |
| | | |
| | | import com.smartor.domain.*; |
| | | import com.smartor.domain.ServiceSubtask; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * åä¸ä»»å¡ï¼é访ï¼Serviceæ¥å£ |
| | | * |
| | | * @author ruoyi |
| | | * @date 2024-02-02 |
| | | */ |
| | | public interface IServiceSubtaskService { |
| | | /** |
| | | * æ¥è¯¢åä¸ä»»å¡ï¼éè®¿ï¼ |
| | | * |
| | | * @param id åä¸ä»»å¡ï¼é访ï¼ä¸»é® |
| | | * @return åä¸ä»»å¡ï¼éè®¿ï¼ |
| | | */ |
| | | public ServiceSubtask selectServiceSubtaskById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢åä¸ä»»å¡ï¼é访ï¼å表 |
| | | * |
| | | * @param ServiceSubtask åä¸ä»»å¡ï¼éè®¿ï¼ |
| | | * @return åä¸ä»»å¡ï¼é访ï¼éå |
| | | */ |
| | | public List<ServiceSubtask> selectServiceSubtaskList(ServiceSubtask ServiceSubtask); |
| | | |
| | | /** |
| | | * æ ¹æ®æ¡ä»¶æ¥è¯¢ä»»å¡ä¿¡æ¯ |
| | | * |
| | | * @param ServiceSubtask |
| | | * @return |
| | | */ |
| | | public ServiceTaskVO queryTaskByCondition(ServiceSubtask ServiceSubtask); |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£è
éè®¿ä¿¡æ¯ |
| | | */ |
| | | public List<ServiceSubtask> patItem(ServiceSubtask ServiceSubtask); |
| | | |
| | | /** |
| | | * æ°å¢åä¸ä»»å¡ï¼éè®¿ï¼ |
| | | * |
| | | * @param ServiceSubtask åä¸ä»»å¡ï¼éè®¿ï¼ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertServiceSubtask(ServiceSubtask ServiceSubtask); |
| | | |
| | | /** |
| | | * ä¿®æ¹åä¸ä»»å¡ï¼éè®¿ï¼ |
| | | * |
| | | * @param ServiceSubtask åä¸ä»»å¡ï¼éè®¿ï¼ |
| | | * @return ç»æ |
| | | */ |
| | | public Boolean updateServiceSubtask(ServiceSubtask ServiceSubtask); |
| | | |
| | | /** |
| | | * æ¹éå é¤åä¸ä»»å¡ï¼éè®¿ï¼ |
| | | * |
| | | * @param ids éè¦å é¤çåä¸ä»»å¡ï¼é访ï¼ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteServiceSubtaskByIds(Long[] ids); |
| | | |
| | | /** |
| | | * æ°å¢å®£æä»»å¡ |
| | | * |
| | | * @param ivrTaskVO åä¸ä»»å¡ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertOrUpdateTask(ServiceTaskVO ivrTaskVO); |
| | | |
| | | |
| | | /** |
| | | * çµè¯åè°ä»»å¡ |
| | | * |
| | | * @param phoneCallBackVO |
| | | * @return ç»æ |
| | | */ |
| | | public void phoneCallBack(PhoneCallBackVO phoneCallBackVO); |
| | | |
| | | public Integer saveQuestionAnswer(ServiceSubTaskDetailReq serviceSubTaskDetailReq); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.service; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.smartor.domain.IvrLibaTemplateScriptVO; |
| | | import com.smartor.domain.ServiceTask; |
| | | import com.smartor.domain.SvyLibTemplateScriptVO; |
| | | |
| | | /** |
| | | * è¯é³ä»»å¡Serviceæ¥å£ |
| | | * |
| | | * @author smartor |
| | | * @date 2023-03-24 |
| | | */ |
| | | public interface IServiceTaskService { |
| | | /** |
| | | * æ¥è¯¢è¯é³ä»»å¡ |
| | | * |
| | | * @param taskid è¯é³ä»»å¡ä¸»é® |
| | | * @return è¯é³ä»»å¡ |
| | | */ |
| | | public ServiceTask selectServiceTaskByTaskid(Long taskid); |
| | | |
| | | /** |
| | | * æ¥è¯¢è¯é³ä»»å¡å表 |
| | | * |
| | | * @param ServiceTask è¯é³ä»»å¡ |
| | | * @return è¯é³ä»»å¡éå |
| | | */ |
| | | public List<ServiceTask> selectServiceTaskList(ServiceTask ServiceTask); |
| | | |
| | | /** |
| | | * æ°å¢è¯é³ä»»å¡ |
| | | * |
| | | * @param ServiceTask è¯é³ä»»å¡ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertServiceTask(ServiceTask ServiceTask); |
| | | |
| | | /** |
| | | * ä¿®æ¹è¯é³ä»»å¡ |
| | | * |
| | | * @param ServiceTask è¯é³ä»»å¡ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateServiceTask(ServiceTask ServiceTask); |
| | | |
| | | /** |
| | | * æ¹éå é¤è¯é³ä»»å¡ |
| | | * |
| | | * @param taskids éè¦å é¤çè¯é³ä»»å¡ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteServiceTaskByTaskids(Long[] taskids); |
| | | |
| | | /** |
| | | * å é¤è¯é³ä»»å¡ä¿¡æ¯ |
| | | * |
| | | * @param taskid è¯é³ä»»å¡ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public Boolean deleteServiceTaskByTaskid(Long taskid); |
| | | |
| | | public List getScriptInfoByCondition(Long taskid, Long patid); |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.service; |
| | | |
| | | import com.smartor.domain.SvyTaskAnswer; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ä»»å¡é®å·é®é¢é项Serviceæ¥å£ |
| | | * |
| | | * @author ruoyi |
| | | * @date 2024-06-27 |
| | | */ |
| | | public interface ISvyTaskAnswerService |
| | | { |
| | | /** |
| | | * æ¥è¯¢ä»»å¡é®å·é®é¢é项 |
| | | * |
| | | * @param id ä»»å¡é®å·é®é¢éé¡¹ä¸»é® |
| | | * @return ä»»å¡é®å·é®é¢é项 |
| | | */ |
| | | public SvyTaskAnswer selectSvyTaskAnswerById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢ä»»å¡é®å·é®é¢é项å表 |
| | | * |
| | | * @param svyTaskAnswer ä»»å¡é®å·é®é¢é项 |
| | | * @return ä»»å¡é®å·é®é¢é项éå |
| | | */ |
| | | public List<SvyTaskAnswer> selectSvyTaskAnswerList(SvyTaskAnswer svyTaskAnswer); |
| | | |
| | | /** |
| | | * æ°å¢ä»»å¡é®å·é®é¢é项 |
| | | * |
| | | * @param svyTaskAnswer ä»»å¡é®å·é®é¢é项 |
| | | * @return ç»æ |
| | | */ |
| | | public int insertSvyTaskAnswer(SvyTaskAnswer svyTaskAnswer); |
| | | |
| | | /** |
| | | * ä¿®æ¹ä»»å¡é®å·é®é¢é项 |
| | | * |
| | | * @param svyTaskAnswer ä»»å¡é®å·é®é¢é项 |
| | | * @return ç»æ |
| | | */ |
| | | public int updateSvyTaskAnswer(SvyTaskAnswer svyTaskAnswer); |
| | | |
| | | /** |
| | | * æ¹éå é¤ä»»å¡é®å·é®é¢é项 |
| | | * |
| | | * @param ids éè¦å é¤çä»»å¡é®å·é®é¢é项主é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteSvyTaskAnswerByIds(Long[] ids); |
| | | |
| | | /** |
| | | * å é¤ä»»å¡é®å·é®é¢éé¡¹ä¿¡æ¯ |
| | | * |
| | | * @param id ä»»å¡é®å·é®é¢éé¡¹ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteSvyTaskAnswerById(Long id); |
| | | } |
| | |
| | | package com.smartor.service; |
| | | |
| | | import com.smartor.domain.IvrLibaTemplateScriptVO; |
| | | import com.smartor.domain.SvyLibTemplateScriptVO; |
| | | import com.smartor.domain.SvyTask; |
| | | |
| | | import java.util.List; |
| | |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteSvyTaskByTaskid(Long taskid); |
| | | |
| | | public List<SvyLibTemplateScriptVO> getScriptInfoByCondition(Long taskid, Long patid); |
| | | } |
| | |
| | | package com.smartor.service; |
| | | |
| | | import com.smartor.domain.IvrTaskSingle; |
| | | import com.smartor.domain.IvrTaskVO; |
| | | import com.smartor.domain.SvyTaskSingle; |
| | | import com.smartor.domain.SvyTaskVO; |
| | | |
| | |
| | | import com.ruoyi.common.utils.DtoConversionUtils; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.service.CommonTaskService; |
| | | import com.smartor.service.IIvrTaskService; |
| | | import com.smartor.service.IServiceTaskService; |
| | | import com.smartor.service.ISvyTaskService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | @Service |
| | | public class CommonTaskServiceImpl implements CommonTaskService { |
| | | @Autowired |
| | | private IIvrTaskService ivrTaskService; |
| | | private IServiceTaskService ivrTaskService; |
| | | |
| | | @Autowired |
| | | private ISvyTaskService iSvyTaskService; |
| | |
| | | } |
| | | |
| | | public int sfSend(SendTaskVO sendTaskVO) { |
| | | IvrTask ivrTask = ivrTaskService.selectIvrTaskByTaskid(sendTaskVO.getTaskId()); |
| | | ServiceTask ivrTask = ivrTaskService.selectServiceTaskByTaskid(sendTaskVO.getTaskId()); |
| | | if (sendTaskVO.getSendState() != null && sendTaskVO.getSendState() == 3 || sendTaskVO.getSendState() != null && sendTaskVO.getSendState() == 4) { |
| | | //任塿åæç»æ¢ |
| | | IvrTask ivrTask3 = new IvrTask(); |
| | | ivrTask3.setTaskid(sendTaskVO.getTaskId()); |
| | | ivrTask3.setStopState(ivrTask.getStopState() + 1); |
| | | ivrTask3.setSendState(sendTaskVO.getSendState()); |
| | | ivrTaskService.updateIvrTask(ivrTask3); |
| | | ServiceTask serviceTask = new ServiceTask(); |
| | | serviceTask.setTaskid(sendTaskVO.getTaskId()); |
| | | serviceTask.setStopState(ivrTask.getStopState() + 1); |
| | | serviceTask.setSendState(sendTaskVO.getSendState()); |
| | | ivrTaskService.updateServiceTask(serviceTask); |
| | | return 0; |
| | | } |
| | | |
| | |
| | | redisCache.setCacheObject(content, content, 1, TimeUnit.SECONDS); |
| | | |
| | | //å°ä»»å¡ç¶æä¿®æ¹ææ§è¡ä¸ |
| | | IvrTask ivrTask2 = new IvrTask(); |
| | | ivrTask2.setTaskid(ivrTask.getTaskid()); |
| | | ivrTask2.setSendState(2); |
| | | ivrTaskService.updateIvrTask(ivrTask2); |
| | | ServiceTask serviceTask = new ServiceTask(); |
| | | serviceTask.setTaskid(ivrTask.getTaskid()); |
| | | serviceTask.setSendState(2); |
| | | ivrTaskService.updateServiceTask(serviceTask); |
| | | } else if (StringUtils.isNotEmpty(sendTaskVO.getSendType()) && sendTaskVO.getSendType().equals("1") || StringUtils.isNotEmpty(sendTaskVO.getSendType()) && sendTaskVO.getSendType().equals("3")) { |
| | | //æ¶é´æ®µåé |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | |
| | | redisCache.setCacheObject(content, content, milliseconds / 1000, TimeUnit.SECONDS); |
| | | } |
| | | //å°ä»»å¡ç¶æä¿®æ¹ææ§è¡ä¸ |
| | | IvrTask ivrTask2 = new IvrTask(); |
| | | ivrTask2.setTaskid(ivrTask.getTaskid()); |
| | | ivrTask2.setSendState(2); |
| | | ivrTaskService.updateIvrTask(ivrTask2); |
| | | ServiceTask serviceTask = new ServiceTask(); |
| | | serviceTask.setTaskid(ivrTask.getTaskid()); |
| | | serviceTask.setSendState(2); |
| | | ivrTaskService.updateServiceTask(serviceTask); |
| | | } |
| | | } |
| | | return 1; |
| | |
| | | SvyTask svyTask = iSvyTaskService.selectSvyTaskByTaskid(sendTaskVO.getTaskId()); |
| | | if (sendTaskVO.getSendState() != null && sendTaskVO.getSendState() == 3 || sendTaskVO.getSendState() != null && sendTaskVO.getSendState() == 4) { |
| | | //任塿åæç»æ¢ |
| | | SvyTask svyTask1 = new SvyTask(); |
| | | svyTask1.setTaskid(sendTaskVO.getTaskId()); |
| | | svyTask1.setStopState(svyTask.getStopState() + 1); |
| | | svyTask1.setSendState(sendTaskVO.getSendState().toString()); |
| | | iSvyTaskService.updateSvyTask(svyTask1); |
| | | SvyTask serviceTask = new SvyTask(); |
| | | serviceTask.setTaskid(sendTaskVO.getTaskId()); |
| | | serviceTask.setStopState(svyTask.getStopState() + 1); |
| | | serviceTask.setSendState(sendTaskVO.getSendState().toString()); |
| | | iSvyTaskService.updateSvyTask(serviceTask); |
| | | return 0; |
| | | } |
| | | |
| | |
| | | redisCache.setCacheObject(content, content, 1, TimeUnit.SECONDS); |
| | | |
| | | //å°ä»»å¡ç¶æä¿®æ¹ææ§è¡ä¸ |
| | | SvyTask svyTask2 = new SvyTask(); |
| | | svyTask2.setTaskid(svyTask.getTaskid()); |
| | | svyTask2.setSendState("2"); |
| | | iSvyTaskService.updateSvyTask(svyTask2); |
| | | SvyTask serviceTask = new SvyTask(); |
| | | serviceTask.setTaskid(svyTask.getTaskid()); |
| | | serviceTask.setSendState("2"); |
| | | iSvyTaskService.updateSvyTask(serviceTask); |
| | | } else if (StringUtils.isNotEmpty(sendTaskVO.getSendType()) && sendTaskVO.getSendType().equals("1") || StringUtils.isNotEmpty(sendTaskVO.getSendType()) && sendTaskVO.getSendType().equals("3")) { |
| | | //æ¶é´æ®µåé |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | |
| | | redisCache.setCacheObject(content, content, milliseconds / 1000, TimeUnit.SECONDS); |
| | | } |
| | | //å°ä»»å¡ç¶æä¿®æ¹ææ§è¡ä¸ |
| | | SvyTask svyTask3 = new SvyTask(); |
| | | svyTask3.setTaskid(svyTask.getTaskid()); |
| | | svyTask3.setSendState("2"); |
| | | iSvyTaskService.updateSvyTask(svyTask3); |
| | | SvyTask serviceTask = new SvyTask(); |
| | | serviceTask.setTaskid(svyTask.getTaskid()); |
| | | serviceTask.setSendState("2"); |
| | | iSvyTaskService.updateSvyTask(serviceTask); |
| | | } |
| | | } |
| | | return 1; |
| | |
| | | //对模æ¿è¯æ¯åé项è¿è¡å¤çï¼è¯æ¯è¡¨ä¸ææ 表è¿è¡åå¹¶äºï¼ï¼ |
| | | if (CollectionUtils.isNotEmpty(ivrLibaTemplateVO.getIvrLibaTemplateScriptVOList())) { |
| | | for (IvrLibaTemplateScriptVO ivrLibaTemplateScriptVO : ivrLibaTemplateVO.getIvrLibaTemplateScriptVOList()) { |
| | | if (ivrLibaTemplateScriptVO.getIsoperation() != null && ivrLibaTemplateScriptVO.getIsoperation() == 1) { |
| | | //æ°å¢ |
| | | IvrLibaTemplateScript ivrLibaTemplateScript = DtoConversionUtils.sourceToTarget(ivrLibaTemplateScriptVO, IvrLibaTemplateScript.class); |
| | | ivrLibaTemplateScript.setTemplateID(ivrLibaTemplate.getID()); |
| | | ivrLibaTemplateScript.setCreateTime(new Date()); |
| | | ivrLibaTemplateScriptMapper.insertIvrLibaTemplateScript(ivrLibaTemplateScript); |
| | | //对é项ç®è¿è¡å¤ç |
| | | dealOption(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList(), ivrLibaTemplateScript, ivrLibaTemplate.getID()); |
| | | |
| | | } else if (ivrLibaTemplateScriptVO.getIsoperation() != null && ivrLibaTemplateScriptVO.getIsoperation() == 2) { |
| | | //ä¿®æ¹ |
| | | IvrLibaTemplateScript ivrLibaTemplateScript = DtoConversionUtils.sourceToTarget(ivrLibaTemplateScriptVO, IvrLibaTemplateScript.class); |
| | | ivrLibaTemplateScript.setTemplateID(ivrLibaTemplate.getID()); |
| | | ivrLibaTemplateScript.setUpdateTime(new Date()); |
| | | ivrLibaTemplateScriptMapper.updateIvrLibaTemplateScript(ivrLibaTemplateScript); |
| | | //对é项ç®è¿è¡å¤ç |
| | | dealOption(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList(), ivrLibaTemplateScript, ivrLibaTemplate.getID()); |
| | | |
| | | } else if (ivrLibaTemplateScriptVO.getIsoperation() != null && ivrLibaTemplateScriptVO.getIsoperation() == 3) { |
| | | //å é¤ |
| | | if (ivrLibaTemplateScriptVO.getID() == null) { |
| | | log.info("å é¤å¤±è´¥,模æ¿è¯æ¯id为空"); |
| | | } else { |
| | | ivrLibaTemplateScriptVO.setUpdateTime(new Date()); |
| | | ivrLibaTemplateScriptMapper.deleteIvrLibaTemplateScriptByID(ivrLibaTemplateScriptVO.getID()); |
| | | } |
| | | if (ivrLibaTemplateScriptVO.getIsoperation() != null) { |
| | | IvrLibaTemplateScript ivrLibaTemplateScript = scriptHandle(ivrLibaTemplate, ivrLibaTemplateScriptVO, 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()); |
| | | } |
| | | } |
| | | } |
| | |
| | | return i; |
| | | } |
| | | |
| | | private IvrLibaTemplateScript scriptHandle(IvrLibaTemplate ivrLibaTemplate, IvrLibaTemplateScriptVO ivrLibaTemplateScriptVO, Integer isoperation) { |
| | | IvrLibaTemplateScript ivrLibaTemplateScript = DtoConversionUtils.sourceToTarget(ivrLibaTemplateScriptVO, IvrLibaTemplateScript.class); |
| | | if (isoperation == 1) { |
| | | //æ°å¢ |
| | | ivrLibaTemplateScript.setTemplateID(ivrLibaTemplate.getID()); |
| | | ivrLibaTemplateScript.setCreateTime(new Date()); |
| | | ivrLibaTemplateScriptMapper.insertIvrLibaTemplateScript(ivrLibaTemplateScript); |
| | | //对é项ç®è¿è¡å¤ç |
| | | dealOption(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList(), ivrLibaTemplateScript, ivrLibaTemplate.getID(),isoperation); |
| | | |
| | | } else if (isoperation == 2) { |
| | | //ä¿®æ¹ |
| | | ivrLibaTemplateScript.setTemplateID(ivrLibaTemplate.getID()); |
| | | ivrLibaTemplateScript.setUpdateTime(new Date()); |
| | | ivrLibaTemplateScriptMapper.updateIvrLibaTemplateScript(ivrLibaTemplateScript); |
| | | //对é项ç®è¿è¡å¤ç |
| | | dealOption(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList(), ivrLibaTemplateScript, ivrLibaTemplate.getID(), isoperation); |
| | | |
| | | } else if (isoperation == 3) { |
| | | //å é¤ |
| | | if (ivrLibaTemplateScriptVO.getID() == null) { |
| | | log.info("å é¤å¤±è´¥,模æ¿è¯æ¯id为空"); |
| | | } else { |
| | | ivrLibaTemplateScriptVO.setUpdateTime(new Date()); |
| | | ivrLibaTemplateScriptMapper.deleteIvrLibaTemplateScriptByID(ivrLibaTemplateScriptVO.getID()); |
| | | } |
| | | } |
| | | return ivrLibaTemplateScript; |
| | | } |
| | | |
| | | /** |
| | | * é项å¤ç |
| | | * |
| | |
| | | * @param ivrLibaTemplateScript |
| | | * @param tmpID |
| | | */ |
| | | private void dealOption(List<IvrLibaTemplateTargetoption> ivrLibaTemplateTargetoptionList, IvrLibaTemplateScript ivrLibaTemplateScript, Long tmpID) { |
| | | private void dealOption(List<IvrLibaTemplateTargetoption> ivrLibaTemplateTargetoptionList, IvrLibaTemplateScript ivrLibaTemplateScript, Long tmpID, Integer isoperation) { |
| | | log.info("ivrLibaTemplateScriptçå¼ä¸ºï¼{}", ivrLibaTemplateScript); |
| | | //å¯¹æ¨¡æ¿ææ é项è¿è¡å¤ç |
| | | Integer lsIsoperation = isoperation; |
| | | if (CollectionUtils.isNotEmpty(ivrLibaTemplateTargetoptionList)) { |
| | | for (IvrLibaTemplateTargetoption ivrLibaTemplateTargetoption : ivrLibaTemplateTargetoptionList) { |
| | | if (ivrLibaTemplateTargetoption.getIsoperation() != null && ivrLibaTemplateTargetoption.getIsoperation() == 1) { |
| | | if (ivrLibaTemplateTargetoption.getIsoperation() != null) { |
| | | isoperation = ivrLibaTemplateTargetoption.getIsoperation(); |
| | | } else { |
| | | isoperation = lsIsoperation; |
| | | } |
| | | if (isoperation == 1) { |
| | | //æ°å¢ |
| | | ivrLibaTemplateTargetoption.setTemplateID(tmpID); |
| | | ivrLibaTemplateTargetoption.setScriptid(ivrLibaTemplateScript.getID()); |
| | |
| | | if (CollectionUtils.isNotEmpty(ivrLibaTemplateTargetoption.getNodynamiccruxs())) |
| | | ivrLibaTemplateTargetoption.setNodynamiccruxsJson(JSON.toJSONString(ivrLibaTemplateTargetoption.getNodynamiccruxs())); |
| | | ivrLibaTemplateTargetOptionMapper.insertIvrLibaTemplateTargetoption(ivrLibaTemplateTargetoption); |
| | | } else if (ivrLibaTemplateTargetoption.getIsoperation() != null && ivrLibaTemplateTargetoption.getIsoperation() == 2) { |
| | | } else if (isoperation == 2) { |
| | | //ä¿®æ¹ |
| | | ivrLibaTemplateTargetoption.setTemplateID(tmpID); |
| | | ivrLibaTemplateTargetoption.setScriptid(ivrLibaTemplateScript.getID()); |
| | |
| | | if (CollectionUtils.isNotEmpty(ivrLibaTemplateTargetoption.getNodynamiccruxs())) |
| | | ivrLibaTemplateTargetoption.setNodynamiccruxsJson(JSON.toJSONString(ivrLibaTemplateTargetoption.getNodynamiccruxs())); |
| | | ivrLibaTemplateTargetOptionMapper.updateIvrLibaTemplateTargetoption(ivrLibaTemplateTargetoption); |
| | | } else if (ivrLibaTemplateTargetoption.getIsoperation() != null && ivrLibaTemplateTargetoption.getIsoperation() == 3) { |
| | | } else if (isoperation == 3) { |
| | | //å é¤ |
| | | if (ivrLibaTemplateTargetoption.getId() == null) { |
| | | log.info("å é¤å¤±è´¥,æ¨¡æ¿ææ é项id为空"); |
| | |
| | | } |
| | | log.info("æ°å¢é访任å¡é访模æ¿çid为ï¼{}", ivrTaskTemplate.getID()); |
| | | |
| | | |
| | | //对模æ¿è¯æ¯åé项è¿è¡å¤çï¼è¯æ¯è¡¨ä¸ææ 表è¿è¡åå¹¶äºï¼ï¼ |
| | | if (CollectionUtils.isNotEmpty(ivrTaskTemplateVO.getIvrTaskTemplateScriptVOList())) { |
| | | log.error("ivrTaskTemplateVO.getIvrTaskTemplateScriptVOList()æ¯å¦ææ°æ®åï¼{}", ivrTaskTemplateVO.getIvrTaskTemplateScriptVOList()); |
| | | for (IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO : ivrTaskTemplateVO.getIvrTaskTemplateScriptVOList()) { |
| | | if (ivrTaskTemplateScriptVO.getIsoperation() != null && ivrTaskTemplateScriptVO.getIsoperation() == 1 || ivrTaskTemplateScriptVO.getIsoperation() == null && ivrTaskTemplateVO.getIsoperation() == 1) { |
| | | //æ°å¢ |
| | | IvrTaskTemplateScript ivrTaskTemplateScript = DtoConversionUtils.sourceToTarget(ivrTaskTemplateScriptVO, IvrTaskTemplateScript.class); |
| | | ivrTaskTemplateScript.setTemplateID(ivrTaskTemplate.getID()); |
| | | ivrTaskTemplateScript.setCreateTime(new Date()); |
| | | ivrTaskTemplateScriptMapper.insertIvrTaskTemplateScript(ivrTaskTemplateScript); |
| | | ivrTaskTemplateScript.setIsoperation(1); |
| | | //对é项ç®è¿è¡å¤ç |
| | | dealOption(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList(), ivrTaskTemplateScript, ivrTaskTemplate.getID()); |
| | | |
| | | } else if (ivrTaskTemplateScriptVO.getIsoperation() != null && ivrTaskTemplateScriptVO.getIsoperation() == 2) { |
| | | //ä¿®æ¹ |
| | | IvrTaskTemplateScript ivrTaskTemplateScript = DtoConversionUtils.sourceToTarget(ivrTaskTemplateScriptVO, IvrTaskTemplateScript.class); |
| | | ivrTaskTemplateScript.setTemplateID(ivrTaskTemplate.getID()); |
| | | ivrTaskTemplateScript.setUpdateTime(new Date()); |
| | | ivrTaskTemplateScriptMapper.updateIvrTaskTemplateScript(ivrTaskTemplateScript); |
| | | ivrTaskTemplateScript.setIsoperation(2); |
| | | //对é项ç®è¿è¡å¤ç |
| | | dealOption(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList(), ivrTaskTemplateScript, ivrTaskTemplate.getID()); |
| | | |
| | | } else if (ivrTaskTemplateScriptVO.getIsoperation() != null && ivrTaskTemplateScriptVO.getIsoperation() == 3) { |
| | | //å é¤ |
| | | if (ivrTaskTemplateScriptVO.getID() == null) { |
| | | log.info("å é¤å¤±è´¥,模æ¿è¯æ¯id为空"); |
| | | } else { |
| | | ivrTaskTemplateScriptVO.setUpdateTime(new Date()); |
| | | ivrTaskTemplateScriptMapper.deleteIvrTaskTemplateScriptByID(ivrTaskTemplateScriptVO.getID()); |
| | | } |
| | | if (ivrTaskTemplateScriptVO.getIsoperation() != null) { |
| | | IvrTaskTemplateScript ivrTaskTemplateScript = scriptHandle(ivrTaskTemplate, ivrTaskTemplateScriptVO, ivrTaskTemplateScriptVO.getIsoperation()); |
| | | dealOption(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList(), ivrTaskTemplateScript, ivrTaskTemplate.getID(), ivrTaskTemplateScriptVO.getIsoperation()); |
| | | } else { |
| | | IvrTaskTemplateScript ivrTaskTemplateScript = scriptHandle(ivrTaskTemplate, ivrTaskTemplateScriptVO, ivrTaskTemplateVO.getIsoperation()); |
| | | dealOption(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList(), ivrTaskTemplateScript, ivrTaskTemplate.getID(), ivrTaskTemplateVO.getIsoperation()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return ivrTaskTemplate.getID().intValue(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * ä¿®æ¹é访任å¡é访模æ¿åº |
| | |
| | | return templateVO; |
| | | } |
| | | |
| | | private IvrTaskTemplateScript scriptHandle(IvrTaskTemplate ivrTaskTemplate, IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO, Integer isoperation) { |
| | | IvrTaskTemplateScript ivrTaskTemplateScript = DtoConversionUtils.sourceToTarget(ivrTaskTemplateScriptVO, IvrTaskTemplateScript.class); |
| | | |
| | | private void dealOption(List<IvrTaskTemplateTargetoption> ivrTaskTemplateTargetoptionList, IvrTaskTemplateScript ivrTaskTemplateScript, Long tmpID) { |
| | | if (isoperation == 1) { |
| | | //æ°å¢ |
| | | ivrTaskTemplateScript.setTemplateID(ivrTaskTemplate.getID()); |
| | | ivrTaskTemplateScript.setCreateTime(new Date()); |
| | | ivrTaskTemplateScriptMapper.insertIvrTaskTemplateScript(ivrTaskTemplateScript); |
| | | ivrTaskTemplateScript.setIsoperation(1); |
| | | } else if (isoperation == 2) { |
| | | //ä¿®æ¹ |
| | | ivrTaskTemplateScript.setTemplateID(ivrTaskTemplate.getID()); |
| | | ivrTaskTemplateScript.setUpdateTime(new Date()); |
| | | ivrTaskTemplateScriptMapper.updateIvrTaskTemplateScript(ivrTaskTemplateScript); |
| | | ivrTaskTemplateScript.setIsoperation(2); |
| | | |
| | | } else if (isoperation == 3) { |
| | | //å é¤ |
| | | if (ivrTaskTemplateScriptVO.getID() == null) { |
| | | log.info("å é¤å¤±è´¥,模æ¿è¯æ¯id为空"); |
| | | } else { |
| | | ivrTaskTemplateScriptVO.setUpdateTime(new Date()); |
| | | ivrTaskTemplateScriptMapper.deleteIvrTaskTemplateScriptByID(ivrTaskTemplateScriptVO.getID()); |
| | | } |
| | | } |
| | | return ivrTaskTemplateScript; |
| | | } |
| | | |
| | | private void dealOption(List<IvrTaskTemplateTargetoption> ivrTaskTemplateTargetoptionList, IvrTaskTemplateScript ivrTaskTemplateScript, Long tmpID, Integer isoperation) { |
| | | log.info("ivrLibaTemplateScriptçå¼ä¸ºï¼{}", ivrTaskTemplateScript); |
| | | Integer lsisoperation = isoperation; |
| | | //å¯¹æ¨¡æ¿ææ é项è¿è¡å¤ç |
| | | if (CollectionUtils.isNotEmpty(ivrTaskTemplateTargetoptionList)) { |
| | | for (IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption : ivrTaskTemplateTargetoptionList) { |
| | | if (ivrTaskTemplateTargetoption.getIsoperation() != null && ivrTaskTemplateTargetoption.getIsoperation() == 1 || ivrTaskTemplateTargetoption.getIsoperation() == null && ivrTaskTemplateScript.getIsoperation() == 1) { |
| | | if (ivrTaskTemplateTargetoption.getIsoperation() != null) { |
| | | isoperation = ivrTaskTemplateTargetoption.getIsoperation(); |
| | | } else { |
| | | isoperation = lsisoperation; |
| | | } |
| | | if (isoperation == 1) { |
| | | //æ°å¢ |
| | | ivrTaskTemplateTargetoption.setTemplateID(tmpID); |
| | | ivrTaskTemplateTargetoption.setScriptid(ivrTaskTemplateScript.getID()); |
| | |
| | | if (CollectionUtils.isNotEmpty(ivrTaskTemplateTargetoption.getNodynamiccruxs())) |
| | | ivrTaskTemplateTargetoption.setNodynamiccruxsJson(JSON.toJSONString(ivrTaskTemplateTargetoption.getNodynamiccruxs())); |
| | | ivrTaskTemplateTargetoptionMapper.insertIvrTaskTemplateTargetoption(ivrTaskTemplateTargetoption); |
| | | } else if (ivrTaskTemplateTargetoption.getIsoperation() != null && ivrTaskTemplateTargetoption.getIsoperation() == 2) { |
| | | } else if (isoperation == 2) { |
| | | //ä¿®æ¹ |
| | | ivrTaskTemplateTargetoption.setTemplateID(tmpID); |
| | | ivrTaskTemplateTargetoption.setScriptid(ivrTaskTemplateScript.getID()); |
| | |
| | | if (CollectionUtils.isNotEmpty(ivrTaskTemplateTargetoption.getNodynamiccruxs())) |
| | | ivrTaskTemplateTargetoption.setNodynamiccruxsJson(JSON.toJSONString(ivrTaskTemplateTargetoption.getNodynamiccruxs())); |
| | | ivrTaskTemplateTargetoptionMapper.updateIvrTaskTemplateTargetoption(ivrTaskTemplateTargetoption); |
| | | } else if (ivrTaskTemplateTargetoption.getIsoperation() != null && ivrTaskTemplateTargetoption.getIsoperation() == 3) { |
| | | } else if (isoperation == 3) { |
| | | //å é¤ |
| | | if (ivrTaskTemplateTargetoption.getId() == null) { |
| | | log.info("å é¤å¤±è´¥,æ¨¡æ¿ææ é项id为空"); |
| | |
| | | package com.smartor.service.impl; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.UUID; |
| | | |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.RSAPublicKeyExample; |
| | | import com.smartor.domain.IvrTaskSingle; |
| | | import com.smartor.domain.IvrTaskcalldetailReq; |
| | | import com.smartor.mapper.IvrTaskSingleMapper; |
| | | 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.IvrTaskcalldetailMapper; |
| | | import com.smartor.domain.IvrTaskcalldetail; |
| | | import com.smartor.mapper.IvrTaskcalldetailMapper; |
| | | import com.smartor.mapper.ServiceSubtaskMapper; |
| | | import com.smartor.service.IIvrTaskcalldetailService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è¯é³ä»»å¡å¼å«æç»Serviceä¸å¡å±å¤ç |
| | |
| | | private IvrTaskcalldetailMapper ivrTaskcalldetailMapper; |
| | | |
| | | @Autowired |
| | | private IvrTaskSingleMapper ivrTaskSingleMapper; |
| | | private ServiceSubtaskMapper ivrTaskSingleMapper; |
| | | |
| | | @Value("${pri_key}") |
| | | private String pri_key; |
| | | |
| | | |
| | | /** |
| | |
| | | return ivrTaskcalldetailMapper.deleteIvrTaskcalldetailByCalldetailid(calldetailid); |
| | | } |
| | | |
| | | @Override |
| | | public Integer saveQuestionAnswer(IvrTaskcalldetailReq ivrTaskcalldetailReq) { |
| | | RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample(); |
| | | Long tid = Long.valueOf(rsaPublicKeyExample.decryptedData(ivrTaskcalldetailReq.getParam1(), pri_key)); |
| | | Long pid = Long.valueOf(rsaPublicKeyExample.decryptedData(ivrTaskcalldetailReq.getParam2(), pri_key)); |
| | | IvrTaskSingle ivrTaskSingle = new IvrTaskSingle(); |
| | | ivrTaskSingle.setTaskid(tid); |
| | | ivrTaskSingle.setPatid(pid); |
| | | List<IvrTaskSingle> ivrTaskSingles = ivrTaskSingleMapper.selectIvrTaskcallList(ivrTaskSingle); |
| | | if (CollectionUtils.isEmpty(ivrTaskSingles) || ivrTaskSingles.size() == 0) { |
| | | log.error("æ¥éäºï¼ivrTaskSinglesæ°æ®ä¸ºç©ºäºï¼{}", ivrTaskSingle); |
| | | return 0; |
| | | } |
| | | |
| | | for (IvrTaskcalldetail ivrTaskcalldetail : ivrTaskcalldetailReq.getIvrTaskcalldetailList()) { |
| | | ivrTaskcalldetail.setCallid(ivrTaskSingles.get(0).getId().toString()); |
| | | ivrTaskcalldetail.setCalldetailid(UUID.randomUUID().toString()); |
| | | ivrTaskcalldetail.setCreateTime(new Date()); |
| | | ivrTaskcalldetailMapper.insertIvrTaskcalldetail(ivrTaskcalldetail); |
| | | } |
| | | return 1; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.service.impl; |
| | | |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.smartor.domain.ServiceSubtaskRecord; |
| | | import com.smartor.mapper.ServiceSubtaskRecordMapper; |
| | | import com.smartor.service.IServiceSubtaskRecordService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ã请填ååè½åç§°ãServiceä¸å¡å±å¤ç |
| | | * |
| | | * @author ruoyi |
| | | * @date 2024-07-01 |
| | | */ |
| | | @Service |
| | | public class ServiceSubtaskRecordServiceImpl implements IServiceSubtaskRecordService { |
| | | @Autowired |
| | | private ServiceSubtaskRecordMapper serviceSubtaskRecordMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢ã请填ååè½åç§°ã |
| | | * |
| | | * @param id ã请填ååè½åç§°ãä¸»é® |
| | | * @return ã请填ååè½åç§°ã |
| | | */ |
| | | @Override |
| | | public ServiceSubtaskRecord selectServiceSubtaskRecordById(Long id) { |
| | | return serviceSubtaskRecordMapper.selectServiceSubtaskRecordById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ã请填ååè½åç§°ãå表 |
| | | * |
| | | * @param serviceSubtaskRecord ã请填ååè½åç§°ã |
| | | * @return ã请填ååè½åç§°ã |
| | | */ |
| | | @Override |
| | | public List<ServiceSubtaskRecord> selectServiceSubtaskRecordList(ServiceSubtaskRecord serviceSubtaskRecord) { |
| | | return serviceSubtaskRecordMapper.selectServiceSubtaskRecordList(serviceSubtaskRecord); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ã请填ååè½åç§°ã |
| | | * |
| | | * @param serviceSubtaskRecord ã请填ååè½åç§°ã |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertServiceSubtaskRecord(ServiceSubtaskRecord serviceSubtaskRecord) { |
| | | serviceSubtaskRecord.setCreateTime(DateUtils.getNowDate()); |
| | | return serviceSubtaskRecordMapper.insertServiceSubtaskRecord(serviceSubtaskRecord); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ã请填ååè½åç§°ã |
| | | * |
| | | * @param serviceSubtaskRecord ã请填ååè½åç§°ã |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateServiceSubtaskRecord(ServiceSubtaskRecord serviceSubtaskRecord) { |
| | | serviceSubtaskRecord.setUpdateTime(DateUtils.getNowDate()); |
| | | return serviceSubtaskRecordMapper.updateServiceSubtaskRecord(serviceSubtaskRecord); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ã请填ååè½åç§°ã |
| | | * |
| | | * @param ids éè¦å é¤çã请填ååè½åç§°ãä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteServiceSubtaskRecordByIds(Long[] ids) { |
| | | return serviceSubtaskRecordMapper.deleteServiceSubtaskRecordByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ã请填ååè½åç§°ãä¿¡æ¯ |
| | | * |
| | | * @param id ã请填ååè½åç§°ãä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteServiceSubtaskRecordById(Long id) { |
| | | return serviceSubtaskRecordMapper.deleteServiceSubtaskRecordById(id); |
| | | } |
| | | } |
ÎļþÃû´Ó smartor/src/main/java/com/smartor/service/impl/IvrTaskSingleServiceImpl.java ÐÞ¸Ä |
| | |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.DtoConversionUtils; |
| | | import com.ruoyi.common.utils.RSAPublicKeyExample; |
| | | import com.smartor.config.PhoneUtils; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.mapper.*; |
| | | import com.smartor.service.IIvrTaskService; |
| | | import com.smartor.service.IIvrTaskSingleService; |
| | | import com.smartor.service.IServiceSubtaskService; |
| | | import com.smartor.service.IServiceTaskService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class IvrTaskSingleServiceImpl implements IIvrTaskSingleService { |
| | | public class ServiceSubtaskServiceImpl implements IServiceSubtaskService { |
| | | @Autowired |
| | | private IvrTaskSingleMapper ivrTaskSingleMapper; |
| | | private ServiceSubtaskMapper serviceSubtaskMapper; |
| | | |
| | | @Autowired |
| | | private IIvrTaskService ivrTaskService; |
| | | private IvrTaskcalldetailMapper ivrTaskcalldetailMapper; |
| | | @Autowired |
| | | private SvyTasksingledetailMapper svyTasksingledetailMapper; |
| | | |
| | | @Autowired |
| | | private IvrTaskTemplateTargetoptionMapper ivrTaskScriptTargetoptionMapper; |
| | | private IServiceTaskService serviceTaskService; |
| | | |
| | | @Autowired |
| | | private IvrLibaTemplateScriptMapper ivrTaskTemplateScriptMapper; |
| | | private IvrTaskTemplateTargetoptionMapper serviceTaskScriptTargetoptionMapper; |
| | | |
| | | @Autowired |
| | | private IvrTaskVisitResultMapper ivrTaskVisitResultMapper; |
| | | private IvrLibaTemplateScriptMapper ivrLibaTemplateScriptMapper; |
| | | |
| | | @Autowired |
| | | private IvrTaskVisitResultMapper serviceTaskVisitResultMapper; |
| | | |
| | | @Autowired |
| | | private RedisCache redisCache; |
| | | |
| | | @Autowired |
| | | private IvrLibaExtemplatescriptMapper ivrLibaExtemplatescriptMapper; |
| | | |
| | | @Value("${pri_key}") |
| | | private String pri_key; |
| | | |
| | | |
| | | /** |
| | |
| | | * @return åä¸ä»»å¡ï¼éè®¿ï¼ |
| | | */ |
| | | @Override |
| | | public IvrTaskSingle selectIvrTaskcallById(Long id) { |
| | | return ivrTaskSingleMapper.selectIvrTaskcallById(id); |
| | | public ServiceSubtask selectServiceSubtaskById(Long id) { |
| | | return serviceSubtaskMapper.selectServiceSubtaskById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢åä¸ä»»å¡ï¼é访ï¼å表 |
| | | * |
| | | * @param ivrTaskcall åä¸ä»»å¡ï¼éè®¿ï¼ |
| | | * @param ServiceSubtask åä¸ä»»å¡ï¼éè®¿ï¼ |
| | | * @return åä¸ä»»å¡ï¼éè®¿ï¼ |
| | | */ |
| | | @Override |
| | | public List<IvrTaskSingle> selectIvrTaskcallList(IvrTaskSingle ivrTaskcall) { |
| | | return ivrTaskSingleMapper.selectIvrTaskcallList(ivrTaskcall); |
| | | public List<ServiceSubtask> selectServiceSubtaskList(ServiceSubtask ServiceSubtask) { |
| | | return serviceSubtaskMapper.selectServiceSubtaskList(ServiceSubtask); |
| | | } |
| | | |
| | | @Override |
| | | public IvrTaskVO queryTaskByCondition(IvrTaskSingle ivrTaskcall) { |
| | | public ServiceTaskVO queryTaskByCondition(ServiceSubtask ServiceSubtask) { |
| | | //å®ä¹æ£è
ä¸åä¸ä»»å¡å
³è表éå |
| | | List<PatTaskRelevance> patTaskRelevances = new ArrayList<>(); |
| | | List<IvrTaskSingle> list = selectIvrTaskcallList(ivrTaskcall); |
| | | List<ServiceSubtask> list = selectServiceSubtaskList(ServiceSubtask); |
| | | if (CollectionUtils.isEmpty(list) || list.size() == 0) { |
| | | return new IvrTaskVO(); |
| | | return new ServiceTaskVO(); |
| | | } |
| | | IvrTask ivrTask = ivrTaskService.selectIvrTaskByTaskid(ivrTaskcall.getTaskid()); |
| | | //å°æ¥åºæ¥çæ°æ®åå
¥ivrTasksingleVOä¸ |
| | | IvrTaskVO ivrTaskVO = DtoConversionUtils.sourceToTarget(list.get(0), IvrTaskVO.class); |
| | | ivrTaskVO.setShowDate(ivrTask.getShowDate()); |
| | | ivrTaskVO.setShowTimeMorn(ivrTask.getShowTimeMorn()); |
| | | ivrTaskVO.setShowTimeNoon(ivrTask.getShowTimeNoon()); |
| | | ivrTaskVO.setShowTimeNight(ivrTask.getShowTimeNight()); |
| | | ivrTaskVO.setPreachform(ivrTask.getPreachform()); |
| | | String sendTimeSlot = ivrTask.getSendTimeSlot(); |
| | | ServiceTask serviceTask = serviceTaskService.selectServiceTaskByTaskid(ServiceSubtask.getTaskid()); |
| | | //å°æ¥åºæ¥çæ°æ®åå
¥ServiceSubtaskVOä¸ |
| | | ServiceTaskVO serviceTaskVO = DtoConversionUtils.sourceToTarget(list.get(0), ServiceTaskVO.class); |
| | | serviceTaskVO.setShowDate(serviceTask.getShowDate()); |
| | | serviceTaskVO.setShowTimeMorn(serviceTask.getShowTimeMorn()); |
| | | serviceTaskVO.setShowTimeNoon(serviceTask.getShowTimeNoon()); |
| | | serviceTaskVO.setShowTimeNight(serviceTask.getShowTimeNight()); |
| | | serviceTaskVO.setPreachform(serviceTask.getPreachform()); |
| | | String sendTimeSlot = serviceTask.getSendTimeSlot(); |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | try { |
| | | //è·åå°åéæ¶é´çéå |
| | | if (com.ruoyi.common.utils.StringUtils.isNotEmpty(sendTimeSlot)) { |
| | | List<TaskSendTimeVO> taskSendTimeVOList = objectMapper.readValue(sendTimeSlot, List.class); |
| | | ivrTaskVO.setSendTimeslot(taskSendTimeVOList); |
| | | ivrTaskVO.setSendType(ivrTask.getSendType()); |
| | | serviceTaskVO.setSendTimeslot(taskSendTimeVOList); |
| | | serviceTaskVO.setSendType(serviceTask.getSendType()); |
| | | } |
| | | //ææ¬åéåæ° |
| | | if (com.ruoyi.common.utils.StringUtils.isNotEmpty(ivrTask.getTextParam())) { |
| | | Map<String, Map<String, String>> textParam = objectMapper.readValue(ivrTask.getTextParam(), Map.class); |
| | | ivrTaskVO.setTextParam(textParam); |
| | | if (com.ruoyi.common.utils.StringUtils.isNotEmpty(serviceTask.getTextParam())) { |
| | | Map<String, Map<String, String>> textParam = objectMapper.readValue(serviceTask.getTextParam(), Map.class); |
| | | serviceTaskVO.setTextParam(textParam); |
| | | } |
| | | } catch (JsonProcessingException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | for (IvrTaskSingle ivrTaskcall1 : list) { |
| | | for (ServiceSubtask serviceSubtask1 : list) { |
| | | PatTaskRelevance patTaskRelevance = new PatTaskRelevance(); |
| | | if (!ivrTaskcall1.getHospType().equals("2")) { |
| | | log.info("é访æ¥è¯¢ä¸ä¸ºåºé¢ï¼{}", ivrTaskcall1.getHospType()); |
| | | if (!serviceSubtask1.getHospType().equals("2")) { |
| | | log.info("é访æ¥è¯¢ä¸ä¸ºåºé¢ï¼{}", serviceSubtask1.getHospType()); |
| | | //è·åå°æ£è
ä¿¡æ¯ï¼å¹¶æ¾å
¥å°éåä¸ |
| | | patTaskRelevance.setName(ivrTaskcall1.getSendname()); |
| | | patTaskRelevance.setAge(ivrTaskcall1.getAge()); |
| | | patTaskRelevance.setSfzh(ivrTaskcall1.getSfzh()); |
| | | patTaskRelevance.setPhone(ivrTaskcall1.getPhone()); |
| | | patTaskRelevance.setAddr(ivrTaskcall1.getAddr()); |
| | | patTaskRelevance.setDiagname(ivrTaskcall1.getDiagname()); |
| | | patTaskRelevance.setPatid(ivrTaskcall1.getPatid()); |
| | | patTaskRelevance.setName(serviceSubtask1.getSendname()); |
| | | patTaskRelevance.setAge(serviceSubtask1.getAge()); |
| | | patTaskRelevance.setSfzh(serviceSubtask1.getSfzh()); |
| | | patTaskRelevance.setPhone(serviceSubtask1.getPhone()); |
| | | patTaskRelevance.setAddr(serviceSubtask1.getAddr()); |
| | | patTaskRelevance.setDiagname(serviceSubtask1.getDiagname()); |
| | | patTaskRelevance.setPatid(serviceSubtask1.getPatid()); |
| | | patTaskRelevance.setSendState(serviceSubtask1.getSendstate()); |
| | | patTaskRelevances.add(patTaskRelevance); |
| | | } |
| | | if (ivrTaskcall1.getHospType().equals("2")) { |
| | | log.info("é访æ¥è¯¢ä¸ºåºé¢ï¼{}", ivrTaskcall1.getHospType()); |
| | | patTaskRelevance.setName(ivrTaskcall1.getSendname()); |
| | | patTaskRelevance.setAge(ivrTaskcall1.getAge()); |
| | | patTaskRelevance.setSfzh(ivrTaskcall1.getSfzh()); |
| | | patTaskRelevance.setPhone(ivrTaskcall1.getPhone()); |
| | | patTaskRelevance.setAddr(ivrTaskcall1.getAddr()); |
| | | patTaskRelevance.setDeptName(ivrTaskcall1.getDeptname()); |
| | | patTaskRelevance.setBedNo(ivrTaskcall1.getBedNo()); |
| | | patTaskRelevance.setDiagname(ivrTaskcall1.getDiagname()); |
| | | patTaskRelevance.setPatid(ivrTaskcall1.getPatid()); |
| | | if (serviceSubtask1.getHospType().equals("2")) { |
| | | log.info("é访æ¥è¯¢ä¸ºåºé¢ï¼{}", serviceSubtask1.getHospType()); |
| | | patTaskRelevance.setName(serviceSubtask1.getSendname()); |
| | | patTaskRelevance.setAge(serviceSubtask1.getAge()); |
| | | patTaskRelevance.setSfzh(serviceSubtask1.getSfzh()); |
| | | patTaskRelevance.setPhone(serviceSubtask1.getPhone()); |
| | | patTaskRelevance.setAddr(serviceSubtask1.getAddr()); |
| | | patTaskRelevance.setDeptName(serviceSubtask1.getDeptname()); |
| | | patTaskRelevance.setBedNo(serviceSubtask1.getBedNo()); |
| | | patTaskRelevance.setDiagname(serviceSubtask1.getDiagname()); |
| | | patTaskRelevance.setPatid(serviceSubtask1.getPatid()); |
| | | patTaskRelevance.setSendState(serviceSubtask1.getSendstate()); |
| | | patTaskRelevances.add(patTaskRelevance); |
| | | } |
| | | } |
| | | |
| | | ivrTaskVO.setPatTaskRelevances(patTaskRelevances); |
| | | return ivrTaskVO; |
| | | serviceTaskVO.setPatTaskRelevances(patTaskRelevances); |
| | | return serviceTaskVO; |
| | | } |
| | | |
| | | @Override |
| | | public List<IvrTaskSingle> patItem(IvrTaskSingle ivrTaskSingle) { |
| | | public List<ServiceSubtask> patItem(ServiceSubtask serviceSubtask) { |
| | | |
| | | |
| | | return this.selectIvrTaskcallList(ivrTaskSingle); |
| | | return this.selectServiceSubtaskList(serviceSubtask); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢åä¸ä»»å¡ï¼éè®¿ï¼ |
| | | * |
| | | * @param ivrTaskcall åä¸ä»»å¡ï¼éè®¿ï¼ |
| | | * @param serviceSubtask åä¸ä»»å¡ï¼éè®¿ï¼ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertIvrTaskcall(IvrTaskSingle ivrTaskcall) { |
| | | ivrTaskcall.setCreateTime(DateUtils.getNowDate()); |
| | | return ivrTaskSingleMapper.insertIvrTaskcall(ivrTaskcall); |
| | | public int insertServiceSubtask(ServiceSubtask serviceSubtask) { |
| | | serviceSubtask.setCreateTime(DateUtils.getNowDate()); |
| | | return serviceSubtaskMapper.insertServiceSubtask(serviceSubtask); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹åä¸ä»»å¡ï¼éè®¿ï¼ |
| | | * |
| | | * @param ivrTaskcall åä¸ä»»å¡ï¼éè®¿ï¼ |
| | | * @param serviceSubtask åä¸ä»»å¡ï¼éè®¿ï¼ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public Boolean updateIvrTaskcall(IvrTaskSingle ivrTaskcall) { |
| | | ivrTaskcall.setUpdateTime(DateUtils.getNowDate()); |
| | | return ivrTaskSingleMapper.updateIvrTaskcall(ivrTaskcall); |
| | | public Boolean updateServiceSubtask(ServiceSubtask serviceSubtask) { |
| | | serviceSubtask.setUpdateTime(DateUtils.getNowDate()); |
| | | return serviceSubtaskMapper.updateServiceSubtask(serviceSubtask); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteIvrTaskcallByIds(Long[] ids) { |
| | | public int deleteServiceSubtaskByIds(Long[] ids) { |
| | | Integer i = 0; |
| | | for (Long id : ids) { |
| | | i = ivrTaskSingleMapper.deleteIvrTaskcallById(id); |
| | | i = serviceSubtaskMapper.deleteServiceSubtaskById(id); |
| | | } |
| | | return i; |
| | | } |
| | |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public int insertOrUpdateTask(IvrTaskVO ivrTaskVO) { |
| | | if (ObjectUtils.isEmpty(ivrTaskVO)) { |
| | | public int insertOrUpdateTask(ServiceTaskVO serviceTaskVO) { |
| | | if (ObjectUtils.isEmpty(serviceTaskVO)) { |
| | | log.info("ä»»å¡å
¥å为空ï¼è¯·æ£æ¥å
¥å"); |
| | | throw new BaseException("ä»»å¡å
¥å为空ï¼è¯·æ£æ¥å
¥å"); |
| | | } |
| | | Integer integer = 1; |
| | | IvrTask ivrTask = DtoConversionUtils.sourceToTarget(ivrTaskVO, IvrTask.class); |
| | | ivrTask.setTextParam(JSON.toJSONString(ivrTaskVO.getTextParam())); |
| | | if (ivrTaskVO.getIsoperation() != null && ivrTaskVO.getIsoperation() == 1) { |
| | | ServiceTask serviceTask = DtoConversionUtils.sourceToTarget(serviceTaskVO, ServiceTask.class); |
| | | serviceTask.setTextParam(JSON.toJSONString(serviceTaskVO.getTextParam())); |
| | | if (serviceTaskVO.getIsoperation() != null && serviceTaskVO.getIsoperation() == 1) { |
| | | //å¾ä»»å¡è¡¨ä¸ï¼æ°å¢ä»»å¡ |
| | | if (ObjectUtils.isNotEmpty(ivrTaskVO.getSendTimeslot())) |
| | | ivrTask.setSendTimeSlot(JSON.toJSONString(ivrTaskVO.getSendTimeslot())); |
| | | if (ivrTask.getSendState() == null) ivrTask.setSendState(1); |
| | | ivrTask.setTemplateid(ivrTaskVO.getLibtemplateid()); |
| | | ivrTaskService.insertIvrTask(ivrTask); |
| | | if (ObjectUtils.isNotEmpty(serviceTaskVO.getSendTimeslot())) |
| | | serviceTask.setSendTimeSlot(JSON.toJSONString(serviceTaskVO.getSendTimeslot())); |
| | | if (serviceTask.getSendState() == null) serviceTask.setSendState(1); |
| | | serviceTask.setTemplateid(serviceTaskVO.getLibtemplateid()); |
| | | serviceTaskService.insertServiceTask(serviceTask); |
| | | |
| | | //å°ä»»å¡ä¿¡æ¯æ¾å°æå¡è¡¨ä¸ |
| | | IvrTaskSingle ivrTaskcall = DtoConversionUtils.sourceToTarget(ivrTaskVO, IvrTaskSingle.class); |
| | | ivrTaskcall.setTaskid(ivrTask.getTaskid().longValue()); |
| | | ServiceSubtask serviceSubtask = DtoConversionUtils.sourceToTarget(serviceTaskVO, ServiceSubtask.class); |
| | | serviceSubtask.setTaskid(serviceTask.getTaskid().longValue()); |
| | | //æ°å¢ |
| | | if (CollectionUtils.isNotEmpty(ivrTaskVO.getPatTaskRelevances())) { |
| | | for (PatTaskRelevance patTaskRelevance : ivrTaskVO.getPatTaskRelevances()) { |
| | | if (CollectionUtils.isNotEmpty(serviceTaskVO.getPatTaskRelevances())) { |
| | | for (PatTaskRelevance patTaskRelevance : serviceTaskVO.getPatTaskRelevances()) { |
| | | //å°ä»»å¡ä¿¡æ¯æ°å¢å°é访æå¡è¡¨ä¸ |
| | | ivrTaskcall.setSendname(patTaskRelevance.getName()); |
| | | ivrTaskcall.setAge(patTaskRelevance.getAge()); |
| | | ivrTaskcall.setSfzh(patTaskRelevance.getSfzh()); |
| | | ivrTaskcall.setPhone(patTaskRelevance.getPhone()); |
| | | ivrTaskcall.setAddr(patTaskRelevance.getAddr()); |
| | | ivrTaskcall.setPatid(patTaskRelevance.getPatid()); |
| | | ivrTaskcall.setCreateTime(DateUtils.getNowDate()); |
| | | ivrTaskcall.setSendstate(1L); |
| | | ivrTaskcall.setType(ivrTaskVO.getHospType()); |
| | | ivrTaskSingleMapper.insertIvrTaskcall(ivrTaskcall); |
| | | integer = ivrTaskcall.getId().intValue(); |
| | | 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()); |
| | | serviceSubtaskMapper.insertServiceSubtask(serviceSubtask); |
| | | integer = serviceSubtask.getId().intValue(); |
| | | } |
| | | } |
| | | |
| | | } else if (ivrTaskVO.getIsoperation() != null && ivrTaskVO.getIsoperation() == 2) { |
| | | } else if (serviceTaskVO.getIsoperation() != null && serviceTaskVO.getIsoperation() == 2) { |
| | | //ä»»å¡ä¿®æ¹ |
| | | if (ObjectUtils.isNotEmpty(ivrTaskVO.getSendTimeslot())) |
| | | ivrTask.setSendTimeSlot(JSON.toJSONString(ivrTaskVO.getSendTimeslot())); |
| | | if (ObjectUtils.isNotEmpty(serviceTaskVO.getSendTimeslot())) |
| | | serviceTask.setSendTimeSlot(JSON.toJSONString(serviceTaskVO.getSendTimeslot())); |
| | | //ä¿®æ¹æä½ï¼éè¦å°stopStateç¶æ+1 |
| | | IvrTask ivrTask1 = ivrTaskService.selectIvrTaskByTaskid(ivrTask.getTaskid()); |
| | | ivrTask.setStopState(ivrTask1.getStopState() + 1); |
| | | ivrTask.setTemplateid(ivrTaskVO.getLibtemplateid()); |
| | | ivrTaskService.updateIvrTask(ivrTask); |
| | | ServiceTask serviceTask1 = serviceTaskService.selectServiceTaskByTaskid(serviceTask.getTaskid()); |
| | | serviceTask.setStopState(serviceTask1.getStopState() + 1); |
| | | serviceTask.setTemplateid(serviceTaskVO.getLibtemplateid()); |
| | | serviceTaskService.updateServiceTask(serviceTask); |
| | | |
| | | if (CollectionUtils.isNotEmpty(ivrTaskVO.getPatTaskRelevances())) { |
| | | for (PatTaskRelevance patTaskRelevance : ivrTaskVO.getPatTaskRelevances()) { |
| | | if (CollectionUtils.isNotEmpty(serviceTaskVO.getPatTaskRelevances())) { |
| | | for (PatTaskRelevance patTaskRelevance : serviceTaskVO.getPatTaskRelevances()) { |
| | | |
| | | IvrTaskSingle ivrTaskcall = DtoConversionUtils.sourceToTarget(ivrTaskVO, IvrTaskSingle.class); |
| | | ivrTaskcall.setSendname(patTaskRelevance.getName()); |
| | | ivrTaskcall.setAge(patTaskRelevance.getAge()); |
| | | ivrTaskcall.setSfzh(patTaskRelevance.getSfzh()); |
| | | ivrTaskcall.setPhone(patTaskRelevance.getPhone()); |
| | | ivrTaskcall.setAddr(patTaskRelevance.getAddr()); |
| | | ivrTaskcall.setPatid(patTaskRelevance.getPatid()); |
| | | ivrTaskcall.setType(ivrTaskVO.getHospType()); |
| | | ivrTaskcall.setCreateTime(DateUtils.getNowDate()); |
| | | |
| | | ivrTaskcall.setTextParam(new Gson().toJson(ivrTaskVO.getTextParam())); |
| | | 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.setType(serviceTaskVO.getHospType()); |
| | | serviceSubtask.setCreateTime(DateUtils.getNowDate()); |
| | | serviceSubtask.setHospType(patTaskRelevance.getHospType()); |
| | | serviceSubtask.setTextParam(new Gson().toJson(serviceTaskVO.getTextParam())); |
| | | if (patTaskRelevance.getIsoperation() != null) { |
| | | if (patTaskRelevance.getIsoperation() == 2) |
| | | ivrTaskSingleMapper.updateIvrTaskcallByCondition(ivrTaskcall); |
| | | serviceSubtaskMapper.updateServiceSubtaskByCondition(serviceSubtask); |
| | | if (patTaskRelevance.getIsoperation() == 1) { |
| | | ivrTaskcall.setSendstate(1L); |
| | | ivrTaskSingleMapper.insertIvrTaskcall(ivrTaskcall); |
| | | serviceSubtask.setSendstate(1L); |
| | | serviceSubtaskMapper.insertServiceSubtask(serviceSubtask); |
| | | } |
| | | if (patTaskRelevance.getIsoperation() == 3) |
| | | // éè¿taskidåpatidå»å é¤è¯¥æ¡æ°æ® |
| | | ivrTaskSingleMapper.deleteIvrTaskcallByCondition(ivrTaskVO.getTaskid(), patTaskRelevance.getPatid()); |
| | | serviceSubtaskMapper.deleteServiceSubtaskByCondition(serviceTaskVO.getTaskid(), patTaskRelevance.getPatid()); |
| | | } |
| | | integer = ivrTaskcall.getTaskid().intValue(); |
| | | integer = serviceSubtask.getTaskid().intValue(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | return integer; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | Map<String, Object> map = redisCache.getCacheObject(phoneCallBackVO.getUuid()); |
| | | IvrTaskSingle ivrTaskcall = (IvrTaskSingle) map.get("ivrTaskSingle"); |
| | | List<IvrTaskTemplateScriptVO> ivrTaskTemplateScriptVOs = (List<IvrTaskTemplateScriptVO>) map.get("ivrTaskTemplateScriptVO"); |
| | | ServiceSubtask serviceSubtask = (ServiceSubtask) map.get("ServiceSubtask"); |
| | | List<IvrTaskTemplateScriptVO> IvrTaskTemplateScriptVOs = (List<IvrTaskTemplateScriptVO>) map.get("IvrTaskTemplateScriptVO"); |
| | | //å°uuidæ´æ°å°æ°æ®åºä¸ |
| | | ivrTaskcall.setSenduuid(phoneCallBackVO.getUuid()); |
| | | ivrTaskSingleMapper.updateIvrTaskcall(ivrTaskcall); |
| | | serviceSubtask.setSenduuid(phoneCallBackVO.getUuid()); |
| | | serviceSubtaskMapper.updateServiceSubtask(serviceSubtask); |
| | | |
| | | //è·å模æ¿ä¿¡æ¯ |
| | | IvrTaskTemplateVO ivrTaskTemplateVO = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "ivrTaskTemplateVO"); |
| | | IvrTaskTemplateVO ivrTaskTemplateVO = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "IvrTaskTemplateVO"); |
| | | |
| | | //è¯é³è¯å«ç»æä¸æ¥æ¥å£: 3 |
| | | Integer noVoice = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "noVoice"); |
| | |
| | | //夿noVoiceæ¯å¦å·²ç»å°äºæå¤§å¼ |
| | | if (noVoice == ivrTaskTemplateVO.getNoVoiceNum().intValue()) { |
| | | //å·²ç»é®äºå¯¹åºçéæ°ï¼å°±å¤ææ¯å¦è¿æä¸ä¸é¢ |
| | | if (nowQuestion.getTargetid() == ivrTaskTemplateScriptVOs.size()) { |
| | | if (nowQuestion.getTargetid() == IvrTaskTemplateScriptVOs.size()) { |
| | | //没æä¸ä¸é¢äºï¼å°±ææçµè¯ï¼ææ¾ç»æè¯ |
| | | redisCache.setCacheObject(phoneCallBackVO.getUuid() + "hangup", 1, 120, TimeUnit.MINUTES); |
| | | phoneUtils.ttsPlayback(ivrTaskTemplateVO.getRevisitAfter(), phoneCallBackVO.getUuid()); |
| | |
| | | } else { |
| | | //æä¸ä¸é¢ |
| | | redisCache.setCacheObject(phoneCallBackVO.getUuid() + "noVoice", 0, 120, TimeUnit.MINUTES); |
| | | IvrTaskTemplateScriptVO nextQuestion = getNextQuestion(ivrTaskTemplateScriptVOs, nowQuestion); |
| | | IvrTaskTemplateScriptVO nextQuestion = getNextQuestion(IvrTaskTemplateScriptVOs, nowQuestion); |
| | | // é®é¢ï¼ å»è°ç¨âttsåæåææ¾âæ¥å£ |
| | | String date = simpleDateFormat1.format(new Date()); |
| | | log.info("å»è°ç¨ttsåæåææ¾æ¥å£: {},uuid为ï¼{}", date, phoneCallBackVO.getUuid()); |
| | |
| | | //说æå¹é
æ£ç¡®äº |
| | | //è¿éåºè¯¥å
å¤æç±»åï¼å»åä¿®æ¹ï¼è®¾ç½®IsUserOperationæ¯åéé¢çæ¹æ³ |
| | | nowQuestion.getIvrTaskScriptTargetoptionList().get(j).setIsUserOperation(true); |
| | | ivrTaskScriptTargetoptionMapper.updateIvrTaskTemplateTargetoption(nowQuestion.getIvrTaskScriptTargetoptionList().get(j)); |
| | | 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 ivrTaskVisitResult = DtoConversionUtils.sourceToTarget(ivrTaskcall, IvrTaskVisitResult.class); |
| | | ivrTaskVisitResult.setId(null); |
| | | ivrTaskVisitResult.setQuestion(nowQuestion.getQuestionText()); |
| | | ivrTaskVisitResult.setPatientAnswer(phoneCallBackVO.getTextResult()); |
| | | ivrTaskVisitResult.setCreateTime(new Date()); |
| | | ivrTaskVisitResult.setOptionResult(nowQuestion.getIvrTaskScriptTargetoptionList().get(j).getTargetvalue()); |
| | | ivrTaskVisitResultMapper.insertIvrTaskVisitResult(ivrTaskVisitResult); |
| | | IvrTaskVisitResult serviceTaskVisitResult = DtoConversionUtils.sourceToTarget(serviceSubtask, IvrTaskVisitResult.class); |
| | | serviceTaskVisitResult.setId(null); |
| | | serviceTaskVisitResult.setQuestion(nowQuestion.getQuestionText()); |
| | | 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) { |
| | | for (IvrTaskTemplateScriptVO script : IvrTaskTemplateScriptVOs) { |
| | | if (script.getTargetid() == nextQuestion) { |
| | | QuestionMessage questionMessage = new QuestionMessage(); |
| | | questionMessage.setNowQuestion(script); |
| | | questionMessage.setQuestionList(ivrTaskTemplateScriptVOs); |
| | | questionMessage.setQuestionList(IvrTaskTemplateScriptVOs); |
| | | redisCache.setCacheObject(phoneCallBackVO.getUuid() + "returnQues", questionMessage, 120, TimeUnit.MINUTES); |
| | | phoneUtils.ttsPlayback(script.getQuestionText(), phoneCallBackVO.getUuid()); |
| | | return; |
| | | } else if (nextQuestion > ivrTaskTemplateScriptVOs.size()) { |
| | | } else if (nextQuestion > IvrTaskTemplateScriptVOs.size()) { |
| | | //没æä¸ä¸é¢äºï¼å°±ç»æäº |
| | | String date = simpleDateFormat1.format(new Date()); |
| | | log.error("没æä¸ä¸é¢äºï¼å°±ç»æäº: {},uuid为ï¼{}", date, phoneCallBackVO.getUuid()); |
| | |
| | | //æ å¹é
次æ°å»å¤ææ¯å¦å°æå¤§è¯¢é®æ¬¡æ°ï¼å¹¶ä¸ææçé项é½å¹é
å®äº |
| | | if (mateNum == ivrTaskTemplateVO.getMateNum().intValue()) { |
| | | //妿ä¸ä¸é¢ä¸ºç©º.åæ°çæ°æ®è¿å,å¹¶å ä¸æè°¢è¯ |
| | | if (nowQuestion.getTargetid() < ivrTaskTemplateScriptVOs.size()) { |
| | | if (nowQuestion.getTargetid() < IvrTaskTemplateScriptVOs.size()) { |
| | | QuestionMessage questionMessage = new QuestionMessage(); |
| | | IvrTaskTemplateScriptVO nextQuestion = getNextQuestion(ivrTaskTemplateScriptVOs, nowQuestion); |
| | | questionMessage.setQuestionList(ivrTaskTemplateScriptVOs); |
| | | 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); |
| | |
| | | //// e.printStackTrace(); |
| | | //// } |
| | | // |
| | | // IvrTaskSingle ivrTaskcall = (IvrTaskSingle) map.get("ivrTaskcall"); |
| | | // ServiceSubtask ServiceSubtask = (ServiceSubtask) map.get("ServiceSubtask"); |
| | | // List<IvrLibaTemplateScriptVO> ivrLibaTemplateScriptVOs = (List<IvrLibaTemplateScriptVO>) map.get("ivrLibaTemplateScriptVO"); |
| | | // //å°uuidæ´æ°å°æ°æ®åºä¸ |
| | | // ivrTaskcall.setSenduuid(phoneCallBackVO.getUuid()); |
| | | // ivrTaskSingleMapper.updateIvrTaskcall(ivrTaskcall); |
| | | // ServiceSubtask.setSenduuid(phoneCallBackVO.getUuid()); |
| | | // ServiceSubtaskMapper.updateServiceSubtask(ServiceSubtask); |
| | | // |
| | | // //è·å模æ¿ä¿¡æ¯ |
| | | // IvrLibaTemplateVO ivrLibaTemplateVO = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "ivrLibaTemplateVO"); |
| | |
| | | // redisCache.setCacheObject(phoneCallBackVO.getUuid() + "uint8", 1, 120, TimeUnit.MINUTES); |
| | | // } |
| | | // |
| | | // if (integer != null && integer == ivrTaskcall.getRecallcount().intValue()) { |
| | | // if (integer != null && integer == ServiceSubtask.getRecallcount().intValue()) { |
| | | // log.info("æ 人æ¥å¬ï¼{}, {}", phoneCallBackVO.getErrResult(), phoneCallBackVO.getUuid()); |
| | | // //è¿ç»æè§å®æ¬¡ï¼å¦æè¦æ²¡äººæ¥ï¼é£å°±ç»æ |
| | | // ivrTaskcall.setResult(phoneCallBackVO.getErrResult()); |
| | | // ivrTaskSingleMapper.updateIvrTaskcall(ivrTaskcall); |
| | | // ServiceSubtask.setResult(phoneCallBackVO.getErrResult()); |
| | | // ServiceSubtaskMapper.updateServiceSubtask(ServiceSubtask); |
| | | // redisCache.deleteObject(phoneCallBackVO.getUuid() + "uint8"); |
| | | // } else if (integer != null && integer < ivrTaskcall.getRecallcount().intValue()) { |
| | | // } else if (integer != null && integer < ServiceSubtask.getRecallcount().intValue()) { |
| | | // //è¿è¡éæ¨ |
| | | // PhoneUtils phoneUtils = new PhoneUtils(); |
| | | // phoneUtils.ob(null, null, null, null, null, null, null, ivrTaskcall.getPhone(), phoneCallBackVO.getUuid(), true); |
| | | // phoneUtils.ob(null, null, null, null, null, null, null, ServiceSubtask.getPhone(), phoneCallBackVO.getUuid(), true); |
| | | // } |
| | | // } |
| | | // |
| | |
| | | // // 0-æ¯é |
| | | // Integer integer = redisCache.getCacheObject(phoneCallBackVO.getUuid() + "enumState"); |
| | | // |
| | | // if (integer != null && integer < ivrTaskcall.getRecallcount().intValue()) { |
| | | // 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 == ivrTaskcall.getRecallcount().intValue()) { |
| | | // ivrTaskcall.setResult("æ 人æ¥å¬"); |
| | | // ivrTaskSingleMapper.updateIvrTaskcall(ivrTaskcall); |
| | | // } 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()); |
| | | // ivrTaskcall.setResult(phoneCallBackVO.getHangUpResult()); |
| | | // ivrTaskSingleMapper.updateIvrTaskcall(ivrTaskcall); |
| | | // ServiceSubtask.setResult(phoneCallBackVO.getHangUpResult()); |
| | | // ServiceSubtaskMapper.updateServiceSubtask(ServiceSubtask); |
| | | // redisCache.deleteObject(phoneCallBackVO.getUuid() + "enumState"); |
| | | // } |
| | | // |
| | |
| | | // return phoneCallBackVO; |
| | | // } |
| | | |
| | | @Override |
| | | public Integer saveQuestionAnswer(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> ivrTaskSingles = serviceSubtaskMapper.selectServiceSubtaskList(ivrTaskSingle); |
| | | if (CollectionUtils.isEmpty(ivrTaskSingles) || ivrTaskSingles.size() == 0) { |
| | | log.error("æ¥éäºï¼ivrTaskSinglesæ°æ®ä¸ºç©ºäºï¼{}", ivrTaskSingle); |
| | | return 0; |
| | | } |
| | | int i = 0; |
| | | if (CollectionUtils.isNotEmpty(serviceSubTaskDetailReq.getIvrTaskcalldetailList())) { |
| | | //é访 |
| | | for (IvrTaskcalldetail ivrTaskcalldetail : serviceSubTaskDetailReq.getIvrTaskcalldetailList()) { |
| | | ivrTaskcalldetail.setCallid(ivrTaskSingles.get(0).getId().toString()); |
| | | ivrTaskcalldetail.setCalldetailid(UUID.randomUUID().toString()); |
| | | ivrTaskcalldetail.setCreateTime(new Date()); |
| | | i = ivrTaskcalldetailMapper.insertIvrTaskcalldetail(ivrTaskcalldetail); |
| | | } |
| | | } else if (CollectionUtils.isNotEmpty(serviceSubTaskDetailReq.getSvyTasksingledetailList())) { |
| | | //é®å· |
| | | for (SvyTasksingledetail svyTasksingledetail : serviceSubTaskDetailReq.getSvyTasksingledetailList()) { |
| | | svyTasksingledetail.setCallid(ivrTaskSingles.get(0).getId().toString()); |
| | | svyTasksingledetail.setCalldetailid(UUID.randomUUID().toString()); |
| | | svyTasksingledetail.setCreateTime(new Date()); |
| | | i = svyTasksingledetailMapper.insertSvyTasksingledetail(svyTasksingledetail); |
| | | } |
| | | } |
| | | return i; |
| | | } |
| | | |
| | | private IvrTaskTemplateScriptVO getNextQuestion(List<IvrTaskTemplateScriptVO> ivrTaskTemplateScriptVOList, IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO) { |
| | | private IvrTaskTemplateScriptVO getNextQuestion(List<IvrTaskTemplateScriptVO> IvrTaskTemplateScriptVOList, IvrTaskTemplateScriptVO IvrTaskTemplateScriptVO) { |
| | | |
| | | for (int j = 0; j < ivrTaskTemplateScriptVOList.size(); j++) { |
| | | if (ivrTaskTemplateScriptVOList.get(j).getTargetid() == ivrTaskTemplateScriptVO.getTargetid() + 1) { |
| | | for (int j = 0; j < IvrTaskTemplateScriptVOList.size(); j++) { |
| | | if (IvrTaskTemplateScriptVOList.get(j).getTargetid() == IvrTaskTemplateScriptVO.getTargetid() + 1) { |
| | | // 对该æ¡templateScriptVOè¿è¡å¤ç |
| | | return ivrTaskTemplateScriptVOList.get(j); |
| | | return IvrTaskTemplateScriptVOList.get(j); |
| | | } |
| | | } |
| | | return null; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.service.impl; |
| | | |
| | | import java.util.*; |
| | | |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.DtoConversionUtils; |
| | | import org.apache.commons.lang3.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.stereotype.Service; |
| | | import com.smartor.service.IServiceTaskService; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | /** |
| | | * è¯é³ä»»å¡Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author smartor |
| | | * @date 2023-03-24 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ServiceTaskServiceImpl implements IServiceTaskService { |
| | | @Autowired |
| | | private ServiceTaskMapper serviceTaskMapper; |
| | | |
| | | @Autowired |
| | | private ServiceSubtaskMapper serviceSubtaskMapper; |
| | | |
| | | @Autowired |
| | | private IvrLibaTemplateScriptMapper ivrLibaTemplateScriptMapper; |
| | | |
| | | @Autowired |
| | | private SvyLibTemplateScriptMapper svyLibTemplateScriptMapper; |
| | | |
| | | @Autowired |
| | | private PatArchiveMapper patArchiveMapper; |
| | | |
| | | @Autowired |
| | | private IvrLibaTemplateTargetoptionMapper ivrLibaTemplateTargetOptionMapper; |
| | | |
| | | @Autowired |
| | | private SvyLibTemplateTargetoptionMapper svyLibTemplateTargetoptionMapper; |
| | | |
| | | @Autowired |
| | | private RedisCache redisCache; |
| | | |
| | | /** |
| | | * æ¥è¯¢è¯é³ä»»å¡ |
| | | * |
| | | * @param taskid è¯é³ä»»å¡ä¸»é® |
| | | * @return è¯é³ä»»å¡ |
| | | */ |
| | | @Override |
| | | public ServiceTask selectServiceTaskByTaskid(Long taskid) { |
| | | return serviceTaskMapper.selectServiceTaskByTaskid(taskid); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢è¯é³ä»»å¡å表 |
| | | * |
| | | * @param serviceTask è¯é³ä»»å¡ |
| | | * @return è¯é³ä»»å¡ |
| | | */ |
| | | @Override |
| | | |
| | | public List<ServiceTask> selectServiceTaskList(ServiceTask serviceTask) { |
| | | return serviceTaskMapper.selectServiceTaskList(serviceTask); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è¯é³ä»»å¡ |
| | | * |
| | | * @param serviceTask è¯é³ä»»å¡ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertServiceTask(ServiceTask serviceTask) { |
| | | serviceTask.setCreateTime(DateUtils.getNowDate()); |
| | | return serviceTaskMapper.insertServiceTask(serviceTask); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹è¯é³ä»»å¡ |
| | | * |
| | | * @param serviceTask è¯é³ä»»å¡ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateServiceTask(ServiceTask serviceTask) { |
| | | serviceTask.setUpdateTime(DateUtils.getNowDate()); |
| | | return serviceTaskMapper.updateServiceTask(serviceTask); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤è¯é³ä»»å¡ |
| | | * |
| | | * @param taskids éè¦å é¤çè¯é³ä»»å¡ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteServiceTaskByTaskids(Long[] taskids) { |
| | | return serviceTaskMapper.deleteServiceTaskByTaskids(taskids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤è¯é³ä»»å¡ä¿¡æ¯ |
| | | * |
| | | * @param taskid è¯é³ä»»å¡ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public Boolean deleteServiceTaskByTaskid(Long taskid) { |
| | | ServiceSubtask ServiceTaskcall = new ServiceSubtask(); |
| | | ServiceTaskcall.setTaskid(taskid); |
| | | ServiceTaskcall.setDelFlag("1"); |
| | | Boolean aBoolean = serviceSubtaskMapper.updateServiceSubtask(ServiceTaskcall); |
| | | Boolean isSuccess = false; |
| | | if (!aBoolean) { |
| | | new BaseException("ä»»å¡å é¤å¤±è´¥"); |
| | | } |
| | | isSuccess = serviceTaskMapper.deleteServiceTaskByTaskid(taskid); |
| | | return isSuccess; |
| | | } |
| | | |
| | | @Override |
| | | public List getScriptInfoByCondition(Long taskid, Long patid) { |
| | | //éè¿ä»»å¡IDè·å模æ¿ID |
| | | ServiceTask serviceTask = selectServiceTaskByTaskid(taskid); |
| | | List info = new ArrayList(); |
| | | if (serviceTask.getType().equals("1")) { |
| | | //é访 |
| | | info = sfInfo(serviceTask, patid); |
| | | } else if (serviceTask.getType().equals("2")) { |
| | | //é®å· |
| | | info = wjInfo(serviceTask, patid); |
| | | } else { |
| | | //宣æ |
| | | } |
| | | |
| | | //åªè¦æå¼äºé¡µé¢ï¼å°±ç®æå |
| | | ServiceSubtask ServiceTaskSingle = new ServiceSubtask(); |
| | | ServiceTaskSingle.setTaskid(taskid); |
| | | ServiceTaskSingle.setPatid(patid); |
| | | ServiceTaskSingle.setResult("success"); |
| | | ServiceTaskSingle.setFinishtime(new Date()); |
| | | serviceSubtaskMapper.updateServiceSubtaskByCondition(ServiceTaskSingle); |
| | | |
| | | return info; |
| | | } |
| | | |
| | | /** |
| | | * éè®¿ä¿¡æ¯ |
| | | * |
| | | * @param serviceTask |
| | | * @param patid |
| | | * @return |
| | | */ |
| | | public List sfInfo(ServiceTask serviceTask, Long patid) { |
| | | //éè¿æ¨¡æ¿IDè·åé®é¢ä¿¡æ¯ |
| | | IvrLibaTemplateScript ivrLibaTemplateScript = new IvrLibaTemplateScript(); |
| | | ivrLibaTemplateScript.setTemplateID(serviceTask.getTemplateid()); |
| | | ivrLibaTemplateScript.setDelFlag("0"); |
| | | List<IvrLibaTemplateScript> ivrLibaTemplateScripts = ivrLibaTemplateScriptMapper.selectIvrLibaTemplateScriptList(ivrLibaTemplateScript); |
| | | if (CollectionUtils.isEmpty(ivrLibaTemplateScripts) || ivrLibaTemplateScripts.size() == 0) { |
| | | log.info("ivrLibaTemplateScripts为空äºï¼è¯·å°½å¿«è系管çåå¤ç"); |
| | | return new ArrayList<>(); |
| | | } |
| | | List<IvrLibaTemplateScriptVO> ivrLibaTemplateScriptVOS = DtoConversionUtils.sourceToTarget(ivrLibaTemplateScripts, IvrLibaTemplateScriptVO.class); |
| | | |
| | | //è·åæ£è
ä¿¡æ¯ |
| | | PatArchive patArchive = patArchiveMapper.selectPatArchiveByPatid(patid); |
| | | |
| | | //éè¿æ£è
ä¿¡æ¯åä»»å¡ä¿¡æ¯ä¸çtextParam对é®é¢ä¸çåéè¿è¡å¡«å
|
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | Map<String, Map<String, String>> serviceTaskMap = null; |
| | | try { |
| | | serviceTaskMap = objectMapper.readValue(serviceTask.getTextParam(), Map.class); |
| | | } catch (JsonProcessingException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | List<Map<String, String>> mapList = new ArrayList<>(); |
| | | |
| | | for (Map<String, String> map : serviceTaskMap.values()) { |
| | | mapList.add(map); |
| | | } |
| | | |
| | | //å°æ¨¡æ¿é®é¢è¯æ¯éçéé
ç¬¦æ¿æ¢ |
| | | for (IvrLibaTemplateScriptVO ivrLibaTemplateScriptVO : ivrLibaTemplateScriptVOS) { |
| | | if (StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getQuestionText())) { |
| | | for (Map<String, String> map : mapList) { |
| | | for (String key : map.keySet()) { |
| | | |
| | | ivrLibaTemplateScriptVO.setQuestionText(ivrLibaTemplateScriptVO.getQuestionText().replace(key, StringUtils.isNotEmpty(map.get(key)) ? map.get(key) : "")); |
| | | } |
| | | } |
| | | //æ¿æ¢æ£è
ä¸ªäººä¿¡æ¯æ°æ® |
| | | ivrLibaTemplateScriptVO.setQuestionText(ivrLibaTemplateScriptVO.getQuestionText().replace("${name}", StringUtils.isNotEmpty(patArchive.getName()) ? patArchive.getName() : "")); |
| | | ivrLibaTemplateScriptVO.setQuestionText(ivrLibaTemplateScriptVO.getQuestionText().replace("${dzz}", StringUtils.isNotEmpty(patArchive.getPlaceOfResidence()) ? patArchive.getPlaceOfResidence() : "")); |
| | | ivrLibaTemplateScriptVO.setQuestionText(ivrLibaTemplateScriptVO.getQuestionText().replace("${dhh}", StringUtils.isNotEmpty(patArchive.getTelcode()) ? patArchive.getTelcode() : "")); |
| | | |
| | | //è·åé®é¢é项 |
| | | IvrLibaTemplateTargetoption ivrLibaTemplateTargetoption = new IvrLibaTemplateTargetoption(); |
| | | ivrLibaTemplateTargetoption.setScriptid(ivrLibaTemplateScriptVO.getID()); |
| | | List<IvrLibaTemplateTargetoption> ivrLibaTemplateTargetoptions = ivrLibaTemplateTargetOptionMapper.selectIvrLibaTemplateTargetoptionList(ivrLibaTemplateTargetoption); |
| | | ivrLibaTemplateScriptVO.setIvrLibaScriptTargetoptionList(ivrLibaTemplateTargetoptions); |
| | | } |
| | | } |
| | | return ivrLibaTemplateScriptVOS; |
| | | } |
| | | |
| | | /** |
| | | * é®å·ä¿¡æ¯ |
| | | * |
| | | * @param serviceTask |
| | | * @param patid |
| | | * @return |
| | | */ |
| | | private List wjInfo(ServiceTask serviceTask, Long patid) { |
| | | //éè¿æ¨¡æ¿IDè·åé®é¢ä¿¡æ¯ |
| | | SvyLibTemplateScript svyLibTemplateScript = new SvyLibTemplateScript(); |
| | | svyLibTemplateScript.setSvyid(Long.valueOf(serviceTask.getTemplateid())); |
| | | svyLibTemplateScript.setDelFlag("0"); |
| | | List<SvyLibTemplateScript> svyLibTemplateScripts = svyLibTemplateScriptMapper.selectSvyLibTemplateScriptList(svyLibTemplateScript); |
| | | if (CollectionUtils.isEmpty(svyLibTemplateScripts) || svyLibTemplateScripts.size() == 0) { |
| | | log.info("ivrLibaTemplateScripts为空äºï¼è¯·å°½å¿«è系管çåå¤ç"); |
| | | return new ArrayList<>(); |
| | | } |
| | | List<SvyLibTemplateScriptVO> svyLibTemplateScriptVOS = DtoConversionUtils.sourceToTarget(svyLibTemplateScripts, SvyLibTemplateScriptVO.class); |
| | | |
| | | //è·åæ£è
ä¿¡æ¯ |
| | | PatArchive patArchive = patArchiveMapper.selectPatArchiveByPatid(patid); |
| | | |
| | | //éè¿æ£è
ä¿¡æ¯åä»»å¡ä¿¡æ¯ä¸çtextParam对é®é¢ä¸çåéè¿è¡å¡«å
|
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | Map<String, Map<String, String>> ivrTaskMap = null; |
| | | try { |
| | | ivrTaskMap = objectMapper.readValue(serviceTask.getTextParam(), Map.class); |
| | | } catch (JsonProcessingException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | List<Map<String, String>> mapList = new ArrayList<>(); |
| | | |
| | | for (Map<String, String> map : ivrTaskMap.values()) { |
| | | mapList.add(map); |
| | | } |
| | | |
| | | //å°æ¨¡æ¿é®é¢è¯æ¯éçéé
ç¬¦æ¿æ¢ |
| | | for (SvyLibTemplateScriptVO svyLibTemplateScriptVO : svyLibTemplateScriptVOS) { |
| | | if (StringUtils.isNotEmpty(svyLibTemplateScriptVO.getScriptContent())) { |
| | | for (Map<String, String> map : mapList) { |
| | | for (String key : map.keySet()) { |
| | | |
| | | svyLibTemplateScriptVO.setScriptContent(svyLibTemplateScriptVO.getScriptContent().replace(key, StringUtils.isNotEmpty(map.get(key)) ? map.get(key) : "")); |
| | | } |
| | | } |
| | | //æ¿æ¢æ£è
ä¸ªäººä¿¡æ¯æ°æ® |
| | | svyLibTemplateScriptVO.setScriptContent(svyLibTemplateScriptVO.getScriptContent().replace("${name}", StringUtils.isNotEmpty(patArchive.getName()) ? patArchive.getName() : "")); |
| | | svyLibTemplateScriptVO.setScriptContent(svyLibTemplateScriptVO.getScriptContent().replace("${dzz}", StringUtils.isNotEmpty(patArchive.getPlaceOfResidence()) ? patArchive.getPlaceOfResidence() : "")); |
| | | svyLibTemplateScriptVO.setScriptContent(svyLibTemplateScriptVO.getScriptContent().replace("${dhh}", StringUtils.isNotEmpty(patArchive.getTelcode()) ? patArchive.getTelcode() : "")); |
| | | |
| | | //è·åé®é¢é项 |
| | | SvyLibTemplateTargetoption svyLibTemplateTargetoption = new SvyLibTemplateTargetoption(); |
| | | svyLibTemplateTargetoption.setScriptid(svyLibTemplateScriptVO.getId()); |
| | | List<SvyLibTemplateTargetoption> svyLibTemplateTargetoptions = svyLibTemplateTargetoptionMapper.selectSvyLibTemplateTargetoptionList(svyLibTemplateTargetoption); |
| | | svyLibTemplateScriptVO.setSvyLibTemplateTargetoptions(svyLibTemplateTargetoptions); |
| | | } |
| | | } |
| | | return svyLibTemplateScriptVOS; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.service.impl; |
| | | |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.smartor.domain.SvyTaskAnswer; |
| | | import com.smartor.mapper.SvyTaskAnswerMapper; |
| | | import com.smartor.service.ISvyTaskAnswerService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ä»»å¡é®å·é®é¢é项Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author ruoyi |
| | | * @date 2024-06-27 |
| | | */ |
| | | @Service |
| | | public class SvyTaskAnswerServiceImpl implements ISvyTaskAnswerService |
| | | { |
| | | @Autowired |
| | | private SvyTaskAnswerMapper svyTaskAnswerMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢ä»»å¡é®å·é®é¢é项 |
| | | * |
| | | * @param id ä»»å¡é®å·é®é¢éé¡¹ä¸»é® |
| | | * @return ä»»å¡é®å·é®é¢é项 |
| | | */ |
| | | @Override |
| | | public SvyTaskAnswer selectSvyTaskAnswerById(Long id) |
| | | { |
| | | return svyTaskAnswerMapper.selectSvyTaskAnswerById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ä»»å¡é®å·é®é¢é项å表 |
| | | * |
| | | * @param svyTaskAnswer ä»»å¡é®å·é®é¢é项 |
| | | * @return ä»»å¡é®å·é®é¢é项 |
| | | */ |
| | | @Override |
| | | public List<SvyTaskAnswer> selectSvyTaskAnswerList(SvyTaskAnswer svyTaskAnswer) |
| | | { |
| | | return svyTaskAnswerMapper.selectSvyTaskAnswerList(svyTaskAnswer); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ä»»å¡é®å·é®é¢é项 |
| | | * |
| | | * @param svyTaskAnswer ä»»å¡é®å·é®é¢é项 |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertSvyTaskAnswer(SvyTaskAnswer svyTaskAnswer) |
| | | { |
| | | svyTaskAnswer.setCreateTime(DateUtils.getNowDate()); |
| | | return svyTaskAnswerMapper.insertSvyTaskAnswer(svyTaskAnswer); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ä»»å¡é®å·é®é¢é项 |
| | | * |
| | | * @param svyTaskAnswer ä»»å¡é®å·é®é¢é项 |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateSvyTaskAnswer(SvyTaskAnswer svyTaskAnswer) |
| | | { |
| | | svyTaskAnswer.setUpdateTime(DateUtils.getNowDate()); |
| | | return svyTaskAnswerMapper.updateSvyTaskAnswer(svyTaskAnswer); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ä»»å¡é®å·é®é¢é项 |
| | | * |
| | | * @param ids éè¦å é¤çä»»å¡é®å·é®é¢éé¡¹ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteSvyTaskAnswerByIds(Long[] ids) |
| | | { |
| | | return svyTaskAnswerMapper.deleteSvyTaskAnswerByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ä»»å¡é®å·é®é¢éé¡¹ä¿¡æ¯ |
| | | * |
| | | * @param id ä»»å¡é®å·é®é¢éé¡¹ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteSvyTaskAnswerById(Long id) |
| | | { |
| | | return svyTaskAnswerMapper.deleteSvyTaskAnswerById(id); |
| | | } |
| | | } |
| | |
| | | package com.smartor.service.impl; |
| | | |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.smartor.domain.SvyTask; |
| | | import com.smartor.mapper.SvyTaskMapper; |
| | | import com.ruoyi.common.utils.DtoConversionUtils; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.mapper.*; |
| | | import com.smartor.service.ISvyTaskService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 综åé®å·ä»»å¡ï¼ä»»å¡ï¼Serviceä¸å¡å±å¤ç |
| | |
| | | * @author ruoyi |
| | | * @date 2024-06-12 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class SvyTaskServiceImpl implements ISvyTaskService |
| | | { |
| | | public class SvyTaskServiceImpl implements ISvyTaskService { |
| | | @Autowired |
| | | private SvyTaskMapper svyTaskMapper; |
| | | |
| | | @Autowired |
| | | private SvyLibTemplateScriptMapper svyLibTemplateScriptMapper; |
| | | |
| | | @Autowired |
| | | private SvyLibTemplateTargetoptionMapper svyLibTemplateTargetoptionMapper; |
| | | |
| | | @Autowired |
| | | private SvyTaskSingleMapper svyTaskSingleMapper; |
| | | |
| | | @Autowired |
| | | private PatArchiveMapper patArchiveMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢ç»¼åé®å·ä»»å¡ï¼ä»»å¡ï¼ |
| | |
| | | * @return 综åé®å·ä»»å¡ï¼ä»»å¡ï¼ |
| | | */ |
| | | @Override |
| | | public SvyTask selectSvyTaskByTaskid(Long taskid) |
| | | { |
| | | public SvyTask selectSvyTaskByTaskid(Long taskid) { |
| | | return svyTaskMapper.selectSvyTaskByTaskid(taskid); |
| | | } |
| | | |
| | |
| | | * @return 综åé®å·ä»»å¡ï¼ä»»å¡ï¼ |
| | | */ |
| | | @Override |
| | | public List<SvyTask> selectSvyTaskList(SvyTask svyTask) |
| | | { |
| | | public List<SvyTask> selectSvyTaskList(SvyTask svyTask) { |
| | | return svyTaskMapper.selectSvyTaskList(svyTask); |
| | | } |
| | | |
| | |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertSvyTask(SvyTask svyTask) |
| | | { |
| | | public int insertSvyTask(SvyTask svyTask) { |
| | | svyTask.setCreateTime(DateUtils.getNowDate()); |
| | | return svyTaskMapper.insertSvyTask(svyTask); |
| | | } |
| | |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateSvyTask(SvyTask svyTask) |
| | | { |
| | | public int updateSvyTask(SvyTask svyTask) { |
| | | svyTask.setUpdateTime(DateUtils.getNowDate()); |
| | | return svyTaskMapper.updateSvyTask(svyTask); |
| | | } |
| | |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteSvyTaskByTaskids(Long[] taskids) |
| | | { |
| | | public int deleteSvyTaskByTaskids(Long[] taskids) { |
| | | return svyTaskMapper.deleteSvyTaskByTaskids(taskids); |
| | | } |
| | | |
| | |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteSvyTaskByTaskid(Long taskid) |
| | | { |
| | | public int deleteSvyTaskByTaskid(Long taskid) { |
| | | return svyTaskMapper.deleteSvyTaskByTaskid(taskid); |
| | | } |
| | | |
| | | @Override |
| | | public List<SvyLibTemplateScriptVO> getScriptInfoByCondition(Long taskid, Long patid) { |
| | | //éè¿ä»»å¡IDè·å模æ¿ID |
| | | SvyTask svyTask = selectSvyTaskByTaskid(taskid); |
| | | |
| | | //éè¿æ¨¡æ¿IDè·åé®é¢ä¿¡æ¯ |
| | | SvyLibTemplateScript svyLibTemplateScript = new SvyLibTemplateScript(); |
| | | svyLibTemplateScript.setSvyid(Long.valueOf(svyTask.getTemplateid())); |
| | | svyLibTemplateScript.setDelFlag("0"); |
| | | List<SvyLibTemplateScript> svyLibTemplateScripts = svyLibTemplateScriptMapper.selectSvyLibTemplateScriptList(svyLibTemplateScript); |
| | | if (CollectionUtils.isEmpty(svyLibTemplateScripts) || svyLibTemplateScripts.size() == 0) { |
| | | log.info("ivrLibaTemplateScripts为空äºï¼è¯·å°½å¿«è系管çåå¤ç"); |
| | | return new ArrayList<>(); |
| | | } |
| | | List<SvyLibTemplateScriptVO> svyLibTemplateScriptVOS = DtoConversionUtils.sourceToTarget(svyLibTemplateScripts, SvyLibTemplateScriptVO.class); |
| | | |
| | | //è·åæ£è
ä¿¡æ¯ |
| | | PatArchive patArchive = patArchiveMapper.selectPatArchiveByPatid(patid); |
| | | |
| | | //éè¿æ£è
ä¿¡æ¯åä»»å¡ä¿¡æ¯ä¸çtextParam对é®é¢ä¸çåéè¿è¡å¡«å
|
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | Map<String, Map<String, String>> ivrTaskMap = null; |
| | | try { |
| | | ivrTaskMap = objectMapper.readValue(svyTask.getTextParam(), Map.class); |
| | | } catch (JsonProcessingException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | List<Map<String, String>> mapList = new ArrayList<>(); |
| | | |
| | | for (Map<String, String> map : ivrTaskMap.values()) { |
| | | mapList.add(map); |
| | | } |
| | | |
| | | //å°æ¨¡æ¿é®é¢è¯æ¯éçéé
ç¬¦æ¿æ¢ |
| | | for (SvyLibTemplateScriptVO svyLibTemplateScriptVO : svyLibTemplateScriptVOS) { |
| | | if (StringUtils.isNotEmpty(svyLibTemplateScriptVO.getScriptContent())) { |
| | | for (Map<String, String> map : mapList) { |
| | | for (String key : map.keySet()) { |
| | | |
| | | svyLibTemplateScriptVO.setScriptContent(svyLibTemplateScriptVO.getScriptContent().replace(key, StringUtils.isNotEmpty(map.get(key)) ? map.get(key) : "")); |
| | | } |
| | | } |
| | | //æ¿æ¢æ£è
ä¸ªäººä¿¡æ¯æ°æ® |
| | | svyLibTemplateScriptVO.setScriptContent(svyLibTemplateScriptVO.getScriptContent().replace("${name}", StringUtils.isNotEmpty(patArchive.getName()) ? patArchive.getName() : "")); |
| | | svyLibTemplateScriptVO.setScriptContent(svyLibTemplateScriptVO.getScriptContent().replace("${dzz}", StringUtils.isNotEmpty(patArchive.getPlaceOfResidence()) ? patArchive.getPlaceOfResidence() : "")); |
| | | svyLibTemplateScriptVO.setScriptContent(svyLibTemplateScriptVO.getScriptContent().replace("${dhh}", StringUtils.isNotEmpty(patArchive.getTelcode()) ? patArchive.getTelcode() : "")); |
| | | |
| | | //è·åé®é¢é项 |
| | | SvyLibTemplateTargetoption svyLibTemplateTargetoption = new SvyLibTemplateTargetoption(); |
| | | svyLibTemplateTargetoption.setScriptid(svyLibTemplateScriptVO.getId()); |
| | | List<SvyLibTemplateTargetoption> svyLibTemplateTargetoptions = svyLibTemplateTargetoptionMapper.selectSvyLibTemplateTargetoptionList(svyLibTemplateTargetoption); |
| | | svyLibTemplateScriptVO.setSvyLibTemplateTargetoptions(svyLibTemplateTargetoptions); |
| | | } |
| | | } |
| | | |
| | | //åªè¦æå¼äºé¡µé¢å°±ç®æå |
| | | SvyTaskSingle svyTaskSingle = new SvyTaskSingle(); |
| | | svyTaskSingle.setTaskid(taskid); |
| | | svyTaskSingle.setPatid(patid); |
| | | svyTaskSingle.setResult("success"); |
| | | svyTaskSingle.setFinishtime(new Date()); |
| | | svyTaskSingleMapper.updateSvyTaskSingle(svyTaskSingle); |
| | | |
| | | return svyLibTemplateScriptVOS; |
| | | } |
| | | } |
| | |
| | | svyTaskSingle.setAddr(patTaskRelevance.getAddr()); |
| | | svyTaskSingle.setPatid(patTaskRelevance.getPatid()); |
| | | svyTaskSingle.setSendstate(1L); |
| | | svyTaskSingle.setHospType(patTaskRelevance.getHospType()); |
| | | svyTaskSingle.setCreateTime(DateUtils.getNowDate()); |
| | | svyTaskSingleMapper.insertSvyTaskSingle(svyTaskSingle); |
| | | integer = svyTaskSingle.getId().intValue(); |
| | |
| | | svyTaskSingle.setPhone(patTaskRelevance.getPhone()); |
| | | svyTaskSingle.setAddr(patTaskRelevance.getAddr()); |
| | | svyTaskSingle.setPatid(patTaskRelevance.getPatid()); |
| | | svyTaskSingle.setHospType(patTaskRelevance.getHospType()); |
| | | svyTaskSingle.setCreateTime(DateUtils.getNowDate()); |
| | | svyTaskSingle.setTextParam(new Gson().toJson(svyTaskVO.getTextParamMap())); |
| | | if (patTaskRelevance.getIsoperation() != null) { |
| | |
| | | patTaskRelevance.setAddr(svyTaskSingle1.getAddr()); |
| | | patTaskRelevance.setDiagname(svyTaskSingle1.getDiagname()); |
| | | patTaskRelevance.setPatid(svyTaskSingle1.getPatid()); |
| | | patTaskRelevance.setSendState(svyTaskSingle1.getSendstate()); |
| | | patTaskRelevances.add(patTaskRelevance); |
| | | } |
| | | if (svyTaskSingle1.getHospType().equals("2")) { |
| | |
| | | patTaskRelevance.setBedNo(svyTaskSingle1.getBedno()); |
| | | patTaskRelevance.setDiagname(svyTaskSingle1.getDiagname()); |
| | | patTaskRelevance.setPatid(svyTaskSingle1.getPatid()); |
| | | patTaskRelevance.setSendState(svyTaskSingle1.getSendstate()); |
| | | patTaskRelevances.add(patTaskRelevance); |
| | | } |
| | | } |
| | |
| | | if (CollectionUtils.isNotEmpty(svyTaskTemplateVO.getSvyTaskTemplateScriptVOS())) { |
| | | log.error("ivrTaskTemplateVO.getIvrTaskTemplateScriptVOList()æ¯å¦ææ°æ®åï¼{}", svyTaskTemplateVO.getSvyTaskTemplateScriptVOS()); |
| | | for (SvyTaskTemplateScriptVO svyTaskTemplateScriptVO : svyTaskTemplateVO.getSvyTaskTemplateScriptVOS()) { |
| | | if (svyTaskTemplateScriptVO.getIsoperation() != null && svyTaskTemplateScriptVO.getIsoperation() == 1 || svyTaskTemplateScriptVO.getIsoperation() == null && svyTaskTemplateScriptVO.getIsoperation() == 1) { |
| | | //æ°å¢ |
| | | SvyTaskTemplateScript svyTaskTemplateScript = DtoConversionUtils.sourceToTarget(svyTaskTemplateScriptVO, SvyTaskTemplateScript.class); |
| | | svyTaskTemplateScript.setTemplateID(svyTaskTemplate.getId()); |
| | | svyTaskTemplateScript.setCreateTime(new Date()); |
| | | svyTaskTemplateScriptMapper.insertSvyTaskTemplateScript(svyTaskTemplateScript); |
| | | svyTaskTemplateScript.setIsoperation(1); |
| | | //对é项ç®è¿è¡å¤ç |
| | | dealOption(svyTaskTemplateScriptVO.getSvyTaskTemplateTargetoptions(), svyTaskTemplateScript, svyTaskTemplate.getId()); |
| | | |
| | | } else if (svyTaskTemplateScriptVO.getIsoperation() != null && svyTaskTemplateScriptVO.getIsoperation() == 2) { |
| | | //ä¿®æ¹ |
| | | SvyTaskTemplateScript svyTaskTemplateScript = DtoConversionUtils.sourceToTarget(svyTaskTemplateScriptVO, SvyTaskTemplateScript.class); |
| | | svyTaskTemplateScript.setTemplateID(svyTaskTemplate.getId()); |
| | | svyTaskTemplateScript.setUpdateTime(new Date()); |
| | | svyTaskTemplateScriptMapper.updateSvyTaskTemplateScript(svyTaskTemplateScript); |
| | | svyTaskTemplateScript.setIsoperation(2); |
| | | //对é项ç®è¿è¡å¤ç |
| | | dealOption(svyTaskTemplateScriptVO.getSvyTaskTemplateTargetoptions(), svyTaskTemplateScript, svyTaskTemplate.getId()); |
| | | |
| | | } else if (svyTaskTemplateScriptVO.getIsoperation() != null && svyTaskTemplateScriptVO.getIsoperation() == 3) { |
| | | //å é¤ |
| | | if (svyTaskTemplateScriptVO.getID() == null) { |
| | | log.info("å é¤å¤±è´¥,模æ¿è¯æ¯id为空"); |
| | | } else { |
| | | svyTaskTemplateScriptVO.setUpdateTime(new Date()); |
| | | svyTaskTemplateScriptMapper.deleteSvyTaskTemplateScriptByID(svyTaskTemplateScriptVO.getID()); |
| | | } |
| | | if (svyTaskTemplateScriptVO.getIsoperation() != null) { |
| | | SvyTaskTemplateScript svyTaskTemplateScript = scriptHandle(svyTaskTemplate, svyTaskTemplateScriptVO, svyTaskTemplateScriptVO.getIsoperation()); |
| | | dealOption(svyTaskTemplateScriptVO.getSvyTaskTemplateTargetoptions(), svyTaskTemplateScript, svyTaskTemplate.getId(), svyTaskTemplateScriptVO.getIsoperation()); |
| | | } else { |
| | | SvyTaskTemplateScript svyTaskTemplateScript = scriptHandle(svyTaskTemplate, svyTaskTemplateScriptVO, svyTaskTemplateVO.getIsoperation()); |
| | | dealOption(svyTaskTemplateScriptVO.getSvyTaskTemplateTargetoptions(), svyTaskTemplateScript, svyTaskTemplate.getId(), svyTaskTemplateVO.getIsoperation()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return i; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | private void dealOption(List<SvyTaskTemplateTargetoption> svyTaskTemplateTargetoptions, SvyTaskTemplateScript svyTaskTemplateScript, Long tmpID) { |
| | | private SvyTaskTemplateScript scriptHandle(SvyTaskTemplate svyTaskTemplate, SvyTaskTemplateScriptVO svyTaskTemplateScriptVO, Integer isoperation) { |
| | | SvyTaskTemplateScript svyTaskTemplateScript = DtoConversionUtils.sourceToTarget(svyTaskTemplateScriptVO, SvyTaskTemplateScript.class); |
| | | if (isoperation == 1) { |
| | | //æ°å¢ |
| | | svyTaskTemplateScript.setTemplateID(svyTaskTemplate.getId()); |
| | | svyTaskTemplateScript.setCreateTime(new Date()); |
| | | svyTaskTemplateScriptMapper.insertSvyTaskTemplateScript(svyTaskTemplateScript); |
| | | svyTaskTemplateScript.setIsoperation(1); |
| | | } else if (isoperation == 2) { |
| | | //ä¿®æ¹ |
| | | svyTaskTemplateScript.setTemplateID(svyTaskTemplate.getId()); |
| | | svyTaskTemplateScript.setUpdateTime(new Date()); |
| | | svyTaskTemplateScriptMapper.updateSvyTaskTemplateScript(svyTaskTemplateScript); |
| | | svyTaskTemplateScript.setIsoperation(2); |
| | | } else if (isoperation == 3) { |
| | | if (svyTaskTemplateScriptVO.getID() == null) { |
| | | log.info("å é¤å¤±è´¥,模æ¿è¯æ¯id为空"); |
| | | } else { |
| | | svyTaskTemplateScriptVO.setUpdateTime(new Date()); |
| | | svyTaskTemplateScriptMapper.deleteSvyTaskTemplateScriptByID(svyTaskTemplateScriptVO.getID()); |
| | | } |
| | | } |
| | | return svyTaskTemplateScript; |
| | | } |
| | | |
| | | private void dealOption(List<SvyTaskTemplateTargetoption> svyTaskTemplateTargetoptions, SvyTaskTemplateScript svyTaskTemplateScript, Long tmpID, Integer isoperation) { |
| | | log.info("svyTaskTemplateScriptçå¼ä¸ºï¼{}", svyTaskTemplateScript); |
| | | Integer lsIsoperation = isoperation; |
| | | //å¯¹æ¨¡æ¿ææ é项è¿è¡å¤ç |
| | | if (CollectionUtils.isNotEmpty(svyTaskTemplateTargetoptions)) { |
| | | for (SvyTaskTemplateTargetoption svyTaskTemplateTargetoption : svyTaskTemplateTargetoptions) { |
| | | if (svyTaskTemplateTargetoption.getIsoperation() != null && svyTaskTemplateTargetoption.getIsoperation() == 1 || svyTaskTemplateTargetoption.getIsoperation() == null && svyTaskTemplateTargetoption.getIsoperation() == 1) { |
| | | // 妿é项æ¬èº«çoperationä¸ä¸ºç©ºï¼å°±ç¨èªå·±ç;ä¸ç¶ï¼å°±ç¨ä¼ è¿æ¥ç |
| | | if (svyTaskTemplateTargetoption.getIsoperation() != null) { |
| | | isoperation = svyTaskTemplateTargetoption.getIsoperation(); |
| | | } else { |
| | | isoperation = lsIsoperation; |
| | | } |
| | | if (isoperation == 1) { |
| | | //æ°å¢ |
| | | svyTaskTemplateTargetoption.setTemplateID(tmpID); |
| | | svyTaskTemplateTargetoption.setScriptid(svyTaskTemplateScript.getID()); |
| | |
| | | if (CollectionUtils.isNotEmpty(svyTaskTemplateTargetoption.getNodynamiccruxs())) |
| | | svyTaskTemplateTargetoption.setNodynamiccruxsJson(JSON.toJSONString(svyTaskTemplateTargetoption.getNodynamiccruxs())); |
| | | svyTaskTemplateTargetoptionMapper.insertSvyTaskTemplateTargetoption(svyTaskTemplateTargetoption); |
| | | } else if (svyTaskTemplateTargetoption.getIsoperation() != null && svyTaskTemplateTargetoption.getIsoperation() == 2) { |
| | | } else if (isoperation == 2) { |
| | | //ä¿®æ¹ |
| | | svyTaskTemplateTargetoption.setTemplateID(tmpID); |
| | | svyTaskTemplateTargetoption.setScriptid(svyTaskTemplateScript.getID()); |
| | |
| | | if (CollectionUtils.isNotEmpty(svyTaskTemplateTargetoption.getNodynamiccruxs())) |
| | | svyTaskTemplateTargetoption.setNodynamiccruxsJson(JSON.toJSONString(svyTaskTemplateTargetoption.getNodynamiccruxs())); |
| | | svyTaskTemplateTargetoptionMapper.updateSvyTaskTemplateTargetoption(svyTaskTemplateTargetoption); |
| | | } else if (svyTaskTemplateTargetoption.getIsoperation() != null && svyTaskTemplateTargetoption.getIsoperation() == 3) { |
| | | } else if (isoperation == 3) { |
| | | //å é¤ |
| | | if (svyTaskTemplateTargetoption.getId() == null) { |
| | | log.info("å é¤å¤±è´¥,æ¨¡æ¿ææ é项id为空"); |
| | |
| | | <result property="libtemplateid" column="libtemplateid"/> |
| | | <result property="libtemplatename" column="libtemplatename"/> |
| | | <result property="recallcount" column="recallcount"/> |
| | | <result property="instruction" column="instruction"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectIvrTaskTemplateVo"> |
| | | select ID, |
| | | taskid, |
| | | recallcount, |
| | | instruction, |
| | | libtemplateid, |
| | | libtemplatename, |
| | | taskname, |
| | |
| | | <if test="recallcount != null">recallcount,</if> |
| | | <if test="libtemplateid != null ">libtemplateid,</if> |
| | | <if test="libtemplatename != null ">libtemplatename,</if> |
| | | <if test="instruction != null ">instruction,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="taskid != null">#{taskid},</if> |
| | |
| | | <if test="recallcount != null">#{recallcount},</if> |
| | | <if test="libtemplateid != null ">#{libtemplateid},</if> |
| | | <if test="libtemplatename != null ">#{libtemplatename},</if> |
| | | <if test="instruction != null ">#{instruction},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="recallcount != null">recallcount = #{recallcount},</if> |
| | | <if test="libtemplateid != null ">libtemplateid = #{libtemplateid},</if> |
| | | <if test="libtemplatename != null ">libtemplatename = #{libtemplatename},</if> |
| | | <if test="instruction != null ">instruction = #{instruction},</if> |
| | | </trim> |
| | | where ID = #{ID} |
| | | </update> |
ÎļþÃû´Ó smartor/src/main/resources/mapper/smartor/IvrTaskSingleMapper.xml ÐÞ¸Ä |
| | |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.smartor.mapper.IvrTaskSingleMapper"> |
| | | <mapper namespace="com.smartor.mapper.ServiceSubtaskMapper"> |
| | | |
| | | <resultMap type="com.smartor.domain.IvrTaskSingle" id="IvrTaskcallResult"> |
| | | <resultMap type="com.smartor.domain.ServiceSubtask" id="ServiceSubtaskResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="sendname" column="sendname"/> |
| | | <result property="phone" column="phone"/> |
| | |
| | | <result property="libtemplateid" column="libtemplateid"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectIvrTaskcallVo"> |
| | | <sql id="selectServiceSubtaskVo"> |
| | | select id, |
| | | hosp_type, |
| | | libtemplateid, |
| | |
| | | deptname, |
| | | stop_state, |
| | | diagname |
| | | from ivr_task_single |
| | | from service_subtask |
| | | </sql> |
| | | |
| | | <select id="selectIvrTaskcallList" parameterType="com.smartor.domain.IvrTaskSingle" resultMap="IvrTaskcallResult"> |
| | | <include refid="selectIvrTaskcallVo"/> |
| | | <select id="selectServiceSubtaskList" parameterType="com.smartor.domain.ServiceSubtask" resultMap="ServiceSubtaskResult"> |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | <if test="sendname != null and sendname != ''">and sendname like concat('%', #{sendname}, '%')</if> |
| | |
| | | order by update_time desc,id desc |
| | | </select> |
| | | |
| | | <select id="selectIvrTaskcallById" parameterType="Long" resultMap="IvrTaskcallResult"> |
| | | <include refid="selectIvrTaskcallVo"/> |
| | | <select id="selectServiceSubtaskById" parameterType="Long" resultMap="ServiceSubtaskResult"> |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertIvrTaskcall" parameterType="com.smartor.domain.IvrTaskSingle" useGeneratedKeys="true" |
| | | <insert id="insertServiceSubtask" parameterType="com.smartor.domain.ServiceSubtask" useGeneratedKeys="true" |
| | | keyProperty="id"> |
| | | insert into ivr_task_single |
| | | insert into service_subtask |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="sendname != null">sendname,</if> |
| | | <if test="phone != null">phone,</if> |
| | |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateIvrTaskcall" parameterType="com.smartor.domain.IvrTaskSingle"> |
| | | update ivr_task_single |
| | | <update id="updateServiceSubtask" parameterType="com.smartor.domain.ServiceSubtask"> |
| | | update service_subtask |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="sendname != null">sendname = #{sendname},</if> |
| | | <if test="phone != null">phone = #{phone},</if> |
| | |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <update id="updateIvrTaskcallByCondition" parameterType="com.smartor.domain.IvrTaskSingle"> |
| | | update ivr_task_single |
| | | <update id="updateServiceSubtaskByCondition" parameterType="com.smartor.domain.ServiceSubtask"> |
| | | update service_subtask |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="sendname != null">sendname = #{sendname},</if> |
| | | <if test="phone != null">phone = #{phone},</if> |
| | |
| | | where patid = #{patid} and taskid = #{taskid} |
| | | </update> |
| | | |
| | | <update id="deleteIvrTaskcallById" parameterType="Long"> |
| | | update ivr_task_single |
| | | <update id="deleteServiceSubtaskById" parameterType="Long"> |
| | | update service_subtask |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | del_flag =1 |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <update id="deleteIvrTaskcallByCondition" > |
| | | update ivr_task_single |
| | | <update id="deleteServiceSubtaskByCondition" > |
| | | update service_subtask |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | del_flag =1 |
| | | </trim> |
| | | where patid = #{patid} and taskid = #{taskid} |
| | | </update> |
| | | |
| | | <select id="getDataByTime" resultMap="IvrTaskcallResult"> |
| | | <select id="getDataByTime" resultMap="ServiceSubtaskResult"> |
| | | |
| | | select id, |
| | | sendname, |
| | |
| | | patid, |
| | | deptname, |
| | | diagname |
| | | FROM ivr_task_single, |
| | | FROM service_subtask, |
| | | JSON_TABLE(send_time_slot, '$[*]' COLUMNS ( |
| | | begantime DATETIME PATH '$.begantime', |
| | | endtime DATETIME PATH '$.endtime' |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.smartor.mapper.ServiceSubtaskRecordMapper"> |
| | | |
| | | <resultMap type="com.smartor.domain.ServiceSubtaskRecord" id="ServiceSubtaskRecordResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="taskid" column="taskid"/> |
| | | <result property="uuid" column="uuid"/> |
| | | <result property="tasktype" column="tasktype"/> |
| | | <result property="preachform" column="preachform"/> |
| | | <result property="recordtype" column="recordtype"/> |
| | | <result property="startTime" column="start_time"/> |
| | | <result property="endTime" column="end_time"/> |
| | | <result property="result" column="result"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="isupload" column="isupload"/> |
| | | <result property="uploadTime" column="upload_time"/> |
| | | <result property="orgid" column="orgid"/> |
| | | <result property="pid" column="pid"/> |
| | | <result property="guid" column="guid"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectServiceSubtaskRecordVo"> |
| | | select id, |
| | | taskid, |
| | | uuid, |
| | | tasktype, |
| | | preachform, |
| | | recordtype, |
| | | start_time, |
| | | end_time, |
| | | result, |
| | | del_flag, |
| | | update_by, |
| | | update_time, |
| | | create_by, |
| | | create_time, |
| | | isupload, |
| | | upload_time, |
| | | orgid, |
| | | pid, |
| | | guid |
| | | from service_subtask_record |
| | | </sql> |
| | | |
| | | <select id="selectServiceSubtaskRecordList" parameterType="com.smartor.domain.ServiceSubtaskRecord" |
| | | resultMap="ServiceSubtaskRecordResult"> |
| | | <include refid="selectServiceSubtaskRecordVo"/> |
| | | <where> |
| | | <if test="taskid != null and taskid != ''">and taskid = #{taskid}</if> |
| | | <if test="uuid != null and uuid != ''">and uuid = #{uuid}</if> |
| | | <if test="tasktype != null and tasktype != ''">and tasktype = #{tasktype}</if> |
| | | <if test="preachform != null and preachform != ''">and preachform = #{preachform}</if> |
| | | <if test="recordtype != null and recordtype != ''">and recordtype = #{recordtype}</if> |
| | | <if test="startTime != null ">and start_time = #{startTime}</if> |
| | | <if test="endTime != null ">and end_time = #{endTime}</if> |
| | | <if test="result != null and result != ''">and result = #{result}</if> |
| | | <if test="isupload != null ">and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | <if test="pid != null ">and pid = #{pid}</if> |
| | | <if test="guid != null and guid != ''">and guid = #{guid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectServiceSubtaskRecordById" parameterType="Long" resultMap="ServiceSubtaskRecordResult"> |
| | | <include refid="selectServiceSubtaskRecordVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertServiceSubtaskRecord" parameterType="com.smartor.domain.ServiceSubtaskRecord"> |
| | | insert into service_subtask_record |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="taskid != null">taskid,</if> |
| | | <if test="uuid != null">uuid,</if> |
| | | <if test="tasktype != null">tasktype,</if> |
| | | <if test="preachform != null">preachform,</if> |
| | | <if test="recordtype != null">recordtype,</if> |
| | | <if test="startTime != null">start_time,</if> |
| | | <if test="endTime != null">end_time,</if> |
| | | <if test="result != null">result,</if> |
| | | <if test="delFlag != null">del_flag,</if> |
| | | <if test="updateBy != null">update_by,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="createBy != null">create_by,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="isupload != null">isupload,</if> |
| | | <if test="uploadTime != null">upload_time,</if> |
| | | <if test="orgid != null">orgid,</if> |
| | | <if test="pid != null">pid,</if> |
| | | <if test="guid != null">guid,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | | <if test="taskid != null">#{taskid},</if> |
| | | <if test="uuid != null">#{uuid},</if> |
| | | <if test="tasktype != null">#{tasktype},</if> |
| | | <if test="preachform != null">#{preachform},</if> |
| | | <if test="recordtype != null">#{recordtype},</if> |
| | | <if test="startTime != null">#{startTime},</if> |
| | | <if test="endTime != null">#{endTime},</if> |
| | | <if test="result != null">#{result},</if> |
| | | <if test="delFlag != null">#{delFlag},</if> |
| | | <if test="updateBy != null">#{updateBy},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="createBy != null">#{createBy},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="isupload != null">#{isupload},</if> |
| | | <if test="uploadTime != null">#{uploadTime},</if> |
| | | <if test="orgid != null">#{orgid},</if> |
| | | <if test="pid != null">#{pid},</if> |
| | | <if test="guid != null">#{guid},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateServiceSubtaskRecord" parameterType="com.smartor.domain.ServiceSubtaskRecord"> |
| | | update service_subtask_record |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="taskid != null">taskid = #{taskid},</if> |
| | | <if test="uuid != null">uuid = #{uuid},</if> |
| | | <if test="tasktype != null">tasktype = #{tasktype},</if> |
| | | <if test="preachform != null">preachform = #{preachform},</if> |
| | | <if test="recordtype != null">recordtype = #{recordtype},</if> |
| | | <if test="startTime != null">start_time = #{startTime},</if> |
| | | <if test="endTime != null">end_time = #{endTime},</if> |
| | | <if test="result != null">result = #{result},</if> |
| | | <if test="delFlag != null">del_flag = #{delFlag},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="createBy != null">create_by = #{createBy},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="isupload != null">isupload = #{isupload},</if> |
| | | <if test="uploadTime != null">upload_time = #{uploadTime},</if> |
| | | <if test="orgid != null">orgid = #{orgid},</if> |
| | | <if test="pid != null">pid = #{pid},</if> |
| | | <if test="guid != null">guid = #{guid},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteServiceSubtaskRecordById" parameterType="Long"> |
| | | delete |
| | | from service_subtask_record |
| | | where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteServiceSubtaskRecordByIds" parameterType="String"> |
| | | delete from service_subtask_record where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |
ÎļþÃû´Ó smartor/src/main/resources/mapper/smartor/IvrTaskMapper.xml ÐÞ¸Ä |
| | |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.smartor.mapper.IvrTaskMapper"> |
| | | <mapper namespace="com.smartor.mapper.ServiceTaskMapper"> |
| | | |
| | | <resultMap type="com.smartor.domain.IvrTask" id="IvrTaskResult"> |
| | | <resultMap type="com.smartor.domain.ServiceTask" id="ServiceTaskResult"> |
| | | <result property="taskid" column="taskid"/> |
| | | <result property="taskName" column="task_name"/> |
| | | <result property="templateid" column="templateid"/> |
| | |
| | | <result property="textParam" column="text_param"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectIvrTaskVo"> |
| | | <sql id="selectServiceTaskVo"> |
| | | select taskid, |
| | | task_name, |
| | | show_date, |
| | |
| | | send_state, |
| | | send_time_slot, |
| | | orgid |
| | | from ivr_task |
| | | from service_task |
| | | </sql> |
| | | |
| | | <select id="selectIvrTaskList" parameterType="com.smartor.domain.IvrTask" resultMap="IvrTaskResult"> |
| | | <include refid="selectIvrTaskVo"/> |
| | | <select id="selectServiceTaskList" parameterType="com.smartor.domain.ServiceTask" resultMap="ServiceTaskResult"> |
| | | <include refid="selectServiceTaskVo"/> |
| | | <where> |
| | | <if test="taskName != null and taskName != ''">and task_name like concat('%', #{taskName}, '%')</if> |
| | | <if test="sendTimeSlot != null and sendTimeSlot != ''">and send_time_slot like concat('%', #{sendTimeSlot}, |
| | |
| | | order by update_time desc,taskid desc |
| | | </select> |
| | | |
| | | <select id="selectIvrTaskByTaskid" parameterType="Long" resultMap="IvrTaskResult"> |
| | | <include refid="selectIvrTaskVo"/> |
| | | <select id="selectServiceTaskByTaskid" parameterType="Long" resultMap="ServiceTaskResult"> |
| | | <include refid="selectServiceTaskVo"/> |
| | | where taskid = #{taskid} |
| | | </select> |
| | | |
| | | <insert id="insertIvrTask" parameterType="com.smartor.domain.IvrTask" useGeneratedKeys="true" |
| | | <insert id="insertServiceTask" parameterType="com.smartor.domain.ServiceTask" useGeneratedKeys="true" |
| | | keyProperty="taskid"> |
| | | insert into ivr_task |
| | | insert into service_task |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="taskName != null">task_name,</if> |
| | | <if test="templateid != null">templateid,</if> |
| | |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateIvrTask" parameterType="com.smartor.domain.IvrTask"> |
| | | update ivr_task |
| | | <update id="updateServiceTask" parameterType="com.smartor.domain.ServiceTask"> |
| | | update service_task |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="taskName != null">task_name = #{taskName},</if> |
| | | <if test="templateid != null">templateid = #{templateid},</if> |
| | |
| | | where taskid = #{taskid} |
| | | </update> |
| | | |
| | | <update id="deleteIvrTaskByTaskid" parameterType="Long"> |
| | | update ivr_task |
| | | <update id="deleteServiceTaskByTaskid" parameterType="Long"> |
| | | update service_task |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | del_flag =1 |
| | | </trim> |
| | | where taskid = #{taskid} |
| | | </update> |
| | | |
| | | <update id="deleteIvrTaskByTaskids" parameterType="String"> |
| | | update ivr_task |
| | | <update id="deleteServiceTaskByTaskids" parameterType="String"> |
| | | update service_task |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | del_flag =1 |
| | | </trim> |
| | |
| | | <result property="oldid" column="oldid"/> |
| | | <result property="svyid" column="svyid"/> |
| | | <result property="scriptType" column="script_type"/> |
| | | <result property="scriptCode" column="script_code"/> |
| | | <result property="script" column="script"/> |
| | | <result property="seqno" column="seqno"/> |
| | | <result property="scriptDesc" column="script_desc"/> |
| | | <result property="tag" column="tag"/> |
| | | <result property="sort" column="sort"/> |
| | | <result property="ismandatory" column="ismandatory"/> |
| | |
| | | <result property="scoretype" column="scoretype"/> |
| | | <result property="score" column="score"/> |
| | | <result property="scriptPicture" column="script_picture"/> |
| | | <result property="topic" column="topic"/> |
| | | <result property="scriptTopic" column="script_topic"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectSvyLibTemplateScriptVo"> |
| | |
| | | oldid, |
| | | svyid, |
| | | script_type, |
| | | script_code, |
| | | script, |
| | | seqno, |
| | | script_desc, |
| | | tag, |
| | | sort, |
| | | ismandatory, |
| | |
| | | script_content, |
| | | suitway, |
| | | script_picture, |
| | | topic, |
| | | script_topic, |
| | | isavailable, language, otherdata, value_type, reply, scoretype, score |
| | | from svy_lib_template_script |
| | | </sql> |
| | |
| | | <if test="oldid != null ">and oldid = #{oldid}</if> |
| | | <if test="svyid != null ">and svyid = #{svyid}</if> |
| | | <if test="scriptType != null and scriptType != ''">and script_type = #{scriptType}</if> |
| | | <if test="scriptCode != null and scriptCode != ''">and script_code = #{scriptCode}</if> |
| | | <if test="script != null and script != ''">and script = #{script}</if> |
| | | <if test="seqno != null and seqno != ''">and seqno = #{seqno}</if> |
| | | <if test="scriptDesc != null and scriptDesc != ''">and script_desc = #{scriptDesc}</if> |
| | | <if test="tag != null and tag != ''">and tag = #{tag}</if> |
| | | <if test="sort != null ">and sort = #{sort}</if> |
| | | <if test="ismandatory != null and ismandatory != ''">and ismandatory = #{ismandatory}</if> |
| | |
| | | <if test="reply != null and reply != ''">and reply = #{reply}</if> |
| | | <if test="scoretype != null and scoretype != ''">and scoretype = #{scoretype}</if> |
| | | <if test="score != null and score != ''">and score = #{score}</if> |
| | | <if test="topic != null and topic != ''">and topic = #{topic}</if> |
| | | <if test="scriptTopic != null and scriptTopic != ''">and script_topic = #{scriptTopic}</if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | <if test="oldid != null">oldid,</if> |
| | | <if test="svyid != null">svyid,</if> |
| | | <if test="scriptType != null">script_type,</if> |
| | | <if test="scriptCode != null">script_code,</if> |
| | | <if test="script != null">script,</if> |
| | | <if test="seqno != null">seqno,</if> |
| | | <if test="scriptDesc != null">script_desc,</if> |
| | | <if test="tag != null">tag,</if> |
| | | <if test="sort != null">sort,</if> |
| | | <if test="ismandatory != null">ismandatory,</if> |
| | |
| | | <if test="scoretype != null">scoretype,</if> |
| | | <if test="score != null">score,</if> |
| | | <if test="scriptPicture != null">script_picture,</if> |
| | | <if test="topic != null">topic,</if> |
| | | <if test="scriptTopic != null">script_topic,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="oldid != null">#{oldid},</if> |
| | | <if test="svyid != null">#{svyid},</if> |
| | | <if test="scriptType != null">#{scriptType},</if> |
| | | <if test="scriptCode != null">#{scriptCode},</if> |
| | | <if test="script != null">#{script},</if> |
| | | <if test="seqno != null">#{seqno},</if> |
| | | <if test="scriptDesc != null">#{scriptDesc},</if> |
| | | <if test="tag != null">#{tag},</if> |
| | | <if test="sort != null">#{sort},</if> |
| | | <if test="ismandatory != null">#{ismandatory},</if> |
| | |
| | | <if test="scoretype != null">#{scoretype},</if> |
| | | <if test="score != null">#{score},</if> |
| | | <if test="scriptPicture != null">#{scriptPicture},</if> |
| | | <if test="topic != null">#{topic},</if> |
| | | <if test="scriptTopic != null">#{scriptTopic},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="oldid != null">oldid = #{oldid},</if> |
| | | <if test="svyid != null">svyid = #{svyid},</if> |
| | | <if test="scriptType != null">script_type = #{scriptType},</if> |
| | | <if test="scriptCode != null">script_code = #{scriptCode},</if> |
| | | <if test="script != null">script = #{script},</if> |
| | | <if test="seqno != null">seqno = #{seqno},</if> |
| | | <if test="scriptDesc != null">script_desc = #{scriptDesc},</if> |
| | | <if test="tag != null">tag = #{tag},</if> |
| | | <if test="sort != null">sort = #{sort},</if> |
| | | <if test="ismandatory != null">ismandatory = #{ismandatory},</if> |
| | |
| | | <if test="scoretype != null">scoretype = #{scoretype},</if> |
| | | <if test="score != null">score = #{score},</if> |
| | | <if test="scriptPicture != null">script_picture = #{scriptPicture},</if> |
| | | <if test="topic != null">topic = #{topic},</if> |
| | | <if test="scriptTopic != null">script_topic = #{scriptTopic},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.smartor.mapper.SvyTaskAnswerMapper"> |
| | | |
| | | <resultMap type="com.smartor.domain.SvyTaskAnswer" id="SvyTaskAnswerResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="taskid" column="taskid"/> |
| | | <result property="singleid" column="singleid"/> |
| | | <result property="scriptid" column="scriptid"/> |
| | | <result property="scriptType" column="script_type"/> |
| | | <result property="score" column="score"/> |
| | | <result property="answer" column="answer"/> |
| | | <result property="comment" column="comment"/> |
| | | <result property="istrack" column="istrack"/> |
| | | <result property="isabnormal" column="isabnormal"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="isupload" column="isupload"/> |
| | | <result property="uploadTime" column="upload_time"/> |
| | | <result property="pid" column="pid"/> |
| | | <result property="guid" column="guid"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectSvyTaskAnswerVo"> |
| | | select id, |
| | | taskid, |
| | | singleid, |
| | | scriptid, |
| | | script_type, |
| | | score, |
| | | answer, |
| | | comment, |
| | | istrack, |
| | | isabnormal, |
| | | del_flag, |
| | | create_by, |
| | | create_time, |
| | | update_by, |
| | | update_time, |
| | | isupload, |
| | | upload_time, |
| | | pid, |
| | | guid |
| | | from svy_task_answer |
| | | </sql> |
| | | |
| | | <select id="selectSvyTaskAnswerList" parameterType="com.smartor.domain.SvyTaskAnswer" |
| | | resultMap="SvyTaskAnswerResult"> |
| | | <include refid="selectSvyTaskAnswerVo"/> |
| | | <where> |
| | | <if test="taskid != null ">and taskid = #{taskid}</if> |
| | | <if test="singleid != null ">and singleid = #{singleid}</if> |
| | | <if test="scriptid != null ">and scriptid = #{scriptid}</if> |
| | | <if test="scriptType != null ">and script_type = #{scriptType}</if> |
| | | <if test="score != null and score != ''">and score = #{score}</if> |
| | | <if test="answer != null and answer != ''">and answer = #{answer}</if> |
| | | <if test="comment != null and comment != ''">and comment = #{comment}</if> |
| | | <if test="istrack != null and istrack != ''">and istrack = #{istrack}</if> |
| | | <if test="isabnormal != null and isabnormal != ''">and isabnormal = #{isabnormal}</if> |
| | | <if test="isupload != null ">and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> |
| | | <if test="pid != null and pid != ''">and pid = #{pid}</if> |
| | | <if test="guid != null and guid != ''">and guid = #{guid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSvyTaskAnswerById" parameterType="Long" resultMap="SvyTaskAnswerResult"> |
| | | <include refid="selectSvyTaskAnswerVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertSvyTaskAnswer" parameterType="com.smartor.domain.SvyTaskAnswer"> |
| | | insert into svy_task_answer |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="taskid != null">taskid,</if> |
| | | <if test="singleid != null">singleid,</if> |
| | | <if test="scriptid != null">scriptid,</if> |
| | | <if test="scriptType != null">script_type,</if> |
| | | <if test="score != null">score,</if> |
| | | <if test="answer != null">answer,</if> |
| | | <if test="comment != null">comment,</if> |
| | | <if test="istrack != null">istrack,</if> |
| | | <if test="isabnormal != null">isabnormal,</if> |
| | | <if test="delFlag != null">del_flag,</if> |
| | | <if test="createBy != null">create_by,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateBy != null">update_by,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="isupload != null">isupload,</if> |
| | | <if test="uploadTime != null">upload_time,</if> |
| | | <if test="pid != null">pid,</if> |
| | | <if test="guid != null">guid,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | | <if test="taskid != null">#{taskid},</if> |
| | | <if test="singleid != null">#{singleid},</if> |
| | | <if test="scriptid != null">#{scriptid},</if> |
| | | <if test="scriptType != null">#{scriptType},</if> |
| | | <if test="score != null">#{score},</if> |
| | | <if test="answer != null">#{answer},</if> |
| | | <if test="comment != null">#{comment},</if> |
| | | <if test="istrack != null">#{istrack},</if> |
| | | <if test="isabnormal != null">#{isabnormal},</if> |
| | | <if test="delFlag != null">#{delFlag},</if> |
| | | <if test="createBy != null">#{createBy},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateBy != null">#{updateBy},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="isupload != null">#{isupload},</if> |
| | | <if test="uploadTime != null">#{uploadTime},</if> |
| | | <if test="pid != null">#{pid},</if> |
| | | <if test="guid != null">#{guid},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateSvyTaskAnswer" parameterType="com.smartor.domain.SvyTaskAnswer"> |
| | | update svy_task_answer |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="taskid != null">taskid = #{taskid},</if> |
| | | <if test="singleid != null">singleid = #{singleid},</if> |
| | | <if test="scriptid != null">scriptid = #{scriptid},</if> |
| | | <if test="scriptType != null">script_type = #{scriptType},</if> |
| | | <if test="score != null">score = #{score},</if> |
| | | <if test="answer != null">answer = #{answer},</if> |
| | | <if test="comment != null">comment = #{comment},</if> |
| | | <if test="istrack != null">istrack = #{istrack},</if> |
| | | <if test="isabnormal != null">isabnormal = #{isabnormal},</if> |
| | | <if test="delFlag != null">del_flag = #{delFlag},</if> |
| | | <if test="createBy != null">create_by = #{createBy},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="isupload != null">isupload = #{isupload},</if> |
| | | <if test="uploadTime != null">upload_time = #{uploadTime},</if> |
| | | <if test="pid != null">pid = #{pid},</if> |
| | | <if test="guid != null">guid = #{guid},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteSvyTaskAnswerById" parameterType="Long"> |
| | | delete |
| | | from svy_task_answer |
| | | where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteSvyTaskAnswerByIds" parameterType="String"> |
| | | delete from svy_task_answer where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |
| | |
| | | <result property="valueType" column="value_type"/> |
| | | <result property="reply" column="reply"/> |
| | | <result property="taskid" column="taskid"/> |
| | | <result property="prologue" column="prologue"/> |
| | | <result property="instruction" column="instruction"/> |
| | | <result property="conclusion" column="conclusion"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectSvyTaskTemplateVo"> |
| | | select id, |
| | | templateid, |
| | | prologue, |
| | | instruction, |
| | | conclusion, |
| | | categoryid, |
| | | svycode, |
| | | svyname, |
| | |
| | | <if test="valueType != null">value_type,</if> |
| | | <if test="reply != null">reply,</if> |
| | | <if test="taskid != null">taskid,</if> |
| | | <if test="prologue != null">prologue,</if> |
| | | <if test="instruction != null">instruction,</if> |
| | | <if test="conclusion != null">conclusion,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="templateid != null">#{templateid},</if> |
| | |
| | | <if test="valueType != null">#{valueType},</if> |
| | | <if test="reply != null">#{reply},</if> |
| | | <if test="taskid != null">#{taskid},</if> |
| | | <if test="prologue != null">#{prologue},</if> |
| | | <if test="instruction != null">#{instruction},</if> |
| | | <if test="conclusion != null">#{conclusion},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="valueType != null">value_type = #{valueType},</if> |
| | | <if test="reply != null">reply = #{reply},</if> |
| | | <if test="taskid != null">taskid = #{taskid},</if> |
| | | <if test="prologue != null">prologue = #{prologue},</if> |
| | | <if test="instruction != null">instruction = #{instruction},</if> |
| | | <if test="conclusion != null">conclusion = #{conclusion},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |