package com.rongwei.savecheck.controller;

import com.rongwei.rwcommon.base.R;
import com.rongwei.sfcommon.sys.service.AspSpecialEquipmentCertificateService;
import com.rongwei.sfcommon.sys.service.impl.AspSafeAttachmentsServiceImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * AspSafeAttachmentsController class
 *
 * @author XH
 * @date 2024/06/15
 */
@RestController
@RequestMapping("/special/equipment")
public class AspSpecialEquipmentCertificateController {
    private final Logger log = LoggerFactory.getLogger(this.getClass().getName());

    @Autowired
    private AspSpecialEquipmentCertificateService aspSpecialEquipmentCertificateService;

    @Scheduled(cron = "0 0 3 ? * *")
    @PostMapping("/state")
    public R stateUpdateScheduledTasks() {
        log.info("特种设备作业人员证书管理,更改预警级别");
        return aspSpecialEquipmentCertificateService.stateUpdateScheduledTasks();
    }
}
