liusheng
2024-07-26 0ff7a8f69570b3fc7418c35f3d6e273ef4f73f20
代码提交
已修改16个文件
137 ■■■■■ 文件已修改
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrLibaTemplateController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/HeLibrary.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/HeLibraryAssort.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/HeLibraryAssortVO.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaTargetTag.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaTargetVO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/IvrLibaTemplateVO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/ServiceSubTaskQueryReq.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/ServiceSubtaskAnswer.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/ServiceSubtaskOptionAnswer.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/IvrLibaTargetServiceImpl.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskAnswerServiceImpl.java 45 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/HeLibraryAssortMapper.xml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/HeLibraryMapper.xml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/IvrLibaTargetTagMapper.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/ServiceSubtaskAnswerMapper.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrLibaTemplateController.java
@@ -133,7 +133,7 @@
    @ApiOperation("查询模板详情根据条件")
    @PostMapping("/selectInfoByCondition")
    public AjaxResult selectInfoByCondition(@RequestBody IvrLibaTemplateVO ivrLibaTemplateVO) {
        if (ivrLibaTemplateVO.getID() == null) {
        if (ivrLibaTemplateVO.getId() == null) {
            return success();
        }
        return success(ivrLibaTemplateService.selectInfoByCondition(ivrLibaTemplateVO));
smartor/src/main/java/com/smartor/domain/HeLibrary.java
@@ -28,6 +28,12 @@
    private Long id;
    /**
     * 类型:1宣教  2通知
     */
    @ApiModelProperty("类型:1宣教  2通知")
    private String hetype;
    /**
     * 宣教分类
     */
    @Excel(name = " 宣教分类 ")
smartor/src/main/java/com/smartor/domain/HeLibraryAssort.java
@@ -49,6 +49,12 @@
    private String delFlag;
    /**
     * 类型:1宣教  2通知
     */
    @ApiModelProperty("类型:1宣教  2通知")
    private String hetype;
    /**
     * 上传标记
     */
    @Excel(name = " 上传标记 ")
smartor/src/main/java/com/smartor/domain/HeLibraryAssortVO.java
@@ -38,6 +38,12 @@
    private String assortname;
    /**
     * 类型:1宣教  2通知
     */
    @ApiModelProperty("类型:1宣教  2通知")
    private String hetype;
    /**
     * 机构ID
     */
    @Excel(name = " 机构ID ")
smartor/src/main/java/com/smartor/domain/IvrLibaTargetTag.java
@@ -39,7 +39,7 @@
     * 标签ID
     */
    @ApiModelProperty(value = "标签ID")
    @Excel(name = " 标签ID ")
    @Excel(name = " baseTag标签ID ")
    private Long tagid;
    /**
@@ -78,10 +78,10 @@
    private Date uploadTime;
    /**
     * 标签ID
     * 指标ID
     */
    @ApiModelProperty(value = "标签ID")
    @Excel(name = "标签ID ")
    @ApiModelProperty(value = "指标ID")
    @Excel(name = "指标ID ")
    private Long targetid;
    /**
smartor/src/main/java/com/smartor/domain/IvrLibaTargetVO.java
@@ -211,7 +211,7 @@
    private List<IvrLibaTargetoption> targetoptionList = new ArrayList<>();
    @ApiModelProperty(value = "标签集合")
    private List<BaseTag> baseTagList = new ArrayList<>();
    private List<IvrLibaTargetTag> ivrLibaTargetTagList = new ArrayList<>();
    @ApiModelProperty(value = "回复(指问题的回复,给问答题用的)")
    private String reply;
smartor/src/main/java/com/smartor/domain/IvrLibaTemplateVO.java
@@ -27,7 +27,7 @@
     * 主键
     */
    @ApiModelProperty(value = "主键")
    private Long ID;
    private Long id;
    /**
     * 模板ID
smartor/src/main/java/com/smartor/domain/ServiceSubTaskQueryReq.java
@@ -23,7 +23,7 @@
    /**
     * 任务ID
     */
    @Nonnull
    @ApiModelProperty(value = "任务ID")
    private Long taskid;
smartor/src/main/java/com/smartor/domain/ServiceSubtaskAnswer.java
@@ -1,6 +1,7 @@
package com.smartor.domain;
import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
@@ -118,5 +119,9 @@
    @ApiModelProperty(value = "GUID")
    private String guid;
    /**
     * 问题答案
     */
    private List<ServiceSubtaskOptionAnswer> optionAnswer;
}
smartor/src/main/java/com/smartor/domain/ServiceSubtaskOptionAnswer.java
@@ -16,7 +16,7 @@
 */
@ApiModel(value = "ServiceSubtaskOptionAnswer", description = "外链选项结果")
@Data
public class ServiceSubtaskOptionAnswer extends BaseEntity {
public class ServiceSubtaskOptionAnswer {
    private static final long serialVersionUID = 1L;
    /**
smartor/src/main/java/com/smartor/service/impl/IvrLibaTargetServiceImpl.java
@@ -94,8 +94,10 @@
                ivrLibaTarget1.setTargetoptionList(ivrLibaTargetoptions);
            }
            //获取该指标的标签
            List<BaseTag> baseTags = ivrLibaTargetTagMapper.selectTagName(ivrLibaTarget1.getId());
            ivrLibaTarget1.setBaseTagList(baseTags);
            IvrLibaTargetTag ivrLibaTargetTag =new IvrLibaTargetTag();
            ivrLibaTargetTag.setTargetid(ivrLibaTarget1.getId());
            List<IvrLibaTargetTag> ivrLibaTargetTags = ivrLibaTargetTagMapper.selectIvrLibaTargetTagList(ivrLibaTargetTag);
            ivrLibaTarget1.setIvrLibaTargetTagList(ivrLibaTargetTags);
        }
        //下面用左外感觉有点问题,where中的option的del会导致左边的查询不全,先不用吧
//        ivrLibaTargetMapper.targetInfo(ivrLibaTarget)
@@ -117,12 +119,8 @@
        ivrLibaTargetMapper.insertIvrLibaTarget(ivrLibaTarget);
        //新增该指标对应的标签信息
        for (BaseTag baseTag : ivrLibaTargetVO.getBaseTagList()) {
            IvrLibaTargetTag ivrLibaTargetTag = new IvrLibaTargetTag();
            ivrLibaTargetTag.setTagcategoryid(baseTag.getTagcategoryid());
        for (IvrLibaTargetTag ivrLibaTargetTag : ivrLibaTargetVO.getIvrLibaTargetTagList()) {
            ivrLibaTargetTag.setTargetid(ivrLibaTarget.getId());
            //前端传来的baseTag的tagid就是指标标签的主键id,不是baseTag的主键
            ivrLibaTargetTag.setTagid(baseTag.getTagid());
            ivrLibaTargetTagMapper.insertIvrLibaTargetTag(ivrLibaTargetTag);
        }
@@ -159,21 +157,15 @@
            ivrLibaTargetMapper.updateIvrLibaTarget(ivrLibaTarget);
        }
        if (CollectionUtils.isNotEmpty(ivrLibaTargetVO.getBaseTagList())) {
            for (BaseTag baseTag : ivrLibaTargetVO.getBaseTagList()) {
                if (baseTag.getIsoperation() != null && baseTag.getIsoperation() == 1) {
        if (CollectionUtils.isNotEmpty(ivrLibaTargetVO.getIvrLibaTargetTagList())) {
            for (IvrLibaTargetTag ivrLibaTargetTag : ivrLibaTargetVO.getIvrLibaTargetTagList()) {
                if (ivrLibaTargetTag.getId() == null) {
                    //新增
                    IvrLibaTargetTag ivrLibaTargetTag = new IvrLibaTargetTag();
                    ivrLibaTargetTag.setTagcategoryid(baseTag.getTagcategoryid());
                    ivrLibaTargetTag.setTargetid(ivrLibaTarget.getId());
                    //前端传来的baseTag的tagid就是指标标签的主键id,不是baseTag的主键
                    ivrLibaTargetTag.setTagid(baseTag.getTagid());
                    ivrLibaTargetTagMapper.insertIvrLibaTargetTag(ivrLibaTargetTag);
                } else if (baseTag.getIsoperation() != null && baseTag.getIsoperation() == 2) {
                } else if (ivrLibaTargetTag.getId() != null) {
                    //前端页面应该没有修改
                } else if (baseTag.getIsoperation() != null && baseTag.getIsoperation() == 3) {
                    //删除
                    ivrLibaTargetTagMapper.deleteIvrLibaTargetTagById(baseTag.getTagid());
                    ivrLibaTargetTagMapper.updateIvrLibaTargetTag(ivrLibaTargetTag);
                }
            }
        }
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskAnswerServiceImpl.java
@@ -1,6 +1,10 @@
package com.smartor.service.impl;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONArray;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.utils.DateUtils;
@@ -116,8 +120,11 @@
        if (ObjectUtils.isNotEmpty(serviceSubTaskAnswerReq)) {
            //需要立即执行
            RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample();
            Long tid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskAnswerReq.getParam1(), pri_key));
            Long pid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskAnswerReq.getParam2(), pri_key));
//            Long tid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskAnswerReq.getParam1(), pri_key));
//            Long pid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskAnswerReq.getParam2(), pri_key));
            Long tid=Long.valueOf(serviceSubTaskAnswerReq.getParam1());
            Long pid=Long.valueOf(serviceSubTaskAnswerReq.getParam2());
            allKeys = new HashSet<>();
            if (serviceSubTaskAnswerReq.getType() == 1) {
@@ -185,8 +192,10 @@
    @Override
    public Integer saveQuestionCache(ServiceSubTaskCacheReq serviceSubTaskCacheReq) {
        RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample();
        Long tid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskCacheReq.getParam1(), pri_key));
        Long pid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskCacheReq.getParam2(), pri_key));
//        Long tid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskCacheReq.getParam1(), pri_key));
//        Long pid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskCacheReq.getParam2(), pri_key));
        Long tid=Long.valueOf(serviceSubTaskCacheReq.getParam1());
        Long pid=Long.valueOf(serviceSubTaskCacheReq.getParam2());
        if (CollectionUtils.isNotEmpty(serviceSubTaskCacheReq.getIvrTaskTemplateScriptVOList())) {
            //随访
            redisCache.setCacheObject(pid + "-" + tid + "-SFscriptCache", serviceSubTaskCacheReq.getIvrTaskTemplateScriptVOList());
@@ -205,12 +214,20 @@
        serviceSubtaskAnswer.setPatId(serviceSubTaskQueryReq.getPatId());
        serviceSubtaskAnswer.setScriptid(serviceSubTaskQueryReq.getScriptid());
        List<ServiceSubtaskAnswer> serviceSubtaskAnswerList = serviceSubtaskAnswerMapper.selectServiceSubtaskAnswerList(serviceSubtaskAnswer);
        for (ServiceSubtaskAnswer serviceSubtaskAnswer1 : serviceSubtaskAnswerList) {
            ObjectMapper mapper = new ObjectMapper();
            try {
                List<ServiceSubtaskOptionAnswer> serviceSubtaskOptionAnswer = mapper.readValue(serviceSubtaskAnswer1.getAnswer(), List.class);
                serviceSubtaskAnswer1.setOptionAnswer(serviceSubtaskOptionAnswer);
            } catch (JsonProcessingException e) {
                e.printStackTrace();
            }
        }
        return serviceSubtaskAnswerList;
    }
    private void setSFInfo(IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO, Long taskid, Long patid) {
        ServiceSubtaskAnswer serviceSubtaskAnswer = null;
        ServiceSubtaskAnswer serviceSubtaskAnswer = new ServiceSubtaskAnswer();
        List<ServiceSubtaskOptionAnswer> answerList = new ArrayList<>();
        if (StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getScriptType()) && ivrTaskTemplateScriptVO.getScriptType().equals("1") || StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getScriptType()) && ivrTaskTemplateScriptVO.getScriptType().equals("2")) {
            //1、2为单选或多选
@@ -225,22 +242,8 @@
                    answerList.add(serviceSubtaskOptionAnswer);
                }
            }
        } else if (StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getScriptType()) && ivrTaskTemplateScriptVO.getScriptType().equals("4")) {
            //填空
            for (IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption : ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList()) {
                log.error("ivrTaskTemplateTargetoption的值为:{}", ivrTaskTemplateTargetoption);
                String[] split = ivrTaskTemplateTargetoption.getTargetvalue().split("|");
                for (String s : split) {
                    ServiceSubtaskOptionAnswer serviceSubtaskOptionAnswer = new ServiceSubtaskOptionAnswer();
                    serviceSubtaskOptionAnswer.setId(ivrTaskTemplateTargetoption.getId());
                    serviceSubtaskOptionAnswer.setCode(ivrTaskTemplateTargetoption.getOptionCode());
                    serviceSubtaskOptionAnswer.setValue(s);
                    serviceSubtaskOptionAnswer.setAppenddesc(ivrTaskTemplateTargetoption.getAppenddesc());
                    answerList.add(serviceSubtaskOptionAnswer);
                }
            }
        } else {
            //非单多选(问答)
            //非单多选
            if (CollectionUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList())) {
                log.error("IvrTaskScriptTargetoptionList的值为:{}", ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList());
                ServiceSubtaskOptionAnswer serviceSubtaskOptionAnswer = new ServiceSubtaskOptionAnswer();
smartor/src/main/resources/mapper/smartor/HeLibraryAssortMapper.xml
@@ -18,11 +18,13 @@
        <result property="pid" column="pid"/>
        <result property="guid" column="guid"/>
        <result property="seqno" column="seqno"/>
        <result property="hetype" column="hetype"/>
    </resultMap>
    <sql id="selectHeLibraryAssortVo">
        select id,
               assortname,
               hetype,
               orgid,
               del_flag,
               update_by,
@@ -49,6 +51,7 @@
            <if test="pid != null ">and pid = #{pid}</if>
            <if test="guid != null  and guid != ''">and guid = #{guid}</if>
            <if test="seqno != null  ">and seqno = #{seqno}</if>
            <if test="hetype != null  ">and hetype = #{hetype}</if>
        </where>
        order by seqno asc
@@ -81,6 +84,7 @@
            <if test="pid != null">pid,</if>
            <if test="guid != null">guid,</if>
            <if test="seqno != null">seqno,</if>
            <if test="hetype != null">hetype,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="assortname != null">#{assortname},</if>
@@ -95,6 +99,7 @@
            <if test="pid != null">#{pid},</if>
            <if test="guid != null">#{guid},</if>
            <if test="seqno != null">#{seqno},</if>
            <if test="hetype != null">#{hetype},</if>
        </trim>
    </insert>
@@ -112,6 +117,7 @@
            <if test="uploadTime != null">upload_time = #{uploadTime},</if>
            <if test="pid != null">pid = #{pid},</if>
            <if test="guid != null">guid = #{guid},</if>
            <if test="hetype != null">hetype = #{hetype},</if>
        </trim>
        where id = #{id}
    </update>
@@ -130,4 +136,4 @@
            #{id}
        </foreach>
    </delete>
</mapper>
</mapper>
smartor/src/main/resources/mapper/smartor/HeLibraryMapper.xml
@@ -38,11 +38,13 @@
        <result property="campus" column="campus"/>
        <result property="otherdata" column="otherdata"/>
        <result property="richText" column="rich_text"/>
        <result property="hetype" column="hetype"/>
    </resultMap>
    <sql id="selectHeLibraryVo">
        select id,
               classification,
               hetype,
               assortid,
               preachname,
               version,
@@ -112,6 +114,7 @@
            <if test="labelInfo != null  and labelInfo != ''">and label_info = #{labelInfo}</if>
            <if test="campus != null  and campus != ''">and campus = #{campus}</if>
            <if test="richText != null  and richText != ''">and rich_text = #{richText}</if>
            <if test="hetype != null  and hetype != ''">and hetype = #{hetype}</if>
        </where>
    </select>
@@ -155,6 +158,7 @@
            <if test="campus != null">campus,</if>
            <if test="otherdata != null">otherdata,</if>
            <if test="richText != null  and richText != ''">rich_text,</if>
            <if test="hetype != null  and hetype != ''">hetype,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="classification != null">#{classification},</if>
@@ -189,6 +193,7 @@
            <if test="campus != null">#{campus},</if>
            <if test="otherdata != null">#{otherdata},</if>
            <if test="richText != null  and richText != ''">#{richText},</if>
            <if test="hetype != null  and hetype != ''">#{hetype},</if>
        </trim>
    </insert>
@@ -227,6 +232,7 @@
            <if test="campus != null">campus = #{campus},</if>
            <if test="otherdata != null">otherdata = #{otherdata},</if>
            <if test="richText != null  and richText != ''">rich_text = #{richText},</if>
            <if test="hetype != null  and hetype != ''">hetype = #{hetype},</if>
        </trim>
        where id = #{id}
    </update>
@@ -245,4 +251,4 @@
            #{id}
        </foreach>
    </delete>
</mapper>
</mapper>
smartor/src/main/resources/mapper/smartor/IvrLibaTargetTagMapper.xml
@@ -45,6 +45,7 @@
            resultMap="IvrLibaTargetTagResult">
        <include refid="selectIvrLibaTargetTagVo"/>
        <where>
            del_flag=0
            <if test="tagcategoryid != null ">and tagcategoryid = #{tagcategoryid}</if>
            <if test="tagid != null ">and tagid = #{tagid}</if>
            <if test="orgid != null  and orgid != ''">and orgid = #{orgid}</if>
smartor/src/main/resources/mapper/smartor/ServiceSubtaskAnswerMapper.xml
@@ -13,7 +13,7 @@
        <result property="score" column="score"/>
        <result property="answer" column="answer"/>
        <result property="comment" column="comment"/>
        <result property="trackFlag" column="trackFlag"/>
        <result property="trackFlag" column="track_flag"/>
        <result property="warningFlag" column="warning_flag"/>
        <result property="delFlag" column="del_flag"/>
        <result property="createBy" column="create_by"/>
@@ -37,10 +37,6 @@
               score,
               answer,
               comment,
               track_flag,
               warning_flag,
               del_flag,
               create_by,
               create_time,
               update_by,
               update_time,