| | |
| | | import com.ruoyi.common.utils.sms.smsUtils; |
| | | import com.smartor.common.MtSubmitSmUtil; |
| | | import com.smartor.common.ShiyiSmsUtil; |
| | | import com.smartor.domain.ServiceOutPath; |
| | | import com.smartor.domain.ShiyiSmsRequest; |
| | | import com.smartor.domain.ShiyiSmsResponse; |
| | | import com.smartor.domain.smsVO; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.mapper.UtilsMapper; |
| | | import com.smartor.service.IServiceOutPathService; |
| | | import com.smartor.service.IServiceSubtaskService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | |
| | | @Autowired |
| | | private IServiceOutPathService iServiceOutPathService; |
| | | @Autowired |
| | | private IServiceSubtaskService iServiceSubtaskService; |
| | | |
| | | @Value("${spring.profiles.active}") |
| | | private String active; |
| | |
| | | @PostMapping("/send") |
| | | public AjaxResult sendAsk(@RequestBody smsVO vo) throws UnsupportedEncodingException { |
| | | String content = ""; |
| | | if (StringUtils.isNotEmpty(vo.getSubId())) { |
| | | ServiceSubtask serviceSubtask = iServiceSubtaskService.selectServiceSubtaskById(Long.valueOf(vo.getSubId())); |
| | | if (serviceSubtask.getSendstate() == 4L) content = "该任å¡ä¸æ§è¡"; |
| | | return AjaxResult.error(content); |
| | | } |
| | | |
| | | if (StringUtils.isNotEmpty(vo.getTaskId()) && StringUtils.isNotEmpty(vo.getPatId()) && StringUtils.isNotEmpty(vo.getSubId())) { |
| | | RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample(); |
| | | String taskId = rsaPublicKeyExample.encryptedData(vo.getTaskId().toString(), pub_key); |
| | |
| | | */ |
| | | @ApiOperation("微信åé") |
| | | @PostMapping("/sendChat") |
| | | public AjaxResult sendChat(@RequestBody smsVO vo) throws UnsupportedEncodingException { |
| | | public AjaxResult sendChat(@RequestBody smsVO vo) { |
| | | String sendMsg = ""; |
| | | if (StringUtils.isNotEmpty(vo.getSubId())) { |
| | | ServiceSubtask serviceSubtask = iServiceSubtaskService.selectServiceSubtaskById(Long.valueOf(vo.getSubId())); |
| | | if (serviceSubtask.getSendstate() == 4L) sendMsg = "该任å¡ä¸æ§è¡"; |
| | | return AjaxResult.error(sendMsg); |
| | | } |
| | | if (StringUtils.isNotEmpty(vo.getTaskId()) && StringUtils.isNotEmpty(vo.getPatId()) && StringUtils.isNotEmpty(vo.getSubId())) { |
| | | RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample(); |
| | | String taskId = rsaPublicKeyExample.encryptedData(vo.getTaskId().toString(), pub_key); |
| | |
| | | serviceOutPath.setUrl(url); |
| | | iServiceOutPathService.insertServiceOutPath(serviceOutPath); |
| | | } |
| | | if (StringUtils.isNotEmpty(vo.getSubId())) { |
| | | ServiceSubtask serviceSubtask = iServiceSubtaskService.selectServiceSubtaskById(Long.valueOf(vo.getSubId())); |
| | | if (serviceSubtask.getSendstate() == 4L) content = "该任å¡ä¸æ§è¡"; |
| | | } |
| | | |
| | | return AjaxResult.success(content); |
| | | } |
| | | |
| | |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.system.service.ISysConfigService; |
| | | import com.smartor.domain.DTO.PatMedInhospDTO; |
| | | import com.smartor.domain.PatMedInhosp; |
| | | import com.smartor.domain.PatMedInhospVO; |
| | | import com.smartor.domain.PatMedReq; |
| | |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£è
ä½é¢è®°å½éè¿å
¥é¢ç³è¯·åä¿¡æ¯ |
| | | */ |
| | | @ApiOperation("æ¥è¯¢æ£è
ä½é¢è®°å½éè¿å
¥é¢ç³è¯·åä¿¡æ¯") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:patinhosp:list')") |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/selectPatMedInhospByApplication") |
| | | public TableDataInfo selectPatMedInhospByApplication(@RequestBody PatMedInhosp patMedInhosp) { |
| | | PageUtils.startPageByPost(patMedInhosp.getPageNum(), patMedInhosp.getPageSize()); |
| | | SysUser user = getLoginUser().getUser(); |
| | | patMedInhosp.setOrgid(user.getOrgid()); |
| | | List<PatMedInhospDTO> list = patMedInhospService.selectPatMedInhospByApplication(patMedInhosp); |
| | | long count = PageUtils.count(new ISelect() { |
| | | @Override |
| | | public void doSelect() { |
| | | patMedInhospService.selectPatMedInhospByApplication(patMedInhosp); |
| | | } |
| | | }); |
| | | return getDataTable2(count, list); |
| | | } |
| | | |
| | | /** |
| | | * åºé¢ãé¨è¯äººæ°åé访éç»è®¡ï¼å¨ï¼æï¼å¹´ï¼ |
| | | */ |
| | | @ApiOperation("åºé¢ãé¨è¯äººæ°åé访éç»è®¡ï¼å¨ï¼æï¼å¹´ï¼") |
| | |
| | | return AjaxResult.success(serviceSubtaskService.scanGenerateSubtask(serviceTask)); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/test") |
| | | public void test() { |
| | | ryTask.dealOutHospInfo(); |
| | | } |
| | | |
| | | @PostMapping("/syncMedInhospForShiyi") |
| | | public void syncMedInhospForShiyi(@RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime) { |
| | | collectHISService.syncMedInhosp(startTime, endTime); |
| | |
| | | public void syncMedOperForShiyi(@RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime) { |
| | | collectHISService.syncOper(startTime, endTime); |
| | | } |
| | | |
| | | @PostMapping("/qwenLLMTest") |
| | | public int qwenLLMTest(@RequestParam("voiceText") String questionText, @RequestParam("voiceText") String voiceText, @RequestParam("value") String value, @RequestParam("regexText") String regexText) { |
| | | int result = ryTask.qwenLLMTest(questionText, voiceText, value, regexText); |
| | | return result; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | IServiceSubtaskDetailTraceService serviceSubtaskDetailTraceService; |
| | | |
| | | @Autowired |
| | | IPatMedOuthospService patMedOuthospService; |
| | | |
| | | @Autowired |
| | | ISvyTaskTemplateService svyTaskTemplateService; |
| | | |
| | | @Autowired |
| | |
| | | private String active; |
| | | @Autowired |
| | | private SysConfigMapper sysConfigMapper; |
| | | |
| | | @Autowired |
| | | private IServiceTaskScheduleService serviceTaskScheduleService; |
| | | |
| | | public void ryMultipleParams(String s, Boolean b, Long l, Double d, Integer i) { |
| | | System.out.println(StringUtils.format("æ§è¡å¤åæ¹æ³ï¼ å符串类å{}ï¼å¸å°ç±»å{}ï¼é¿æ´å{}ï¼æµ®ç¹å{}ï¼æ´å½¢{}", s, b, l, d, i)); |
| | | } |
| | | |
| | | public void ryParams(String params) { |
| | | System.out.println("æ§è¡æåæ¹æ³ï¼" + params); |
| | | } |
| | | |
| | | public void ryNoParams() { |
| | | System.out.println("æ§è¡æ åæ¹æ³"); |
| | | } |
| | | |
| | | public void importData() { |
| | | String filePath = "C:\\Users\\86176\\Desktop\\æ°å»ºææ¬ææ¡£ 4.txt"; // æ¿æ¢ä¸ºä½ çæä»¶è·¯å¾ |
| | |
| | | } |
| | | |
| | | /** |
| | | * å¤çæ£è
ä¿¡æ¯ï¼è¿å
¥åä»»å¡è¡¨ |
| | | * å¤çæ£è
ä¿¡æ¯ï¼è¿å
¥åä»»å¡è¡¨(ä»»å¡ç») |
| | | */ |
| | | public void dealOutHospInfoByDimension() { |
| | | public void dealOutHospInfoBySchedule() { |
| | | String config = configService.selectConfigByKey("visit.early.day"); |
| | | if (port.equals("8095")) { |
| | | //åºé¢è¡¨ |
| | | iPatMedInhospService.dealOutHospInfoByDimension(config); |
| | | iPatMedInhospService.dealOutHospInfoBySchedule(config); |
| | | //é¨è¯è¡¨(æ°åçææ¶ä¸åé¨è¯é访) |
| | | if (!active.equals("xh")) { |
| | | //iPatMedOuthospService.dealOutpatientInfo(); |
| | | } |
| | | // if (!active.equals("xh")) { |
| | | // //iPatMedOuthospService.dealOutpatientInfo(); |
| | | // } |
| | | } |
| | | } |
| | | |
| | |
| | | int result = QwenLLMUtil.matchRegex(questionText, voiceText, value, regexText); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * ä»»å¡ç»ï¼appltype=5ï¼é¦è½®çº³å
¥ï¼æ«ææ°åºé¢æ£è
ï¼æ schedule ç»å®ç维度å¹é
ä»»å¡ç»ï¼ |
| | | * 为å½ä¸çæ£è
æè®¡åæç»ä¸æ¬¡æ§çæç¬¬ 0 è½® N æ¡ subtaskï¼å¹¶ç½® schedulecheck_flag=1ã |
| | | * åç»è½®æ¬¡ç± {@link #rollTaskGroupCycle()} è´è´£ã |
| | | * <p> |
| | | * ä¸ä¸»æ«æ dealOutHospInfo å离ï¼äºä¸å¹²æ°ãå»ºè®®æ¯ 30 åéæ§è¡ä¸æ¬¡ã |
| | | */ |
| | | public void dealTaskGroupOutHosp() { |
| | | log.info("ãdealTaskGroupOutHospãå¼å§æ«æä»»å¡ç»æ°åºé¢æ£è
"); |
| | | if (!port.equals("8095")) { |
| | | return; |
| | | } |
| | | try { |
| | | String config = configService.selectConfigByKey("visit.early.day"); |
| | | iPatMedInhospService.dealOutHospInfoBySchedule(config); |
| | | log.info("ãdealTaskGroupOutHospãä»»å¡ç»é¦è½®çº³å
¥æ«æå®æ"); |
| | | } catch (Exception e) { |
| | | log.error("ãdealTaskGroupOutHospãä»»å¡ç»æ«æå¼å¸¸", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * ä»»å¡ç»ï¼appltype=5ï¼å¾ªç¯ä»»å¡æ»å¨è°åº¦ã |
| | | * <p> |
| | | * æ«æææ schedule_style=1 ç计åï¼è¥æ¬è½® subtask å
¨é¨ finalizeï¼sendstate â 1/2/3ï¼ï¼ |
| | | * åå
éæ¬è½®æ£è
å°ä¸ä¸è½®ï¼æ¨è¿ current_loop_count ä¸ visit_timeã |
| | | * <p> |
| | | * 建议æ¯å°æ¶ææ¯åå°æ¶æ§è¡ä¸æ¬¡ï¼é¿å
轮次积åã |
| | | */ |
| | | public void rollTaskGroupCycle() { |
| | | log.info("ãrollTaskGroupCycleãå¼å§æ«æå¾ªç¯ä»»å¡ç»"); |
| | | try { |
| | | int rolled = serviceTaskScheduleService.rollCycleTasks(); |
| | | log.info("ãrollTaskGroupCycleãæ¬æ¬¡æ¨è¿ {} 个计å", rolled); |
| | | } catch (Exception e) { |
| | | log.error("ãrollTaskGroupCycleãæ»å¨è°åº¦å¼å¸¸", e); |
| | | } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.common; |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.mapper.ServiceSubtaskMapper; |
| | | import com.smartor.mapper.ServiceSubtaskPreachformMapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * ä»»å¡ç»ï¼appltype=5ï¼subtask çæå¨ |
| | | * <p> |
| | | * åä¸èè´£ï¼æ ¹æ® schedule + detailList 为æ¯ä¸ªæ£è
æ´¾ç subtaskã |
| | | * åæ¶æå¡ä¸¤æ¡è·¯å¾ï¼ |
| | | * (a) å端æå¨å¾éæ£è
ï¼insertOrUpdateTaskï¼ ââ æ§ 6 åå
¥å£ï¼ |
| | | * (b) HIS èªå¨çº³å
¥æ°åºé¢æ£è
ï¼PatMedInhospServiceImpl.writeInSubTaskï¼ ââ æ° 5 åå
¥å£ã |
| | | * 两æ¡è·¯å¾ç»ä¸ä» baseSubtask ä¸ååºåæ¥å段ï¼é¿å
çæå¨ä¸ PatTaskRelevance/ServiceTaskVO è¦åã |
| | | * |
| | | * @author smartor |
| | | * @date 2026-06-30 |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | | public class ScheduleSubtaskBuilder { |
| | | |
| | | @Autowired |
| | | private ServiceSubtaskMapper serviceSubtaskMapper; |
| | | |
| | | @Autowired |
| | | private ServiceSubtaskPreachformMapper serviceSubtaskPreachformMapper; |
| | | |
| | | /** |
| | | * 为å个æ£è
æ´¾ç subtaskï¼appltype=5ï¼ââ è§£è¦å
¥å£ï¼èªå¨çº³å
¥ & æå¨å¾éç»ä¸èµ°è¿éï¼ã |
| | | * <p> |
| | | * é循ç¯ï¼æ detailList 䏿¬¡æ§éºå¹³ N æ¡ï¼ |
| | | * å¾ªç¯ ï¼æ schedule.currentLoopCount çæå½åè½® N æ¡ï¼åç»è½®æ¬¡ç±è°åº¦å¨æ»å¨å»ºã |
| | | * |
| | | * @param serviceTask 主任å¡ï¼å·²è½åºï¼ |
| | | * @param schedule å·²è½åºç主计å |
| | | * @param detailList æç»åè¡¨ï¼æ seq ååºï¼ |
| | | * @param baseSubtask æ¨¡æ¿ subtaskï¼å·²å¡«å
æ£è
åºç¡ä¿¡æ¯ + åºåæ¥å段ï¼ï¼æ¹æ³å
伿·±æ·è´ |
| | | * @param preachformList åéæ¹å¼ï¼è°ç¨æ¹å·²è§£æå¥½ï¼å¯ä¸ºç©ºï¼ |
| | | */ |
| | | public void buildSubtasksForPatient(ServiceTask serviceTask, |
| | | ServiceTaskSchedule schedule, |
| | | List<ServiceTaskScheduleDetail> detailList, |
| | | ServiceSubtask baseSubtask, |
| | | List<Map<String, Object>> preachformList) { |
| | | if (CollectionUtils.isEmpty(detailList)) { |
| | | throw new BaseException("ä»»å¡ç»æç»ä¸ºç©ºï¼æ æ³çæ subtask, taskid=" + serviceTask.getTaskid()); |
| | | } |
| | | |
| | | Date benchmark = resolveBenchmark(schedule, baseSubtask); |
| | | long currentLoop = schedule.getCurrentLoopCount() == null ? 0L : schedule.getCurrentLoopCount(); |
| | | |
| | | for (ServiceTaskScheduleDetail detail : detailList) { |
| | | ServiceSubtask subtask = copyFromBase(baseSubtask); |
| | | |
| | | // åæº¯å段 |
| | | subtask.setScheduleId(schedule.getId()); |
| | | subtask.setScheduleDetailId(detail.getId()); |
| | | subtask.setScheduleSeq(detail.getSeq()); |
| | | subtask.setLoopCount(currentLoop); |
| | | |
| | | // 模æ¿ï¼detail ä¼å
äº task |
| | | if (detail.getTemplateid() != null) { |
| | | subtask.setTemplateid(detail.getTemplateid()); |
| | | subtask.setTemplatename(detail.getTemplatename()); |
| | | } |
| | | if (detail.getLibtemplateid() != null) { |
| | | subtask.setLibtemplateid(detail.getLibtemplateid()); |
| | | } |
| | | |
| | | // æ¶é´ï¼åºåæ¥ + dayOffset |
| | | Date visitTime = addDays(benchmark, detail.getDayOffset()); |
| | | subtask.setVisitTime(visitTime); |
| | | subtask.setSenddate(visitTime); |
| | | subtask.setLongSendTime(visitTime); |
| | | |
| | | // ç¶æï¼ä¸åæµç¨ä¸è´ï¼æ°å»ºå置为å¾
åé |
| | | subtask.setSendstate(2L); |
| | | subtask.setCreateTime(DateUtils.getNowDate()); |
| | | subtask.setUpdateTime(DateUtils.getNowDate()); |
| | | |
| | | serviceSubtaskMapper.insertServiceSubtask(subtask); |
| | | |
| | | insertPreachform(serviceTask, preachformList, subtask); |
| | | |
| | | log.info("[ä»»å¡ç»] taskid={} patid={} çæ subtask id={} seq={} dayOffset={} visitTime={}", |
| | | serviceTask.getTaskid(), baseSubtask.getPatid(), |
| | | subtask.getId(), detail.getSeq(), detail.getDayOffset(), visitTime); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * å
¼å®¹å
¥å£ï¼å端æå¨å¾éæ£è
ï¼insertOrUpdateTaskï¼ã |
| | | * æ patTaskRelevance çåºåæ¥å段åå¡«å° baseSubtask åï¼å§æç»è§£è¦å
¥å£ã |
| | | */ |
| | | public void buildSubtasksForPatient(ServiceTask serviceTask, |
| | | List<Map<String, Object>> preachformList, |
| | | ServiceTaskSchedule schedule, |
| | | List<ServiceTaskScheduleDetail> scheduleDetailList, |
| | | PatTaskRelevance patTaskRelevance, |
| | | ServiceSubtask baseSubtask) { |
| | | // åå¡«åºåæ¥åæ®µï¼æå¨è·¯å¾ç baseSubtask ç± VO æ¼è£
ï¼åºåæ¥å段å¯è½æªå¡«å
¨ï¼ |
| | | if (baseSubtask.getStarttime() == null) { |
| | | baseSubtask.setStarttime(patTaskRelevance.getInhosptime() != null |
| | | ? patTaskRelevance.getInhosptime() : patTaskRelevance.getStarttime()); |
| | | } |
| | | if (baseSubtask.getEndtime() == null) { |
| | | baseSubtask.setEndtime(patTaskRelevance.getEndtime()); |
| | | } |
| | | if (baseSubtask.getAdmindate() == null) { |
| | | baseSubtask.setAdmindate(patTaskRelevance.getVisittime()); |
| | | } |
| | | buildSubtasksForPatient(serviceTask, schedule, scheduleDetailList, baseSubtask, preachformList); |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ® scheduleBenchmark è§£æåºåæ¶é´ï¼ |
| | | * 0-èªå®ä¹æ¶é´ 1-å
¥é¢æ¶é´ 2-åºé¢æ¶é´ 3-å°±è¯æ¶é´ 4-å
¥ç»æ¶é´ |
| | | * å
¨é¨ä» baseSubtask åï¼åä¸å°å
åºå½åæ¶é´ã |
| | | */ |
| | | private Date resolveBenchmark(ServiceTaskSchedule schedule, ServiceSubtask base) { |
| | | Integer benchmark = schedule.getScheduleBenchmark() == null ? 0 : schedule.getScheduleBenchmark(); |
| | | Date now = DateUtils.getNowDate(); |
| | | switch (benchmark) { |
| | | case 1: |
| | | return base.getStarttime() != null ? base.getStarttime() : now; |
| | | case 2: |
| | | return base.getEndtime() != null ? base.getEndtime() : now; |
| | | case 3: |
| | | return base.getAdmindate() != null ? base.getAdmindate() : now; |
| | | case 4: |
| | | return base.getCreateTime() != null ? base.getCreateTime() : now; |
| | | case 0: |
| | | default: |
| | | return schedule.getScheduleBenchmarkCustomTime() != null |
| | | ? schedule.getScheduleBenchmarkCustomTime() : now; |
| | | } |
| | | } |
| | | |
| | | private Date addDays(Date base, int dayOffset) { |
| | | Calendar c = Calendar.getInstance(); |
| | | c.setTime(base); |
| | | c.add(Calendar.DAY_OF_MONTH, dayOffset); |
| | | return c.getTime(); |
| | | } |
| | | |
| | | /** |
| | | * å service_subtask_preachformï¼åéæ¹å¼ç±è°ç¨æ¹å¤å¥½ã |
| | | */ |
| | | private void insertPreachform(ServiceTask serviceTask, List<Map<String, Object>> pfList, ServiceSubtask subtask) { |
| | | if (CollectionUtils.isEmpty(pfList)) { |
| | | return; |
| | | } |
| | | for (Map<String, Object> map : pfList) { |
| | | ServiceSubtaskPreachform pf = new ServiceSubtaskPreachform(); |
| | | pf.setSort(ObjectUtils.isEmpty(map.get("sort")) ? 0 : Long.valueOf(map.get("sort").toString())); |
| | | pf.setPreachform(ObjectUtils.isEmpty(map.get("preachform")) ? "" : map.get("preachform").toString()); |
| | | pf.setCompensateTime(ObjectUtils.isEmpty(map.get("compensateTime")) ? "" : map.get("compensateTime").toString()); |
| | | pf.setTaskid(serviceTask.getTaskid()); |
| | | pf.setSubid(subtask.getId()); |
| | | pf.setSendstate("1"); |
| | | pf.setOrgid(serviceTask.getOrgid()); |
| | | pf.setCreateTime(new Date()); |
| | | serviceSubtaskPreachformMapper.insertServiceSubtaskPreachform(pf); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æ·±æ·è´ baseSubtask å°ä¸ä¸ªæ°å¯¹è±¡ï¼æ¯æ¬¡ insert å id ä¼ååï¼å¿
é¡»ç¬ç«å®ä¾ï¼ã |
| | | * ç¨ fastjson åæ·±æ·è´ï¼çä¸å setã |
| | | */ |
| | | private ServiceSubtask copyFromBase(ServiceSubtask base) { |
| | | String json = JSON.toJSONString(base); |
| | | ServiceSubtask copy = JSON.parseObject(json, ServiceSubtask.class); |
| | | // 主é®ãid å¿
é¡»æ¸
æï¼å¦å useGeneratedKeys ä»ä¼ç¨ä¸è½®ç id 触å主é®å²çª |
| | | copy.setId(null); |
| | | return copy; |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.common.enums; |
| | | |
| | | /** |
| | | * å
¥é¢ç³è¯·ç´§æ¥ç¨åº¦æä¸¾ |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public enum EmergencyLevelEnum { |
| | | |
| | | /** |
| | | * ç®æ |
| | | */ |
| | | TARGET("FH0164.01", "ç®æ "), |
| | | |
| | | /** |
| | | * æ¥å±é |
| | | */ |
| | | CRITICAL("FH0164.02", "æ¥å±é"), |
| | | |
| | | /** |
| | | * æ©æ |
| | | */ |
| | | ELECTIVE("FH0164.03", "æ©æ"), |
| | | |
| | | /** |
| | | * åºç¡ |
| | | */ |
| | | BASIC("FH0164.04", "åºç¡"); |
| | | |
| | | private String code; |
| | | private String desc; |
| | | |
| | | EmergencyLevelEnum(String code, String desc) { |
| | | this.code = code; |
| | | this.desc = desc; |
| | | } |
| | | |
| | | public static String getDescByCode(String code) { |
| | | if (code == null || code.isEmpty()) { |
| | | return null; |
| | | } |
| | | for (EmergencyLevelEnum item : values()) { |
| | | if (item.getCode().equals(code)) { |
| | | return item.getDesc(); |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public static String getCodeByDesc(String desc) { |
| | | if (desc == null || desc.isEmpty()) { |
| | | return null; |
| | | } |
| | | for (EmergencyLevelEnum item : values()) { |
| | | if (item.getDesc().equals(desc)) { |
| | | return item.getCode(); |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setCode(String code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | public String getDesc() { |
| | | return desc; |
| | | } |
| | | |
| | | public void setDesc(String desc) { |
| | | this.desc = desc; |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.common.enums; |
| | | |
| | | /** |
| | | * å
¥é¢ç³è¯·éè¦æ§æ è®°æä¸¾ |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public enum ImportFlagEnum { |
| | | |
| | | /** |
| | | * ç¹çº¦äººå |
| | | */ |
| | | SPECIAL_PERSONNEL("FH0165.98", "ç¹çº¦äººå"), |
| | | |
| | | /** |
| | | * 离ä¼äººå |
| | | */ |
| | | RETIRED_CADRE("FH0165.99", "离ä¼äººå"), |
| | | |
| | | /** |
| | | * æ |
| | | */ |
| | | NONE("FH0165.03", "æ "), |
| | | |
| | | /** |
| | | * æ¥é´è¯ç |
| | | */ |
| | | DAY_TREATMENT("FH0165.02", "æ¥é´è¯ç"), |
| | | |
| | | /** |
| | | * æ¥é´ææ¯ |
| | | */ |
| | | DAY_SURGERY("FH0165.01", "æ¥é´ææ¯"); |
| | | |
| | | private String code; |
| | | private String desc; |
| | | |
| | | ImportFlagEnum(String code, String desc) { |
| | | this.code = code; |
| | | this.desc = desc; |
| | | } |
| | | |
| | | public static String getDescByCode(String code) { |
| | | if (code == null || code.isEmpty()) { |
| | | return null; |
| | | } |
| | | for (ImportFlagEnum item : values()) { |
| | | if (item.getCode().equals(code)) { |
| | | return item.getDesc(); |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public static String getCodeByDesc(String desc) { |
| | | if (desc == null || desc.isEmpty()) { |
| | | return null; |
| | | } |
| | | for (ImportFlagEnum item : values()) { |
| | | if (item.getDesc().equals(desc)) { |
| | | return item.getCode(); |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setCode(String code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | public String getDesc() { |
| | | return desc; |
| | | } |
| | | |
| | | public void setDesc(String desc) { |
| | | this.desc = desc; |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.domain; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * åå·²æä»»å¡è¿½å æ£è
ç请æ±ä½ï¼ç¨äºæå
è§£å³413é®é¢ï¼ |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "AppendPatientsReq", description = "åå·²æä»»å¡è¿½å æ£è
") |
| | | public class AppendPatientsReq { |
| | | |
| | | @ApiModelProperty(value = "ä»»å¡IDï¼insertOrUpdateTask ç¬¬ä¸æ¬¡è°ç¨åè¿åç taskIdï¼", required = true) |
| | | private Long taskId; |
| | | |
| | | @ApiModelProperty(value = "æ¬æ¹æ¬¡æ£è
å表") |
| | | private List<PatTaskRelevance> patTaskRelevances; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.domain.DTO; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | 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; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æ£è
ä½é¢è®°å½å¯¹è±¡è¿å pat_med_inhosp |
| | | * |
| | | * @author smartor |
| | | * @date 2023-03-04 |
| | | */ |
| | | @ApiModel(value = "PatMedInhospDTO", description = "æ£è
ä½é¢è®°å½å¯¹è±¡è¿å") |
| | | @Data |
| | | public class PatMedInhospDTO extends BaseEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * èªå¢ID |
| | | */ |
| | | @ApiModelProperty(value = "èªå¢ID") |
| | | private Long inhospid; |
| | | |
| | | /** |
| | | * æ§å« |
| | | */ |
| | | @ApiModelProperty(value = "æ§å« 1ç· 2女") |
| | | private Long sex; |
| | | |
| | | /** |
| | | * ä½é¢å· |
| | | */ |
| | | @ApiModelProperty(value = "ä½é¢å·") |
| | | private String inhospno; |
| | | |
| | | /** |
| | | * æµæ°´å· |
| | | */ |
| | | @ApiModelProperty(value = "æµæ°´å·") |
| | | private String serialnum; |
| | | |
| | | /** |
| | | * æ¤å£«ID |
| | | */ |
| | | @ApiModelProperty(value = "æ¤å£«ID") |
| | | private String nurseId; |
| | | |
| | | /** |
| | | * æ¤å£«å§å |
| | | */ |
| | | @ApiModelProperty(value = "æ¤å£«å§å") |
| | | private String nurseName; |
| | | |
| | | /** |
| | | * å»é¢åç§° |
| | | */ |
| | | @ApiModelProperty(value = "å»é¢åç§°") |
| | | @Excel(name = " å»é¢åç§° ") |
| | | private String hospitalname; |
| | | |
| | | /** |
| | | * å»é¢ç¼å· |
| | | */ |
| | | @ApiModelProperty(value = "å»é¢ç¼å·") |
| | | private String hospitalcode; |
| | | |
| | | /** |
| | | * é¢åºç¼å· |
| | | */ |
| | | @ApiModelProperty(value = "é¢åºç¼å·") |
| | | private String hospitaldistrictcode; |
| | | |
| | | /** |
| | | * é¢åºç¼å·éå |
| | | */ |
| | | @ApiModelProperty(value = "é¢åºç¼å·éå") |
| | | private List<String> hospitaldistrictcodeList; |
| | | |
| | | /** |
| | | * é¢åºåç§° |
| | | */ |
| | | @ApiModelProperty(value = "é¢åºåç§°") |
| | | @Excel(name = " é¢åºåç§° ") |
| | | private String hospitaldistrictname; |
| | | |
| | | /** |
| | | * å
¥é¢è¯æICDå¼ |
| | | */ |
| | | @ApiModelProperty(value = "å
¥é¢è¯æICDå¼") |
| | | private String icd10code; |
| | | |
| | | /** |
| | | * å
¥é¢è¯æåç§° |
| | | */ |
| | | @ApiModelProperty(value = "å
¥é¢è¯æåç§°") |
| | | private String diagname; |
| | | |
| | | /** |
| | | * å
¥é¢æ¶é´ |
| | | */ |
| | | @ApiModelProperty(value = "å
¥é¢æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = " å
¥é¢æ¶é´ ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private Date starttime; |
| | | |
| | | /** |
| | | * åºé¢æ¶é´ |
| | | */ |
| | | @ApiModelProperty(value = "åºé¢æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = " åºé¢æ¶é´ ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private Date endtime; |
| | | |
| | | /** |
| | | * å
¥é¢ç§å®¤ä»£ç |
| | | */ |
| | | @ApiModelProperty(value = "å
¥é¢ç§å®¤ä»£ç ") |
| | | private String deptcode; |
| | | /** |
| | | * å
¥é¢ç§å®¤ä»£ç |
| | | */ |
| | | @ApiModelProperty(value = "å
¥é¢ç§å®¤ä»£ç éå") |
| | | private List<String> deptcodeList; |
| | | |
| | | /** |
| | | * å
¥é¢ç§å®¤åç§° |
| | | */ |
| | | @ApiModelProperty(value = "å
¥é¢ç§å®¤åç§°") |
| | | private String deptname; |
| | | |
| | | /** |
| | | * æ¿é´å· |
| | | */ |
| | | @ApiModelProperty(value = "æ¿é´å·") |
| | | private String roomno; |
| | | |
| | | /** |
| | | * åºä½å· |
| | | */ |
| | | @ApiModelProperty(value = "åºä½å·") |
| | | @Excel(name = " åºä½å· ") |
| | | private String bedNo; |
| | | |
| | | /** |
| | | * æºæID |
| | | */ |
| | | @ApiModelProperty(value = "æºæID") |
| | | @Excel(name = " æºæID ") |
| | | private String orgid; |
| | | |
| | | /** |
| | | * å 餿 è®° |
| | | */ |
| | | @ApiModelProperty(value = "å 餿 è®°") |
| | | private String delFlag; |
| | | |
| | | /** |
| | | * ä¸ä¼ æ è®° |
| | | */ |
| | | @ApiModelProperty(value = "ä¸ä¼ æ è®°") |
| | | private Long isupload; |
| | | |
| | | /** |
| | | * ä¸ä¼ æ¶é´ |
| | | */ |
| | | @ApiModelProperty(value = "ä¸ä¼ æ¶é´") |
| | | private Date uploadTime; |
| | | |
| | | /** |
| | | * æ¡£æ¡ID |
| | | */ |
| | | @ApiModelProperty(value = "æ¡£æ¡ID") |
| | | private Long patid; |
| | | |
| | | /** |
| | | * åºé¢è¯æ |
| | | */ |
| | | @ApiModelProperty(value = "åºé¢è¯æ") |
| | | @Excel(name = " åºé¢è¯æ ") |
| | | private String leavediagname; |
| | | |
| | | /** |
| | | * åºé¢è¯æICDå¼ |
| | | */ |
| | | @ApiModelProperty(value = "åºé¢è¯æICDå¼") |
| | | private String leaveicd10code; |
| | | |
| | | /** |
| | | * å»çå·¥å· |
| | | */ |
| | | @ApiModelProperty(value = "å»çå·¥å·") |
| | | private String drcode; |
| | | |
| | | /** |
| | | * å»çåç§° |
| | | */ |
| | | @ApiModelProperty(value = "å»çåç§°") |
| | | @Excel(name = " å»çåç§° ") |
| | | private String drname; |
| | | |
| | | /** |
| | | * æ¯å¦çææ¹æ¡ç¶æ;0é¢å
¥é¢ 1çæå
¥é¢ 2çæåºé¢ 9æ å¹é
æ¹æ¡ 3çæå
¥é¢æ¤é 4çæåºé¢æ¤é |
| | | */ |
| | | @ApiModelProperty(value = "æ¯å¦çææ¹æ¡ç¶æ;0é¢å
¥é¢ 1çæå
¥é¢ 2çæåºé¢ 9æ å¹é
æ¹æ¡ 3çæå
¥é¢æ¤é 4çæåºé¢æ¤é") |
| | | private Long schemestatus; |
| | | |
| | | /** |
| | | * æ¯å¦çæéç¨æ¹æ¡ç¶æ;0æªçæ 1çæ 9æ å¹é
æ¹æ¡ |
| | | */ |
| | | @ApiModelProperty(value = "æ¯å¦çæéç¨æ¹æ¡ç¶æ;0æªçæ 1çæ 9æ å¹é
æ¹æ¡") |
| | | private Long generalschemestatus; |
| | | |
| | | /** |
| | | * åºé¢ç§å®¤ä»£ç |
| | | */ |
| | | @ApiModelProperty(value = "åºé¢ç§å®¤ä»£ç ") |
| | | private String leaveldeptcode; |
| | | |
| | | /** |
| | | * åºé¢ç§å®¤åç§° |
| | | */ |
| | | @ApiModelProperty(value = "åºé¢ç§å®¤åç§°") |
| | | @Excel(name = " åºé¢ç§å®¤åç§° ") |
| | | private String leaveldeptname; |
| | | |
| | | /** |
| | | * ç
åºID |
| | | */ |
| | | @ApiModelProperty(value = "ç
åºID") |
| | | private String hospitaldistrictid; |
| | | |
| | | /** |
| | | * åºé¢ç
åºç¼å· |
| | | */ |
| | | @ApiModelProperty(value = "åºé¢ç
åºç¼å·") |
| | | private String leavehospitaldistrictcode; |
| | | |
| | | /** |
| | | * åºé¢ç
åºåç§° |
| | | */ |
| | | @ApiModelProperty(value = "åºé¢ç
åºåç§°") |
| | | @Excel(name = " åºé¢ç
åºåç§° ") |
| | | private String leavehospitaldistrictname; |
| | | |
| | | /** |
| | | * åºé¢ç
åºID |
| | | */ |
| | | @ApiModelProperty(value = "åºé¢ç
åºID") |
| | | private String leavehospitaldistrictid; |
| | | |
| | | /** |
| | | * å
¥é¢ç§å®¤ID |
| | | */ |
| | | @ApiModelProperty(value = "å
¥é¢ç§å®¤ID") |
| | | private String deptid; |
| | | |
| | | /** |
| | | * åºé¢ç§å®¤ID |
| | | */ |
| | | @ApiModelProperty(value = "åºé¢ç§å®¤ID") |
| | | private String leaveldeptid; |
| | | |
| | | /** |
| | | * æ¹æ¡ç¶ææä½æ¶é´ |
| | | */ |
| | | @ApiModelProperty(value = "æ¹æ¡ç¶ææä½æ¶é´") |
| | | private Date schemetime; |
| | | |
| | | /** |
| | | * æ£è
å§å |
| | | */ |
| | | @ApiModelProperty(value = "æ£è
å§å") |
| | | private String patname; |
| | | |
| | | /** |
| | | * æ£è
ç¼å· |
| | | */ |
| | | @ApiModelProperty(value = "æ£è
ç¼å·") |
| | | private String patno; |
| | | |
| | | /** |
| | | * ä½é¢æ è¯ï¼ 0ï¼å¨é¢ 1ï¼åºé¢ 2ï¼è½¬ç§ |
| | | */ |
| | | @ApiModelProperty(value = "ä½é¢æ è¯ï¼ 0ï¼å¨é¢ 1ï¼åºé¢ 2ï¼è½¬ç§ 3å¾
å
¥é¢") |
| | | private String inhospstate; |
| | | |
| | | /** |
| | | * ç§å®¤é¿æä»»å¡ï¼æ¯å¦å¤çï¼0æªå¤ç 1å¤ç |
| | | */ |
| | | @ApiModelProperty(value = "é¿æä»»å¡ï¼æ¯å¦å¤çï¼0æªå¤ç 1å¤çæå 2å¤ç失败 ") |
| | | private String deptcheckFlag; |
| | | /** |
| | | * ç
åºé¿æä»»å¡ï¼æ¯å¦å¤çï¼0æªå¤ç 1å¤ç |
| | | */ |
| | | @ApiModelProperty(value = "ç
åºé¿æä»»å¡ï¼æ¯å¦å¤çï¼0æªå¤ç 1å¤çæå 2å¤ç失败 ") |
| | | private String wardcheckFlag; |
| | | /** |
| | | * ç¾ç
é¿æä»»å¡ï¼æ¯å¦å¤çï¼0æªå¤ç 1å¤ç |
| | | */ |
| | | @ApiModelProperty(value = "ç¾ç
é¿æä»»å¡ï¼æ¯å¦å¤çï¼0æªå¤ç 1å¤çæå 2å¤ç失败 ") |
| | | private String diagcheckFlag; |
| | | |
| | | /** |
| | | * å
¥é¢ç§å®¤é¿æä»»å¡ï¼æ¯å¦å¤çï¼0æªå¤ç 1å¤ç |
| | | */ |
| | | @ApiModelProperty(value = "å
¥é¢ç§å®¤é¿æä»»å¡ï¼æ¯å¦å¤çï¼0æªå¤ç 1å¤çæå 2å¤ç失败 ") |
| | | private String inDeptcheckFlag; |
| | | |
| | | /** |
| | | * å
¥é¢ç
åºé¿æä»»å¡ï¼æ¯å¦å¤çï¼0æªå¤ç 1å¤ç |
| | | */ |
| | | @ApiModelProperty(value = "å
¥é¢ç
åºé¿æä»»å¡ï¼æ¯å¦å¤çï¼0æªå¤ç 1å¤çæå 2å¤ç失败 ") |
| | | private String inWardcheckFlag; |
| | | |
| | | /** |
| | | * å¹´é¾ |
| | | */ |
| | | @ApiModelProperty(value = "å¹´é¾") |
| | | private String age; |
| | | |
| | | /** |
| | | * ææºå· |
| | | */ |
| | | @ApiModelProperty(value = "ææºå·") |
| | | private String telcode; |
| | | |
| | | /** |
| | | * é¿æä»»å¡åå |
| | | */ |
| | | @ApiModelProperty(value = "é¿æä»»å¡åå ") |
| | | private String longTaskReason; |
| | | |
| | | |
| | | /** |
| | | * pageNum |
| | | */ |
| | | @ApiModelProperty("pageNum") |
| | | private Integer pageNum; |
| | | |
| | | /** |
| | | * pageSize |
| | | */ |
| | | @ApiModelProperty("pageSize") |
| | | private Integer pageSize; |
| | | |
| | | /** |
| | | * pageNum |
| | | */ |
| | | @ApiModelProperty("pn") |
| | | private Integer pn; |
| | | |
| | | /** |
| | | * pageSize |
| | | */ |
| | | @ApiModelProperty("ps") |
| | | private Integer ps; |
| | | /** |
| | | * åºé¢æ¹å¼åºå· |
| | | */ |
| | | @ApiModelProperty("åºé¢æ¹å¼åºå·") |
| | | @Excel(name = "åºé¢æ¹å¼åºå·") |
| | | private String outWayId; |
| | | |
| | | /** |
| | | * åºé¢æ¹å¼åç§° |
| | | */ |
| | | @ApiModelProperty("åºé¢æ¹å¼åç§°") |
| | | @Excel(name = "åºé¢æ¹å¼åç§°") |
| | | private String outWayName; |
| | | /** |
| | | * åºå
¥é¢æ è¯ |
| | | */ |
| | | @ApiModelProperty("åºå
¥é¢æ è¯ï¼0å
¥é¢ 1åºé¢ 2 è½¬ç§ 3 é¢å
¥é¢") |
| | | private Integer cry; |
| | | |
| | | /** |
| | | * åºé¢ç
åºç¼å· |
| | | */ |
| | | @ApiModelProperty(value = "åºé¢ç
åºç¼å·éå") |
| | | private List<String> leavehospitaldistrictcodes; |
| | | |
| | | /** |
| | | * åºé¢ç§å®¤ä»£ç éå |
| | | */ |
| | | @ApiModelProperty(value = "åºé¢ç§å®¤ä»£ç éå") |
| | | private List<String> leaveldeptcodes; |
| | | |
| | | /** |
| | | * å¼å§åºé¢æ¥æ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = " ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | @ApiModelProperty(value = "å¼å§åºé¢æ¥æ") |
| | | private Date startOutHospTime; |
| | | |
| | | /** |
| | | * ç»æåºé¢æ¥æ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = " ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | @ApiModelProperty(value = "ç»æåºé¢æ¥æ") |
| | | private Date endOutHospTime; |
| | | |
| | | /** |
| | | * å¼å§å
¥é¢æ¥æ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = " ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | @ApiModelProperty(value = "å¼å§å
¥é¢æ¥æ") |
| | | private Date startInHospTime; |
| | | |
| | | /** |
| | | * ç»æå
¥é¢æ¥æ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = " ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | @ApiModelProperty(value = "ç»æå
¥é¢æ¥æ") |
| | | private Date endInHospTime; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å¤é¨å¯¼å
¥ï¼0䏿¯ 1æ¯") |
| | | private Integer outImport = 0; |
| | | |
| | | |
| | | @ApiModelProperty(value = "æ¥è¯¢ç±»åï¼1å
¨é¨ 2åºé¢ 3å
¥é¢ 4é¨è¯ 5å¤é¨æ£è
") |
| | | private Integer queryType = 1; |
| | | |
| | | @ApiModelProperty(value = "æºæID") |
| | | private String guid; |
| | | |
| | | @ApiModelProperty(value = "æä½äºº") |
| | | private String operator; |
| | | |
| | | @ApiModelProperty(value = "æä½äººID") |
| | | private String operatorId; |
| | | |
| | | @ApiModelProperty(value = "æ ç¾å") |
| | | private String tagname; |
| | | |
| | | @ApiModelProperty(value = "é访æ è¯ï¼0ä¸éè¦ï¼1è¦") |
| | | private String fuflag; |
| | | |
| | | @ApiModelProperty(value = "éè®¿æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date fudate; |
| | | |
| | | @ApiModelProperty(value = "éè®¿å¨æå»ºè®®") |
| | | private String fuperiod; |
| | | |
| | | @ApiModelProperty(value = "é访类åç¼ç ") |
| | | private String futypecode; |
| | | |
| | | @ApiModelProperty(value = "é访类ååç§°") |
| | | private String futypedesc; |
| | | |
| | | @ApiModelProperty(value = "é访å¤è¯æå¯¼") |
| | | private String fuadvice; |
| | | |
| | | @ApiModelProperty(value = "ä¸ç
é访建议") |
| | | private String fuspecialadvice; |
| | | |
| | | /** |
| | | * è¯ä»¶å·ç |
| | | */ |
| | | @ApiModelProperty("è¯ä»¶å·ç ") |
| | | @Excel(name = " è¯ä»¶å·ç ") |
| | | private String idcardno; |
| | | |
| | | /** |
| | | * ç»ç®¡å»ç |
| | | */ |
| | | @ApiModelProperty("ç»ç®¡å»ç") |
| | | @Excel(name = " ç»ç®¡å»ç ") |
| | | private String managementDoctor; |
| | | |
| | | /** |
| | | * ç»ç®¡å»ç |
| | | */ |
| | | @ApiModelProperty("ç»ç®¡å»ç") |
| | | @Excel(name = " ç»ç®¡å»ç ") |
| | | private String managementDoctorCode; |
| | | |
| | | @ApiModelProperty(value = "æåå¼å§æ¶é´") |
| | | private String lastStartTime; |
| | | |
| | | @ApiModelProperty(value = "æåç»ææ¶é´") |
| | | private String lastEndTime; |
| | | |
| | | /** |
| | | * æºæID |
| | | */ |
| | | @ApiModelProperty("é¢åº") |
| | | @Excel(name = " é¢åº ") |
| | | private String campusid; |
| | | |
| | | /** |
| | | * å°±è¯æ¥æºID |
| | | */ |
| | | @ApiModelProperty("å°±è¯æ¥æºID") |
| | | @Excel(name = " å°±è¯æ¥æºID ") |
| | | private String encounterSourceId; |
| | | |
| | | /** |
| | | * éè¦æ§æ è®°ç¼ç |
| | | * æä¸¾ç±»åï¼ImportFlagEnum |
| | | * FH0165.98 - ç¹çº¦äººå |
| | | * FH0165.99 - 离ä¼äººå |
| | | * FH0165.03 - æ |
| | | * FH0165.02 - æ¥é´è¯ç |
| | | * FH0165.01 - æ¥é´ææ¯ |
| | | */ |
| | | @ApiModelProperty(value = "éè¦æ§æ è®°ç¼ç ", example = "FH0165.01") |
| | | @Excel(name = " éè¦æ§æ è®°ç¼ç ") |
| | | private String importanceFlagCode; |
| | | |
| | | /** |
| | | * ç´§æ¥ç¨åº¦ç¼ç |
| | | * æä¸¾ç±»åï¼EmergencyLevelEnum |
| | | * FH0164.01 - ç®æ |
| | | * FH0164.02 - æ¥å±é |
| | | * FH0164.03 - æ©æ |
| | | * FH0164.04 - åºç¡ |
| | | */ |
| | | @ApiModelProperty(value = "ç´§æ¥ç¨åº¦ç¼ç ", example = "FH0164.01") |
| | | @Excel(name = " ç´§æ¥ç¨åº¦ç¼ç ") |
| | | private String emergencyLevelCode; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å®£æè¿") |
| | | @Excel(name = " æ¯å¦å®£æå®æ:0 æªå®£æ 1 已宣æ ") |
| | | private String finishFlag = "0"; |
| | | |
| | | /** |
| | | * '满æåº¦æ è¯ï¼0æªå满度 1ä½é¢æ»¡åº¦åº¦ 2åºé¢æ»¡æåº¦ ï¼å¦ææ¢è¦åä½é¢ï¼åè¦ååºé¢ï¼åç¨â,âåå²ï¼ä¾å¦1,2ï¼ |
| | | */ |
| | | @ApiModelProperty("'满æåº¦æ è¯ï¼0æªå满度 1ä½é¢æ»¡åº¦åº¦ 2åºé¢æ»¡æåº¦ ï¼å¦ææ¢è¦åä½é¢ï¼åè¦ååºé¢ï¼åç¨â,âåå²ï¼ä¾å¦1,2ï¼") |
| | | @Excel(name = " '满æåº¦æ è¯ï¼0æªå满度 1ä½é¢æ»¡åº¦åº¦ 2åºé¢æ»¡æåº¦ ï¼å¦ææ¢è¦åä½é¢ï¼åè¦ååºé¢ï¼åç¨â,âåå²ï¼ä¾å¦1,2ï¼ ") |
| | | private String inhospMydFlag; |
| | | } |
| | |
| | | private String icd10code; |
| | | |
| | | /** |
| | | * å
¥é¢è¯æICDå¼ç¼å·éå |
| | | */ |
| | | @ApiModelProperty(value = "å
¥é¢è¯æICDå¼ç¼å·éå") |
| | | private List<String> icd10codeList; |
| | | /** |
| | | * å
¥é¢è¯æåç§° |
| | | */ |
| | | @ApiModelProperty(value = "å
¥é¢è¯æåç§°") |
| | |
| | | private String diagcheckFlag; |
| | | |
| | | /** |
| | | * ä»»å¡ç»ï¼appltype=5ï¼é¦è½®çº³å
¥æ è®°ï¼0æªå¤ç 1å·²çæé¦è½® 2æ å¹é
/失败 |
| | | * ç¬ç«äº dept/ward/diag check_flagï¼ä¸ä¾ä»»å¡ç»ç¬ç«æ«æä½¿ç¨ï¼åç»è½®æ¬¡ç± rollTaskGroupCycle è´è´£ã |
| | | */ |
| | | @ApiModelProperty(value = "ä»»å¡ç»(appltype=5)é¦è½®çº³å
¥æ è®°ï¼0æªå¤ç 1å·²çæé¦è½® 2æ å¹é
/失败") |
| | | private String scheduleCheckFlag; |
| | | |
| | | /** |
| | | * å
¥é¢ç§å®¤é¿æä»»å¡ï¼æ¯å¦å¤çï¼0æªå¤ç 1å¤ç |
| | | */ |
| | | @ApiModelProperty(value = "å
¥é¢ç§å®¤é¿æä»»å¡ï¼æ¯å¦å¤çï¼0æªå¤ç 1å¤çæå 2å¤ç失败 ") |
| | |
| | | private String campusid; |
| | | |
| | | /** |
| | | * å°±è¯æ¥æºID |
| | | */ |
| | | @ApiModelProperty("å°±è¯æ¥æºID") |
| | | @Excel(name = " å°±è¯æ¥æºID ") |
| | | private String encounterSourceId; |
| | | |
| | | /** |
| | | * éè¦æ§æ è®°ç¼ç |
| | | * æä¸¾ç±»åï¼ImportFlagEnum |
| | | * FH0165.98 - ç¹çº¦äººå |
| | | * FH0165.99 - 离ä¼äººå |
| | | * FH0165.03 - æ |
| | | * FH0165.02 - æ¥é´è¯ç |
| | | * FH0165.01 - æ¥é´ææ¯ |
| | | */ |
| | | @ApiModelProperty(value = "éè¦æ§æ è®°ç¼ç ", example = "FH0165.01") |
| | | @Excel(name = " éè¦æ§æ è®°ç¼ç ") |
| | | private String importanceFlagCode; |
| | | |
| | | /** |
| | | * ç´§æ¥ç¨åº¦ç¼ç |
| | | * æä¸¾ç±»åï¼EmergencyLevelEnum |
| | | * FH0164.01 - ç®æ |
| | | * FH0164.02 - æ¥å±é |
| | | * FH0164.03 - æ©æ |
| | | * FH0164.04 - åºç¡ |
| | | */ |
| | | @ApiModelProperty(value = "ç´§æ¥ç¨åº¦ç¼ç ", example = "FH0164.01") |
| | | @Excel(name = " ç´§æ¥ç¨åº¦ç¼ç ") |
| | | private String emergencyLevelCode; |
| | | |
| | | /** |
| | | * '满æåº¦æ è¯ï¼0æªå满度 1ä½é¢æ»¡åº¦åº¦ 2åºé¢æ»¡æåº¦ ï¼å¦ææ¢è¦åä½é¢ï¼åè¦ååºé¢ï¼åç¨â,âåå²ï¼ä¾å¦1,2ï¼ |
| | | */ |
| | | @ApiModelProperty("'满æåº¦æ è¯ï¼0æªå满度 1ä½é¢æ»¡åº¦åº¦ 2åºé¢æ»¡æåº¦ ï¼å¦ææ¢è¦åä½é¢ï¼åè¦ååºé¢ï¼åç¨â,âåå²ï¼ä¾å¦1,2ï¼") |
| | |
| | | @ApiModelProperty("é¢åº") |
| | | @Excel(name = " é¢åº ") |
| | | private String campusid; |
| | | |
| | | /** |
| | | * å°±è¯æ¥æºID |
| | | */ |
| | | @ApiModelProperty("å°±è¯æ¥æºID") |
| | | @Excel(name = " å°±è¯æ¥æºID ") |
| | | private String encounterSourceId; |
| | | |
| | | /** |
| | | * éè¦æ§æ è®°ç¼ç |
| | | * æä¸¾ç±»åï¼ImportFlagEnum |
| | | * FH0165.98 - ç¹çº¦äººå |
| | | * FH0165.99 - 离ä¼äººå |
| | | * FH0165.03 - æ |
| | | * FH0165.02 - æ¥é´è¯ç |
| | | * FH0165.01 - æ¥é´ææ¯ |
| | | */ |
| | | @ApiModelProperty(value = "éè¦æ§æ è®°ç¼ç ", example = "FH0165.01") |
| | | @Excel(name = " éè¦æ§æ è®°ç¼ç ") |
| | | private String importanceFlagCode; |
| | | |
| | | /** |
| | | * ç´§æ¥ç¨åº¦ç¼ç |
| | | * æä¸¾ç±»åï¼EmergencyLevelEnum |
| | | * FH0164.01 - ç®æ |
| | | * FH0164.02 - æ¥å±é |
| | | * FH0164.03 - æ©æ |
| | | * FH0164.04 - åºç¡ |
| | | */ |
| | | @ApiModelProperty(value = "ç´§æ¥ç¨åº¦ç¼ç ", example = "FH0164.01") |
| | | @Excel(name = " ç´§æ¥ç¨åº¦ç¼ç ") |
| | | private String emergencyLevelCode; |
| | | |
| | | /** |
| | | * '满æåº¦æ è¯ï¼0æªå满度 1ä½é¢æ»¡åº¦åº¦ 2åºé¢æ»¡æåº¦ ï¼å¦ææ¢è¦åä½é¢ï¼åè¦ååºé¢ï¼åç¨â,âåå²ï¼ä¾å¦1,2ï¼ |
| | | */ |
| | | @ApiModelProperty("'满æåº¦æ è¯ï¼0æªå满度 1ä½é¢æ»¡åº¦åº¦ 2åºé¢æ»¡æåº¦ ï¼å¦ææ¢è¦åä½é¢ï¼åè¦ååºé¢ï¼åç¨â,âåå²ï¼ä¾å¦1,2ï¼") |
| | | @Excel(name = " '满æåº¦æ è¯ï¼0æªå满度 1ä½é¢æ»¡åº¦åº¦ 2åºé¢æ»¡æåº¦ ï¼å¦ææ¢è¦åä½é¢ï¼åè¦ååºé¢ï¼åç¨â,âåå²ï¼ä¾å¦1,2ï¼ ") |
| | | private String inhospMydFlag; |
| | | } |
| | | |
| | |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æ£è
æ£æ¥æ£éªè®°å½å对象 pat_med_operation_item |
| | |
| | | @ApiModelProperty("æ¤å£«å§å") |
| | | @Excel(name = "æ¤å£«å§å") |
| | | private String nurseName; |
| | | |
| | | @ApiModelProperty(value = "ç
åºç¼ç éå") |
| | | private List<String> wardCodes; |
| | | |
| | | @ApiModelProperty(value = "é¨é¨ç¼ç éå") |
| | | private List<String> deptCodes; |
| | | |
| | | @ApiModelProperty(value = "ææ¯ç级éå") |
| | | private List<String> opLevelCodes; |
| | | } |
| | | |
| | |
| | | @ApiModelProperty(value = "ç
åæä»¶ç¶æ") |
| | | private Integer medicalRecordFileStatus; |
| | | |
| | | @ApiModelProperty(value = "å°±è¯æ¥æºID") |
| | | private String encounterSourceId; |
| | | |
| | | @ApiModelProperty(value = "主è¦åºé¢è¯æ") |
| | | private ServiceSLTDDiagnosisResDTO mainDischargeDiagnosis; |
| | | |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @ApiModelProperty(value = "ç»æå鿥æ") |
| | | private Date endSendDateTime; |
| | | |
| | | // ===================== ä»»å¡ç»ï¼appltype=5ï¼åæº¯åæ®µ ===================== |
| | | |
| | | /** |
| | | * å
³è service_task_schedule.idï¼appltype=5 æ¶ä½¿ç¨ï¼ |
| | | */ |
| | | @ApiModelProperty(value = "å
³è service_task_schedule.idï¼appltype=5ï¼") |
| | | private Long scheduleId; |
| | | |
| | | /** |
| | | * å
³è service_task_schedule_detail.id |
| | | */ |
| | | @ApiModelProperty(value = "å
³è service_task_schedule_detail.id") |
| | | private Long scheduleDetailId; |
| | | |
| | | /** |
| | | * æ¬æ¡ subtask å¨è®¡åä¸ç顺åºå· |
| | | */ |
| | | @ApiModelProperty(value = "æ¬æ¡ subtask å¨è®¡åä¸ç顺åºå·") |
| | | private Integer scheduleSeq; |
| | | |
| | | /** |
| | | * æå¨å¾ªç¯è½®æ¬¡ï¼é循ç¯ä»»å¡ä¸º0ï¼ |
| | | */ |
| | | @ApiModelProperty(value = "æå¨å¾ªç¯è½®æ¬¡ï¼é循ç¯ä»»å¡ä¸º0ï¼") |
| | | private Long loopCount; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.domain; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | 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; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * é访任å¡è®¡å主表 service_task_schedule |
| | | * <p> |
| | | * ç¨äº appltype=5ï¼æä»»å¡ç»ï¼ï¼ä¸ä¸ª service_task 对åºä¸æ¡ schedule + 夿¡ detailï¼ |
| | | * åä¸åºé¢è®°å½æ®æ¤å¯çæå¤ä¸ª service_subtaskã |
| | | * |
| | | * @author smartor |
| | | * @date 2026-06-30 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "ServiceTaskSchedule", description = "é访任å¡è®¡å主表") |
| | | public class ServiceTaskSchedule extends BaseEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | @ApiModelProperty("主é®id") |
| | | private Long id; |
| | | |
| | | /** |
| | | * å
³è service_task.taskid |
| | | */ |
| | | @ApiModelProperty("å
³è service_task.taskid") |
| | | @Excel(name = "ä»»å¡id") |
| | | private Long taskid; |
| | | |
| | | /** |
| | | * æå¤§å¾ªç¯æ¬¡æ°ï¼å¾ªç¯ä»»å¡ç¨ï¼NULLæ0表示æ éï¼ |
| | | */ |
| | | @ApiModelProperty("æå¤§å¾ªç¯æ¬¡æ°ï¼å¾ªç¯ä»»å¡ç¨ï¼NULLæ0表示æ éï¼") |
| | | private Long maxLoopCount; |
| | | |
| | | /** |
| | | * å½åå·²å®æå¾ªç¯æ¬¡æ° |
| | | */ |
| | | @ApiModelProperty("å½åå·²å®æå¾ªç¯æ¬¡æ°") |
| | | private Long currentLoopCount; |
| | | |
| | | /** |
| | | * å½åæ§è¡é¡ºåºå· |
| | | */ |
| | | @ApiModelProperty("å½åæ§è¡é¡ºåºå·") |
| | | private Integer currentSeq; |
| | | |
| | | /** |
| | | * ä¸ä¸æ§è¡é¡ºåºå· |
| | | */ |
| | | @ApiModelProperty("ä¸ä¸æ§è¡é¡ºåºå·") |
| | | private Integer nextSeq; |
| | | |
| | | /** |
| | | * æ§è¡å¨ææ¹å¼(1-å¾ªç¯ 0-é循ç¯) |
| | | */ |
| | | @ApiModelProperty("æ§è¡å¨ææ¹å¼(1-å¾ªç¯ 0-é循ç¯)") |
| | | private Integer scheduleStyle; |
| | | |
| | | /** |
| | | * å¾ªç¯æ¶é´æ° |
| | | */ |
| | | @ApiModelProperty("å¾ªç¯æ¶é´æ°") |
| | | private Integer scheduleTimeNum; |
| | | |
| | | /** |
| | | * å¾ªç¯æ¶é´åä½; 1-天 2-å¨ 3-æ 4-å¹´ |
| | | */ |
| | | @ApiModelProperty("å¾ªç¯æ¶é´åä½; 1-天 2-å¨ 3-æ 4-å¹´") |
| | | private Integer scheduleTimeUnit; |
| | | |
| | | /** |
| | | * 䏿¬¡æ§è¡æ¶é´ |
| | | */ |
| | | @ApiModelProperty("䏿¬¡æ§è¡æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date nextExecuteTime; |
| | | |
| | | /** |
| | | * 卿åºåç±»å; 0-èªå®ä¹æ¶é´ 1-å
¥é¢æ¶é´ 2-åºé¢æ¶é´ 3-å°±è¯æ¶é´ 4-å
¥ç»æ¶é´ |
| | | */ |
| | | @ApiModelProperty("卿åºåç±»å; 0-èªå®ä¹æ¶é´ 1-å
¥é¢æ¶é´ 2-åºé¢æ¶é´ 3-å°±è¯æ¶é´ 4-å
¥ç»æ¶é´") |
| | | private Integer scheduleBenchmark; |
| | | |
| | | /** |
| | | * 卿åºåèªå®ä¹æ¶é´ |
| | | */ |
| | | @ApiModelProperty("卿åºåèªå®ä¹æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date scheduleBenchmarkCustomTime; |
| | | |
| | | /** |
| | | * å 餿 è®°ï¼0åå¨ 1å é¤ï¼ |
| | | */ |
| | | @ApiModelProperty("å 餿 è®°ï¼0åå¨ 1å é¤ï¼") |
| | | private String delFlag; |
| | | |
| | | /** |
| | | * æºæID |
| | | */ |
| | | @ApiModelProperty("æºæID") |
| | | private String orgid; |
| | | |
| | | /** |
| | | * é¢åºID |
| | | */ |
| | | @ApiModelProperty("é¢åºID") |
| | | private String campusid; |
| | | |
| | | /** |
| | | * ç»å®ç§å®¤ä»£ç ï¼éå·åéï¼ï¼ä»»å¡ç»èªå¨çº³å
¥å¹é
ç¨ |
| | | */ |
| | | @ApiModelProperty("ç»å®ç§å®¤ä»£ç (éå·åé)ï¼èªå¨çº³å
¥ç¨") |
| | | private String deptCodes; |
| | | |
| | | /** |
| | | * ç»å®ç
åºä»£ç ï¼éå·åéï¼ï¼ä»»å¡ç»èªå¨çº³å
¥å¹é
ç¨ |
| | | */ |
| | | @ApiModelProperty("ç»å®ç
åºä»£ç (éå·åé)ï¼èªå¨çº³å
¥ç¨") |
| | | private String wardCodes; |
| | | |
| | | /** |
| | | * ç»å®ç¾ç
ICD10代ç ï¼éå·åéï¼ï¼ä»»å¡ç»èªå¨çº³å
¥å¹é
ç¨ |
| | | */ |
| | | @ApiModelProperty("ç»å®ç¾ç
ICD10代ç (éå·åé)ï¼èªå¨çº³å
¥ç¨") |
| | | private String icd10Codes; |
| | | |
| | | /** |
| | | * ç»å®ææ¯ç±»å代ç ï¼éå·åéï¼ï¼ä»»å¡ç»èªå¨çº³å
¥å¹é
ç¨ï¼æ¬ææä¸ç¨ï¼ |
| | | */ |
| | | @ApiModelProperty("ç»å®ææ¯ç±»å代ç (éå·åé)ï¼èªå¨çº³å
¥ç¨(æ¬ææä¸ç¨)") |
| | | private String oplevelCodes; |
| | | |
| | | /** |
| | | * ç»å®ç§å®¤ä»£ç |
| | | */ |
| | | @ApiModelProperty("ç»å®ç§å®¤ä»£ç ") |
| | | private String deptCode; |
| | | |
| | | /** |
| | | * ç»å®ç
åºä»£ç |
| | | */ |
| | | @ApiModelProperty("ç»å®ç
åºä»£ç ") |
| | | private String wardCode; |
| | | |
| | | /** |
| | | * ç»å®ç¾ç
ICD10代ç |
| | | */ |
| | | @ApiModelProperty("ç»å®ç¾ç
ICD10代ç ") |
| | | private String icd10Code; |
| | | |
| | | /** |
| | | * ç»å®ææ¯ç±»å代ç |
| | | */ |
| | | @ApiModelProperty("ç»å®ææ¯ç±»å代ç ") |
| | | private String oplevelCode; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.domain; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | 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; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * é访任å¡è®¡åæç»è¡¨ service_task_schedule_detail |
| | | * |
| | | * @author smartor |
| | | * @date 2026-06-30 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "ServiceTaskScheduleDetail", description = "é访任å¡è®¡åæç»è¡¨") |
| | | public class ServiceTaskScheduleDetail extends BaseEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | @ApiModelProperty("主é®") |
| | | private Long id; |
| | | |
| | | /** |
| | | * å
³è service_task.taskid |
| | | */ |
| | | @ApiModelProperty("å
³è service_task.taskid") |
| | | @Excel(name = "ä»»å¡id") |
| | | private Long taskid; |
| | | |
| | | /** |
| | | * å
³è service_task_schedule.id |
| | | */ |
| | | @ApiModelProperty("å
³è service_task_schedule.id") |
| | | private Long scheduleid; |
| | | |
| | | /** |
| | | * 顺åºå·ï¼ä»1å¼å§ |
| | | */ |
| | | @ApiModelProperty("顺åºå·ï¼ä»1å¼å§") |
| | | private Integer seq; |
| | | |
| | | /** |
| | | * é´é天æ°ï¼åºå®ä»»å¡ï¼ç¸å¯¹åºåæ¥ï¼å¾ªç¯ä»»å¡ï¼ç¸å¯¹ä¸ä¸æ¬¡å®ææ¥ï¼ |
| | | */ |
| | | @ApiModelProperty("é´é天æ°ï¼åºå®ä»»å¡ï¼ç¸å¯¹åºåæ¥ï¼å¾ªç¯ä»»å¡ï¼ç¸å¯¹ä¸ä¸æ¬¡å®ææ¥ï¼") |
| | | private Integer dayOffset; |
| | | |
| | | /** |
| | | * 该次使ç¨ç模æ¿ID |
| | | */ |
| | | @ApiModelProperty("该次使ç¨ç模æ¿ID") |
| | | private Long templateid; |
| | | |
| | | /** |
| | | * 模æ¿åºID |
| | | */ |
| | | @ApiModelProperty("模æ¿åºID") |
| | | private Long libtemplateid; |
| | | |
| | | /** |
| | | * 模æ¿åç§° |
| | | */ |
| | | @ApiModelProperty("模æ¿åç§°") |
| | | private String templatename; |
| | | |
| | | /** |
| | | * 该次èªå®ä¹å
容ï¼JSONï¼kcb/jsy/text_paramçï¼ |
| | | */ |
| | | @ApiModelProperty("该次èªå®ä¹å
容ï¼JSONï¼kcb/jsy/text_paramçï¼") |
| | | private String content; |
| | | |
| | | /** |
| | | * 䏿¬¡æ§è¡æ¶é´ |
| | | */ |
| | | @ApiModelProperty("䏿¬¡æ§è¡æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date nextExecuteTime; |
| | | |
| | | /** |
| | | * å 餿 è®°ï¼0åå¨ 1å é¤ï¼ |
| | | */ |
| | | @ApiModelProperty("å 餿 è®°ï¼0åå¨ 1å é¤ï¼") |
| | | private String delFlag; |
| | | |
| | | /** |
| | | * æºæID |
| | | */ |
| | | @ApiModelProperty("æºæID") |
| | | private String orgid; |
| | | |
| | | /** |
| | | * é¢åºID |
| | | */ |
| | | @ApiModelProperty("é¢åºID") |
| | | private String campusid; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.domain; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * é访任å¡è®¡å VOï¼ä¸»è®¡å + æç»åè¡¨ï¼ |
| | | * ç¨äº appltype=5 ä»»å¡ç»å建/ä¿®æ¹çå
¥åã |
| | | * |
| | | * @author smartor |
| | | * @date 2026-06-30 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @ApiModel(value = "ServiceTaskScheduleVO", description = "é访任å¡è®¡å") |
| | | public class ServiceTaskScheduleVO extends ServiceTaskSchedule { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 计åæç»åè¡¨ï¼æ seq æåºï¼ |
| | | */ |
| | | @ApiModelProperty("计åæç»åè¡¨ï¼æ seq æåºï¼") |
| | | private List<ServiceTaskScheduleDetail> detailList; |
| | | } |
| | |
| | | @Excel(name = "ææ¯ç级ç¼ç ") |
| | | private String oplevelcode; |
| | | /** |
| | | * éç¨æ¡ä»¶ç±»åï¼1ãæç§å®¤ã2ãæç
åºã3ãæç¾ç
è¯æã4ãæææ¯ç±»å |
| | | * éç¨æ¡ä»¶ç±»åï¼1ãæç§å®¤ã2ãæç
åºã3ãæç¾ç
è¯æã4ãæææ¯ç±»åã5ãæä»»å¡ç» |
| | | */ |
| | | @ApiModelProperty("éç¨æ¡ä»¶ç±»åï¼1ãæç§å®¤ã2ãæç
åºã3ãæç¾ç
è¯æã4ãæææ¯ç±»å") |
| | | @Excel(name = "éç¨æ¡ä»¶ç±»åï¼1ãæç§å®¤ã2ãæç
åºã3ãæç¾ç
è¯æã4ãæææ¯ç±»å") |
| | | @ApiModelProperty("éç¨æ¡ä»¶ç±»åï¼1ãæç§å®¤ã2ãæç
åºã3ãæç¾ç
è¯æã4ãæææ¯ç±»åã5ãæä»»å¡ç»") |
| | | @Excel(name = "éç¨æ¡ä»¶ç±»åï¼1ãæç§å®¤ã2ãæç
åºã3ãæç¾ç
è¯æã4ãæææ¯ç±»åã5ãæä»»å¡ç»") |
| | | private String appltype; |
| | | |
| | | @ApiModelProperty(value = "é访é¨é¨ç¼ç ") |
| | |
| | | @ApiModelProperty(value = "ç¾ç
ç
ç§") |
| | | @Excel(name = " ç¾ç
ç
ç§") |
| | | private String diagType; |
| | | |
| | | /** |
| | | * ä»»å¡ç»è®¡åï¼appltype=5 å¿
å¡«ï¼ä¸»è®¡å + æç»åè¡¨ï¼ |
| | | */ |
| | | @ApiModelProperty(value = "ä»»å¡ç»è®¡åï¼appltype=5 å¿
å¡«ï¼ä¸»è®¡å+æç»ï¼") |
| | | private ServiceTaskScheduleVO serviceTaskScheduleVO; |
| | | } |
| | |
| | | public int insertServiceSubtask(ServiceSubtask ServiceSubtask); |
| | | |
| | | /** |
| | | * ä»»å¡ç»ï¼appltype=5ï¼ï¼ç»è®¡æä¸è½®æ¬¡å
ä»å¨è¿è¡ç subtask æ°éã |
| | | * ä»å¨è¿è¡ = sendstate in (1,2,3) 䏿ªå é¤ã |
| | | * ç¨äºå¤ææ¬è½®æ¯å¦å·²å
¨é¨ finalizeï¼æå/失败/䏿§è¡/è¶
æ¶ï¼ã |
| | | * |
| | | * @param scheduleId 计åä¸»é® |
| | | * @param loopCount 轮次ï¼0=é¦è½®ï¼ |
| | | */ |
| | | public int countActiveByScheduleIdAndLoop(@Param("scheduleId") Long scheduleId, |
| | | @Param("loopCount") Long loopCount); |
| | | |
| | | /** |
| | | * ä»»å¡ç»ï¼appltype=5ï¼ï¼æåæä¸è½®æ¬¡çå
¨é¨ subtaskï¼ç¨äºå
éå°ä¸ä¸è½®ï¼ã |
| | | */ |
| | | public List<ServiceSubtask> selectByScheduleIdAndLoop(@Param("scheduleId") Long scheduleId, |
| | | @Param("loopCount") Long loopCount); |
| | | |
| | | /** |
| | | * éè®¿åæ¶çï¼åºé访æ¶é´<å®é
é访æ¶é´ |
| | | * |
| | | * @param ServiceSubtask |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.mapper; |
| | | |
| | | import com.smartor.domain.ServiceTaskScheduleDetail; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * é访任å¡è®¡åæç» Mapper æ¥å£ |
| | | * |
| | | * @author smartor |
| | | * @date 2026-06-30 |
| | | */ |
| | | @Mapper |
| | | public interface ServiceTaskScheduleDetailMapper { |
| | | |
| | | /** |
| | | * æ¥è¯¢æç» |
| | | */ |
| | | ServiceTaskScheduleDetail selectServiceTaskScheduleDetailById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢æç»å表 |
| | | */ |
| | | List<ServiceTaskScheduleDetail> selectServiceTaskScheduleDetailList(ServiceTaskScheduleDetail detail); |
| | | |
| | | /** |
| | | * æ scheduleid æ¥è¯¢æç»åè¡¨ï¼æ seq ååºï¼ |
| | | */ |
| | | List<ServiceTaskScheduleDetail> selectByScheduleid(@Param("scheduleid") Long scheduleid); |
| | | |
| | | /** |
| | | * æ taskid æ¥è¯¢æç»åè¡¨ï¼æ seq ååºï¼ |
| | | */ |
| | | List<ServiceTaskScheduleDetail> selectByTaskid(@Param("taskid") Long taskid); |
| | | |
| | | /** |
| | | * æ°å¢æç» |
| | | */ |
| | | int insertServiceTaskScheduleDetail(ServiceTaskScheduleDetail detail); |
| | | |
| | | /** |
| | | * æ¹éæ°å¢æç» |
| | | */ |
| | | int batchInsertServiceTaskScheduleDetail(@Param("list") List<ServiceTaskScheduleDetail> list); |
| | | |
| | | /** |
| | | * ä¿®æ¹æç» |
| | | */ |
| | | int updateServiceTaskScheduleDetail(ServiceTaskScheduleDetail detail); |
| | | |
| | | /** |
| | | * é»è¾å é¤ï¼æ idï¼ |
| | | */ |
| | | int deleteServiceTaskScheduleDetailById(Long id); |
| | | |
| | | /** |
| | | * é»è¾å é¤ï¼æ scheduleidï¼ï¼ä¿®æ¹ä»»å¡æ¶æ¸
ç©ºæ§æç» |
| | | */ |
| | | int deleteByScheduleid(@Param("scheduleid") Long scheduleid); |
| | | |
| | | /** |
| | | * é»è¾å é¤ï¼æ taskidï¼ |
| | | */ |
| | | int deleteByTaskid(@Param("taskid") Long taskid); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.mapper; |
| | | |
| | | import com.smartor.domain.ServiceTaskSchedule; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * é访任å¡è®¡å主表 Mapper æ¥å£ |
| | | * |
| | | * @author smartor |
| | | * @date 2026-06-30 |
| | | */ |
| | | @Mapper |
| | | public interface ServiceTaskScheduleMapper { |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¡å详æ
|
| | | */ |
| | | ServiceTaskSchedule selectServiceTaskScheduleById(Long id); |
| | | |
| | | /** |
| | | * éè¿ taskid æ¥è¯¢ä»»å¡å¯¹åºçææè®¡åï¼appltype=5 ä¸å¯¹ä¸ï¼ |
| | | */ |
| | | ServiceTaskSchedule selectByTaskid(@Param("taskid") Long taskid); |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¡åå表 |
| | | */ |
| | | List<ServiceTaskSchedule> selectServiceTaskScheduleList(ServiceTaskSchedule serviceTaskSchedule); |
| | | |
| | | /** |
| | | * æ°å¢è®¡å |
| | | */ |
| | | int insertServiceTaskSchedule(ServiceTaskSchedule serviceTaskSchedule); |
| | | |
| | | /** |
| | | * ä¿®æ¹è®¡å |
| | | */ |
| | | int updateServiceTaskSchedule(ServiceTaskSchedule serviceTaskSchedule); |
| | | |
| | | /** |
| | | * é»è¾å é¤ï¼æ idï¼ |
| | | */ |
| | | int deleteServiceTaskScheduleById(Long id); |
| | | |
| | | /** |
| | | * é»è¾å é¤ï¼æ taskidï¼ï¼ä¿®æ¹ä»»å¡æ¶æ¸
空æ§è®¡å |
| | | */ |
| | | int deleteByTaskid(@Param("taskid") Long taskid); |
| | | |
| | | /** |
| | | * ä»»å¡ç»ï¼appltype=5ï¼æ»å¨è°åº¦ç¨ï¼æ¥è¯¢æææªè¾¾ä¸éç循ç¯è®¡åã |
| | | * æ¡ä»¶ï¼schedule_style=1 ä¸ (max_loop_count is null or max_loop_count=0 or current_loop_count < max_loop_count) |
| | | * éå¶è¿åæ¡æ°é¿å
é¿äºå¡ã |
| | | */ |
| | | List<ServiceTaskSchedule> selectActiveCycleSchedules(@Param("limit") int limit); |
| | | } |
| | |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.domain.DTO.PatMedInhospDTO; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | import java.util.List; |
| | |
| | | * @return æ£è
ä½é¢è®°å½éå |
| | | */ |
| | | public List<PatMedInhosp> selectPatMedInhospList(PatMedInhosp patMedInhosp); |
| | | |
| | | public List<PatMedInhospDTO> selectPatMedInhospByApplication(PatMedInhosp patMedInhosp); |
| | | |
| | | /** |
| | | * åºé¢ãé¨è¯äººæ°åé访éç»è®¡ï¼å¨ï¼æï¼å¹´ï¼ |
| | |
| | | public int dealOutHospInfo(String config); |
| | | |
| | | /** |
| | | * å¤çä»his忥çåºé¢æ°æ® |
| | | * å¤çä»his忥çåºé¢æ°æ® ä»»å¡ç»çæ |
| | | * |
| | | * @param |
| | | * @return ç»æ |
| | | */ |
| | | public int dealOutHospInfoByDimension(String config); |
| | | public int dealOutHospInfoBySchedule(String config); |
| | | |
| | | /** |
| | | * è·ååºé¢ï¼ä½é¢ï¼é¨è¯æå¡äººæ¬¡ |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.service; |
| | | |
| | | import com.smartor.domain.ServiceTaskSchedule; |
| | | import com.smartor.domain.ServiceTaskScheduleDetail; |
| | | import com.smartor.domain.ServiceTaskScheduleVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * é访任å¡è®¡å Service æ¥å£ |
| | | * |
| | | * @author smartor |
| | | * @date 2026-06-30 |
| | | */ |
| | | public interface IServiceTaskScheduleService { |
| | | |
| | | /** |
| | | * ä¿å计åï¼å«æç»ï¼ã |
| | | * è¥ taskid å·²æè®¡åï¼å
è½¯å æ§çï¼åæ°å»ºã |
| | | * |
| | | * @param vo 主计å + æç» |
| | | * @return ä¿ååç主计åï¼å«ä¸»é®ï¼ |
| | | */ |
| | | ServiceTaskSchedule saveScheduleWithDetail(ServiceTaskScheduleVO vo); |
| | | |
| | | /** |
| | | * æ taskid æ¥è¯¢è®¡å详æ
ï¼å«æç»ï¼ |
| | | */ |
| | | ServiceTaskScheduleVO getScheduleByTaskid(Long taskid); |
| | | |
| | | /** |
| | | * éè¿ taskid æ¥è¯¢ä¸»è®¡å |
| | | */ |
| | | ServiceTaskSchedule selectByTaskid(Long taskid); |
| | | |
| | | /** |
| | | * éè¿ scheduleid æ¥è¯¢æç» |
| | | */ |
| | | List<ServiceTaskScheduleDetail> selectDetailByScheduleid(Long scheduleid); |
| | | |
| | | /** |
| | | * æ taskid 软å 主计å + æç» |
| | | */ |
| | | int removeByTaskid(Long taskid); |
| | | |
| | | /** |
| | | * 循ç¯ä»»å¡æ»å¨è°åº¦ï¼ |
| | | * <p> |
| | | * æ«æææ schedule_style=1 çææè®¡åï¼è¥ current_loop_count 已达ä¸éåè·³è¿ï¼ |
| | | * å¦åå¤å®æ¬è½®ï¼current_loop_countï¼æ¯å¦å·²å
¨é¨ finalizeï¼sendstate â 1/2/3ï¼ã |
| | | * æ¯ -> çæä¸ä¸è½® subtaskï¼å
éæ¬è½®çæ£è
ï¼visit_time = æ¬è½® visit_time + N天/å¨/æ/å¹´ï¼ï¼ |
| | | * current_loop_count + 1ï¼next_execute_time æ¨è¿ã |
| | | * å¦ -> è·³è¿çå¾
䏿¬¡æ«æã |
| | | * <p> |
| | | * ç± RyTask 宿¶è°ç¨ï¼åæ¬¡æ«æéå¶ 200 æ¡é¿å
é¿äºå¡ã |
| | | * |
| | | * @return å®é
æ¨è¿äºå¤å°ä¸ªè®¡å |
| | | */ |
| | | int rollCycleTasks(); |
| | | } |
| | |
| | | patArchiveVO.setIsoperation(2); |
| | | patArchiveMapper.updatePatArchive(patArchive); |
| | | if (StringUtils.isNotEmpty(patArchive.getNotrequiredFlag()) && patArchive.getNotrequiredFlag().equals("1")) { |
| | | //ä¸éè¦æå¡äºï¼éè¦éè¿patidåsendstate=2æè
sendstate=1廿¥è¯¢ä¸ä¸ï¼service_subtask鿝妿æ£å¨æ§è¡çä»»å¡ï¼æçè¯ï¼ç«å³åäº |
| | | //ä¸éè¦æå¡äºï¼éè¦éè¿patidåsendstate=1,2,3,5,7廿¥è¯¢ä¸ä¸ï¼service_subtask鿝妿æ£å¨æ§è¡çä»»å¡ï¼æçè¯ï¼ç«å³åäº |
| | | List<Long> list = Arrays.asList(1L, 2L, 3L, 5L, 7L); |
| | | List<ServiceSubtask> serviceSubtaskList = new ArrayList<>(); |
| | | ServiceSubtaskEntity serviceSubtaskVO = new ServiceSubtaskEntity(); |
| | | serviceSubtaskVO.setPatid(patArchive.getId()); |
| | | serviceSubtaskVO.setSendstate(2L); |
| | | List<ServiceSubtask> serviceSubtaskList = serviceSubtaskMapper.selectServiceSubtaskList(serviceSubtaskVO); |
| | | serviceSubtaskVO.setSendstate(1L); |
| | | List<ServiceSubtask> serviceSubtaskList1 = serviceSubtaskMapper.selectServiceSubtaskList(serviceSubtaskVO); |
| | | if (CollectionUtils.isNotEmpty(serviceSubtaskList)) { |
| | | if (CollectionUtils.isNotEmpty(serviceSubtaskList1)) serviceSubtaskList.addAll(serviceSubtaskList1); |
| | | } else { |
| | | if (CollectionUtils.isNotEmpty(serviceSubtaskList1)) serviceSubtaskList = serviceSubtaskList1; |
| | | for (Long ss : list) { |
| | | serviceSubtaskVO.setSendstate(ss); |
| | | List<ServiceSubtask> serviceSubtasks = serviceSubtaskMapper.selectServiceSubtaskList(serviceSubtaskVO); |
| | | serviceSubtaskList.addAll(serviceSubtasks); |
| | | } |
| | | //å»redisä¸ï¼æ¥è¯¢æ¯å¦æsubidï¼æçè¯ç§»é¤cache-exist |
| | | if (CollectionUtils.isNotEmpty(serviceSubtaskList)) { |
| | | for (ServiceSubtask serviceSubtask : serviceSubtaskList) { |
| | | log.info("éè¦ç§»é¤çsubId为ï¼{}", serviceSubtask.getId().toString()); |
| | | serviceSubtaskMapper.deleteServiceSubtaskById(serviceSubtask.getId()); |
| | | serviceSubtask.setSendstate(4L); |
| | | serviceSubtask.setRemark(patArchiveVO.getNotrequiredreason()); |
| | | serviceSubtaskMapper.updateServiceSubtask(serviceSubtask); |
| | | redisCache.removeElementFromList("cache-exist", serviceSubtask.getId().toString()); |
| | | redisCache.removeElementFromList("cache-0", serviceSubtask.getId().toString()); |
| | | redisCache.removeElementFromList("cache-1", serviceSubtask.getId().toString()); |
| | |
| | | import com.ruoyi.common.utils.DtoConversionUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.smartor.common.ScheduleSubtaskBuilder; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.domain.DTO.PatMedInhospDTO; |
| | | import com.smartor.domain.entity.ServiceSubtaskEntity; |
| | | import com.smartor.mapper.*; |
| | | import com.smartor.service.IPatMedInhospService; |
| | |
| | | private String active; |
| | | @Autowired |
| | | private IConfigService iSysConfigService; |
| | | @Autowired |
| | | private ServiceTaskScheduleMapper serviceTaskScheduleMapper; |
| | | |
| | | @Autowired |
| | | private ScheduleSubtaskBuilder scheduleSubtaskBuilder; |
| | | @Autowired |
| | | private ServiceTaskScheduleDetailMapper serviceTaskScheduleDetailMapper; |
| | | |
| | | |
| | | /** |
| | |
| | | patMedInhosp1.setTagname(tagname); |
| | | } |
| | | return patMedInhospList; |
| | | } |
| | | |
| | | @Override |
| | | public List<PatMedInhospDTO> selectPatMedInhospByApplication(PatMedInhosp patMedInhosp) { |
| | | List<PatMedInhosp> patMedInhosps = selectPatMedInhospList(patMedInhosp); |
| | | if (!org.springframework.util.CollectionUtils.isEmpty(patMedInhosps)) { |
| | | return null; |
| | | } |
| | | List<PatMedInhospDTO> patMedInhospDTOList = DtoConversionUtils.sourceToTarget(patMedInhosps, PatMedInhospDTO.class); |
| | | for (PatMedInhospDTO pmd : patMedInhospDTOList) { |
| | | ServiceSubtaskEntity serviceSubtask = new ServiceSubtaskEntity(); |
| | | serviceSubtask.setServiceType("4"); |
| | | serviceSubtask.setInhospid(pmd.getInhospid()); |
| | | List<ServiceSubtask> serviceSubtasks = serviceSubtaskMapper.selectServiceSubtaskList(serviceSubtask); |
| | | if (CollectionUtils.isNotEmpty(serviceSubtasks)) pmd.setFinishFlag("1"); |
| | | } |
| | | |
| | | return patMedInhospDTOList; |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | /** |
| | | * å¤ç»´åº¦é访 |
| | | * ä»»å¡ç»é访 |
| | | * |
| | | * @param config |
| | | * @return |
| | | */ |
| | | public int dealOutHospInfoByDimension(String config) { |
| | | // 䏿¬¡æ§æ¥åºææéè¦å¤ççåºé¢æ£è
ï¼ä¸ä¸ªç»´åº¦ä»»æä¸ä¸ªæªå®æï¼ |
| | | List<PatMedInhosp> patList = patMedInhospMapper.selectNeedProcessList(); |
| | | log.info("ãç»ä¸æ«æãå¾
å¤çæ£è
æ°ï¼{}", patList.size()); |
| | | public int dealOutHospInfoBySchedule(String config) { |
| | | |
| | | for (PatMedInhosp patMedInhosp1 : patList) { |
| | | PatArchive patArchive = patArchiveMapper.selectPatArchiveByPatid(patMedInhosp1.getPatid()); |
| | | if (Objects.isNull(patArchive)) { |
| | | // ä¸ä¸ªç»´åº¦é½æ 记为失败 |
| | | markAllFlagsAsError(patMedInhosp1, "æ£è
åºæ¬ä¿¡æ¯ä¸ºç©º"); |
| | | continue; |
| | | } |
| | | ServiceTask serviceTaskVo = new ServiceTask(); |
| | | serviceTaskVo.setLongTask(1); |
| | | serviceTaskVo.setAppltype("5"); |
| | | List<ServiceTask> serviceTasks = serviceTaskMapper.selectServiceTaskList(serviceTaskVo); |
| | | |
| | | // ââ 维度1ï¼ç§å®¤ ââ |
| | | if ("0".equals(patMedInhosp1.getDeptcheckFlag())) { |
| | | processTasksByDimension(patMedInhosp1, patArchive, config, 1); |
| | | } |
| | | if (CollectionUtils.isNotEmpty(serviceTasks)) { |
| | | for (ServiceTask serviceTask : serviceTasks) { |
| | | if(!ObjectUtils.isEmpty(serviceTask.getTaskid())){ |
| | | ServiceTaskSchedule serviceTaskSchedule = new ServiceTaskSchedule(); |
| | | ServiceTaskSchedule taskSchedule = new ServiceTaskSchedule(); |
| | | taskSchedule.setTaskid(serviceTask.getTaskid()); |
| | | List<ServiceTaskSchedule> serviceTaskSchedules = serviceTaskScheduleMapper.selectServiceTaskScheduleList(taskSchedule); |
| | | if(CollectionUtils.isNotEmpty(serviceTaskSchedules)){ |
| | | serviceTaskSchedule = serviceTaskSchedules.get(0); |
| | | String deptCodes = serviceTaskSchedule.getDeptCodes(); |
| | | String wardCodes = serviceTaskSchedule.getWardCodes(); |
| | | String icd10Codes = serviceTaskSchedule.getIcd10Codes(); |
| | | String opLevelCodes = serviceTaskSchedule.getOplevelCodes(); |
| | | |
| | | // ââ 维度2ï¼ç
åº ââï¼æ°åå»é¢è·³è¿ï¼ |
| | | if (!active.equals("xh") && "0".equals(patMedInhosp1.getWardcheckFlag())) { |
| | | processTasksByDimension(patMedInhosp1, patArchive, config, 2); |
| | | } |
| | | List<String> icd10CodeList = new ArrayList<>(); |
| | | List<String> opLevelCodeList = new ArrayList<>(); |
| | | List<String> deptCodeList = new ArrayList<>(); |
| | | List<String> wardCodeList = new ArrayList<>(); |
| | | |
| | | // ââ 维度3ï¼ç¾ç
ââï¼æ°åå»é¢è·³è¿ï¼ |
| | | if (!active.equals("xh") && "0".equals(patMedInhosp1.getDiagcheckFlag())) { |
| | | processTasksByDimension(patMedInhosp1, patArchive, config, 3); |
| | | /** |
| | | * é访类å(1-ç§å®¤ï¼2-ç
åºï¼3-ç¾ç
4-å
¥é¢ç§å®¤ 5-å
¥é¢ç
åº 6-ææ¯) |
| | | */ |
| | | Integer type = 1; |
| | | if (StringUtils.isNotEmpty(deptCodes)) { |
| | | type = 1; |
| | | deptCodeList = Arrays.asList(deptCodes.split(",")); |
| | | } |
| | | if(StringUtils.isNotEmpty(wardCodes)) { |
| | | type = 2; |
| | | wardCodeList = Arrays.asList(wardCodes.split(",")); |
| | | } |
| | | if(StringUtils.isNotEmpty(icd10Codes)) { |
| | | type = 3; |
| | | icd10CodeList = Arrays.asList(icd10Codes.split(",")); |
| | | } |
| | | if (StringUtils.isNotEmpty(opLevelCodes)) { |
| | | type = 6; |
| | | opLevelCodeList = Arrays.asList(opLevelCodes.split(",")); |
| | | } |
| | | //éææ¯å¤çæ¹å¼ |
| | | if(type != 6){ |
| | | PatMedInhosp patMedInhospVo = new PatMedInhosp(); |
| | | patMedInhospVo.setScheduleCheckFlag("0"); |
| | | patMedInhospVo.setInhospstate("1"); |
| | | patMedInhospVo.setFuflag("1"); |
| | | // patMedInhospVo.setDeptcodeList(deptCodeList); |
| | | patMedInhospVo.setLeaveldeptcodes(deptCodeList); |
| | | patMedInhospVo.setLeavehospitaldistrictcodes(wardCodeList); |
| | | patMedInhospVo.setIcd10codeList(icd10CodeList); |
| | | List<PatMedInhosp> patList = patMedInhospMapper.selectPatMedInhospList(patMedInhospVo); |
| | | log.info("dealOutHospInfoBySchedule ä»»å¡ç»é访, taskid = {}, æ«ææ£è
äººæ° {}", serviceTask.getTaskid(), patList.size()); |
| | | |
| | | for(PatMedInhosp patMedInhosp : patList){ |
| | | ServiceTaskScheduleDetail scheduleDetailVo = new ServiceTaskScheduleDetail(); |
| | | scheduleDetailVo.setTaskid(serviceTask.getTaskid()); |
| | | scheduleDetailVo.setScheduleid(serviceTaskSchedule.getId()); |
| | | List<ServiceTaskScheduleDetail> serviceTaskScheduleDetails = serviceTaskScheduleDetailMapper.selectServiceTaskScheduleDetailList(scheduleDetailVo); |
| | | |
| | | PatArchive patArchive = patArchiveMapper.selectPatArchiveByPatid(patMedInhosp.getPatid()); |
| | | if (Objects.isNull(patArchive)) { |
| | | continue; |
| | | } |
| | | //å°è£
serviceSubtask |
| | | |
| | | ServiceSubtask serviceSubtask = boxedServiceSubtask(serviceTask, patMedInhosp, patArchive, config, type); |
| | | List<Map<String, Object>> preachformList = new ArrayList<>(); |
| | | if(StringUtils.isNotEmpty(serviceTask.getPreachformDesc())){ |
| | | try { |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | preachformList = objectMapper.readValue(serviceTask.getPreachformDesc(), List.class); |
| | | }catch (Exception e){ |
| | | log.error("ä»»å¡ç»preachformDescè§£æå¤±è´¥,taskid={},inhospid={}", serviceTask.getTaskid(), patMedInhosp.getInhospid()); |
| | | } |
| | | } |
| | | scheduleSubtaskBuilder.buildSubtasksForPatient(serviceTask, serviceTaskSchedule, serviceTaskScheduleDetails, serviceSubtask, preachformList); |
| | | //ç½®é¦è½®çº³å
¥æ è®°ï¼é¿å
䏿¬¡æ«æéå¤çæï¼åç»è½®æ¬¡ç± rollTaskGroupCycle è´è´£ï¼ |
| | | PatMedInhosp flagUpd = new PatMedInhosp(); |
| | | flagUpd.setInhospid(patMedInhosp.getInhospid()); |
| | | flagUpd.setScheduleCheckFlag("1"); |
| | | patMedInhospMapper.updatePatMedInhosp(flagUpd); |
| | | } |
| | | }else { |
| | | //ä»»å¡ç» - ææ¯é访 |
| | | if(CollectionUtils.isNotEmpty(opLevelCodeList)){ |
| | | PatMedOperationItem pmoi = new PatMedOperationItem(); |
| | | //è·åéè¦åºé¢ç¾ç
éè®¿ï¼æªå¤ççæ°æ® |
| | | pmoi.setOpercheckFlag("0"); |
| | | pmoi.setMainFlag("1"); |
| | | pmoi.setDeptCodes(deptCodeList); |
| | | pmoi.setWardCodes(wardCodeList); |
| | | pmoi.setOpLevelCodes(opLevelCodeList); |
| | | List<PatMedOperationItem> patMedOperationItems = patMedOperationItemMapper.selectOperationItemList(pmoi); |
| | | for(PatMedOperationItem patMedOperationItem : patMedOperationItems){ |
| | | PatArchive patArchive = patArchiveMapper.selectPatArchiveByPatid(patMedOperationItem.getPatid()); |
| | | if (Objects.isNull(patArchive)) { |
| | | continue; |
| | | } |
| | | PatMedInhosp patMedInhospVo = new PatMedInhosp(); |
| | | patMedInhospVo.setPatid((patMedOperationItem.getPatid())); |
| | | patMedInhospVo.setScheduleCheckFlag("0"); |
| | | patMedInhospVo.setInhospstate("1"); |
| | | patMedInhospVo.setFuflag("1"); |
| | | List<PatMedInhosp> patMedInhospList = patMedInhospMapper.selectPatMedInhospList(patMedInhospVo); |
| | | if(CollectionUtils.isNotEmpty(patMedInhospList)){ |
| | | ServiceTaskScheduleDetail scheduleDetailVo = new ServiceTaskScheduleDetail(); |
| | | scheduleDetailVo.setTaskid(serviceTask.getTaskid()); |
| | | scheduleDetailVo.setScheduleid(serviceTaskSchedule.getId()); |
| | | List<ServiceTaskScheduleDetail> serviceTaskScheduleDetails = serviceTaskScheduleDetailMapper.selectServiceTaskScheduleDetailList(scheduleDetailVo); |
| | | //å°è£
serviceSubtask |
| | | ServiceSubtask serviceSubtask = boxedServiceSubtaskForOp(serviceTask, patMedInhospList.get(0), patMedOperationItem, patArchive, config); |
| | | List<Map<String, Object>> preachformList = new ArrayList<>(); |
| | | if(StringUtils.isNotEmpty(serviceTask.getPreachformDesc())){ |
| | | try { |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | preachformList = objectMapper.readValue(serviceTask.getPreachformDesc(), List.class); |
| | | }catch (Exception e){ |
| | | log.error("ä»»å¡ç»(ææ¯)preachformDescè§£æå¤±è´¥,taskid={}", serviceTask.getTaskid()); |
| | | } |
| | | } |
| | | scheduleSubtaskBuilder.buildSubtasksForPatient(serviceTask, serviceTaskSchedule, serviceTaskScheduleDetails, serviceSubtask, preachformList); |
| | | //ç½®é¦è½®çº³å
¥æ è®°ï¼é¿å
éå¤çæ |
| | | PatMedInhosp flagUpd = new PatMedInhosp(); |
| | | flagUpd.setInhospid(patMedInhospList.get(0).getInhospid()); |
| | | flagUpd.setScheduleCheckFlag("1"); |
| | | patMedInhospMapper.updatePatMedInhosp(flagUpd); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | /** |
| | | * æç»´åº¦æ¾å°ææå¹é
é¿æä»»å¡ï¼æ¹éçæ subtask |
| | | * type: 1=ç§å®¤, 2=ç
åº, 3=ç¾ç
|
| | | */ |
| | | private void processTasksByDimension(PatMedInhosp patMedInhosp1, PatArchive patArchive, String config, int type) { |
| | | List<Long> matchedTaskIds = findMatchingTaskIds(patMedInhosp1, type); |
| | | |
| | | if (CollectionUtils.isEmpty(matchedTaskIds)) { |
| | | String reason = getDimensionReason(type); |
| | | markFlagAsNoConfig(patMedInhosp1, type, reason); |
| | | return; |
| | | } |
| | | |
| | | // 䏿¡ inhosp è®°å½ â å¤ä¸ªå¹é
ä»»å¡ â 夿¡ subtask |
| | | for (Long taskId : matchedTaskIds) { |
| | | writeInSubTask(taskId, true, patMedInhosp1, patArchive, type, config); |
| | | } |
| | | } |
| | | |
| | | private String getDimensionReason(int type) { |
| | | switch (type) { |
| | | case 1: { // ç§å®¤ |
| | | return "æªæ¾å°ç§å®¤å¹é
çé¿æä»»å¡"; |
| | | } |
| | | case 2: { // ç
åº |
| | | return "æªæ¾å°ç
åºå¹é
çé¿æä»»å¡"; |
| | | } |
| | | case 3: { // ç¾ç
|
| | | return "æªæ¾å°ç¾ç
å¹é
çé¿æä»»å¡"; |
| | | } |
| | | } |
| | | return "å¤ç»´é¿æä»»å¡-å¹é
ç±»å为空"; |
| | | } |
| | | |
| | | private void markFlagAsNoConfig(PatMedInhosp patMedInhosp, int type, String reason) { |
| | | switch (type) { |
| | | case 1: { // ç§å®¤ |
| | | patMedInhosp.setDeptcheckFlag("2"); |
| | | patMedInhosp.setRemark(reason); |
| | | patMedInhospMapper.updatePatMedInhosp(patMedInhosp); |
| | | break; |
| | | } |
| | | case 2: { // ç
åº |
| | | patMedInhosp.setWardcheckFlag("2"); |
| | | patMedInhosp.setRemark(reason); |
| | | patMedInhospMapper.updatePatMedInhosp(patMedInhosp); |
| | | break; |
| | | } |
| | | case 3: { // ç¾ç
|
| | | patMedInhosp.setDiagcheckFlag("2"); |
| | | patMedInhosp.setRemark(reason); |
| | | patMedInhospMapper.updatePatMedInhosp(patMedInhosp); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | private void markAllFlagsAsError(PatMedInhosp patMedInhosp, String reason) { |
| | | patMedInhosp.setDeptcheckFlag("2"); |
| | | patMedInhosp.setWardcheckFlag("2"); |
| | | patMedInhosp.setDiagcheckFlag("2"); |
| | | patMedInhosp.setRemark(reason); |
| | | patMedInhospMapper.updatePatMedInhosp(patMedInhosp); |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®ç»´åº¦ç±»åæ¥è¯¢å¹é
çé¿æä»»å¡ ID å表 |
| | | */ |
| | | private List<Long> findMatchingTaskIds(PatMedInhosp patMedInhosp1, int type) { |
| | | switch (type) { |
| | | case 1: { // ç§å®¤ |
| | | ServiceTaskdept query = new ServiceTaskdept(); |
| | | query.setLongtask(1L); |
| | | query.setDeptCode(patMedInhosp1.getLeaveldeptcode()); |
| | | query.setDeptType("1"); |
| | | query.setOrgid(patMedInhosp1.getOrgid()); |
| | | return serviceTaskdeptMapper.selectServiceTaskdeptList(query).stream().map(ServiceTaskdept::getTaskId).collect(Collectors.toList()); |
| | | } |
| | | case 2: { // ç
åº |
| | | ServiceTaskdept query = new ServiceTaskdept(); |
| | | query.setLongtask(1L); |
| | | query.setDeptCode(patMedInhosp1.getLeavehospitaldistrictcode()); |
| | | query.setDeptType("2"); |
| | | query.setOrgid(patMedInhosp1.getOrgid()); |
| | | return serviceTaskdeptMapper.selectServiceTaskdeptList(query).stream().map(ServiceTaskdept::getTaskId).collect(Collectors.toList()); |
| | | } |
| | | case 3: { // ç¾ç
|
| | | if (StringUtils.isEmpty(patMedInhosp1.getLeaveicd10code())) return Collections.emptyList(); |
| | | ServiceTaskdiag query = new ServiceTaskdiag(); |
| | | query.setLongtask(1L); |
| | | query.setIcd10code(patMedInhosp1.getLeaveicd10code()); |
| | | query.setOrgid(patMedInhosp1.getOrgid()); |
| | | return serviceTaskdiagMapper.selectServiceTaskdiagList(query).stream().map(ServiceTaskdiag::getTaskId).collect(Collectors.toList()); |
| | | } |
| | | } |
| | | return Collections.emptyList(); |
| | | } |
| | | |
| | | |
| | |
| | | if (ObjectUtils.isEmpty(serviceSubtask)) { |
| | | return; |
| | | } |
| | | if(StringUtils.isNotEmpty(patMedOperationItem.getDeptcode())){ |
| | | if (StringUtils.isNotEmpty(patMedOperationItem.getDeptcode())) { |
| | | serviceSubtask.setVisitDeptCode(patMedOperationItem.getDeptcode()); |
| | | serviceSubtask.setVisitDeptName(patMedOperationItem.getDeptname()); |
| | | }else { |
| | | } else { |
| | | serviceSubtask.setVisitDeptCode(patMedOperationItem.getHospitaldistrictcode()); |
| | | serviceSubtask.setVisitDeptName(patMedOperationItem.getHospitaldistrictname()); |
| | | } |
| | |
| | | import com.ruoyi.common.core.domain.entity.SysUserDept; |
| | | import com.ruoyi.common.core.domain.entity.SysUserRole; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.smartor.common.enums.EmergencyLevelEnum; |
| | | import com.smartor.common.enums.ImportFlagEnum; |
| | | import com.ruoyi.common.utils.http.HttpUtils; |
| | | import com.smartor.common.DistinctByProperty; |
| | | import com.smartor.domain.*; |
| | |
| | | patMedInhosp.setInhospno(dto.getHealthcareRecordNo()); |
| | | patMedInhosp.setFuflag("1"); |
| | | |
| | | |
| | | if (StringUtils.isNotEmpty(patArchive.getNotrequiredFlag()) && patArchive.getNotrequiredFlag().equals("1")) |
| | | patMedInhosp.setFuflag("0"); |
| | | if ("0".equals(cry)) { |
| | |
| | | setDischargeInfo(patMedInhosp, dto); |
| | | } else { |
| | | setAdmissionInfo(patMedInhosp, dto); |
| | | patMedInhosp.setEncounterSourceId(dto.getEncounterSourceId() == null ? "" : dto.getEncounterSourceId()); |
| | | if (StringUtils.isNotEmpty(dto.getEncounterSourceId())) { |
| | | //æ ¹æ® encounterSourceId è·å importanceFlagCode emergencyLevelCode |
| | | Map<String, String> applyInfo = hospitalizedApply(dto.getEncounterSourceId(), dto.getOrgId()); |
| | | patMedInhosp.setImportanceFlagCode(applyInfo.get("importanceFlagCode")); |
| | | patMedInhosp.setEmergencyLevelCode(applyInfo.get("emergencyLevelCode")); |
| | | } |
| | | } |
| | | |
| | | patMedInhosp.setDrname(dto.getDoctorName()); |
| | |
| | | patMedInhosp.setHospitaldistrictid("" + dto.getAreaId()); |
| | | patMedInhosp.setHospitaldistrictcode("" + dto.getAreaId()); |
| | | patMedInhosp.setHospitaldistrictname(dto.getAreaName()); |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®å
¥é¢ç³è¯·åIDæ¥è¯¢å
¥é¢ç³è¯·å详æ
|
| | | * åªæå importanceFlagCodeï¼importanceFlagCodeListéå·æ¼æ¥ï¼å emergencyLevelCode ä¸¤ä¸ªå¼ |
| | | */ |
| | | private Map<String, String> hospitalizedApply(String encounterSourceId, String orgid) { |
| | | Map<String, String> applyInfo = new HashMap<>(); |
| | | Map<String, String> headers = buildRequestHeaders(); |
| | | log.info("é¢ç³è¯·åIDæ¥è¯¢å
¥é¢ç³è¯·åï¼{},appKey:{}", sltdPubPath + "/sf/hospitalizedApply/query", APP_KEY); |
| | | //设置å
¥å |
| | | Map<String, Object> requestParams = new HashMap<>(); |
| | | requestParams.put("applyId", encounterSourceId); |
| | | requestParams.put("orgId", orgid); |
| | | |
| | | String result = null; |
| | | if (StringUtils.isNotEmpty(encounterSourceId) && StringUtils.isNotEmpty(orgid)) |
| | | result = HttpUtils.sendPostByHeader(sltdPubPath + "/sf/hospitalizedApply/query", new Gson().toJson(requestParams), headers); |
| | | |
| | | if (StringUtils.isEmpty(result)) { |
| | | log.error("ãhospitalizedApplyãæ¥å£è¿å为空ï¼applyId={}", encounterSourceId); |
| | | return applyInfo; |
| | | } |
| | | try { |
| | | Gson gson = new Gson(); |
| | | Type mapType = new TypeToken<Map<String, Object>>() { |
| | | }.getType(); |
| | | Map<String, Object> responseMap = gson.fromJson(result, mapType); |
| | | Object dataObj = responseMap == null ? null : responseMap.get("data"); |
| | | if (dataObj instanceof Map) { |
| | | Map<String, Object> data = (Map<String, Object>) dataObj; |
| | | //éè¦æ§æ è®°ç¼ç ï¼æ¥å£è¿åæ¯æ°ç»ï¼éè¦è½¬æ¢ä¸ºåå
¸åç§° |
| | | Object importanceFlagCodeListObj = data.get("importanceFlagCodeList"); |
| | | if (importanceFlagCodeListObj instanceof List) { |
| | | List<?> importanceFlagCodeList = (List<?>) importanceFlagCodeListObj; |
| | | // è¿æ»¤æ null å¼ |
| | | List<String> nonNullList = importanceFlagCodeList.stream() |
| | | .filter(Objects::nonNull) |
| | | .map(Object::toString) |
| | | .filter(StringUtils::isNotEmpty) |
| | | .collect(Collectors.toList()); |
| | | |
| | | if (!nonNullList.isEmpty()) { |
| | | String importanceFlagLabel; |
| | | if (nonNullList.size() == 1) { |
| | | // åªæä¸ä¸ªå¼ï¼ç´æ¥éè¿æä¸¾è·åæè¿° |
| | | importanceFlagLabel = ImportFlagEnum.getDescByCode(nonNullList.get(0)); |
| | | } else { |
| | | // å¤ä¸ªå¼ï¼ç¨éå·æ¼æ¥æä¸¾æè¿° |
| | | StringBuilder labelBuilder = new StringBuilder(); |
| | | for (String code : nonNullList) { |
| | | String label = ImportFlagEnum.getDescByCode(code); |
| | | if (StringUtils.isNotEmpty(label)) { |
| | | labelBuilder.append(label).append(","); |
| | | } |
| | | } |
| | | importanceFlagLabel = StringUtils.stripEnd(labelBuilder.toString(), ","); |
| | | } |
| | | |
| | | if (StringUtils.isNotEmpty(importanceFlagLabel)) { |
| | | applyInfo.put("importanceFlagCode", importanceFlagLabel); |
| | | } |
| | | } |
| | | } |
| | | //ç´§æ¥ç¨åº¦ç¼ç ï¼éè¿æä¸¾è½¬æ¢æè¿° |
| | | Object emergencyLevelCodeObj = data.get("emergencyLevelCode"); |
| | | if (emergencyLevelCodeObj != null) { |
| | | String emergencyLevelLabel = EmergencyLevelEnum.getDescByCode(emergencyLevelCodeObj.toString()); |
| | | if (StringUtils.isNotEmpty(emergencyLevelLabel)) { |
| | | applyInfo.put("emergencyLevelCode", emergencyLevelLabel); |
| | | } |
| | | } |
| | | } else { |
| | | log.error("ãhospitalizedApplyãæ¥å£è¿ådata䏿¯å¯¹è±¡ï¼applyId={}ï¼resultï¼{}", encounterSourceId, result); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("ãhospitalizedApplyãè§£æå
¥é¢ç³è¯·å详æ
失败ï¼applyId={}", encounterSourceId, e); |
| | | } |
| | | log.info("ãhospitalizedApplyãapplyId={}ï¼importanceFlagCode={}ï¼emergencyLevelCode={}", encounterSourceId, applyInfo.get("importanceFlagCode"), applyInfo.get("emergencyLevelCode")); |
| | | return applyInfo; |
| | | } |
| | | |
| | | /** |
| | |
| | | dto.setCostCategoryCode(getStringValue(dataItem, "costCategoryCode")); |
| | | dto.setCostNatureName(getStringValue(dataItem, "costNatureName")); |
| | | dto.setCostNatureCode(getStringValue(dataItem, "costNatureCode")); |
| | | dto.setEncounterSourceId(getStringValue(dataItem, "encounterSourceId")); |
| | | dto.setFurtherConsultationStatus(getIntegerValue(dataItem, "furtherConsultationStatus")); |
| | | Object mainDiagObj = dataItem.get("mainDischargeDiagnosis"); |
| | | if (mainDiagObj instanceof Map) { |
| | |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.DtoConversionUtils; |
| | | import com.ruoyi.common.utils.RSAPublicKeyExample; |
| | |
| | | public Map<String, Object> selectPatQuestionResult(ServiceSubTaskQueryReq serviceSubTaskQueryReq) { |
| | | log.info("selectPatQuesTionResultçå
¥å为ï¼{}", serviceSubTaskQueryReq); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if (serviceSubTaskQueryReq.getSubId() != null) { |
| | | ServiceSubtask serviceSubtask = serviceSubtaskMapper.selectServiceSubtaskById(serviceSubTaskQueryReq.getSubId()); |
| | | if (serviceSubtask.getSendstate() == 4L) { |
| | | log.info("æ£è
åä»»å¡ID为ï¼{}ï¼ç¶æä¸ºï¼{}", serviceSubTaskQueryReq.getSubId(), serviceSubtask.getSendstate()); |
| | | throw new BaseException("该任å¡ä¸æ§è¡"); |
| | | } |
| | | } |
| | | |
| | | //è·åæ¬æ¬¡çé®çç»æ |
| | | Map<String, Object> scriptInfoByCondition = serviceTaskService.getScriptInfoByCondition(serviceSubTaskQueryReq.getTaskid(), serviceSubTaskQueryReq.getPatid(), serviceSubTaskQueryReq.getIsFinish(), serviceSubTaskQueryReq.getPatfrom(), serviceSubTaskQueryReq.getSubId()); |
| | |
| | | import com.fasterxml.jackson.databind.JsonNode; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.google.gson.Gson; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.domain.entity.SysDept; |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import com.ruoyi.common.dx.MessageSend; |
| | |
| | | import com.ruoyi.system.domain.SysConfig; |
| | | import com.ruoyi.system.mapper.SysConfigMapper; |
| | | import com.ruoyi.system.service.ISysConfigService; |
| | | import com.smartor.common.DeepSeekApi; |
| | | import com.smartor.common.FtpService; |
| | | import com.smartor.common.MtSubmitSmUtil; |
| | | import com.smartor.common.ScheduleSubtaskBuilder; |
| | | import com.smartor.config.PhoneUtils; |
| | | import com.smartor.domain.DTO.ServiceSubtaskDetailDTO; |
| | | import com.smartor.domain.*; |
| | |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.apache.commons.collections4.MapUtils; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.junit.Test; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | |
| | | @Autowired |
| | | private IServiceSubtaskDetailTraceService traceService; |
| | | |
| | | @Autowired |
| | | private IServiceTaskScheduleService serviceTaskScheduleService; |
| | | |
| | | @Autowired |
| | | private ScheduleSubtaskBuilder scheduleSubtaskBuilder; |
| | | |
| | | @Autowired |
| | | private FtpService ftpService; |
| | |
| | | serviceTaskoperService.insertServiceTaskoper(serviceTaskoper); |
| | | } |
| | | } |
| | | |
| | | } else if (serviceTaskVO.getAppltype().equals("5")) { |
| | | // ä»»å¡ç»ï¼å¿
é¡»ä¸ºé¿æä»»å¡ï¼å¦å findMatchingTaskIds æ«ä¸å°ï¼æ æ³èªå¨çº³å
¥æ°åºé¢æ£è
ï¼ |
| | | if (serviceTaskVO.getLongTask() == null || serviceTaskVO.getLongTask() != 1) { |
| | | throw new BaseException("appltype=5 ä»»å¡ç»å¿
é¡»ä¸ºé¿æä»»å¡ï¼longTask=1ï¼"); |
| | | } |
| | | // ä¿å计å + æç» |
| | | ServiceTaskScheduleVO scheduleVO = serviceTaskVO.getServiceTaskScheduleVO(); |
| | | if (scheduleVO == null) { |
| | | throw new BaseException("appltype=5 ä»»å¡ç»ï¼serviceTaskScheduleVO ä¸è½ä¸ºç©º"); |
| | | } |
| | | scheduleVO.setTaskid(serviceTask.getTaskid()); |
| | | scheduleVO.setOrgid(serviceTask.getOrgid()); |
| | | scheduleVO.setCampusid(serviceTask.getCampusid()); |
| | | scheduleVO.setCreateBy(serviceTask.getCreateBy()); |
| | | |
| | | scheduleVO.setDeptCodes(serviceTaskVO.getDeptcode()); |
| | | scheduleVO.setWardCodes(serviceTaskVO.getLeavehospitaldistrictcode()); |
| | | scheduleVO.setIcd10Codes(serviceTaskVO.getIcd10code()); |
| | | scheduleVO.setOplevelCodes(serviceTaskVO.getOplevelcode()); |
| | | |
| | | log.info("----serviceTaskScheduleçå¼ä¸ºï¼{}", scheduleVO); |
| | | serviceTaskScheduleService.saveScheduleWithDetail(scheduleVO); |
| | | } else { |
| | | ServiceTaskdept serviceTaskdept = new ServiceTaskdept(); |
| | | serviceTaskdept.setTaskId(serviceTask.getTaskid()); |
| | |
| | | serviceSubtask.setLongSendTime(patTaskRelevance.getLongSendTime()); |
| | | serviceSubtask.setVisitTime(patTaskRelevance.getVisittime()); |
| | | } |
| | | |
| | | // ===== appltype=5 ä»»å¡ç»ï¼æ schedule ç detailList æ´¾ç夿¡ subtask ===== |
| | | if ("5".equals(serviceTaskVO.getAppltype())) { |
| | | ServiceTaskSchedule schedule = serviceTaskScheduleService.selectByTaskid(serviceTask.getTaskid()); |
| | | if (schedule == null) { |
| | | throw new BaseException("appltype=5 ä»»å¡ç»ï¼æªæ¾å° taskid=" + serviceTask.getTaskid() + " ç计å"); |
| | | } |
| | | List<ServiceTaskScheduleDetail> detailList = |
| | | serviceTaskScheduleService.selectDetailByScheduleid(schedule.getId()); |
| | | scheduleSubtaskBuilder.buildSubtasksForPatient( |
| | | serviceTask, serviceTaskVO.getPreachformList(), schedule, detailList, patTaskRelevance, serviceSubtask); |
| | | continue; |
| | | } |
| | | |
| | | serviceSubtaskMapper.insertServiceSubtask(serviceSubtask); |
| | | serviceSubtask.getId().intValue(); |
| | | |
| | |
| | | } |
| | | } |
| | | } |
| | | } else if (serviceTaskVO.getAppltype().equals("5")) { |
| | | // ä»»å¡ç»ä¿®æ¹ï¼å æ§ schedule + æç»ï¼é建ãsubtask ä¸é¢å·²æ¹éæ¸
çã |
| | | if (serviceTaskVO.getLongTask() == null || serviceTaskVO.getLongTask() != 1) { |
| | | throw new BaseException("appltype=5 ä»»å¡ç»å¿
é¡»ä¸ºé¿æä»»å¡ï¼longTask=1ï¼"); |
| | | } |
| | | ServiceTaskScheduleVO scheduleVO = serviceTaskVO.getServiceTaskScheduleVO(); |
| | | if (scheduleVO == null) { |
| | | throw new BaseException("appltype=5 ä»»å¡ç»ï¼serviceTaskScheduleVO ä¸è½ä¸ºç©º"); |
| | | } |
| | | scheduleVO.setTaskid(serviceTask.getTaskid()); |
| | | scheduleVO.setOrgid(serviceTask.getOrgid()); |
| | | scheduleVO.setCampusid(serviceTask.getCampusid()); |
| | | scheduleVO.setDeptCodes(serviceTaskVO.getDeptcode()); |
| | | scheduleVO.setWardCodes(serviceTaskVO.getLeavehospitaldistrictcode()); |
| | | scheduleVO.setIcd10Codes(serviceTaskVO.getIcd10code()); |
| | | scheduleVO.setOplevelCodes(serviceTaskVO.getOplevelcode()); |
| | | scheduleVO.setCreateBy(serviceTask.getUpdateBy()); |
| | | serviceTaskScheduleService.saveScheduleWithDetail(scheduleVO); |
| | | } |
| | | } |
| | | if (ObjectUtils.isNotEmpty(serviceTaskVO.getIvrTaskTemplateVO())) { |
| | |
| | | serviceSubtask.setVisitTime(patTaskRelevance.getVisittime()); |
| | | serviceSubtask.setTextParam(new Gson().toJson(serviceTaskVO.getTextParam())); |
| | | if (patTaskRelevance.getIsoperation() != null) { |
| | | // appltype=5 ä»»å¡ç»ï¼è¿½å æ£è
ï¼isoperation=1ï¼èµ°è®¡åæ´¾çï¼ä¿®æ¹ï¼2ï¼/å é¤ï¼3ï¼ä»èµ°åé»è¾ |
| | | if ("5".equals(serviceTaskVO.getAppltype()) && patTaskRelevance.getIsoperation() == 1) { |
| | | ServiceTaskSchedule schedule = serviceTaskScheduleService.selectByTaskid(serviceTask.getTaskid()); |
| | | if (schedule == null) { |
| | | throw new BaseException("appltype=5 ä»»å¡ç»ï¼æªæ¾å° taskid=" + serviceTask.getTaskid() + " ç计å"); |
| | | } |
| | | List<ServiceTaskScheduleDetail> detailList = |
| | | serviceTaskScheduleService.selectDetailByScheduleid(schedule.getId()); |
| | | serviceSubtask.setUpdateBy(serviceTask.getUpdateBy()); |
| | | serviceSubtask.setCreateBy(serviceTask.getUpdateBy()); |
| | | scheduleSubtaskBuilder.buildSubtasksForPatient( |
| | | serviceTask, serviceTaskVO.getPreachformList(), schedule, detailList, patTaskRelevance, serviceSubtask); |
| | | continue; |
| | | } |
| | | if (patTaskRelevance.getIsoperation() == 2) { |
| | | serviceSubtask.setUpdateBy(serviceTask.getUpdateBy()); |
| | | serviceSubtaskMapper.updateServiceSubtaskByCondition(serviceSubtask); |
| | |
| | | map.put("taskId", serviceTask.getTaskid().intValue()); |
| | | return map; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void phoneCallBack(PhoneCallBackVO phoneCallBackVO) { |
| | |
| | | configVoiceMatchAi.setConfigKey("sys.voice.match.ai"); |
| | | SysConfig matchAi = sysConfigMapper.selectConfig(configVoiceMatchAi); |
| | | |
| | | // if (ObjectUtils.isNotEmpty(matchAi) && StringUtils.isNotEmpty(matchAi.getConfigValue()) |
| | | // && matchAi.getConfigValue().equals("1")) { |
| | | // PhoneCallBackYQVO aiMatchResult = AiMatch(phoneCallReqYQVO, phoneCallBackYQVO, |
| | | // ivrTaskTemplateScriptVO, serviceSubtask, ivrTaskTemplate, |
| | | // ivrTaskTemplateScripts, scriptId, flag); |
| | | // if(aiMatchResult != null){ |
| | | // return aiMatchResult; |
| | | // } |
| | | // } else { |
| | | if (ObjectUtils.isNotEmpty(matchAi) && StringUtils.isNotEmpty(matchAi.getConfigValue()) |
| | | && matchAi.getConfigValue().equals("1")) { |
| | | PhoneCallBackYQVO aiMatchResult = AiMatch(phoneCallReqYQVO, phoneCallBackYQVO, |
| | | ivrTaskTemplateScriptVO, serviceSubtask, ivrTaskTemplate, |
| | | ivrTaskTemplateScripts, scriptId, flag, phoneCallReqYQVO.getUuid()); |
| | | if(aiMatchResult != null){ |
| | | return aiMatchResult; |
| | | } |
| | | } else { |
| | | //æ¯éæ©é¢ |
| | | for (int j = 0; j < ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().size(); j++) { |
| | | log.error("phoneCallReqYQVO.getAsrtext()çå¼ä¸ºï¼{}", phoneCallReqYQVO.getAsrtext()); |
| | |
| | | continue; |
| | | } |
| | | } |
| | | // } |
| | | } |
| | | //齿²¡æå¹é
å° |
| | | if (StringUtils.isEmpty(phoneCallBackYQVO.getValue())) { |
| | | log.info("齿²¡æå¹é
å°-------------------------"); |
| | |
| | | @Cacheable(value = "sfStatistics", key = "T(org.springframework.util.DigestUtils).md5DigestAsHex(#serviceSubtaskCountReq.toString().getBytes())", unless = "#result == null or #result.isEmpty()") |
| | | public List<ServiceSubtaskStatistic> getSfStatistics(ServiceSubtaskCountReq serviceSubtaskCountReq) { |
| | | log.info("getSfStatisticsçå
¥å为ï¼{}", serviceSubtaskCountReq); |
| | | String groupKey = "drcode"; |
| | | String drcode = "drcode"; |
| | | //ç¼äºäººæ° æ ¹æ®ç»ç®¡å»çåç» |
| | | if(serviceSubtaskCountReq.getOrgid().equals("47246116333112211A1001")){ |
| | | drcode = "management_doctor_code"; |
| | | } |
| | | String groupKey = drcode; |
| | | if (serviceSubtaskCountReq.getStatisticaltype() != null && serviceSubtaskCountReq.getStatisticaltype() == 1) { |
| | | if (serviceSubtaskCountReq.getDrcode() != null && !serviceSubtaskCountReq.getDrcode().isEmpty()) { |
| | | groupKey = "drcode"; |
| | | groupKey = drcode; |
| | | } else { |
| | | groupKey = "leavehospitaldistrictcode"; |
| | | } |
| | | } else if (serviceSubtaskCountReq.getStatisticaltype() != null && serviceSubtaskCountReq.getStatisticaltype() == 2) { |
| | | if (serviceSubtaskCountReq.getDrcode() != null && !serviceSubtaskCountReq.getDrcode().isEmpty()) { |
| | | groupKey = "drcode"; |
| | | groupKey = drcode; |
| | | } else { |
| | | groupKey = "deptcode"; |
| | | } |
| | |
| | | serviceSubtaskCountReq.setGroupKeyList(groupKeyList); |
| | | List<ServiceSubtask> rawData = serviceSubtaskMapper.getSfStatistics(serviceSubtaskCountReq); |
| | | switch (groupKey) { |
| | | case "deptcode": |
| | | collect = rawData.stream().collect(Collectors.groupingBy(subtask -> Optional.ofNullable(subtask.getDeptcode()).orElse("Unknown"))); |
| | | break; |
| | | case "drcode": |
| | | collect = rawData.stream().collect(Collectors.groupingBy(subtask -> Optional.ofNullable(subtask.getDrcode()).orElse("Unknown"))); |
| | | break; |
| | | case "management_doctor_code": |
| | | collect = rawData.stream().collect(Collectors.groupingBy(subtask -> Optional.ofNullable(subtask.getManagementDoctorCode()).orElse("Unknown"))); |
| | | break; |
| | | case "deptcode": |
| | | collect = rawData.stream().collect(Collectors.groupingBy(subtask -> Optional.ofNullable(subtask.getDeptcode()).orElse("Unknown"))); |
| | | break; |
| | | case "leavehospitaldistrictcode": |
| | | collect = rawData.stream().collect(Collectors.groupingBy(subtask -> Optional.ofNullable(subtask.getLeavehospitaldistrictcode()).orElse("Unknown"))); |
| | |
| | | * @param options |
| | | * @return |
| | | */ |
| | | public Integer matchOptionIndex(String questionText, String voiceText, List<IvrTaskTemplateTargetoption> options){ |
| | | public Integer matchOptionIndex(String questionText, String voiceText, List<IvrTaskTemplateTargetoption> options, String uuid){ |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.put("userQuestion",questionText); |
| | | jsonObject.put("userAnswer",voiceText); |
| | | jsonObject.put("options", options); |
| | | jsonObject.put("uuid", uuid); |
| | | String jsonString = jsonObject.toJSONString(); |
| | | String result = null; |
| | | |
| | |
| | | |
| | | public PhoneCallBackYQVO AiMatch(PhoneCallReqYQVO phoneCallReqYQVO, PhoneCallBackYQVO phoneCallBackYQVO, |
| | | IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO, ServiceSubtask serviceSubtask, IvrTaskTemplate ivrTaskTemplate, |
| | | List<IvrTaskTemplateScript> ivrTaskTemplateScripts, String scriptId, Integer flag){ |
| | | List<IvrTaskTemplateScript> ivrTaskTemplateScripts, String scriptId, Integer flag, String uuid){ |
| | | PhoneCallBackYQVO back = null; |
| | | List<IvrTaskTemplateTargetoption> options = ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList(); |
| | | String voiceText = phoneCallReqYQVO.getAsrtext(); |
| | | String questionText = StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrtext()) ? ivrTaskTemplateScriptVO.getIvrtext() : ivrTaskTemplateScriptVO.getScriptContent(); |
| | | Integer matched = -1; |
| | | matched = matchOptionIndex(questionText, voiceText, options); |
| | | matched = matchOptionIndex(questionText, voiceText, options, uuid); |
| | | //说æå¹é
æ£ç¡®äº |
| | | if(matched != null && matched >= 0){ |
| | | IvrTaskTemplateTargetoption chosenOption = options.get(matched); |
| | |
| | | ivrTaskTemplateTargetoption3.setTargetvalue("å
¶ä»"); |
| | | options.add(ivrTaskTemplateTargetoption3); |
| | | |
| | | Integer matched = matchOptionIndex(questionText,voiceText,options); |
| | | Integer matched = matchOptionIndex(questionText,voiceText,options,"1"); |
| | | if(ObjectUtils.isNotEmpty(matched)){ |
| | | if(matched >= 0){ |
| | | matchedText = options.get(matched).getTargetvalue(); |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.service.impl; |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.spring.SpringUtils; |
| | | import com.smartor.domain.ServiceSubtask; |
| | | import com.smartor.domain.ServiceSubtaskPreachform; |
| | | import com.smartor.domain.ServiceTaskSchedule; |
| | | import com.smartor.domain.ServiceTaskScheduleDetail; |
| | | import com.smartor.domain.ServiceTaskScheduleVO; |
| | | import com.smartor.mapper.ServiceSubtaskMapper; |
| | | import com.smartor.mapper.ServiceSubtaskPreachformMapper; |
| | | import com.smartor.mapper.ServiceTaskScheduleDetailMapper; |
| | | import com.smartor.mapper.ServiceTaskScheduleMapper; |
| | | import com.smartor.service.IServiceTaskScheduleService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * é访任å¡è®¡å Service å®ç° |
| | | * |
| | | * @author smartor |
| | | * @date 2026-06-30 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ServiceTaskScheduleServiceImpl implements IServiceTaskScheduleService { |
| | | |
| | | @Autowired |
| | | private ServiceTaskScheduleMapper serviceTaskScheduleMapper; |
| | | |
| | | @Autowired |
| | | private ServiceTaskScheduleDetailMapper serviceTaskScheduleDetailMapper; |
| | | |
| | | @Autowired |
| | | private ServiceSubtaskMapper serviceSubtaskMapper; |
| | | |
| | | @Autowired |
| | | private ServiceSubtaskPreachformMapper serviceSubtaskPreachformMapper; |
| | | |
| | | /** 忬¡æ«æçæå¤§è®¡åæ°ï¼é¿å
é¿äºå¡ã */ |
| | | private static final int ROLL_BATCH_LIMIT = 200; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public ServiceTaskSchedule saveScheduleWithDetail(ServiceTaskScheduleVO vo) { |
| | | if (vo == null || vo.getTaskid() == null) { |
| | | throw new BaseException("ä»»å¡è®¡åå
¥åéæ³ï¼taskid ä¸è½ä¸ºç©º"); |
| | | } |
| | | if (CollectionUtils.isEmpty(vo.getDetailList())) { |
| | | throw new BaseException("ä»»å¡è®¡åæç»ä¸è½ä¸ºç©ºï¼è³å°ä¸æ¡ detailï¼"); |
| | | } |
| | | |
| | | // 1. æ§è®¡å软å |
| | | serviceTaskScheduleMapper.deleteByTaskid(vo.getTaskid()); |
| | | serviceTaskScheduleDetailMapper.deleteByTaskid(vo.getTaskid()); |
| | | |
| | | // 2. 主计åè½åº |
| | | Date now = DateUtils.getNowDate(); |
| | | ServiceTaskSchedule schedule = new ServiceTaskSchedule(); |
| | | // æ·è´ç¶ç±»ï¼ServiceTaskScheduleï¼å段 |
| | | schedule.setTaskid(vo.getTaskid()); |
| | | schedule.setMaxLoopCount(vo.getMaxLoopCount()); |
| | | schedule.setCurrentLoopCount(vo.getCurrentLoopCount() == null ? 0L : vo.getCurrentLoopCount()); |
| | | schedule.setCurrentSeq(vo.getCurrentSeq() == null ? 0 : vo.getCurrentSeq()); |
| | | schedule.setNextSeq(vo.getNextSeq() == null ? 1 : vo.getNextSeq()); |
| | | schedule.setScheduleStyle(vo.getScheduleStyle() == null ? 0 : vo.getScheduleStyle()); |
| | | schedule.setScheduleTimeNum(vo.getScheduleTimeNum() == null ? 0 : vo.getScheduleTimeNum()); |
| | | schedule.setScheduleTimeUnit(vo.getScheduleTimeUnit() == null ? 0 : vo.getScheduleTimeUnit()); |
| | | schedule.setNextExecuteTime(vo.getNextExecuteTime()); |
| | | schedule.setScheduleBenchmark(vo.getScheduleBenchmark() == null ? 0 : vo.getScheduleBenchmark()); |
| | | schedule.setScheduleBenchmarkCustomTime(vo.getScheduleBenchmarkCustomTime()); |
| | | schedule.setRemark(vo.getRemark()); |
| | | schedule.setDelFlag("0"); |
| | | schedule.setCreateBy(vo.getCreateBy()); |
| | | schedule.setUpdateBy(vo.getCreateBy()); |
| | | schedule.setCreateTime(now); |
| | | schedule.setUpdateTime(now); |
| | | schedule.setOrgid(vo.getOrgid()); |
| | | schedule.setCampusid(vo.getCampusid()); |
| | | serviceTaskScheduleMapper.insertServiceTaskSchedule(schedule); |
| | | |
| | | // 3. æç»è½åº |
| | | List<ServiceTaskScheduleDetail> detailList = vo.getDetailList(); |
| | | int seq = 1; |
| | | for (ServiceTaskScheduleDetail detail : detailList) { |
| | | detail.setTaskid(vo.getTaskid()); |
| | | detail.setScheduleid(schedule.getId()); |
| | | if (detail.getSeq() == null) { |
| | | detail.setSeq(seq); |
| | | } |
| | | if (detail.getDayOffset() == null) { |
| | | throw new BaseException("计åæç» seq=" + detail.getSeq() + " ç dayOffset ä¸è½ä¸ºç©º"); |
| | | } |
| | | detail.setDelFlag("0"); |
| | | detail.setCreateBy(vo.getCreateBy()); |
| | | detail.setUpdateBy(vo.getCreateBy()); |
| | | detail.setCreateTime(now); |
| | | detail.setUpdateTime(now); |
| | | detail.setOrgid(vo.getOrgid()); |
| | | detail.setCampusid(vo.getCampusid()); |
| | | seq++; |
| | | } |
| | | serviceTaskScheduleDetailMapper.batchInsertServiceTaskScheduleDetail(detailList); |
| | | |
| | | log.info("[ä»»å¡ç»] taskid={} 计åä¿å宿, scheduleId={}, detail æ¡æ°={}", |
| | | vo.getTaskid(), schedule.getId(), detailList.size()); |
| | | return schedule; |
| | | } |
| | | |
| | | @Override |
| | | public ServiceTaskScheduleVO getScheduleByTaskid(Long taskid) { |
| | | ServiceTaskSchedule schedule = serviceTaskScheduleMapper.selectByTaskid(taskid); |
| | | if (schedule == null) { |
| | | return null; |
| | | } |
| | | ServiceTaskScheduleVO vo = new ServiceTaskScheduleVO(); |
| | | vo.setId(schedule.getId()); |
| | | vo.setTaskid(schedule.getTaskid()); |
| | | vo.setMaxLoopCount(schedule.getMaxLoopCount()); |
| | | vo.setCurrentLoopCount(schedule.getCurrentLoopCount()); |
| | | vo.setCurrentSeq(schedule.getCurrentSeq()); |
| | | vo.setNextSeq(schedule.getNextSeq()); |
| | | vo.setScheduleStyle(schedule.getScheduleStyle()); |
| | | vo.setScheduleTimeNum(schedule.getScheduleTimeNum()); |
| | | vo.setScheduleTimeUnit(schedule.getScheduleTimeUnit()); |
| | | vo.setNextExecuteTime(schedule.getNextExecuteTime()); |
| | | vo.setScheduleBenchmark(schedule.getScheduleBenchmark()); |
| | | vo.setScheduleBenchmarkCustomTime(schedule.getScheduleBenchmarkCustomTime()); |
| | | vo.setRemark(schedule.getRemark()); |
| | | vo.setOrgid(schedule.getOrgid()); |
| | | vo.setCampusid(schedule.getCampusid()); |
| | | vo.setDetailList(serviceTaskScheduleDetailMapper.selectByScheduleid(schedule.getId())); |
| | | return vo; |
| | | } |
| | | |
| | | @Override |
| | | public ServiceTaskSchedule selectByTaskid(Long taskid) { |
| | | return serviceTaskScheduleMapper.selectByTaskid(taskid); |
| | | } |
| | | |
| | | @Override |
| | | public List<ServiceTaskScheduleDetail> selectDetailByScheduleid(Long scheduleid) { |
| | | return serviceTaskScheduleDetailMapper.selectByScheduleid(scheduleid); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int removeByTaskid(Long taskid) { |
| | | int n = serviceTaskScheduleMapper.deleteByTaskid(taskid); |
| | | serviceTaskScheduleDetailMapper.deleteByTaskid(taskid); |
| | | return n; |
| | | } |
| | | |
| | | @Override |
| | | public int rollCycleTasks() { |
| | | List<ServiceTaskSchedule> schedules = serviceTaskScheduleMapper.selectActiveCycleSchedules(ROLL_BATCH_LIMIT); |
| | | if (CollectionUtils.isEmpty(schedules)) { |
| | | return 0; |
| | | } |
| | | log.info("[ä»»å¡ç»-æ»å¨] æ«æå° {} 个å¾
è¯ä¼°ç循ç¯è®¡å", schedules.size()); |
| | | int rolled = 0; |
| | | for (ServiceTaskSchedule schedule : schedules) { |
| | | try { |
| | | // éè¿ AOP 代çè°ç¨ï¼ç¡®ä¿ @Transactional çæ |
| | | if (SpringUtils.getAopProxy(this).rollOneSchedule(schedule)) { |
| | | rolled++; |
| | | } |
| | | } catch (Exception e) { |
| | | // åæ¡å¤±è´¥ä¸å½±åå
¶å®è®¡åï¼è®°æ¥å¿ç»§ç» |
| | | log.error("[ä»»å¡ç»-æ»å¨] scheduleId={} æ»å¨å¤±è´¥ï¼{}", schedule.getId(), e.getMessage(), e); |
| | | } |
| | | } |
| | | log.info("[ä»»å¡ç»-æ»å¨] æ¬æ¬¡æ¨è¿ {} 个计å", rolled); |
| | | return rolled; |
| | | } |
| | | |
| | | /** |
| | | * å个计åçæ»å¨ï¼æ¬è½®å
¨é¨ finalize ææ¨è¿ï¼æ¯æ¬¡ä»
æ¨è¿ 1 è½®ã |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean rollOneSchedule(ServiceTaskSchedule schedule) { |
| | | Long scheduleId = schedule.getId(); |
| | | Long currentLoop = schedule.getCurrentLoopCount() == null ? 0L : schedule.getCurrentLoopCount(); |
| | | |
| | | // ä¸éæ ¡éª |
| | | Long max = schedule.getMaxLoopCount(); |
| | | if (max != null && max > 0 && currentLoop + 1 >= max) { |
| | | // 注æï¼å
夿"åå¼ä¸è½®æ¯å¦ä¼è¶
é"ââcurrentLoop æ¯å·²å®æè½®æ¬¡ï¼ä¸ä¸è½®å· = currentLoop+1 |
| | | // å½ currentLoop+1 == max æ¶æ£å¥½å¤äºæåä¸è½®ï¼ä¸åäº§çæ°ä¸è½® |
| | | if (currentLoop >= max) { |
| | | log.info("[ä»»å¡ç»-æ»å¨] scheduleId={} 已达 maxLoopCount={}, è·³è¿", scheduleId, max); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | // æ¬è½®æ¯å¦å®æ |
| | | int active = serviceSubtaskMapper.countActiveByScheduleIdAndLoop(scheduleId, currentLoop); |
| | | if (active > 0) { |
| | | log.debug("[ä»»å¡ç»-æ»å¨] scheduleId={} loop={} 仿 {} æ¡ subtask æªç»æ, è·³è¿", scheduleId, currentLoop, active); |
| | | return false; |
| | | } |
| | | |
| | | // ææ¬è½® subtask åå
鿍¡æ¿ï¼åå»éåçæ£è
éåï¼ |
| | | List<ServiceSubtask> currentLoopSubtasks = |
| | | serviceSubtaskMapper.selectByScheduleIdAndLoop(scheduleId, currentLoop); |
| | | if (CollectionUtils.isEmpty(currentLoopSubtasks)) { |
| | | log.warn("[ä»»å¡ç»-æ»å¨] scheduleId={} loop={} æ¾ä¸å°æ¬è½® subtask, è·³è¿", scheduleId, currentLoop); |
| | | return false; |
| | | } |
| | | |
| | | // ææ¬è®¡åæç»ï¼seq -> detailï¼ç¨æ¥å®ä½ä¸ä¸è½®æ¯æ¡ subtask ç¨åªä¸ªæ¨¡æ¿ |
| | | List<ServiceTaskScheduleDetail> detailList = |
| | | serviceTaskScheduleDetailMapper.selectByScheduleid(scheduleId); |
| | | if (CollectionUtils.isEmpty(detailList)) { |
| | | log.warn("[ä»»å¡ç»-æ»å¨] scheduleId={} æç»ä¸ºç©º, è·³è¿", scheduleId); |
| | | return false; |
| | | } |
| | | |
| | | // æ¨è¿æ¥é¿ï¼è½®é´éï¼ |
| | | int stepNum = schedule.getScheduleTimeNum() == null ? 0 : schedule.getScheduleTimeNum(); |
| | | int stepUnit = schedule.getScheduleTimeUnit() == null ? 1 : schedule.getScheduleTimeUnit(); |
| | | if (stepNum <= 0) { |
| | | log.warn("[ä»»å¡ç»-æ»å¨] scheduleId={} scheduleTimeNum={} éæ³, è·³è¿", scheduleId, stepNum); |
| | | return false; |
| | | } |
| | | |
| | | long nextLoop = currentLoop + 1; |
| | | |
| | | // æ patid+inhospid å»éï¼åæ£è
æ¬è½®å¯è½æ N æ¡ detailï¼æ¨¡æ¿ä»»éå
¶ä¸å³å¯ââå
éæ¶æ seq å¤ç¨æç»ï¼ |
| | | // 为ç®åï¼ç´æ¥æ schedule_seq å¤å¶ N æ¡ï¼æ¯æ¡ç¨å¯¹åº detailã |
| | | Date now = DateUtils.getNowDate(); |
| | | // æ detailList æ seq ç´¢å¼ |
| | | java.util.Map<Integer, ServiceTaskScheduleDetail> detailBySeq = new java.util.HashMap<>(detailList.size()); |
| | | for (ServiceTaskScheduleDetail d : detailList) { |
| | | detailBySeq.put(d.getSeq(), d); |
| | | } |
| | | |
| | | int produced = 0; |
| | | for (ServiceSubtask src : currentLoopSubtasks) { |
| | | ServiceTaskScheduleDetail detail = detailBySeq.get(src.getScheduleSeq()); |
| | | if (detail == null) { |
| | | log.warn("[ä»»å¡ç»-æ»å¨] scheduleId={} æ¾ä¸å° seq={} 对åºçæç», è·³è¿ subtask id={}", |
| | | scheduleId, src.getScheduleSeq(), src.getId()); |
| | | continue; |
| | | } |
| | | ServiceSubtask copy = cloneForNextLoop(src, detail, nextLoop, stepNum, stepUnit, now); |
| | | serviceSubtaskMapper.insertServiceSubtask(copy); |
| | | // å¤å¶ preachform |
| | | copyPreachform(src.getId(), copy); |
| | | produced++; |
| | | } |
| | | |
| | | // æ¨è¿ schedule ç current_loop_count / next_seq / next_execute_time |
| | | ServiceTaskSchedule upd = new ServiceTaskSchedule(); |
| | | upd.setId(scheduleId); |
| | | upd.setCurrentLoopCount(nextLoop); |
| | | upd.setCurrentSeq(1); |
| | | upd.setNextSeq(detailList.size() > 1 ? 2 : 1); |
| | | upd.setNextExecuteTime(advance(now, stepNum, stepUnit)); |
| | | upd.setUpdateTime(now); |
| | | serviceTaskScheduleMapper.updateServiceTaskSchedule(upd); |
| | | |
| | | log.info("[ä»»å¡ç»-æ»å¨] scheduleId={} æ¨è¿å°ç¬¬ {} è½®, æ°å»º {} æ¡ subtask", scheduleId, nextLoop, produced); |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * å
é subtask å°ä¸ä¸è½®ï¼æ¸
主é®ãæ¸
åç¾åæ®µãæ¨è¿ visit_timeã设置 loop_countã |
| | | */ |
| | | private ServiceSubtask cloneForNextLoop(ServiceSubtask src, ServiceTaskScheduleDetail detail, |
| | | long nextLoop, int stepNum, int stepUnit, Date now) { |
| | | ServiceSubtask copy = JSON.parseObject(JSON.toJSONString(src), ServiceSubtask.class); |
| | | copy.setId(null); |
| | | copy.setSenduuid(null); |
| | | copy.setResult(null); |
| | | copy.setFinishtime(null); |
| | | copy.setExrecallcount(null); |
| | | copy.setCurrentPreachform(null); |
| | | copy.setSendstate(2L); |
| | | copy.setLoopCount(nextLoop); |
| | | copy.setScheduleDetailId(detail.getId()); |
| | | // 模æ¿ï¼detail ä¼å
|
| | | if (detail.getTemplateid() != null) { |
| | | copy.setTemplateid(detail.getTemplateid()); |
| | | copy.setTemplatename(detail.getTemplatename()); |
| | | } |
| | | if (detail.getLibtemplateid() != null) { |
| | | copy.setLibtemplateid(detail.getLibtemplateid()); |
| | | } |
| | | Date base = src.getVisitTime() != null ? src.getVisitTime() : now; |
| | | Date nextVisit = advance(base, stepNum, stepUnit); |
| | | copy.setVisitTime(nextVisit); |
| | | copy.setSenddate(nextVisit); |
| | | copy.setLongSendTime(nextVisit); |
| | | copy.setCreateTime(now); |
| | | copy.setUpdateTime(now); |
| | | return copy; |
| | | } |
| | | |
| | | /** |
| | | * å¤å¶æº subtask çåéæ¹å¼è¡å°æ° subtaskã |
| | | */ |
| | | private void copyPreachform(Long srcSubId, ServiceSubtask newSubtask) { |
| | | ServiceSubtaskPreachform q = new ServiceSubtaskPreachform(); |
| | | q.setSubid(srcSubId); |
| | | q.setTaskid(newSubtask.getTaskid()); |
| | | List<ServiceSubtaskPreachform> list = serviceSubtaskPreachformMapper.selectServiceSubtaskPreachformList(q); |
| | | if (CollectionUtils.isEmpty(list)) { |
| | | return; |
| | | } |
| | | for (ServiceSubtaskPreachform src : list) { |
| | | ServiceSubtaskPreachform pf = new ServiceSubtaskPreachform(); |
| | | pf.setSort(src.getSort()); |
| | | pf.setPreachform(src.getPreachform()); |
| | | pf.setCompensateTime(src.getCompensateTime()); |
| | | pf.setTaskid(newSubtask.getTaskid()); |
| | | pf.setSubid(newSubtask.getId()); |
| | | pf.setSendstate("1"); |
| | | pf.setOrgid(newSubtask.getOrgid()); |
| | | pf.setCreateTime(new Date()); |
| | | serviceSubtaskPreachformMapper.insertServiceSubtaskPreachform(pf); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æ schedule_time_unit æ¨è¿æ¶é´ï¼1-天 2-å¨ 3-æ 4-å¹´ |
| | | */ |
| | | private Date advance(Date base, int num, int unit) { |
| | | Calendar c = Calendar.getInstance(); |
| | | c.setTime(base); |
| | | switch (unit) { |
| | | case 2: |
| | | c.add(Calendar.WEEK_OF_YEAR, num); |
| | | break; |
| | | case 3: |
| | | c.add(Calendar.MONTH, num); |
| | | break; |
| | | case 4: |
| | | c.add(Calendar.YEAR, num); |
| | | break; |
| | | case 1: |
| | | default: |
| | | c.add(Calendar.DAY_OF_MONTH, num); |
| | | } |
| | | return c.getTime(); |
| | | } |
| | | } |
| | |
| | | <result property="inDeptcheckFlag" column="in_deptcheck_flag"/> |
| | | <result property="wardcheckFlag" column="wardcheck_flag"/> |
| | | <result property="diagcheckFlag" column="diagcheck_flag"/> |
| | | <result property="scheduleCheckFlag" column="schedulecheck_flag"/> |
| | | <result property="age" column="age"/> |
| | | <result property="sex" column="sex"/> |
| | | <result property="telcode" column="telcode"/> |
| | |
| | | <result property="managementDoctorCode" column="management_doctor_code"/> |
| | | <result property="campusid" column="campusid"/> |
| | | <result property="inhospMydFlag" column="inhosp_myd_flag"/> |
| | | <result property="encounterSourceId" column="encounter_source_id"/> |
| | | <result property="importanceFlagCode" column="importance_flag_code"/> |
| | | <result property="emergencyLevelCode" column="emergency_level_code"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectPatMedInhospVo"> |
| | | select inhospid, |
| | | encounter_source_id, |
| | | importance_flag_code, |
| | | emergency_level_code, |
| | | patname, |
| | | inhosp_myd_flag, |
| | | campusid, |
| | |
| | | in_deptcheck_flag, |
| | | in_wardcheck_flag, |
| | | diagcheck_flag, |
| | | schedulecheck_flag, |
| | | inhospstate, |
| | | patno, |
| | | long_task_reason, |
| | |
| | | b.in_deptcheck_flag, |
| | | b.in_wardcheck_flag, |
| | | b.diagcheck_flag, |
| | | b.schedulecheck_flag, |
| | | b.inhospstate, |
| | | b.patno, |
| | | b.inhospno, |
| | |
| | | b.fuadvice, |
| | | b.fuspecialadvice, |
| | | b.inhosp_myd_flag, |
| | | b.encounter_source_id, |
| | | b.importance_flag_code, |
| | | b.emergency_level_code, |
| | | a.idcardno |
| | | FROM |
| | | pat_med_inhosp b |
| | |
| | | <if test="nurseId != null ">and b.nurse_id = #{nurseId}</if> |
| | | <if test="nurseName != null and nurseName != ''">and b.nurse_name = #{nurseName}</if> |
| | | <if test="deptcheckFlag != null ">and b.deptcheck_flag = #{deptcheckFlag}</if> |
| | | <if test="scheduleCheckFlag != null ">and b.schedulecheck_flag = #{scheduleCheckFlag}</if> |
| | | <if test="wardcheckFlag != null ">and b.wardcheck_flag = #{wardcheckFlag}</if> |
| | | <if test="inDeptcheckFlag != null ">and b.in_deptcheck_flag = #{inDeptcheckFlag}</if> |
| | | <if test="inWardcheckFlag != null ">and b.in_wardcheck_flag = #{inWardcheckFlag}</if> |
| | | <if test="diagcheckFlag != null ">and b.diagcheck_flag = #{diagcheckFlag}</if> |
| | | <if test="encounterSourceId != null ">and b.encounter_source_id = #{encounterSourceId}</if> |
| | | <if test="importanceFlagCode != null ">and b.importance_flag_code = #{importanceFlagCode}</if> |
| | | <if test="emergencyLevelCode != null ">and b.emergency_level_code = #{emergencyLevelCode}</if> |
| | | <if test="cry != null and cry == 0 ">and b.endtime is null</if> |
| | | <if test="cry != null and cry == 1 ">and b.inhospstate=1</if> |
| | | <if test="cry != null and cry == 2 ">and b.inhospstate=2</if> |
| | |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | <if test="icd10codeList != null and icd10codeList.size()>0"> |
| | | AND b.leaveicd10code IN |
| | | <foreach collection="icd10codeList" item="icd10code" open="(" separator="," |
| | | close=")"> |
| | | #{icd10code} |
| | | </foreach> |
| | | </if> |
| | | GROUP BY |
| | | b.inhospid, |
| | | a.age, |
| | |
| | | select |
| | | b.inhospid, |
| | | b.nurse_id, |
| | | b.encounter_source_id, |
| | | b.importance_flag_code, |
| | | b.emergency_level_code, |
| | | b.nurse_name, |
| | | b.patname, |
| | | b.management_doctor, |
| | |
| | | b.in_deptcheck_flag, |
| | | b.in_wardcheck_flag, |
| | | b.diagcheck_flag, |
| | | b.schedulecheck_flag, |
| | | b.inhospstate, |
| | | b.patno, |
| | | b.inhospno, |
| | |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="encounterSourceId != null and encounterSourceId != ''"> |
| | | and b.encounter_source_id = #{encounterSourceId} |
| | | </if> |
| | | <if test="importanceFlagCode != null and importanceFlagCode != ''"> |
| | | and b.importance_flag_code = #{importanceFlagCode} |
| | | </if> |
| | | <if test="emergencyLevelCode != null and emergencyLevelCode != ''"> |
| | | and b.emergency_level_code = #{emergencyLevelCode} |
| | | </if> |
| | | <if test="serialnum != null and serialnum != ''"> |
| | | and b.serialnum = #{serialnum} |
| | | </if> |
| | |
| | | select CONCAT( a.age, a.age_unit ) AS age, |
| | | a.telcode as telcode, |
| | | b.inhospid, |
| | | b.encounter_source_id, |
| | | b.importance_flag_code, |
| | | b.emergency_level_code, |
| | | b.management_doctor, |
| | | b.management_doctor_code, |
| | | b.patname, |
| | |
| | | and a.id = b.patid |
| | | AND a.idcardno != '' |
| | | <if test="inhospMydFlag != null ">and b.inhosp_myd_flag = #{inhospMydFlag}</if> |
| | | <if test="encounterSourceId != null and encounterSourceId != ''"> |
| | | and b.encounter_source_id = #{encounterSourceId} |
| | | </if> |
| | | <if test="importanceFlagCode != null and importanceFlagCode != ''"> |
| | | and b.importance_flag_code = #{importanceFlagCode} |
| | | </if> |
| | | <if test="emergencyLevelCode != null and emergencyLevelCode != ''"> |
| | | and b.emergency_level_code = #{emergencyLevelCode} |
| | | </if> |
| | | <if test="orgid != null and orgid != ''"> |
| | | and a.orgid = #{orgid} |
| | | </if> |
| | |
| | | <if test="campusid != null ">and b.campusid = #{campusid}</if> |
| | | <if test="diagcheckFlag != null ">and b.diagcheck_flag = #{diagcheckFlag}</if> |
| | | <if test="deptcheckFlag != null ">and b.deptcheck_flag = #{deptcheckFlag}</if> |
| | | <if test="scheduleCheckFlag != null ">and b.schedulecheck_flag = #{scheduleCheckFlag}</if> |
| | | <if test="wardcheckFlag != null ">and b.wardcheck_flag = #{wardcheckFlag}</if> |
| | | <if test="inDeptcheckFlag != null ">and b.in_deptcheck_flag = #{inDeptcheckFlag}</if> |
| | | <if test="inWardcheckFlag != null ">and b.in_wardcheck_flag = #{inWardcheckFlag}</if> |
| | |
| | | <if test="managementDoctor != null ">and management_doctor = #{managementDoctor}</if> |
| | | <if test="managementDoctorCode != null ">and management_doctor_code = #{managementDoctorCode}</if> |
| | | <if test="campusid != null ">and campusid = #{campusid}</if> |
| | | <if test="importanceFlagCode != null ">and importance_flag_code = #{importanceFlagCode}</if> |
| | | <if test="emergencyLevelCode != null ">and emergency_level_code = #{emergencyLevelCode}</if> |
| | | <if test="encounterSourceId != null ">and encounter_source_id = #{encounterSourceId}</if> |
| | | </select> |
| | | |
| | | |
| | |
| | | <if test="managementDoctorCode != null ">management_doctor_code,</if> |
| | | <if test="campusid != null ">campusid,</if> |
| | | <if test="inhospMydFlag != null ">inhosp_myd_flag,</if> |
| | | <if test="importanceFlagCode != null ">importance_flag_code,</if> |
| | | <if test="emergencyLevelCode != null ">emergency_level_code,</if> |
| | | <if test="encounterSourceId != null ">encounter_source_id,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="serialnum != null">#{serialnum},</if> |
| | |
| | | <if test="managementDoctor != null ">#{managementDoctor},</if> |
| | | <if test="managementDoctorCode != null ">#{managementDoctorCode},</if> |
| | | <if test="campusid != null ">#{campusid},</if> |
| | | <if test="inhospMydFlag != null ">#{inhospMydFlag},</if> |
| | | <if test="importanceFlagCode != null ">#{importanceFlagCode},</if> |
| | | <if test="emergencyLevelCode != null ">#{emergencyLevelCode},</if> |
| | | <if test="encounterSourceId != null ">#{encounterSourceId},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | nurse_id, nurse_name, out_way_id, out_way_name, guid, |
| | | operator, operator_id, inhospno, remark, |
| | | fuflag, fudate, fuperiod, futypecode, futypedesc, fuadvice, fuspecialadvice, management_doctor, |
| | | management_doctor_doctor,campusid, inhosp_myd_flag |
| | | management_doctor_doctor,campusid, inhosp_myd_flag, importance_flag_code, emergency_level_code, encounter_source_id |
| | | ) |
| | | values |
| | | <foreach collection="list" item="item" separator=","> |
| | |
| | | #{item.nurseId}, #{item.nurseName}, #{item.outWayId}, #{item.outWayName}, #{item.guid}, |
| | | #{item.operator}, #{item.operatorId}, #{item.inhospno}, #{item.remark}, |
| | | #{item.fuflag}, #{item.fudate}, #{item.fuperiod}, #{item.futypecode}, #{item.futypedesc}, #{item.fuadvice}, |
| | | #{item.fuspecialadvice}, #{item.managementDoctor}, #{item.managementDoctorCode}, #{item.campusid}, #{item.inhospMydFlag} |
| | | #{item.fuspecialadvice}, #{item.managementDoctor}, #{item.managementDoctorCode}, #{item.campusid}, #{item.inhospMydFlag}, |
| | | #{item.importanceFlagCode}, #{item.emergencyLevelCode}, #{item.encounterSourceId} |
| | | ) |
| | | </foreach> |
| | | </insert> |
| | |
| | | <if test="patno != null">patno = #{patno},</if> |
| | | <if test="inhospstate != null">inhospstate = #{inhospstate},</if> |
| | | <if test="deptcheckFlag != null">deptcheck_flag = #{deptcheckFlag},</if> |
| | | <if test="scheduleCheckFlag != null">schedulecheck_flag = #{scheduleCheckFlag},</if> |
| | | <if test="wardcheckFlag != null">wardcheck_flag = #{wardcheckFlag},</if> |
| | | <if test="inDeptcheckFlag != null">in_deptcheck_flag = #{inDeptcheckFlag},</if> |
| | | <if test="inWardcheckFlag != null">in_wardcheck_flag = #{inWardcheckFlag},</if> |
| | |
| | | <if test="managementDoctorCode != null ">management_doctor_code = #{managementDoctorCode},</if> |
| | | <if test="campusid != null ">campusid = #{campusid},</if> |
| | | <if test="inhospMydFlag != null ">inhosp_myd_flag = #{inhospMydFlag},</if> |
| | | <if test="importanceFlagCode != null ">importance_flag_code = #{importanceFlagCode},</if> |
| | | <if test="emergencyLevelCode != null ">emergency_level_code = #{emergencyLevelCode},</if> |
| | | <if test="encounterSourceId != null ">encounter_source_id = #{encounterSourceId},</if> |
| | | </trim> |
| | | where inhospid = #{inhospid} |
| | | </update> |
| | |
| | | <if test="patid != null"> |
| | | and pmo.patid = #{patid} |
| | | </if> |
| | | <if test="deptCodes != null and deptCodes.size()>0"> |
| | | AND pmo.deptcode IN |
| | | <foreach collection="deptCodes" item="deptcode" open="(" separator="," |
| | | close=")"> |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | <if test="wardCodes != null and wardCodes.size()>0"> |
| | | AND pmo.hospitaldistrictcode IN |
| | | <foreach collection="wardCodes" item="wardCode" open="(" separator="," |
| | | close=")"> |
| | | #{wardCode} |
| | | </foreach> |
| | | </if> |
| | | <if test="opLevelCodes != null and opLevelCodes.size()>0"> |
| | | AND pmoi.oplevelcode IN |
| | | <foreach collection="opLevelCodes" item="levelCode" open="(" separator="," |
| | | close=")"> |
| | | #{levelCode} |
| | | </foreach> |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <result property="continueCount" column="continue_count"/> |
| | | <result property="continueTimeNext" column="continue_time_next"/> |
| | | <result property="operationItemId" column="operation_item_id"/> |
| | | <result property="scheduleId" column="schedule_id"/> |
| | | <result property="scheduleDetailId" column="schedule_detail_id"/> |
| | | <result property="scheduleSeq" column="schedule_seq"/> |
| | | <result property="loopCount" column="loop_count"/> |
| | | </resultMap> |
| | | |
| | | <resultMap type="com.smartor.domain.ServiceSubtaskCount" id="ServiceSubtaskResult2"> |
| | |
| | | continue_count, |
| | | continue_time_next, |
| | | operation_item_id, |
| | | schedule_id, |
| | | schedule_detail_id, |
| | | schedule_seq, |
| | | loop_count, |
| | | task_situation |
| | | from service_subtask |
| | | </sql> |
| | |
| | | <if test="continueTimeNext != null ">continue_time_next,</if> |
| | | <if test="continueContent != null ">continue_content,</if> |
| | | <if test="operationItemId != null ">operation_item_id,</if> |
| | | <if test="scheduleId != null ">schedule_id,</if> |
| | | <if test="scheduleDetailId != null ">schedule_detail_id,</if> |
| | | <if test="scheduleSeq != null ">schedule_seq,</if> |
| | | <if test="loopCount != null ">loop_count,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="sendname != null">#{sendname},</if> |
| | |
| | | <if test="continueTimeNext != null ">#{continueTimeNext,jdbcType=TIMESTAMP},</if> |
| | | <if test="continueContent != null ">#{continueContent},</if> |
| | | <if test="operationItemId != null ">#{operationItemId},</if> |
| | | <if test="scheduleId != null ">#{scheduleId},</if> |
| | | <if test="scheduleDetailId != null ">#{scheduleDetailId},</if> |
| | | <if test="scheduleSeq != null ">#{scheduleSeq},</if> |
| | | <if test="loopCount != null ">#{loopCount},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="continueTimeNext != null ">continue_time_next = #{continueTimeNext,jdbcType=TIMESTAMP},</if> |
| | | <if test="continueContent != null ">continue_content = #{continueContent},</if> |
| | | <if test="operationItemId != null ">operation_item_id = #{operationItemId},</if> |
| | | <if test="scheduleId != null ">schedule_id = #{scheduleId},</if> |
| | | <if test="scheduleDetailId != null ">schedule_detail_id = #{scheduleDetailId},</if> |
| | | <if test="scheduleSeq != null ">schedule_seq = #{scheduleSeq},</if> |
| | | <if test="loopCount != null ">loop_count = #{loopCount},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | orgid, |
| | | drcode, |
| | | drname, |
| | | management_doctor_code, |
| | | management_doctor, |
| | | leavehospitaldistrictcode, |
| | | leavehospitaldistrictname, |
| | | deptcode, |
| | |
| | | <if test="sendstate != null"> |
| | | AND sendstate = #{sendstate} |
| | | </if> |
| | | <if test="isFinished != null and isFinished == '1'"> |
| | | AND finishtime is not null |
| | | <if test="isFinished != null and isFinished != ''"> |
| | | and finishtime is not null |
| | | </if> |
| | | <if test="starttime != null">AND starttime >= #{starttime}</if> |
| | | <if test="endtime != null">AND endtime <= #{endtime}</if> |
| | |
| | | </choose> |
| | | </select> |
| | | |
| | | <select id="gethelibraryCountHyperlink" parameterType="com.smartor.domain.ServiceSubtaskCountReq" |
| | | <!-- ä»»å¡ç»ï¼appltype=5ï¼æ»å¨è°åº¦ç¨ï¼æ¬è½®ä»å¨è·çæ°é --> |
| | | <select id="countActiveByScheduleIdAndLoop" resultType="int"> |
| | | select count(1) |
| | | from service_subtask |
| | | where schedule_id = #{scheduleId} |
| | | and loop_count = #{loopCount} |
| | | and (del_flag is null or del_flag = '0') |
| | | and sendstate in (1, 2, 3) |
| | | </select> |
| | | |
| | | <!-- ä»»å¡ç»ï¼appltype=5ï¼æ»å¨è°åº¦ç¨ï¼ææ¬è½®å
¨é subtaskï¼ä½ä¸ºä¸ä¸è½®çå
鿍¡æ¿ --> |
| | | <select id="selectByScheduleIdAndLoop" resultMap="ServiceSubtaskResult"> |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | where schedule_id = #{scheduleId} |
| | | and loop_count = #{loopCount} |
| | | and (del_flag is null or del_flag = '0') |
| | | order by schedule_seq asc, id asc |
| | | </select> |
| | | |
| | | <select id="gethelibraryCountHyperlink" parameterType="com.smartor.domain.VO.HeLibraryCountVO" |
| | | resultMap="ServiceSubtaskResult"> |
| | | select id, |
| | | visit_count, |
| | |
| | | <if test="sendstate != null"> |
| | | AND sendstate = #{sendstate} |
| | | </if> |
| | | <if test="isFinished != null and isFinished == '1'"> |
| | | AND finishtime is not null |
| | | <if test="isFinished != null and isFinished != ''"> |
| | | and finishtime is not null |
| | | </if> |
| | | <if test="hospitaldistrictcodes != null and hospitaldistrictcodes.size() > 0"> |
| | | AND leavehospitaldistrictcode IN |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.ServiceTaskScheduleDetailMapper"> |
| | | |
| | | <resultMap type="com.smartor.domain.ServiceTaskScheduleDetail" id="ServiceTaskScheduleDetailResult"> |
| | | <id property="id" column="id"/> |
| | | <result property="taskid" column="taskid"/> |
| | | <result property="scheduleid" column="scheduleid"/> |
| | | <result property="seq" column="seq"/> |
| | | <result property="dayOffset" column="day_offset"/> |
| | | <result property="templateid" column="templateid"/> |
| | | <result property="libtemplateid" column="libtemplateid"/> |
| | | <result property="templatename" column="templatename"/> |
| | | <result property="content" column="content"/> |
| | | <result property="nextExecuteTime" column="next_execute_time"/> |
| | | <result property="remark" column="remark"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="orgid" column="orgid"/> |
| | | <result property="campusid" column="campusid"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectServiceTaskScheduleDetailVo"> |
| | | select id, |
| | | taskid, |
| | | scheduleid, |
| | | seq, |
| | | day_offset, |
| | | templateid, |
| | | libtemplateid, |
| | | templatename, |
| | | content, |
| | | next_execute_time, |
| | | remark, |
| | | del_flag, |
| | | create_by, |
| | | create_time, |
| | | update_by, |
| | | update_time, |
| | | orgid, |
| | | campusid |
| | | from service_task_schedule_detail |
| | | </sql> |
| | | |
| | | <select id="selectServiceTaskScheduleDetailById" parameterType="Long" |
| | | resultMap="ServiceTaskScheduleDetailResult"> |
| | | <include refid="selectServiceTaskScheduleDetailVo"/> |
| | | where id = #{id} and del_flag = '0' |
| | | </select> |
| | | |
| | | <select id="selectServiceTaskScheduleDetailList" |
| | | parameterType="com.smartor.domain.ServiceTaskScheduleDetail" |
| | | resultMap="ServiceTaskScheduleDetailResult"> |
| | | <include refid="selectServiceTaskScheduleDetailVo"/> |
| | | where del_flag = '0' |
| | | <if test="taskid != null">and taskid = #{taskid}</if> |
| | | <if test="scheduleid != null">and scheduleid = #{scheduleid}</if> |
| | | <if test="seq != null">and seq = #{seq}</if> |
| | | <if test="templateid != null">and templateid = #{templateid}</if> |
| | | order by seq asc |
| | | </select> |
| | | |
| | | <select id="selectByScheduleid" resultMap="ServiceTaskScheduleDetailResult"> |
| | | <include refid="selectServiceTaskScheduleDetailVo"/> |
| | | where scheduleid = #{scheduleid} and del_flag = '0' |
| | | order by seq asc |
| | | </select> |
| | | |
| | | <select id="selectByTaskid" resultMap="ServiceTaskScheduleDetailResult"> |
| | | <include refid="selectServiceTaskScheduleDetailVo"/> |
| | | where taskid = #{taskid} and del_flag = '0' |
| | | order by seq asc |
| | | </select> |
| | | |
| | | <insert id="insertServiceTaskScheduleDetail" parameterType="com.smartor.domain.ServiceTaskScheduleDetail" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into service_task_schedule_detail |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="taskid != null">taskid,</if> |
| | | <if test="scheduleid != null">scheduleid,</if> |
| | | <if test="seq != null">seq,</if> |
| | | <if test="dayOffset != null">day_offset,</if> |
| | | <if test="templateid != null">templateid,</if> |
| | | <if test="libtemplateid != null">libtemplateid,</if> |
| | | <if test="templatename != null">templatename,</if> |
| | | <if test="content != null">content,</if> |
| | | <if test="nextExecuteTime != null">next_execute_time,</if> |
| | | <if test="remark != null">remark,</if> |
| | | <if test="delFlag != null">del_flag,</if> |
| | | <if test="createBy != null">create_by,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateBy != null">update_by,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="orgid != null">orgid,</if> |
| | | <if test="campusid != null">campusid,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="taskid != null">#{taskid},</if> |
| | | <if test="scheduleid != null">#{scheduleid},</if> |
| | | <if test="seq != null">#{seq},</if> |
| | | <if test="dayOffset != null">#{dayOffset},</if> |
| | | <if test="templateid != null">#{templateid},</if> |
| | | <if test="libtemplateid != null">#{libtemplateid},</if> |
| | | <if test="templatename != null">#{templatename},</if> |
| | | <if test="content != null">#{content},</if> |
| | | <if test="nextExecuteTime != null">#{nextExecuteTime},</if> |
| | | <if test="remark != null">#{remark},</if> |
| | | <if test="delFlag != null">#{delFlag},</if> |
| | | <if test="createBy != null">#{createBy},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateBy != null">#{updateBy},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="orgid != null">#{orgid},</if> |
| | | <if test="campusid != null">#{campusid},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <insert id="batchInsertServiceTaskScheduleDetail" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into service_task_schedule_detail |
| | | (taskid, scheduleid, seq, day_offset, templateid, libtemplateid, templatename, content, |
| | | next_execute_time, remark, del_flag, create_by, create_time, update_by, update_time, orgid, campusid) |
| | | values |
| | | <foreach collection="list" item="item" separator=","> |
| | | (#{item.taskid}, #{item.scheduleid}, #{item.seq}, #{item.dayOffset}, |
| | | #{item.templateid}, #{item.libtemplateid}, #{item.templatename}, #{item.content}, |
| | | #{item.nextExecuteTime}, #{item.remark}, |
| | | <choose> |
| | | <when test="item.delFlag != null">#{item.delFlag}</when> |
| | | <otherwise>'0'</otherwise> |
| | | </choose>, |
| | | #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, |
| | | #{item.orgid}, #{item.campusid}) |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <update id="updateServiceTaskScheduleDetail" parameterType="com.smartor.domain.ServiceTaskScheduleDetail"> |
| | | update service_task_schedule_detail |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="taskid != null">taskid = #{taskid},</if> |
| | | <if test="scheduleid != null">scheduleid = #{scheduleid},</if> |
| | | <if test="seq != null">seq = #{seq},</if> |
| | | <if test="dayOffset != null">day_offset = #{dayOffset},</if> |
| | | <if test="templateid != null">templateid = #{templateid},</if> |
| | | <if test="libtemplateid != null">libtemplateid = #{libtemplateid},</if> |
| | | <if test="templatename != null">templatename = #{templatename},</if> |
| | | <if test="content != null">content = #{content},</if> |
| | | <if test="nextExecuteTime != null">next_execute_time = #{nextExecuteTime},</if> |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | <if test="delFlag != null">del_flag = #{delFlag},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="orgid != null">orgid = #{orgid},</if> |
| | | <if test="campusid != null">campusid = #{campusid},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <update id="deleteServiceTaskScheduleDetailById" parameterType="Long"> |
| | | update service_task_schedule_detail |
| | | set del_flag = '1', |
| | | update_time = now() |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <update id="deleteByScheduleid"> |
| | | update service_task_schedule_detail |
| | | set del_flag = '1', |
| | | update_time = now() |
| | | where scheduleid = #{scheduleid} |
| | | and del_flag = '0' |
| | | </update> |
| | | |
| | | <update id="deleteByTaskid"> |
| | | update service_task_schedule_detail |
| | | set del_flag = '1', |
| | | update_time = now() |
| | | where taskid = #{taskid} |
| | | and del_flag = '0' |
| | | </update> |
| | | |
| | | </mapper> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.ServiceTaskScheduleMapper"> |
| | | |
| | | <resultMap type="com.smartor.domain.ServiceTaskSchedule" id="ServiceTaskScheduleResult"> |
| | | <id property="id" column="id"/> |
| | | <result property="taskid" column="taskid"/> |
| | | <result property="maxLoopCount" column="max_loop_count"/> |
| | | <result property="currentLoopCount" column="current_loop_count"/> |
| | | <result property="currentSeq" column="current_seq"/> |
| | | <result property="nextSeq" column="next_seq"/> |
| | | <result property="scheduleStyle" column="schedule_style"/> |
| | | <result property="scheduleTimeNum" column="schedule_time_num"/> |
| | | <result property="scheduleTimeUnit" column="schedule_time_unit"/> |
| | | <result property="nextExecuteTime" column="next_execute_time"/> |
| | | <result property="scheduleBenchmark" column="schedule_benchmark"/> |
| | | <result property="scheduleBenchmarkCustomTime" column="schedule_benchmark_custom_time"/> |
| | | <result property="deptCodes" column="dept_codes"/> |
| | | <result property="wardCodes" column="ward_codes"/> |
| | | <result property="icd10Codes" column="icd10_codes"/> |
| | | <result property="oplevelCodes" column="oplevel_codes"/> |
| | | <result property="remark" column="remark"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="orgid" column="orgid"/> |
| | | <result property="campusid" column="campusid"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectServiceTaskScheduleVo"> |
| | | select id, |
| | | taskid, |
| | | max_loop_count, |
| | | current_loop_count, |
| | | current_seq, |
| | | next_seq, |
| | | schedule_style, |
| | | schedule_time_num, |
| | | schedule_time_unit, |
| | | next_execute_time, |
| | | schedule_benchmark, |
| | | schedule_benchmark_custom_time, |
| | | dept_codes, |
| | | ward_codes, |
| | | icd10_codes, |
| | | oplevel_codes, |
| | | remark, |
| | | del_flag, |
| | | create_by, |
| | | create_time, |
| | | update_by, |
| | | update_time, |
| | | orgid, |
| | | campusid |
| | | from service_task_schedule |
| | | </sql> |
| | | |
| | | <select id="selectServiceTaskScheduleById" parameterType="Long" resultMap="ServiceTaskScheduleResult"> |
| | | <include refid="selectServiceTaskScheduleVo"/> |
| | | where id = #{id} and del_flag = '0' |
| | | </select> |
| | | |
| | | <select id="selectByTaskid" resultMap="ServiceTaskScheduleResult"> |
| | | <include refid="selectServiceTaskScheduleVo"/> |
| | | where taskid = #{taskid} and del_flag = '0' |
| | | order by id desc |
| | | limit 1 |
| | | </select> |
| | | |
| | | <select id="selectServiceTaskScheduleList" parameterType="com.smartor.domain.ServiceTaskSchedule" |
| | | resultMap="ServiceTaskScheduleResult"> |
| | | <include refid="selectServiceTaskScheduleVo"/> |
| | | where del_flag = '0' |
| | | <if test="taskid != null">and taskid = #{taskid}</if> |
| | | <if test="scheduleStyle != null">and schedule_style = #{scheduleStyle}</if> |
| | | <if test="deptCode != null">and INSTR(dept_codes, #{deptCode}) > 0</if> |
| | | <if test="wardCode != null">and INSTR(ward_codes, #{wardCode}) > 0</if> |
| | | <if test="icd10Code != null">and INSTR(icd10_codes, #{icd10Code}) > 0</if> |
| | | <if test="oplevelCode != null">and INSTR(oplevel_codes, #{oplevelCode}) > 0</if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | <if test="campusid != null and campusid != ''">and campusid = #{campusid}</if> |
| | | order by id desc |
| | | </select> |
| | | |
| | | <insert id="insertServiceTaskSchedule" parameterType="com.smartor.domain.ServiceTaskSchedule" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into service_task_schedule |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="taskid != null">taskid,</if> |
| | | <if test="maxLoopCount != null">max_loop_count,</if> |
| | | <if test="currentLoopCount != null">current_loop_count,</if> |
| | | <if test="currentSeq != null">current_seq,</if> |
| | | <if test="nextSeq != null">next_seq,</if> |
| | | <if test="scheduleStyle != null">schedule_style,</if> |
| | | <if test="scheduleTimeNum != null">schedule_time_num,</if> |
| | | <if test="scheduleTimeUnit != null">schedule_time_unit,</if> |
| | | <if test="nextExecuteTime != null">next_execute_time,</if> |
| | | <if test="scheduleBenchmark != null">schedule_benchmark,</if> |
| | | <if test="scheduleBenchmarkCustomTime != null">schedule_benchmark_custom_time,</if> |
| | | <if test="deptCodes != null">dept_codes,</if> |
| | | <if test="wardCodes != null">ward_codes,</if> |
| | | <if test="icd10Codes != null">icd10_codes,</if> |
| | | <if test="oplevelCodes != null">oplevel_codes,</if> |
| | | <if test="remark != null">remark,</if> |
| | | <if test="delFlag != null">del_flag,</if> |
| | | <if test="createBy != null">create_by,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateBy != null">update_by,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="orgid != null">orgid,</if> |
| | | <if test="campusid != null">campusid,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="taskid != null">#{taskid},</if> |
| | | <if test="maxLoopCount != null">#{maxLoopCount},</if> |
| | | <if test="currentLoopCount != null">#{currentLoopCount},</if> |
| | | <if test="currentSeq != null">#{currentSeq},</if> |
| | | <if test="nextSeq != null">#{nextSeq},</if> |
| | | <if test="scheduleStyle != null">#{scheduleStyle},</if> |
| | | <if test="scheduleTimeNum != null">#{scheduleTimeNum},</if> |
| | | <if test="scheduleTimeUnit != null">#{scheduleTimeUnit},</if> |
| | | <if test="nextExecuteTime != null">#{nextExecuteTime},</if> |
| | | <if test="scheduleBenchmark != null">#{scheduleBenchmark},</if> |
| | | <if test="scheduleBenchmarkCustomTime != null">#{scheduleBenchmarkCustomTime},</if> |
| | | <if test="deptCodes != null">#{deptCodes},</if> |
| | | <if test="wardCodes != null">#{wardCodes},</if> |
| | | <if test="icd10Codes != null">#{icd10Codes},</if> |
| | | <if test="oplevelCodes != null">#{oplevelCodes},</if> |
| | | <if test="remark != null">#{remark},</if> |
| | | <if test="delFlag != null">#{delFlag},</if> |
| | | <if test="createBy != null">#{createBy},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateBy != null">#{updateBy},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="orgid != null">#{orgid},</if> |
| | | <if test="campusid != null">#{campusid},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateServiceTaskSchedule" parameterType="com.smartor.domain.ServiceTaskSchedule"> |
| | | update service_task_schedule |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="taskid != null">taskid = #{taskid},</if> |
| | | <if test="maxLoopCount != null">max_loop_count = #{maxLoopCount},</if> |
| | | <if test="currentLoopCount != null">current_loop_count = #{currentLoopCount},</if> |
| | | <if test="currentSeq != null">current_seq = #{currentSeq},</if> |
| | | <if test="nextSeq != null">next_seq = #{nextSeq},</if> |
| | | <if test="scheduleStyle != null">schedule_style = #{scheduleStyle},</if> |
| | | <if test="scheduleTimeNum != null">schedule_time_num = #{scheduleTimeNum},</if> |
| | | <if test="scheduleTimeUnit != null">schedule_time_unit = #{scheduleTimeUnit},</if> |
| | | <if test="nextExecuteTime != null">next_execute_time = #{nextExecuteTime},</if> |
| | | <if test="scheduleBenchmark != null">schedule_benchmark = #{scheduleBenchmark},</if> |
| | | <if test="scheduleBenchmarkCustomTime != null"> |
| | | schedule_benchmark_custom_time = #{scheduleBenchmarkCustomTime}, |
| | | </if> |
| | | <if test="deptCodes != null">dept_codes = #{deptCodes},</if> |
| | | <if test="wardCodes != null">ward_codes = #{wardCodes},</if> |
| | | <if test="icd10Codes != null">icd10_codes = #{icd10Codes},</if> |
| | | <if test="oplevelCodes != null">oplevel_codes = #{oplevelCodes},</if> |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | <if test="delFlag != null">del_flag = #{delFlag},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="orgid != null">orgid = #{orgid},</if> |
| | | <if test="campusid != null">campusid = #{campusid},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <update id="deleteServiceTaskScheduleById" parameterType="Long"> |
| | | update service_task_schedule |
| | | set del_flag = '1', |
| | | update_time = now() |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <update id="deleteByTaskid"> |
| | | update service_task_schedule |
| | | set del_flag = '1', |
| | | update_time = now() |
| | | where taskid = #{taskid} |
| | | and del_flag = '0' |
| | | </update> |
| | | |
| | | <select id="selectActiveCycleSchedules" resultMap="ServiceTaskScheduleResult"> |
| | | <include refid="selectServiceTaskScheduleVo"/> |
| | | where del_flag = '0' |
| | | and schedule_style = 1 |
| | | and (max_loop_count is null |
| | | or max_loop_count = 0 |
| | | or current_loop_count < max_loop_count) |
| | | order by id asc |
| | | limit #{limit} |
| | | </select> |
| | | |
| | | </mapper> |