| | |
| | | log.info("【dealHisData】省立同德“入院”結束采集数据,院区:{}", cid); |
| | | |
| | | // 门急诊分页采集:每页1000条,直到无数据为止(南华附一的先不采门急诊数据) |
| | | if (active.trim().equals("sltd")) { |
| | | log.info("【dealHisData】省立同德“门急诊”开始分页采集数据,院区:{}", cid); |
| | | serviceSLTDInhospReqVO.setStartHeadTime(null); |
| | | serviceSLTDInhospReqVO.setStartTailTime(null); |
| | | serviceSLTDInhospReqVO.setEncounterTimeStart(nowTime); |
| | | serviceSLTDInhospReqVO.setEncounterTimeEnd(nowTime); |
| | | if (active.trim().equals("nhfy")) { |
| | | serviceSLTDInhospReqVO.setEncounterTimeStart(yesterdayZero.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
| | | serviceSLTDInhospReqVO.setEncounterTimeEnd(todayZero.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
| | | } |
| | | serviceSLTDInhospReqVO.setStatusList(null); |
| | | List<String> list1 = new ArrayList<>(); |
| | | list1.add("FH0108.01"); |
| | | list1.add("FH0108.03"); |
| | | serviceSLTDInhospReqVO.setHealthcareRecordTypeList(list1); |
| | | long outpPage = 1L; |
| | | final long OUTP_PAGE_SIZE = 1000L; |
| | | while (true) { |
| | | serviceSLTDInhospReqVO.setCurrent(outpPage); |
| | | serviceSLTDInhospReqVO.setSize(OUTP_PAGE_SIZE); |
| | | log.info("【dealHisData】省立同德“门急诊”采集第{}页数据,院区:{}", outpPage, cid); |
| | | List<ServiceSLTDInhospResDTO> outpResult = serviceSLTDHealthcareRecordService.queryHealthcareRecordList(serviceSLTDInhospReqVO); |
| | | if (CollectionUtils.isEmpty(outpResult)) { |
| | | log.info("【dealHisData】省立同德“门急诊”第{}页无数据,采集结束,院区:{}", outpPage, cid); |
| | | break; |
| | | } |
| | | log.info("【dealHisData】省立同德“门急诊”第{}页采集{}条,院区:{}", outpPage, outpResult.size(), cid); |
| | | if (outpResult.size() < OUTP_PAGE_SIZE) { |
| | | break; |
| | | } |
| | | outpPage++; |
| | | } |
| | | // 清除分页参数,避免影响后续出入院查询 |
| | | serviceSLTDInhospReqVO.setCurrent(null); |
| | | serviceSLTDInhospReqVO.setSize(null); |
| | | log.info("【dealHisData】省立同德“门急诊”分页采集完成,院区:{}", cid); |
| | | } |
| | | // if (active.trim().equals("sltd")) { |
| | | // log.info("【dealHisData】省立同德“门急诊”开始分页采集数据,院区:{}", cid); |
| | | // serviceSLTDInhospReqVO.setStartHeadTime(null); |
| | | // serviceSLTDInhospReqVO.setStartTailTime(null); |
| | | // serviceSLTDInhospReqVO.setEncounterTimeStart(nowTime); |
| | | // serviceSLTDInhospReqVO.setEncounterTimeEnd(nowTime); |
| | | // if (active.trim().equals("nhfy")) { |
| | | // serviceSLTDInhospReqVO.setEncounterTimeStart(yesterdayZero.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
| | | // serviceSLTDInhospReqVO.setEncounterTimeEnd(todayZero.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
| | | // } |
| | | // serviceSLTDInhospReqVO.setStatusList(null); |
| | | // List<String> list1 = new ArrayList<>(); |
| | | // list1.add("FH0108.01"); |
| | | // list1.add("FH0108.03"); |
| | | // serviceSLTDInhospReqVO.setHealthcareRecordTypeList(list1); |
| | | // long outpPage = 1L; |
| | | // final long OUTP_PAGE_SIZE = 1000L; |
| | | // while (true) { |
| | | // serviceSLTDInhospReqVO.setCurrent(outpPage); |
| | | // serviceSLTDInhospReqVO.setSize(OUTP_PAGE_SIZE); |
| | | // log.info("【dealHisData】省立同德“门急诊”采集第{}页数据,院区:{}", outpPage, cid); |
| | | // List<ServiceSLTDInhospResDTO> outpResult = serviceSLTDHealthcareRecordService.queryHealthcareRecordList(serviceSLTDInhospReqVO); |
| | | // if (CollectionUtils.isEmpty(outpResult)) { |
| | | // log.info("【dealHisData】省立同德“门急诊”第{}页无数据,采集结束,院区:{}", outpPage, cid); |
| | | // break; |
| | | // } |
| | | // log.info("【dealHisData】省立同德“门急诊”第{}页采集{}条,院区:{}", outpPage, outpResult.size(), cid); |
| | | // if (outpResult.size() < OUTP_PAGE_SIZE) { |
| | | // break; |
| | | // } |
| | | // outpPage++; |
| | | // } |
| | | // // 清除分页参数,避免影响后续出入院查询 |
| | | // serviceSLTDInhospReqVO.setCurrent(null); |
| | | // serviceSLTDInhospReqVO.setSize(null); |
| | | // log.info("【dealHisData】省立同德“门急诊”分页采集完成,院区:{}", cid); |
| | | // } |
| | | |
| | | log.info("【dealHisData】省立同德“出院”开始采集数据,院区:{}", cid); |
| | | serviceSLTDInhospReqVO.setStartHeadTime(null); |
| | |
| | | serviceSLTDInhospReqVO.setHealthcareRecordTypeList(null); |
| | | List<String> list2 = new ArrayList<>(); |
| | | // list2.add("FH0108.02"); |
| | | //出院 |
| | | list2.add("FH0109.27"); |
| | | //预出院 |
| | | list2.add("FH0109.25"); |
| | | serviceSLTDInhospReqVO.setStatusList(list2); |
| | | log.info("【dealHisData】省立同德“出院”采集数据入参:{}", serviceSLTDInhospReqVO); |
| | | serviceSLTDHealthcareRecordService.queryHealthcareRecordList(serviceSLTDInhospReqVO); |
| | |
| | | String content = sendMagParam.getContent().replace("【新华医院】", ""); |
| | | |
| | | SysDept sysDeptVo = new SysDept(); |
| | | List<SysDept> sysDepts = sysDeptService.selectDeptList(sysDeptVo); |
| | | List<SysDept> sysDepts = new ArrayList<>(); |
| | | if (ObjectUtils.isNotEmpty(serviceSubtask.getDeptcode())){ |
| | | sysDeptVo.setDeptType("1"); |
| | | sysDeptVo.setOrgid(serviceSubtask.getOrgid()); |
| | | sysDeptVo.setDeptCode(serviceSubtask.getDeptcode()); |
| | | sysDeptService.selectDeptList(sysDeptVo); |
| | | }else if(ObjectUtils.isNotEmpty(serviceSubtask.getLeavehospitaldistrictcode())){ |
| | | sysDeptVo.setDeptType("2"); |
| | | sysDeptVo.setOrgid(serviceSubtask.getOrgid()); |
| | | sysDeptVo.setDeptCode(serviceSubtask.getLeavehospitaldistrictcode()); |
| | | sysDeptService.selectDeptList(sysDeptVo); |
| | | } |
| | | SysDept sysDept = CollectionUtils.isNotEmpty(sysDepts) ? sysDepts.get(0) : new SysDept(); |
| | | String campusid = ObjectUtils.isNotEmpty(sysDept) ? sysDept.getCampusid() : "2"; |
| | | //湖滨单独发送方式 |
| | | if("1".equals(campusid)){ |
| | | String result = smsUtils.sendSms(xhsmsPath, xhsmsAccount, xhsmsPwd, sendMagParam.getPhone(), content); |
| | | String result = smsUtils.sendSms1(xhsmsPath, xhsmsAccount, xhsmsPwd, sendMagParam.getPhone(), content); |
| | | //这里需要根据result返回的值去判断,是否成功,然后将值赋值给isSuccess |
| | | if (StringUtils.isNotEmpty(result) && result.contains("处理成功")) { |
| | | isSuccess = "true"; |