package com.rongwei.businessServer.controller;

import com.rongwei.bscommon.sys.service.SrmIssuesListService;
import com.rongwei.rwcommon.base.R;
import com.rongwei.rwcommon.vo.MailDo;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RestController;

import static com.rongwei.safecommon.utils.SaveConstans.IssuesListNotice.ISSUES_EMAIL_TITLE;


/**
 * 生产问题管理
 * 2024-09-25 hp
 */

@RestController
@RequestMapping("srmIssueslist")
public class SrmIssuesListController {

    @Autowired
    SrmIssuesListService srmIssuesListService;


    /**
     * 每10min 执行一次定时任务
     * 生产问题审批超时提醒
     * @return
     */
    @Scheduled(cron = "0 0/10 * * * ? ")
    @PostMapping("/approvalTimeoutReminder")
    public R batchSavePlansTiming(){
        R r = srmIssuesListService.approvalTimeoutReminder();
        return r;
    }
}
