| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.github.pagehelper.ISelect; |
| | | import com.ruoyi.common.annotation.AddOrgId; |
| | | import com.ruoyi.common.annotation.Anonymous; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.constant.HttpStatus; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.domain.entity.SysDept; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.core.domain.entity.SysUserDept; |
| | | import com.ruoyi.common.core.domain.model.LoginUser; |
| | |
| | | import com.ruoyi.task.domain.VO.TransferDeptVO; |
| | | import com.ruoyi.task.domain.ServiceSubtaskExport; |
| | | import com.ruoyi.system.service.ISysConfigService; |
| | | import com.ruoyi.system.service.ISysDeptService; |
| | | import com.ruoyi.system.service.ISysUserDeptService; |
| | | |
| | | /** |
| | |
| | | |
| | | @Autowired |
| | | private ISysConfigService sysConfigService; |
| | | |
| | | @Autowired |
| | | private ISysDeptService sysDeptService; |
| | | |
| | | /** |
| | | * 任务运维触发能力。 |
| | |
| | | public AjaxResult querySubtaskList(@RequestBody ServiceSubtaskVO serviceSubtaskVO) { |
| | | ServiceSubtaskEntity serviceSubtaskEntity = DtoConversionUtils.sourceToTarget(serviceSubtaskVO, ServiceSubtaskEntity.class); |
| | | serviceSubtaskEntity.setContinueContent(ObjectUtils.isNotEmpty(serviceSubtaskVO.getContinueContent()) ? serviceSubtaskVO.getContinueContent().toString() : null); |
| | | PageUtils.startPageByPost(serviceSubtaskEntity.getPageNum(), serviceSubtaskEntity.getPageSize()); |
| | | serviceSubtaskService.selectServiceSubtaskList(serviceSubtaskEntity); |
| | | // 该 SQL 已内置 limit ${pageSize} OFFSET ${pageNum},不再走 PageHelper,避免两套分页叠加产生两个 LIMIT |
| | | return success(serviceSubtaskService.selectServiceSubtaskList(serviceSubtaskEntity)); |
| | | } |
| | | |
| | |
| | | public TableDataInfo querySubtaskListAgain(@RequestBody ServiceSubtaskVO serviceSubtaskVO) { |
| | | ServiceSubtaskEntity serviceSubtaskEntity = DtoConversionUtils.sourceToTarget(serviceSubtaskVO, ServiceSubtaskEntity.class); |
| | | serviceSubtaskEntity.setContinueContent(ObjectUtils.isNotEmpty(serviceSubtaskVO.getContinueContent()) ? serviceSubtaskVO.getContinueContent().toString() : null); |
| | | // 该 SQL 未内置 limit,使用 PageHelper 分页;只调用一次,getDataTable 可基于 Page 取到正确 total |
| | | PageUtils.startPageByPost(serviceSubtaskEntity.getPageNum(), serviceSubtaskEntity.getPageSize()); |
| | | serviceSubtaskService.selectServiceSubtaskListAgain(serviceSubtaskEntity); |
| | | return getDataTable(serviceSubtaskService.selectServiceSubtaskListAgain(serviceSubtaskEntity)); |
| | | } |
| | | |
| | |
| | | return getDataTable4(CollectionUtils.isEmpty(sfStatistics) ? sfStatistics.size() : 0, serviceSubtaskService.getSfStatistics(serviceSubtaskCountReq)); |
| | | } |
| | | |
| | | // ===================================================================================== |
| | | // 免登录随访统计(供 public/html/sfstat.html 独立页面使用,@Anonymous 即 SecurityConfig 的 permitAll) |
| | | // 口径与 /getSfStatistics 完全一致,区别只有两点: |
| | | // 1. 不依赖登录用户,orgid / campusid 由请求体显式传入; |
| | | // 2. 未指定病区(科室)时,取该机构(院区)下的全部病区(科室),而非当前登录用户的权限范围。 |
| | | // ===================================================================================== |
| | | |
| | | /** |
| | | * 免登录:随访统计(首次 / 再次) |
| | | */ |
| | | @Anonymous |
| | | @PostMapping("/publicSfStatistics") |
| | | public Map<String, Object> publicSfStatistics(@RequestBody ServiceSubtaskCountReq serviceSubtaskCountReq) { |
| | | if (CollectionUtils.isEmpty(serviceSubtaskCountReq.getServiceType())) { |
| | | return error("服务类型不能为空"); |
| | | } |
| | | if (StringUtils.isEmpty(serviceSubtaskCountReq.getOrgid())) { |
| | | return error("缺少机构参数 orgid"); |
| | | } |
| | | Integer statisticaltype = serviceSubtaskCountReq.getStatisticaltype(); |
| | | if (statisticaltype != null && statisticaltype == 1) { |
| | | List<String> wardCodes = isAllSelected(serviceSubtaskCountReq.getLeavehospitaldistrictcodes()) |
| | | ? listDeptCodesByType(serviceSubtaskCountReq.getOrgid(), serviceSubtaskCountReq.getCampusid(), "2") |
| | | : serviceSubtaskCountReq.getLeavehospitaldistrictcodes(); |
| | | if (CollectionUtils.isEmpty(wardCodes)) { |
| | | return getDataTable4(0, new ArrayList<>()); |
| | | } |
| | | serviceSubtaskCountReq.setLeavehospitaldistrictcodes(wardCodes); |
| | | serviceSubtaskCountReq.setDeptcodes(null); |
| | | } else if (statisticaltype != null && statisticaltype == 2) { |
| | | List<String> deptCodes = isAllSelected(serviceSubtaskCountReq.getDeptcodes()) |
| | | ? listDeptCodesByType(serviceSubtaskCountReq.getOrgid(), serviceSubtaskCountReq.getCampusid(), "1") |
| | | : serviceSubtaskCountReq.getDeptcodes(); |
| | | if (CollectionUtils.isEmpty(deptCodes)) { |
| | | return getDataTable4(0, new ArrayList<>()); |
| | | } |
| | | serviceSubtaskCountReq.setDeptcodes(deptCodes); |
| | | serviceSubtaskCountReq.setLeavehospitaldistrictcodes(null); |
| | | } |
| | | String followUpCountStyle = sysConfigService.selectConfigByKey("followUpCountStyle", serviceSubtaskCountReq.getOrgid()); |
| | | if (ObjectUtils.isNotEmpty(followUpCountStyle)) { |
| | | serviceSubtaskCountReq.setFollowUpCountStyle(followUpCountStyle); |
| | | } else { |
| | | serviceSubtaskCountReq.setFollowUpCountStyle("1"); |
| | | } |
| | | if (serviceSubtaskCountReq.getRateDay() == null) { |
| | | serviceSubtaskCountReq.setRateDay(7); |
| | | } |
| | | serviceSubtaskCountReq.setPageNum(null); |
| | | serviceSubtaskCountReq.setPageSize(null); |
| | | List<ServiceSubtaskStatistic> sfStatistics = serviceSubtaskService.getSfStatistics(serviceSubtaskCountReq); |
| | | return getDataTable4(CollectionUtils.isEmpty(sfStatistics) ? 0 : sfStatistics.size(), sfStatistics); |
| | | } |
| | | |
| | | /** |
| | | * 免登录:随访统计筛选项(病区列表 / 科室列表) |
| | | * |
| | | * @param orgid 机构ID,必填 |
| | | * @param campusid 院区ID,可为空;为空时取该机构全部院区 |
| | | */ |
| | | @Anonymous |
| | | @GetMapping("/publicSfStatisticsOptions") public AjaxResult publicSfStatisticsOptions(@RequestParam(value = "orgid", required = false) String orgid, |
| | | @RequestParam(value = "campusid", required = false) String campusid) { |
| | | if (StringUtils.isEmpty(orgid)) { |
| | | return error("缺少机构参数 orgid"); |
| | | } |
| | | Map<String, Object> result = new LinkedHashMap<>(); |
| | | result.put("orgid", orgid); |
| | | result.put("campusid", campusid); |
| | | result.put("wards", listDepts(orgid, campusid, "2")); |
| | | result.put("depts", listDepts(orgid, campusid, "1")); |
| | | return success(result); |
| | | } |
| | | |
| | | /** |
| | | * 免登录:延续护理统计(口径与 /getContinueNerseCount 一致,orgid / campusid 由请求体传入) |
| | | */ |
| | | @Anonymous |
| | | @PostMapping("/publicContinueNerseCount") |
| | | public AjaxResult publicContinueNerseCount(@RequestBody ServiceSubtaskCotinueCountVO serviceSubtaskCotinueCountVO) { |
| | | if (StringUtils.isEmpty(serviceSubtaskCotinueCountVO.getOrgid())) { |
| | | return error("缺少机构参数 orgid"); |
| | | } |
| | | List<String> districts = serviceSubtaskCotinueCountVO.getLeavehospitaldistrictcodes(); |
| | | List<String> depts = serviceSubtaskCotinueCountVO.getDeptcodes(); |
| | | boolean hasDistrict = !CollectionUtils.isEmpty(districts) && !districts.contains("all"); |
| | | boolean hasDept = !CollectionUtils.isEmpty(depts) && !depts.contains("all"); |
| | | if (hasDistrict && hasDept) { |
| | | return error("病区Code集合与科室Code集合互斥,不能同时传入"); |
| | | } |
| | | if (!hasDistrict && !hasDept) { |
| | | // 未指定病区/科室:按该机构(院区)下全部病区统计 |
| | | List<String> wardCodes = listDeptCodesByType(serviceSubtaskCotinueCountVO.getOrgid(), |
| | | serviceSubtaskCotinueCountVO.getCampusid(), "2"); |
| | | if (CollectionUtils.isEmpty(wardCodes)) { |
| | | return success(new LinkedHashMap<>()); |
| | | } |
| | | serviceSubtaskCotinueCountVO.setLeavehospitaldistrictcodes(wardCodes); |
| | | serviceSubtaskCotinueCountVO.setDeptcodes(null); |
| | | } else if (hasDistrict) { |
| | | serviceSubtaskCotinueCountVO.setDeptcodes(null); |
| | | } else { |
| | | serviceSubtaskCotinueCountVO.setLeavehospitaldistrictcodes(null); |
| | | } |
| | | return success(serviceSubtaskService.getContinueNurseCount(serviceSubtaskCotinueCountVO)); |
| | | } |
| | | |
| | | /** |
| | | * 前端未选择具体病区/科室(或选择了 all)时,视为“全部” |
| | | */ |
| | | private boolean isAllSelected(List<String> codes) { |
| | | return CollectionUtils.isEmpty(codes) || codes.contains("all"); |
| | | } |
| | | |
| | | private List<String> listDeptCodesByType(String orgid, String campusid, String deptType) { |
| | | List<String> codes = new ArrayList<>(); |
| | | for (Map<String, String> item : listDepts(orgid, campusid, deptType)) { |
| | | codes.add(item.get("code")); |
| | | } |
| | | return codes; |
| | | } |
| | | |
| | | /** |
| | | * 查询机构(院区)下指定类型的部门:deptType=2 病区,deptType=1 科室 |
| | | */ |
| | | private List<Map<String, String>> listDepts(String orgid, String campusid, String deptType) { |
| | | List<Map<String, String>> result = new ArrayList<>(); |
| | | SysDept query = new SysDept(); |
| | | query.setOrgid(orgid); |
| | | query.setDeptType(deptType); |
| | | if (StringUtils.isNotEmpty(campusid) && !"all".equalsIgnoreCase(campusid)) { |
| | | query.setCampusid(campusid); |
| | | } |
| | | List<SysDept> depts = sysDeptService.selectSysDeptList(query); |
| | | if (CollectionUtils.isEmpty(depts)) { |
| | | return result; |
| | | } |
| | | for (SysDept dept : depts) { |
| | | if (StringUtils.isEmpty(dept.getDeptCode())) { |
| | | continue; |
| | | } |
| | | Map<String, String> item = new LinkedHashMap<>(); |
| | | item.put("code", dept.getDeptCode()); |
| | | item.put("name", dept.getDeptName()); |
| | | result.add(item); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 获取专病随访统计比例 |
| | | */ |
| | |
| | | * 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 |
| | |
| | | * taskSituation4Info - taskSituation = 4 |
| | | * 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 |
| | | * |
| | | */ |
| | |
| | | log.error(logInfo); |
| | | return error(logInfo); |
| | | } |
| | | // 分类统计为汇总结果,不参与分页;同时避免 pageNum/pageSize 影响分组 key 的收集。 |
| | | serviceSubtaskCountReq.setPageNum(null); |
| | | serviceSubtaskCountReq.setPageSize(null); |
| | | List<ServiceSubtaskStatistic> serviceSubtaskStatistics = serviceSubtaskService.getSfStatisticsScript(serviceSubtaskCountReq); |
| | | return success(serviceSubtaskStatistics); |
| | | } |
| | |
| | | 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; |
| | | } |
| | | |
| | | @ApiOperation("获取随访分类统计明细详情超链接") |
| | | @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 = "getSfStatisticsCountDetailsHyperLink-参数 " + configKey + " 未配置, 请配置好后重试"; |
| | | log.error(logInfo); |
| | | return error(logInfo); |
| | | } |
| | | } |
| | | |
| | | return success(serviceSubtaskService.getSfStatisticsScriptDetailsHyperlink(serviceSubtaskCountReq)); |
| | | } |
| | | /** |
| | | * 发送短信模板 |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * 统计任务各种状态的数量(优化版) |
| | | * 统计任务各种状态的数量(优化版)-【随访工作台】 |
| | | * |
| | | * @param soonTimeoutHours 即将超时时间(小时),默认 48 |
| | | * @return Map<String, Object> 包含各状态统计数据 |
| | | * pendingVisitCount: 当前登录人截止今日待随访总量 |
| | | * failedVisitCount: 当前登录人随访任务失败总量 |
| | | * abnormalVisitVount: 当前登录人随访任务异常总量 |
| | | * allVisitCount: 当前登录人随访任务总量 |
| | | * soonTimeoutCount: 当前登录人即将超时数量(超时截止时间在 soonTimeoutHours 小时内) |
| | | */ |
| | | @ApiOperation("获取当前用户随访数量统计") |
| | | @PostMapping("/getCurrentUserServiceSubtaskCount") |
| | | public Map<String, Object> getCurrentUserServiceSubtaskCount() { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | LoginUser loginUser = getLoginUser(); |
| | | public Map<String, Object> getCurrentUserServiceSubtaskCount( |
| | | @RequestParam(value = "soonTimeoutHours", required = false, defaultValue = "48") Integer soonTimeoutHours) { |
| | | LoginUser loginUser = SecurityUtils.getLoginUser(); |
| | | if (loginUser == null || loginUser.getUser() == null) { |
| | | return new HashMap<>(); |
| | | } |
| | | SysUser sysUser = loginUser.getUser(); |
| | | SysUserDept sysUserDept = new SysUserDept(); |
| | | sysUserDept.setUserId(sysUser.getUserId()); |
| | | sysUserDept.setOrgid(sysUser.getOrgid()); |
| | | sysUserDept.setCampusid(sysUser.getCampusid()); |
| | | sysUserDept.setDeptType("1"); |
| | | List<SysUserDept> sysUserDepts = sysUserDeptService.selectSysUserDeptList(sysUserDept); |
| | | SysUserDept sysUserWard = new SysUserDept(); |
| | | sysUserWard.setUserId(sysUser.getUserId()); |
| | | sysUserWard.setOrgid(sysUser.getOrgid()); |
| | | sysUserWard.setCampusid(sysUser.getCampusid()); |
| | | sysUserWard.setDeptType("2"); |
| | | List<SysUserDept> sysUserWards = sysUserDeptService.selectSysUserDeptList(sysUserWard); |
| | | List<String> deptCodes = sysUserDepts.stream().map(SysUserDept::getDeptCode).collect(Collectors.toList()); |
| | | List<String> wardCodes = sysUserWards.stream().map(SysUserDept::getDeptCode).collect(Collectors.toList()); |
| | | List<String> deptCodes = CollectionUtils.emptyIfNull(sysUser.getBelongDepts()).stream() |
| | | .map(item -> item.get("deptCode")) |
| | | .filter(Objects::nonNull) // 剔除null |
| | | .map(Object::toString) |
| | | .collect(Collectors.toList()); |
| | | List<String> wardCodes = CollectionUtils.emptyIfNull(sysUser.getBelongWards()).stream() |
| | | .map(item -> item.get("districtCode")) |
| | | .filter(Objects::nonNull) // 剔除null |
| | | .map(Object::toString) |
| | | .collect(Collectors.toList()); |
| | | ServiceSubtaskEntity entity = new ServiceSubtaskEntity(); |
| | | entity.setOrgid(sysUser.getOrgid()); |
| | | entity.setLeaveldeptcodes(deptCodes); |
| | | entity.setLeavehospitaldistrictcodes(wardCodes); |
| | | if (ObjectUtils.isNotEmpty(sysUser)) { |
| | | if (!("admin").equals(sysUser.getUserName())) { |
| | | if (ObjectUtils.isNotEmpty(sysUserWards) && ObjectUtils.isNotEmpty(sysUserDepts)) { |
| | | map = serviceSubtaskService.getCurrentUserServiceSubtaskCount(entity); |
| | | } |
| | | } else { |
| | | map = serviceSubtaskService.getCurrentUserServiceSubtaskCount(entity); |
| | | } |
| | | entity.setSoonTimeoutHours(soonTimeoutHours); |
| | | // admin 查看全院;非 admin 只要配置了科室或病区任一维度即可查询(SQL 中为 OR 关系) |
| | | boolean isAdmin = "admin".equals(sysUser.getUserName()); |
| | | if (isAdmin || CollectionUtils.isNotEmpty(deptCodes) || CollectionUtils.isNotEmpty(wardCodes)) { |
| | | return serviceSubtaskService.getCurrentUserServiceSubtaskCount(entity); |
| | | } |
| | | return map; |
| | | // 非 admin 且未配置任何科室/病区权限时,返回默认 0 值,避免前端取不到 key |
| | | Map<String, Object> empty = new HashMap<>(); |
| | | empty.put("pendingVisitCount", 0); |
| | | empty.put("failedVisitCount", 0); |
| | | empty.put("abnormalVisitCount", 0); |
| | | empty.put("warnningVisitCount", 0); |
| | | empty.put("allVisitCount", 0); |
| | | empty.put("soonTimeoutCount", 0); |
| | | return empty; |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * 手动发送问卷模板的微信功能 |
| | | * |
| | | * @param subid |
| | | * @return |
| | | */ |
| | | @GetMapping(value = "/weChatSubTask/{subid}") |
| | | public Map<String, Object> weChatSubTask(@PathVariable("subid") Long subid) { |
| | | return serviceSubtaskService.weChatSubTask(subid); |
| | | } |
| | | |
| | | /** |
| | | * 跳转中间页 |
| | | * |
| | | * @param taskId |
| | |
| | | */ |
| | | @PostMapping(value = "/scanGenerateSubtask") |
| | | public AjaxResult scanGenerateSubtask(@RequestBody ServiceTask serviceTask) { |
| | | return AjaxResult.success(serviceSubtaskService.scanGenerateSubtask(serviceTask)); |
| | | String url = serviceSubtaskService.scanGenerateSubtask(serviceTask); |
| | | // data 为空必须回 code=500:前端只看 code,200 + 空串会被误当成「生成成功但没链接」 |
| | | if (StringUtils.isEmpty(url)) { |
| | | return AjaxResult.error("扫码生成任务失败:未取到二维码链接"); |
| | | } |
| | | return AjaxResult.success(url); |
| | | } |
| | | |
| | | @PostMapping("/syncMedInhospForShiyi") |