/*
 * Author: wangjian
 * 生成ServiceImpl
 */
package com.tofly.xrtygis.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tofly.xrtygis.custom.service.export.ExportCommonCodeService;
import com.tofly.xrtygis.entity.LeakAssessment;
import com.tofly.xrtygis.mapper.LeakAssessmentMapper;
import com.tofly.xrtygis.service.LeakAssessmentService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletResponse;

/**
 * 分期漏损评估配置表
 *
 * @author admin
 * @date Thu Apr 28 00:00:00 CST 2022
 */
@Service("leakAssessmentService")
@AllArgsConstructor
public class LeakAssessmentServiceImpl extends ServiceImpl<LeakAssessmentMapper, LeakAssessment> implements LeakAssessmentService {

    private final ExportCommonCodeService exportCommonCodeService;

    @Override
    public boolean exportLeakAssessment(HttpServletResponse response) {
        exportCommonCodeService.exportCode(response, "pfrecordExcelService", this.baseMapper.selectList(new QueryWrapper<>()));
        return true;
    }
}
