2024年5月27日发(作者:)
lStyle(style);
HSSFCell threeCell = Cell(2);
ght((short) 400);
lForegroundColor();
lBackgroundColor();
lValue(new HSSFRichTextString("物料编号"));
lStyle(style);
HSSFCell fourCell = Cell(3);
ght((short) 400);
lForegroundColor();
lBackgroundColor();
lValue(new HSSFRichTextString("物料名称"));
lStyle(style);
HSSFCell fiveCell = Cell(4);
ght((short) 400);
lForegroundColor();
lBackgroundColor();
lValue(new HSSFRichTextString("在库数量"));
lStyle(style);
HSSFCell sixCell = Cell(5);
ght((short) 400);
lForegroundColor();
lBackgroundColor();
lValue(new HSSFRichTextString("锁定数量"));
lStyle(style);
//设置列宽
umnWidth(0, 7000);
umnWidth(1, 8000);
umnWidth(2, 4000);
umnWidth(3, 6000);
umnWidth(4, 4000);
umnWidth(5, 4000);
List list = inStorageByTerm(eHouse(), ckArea(), erialCode(),
erialName());
for (Object object : list) {
Object[] objects = (Object[]) object;
Storage storage = (Storage) objects[0];
Warehouse warehouse = (Warehouse) objects[1];
StockArea stockArea = (StockArea) objects[2];
Material material = (Material) objects[3];
//设置Excel中的边框
HSSFCellStyle cellStyle = CellStyle();
gnment(_CENTER);
derBottom(_MEDIUM);
tomBorderColor();
derLeft(_MEDIUM);
tBorderColor();
derRight(_MEDIUM);
htBorderColor();
derTop(_MEDIUM);
BorderColor();
HSSFRow hssfRow = Row((short) row);
HSSFCell firstHssfCell = Cell(0);//库房
lType(_TYPE_STRING);
lValue(new HSSFRichTextString(e()));
lStyle(cellStyle);//设置单元格的样式
HSSFCell secondHssfCell = Cell(1);
lType(_TYPE_STRING);
lValue(new HSSFRichTextString(e()));
lStyle(cellStyle);//设置单元格的样式
HSSFCell threeHssfCell = Cell(2);
lType(_TYPE_STRING);
lValue(new HSSFRichTextString(e()));
lStyle(cellStyle);//设置单元格的样式
HSSFCell fourHssfCell = Cell(3);
lType(_TYPE_STRING);
lValue(new HSSFRichTextString(e()));
lStyle(cellStyle);//设置单元格的样式
HSSFCell fiveHssfCell = Cell(4);
lType(_TYPE_STRING);
lValue(new HSSFRichTextString(f(())));
lStyle(cellStyle);//设置单元格的样式
HSSFCell sixHssfCell = Cell(5);
lType(_TYPE_STRING);
lValue(new HSSFRichTextString(f(Locked())));
lStyle(cellStyle);//设置单元格的样式
row++;
}
String newFileName = ("%s.%s", "joinStocktaking-" + (new Date()).getTime(), "xls");
String uploadPath = ctPath(perty(JAVA_IO_TMPDIR), newFileName);
FileOutputStream fOut = new FileOutputStream(uploadPath);
(fOut);
();
();
return Success(newFileName);
}


发布评论