Merge branch 'dev'

This commit is contained in:
tianyongbao
2026-03-21 22:29:20 +08:00
47 changed files with 3815 additions and 0 deletions

View File

@@ -92,6 +92,12 @@
<version>3.6.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.intc</groupId>
<artifactId>intc-api-health</artifactId>
<version>3.6.3</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>

View File

@@ -0,0 +1,36 @@
package com.intc.job.task;
import com.intc.api.health.RemoteHealthService;
import com.intc.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 用药提醒定时任务(通过 Feign 调用 intc-health 服务)
*
* @author intc
*/
@Component("medicationRemindJob")
public class MedicationRemindJobTask {
@Autowired
private RemoteHealthService remoteHealthService;
/**
* 扫描并发送服药提醒(每分钟执行)
*/
public void scanAndSendReminders() {
System.out.println("================================开始扫描服药提醒(" + DateUtils.getTime() + ")=================================");
remoteHealthService.scanAndSendReminders();
System.out.println("================================结束扫描服药提醒(" + DateUtils.getTime() + ")=================================");
}
/**
* 扫描超时未服药任务每5分钟执行
*/
public void scanOverdueRecords() {
System.out.println("================================开始扫描超时未服药任务(" + DateUtils.getTime() + ")=================================");
remoteHealthService.scanOverdueRecords();
System.out.println("================================结束扫描超时未服药任务(" + DateUtils.getTime() + ")=================================");
}
}

View File

@@ -0,0 +1,27 @@
package com.intc.job.task;
import com.intc.api.health.RemoteHealthService;
import com.intc.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 健康模块定时任务(通过 Feign 调用 intc-health 服务)
*
* @author intc
*/
@Component("medicationTaskJob")
public class MedicationTaskJobTask {
@Autowired
private RemoteHealthService remoteHealthService;
/**
* 每日生成服药任务(每日 00:05 执行)
*/
public void generateDailyTasks() {
System.out.println("================================开始每日生成服药任务(" + DateUtils.getTime() + ")=================================");
remoteHealthService.generateDailyTasks();
System.out.println("================================结束每日生成服药任务(" + DateUtils.getTime() + ")=================================");
}
}