mirror of
https://github.com/weizhiqiang1995/erp-pro.git
synced 2025-01-29 10:39:56 +08:00
定时任务录入XXL-JOB
This commit is contained in:
parent
49b9f3100a
commit
33d4a429af
7 changed files with 15 additions and 15 deletions
|
@ -14,7 +14,6 @@ import com.xxl.job.core.handler.annotation.XxlJob;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
|
@ -75,7 +74,6 @@ public class AnnualLeaveStatisticsQuartz {
|
|||
/**
|
||||
* 每个季度的第一天零点开始执行员工年假计算任务
|
||||
*/
|
||||
@Scheduled(cron = "0 00 00 1 1,4,7,10 ?")
|
||||
@XxlJob("annualLeaveStatisticsQuartz")
|
||||
public void annualLeaveStatistics() {
|
||||
LOGGER.info("annualLeaveStatistics start.");
|
||||
|
|
|
@ -12,10 +12,10 @@ import com.skyeye.eve.rest.checkwork.CheckWorkTimeService;
|
|||
import com.skyeye.eve.service.SysEveUserStaffCapitalService;
|
||||
import com.skyeye.eve.service.WagesStaffMationService;
|
||||
import com.skyeye.wages.constant.WagesConstant;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
@ -55,7 +55,7 @@ public class CalcStaffWaitPayWages {
|
|||
/**
|
||||
* 定时统计员工待结算其他奖金的数据 凌晨一点半执行
|
||||
*/
|
||||
@Scheduled(cron = "0 30 1 * * ?")
|
||||
@XxlJob("calcStaffWaitPayWages")
|
||||
public void handler() {
|
||||
log.info("定时统计员工待结算薪资的数据定时任务开始执行");
|
||||
try {
|
||||
|
|
|
@ -14,10 +14,10 @@ import com.skyeye.eve.rest.checkwork.CheckWorkLeaveService;
|
|||
import com.skyeye.eve.rest.checkwork.CheckWorkService;
|
||||
import com.skyeye.eve.rest.checkwork.CheckWorkTimeService;
|
||||
import com.skyeye.eve.service.IScheduleDayService;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -54,7 +54,7 @@ public class CheckWorkQuartz {
|
|||
/**
|
||||
* 定时器填充打卡信息,每天凌晨一点执行一次
|
||||
*/
|
||||
@Scheduled(cron = "0 0 1 * * ?")
|
||||
@XxlJob("checkWorkQuartz")
|
||||
public void editCheckWorkMation() {
|
||||
log.info("填充打卡信息定时任务执行");
|
||||
try {
|
||||
|
|
|
@ -10,10 +10,10 @@ import com.skyeye.common.util.DateUtil;
|
|||
import com.skyeye.common.util.ToolUtil;
|
||||
import com.skyeye.eve.dao.MainPageDao;
|
||||
import com.skyeye.jedis.JedisClientService;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
|
@ -43,7 +43,7 @@ public class HotForumQuartz {
|
|||
/**
|
||||
* 定时器计算每日热门贴
|
||||
*/
|
||||
@Scheduled(cron = "0 0 2 * * ?") //每天凌晨两点执行一次
|
||||
@XxlJob("hotForumQuartz")
|
||||
public void editHotForumMation() {
|
||||
try {
|
||||
String yestoday = DateAfterSpacePointTime.getSpecifiedTime(
|
||||
|
|
|
@ -14,10 +14,10 @@ import com.skyeye.eve.entity.shop.store.ShopStoreIntercourseMation;
|
|||
import com.skyeye.eve.entity.shop.store.ShopStoreIntercourseMationRest;
|
||||
import com.skyeye.eve.rest.shop.store.ShopStoreService;
|
||||
import com.skyeye.jedis.util.RedisLock;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
|
@ -45,7 +45,7 @@ public class ShopStoreIntercourseQuartz {
|
|||
/**
|
||||
* 定时器计算门店昨日支出/收入往来信息,每天凌晨两点执行一次
|
||||
*/
|
||||
@Scheduled(cron = "0 0 2 * * ?")
|
||||
@XxlJob("shopStoreIntercourseQuartz")
|
||||
public void calcShopStoreIntercourse() {
|
||||
log.info("定时器计算门店昨日支出/收入往来信息执行 start");
|
||||
RedisLock lock = new RedisLock(LOCK_KEY);
|
||||
|
|
|
@ -8,10 +8,10 @@ import cn.hutool.json.JSONUtil;
|
|||
import com.skyeye.common.util.DateUtil;
|
||||
import com.skyeye.eve.dao.WagesPaymentHistoryDao;
|
||||
import com.skyeye.jedis.JedisClientService;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -46,7 +46,7 @@ public class StaffWagesPaymentQuartz {
|
|||
/**
|
||||
* 定时发放薪资功能,每月15日上午10:15触发
|
||||
*/
|
||||
@Scheduled(cron = "0 15 10 15 * ?")
|
||||
@XxlJob("staffWagesPaymentQuartz")
|
||||
public void staffWagesPayment() {
|
||||
LOGGER.info("staff wagesPayment month is start");
|
||||
try {
|
||||
|
|
|
@ -15,10 +15,10 @@ import com.skyeye.eve.service.WagesModelService;
|
|||
import com.skyeye.eve.service.WagesStaffMationService;
|
||||
import com.skyeye.jedis.JedisClientService;
|
||||
import com.skyeye.wages.constant.WagesConstant;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.*;
|
||||
|
@ -99,8 +99,10 @@ public class StaffWagesQuartz {
|
|||
*/
|
||||
private static final String IN_STATISTICS_STAFF_REDIS_KEY = "inStatisticsWagesStaff";
|
||||
|
||||
// 每月十号的凌晨两点开始执行薪资统计任务
|
||||
@Scheduled(cron = "0 0 2 10 * ?")
|
||||
/**
|
||||
* 每月十号的凌晨两点开始执行薪资统计任务
|
||||
*/
|
||||
@XxlJob("staffWagesQuartz")
|
||||
public void statisticsStaffWages() {
|
||||
try {
|
||||
// 获取上个月的年月
|
||||
|
|
Loading…
Reference in a new issue