liusheng
2024-06-05 01bbc8f0563b33dd5ce6d59f76c3bae9931615dd
代码提交
已添加1个文件
已修改12个文件
920 ■■■■■ 文件已修改
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrTaskController.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrTaskSingleController.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrTaskcalldetailController.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrTaskcalldetail.java 494 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrTaskcalldetailReq.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/IIvrTaskService.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/IIvrTaskSingleService.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/IIvrTaskcalldetailService.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/IvrTaskServiceImpl.java 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/IvrTaskSingleServiceImpl.java 98 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/IvrTaskcalldetailServiceImpl.java 76 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/IvrTaskcalldetailMapper.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrTaskController.java
@@ -12,10 +12,7 @@
import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.common.utils.RSAPublicKeyExample;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.smartor.domain.IvrTask;
import com.smartor.domain.IvrTaskScriptQues;
import com.smartor.domain.IvrTaskVO;
import com.smartor.domain.IvrTaskSingle;
import com.smartor.domain.*;
import com.smartor.service.IIvrTaskService;
import com.smartor.service.IIvrTaskSingleService;
import io.swagger.annotations.Api;
@@ -178,4 +175,13 @@
        return getDataTable(ivrTaskService.getScriptInfoByCondition(tid, pid));
    }
    /**
     * ä»»åŠ¡çš„å‘é€æ‰§è¡Œã€æš‚åœã€ç»ˆæ­¢
     */
    @ApiOperation("任务的发送执行、暂停、终止")
    @PostMapping("/taskSend")
    public AjaxResult taskSend(@RequestBody SendTaskVO sendTaskVO) {
        return toAjax(ivrTaskService.taskSend(sendTaskVO));
    }
}
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrTaskSingleController.java
@@ -98,15 +98,6 @@
    }
    /**
     * ä»»åŠ¡çš„å‘é€æ‰§è¡Œã€æš‚åœã€ç»ˆæ­¢
     */
    @ApiOperation("任务的发送执行、暂停、终止")
    @PostMapping("/taskSend")
    public AjaxResult taskSend(@RequestBody SendTaskVO sendTaskVO) {
        return toAjax(ivrTaskcallService.heTaskSend(sendTaskVO));
    }
    /**
     * ç”µè¯å›žè°ƒä»»åŠ¡(上海)
     */
    @ApiOperation("电话回调任务")
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrTaskcalldetailController.java
@@ -2,6 +2,10 @@
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;
@@ -23,14 +27,13 @@
/**
 * è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†Controller
 *
 *
 * @author smartor
 * @date 2023-03-24
 */
@RestController
@RequestMapping("/smartor/ivrtaskcalldetail")
public class IvrTaskcalldetailController extends BaseController
{
public class IvrTaskcalldetailController extends BaseController {
    @Autowired
    private IIvrTaskcalldetailService ivrTaskcalldetailService;
@@ -38,9 +41,8 @@
     * æŸ¥è¯¢è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†åˆ—è¡¨
     */
    @PreAuthorize("@ss.hasPermi('smartor:ivrtaskcalldetail:list')")
   @PostMapping("/list")
    public TableDataInfo list(@RequestBody IvrTaskcalldetail ivrTaskcalldetail)
    {
    @PostMapping("/list")
    public TableDataInfo list(@RequestBody IvrTaskcalldetail ivrTaskcalldetail) {
        startPage();
        List<IvrTaskcalldetail> list = ivrTaskcalldetailService.selectIvrTaskcalldetailList(ivrTaskcalldetail);
        return getDataTable(list);
@@ -52,8 +54,7 @@
    @PreAuthorize("@ss.hasPermi('smartor:ivrtaskcalldetail:export')")
    @Log(title = "语音任务呼叫明细", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, IvrTaskcalldetail ivrTaskcalldetail)
    {
    public void export(HttpServletResponse response, IvrTaskcalldetail ivrTaskcalldetail) {
        List<IvrTaskcalldetail> list = ivrTaskcalldetailService.selectIvrTaskcalldetailList(ivrTaskcalldetail);
        ExcelUtil<IvrTaskcalldetail> util = new ExcelUtil<IvrTaskcalldetail>(IvrTaskcalldetail.class);
        util.exportExcel(response, list, "语音任务呼叫明细数据");
@@ -64,8 +65,7 @@
     */
    @PreAuthorize("@ss.hasPermi('smartor:ivrtaskcalldetail:query')")
    @GetMapping(value = "/{calldetailid}")
    public AjaxResult getInfo(@PathVariable("calldetailid") String calldetailid)
    {
    public AjaxResult getInfo(@PathVariable("calldetailid") String calldetailid) {
        return success(ivrTaskcalldetailService.selectIvrTaskcalldetailByCalldetailid(calldetailid));
    }
@@ -75,8 +75,7 @@
    @PreAuthorize("@ss.hasPermi('smartor:ivrtaskcalldetail:add')")
    @Log(title = "语音任务呼叫明细", businessType = BusinessType.INSERT)
    @PostMapping("/add")
    public AjaxResult add(@RequestBody IvrTaskcalldetail ivrTaskcalldetail)
    {
    public AjaxResult add(@RequestBody IvrTaskcalldetail ivrTaskcalldetail) {
        return toAjax(ivrTaskcalldetailService.insertIvrTaskcalldetail(ivrTaskcalldetail));
    }
@@ -86,8 +85,7 @@
    @PreAuthorize("@ss.hasPermi('smartor:ivrtaskcalldetail:edit')")
    @Log(title = "语音任务呼叫明细", businessType = BusinessType.UPDATE)
    @PostMapping("/edit")
    public AjaxResult edit(@RequestBody IvrTaskcalldetail ivrTaskcalldetail)
    {
    public AjaxResult edit(@RequestBody IvrTaskcalldetail ivrTaskcalldetail) {
        return toAjax(ivrTaskcalldetailService.updateIvrTaskcalldetail(ivrTaskcalldetail));
    }
@@ -96,9 +94,19 @@
     */
    @PreAuthorize("@ss.hasPermi('smartor:ivrtaskcalldetail:remove')")
    @Log(title = "语音任务呼叫明细", businessType = BusinessType.DELETE)
    @GetMapping("/remove/{calldetailids}")
    public AjaxResult remove(@PathVariable String[] calldetailids)
    {
    @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-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
@@ -108,7 +108,7 @@
                // è¿‡æ»¤è¯·æ±‚
                .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").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/ivrtask/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()
                // é™¤ä¸Šé¢å¤–的所有请求全部需要鉴权认证
smartor/src/main/java/com/smartor/domain/IvrTaskcalldetail.java
@@ -1,7 +1,11 @@
package com.smartor.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
@@ -9,526 +13,138 @@
/**
 * è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†å¯¹è±¡ ivr_taskcalldetail
 *
 *
 * @author smartor
 * @date 2023-03-24
 */
public class IvrTaskcalldetail extends BaseEntity
{
@Data
@ApiModel(value = "IvrTaskcalldetail", description = "问题回答明细")
public class IvrTaskcalldetail extends BaseEntity {
    private static final long serialVersionUID = 1L;
    /**    */
    @ApiModelProperty(value = "主键")
    private String calldetailid;
    /**    */
    @Excel(name = "  ")
    @ApiModelProperty(value = "tasksingleid")
    private String callid;
    /**    */
    @Excel(name = "  ")
    @ApiModelProperty(value = "拨号uuid")
    private String uuid;
    /**    */
    @Excel(name = "  ")
    @ApiModelProperty(value = "电话号码")
    private String phone;
    /**    */
    @Excel(name = "  ")
    @ApiModelProperty(value = "操作人 ")
    private String operate;
    /**    */
    @Excel(name = "  ")
    @ApiModelProperty(value = "显示号码")
    private String displayno;
    /**    */
    @Excel(name = "  ")
    @ApiModelProperty(value = "")
    private Long inbound;
    /**    */
    @Excel(name = "  ")
    @ApiModelProperty(value = "")
    private Long incoming;
    /**    */
    @Excel(name = "  ")
    @ApiModelProperty(value = "")
    private Long assigntime;
    /**    */
    @Excel(name = "  ")
    @ApiModelProperty(value = "开始时间")
    private Long starttime;
    /**    */
    @Excel(name = "  ")
    @ApiModelProperty(value = "回答时间")
    private Long answertime;
    /**    */
    @Excel(name = "  ")
    @ApiModelProperty(value = "")
    private Long silent;
    /**    */
    @Excel(name = "  ")
    @ApiModelProperty(value = "")
    private String dtmfKey;
    /**    */
    @Excel(name = "  ")
    @ApiModelProperty(value = "音乐路径")
    private String musicpath;
    /**    */
    @Excel(name = "  ")
    @ApiModelProperty(value = "发送索引")
    private Long sentIndex;
    /**    */
    @Excel(name = "  ")
    @ApiModelProperty(value = "发送开始状态")
    private Long sentBegin;
    /**    */
    @Excel(name = "  ")
    @ApiModelProperty(value = "回答结果")
    private String asrtext;
    /**    */
    @Excel(name = "  ")
    @ApiModelProperty(value = "开始时间")
    private Long beginTime;
    /**    */
    @Excel(name = "  ")
    @ApiModelProperty(value = "结束时间")
    private Long endTime;
    /**    */
    @Excel(name = "  ")
    @ApiModelProperty(value = "发送结束状态")
    private Long sentEnd;
    /**    */
    @Excel(name = "  ")
    @ApiModelProperty(value = "提交路径")
    private String recordpath;
    /**    */
    @Excel(name = "  ")
    @ApiModelProperty(value = "提交URL")
    private String recordurl;
    /**    */
    @Excel(name = "  ")
    @ApiModelProperty(value = "模板ID")
    private String templateid;
    /**    */
    @Excel(name = "  ")
    @ApiModelProperty(value = "模板问题编号")
    private Long templatequestionnum;
    /**    */
    @Excel(name = "  ")
    @ApiModelProperty(value = "交换机ID")
    private Long switchid;
    /**    */
    @Excel(name = "  ")
    @ApiModelProperty(value = "问题文本")
    private String questiontext;
    /**    */
    @Excel(name = "  ")
    @ApiModelProperty(value = "问题语音")
    private String questionvoice;
    /**    */
    @Excel(name = "  ")
    @ApiModelProperty(value = "类别")
    private String categoryname;
    /**    */
    @Excel(name = "  ")
    @ApiModelProperty(value = "指标选项")
    private String targetoptions;
    /**    */
    @Excel(name = "  ")
    @ApiModelProperty(value = "指标值(正则匹配的选项值)")
    private String targetvalue;
    /**    */
    @Excel(name = "  ")
    @ApiModelProperty(value = "通过正则解析的值")
    private String matchedtext;
    /**    */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "  ", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "添加时间")
    private Date addtime;
    /**  ä¸Šä¼ æ ‡è®°  */
    @Excel(name = " ä¸Šä¼ æ ‡è®° ")
    @ApiModelProperty(value = "上传标记")
    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;
    /**  åˆ é™¤æ ‡è®°  */
    @ApiModelProperty(value = "删除标记")
    private String delFlag;
    public void setCalldetailid(String calldetailid)
    {
        this.calldetailid = calldetailid;
    }
    @ApiModelProperty(value = "问题类型")
    private String valueType;
    public String getCalldetailid()
    {
        return calldetailid;
    }
    public void setCallid(String callid)
    {
        this.callid = callid;
    }
    public String getCallid()
    {
        return callid;
    }
    public void setUuid(String uuid)
    {
        this.uuid = uuid;
    }
    public String getUuid()
    {
        return uuid;
    }
    public void setPhone(String phone)
    {
        this.phone = phone;
    }
    public String getPhone()
    {
        return phone;
    }
    public void setOperate(String operate)
    {
        this.operate = operate;
    }
    public String getOperate()
    {
        return operate;
    }
    public void setDisplayno(String displayno)
    {
        this.displayno = displayno;
    }
    public String getDisplayno()
    {
        return displayno;
    }
    public void setInbound(Long inbound)
    {
        this.inbound = inbound;
    }
    public Long getInbound()
    {
        return inbound;
    }
    public void setIncoming(Long incoming)
    {
        this.incoming = incoming;
    }
    public Long getIncoming()
    {
        return incoming;
    }
    public void setAssigntime(Long assigntime)
    {
        this.assigntime = assigntime;
    }
    public Long getAssigntime()
    {
        return assigntime;
    }
    public void setStarttime(Long starttime)
    {
        this.starttime = starttime;
    }
    public Long getStarttime()
    {
        return starttime;
    }
    public void setAnswertime(Long answertime)
    {
        this.answertime = answertime;
    }
    public Long getAnswertime()
    {
        return answertime;
    }
    public void setSilent(Long silent)
    {
        this.silent = silent;
    }
    public Long getSilent()
    {
        return silent;
    }
    public void setDtmfKey(String dtmfKey)
    {
        this.dtmfKey = dtmfKey;
    }
    public String getDtmfKey()
    {
        return dtmfKey;
    }
    public void setMusicpath(String musicpath)
    {
        this.musicpath = musicpath;
    }
    public String getMusicpath()
    {
        return musicpath;
    }
    public void setSentIndex(Long sentIndex)
    {
        this.sentIndex = sentIndex;
    }
    public Long getSentIndex()
    {
        return sentIndex;
    }
    public void setSentBegin(Long sentBegin)
    {
        this.sentBegin = sentBegin;
    }
    public Long getSentBegin()
    {
        return sentBegin;
    }
    public void setAsrtext(String asrtext)
    {
        this.asrtext = asrtext;
    }
    public String getAsrtext()
    {
        return asrtext;
    }
    public void setBeginTime(Long beginTime)
    {
        this.beginTime = beginTime;
    }
    public Long getBeginTime()
    {
        return beginTime;
    }
    public void setEndTime(Long endTime)
    {
        this.endTime = endTime;
    }
    public Long getEndTime()
    {
        return endTime;
    }
    public void setSentEnd(Long sentEnd)
    {
        this.sentEnd = sentEnd;
    }
    public Long getSentEnd()
    {
        return sentEnd;
    }
    public void setRecordpath(String recordpath)
    {
        this.recordpath = recordpath;
    }
    public String getRecordpath()
    {
        return recordpath;
    }
    public void setRecordurl(String recordurl)
    {
        this.recordurl = recordurl;
    }
    public String getRecordurl()
    {
        return recordurl;
    }
    public void setTemplateid(String templateid)
    {
        this.templateid = templateid;
    }
    public String getTemplateid()
    {
        return templateid;
    }
    public void setTemplatequestionnum(Long templatequestionnum)
    {
        this.templatequestionnum = templatequestionnum;
    }
    public Long getTemplatequestionnum()
    {
        return templatequestionnum;
    }
    public void setSwitchid(Long switchid)
    {
        this.switchid = switchid;
    }
    public Long getSwitchid()
    {
        return switchid;
    }
    public void setQuestiontext(String questiontext)
    {
        this.questiontext = questiontext;
    }
    public String getQuestiontext()
    {
        return questiontext;
    }
    public void setQuestionvoice(String questionvoice)
    {
        this.questionvoice = questionvoice;
    }
    public String getQuestionvoice()
    {
        return questionvoice;
    }
    public void setCategoryname(String categoryname)
    {
        this.categoryname = categoryname;
    }
    public String getCategoryname()
    {
        return categoryname;
    }
    public void setTargetoptions(String targetoptions)
    {
        this.targetoptions = targetoptions;
    }
    public String getTargetoptions()
    {
        return targetoptions;
    }
    public void setTargetvalue(String targetvalue)
    {
        this.targetvalue = targetvalue;
    }
    public String getTargetvalue()
    {
        return targetvalue;
    }
    public void setMatchedtext(String matchedtext)
    {
        this.matchedtext = matchedtext;
    }
    public String getMatchedtext()
    {
        return matchedtext;
    }
    public void setAddtime(Date addtime)
    {
        this.addtime = addtime;
    }
    public Date getAddtime()
    {
        return addtime;
    }
    public void setIsupload(Long isupload)
    {
        this.isupload = isupload;
    }
    public Long getIsupload()
    {
        return isupload;
    }
    public void setUploadTime(Date uploadTime)
    {
        this.uploadTime = uploadTime;
    }
    public Date getUploadTime()
    {
        return uploadTime;
    }
    public void setOrgid(String orgid)
    {
        this.orgid = orgid;
    }
    public String getOrgid()
    {
        return orgid;
    }
    public void setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
    }
    public String getDelFlag()
    {
        return delFlag;
    }
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("calldetailid", getCalldetailid())
            .append("callid", getCallid())
            .append("uuid", getUuid())
            .append("phone", getPhone())
            .append("operate", getOperate())
            .append("displayno", getDisplayno())
            .append("inbound", getInbound())
            .append("incoming", getIncoming())
            .append("assigntime", getAssigntime())
            .append("starttime", getStarttime())
            .append("answertime", getAnswertime())
            .append("silent", getSilent())
            .append("dtmfKey", getDtmfKey())
            .append("musicpath", getMusicpath())
            .append("sentIndex", getSentIndex())
            .append("sentBegin", getSentBegin())
            .append("asrtext", getAsrtext())
            .append("beginTime", getBeginTime())
            .append("endTime", getEndTime())
            .append("sentEnd", getSentEnd())
            .append("recordpath", getRecordpath())
            .append("recordurl", getRecordurl())
            .append("templateid", getTemplateid())
            .append("templatequestionnum", getTemplatequestionnum())
            .append("switchid", getSwitchid())
            .append("questiontext", getQuestiontext())
            .append("questionvoice", getQuestionvoice())
            .append("categoryname", getCategoryname())
            .append("targetoptions", getTargetoptions())
            .append("targetvalue", getTargetvalue())
            .append("matchedtext", getMatchedtext())
            .append("addtime", getAddtime())
            .append("isupload", getIsupload())
            .append("uploadTime", getUploadTime())
            .append("orgid", getOrgid())
            .append("createTime", getCreateTime())
            .append("delFlag", getDelFlag())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("createBy", getCreateBy())
            .toString();
    }
}
smartor/src/main/java/com/smartor/domain/IvrTaskcalldetailReq.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,34 @@
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 org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.Date;
import java.util.List;
/**
 * é—®é¢˜å›žç­”明细 ivr_taskcalldetailReq
 *
 * @author ls
 * @date 2023-06-05
 */
@ApiModel(value = "IvrTaskcalldetailReq", description = "问题回答明细")
@Data
public class IvrTaskcalldetailReq {
    @ApiModelProperty(value = "任务ID")
    private String param1;
    @ApiModelProperty(value = "患者ID")
    private String param2;
    @ApiModelProperty(value = "问题回答明细")
    private List<IvrTaskcalldetail> ivrTaskcalldetailList;
}
smartor/src/main/java/com/smartor/service/IIvrTaskService.java
@@ -5,6 +5,7 @@
import com.smartor.domain.IvrLibaTemplateScript;
import com.smartor.domain.IvrLibaTemplateScriptVO;
import com.smartor.domain.IvrTask;
import com.smartor.domain.SendTaskVO;
import org.springframework.web.bind.annotation.PathVariable;
/**
@@ -63,4 +64,12 @@
    public Boolean deleteIvrTaskByTaskid(Long taskid);
    public  List<IvrLibaTemplateScriptVO> getScriptInfoByCondition(Long taskid, Long patid);
    /**
     * ä»»åŠ¡å‘é€æ‰§è¡Œ
     *
     * @param sendTaskVO
     * @return ç»“æžœ
     */
    public int taskSend(SendTaskVO sendTaskVO);
}
smartor/src/main/java/com/smartor/service/IIvrTaskSingleService.java
@@ -75,13 +75,7 @@
     */
    public int insertOrUpdateTask(IvrTaskVO ivrTaskVO);
    /**
     * ä»»åŠ¡å‘é€æ‰§è¡Œ
     *
     * @param sendTaskVO
     * @return ç»“æžœ
     */
    public int heTaskSend(SendTaskVO sendTaskVO);
    /**
     * ç”µè¯å›žè°ƒä»»åŠ¡
smartor/src/main/java/com/smartor/service/IIvrTaskcalldetailService.java
@@ -1,19 +1,20 @@
package com.smartor.service;
import java.util.List;
import com.smartor.domain.IvrTaskcalldetail;
import com.smartor.domain.IvrTaskcalldetailReq;
/**
 * è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†Service接口
 *
 *
 * @author smartor
 * @date 2023-03-24
 */
public interface IIvrTaskcalldetailService
{
public interface IIvrTaskcalldetailService {
    /**
     * æŸ¥è¯¢è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†
     *
     *
     * @param calldetailid è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†ä¸»é”®
     * @return è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†
     */
@@ -21,7 +22,7 @@
    /**
     * æŸ¥è¯¢è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†åˆ—è¡¨
     *
     *
     * @param ivrTaskcalldetail è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†
     * @return è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†é›†åˆ
     */
@@ -29,7 +30,7 @@
    /**
     * æ–°å¢žè¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†
     *
     *
     * @param ivrTaskcalldetail è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†
     * @return ç»“æžœ
     */
@@ -37,7 +38,7 @@
    /**
     * ä¿®æ”¹è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†
     *
     *
     * @param ivrTaskcalldetail è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†
     * @return ç»“æžœ
     */
@@ -45,7 +46,7 @@
    /**
     * æ‰¹é‡åˆ é™¤è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†
     *
     *
     * @param calldetailids éœ€è¦åˆ é™¤çš„语音任务呼叫明细主键集合
     * @return ç»“æžœ
     */
@@ -53,9 +54,11 @@
    /**
     * åˆ é™¤è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†ä¿¡æ¯
     *
     *
     * @param calldetailid è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†ä¸»é”®
     * @return ç»“æžœ
     */
    public int deleteIvrTaskcalldetailByCalldetailid(String calldetailid);
    public Integer saveQuestionAnswer(IvrTaskcalldetailReq ivrTaskcalldetailReq);
}
smartor/src/main/java/com/smartor/service/impl/IvrTaskServiceImpl.java
@@ -1,16 +1,17 @@
package com.smartor.service.impl;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.text.SimpleDateFormat;
import java.util.*;
import com.alibaba.fastjson2.JSON;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.ruoyi.common.exception.base.BaseException;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.DtoConversionUtils;
import com.ruoyi.common.utils.StringUtils;
import com.smartor.config.RabbitMqCallPhoneConfig;
import com.smartor.domain.*;
import com.smartor.mapper.*;
import lombok.extern.slf4j.Slf4j;
@@ -43,6 +44,9 @@
    @Autowired
    private IvrLibaTemplateTargetoptionMapper ivrLibaTemplateTargetOptionMapper;
    @Autowired
    private RabbitMqCallPhoneConfig rabbitMqCallPhoneConfig;
    /**
     * æŸ¥è¯¢è¯­éŸ³ä»»åŠ¡
@@ -180,4 +184,99 @@
        return ivrLibaTemplateScriptVOS;
    }
    /**
     * ä»»åŠ¡å‘é€
     *
     * @return
     */
    @Override
    public int taskSend(SendTaskVO sendTaskVO) {
        if (sendTaskVO.getTaskId() == null) throw new BaseException("任务ID不能为空,请检查后,再进行执行");
        IvrTask ivrTask = selectIvrTaskByTaskid(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());
            updateIvrTask(ivrTask3);
            return 0;
        }
        //判断发送状态是否为空
        if (org.apache.commons.lang3.StringUtils.isEmpty(sendTaskVO.getSendType())) {
            sendTaskVO.setSendType(ivrTask.getSendType().toString());
        }
        Long ss = ivrTask.getStopState() + 1;
        //判断任务是否是立即发送
        if (org.apache.commons.lang3.StringUtils.isNotEmpty(sendTaskVO.getSendType()) && sendTaskVO.getSendType().equals("2")) {
            IvrTaskcallMQ ivrTaskcallMQ = new IvrTaskcallMQ();
            ivrTaskcallMQ.setTaskid(sendTaskVO.getTaskId());
            ivrTaskcallMQ.setSendType(sendTaskVO.getSendType());
            ivrTaskcallMQ.setTemplateid(ivrTask.getTemplateid().toString());
            ivrTaskcallMQ.setStopState(ss);
            ivrTaskcallMQ.setPreachform(ivrTask.getPreachform());
            String ivrTaskcallMQJson = JSON.toJSONString(ivrTaskcallMQ);
            ivrTaskcallMQJson = ivrTaskcallMQJson.substring(1, ivrTaskcallMQJson.length() - 1);
            //立即发送
            rabbitMqCallPhoneConfig.sendMessage("phone_exchange", "phone.123", ivrTaskcallMQJson, 0L);
            //将任务状态修改成执行中
            IvrTask ivrTask2 = new IvrTask();
            ivrTask2.setTaskid(ivrTask.getTaskid());
            ivrTask2.setSendState(2);
            ivrTask2.setStopState(ss);
            updateIvrTask(ivrTask2);
        } else if (org.apache.commons.lang3.StringUtils.isNotEmpty(sendTaskVO.getSendType()) && sendTaskVO.getSendType().equals("1")) {
            //时间段发送
            ObjectMapper objectMapper = new ObjectMapper();
            if (org.apache.commons.lang3.StringUtils.isNotEmpty(ivrTask.getSendTimeSlot())) {
                List<TaskSendTimeVO> taskSendTimeVOList = null;
                try {
                    taskSendTimeVOList = objectMapper.readValue(ivrTask.getSendTimeSlot(), new TypeReference<List<TaskSendTimeVO>>() {
                    });
                } catch (JsonProcessingException e) {
                    log.error("JsonProcessingException报错了:{}", e.getMessage());
                }
                for (TaskSendTimeVO taskSendTimeVO : taskSendTimeVOList) {
                    //去SendTimeslot中,获取所有的时间段
                    List<TaskSendTimeVO> list = new ArrayList<>();
                    list.add(taskSendTimeVO);
                    //获取开始发送时间
                    String begantime = taskSendTimeVO.getBegantime();
                    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                    //记录目前到发送时间的毫秒值 ï¼ˆå‘送时间的毫秒值 - å½“前时间的毫秒值)
                    Long milliseconds = 1000L;
                    try {
                        Date date = sdf.parse(begantime);
                        milliseconds = date.getTime() - System.currentTimeMillis();
                        System.out.println("日期毫秒数:" + milliseconds);
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                    IvrTaskcallMQ ivrTaskcallMQ = new IvrTaskcallMQ();
                    ivrTaskcallMQ.setTaskid(sendTaskVO.getTaskId());
                    ivrTaskcallMQ.setSendType("1");
                    ivrTaskcallMQ.setTemplateid(ivrTask.getTemplateid().toString());
                    ivrTaskcallMQ.setSendTimeslot(list);
                    ivrTaskcallMQ.setStopState(ivrTask.getStopState());
                    Long finalMilliseconds = milliseconds;
                    String ivrTaskcallMQJson = JSON.toJSONString(ivrTaskcallMQ);
                    ivrTaskcallMQJson = ivrTaskcallMQJson.substring(1, ivrTaskcallMQJson.length() - 1);
                    rabbitMqCallPhoneConfig.sendMessage("phone_exchange", "phone.123", ivrTaskcallMQJson, milliseconds);
                }
                //将任务状态修改成执行中
                IvrTask ivrTask2 = new IvrTask();
                ivrTask2.setTaskid(ivrTask.getTaskid());
                ivrTask2.setSendState(2);
                ivrTask2.setStopState(ss);
                updateIvrTask(ivrTask2);
            }
        }
        return 1;
    }
}
smartor/src/main/java/com/smartor/service/impl/IvrTaskSingleServiceImpl.java
@@ -9,7 +9,6 @@
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.DtoConversionUtils;
import com.smartor.config.PhoneUtils;
import com.smartor.config.RabbitMqCallPhoneConfig;
import com.smartor.domain.*;
import com.smartor.mapper.*;
import com.smartor.service.IIvrTaskService;
@@ -21,7 +20,6 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.fasterxml.jackson.core.type.TypeReference;
import java.text.SimpleDateFormat;
import java.util.*;
@@ -59,8 +57,7 @@
    @Autowired
    private IvrLibaExtemplatescriptMapper ivrLibaExtemplatescriptMapper;
    @Autowired
    private RabbitMqCallPhoneConfig rabbitMqCallPhoneConfig;
    /**
@@ -278,100 +275,7 @@
        return integer;
    }
    /**
     * ä»»åŠ¡å‘é€
     *
     * @return
     */
    @Override
    public int heTaskSend(SendTaskVO sendTaskVO) {
        if (sendTaskVO.getTaskId() == null) throw new BaseException("任务ID不能为空,请检查后,再进行执行");
        IvrTask ivrTask = ivrTaskService.selectIvrTaskByTaskid(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);
            return 0;
        }
        //判断发送状态是否为空
        if (StringUtils.isEmpty(sendTaskVO.getSendType())) {
            sendTaskVO.setSendType(ivrTask.getSendType().toString());
        }
        Long ss = ivrTask.getStopState() + 1;
        //判断任务是否是立即发送
        if (StringUtils.isNotEmpty(sendTaskVO.getSendType()) && sendTaskVO.getSendType().equals("2")) {
            IvrTaskcallMQ ivrTaskcallMQ = new IvrTaskcallMQ();
            ivrTaskcallMQ.setTaskid(sendTaskVO.getTaskId());
            ivrTaskcallMQ.setSendType(sendTaskVO.getSendType());
            ivrTaskcallMQ.setTemplateid(ivrTask.getTemplateid().toString());
            ivrTaskcallMQ.setStopState(ss);
            ivrTaskcallMQ.setPreachform(ivrTask.getPreachform());
            String ivrTaskcallMQJson = JSON.toJSONString(ivrTaskcallMQ);
            ivrTaskcallMQJson = ivrTaskcallMQJson.substring(1, ivrTaskcallMQJson.length() - 1);
            //立即发送
            rabbitMqCallPhoneConfig.sendMessage("phone_exchange", "phone.123", ivrTaskcallMQJson, 0L);
            //将任务状态修改成执行中
            IvrTask ivrTask2 = new IvrTask();
            ivrTask2.setTaskid(ivrTask.getTaskid());
            ivrTask2.setSendState(2);
            ivrTask2.setStopState(ss);
            ivrTaskService.updateIvrTask(ivrTask2);
        } else if (StringUtils.isNotEmpty(sendTaskVO.getSendType()) && sendTaskVO.getSendType().equals("1")) {
            //时间段发送
            ObjectMapper objectMapper = new ObjectMapper();
            if (StringUtils.isNotEmpty(ivrTask.getSendTimeSlot())) {
                List<TaskSendTimeVO> taskSendTimeVOList = null;
                try {
                    taskSendTimeVOList = objectMapper.readValue(ivrTask.getSendTimeSlot(), new TypeReference<List<TaskSendTimeVO>>() {
                    });
                } catch (JsonProcessingException e) {
                    log.error("JsonProcessingException报错了:{}", e.getMessage());
                }
                for (TaskSendTimeVO taskSendTimeVO : taskSendTimeVOList) {
                    //去SendTimeslot中,获取所有的时间段
                    List<TaskSendTimeVO> list = new ArrayList<>();
                    list.add(taskSendTimeVO);
                    //获取开始发送时间
                    String begantime = taskSendTimeVO.getBegantime();
                    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                    //记录目前到发送时间的毫秒值 ï¼ˆå‘送时间的毫秒值 - å½“前时间的毫秒值)
                    Long milliseconds = 1000L;
                    try {
                        Date date = sdf.parse(begantime);
                        milliseconds = date.getTime() - System.currentTimeMillis();
                        System.out.println("日期毫秒数:" + milliseconds);
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                    IvrTaskcallMQ ivrTaskcallMQ = new IvrTaskcallMQ();
                    ivrTaskcallMQ.setTaskid(sendTaskVO.getTaskId());
                    ivrTaskcallMQ.setSendType("1");
                    ivrTaskcallMQ.setTemplateid(ivrTask.getTemplateid().toString());
                    ivrTaskcallMQ.setSendTimeslot(list);
                    ivrTaskcallMQ.setStopState(ivrTask.getStopState());
                    Long finalMilliseconds = milliseconds;
                    String ivrTaskcallMQJson = JSON.toJSONString(ivrTaskcallMQ);
                    ivrTaskcallMQJson = ivrTaskcallMQJson.substring(1, ivrTaskcallMQJson.length() - 1);
                    rabbitMqCallPhoneConfig.sendMessage("phone_exchange", "phone.123", ivrTaskcallMQJson, milliseconds);
                }
                //将任务状态修改成执行中
                IvrTask ivrTask2 = new IvrTask();
                ivrTask2.setTaskid(ivrTask.getTaskid());
                ivrTask2.setSendState(2);
                ivrTask2.setStopState(ss);
                ivrTaskService.updateIvrTask(ivrTask2);
            }
        }
        return 1;
    }
    @Override
    public void phoneCallBack(PhoneCallBackVO phoneCallBackVO) {
smartor/src/main/java/com/smartor/service/impl/IvrTaskcalldetailServiceImpl.java
@@ -1,8 +1,18 @@
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;
@@ -10,87 +20,111 @@
/**
 * è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†Service业务层处理
 *
 *
 * @author smartor
 * @date 2023-03-24
 */
@Slf4j
@Service
public class IvrTaskcalldetailServiceImpl implements IIvrTaskcalldetailService
{
public class IvrTaskcalldetailServiceImpl implements IIvrTaskcalldetailService {
    @Autowired
    private IvrTaskcalldetailMapper ivrTaskcalldetailMapper;
    @Autowired
    private IvrTaskSingleMapper ivrTaskSingleMapper;
    @Value("${pri_key}")
    private String pri_key;
    /**
     * æŸ¥è¯¢è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†
     *
     *
     * @param calldetailid è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†ä¸»é”®
     * @return è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†
     */
    @Override
    public IvrTaskcalldetail selectIvrTaskcalldetailByCalldetailid(String calldetailid)
    {
    public IvrTaskcalldetail selectIvrTaskcalldetailByCalldetailid(String calldetailid) {
        return ivrTaskcalldetailMapper.selectIvrTaskcalldetailByCalldetailid(calldetailid);
    }
    /**
     * æŸ¥è¯¢è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†åˆ—è¡¨
     *
     *
     * @param ivrTaskcalldetail è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†
     * @return è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†
     */
    @Override
    public List<IvrTaskcalldetail> selectIvrTaskcalldetailList(IvrTaskcalldetail ivrTaskcalldetail)
    {
    public List<IvrTaskcalldetail> selectIvrTaskcalldetailList(IvrTaskcalldetail ivrTaskcalldetail) {
        return ivrTaskcalldetailMapper.selectIvrTaskcalldetailList(ivrTaskcalldetail);
    }
    /**
     * æ–°å¢žè¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†
     *
     *
     * @param ivrTaskcalldetail è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†
     * @return ç»“æžœ
     */
    @Override
    public int insertIvrTaskcalldetail(IvrTaskcalldetail ivrTaskcalldetail)
    {
    public int insertIvrTaskcalldetail(IvrTaskcalldetail ivrTaskcalldetail) {
        ivrTaskcalldetail.setCreateTime(DateUtils.getNowDate());
        return ivrTaskcalldetailMapper.insertIvrTaskcalldetail(ivrTaskcalldetail);
    }
    /**
     * ä¿®æ”¹è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†
     *
     *
     * @param ivrTaskcalldetail è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†
     * @return ç»“æžœ
     */
    @Override
    public int updateIvrTaskcalldetail(IvrTaskcalldetail ivrTaskcalldetail)
    {
    public int updateIvrTaskcalldetail(IvrTaskcalldetail ivrTaskcalldetail) {
        ivrTaskcalldetail.setUpdateTime(DateUtils.getNowDate());
        return ivrTaskcalldetailMapper.updateIvrTaskcalldetail(ivrTaskcalldetail);
    }
    /**
     * æ‰¹é‡åˆ é™¤è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†
     *
     *
     * @param calldetailids éœ€è¦åˆ é™¤çš„语音任务呼叫明细主键
     * @return ç»“æžœ
     */
    @Override
    public int deleteIvrTaskcalldetailByCalldetailids(String[] calldetailids)
    {
    public int deleteIvrTaskcalldetailByCalldetailids(String[] calldetailids) {
        return ivrTaskcalldetailMapper.deleteIvrTaskcalldetailByCalldetailids(calldetailids);
    }
    /**
     * åˆ é™¤è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†ä¿¡æ¯
     *
     *
     * @param calldetailid è¯­éŸ³ä»»åŠ¡å‘¼å«æ˜Žç»†ä¸»é”®
     * @return ç»“æžœ
     */
    @Override
    public int deleteIvrTaskcalldetailByCalldetailid(String calldetailid)
    {
    public int deleteIvrTaskcalldetailByCalldetailid(String calldetailid) {
        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;
    }
}
smartor/src/main/resources/mapper/smartor/IvrTaskcalldetailMapper.xml
@@ -45,6 +45,7 @@
        <result property="updateBy" column="update_by"/>
        <result property="updateTime" column="update_time"/>
        <result property="createBy" column="create_by"/>
        <result property="valueType" column="value_type"/>
    </resultMap>
    <sql id="selectIvrTaskcalldetailVo">
@@ -87,6 +88,7 @@
               del_flag,
               update_by,
               update_time,
               value_type,
               create_by
        from ivr_taskcalldetail
    </sql>
@@ -131,6 +133,7 @@
            <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="valueType != null  and valueType != ''">and value_type = #{valueType}</if>
        </where>
    </select>
@@ -182,6 +185,7 @@
            <if test="updateBy != null">update_by,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="createBy != null">create_by,</if>
            <if test="valueType != null">value_type,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="calldetailid != null">#{calldetailid},</if>
@@ -224,6 +228,7 @@
            <if test="updateBy != null">#{updateBy},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="createBy != null">#{createBy},</if>
            <if test="valueType != null">#{valueType},</if>
        </trim>
    </insert>
@@ -269,6 +274,7 @@
            <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="valueType != null">value_type = #{valueType},</if>
        </trim>
        where calldetailid = #{calldetailid}
    </update>