// Path: src/main/java/cn/edu/upc/yb/integrate/deliverwater/dao/DeliverWaterDao.java
// public interface DeliverWaterDao extends CrudRepository<DeliverWater,Integer> {
//     Iterable<DeliverWater> findByIsdeal(boolean isdeal);
//     Iterable<DeliverWater> findByIsdealOrderByBlockNumber(boolean isdeal);
// }


import cn.edu.upc.yb.integrate.deliverwater.dao.DeliverWaterDao;
import cn.edu.upc.yb.integrate.deliverwater.model.DeliverWater;
import cn.edu.upc.yb.integrate.deliverwater.util.Time;
import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.hssf.util.HSSFColor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Calendar;
import java.util.Date;
import java.util.Iterator;
        font.setColor(HSSFColor.BLACK.index);
        HSSFCellStyle style = wb.createCellStyle();
        style.setAlignment(HSSFCellStyle.ALIGN_CENTER);
        style.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);
        style.setFillForegroundColor(HSSFColor.WHITE.index);
        style.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND);
        style.setBottomBorderColor(HSSFColor.RED.index);
        style.setBorderBottom(HSSFCellStyle.BORDER_THIN);
        style.setBorderLeft(HSSFCellStyle.BORDER_THIN);
        style.setBorderRight(HSSFCellStyle.BORDER_THIN);
        style.setBorderTop(HSSFCellStyle.BORDER_THIN);
        style.setFont(font);

        HSSFRow row = null;
        HSSFCell cell = null;

        Time time = new Time();
        short i = -1;

        row = sheet.createRow(0);
        row.setHeight((short) 500);

        cell = row.createCell(++i);
        cell.setCellStyle(style);
        cell.setCellValue("水桶数"); //数量

        cell = row.createCell(++i);
        cell.setCellStyle(style);
        cell.setCellValue("水票数"); //数量

// Path: src/main/java/cn/edu/upc/yb/integrate/deliverwater/dao/DeliverWaterDao.java
// public interface DeliverWaterDao extends CrudRepository<DeliverWater,Integer> {
//     Iterable<DeliverWater> findByIsdeal(boolean isdeal);
//     Iterable<DeliverWater> findByIsdealOrderByBlockNumber(boolean isdeal);
// }


// Path: src/main/java/cn/edu/upc/yb/integrate/deliverwater/service/WriteExcelService.java
import cn.edu.upc.yb.integrate.deliverwater.dao.DeliverWaterDao;
import cn.edu.upc.yb.integrate.deliverwater.model.DeliverWater;
import cn.edu.upc.yb.integrate.deliverwater.util.Time;
import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.hssf.util.HSSFColor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Calendar;
import java.util.Date;
import java.util.Iterator;

        font.setColor(HSSFColor.BLACK.index);
        HSSFCellStyle style = wb.createCellStyle();
        style.setAlignment(HSSFCellStyle.ALIGN_CENTER);
        style.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);
        style.setFillForegroundColor(HSSFColor.WHITE.index);
        style.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND);
        style.setBottomBorderColor(HSSFColor.RED.index);
        style.setBorderBottom(HSSFCellStyle.BORDER_THIN);
        style.setBorderLeft(HSSFCellStyle.BORDER_THIN);
        style.setBorderRight(HSSFCellStyle.BORDER_THIN);
        style.setBorderTop(HSSFCellStyle.BORDER_THIN);
        style.setFont(font);

        HSSFRow row = null;
        HSSFCell cell = null;

        Time time = new Time();
        short i = -1;

        row = sheet.createRow(0);
        row.setHeight((short) 500);

        cell = row.createCell(++i);
        cell.setCellStyle(style);
        cell.setCellValue("水桶数"); //数量

        cell = row.createCell(++i);
        cell.setCellStyle(style);
        cell.setCellValue("水票数"); //数量

        cell = row.createCell(++i);