| | |
| | | import com.ruoyi.common.enums.ServiceFromEnum; |
| | | import com.ruoyi.common.enums.WxGZHEnum; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.HttpUtil; |
| | | import com.ruoyi.common.utils.OkHttpExample; |
| | | import com.ruoyi.common.utils.RSAPublicKeyExample; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.*; |
| | | import com.ruoyi.common.utils.http.HttpUtils; |
| | | import com.ruoyi.common.utils.sms.smsUtils; |
| | | import com.ruoyi.quartz.service.ICollectHISService; |
| | |
| | | serviceSLTDInhospReqVO.setStartHeadTime(nowTime); |
| | | serviceSLTDInhospReqVO.setStartTailTime(nowTime); |
| | | List<String> listStr = new ArrayList<>(); |
| | | // list.add("FH0108.02"); |
| | | listStr.add("FH0109.26"); |
| | | serviceSLTDInhospReqVO.setStatusList(listStr); |
| | | log.debug("【dealHisData】省立同德“入院”采集数据入参:{}", serviceSLTDInhospReqVO); |
| | |
| | | serviceSLTDHealthcareRecordService.queryHealthcareRecordList(serviceSLTDInhospReqVO); |
| | | log.debug("【dealHisData】省立同德“出院”束采集数据,院区:{}", cid); |
| | | } |
| | | // SysConfig sysConfig = sysConfigs.get(0); |
| | | // sysConfig.setConfigValue(nowTime); |
| | | // configService.updateConfig(sysConfig); |
| | | } catch (Exception e) { |
| | | log.error("【dealHisData】省立同德数据采集异常", e); |
| | | } |
| | |
| | | if (serviceSubtask.getType().equals("1")) |
| | | sendMagParam.setUrl(localIP + ":" + req_path + "/sf?p=" + format); |
| | | sendMagParam.setContent("您好,邀请您填写出院调查表,请点击" + sendMagParam.getUrl() + "填写。感谢您配合!"); |
| | | if (active.equals("xh")) { |
| | | sendMagParam.setContent("【新华医院】您好,邀请您填写出院调查表,请点击" + sendMagParam.getUrl() + "填写。感谢您配合!"); |
| | | } |
| | | } else { |
| | | HeLibrary heLibrary = heLibraryMapper.selectHeLibraryById(serviceSubtask.getLibtemplateid()); |
| | | if (heLibrary.getHetype().equals("1")) { |
| | |
| | | setSuccessPreachForm(serviceSubtask, sendPreachform, "短信发送成功", "2"); |
| | | } else { |
| | | serviceSubtask.setResult("error"); |
| | | serviceSubtask.setRemark(serviceSubtask.getRemark() + "," +"短信发送失败" + now); |
| | | serviceSubtask.setRemark(serviceSubtask.getRemark() + "," + "短信发送失败" + now); |
| | | setSuccessPreachForm(serviceSubtask, sendPreachform, "短信发送失败" + now, "5"); |
| | | } |
| | | } catch (Exception e) { |
| | |
| | | |
| | | // 情况1:currentPreachform为空,取sort为1的preachform |
| | | if (StringUtils.isEmpty(serviceSubtask.getCurrentPreachform())) { |
| | | return serviceSubtaskPreachforms.stream().filter(item -> item.getSort() == 1L).map(ServiceSubtaskPreachform::getPreachform).findFirst().orElse(null); |
| | | String firstPreachform = serviceSubtaskPreachforms.stream().filter(item -> item.getSort() == 1L).map(ServiceSubtaskPreachform::getPreachform).findFirst().orElse(null); |
| | | |
| | | //更新一下当前发送时间 |
| | | if (StringUtils.isNotEmpty(firstPreachform)) { |
| | | serviceSubtaskPreachform.setPreachform(firstPreachform); |
| | | serviceSubtaskPreachform.setCurrentSendTime(new Date()); |
| | | serviceSubtaskPreachformMapper.updateSSPByCondition(serviceSubtaskPreachform); |
| | | } |
| | | return firstPreachform; |
| | | } |
| | | |
| | | // 情况2:currentPreachform不为空,找下一个sort |
| | |
| | | |
| | | if (currentSort.isPresent()) { |
| | | //微信已发送、已领取视为发送成功,不再进行补偿 -丽水中医院 |
| | | if(active.equals("47231022633110211A2101")){ |
| | | if (active.equals("47231022633110211A2101")) { |
| | | //获取当前发送方式 |
| | | ServiceSubtaskPreachform currentServiceSubtaskPreachform = serviceSubtaskPreachforms.stream().filter(item -> item.getSort().equals(currentSort.get())).findFirst().orElse(new ServiceSubtaskPreachform()); |
| | | if(currentServiceSubtaskPreachform.getPreachform().equals("5") |
| | | && (currentServiceSubtaskPreachform.getSendstate().equals("2") |
| | | || currentServiceSubtaskPreachform.getSendstate().equals("3"))){ |
| | | if (currentServiceSubtaskPreachform.getPreachform().equals("5") && (currentServiceSubtaskPreachform.getSendstate().equals("2") || currentServiceSubtaskPreachform.getSendstate().equals("3"))) { |
| | | return "-1"; |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | // 找到下一个sort对应的preachform |
| | | return serviceSubtaskPreachforms.stream().filter(item -> nextSort.equals(item.getSort())).map(ServiceSubtaskPreachform::getPreachform).findFirst().orElse("-1"); |
| | | String nextPreachform = serviceSubtaskPreachforms.stream().filter(item -> nextSort.equals(item.getSort())).map(ServiceSubtaskPreachform::getPreachform).findFirst().orElse("-1"); |
| | | |
| | | //更新一下当前发送时间 |
| | | if (StringUtils.isNotEmpty(nextPreachform)) { |
| | | serviceSubtaskPreachform.setCurrentSendTime(new Date()); |
| | | serviceSubtaskPreachform.setPreachform(nextPreachform); |
| | | serviceSubtaskPreachformMapper.updateSSPByCondition(serviceSubtaskPreachform); |
| | | } |
| | | |
| | | return nextPreachform; |
| | | } |
| | | |
| | | return null; |
| | |
| | | serviceSubtaskPreachform.setTaskid(serviceSubtask.getTaskid()); |
| | | serviceSubtaskPreachform.setOrgid(serviceSubtask.getOrgid()); |
| | | serviceSubtaskPreachform.setSendstate(failSendstate); |
| | | serviceSubtaskPreachform.setCurrentSendTime(new Date()); |
| | | serviceSubtaskPreachformMapper.updateSSPByCondition(serviceSubtaskPreachform); |
| | | return true; |
| | | } |
| | | |
| | | |
| | | ServiceSubtaskPreachform serviceSubtaskPreachform = new ServiceSubtaskPreachform(); |
| | | serviceSubtaskPreachform.setSubid(serviceSubtask.getId()); |