diff --git a/main/java/shkd/repc/recos/formplugin/RecosMeasurecosFormPlugin.java b/main/java/shkd/repc/recos/formplugin/RecosMeasurecosFormPlugin.java index 3f517f1..fa0613e 100644 --- a/main/java/shkd/repc/recos/formplugin/RecosMeasurecosFormPlugin.java +++ b/main/java/shkd/repc/recos/formplugin/RecosMeasurecosFormPlugin.java @@ -195,6 +195,8 @@ public class RecosMeasurecosFormPlugin extends AbstractFormPlugin implements Upl // 设置垂直居中 titleStyle.setVerticalAlignment(VerticalAlignment.CENTER); + titleStyle.setLocked(false); + headCell.setCellStyle(titleStyle); // 合并第1行的前几列,合并列数 = excel的列数 @@ -471,7 +473,7 @@ public class RecosMeasurecosFormPlugin extends AbstractFormPlugin implements Upl calculation = new Calculation( String.valueOf(getcellvallue(row.getCell(6))),//科目编码 String.valueOf(getcellvallue(row.getCell(7))),//科目名称 - String.valueOf(getcellvallue(row.getCell(8))),//财务预算分类 + row.getCell(8).getStringCellValue(),//财务预算分类 String.valueOf(getcellvallue(row.getCell(9))),//估算口径 String.valueOf(getcellvallue(row.getCell(10))),//单位 (double)getcellvallue(row.getCell(11)),//工程量基数 @@ -482,7 +484,8 @@ public class RecosMeasurecosFormPlugin extends AbstractFormPlugin implements Upl (double)getcellvallue(row.getCell(16)),//单价调整值 (double)getcellvallue(row.getCell(17)),//单价 (double)getcellvallue(row.getCell(18)),//合价(含税) - String.valueOf(getcellvallue(row.getCell(19))),//明细 + row.getCell(19).getStringCellValue(),//明细 +// String.valueOf(getcellvallue(row.getCell(19))),//明细 String.valueOf(getcellvallue(row.getCell(20)))//备注 ); } catch (Exception e) { @@ -688,7 +691,7 @@ public class RecosMeasurecosFormPlugin extends AbstractFormPlugin implements Upl break; case "估算口径": // 1. 设置下拉项数据 - String[] products1 = {"按建筑面积指标", "按施工面积指标", "按项估入", "其他计算口径","个/套/组/件/点位"}; + String[] products1 = {"按建筑面积指标", "按施工面积指标", "按项估入", "其他计算口径","个/套/组/件/点位","按点位估入","按个估入","按扩电容量","按套估入","费率","以上述费用合计数为基数"}; DataValidationHelper helper1 = sheet.getDataValidationHelper(); DataValidationConstraint constraint1 = helper1.createExplicitListConstraint(products1); int totalRowCount1 = sheet.getLastRowNum() + 1; @@ -706,7 +709,7 @@ public class RecosMeasurecosFormPlugin extends AbstractFormPlugin implements Upl sheet.createFreezePane(0, 4); // 0列, 4行 //设置公式 - for (int rowNum =5 ; rowNum < sheet.getPhysicalNumberOfRows(); rowNum++) { + for (int rowNum =5 ; rowNum < sheet.getPhysicalNumberOfRows()+1; rowNum++) { for (int i = 0; i < numColumns; i++) { Cell cell = sheet.getRow(3).getCell(i); if (cell==null){ @@ -745,9 +748,8 @@ public class RecosMeasurecosFormPlugin extends AbstractFormPlugin implements Upl } } } - //设置合并 - - sheet.protectSheet("password"); + //设置保护单元格密码 +// sheet.protectSheet("password"); } }