| | |
| | | package com.smartor.service.impl; |
| | | |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.DtoConversionUtils; |
| | | import com.smartor.domain.*; |
| | |
| | | List<IvrLibaScriptTargetoption> ivrLibaScriptTargetoptions = ivrLibaScriptTargetoptionMapper.selectIvrLibaScriptTargetoptionList(ivrLibaScriptTargetoption); |
| | | scriptVO.setIvrLibaScriptTargetoptionList(ivrLibaScriptTargetoptions); |
| | | |
| | | //查询问题指标接口 |
| | | IvrLibaScriptTarget ivrLibaScriptTarget = new IvrLibaScriptTarget(); |
| | | ivrLibaScriptTarget.setScriptid(ivrLibaScripts.get(0).getId()); |
| | | List<IvrLibaScriptTarget> ivrLibaScriptTargets = ivrLibaScriptTargetMapper.selectIvrLibaScriptTargetList(ivrLibaScriptTarget); |
| | | scriptVO.setIvrLibaScriptTargetList(ivrLibaScriptTargets); |
| | | // //查询问题指标接口 |
| | | // IvrLibaScriptTarget ivrLibaScriptTarget = new IvrLibaScriptTarget(); |
| | | // ivrLibaScriptTarget.setScriptid(ivrLibaScripts.get(0).getId()); |
| | | // List<IvrLibaScriptTarget> ivrLibaScriptTargets = ivrLibaScriptTargetMapper.selectIvrLibaScriptTargetList(ivrLibaScriptTarget); |
| | | // scriptVO.setIvrLibaScriptTargetList(ivrLibaScriptTargets); |
| | | |
| | | return scriptVO; |
| | | } |
| | |
| | | i = ivrLibaScriptMapper.updateIvrLibaScript(ivrLibaScript); |
| | | } |
| | | log.info("问题表对应的id为:{}", ivrLibaScript.getId()); |
| | | |
| | | //对问题指标进行处理 |
| | | if (CollectionUtils.isNotEmpty(ivrLibaScriptVO.getIvrLibaScriptTargetList())) { |
| | | for (IvrLibaScriptTarget ivrLibaScriptTarget : ivrLibaScriptVO.getIvrLibaScriptTargetList()) { |
| | | if (ivrLibaScriptTarget.getIsoperation() != null && ivrLibaScriptTarget.getIsoperation() == 1) { |
| | | //新增 |
| | | ivrLibaScriptTarget.setScriptid(ivrLibaScript.getId()); |
| | | ivrLibaScriptTargetMapper.insertIvrLibaScriptTarget(ivrLibaScriptTarget); |
| | | } else if (ivrLibaScriptTarget.getIsoperation() != null && ivrLibaScriptTarget.getIsoperation() == 2) { |
| | | //修改 |
| | | ivrLibaScriptTarget.setScriptid(ivrLibaScript.getId()); |
| | | ivrLibaScriptTargetMapper.updateIvrLibaScriptTarget(ivrLibaScriptTarget); |
| | | } else if (ivrLibaScriptTarget.getIsoperation() != null && ivrLibaScriptTarget.getIsoperation() == 3) { |
| | | //删除 |
| | | if (ivrLibaScriptTarget.getId() == null) { |
| | | log.info("删除失败,问题指标id为空"); |
| | | } else { |
| | | ivrLibaScriptTargetMapper.deleteIvrLibaScriptTargetByQuestionTargetID(ivrLibaScriptTarget.getId()); |
| | | } |
| | | } |
| | | } |
| | | if (ivrLibaScript.getId() == null) { |
| | | throw new BaseException("话术ID为空,请检查话术入参信息是否完整"); |
| | | } |
| | | // //对问题指标进行处理 |
| | | // if (CollectionUtils.isNotEmpty(ivrLibaScriptVO.getIvrLibaScriptTargetList())) { |
| | | // for (IvrLibaScriptTarget ivrLibaScriptTarget : ivrLibaScriptVO.getIvrLibaScriptTargetList()) { |
| | | // if (ivrLibaScriptTarget.getIsoperation() != null && ivrLibaScriptTarget.getIsoperation() == 1) { |
| | | // //新增 |
| | | // ivrLibaScriptTarget.setScriptid(ivrLibaScript.getId()); |
| | | // ivrLibaScriptTargetMapper.insertIvrLibaScriptTarget(ivrLibaScriptTarget); |
| | | // } else if (ivrLibaScriptTarget.getIsoperation() != null && ivrLibaScriptTarget.getIsoperation() == 2) { |
| | | // //修改 |
| | | // ivrLibaScriptTarget.setScriptid(ivrLibaScript.getId()); |
| | | // ivrLibaScriptTargetMapper.updateIvrLibaScriptTarget(ivrLibaScriptTarget); |
| | | // } else if (ivrLibaScriptTarget.getIsoperation() != null && ivrLibaScriptTarget.getIsoperation() == 3) { |
| | | // //删除 |
| | | // if (ivrLibaScriptTarget.getId() == null) { |
| | | // log.info("删除失败,问题指标id为空"); |
| | | // } else { |
| | | // ivrLibaScriptTargetMapper.deleteIvrLibaScriptTargetByQuestionTargetID(ivrLibaScriptTarget.getId()); |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | //对问题指标选项进行处理 |
| | | if (CollectionUtils.isNotEmpty(ivrLibaScriptVO.getIvrLibaScriptTargetoptionList())) { |