| | |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.procurementrecord.dto.ProcurementPageDto; |
| | | import com.ruoyi.procurementrecord.mapper.GasTankWarningMapper; |
| | | import com.ruoyi.procurementrecord.pojo.GasTankWarning; |
| | | import com.ruoyi.procurementrecord.service.GasTankWarningService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class GasTankWarningServiceImpl extends ServiceImpl<GasTankWarningMapper, GasTankWarning> implements GasTankWarningService { |
| | | @Autowired |
| | | private GasTankWarningMapper gasTankWarningMapper; |
| | | private final GasTankWarningMapper gasTankWarningMapper; |
| | | |
| | | @Override |
| | | public IPage listPage(Page page, GasTankWarning gasTankWarning) { |
| | | return gasTankWarningMapper.listPage(page,gasTankWarning); |
| | | return gasTankWarningMapper.listPage(page, gasTankWarning); |
| | | } |
| | | |
| | | @Override |
| | | public void export(HttpServletResponse response, List<Long> ids) { |
| | | List<GasTankWarning> list = new ArrayList<>(); |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | list = gasTankWarningMapper.selectList(null); |
| | | }else { |
| | | } else { |
| | | list = gasTankWarningMapper.selectBatchIds(ids); |
| | | } |
| | | ExcelUtil<GasTankWarning> util = new ExcelUtil<>(GasTankWarning.class); |