From b5a1835f3ed1763b3d0b66f8ccff0bbd4d67dd5b Mon Sep 17 00:00:00 2001 From: liusheng <337615773@qq.com> Date: 星期一, 28 四月 2025 11:28:59 +0800 Subject: [PATCH] 代码提交 --- ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java | 62 ++++++++++++++++++++++--------- 1 files changed, 44 insertions(+), 18 deletions(-) diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java index 63b3176..cb645e8 100644 --- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java @@ -72,6 +72,9 @@ private IPatMedInhospService iPatMedInhospService; @Autowired + private IPatMedOuthospService iPatMedOuthospService; + + @Autowired private IPatMedOperationService iPatMedOperationService; @Autowired @@ -100,6 +103,9 @@ @Value("${req_path}") private String req_path; + + @Value("${visitHosp}") + private Integer visitHosp; @Autowired private ServiceTaskMapper serviceTaskMapper; @@ -133,6 +139,12 @@ @Value("${hosp_info_url}") private String hospInfoUrl; + + @Value("${appid}") + private String appid; + + @Value("${server.port}") + private String port; public void ryMultipleParams(String s, Boolean b, Long l, Double d, Integer i) { System.out.println(StringUtils.format("鎵ц澶氬弬鏂规硶锛� 瀛楃涓茬被鍨媨}锛屽竷灏旂被鍨媨}锛岄暱鏁村瀷{}锛屾诞鐐瑰瀷{}锛屾暣褰}", s, b, l, d, i)); @@ -239,7 +251,14 @@ * 澶勭悊鎮h�呬俊鎭紝杩涘叆瀛愪换鍔¤〃 */ public void dealOutHospInfo() { - iPatMedInhospService.dealOutHospInfo(); + if (port.equals("8095")) { + //鍑洪櫌琛� + iPatMedInhospService.dealOutHospInfo(); + //闂ㄨ瘖琛� + if (visitHosp != 1) { + iPatMedOuthospService.dealOutpatientInfo(); + } + } } @@ -247,17 +266,19 @@ * 澶勭悊鎵嬫湳淇℃伅锛岃繘鍏ュ瓙浠诲姟琛� */ public void dealOperationInfo() { - iPatMedOperationService.dealOperationInfo(); + if (port.equals("8095")) iPatMedOperationService.dealOperationInfo(); + } /** * 澶勭悊鎮h�呬俊鎭紝杩涘叆瀛愪换鍔¤〃(寰俊灏忕▼搴�) */ public void dealOutHospInfoXHC() { - PatMedInhosp patMedInhosp = new PatMedInhosp(); - //鑾峰彇鏈鐞嗙殑鏁版嵁 - List<ServicePatientTemp> servicePatientTemps = iServicePatientTempService.selectServicePatientTempList(new ServicePatientTemp()); - + if (port.equals("8095")) { + PatMedInhosp patMedInhosp = new PatMedInhosp(); + //鑾峰彇鏈鐞嗙殑鏁版嵁 + List<ServicePatientTemp> servicePatientTemps = iServicePatientTempService.selectServicePatientTempList(new ServicePatientTemp()); + } } @@ -519,7 +540,10 @@ String patid = rsaPublicKeyExample.encryptedData(serviceSubtask.getPatid().toString(), pub_key); String url = null; url = ip + ":" + req_path + "/outsideChainwt?param1=" + taskId + "¶m2=" + patid + "¶m3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + "¶m5=false"; - String wxCode = getWXCode(serviceSubtask.getSfzh(), url, serviceSubtask.getTaskName(), serviceSubtask.getTaskDesc(), "鏃�"); +// String wxCode = getWXCode(serviceSubtask.getSfzh(), url, serviceSubtask.getTaskName(), serviceSubtask.getTaskDesc(), "鏃�"); + + String wxCode = getWXCode(serviceSubtask.getSfzh(), url, serviceSubtask.getTaskName(), serviceSubtask.getTaskDesc(), patArchive.getTelcode(), serviceSubtask.getSendname(), patArchive.getPatientno()); + Map<String, Object> map = JSONObject.parseObject(wxCode, Map.class); //浠诲姟鍙戦�佽褰� @@ -653,7 +677,7 @@ patArchive.setPlaceOfResidence(StringUtils.isNotEmpty(thiedInhospInfo.getPatiHomeAddr()) ? thiedInhospInfo.getPatiHomeAddr().replace("null", "") : ""); try { if (StringUtils.isNotEmpty(thiedInhospInfo.getPatiBirthday())) - patArchive.setBirthdate(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(thiedInhospInfo.getPatiBirthday())); + patArchive.setBirthdate(new SimpleDateFormat("yyyy-MM-dd").parse(thiedInhospInfo.getPatiBirthday())); } catch (ParseException e) { e.printStackTrace(); } @@ -682,6 +706,7 @@ patMedInhosp.setNurseId(thiedInhospInfo.getNurseId()); patMedInhosp.setNurseName(thiedInhospInfo.getNurseName()); patMedInhosp.setSerialnum(thiedInhospInfo.getInpatientId()); + patMedInhosp.setFuflag("1"); if (cry.equals("0")) { patMedInhosp.setInhospstate("0"); } else if (cry.equals("1")) { @@ -774,22 +799,23 @@ return key; } - private String getWXCode(String idcard, String url, String taskName, String taskDesc, String submitprompt) { + private String getWXCode(String idcard, String url, String taskName, String taskDesc, String phone, String setPatientname, String setPatientid) { XinHuaWXReq xinHuaWXReq = new XinHuaWXReq(); xinHuaWXReq.setIdcard(idcard); xinHuaWXReq.setUrl(url); - xinHuaWXReq.setKeyword1("娴欎腑鍖诲ぇ浜岄櫌鍑洪櫌闅忚"); - xinHuaWXReq.setKeyword2(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); - xinHuaWXReq.setKeyword3(taskName); - xinHuaWXReq.setKeyword4("鐤剧梾搴峰娉ㄦ剰浜嬮」"); - + xinHuaWXReq.setPatientid(setPatientid); + xinHuaWXReq.setPatientname(setPatientname); + xinHuaWXReq.setMobile(phone); + xinHuaWXReq.setMedcardno(null); + xinHuaWXReq.setTitlename(taskName); + xinHuaWXReq.setContent(taskDesc); + xinHuaWXReq.setAppid(appid); + log.error("----getWXCode---xinHuaWXReq鐨勫嚭鍙備负锛歿}", xinHuaWXReq); String result = HttpUtils.sendPost(thirdWXUrl, new Gson().toJson(xinHuaWXReq)); JSONObject jsonObject = JSONObject.parseObject(result); - log.error("jsonObject鐨勬暟鎹负锛歿}", jsonObject.toString()); -// String code = (String) jsonObject.get("code"); - return jsonObject.toString(); + String code = (String) jsonObject.toString(); + return code; } - // public static void main(String[] args) { // LocalDateTime originalDateTime = LocalDateTime.now(); // LocalDateTime startOfDay = originalDateTime.with(LocalTime.MIN); -- Gitblit v1.9.3