From 78c9129e9045fafe4c2f7333b3dcafde6b20b96d Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期四, 05 十二月 2024 15:20:51 +0800
Subject: [PATCH] 代码提交
---
ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java | 62 +++++++++++++++++++++++++-----
1 files changed, 51 insertions(+), 11 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 32064d9..f126715 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
@@ -24,6 +24,7 @@
import com.smartor.service.*;
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.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
@@ -43,6 +44,7 @@
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
+import java.time.LocalTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.*;
@@ -69,6 +71,9 @@
@Autowired
private IServiceSubtaskService iServiceSubtaskService;
+
+ @Autowired
+ private IServicePatientTempService iServicePatientTempService;
@Autowired
private PlatformTransactionManager transactionManager;
@@ -117,6 +122,9 @@
@Autowired
ISvyTaskTemplateService svyTaskTemplateService;
+
+ @Autowired
+ IIvrTaskTemplateService iIvrTaskTemplateService;
@Value("${hosp_info_url}")
private String hospInfoUrl;
@@ -187,8 +195,13 @@
//灏嗘偅鑰呬俊鎭�佸嚭闄€�侀棬璇婃暟鎹叏閮ㄩ噰闆�
// 鑾峰彇褰撳墠鏃ユ湡鍜屾椂闂�
LocalDateTime endTime = LocalDateTime.now();
+ endTime = endTime.with(LocalTime.MIN);
+// String dateStr = "2024/11/30 00:00:00";
+// DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss");
+// LocalDateTime endTime = LocalDateTime.parse(dateStr, formatter);
// 鑾峰彇鍓嶄竴澶╃殑鏃ユ湡鍜屾椂闂�
LocalDateTime startTime = endTime.minusDays(1);
+ startTime = startTime.with(LocalTime.MIN);
getInHospInfo("0", startTime, endTime);
getInHospInfo("1", startTime, endTime);
@@ -225,7 +238,18 @@
}
/**
- * 闀挎湡浠诲姟鎵ц
+ * 澶勭悊鎮h�呬俊鎭紝杩涘叆瀛愪换鍔¤〃(寰俊灏忕▼搴�)
+ */
+ public void dealOutHospInfoXHC() {
+ PatMedInhosp patMedInhosp = new PatMedInhosp();
+ //鑾峰彇鏈鐞嗙殑鏁版嵁
+ List<ServicePatientTemp> servicePatientTemps = iServicePatientTempService.selectServicePatientTempList(new ServicePatientTemp());
+
+ }
+
+
+ /**
+ * 闀挎湡浠诲姟鎵ц锛堢數璇濓級
*/
public void longTaskSend() {
//鑾峰彇浠诲姟淇℃伅
@@ -302,12 +326,12 @@
// serviceSubtask1.setTaskid(ivrTask.getTaskid());
// List<ServiceSubtask> selectServiceSubtaskList1 = iServiceSubtaskService.selectServiceSubtaskList(serviceSubtask1);
// for (ServiceSubtask serviceSubtask2 : selectServiceSubtaskList1) {
- if (StringUtils.isEmpty(value)) {
- value = "," + serviceSubtask.getId().toString() + ",";
- } else {
- if (!value.contains("," + serviceSubtask.getId().toString()))
- value = value + "," + serviceSubtask.getId().toString() + ",";
- }
+ if (StringUtils.isEmpty(value)) {
+ value = "," + serviceSubtask.getId().toString() + ",";
+ } else {
+ if (!value.contains("," + serviceSubtask.getId().toString()))
+ value = value + "," + serviceSubtask.getId().toString() + ",";
+ }
// }
} catch (Exception e) {
String guid = UUID.randomUUID().toString();
@@ -355,6 +379,13 @@
//澶氬獟浣�
} else if (descByCode.equals("绾歌川")) {
//绾歌川
+ } else if (descByCode.equals("寰俊灏忕▼搴�")) {
+ //寰俊灏忕▼搴�
+ for (ServiceSubtask serviceSubtask : selectServiceSubtaskList) {
+ log.error("寰俊灏忕▼搴忔湡浠诲姟鍙戦��---------杩涙潵浜嗗悧锛焮}", serviceSubtask);
+
+
+ }
} else if (descByCode.equals("鐭俊")) {
RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample();
String taskId = rsaPublicKeyExample.encryptedData(ivrTask1.getTaskid().toString(), pub_key);
@@ -507,8 +538,8 @@
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.S");
Map<String, String> req = new HashMap<>();
if (cry.equals("1")) {
- req.put("startTime", startTime.format(formatter));
- req.put("endTime", endTime.format(formatter));
+ req.put("cashStartDate", startTime.format(formatter));
+ req.put("cashEndDate", endTime.format(formatter));
req.put("currStatus", "4");
} else if (cry.equals("0")) {
req.put("admissStartDate", startTime.format(formatter));
@@ -631,8 +662,8 @@
e.printStackTrace();
}
try {
- if (StringUtils.isNotEmpty(thiedInhospInfo.getOutDate()))
- patMedInhosp.setEndtime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(thiedInhospInfo.getOutDate()));
+ if (StringUtils.isNotEmpty(thiedInhospInfo.getCashDate()))
+ patMedInhosp.setEndtime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(thiedInhospInfo.getCashDate()));
} catch (ParseException e) {
e.printStackTrace();
}
@@ -667,8 +698,10 @@
log.error("鏄惁闇�瑕佹洿鏂帮細{}", patMedInhosps.size());
if (CollectionUtils.isNotEmpty(patMedInhosps)) {
patMedInhosp.setInhospid(patMedInhosps.get(0).getInhospid());
+ log.error("------鎮h�呭嚭鍏ラ櫌淇敼淇℃伅锛歿}", patMedInhosp);
patMedInhospService.updatePatMedInhosp(patMedInhosp);
} else {
+ log.error("----鎮h�呭嚭鍏ラ櫌鏂板淇℃伅锛歿}", patMedInhosp);
patMedInhospService.insertPatMedInhosp(patMedInhosp);
}
@@ -720,4 +753,11 @@
// String code = (String) jsonObject.get("code");
return jsonObject.toString();
}
+
+// public static void main(String[] args) {
+// LocalDateTime originalDateTime = LocalDateTime.now();
+// LocalDateTime startOfDay = originalDateTime.with(LocalTime.MIN);
+// System.out.println("Original DateTime: " + originalDateTime);
+// System.out.println("Start of Day: " + startOfDay);
+// }
}
--
Gitblit v1.9.3