package com.bonus.material.push.task;

import com.bonus.material.push.domain.IwsCostPushBean;
import com.bonus.material.push.service.IwsCostPushService;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author : 阮世耀
 * @version : 1.0
 * @PackagePath: com.bonus.material.push.task
 * @CreateTime: 2025-02-15  16:01
 * @Description: i皖送费用推送定时任务类
 */
@Component
public class IwsCostPushTask {

    @Resource
    private IwsCostPushService iwsCostPushService;


    /**
     * 定时任务 -- 计算月结费用 -- 每月最后一天的23点30分执行
     */
    @Scheduled(cron = "0 30 23 L * ?")
    public void computeTheMonthCostTask() {
        System.out.println("-----------开始计算四类未结算费用定时器-----------");
        iwsCostPushService.computeTheMonthCost(new IwsCostPushBean());
        System.out.println("-----------四类未结算费用定时器执行完毕-----------");
    }


}
