package com.dayou.service.impl;

import com.dayou.bo.ReportNounBO;
import com.dayou.entity.ReportNoun;
import com.dayou.mapper.ReportNounMapper;
import com.dayou.service.IReportNounService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.dayou.utils.ExcelUtil;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
import java.util.ArrayList;
import org.springframework.transaction.annotation.Transactional;
import com.dayou.enums.BatchTaskTypeEnum;

/**
 * <p>
 * 报告名词占位符 服务实现类
 * </p>
 *
 * @author wucl
 * @since 2023-09-05
 */
@Service
public class ReportNounServiceImpl extends ServiceImpl<ReportNounMapper, ReportNoun> implements IReportNounService {

    @Autowired
    private ReportNounMapper reportNounMapper;

    @Override
    public List<ReportNounBO> getListByType(String reportType){
        List<ReportNounBO> list = reportNounMapper.getListByType(reportType);
        return list;
    }


    @Override
    public ReportNoun detail(Long id){
        return this.getById(id);
    }

    @Override
    public Boolean add(ReportNoun reportNoun){
        return  this.save(reportNoun);
    }

    @Override
    public Boolean update(ReportNoun reportNoun){
        return  this.updateById(reportNoun);
    }

    @Override
    public Boolean delete(Long id){
        //逻辑删除
        return this.removeById(id);
    }
}
