陈昶聿
4 天以前 eb845e8be695ed1280a7cbf854a4d1dedf9db30d
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java
@@ -691,6 +691,10 @@
     * manualInfo - visitCount = 1 && currentPreachForm = "1"
     * voiceInfo - visitCount = 1 && currentPreachForm = "3"
     * smsInfo - visitCount = 1 && currentPreachForm = "4"
     * manualSuccessInfo - visitCount = 1 && currentPreachForm = "1" && sendstate = 6
     * voiceSuccessInfo - visitCount = 1 && currentPreachForm = "3" && sendstate = 6
     * smsSuccessInfo - visitCount = 1 && currentPreachForm = "4" && sendstate = 6
     * wechatSuccessInfo - visitCount = 1 && currentPreachForm = "5" && sendstate = 6
     * wechatInfo - visitCount = 1 && currentPreachForm = "5"
     * abnormalInfo - visitCount = 1 && excep = "1"
     * needFollowUpAgainInfo - visitCount > 1 && sendstate != 4
@@ -709,6 +713,18 @@
     * taskSituation5Info - taskSituation = 5
     * taskSituation6Info - taskSituation = 7
     * manuallyCalledInfo - isManuallyCalled = 1L
     * manualCallTimeoutInfo - visitCount = 1 && sendstate = 7 && isManuallyCalled = 0
     * manualCallTimeoutAgainInfo - visitCount > 1 && sendstate = 7 && isManuallyCalled = 0
     * pendingFollowUpAllInfo - visitCount = 1 && sendstate in (1,2,3,7)
     * pendingFollowUpAllAgainInfo - visitCount > 1 && sendstate in (1,2,3,7)
     * pendingFollowUpWaitSendInfo - visitCount = 1 && sendstate in (1,2)
     * pendingFollowUpWaitSendAgainInfo - visitCount > 1 && sendstate in (1,2)
     * pendingFollowUpSentInfo - visitCount = 1 && sendstate in (3,7)
     * pendingFollowUpSentAgainInfo - visitCount > 1 && sendstate in (3,7)
     * sentInfo - visitCount = 1 && sendstate = 3
     * sentAgainInfo - visitCount > 1 && sendstate = 3
     * firstDischargeCountInfo - visitCount = 1
     * againFollowUpPushCountInfo - visitCount = 2 && visitDeptCode = sys.smartor.center.dept
     * filterCountList - taskSituation = 6 && sendstate = 4
     *
     */
@@ -811,8 +827,18 @@
        LoginUser loginUser = getLoginUser();
        String orgid = loginUser.getUser().getOrgid();
        serviceSubtaskCountReq.setOrgid(orgid);
        PageUtils.startPageByPost(serviceSubtaskCountReq.getPageNum(), serviceSubtaskCountReq.getPageSize());
        return success(serviceSubtaskService.getSfStatisticsScriptDetails(serviceSubtaskCountReq));
        //注意:这里不能再调用 PageUtils.startPageByPost。
        //返回结构是 Map,且不传 type 时会执行两条 SQL,PageHelper 只作用于第一条 SQL,
        //分页已放到 Service 里按题目(scriptid)完成,保证 total 是题目总数。
        Map<String, Object> details = serviceSubtaskService.getSfStatisticsScriptDetails(serviceSubtaskCountReq);
        AjaxResult ajax = success(details.get("data"));
        //兼容旧前端:data 仍然是 {scriptid: 题目} 的 Map;
        //同时按 RuoYi 习惯补上 rows/total/pageNum/pageSize 方便前端分页
        ajax.put("rows", details.get("rows"));
        ajax.put("total", details.get("total"));
        ajax.put("pageNum", details.get("pageNum"));
        ajax.put("pageSize", details.get("pageSize"));
        return ajax;
    }
    /**
@@ -908,6 +934,17 @@
    }
    /**
     * 手动发送问卷模板的微信功能
     *
     * @param subid
     * @return
     */
    @GetMapping(value = "/weChatSubTask/{subid}")
    public Map<String, Object> weChatSubTask(@PathVariable("subid") Long subid) {
        return serviceSubtaskService.weChatSubTask(subid);
    }
    /**
     * 跳转中间页
     *
     * @param taskId