|
|
|
|
@ -532,12 +532,7 @@ public class RdProjectBudgetExcelExporter extends BaseExcelExporter {
|
|
|
|
|
private int createEquipmentDataRows(Sheet sheet, ErpBudgetInfoVo budget, int startRowNum) {
|
|
|
|
|
int rowNum = startRowNum;
|
|
|
|
|
|
|
|
|
|
if (budget.getErpRdBudgetEquipmentCostList() != null) {
|
|
|
|
|
for (int i = 0; i < budget.getErpRdBudgetEquipmentCostList().size(); i++) {
|
|
|
|
|
var detail = budget.getErpRdBudgetEquipmentCostList().get(i);
|
|
|
|
|
rowNum = createEquipmentDataRow(sheet, detail, rowNum);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return rowNum;
|
|
|
|
|
}
|
|
|
|
|
@ -985,12 +980,12 @@ public class RdProjectBudgetExcelExporter extends BaseExcelExporter {
|
|
|
|
|
private int createMeetingDataRows(Sheet sheet, ErpBudgetInfoVo budget, int startRowNum) {
|
|
|
|
|
int rowNum = startRowNum;
|
|
|
|
|
|
|
|
|
|
if (budget.getErpRdBudgetMeetingCostList() != null) {
|
|
|
|
|
for (int i = 0; i < budget.getErpRdBudgetMeetingCostList().size(); i++) {
|
|
|
|
|
ErpRdBudgetMeetingCost detail = budget.getErpRdBudgetMeetingCostList().get(i);
|
|
|
|
|
rowNum = createMeetingDataRow(sheet, detail, rowNum);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// if (budget.getErpRdBudgetMeetingCostList() != null) {
|
|
|
|
|
// for (int i = 0; i < budget.getErpRdBudgetMeetingCostList().size(); i++) {
|
|
|
|
|
// ErpRdBudgetMeetingCost detail = budget.getErpRdBudgetMeetingCostList().get(i);
|
|
|
|
|
// rowNum = createMeetingDataRow(sheet, detail, rowNum);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
return rowNum;
|
|
|
|
|
}
|
|
|
|
|
@ -1032,22 +1027,22 @@ public class RdProjectBudgetExcelExporter extends BaseExcelExporter {
|
|
|
|
|
* 创建空会议费行
|
|
|
|
|
*/
|
|
|
|
|
private int createEmptyMeetingRow(Sheet sheet, int rowNum, ErpBudgetInfoVo budget) {
|
|
|
|
|
List<ErpRdBudgetMeetingCost> erpRdBudgetMeetingCostList = budget.getErpRdBudgetMeetingCostList() == null ? new ArrayList<>() :
|
|
|
|
|
budget.getErpRdBudgetMeetingCostList();
|
|
|
|
|
|
|
|
|
|
int rdBudgetMeetingFillRowNum = rowNum + (4 - erpRdBudgetMeetingCostList.size());
|
|
|
|
|
while (rowNum <= rdBudgetMeetingFillRowNum) {
|
|
|
|
|
Row emptyRow = sheet.createRow(rowNum++);
|
|
|
|
|
createCell(emptyRow, 1, "", dataStyle);
|
|
|
|
|
createMergedCell(sheet, emptyRow, 2, 4, "", dataStyle);
|
|
|
|
|
for (int i = 5; i < 11; i++) {
|
|
|
|
|
Double value = null;
|
|
|
|
|
createNumericCell(emptyRow, i, value, dataStyle);
|
|
|
|
|
}
|
|
|
|
|
Cell meetingCostCell = emptyRow.createCell(11);
|
|
|
|
|
meetingCostCell.setCellFormula("ROUND(((F" + (rowNum) + "+G" + (rowNum) + ")*H" + (rowNum) + "+I" + (rowNum) + "+J" + (rowNum) + "*K" + (rowNum) + ")/10000,2)");
|
|
|
|
|
meetingCostCell.setCellStyle(formulaStyle);
|
|
|
|
|
}
|
|
|
|
|
// List<ErpRdBudgetMeetingCost> erpRdBudgetMeetingCostList = budget.getErpRdBudgetMeetingCostList() == null ? new ArrayList<>() :
|
|
|
|
|
// budget.getErpRdBudgetMeetingCostList();
|
|
|
|
|
//
|
|
|
|
|
// int rdBudgetMeetingFillRowNum = rowNum + (4 - erpRdBudgetMeetingCostList.size());
|
|
|
|
|
// while (rowNum <= rdBudgetMeetingFillRowNum) {
|
|
|
|
|
// Row emptyRow = sheet.createRow(rowNum++);
|
|
|
|
|
// createCell(emptyRow, 1, "", dataStyle);
|
|
|
|
|
// createMergedCell(sheet, emptyRow, 2, 4, "", dataStyle);
|
|
|
|
|
// for (int i = 5; i < 11; i++) {
|
|
|
|
|
// Double value = null;
|
|
|
|
|
// createNumericCell(emptyRow, i, value, dataStyle);
|
|
|
|
|
// }
|
|
|
|
|
// Cell meetingCostCell = emptyRow.createCell(11);
|
|
|
|
|
// meetingCostCell.setCellFormula("ROUND(((F" + (rowNum) + "+G" + (rowNum) + ")*H" + (rowNum) + "+I" + (rowNum) + "+J" + (rowNum) + "*K" + (rowNum) + ")/10000,2)");
|
|
|
|
|
// meetingCostCell.setCellStyle(formulaStyle);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
return rowNum;
|
|
|
|
|
}
|
|
|
|
|
@ -1112,12 +1107,12 @@ public class RdProjectBudgetExcelExporter extends BaseExcelExporter {
|
|
|
|
|
private int createInternationalDataRows(Sheet sheet, ErpBudgetInfoVo budget, int startRowNum) {
|
|
|
|
|
int rowNum = startRowNum;
|
|
|
|
|
|
|
|
|
|
if (budget.getErpRdBudgetExchangeCostList() != null) {
|
|
|
|
|
for (int i = 0; i < budget.getErpRdBudgetExchangeCostList().size(); i++) {
|
|
|
|
|
ErpRdBudgetExchangeCost detail = budget.getErpRdBudgetExchangeCostList().get(i);
|
|
|
|
|
rowNum = createInternationalDataRow(sheet, detail, rowNum);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// if (budget.getErpRdBudgetExchangeCostList() != null) {
|
|
|
|
|
// for (int i = 0; i < budget.getErpRdBudgetExchangeCostList().size(); i++) {
|
|
|
|
|
// ErpRdBudgetExchangeCost detail = budget.getErpRdBudgetExchangeCostList().get(i);
|
|
|
|
|
// rowNum = createInternationalDataRow(sheet, detail, rowNum);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
return rowNum;
|
|
|
|
|
}
|
|
|
|
|
@ -1154,28 +1149,28 @@ public class RdProjectBudgetExcelExporter extends BaseExcelExporter {
|
|
|
|
|
* 创建空国际交流费行
|
|
|
|
|
*/
|
|
|
|
|
private int createEmptyInternationalRow(Sheet sheet, int rowNum, ErpBudgetInfoVo budget) {
|
|
|
|
|
List<ErpRdBudgetExchangeCost> erpRdBudgetExchangeCostList = budget.getErpRdBudgetExchangeCostList() == null ? new ArrayList<>() :
|
|
|
|
|
budget.getErpRdBudgetExchangeCostList();
|
|
|
|
|
|
|
|
|
|
int rdBudgetInternationalFillRowNum = rowNum + (4 - erpRdBudgetExchangeCostList.size());
|
|
|
|
|
while (rowNum <= rdBudgetInternationalFillRowNum) {
|
|
|
|
|
Row emptyRow = sheet.createRow(rowNum++);
|
|
|
|
|
createCell(emptyRow, 1, "", dataStyle);
|
|
|
|
|
createCell(emptyRow, 2, "", dataStyle);
|
|
|
|
|
createMergedCell(sheet, emptyRow, 3, 4, "", dataStyle);
|
|
|
|
|
createMergedCell(sheet, emptyRow, 5, 6, "", dataStyle);
|
|
|
|
|
for (int i = 7; i < 10; i++) {
|
|
|
|
|
Double value = null;
|
|
|
|
|
createNumericCell(emptyRow, i, value, dataStyle);
|
|
|
|
|
}
|
|
|
|
|
Cell subsidyCell = emptyRow.createCell(10);
|
|
|
|
|
subsidyCell.setCellFormula("IF(C" + (rowNum) + "=\"出国考察\",40*I" + (rowNum) + "*H" + (rowNum) + ",0)");
|
|
|
|
|
subsidyCell.setCellStyle(formulaStyle);
|
|
|
|
|
|
|
|
|
|
Cell subtotalCell = emptyRow.createCell(11);
|
|
|
|
|
subtotalCell.setCellFormula("ROUND((K" + (rowNum) + "+J" + (rowNum) + ")/10000,2)");
|
|
|
|
|
subtotalCell.setCellStyle(formulaStyle);
|
|
|
|
|
}
|
|
|
|
|
// List<ErpRdBudgetExchangeCost> erpRdBudgetExchangeCostList = budget.getErpRdBudgetExchangeCostList() == null ? new ArrayList<>() :
|
|
|
|
|
// budget.getErpRdBudgetExchangeCostList();
|
|
|
|
|
//
|
|
|
|
|
// int rdBudgetInternationalFillRowNum = rowNum + (4 - erpRdBudgetExchangeCostList.size());
|
|
|
|
|
// while (rowNum <= rdBudgetInternationalFillRowNum) {
|
|
|
|
|
// Row emptyRow = sheet.createRow(rowNum++);
|
|
|
|
|
// createCell(emptyRow, 1, "", dataStyle);
|
|
|
|
|
// createCell(emptyRow, 2, "", dataStyle);
|
|
|
|
|
// createMergedCell(sheet, emptyRow, 3, 4, "", dataStyle);
|
|
|
|
|
// createMergedCell(sheet, emptyRow, 5, 6, "", dataStyle);
|
|
|
|
|
// for (int i = 7; i < 10; i++) {
|
|
|
|
|
// Double value = null;
|
|
|
|
|
// createNumericCell(emptyRow, i, value, dataStyle);
|
|
|
|
|
// }
|
|
|
|
|
// Cell subsidyCell = emptyRow.createCell(10);
|
|
|
|
|
// subsidyCell.setCellFormula("IF(C" + (rowNum) + "=\"出国考察\",40*I" + (rowNum) + "*H" + (rowNum) + ",0)");
|
|
|
|
|
// subsidyCell.setCellStyle(formulaStyle);
|
|
|
|
|
//
|
|
|
|
|
// Cell subtotalCell = emptyRow.createCell(11);
|
|
|
|
|
// subtotalCell.setCellFormula("ROUND((K" + (rowNum) + "+J" + (rowNum) + ")/10000,2)");
|
|
|
|
|
// subtotalCell.setCellStyle(formulaStyle);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
return rowNum;
|
|
|
|
|
}
|
|
|
|
|
@ -1811,7 +1806,7 @@ public class RdProjectBudgetExcelExporter extends BaseExcelExporter {
|
|
|
|
|
Sheet sheet = workbook.createSheet(SHEET_DOCUMENT);
|
|
|
|
|
|
|
|
|
|
// 准备数据
|
|
|
|
|
List<ErpRdBudgetLiteratureCost> literatureCostList = prepareLiteratureCostData(budget);
|
|
|
|
|
List<ErpRdBudgetLiteratureCost> literatureCostList = null;
|
|
|
|
|
|
|
|
|
|
int rowNum = 0;
|
|
|
|
|
|
|
|
|
|
@ -1842,15 +1837,6 @@ public class RdProjectBudgetExcelExporter extends BaseExcelExporter {
|
|
|
|
|
return rowNum;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 准备资料文献费数据
|
|
|
|
|
*/
|
|
|
|
|
private List<ErpRdBudgetLiteratureCost> prepareLiteratureCostData(ErpBudgetInfoVo budget) {
|
|
|
|
|
List<ErpRdBudgetLiteratureCost> literatureCostList = budget.getErpRdBudgetLiteratureCostList() == null ?
|
|
|
|
|
new ArrayList<>() : budget.getErpRdBudgetLiteratureCostList();
|
|
|
|
|
return literatureCostList;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 创建资料/文献费表头
|
|
|
|
|
*/
|
|
|
|
|
|