|
@@ -1,12 +1,15 @@
|
|
|
package org.thyy.scheduled.task;
|
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
+import org.apache.ibatis.annotations.Param;
|
|
|
+import org.apache.ibatis.annotations.Update;
|
|
|
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;
|
|
|
+import org.thyy.scheduled.service.AutoCountFee;
|
|
|
import org.thyy.scheduled.service.ReceiveCost;
|
|
|
|
|
|
@Component
|
|
@@ -15,13 +18,15 @@ public class MainBusinessTask {
|
|
|
private final MainBusinessDo dao;
|
|
|
private final ReceiveCost receiveCost;
|
|
|
private final RestTemplate template;
|
|
|
+ private final AutoCountFee autoCountFee;
|
|
|
|
|
|
@Autowired
|
|
|
- public MainBusinessTask(MainBusinessDo dao, Thyy thyy, ReceiveCost receiveCost, RestTemplate template) {
|
|
|
+ public MainBusinessTask(MainBusinessDo dao, Thyy thyy, ReceiveCost receiveCost, RestTemplate template, AutoCountFee autoCountFee) {
|
|
|
this.dao = dao;
|
|
|
this.thyy = thyy;
|
|
|
this.receiveCost = receiveCost;
|
|
|
this.template = template;
|
|
|
+ this.autoCountFee = autoCountFee;
|
|
|
}
|
|
|
|
|
|
@Scheduled(cron = "0 40 3 * * ?")
|
|
@@ -32,14 +37,19 @@ public class MainBusinessTask {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @Scheduled(cron = "0 0 3 * * ?")
|
|
|
- public void analyzeSetlData() {
|
|
|
+ @Scheduled(cron = "0 50 17 * * ?")
|
|
|
+ public void test() {
|
|
|
if (StrUtil.isNotBlank(thyy.getMainAddress())) {
|
|
|
String url = thyy.getMainAddress() + "/analyzeSiPatientCharges/analyzeSetlData";
|
|
|
template.getForObject(url, String.class);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Scheduled(cron = "0 50 23 * * ?")
|
|
|
+ public void analyzeSetlData() {
|
|
|
+ autoCountFee.autoCountFee();
|
|
|
+ }
|
|
|
+
|
|
|
@Scheduled(cron = "0 30 21 * * ?")
|
|
|
public void uploadBillingList() {
|
|
|
if (StrUtil.isNotBlank(thyy.getMainAddress())) {
|