package com.jwipc.spe.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jwipc.spe.entity.QmNoticeOrder;
import com.jwipc.spe.mapper.QmNoticeOrderMapper;
import com.jwipc.spe.model.po.QmNoticeOrderPO;
import com.jwipc.spe.model.query.QmNoticeOrderQuery;
import com.jwipc.spe.service.IQmNoticeOrderService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 质量管理通知单 服务实现类
 * </p>
 *
 * @author AL
 * @since 2024-03-07
 */
@Service
public class QmNoticeOrderServiceImpl extends ServiceImpl<QmNoticeOrderMapper, QmNoticeOrder> implements IQmNoticeOrderService {

    @Override
    public List<QmNoticeOrderPO> findPageByQuery(Page<QmNoticeOrder> dbPage, QmNoticeOrderQuery query) {
        if (dbPage==null){
            return baseMapper.findPageByQuery(query);
        }
        return baseMapper.findPageByQuery(dbPage,query);
    }

    @Override
    public List<QmNoticeOrderPO> findPageByQueryEnd(Page<QmNoticeOrder> dbPage, QmNoticeOrderQuery query) {
        if (dbPage==null){
            return baseMapper.findPageByQueryEnd(query);
        }
        return baseMapper.findPageByQueryEnd(dbPage,query);
    }
    @Override
    public List<QmNoticeOrderPO> findListByQuery(Page<QmNoticeOrder> dbPage, QmNoticeOrderQuery query) {
        if (dbPage==null){
            return baseMapper.findListByQuery(query);
        }
        return baseMapper.findListByQuery(dbPage,query);
    }
    @Override
    public List<QmNoticeOrderPO> findPageByQueryImprove(Long id) {

            return baseMapper.findPageByQueryImprove(id);

    }
    @Override
    public QmNoticeOrderPO getDataById(Long id) {
        return baseMapper.getDataById(id);
    }

    @Override
    public List<QmNoticeOrderPO> selectWarnList() {
        return baseMapper.selectWarnList();
    }

    @Override
    public List<QmNoticeOrderPO> selectQmNoticeOrderWarnList() {
        return baseMapper.selectQmNoticeOrderWarnList();
    }
}
