package com.tofly.third.task;

import com.tofly.third.service.ZnbCbLogService;
import com.tofly.third.service.ZnbZlLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author Administrator
 * @date 2026/3/9
 */
@Component
public class ZnsbTask {
    @Autowired
    private ZnbZlLogService znbZlLogService;

    @Autowired
    private ZnbCbLogService znbCbLogService;

    /**
     * 智能水表的开关阀
     */
    //@Scheduled(cron = "${cron_expression:*/10 * * * * ?}")
    @Scheduled(cron = "${znsb.kg_cron_expression:-}")
    public void znbkgfTask() {
        znbZlLogService.znbkgfTask();
    }

    /**
     * 智能水表的开关阀信息获取
     */
    //@Scheduled(cron = "${cron_expression:*/10 * * * * ?}")
    @Scheduled(cron = "${znsb.kg_cron_expression:-}")
    public void znsbkgfxxhqTask() {
        znbZlLogService.znsbkgfxxhqTask();
    }
    /**
     * 智能水表抄表(优艾特)
     */
    //@Scheduled(cron = "${cron_expression:*/10 * * * * ?}")
    @Scheduled(cron = "${znsb.yatcb_cron_expression:-}")
    public void znsbCbTask() {
        znbCbLogService.YatZnbcbTask();
    }
}
