| | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import org.apache.poi.hssf.usermodel.*; |
| | | //import org.apache.poi.ss.usermodel.CellType; |
| | | import org.apache.poi.ss.usermodel.CellType; |
| | | import org.apache.poi.ss.usermodel.HorizontalAlignment; |
| | | import org.apache.poi.ss.util.CellRangeAddress; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | List<List<String>> lists = new ArrayList<>(); |
| | | List<String> list1 = new ArrayList<>(); |
| | | list1.add("类别:"); |
| | | list1.add(type == 1 ? "快车" : type == 2 ? "出租车" : type == 3 ? "城际" : "小件物流"); |
| | | list1.add(type == 1 ? "专车" : type == 2 ? "出租车" : type == 3 ? "城际" : "小件物流"); |
| | | list1.add(""); |
| | | list1.add(""); |
| | | list1.add("起止时间:"); |
| | |
| | | HSSFRow hssfRow = hssfSheet.createRow(i);//设置第一行数据(标题) |
| | | HSSFCellStyle style = hssfWorkbook.createCellStyle(); |
| | | HSSFFont font = hssfWorkbook.createFont(); |
| | | // font.setBold(true); |
| | | font.setBold(true); |
| | | style.setFont(font); |
| | | // style.setAlignment(HorizontalAlignment.CENTER); |
| | | style.setAlignment(HorizontalAlignment.CENTER); |
| | | for (int l = 0; l < lists.get(i).size(); l++) { |
| | | HSSFCell hssfCell = hssfRow.createCell(l); |
| | | // hssfCell.setCellType(CellType.STRING);//设置表格类型 |
| | | hssfCell.setCellType(CellType.STRING);//设置表格类型 |
| | | hssfCell.setCellValue(lists.get(i).get(l)); |
| | | hssfCell.setCellStyle(style); |
| | | if(l > 0) { |
| | |
| | | data = lists1.get(i).get(l); |
| | | for (int j = 0; j < data.size(); j++) { |
| | | HSSFCell hssfCell = row.createCell(j); |
| | | // hssfCell.setCellType(CellType.STRING);//设置表格类型 |
| | | hssfCell.setCellType(CellType.STRING);//设置表格类型 |
| | | hssfCell.setCellValue(data.get(j)); |
| | | } |
| | | } |
| | | } |
| | | return hssfWorkbook; |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getCompanyIncomeList(Page<Map<String, Object>> page, String beginTime, String endTime, String userId) { |
| | | return this.baseMapper.getCompanyIncomeList(page,beginTime,endTime,userId); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getCompanyIncomeListEx(String beginTime, String endTime, String userId) { |
| | | return this.baseMapper.getCompanyIncomeListEx(beginTime,endTime,userId); |
| | | } |
| | | |
| | | @Override |
| | | public Double getSumCompanyIncomeMoney(String beginTime, String endTime, String userId) { |
| | | return this.baseMapper.getSumCompanyIncomeMoney(beginTime,endTime,userId); |
| | | } |
| | | } |