Compare commits
2 Commits
d80e5667a3
...
f97dea2d99
Author | SHA1 | Date |
---|---|---|
陈绍鑫 | f97dea2d99 | |
陈绍鑫 | b8956e97ad |
|
@ -195,17 +195,11 @@ public class RecosMeasurecosFormPlugin extends AbstractFormPlugin implements Upl
|
|||
billFont.setFontName("黑体");
|
||||
billFont.setFontHeight(15);
|
||||
billStyle.setFont(billFont);
|
||||
|
||||
//写入单据列表数据
|
||||
for (int i = 0; i < excel.size(); i++) {
|
||||
// i+1是因为前面第1行加了一个标题,单据列表数据是从Excel的第2行开始的,所以要+1
|
||||
XSSFRow nrow = sheet.createRow(i+1);
|
||||
// if (i==0){
|
||||
// XSSFCellStyle style = workbook.createCellStyle();
|
||||
// style.setFillPattern(FillPatternType.SOLID_FOREGROUND);
|
||||
// XSSFColor grayColor = new XSSFColor(new java.awt.Color(128, 128, 128), new DefaultIndexedColorMap());
|
||||
// style.setFillForegroundColor(grayColor);
|
||||
// nrow.setRowStyle(style);
|
||||
// }
|
||||
for (int u=0;u<excel.get(i).size();u++){
|
||||
XSSFCell ncell = nrow.createCell(u);
|
||||
ncell.setCellStyle(billStyle);
|
||||
|
@ -332,7 +326,7 @@ public class RecosMeasurecosFormPlugin extends AbstractFormPlugin implements Upl
|
|||
row.getCell(13).getNumericCellValue(),//单价
|
||||
row.getCell(11).getNumericCellValue(),//工程量
|
||||
row.getCell(9).getStringCellValue(),//估算口径
|
||||
row.getCell(15).getStringCellValue()//备注
|
||||
String.valueOf(getcellvallue(row.getCell(15)))//备注
|
||||
);
|
||||
arrayList.add(calculation);
|
||||
}
|
||||
|
@ -466,4 +460,14 @@ public class RecosMeasurecosFormPlugin extends AbstractFormPlugin implements Upl
|
|||
String targetFormId = view.getPageCache().get(tabKey);
|
||||
return StringUtils.isEmpty(targetFormId) ? null : view.getView(targetFormId);
|
||||
}
|
||||
|
||||
public Object getcellvallue(Cell cell) {
|
||||
if (cell.getCellType() == CellType.STRING) {
|
||||
String Stringvalue = cell.getStringCellValue();
|
||||
return Stringvalue;
|
||||
}else {
|
||||
double numericCellValue = cell.getNumericCellValue();
|
||||
return numericCellValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue