49fc1be29ca9b826c241fa71a54e1c0a8bc083aa..6b148a8744773fba2629b80d7360d451a36a449b
9 天以前 陈昶聿
【丽水】宣教统计超链接
6b148a 对比 | 目录
9 天以前 陈昶聿
【丽水】宣教统计超链接
710d8f 对比 | 目录
已修改7个文件
141 ■■■■■ 文件已修改
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/ServiceSubtaskCountReq.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/VO/HeLibraryCountVO.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/mapper/ServiceSubtaskMapper.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/IServiceSubtaskService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml 88 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java
@@ -886,6 +886,13 @@
        return serviceSubtaskService.getHeLibraryCount(heLibraryCountVO);
    }
    @ApiOperation("获取宣教统计超链接")
    @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid")
    @PostMapping("/gethelibraryCountHyperlink")
    public AjaxResult gethelibraryCountHyperlink(@RequestBody HeLibraryCountVO heLibraryCountVO) {
        return success(serviceSubtaskService.gethelibraryCountHyperlink(heLibraryCountVO));
    }
    /**
     * 手动发送问卷模板的短信功能
     *
smartor/src/main/java/com/smartor/domain/ServiceSubtaskCountReq.java
@@ -207,6 +207,17 @@
    @ApiModelProperty(value = "diagType集合")
    private List<String> diagTypes;
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "发送时间")
    private Date visittime;
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "完成时间")
    private Date finishtime;
    @ApiModelProperty(value = "就诊类型(1门诊  2出院 3.专病 4.外部导入 5急诊、6住院、7体检)")
    private String hospType;
    /**
     * pageNum
     */
smartor/src/main/java/com/smartor/domain/VO/HeLibraryCountVO.java
@@ -1,6 +1,7 @@
package com.smartor.domain.VO;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -37,4 +38,25 @@
    @ApiModelProperty(value = "就诊类型(1门诊  2出院 3.专病 4.外部导入 5急诊、6住院、7体检)")
    private String hospType;
    @ApiModelProperty(value = "机构ID")
    private String orgid;
    @ApiModelProperty("发送状态")
    private String sendstate;
    @ApiModelProperty("完成状态(0未完成 1已完成 对应finishtime是否有值)")
    private String isFinished;
    /**
     * pageNum
     */
    @ApiModelProperty("pageNum")
    private Integer pageNum;
    /**
     * pageSize
     */
    @ApiModelProperty("pageSize")
    private Integer pageSize;
}
smartor/src/main/java/com/smartor/mapper/ServiceSubtaskMapper.java
@@ -225,6 +225,11 @@
    List<Map<String, Object>> getHeLibraryCount(HeLibraryCountVO heLibraryCountVO);
    /**
     * 宣教统计超链接
     */
    List<ServiceSubtask> gethelibraryCountHyperlink(HeLibraryCountVO heLibraryCountVO);
    /**
     * 统计问题的选项的百分比
     * @param taskIds
     * @return
smartor/src/main/java/com/smartor/service/IServiceSubtaskService.java
@@ -187,6 +187,8 @@
    public Map<String, Object> getHeLibraryCount(@RequestBody HeLibraryCountVO heLibraryCountVO);
    public List<ServiceSubtask> gethelibraryCountHyperlink(@RequestBody HeLibraryCountVO heLibraryCountVO);
    Map<String, Object> smsSubTask(Long subid);
    /**
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
@@ -4523,6 +4523,12 @@
    }
    @Override
    public List<ServiceSubtask> gethelibraryCountHyperlink(HeLibraryCountVO heLibraryCountVO){
        List<ServiceSubtask> serviceSubtasks = serviceSubtaskMapper.gethelibraryCountHyperlink(heLibraryCountVO);
        return serviceSubtasks;
    }
    @Override
    public Map<String, Object> smsSubTask(Long subid) {
        log.info("smsSubTask的入参为:{}", subid);
        Map<String, Object> resultMap = new HashMap<>();
smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
@@ -2636,7 +2636,6 @@
        <if test="longSendTime != null">
            AND DATE_FORMAT(long_send_time,'%y%m%d') &lt;= DATE_FORMAT(#{longSendTime},'%y%m%d')
        </if>
                       //
        <if test="deptOrDistrict == 1">
            <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0">
                AND leavehospitaldistrictcode IN
@@ -2873,6 +2872,15 @@
        FROM service_subtask
        WHERE del_flag = 0
        AND service_type = 4
        <if test="orgid != null and orgid != ''">
            and orgid = #{orgid}
        </if>
        <if test="sendstate != null">
            AND sendstate = #{sendstate}
        </if>
        <if test="isFinished != null and isFinished != '0'">
            AND finishtime is not null
        </if>
        <if test="starttime != null">AND starttime &gt;= #{starttime}</if>
        <if test="endtime != null">AND endtime &lt;= #{endtime}</if>
        <if test="visittime != null">AND DATE(visit_time) = DATE(#{visittime})</if>
@@ -2900,6 +2908,84 @@
        </choose>
    </select>
    <select id="gethelibraryCountHyperlink" parameterType="com.smartor.domain.ServiceSubtaskCountReq"
            resultMap="ServiceSubtaskResult">
        select id,
        visit_count,
        is_visit_again,
        type,
        orgid,
        drcode,
        drname,
        leavehospitaldistrictcode,
        leavehospitaldistrictname,
        deptcode,
        deptname,
        sendstate,
        preachform,
        current_preachform,
        excep,
        nurse_id,
        nurse_name,
        taskid,
        task_name,
        visit_time,
        finishtime,
        endtime,
        senddate,
        suggest,
        result,
        templateid,
        templatename,
        patid,
        sendname,
        send_type,
        recordid,
        exrecallcount,
        continue_flag,
        continue_time_now,
        continue_content,
        continue_count,
        continue_time_next,
        task_situation
        from service_subtask
        where 1=1
        and del_flag = 0
        AND service_type = 4
        <if test="orgid != null and orgid != ''">
            and orgid = #{orgid}
        </if>
        <if test="sendstate != null and isFinished != '0'">
            AND sendstate = #{sendstate}
        </if>
        <if test="isFinished != null">
            AND finishtime is not null
        </if>
        <if test="hospitaldistrictcodes != null and hospitaldistrictcodes.size() > 0">
            AND leavehospitaldistrictcode IN
            <foreach collection="hospitaldistrictcodes" item="hospitaldistrictcode" open="(" separator=","
                     close=")">
                #{hospitaldistrictcode}
            </foreach>
        </if>
        <if test="deptcodes != null and deptcodes.size() > 0">
            AND deptcode IN
            <foreach collection="deptcodes" item="deptcode" open="(" separator=","
                     close=")">
                #{deptcode}
            </foreach>
        </if>
        <if test="starttime != null">AND starttime &gt;= #{starttime}</if>
        <if test="endtime != null">AND endtime &lt;= #{endtime}</if>
        <if test="visittime != null">AND DATE(visit_time) = DATE(#{visittime})</if>
        <if test="finishtime != null">AND DATE(finishtime) = DATE(#{finishtime})</if>
        <if test="hospType != null and hospType != ''">AND hosp_type = #{hospType}</if>
        order by endtime desc
        <if test="pageSize != null  and pageNum != null">
            limit ${pageSize} OFFSET ${pageNum}
        </if>
    </select>
    <select id="statQuestionOption" resultType="com.smartor.domain.ServiceSubtaskDetailRatioExport">
        SELECT
        d.questiontext AS questiontext,