Commit 6efaf397 authored by hanfeng's avatar hanfeng

总业绩统计

parent 75c22dd8
......@@ -173,6 +173,8 @@ public class TotalPerformanceBiz {
}
List<String[]> achievementArray =getAchievementArrays(achievements,12);
createCellData(sheet,1,generalCellStyle,achievementArray);
//设置最后一行
int lastRowNum = sheet.getLastRowNum();
XSSFRow rown = sheet.createRow(lastRowNum);
......@@ -308,13 +310,6 @@ public class TotalPerformanceBiz {
private void createHeader(Row row, int cellStartIndex, String[] header, CellStyle cellStyle){
for (int i =0 ;i<header.length;i++){
Cell cell = row.createCell(cellStartIndex);
//设置head填充色
CellStyle cellStyle1 = cell.getCellStyle();
cellStyle1.setFillForegroundColor(IndexedColors.TURQUOISE.getIndex());
cellStyle1.setFillPattern(FillPatternType.SOLID_FOREGROUND);
cell.setCellStyle(cellStyle1);
cell.setCellValue(header[i]);
cell.setCellStyle(cellStyle);
cellStartIndex+=1;
......
......@@ -86,15 +86,13 @@ public class TotalPerformanceStatementController extends CommonBaseController {
String name = DateTimeFormatter.ofPattern("YYYYMMddHHmmss").format(LocalDateTime.now());
response.setContentType("application/vnd.ms-excel;charset=utf-8");
String filename = String.format("%s.xlsx",name);
response.setHeader("Content-Disposition","attachment;filename="+filename);
ServletOutputStream outputStream = response.getOutputStream();
if (BookkeepingTypeEnum.ENTER.getCode().equals(queryCriteria.getType())) {
String filename = String.format("%s-总业绩-入账表.xlsx",name);
response.setHeader("Content-Disposition","attachment;filename="+ new String(filename.getBytes(), "iso8859-1"));
ServletOutputStream outputStream = response.getOutputStream();
totalPerformanceBiz.exportEntry(queryCriteria, name, outputStream);
}else if (BookkeepingTypeEnum.OUT.getCode().equals(queryCriteria.getType())){
String filename = String.format("%s-总业绩-出账表.xlsx",name);
response.setHeader("Content-Disposition","attachment;filename="+ new String(filename.getBytes(), "iso8859-1"));
ServletOutputStream outputStream = response.getOutputStream();
totalPerformanceBiz.exportAccount(queryCriteria, name, outputStream);
}else {
throw new BaseException("无相关数据");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment