| | |
| | | @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)); |
| | | } |
| | | /** |
| | | * 发送短信模板 |