| | |
| | | public void onMessage(Message message, byte[] pattern) { |
| | | log.info("çå¬Redis keyè¿æï¼keyï¼{}ï¼channelï¼{}", message.toString(), new String(pattern)); |
| | | String ip = localIP; |
| | | log.error("æ¬æºçç½ç»IP为:{}", ip); |
| | | log.info("æ¬æºçç½ç»IP为:{}", ip); |
| | | String content = message.toString(); |
| | | //夿æ¯ä¸æ¯ä»»å¡ä¿¡æ¯ï¼å¦æä¸æ¯ï¼ç´æ¥è¿åï¼ä¸éè¦æ§è¡ |
| | | if (!content.contains("taskid") || !port.equals("8095")) { |
| | |
| | | * @param commonTaskcallMQ |
| | | */ |
| | | public void tsakHandle(CommonTaskcallMQ commonTaskcallMQ, String ip, Integer type) { |
| | | log.error("è¿ä»»å¡äºåï¼{}", commonTaskcallMQ); |
| | | log.info("è¿ä»»å¡äºåï¼{}", commonTaskcallMQ); |
| | | //夿ä¸ä¸commonTaskcallMQä¸çstopstateæ¯å¦ä¸ivr_taskä¸çä¸è´ï¼ä¸ä¸è´ï¼åè¯´ææ¯æåäº |
| | | ServiceTask ivrTask1 = ivrTaskMapper.selectServiceTaskByTaskid(commonTaskcallMQ.getTaskid()); |
| | | |
| | |
| | | if (StringUtils.isNotEmpty(commonTaskcallMQ.getPreachform())) { |
| | | //å¦ä½ä»»å¡åéæ¹å¼ä¸ä¸ºç©º |
| | | String[] split = commonTaskcallMQ.getPreachform().split(","); |
| | | log.error("splitçå¼ä¸ºï¼{}", split); |
| | | log.info("splitçå¼ä¸ºï¼{}", split); |
| | | |
| | | //å®ä¹ä¸ä¸ªéåï¼ç¨ä¸åæ²¡ææ§è¡çåä»»å¡ID |
| | | List<Long> subIds = new ArrayList<>(); |
| | |
| | | //è¯´ææ¯ç«å³åé |
| | | ServiceSubtaskVO serviceSubtask1 = new ServiceSubtaskVO(); |
| | | serviceSubtask1.setTaskid(commonTaskcallMQ.getTaskid()); |
| | | log.error("ç¼åä¸serviceSubtask1çå¼ä¸ºï¼{}", serviceSubtask1); |
| | | log.info("ç¼åä¸serviceSubtask1çå¼ä¸ºï¼{}", serviceSubtask1); |
| | | List<String> list = new ArrayList<>(); |
| | | List<ServiceSubtask> selectServiceSubtaskList1 = ivrTaskcallMapper.selectServiceSubtaskList(serviceSubtask1); |
| | | for (ServiceSubtask serviceSubtask2 : selectServiceSubtaskList1) { |
| | | list.add(serviceSubtask2.getId().toString()); |
| | | } |
| | | log.error("ç¼åä¸cache-0çå¼ä¸ºï¼{}", list); |
| | | log.info("ç¼åä¸cache-0çå¼ä¸ºï¼{}", list); |
| | | // redisCache.setCacheListLeft("cache-0", list); |
| | | redisCache.setCacheListLeftAndDistinct("cache-0", list); |
| | | } else { |
| | |
| | | //丽水ççä¿¡åéæ¹å¼ |
| | | Map<String, String> map = MsgLSEnum.getAddressByCode(serviceSubtask.getOrgid()); |
| | | String token = LSHospTokenUtil.getToken(serviceSubtask.getOrgid()); |
| | | log.error("-----------tokençå¼ä¸ºï¼{}", token); |
| | | log.info("-----------tokençå¼ä¸ºï¼{}", token); |
| | | if (ObjectUtils.isNotEmpty(map) && StringUtils.isEmpty(map.get("address"))) { |
| | | ServiceSubtask ss = new ServiceSubtask(); |
| | | ss.setResult("error"); |
| | |
| | | @ApiOperation("坿æ¬è½¬html") |
| | | @PostMapping("/htmlContent") |
| | | public AjaxResult htmlContent(@RequestBody HtmlContentVO htmlContentVO) { |
| | | log.error("htmlContentVOå
¥å为ï¼{}", htmlContentVO); |
| | | log.info("htmlContentVOå
¥å为ï¼{}", htmlContentVO); |
| | | // è·åæä»¶çåå§åç§° |
| | | String fileName = htmlContentVO.getFileName(); |
| | | if (!fileName.endsWith(".html")) { |
| | |
| | | StringUtils.isEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && |
| | | StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && |
| | | matcher.matches()) { |
| | | log.error("å¹é
æ£ç¡®äº"); |
| | | log.info("å¹é
æ£ç¡®äº"); |
| | | //说æå¹é
æ£ç¡®äº |
| | | ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).setIsUserOperation(1); |
| | | List<IvrLibaTemplateScriptVO> backQuset = redisCache.getCacheObject(userId + "backQuset"); |
| | |
| | | break; |
| | | } |
| | | } else { |
| | | log.error("æ å¹é
"); |
| | | log.info("æ å¹é
"); |
| | | //没æå¹é
å° |
| | | Integer mateNum = redisCache.getCacheObject(userId + "mateNum"); |
| | | |
| | |
| | | @ApiOperation("AIRobotå¼å«å°è¾¾çº¿è·¯åçç¶æè¿åæ¥å£") |
| | | @PostMapping("/callstatus") |
| | | public AjaxResult callstatus(@RequestBody RobotCallBack robotCallBack) { |
| | | log.error("AIRobotå¼å«å°è¾¾çº¿è·¯åçç¶æè¿åæ¥å£---------{}", robotCallBack); |
| | | log.info("AIRobotå¼å«å°è¾¾çº¿è·¯åçç¶æè¿åæ¥å£---------{}", robotCallBack); |
| | | aiRobotPhoneCallBackService.callstatus(robotCallBack); |
| | | return success(); |
| | | } |
| | |
| | | @ApiOperation("AIRobotç¨æ· AI äº¤äºæ°æ®è¿åæ¥å£(å
æ¬ n ç§èç¹çè¿åæ°æ®å
)") |
| | | @PostMapping("/aidialog") |
| | | public AjaxResult aidialog(@RequestBody RobotAIDialogBack robotAIDialogBack) { |
| | | log.error("ç¨æ· AI äº¤äºæ°æ®è¿åæ¥å£(å
æ¬ n ç§èç¹çè¿åæ°æ®å
)-----------{}", robotAIDialogBack); |
| | | log.info("ç¨æ· AI äº¤äºæ°æ®è¿åæ¥å£(å
æ¬ n ç§èç¹çè¿åæ°æ®å
)-----------{}", robotAIDialogBack); |
| | | aiRobotPhoneCallBackService.aidialog(robotAIDialogBack); |
| | | return success(); |
| | | } |
| | |
| | | @ApiOperation("ææºè®¡è´¹ä¿¡æ¯è¿åæ°æ®æ¥å£") |
| | | @PostMapping("/cdrinfo") |
| | | public AjaxResult cdrinfo(@RequestBody RobotcdrInfoBack robotAIDialogBack) { |
| | | log.error("ææºè®¡è´¹ä¿¡æ¯è¿åæ°æ®æ¥å£-----------{}", robotAIDialogBack); |
| | | log.info("ææºè®¡è´¹ä¿¡æ¯è¿åæ°æ®æ¥å£-----------{}", robotAIDialogBack); |
| | | aiRobotPhoneCallBackService.cdrinfo(robotAIDialogBack); |
| | | return success(); |
| | | } |
| | |
| | | package com.ruoyi.web.controller.smartor; |
| | | |
| | | import java.lang.reflect.Array; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.ruoyi.common.core.domain.entity.SysDept; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.smartor.domain.PatMedReq; |
| | | import com.smartor.domain.PatMedRes; |
| | | import io.netty.util.internal.ObjectUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | @PostMapping("/selectPatMedOuthospCount") |
| | | @ApiOperation("æ¥è¯¢é¨è¯çç
人次å人æ°") |
| | | public AjaxResult selectPatMedOuthospCount(@RequestBody PatMedReq patMedReq) { |
| | | SysUser user = getLoginUser().getUser(); |
| | | List<String> deptCode = new ArrayList<>(); |
| | | for (Map<String, Object> map : user.getBelongDepts()) { |
| | | if (ObjectUtils.isNotEmpty(map.get("deptCode"))) deptCode.add(map.get("deptCode").toString()); |
| | | } |
| | | patMedReq.setDeptcodeList(deptCode); |
| | | PatMedRes patMedRes = patMedOuthospService.selectPatMedOuthospCount(patMedReq); |
| | | return success(patMedRes); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.web.controller.smartor; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.core.domain.model.LoginUser; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.smartor.domain.PatSatisfaction; |
| | | import com.smartor.service.IPatSatisfactionService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * æ£è
满æåº¦Controller |
| | | * |
| | | * @author lihu |
| | | * @date 2025-06-30 |
| | | */ |
| | | @Api(description = "æ£è
满æåº¦") |
| | | @RestController |
| | | @RequestMapping("/smartor/satisfaction") |
| | | public class PatSatisfactionController extends BaseController { |
| | | @Autowired |
| | | private IPatSatisfactionService patSatisfactionService; |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£è
满æåº¦å表 |
| | | */ |
| | | @ApiOperation("æ¥è¯¢æ£è
满æåº¦å表") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:satisfaction:list')") |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody PatSatisfaction patSatisfaction) { |
| | | startPage(); |
| | | List<PatSatisfaction> list = patSatisfactionService.selectPatSatisfactionList(patSatisfaction); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * å¯¼åºæ£è
满æåº¦å表 |
| | | */ |
| | | @ApiOperation("å¯¼åºæ£è
满æåº¦å表") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:satisfaction:export')") |
| | | @Log(title = "æ£è
满æåº¦", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, PatSatisfaction patSatisfaction) { |
| | | List<PatSatisfaction> list = patSatisfactionService.selectPatSatisfactionList(patSatisfaction); |
| | | ExcelUtil<PatSatisfaction> util = new ExcelUtil<PatSatisfaction>(PatSatisfaction.class); |
| | | util.exportExcel(response, list, "æ£è
满æåº¦æ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·åæ£è
满æåº¦è¯¦ç»ä¿¡æ¯ |
| | | */ |
| | | @ApiOperation("è·åæ£è
满æåº¦è¯¦ç»ä¿¡æ¯") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:satisfaction:query')") |
| | | @GetMapping(value = "/getInfo/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) { |
| | | return success(patSatisfactionService.selectPatSatisfactionById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢æ£è
满æåº¦ |
| | | */ |
| | | @ApiOperation("æ°å¢æ£è
满æåº¦") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:satisfaction:add')") |
| | | @Log(title = "æ£è
满æåº¦", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody PatSatisfaction patSatisfaction) { |
| | | LoginUser loginUser = getLoginUser(); |
| | | SysUser user = loginUser.getUser(); |
| | | patSatisfaction.setCreateBy(user.getNickName()); |
| | | patSatisfaction.setOrgid(user.getOrgid()); |
| | | return toAjax(patSatisfactionService.insertPatSatisfaction(patSatisfaction)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ°å¢æ£è
满æåº¦ |
| | | */ |
| | | @ApiOperation("æ¹éæ°å¢æ£è
满æåº¦") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:satisfaction:add')") |
| | | @Log(title = "æ£è
满æåº¦", businessType = BusinessType.INSERT) |
| | | @PostMapping("/batchinsert") |
| | | public AjaxResult batchinsert(@RequestBody List<PatSatisfaction> patSatisfaction) { |
| | | LoginUser loginUser = getLoginUser(); |
| | | SysUser user = loginUser.getUser(); |
| | | for (PatSatisfaction patSatisfaction1 : patSatisfaction) { |
| | | patSatisfaction1.setCreateBy(user.getNickName()); |
| | | patSatisfaction1.setOrgid(user.getOrgid()); |
| | | patSatisfactionService.insertPatSatisfaction(patSatisfaction1); |
| | | } |
| | | return toAjax(1); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹æ£è
满æåº¦ |
| | | */ |
| | | @ApiOperation("ä¿®æ¹æ£è
满æåº¦") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:satisfaction:edit')") |
| | | @Log(title = "æ£è
满æåº¦", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody PatSatisfaction patSatisfaction) { |
| | | LoginUser loginUser = getLoginUser(); |
| | | SysUser user = loginUser.getUser(); |
| | | patSatisfaction.setCreateBy(user.getNickName()); |
| | | return toAjax(patSatisfactionService.updatePatSatisfaction(patSatisfaction)); |
| | | } |
| | | |
| | | /** |
| | | * å 餿£è
满æåº¦ |
| | | */ |
| | | @ApiOperation("å 餿£è
满æåº¦") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:satisfaction:remove')") |
| | | @Log(title = "æ£è
满æåº¦", businessType = BusinessType.DELETE) |
| | | @GetMapping("/remove/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) { |
| | | return toAjax(patSatisfactionService.deletePatSatisfactionByIds(ids)); |
| | | } |
| | | } |
| | |
| | | @ApiOperation("æ°å¢ä½æ£ä»»å¡è¿åä»»å¡") |
| | | @PostMapping("/generalInterfaceAddTask") |
| | | public AjaxResult generalInterfaceAddTask(@RequestBody ServiceTaskInfo serviceTaskInfo) { |
| | | log.error("------serviceTaskInfoçå¼ä¸ºï¼{}", serviceTaskInfo); |
| | | log.info("------serviceTaskInfoçå¼ä¸ºï¼{}", serviceTaskInfo); |
| | | Integer res = 0; |
| | | try { |
| | | res = svyTaskSingleService.insertTaskInfo(serviceTaskInfo); |
| | |
| | | @ApiOperation("360æ£è
ä¿¡æ¯è·å") |
| | | @PostMapping("/query360PatInfo") |
| | | public Map query360PatInfo(@RequestBody ServiceQueryInfo serviceQueryInfo) { |
| | | log.error("------serviceQueryInfoçå
¥å为ï¼{}", serviceQueryInfo); |
| | | log.info("------serviceQueryInfoçå
¥å为ï¼{}", serviceQueryInfo); |
| | | Map map = null; |
| | | try { |
| | | map = svyTaskSingleService.query360PatInfo(serviceQueryInfo); |
| | |
| | | @ApiOperation("æ£è
é®é¢ç»æè®°å½(å¤é¾)") |
| | | @PostMapping("/saveQuestionAnswer") |
| | | public AjaxResult saveQuestionAnswer(@RequestBody ServiceSubTaskAnswerReq serviceSubTaskAnswerReq) { |
| | | log.error("-----saveQuestionAnsweræ¹æ³çå
¥å为ï¼{}", serviceSubTaskAnswerReq); |
| | | log.info("-----saveQuestionAnsweræ¹æ³çå
¥å为ï¼{}", serviceSubTaskAnswerReq); |
| | | return toAjax(serviceSubtaskAnswerService.saveQuestionAnswer(serviceSubTaskAnswerReq, 0L)); |
| | | } |
| | | |
| | |
| | | @ApiOperation("æ£è
é®é¢ç»æè®°å½(å°ç¨å
å¤é¾)") |
| | | @PostMapping("/saveQuestionAnswerXCH") |
| | | public AjaxResult saveQuestionAnswerXCH(@RequestBody ServiceSubTaskAnswerReq serviceSubTaskAnswerReq) { |
| | | log.error("-------saveQuestionAnswerXCHçå
¥åçå¼ä¸ºï¼{}", serviceSubTaskAnswerReq); |
| | | log.info("-------saveQuestionAnswerXCHçå
¥åçå¼ä¸ºï¼{}", serviceSubTaskAnswerReq); |
| | | return toAjax(serviceSubtaskAnswerService.saveQuestionAnswer(serviceSubTaskAnswerReq, 1L)); |
| | | } |
| | | |
| | |
| | | @ApiOperation("æ£è
é®é¢ç»æè®°å½ç¼å(å¤é¾)") |
| | | @PostMapping("/saveQuestionCache") |
| | | public AjaxResult saveQuestionCache(@RequestBody ServiceSubTaskCacheReq serviceSubTaskCacheReq) { |
| | | log.error("serviceSubTaskCacheReqçå
¥å为ï¼{}", serviceSubTaskCacheReq); |
| | | log.info("serviceSubTaskCacheReqçå
¥å为ï¼{}", serviceSubTaskCacheReq); |
| | | return toAjax(serviceSubtaskAnswerService.saveQuestionCache(serviceSubTaskCacheReq, 0L)); |
| | | } |
| | | |
| | |
| | | @Log(title = "åä¸ä»»å¡ï¼é访ï¼", businessType = BusinessType.INSERT) |
| | | @PostMapping("/insertOrUpdateTask") |
| | | public AjaxResult insertOrUpdateHeTask(@RequestBody ServiceTaskVO ivrTaskVO) { |
| | | log.error("insertOrUpdateHeTaskçå
¥å为ï¼{}", ivrTaskVO); |
| | | log.info("insertOrUpdateHeTaskçå
¥å为ï¼{}", ivrTaskVO); |
| | | LoginUser loginUser = getLoginUser(); |
| | | SysUser user = loginUser.getUser(); |
| | | ivrTaskVO.setCreateBy(user.getNickName()); |
| | |
| | | @ApiOperation("çµè¯ASRéè¯åè°(é¨ç»®)") |
| | | @PostMapping("/phoneCallBackYQ") |
| | | public PhoneCallBackYQVO phoneCallBackYQ(@RequestBody PhoneCallReqYQVO phoneCallReqYQVO) { |
| | | log.error("çµè¯ASRéè¯åè°(é¨ç»®) ï¼{}", phoneCallReqYQVO); |
| | | log.info("çµè¯ASRéè¯åè°(é¨ç»®) ï¼{}", phoneCallReqYQVO); |
| | | // SysUser user = getLoginUser().getUser(); |
| | | // phoneCallReqYQVO.setOrgid(user.getOrgid()); |
| | | PhoneCallBackYQVO phoneCallBackYQVO = serviceSubtaskService.phoneCallBackYQ(phoneCallReqYQVO); |
| | |
| | | @ApiOperation("çµè¯ä»»å¡æå(é¨ç»®)") |
| | | @PostMapping("/taskPull") |
| | | public List<PullTaskVO> taskPull() { |
| | | log.error("çµè¯ä»»å¡æå(é¨ç»®)"); |
| | | log.info("çµè¯ä»»å¡æå(é¨ç»®)"); |
| | | List<PullTaskVO> pullTaskVOList = serviceSubtaskService.taskPull(); |
| | | // List<PullTaskVO> pullTaskVOList = new ArrayList<>(); |
| | | |
| | | log.error("çµè¯ä»»å¡æå(é¨ç»®):{}", pullTaskVOList); |
| | | log.info("çµè¯ä»»å¡æåæ°æ®(é¨ç»®):{}", pullTaskVOList); |
| | | return pullTaskVOList; |
| | | } |
| | | |
| | |
| | | @ApiOperation("éè¯è®°å½åè°(é¨ç»®)") |
| | | @PostMapping("/recordAccept") |
| | | public AjaxResult recordAccept(@RequestBody PhoneCallRecordVO phoneCallRecordVO) { |
| | | log.error("éè¯è®°å½åè°(é¨ç»®):{}", phoneCallRecordVO); |
| | | // return toAjax(serviceSubtaskService.saveQuestionAnswerPhone(serviceSubTaskDetailReq)); |
| | | // SysUser user = getLoginUser().getUser(); |
| | | // phoneCallRecordVO.setOrgid(user.getOrgid()); |
| | | log.info("éè¯è®°å½åè°(é¨ç»®):{}", phoneCallRecordVO); |
| | | serviceSubtaskService.recordAccept(phoneCallRecordVO); |
| | | return success(); |
| | | } |
| | |
| | | public AjaxResult getScriptInfoByCondition(@RequestBody ServiceTaskScriptQues serviceTaskScriptQues) { |
| | | Long tid = null; |
| | | Long pid = null; |
| | | log.error("getScriptInfoByConditionå
¥å为ï¼{}", serviceTaskScriptQues); |
| | | log.info("getScriptInfoByConditionå
¥å为ï¼{}", serviceTaskScriptQues); |
| | | try { |
| | | tid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceTaskScriptQues.getParam1(), pri_key)); |
| | | pid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceTaskScriptQues.getParam2(), pri_key)); |
| | |
| | | log.error("getScriptInfoByConditionæ¥éäºï¼{}", e.getMessage()); |
| | | } |
| | | |
| | | log.error("tidåpidçå¼ä¸ºï¼{},{}", tid, pid); |
| | | log.info("tidåpidçå¼ä¸ºï¼{},{}", tid, pid); |
| | | if (StringUtils.isEmpty(serviceTaskScriptQues.getPatfrom())) serviceTaskScriptQues.setPatfrom("0"); |
| | | return success(serviceTaskService.getScriptInfoByCondition(tid, pid, true, serviceTaskScriptQues.getPatfrom())); |
| | | } |
| | |
| | | @Log(title = "模æ¿ç§å®¤å
³è", businessType = BusinessType.DELETE) |
| | | @GetMapping("/remove/{id}") |
| | | public AjaxResult remove(@PathVariable("id") Long id) { |
| | | log.error("å é¤çID为ï¼{}",id); |
| | | log.info("å é¤çID为ï¼{}",id); |
| | | return toAjax(templateDeptService.deleteTemplateDeptById(id)); |
| | | } |
| | | } |
| | |
| | | @GetMapping("getRouters") |
| | | public AjaxResult getRouters() { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | log.error("----------getRoutersçuserIdå
¥å为ï¼{}", userId); |
| | | log.info("----------getRoutersçuserIdå
¥å为ï¼{}", userId); |
| | | List<SysMenu> menus = menuService.selectMenuTreeByUserId(userId); |
| | | return AjaxResult.success(menuService.buildMenus(menus)); |
| | | } |
| | |
| | | //@PreAuthorize("@ss.hasPermi('system:user:query')") |
| | | @GetMapping("/getInfo/{userId}") |
| | | public AjaxResult getInfo(@PathVariable(value = "userId", required = false) Long userId) { |
| | | log.error("--------userIdçå¼ä¸ºï¼{}",userId); |
| | | log.info("--------userIdçå¼ä¸ºï¼{}",userId); |
| | | userService.checkUserDataScope(userId); |
| | | AjaxResult ajax = AjaxResult.success(); |
| | | List<SysRole> roles = roleService.selectRoleAll(); |
| | |
| | | sysUserDept.setDeptType("1"); |
| | | LoginUser loginUser = getLoginUser(); |
| | | SysUser user = loginUser.getUser(); |
| | | log.error("--------userçå¼ä¸ºï¼{}",user); |
| | | log.info("--------userçå¼ä¸ºï¼{}",user); |
| | | sysUserDept.setOrgid(user.getOrgid()); |
| | | sysUserDeptKSs = sysUserDeptMapper.selectSysUserDeptList(sysUserDept); |
| | | ajax.put("belongDepts", sysUserDeptKSs); |
| | |
| | | @Log(title = "ç¨æ·ç®¡ç", businessType = BusinessType.GRANT) |
| | | @PostMapping("/authRole/insertAuthRole") |
| | | public AjaxResult insertAuthRole(@RequestBody AuthRole authRole) { |
| | | log.error("-----ç¨æ·ææè§è²çå
¥å为ï¼userId={},roleIds={}", authRole.getUserId(), authRole.getRoleIds()); |
| | | log.info("-----ç¨æ·ææè§è²çå
¥å为ï¼userId={},roleIds={}", authRole.getUserId(), authRole.getRoleIds()); |
| | | if (ObjectUtils.isEmpty(authRole.getRoleIds())) { |
| | | throw new BaseException("è§è²ä¸ºç©ºï¼è¯·æ£æ¥ä¹å忬¡å°è¯"); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | public String encryptedData(String plainText, String pub_key) { |
| | | log.error("éè¦å å¯çæ°æ®ï¼{}", plainText); |
| | | log.info("éè¦å å¯çæ°æ®ï¼{}", plainText); |
| | | try { |
| | | |
| | | byte[] publicKeyBytes = Base64.getDecoder().decode(pub_key); |
| | |
| | | |
| | | // å°å å¯åçæ°æ®è½¬æ¢ä¸ºBase64ç¼ç çå符串 |
| | | String encryptedText = Base64.getEncoder().encodeToString(encryptedBytes); |
| | | log.error("Base64å å¯åçæ°æ®ï¼{}", encryptedText); |
| | | log.info("Base64å å¯åçæ°æ®ï¼{}", encryptedText); |
| | | encryptedText = URLEncoder.encode(encryptedText, StandardCharsets.UTF_8.toString()); |
| | | log.error("URLEncoderç¼ç åçæ°æ®ï¼{}", encryptedText); |
| | | log.info("URLEncoderç¼ç åçæ°æ®ï¼{}", encryptedText); |
| | | String decodedString = URLDecoder.decode(encryptedText, "UTF-8"); |
| | | log.error("URLEncoderè§£ç åçæ°æ®ï¼{}", decodedString); |
| | | log.info("URLEncoderè§£ç åçæ°æ®ï¼{}", decodedString); |
| | | return encryptedText; |
| | | } catch (Exception e) { |
| | | log.error("å å¯å¤±è´¥äº:{}", e.getMessage()); |
| | |
| | | } |
| | | } |
| | | out = new PrintWriter(new OutputStreamWriter(conn.getOutputStream(), StandardCharsets.UTF_8)); |
| | | log.error("---------paramåéçæ°æ®ä¸º:{}",param); |
| | | log.info("---------paramåéçæ°æ®ä¸º:{}",param); |
| | | out.print(param); |
| | | out.flush(); |
| | | in = new BufferedReader(new InputStreamReader(conn.getInputStream(), StandardCharsets.UTF_8)); |
| | |
| | | } |
| | | } |
| | | |
| | | log.error("åéåæ°ï¼{}", param); |
| | | log.info("åéåæ°ï¼{}", param); |
| | | try (OutputStream os = conn.getOutputStream()) { |
| | | byte[] input = param.getBytes(StandardCharsets.UTF_8); |
| | | os.write(input, 0, input.length); |
| | |
| | | public void dealHisData() { |
| | | log.info("ãdealHisDataãå¼å§æ§è¡HISæ°æ®ééä»»å¡"); |
| | | long startTime = System.currentTimeMillis(); |
| | | |
| | | |
| | | try { |
| | | // è·åæ¨å¤©0ç¹å°ä»å¤©0ç¹çæ¶é´èå´ |
| | | LocalDateTime todayZero = LocalDateTime.now().with(LocalTime.MIN); |
| | | LocalDateTime yesterdayZero = todayZero.minusDays(1); |
| | | |
| | | |
| | | log.info("ãdealHisDataãééæ¶é´èå´ï¼{} ~ {}", yesterdayZero, todayZero); |
| | | |
| | | |
| | | // ééå
¥é¢æ°æ® |
| | | log.info("ãdealHisDataãå¼å§ééå
¥é¢æ°æ®"); |
| | | getInHospInfo("0", yesterdayZero, todayZero); |
| | | log.info("ãdealHisDataãå
¥é¢æ°æ®éé宿"); |
| | | |
| | | |
| | | // ééåºé¢æ°æ® |
| | | log.info("ãdealHisDataãå¼å§ééåºé¢æ°æ®"); |
| | | getInHospInfo("1", yesterdayZero, todayZero); |
| | | log.info("ãdealHisDataãåºé¢æ°æ®éé宿"); |
| | | |
| | | |
| | | long endTime = System.currentTimeMillis(); |
| | | log.info("ãdealHisDataãHISæ°æ®ééä»»å¡å®æï¼æ»èæ¶ï¼{}ms", endTime - startTime); |
| | | |
| | | |
| | | } catch (Exception e) { |
| | | log.error("ãdealHisDataãHISæ°æ®ééå¼å¸¸", e); |
| | | // è¿éå¯ä»¥æ·»å åè¦éç¥é»è¾ï¼æ¯å¦åéé®ä»¶æçä¿¡ |
| | |
| | | RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample(); |
| | | String taskId = rsaPublicKeyExample.encryptedData(ivrTask1.getTaskid().toString(), pub_key); |
| | | for (ServiceSubtask serviceSubtask : selectServiceSubtaskList) { |
| | | // log.error("serviceSubtask---------è¿æ¥äºåï¼{}", serviceSubtask); |
| | | boolean dateToday = isDateToday(serviceSubtask.getLongSendTime()); |
| | | if (dateToday) { |
| | | try { |
| | |
| | | |
| | | /** |
| | | * è·åæ£è
åºå
¥é¢ä¿¡æ¯ |
| | | * @param cry åºå
¥é¢ç±»åï¼0-å
¥é¢ï¼1-åºé¢ |
| | | * |
| | | * @param cry åºå
¥é¢ç±»åï¼0-å
¥é¢ï¼1-åºé¢ |
| | | * @param startTime å¼å§æ¶é´ |
| | | * @param endTime ç»ææ¶é´ |
| | | * @param endTime ç»ææ¶é´ |
| | | */ |
| | | @Transactional |
| | | public void getInHospInfo(String cry, LocalDateTime startTime, LocalDateTime endTime) { |
| | | String typeName = "0".equals(cry) ? "å
¥é¢" : "åºé¢"; |
| | | log.info("ãgetInHospInfoãå¼å§è·å{}æ£è
ä¿¡æ¯ï¼æ¶é´èå´ï¼{} ~ {}", typeName, startTime, endTime); |
| | | long startTimeMillis = System.currentTimeMillis(); |
| | | |
| | | |
| | | try { |
| | | // ç¬¬ä¸æ¥ï¼æå»ºè¯·æ±åæ°å¹¶è°ç¨HISæ¥å£ |
| | | List<ThiedInhospInfo> thiedInhospInfoList = fetchHisData(cry, startTime, endTime); |
| | | |
| | | |
| | | if (CollectionUtils.isEmpty(thiedInhospInfoList)) { |
| | | log.info("ãgetInHospInfoã{}æ£è
ä¿¡æ¯ä¸ºç©ºï¼è·³è¿å¤ç", typeName); |
| | | return; |
| | | } |
| | | |
| | | |
| | | log.info("ãgetInHospInfoãè·åå°{}æ¡{}æ£è
ä¿¡æ¯", thiedInhospInfoList.size(), typeName); |
| | | |
| | | |
| | | // ç¬¬äºæ¥ï¼ä¿ååå§æ°æ®å°æä»¶ï¼ç¨äºå¤ä»½ï¼ |
| | | saveRawDataToFile(cry, thiedInhospInfoList); |
| | | |
| | | |
| | | // ç¬¬ä¸æ¥ï¼å¤çæ£è
æ°æ® |
| | | processPatientData(thiedInhospInfoList, cry); |
| | | |
| | | |
| | | long endTimeMillis = System.currentTimeMillis(); |
| | | log.info("ãgetInHospInfoã{}æ£è
ä¿¡æ¯å¤ç宿ï¼èæ¶ï¼{}ms", typeName, endTimeMillis - startTimeMillis); |
| | | |
| | | |
| | | } catch (Exception e) { |
| | | log.error("ãgetInHospInfoãè·å{}æ£è
ä¿¡æ¯å¼å¸¸", typeName, e); |
| | | throw new RuntimeException("è·å" + typeName + "æ£è
ä¿¡æ¯å¤±è´¥", e); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * ç¬¬ä¸æ¥ï¼è°ç¨HISæ¥å£è·åæ°æ® |
| | | */ |
| | |
| | | try { |
| | | // æå»ºè¯·æ±åæ° |
| | | Map<String, String> requestParams = buildRequestParams(cry, startTime, endTime); |
| | | |
| | | |
| | | // æå»ºè¯·æ±å¤´ |
| | | Map<String, String> headers = buildRequestHeaders(startTime); |
| | | |
| | | |
| | | // åéHTTPè¯·æ± |
| | | String result = HttpUtils.sendPostByHeader(hospInfoUrl, new Gson().toJson(requestParams), headers); |
| | | |
| | | |
| | | // è§£æååºæ°æ® |
| | | return parseResponseData(result); |
| | | |
| | | |
| | | } catch (Exception e) { |
| | | log.error("ãfetchHisDataãè°ç¨HISæ¥å£å¼å¸¸", e); |
| | | throw e; |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æå»ºè¯·æ±åæ° |
| | | */ |
| | | private Map<String, String> buildRequestParams(String cry, LocalDateTime startTime, LocalDateTime endTime) { |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.S"); |
| | | Map<String, String> req = new HashMap<>(); |
| | | |
| | | |
| | | if ("1".equals(cry)) { |
| | | // åºé¢åæ° |
| | | req.put("cashStartDate", startTime.format(formatter)); |
| | |
| | | req.put("admissEndDate", endTime.format(formatter)); |
| | | req.put("currStatus", "2"); |
| | | } |
| | | |
| | | |
| | | return req; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æå»ºè¯·æ±å¤´ |
| | | */ |
| | |
| | | header.put("x-hcsb-msgdate", startTime.format(formatter)); |
| | | return header; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * è§£æååºæ°æ® |
| | | */ |
| | | private List<ThiedInhospInfo> parseResponseData(String result) { |
| | | try { |
| | | Gson gson = new Gson(); |
| | | JsonObject jsonObject = gson.fromJson(result, JsonObject.class); |
| | | JsonArray resultArray = jsonObject.getAsJsonObject("data").getAsJsonArray("result"); |
| | | Type resultType = new TypeToken<List<ThiedInhospInfo>>() {}.getType(); |
| | | Gson gson = new Gson(); |
| | | JsonObject jsonObject = gson.fromJson(result, JsonObject.class); |
| | | JsonArray resultArray = jsonObject.getAsJsonObject("data").getAsJsonArray("result"); |
| | | Type resultType = new TypeToken<List<ThiedInhospInfo>>() { |
| | | }.getType(); |
| | | return gson.fromJson(resultArray, resultType); |
| | | } catch (Exception e) { |
| | | log.error("ãparseResponseDataãè§£æååºæ°æ®å¼å¸¸ï¼åå§æ°æ®ï¼{}", result, e); |
| | | throw e; |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * ç¬¬äºæ¥ï¼ä¿ååå§æ°æ®å°æä»¶ |
| | | */ |
| | |
| | | String typeName = "0".equals(cry) ? "å
¥é¢ä¿¡æ¯" : "åºé¢ä¿¡æ¯"; |
| | | String filename = typeName + "_" + System.currentTimeMillis() + ".json"; |
| | | String filePath = "D:\\public\\HISæ°æ®éé\\" + filename; |
| | | |
| | | |
| | | File file = new File(filePath); |
| | | File parentDir = file.getParentFile(); |
| | | if (!parentDir.exists()) { |
| | | parentDir.mkdirs(); |
| | | } |
| | | |
| | | if (!file.exists()) { |
| | | |
| | | if (!file.exists()) { |
| | | file.createNewFile(); |
| | | } |
| | | |
| | | |
| | | // å°æ°æ®åå
¥æä»¶ |
| | | try (FileWriter writer = new FileWriter(file)) { |
| | | writer.write(new Gson().toJson(dataList)); |
| | | } |
| | | |
| | | |
| | | log.info("ãsaveRawDataToFileãåå§æ°æ®å·²ä¿åå°æä»¶ï¼{}", filePath); |
| | | |
| | | |
| | | } catch (Exception e) { |
| | | log.error("ãsaveRawDataToFileãä¿ååå§æ°æ®å°æä»¶å¼å¸¸", e); |
| | | // æä»¶ä¿å失败ä¸å½±å主æµç¨ï¼åªè®°å½æ¥å¿ |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * ç¬¬ä¸æ¥ï¼å¤çæ£è
æ°æ® |
| | | */ |
| | |
| | | int successCount = 0; |
| | | int skipCount = 0; |
| | | int errorCount = 0; |
| | | |
| | | |
| | | for (ThiedInhospInfo thiedInhospInfo : thiedInhospInfoList) { |
| | | try { |
| | | if (processSinglePatient(thiedInhospInfo, cry)) { |
| | |
| | | } |
| | | } catch (Exception e) { |
| | | errorCount++; |
| | | log.error("ãprocessPatientDataãå¤çæ£è
æ°æ®å¼å¸¸ï¼æ£è
IDï¼{}", |
| | | thiedInhospInfo.getPatiMediaNo(), e); |
| | | log.error("ãprocessPatientDataãå¤çæ£è
æ°æ®å¼å¸¸ï¼æ£è
IDï¼{}", thiedInhospInfo.getPatiMediaNo(), e); |
| | | } |
| | | } |
| | | |
| | | log.info("ãprocessPatientDataãæ£è
æ°æ®å¤çå®æï¼æåï¼{}ï¼è·³è¿ï¼{}ï¼å¤±è´¥ï¼{}", |
| | | successCount, skipCount, errorCount); |
| | | |
| | | log.info("ãprocessPatientDataãæ£è
æ°æ®å¤çå®æï¼æåï¼{}ï¼è·³è¿ï¼{}ï¼å¤±è´¥ï¼{}", successCount, skipCount, errorCount); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * å¤çå个æ£è
æ°æ® |
| | | */ |
| | | private boolean processSinglePatient(ThiedInhospInfo thiedInhospInfo, String cry) { |
| | | // éªè¯èº«ä»½è¯å· |
| | | if (StringUtils.isEmpty(thiedInhospInfo.getPatiIdCardNo())) { |
| | | log.warn("ãprocessSinglePatientãæ£è
身份è¯å·ä¸ºç©ºï¼è·³è¿å¤çï¼æ£è
ç¼å·ï¼{}", |
| | | thiedInhospInfo.getPatiMediaNo()); |
| | | log.warn("ãprocessSinglePatientãæ£è
身份è¯å·ä¸ºç©ºï¼è·³è¿å¤çï¼æ£è
ç¼å·ï¼{}", thiedInhospInfo.getPatiMediaNo()); |
| | | return false; |
| | | } |
| | | |
| | | |
| | | // å¤çæ£è
æ¡£æ¡ä¿¡æ¯ |
| | | PatArchive patArchive = processPatientArchive(thiedInhospInfo, cry); |
| | | |
| | | |
| | | // å¤çæ£è
ä½é¢ä¿¡æ¯ |
| | | processPatientInhospInfo(thiedInhospInfo, patArchive, cry); |
| | | |
| | | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * å¤çæ£è
æ¡£æ¡ä¿¡æ¯ |
| | | */ |
| | |
| | | PatArchive queryArchive = new PatArchive(); |
| | | queryArchive.setIdcardno(thiedInhospInfo.getPatiIdCardNo().trim()); |
| | | List<PatArchive> existingArchives = patArchiveService.selectPatArchiveList(queryArchive); |
| | | |
| | | |
| | | // æå»ºæ£è
æ¡£æ¡ä¿¡æ¯ |
| | | PatArchive patArchive = buildPatientArchive(thiedInhospInfo, cry); |
| | | |
| | | |
| | | // ä¿åææ´æ°æ£è
æ¡£æ¡ |
| | | if (CollectionUtils.isEmpty(existingArchives)) { |
| | | patArchiveService.insertPatArchive(patArchive); |
| | | log.debug("ãprocessPatientArchiveãæ°å¢æ£è
æ¡£æ¡ï¼æ£è
ç¼å·ï¼{}", patArchive.getPatientno()); |
| | | } else { |
| | | } else { |
| | | patArchive.setId(existingArchives.get(0).getId()); |
| | | patArchiveService.updateArchive(patArchive); |
| | | log.debug("ãprocessPatientArchiveãæ´æ°æ£è
æ¡£æ¡ï¼æ£è
ç¼å·ï¼{}", patArchive.getPatientno()); |
| | | } |
| | | |
| | | |
| | | return patArchive; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æå»ºæ£è
æ¡£æ¡ä¿¡æ¯ |
| | | */ |
| | | private PatArchive buildPatientArchive(ThiedInhospInfo thiedInhospInfo, String cry) { |
| | | PatArchive patArchive = new PatArchive(); |
| | | |
| | | |
| | | // åºæ¬ä¿¡æ¯ |
| | | patArchive.setPatientno(thiedInhospInfo.getPatiMediaNo()); |
| | | patArchive.setPatientno(thiedInhospInfo.getPatiMediaNo()); |
| | | patArchive.setIdcardno(thiedInhospInfo.getPatiIdCardNo().trim()); |
| | | patArchive.setName(thiedInhospInfo.getPatiRecordName()); |
| | | patArchive.setSourcefrom(2); |
| | | patArchive.setPattype("2"); |
| | | |
| | | patArchive.setSourcefrom(2); |
| | | patArchive.setPattype("2"); |
| | | |
| | | // æ§å« |
| | | patArchive.setSex("ç·".equals(thiedInhospInfo.getPatiRecordGender()) ? 1L : 2L); |
| | | |
| | | |
| | | // æ°æåç±è´¯ |
| | | patArchive.setNation(thiedInhospInfo.getPatiNation()); |
| | | patArchive.setNativePlace(thiedInhospInfo.getPatiNationality()); |
| | | |
| | | patArchive.setNation(thiedInhospInfo.getPatiNation()); |
| | | patArchive.setNativePlace(thiedInhospInfo.getPatiNationality()); |
| | | |
| | | // å±
ä½å°å |
| | | String homeAddr = thiedInhospInfo.getPatiHomeAddr(); |
| | | patArchive.setPlaceOfResidence(StringUtils.isNotEmpty(homeAddr) ? homeAddr.replace("null", "") : ""); |
| | | |
| | | |
| | | // åºçæ¥æ |
| | | if (StringUtils.isNotEmpty(thiedInhospInfo.getPatiBirthday())) { |
| | | try { |
| | | patArchive.setBirthdate(new SimpleDateFormat("yyyy-MM-dd").parse(thiedInhospInfo.getPatiBirthday())); |
| | | } catch (ParseException e) { |
| | | patArchive.setBirthdate(new SimpleDateFormat("yyyy-MM-dd").parse(thiedInhospInfo.getPatiBirthday())); |
| | | } catch (ParseException e) { |
| | | log.warn("ãbuildPatientArchiveãè§£æåºçæ¥æå¤±è´¥ï¼{}", thiedInhospInfo.getPatiBirthday(), e); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | // å¹´é¾ |
| | | if (thiedInhospInfo.getTreateAge() != null) { |
| | | patArchive.setAge(Long.valueOf(thiedInhospInfo.getTreateAge())); |
| | | } |
| | | patArchive.setAgeUnit(thiedInhospInfo.getTreatAgeunit()); |
| | | |
| | | if (thiedInhospInfo.getTreateAge() != null) { |
| | | patArchive.setAge(Long.valueOf(thiedInhospInfo.getTreateAge())); |
| | | } |
| | | patArchive.setAgeUnit(thiedInhospInfo.getTreatAgeunit()); |
| | | |
| | | // èç³»æ¹å¼ |
| | | patArchive.setTelcode(thiedInhospInfo.getCompanyTelNum()); |
| | | patArchive.setRelativetelcode(thiedInhospInfo.getContactPersonPhone()); |
| | | |
| | | patArchive.setTelcode(thiedInhospInfo.getCompanyTelNum()); |
| | | patArchive.setRelativetelcode(thiedInhospInfo.getContactPersonPhone()); |
| | | |
| | | // åºé¢æ¹å¼å¤çï¼æ»äº¡çç¹æ®æ
åµï¼ |
| | | if (StringUtils.isNotEmpty(thiedInhospInfo.getOutWayId()) && "4".equals(thiedInhospInfo.getOutWayId())) { |
| | | patArchive.setNotrequiredFlag("1"); |
| | |
| | | patArchive.setNotrequiredFlag("1"); |
| | | patArchive.setNotrequiredreason("åºé¢æ¹å¼ä¸ºç©º"); |
| | | } |
| | | |
| | | |
| | | // ç³»ç»å段 |
| | | patArchive.setDelFlag("0"); |
| | | patArchive.setCreateTime(new Date()); |
| | | patArchive.setUpdateTime(new Date()); |
| | | |
| | | patArchive.setDelFlag("0"); |
| | | patArchive.setCreateTime(new Date()); |
| | | patArchive.setUpdateTime(new Date()); |
| | | |
| | | return patArchive; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * å¤çæ£è
ä½é¢ä¿¡æ¯ |
| | | */ |
| | | private void processPatientInhospInfo(ThiedInhospInfo thiedInhospInfo, PatArchive patArchive, String cry) { |
| | | // æå»ºä½é¢ä¿¡æ¯ |
| | | PatMedInhosp patMedInhosp = buildPatientInhospInfo(thiedInhospInfo, patArchive, cry); |
| | | |
| | | |
| | | // æ¥è¯¢æ¯å¦å·²åå¨ä½é¢è®°å½ |
| | | PatMedInhosp queryInhosp = new PatMedInhosp(); |
| | | queryInhosp.setPatno(patArchive.getPatientno()); |
| | | queryInhosp.setSerialnum(patMedInhosp.getSerialnum()); |
| | | List<PatMedInhosp> existingInhosps = patMedInhospService.selectPatMedInhospList(queryInhosp); |
| | | |
| | | |
| | | // ä¿åææ´æ°ä½é¢ä¿¡æ¯ |
| | | if (CollectionUtils.isNotEmpty(existingInhosps)) { |
| | | patMedInhosp.setInhospid(existingInhosps.get(0).getInhospid()); |
| | | patMedInhospService.updatePatMedInhosp(patMedInhosp); |
| | | log.debug("ãprocessPatientInhospInfoãæ´æ°ä½é¢ä¿¡æ¯ï¼æ£è
ç¼å·ï¼{}ï¼æµæ°´å·ï¼{}", |
| | | patArchive.getPatientno(), patMedInhosp.getSerialnum()); |
| | | } else { |
| | | log.debug("ãprocessPatientInhospInfoãæ´æ°ä½é¢ä¿¡æ¯ï¼æ£è
ç¼å·ï¼{}ï¼æµæ°´å·ï¼{}", patArchive.getPatientno(), patMedInhosp.getSerialnum()); |
| | | } else { |
| | | patMedInhospService.insertPatMedInhosp(patMedInhosp); |
| | | log.debug("ãprocessPatientInhospInfoãæ°å¢ä½é¢ä¿¡æ¯ï¼æ£è
ç¼å·ï¼{}ï¼æµæ°´å·ï¼{}", |
| | | patArchive.getPatientno(), patMedInhosp.getSerialnum()); |
| | | log.debug("ãprocessPatientInhospInfoãæ°å¢ä½é¢ä¿¡æ¯ï¼æ£è
ç¼å·ï¼{}ï¼æµæ°´å·ï¼{}", patArchive.getPatientno(), patMedInhosp.getSerialnum()); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æå»ºæ£è
ä½é¢ä¿¡æ¯ |
| | | */ |
| | | private PatMedInhosp buildPatientInhospInfo(ThiedInhospInfo thiedInhospInfo, PatArchive patArchive, String cry) { |
| | | PatMedInhosp patMedInhosp = new PatMedInhosp(); |
| | | |
| | | PatMedInhosp patMedInhosp = new PatMedInhosp(); |
| | | |
| | | // æ£è
åºæ¬ä¿¡æ¯ |
| | | patMedInhosp.setPatid(patArchive.getId()); |
| | | patMedInhosp.setPatno(patArchive.getPatientno()); |
| | | patMedInhosp.setPatname(patArchive.getName()); |
| | | |
| | | patMedInhosp.setPatid(patArchive.getId()); |
| | | patMedInhosp.setPatno(patArchive.getPatientno()); |
| | | patMedInhosp.setPatname(patArchive.getName()); |
| | | |
| | | // æ¤çä¿¡æ¯ |
| | | patMedInhosp.setNurseId(thiedInhospInfo.getNurseId()); |
| | | patMedInhosp.setNurseName(thiedInhospInfo.getNurseName()); |
| | | |
| | | patMedInhosp.setNurseId(thiedInhospInfo.getNurseId()); |
| | | patMedInhosp.setNurseName(thiedInhospInfo.getNurseName()); |
| | | |
| | | // ä½é¢ä¿¡æ¯ |
| | | patMedInhosp.setSerialnum(thiedInhospInfo.getInpatientId()); |
| | | patMedInhosp.setFuflag("1"); |
| | | patMedInhosp.setSerialnum(thiedInhospInfo.getInpatientId()); |
| | | patMedInhosp.setFuflag("1"); |
| | | patMedInhosp.setInhospstate("0".equals(cry) ? "0" : "1"); |
| | | |
| | | // å»é¢åç§å®¤ä¿¡æ¯ |
| | | patMedInhosp.setHospitalcode(thiedInhospInfo.getAreaId()); |
| | | patMedInhosp.setDeptcode(thiedInhospInfo.getAdmissDeptId()); |
| | | patMedInhosp.setDeptid(thiedInhospInfo.getAdmissDeptId()); |
| | | patMedInhosp.setDeptname(thiedInhospInfo.getAdmissDeptName()); |
| | | |
| | | // å»é¢ååºä½ä¿¡æ¯ |
| | | patMedInhosp.setHospitalcode(thiedInhospInfo.getAreaId()); |
| | | patMedInhosp.setBedNo(thiedInhospInfo.getAdmissBedNo()); |
| | | |
| | | // è¯æä¿¡æ¯ |
| | | patMedInhosp.setIcd10code(thiedInhospInfo.getDiagIcd10()); |
| | | patMedInhosp.setDiagname(thiedInhospInfo.getDiagName()); |
| | | |
| | | |
| | | |
| | | // æ¶é´ä¿¡æ¯ |
| | | if (StringUtils.isNotEmpty(thiedInhospInfo.getAdmissDate())) { |
| | | try { |
| | | patMedInhosp.setStarttime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(thiedInhospInfo.getAdmissDate())); |
| | | } catch (ParseException e) { |
| | | try { |
| | | patMedInhosp.setStarttime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(thiedInhospInfo.getAdmissDate())); |
| | | } catch (ParseException e) { |
| | | log.warn("ãbuildPatientInhospInfoãè§£æå
¥é¢æ¶é´å¤±è´¥ï¼{}", thiedInhospInfo.getAdmissDate(), e); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | if (StringUtils.isNotEmpty(thiedInhospInfo.getOutDate())) { |
| | | try { |
| | | patMedInhosp.setEndtime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(thiedInhospInfo.getOutDate())); |
| | | } catch (ParseException e) { |
| | | try { |
| | | patMedInhosp.setEndtime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(thiedInhospInfo.getOutDate())); |
| | | } catch (ParseException e) { |
| | | log.warn("ãbuildPatientInhospInfoãè§£æåºé¢æ¶é´å¤±è´¥ï¼{}", thiedInhospInfo.getOutDate(), e); |
| | | } |
| | | } |
| | | |
| | | |
| | | // åºé¢ä¿¡æ¯ |
| | | patMedInhosp.setLeaveldeptcode(thiedInhospInfo.getCurrDeptId()); |
| | | patMedInhosp.setLeaveldeptname(thiedInhospInfo.getCurrDeptName()); |
| | | patMedInhosp.setLeavediagname(thiedInhospInfo.getDiagName()); |
| | | patMedInhosp.setLeaveicd10code(thiedInhospInfo.getDiagIcd10()); |
| | | patMedInhosp.setOutWayId(thiedInhospInfo.getOutWayId()); |
| | | patMedInhosp.setOutWayName(thiedInhospInfo.getOutWayName()); |
| | | |
| | | if (cry.equals("1")) { |
| | | patMedInhosp.setLeaveldeptcode(thiedInhospInfo.getCurrDeptId()); |
| | | patMedInhosp.setLeaveldeptname(thiedInhospInfo.getCurrDeptName()); |
| | | patMedInhosp.setLeavediagname(thiedInhospInfo.getDiagName()); |
| | | patMedInhosp.setLeaveicd10code(thiedInhospInfo.getDiagIcd10()); |
| | | patMedInhosp.setOutWayId(thiedInhospInfo.getOutWayId()); |
| | | patMedInhosp.setOutWayName(thiedInhospInfo.getOutWayName()); |
| | | // ç
åºä¿¡æ¯ |
| | | patMedInhosp.setLeavehospitaldistrictid(thiedInhospInfo.getCurrWardCode()); |
| | | patMedInhosp.setLeavehospitaldistrictcode(thiedInhospInfo.getCurrWardId()); |
| | | patMedInhosp.setLeavehospitaldistrictname(thiedInhospInfo.getCurrWardName()); |
| | | patMedInhosp.setLeaveldeptid(thiedInhospInfo.getCurrDeptCode()); |
| | | } else { |
| | | //å
¥é¢ |
| | | patMedInhosp.setDeptcode(thiedInhospInfo.getCurrDeptId()); |
| | | patMedInhosp.setDeptname(thiedInhospInfo.getCurrDeptName()); |
| | | patMedInhosp.setDiagname(thiedInhospInfo.getDiagName()); |
| | | patMedInhosp.setIcd10code(thiedInhospInfo.getDiagIcd10()); |
| | | patMedInhosp.setHospitaldistrictid(thiedInhospInfo.getAdmissWardCode()); |
| | | patMedInhosp.setHospitaldistrictcode(thiedInhospInfo.getAdmissWardId()); |
| | | patMedInhosp.setHospitaldistrictname(thiedInhospInfo.getAdmissWardName()); |
| | | } |
| | | |
| | | // å»çä¿¡æ¯ |
| | | patMedInhosp.setDrname(thiedInhospInfo.getDoctName()); |
| | | patMedInhosp.setDrcode(thiedInhospInfo.getDoctId()); |
| | | |
| | | // ç
åºä¿¡æ¯ |
| | | patMedInhosp.setLeavehospitaldistrictid(thiedInhospInfo.getCurrWardCode()); |
| | | patMedInhosp.setLeavehospitaldistrictcode(thiedInhospInfo.getCurrWardId()); |
| | | patMedInhosp.setLeavehospitaldistrictname(thiedInhospInfo.getCurrWardName()); |
| | | patMedInhosp.setLeaveldeptid(thiedInhospInfo.getCurrDeptCode()); |
| | | |
| | | |
| | | |
| | | // ç¶æä¿¡æ¯ |
| | | patMedInhosp.setSchemestatus("0".equals(cry) ? 1L : 2L); |
| | | |
| | | |
| | | // ç³»ç»å段 |
| | | patMedInhosp.setDelFlag("0"); |
| | | patMedInhosp.setOrgid("1"); |
| | | |
| | | patMedInhosp.setOrgid("1"); |
| | | |
| | | return patMedInhosp; |
| | | } |
| | | |
| | |
| | | } |
| | | routers.add(router); |
| | | } |
| | | log.error("----------routersçå
¥å为ï¼{}", routers); |
| | | log.info("----------routersçå
¥å为ï¼{}", routers); |
| | | for (RouterVo routerVo : routers) { |
| | | List<String> childName = new ArrayList<>(); |
| | | List<RouterVo> childrens = routerVo.getChildren(); |
| | |
| | | |
| | | @Override |
| | | public SysUser selectUserByUserName2(String userName) { |
| | | log.debug("å¼å§æ¥è¯¢ç¨æ·ä¿¡æ¯ï¼ç¨æ·å: {}", userName); |
| | | |
| | | try { |
| | | // åæ°æ ¡éª |
| | | if (StringUtils.isEmpty(userName)) { |
| | | log.warn("ç¨æ·ååæ°ä¸ºç©º"); |
| | | return null; |
| | | } |
| | | |
| | | // è§£æç¨æ·ååæºæID |
| | | String[] userInfo = parseUserName(userName); |
| | | if (userInfo == null) { |
| | | log.warn("ç¨æ·åæ ¼å¼ä¸æ£ç¡®: {}", userName); |
| | | return null; |
| | | } |
| | | |
| | | String username = userInfo[0]; |
| | | String orgId = userInfo[1]; |
| | | |
| | | // æ¥è¯¢ç¨æ·åºæ¬ä¿¡æ¯ |
| | | SysUser sysUser = userMapper.selectUserByUserNameByCondition(username, orgId); |
| | | if (Objects.isNull(sysUser)) { |
| | | log.warn("æªæ¾å°ç¨æ·ä¿¡æ¯: username={}, orgId={}", username, orgId); |
| | | return null; |
| | | } |
| | | |
| | | // æ¥è¯¢ç¨æ·é¨é¨ä¿¡æ¯ |
| | | List<SysDept> sysDepts = getUserDepts(sysUser, username, orgId); |
| | | List<Long> deptIds = extractDeptIds(sysDepts); |
| | | sysUser.setDepts(deptIds); |
| | | |
| | | // æ ¹æ®æç´¢èå´å¤çç§å®¤åç
åºä¿¡æ¯ |
| | | processUserDeptInfo(sysUser, username, orgId); |
| | | |
| | | log.debug("ç¨æ·ä¿¡æ¯æ¥è¯¢å®æ: userId={}", sysUser.getUserId()); |
| | | return sysUser; |
| | | |
| | | } catch (Exception e) { |
| | | log.error("æ¥è¯¢ç¨æ·ä¿¡æ¯æ¶åçå¼å¸¸: userName={}", userName, e); |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * è§£æç¨æ·åï¼æåç¨æ·ååæºæID |
| | | */ |
| | | private String[] parseUserName(String userName) { |
| | | if (StringUtils.isEmpty(userName) || !userName.contains("&")) { |
| | | return null; |
| | | } |
| | | return userName.split("&"); |
| | | } |
| | | |
| | | /** |
| | | * è·åç¨æ·é¨é¨ä¿¡æ¯ |
| | | */ |
| | | private List<SysDept> getUserDepts(SysUser sysUser, String username, String orgId) { |
| | | if ("admin".equals(username)) { |
| | | String[] split = userName.split("&"); |
| | | SysUser sysUser = userMapper.selectUserByUserNameByCondition(split[0], split[1]); |
| | | if (Objects.isNull(sysUser)) return sysUser; |
| | | List<SysDept> sysDepts = null; |
| | | if (StringUtils.isNotEmpty(split[0]) && split[0].equals("admin")) { |
| | | SysDept dept = new SysDept(); |
| | | dept.setOrgid(orgId); |
| | | return sysDeptMapper.selectDeptList(dept); |
| | | dept.setOrgid(split[1]); |
| | | sysDepts = sysDeptMapper.selectDeptList(dept); |
| | | } else { |
| | | return sysUserDeptMapper.selectDeptListByUserId(sysUser.getUserId()); |
| | | sysDepts = sysUserDeptMapper.selectDeptListByUserId(sysUser.getUserId()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æåé¨é¨IDå表 |
| | | */ |
| | | private List<Long> extractDeptIds(List<SysDept> sysDepts) { |
| | | if (CollectionUtils.isEmpty(sysDepts)) { |
| | | return new ArrayList<>(); |
| | | List<Long> deptIds = new ArrayList<>(); |
| | | for (SysDept sysDept : sysDepts) { |
| | | deptIds.add(sysDept.getDeptId()); |
| | | } |
| | | return sysDepts.stream() |
| | | .map(SysDept::getDeptId) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | |
| | | /** |
| | | * å¤çç¨æ·ç§å®¤åç
åºä¿¡æ¯ |
| | | */ |
| | | private void processUserDeptInfo(SysUser sysUser, String username, String orgId) { |
| | | String searchScope = sysUser.getSearchscope(); |
| | | if (StringUtils.isEmpty(searchScope)) { |
| | | return; |
| | | } |
| | | |
| | | switch (searchScope) { |
| | | case "0": // å
¨é¨èå´ |
| | | processFullScopeDeptInfo(sysUser, username, orgId); |
| | | break; |
| | | case "1": // ç§å®¤èå´ |
| | | processDeptScopeInfo(sysUser, orgId, "1"); |
| | | break; |
| | | case "2": // ç
åºèå´ |
| | | processDeptScopeInfo(sysUser, orgId, "2"); |
| | | break; |
| | | default: |
| | | log.warn("æªç¥çæç´¢èå´: {}", searchScope); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * å¤çå
¨é¨èå´çé¨é¨ä¿¡æ¯ |
| | | */ |
| | | private void processFullScopeDeptInfo(SysUser sysUser, String username, String orgId) { |
| | | SysUserDept sysUserDept = createSysUserDept(sysUser, orgId); |
| | | |
| | | SysUserDept sysUserDept = new SysUserDept(); |
| | | sysUserDept.setUserId(sysUser.getUserId()); |
| | | sysUserDept.setDeptType(sysUser.getSearchscope()); |
| | | sysUserDept.setOrgid(split[1]); |
| | | List<SysUserDept> sysUserDeptKSs = null; |
| | | List<SysUserDept> sysUserDeptBQs = null; |
| | | |
| | | if ("admin".equals(username)) { |
| | | // adminç¨æ·ç¹æ®å¤ç |
| | | sysUserDept.setUserId(null); |
| | | sysUserDeptKSs = getAdminDeptList(orgId, "1"); |
| | | sysUserDeptBQs = getAdminDeptList(orgId, "2"); |
| | | |
| | | // å»éå¤ç |
| | | sysUserDeptKSs = removeDuplicateDepts(sysUserDeptKSs); |
| | | sysUserDeptBQs = removeDuplicateDepts(sysUserDeptBQs); |
| | | } else { |
| | | // æ®éç¨æ·å¤ç |
| | | if (StringUtils.isNotEmpty(sysUser.getSearchscope()) && sysUser.getSearchscope().equals("0")) { |
| | | if (StringUtils.isNotEmpty(split[0]) && split[0].equals("admin")) { |
| | | sysUserDept.setUserId(null); |
| | | } |
| | | sysUserDept.setDeptType("1"); |
| | | sysUserDeptKSs = sysUserDeptMapper.selectSysUserDeptList(sysUserDept); |
| | | sysUserDept.setDeptType("2"); |
| | | sysUserDeptBQs = sysUserDeptMapper.selectSysUserDeptList(sysUserDept); |
| | | } |
| | | |
| | | // 设置ç§å®¤åç
åºä¿¡æ¯ |
| | | setBelongWards(sysUser, sysUserDeptBQs); |
| | | setBelongDepts(sysUser, sysUserDeptKSs); |
| | | } |
| | | |
| | | /** |
| | | * å¤çæå®èå´çé¨é¨ä¿¡æ¯ |
| | | */ |
| | | private void processDeptScopeInfo(SysUser sysUser, String orgId, String deptType) { |
| | | SysUserDept sysUserDept = createSysUserDept(sysUser, orgId); |
| | | sysUserDept.setDeptType(deptType); |
| | | List<SysUserDept> deptList = sysUserDeptMapper.selectSysUserDeptList(sysUserDept); |
| | | |
| | | if ("1".equals(deptType)) { |
| | | setBelongDepts(sysUser, deptList); |
| | | } else if ("2".equals(deptType)) { |
| | | setBelongWards(sysUser, deptList); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * å建SysUserDept对象 |
| | | */ |
| | | private SysUserDept createSysUserDept(SysUser sysUser, String orgId) { |
| | | SysUserDept sysUserDept = new SysUserDept(); |
| | | sysUserDept.setUserId(sysUser.getUserId()); |
| | | sysUserDept.setDeptType(sysUser.getSearchscope()); |
| | | sysUserDept.setOrgid(orgId); |
| | | return sysUserDept; |
| | | } |
| | | |
| | | /** |
| | | * è·åadminç¨æ·çé¨é¨å表 |
| | | */ |
| | | private List<SysUserDept> getAdminDeptList(String orgId, String deptType) { |
| | | SysDept dept = new SysDept(); |
| | | dept.setOrgid(orgId); |
| | | dept.setDeptType(deptType); |
| | | List<SysDept> sysDepts = sysDeptMapper.selectDeptList(dept); |
| | | return DtoConversionUtils.sourceToTarget(sysDepts, SysUserDept.class); |
| | | } |
| | | |
| | | /** |
| | | * å»é¤éå¤çé¨é¨ä¿¡æ¯ |
| | | */ |
| | | private List<SysUserDept> removeDuplicateDepts(List<SysUserDept> deptList) { |
| | | if (CollectionUtils.isEmpty(deptList)) { |
| | | return new ArrayList<>(); |
| | | } |
| | | |
| | | List<SysUserDept> distinctDepts = new ArrayList<>(); |
| | | Set<String> uniqueCodes = new HashSet<>(); |
| | | |
| | | for (SysUserDept dept : deptList) { |
| | | String deptCode = dept.getDeptCode(); |
| | | if (StringUtils.isNotEmpty(deptCode) && !uniqueCodes.contains(deptCode)) { |
| | | distinctDepts.add(dept); |
| | | uniqueCodes.add(deptCode); |
| | | //妿æ¯adminï¼éè¦å¯¹sysUserDeptBQsï¼sysUserDeptBQså»é |
| | | if (StringUtils.isNotEmpty(split[0]) && split[0].equals("admin")) { |
| | | //妿æ¯adminï¼åªè½å»sys_deptå»åæ°æ® |
| | | SysDept dept = new SysDept(); |
| | | dept.setOrgid(split[1]); |
| | | dept.setDeptType("1"); |
| | | sysDepts = sysDeptMapper.selectDeptList(dept); |
| | | sysUserDeptKSs = DtoConversionUtils.sourceToTarget(sysDepts, SysUserDept.class); |
| | | |
| | | dept.setDeptType("2"); |
| | | sysDepts = sysDeptMapper.selectDeptList(dept); |
| | | sysUserDeptBQs = DtoConversionUtils.sourceToTarget(sysDepts, SysUserDept.class); |
| | | |
| | | List<SysUserDept> distinctUserDepts = new ArrayList<>(); |
| | | Set<String> uniqueDeptCodes = new HashSet<>(); |
| | | for (SysUserDept userDept : sysUserDeptKSs) { |
| | | String deptCode = userDept.getDeptCode(); |
| | | if (StringUtils.isNotEmpty(deptCode) && !uniqueDeptCodes.contains(deptCode)) { |
| | | distinctUserDepts.add(userDept); |
| | | uniqueDeptCodes.add(deptCode); |
| | | } |
| | | } |
| | | |
| | | List<SysUserDept> distinctUserBQs = new ArrayList<>(); |
| | | Set<String> uniqueBQCodes = new HashSet<>(); |
| | | for (SysUserDept userDept : sysUserDeptBQs) { |
| | | String deptCode = userDept.getDeptCode(); |
| | | if (StringUtils.isNotEmpty(deptCode) && !uniqueBQCodes.contains(deptCode)) { |
| | | distinctUserBQs.add(userDept); |
| | | uniqueBQCodes.add(deptCode); |
| | | } |
| | | } |
| | | sysUserDeptKSs = distinctUserDepts; |
| | | sysUserDeptBQs = distinctUserBQs; |
| | | } |
| | | |
| | | } else if (StringUtils.isNotEmpty(sysUser.getSearchscope()) && sysUser.getSearchscope().equals("1")) { |
| | | sysUserDept.setDeptType("1"); |
| | | sysUserDeptKSs = sysUserDeptMapper.selectSysUserDeptList(sysUserDept); |
| | | } else if (StringUtils.isNotEmpty(sysUser.getSearchscope()) && sysUser.getSearchscope().equals("2")) { |
| | | sysUserDept.setDeptType("2"); |
| | | sysUserDeptBQs = sysUserDeptMapper.selectSysUserDeptList(sysUserDept); |
| | | } |
| | | |
| | | return distinctDepts; |
| | | } |
| | | |
| | | /** |
| | | * 设置ç
åºä¿¡æ¯ |
| | | */ |
| | | private void setBelongWards(SysUser sysUser, List<SysUserDept> sysUserDeptBQs) { |
| | | if (CollectionUtils.isEmpty(sysUserDeptBQs)) { |
| | | return; |
| | | |
| | | sysUser.setDepts(deptIds); |
| | | if (!CollectionUtils.isEmpty(sysUserDeptBQs)) { |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | for (SysUserDept sud : sysUserDeptBQs) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("districtCode", ""); |
| | | if (StringUtils.isNotEmpty(sud.getDeptCode())) map.put("districtCode", sud.getDeptCode()); |
| | | else continue; |
| | | map.put("districtName", ""); |
| | | if (StringUtils.isNotEmpty(sud.getDeptName())) map.put("districtName", sud.getDeptName()); |
| | | list.add(map); |
| | | } |
| | | sysUser.setBelongWards(list); |
| | | } |
| | | |
| | | List<Map<String, Object>> wardList = sysUserDeptBQs.stream() |
| | | .filter(sud -> StringUtils.isNotEmpty(sud.getDeptCode())) |
| | | .map(sud -> { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("districtCode", StringUtils.defaultString(sud.getDeptCode(), "")); |
| | | map.put("districtName", StringUtils.defaultString(sud.getDeptName(), "")); |
| | | return map; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | |
| | | sysUser.setBelongWards(wardList); |
| | | } |
| | | |
| | | /** |
| | | * 设置ç§å®¤ä¿¡æ¯ |
| | | */ |
| | | private void setBelongDepts(SysUser sysUser, List<SysUserDept> sysUserDeptKSs) { |
| | | if (CollectionUtils.isEmpty(sysUserDeptKSs)) { |
| | | return; |
| | | if (!CollectionUtils.isEmpty(sysUserDeptKSs)) { |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | for (SysUserDept sud : sysUserDeptKSs) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("deptCode", ""); |
| | | if (StringUtils.isNotEmpty(sud.getDeptCode())) map.put("deptCode", sud.getDeptCode()); |
| | | else continue; |
| | | map.put("deptName", ""); |
| | | if (StringUtils.isNotEmpty(sud.getDeptName())) map.put("deptName", sud.getDeptName()); |
| | | list.add(map); |
| | | } |
| | | sysUser.setBelongDepts(list); |
| | | } |
| | | |
| | | List<Map<String, Object>> deptList = sysUserDeptKSs.stream() |
| | | .filter(sud -> StringUtils.isNotEmpty(sud.getDeptCode())) |
| | | .map(sud -> { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("deptCode", StringUtils.defaultString(sud.getDeptCode(), "")); |
| | | map.put("deptName", StringUtils.defaultString(sud.getDeptName(), "")); |
| | | return map; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | |
| | | sysUser.setBelongDepts(deptList); |
| | | return sysUser; |
| | | } |
| | | |
| | | /** |
| | |
| | | <if test="hisParentId != null and hisParentId != ''"> |
| | | AND his_parent_id = #{hisParentId} |
| | | </if> |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | <!-- æ°æ®èå´è¿æ»¤ --> |
| | | ${params.dataScope} |
| | | order by d.dept_type asc, d.parent_id, d.order_num |
| | |
| | | |
| | | try (FileOutputStream fos = new FileOutputStream(localFile)) { |
| | | channelSftp.get(remoteFilePath, fos); |
| | | log.error("æä»¶ä¸è½½æåï¼{}", remoteFilePath); |
| | | log.info("æä»¶ä¸è½½æåï¼{}", remoteFilePath); |
| | | } catch (Exception e) { |
| | | System.err.println("æä»¶ä¸è½½å¤±è´¥: " + remoteFilePath); |
| | | e.printStackTrace(); |
| | |
| | | private String notrequiredreason; |
| | | |
| | | /** |
| | | * ä¸è¦æå¡çæä½å»ç |
| | | */ |
| | | @ApiModelProperty("ä¸è¦æå¡çæä½å»ç") |
| | | private String filterDrname; |
| | | |
| | | |
| | | /** |
| | | * ä¸è¦æå¡çæä½å»ç |
| | | */ |
| | | @ApiModelProperty("ä¸è¦æå¡çæä½å»çç¼ç ") |
| | | private String filterDrcode; |
| | | |
| | | /** |
| | | * æ¥æº(1ï¼HISï¼2ï¼æ°æ®å¹³å°ï¼3ï¼æä»¶å¯¼å
¥ï¼ |
| | | */ |
| | | @ApiModelProperty("æ¥æº(1ï¼HISï¼2ï¼æ°æ®å¹³å°ï¼3ï¼æä»¶å¯¼å
¥ï¼") |
| | |
| | | |
| | | |
| | | /** |
| | | * ä¸è¦æå¡çæä½å»ç |
| | | */ |
| | | @ApiModelProperty("ä¸è¦æå¡çæä½å»ç") |
| | | private String filterDrname; |
| | | |
| | | |
| | | /** |
| | | * ä¸è¦æå¡çæä½å»ç |
| | | */ |
| | | @ApiModelProperty("ä¸è¦æå¡çæä½å»çç¼ç ") |
| | | private String filterDrcode; |
| | | |
| | | |
| | | /** |
| | | * ä½é¢å· |
| | | */ |
| | | @ApiModelProperty(value = "ä½é¢å·") |
| | |
| | | @ApiModelProperty("åºé¢ç
åºç¼å·") |
| | | private String leavehospitaldistrictcode; |
| | | |
| | | @ApiModelProperty("å
¥é¢ç
åºåç§°") |
| | | private String hospitaldistrictname; |
| | | |
| | | |
| | | } |
| | |
| | | @Excel(name = " æå¡æ è¯ï¼0ï¼éè¦ï¼1ï¼ä¸éè¦ ") |
| | | private String notrequiredFlag; |
| | | |
| | | /** |
| | | * ä¸è¦æå¡çåå |
| | | */ |
| | | @ApiModelProperty("ä¸è¦æå¡çåå ") |
| | | @Excel(name = " ä¸è¦æå¡çåå ") |
| | | private String notrequiredreason; |
| | | |
| | | |
| | | /** |
| | | * ä¸è¦æå¡çæä½å»ç |
| | | */ |
| | | @ApiModelProperty("ä¸è¦æå¡çæä½å»ç") |
| | | private String filterDrname; |
| | | |
| | | |
| | | /** |
| | | * ä¸è¦æå¡çæä½å»ç |
| | | */ |
| | | @ApiModelProperty("ä¸è¦æå¡çæä½å»çç¼ç ") |
| | | private String filterDrcode; |
| | | |
| | | |
| | | /** |
| | | * è¯ä»¶å·ç |
| | |
| | | |
| | | |
| | | /** |
| | | * æ¥çå
¨é¨ 0 æ¥çä½é¢ 1 æ¥çé¨è¯ 2 æ¥ç使£ 3 |
| | | * æ¥çå
¨é¨ 0 æ¥çä½é¢ 1 æ¥çé¨è¯ 2 æ¥ç使£ 3 æ¥çåºé¢ 4 |
| | | */ |
| | | @ApiModelProperty(value = " æ¥çä½é¢ 1 æ¥çé¨è¯ 2 æ¥ç使£ 3") |
| | | @ApiModelProperty(value = " æ¥çä½é¢ 1 æ¥çé¨è¯ 2 æ¥ç使£ 3 æ¥çåºé¢ 4") |
| | | private Long allhosp; |
| | | |
| | | |
| | |
| | | @Excel(name = " ä¸è¦æå¡çåå ") |
| | | private String notrequiredreason; |
| | | |
| | | |
| | | /** |
| | | * ä¸è¦æå¡çæä½å»ç |
| | | */ |
| | | @ApiModelProperty("ä¸è¦æå¡çæä½å»ç") |
| | | private String filterDrname; |
| | | |
| | | |
| | | /** |
| | | * ä¸è¦æå¡çæä½å»ç |
| | | */ |
| | | @ApiModelProperty("ä¸è¦æå¡çæä½å»çç¼ç ") |
| | | private String filterDrcode; |
| | | |
| | | /** |
| | | * ééå· |
| | | */ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.domain; |
| | | |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * æ£è
满æåº¦å¯¹è±¡ pat_satisfaction |
| | | * |
| | | * @author lihu |
| | | * @date 2025-06-30 |
| | | */ |
| | | @Data |
| | | @ApiModel("æ£è
满æåº¦") |
| | | public class PatSatisfaction extends BaseEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * $column.columnComment |
| | | */ |
| | | @ApiModelProperty("$column.columnComment") |
| | | //æ°æ®åºèªå¢æ¹æ@TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * $column.columnComment |
| | | */ |
| | | @ApiModelProperty("æ£è
å§å") |
| | | @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") |
| | | private String patName; |
| | | |
| | | /** |
| | | * $column.columnComment |
| | | */ |
| | | @ApiModelProperty("æ£è
ç¼ç ") |
| | | @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") |
| | | private String patCode; |
| | | |
| | | /** |
| | | * $column.columnComment |
| | | */ |
| | | @ApiModelProperty("ææºå·") |
| | | @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") |
| | | private String phone; |
| | | |
| | | /** |
| | | * $column.columnComment |
| | | */ |
| | | @ApiModelProperty("ç
åºåç§°") |
| | | @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") |
| | | private String hospitaldistrictname; |
| | | |
| | | /** |
| | | * $column.columnComment |
| | | */ |
| | | @ApiModelProperty("ç
åºç¼ç ") |
| | | @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") |
| | | private String hospitaldistrictcode; |
| | | |
| | | /** |
| | | * $column.columnComment |
| | | */ |
| | | @ApiModelProperty("é¨é¨åç§°") |
| | | @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") |
| | | private String deptname; |
| | | |
| | | /** |
| | | * é¨é¨ç¼ç |
| | | */ |
| | | @ApiModelProperty("é¨é¨ç¼ç ") |
| | | @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") |
| | | private String deptcode; |
| | | |
| | | /** |
| | | * ç宿§ |
| | | */ |
| | | @ApiModelProperty("ç宿§") |
| | | @Excel(name = "ç宿§") |
| | | private double authenticity; |
| | | |
| | | /** |
| | | * ä¸å¨å
宿 |
| | | */ |
| | | @ApiModelProperty("ä¸å¨å
宿") |
| | | @Excel(name = "ä¸å¨å
宿") |
| | | private double weekFinish; |
| | | |
| | | /** |
| | | * è§èæ§ |
| | | */ |
| | | @ApiModelProperty("è§èæ§") |
| | | @Excel(name = "è§èæ§") |
| | | private double standard; |
| | | |
| | | /** |
| | | * åæ¶æ§ |
| | | */ |
| | | @ApiModelProperty("åæ¶æ§") |
| | | @Excel(name = "åæ¶æ§") |
| | | private double timeliness; |
| | | |
| | | /** |
| | | * 宣ææ
åµ |
| | | */ |
| | | @ApiModelProperty("宣ææ
åµ") |
| | | @Excel(name = "宣ææ
åµ") |
| | | private double library; |
| | | |
| | | /** |
| | | * ç¯å¢æ»¡æåº¦ |
| | | */ |
| | | @ApiModelProperty("ç¯å¢æ»¡æåº¦") |
| | | @Excel(name = "ç¯å¢æ»¡æåº¦") |
| | | private double environment; |
| | | |
| | | /** |
| | | * å»ç满æåº¦ |
| | | */ |
| | | @ApiModelProperty("å»ç满æåº¦") |
| | | @Excel(name = "å»ç满æåº¦") |
| | | private double doctorSatisfaction; |
| | | |
| | | /** |
| | | * $column.columnComment |
| | | */ |
| | | @ApiModelProperty("æ¤å£«æ»¡æåº¦") |
| | | @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") |
| | | private double nurseSatisfaction; |
| | | |
| | | @ApiModelProperty("æ»å") |
| | | private double total; |
| | | |
| | | /** |
| | | * $column.columnComment |
| | | */ |
| | | @ApiModelProperty("å é¤") |
| | | private String delFlag; |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.mapper; |
| | | |
| | | import com.smartor.domain.PatSatisfaction; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æ£è
满æåº¦Mapperæ¥å£ |
| | | * |
| | | * @author lihu |
| | | * @date 2025-06-30 |
| | | */ |
| | | @Mapper |
| | | public interface PatSatisfactionMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢æ£è
满æåº¦ |
| | | * |
| | | * @param id æ£è
满æåº¦ä¸»é® |
| | | * @return æ£è
满æåº¦ |
| | | */ |
| | | public PatSatisfaction selectPatSatisfactionById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£è
满æåº¦å表 |
| | | * |
| | | * @param patSatisfaction æ£è
满æåº¦ |
| | | * @return æ£è
满æåº¦éå |
| | | */ |
| | | public List<PatSatisfaction> selectPatSatisfactionList(PatSatisfaction patSatisfaction); |
| | | |
| | | /** |
| | | * æ°å¢æ£è
满æåº¦ |
| | | * |
| | | * @param patSatisfaction æ£è
满æåº¦ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertPatSatisfaction(PatSatisfaction patSatisfaction); |
| | | |
| | | /** |
| | | * ä¿®æ¹æ£è
满æåº¦ |
| | | * |
| | | * @param patSatisfaction æ£è
满æåº¦ |
| | | * @return ç»æ |
| | | */ |
| | | public int updatePatSatisfaction(PatSatisfaction patSatisfaction); |
| | | |
| | | /** |
| | | * å 餿£è
满æåº¦ |
| | | * |
| | | * @param id æ£è
满æåº¦ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deletePatSatisfactionById(Long id); |
| | | |
| | | /** |
| | | * æ¹éå 餿£è
满æåº¦ |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deletePatSatisfactionByIds(Long[] ids); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.service; |
| | | |
| | | import java.util.List; |
| | | import com.smartor.domain.PatSatisfaction; |
| | | |
| | | /** |
| | | * æ£è
满æåº¦Serviceæ¥å£ |
| | | * |
| | | * @author lihu |
| | | * @date 2025-06-30 |
| | | */ |
| | | public interface IPatSatisfactionService |
| | | { |
| | | /** |
| | | * æ¥è¯¢æ£è
满æåº¦ |
| | | * |
| | | * @param id æ£è
满æåº¦ä¸»é® |
| | | * @return æ£è
满æåº¦ |
| | | */ |
| | | public PatSatisfaction selectPatSatisfactionById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£è
满æåº¦å表 |
| | | * |
| | | * @param patSatisfaction æ£è
满æåº¦ |
| | | * @return æ£è
满æåº¦éå |
| | | */ |
| | | public List<PatSatisfaction> selectPatSatisfactionList(PatSatisfaction patSatisfaction); |
| | | |
| | | /** |
| | | * æ°å¢æ£è
满æåº¦ |
| | | * |
| | | * @param patSatisfaction æ£è
满æåº¦ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertPatSatisfaction(PatSatisfaction patSatisfaction); |
| | | |
| | | /** |
| | | * ä¿®æ¹æ£è
满æåº¦ |
| | | * |
| | | * @param patSatisfaction æ£è
满æåº¦ |
| | | * @return ç»æ |
| | | */ |
| | | public int updatePatSatisfaction(PatSatisfaction patSatisfaction); |
| | | |
| | | /** |
| | | * æ¹éå 餿£è
满æåº¦ |
| | | * |
| | | * @param ids éè¦å é¤çæ£è
满æåº¦ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deletePatSatisfactionByIds(Long[] ids); |
| | | |
| | | /** |
| | | * å 餿£è
满æåº¦ä¿¡æ¯ |
| | | * |
| | | * @param id æ£è
满æåº¦ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deletePatSatisfactionById(Long id); |
| | | } |
| | |
| | | //å»redisä¸ï¼æ¥è¯¢æ¯å¦æsubidï¼æçè¯ç§»é¤cache-exist |
| | | if (CollectionUtils.isNotEmpty(serviceSubtaskList)) { |
| | | for (ServiceSubtask serviceSubtask : serviceSubtaskList) { |
| | | log.error("éè¦ç§»é¤çsubId为ï¼{}", serviceSubtask.getId().toString()); |
| | | log.info("éè¦ç§»é¤çsubId为ï¼{}", serviceSubtask.getId().toString()); |
| | | serviceSubtaskMapper.deleteServiceSubtaskById(serviceSubtask.getId()); |
| | | redisCache.removeElementFromList("cache-exist", serviceSubtask.getId().toString()); |
| | | redisCache.removeElementFromList("cache-0", serviceSubtask.getId().toString()); |
| | |
| | | List<PatArchiveOthreInfo> patArchives3 = patArchiveMapper.selectPatArchiveInfoByPhysical(patArchiveReq); |
| | | if (CollectionUtils.isNotEmpty(patArchives3)) { |
| | | patArchiveList.addAll(patArchives3); |
| | | } |
| | | } else if (patArchiveReq.getAllhosp() != null && patArchiveReq.getAllhosp() == 4) { |
| | | // æ¥çä½é¢ 1 æ¥çé¨è¯ 2 æ¥ç使£ 3 æ¥çåºé¢ 4 |
| | | patArchiveReq.setCry(1); |
| | | List<PatArchiveOthreInfo> patArchives1 = patArchiveMapper.selectPatArchiveInfoByInhospQC(patArchiveReq); |
| | | if (CollectionUtils.isNotEmpty(patArchives1)) { |
| | | patArchiveList.addAll(patArchives1); |
| | | } |
| | | } |
| | | |
| | |
| | | if (CollectionUtils.isNotEmpty(patArchives3)) { |
| | | patArchiveList.addAll(patArchives3); |
| | | } |
| | | } else if (patArchive.getAllhosp() != null && patArchive.getAllhosp() == 4) { |
| | | // æ¥çä½é¢ 1 æ¥çé¨è¯ 2 æ¥ç使£ 3 æ¥çåºé¢ 4 |
| | | patArchive.setCry(1); |
| | | List<PatArchiveOthreInfo> patArchives1 = patArchiveMapper.selectPatArchiveInfoByInhospQC(patArchive); |
| | | if (CollectionUtils.isNotEmpty(patArchives1)) { |
| | | patArchiveList.addAll(patArchives1); |
| | | } |
| | | } |
| | | |
| | | //æ ¹æ®æ£è
IDè¿è¡åç» |
| | |
| | | List<PatArchiveOthreInfo> patArchiveList = new ArrayList<>(); |
| | | if (patArchiveReq.getAllhosp() != null && patArchiveReq.getAllhosp() == 1) { |
| | | // æ¥çä½é¢ 1 æ¥çé¨è¯ 2 æ¥ç使£ 3 |
| | | patArchiveReq.setCry(0); |
| | | List<PatArchiveOthreInfo> patArchives1 = patArchiveMapper.selectPatArchiveInfoByInhospQC(patArchiveReq); |
| | | if (CollectionUtils.isNotEmpty(patArchives1)) { |
| | | patArchiveList.addAll(patArchives1); |
| | |
| | | if (CollectionUtils.isNotEmpty(patArchives3)) { |
| | | patArchiveList.addAll(patArchives3); |
| | | } |
| | | |
| | | } else if (patArchiveReq.getAllhosp() != null && patArchiveReq.getAllhosp() == 4) { |
| | | // æ¥çä½é¢ 1 æ¥çé¨è¯ 2 æ¥ç使£ 3 æ¥çåºé¢ 4 |
| | | patArchiveReq.setCry(1); |
| | | List<PatArchiveOthreInfo> patArchives1 = patArchiveMapper.selectPatArchiveInfoByInhospQC(patArchiveReq); |
| | | if (CollectionUtils.isNotEmpty(patArchives1)) { |
| | | patArchiveList.addAll(patArchives1); |
| | | } |
| | | } |
| | | |
| | | return patArchiveList; |
| | |
| | | pmks.setInhospstate("1"); |
| | | pmks.setFuflag("1"); |
| | | List<PatMedInhosp> patMedInhosps = patMedInhospMapper.selectPatMedInhospList(pmks); |
| | | log.error("dealOutHospInfoéè¦å¤ççåºé¢é¨é¨æ£è
ä¿¡æ¯ï¼{}", patMedInhosps); |
| | | log.info("dealOutHospInfoéè¦å¤ççåºé¢é¨é¨æ£è
ä¿¡æ¯ï¼{}", patMedInhosps); |
| | | for (PatMedInhosp patMedInhosp1 : patMedInhosps) { |
| | | String tagname = patMedInhospMapper.getTagnameBypatid(patMedInhosp1.getPatid()); |
| | | patMedInhosp1.setTagname(tagname); |
| | |
| | | pmbq.setInhospstate("1"); |
| | | pmbq.setFuflag("1"); |
| | | List<PatMedInhosp> patMedInhospBQs = patMedInhospMapper.selectPatMedInhospList(pmbq); |
| | | log.error("dealOutHospInfoéè¦å¤ççåºé¢ç
åºæ£è
ä¿¡æ¯ï¼{}", patMedInhosps); |
| | | log.info("dealOutHospInfoéè¦å¤ççåºé¢ç
åºæ£è
ä¿¡æ¯ï¼{}", patMedInhosps); |
| | | for (PatMedInhosp patMedInhosp1 : patMedInhospBQs) { |
| | | String tagname = patMedInhospMapper.getTagnameBypatid(patMedInhosp1.getPatid()); |
| | | patMedInhosp1.setTagname(tagname); |
| | |
| | | pmjb.setInhospstate("1"); |
| | | pmjb.setFuflag("1"); |
| | | List<PatMedInhosp> patMedInhospJBs = patMedInhospMapper.selectPatMedInhospList(pmjb); |
| | | log.error("dealOutHospInfoéè¦å¤ççåºé¢ç¾ç
æ£è
ä¿¡æ¯ï¼{}", patMedInhosps); |
| | | log.info("dealOutHospInfoéè¦å¤ççåºé¢ç¾ç
æ£è
ä¿¡æ¯ï¼{}", patMedInhosps); |
| | | for (PatMedInhosp patMedInhosp1 : patMedInhospJBs) { |
| | | String tagname = patMedInhospMapper.getTagnameBypatid(patMedInhosp1.getPatid()); |
| | | patMedInhosp1.setTagname(tagname); |
| | |
| | | st.setSendState(2L); |
| | | List<ServiceTask> serviceTasks = serviceTaskMapper.selectServiceTaskList(st); |
| | | if (CollectionUtils.isEmpty(serviceTasks)) { |
| | | log.error("该æ£è
åºé¢éè®¿é¿æä»»å¡ä¸åå¨,ä»»å¡ID为ï¼{}", taskid); |
| | | log.info("该æ£è
åºé¢éè®¿é¿æä»»å¡ä¸åå¨,ä»»å¡ID为ï¼{}", taskid); |
| | | patMedInhosp1.setDeptcheckFlag("2"); |
| | | patMedInhosp1.setLongTaskReason(longTaskReason + " & 该æ£è
åºé¢éè®¿é¿æä»»å¡ä¸åå¨,ä»»å¡ID为:" + taskid); |
| | | patMedInhospMapper.updatePatMedInhosp(patMedInhosp1); |
| | |
| | | subtask.setSendstate(2L); |
| | | subtask.setTaskid(taskid); |
| | | List<ServiceSubtask> selectServiceSubtaskList = serviceSubtaskMapper.selectServiceSubtaskList(subtask); |
| | | log.error("该æ£è
å¾
æ§è¡çä»»å¡:{}", selectServiceSubtaskList); |
| | | log.info("该æ£è
å¾
æ§è¡çä»»å¡:{}", selectServiceSubtaskList); |
| | | if (CollectionUtils.isNotEmpty(selectServiceSubtaskList) && selectServiceSubtaskList.size() > 0) { |
| | | for (ServiceSubtask serviceSubtask1 : selectServiceSubtaskList) { |
| | | if (Objects.isNull(serviceSubtask1.getLongSendTime())) { |
| | |
| | | patMedInhospMapper.updatePatMedInhosp(patMedInhosp2); |
| | | } else { |
| | | //çæåä»»å¡å¤±è´¥ï¼ |
| | | log.error("çæåä»»å¡å¤±è´¥serviceSubtask为ï¼{}", serviceSubtask); |
| | | log.info("çæåä»»å¡å¤±è´¥serviceSubtask为ï¼{}", serviceSubtask); |
| | | PatMedInhosp patMedInhosp2 = new PatMedInhosp(); |
| | | patMedInhosp2.setInhospid(patMedInhosp1.getInhospid()); |
| | | if (type == 1) patMedInhosp2.setDeptcheckFlag("2"); |
| | |
| | | if (serviceTask.getSendDay() == null) serviceTask.setSendDay(1L); |
| | | Date newDate = addDays(patMedInhosp1.getEndtime(), serviceTask.getSendDay().intValue()); |
| | | serviceSubtask.setLongSendTime(newDate); |
| | | serviceSubtask.setVisitTime(newDate); |
| | | //æ£è
åéæ¶é´ |
| | | if (StringUtils.isNotEmpty(patArchive.getNotrequiredFlag()) && patArchive.getNotrequiredFlag().equals("1")) { |
| | | // log.error("serviceSubtask99999999çå¼ä¸ºï¼{}",serviceSubtask); |
| | |
| | | |
| | | @Override |
| | | public PatMedRes selectPatMedOuthospCount(PatMedReq patMedReq) { |
| | | // è·åå½åç»é人çé¨é¨æé |
| | | if (CollectionUtils.isEmpty(patMedReq.getDeptcodeList())) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | List<SysDept> sysDepts = sysUserDeptMapper.selectDeptListByUserId(userId); |
| | | List<String> deptCode = new ArrayList<>(); |
| | | for (SysDept sysDept : sysDepts) { |
| | | deptCode.add(sysDept.getDeptId().toString()); |
| | | } |
| | | patMedReq.setDeptcodeList(deptCode); |
| | | } |
| | | // // è·åå½åç»é人çé¨é¨æé |
| | | // if (CollectionUtils.isEmpty(patMedReq.getDeptcodeList())) { |
| | | // Long userId = SecurityUtils.getUserId(); |
| | | // List<SysDept> sysDepts = sysUserDeptMapper.selectDeptListByUserId(userId); |
| | | // List<String> deptCode = new ArrayList<>(); |
| | | // for (SysDept sysDept : sysDepts) { |
| | | // deptCode.add(sysDept.getDeptId().toString()); |
| | | // } |
| | | // patMedReq.setDeptcodeList(deptCode); |
| | | // } |
| | | return patMedOuthospMapper.selectPatMedOuthospCount(patMedReq); |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.service.impl; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.smartor.mapper.PatSatisfactionMapper; |
| | | import com.smartor.domain.PatSatisfaction; |
| | | import com.smartor.service.IPatSatisfactionService; |
| | | |
| | | /** |
| | | * æ£è
满æåº¦Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author lihu |
| | | * @date 2025-06-30 |
| | | */ |
| | | @Service |
| | | public class PatSatisfactionServiceImpl implements IPatSatisfactionService { |
| | | @Autowired |
| | | private PatSatisfactionMapper patSatisfactionMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£è
满æåº¦ |
| | | * |
| | | * @param id æ£è
满æåº¦ä¸»é® |
| | | * @return æ£è
满æåº¦ |
| | | */ |
| | | @Override |
| | | public PatSatisfaction selectPatSatisfactionById(Long id) { |
| | | PatSatisfaction ps = patSatisfactionMapper.selectPatSatisfactionById(id); |
| | | double total = ps.getDoctorSatisfaction() + ps.getAuthenticity() + ps.getWeekFinish() + ps.getStandard() + ps.getTimeliness() + ps.getLibrary() + ps.getEnvironment() + ps.getNurseSatisfaction(); |
| | | ps.setTotal(total); |
| | | return ps; |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£è
满æåº¦å表 |
| | | * |
| | | * @param patSatisfaction æ£è
满æåº¦ |
| | | * @return æ£è
满æåº¦ |
| | | */ |
| | | @Override |
| | | public List<PatSatisfaction> selectPatSatisfactionList(PatSatisfaction patSatisfaction) { |
| | | List<PatSatisfaction> patSatisfactions = patSatisfactionMapper.selectPatSatisfactionList(patSatisfaction); |
| | | if (CollectionUtils.isNotEmpty(patSatisfactions)) { |
| | | patSatisfactions.forEach(ps -> { |
| | | double total = ps.getDoctorSatisfaction() + ps.getAuthenticity() + ps.getWeekFinish() + ps.getStandard() + ps.getTimeliness() + ps.getLibrary() + ps.getEnvironment() + ps.getNurseSatisfaction(); |
| | | ps.setTotal(total); |
| | | }); |
| | | } |
| | | return patSatisfactions; |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢æ£è
满æåº¦ |
| | | * |
| | | * @param patSatisfaction æ£è
满æåº¦ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertPatSatisfaction(PatSatisfaction patSatisfaction) { |
| | | patSatisfaction.setCreateTime(DateUtils.getNowDate()); |
| | | patSatisfaction.setUpdateTime(DateUtils.getNowDate()); |
| | | return patSatisfactionMapper.insertPatSatisfaction(patSatisfaction); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹æ£è
满æåº¦ |
| | | * |
| | | * @param patSatisfaction æ£è
满æåº¦ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updatePatSatisfaction(PatSatisfaction patSatisfaction) { |
| | | patSatisfaction.setUpdateTime(DateUtils.getNowDate()); |
| | | return patSatisfactionMapper.updatePatSatisfaction(patSatisfaction); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå 餿£è
满æåº¦ |
| | | * |
| | | * @param ids éè¦å é¤çæ£è
满æåº¦ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deletePatSatisfactionByIds(Long[] ids) { |
| | | return patSatisfactionMapper.deletePatSatisfactionByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å 餿£è
满æåº¦ä¿¡æ¯ |
| | | * |
| | | * @param id æ£è
满æåº¦ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deletePatSatisfactionById(Long id) { |
| | | return patSatisfactionMapper.deletePatSatisfactionById(id); |
| | | } |
| | | } |
| | |
| | | |
| | | @Override |
| | | public Boolean addUserInfo(Map dataMap) { |
| | | log.error("ServiceExternalServiceImpl---addUserInfoçæ°å¢çå¼ä¸ºï¼{}", dataMap); |
| | | log.info("ServiceExternalServiceImpl---addUserInfoçæ°å¢çå¼ä¸ºï¼{}", dataMap); |
| | | Map yeWuXX = (Map) dataMap.get("YeWuXX"); |
| | | Map<String, Object> yongHuXX = (Map<String, Object>) yeWuXX.get("YongHuXX"); |
| | | ExternalUserInfo externalUserInfo = BeanUtil.mapToBean(yongHuXX, ExternalUserInfo.class, true); |
| | |
| | | serviceTask.setCreateTime(new Date()); |
| | | serviceTask.setUpdateTime(new Date()); |
| | | serviceTaskService.insertServiceTask(serviceTask); |
| | | log.error("----serviceTaskVO.getAppltype()çå¼ä¸ºï¼{}", serviceTaskVO.getAppltype()); |
| | | log.info("----serviceTaskVO.getAppltype()çå¼ä¸ºï¼{}", serviceTaskVO.getAppltype()); |
| | | if (StringUtils.isNotEmpty(serviceTaskVO.getAppltype())) { |
| | | if (serviceTaskVO.getAppltype().equals("3")) { |
| | | ServiceTaskdiag serviceTaskdiag = new ServiceTaskdiag(); |
| | |
| | | serviceTaskdiag.setGuid(serviceTask.getGuid()); |
| | | serviceTaskdiag.setOrgid(serviceTask.getOrgid()); |
| | | serviceTaskdiag.setCreateTime(new Date()); |
| | | log.error("----serviceTaskdiagçå¼ä¸ºï¼{}", serviceTaskdiag); |
| | | log.info("----serviceTaskdiagçå¼ä¸ºï¼{}", serviceTaskdiag); |
| | | if (StringUtils.isNotEmpty(serviceTaskVO.getIcd10code())) { |
| | | String[] Icd10codes = serviceTaskVO.getIcd10code().split(","); |
| | | for (String icd10code : Icd10codes) { |
| | |
| | | String[] opcodes = serviceTaskVO.getOpcode().split(","); |
| | | for (String opcode : opcodes) { |
| | | serviceTaskoper.setOpcode(opcode); |
| | | log.error("----serviceTaskoperçå¼ä¸ºï¼{}", serviceTaskoper); |
| | | log.info("----serviceTaskoperçå¼ä¸ºï¼{}", serviceTaskoper); |
| | | serviceTaskoperService.insertServiceTaskoper(serviceTaskoper); |
| | | } |
| | | } |
| | |
| | | } |
| | | if (CollectionUtils.isNotEmpty(serviceSubtaskList)) { |
| | | for (ServiceSubtask serviceSubtask : serviceSubtaskList) { |
| | | log.error("insertOrUpdateTaskéè¦ç§»é¤çsubId为ï¼{}", serviceSubtask.getId().toString()); |
| | | log.info("insertOrUpdateTaskéè¦ç§»é¤çsubId为ï¼{}", serviceSubtask.getId().toString()); |
| | | serviceSubtaskMapper.deleteServiceSubtaskById(serviceSubtask.getId()); |
| | | redisCache.removeElementFromList("cache-exist", serviceSubtask.getId().toString()); |
| | | redisCache.removeElementFromList("cache-0", serviceSubtask.getId().toString()); |
| | |
| | | serviceTaskdiag2.setIcd10code(icdcode); |
| | | List<ServiceTaskdiag> serviceTaskdiags = serviceTaskdiagService.selectServiceTaskdiagList(serviceTaskdiag2); |
| | | serviceTaskdiag.setIcd10code(icdcode); |
| | | log.error("----serviceTaskdiagæ´æ°çå¼ä¸ºï¼{}", serviceTaskdiag); |
| | | log.info("----serviceTaskdiagæ´æ°çå¼ä¸ºï¼{}", serviceTaskdiag); |
| | | if (CollectionUtils.isNotEmpty(serviceTaskdiags)) { |
| | | serviceTaskdiag.setId(serviceTaskdiags.get(0).getId()); |
| | | serviceTaskdiagService.updateServiceTaskdiag(serviceTaskdiag); |
| | |
| | | List<ServiceTaskoper> serviceTaskopers = serviceTaskoperService.selectServiceTaskoperList(serviceTaskoper2); |
| | | |
| | | serviceTaskoper.setOpcode(opcode); |
| | | log.error("----serviceTaskoperçå¼ä¸ºï¼{}", serviceTaskoper); |
| | | log.info("----serviceTaskoperçå¼ä¸ºï¼{}", serviceTaskoper); |
| | | if (CollectionUtils.isNotEmpty(serviceTaskopers)) { |
| | | serviceTaskoper.setId(serviceTaskopers.get(0).getId()); |
| | | serviceTaskoperService.updateServiceTaskoper(serviceTaskoper); |
| | |
| | | serviceSubtask.setBedNo(serviceTaskVO.getBedno()); |
| | | serviceSubtask.setDeptname(serviceTaskVO.getDeptname()); |
| | | serviceSubtask.setDeptcode(serviceTaskVO.getDeptcode()); |
| | | serviceSubtask.setSendstate(1L); |
| | | serviceSubtask.setSendstate(6L); |
| | | serviceSubtask.setCreateTime(new Date()); |
| | | serviceSubtask.setLeavehospitaldistrictcode(serviceTaskVO.getDistrictcode()); |
| | | //å
æ¥è¯¢ä¸éï¼è¯¥taskGuidæ¯å¦åå¨ |
| | |
| | | <result property="carePerson" column="care_person"/> |
| | | <result property="casePersonAge" column="case_person_age"/> |
| | | <result property="guid" column="guid"/> |
| | | <result property="filterDrname" column="filter_drname"/> |
| | | <result property="filterDrcode" column="filter_drcode"/> |
| | | </resultMap> |
| | | |
| | | |
| | |
| | | <result property="guid" column="guid"/> |
| | | <result property="leavediagname" column="leavediagname"/> |
| | | <result property="leaveicd10code" column="leaveicd10code"/> |
| | | <result property="filterDrname" column="filter_drname"/> |
| | | <result property="filterDrcode" column="filter_drcode"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectPatArchiveVo"> |
| | |
| | | notrequired_flag, |
| | | notrequiredreason, |
| | | patientno, |
| | | filter_drname, |
| | | filter_drcode, |
| | | patid_his, |
| | | age_unit, |
| | | age_unit2, |
| | |
| | | <if test="medicareType != null ">and medicare_type = #{medicareType}</if> |
| | | <if test="carePerson != null ">and care_person = #{carePerson}</if> |
| | | <if test="casePersonAge != null ">and case_person_age = #{casePersonAge}</if> |
| | | <if test="filterDrname != null ">and filter_drname = #{filterDrname}</if> |
| | | <if test="filterDrcode != null ">and filter_drcode = #{filterDrcode}</if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | a.income, |
| | | a.medicare_type, |
| | | a.care_person, |
| | | a.filter_drname, |
| | | a.filter_drcode, |
| | | a.case_person_age |
| | | from pat_archive a,pat_archivetag b ,base_tag c |
| | | <where> |
| | | a.del_flag=0 and |
| | | a.id = b.patid and b.tagid = c.tagid |
| | | <if test="filterDrname != null ">and filter_drname = #{filterDrname}</if> |
| | | <if test="filterDrcode != null ">and filter_drcode = #{filterDrcode}</if> |
| | | <if test="name != null and name != ''">and a.name like concat('%', #{name}, '%')</if> |
| | | <if test="idcardno != null and idcardno != ''">and idcardno = #{idcardno}</if> |
| | | <if test="telcode != null and telcode != ''">and telcode = #{telcode}</if> |
| | |
| | | <if test="medicareType != null ">medicare_type,</if> |
| | | <if test="carePerson != null ">care_person,</if> |
| | | <if test="casePersonAge != null ">case_person_age,</if> |
| | | <if test="filterDrname != null ">filter_drname,</if> |
| | | <if test="filterDrcode != null ">filter_drcode,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="patientno != null">#{patientno},</if> |
| | |
| | | <if test="medicareType != null ">#{medicareType},</if> |
| | | <if test="carePerson != null ">#{carePerson},</if> |
| | | <if test="casePersonAge != null ">#{casePersonAge},</if> |
| | | <if test="filterDrname != null ">#{filterDrname},</if> |
| | | <if test="filterDrcode != null ">#{filterDrcode},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | insert into |
| | | pat_archive(name,viptype,sex,idcardno,birthdate,place_of_residence,age,age2,sourcefrom,archivetime,archiveby,telcode,relativetelcode,idcardtype,orgid,openid,dduserid,update_by,update_time |
| | | ,create_by,create_time,isupload,upload_time,pattype,nation,birthplace,native_place,patientno,patid_his,sd_flag,age_unit,age_unit2,notrequired_flag,notrequiredreason,care_facilities,case_path, |
| | | degree_of_education,marital_status,income,medicare_type,care_person,case_person_age) |
| | | degree_of_education,marital_status,income,medicare_type,care_person,case_person_age,filter_drname,filter_drcode) |
| | | values |
| | | <foreach item="item" index="index" collection="list" separator=","> |
| | | (#{item.name},#{item.viptype},#{item.sex},#{item.idcardno},#{item.birthdate},#{item.placeOfResidence},#{item.age},#{item.age2},#{item.sourcefrom},#{item.archivetime},#{item.archiveby} |
| | | ,#{item.telcode},#{item.archiveby},#{item.idcardtype},#{item.orgid},#{item.openid},#{item.dduserid},#{item.updateBy}, |
| | | #{item.updateTime},#{item.createBy},#{item.createTime},#{item.isupload},#{item.uploadTime},#{item.pattype},#{item.nation},#{item.birthplace},#{item.nativePlace},#{item.patientno}, |
| | | #{item.patidHis},#{item.sdFlag},#{item.ageUnit},#{item.ageUnit2},#{item.notrequiredFlag},#{item.notrequiredreason} |
| | | ,#{item.careFacilities},#{item.casePath},#{item.degreeOfEducation},#{item.maritalStatus},#{item.income},#{item.medicareType},#{item.carePerson},#{item.casePersonAge}) |
| | | ,#{item.careFacilities},#{item.casePath},#{item.degreeOfEducation},#{item.maritalStatus},#{item.income},#{item.medicareType},#{item.carePerson},#{item.casePersonAge},#{item.filterDrname},#{item.filterDrcode}) |
| | | </foreach> |
| | | </insert> |
| | | |
| | |
| | | <if test="carePerson != null ">care_person = #{carePerson},</if> |
| | | <if test="casePersonAge != null ">case_person_age = #{casePersonAge},</if> |
| | | <if test="guid != null ">guid = #{guid},</if> |
| | | <if test="filterDrname != null ">filter_drname = #{filterDrname},</if> |
| | | <if test="filterDrcode != null ">filter_drcode = #{filterDrcode},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | a.upload_time, |
| | | a.viptype, |
| | | a.pattype, |
| | | a.filter_drname, |
| | | a.filter_drcode, |
| | | b.tagname AS tag, |
| | | b.tagid AS tagid |
| | | FROM |
| | |
| | | a.isupload, |
| | | a.upload_time, |
| | | a.pattype, |
| | | a.filter_drname, |
| | | a.filter_drcode, |
| | | d.bed_no, |
| | | d.starttime, |
| | | d.endtime, |
| | |
| | | a.create_time, |
| | | a.isupload, |
| | | a.upload_time, |
| | | a.filter_drname, |
| | | a.filter_drcode, |
| | | t.tagname, |
| | | a.pattype |
| | | from pat_med_outhosp d JOIN pat_archive a ON a.id = d.patid |
| | |
| | | a.create_time, |
| | | a.isupload, |
| | | a.upload_time, |
| | | a.filter_drname, |
| | | a.filter_drcode, |
| | | t.tagname, |
| | | a.pattype |
| | | from pat_med_physical d JOIN pat_archive a ON a.id = d.patid |
| | |
| | | |
| | | <select id="selectPatArchiveInfoByInhospQC" parameterType="com.smartor.domain.PatArchiveReq" |
| | | resultMap="PatArchiveOthreInfoResult"> |
| | | |
| | | select * from ( |
| | | select |
| | | a.idcardno, |
| | | a.id, |
| | |
| | | a.isupload, |
| | | a.upload_time, |
| | | a.pattype, |
| | | a.filter_drname, |
| | | a.filter_drcode, |
| | | d.bed_no, |
| | | d.starttime, |
| | | d.endtime, |
| | |
| | | #{leaveldeptcode} |
| | | </foreach> |
| | | </if> |
| | | <if test="hospitaldistrictcodes != null and hospitaldistrictcodes.size()>0"> |
| | | AND d.hospitaldistrictcode IN |
| | | <foreach collection="hospitaldistrictcodes" item="hospitaldistrictcode" open="(" separator="," |
| | | close=")"> |
| | | #{hospitaldistrictcode} |
| | | </foreach> |
| | | </if> |
| | | <if test="deptcodes != null and deptcodes.size() > 0"> |
| | | AND d.deptcode IN |
| | | <foreach collection="deptcodes" item="deptcode" open="(" separator="," |
| | | close=")"> |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | |
| | | <if test="pids != null"> |
| | | AND a.id NOT IN |
| | | <foreach collection="pids" item="pid" open="(" separator="," close=")"> |
| | |
| | | AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid) |
| | | </if> |
| | | </where> |
| | | order by a.id,a.update_time desc ) order by endtime desc |
| | | order by a.id,a.update_time desc ) as tmp order by endtime desc |
| | | </select> |
| | | |
| | | <select id="selectPatArchiveInfoByOuthospQC" parameterType="com.smartor.domain.PatArchiveReq" |
| | |
| | | a.place_of_residence, |
| | | a.birthplace, |
| | | a.birthdate, |
| | | -- a.icd10code as leaveicd10code, |
| | | -- a.diagname as leavediagname, |
| | | -- a.icd10code as leaveicd10code, |
| | | -- a.diagname as leavediagname, |
| | | a.age, |
| | | a.age2, |
| | | a.viptype, |
| | |
| | | a.create_time, |
| | | a.isupload, |
| | | a.upload_time, |
| | | a.filter_drname, |
| | | a.filter_drcode, |
| | | t.tagname, |
| | | a.pattype |
| | | from pat_med_outhosp d JOIN pat_archive a ON a.id = d.patid |
| | |
| | | a.viptype, |
| | | a.birthdate, |
| | | a.age, |
| | | a.filter_drname, |
| | | a.filter_drcode, |
| | | a.age2, |
| | | a.sourcefrom, |
| | | a.archivetime, |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.smartor.mapper.PatSatisfactionMapper"> |
| | | |
| | | <resultMap type="com.smartor.domain.PatSatisfaction" id="PatSatisfactionResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="patName" column="pat_name"/> |
| | | <result property="patCode" column="pat_code"/> |
| | | <result property="phone" column="phone"/> |
| | | <result property="hospitaldistrictname" column="hospitaldistrictname"/> |
| | | <result property="hospitaldistrictcode" column="hospitaldistrictcode"/> |
| | | <result property="deptname" column="deptname"/> |
| | | <result property="deptcode" column="deptcode"/> |
| | | <result property="authenticity" column="authenticity"/> |
| | | <result property="weekFinish" column="week_finish"/> |
| | | <result property="standard" column="standard"/> |
| | | <result property="timeliness" column="timeliness"/> |
| | | <result property="library" column="library"/> |
| | | <result property="environment" column="environment"/> |
| | | <result property="doctorSatisfaction" column="doctor_satisfaction"/> |
| | | <result property="nurseSatisfaction" column="nurse_satisfaction"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | <result property="orgid" column="orgid"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectPatSatisfactionVo"> |
| | | select id, |
| | | orgid, |
| | | pat_name, |
| | | pat_code, |
| | | phone, |
| | | hospitaldistrictname, |
| | | hospitaldistrictcode, |
| | | deptname, |
| | | deptcode, |
| | | authenticity, |
| | | week_finish, |
| | | standard, |
| | | timeliness, |
| | | library, |
| | | environment, |
| | | doctor_satisfaction, |
| | | nurse_satisfaction, |
| | | update_time, |
| | | create_time, |
| | | update_by, |
| | | create_by, |
| | | del_flag |
| | | from pat_satisfaction |
| | | </sql> |
| | | |
| | | <select id="selectPatSatisfactionList" parameterType="com.smartor.domain.PatSatisfaction" |
| | | resultMap="PatSatisfactionResult"> |
| | | <include refid="selectPatSatisfactionVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | <if test="patName != null and patName != ''"> |
| | | and pat_name like concat('%', #{patName}, '%') |
| | | </if> |
| | | <if test="patCode != null and patCode != ''"> |
| | | and pat_code = #{patCode} |
| | | </if> |
| | | <if test="phone != null and phone != ''"> |
| | | and phone = #{phone} |
| | | </if> |
| | | <if test="hospitaldistrictname != null and hospitaldistrictname != ''"> |
| | | and hospitaldistrictname like concat('%', #{hospitaldistrictname}, '%') |
| | | </if> |
| | | <if test="hospitaldistrictcode != null and hospitaldistrictcode != ''"> |
| | | and hospitaldistrictcode = #{hospitaldistrictcode} |
| | | </if> |
| | | <if test="deptname != null and deptname != ''"> |
| | | and deptname like concat('%', #{deptname}, '%') |
| | | </if> |
| | | <if test="deptcode != null and deptcode != ''"> |
| | | and deptcode = #{deptcode} |
| | | </if> |
| | | <if test="authenticity != null and authenticity != ''"> |
| | | and authenticity = #{authenticity} |
| | | </if> |
| | | <if test="weekFinish != null and weekFinish != ''"> |
| | | and week_finish = #{weekFinish} |
| | | </if> |
| | | <if test="standard != null and standard != ''"> |
| | | and standard = #{standard} |
| | | </if> |
| | | <if test="timeliness != null and timeliness != ''"> |
| | | and timeliness = #{timeliness} |
| | | </if> |
| | | <if test="library != null and library != ''"> |
| | | and library = #{library} |
| | | </if> |
| | | <if test="environment != null and environment != ''"> |
| | | and environment = #{environment} |
| | | </if> |
| | | <if test="doctorSatisfaction != null and doctorSatisfaction != ''"> |
| | | and doctor_satisfaction = #{doctorSatisfaction} |
| | | </if> |
| | | <if test="nurseSatisfaction != null and nurseSatisfaction != ''"> |
| | | and nurse_satisfaction = #{nurseSatisfaction} |
| | | </if> |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectPatSatisfactionById" parameterType="Long" |
| | | resultMap="PatSatisfactionResult"> |
| | | <include refid="selectPatSatisfactionVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertPatSatisfaction" parameterType="com.smartor.domain.PatSatisfaction"> |
| | | insert into pat_satisfaction |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id, |
| | | </if> |
| | | <if test="patName != null">pat_name, |
| | | </if> |
| | | <if test="patCode != null">pat_code, |
| | | </if> |
| | | <if test="phone != null">phone, |
| | | </if> |
| | | <if test="hospitaldistrictname != null">hospitaldistrictname, |
| | | </if> |
| | | <if test="hospitaldistrictcode != null">hospitaldistrictcode, |
| | | </if> |
| | | <if test="deptname != null">deptname, |
| | | </if> |
| | | <if test="deptcode != null">deptcode, |
| | | </if> |
| | | <if test="authenticity != null">authenticity, |
| | | </if> |
| | | <if test="weekFinish != null">week_finish, |
| | | </if> |
| | | <if test="standard != null">standard, |
| | | </if> |
| | | <if test="timeliness != null">timeliness, |
| | | </if> |
| | | <if test="library != null">library, |
| | | </if> |
| | | <if test="environment != null">environment, |
| | | </if> |
| | | <if test="doctorSatisfaction != null">doctor_satisfaction, |
| | | </if> |
| | | <if test="nurseSatisfaction != null">nurse_satisfaction, |
| | | </if> |
| | | <if test="updateTime != null">update_time, |
| | | </if> |
| | | <if test="createTime != null">create_time, |
| | | </if> |
| | | <if test="updateBy != null">update_by, |
| | | </if> |
| | | <if test="createBy != null">create_by, |
| | | </if> |
| | | <if test="delFlag != null">del_flag, |
| | | </if> |
| | | <if test="orgid != null">orgid, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id}, |
| | | </if> |
| | | <if test="patName != null">#{patName}, |
| | | </if> |
| | | <if test="patCode != null">#{patCode}, |
| | | </if> |
| | | <if test="phone != null">#{phone}, |
| | | </if> |
| | | <if test="hospitaldistrictname != null">#{hospitaldistrictname}, |
| | | </if> |
| | | <if test="hospitaldistrictcode != null">#{hospitaldistrictcode}, |
| | | </if> |
| | | <if test="deptname != null">#{deptname}, |
| | | </if> |
| | | <if test="deptcode != null">#{deptcode}, |
| | | </if> |
| | | <if test="authenticity != null">#{authenticity}, |
| | | </if> |
| | | <if test="weekFinish != null">#{weekFinish}, |
| | | </if> |
| | | <if test="standard != null">#{standard}, |
| | | </if> |
| | | <if test="timeliness != null">#{timeliness}, |
| | | </if> |
| | | <if test="library != null">#{library}, |
| | | </if> |
| | | <if test="environment != null">#{environment}, |
| | | </if> |
| | | <if test="doctorSatisfaction != null">#{doctorSatisfaction}, |
| | | </if> |
| | | <if test="nurseSatisfaction != null">#{nurseSatisfaction}, |
| | | </if> |
| | | <if test="updateTime != null">#{updateTime}, |
| | | </if> |
| | | <if test="createTime != null">#{createTime}, |
| | | </if> |
| | | <if test="updateBy != null">#{updateBy}, |
| | | </if> |
| | | <if test="createBy != null">#{createBy}, |
| | | </if> |
| | | <if test="delFlag != null">#{delFlag}, |
| | | </if> |
| | | <if test="orgid != null">#{orgid}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updatePatSatisfaction" parameterType="com.smartor.domain.PatSatisfaction"> |
| | | update pat_satisfaction |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="patName != null">pat_name = |
| | | #{patName}, |
| | | </if> |
| | | <if test="patCode != null">pat_code = |
| | | #{patCode}, |
| | | </if> |
| | | <if test="phone != null">phone = |
| | | #{phone}, |
| | | </if> |
| | | <if test="hospitaldistrictname != null">hospitaldistrictname = |
| | | #{hospitaldistrictname}, |
| | | </if> |
| | | <if test="hospitaldistrictcode != null">hospitaldistrictcode = |
| | | #{hospitaldistrictcode}, |
| | | </if> |
| | | <if test="deptname != null">deptname = |
| | | #{deptname}, |
| | | </if> |
| | | <if test="deptcode != null">deptcode = |
| | | #{deptcode}, |
| | | </if> |
| | | <if test="authenticity != null">authenticity = |
| | | #{authenticity}, |
| | | </if> |
| | | <if test="weekFinish != null">week_finish = |
| | | #{weekFinish}, |
| | | </if> |
| | | <if test="standard != null">standard = |
| | | #{standard}, |
| | | </if> |
| | | <if test="timeliness != null">timeliness = |
| | | #{timeliness}, |
| | | </if> |
| | | <if test="library != null">library = |
| | | #{library}, |
| | | </if> |
| | | <if test="environment != null">environment = |
| | | #{environment}, |
| | | </if> |
| | | <if test="doctorSatisfaction != null">doctor_satisfaction = |
| | | #{doctorSatisfaction}, |
| | | </if> |
| | | <if test="nurseSatisfaction != null">nurse_satisfaction = |
| | | #{nurseSatisfaction}, |
| | | </if> |
| | | <if test="updateTime != null">update_time = |
| | | #{updateTime}, |
| | | </if> |
| | | <if test="createTime != null">create_time = |
| | | #{createTime}, |
| | | </if> |
| | | <if test="updateBy != null">update_by = |
| | | #{updateBy}, |
| | | </if> |
| | | <if test="createBy != null">create_by = |
| | | #{createBy}, |
| | | </if> |
| | | <if test="delFlag != null">del_flag = |
| | | #{delFlag}, |
| | | </if> |
| | | <if test="orgid != null">orgid = |
| | | #{orgid}, |
| | | </if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <update id="deletePatSatisfactionById" parameterType="Long"> |
| | | update pat_satisfaction |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | del_flag =1 |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <update id="deletePatSatisfactionByIds" parameterType="String"> |
| | | update pat_satisfaction |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | del_flag =1 |
| | | </trim> |
| | | where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </update> |
| | | |
| | | |
| | | </mapper> |