|
|
|
|
@ -216,9 +216,9 @@ public class MarketProjectBudgetExcelExporter extends BaseExcelExporter {
|
|
|
|
|
budget.getContractAmount() != null ? budget.getContractAmount().doubleValue() : 0.0,
|
|
|
|
|
formRightStyle);
|
|
|
|
|
createCell(amountRow1, 2, "合同净额:", formLeftStyle);
|
|
|
|
|
Cell netAmountCell = amountRow1.createCell(3);
|
|
|
|
|
netAmountCell.setCellFormula("B4/1.13"); // 假设税率为13%
|
|
|
|
|
netAmountCell.setCellStyle(formFormulaStyle);
|
|
|
|
|
createNumericCell(amountRow1, 3,
|
|
|
|
|
budget.getNetContractAmount() != null ? budget.getNetContractAmount().doubleValue() : 0.0,
|
|
|
|
|
formRightStyle);
|
|
|
|
|
|
|
|
|
|
// 金额信息行2
|
|
|
|
|
Row amountRow2 = sheet.createRow(rowNum++);
|
|
|
|
|
@ -250,7 +250,7 @@ public class MarketProjectBudgetExcelExporter extends BaseExcelExporter {
|
|
|
|
|
createCell(baseInfoRow, 0, "项目预算期间:", formLeftStyle);
|
|
|
|
|
createCell(baseInfoRow, 1, budget.getDuringOperation(), formRightStyle);
|
|
|
|
|
createCell(baseInfoRow, 2, "单位:", formLeftStyle);
|
|
|
|
|
createCell(baseInfoRow, 3, "万元", formRightStyle);
|
|
|
|
|
createCell(baseInfoRow, 3, "元", formRightStyle);
|
|
|
|
|
|
|
|
|
|
return rowNum;
|
|
|
|
|
}
|
|
|
|
|
@ -537,7 +537,7 @@ public class MarketProjectBudgetExcelExporter extends BaseExcelExporter {
|
|
|
|
|
private int createMaterialTotalRow(Sheet sheet, int dataStartRow, int rowNum) {
|
|
|
|
|
Row totalRow = sheet.createRow(rowNum);
|
|
|
|
|
|
|
|
|
|
createMergedCell(sheet, totalRow, 0, 3, "合计(万元)", headerStyle);
|
|
|
|
|
createMergedCell(sheet, totalRow, 0, 3, "合计(元)", headerStyle);
|
|
|
|
|
createCell(totalRow, 4, "/", headerStyle);
|
|
|
|
|
|
|
|
|
|
Cell totalQuantity1 = totalRow.createCell(5);
|
|
|
|
|
@ -545,7 +545,7 @@ public class MarketProjectBudgetExcelExporter extends BaseExcelExporter {
|
|
|
|
|
totalQuantity1.setCellStyle(footerFormulaStyle);
|
|
|
|
|
|
|
|
|
|
Cell totalAmount1 = totalRow.createCell(6);
|
|
|
|
|
totalAmount1.setCellFormula(String.format("SUM(G%d:G%d)/10000", dataStartRow, rowNum));
|
|
|
|
|
totalAmount1.setCellFormula(String.format("SUM(G%d:G%d)", dataStartRow, rowNum));
|
|
|
|
|
totalAmount1.setCellStyle(footerFormulaStyle);
|
|
|
|
|
|
|
|
|
|
createCell(totalRow, 7, "/", headerStyle);
|
|
|
|
|
@ -555,7 +555,7 @@ public class MarketProjectBudgetExcelExporter extends BaseExcelExporter {
|
|
|
|
|
totalQuantity2.setCellStyle(footerFormulaStyle);
|
|
|
|
|
|
|
|
|
|
Cell totalAmount2 = totalRow.createCell(9);
|
|
|
|
|
totalAmount2.setCellFormula(String.format("SUM(J%d:J%d)/10000", dataStartRow, rowNum));
|
|
|
|
|
totalAmount2.setCellFormula(String.format("SUM(J%d:J%d)", dataStartRow, rowNum));
|
|
|
|
|
totalAmount2.setCellStyle(footerFormulaStyle);
|
|
|
|
|
|
|
|
|
|
createCell(totalRow, 10, "", headerStyle);
|
|
|
|
|
@ -617,8 +617,8 @@ public class MarketProjectBudgetExcelExporter extends BaseExcelExporter {
|
|
|
|
|
|
|
|
|
|
Row headerRow = sheet.createRow(rowNum++);
|
|
|
|
|
String[] leftHeaders = {"人员类别", "人数", "累计时间(月)",
|
|
|
|
|
"月平均投入比例(%)", "人工标准(元/人月)", "金额(万元)", "人员类别", "人数", "累计时间(月)",
|
|
|
|
|
"月平均投入比例(%)", "人工标准(元/人月)", "金额(万元)", ""};
|
|
|
|
|
"月平均投入比例(%)", "人工标准(元/人月)", "金额(元)", "人员类别", "人数", "累计时间(月)",
|
|
|
|
|
"月平均投入比例(%)", "人工标准(元/人月)", "金额(元)", ""};
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < leftHeaders.length; i++) {
|
|
|
|
|
Cell cell = headerRow.createCell(i + 2);
|
|
|
|
|
@ -669,7 +669,7 @@ public class MarketProjectBudgetExcelExporter extends BaseExcelExporter {
|
|
|
|
|
createNumericCell(dataRow, 6, artificialStandard, dataStyle);
|
|
|
|
|
|
|
|
|
|
Cell amountCell = dataRow.createCell(7);
|
|
|
|
|
amountCell.setCellFormula("D" + (rowNum) + "*E" + (rowNum) + "*F" + (rowNum) + "*G" + (rowNum) + "/10000");
|
|
|
|
|
amountCell.setCellFormula("D" + (rowNum) + "*E" + (rowNum) + "*F" + (rowNum) + "*G" + (rowNum));
|
|
|
|
|
amountCell.setCellStyle(formulaStyle);
|
|
|
|
|
|
|
|
|
|
// 降成本后预算成本
|
|
|
|
|
@ -684,7 +684,7 @@ public class MarketProjectBudgetExcelExporter extends BaseExcelExporter {
|
|
|
|
|
createNumericCell(dataRow, 12, reduceArtificialStandard, dataStyle);
|
|
|
|
|
|
|
|
|
|
Cell reduceAmountCell = dataRow.createCell(13);
|
|
|
|
|
reduceAmountCell.setCellFormula("J" + (rowNum) + "*K" + (rowNum) + "*L" + (rowNum) + "*M" + (rowNum) + "/10000");
|
|
|
|
|
reduceAmountCell.setCellFormula("J" + (rowNum) + "*K" + (rowNum) + "*L" + (rowNum) + "*M" + (rowNum));
|
|
|
|
|
reduceAmountCell.setCellStyle(formulaStyle);
|
|
|
|
|
|
|
|
|
|
// 降成本方案
|
|
|
|
|
@ -709,7 +709,7 @@ public class MarketProjectBudgetExcelExporter extends BaseExcelExporter {
|
|
|
|
|
createNumericCell(emptyRow, i, value, dataStyle);
|
|
|
|
|
}
|
|
|
|
|
Cell priceCell = emptyRow.createCell(7);
|
|
|
|
|
priceCell.setCellFormula(String.format("D%d*E%d*F%d*G%d/10000", rowNum, rowNum, rowNum, rowNum));
|
|
|
|
|
priceCell.setCellFormula(String.format("D%d*E%d*F%d*G%d", rowNum, rowNum, rowNum, rowNum));
|
|
|
|
|
priceCell.setCellStyle(formulaStyle);
|
|
|
|
|
|
|
|
|
|
createCell(emptyRow, 8, "", dataStyle);
|
|
|
|
|
@ -719,7 +719,7 @@ public class MarketProjectBudgetExcelExporter extends BaseExcelExporter {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Cell reducePriceCell = emptyRow.createCell(13);
|
|
|
|
|
reducePriceCell.setCellFormula(String.format("J%d*K%d*L%d*M%d/10000", rowNum, rowNum, rowNum, rowNum));
|
|
|
|
|
reducePriceCell.setCellFormula(String.format("J%d*K%d*L%d*M%d", rowNum, rowNum, rowNum, rowNum));
|
|
|
|
|
reducePriceCell.setCellStyle(formulaStyle);
|
|
|
|
|
|
|
|
|
|
createCell(emptyRow, 14, "", dataStyle);
|
|
|
|
|
@ -801,8 +801,8 @@ public class MarketProjectBudgetExcelExporter extends BaseExcelExporter {
|
|
|
|
|
|
|
|
|
|
Row headerRow = sheet.createRow(rowNum++);
|
|
|
|
|
String[] headers = {"人员类别", "人数", "累计时间(月)",
|
|
|
|
|
"月平均投入比例(%)", "人工标准(元/人月)", "金额(万元)", "人员类别", "人数", "累计时间(月)",
|
|
|
|
|
"月平均投入比例(%)", "人工标准(元/人月)", "金额(万元)", ""};
|
|
|
|
|
"月平均投入比例(%)", "人工标准(元/人月)", "金额(元)", "人员类别", "人数", "累计时间(月)",
|
|
|
|
|
"月平均投入比例(%)", "人工标准(元/人月)", "金额(元)", ""};
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < headers.length; i++) {
|
|
|
|
|
Cell cell = headerRow.createCell(i + 2);
|
|
|
|
|
@ -845,31 +845,33 @@ public class MarketProjectBudgetExcelExporter extends BaseExcelExporter {
|
|
|
|
|
Double peopleNumber = detail.getPeopleNumber() != null ? detail.getPeopleNumber().doubleValue() : null;
|
|
|
|
|
Double cumulativeTime = detail.getCumulativeTime() != null ? detail.getCumulativeTime().doubleValue() : null;
|
|
|
|
|
Double artificialStandard = detail.getArtificialStandard() != null ? detail.getArtificialStandard().doubleValue() : null;
|
|
|
|
|
Double price = detail.getPrice() != null ? detail.getPrice().doubleValue() : null;
|
|
|
|
|
createCell(dataRow, 2, detail.getPersonnelCategory(), dataStyle);
|
|
|
|
|
createNumericCell(dataRow, 3, peopleNumber, dataStyle);
|
|
|
|
|
createNumericCell(dataRow, 4, cumulativeTime, dataStyle);
|
|
|
|
|
createNumericCell(dataRow, 5, detail.getMonthRate() == null ? BigDecimal.ZERO :
|
|
|
|
|
detail.getMonthRate().divide(new BigDecimal(100), 2, RoundingMode.HALF_UP), percentStyle);
|
|
|
|
|
createNumericCell(dataRow, 6, artificialStandard, dataStyle);
|
|
|
|
|
|
|
|
|
|
Cell amountCell = dataRow.createCell(7);
|
|
|
|
|
amountCell.setCellFormula("D" + (rowNum) + "*E" + (rowNum) + "*F" + (rowNum) + "*G" + (rowNum) + "/10000");
|
|
|
|
|
amountCell.setCellStyle(formulaStyle);
|
|
|
|
|
createNumericCell(dataRow, 7, price, dataStyle);
|
|
|
|
|
// Cell amountCell = dataRow.createCell(7);
|
|
|
|
|
// amountCell.setCellFormula("D" + (rowNum) + "*E" + (rowNum) + "*F" + (rowNum) + "*G" + (rowNum));
|
|
|
|
|
// amountCell.setCellStyle(formulaStyle);
|
|
|
|
|
|
|
|
|
|
// 降成本后预算成本
|
|
|
|
|
Double reducePeopleNumber = detail.getReducePeopleNumber() != null ? detail.getReducePeopleNumber().doubleValue() : null;
|
|
|
|
|
Double reduceCumulativeTime = detail.getReduceCumulativeTime() != null ? detail.getReduceCumulativeTime().doubleValue() : null;
|
|
|
|
|
Double reduceArtificialStandard = detail.getReduceArtificialStandard() != null ? detail.getReduceArtificialStandard().doubleValue() : null;
|
|
|
|
|
Double reducePrice = detail.getReducePrice() != null ? detail.getReducePrice().doubleValue() : null;
|
|
|
|
|
createCell(dataRow, 8, detail.getReducePersonnelCategory(), dataStyle);
|
|
|
|
|
createNumericCell(dataRow, 9, reducePeopleNumber, dataStyle);
|
|
|
|
|
createNumericCell(dataRow, 10, reduceCumulativeTime, dataStyle);
|
|
|
|
|
createNumericCell(dataRow, 11, detail.getReduceMonthRate() == null ? BigDecimal.ZERO :
|
|
|
|
|
detail.getReduceMonthRate().divide(new BigDecimal(100), 2, RoundingMode.HALF_UP), percentStyle);
|
|
|
|
|
createNumericCell(dataRow, 12, reduceArtificialStandard, dataStyle);
|
|
|
|
|
|
|
|
|
|
Cell reduceAmountCell = dataRow.createCell(13);
|
|
|
|
|
reduceAmountCell.setCellFormula("J" + (rowNum) + "*K" + (rowNum) + "*L" + (rowNum) + "*M" + (rowNum) + "/10000");
|
|
|
|
|
reduceAmountCell.setCellStyle(formulaStyle);
|
|
|
|
|
createNumericCell(dataRow, 13, reducePrice, dataStyle);
|
|
|
|
|
// Cell reduceAmountCell = dataRow.createCell(13);
|
|
|
|
|
// reduceAmountCell.setCellFormula("J" + (rowNum) + "*K" + (rowNum) + "*L" + (rowNum) + "*M" + (rowNum));
|
|
|
|
|
// reduceAmountCell.setCellStyle(formulaStyle);
|
|
|
|
|
|
|
|
|
|
// 降成本方案
|
|
|
|
|
createCell(dataRow, 14, detail.getReduceProposal(), dataStyle);
|
|
|
|
|
@ -893,7 +895,7 @@ public class MarketProjectBudgetExcelExporter extends BaseExcelExporter {
|
|
|
|
|
createNumericCell(emptyRow, i, value, dataStyle);
|
|
|
|
|
}
|
|
|
|
|
Cell priceCell = emptyRow.createCell(7);
|
|
|
|
|
priceCell.setCellFormula(String.format("D%d*E%d*F%d*G%d/10000", rowNum, rowNum, rowNum, rowNum));
|
|
|
|
|
priceCell.setCellFormula(String.format("D%d*E%d*F%d*G%d", rowNum, rowNum, rowNum, rowNum));
|
|
|
|
|
priceCell.setCellStyle(formulaStyle);
|
|
|
|
|
|
|
|
|
|
createCell(emptyRow, 8, "", dataStyle);
|
|
|
|
|
@ -903,7 +905,7 @@ public class MarketProjectBudgetExcelExporter extends BaseExcelExporter {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Cell reducePriceCell = emptyRow.createCell(13);
|
|
|
|
|
reducePriceCell.setCellFormula(String.format("J%d*K%d*L%d*M%d/10000", rowNum, rowNum, rowNum, rowNum));
|
|
|
|
|
reducePriceCell.setCellFormula(String.format("J%d*K%d*L%d*M%d", rowNum, rowNum, rowNum, rowNum));
|
|
|
|
|
reducePriceCell.setCellStyle(formulaStyle);
|
|
|
|
|
|
|
|
|
|
createCell(emptyRow, 14, "", dataStyle);
|
|
|
|
|
@ -975,17 +977,17 @@ public class MarketProjectBudgetExcelExporter extends BaseExcelExporter {
|
|
|
|
|
int rowNum = startRowNum;
|
|
|
|
|
|
|
|
|
|
Row row1 = sheet.createRow(rowNum++);
|
|
|
|
|
createMergedCell(sheet, row1, 0, 23, "差旅费预算明细表", titleStyle);
|
|
|
|
|
createMergedCell(sheet, row1, 0, 27, "差旅费预算明细表", titleStyle);
|
|
|
|
|
|
|
|
|
|
Row row2 = sheet.createRow(rowNum++);
|
|
|
|
|
createMergedCell(sheet, row2, 0, 1, "", mergedHeaderStyle);
|
|
|
|
|
createMergedCell(sheet, row2, 2, 11, "预算成本", mergedHeaderStyle);
|
|
|
|
|
createMergedCell(sheet, row2, 12, 22, "降成本后预算成本", mergedHeaderStyle);
|
|
|
|
|
createCell(row2, 23, "降成本方案", mergedHeaderStyle);
|
|
|
|
|
createMergedCell(sheet, row2, 0, 0, "", mergedHeaderStyle);
|
|
|
|
|
createMergedCell(sheet, row2, 1, 13, "预算成本", mergedHeaderStyle);
|
|
|
|
|
createMergedCell(sheet, row2, 14, 26, "降成本后预算成本", mergedHeaderStyle);
|
|
|
|
|
createCell(row2, 27, "降成本方案", mergedHeaderStyle);
|
|
|
|
|
|
|
|
|
|
Row headerRow = sheet.createRow(rowNum++);
|
|
|
|
|
String[] headers = {"序号", "出差地点", "事由", "次数", "人数", "天数", "住宿标准(元)", "往返路费(元)", "住宿费", "补贴(元)", "小计(元)",
|
|
|
|
|
"序号", "出差地点", "事由", "次数", "人数", "天数", "住宿标准(元)", "往返路费(元)", "住宿费", "补贴(元)", "小计(元)", ""};
|
|
|
|
|
String[] headers = {"序号", "出差地点", "事由", "次数", "人数", "天数", "住宿标准(元)", "往返路费(元)", "住宿费", "补贴(元)","高温补贴(元)","艰苦补贴(元)", "小计(元)",
|
|
|
|
|
"序号", "出差地点", "事由", "次数", "人数", "天数", "住宿标准(元)", "往返路费(元)", "住宿费", "补贴(元)","高温补贴(元)","艰苦补贴(元)", "小计(元)", ""};
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < headers.length; i++) {
|
|
|
|
|
Cell cell = headerRow.createCell(i + 1);
|
|
|
|
|
@ -994,7 +996,7 @@ public class MarketProjectBudgetExcelExporter extends BaseExcelExporter {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 设置列宽
|
|
|
|
|
int[] widths = {8, 8, 15, 15, 10, 12, 12, 18, 18, 18, 18, 20, 8, 15, 15, 10, 12, 12, 18, 18, 18, 18, 20, 23};
|
|
|
|
|
int[] widths = {8, 8, 15, 15, 10, 12, 12, 18, 18, 18,18,18,18, 20, 8, 15, 15, 10, 12, 12, 18, 18, 18, 18, 18,18,20, 23};
|
|
|
|
|
for (int i = 0; i < widths.length; i++) {
|
|
|
|
|
sheet.setColumnWidth(i, widths[i] * 256);
|
|
|
|
|
}
|
|
|
|
|
@ -1030,6 +1032,8 @@ public class MarketProjectBudgetExcelExporter extends BaseExcelExporter {
|
|
|
|
|
Double days = detail.getDays() != null ? detail.getDays().doubleValue() : null;
|
|
|
|
|
Double stayStandard = detail.getStayStandard() != null ? detail.getStayStandard().doubleValue() : null;
|
|
|
|
|
Double travelExpenses = detail.getTravelExpenses() != null ? detail.getTravelExpenses().doubleValue() : null;
|
|
|
|
|
Double highTemperatureSubsidy = detail.getHighTempSubsidy() != null ? detail.getHighTempSubsidy().doubleValue() : null;
|
|
|
|
|
Double hardshipSubsidy = detail.getHardshipSubsidy() != null ? detail.getHardshipSubsidy().doubleValue() : null;
|
|
|
|
|
createCell(dataRow, 1, detail.getSortOrder().toString(), dataStyle);
|
|
|
|
|
createCell(dataRow, 2, detail.getTripLocation(), dataStyle);
|
|
|
|
|
createCell(dataRow, 3, detail.getReason(), dataStyle);
|
|
|
|
|
@ -1045,11 +1049,14 @@ public class MarketProjectBudgetExcelExporter extends BaseExcelExporter {
|
|
|
|
|
accommodationCell.setCellStyle(formulaStyle);
|
|
|
|
|
|
|
|
|
|
Cell subsidyCell = dataRow.createCell(10);
|
|
|
|
|
subsidyCell.setCellFormula("50*G" + (rowNum) + "*F" + (rowNum));
|
|
|
|
|
subsidyCell.setCellFormula("90*G" + (rowNum) + "*F" + (rowNum));
|
|
|
|
|
subsidyCell.setCellStyle(formulaStyle);
|
|
|
|
|
|
|
|
|
|
Cell subtotalCell = dataRow.createCell(11);
|
|
|
|
|
subtotalCell.setCellFormula("(I" + (rowNum) + "+J" + (rowNum) + "+K" + (rowNum) + ")");
|
|
|
|
|
createNumericCell(dataRow, 11, highTemperatureSubsidy, dataStyle);
|
|
|
|
|
createNumericCell(dataRow, 12, hardshipSubsidy, dataStyle);
|
|
|
|
|
|
|
|
|
|
Cell subtotalCell = dataRow.createCell(13);
|
|
|
|
|
subtotalCell.setCellFormula("(I" + (rowNum) + "+J" + (rowNum) + "+K" + (rowNum) + "+L" + (rowNum) + "+M" + (rowNum) + ")");
|
|
|
|
|
subtotalCell.setCellStyle(formulaStyle);
|
|
|
|
|
|
|
|
|
|
// 降成本后预算成本
|
|
|
|
|
@ -1058,29 +1065,34 @@ public class MarketProjectBudgetExcelExporter extends BaseExcelExporter {
|
|
|
|
|
Double reduceDays = detail.getReduceDayNumber() != null ? detail.getReduceDayNumber().doubleValue() : null;
|
|
|
|
|
Double reduceStayStandard = detail.getReduceStayStandard() != null ? detail.getReduceStayStandard().doubleValue() : null;
|
|
|
|
|
Double reduceTravelExpenses = detail.getReduceTravelExpenses() != null ? detail.getReduceTravelExpenses().doubleValue() : null;
|
|
|
|
|
createCell(dataRow, 12, detail.getReduceSortOrder().toString(), dataStyle);
|
|
|
|
|
createCell(dataRow, 13, detail.getReduceTripLocation(), dataStyle);
|
|
|
|
|
createCell(dataRow, 14, detail.getReduceReason(), dataStyle);
|
|
|
|
|
createNumericCell(dataRow, 15, reduceFrequency, dataStyle);
|
|
|
|
|
createNumericCell(dataRow, 16, reducePeopleNumber, dataStyle);
|
|
|
|
|
createNumericCell(dataRow, 17, reduceDays, dataStyle);
|
|
|
|
|
createNumericCell(dataRow, 18, reduceStayStandard, dataStyle);
|
|
|
|
|
createNumericCell(dataRow, 19, reduceTravelExpenses, dataStyle);
|
|
|
|
|
Double reduceHighTemperatureSubsidy = detail.getReduceHighTempSubsidy() != null ? detail.getReduceHighTempSubsidy().doubleValue() : null;
|
|
|
|
|
Double reduceHardshipSubsidy = detail.getReduceHardshipSubsidy() != null ? detail.getReduceHardshipSubsidy().doubleValue() : null;
|
|
|
|
|
createCell(dataRow, 14, detail.getReduceSortOrder().toString(), dataStyle);
|
|
|
|
|
createCell(dataRow, 15, detail.getReduceTripLocation(), dataStyle);
|
|
|
|
|
createCell(dataRow, 16, detail.getReduceReason(), dataStyle);
|
|
|
|
|
createNumericCell(dataRow, 17, reduceFrequency, dataStyle);
|
|
|
|
|
createNumericCell(dataRow, 18, reducePeopleNumber, dataStyle);
|
|
|
|
|
createNumericCell(dataRow, 19, reduceDays, dataStyle);
|
|
|
|
|
createNumericCell(dataRow, 20, reduceStayStandard, dataStyle);
|
|
|
|
|
createNumericCell(dataRow, 21, reduceTravelExpenses, dataStyle);
|
|
|
|
|
|
|
|
|
|
// 公式计算
|
|
|
|
|
Cell reduceAccommodationCell = dataRow.createCell(20);
|
|
|
|
|
reduceAccommodationCell.setCellFormula("S" + (rowNum) + "*R" + (rowNum) + "*Q" + (rowNum));
|
|
|
|
|
Cell reduceAccommodationCell = dataRow.createCell(22);
|
|
|
|
|
reduceAccommodationCell.setCellFormula("S" + (rowNum) + "*T" + (rowNum) + "*U" + (rowNum));
|
|
|
|
|
reduceAccommodationCell.setCellStyle(formulaStyle);
|
|
|
|
|
|
|
|
|
|
Cell reduceSubsidyCell = dataRow.createCell(21);
|
|
|
|
|
reduceSubsidyCell.setCellFormula("50*R" + (rowNum) + "*Q" + (rowNum));
|
|
|
|
|
Cell reduceSubsidyCell = dataRow.createCell(23);
|
|
|
|
|
reduceSubsidyCell.setCellFormula("90*T" + (rowNum) + "*S" + (rowNum));
|
|
|
|
|
reduceSubsidyCell.setCellStyle(formulaStyle);
|
|
|
|
|
|
|
|
|
|
Cell reduceSubtotalCell = dataRow.createCell(22);
|
|
|
|
|
reduceSubtotalCell.setCellFormula("(T" + (rowNum) + "+U" + (rowNum) + "+V" + (rowNum) + ")");
|
|
|
|
|
createNumericCell(dataRow, 24, reduceHighTemperatureSubsidy, dataStyle);
|
|
|
|
|
createNumericCell(dataRow, 25, reduceHardshipSubsidy, dataStyle);
|
|
|
|
|
|
|
|
|
|
Cell reduceSubtotalCell = dataRow.createCell(26);
|
|
|
|
|
reduceSubtotalCell.setCellFormula("(V" + (rowNum) + "+W" + (rowNum) + "+X" + (rowNum) + "+Y" + (rowNum)+ "+Z" + (rowNum)+ ")");
|
|
|
|
|
reduceSubtotalCell.setCellStyle(formulaStyle);
|
|
|
|
|
|
|
|
|
|
createCell(dataRow, 23, detail.getReduceProposal(), dataStyle);
|
|
|
|
|
createCell(dataRow, 27, detail.getReduceProposal(), dataStyle);
|
|
|
|
|
|
|
|
|
|
return rowNum;
|
|
|
|
|
}
|
|
|
|
|
@ -1094,13 +1106,13 @@ public class MarketProjectBudgetExcelExporter extends BaseExcelExporter {
|
|
|
|
|
int fillRows = targetSize - dataSize;
|
|
|
|
|
|
|
|
|
|
while (fillRows > 0) {
|
|
|
|
|
Double value = null;
|
|
|
|
|
Row emptyRow = sheet.createRow(rowNum++);
|
|
|
|
|
for (int i = 1; i < 4; i++) {
|
|
|
|
|
createCell(emptyRow, i, "", dataStyle);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (int i = 4; i < 9; i++) {
|
|
|
|
|
Double value = null;
|
|
|
|
|
createNumericCell(emptyRow, i, value, dataStyle);
|
|
|
|
|
}
|
|
|
|
|
Cell accommodationFeeCell = emptyRow.createCell(9);
|
|
|
|
|
@ -1109,31 +1121,39 @@ public class MarketProjectBudgetExcelExporter extends BaseExcelExporter {
|
|
|
|
|
Cell subsidyFeeCell = emptyRow.createCell(10);
|
|
|
|
|
subsidyFeeCell.setCellFormula(String.format("90*F%d*G%d", rowNum, rowNum));
|
|
|
|
|
subsidyFeeCell.setCellStyle(formulaStyle);
|
|
|
|
|
Cell subtotalCell = emptyRow.createCell(11);
|
|
|
|
|
subtotalCell.setCellFormula(String.format("I%d+J%d+K%d", rowNum, rowNum, rowNum));
|
|
|
|
|
|
|
|
|
|
createNumericCell(emptyRow, 11, value, dataStyle);
|
|
|
|
|
createNumericCell(emptyRow, 12, value, dataStyle);
|
|
|
|
|
|
|
|
|
|
Cell subtotalCell = emptyRow.createCell(13);
|
|
|
|
|
subtotalCell.setCellFormula(String.format("I%d+J%d+K%d+L%d+M%d", rowNum, rowNum, rowNum, rowNum, rowNum));
|
|
|
|
|
subtotalCell.setCellStyle(formulaStyle);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 12; i < 15; i++) {
|
|
|
|
|
for (int i = 14; i < 17; i++) {
|
|
|
|
|
createCell(emptyRow, i, "", dataStyle);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (int i = 15; i < 20; i++) {
|
|
|
|
|
Double value = null;
|
|
|
|
|
for (int i = 17; i < 22; i++) {
|
|
|
|
|
createNumericCell(emptyRow, i, value, dataStyle);
|
|
|
|
|
}
|
|
|
|
|
Cell reduceAccommodationFeeCell = emptyRow.createCell(20);
|
|
|
|
|
reduceAccommodationFeeCell.setCellFormula(String.format("Q%d*R%d*S%d", rowNum, rowNum, rowNum));
|
|
|
|
|
|
|
|
|
|
Cell reduceAccommodationFeeCell = emptyRow.createCell(22);
|
|
|
|
|
reduceAccommodationFeeCell.setCellFormula(String.format("S%d*T%d*U%d", rowNum, rowNum, rowNum));
|
|
|
|
|
reduceAccommodationFeeCell.setCellStyle(formulaStyle);
|
|
|
|
|
Cell reduceSubsidyFeeCell = emptyRow.createCell(21);
|
|
|
|
|
reduceSubsidyFeeCell.setCellFormula(String.format("90*Q%d*R%d", rowNum, rowNum));
|
|
|
|
|
Cell reduceSubsidyFeeCell = emptyRow.createCell(23);
|
|
|
|
|
reduceSubsidyFeeCell.setCellFormula(String.format("90*S%d*T%d", rowNum, rowNum));
|
|
|
|
|
reduceSubsidyFeeCell.setCellStyle(formulaStyle);
|
|
|
|
|
Cell reduceSubtotalCell = emptyRow.createCell(22);
|
|
|
|
|
reduceSubtotalCell.setCellFormula(String.format("T%d+U%d+V%d", rowNum, rowNum, rowNum));
|
|
|
|
|
|
|
|
|
|
createNumericCell(emptyRow, 24, value, dataStyle);
|
|
|
|
|
createNumericCell(emptyRow, 25, value, dataStyle);
|
|
|
|
|
|
|
|
|
|
Cell reduceSubtotalCell = emptyRow.createCell(26);
|
|
|
|
|
reduceSubtotalCell.setCellFormula(String.format("V%d+W%d+X%d+Y%d+Z%d", rowNum, rowNum, rowNum, rowNum, rowNum));
|
|
|
|
|
reduceSubtotalCell.setCellStyle(formulaStyle);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
createCell(emptyRow, 23, "", dataStyle);
|
|
|
|
|
createCell(emptyRow, 27, "", dataStyle);
|
|
|
|
|
fillRows--;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -1162,30 +1182,49 @@ public class MarketProjectBudgetExcelExporter extends BaseExcelExporter {
|
|
|
|
|
totalSubsidy1.setCellFormula(String.format("SUM(K%d:K%d)", dataStartRow, rowNum));
|
|
|
|
|
totalSubsidy1.setCellStyle(footerFormulaStyle);
|
|
|
|
|
|
|
|
|
|
Cell totalSubtotal1 = totalRow.createCell(11);
|
|
|
|
|
totalSubtotal1.setCellFormula(String.format("SUM(L%d:L%d)", dataStartRow, rowNum));
|
|
|
|
|
Cell highTemperatureSubsidy = totalRow.createCell(11);
|
|
|
|
|
highTemperatureSubsidy.setCellFormula(String.format("SUM(L%d:L%d)", dataStartRow, rowNum));
|
|
|
|
|
highTemperatureSubsidy.setCellStyle(footerFormulaStyle);
|
|
|
|
|
|
|
|
|
|
Cell hardshipSubsidy = totalRow.createCell(12);
|
|
|
|
|
hardshipSubsidy.setCellFormula(String.format("SUM(M%d:M%d)", dataStartRow, rowNum));
|
|
|
|
|
hardshipSubsidy.setCellStyle(footerFormulaStyle);
|
|
|
|
|
|
|
|
|
|
Cell totalSubtotal1 = totalRow.createCell(13);
|
|
|
|
|
totalSubtotal1.setCellFormula(String.format("SUM(N%d:N%d)", dataStartRow, rowNum));
|
|
|
|
|
totalSubtotal1.setCellStyle(footerFormulaStyle);
|
|
|
|
|
|
|
|
|
|
// 降成本后预算成本合计
|
|
|
|
|
createMergedCell(sheet, totalRow, 12, 18, "合计", headerStyle);
|
|
|
|
|
|
|
|
|
|
Cell totalRoundTrip2 = totalRow.createCell(19);
|
|
|
|
|
totalRoundTrip2.setCellFormula(String.format("SUM(T%d:T%d)", dataStartRow, rowNum));
|
|
|
|
|
|
|
|
|
|
// 降成本后预算成本合计
|
|
|
|
|
createMergedCell(sheet, totalRow, 14, 20, "合计", headerStyle);
|
|
|
|
|
|
|
|
|
|
Cell totalRoundTrip2 = totalRow.createCell(21);
|
|
|
|
|
totalRoundTrip2.setCellFormula(String.format("SUM(V%d:V%d)", dataStartRow, rowNum));
|
|
|
|
|
totalRoundTrip2.setCellStyle(footerFormulaStyle);
|
|
|
|
|
|
|
|
|
|
Cell totalAccommodation2 = totalRow.createCell(20);
|
|
|
|
|
totalAccommodation2.setCellFormula(String.format("SUM(U%d:U%d)", dataStartRow, rowNum));
|
|
|
|
|
Cell totalAccommodation2 = totalRow.createCell(22);
|
|
|
|
|
totalAccommodation2.setCellFormula(String.format("SUM(W%d:W%d)", dataStartRow, rowNum));
|
|
|
|
|
totalAccommodation2.setCellStyle(footerFormulaStyle);
|
|
|
|
|
|
|
|
|
|
Cell totalSubsidy2 = totalRow.createCell(21);
|
|
|
|
|
totalSubsidy2.setCellFormula(String.format("SUM(V%d:V%d)", dataStartRow, rowNum));
|
|
|
|
|
Cell totalSubsidy2 = totalRow.createCell(23);
|
|
|
|
|
totalSubsidy2.setCellFormula(String.format("SUM(X%d:X%d)", dataStartRow, rowNum));
|
|
|
|
|
totalSubsidy2.setCellStyle(footerFormulaStyle);
|
|
|
|
|
|
|
|
|
|
Cell totalSubtotal2 = totalRow.createCell(22);
|
|
|
|
|
totalSubtotal2.setCellFormula(String.format("SUM(W%d:W%d)", dataStartRow, rowNum));
|
|
|
|
|
Cell reduceHighTemperatureSubsidy = totalRow.createCell(24);
|
|
|
|
|
reduceHighTemperatureSubsidy.setCellFormula(String.format("SUM(Y%d:Y%d)", dataStartRow, rowNum));
|
|
|
|
|
reduceHighTemperatureSubsidy.setCellStyle(footerFormulaStyle);
|
|
|
|
|
|
|
|
|
|
Cell reduceHardshipSubsidy = totalRow.createCell(25);
|
|
|
|
|
reduceHardshipSubsidy.setCellFormula(String.format("SUM(Z%d:Z%d)", dataStartRow, rowNum));
|
|
|
|
|
reduceHardshipSubsidy.setCellStyle(footerFormulaStyle);
|
|
|
|
|
|
|
|
|
|
Cell totalSubtotal2 = totalRow.createCell(26);
|
|
|
|
|
totalSubtotal2.setCellFormula(String.format("SUM(AA%d:AA%d)", dataStartRow, rowNum));
|
|
|
|
|
totalSubtotal2.setCellStyle(footerFormulaStyle);
|
|
|
|
|
|
|
|
|
|
createCell(totalRow, 23, "", dataStyle);
|
|
|
|
|
|
|
|
|
|
createCell(totalRow, 27, "", dataStyle);
|
|
|
|
|
|
|
|
|
|
return rowNum;
|
|
|
|
|
}
|
|
|
|
|
@ -1372,14 +1411,14 @@ public class MarketProjectBudgetExcelExporter extends BaseExcelExporter {
|
|
|
|
|
private void setupFormulaForTravel(Row row, int excelRowNum) {
|
|
|
|
|
Integer totalRow = sheetTotalRowMap.get(SHEET_TRAVEL);
|
|
|
|
|
if (totalRow != null) {
|
|
|
|
|
// 预算成本(万元)= 差旅费!L列合计/10000
|
|
|
|
|
// 预算成本(元)= 差旅费!L列合计
|
|
|
|
|
Cell budgetCostCell = row.createCell(2);
|
|
|
|
|
budgetCostCell.setCellFormula(String.format("%s!L%d/10000", SHEET_TRAVEL, totalRow + 1));
|
|
|
|
|
budgetCostCell.setCellFormula(String.format("%s!N%d", SHEET_TRAVEL, totalRow + 1));
|
|
|
|
|
budgetCostCell.setCellStyle(formulaStyle);
|
|
|
|
|
|
|
|
|
|
// 降成本后预算成本(万元)= 差旅费!W列合计/10000
|
|
|
|
|
// 降成本后预算成本(元)= 差旅费!W列合计
|
|
|
|
|
Cell reducedCostCell = row.createCell(3);
|
|
|
|
|
reducedCostCell.setCellFormula(String.format("%s!W%d/10000", SHEET_TRAVEL, totalRow + 1));
|
|
|
|
|
reducedCostCell.setCellFormula(String.format("%s!AA%d", SHEET_TRAVEL, totalRow + 1));
|
|
|
|
|
reducedCostCell.setCellStyle(formulaStyle);
|
|
|
|
|
} else {
|
|
|
|
|
createCell(row, 2, "", dataStyle);
|
|
|
|
|
@ -1394,11 +1433,11 @@ public class MarketProjectBudgetExcelExporter extends BaseExcelExporter {
|
|
|
|
|
Integer totalRow = sheetTotalRowMap.get(SHEET_OTHER);
|
|
|
|
|
if (totalRow != null) {
|
|
|
|
|
Cell budgetCostCell = row.createCell(2);
|
|
|
|
|
budgetCostCell.setCellFormula(String.format("%s!C%d/10000", SHEET_OTHER, totalRow + 1));
|
|
|
|
|
budgetCostCell.setCellFormula(String.format("%s!C%d", SHEET_OTHER, totalRow + 1));
|
|
|
|
|
budgetCostCell.setCellStyle(formulaStyle);
|
|
|
|
|
|
|
|
|
|
Cell reducedCostCell = row.createCell(3);
|
|
|
|
|
reducedCostCell.setCellFormula(String.format("%s!E%d/10000", SHEET_OTHER, totalRow + 1));
|
|
|
|
|
reducedCostCell.setCellFormula(String.format("%s!E%d", SHEET_OTHER, totalRow + 1));
|
|
|
|
|
reducedCostCell.setCellStyle(formulaStyle);
|
|
|
|
|
} else {
|
|
|
|
|
createCell(row, 2, "", dataStyle);
|
|
|
|
|
|