| | |
| | | import com.ruoyi.common.utils.RSAPublicKeyExample; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.http.HttpUtils; |
| | | import com.ruoyi.common.utils.sms.smsUtils; |
| | | import com.ruoyi.quartz.service.ICollectHISService; |
| | | import com.ruoyi.system.service.ISysConfigService; |
| | | import com.smartor.common.LSHospTokenUtil; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.mapper.HeLibraryMapper; |
| | |
| | | @Autowired |
| | | private HeLibraryMapper heLibraryMapper; |
| | | |
| | | @Autowired |
| | | private ICollectHISService ichService; |
| | | |
| | | @Autowired |
| | | private ISysConfigService configService; |
| | | |
| | | |
| | | @Value("${localIP}") |
| | | private String localIP; |
| | | |
| | | @Value("${xhsmsPath}") |
| | | private String xhsmsPath; |
| | | |
| | | @Value("${xhsmsAccount}") |
| | | private String xhsmsAccount; |
| | | |
| | | @Value("${xhsmsPwd}") |
| | | private String xhsmsPwd; |
| | | |
| | | @Value("${pub_key}") |
| | | private String pub_key; |
| | |
| | | |
| | | @Autowired |
| | | IXHGatherPatArchiveService ixhGatherPatArchiveService; |
| | | |
| | | @Autowired |
| | | ICollectHISService icollectHis; |
| | | |
| | | |
| | | @Value("${appid}") |
| | |
| | | req.put("content", sendMagParam.getContent()); |
| | | isSuccess = HttpUtil.postJsonRequest(xhsmsPath, new Gson().toJson(req)); |
| | | } else if (visitHosp == 2) { |
| | | String url = configService.selectConfigByKey("token.360"); |
| | | //丽水的短信发送方式 |
| | | Map<String, String> map = MsgLSEnum.getAddressByCode(serviceSubtask.getOrgid()); |
| | | String token = LSHospTokenUtil.getToken(serviceSubtask.getOrgid()); |
| | | String token = LSHospTokenUtil.getToken(serviceSubtask.getOrgid(),url); |
| | | if (ObjectUtils.isNotEmpty(map) && StringUtils.isEmpty(map.get("address"))) { |
| | | ServiceSubtask ss = new ServiceSubtask(); |
| | | ss.setResult("error"); |
| | |
| | | if (code.equals("0")) { |
| | | isSuccess = "true"; |
| | | } |
| | | }else if (visitHosp == 3) {//市一医院 |
| | | String content=sendMagParam.getContent().replace("【新华医院】",""); |
| | | smsUtils.sendSms(xhsmsPath,xhsmsAccount,xhsmsPwd,sendMagParam.getPhone(),content); |
| | | } |
| | | //任务发送记录 |
| | | ServiceSubtaskRecord serviceSubtaskRecord = new ServiceSubtaskRecord(); |
| | |
| | | } |
| | | return toHex(md5.digest()); |
| | | } |
| | | |
| | | public void collectHIS() { |
| | | try { |
| | | // HIS数据采集 |
| | | log.info("【dealHisData】HIS开始采集数据"); |
| | | ichService.sync(); |
| | | log.info("【dealHisData】HIS结束采集数据"); |
| | | } catch (Exception e) { |
| | | log.error("【dealHisData】HIS数据采集异常", e); |
| | | } |
| | | } |
| | | } |