From 1a11e4022a6b53a82bb45cda009ae653cdb55ab2 Mon Sep 17 00:00:00 2001
From: jiaosong <jiaosong6760@dingtalk.com>
Date: 星期二, 24 十月 2023 10:59:03 +0800
Subject: [PATCH] # 财务管理 修改
---
server/platform/src/main/java/com/doumee/task/ScheduleTool.java | 32 +++++++++++++++++++++++++++++++-
1 files changed, 31 insertions(+), 1 deletions(-)
diff --git a/server/platform/src/main/java/com/doumee/task/ScheduleTool.java b/server/platform/src/main/java/com/doumee/task/ScheduleTool.java
index c9873e4..71b740e 100644
--- a/server/platform/src/main/java/com/doumee/task/ScheduleTool.java
+++ b/server/platform/src/main/java/com/doumee/task/ScheduleTool.java
@@ -2,10 +2,21 @@
import com.doumee.biz.system.SystemDictDataBiz;
+import com.doumee.core.constants.Constants;
+import com.doumee.core.exception.BusinessException;
+import com.doumee.core.utils.DateUtil;
+import com.doumee.dao.business.model.Goodsorder;
+import com.doumee.service.business.GoodsorderService;
+import com.doumee.service.business.WxBillService;
+import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
+import org.springframework.util.CollectionUtils;
+
+import java.util.Date;
+import java.util.List;
/**
* 瀹氭椂浠诲姟
@@ -15,6 +26,7 @@
*/
@Component
@EnableScheduling
+@Slf4j
public class ScheduleTool {
@@ -22,12 +34,30 @@
@Autowired
private SystemDictDataBiz systemDictDataBiz;
+ @Autowired
+ private WxBillService wxBillService;
+
+ @Autowired
+ private GoodsorderService goodsorderService;
/**
* @throws Exception
*/
- @Scheduled(cron = "0 0 02 * * ? ")
+ @Scheduled(cron = "0 0 11 * * ? ")
public void syncStudent() throws Exception {
+ //鍓嶄竴澶╃殑鏁告摎
+ Date ydate = DateUtil.addDaysToDate(new Date(), -1);
+ wxBillService.getWxBill(ydate);
+ }
+ /**
+ * 娓│
+ * @throws Exception
+ */
+ @Scheduled(cron = "0 0 21 * * ? ")
+ public void getYesterdayBill() throws Exception {
+ log.info("=====================寮�濮嬫瘡澶╄嚜鍔ㄧ粨绠�=======================");
+ goodsorderService.autoCloseOrder();
+ log.info("=====================缁撴潫姣忓ぉ鑷姩缁撶畻=======================");
}
}
--
Gitblit v1.9.3