陈昶聿
7 天以前 fc1f48f6cb2736bf03b7750563e5d9830d6fd4ba
ruoyi-task/src/main/java/com/ruoyi/task/controller/ServiceSubtaskController.java
@@ -1009,26 +1009,35 @@
    @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid")
    @PostMapping("/getSfStatisticsCountDetailsHyperLink")
    public AjaxResult getSfStatisticsCountDetailsHyperLink(@RequestBody ServiceSubtaskCountReq serviceSubtaskCountReq) {
        Integer statisticaltype = serviceSubtaskCountReq.getStatisticaltype();
        if (statisticaltype != null && statisticaltype != 1 && statisticaltype != 2 && statisticaltype != 3) {
            return error("统计维度statisticaltype仅支持:1-按病区 2-按科室 3-按taskid");
        }
        if (serviceSubtaskCountReq.getScriptid() == null
                && StringUtils.isEmpty(serviceSubtaskCountReq.getScriptContent())) {
            return error("问题ID(scriptid)不能为空");
        }
        if (serviceSubtaskCountReq.getOptionText() == null) {
            return error("问题选项(optionText)不能为空");
        }
        LoginUser loginUser = getLoginUser();
        String orgid = loginUser.getUser().getOrgid();
        serviceSubtaskCountReq.setOrgid(orgid);
        // 与 getSfStatisticsCountDetails 保持相同的配置筛选口径
        String configKey = serviceSubtaskCountReq.getConfigKey();
        if (StringUtils.isNotEmpty(configKey)) {
            String configValue = sysConfigService.selectConfigByKey(configKey, orgid);
            serviceSubtaskCountReq.setConfigValue(configValue);
            if (StringUtils.isEmpty(configValue)) {
                String logInfo = "getSfStatisticsCount-参数 " + configKey + " 未配置, 请配置好后重试";
                String logInfo = "getSfStatisticsCountDetailsHyperLink-参数 " + configKey + " 未配置, 请配置好后重试";
                log.error(logInfo);
                return error(logInfo);
            }
        }
        String followUpCountStyle = sysConfigService.selectConfigByKey("followUpCountStyle", orgid);
        if (ObjectUtils.isNotEmpty(followUpCountStyle)) {
            serviceSubtaskCountReq.setFollowUpCountStyle(followUpCountStyle);
        } else {
            serviceSubtaskCountReq.setFollowUpCountStyle("1");
        }
        return success(serviceSubtaskService.getSfStatisticsHyperlink(serviceSubtaskCountReq));
        return success(serviceSubtaskService.getSfStatisticsScriptDetailsHyperlink(serviceSubtaskCountReq));
    }
    /**
     * 发送短信模板