package com.bonus.material.warningAnalysis.service.impl;

import com.bonus.material.warningAnalysis.domain.UseMaintenanceWarningBean;
import com.bonus.material.warningAnalysis.mapper.UseMaintenanceWarningMapper;
import com.bonus.material.warningAnalysis.service.UseMaintenanceWarningService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.*;

/**
 * @description 工程在用检修预警
 * @author hay
 * @date   2025/3/6 15:32
 */
@Service
public class UseMaintenanceWarningServiceImpl implements UseMaintenanceWarningService
{

    @Resource
    private UseMaintenanceWarningMapper mapper;


    /**
     * 查询列表
     * @param bean
     * @return
     */
    @Override
    public List<UseMaintenanceWarningBean> getList(UseMaintenanceWarningBean bean) {
        try {
            List<UseMaintenanceWarningBean> list = mapper.getList(bean);
            return list;
        } catch (Exception e) {
            e.printStackTrace();
            return new ArrayList<>();
        }
    }

    /**
     * 查询安全工器具检修列表
     * @param bean
     * @return
     */
    @Override
    public List<UseMaintenanceWarningBean> getOverTimeListList(UseMaintenanceWarningBean bean) {
        try {
            return mapper.getOverTimeListList(bean);
        } catch (Exception e) {
            e.printStackTrace();
            return new ArrayList<>();
        }
    }

}
