1.处理修改service_task时,子任务删除,未将出院数据还原的问题;
2.新增省立同德满意度接口
3.处理患者基本信息并发新增的问题
| | |
| | | PatSatisfactionResVO statistics = patSatisfactionService.statistics(patSatisfactionReqVO); |
| | | return getDataTable3(CollectionUtils.isNotEmpty(statistics.getPatSatisfactionDetailEntities()) ? statistics.getPatSatisfactionDetailEntities().size() : 0, statistics); |
| | | } |
| | | |
| | | /** |
| | | /** |
| | | * æ£è
满æåº¦ç»è®¡ï¼ç»´åº¦ï¼ |
| | | */ |
| | | @ApiOperation("æ£è
满æåº¦ç»è®¡ï¼ç»´åº¦ï¼") |
| | | @PostMapping("/statisticsByDimension") |
| | | public Map<String, Object> statisticsByDimension(@RequestBody PatSatisfactionReqVO patSatisfactionReqVO) { |
| | | //å端ä¸åå页äºï¼ç±å端å |
| | | PatSatisfactionResVO statistics = patSatisfactionService.statisticsByDimension(patSatisfactionReqVO); |
| | | return getDataTable3(CollectionUtils.isNotEmpty(statistics.getPatSatisfactionDetailEntities()) ? statistics.getPatSatisfactionDetailEntities().size() : 0, statistics); |
| | | } |
| | | /** |
| | | * æ£è
满æåº¦æ±ç¶å¾ä¿¡æ¯ |
| | | */ |
| | | @ApiOperation("æ£è
满æåº¦æ±ç¶å¾ä¿¡æ¯") |
| | | @ApiOperation("æ£è
满æåº¦æ±ç¶å¾ä¿¡æ¯ï¼åç±»)") |
| | | @PostMapping("/satisfactionGraph") |
| | | public Map<String, Object> satisfactionGraph(@RequestBody PatSatisfactionReqVO patSatisfactionReqVO) { |
| | | Map<String, Object> patSatisfactionGraphResVOS = patSatisfactionService.satisfactionGraph(patSatisfactionReqVO); |
| | | return getDataTable3(0, patSatisfactionGraphResVOS); |
| | | } |
| | | |
| | | /** |
| | | * æ£è
满æåº¦æ±ç¶å¾ä¿¡æ¯ |
| | | */ |
| | | @ApiOperation("æ£è
满æåº¦æ±ç¶å¾ä¿¡æ¯(维度)") |
| | | @PostMapping("/satisfactionGraphDimension") |
| | | public Map<String, Object> satisfactionGraphDimension(@RequestBody PatSatisfactionReqVO patSatisfactionReqVO) { |
| | | Map<String, Object> patSatisfactionGraphResVOS = patSatisfactionService.satisfactionGraphDimension(patSatisfactionReqVO); |
| | | return getDataTable3(0, patSatisfactionGraphResVOS); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.enums.PreachFormEnum; |
| | | import com.ruoyi.common.enums.SendStateEnum; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.DtoConversionUtils; |
| | |
| | | for (ServiceSubtaskExport serviceSubtaskExport : serviceSubtaskExports) { |
| | | String pf = PreachFormEnum.getDescByCode(serviceSubtaskExport.getPreachform()); |
| | | serviceSubtaskExport.setPreachform(pf); |
| | | if(serviceSubtaskExport.getSendstate() != null) { |
| | | String stName = SendStateEnum.getDescByCode("" + serviceSubtaskExport.getSendstate()); |
| | | serviceSubtaskExport.setStName(stName); |
| | | } |
| | | |
| | | //计ç®åºé¢å¤©æ° |
| | | if (!Objects.isNull(serviceSubtaskExport.getEndtime())) { |
| | |
| | | // List<ServiceTask> list = serviceTaskService.selectServiceTaskList(serviceTask); |
| | | List<ServiceTask> list = serviceTaskService.selectServiceTaskAndtaskDeptList(serviceTask); |
| | | List<ServiceTaskVO> serviceTaskVOS = DtoConversionUtils.sourceToTarget(list, ServiceTaskVO.class); |
| | | |
| | | List<Long> taskIds = list.stream().map(ServiceTask::getTaskid).collect(Collectors.toList()); |
| | | |
| | | ServiceSubtaskEntity serviceSubtaskEntity = new ServiceSubtaskEntity(); |
| | | serviceSubtaskEntity.setTaskIds(taskIds); |
| | | serviceSubtaskEntity.setStartOutHospTime(serviceTask.getStartOutHospTime()); |
| | | serviceSubtaskEntity.setEndOutHospTime(serviceTask.getEndOutHospTime()); |
| | | // æ¹éæ¥è¯¢ææåä»»å¡ |
| | | Map<String, List<ServiceSubtask>> subtaskMap = iServiceSubtaskService |
| | | .selectServiceSubtaskList(serviceSubtaskEntity) |
| | | .stream() |
| | | .filter(subtask -> subtask.getTaskid() != null) // æ·»å è¿æ»¤ |
| | | .collect(Collectors.groupingBy(subtask -> Optional.of(subtask.getTaskid().toString()).orElse("Unknown"))); |
| | | // |
| | | // List<Long> taskIds = list.stream().map(ServiceTask::getTaskid).collect(Collectors.toList()); |
| | | // |
| | | // ServiceSubtaskEntity serviceSubtaskEntity = new ServiceSubtaskEntity(); |
| | | // serviceSubtaskEntity.setTaskIds(taskIds); |
| | | // serviceSubtaskEntity.setStartOutHospTime(serviceTask.getStartOutHospTime()); |
| | | // serviceSubtaskEntity.setEndOutHospTime(serviceTask.getEndOutHospTime()); |
| | | // // æ¹éæ¥è¯¢ææåä»»å¡ |
| | | // Map<String, List<ServiceSubtask>> subtaskMap = iServiceSubtaskService |
| | | // .selectServiceSubtaskList(serviceSubtaskEntity) |
| | | // .stream() |
| | | // .filter(subtask -> subtask.getTaskid() != null) // æ·»å è¿æ»¤ |
| | | // .collect(Collectors.groupingBy(subtask -> Optional.of(subtask.getTaskid().toString()).orElse("Unknown"))); |
| | | |
| | | |
| | | if (CollectionUtils.isNotEmpty(serviceTaskVOS)) { |
| | | for (ServiceTaskVO taskVO : serviceTaskVOS) { |
| | | List<ServiceSubtask> subtasks = subtaskMap.getOrDefault(taskVO.getTaskid().toString(), Collections.emptyList()); |
| | | |
| | | if (CollectionUtils.isNotEmpty(subtasks)) { |
| | | //å·²åéï¼åä»»å¡ä¸ç sendstate=1为被é¢åï¼ |
| | | long yfs = subtasks.stream().filter(s -> s.getSendstate() != null && |
| | | (s.getSendstate() >= 3L || s.getSendstate() == 1L)).count(); |
| | | //æªåé |
| | | long wfs = subtasks.stream().filter(s -> s.getSendstate() != null && |
| | | s.getSendstate() == 2L).count(); |
| | | taskVO.setYfs(yfs); |
| | | taskVO.setWfs(wfs); |
| | | |
| | | } |
| | | |
| | | } |
| | | // for (ServiceTaskVO taskVO : serviceTaskVOS) { |
| | | // List<ServiceSubtask> subtasks = subtaskMap.getOrDefault(taskVO.getTaskid().toString(), Collections.emptyList()); |
| | | // |
| | | // if (CollectionUtils.isNotEmpty(subtasks)) { |
| | | // //å·²åéï¼åä»»å¡ä¸ç sendstate=1为被é¢åï¼ |
| | | // long yfs = subtasks.stream().filter(s -> s.getSendstate() != null && |
| | | // (s.getSendstate() >= 3L || s.getSendstate() == 1L)).count(); |
| | | // //æªåé |
| | | // long wfs = subtasks.stream().filter(s -> s.getSendstate() != null && |
| | | // s.getSendstate() == 2L).count(); |
| | | // taskVO.setYfs(yfs); |
| | | // taskVO.setWfs(wfs); |
| | | // |
| | | // } |
| | | // |
| | | // } |
| | | //è·åtotal |
| | | long total = PageUtils.count(new ISelect() { |
| | | @Override |
| | |
| | | package com.ruoyi.web.controller.smartor; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import com.ruoyi.common.annotation.AddOrgId; |
| | | import io.swagger.annotations.Api; |
| | |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢æ¨¡æ¿ç§å®¤å
³èå表ä¸å页 |
| | | */ |
| | | @ApiOperation("æ¥è¯¢æ¨¡æ¿ç§å®¤å
³èå表ä¸å页") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:taskdiag:list')") |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("listnopage") |
| | | public Map<String, Object> listnopage(@RequestBody ServiceTaskdiag serviceTaskdiag) { |
| | | List<ServiceTaskdiag> list = serviceTaskdiagService.selectServiceTaskdiagList(serviceTaskdiag); |
| | | return getDataTable3(CollectionUtils.isEmpty(list) ? 0 : list.size(), list); |
| | | } |
| | | |
| | | /** |
| | | * å¯¼åºæ¨¡æ¿ç§å®¤å
³èå表 |
| | | */ |
| | | @ApiOperation("å¯¼åºæ¨¡æ¿ç§å®¤å
³èå表") |
| | |
| | | package com.ruoyi.web.controller.system; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.ruoyi.common.annotation.AddOrgId; |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/system/dict/data") |
| | | public class SysDictDataController extends BaseController |
| | | { |
| | | public class SysDictDataController extends BaseController { |
| | | @Autowired |
| | | private ISysDictDataService dictDataService; |
| | | |
| | |
| | | |
| | | //@PreAuthorize("@ss.hasPermi('system:dict:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(SysDictData dictData) |
| | | { |
| | | public TableDataInfo list(SysDictData dictData) { |
| | | startPage(); |
| | | List<SysDictData> list = dictDataService.selectDictDataList(dictData); |
| | | return getDataTable(list); |
| | |
| | | @Log(title = "åå
¸æ°æ®", businessType = BusinessType.EXPORT) |
| | | //@PreAuthorize("@ss.hasPermi('system:dict:export')") |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, SysDictData dictData) |
| | | { |
| | | public void export(HttpServletResponse response, SysDictData dictData) { |
| | | List<SysDictData> list = dictDataService.selectDictDataList(dictData); |
| | | ExcelUtil<SysDictData> util = new ExcelUtil<SysDictData>(SysDictData.class); |
| | | util.exportExcel(response, list, "åå
¸æ°æ®"); |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:dict:query')") |
| | | @GetMapping(value = "/{dictCode}") |
| | | public AjaxResult getInfo(@PathVariable Long dictCode) |
| | | { |
| | | public AjaxResult getInfo(@PathVariable Long dictCode) { |
| | | return success(dictDataService.selectDictDataById(dictCode)); |
| | | } |
| | | |
| | |
| | | * æ ¹æ®åå
¸ç±»åæ¥è¯¢åå
¸æ°æ®ä¿¡æ¯ |
| | | */ |
| | | @GetMapping(value = "/type/{dictType}") |
| | | public AjaxResult dictType(@PathVariable String dictType) |
| | | { |
| | | public AjaxResult dictType(@PathVariable String dictType) { |
| | | List<SysDictData> data = dictTypeService.selectDictDataByType(dictType); |
| | | if (StringUtils.isNull(data)) |
| | | { |
| | | if (StringUtils.isNull(data)) { |
| | | data = new ArrayList<SysDictData>(); |
| | | } |
| | | return success(data); |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®åå
¸ç±»åæ¥è¯¢åå
¸æ°æ®ä¿¡æ¯(å¤é¾) |
| | | */ |
| | | @GetMapping(value = "/typeout/{dictType}") |
| | | public AjaxResult dictTypeOut(@PathVariable String dictType) { |
| | | if (dictType == null) return error(); |
| | | List<SysDictData> data = dictTypeService.selectDictDataByType(dictType); |
| | | if (StringUtils.isNull(data) || data.isEmpty()) { |
| | | return error("åå
¸æ°æ®ä¸åå¨"); |
| | | } |
| | | |
| | | List<Map<String, Object>> list = data.stream().map(item -> { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("dictLabel", item.getDictLabel()); |
| | | map.put("dictValue", item.getDictValue()); |
| | | map.put("listClass", item.getListClass()); |
| | | return map; |
| | | }).collect(Collectors.toList()); |
| | | return success(list); |
| | | } |
| | | |
| | | /** |
| | |
| | | @Log(title = "åå
¸æ°æ®", businessType = BusinessType.INSERT) |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@Validated @RequestBody SysDictData dict) |
| | | { |
| | | public AjaxResult add(@Validated @RequestBody SysDictData dict) { |
| | | dict.setCreateBy(getUsername()); |
| | | return toAjax(dictDataService.insertDictData(dict)); |
| | | } |
| | |
| | | @Log(title = "åå
¸æ°æ®", businessType = BusinessType.UPDATE) |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@Validated @RequestBody SysDictData dict) |
| | | { |
| | | public AjaxResult edit(@Validated @RequestBody SysDictData dict) { |
| | | dict.setUpdateBy(getUsername()); |
| | | return toAjax(dictDataService.updateDictData(dict)); |
| | | } |
| | |
| | | //@PreAuthorize("@ss.hasPermi('system:dict:remove')") |
| | | @Log(title = "åå
¸ç±»å", businessType = BusinessType.DELETE) |
| | | @GetMapping("/remove/{dictCodes}") |
| | | public AjaxResult remove(@PathVariable Long[] dictCodes) |
| | | { |
| | | public AjaxResult remove(@PathVariable Long[] dictCodes) { |
| | | dictDataService.deleteDictDataByIds(dictCodes); |
| | | return success(); |
| | | } |
| | |
| | | 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 javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | |
| | | // @PostMapping("/test") |
| | | // public void test(@RequestBody Map<String, Object> map) { |
| | | // WxMpUtils wxMpUtils = new WxMpUtils(wxAppid, wxAppSecret); |
| | | // boolean b = wxMpUtils.sendTextMessage("bA_nlW7yM6CCfQMUX5HpBg", "ä½ å¥½"); |
| | | // System.out.println("bçå¼ä¸ºï¼" + b); |
| | | // |
| | | // Map<String, WxMpTemplateData> dataMap = new HashMap(); |
| | | // |
| | | // dataMap.put("thing2", new WxMpTemplateData("thing2", "åº·å¤æ¥åéç¥", "#FFB6C1")); |
| | | // dataMap.put("thing4", new WxMpTemplateData("thing4", "xxå¸xxå¿xxè·¯xxå·", "#173177")); |
| | | // dataMap.put("time7", new WxMpTemplateData("time7", "2023-05-15 00:00:00", "#B95EA6")); |
| | | // dataMap.put("thing8", new WxMpTemplateData("thing8", "å¼ ä¸", "#87cefa")); |
| | | // |
| | | // |
| | | // String s = wxMpUtils.sendTemplateMessage("oK3-Z59miSE_ebKdXP4IZuXilEvE", "TDF0WB3hndi1gtQybzcHCXeZWm_Q7HjtjVLNG4MOX8Q", "", dataMap); |
| | | // |
| | | // System.out.println("sçå¼ä¸ºï¼" + s); |
| | | // } |
| | | |
| | | /** |
| | |
| | | private RedirectView buildRedirect(String url) { |
| | | RedirectView redirectView = new RedirectView(); |
| | | redirectView.setUrl(url); |
| | | redirectView.setStatusCode(HttpStatus.MOVED_PERMANENTLY); |
| | | redirectView.setStatusCode(HttpStatus.FOUND); // 302 临æ¶éå®å,é¿å
æµè§å¨ç¼å |
| | | redirectView.setExposeModelAttributes(false); // é¿å
模å屿§æ´é² |
| | | return redirectView; |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.common.enums; |
| | | |
| | | /** |
| | | * åéç±»åæä¸¾ |
| | | */ |
| | | public enum SendStateEnum { |
| | | dlq("1", "å¾
é¢å"), |
| | | dfs("2", "å¾
åé"), |
| | | yfs("3", "å·²åé"), |
| | | bzx("4", "䏿§è¡"), |
| | | fssb("5", "åé失败"), |
| | | wc("6", "宿"), |
| | | cs("7", "è¶
æ¶"); |
| | | |
| | | |
| | | |
| | | private String code; |
| | | private String desc; |
| | | |
| | | SendStateEnum(String code, String desc) { |
| | | this.code = code; |
| | | this.desc = desc; |
| | | } |
| | | |
| | | public static String getDescByCode(String code) { |
| | | SendStateEnum[] organEnums = values(); |
| | | for (int i = 0; i < organEnums.length; i++) { |
| | | SendStateEnum organEnum = organEnums[i]; |
| | | if (organEnum.getCode().equals(code)) { |
| | | return organEnum.getDesc(); |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | public String getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setCode(String code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | public String getDesc() { |
| | | return desc; |
| | | } |
| | | |
| | | public void setDesc(String desc) { |
| | | this.desc = desc; |
| | | } |
| | | } |
| | |
| | | .antMatchers("/login","/test/**", "/register", "/captchaImage", "/qrcode/generateStaticHtml", "/qrcode/getQRcode", "/qrcode/getFormDate", "/chat", "/system/file/admin/uploadFile", "/smartor/dingtalk/sendNotification", "/patient/read/patientInfo", "/socket", "/API_ESB_Service", "/API_ESB_Service/Run", "/magic/web/**", "/smartor/serviceSubtask/phoneCallBack", "/smartor/serviceSubtask/taskPull", "/smartor/serviceSubtask/phoneCallBackYQ", "/smartor/robot/callstatus", "/smartor/robot/aidialog", "/smartor/robot/cdrinfo", "/getToken", "/smartor/subtaskAnswer/getQuestionCache", "/smartor/subtaskAnswer/saveQuestionCache", "/smartor/servicetask/getScriptInfoByCondition", "/smartor/subtaskAnswer/saveQuestionAnswer", "/smartor/import/download", "/smartor/serviceSubtask/recordAccept", "/smartor/outPath/getInfoByParam", "/smartor/serviceExternal/addDeptInfo", "/smartor/serviceExternal/**", "/sso/**","/smartor/sltdHealthcareRecord/**","/smartor/servicetask/getScriptByCondition","/smartor/subtaskAnswer/saveMYDQuestionAnswer").permitAll() |
| | | // éæèµæºï¼å¯å¿åè®¿é® |
| | | // .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**","/getDept/*","/SSOLogin/**").permitAll().antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll() |
| | | .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**","/getDept/*","/SSOLogin/**").permitAll().antMatchers( "/druid/**").permitAll() |
| | | .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**","/getDept/*","/SSOLogin/**","/system/dict/data/typeout/*").permitAll().antMatchers( "/druid/**").permitAll() |
| | | .antMatchers("/smartor/organization/list").permitAll() |
| | | // é¤ä¸é¢å¤çææè¯·æ±å
¨é¨éè¦é´æè®¤è¯ |
| | | .anyRequest().authenticated().and().headers().frameOptions().disable(); |
| | |
| | | private Long id; |
| | | |
| | | /** |
| | | * é®å¸é¢ç®åç±»IDéå |
| | | */ |
| | | @ApiModelProperty("é®é¢ç»´åº¦") |
| | | private String dimension; |
| | | |
| | | /** |
| | | * é®é¢è¯æ¯æ é¢ |
| | | */ |
| | | @ApiModelProperty("é®é¢è¯æ¯æ é¢") |
| | |
| | | @ApiModelProperty("é®é¢è¯æ¯idï¼ä¸»é®ï¼") |
| | | private Long id; |
| | | |
| | | /** |
| | | * é®å¸é¢ç®åç±»IDéå |
| | | */ |
| | | @ApiModelProperty("é®é¢ç»´åº¦") |
| | | private String dimension; |
| | | |
| | | /** |
| | | * å¼ç±»åï¼1 é项 2 ææ¬ 3 æ°å¼ï¼ |
| | |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | |
| | | @ApiModelProperty(value = "主é®") |
| | | private Long id; |
| | | |
| | | |
| | | /** |
| | | * é®å¸é¢ç®åç±»IDéå |
| | | */ |
| | | @ApiModelProperty("é®é¢ç»´åº¦") |
| | | private String dimension; |
| | | |
| | | /** |
| | | * é®å¸é¢ç®åç±»IDéå |
| | | */ |
| | | @ApiModelProperty("é®é¢ç»´åº¦éå") |
| | | private List<String> dimensionList; |
| | | |
| | | /** |
| | | * é®å¸é¢ç®åç±»IDéå |
| | | */ |
| | | @ApiModelProperty("满æåº¦æè§å¼å¸¸ï¼åªéå¯¹ææ¬ï¼") |
| | | private String isMydException; |
| | | |
| | | /** |
| | | * 模æ¿è¯æ¯ç¼å· |
| | | */ |
| | |
| | | @ApiModelProperty(value = "主é®") |
| | | private Long id; |
| | | |
| | | |
| | | /** |
| | | * é®å¸é¢ç®åç±»IDéå |
| | | */ |
| | | @ApiModelProperty("é®é¢ç»´åº¦") |
| | | private String dimension; |
| | | |
| | | /** |
| | | * é®å¸é¢ç®åç±»IDéå |
| | | */ |
| | | @ApiModelProperty("满æåº¦æè§å¼å¸¸ï¼åªéå¯¹ææ¬ï¼") |
| | | private String isMydException; |
| | | |
| | | /** |
| | | * 模æ¿è¯æ¯ç¼å· |
| | | */ |
| | |
| | | private Long id; |
| | | |
| | | /** |
| | | * é®å¸é¢ç®åç±»IDéå |
| | | */ |
| | | @ApiModelProperty("é®é¢ç»´åº¦") |
| | | private String dimension; |
| | | |
| | | /** |
| | | * é®å¸é¢ç®åç±»IDéå |
| | | */ |
| | | @ApiModelProperty("满æåº¦æè§å¼å¸¸ï¼åªéå¯¹ææ¬ï¼") |
| | | private String isMydException; |
| | | |
| | | /** |
| | | * ä»»å¡id |
| | | */ |
| | | @Excel(name = "ä»»å¡id") |
| | |
| | | private Long id; |
| | | |
| | | /** |
| | | * é®å¸é¢ç®åç±»IDéå |
| | | */ |
| | | @ApiModelProperty("é®é¢ç»´åº¦") |
| | | private String dimension; |
| | | |
| | | /** |
| | | * é®å¸é¢ç®åç±»IDéå |
| | | */ |
| | | @ApiModelProperty("满æåº¦æè§å¼å¸¸ï¼åªéå¯¹ææ¬ï¼") |
| | | private String isMydException; |
| | | /** |
| | | * åæ° |
| | | */ |
| | | @Excel(name = "åæ°") |
| | |
| | | @ApiModelProperty(value = "æ£è
ID") |
| | | private Long patid; |
| | | |
| | | /** |
| | | * é®å¸é¢ç®åç±»IDéå |
| | | */ |
| | | @ApiModelProperty("满æåº¦æè§å¼å¸¸ï¼åªéå¯¹ææ¬ï¼") |
| | | private String isMydException; |
| | | |
| | | /** |
| | | * é®å¸é¢ç®åç±»IDéå |
| | | */ |
| | | @ApiModelProperty("é®é¢ç»´åº¦") |
| | | private String dimension; |
| | | } |
| | |
| | | @Excel(name = "ç±»å«ID") |
| | | private Long categoryid; |
| | | |
| | | /** |
| | | * é®å¸é¢ç®åç±»IDéå |
| | | */ |
| | | @ApiModelProperty("满æåº¦æè§å¼å¸¸ï¼åªéå¯¹ææ¬ï¼") |
| | | private String isMydException; |
| | | |
| | | /** |
| | | * é®å¸é¢ç®åç±»IDéå |
| | | */ |
| | | @ApiModelProperty("é®é¢ç»´åº¦") |
| | | private String dimension; |
| | | |
| | | } |
| | | |
| | |
| | | @ApiModelProperty("é®é¢ID") |
| | | @Excel(name = "é®é¢IDéå") |
| | | private List<Long> scriptIds; |
| | | |
| | | /** |
| | | * é®å¸é¢ç®åç±»IDéå |
| | | */ |
| | | @ApiModelProperty("满æåº¦æè§å¼å¸¸ï¼åªéå¯¹ææ¬ï¼") |
| | | private String isMydException; |
| | | |
| | | /** |
| | | * é®å¸é¢ç®åç±»IDéå |
| | | */ |
| | | @ApiModelProperty("é®é¢ç»´åº¦") |
| | | private String dimension; |
| | | |
| | | /** |
| | | * åºé¢ç
åºç¼å· |
| | | */ |
| | |
| | | /** |
| | | * åéç¶æ |
| | | */ |
| | | @Excel(name = " ä»»å¡ç¶æ ") |
| | | // @Excel(name = " ä»»å¡ç¶æ ") |
| | | @ApiModelProperty(value = "åéç¶æ 1 被é¢å(å¨ä»»å¡ä¸æ¯æ°å»ºï¼å¨æå¡ä¸æ¯è¢«é¢å) 2 å¾
åé 3 å·²åé 4 䏿§è¡ 5 åé失败 6 已宿 7 è¶
æ¶(人工)") |
| | | private Long sendstate; |
| | | |
| | | /** |
| | | * åéç¶æ |
| | | */ |
| | | @Excel(name = " ä»»å¡ç¶æ ") |
| | | @ApiModelProperty(value = "åéç¶æ 1 被é¢å(å¨ä»»å¡ä¸æ¯æ°å»ºï¼å¨æå¡ä¸æ¯è¢«é¢å) 2 å¾
åé 3 å·²åé 4 䏿§è¡ 5 åé失败 6 已宿 7 è¶
æ¶(人工)") |
| | | private String stName; |
| | | |
| | | /** |
| | | * 宿æ¶é´ |
| | | */ |
| | | @Excel(name = " 宿æ¶é´ ", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | |
| | | /** |
| | | * é®å¸é¢ç®åç±»IDéå |
| | | */ |
| | | @ApiModelProperty("é®é¢ç»´åº¦") |
| | | private String dimension; |
| | | /** |
| | | * é®å¸é¢ç®åç±»IDéå |
| | | */ |
| | | @ApiModelProperty("åç±»IDéå") |
| | | private String categoryids; |
| | | |
| | |
| | | @ApiModelProperty(value = "æ¥å¤ç§å®¤ç¼ç ï¼å¦æå¤ä¸ªç§å®¤ç¨éå·åå²ï¼") |
| | | private String reportDeptCode; |
| | | |
| | | /** |
| | | * é®å¸é¢ç®åç±»IDéå |
| | | */ |
| | | @ApiModelProperty("满æåº¦æè§å¼å¸¸ï¼åªéå¯¹ææ¬ï¼") |
| | | private String isMydException; |
| | | |
| | | /** |
| | | * é®é¢ç»´åº¦ |
| | | */ |
| | | @ApiModelProperty("é®é¢ç»´åº¦") |
| | | private String dimension; |
| | | |
| | | @Excel(name = "åç±»IDéå") |
| | | @ApiModelProperty(value = "åç±»IDéå") |
| | | private List<Long> categoryids; |
| | |
| | | @ApiModelProperty("èªå¢ID") |
| | | private Long id; |
| | | |
| | | /** |
| | | * é®å¸é¢ç®åç±»IDéå |
| | | */ |
| | | @ApiModelProperty("é®é¢ç»´åº¦") |
| | | private String dimension; |
| | | |
| | | /** |
| | | * é®å¸é¢ç®åç±»IDéå |
| | | */ |
| | | @ApiModelProperty("满æåº¦æè§å¼å¸¸ï¼åªéå¯¹ææ¬ï¼") |
| | | private String isMydException; |
| | | |
| | | /** |
| | | * é®é¢ç»´åº¦éå |
| | | */ |
| | | @ApiModelProperty("é®é¢ç»´åº¦éå") |
| | | private List<String> dimensionList; |
| | | |
| | | @ApiModelProperty(value = "对åºçivr_liba_targetç主é®") |
| | | private Long targetid; |
| | | |
| | |
| | | @ApiModelProperty(value = "æ¥å¤ç§å®¤ç¼ç ï¼å¦æå¤ä¸ªç§å®¤ç¨éå·åå²ï¼") |
| | | private String reportDeptCode; |
| | | |
| | | |
| | | /** |
| | | * é®å¸é¢ç®åç±»IDéå |
| | | */ |
| | | @ApiModelProperty("满æåº¦æè§å¼å¸¸ï¼åªéå¯¹ææ¬ï¼") |
| | | private String isMydException; |
| | | |
| | | /** |
| | | * é®å¸é¢ç®åç±»IDéå |
| | | */ |
| | | @ApiModelProperty("é®é¢ç»´åº¦") |
| | | private String dimension; |
| | | |
| | | } |
| | |
| | | private String reportDeptCode; |
| | | |
| | | /** |
| | | * é®å¸é¢ç®åç±»IDéå |
| | | */ |
| | | @ApiModelProperty("满æåº¦æè§å¼å¸¸ï¼åªéå¯¹ææ¬ï¼") |
| | | private String isMydException; |
| | | |
| | | /** |
| | | * é®å¸é¢ç®åç±»IDéå |
| | | */ |
| | | @ApiModelProperty("é®é¢ç»´åº¦") |
| | | private String dimension; |
| | | /** |
| | | * è¯æ¯é项 |
| | | */ |
| | | @ApiModelProperty(value = "è¯æ¯é项") |
| | |
| | | @Excel(name = "é®é¢åç±»:ï¼ä¾å¦,é¨è¯æ»¡æåº¦ï¼mzmyd ä½é¢æ»¡æåº¦ï¼zymyd ...ï¼") |
| | | private String type; |
| | | |
| | | /** |
| | | * é®å¸é¢ç®åç±»IDéå |
| | | */ |
| | | @ApiModelProperty("满æåº¦æè§å¼å¸¸ï¼åªéå¯¹ææ¬ï¼") |
| | | private String isMydException; |
| | | |
| | | /** |
| | | * é®å¸é¢ç®åç±»IDéå |
| | | */ |
| | | @ApiModelProperty("é®é¢ç»´åº¦") |
| | | private String dimension; |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * é®å¸é¢ç®åç±»IDéå |
| | | */ |
| | | @ApiModelProperty("é®é¢ç»´åº¦éå") |
| | | private List<String> dimensionList; |
| | | |
| | | /** |
| | | * æ£è
æå¡ç±»åï¼6ãåºé¢æ»¡æåº¦è°æ¥ 14ä½é¢æ»¡æåº¦ 15é¨è¯æ»¡æåº¦ 16å¸¸ç¨æ»¡æåº¦ |
| | | */ |
| | | @ApiModelProperty(value = "æ£è
æå¡ç±»åï¼6ãåºé¢æ»¡æåº¦è°æ¥ 14ä½é¢æ»¡æåº¦ 15é¨è¯æ»¡æåº¦ 16å¸¸ç¨æ»¡æåº¦ (é»è®¤æ¥å
¨é¨)") |
| | |
| | | */ |
| | | public List<IvrLibaTemplateScript> selectIvrLibaTemplateScriptList(IvrLibaTemplateScript ivrLibaTemplateScript); |
| | | |
| | | public List<IvrLibaTemplateScript> selectILTSBydimension(IvrLibaTemplateScript ivrLibaTemplateScript); |
| | | |
| | | /** |
| | | * æ°å¢æ¨¡çé®é¢è¯æ¯åº |
| | | * |
| | |
| | | |
| | | import com.smartor.domain.IvrLibaTemplateScript; |
| | | import com.smartor.domain.SvyLibTemplateScript; |
| | | import com.smartor.domain.SvyLibTemplateScriptVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | */ |
| | | public List<SvyLibTemplateScript> selectSvyLibTemplateScriptList(SvyLibTemplateScript svyLibTemplateScript); |
| | | |
| | | public List<SvyLibTemplateScript> selectSLTScriptListBydimension(SvyLibTemplateScriptVO svyLibTemplateScriptVO); |
| | | |
| | | /** |
| | | * æ°å¢æ¨¡æ¿é®å·é¢ç® |
| | | * |
| | |
| | | */ |
| | | public PatSatisfactionResVO statistics( PatSatisfactionReqVO patSatisfactionReqVO); |
| | | |
| | | /** |
| | | * æ£è
满æåº¦ç»è®¡ï¼ç»´åº¦ï¼ |
| | | * |
| | | * @param patSatisfactionReqVO æ£è
满æåº¦ç»è®¡æ¡ä»¶ |
| | | * @return æ£è
满æåº¦ç»è®¡ç»æ |
| | | */ |
| | | public PatSatisfactionResVO statisticsByDimension( PatSatisfactionReqVO patSatisfactionReqVO); |
| | | |
| | | |
| | | /** |
| | | * æ£è
满æåº¦æ±ç¶å¾ä¿¡æ¯ |
| | |
| | | * @return æ£è
满æåº¦æ±ç¶å¾ä¿¡æ¯ |
| | | */ |
| | | public Map<String, Object> satisfactionGraph(PatSatisfactionReqVO patSatisfactionReqVO); |
| | | |
| | | public Map<String, Object> satisfactionGraphDimension(PatSatisfactionReqVO patSatisfactionReqVO); |
| | | } |
| | |
| | | int primaryGeneratedCount = deptGenCount + wardGenCount + diagGenCount; |
| | | log.info("ãåºäºè§åãé¦è¦è§åæ§è¡ç»æ: deptGen={}, wardGen={}, diagGen={}, total={}", deptGenCount, wardGenCount, diagGenCount, primaryGeneratedCount); |
| | | |
| | | String remark = patMedInhosp1.getRemark(); |
| | | // ç¬¬äºæ¥ï¼å¤æé¦è¦è§åæ¯å¦æä»»æä¸ä¸ªçææå |
| | | if (primaryGeneratedCount > 0) { |
| | | // è³å°æä¸ä¸ªé¦è¦è§åçææå |
| | | // ââ å°=2çæ¬¡è¦è§å对åºflag设为"2"ï¼è·³è¿ï¼ |
| | | log.info("ãåºäºè§åãé¦è¦è§åææå(count={})ï¼å°æ¬¡è¦è§å对åºflag设为2", primaryGeneratedCount); |
| | | if (deptIsSecondary) { |
| | | updateCheckFlag(patMedInhosp1, 1, "2", "é¦è¦è§åå·²çæï¼æ¬¡è¦è§åè·³è¿"); |
| | | updateCheckFlag(patMedInhosp1, 1, "2", StringUtils.isNotEmpty(remark)?remark+";é¦è¦è§åå·²çæï¼æ¬¡è¦è§åè·³è¿":"é¦è¦è§åå·²çæï¼æ¬¡è¦è§åè·³è¿"); |
| | | } |
| | | if (!active.equals("xh")) { |
| | | if (wardIsSecondary) { |
| | | updateCheckFlag(patMedInhosp1, 2, "2", "é¦è¦è§åå·²çæï¼æ¬¡è¦è§åè·³è¿"); |
| | | updateCheckFlag(patMedInhosp1, 2, "2", StringUtils.isNotEmpty(remark)?remark+";é¦è¦è§åå·²çæï¼æ¬¡è¦è§åè·³è¿":"é¦è¦è§åå·²çæï¼æ¬¡è¦è§åè·³è¿"); |
| | | } |
| | | if (diagIsSecondary) { |
| | | updateCheckFlag(patMedInhosp1, 3, "2", "é¦è¦è§åå·²çæï¼æ¬¡è¦è§åè·³è¿"); |
| | | updateCheckFlag(patMedInhosp1, 3, "2", StringUtils.isNotEmpty(remark)?remark+";é¦è¦è§åå·²çæï¼æ¬¡è¦è§åè·³è¿":"é¦è¦è§åå·²çæï¼æ¬¡è¦è§åè·³è¿"); |
| | | } |
| | | } |
| | | // ââ 对äº=1ä¸çææåçï¼å°å
¶å¯¹åºflag设为"1" |
| | | if (deptIsPrimary && deptGenCount > 0) { |
| | | updateCheckFlag(patMedInhosp1, 1, "1", "ç§å®¤é¦è¦è§åçææå"); |
| | | updateCheckFlag(patMedInhosp1, 1, "1", StringUtils.isNotEmpty(remark)?remark+";ç§å®¤é¦è¦è§åçææå":"ç§å®¤é¦è¦è§åçææå"); |
| | | } |
| | | if (!active.equals("xh")) { |
| | | if (wardIsPrimary && wardGenCount > 0) { |
| | | updateCheckFlag(patMedInhosp1, 2, "1", "ç
åºé¦è¦è§åçææå"); |
| | | updateCheckFlag(patMedInhosp1, 2, "1", StringUtils.isNotEmpty(remark)?remark+";ç
åºé¦è¦è§åçææå":"ç
åºé¦è¦è§åçææå"); |
| | | } |
| | | if (diagIsPrimary && diagGenCount > 0) { |
| | | updateCheckFlag(patMedInhosp1, 3, "1", "ç¾ç
é¦è¦è§åçææå"); |
| | | updateCheckFlag(patMedInhosp1, 3, "1", StringUtils.isNotEmpty(remark)?remark+";ç¾ç
é¦è¦è§åçææå":"ç¾ç
é¦è¦è§åçææå"); |
| | | } |
| | | } |
| | | // ââ 对äº=1ä½çæå¤±è´¥çï¼å°å
¶å¯¹åºflag设为"2" |
| | | if (deptIsPrimary && deptGenCount == 0) { |
| | | updateCheckFlag(patMedInhosp1, 1, "2", "ç§å®¤é¦è¦è§åçæå¤±è´¥"); |
| | | updateCheckFlag(patMedInhosp1, 1, "2", StringUtils.isNotEmpty(remark)?remark+";ç§å®¤é¦è¦è§åçæå¤±è´¥":"ç§å®¤é¦è¦è§åçæå¤±è´¥"); |
| | | } |
| | | if (!active.equals("xh")) { |
| | | if (wardIsPrimary && wardGenCount == 0) { |
| | | updateCheckFlag(patMedInhosp1, 2, "2", "ç
åºé¦è¦è§åçæå¤±è´¥"); |
| | | updateCheckFlag(patMedInhosp1, 2, "2", StringUtils.isNotEmpty(remark)?remark+";ç
åºé¦è¦è§åçæå¤±è´¥":"ç
åºé¦è¦è§åçæå¤±è´¥"); |
| | | } |
| | | if (diagIsPrimary && diagGenCount == 0) { |
| | | updateCheckFlag(patMedInhosp1, 3, "2", "ç¾ç
é¦è¦è§åçæå¤±è´¥"); |
| | | updateCheckFlag(patMedInhosp1, 3, "2", StringUtils.isNotEmpty(remark)?remark+";ç¾ç
é¦è¦è§åçæå¤±è´¥":"ç¾ç
é¦è¦è§åçæå¤±è´¥"); |
| | | } |
| | | } |
| | | } else { |
| | | // ææé¦è¦è§åå
¨é¨å¤±è´¥ï¼å°=1çflag设为"2"ï¼ç¶åæ§è¡=2çæ¹æ³ |
| | | log.info("ãåºäºè§åãé¦è¦è§åå
¨é¨å¤±è´¥ï¼å°=1çflag设为2ï¼å¼å§æ§è¡æ¬¡è¦è§å"); |
| | | if (deptIsPrimary) { |
| | | updateCheckFlag(patMedInhosp1, 1, "2", "ç§å®¤é¦è¦è§åå
¨é¨å¤±è´¥"); |
| | | updateCheckFlag(patMedInhosp1, 1, "2", StringUtils.isNotEmpty(remark)?remark+";ç§å®¤é¦è¦è§åå
¨é¨å¤±è´¥":"ç§å®¤é¦è¦è§åå
¨é¨å¤±è´¥"); |
| | | } |
| | | if (!active.equals("xh")) { |
| | | if (wardIsPrimary) { |
| | | updateCheckFlag(patMedInhosp1, 2, "2", "ç
åºé¦è¦è§åå
¨é¨å¤±è´¥"); |
| | | updateCheckFlag(patMedInhosp1, 2, "2", StringUtils.isNotEmpty(remark)?remark+";ç
åºé¦è¦è§åå
¨é¨å¤±è´¥":"ç
åºé¦è¦è§åå
¨é¨å¤±è´¥"); |
| | | } |
| | | if (diagIsPrimary) { |
| | | updateCheckFlag(patMedInhosp1, 3, "2", "ç¾ç
é¦è¦è§åå
¨é¨å¤±è´¥"); |
| | | updateCheckFlag(patMedInhosp1, 3, "2", StringUtils.isNotEmpty(remark)?remark+";ç¾ç
é¦è¦è§åå
¨é¨å¤±è´¥":"ç¾ç
é¦è¦è§åå
¨é¨å¤±è´¥"); |
| | | } |
| | | } |
| | | // æ§è¡æ¬¡è¦è§å(=2)çæ¹æ³ |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * æ£è
满æåº¦ç»è®¡ï¼ç»´åº¦ï¼ |
| | | * |
| | | * @param patSatisfactionReqVO æ£è
满æåº¦ç»è®¡æ¡ä»¶ |
| | | * @return æ£è
满æåº¦ç»è®¡ç»æ |
| | | */ |
| | | @Override |
| | | public PatSatisfactionResVO statisticsByDimension(PatSatisfactionReqVO patSatisfactionReqVO) { |
| | | //å®ä¹è¿å |
| | | PatSatisfactionResVO result = new PatSatisfactionResVO(); |
| | | //ç颿»äººæ°(å·²ç»åçé®é¢ç) |
| | | int totalPerson = 0; |
| | | // æ»äººæ°ï¼å
嫿ªåççï¼ |
| | | int allPerson = 0; |
| | | //æ£è
满æåº¦ç»è¯¦æ
|
| | | List<PatSatisfactionDetailEntity> patSatisfactionDetailEntities = new ArrayList<>(); |
| | | List<ServiceSubtask> serviceSubtasks = serviceSubtaskMapper.selectSatisfactionSubtaskList(patSatisfactionReqVO); |
| | | // ætypeåç»ï¼1-è¯é³ï¼2-é®å· |
| | | Map<String, List<ServiceSubtask>> groupByType = serviceSubtasks.stream().filter(s -> s.getType() != null).collect(Collectors.groupingBy(ServiceSubtask::getType)); |
| | | List<ServiceSubtask> voiceList = groupByType.getOrDefault("1", Collections.emptyList()); |
| | | List<ServiceSubtask> questionnaireList = groupByType.getOrDefault("2", Collections.emptyList()); |
| | | |
| | | if (CollectionUtils.isNotEmpty(voiceList)) { |
| | | //1. å
è·åå
¥åä¸çç»´æ¤éå |
| | | IvrLibaTemplateScript iltscript = new IvrLibaTemplateScript(); |
| | | iltscript.setDimensionList(patSatisfactionReqVO.getDimensionList()); |
| | | |
| | | //2 åè·å该é®é¢æ»¡æåº¦åç±»ä¸çIvrLibaTemplateScriptçéå |
| | | List<IvrLibaTemplateScript> ivrLibaTemplateScripts = ivrLibaTemplateScriptMapper.selectILTSBydimension(iltscript); |
| | | if (CollectionUtils.isNotEmpty(ivrLibaTemplateScripts)) { |
| | | //3 åéè¿å个ivr_liba_templateè·åå°ææç满æåº¦é®é¢ å 使ç¨è¯¥æ¨¡æ¿çsubTaskäººæ° |
| | | for (IvrLibaTemplateScript ivrLibaTemplateScript : ivrLibaTemplateScripts) { |
| | | //è®°å½å个æç»ä¿¡æ¯ |
| | | PatSatisfactionDetailEntity patSatisfactionDetailEntity = new PatSatisfactionDetailEntity(); |
| | | |
| | | //éè¿é®é¢IDï¼è·åé®é¢é项(为äºè·åé项ä¸çæé«åæä½å) |
| | | IvrLibaTemplateTargetoption ivrLibaTemplateTargetoption = new IvrLibaTemplateTargetoption(); |
| | | ivrLibaTemplateTargetoption.setScriptid(ivrLibaTemplateScript.getScriptid()); |
| | | List<IvrLibaTemplateTargetoption> ivrLibaTemplateTargetoptions = ivrLibaTemplateTargetoptionMapper.selectIvrLibaTemplateTargetoptionList(ivrLibaTemplateTargetoption); |
| | | |
| | | //è·ålibTemplateId |
| | | List<Long> libTemplateIds = new ArrayList<>(); |
| | | libTemplateIds.add(ivrLibaTemplateScript.getTemplateid()); |
| | | |
| | | // åéè¿æ¨¡æ¿idè·åé®é¢åéæ»é |
| | | ServiceSubtaskSatisfactionEntity serviceSubtaskSatisfactionEntity = DtoConversionUtils.sourceToTarget(patSatisfactionReqVO, ServiceSubtaskSatisfactionEntity.class); |
| | | serviceSubtaskSatisfactionEntity.setLibTemplateIds(libTemplateIds); |
| | | serviceSubtaskSatisfactionEntity.setType(1); |
| | | List<Long> subids = serviceSubtaskMapper.querySendCount(serviceSubtaskSatisfactionEntity); |
| | | |
| | | //è·åå¡«æ¥æ°é |
| | | List<ServiceSubtaskDetailDTO> fillCount = null; |
| | | if (CollectionUtils.isNotEmpty(subids)) |
| | | fillCount = serviceSubtaskDetailMapper.queryFillCount(subids, ivrLibaTemplateScript.getScriptContent()); |
| | | |
| | | // æ ¹æ®matchedtextåç»ï¼ç»è®¡åé项æ°éåå æ¯ |
| | | Map<String, Map<String, Object>> matchedtextStats = new HashMap<>(); |
| | | if (CollectionUtils.isNotEmpty(fillCount)) { |
| | | int totalFill = fillCount.size(); |
| | | fillCount.stream().filter(dto -> dto.getMatchedtext() != null).collect(Collectors.groupingBy(ServiceSubtaskDetailDTO::getMatchedtext, Collectors.counting())).forEach((matchedtext, count) -> { |
| | | Map<String, Object> stat = new HashMap<>(); |
| | | stat.put("count", count); |
| | | stat.put("ratio", new BigDecimal((double) count / totalFill * 100).setScale(1, RoundingMode.HALF_UP).doubleValue()); |
| | | matchedtextStats.put(matchedtext, stat); |
| | | }); |
| | | // ä»fillCountä¸åtargetvalueï¼&åéçå½åé®é¢çææé项ï¼ï¼è¡¥å
¨æªåºç°çé项ï¼countåratioå为0 |
| | | fillCount.stream().filter(dto -> dto.getTargetvalue() != null).findFirst().ifPresent(dto -> { |
| | | for (String option : dto.getTargetvalue().split("&")) { |
| | | String optionTrim = option.trim(); |
| | | if (!matchedtextStats.containsKey(optionTrim)) { |
| | | Map<String, Object> emptyStat = new HashMap<>(); |
| | | emptyStat.put("count", 0L); |
| | | emptyStat.put("ratio", 0.0); |
| | | matchedtextStats.put(optionTrim, emptyStat); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | patSatisfactionDetailEntity.setScriptContent(ivrLibaTemplateScript.getScriptContent()); |
| | | patSatisfactionDetailEntity.setAnswerPerson(CollectionUtils.isEmpty(fillCount) ? 0 : fillCount.size()); |
| | | patSatisfactionDetailEntity.setNoAnswerPerson(CollectionUtils.isNotEmpty(fillCount) && CollectionUtils.isNotEmpty(subids) ? (subids.size() - fillCount.size()) : CollectionUtils.isNotEmpty(subids) ? subids.size() : 0); |
| | | patSatisfactionDetailEntity.setAverageScore(averageScore(fillCount)); |
| | | patSatisfactionDetailEntity.setMaxScore(maxScore(ivrLibaTemplateTargetoptions)); |
| | | patSatisfactionDetailEntity.setMinScore(minScore(ivrLibaTemplateTargetoptions)); |
| | | patSatisfactionDetailEntity.setAnswerRate(CollectionUtils.isEmpty(subids) ? 0 : CollectionUtils.isEmpty(fillCount) ? 0 : fillCount.size() * 1.0 / subids.size()); |
| | | patSatisfactionDetailEntity.setMatchedtextStats(matchedtextStats); |
| | | patSatisfactionDetailEntities.add(patSatisfactionDetailEntity); |
| | | |
| | | totalPerson += CollectionUtils.isEmpty(fillCount) ? 0 : fillCount.size(); |
| | | allPerson += subids.size(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (CollectionUtils.isNotEmpty(questionnaireList)) { |
| | | //1. å
è·åå
¥åä¸ç满æåº¦ç»´åº¦ |
| | | SvyLibTemplateScriptVO svyLibTemplateScriptVO = new SvyLibTemplateScriptVO(); |
| | | svyLibTemplateScriptVO.setDimensionList(patSatisfactionReqVO.getDimensionList()); |
| | | //2 åè·å该é®é¢æ»¡æåº¦åç±»ä¸çIvrLibaTemplateScriptçéå |
| | | List<SvyLibTemplateScript> svyLibTemplateScripts = svyLibTemplateScriptMapper.selectSLTScriptListBydimension(svyLibTemplateScriptVO); |
| | | if (CollectionUtils.isNotEmpty(svyLibTemplateScripts)) { |
| | | for (SvyLibTemplateScript svyLibTemplateScript : svyLibTemplateScripts) { |
| | | //è®°å½å个æç»ä¿¡æ¯ |
| | | PatSatisfactionDetailEntity patSatisfactionDetailEntity = new PatSatisfactionDetailEntity(); |
| | | |
| | | //éè¿é®é¢IDï¼è·åé®é¢é项(为äºè·åé项ä¸çæé«åæä½å) |
| | | SvyLibTemplateTargetoption svyLibTemplateTargetoption = new SvyLibTemplateTargetoption(); |
| | | svyLibTemplateTargetoption.setScriptid(svyLibTemplateScript.getId()); |
| | | List<SvyLibTemplateTargetoption> svyLibTemplateTargetoptions = svyLibTemplateTargetoptionMapper.selectSvyLibTemplateTargetoptionList(svyLibTemplateTargetoption); |
| | | |
| | | //è·ålibTemplateId |
| | | List<Long> libTemplateIds = new ArrayList<>(); |
| | | libTemplateIds.add(svyLibTemplateScript.getSvyid()); |
| | | |
| | | // åéè¿æ¨¡æ¿idè·åé®é¢åéæ»é |
| | | ServiceSubtaskSatisfactionEntity serviceSubtaskSatisfactionEntity = DtoConversionUtils.sourceToTarget(patSatisfactionReqVO, ServiceSubtaskSatisfactionEntity.class); |
| | | serviceSubtaskSatisfactionEntity.setLibTemplateIds(libTemplateIds); |
| | | serviceSubtaskSatisfactionEntity.setType(2); |
| | | List<Long> subids = serviceSubtaskMapper.querySendCount(serviceSubtaskSatisfactionEntity); |
| | | |
| | | //è·åå¡«æ¥æ°é |
| | | List<ServiceSubtaskDetailDTO> fillCount = null; |
| | | if (CollectionUtils.isNotEmpty(subids)) |
| | | fillCount = serviceSubtaskDetailMapper.queryFillCount(subids, svyLibTemplateScript.getScriptContent()); |
| | | |
| | | // æ ¹æ®matchedtextåç»ï¼ç»è®¡åé项æ°éåå æ¯ |
| | | Map<String, Map<String, Object>> matchedtextStats = new HashMap<>(); |
| | | if (CollectionUtils.isNotEmpty(fillCount)) { |
| | | int totalFill = fillCount.size(); |
| | | fillCount.stream().filter(dto -> dto.getMatchedtext() != null).collect(Collectors.groupingBy(ServiceSubtaskDetailDTO::getMatchedtext, Collectors.counting())).forEach((matchedtext, count) -> { |
| | | Map<String, Object> stat = new HashMap<>(); |
| | | stat.put("count", count); |
| | | stat.put("ratio", new BigDecimal((double) count / totalFill * 100).setScale(1, RoundingMode.HALF_UP).doubleValue()); |
| | | matchedtextStats.put(matchedtext, stat); |
| | | }); |
| | | // ä»fillCountä¸åtargetvalueï¼&åéçå½åé®é¢çææé项ï¼ï¼è¡¥å
¨æªåºç°çé项ï¼countåratioå为0 |
| | | fillCount.stream().filter(dto -> dto.getTargetvalue() != null).findFirst().ifPresent(dto -> { |
| | | for (String option : dto.getTargetvalue().split("&")) { |
| | | String optionTrim = option.trim(); |
| | | if (!matchedtextStats.containsKey(optionTrim)) { |
| | | Map<String, Object> emptyStat = new HashMap<>(); |
| | | emptyStat.put("count", 0L); |
| | | emptyStat.put("ratio", 0.0); |
| | | matchedtextStats.put(optionTrim, emptyStat); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | patSatisfactionDetailEntity.setScriptContent(svyLibTemplateScript.getScriptContent()); |
| | | patSatisfactionDetailEntity.setAnswerPerson(CollectionUtils.isEmpty(fillCount) ? 0 : fillCount.size()); |
| | | patSatisfactionDetailEntity.setNoAnswerPerson(CollectionUtils.isNotEmpty(fillCount) && CollectionUtils.isNotEmpty(subids) ? (subids.size() - fillCount.size()) : CollectionUtils.isNotEmpty(subids) ? subids.size() : 0); |
| | | patSatisfactionDetailEntity.setAverageScore(averageScore(fillCount)); |
| | | |
| | | OptionalDouble maxOpt = svyLibTemplateTargetoptions.stream().filter(dto -> dto.getScore() != null).mapToDouble(dto -> dto.getScore().doubleValue()).max(); |
| | | patSatisfactionDetailEntity.setMaxScore(maxOpt.isPresent() ? new BigDecimal(maxOpt.getAsDouble()).setScale(1, RoundingMode.HALF_UP).doubleValue() : 0.0); |
| | | |
| | | OptionalDouble minOpt = svyLibTemplateTargetoptions.stream().filter(dto -> dto.getScore() != null).mapToDouble(dto -> dto.getScore().doubleValue()).min(); |
| | | patSatisfactionDetailEntity.setMinScore(minOpt.isPresent() ? new BigDecimal(minOpt.getAsDouble()).setScale(1, RoundingMode.HALF_UP).doubleValue() : 0.0); |
| | | |
| | | patSatisfactionDetailEntity.setAnswerRate(CollectionUtils.isEmpty(subids) ? 0 : CollectionUtils.isEmpty(fillCount) ? 0 : fillCount.size() * 1.0 / subids.size()); |
| | | patSatisfactionDetailEntity.setMatchedtextStats(matchedtextStats); |
| | | patSatisfactionDetailEntities.add(patSatisfactionDetailEntity); |
| | | |
| | | totalPerson += CollectionUtils.isEmpty(fillCount) ? 0 : fillCount.size(); |
| | | allPerson += subids.size(); |
| | | } |
| | | } |
| | | } |
| | | result.setTotalAnswerRate(Arith.div(totalPerson, allPerson)); |
| | | result.setPatSatisfactionDetailEntities(patSatisfactionDetailEntities); |
| | | result.setTotalPerson(totalPerson); |
| | | |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> satisfactionGraph(PatSatisfactionReqVO patSatisfactionReqVO) { |
| | | //ç¨æ¥è®°å½æ±ç¶å¾ä¿¡æ¯ï¼key=满æåº¦åç±»åç§°ï¼value=满æåº¦åç±»ä¸çæ»äººæ°åå¡«æ¥äººæ°ï¼ |
| | |
| | | return zzt; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public Map<String, Object> satisfactionGraphDimension(PatSatisfactionReqVO patSatisfactionReqVO) { |
| | | //ç¨æ¥è®°å½æ±ç¶å¾ä¿¡æ¯ï¼key=满æåº¦åç±»åç§°ï¼value=满æåº¦åç±»ä¸çæ»äººæ°åå¡«æ¥äººæ°ï¼ |
| | | Map<String, Object> zzt = new HashMap<>(); |
| | | |
| | | // è®°å½ä¸ä¸æ¯ç§åç±»çå¡«æ¥æ
åµ |
| | | Map<String, List<ServiceSubtaskDetailDTO>> assortNameFillCountMap = new HashMap<>(); |
| | | |
| | | if (patSatisfactionReqVO.getType() == null || patSatisfactionReqVO.getType() == 1) { |
| | | //1. ä»å
¥åä¸è·å满æåº¦ç»´ç»´åº¦ |
| | | IvrLibaTemplateScript ivrLibaTemplateScript2 = new IvrLibaTemplateScript(); |
| | | ivrLibaTemplateScript2.setDimensionList(patSatisfactionReqVO.getDimensionList()); |
| | | |
| | | //2 åè·å该é®é¢æ»¡æåº¦åç±»ä¸çIvrLibaTemplateScriptçéå |
| | | List<IvrLibaTemplateScript> ivrLibaTemplateScripts = ivrLibaTemplateScriptMapper.selectILTSBydimension(ivrLibaTemplateScript2); |
| | | if (ivrLibaTemplateScripts != null && !ivrLibaTemplateScripts.isEmpty()) { |
| | | //3 ædimension维度åç»,å¹¶è·åæ¯ä¸ªéåè¿è¡éåï¼è®¡ç®æ¯ä¸ªåç±»çæ»äººæ°åå¡«æ¥äººæ° |
| | | Map<String, List<IvrLibaTemplateScript>> groupByDimension = ivrLibaTemplateScripts.stream().filter(item -> item.getDimension() != null).collect(Collectors.groupingBy(IvrLibaTemplateScript::getDimension)); |
| | | |
| | | if (groupByDimension != null && !groupByDimension.isEmpty()) { |
| | | for (String dimension : groupByDimension.keySet()) { |
| | | //è®°å½æ»äººæ° |
| | | Double subidAll = 0.0; |
| | | //è®°å½æ»çå¡«æ¥äººæ° |
| | | Double fillCountAll = 0.0; |
| | | //è·å该维度çå¡«æ¥æ»æ°é |
| | | List<ServiceSubtaskDetailDTO> allFillCountList = new ArrayList<>(); |
| | | |
| | | List<IvrLibaTemplateScript> ivrLibaTemplateScriptList = groupByDimension.get(dimension); |
| | | for (IvrLibaTemplateScript ivrLibaTemplateScript : ivrLibaTemplateScriptList) { |
| | | //è·ålibTemplateId |
| | | List<Long> libTemplateIds = new ArrayList<>(); |
| | | libTemplateIds.add(ivrLibaTemplateScript.getTemplateid()); |
| | | // åéè¿æ¨¡æ¿idè·åé®é¢åéæ»é |
| | | ServiceSubtaskSatisfactionEntity serviceSubtaskSatisfactionEntity = DtoConversionUtils.sourceToTarget(patSatisfactionReqVO, ServiceSubtaskSatisfactionEntity.class); |
| | | serviceSubtaskSatisfactionEntity.setLibTemplateIds(libTemplateIds); |
| | | serviceSubtaskSatisfactionEntity.setType(1); |
| | | List<Long> subids = serviceSubtaskMapper.querySendCount(serviceSubtaskSatisfactionEntity); |
| | | |
| | | //è·åå¡«æ¥æ°é |
| | | List<ServiceSubtaskDetailDTO> fillCount = null; |
| | | if (CollectionUtils.isNotEmpty(subids)) { |
| | | fillCount = serviceSubtaskDetailMapper.queryFillCount(subids, ivrLibaTemplateScript.getScriptContent()); |
| | | if (CollectionUtils.isNotEmpty(fillCount)) allFillCountList.addAll(fillCount); |
| | | } |
| | | subidAll += subids.size(); |
| | | fillCountAll += CollectionUtils.isEmpty(fillCount) ? 0 : fillCount.size(); |
| | | } |
| | | |
| | | // è¿éå
è®°å½ä¸ä¸æ¯ä¸ªåç±»çæ»äººæ°åå¡«æ¥äººæ° |
| | | Map<String, Object> personCount = new HashMap<>(); |
| | | personCount.put("fillCountAll", fillCountAll); |
| | | personCount.put("subidAll", subidAll); |
| | | personCount.put("receiveRate", Arith.div(fillCountAll, subidAll)); |
| | | personCount.put("averageScore", averageScore(allFillCountList)); |
| | | zzt.put(dimension, personCount); |
| | | assortNameFillCountMap.put(dimension, allFillCountList); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (patSatisfactionReqVO.getType() == null || patSatisfactionReqVO.getType() == 2) { |
| | | //1. ä»å
¥åä¸è·å满æåº¦ç»´ç»´åº¦ |
| | | SvyLibTemplateScriptVO svyLibTemplateScriptVO = new SvyLibTemplateScriptVO(); |
| | | svyLibTemplateScriptVO.setDimensionList(patSatisfactionReqVO.getDimensionList()); |
| | | |
| | | //2 åè·å该é®é¢æ»¡æåº¦åç±»ä¸çIvrLibaTemplateScriptçéå |
| | | List<SvyLibTemplateScript> svyLibTemplateScripts = svyLibTemplateScriptMapper.selectSLTScriptListBydimension(svyLibTemplateScriptVO); |
| | | if (svyLibTemplateScripts != null && !svyLibTemplateScripts.isEmpty()) { |
| | | //3 æscriptAssortnameåç»,å¹¶è·åæ¯ä¸ªéåè¿è¡éåï¼è®¡ç®æ¯ä¸ªåç±»çæ»äººæ°åå¡«æ¥äººæ° |
| | | Map<String, List<SvyLibTemplateScript>> groupByDimension = svyLibTemplateScripts.stream().filter(item -> item.getDimension() != null).collect(Collectors.groupingBy(SvyLibTemplateScript::getDimension)); |
| | | if (groupByDimension != null && !groupByDimension.isEmpty()) { |
| | | for (String dimension : groupByDimension.keySet()) { |
| | | //è®°å½æ»äººæ° |
| | | Double subidAll = 0.0; |
| | | //è®°å½æ»çå¡«æ¥äººæ° |
| | | Double fillCountAll = 0.0; |
| | | //è·å该åç±»çå¡«æ¥æ»æ°é |
| | | List<ServiceSubtaskDetailDTO> allFillCountList = new ArrayList<>(); |
| | | |
| | | List<SvyLibTemplateScript> svyLibTemplateScriptList = groupByDimension.get(dimension); |
| | | for (SvyLibTemplateScript svyLibTemplateScript : svyLibTemplateScriptList) { |
| | | //è·ålibTemplateId |
| | | List<Long> libTemplateIds = new ArrayList<>(); |
| | | libTemplateIds.add(svyLibTemplateScript.getSvyid()); |
| | | // åéè¿æ¨¡æ¿idè·åé®é¢åéæ»é |
| | | ServiceSubtaskSatisfactionEntity serviceSubtaskSatisfactionEntity = DtoConversionUtils.sourceToTarget(patSatisfactionReqVO, ServiceSubtaskSatisfactionEntity.class); |
| | | serviceSubtaskSatisfactionEntity.setLibTemplateIds(libTemplateIds); |
| | | serviceSubtaskSatisfactionEntity.setType(2); |
| | | List<Long> subids = serviceSubtaskMapper.querySendCount(serviceSubtaskSatisfactionEntity); |
| | | |
| | | //è·åå¡«æ¥æ°é |
| | | List<ServiceSubtaskDetailDTO> fillCount = null; |
| | | if (CollectionUtils.isNotEmpty(subids)) { |
| | | fillCount = serviceSubtaskDetailMapper.queryFillCount(subids, svyLibTemplateScript.getScriptContent()); |
| | | if (CollectionUtils.isNotEmpty(fillCount)) allFillCountList.addAll(fillCount); |
| | | } |
| | | subidAll += subids.size(); |
| | | fillCountAll += CollectionUtils.isEmpty(fillCount) ? 0 : fillCount.size(); |
| | | } |
| | | |
| | | |
| | | // è¿éå
è®°å½ä¸ä¸æ¯ä¸ªåç±»çæ»äººæ°åå¡«æ¥äººæ° |
| | | Map<String, Object> personCount = (Map<String, Object>) zzt.get(dimension); |
| | | if (!Objects.isNull(personCount)) { |
| | | Double fillCountAll2 = (Double) personCount.get("fillCountAll"); |
| | | Double subidAll2 = (Double) personCount.get("subidAll"); |
| | | personCount.put("fillCountAll", fillCountAll2 + fillCountAll); |
| | | personCount.put("subidAll", subidAll2 + subidAll); |
| | | personCount.put("receiveRate", Arith.div((Double) personCount.get("fillCountAll"), (Double) personCount.get("subidAll"))); |
| | | |
| | | //çä¸ä¸ä¹åææ²¡æè¯¥åç±»çå¡«æ¥é |
| | | List<ServiceSubtaskDetailDTO> serviceSubtaskDetailDTOS = assortNameFillCountMap.get(dimension); |
| | | if (CollectionUtils.isNotEmpty(serviceSubtaskDetailDTOS)) |
| | | allFillCountList.addAll(serviceSubtaskDetailDTOS); |
| | | personCount.put("averageScore", averageScore(allFillCountList)); |
| | | } else { |
| | | personCount = new HashMap<>(); |
| | | personCount.put("fillCountAll", fillCountAll); |
| | | personCount.put("subidAll", subidAll); |
| | | personCount.put("receiveRate", Arith.div(fillCountAll, subidAll)); |
| | | personCount.put("averageScore", averageScore(allFillCountList)); |
| | | zzt.put(dimension, personCount); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return zzt; |
| | | } |
| | | |
| | | /** |
| | | * è·åæé«å |
| | | * |
| | |
| | | patMedInhosp.setHospitaldistrictname(dto.getAreaName()); |
| | | } |
| | | |
| | | /** |
| | | * å¤çæ£è
æ¡£æ¡ï¼æ°å¢ææ´æ°ï¼ |
| | | * ä½¿ç¨ Redis åå¸å¼é鲿¢å¹¶åé夿å
¥ |
| | | */ |
| | | private PatArchive processPatientArchive(ServiceSLTDInhospResDTO dto) { |
| | | // æå»ºéç keyï¼åºäº patientno æ idcardno |
| | | String lockKey = "pat_archive_lock:" + |
| | | (StringUtils.isNotEmpty(dto.getMedicalRecordNo()) ? dto.getMedicalRecordNo() : dto.getIdCardNo()); |
| | | |
| | | // å°è¯è·ååå¸å¼éï¼æå¤çå¾
3 ç§ï¼éå® 10 ç§èªå¨éæ¾ |
| | | Boolean lockAcquired = redisTemplate.opsForValue().setIfAbsent(lockKey, "1", 10, TimeUnit.SECONDS); |
| | | |
| | | if (lockAcquired == null || !lockAcquired) { |
| | | log.warn("ãprocessPatientArchiveãè·ååå¸å¼é失败ï¼è·³è¿æ¬æ¬¡å¤çï¼å
¶ä»çº¿ç¨æ£å¨å¤çï¼ï¼patientno={}", dto.getMedicalRecordNo()); |
| | | // çå¾
䏿®µæ¶é´åéè¯æ¥è¯¢ |
| | | try { |
| | | Thread.sleep(500); |
| | | } catch (InterruptedException e) { |
| | | Thread.currentThread().interrupt(); |
| | | } |
| | | } |
| | | |
| | | try { |
| | | return doProcessPatientArchive(dto); |
| | | } finally { |
| | | // éæ¾é |
| | | if (lockAcquired != null && lockAcquired) { |
| | | redisTemplate.delete(lockKey); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * å®é
æ§è¡æ£è
æ¡£æ¡å¤çé»è¾ |
| | | */ |
| | | private PatArchive doProcessPatientArchive(ServiceSLTDInhospResDTO dto) { |
| | | List<PatArchive> existingArchives = null; |
| | | log.info("ãprocessPatientArchiveãæ°å¢æ£è
æ¡£æ¡ï¼æ¥è¯¢å
¥åä¿¡æ¯patientno:{}ï¼idcardno:{}", dto.getMedicalRecordNo(), dto.getIdCardNo()); |
| | | // ç¬¬ä¸æ¥ï¼æ patientno 精确æ¥éï¼ä¸æå
¥æ¶ä½¿ç¨ç medicalRecordNo ä¸è´ï¼ |
| | |
| | | PatArchive queryByPatientNo = new PatArchive(); |
| | | queryByPatientNo.setPatientno(patientno); |
| | | existingArchives = patArchiveService.selectPatArchiveList(queryByPatientNo); |
| | | log.debug("ãprocessPatientArchiveãæpatientnoæ¥è¯¢ï¼patientno={}, ç»ææ°é={}", patientno, existingArchives.size()); |
| | | } |
| | | |
| | | // ç¬¬äºæ¥ï¼æ patientno æ¥ä¸å°æ¶ï¼æ idcardno æ¥éï¼åæ¥ORï¼é¿å
ANDæ¡ä»¶æ¼æ¥ï¼ |
| | |
| | | PatArchive queryByIdCard = new PatArchive(); |
| | | queryByIdCard.setIdcardno(dto.getIdCardNo().trim()); |
| | | existingArchives = patArchiveService.selectPatArchiveList(queryByIdCard); |
| | | log.debug("ãprocessPatientArchiveãæidcardnoæ¥è¯¢ï¼idcardno={}, ç»ææ°é={}", dto.getIdCardNo(), existingArchives.size()); |
| | | } |
| | | |
| | | PatArchive patArchive = buildPatientArchive(dto); |
| | | log.info("ãprocessPatientArchiveãæ£è
æ¡£æ¡æ¥é宿ï¼patientno={}, æ¯å¦å·²åå¨={}", |
| | | patArchive.getPatientno(), CollectionUtils.isEmpty(existingArchives) ? "å¦" : "æ¯(id=" + existingArchives.get(0).getId() + ")"); |
| | | |
| | | if (CollectionUtils.isEmpty(existingArchives)) { |
| | | try { |
| | | //忥䏿¬¡ï¼ç¡®ä¿ä¸ä¼æéå¤ç |
| | | PatArchive queryByIdCard = new PatArchive(); |
| | | if(StringUtils.isNotEmpty(dto.getIdCardNo())) queryByIdCard.setIdcardno(dto.getIdCardNo().trim()); |
| | | if(StringUtils.isNotEmpty(dto.getMedicalRecordNo())) queryByIdCard.setPatientno(dto.getMedicalRecordNo()); |
| | | List<PatArchive> archivesByIdCard = patArchiveService.selectPatArchiveList(queryByIdCard); |
| | | // æç»ç¡®è®¤æ¥è¯¢ï¼é²å¾¡æ§ç¼ç¨ï¼é²æ¢Redisé失æçæç«¯æ
åµï¼ |
| | | PatArchive finalQuery = new PatArchive(); |
| | | if (StringUtils.isNotEmpty(dto.getIdCardNo())) { |
| | | finalQuery.setIdcardno(dto.getIdCardNo().trim()); |
| | | } |
| | | if (StringUtils.isNotEmpty(dto.getMedicalRecordNo())) { |
| | | finalQuery.setPatientno(dto.getMedicalRecordNo()); |
| | | } |
| | | |
| | | if (CollectionUtils.isEmpty(archivesByIdCard)) patArchiveService.insertPatArchive(patArchive); |
| | | log.info("ãprocessPatientArchiveãæ°å¢æ£è
æ¡£æ¡ï¼æ£è
ç¼å·ï¼{}", patArchive.getPatientno()); |
| | | List<PatArchive> finalCheck = patArchiveService.selectPatArchiveList(finalQuery); |
| | | log.info("ãprocessPatientArchiveãæç»ç¡®è®¤æ¥è¯¢ï¼patientno={}, idcardno={}, ç»ææ°é={}", |
| | | dto.getMedicalRecordNo(), dto.getIdCardNo(), finalCheck.size()); |
| | | |
| | | if (CollectionUtils.isEmpty(finalCheck)) { |
| | | patArchiveService.insertPatArchive(patArchive); |
| | | log.info("ãprocessPatientArchiveãâ æ°å¢æ£è
æ¡£æ¡æåï¼patientno={}, id={}", |
| | | patArchive.getPatientno(), patArchive.getId()); |
| | | } else { |
| | | // å
¶ä»çº¿ç¨å·²ç»æå
¥ï¼ç´æ¥ä½¿ç¨å·²æè®°å½ |
| | | existingArchives = finalCheck; |
| | | patArchive.setId(existingArchives.get(0).getId()); |
| | | patArchive.setNotrequiredFlag(existingArchives.get(0).getNotrequiredFlag()); |
| | | patArchive.setNotrequiredreason(existingArchives.get(0).getNotrequiredreason()); |
| | | log.info("ãprocessPatientArchiveãæ¡£æ¡å·²è¢«å
¶ä»çº¿ç¨å建ï¼ä½¿ç¨å·²æè®°å½ï¼id={}", patArchive.getId()); |
| | | } |
| | | } catch (org.springframework.dao.DuplicateKeyException e) { |
| | | log.error("ãprocessPatientArchiveãæ£è
æ¡£æ¡å·²åå¨(å¹¶åæå
¥)ï¼è·³è¿ï¼patientno={}, idcardno={}", patArchive.getPatientno(), patArchive.getIdcardno()); |
| | | log.warn("ãprocessPatientArchiveãæ£è
æ¡£æ¡å·²åå¨(å¹¶åæå
¥å¼å¸¸)ï¼è·³è¿ï¼patientno={}, idcardno={}", |
| | | patArchive.getPatientno(), patArchive.getIdcardno()); |
| | | // å¹¶åæå
¥åºæ¯ï¼éæ°æ¥è¯¢è·åå·²åå¨çè®°å½ |
| | | PatArchive queryRetry = new PatArchive(); |
| | | queryRetry.setPatientno(patArchive.getPatientno()); |
| | | if (StringUtils.isNotEmpty(patArchive.getIdcardno())) { |
| | | queryRetry.setIdcardno(patArchive.getIdcardno()); |
| | | } |
| | | existingArchives = patArchiveService.selectPatArchiveList(queryRetry); |
| | | if (CollectionUtils.isNotEmpty(existingArchives)) { |
| | | patArchive.setId(existingArchives.get(0).getId()); |
| | | patArchive.setNotrequiredFlag(existingArchives.get(0).getNotrequiredFlag()); |
| | | patArchive.setNotrequiredreason(existingArchives.get(0).getNotrequiredreason()); |
| | | log.info("ãprocessPatientArchiveãä»å¼å¸¸æ¢å¤ï¼è·åå·²ææ¡£æ¡ï¼id={}", patArchive.getId()); |
| | | } |
| | | } |
| | | } else { |
| | |
| | | patArchive.setNotrequiredFlag(existingArchives.get(0).getNotrequiredFlag()); |
| | | patArchive.setNotrequiredreason(existingArchives.get(0).getNotrequiredreason()); |
| | | patArchiveService.updateArchive(patArchive); |
| | | log.info("ãprocessPatientArchiveãæ´æ°æ£è
æ¡£æ¡ï¼æ£è
ç¼å·ï¼{}", patArchive.getPatientno()); |
| | | log.info("ãprocessPatientArchiveãâ æ´æ°æ£è
æ¡£æ¡ï¼patientno={}, id={}", |
| | | patArchive.getPatientno(), patArchive.getId()); |
| | | } |
| | | |
| | | return patArchive; |
| | |
| | | } |
| | | ServiceTask serviceTask = serviceTaskService.selectServiceTaskByTaskid(taskid); |
| | | serviceSubtaskDetailVO.setQuestiontext(svyTaskTemplateScriptVO.getScriptContent()); |
| | | serviceSubtaskDetailVO.setIsMydException(svyTaskTemplateScriptVO.getIsMydException()); |
| | | serviceSubtaskDetailVO.setDimension(svyTaskTemplateScriptVO.getDimension()); |
| | | serviceSubtaskDetailVO.setCategoryid(svyTaskTemplateScriptVO.getCategoryid()); |
| | | serviceSubtaskDetailVO.setTaskid(Long.valueOf(taskid)); |
| | | serviceSubtaskDetailVO.setTargetid(svyTaskTemplateScriptVO.getTargetid() != null ? svyTaskTemplateScriptVO.getTargetid().intValue() : null); |
| | |
| | | SvyTaskTemplateTargetoption stt = null; |
| | | Long isabnormalFlag = 0L; |
| | | for (SvyTaskTemplateTargetoption svyTaskTemplateTargetoption : svyTaskTemplateScriptVO.getSvyTaskTemplateTargetoptions()) { |
| | | if (svyTaskTemplateTargetoption.getOptioncontent().trim().equals(svyTaskTemplateScriptVO.getScriptResult())) |
| | | if (StringUtils.isNotEmpty(svyTaskTemplateTargetoption.getOptioncontent()) && svyTaskTemplateTargetoption.getOptioncontent().trim().equals(svyTaskTemplateScriptVO.getScriptResult())) |
| | | stt = svyTaskTemplateTargetoption; |
| | | } |
| | | |
| | |
| | | public List<ServiceSubtaskRes> patItem(ServiceSubtaskEntity serviceSubtaskEntity) { |
| | | if (serviceSubtaskEntity.getSendstateView() != null) { |
| | | // 1ï¼å¾
é访ï¼2 å¾
åéï¼ï¼2ï¼é访ä¸ï¼3 å·²åéã1 被é¢åï¼ã3ï¼æªå®æï¼5 åé失败ã7ãè¶
æ¶ï¼ã4ï¼å·²å®æï¼ 6 已宿ï¼ã5ï¼æ éé访ï¼4 䏿§è¡ï¼ |
| | | if (serviceSubtaskEntity.getSendstateView() == 1) serviceSubtaskEntity.setSendstates(new ArrayList<>(Arrays.asList(2L))); |
| | | if (serviceSubtaskEntity.getSendstateView() == 2) serviceSubtaskEntity.setSendstates(new ArrayList<>(Arrays.asList(1L, 3L))); |
| | | if (serviceSubtaskEntity.getSendstateView() == 3) serviceSubtaskEntity.setSendstates(new ArrayList<>(Arrays.asList(5L, 7L))); |
| | | if (serviceSubtaskEntity.getSendstateView() == 4) serviceSubtaskEntity.setSendstates(new ArrayList<>(Arrays.asList(6L))); |
| | | if (serviceSubtaskEntity.getSendstateView() == 5) serviceSubtaskEntity.setSendstates(new ArrayList<>(Arrays.asList(4L))); |
| | | if (serviceSubtaskEntity.getSendstateView() == 1) |
| | | serviceSubtaskEntity.setSendstates(new ArrayList<>(Arrays.asList(2L))); |
| | | if (serviceSubtaskEntity.getSendstateView() == 2) |
| | | serviceSubtaskEntity.setSendstates(new ArrayList<>(Arrays.asList(1L, 3L))); |
| | | if (serviceSubtaskEntity.getSendstateView() == 3) |
| | | serviceSubtaskEntity.setSendstates(new ArrayList<>(Arrays.asList(5L, 7L))); |
| | | if (serviceSubtaskEntity.getSendstateView() == 4) |
| | | serviceSubtaskEntity.setSendstates(new ArrayList<>(Arrays.asList(6L))); |
| | | if (serviceSubtaskEntity.getSendstateView() == 5) |
| | | serviceSubtaskEntity.setSendstates(new ArrayList<>(Arrays.asList(4L))); |
| | | } |
| | | |
| | | List<ServiceSubtask> selectServiceSubtaskList = this.selectServiceSubtaskList(serviceSubtaskEntity); |
| | |
| | | serviceSubtask.setPatid(patTaskRelevance.getPatid()); |
| | | serviceSubtask.setCreateTime(DateUtils.getNowDate()); |
| | | serviceSubtask.setInhospid(patTaskRelevance.getHospid()); |
| | | serviceSubtask.setSendstate(1L); |
| | | if (serviceTaskVO.getLongTask() != null && serviceTaskVO.getLongTask() == 1) |
| | | //æ°å»ºå®æå°±æ¯å¾
åéç¶æ |
| | | serviceSubtask.setSendstate(2L); |
| | | serviceSubtask.setDeptcode(patTaskRelevance.getDeptcode()); |
| | | serviceSubtask.setDeptname(patTaskRelevance.getDeptName()); |
| | |
| | | redisCache.removeElementFromList("cache-4", serviceSubtask.getId().toString()); |
| | | //å°åºå
¥é¢è¡¨çæ°æ®ï¼è¿åæè¿æªå¤ççç¶æ |
| | | if(serviceSubtask.getServiceType().equals("2")) { |
| | | ServiceTask st = serviceTaskService.selectServiceTaskByTaskid(serviceSubtask.getTaskid()); |
| | | //妿任塿¯é¿æä»»å¡ï¼éè¦å°è¯¥æ£è
çåºå
¥é¢æ°æ®è¿åæè¿æªå¤ççç¶æ |
| | | if (st != null && st.getLongTask() == 1) { |
| | | PatMedInhosp patMedInhosp = new PatMedInhosp(); |
| | | patMedInhosp.setDeptcheckFlag("0"); |
| | | patMedInhosp.setWardcheckFlag("0"); |
| | | patMedInhosp.setDiagcheckFlag("0"); |
| | | patMedInhosp.setInhospid(serviceSubtask.getInhospid()); |
| | | patMedInhospMapper.updatePatMedInhosp(patMedInhosp); |
| | | } |
| | | }else if(serviceSubtask.getServiceType().equals("3")) { |
| | | |
| | | if(serviceSubtask.getInhospid()!=null) { |
| | | PatMedOuthospQueryReq req=new PatMedOuthospQueryReq(); |
| | | req.setOuthospno(serviceSubtask.getHospno()); |
| | |
| | | IvrTaskTemplateScript ivrTaskTemplateScript = iIvrTaskTemplateScriptService.selectIvrTaskTemplateScriptByID(serviceSubtaskDetail.getScriptid()); |
| | | if (ivrTaskTemplateScript != null) |
| | | serviceSubtaskDetail.setCategoryid(ivrTaskTemplateScript.getScriptAssortid()); |
| | | serviceSubtaskDetail.setIsMydException(ivrTaskTemplateScript.getIsMydException()); |
| | | serviceSubtaskDetail.setDimension(ivrTaskTemplateScript.getDimension()); |
| | | } |
| | | |
| | | serviceSubtaskDetail.setSubId(selectServiceSubtaskList.get(0).getId()); |
| | |
| | | //è·ååæ¶çç»è®¡åé |
| | | Map<String, Map<String, Object>> jsRates = getSsRateForSfStatistics(serviceSubtaskCountReq, collect); |
| | | //䏿¬¡æ§æ¥è¯¢ææåç»çé¢ç®ç»è®¡ï¼é¿å
æ¯ä¸ªåç»ä¸æ¬¡SQLï¼N+1ï¼ |
| | | List<Long> allSubTaskIds = rawData.stream().map(ServiceSubtask::getId) |
| | | .filter(Objects::nonNull) |
| | | .distinct() |
| | | .collect(Collectors.toList()); |
| | | List<Long> allSubTaskIds = rawData.stream().map(ServiceSubtask::getId).filter(Objects::nonNull).distinct().collect(Collectors.toList()); |
| | | List<ServiceSubtaskCount> subCounts = new ArrayList<>(); |
| | | if (CollectionUtils.isNotEmpty(allSubTaskIds)) { |
| | | serviceSubtaskCountReq.setSubTaskIds(allSubTaskIds); |
| | |
| | | <resultMap type="com.smartor.domain.IvrLibaScript" id="IvrLibaScriptResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="assortid" column="assortid"/> |
| | | <result property="dimension" column="dimension"/> |
| | | <result property="scriptTopic" column="script_topic"/> |
| | | <result property="scriptContent" column="script_content"/> |
| | | <result property="ivrVoice" column="ivr_voice"/> |
| | |
| | | <sql id="selectIvrLibaScriptVo"> |
| | | select id, |
| | | suitway, |
| | | dimension, |
| | | assortid, |
| | | targetdesc, |
| | | campus, |
| | |
| | | and del_flag = 0 |
| | | <if test="id != null ">and id = #{id}</if> |
| | | <if test="deptIds != null and deptIds != ''">and deptIds = #{deptIds}</if> |
| | | <if test="dimension != null and dimension != ''">and dimension = #{dimension}</if> |
| | | <if test="deptNames != null and deptNames != ''">and deptNames like concat('%', #{deptNames}, '%')</if> |
| | | <if test="scriptTopic != null and scriptTopic != ''">and script_topic like concat('%', #{scriptTopic}, |
| | | '%') |
| | |
| | | <if test="valueType != null">value_type,</if> |
| | | <if test="reply != null">reply,</if> |
| | | <if test="targetdesc != null">targetdesc,</if> |
| | | <if test="dimension != null">dimension,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="scriptTopic != null">#{scriptTopic},</if> |
| | |
| | | <if test="valueType != null">#{valueType},</if> |
| | | <if test="reply != null">#{reply},</if> |
| | | <if test="targetdesc != null">#{targetdesc},</if> |
| | | <if test="dimension != null">#{dimension},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="valueType != null">value_type = #{valueType},</if> |
| | | <if test="reply != null">reply = #{reply},</if> |
| | | <if test="targetdesc != null">targetdesc = #{targetdesc},</if> |
| | | <if test="dimension != null">dimension = #{dimension},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | <result property="dutyDeptCode" column="duty_dept_code"/> |
| | | <result property="reportDeptCode" column="report_dept_name"/> |
| | | <result property="reportDeptName" column="report_dept_code"/> |
| | | <result property="isMydException" column="is_myd_exception"/> |
| | | <result property="dimension" column="dimension"/> |
| | | |
| | | </resultMap> |
| | | |
| | | <sql id="selectIvrLibaTemplateScriptVo"> |
| | | select id, |
| | | scriptno, |
| | | is_myd_exception, |
| | | dimension, |
| | | sort, |
| | | script_assortname, |
| | | duty_dept_name, |
| | |
| | | <include refid="selectIvrLibaTemplateScriptVo"/> |
| | | where del_flag = 0 |
| | | <if test="scriptno != null ">and scriptno = #{scriptno}</if> |
| | | <if test="isMydException != null ">and is_myd_exception = #{isMydException}</if> |
| | | <if test="dimension != null ">and dimension = #{dimension}</if> |
| | | <if test="scriptAssortid != null ">and script_assortid = #{scriptAssortid}</if> |
| | | <if test="groupName != null ">and group_name = #{groupName}</if> |
| | | <if test="scriptDesc != null ">and script_desc = #{scriptDesc}</if> |
| | |
| | | <if test="score != null">and score = #{score}</if> |
| | | </select> |
| | | |
| | | |
| | | <select id="selectILTSBydimension" parameterType="com.smartor.domain.IvrLibaTemplateScript" |
| | | resultMap="IvrLibaTemplateScriptResult"> |
| | | <include refid="selectIvrLibaTemplateScriptVo"/> |
| | | <where>del_flag=0 |
| | | <if test="dimensionList != null ">and dimension in |
| | | <foreach item="dimension" collection="dimensionList" open="(" separator="," close=")"> |
| | | #{dimension} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIvrLibaTemplateScriptByID" parameterType="Long" resultMap="IvrLibaTemplateScriptResult"> |
| | | <include refid="selectIvrLibaTemplateScriptVo"/> |
| | | where id = #{id} |
| | |
| | | <if test="dutyDeptCode != null and dutyDeptCode != ''">duty_dept_code,</if> |
| | | <if test="reportDeptName != null and reportDeptName != ''">report_dept_name,</if> |
| | | <if test="reportDeptCode != null and reportDeptCode != ''">report_dept_code,</if> |
| | | <if test="isMydException != null and isMydException != ''">is_myd_exception,</if> |
| | | <if test="dimension != null and dimension != ''">dimension,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="scriptno != null">#{scriptno},</if> |
| | |
| | | <if test="dutyDeptCode != null and dutyDeptCode != ''">#{dutyDeptCode},</if> |
| | | <if test="reportDeptName != null and reportDeptName != ''">#{reportDeptName},</if> |
| | | <if test="reportDeptCode != null and reportDeptCode != ''">#{reportDeptCode},</if> |
| | | <if test="isMydException != null and isMydException != ''">#{isMydException},</if> |
| | | <if test="dimension != null and dimension != ''">#{dimension},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="isMust != null and isMust != ''">is_must = #{isMust},</if> |
| | | <if test="scriptDesc != null ">script_desc = #{scriptDesc},</if> |
| | | <if test="scriptType != null ">script_type = #{scriptType},</if> |
| | | <if test="isMydException != null and isMydException != ''">is_myd_exception = #{isMydException},</if> |
| | | <if test="dimension != null and dimension != ''">dimension = #{dimension},</if> |
| | | <if test="sort != null ">sort = #{sort},</if> |
| | | <if test="ivrtext != null ">ivrtext = #{ivrtext},</if> |
| | | <if test="branchFlag != null and branchFlag != ''">branch_flag = #{branchFlag},</if> |
| | |
| | | <result property="dutyDeptCode" column="duty_dept_code"/> |
| | | <result property="reportDeptCode" column="report_dept_name"/> |
| | | <result property="reportDeptName" column="report_dept_code"/> |
| | | <result property="dimension" column="dimension"/> |
| | | <result property="isMydException" column="is_myd_exception"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectIvrTaskTemplateScriptVo"> |
| | | select id, |
| | | taskid, |
| | | dimension, |
| | | is_myd_exception, |
| | | duty_dept_name, |
| | | duty_dept_code, |
| | | report_dept_name, |
| | |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="taskid != null ">and taskid = #{taskid}</if> |
| | | <if test="dimension != null and dimension != ''">and dimension = #{dimension}</if> |
| | | <if test="isMydException != null and isMydException != ''">and is_myd_exception = #{isMydException}</if> |
| | | <if test="scriptAssortid != null ">and script_assortid = #{scriptAssortid}</if> |
| | | <if test="score != null ">and score = #{score}</if> |
| | | <if test="scriptTopic != null ">and script_topic = #{scriptTopic}</if> |
| | |
| | | <if test="dutyDeptCode != null and dutyDeptCode != ''">duty_dept_code,</if> |
| | | <if test="reportDeptName != null and reportDeptName != ''">report_dept_name,</if> |
| | | <if test="reportDeptCode != null and reportDeptCode != ''">report_dept_code,</if> |
| | | <if test="dimension != null and dimension != ''">dimension,</if> |
| | | <if test="isMydException != null and isMydException != ''">is_myd_exception,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="taskid != null">#{taskid},</if> |
| | |
| | | <if test="dutyDeptCode != null and dutyDeptCode != ''">#{dutyDeptCode},</if> |
| | | <if test="reportDeptName != null and reportDeptName != ''">#{reportDeptName},</if> |
| | | <if test="reportDeptCode != null and reportDeptCode != ''">#{reportDeptCode},</if> |
| | | <if test="dimension != null and dimension != ''">#{dimension},</if> |
| | | <if test="isMydException != null and isMydException != ''">#{isMydException},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="ivrtext != null">ivrtext = #{ivrtext},</if> |
| | | <if test="scriptTopic != null ">script_topic = #{scriptTopic},</if> |
| | | <if test="scriptAssortid != null ">script_assortid = #{scriptAssortid},</if> |
| | | <if test="dimension != null and dimension != ''">dimension = #{dimension},</if> |
| | | <if test="isMydException != null and isMydException != ''">is_myd_exception = #{isMydException},</if> |
| | | <if test="dutyDeptName != null and dutyDeptName != ''">duty_dept_name = #{dutyDeptName},</if> |
| | | <if test="dutyDeptCode != null and dutyDeptCode != ''">duty_dept_code = #{dutyDeptCode},</if> |
| | | <if test="reportDeptName != null and reportDeptName != ''">report_dept_name = #{reportDeptName},</if> |
| | |
| | | <result property="assigntime" column="assigntime"/> |
| | | <result property="starttime" column="starttime"/> |
| | | <result property="answertime" column="answertime"/> |
| | | <result property="dimension" column="lib_templateid"/> |
| | | <result property="isMydException" column="is_myd_exception"/> |
| | | |
| | | <result property="silent" column="silent"/> |
| | | <result property="dtmfKey" column="dtmf_key"/> |
| | |
| | | <sql id="selectServiceSubtaskDetailVo"> |
| | | select id, |
| | | sub_id, |
| | | is_myd_exception, |
| | | dimension, |
| | | lib_templateid, |
| | | targetid, |
| | | answerps, |
| | |
| | | <include refid="selectServiceSubtaskDetailVo"/> |
| | | where 1=1 |
| | | <if test="subId != null">and sub_id = #{subId}</if> |
| | | <if test="isMydException != null">and is_myd_exception = #{isMydException}</if> |
| | | <if test="dimension != null">and dimension = #{dimension}</if> |
| | | <if test="templateType != null">and template_type = #{templateType}</if> |
| | | <if test="libTemplateid != null">and lib_templateid = #{libTemplateid}</if> |
| | | <if test="targetid != null">and targetid = #{targetid}</if> |
| | |
| | | resultType="java.util.HashMap"> |
| | | select |
| | | ssd.sub_id, |
| | | ssd.is_myd_exception, |
| | | ssd.dimension, |
| | | ssd.taskid, |
| | | ssd.patid, |
| | | sd.sendname, |
| | |
| | | <if test="subId != null">and ssd.sub_id = #{subId}</if> |
| | | <if test="taskid != null">and ssd.taskid = #{taskid}</if> |
| | | <if test="questiontext != null and questiontext != ''">and ssd.questiontext = #{questiontext}</if> |
| | | <if test="isMydException != null">and ssd.is_myd_exception = #{isMydException}</if> |
| | | <if test="dimension != null">and ssd.dimension = #{dimension}</if> |
| | | <if test="matchedtext != null and matchedtext != ''">and ssd.matchedtext = #{matchedtext}</if> |
| | | <if test="asrtext != null and asrtext != ''">and ssd.asrtext = #{asrtext}</if> |
| | | <if test="scriptid != null">and ssd.scriptid = #{scriptid}</if> |
| | |
| | | <if test="templateType != null">template_type,</if> |
| | | <if test="libTemplateid != null">lib_templateid,</if> |
| | | <if test="score != null">score,</if> |
| | | <if test="isMydException != null">is_myd_exception,</if> |
| | | <if test="dimension != null">dimension,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | |
| | | <if test="templateType != null">#{templateType},</if> |
| | | <if test="libTemplateid != null">#{libTemplateid},</if> |
| | | <if test="score != null">#{score},</if> |
| | | <if test="isMydException != null">#{isMydException},</if> |
| | | <if test="dimension != null">#{dimension},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateServiceSubtaskDetail" parameterType="com.smartor.domain.ServiceSubtaskDetail"> |
| | | update service_subtask_detail |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="isMydException != null">is_myd_exception = #{isMydException},</if> |
| | | <if test="dimension != null">dimension = #{dimension},</if> |
| | | <if test="subId != null">sub_id = #{subId},</if> |
| | | <if test="taskid != null">taskid = #{taskid},</if> |
| | | <if test="targetid != null">targetid = #{targetid},</if> |
| | |
| | | <if test="templateType != null">template_type = #{templateType},</if> |
| | | <if test="libTemplateid != null">lib_templateid = #{libTemplateid},</if> |
| | | <if test="score != null">score = #{score},</if> |
| | | <if test="isMydException != null">is_myd_exception = #{isMydException},</if> |
| | | <if test="dimension != null">dimension = #{dimension},</if> |
| | | </trim> |
| | | where patid = #{patid} and scriptid = #{scriptid} and sub_id = #{subId} |
| | | </update> |
| | |
| | | <result property="pid" column="pid"/> |
| | | <result property="categoryid" column="categoryid"/> |
| | | <result property="templateType" column="template_type"/> |
| | | <result property="isMydException" column="is_myd_exception"/> |
| | | <result property="dimension" column="dimension"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectServiceSubtaskDetailTtraceVo"> |
| | | select id, |
| | | detail_id, |
| | | is_myd_exception, |
| | | dimension, |
| | | template_type, |
| | | sub_id, |
| | | taskid, |
| | |
| | | <if test="type != null and type != ''"> |
| | | and type = #{type} |
| | | </if> |
| | | <if test="dimension != null and dimension != ''"> |
| | | and dimension = #{dimension} |
| | | </if> |
| | | <if test="isMydException != null "> |
| | | and is_myd_exception = #{isMydException} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="tracedeallist" parameterType="com.smartor.domain.VO.DetailTraceDealVO" |
| | |
| | | </if> |
| | | <if test="templateType != null"> |
| | | and template_type = #{templateType} |
| | | </if> |
| | | <if test="isMydException != null "> |
| | | and is_myd_exception = #{isMydException} |
| | | </if> |
| | | <if test="dimension != null and dimension != ''"> |
| | | and dimension = #{dimension} |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | </if> |
| | | <if test="templateType != null">template_type, |
| | | </if> |
| | | <if test="dimension != null">dimension, |
| | | </if> |
| | | <if test="isMydException != null">is_myd_exception, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="detailId != null">#{detailId}, |
| | |
| | | <if test="type != null">#{type}, |
| | | </if> |
| | | <if test="templateType != null">#{templateType}, |
| | | </if> |
| | | <if test="dimension != null">#{dimension}, |
| | | </if> |
| | | <if test="isMydException != null">#{isMydException}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | |
| | | <if test="templateType != null">template_type = |
| | | #{templateType}, |
| | | </if> |
| | | <if test="dimension != null">dimension = |
| | | #{dimension}, |
| | | </if> |
| | | <if test="isMydException != null">is_myd_exception = |
| | | #{isMydException}, |
| | | </if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | <result property="targetname" column="targetname"/> |
| | | <result property="targettype" column="targettype"/> |
| | | <result property="targetoptions" column="targetoptions"/> |
| | | <result property="dimension" column="dimension"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectSvyLibScriptVo"> |
| | | select id, |
| | | scoretype, |
| | | dimension, |
| | | targetid, |
| | | targetname, |
| | | targettype, |
| | |
| | | and del_flag = 0 |
| | | <if test="id != null ">and id = #{id}</if> |
| | | <if test="scriptType != null and scriptType != ''">and script_type = #{scriptType}</if> |
| | | <if test="dimension != null and dimension != ''">and dimension = #{dimension}</if> |
| | | <if test="categoryid != null ">and categoryid = #{categoryid}</if> |
| | | <if test="scriptContent != null and scriptContent != ''">and script_content like concat('%', |
| | | #{scriptContent}, '%') |
| | |
| | | <if test="targettype != null and targettype != ''">targettype,</if> |
| | | <if test="targetoptions != null and targetoptions != ''">targetoptions,</if> |
| | | <if test="guid != null and guid != ''">guid,</if> |
| | | <if test="dimension != null and dimension != ''">dimension,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="scriptType != null">#{scriptType},</if> |
| | |
| | | <if test="targettype != null and targettype != ''">#{targettype},</if> |
| | | <if test="targetoptions != null and targetoptions != ''">#{targetoptions},</if> |
| | | <if test="guid != null and guid != ''">#{guid},</if> |
| | | <if test="dimension != null and dimension != ''">#{dimension},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="targetname != null and targetname != ''">targetname = #{targetname},</if> |
| | | <if test="targettype != null and targettype != ''">targettype = #{targettype},</if> |
| | | <if test="targetoptions != null and targetoptions != ''">targetoptions = #{targetoptions},</if> |
| | | <if test="dimension != null and dimension != ''">dimension = #{dimension},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | <result property="dutyDeptCode" column="duty_dept_code"/> |
| | | <result property="reportDeptCode" column="report_dept_name"/> |
| | | <result property="reportDeptName" column="report_dept_code"/> |
| | | <result property="isMydException" column="is_myd_exception"/> |
| | | <result property="dimension" column="dimension"/> |
| | | |
| | | </resultMap> |
| | | |
| | | <sql id="selectSvyLibTemplateScriptVo"> |
| | | select id, |
| | | script_type, |
| | | is_myd_exception, |
| | | dimension, |
| | | duty_dept_name, |
| | | duty_dept_code, |
| | | report_dept_name, |
| | |
| | | and del_flag = 0 |
| | | <if test="nextScriptno != null ">and next_scriptno = #{nextScriptno}</if> |
| | | <if test="scriptType != null and scriptType != ''">and script_type = #{scriptType}</if> |
| | | <if test="isMydException != null and isMydException != ''">and is_myd_exception = #{isMydException}</if> |
| | | <if test="dimension != null and dimension != ''">and dimension = #{dimension}</if> |
| | | <if test="scriptno != null and scriptno != ''">and scriptno = #{scriptno}</if> |
| | | <if test="scriptid != null">and scriptid = #{scriptid}</if> |
| | | <if test="scriptDesc != null and scriptDesc != ''">and script_desc = #{scriptDesc}</if> |
| | |
| | | <if test="pageSize != null and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if> |
| | | </select> |
| | | |
| | | <select id="selectSLTScriptListBydimension" parameterType="com.smartor.domain.SvyLibTemplateScriptVO" |
| | | resultMap="SvyLibTemplateScriptResult"> |
| | | <include refid="selectSvyLibTemplateScriptVo"/> |
| | | <where>del_flag=0 |
| | | <if test="dimensionList != null ">and dimension in |
| | | <foreach item="dimension" collection="dimensionList" open="(" separator="," close=")"> |
| | | #{dimension} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSvyLibTemplateScriptByTopicid" parameterType="Long" resultMap="SvyLibTemplateScriptResult"> |
| | | <include refid="selectSvyLibTemplateScriptVo"/> |
| | | where id = #{id} |
| | |
| | | <if test="reportDeptName != null and reportDeptName != ''">report_dept_name,</if> |
| | | <if test="reportDeptCode != null and reportDeptCode != ''">report_dept_code,</if> |
| | | <if test="categoryName != null and categoryName != ''">categoryName,</if> |
| | | <if test="isMydException != null and isMydException != ''">is_myd_exception,</if> |
| | | <if test="dimension != null and dimension != ''">dimension,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="nextScriptno != null">#{nextScriptno},</if> |
| | |
| | | <if test="reportDeptName != null and reportDeptName != ''">#{reportDeptName},</if> |
| | | <if test="reportDeptCode != null and reportDeptCode != ''">#{reportDeptCode},</if> |
| | | <if test="categoryName != null and categoryName != ''">#{categoryName},</if> |
| | | <if test="isMydException != null and isMydException != ''">#{isMydException},</if> |
| | | <if test="dimension != null and dimension != ''">#{dimension},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="reportDeptName != null and reportDeptName != ''">report_dept_name = #{reportDeptName},</if> |
| | | <if test="reportDeptCode != null and reportDeptCode != ''">report_dept_code = #{reportDeptCode},</if> |
| | | <if test="categoryName != null and categoryName != ''">categoryName = #{categoryName},</if> |
| | | <if test="isMydException != null and isMydException != ''">is_myd_exception = #{isMydException},</if> |
| | | <if test="dimension != null and dimension != ''">dimension = #{dimension},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | <result property="dutyDeptCode" column="duty_dept_code"/> |
| | | <result property="reportDeptCode" column="report_dept_name"/> |
| | | <result property="reportDeptName" column="report_dept_code"/> |
| | | <result property="isMydException" column="is_myd_exception"/> |
| | | <result property="dimension" column="dimension"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectSvyTaskTemplateScriptVo"> |
| | | select id, |
| | | sort, |
| | | is_myd_exception, |
| | | dimension, |
| | | duty_dept_name, |
| | | duty_dept_code, |
| | | report_dept_name, |
| | |
| | | <include refid="selectSvyTaskTemplateScriptVo"/> |
| | | where 1=1 |
| | | <if test="taskid != null ">and taskid = #{taskid}</if> |
| | | <if test="isMydException != null ">and is_myd_exception = #{isMydException}</if> |
| | | <if test="dimension != null ">and dimension = #{dimension}</if> |
| | | <if test="categoryid != null ">and categoryid = #{categoryid}</if> |
| | | <if test="ishide != null ">and ishide = #{ishide}</if> |
| | | <if test="scriptno != null ">and scriptno = #{scriptno}</if> |
| | |
| | | <if test="dutyDeptCode != null and dutyDeptCode != ''">duty_dept_code,</if> |
| | | <if test="reportDeptName != null and reportDeptName != ''">report_dept_name,</if> |
| | | <if test="reportDeptCode != null and reportDeptCode != ''"> report_dept_code,</if> |
| | | <if test="isMydException != null ">is_myd_exception,</if> |
| | | <if test="dimension != null ">dimension,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="taskid != null">#{taskid},</if> |
| | |
| | | <if test="dutyDeptCode != null and dutyDeptCode != ''">#{dutyDeptCode},</if> |
| | | <if test="reportDeptName != null and reportDeptName != ''">#{reportDeptName},</if> |
| | | <if test="reportDeptCode != null and reportDeptCode != ''">#{reportDeptCode},</if> |
| | | <if test="isMydException != null ">#{isMydException},</if> |
| | | <if test="dimension != null ">#{dimension},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="dutyDeptCode != null and dutyDeptCode != ''"> duty_dept_code = #{dutyDeptCode},</if> |
| | | <if test="reportDeptName != null and reportDeptName != ''">report_dept_name = #{reportDeptName},</if> |
| | | <if test="reportDeptCode != null and reportDeptCode != ''">report_dept_code = #{reportDeptCode},</if> |
| | | <if test="isMydException != null ">is_myd_exception = #{isMydException},</if> |
| | | <if test="dimension != null ">dimension = #{dimension},</if> |
| | | </trim> |
| | | where id = #{d} |
| | | </update> |