|
|
@@ -0,0 +1,73 @@
|
|
|
+package org.thyy.scheduled.task;
|
|
|
+
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.scheduling.annotation.Scheduled;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+import org.springframework.web.client.RestTemplate;
|
|
|
+import org.thyy.scheduled.config.constant.Thyy;
|
|
|
+import org.thyy.scheduled.dao.MainBusinessDo;
|
|
|
+
|
|
|
+@Component
|
|
|
+public class MainBusinessTask {
|
|
|
+ private final MainBusinessDo dao;
|
|
|
+ private final Thyy thyy;
|
|
|
+ private final RestTemplate restTemplate;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ public MainBusinessTask(MainBusinessDo dao, Thyy thyy, RestTemplate restTemplate) {
|
|
|
+ this.dao = dao;
|
|
|
+ this.thyy = thyy;
|
|
|
+ this.restTemplate = restTemplate;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Scheduled(cron = "0 40 3 * * ?")
|
|
|
+ public void executeAutoSign() {
|
|
|
+ if (StrUtil.isNotBlank(thyy.getMainAddress())) {
|
|
|
+ String url = thyy.getMainAddress() + "/caseFrontSheet/autoSign";
|
|
|
+ restTemplate.getForObject(url, String.class);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Scheduled(cron = "0 0 3 * * ?")
|
|
|
+ public void analyzeSetlData() {
|
|
|
+ if (StrUtil.isNotBlank(thyy.getMainAddress())) {
|
|
|
+ String url = thyy.getMainAddress() + "/analyzeSiPatientCharges/analyzeSetlData";
|
|
|
+ restTemplate.getForObject(url, String.class);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Scheduled(cron = "0 30 21 * * ?")
|
|
|
+ public void uploadBillingList() {
|
|
|
+ if (StrUtil.isNotBlank(thyy.getMainAddress())) {
|
|
|
+ String url = thyy.getMainAddress() + "/setlListUpld/tasks";
|
|
|
+ restTemplate.getForObject(url, String.class);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Scheduled(cron = "0 20 2 * * ?")
|
|
|
+ private void uploadFrontSheet() {
|
|
|
+ if (StrUtil.isNotBlank(thyy.getMainAddress())) {
|
|
|
+ String url = thyy.getMainAddress() + "/uploadFrontSheet/startUploadStatistics";
|
|
|
+ restTemplate.getForObject(url, String.class);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Scheduled(cron = "0 0 6 * * ?")
|
|
|
+ public void notifyDailyCount() {
|
|
|
+ if (StrUtil.isNotBlank(thyy.getMainAddress())) {
|
|
|
+ String url = thyy.getMainAddress() + "/dailyPatientCount/notifyDailyCount";
|
|
|
+ restTemplate.getForObject(url, String.class);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Scheduled(cron = "59 59 23 * * ?")
|
|
|
+ public void restDrugOrderNo() {
|
|
|
+ dao.restDrugOrderNo();
|
|
|
+ }
|
|
|
+
|
|
|
+ @Scheduled(cron = "0 0 0 * * ?")
|
|
|
+ public void resetPatientNum() {
|
|
|
+ dao.resetPatientNum();
|
|
|
+ }
|
|
|
+}
|