|
@@ -2,10 +2,8 @@ package com.jeeplus.modules.sg.financial.erpcredit.util;
|
|
|
|
|
|
import com.jeeplus.modules.sg.financial.erpcredit.entity.*;
|
|
|
import com.jeeplus.modules.sg.financial.settlement.entity.MaintainData;
|
|
|
-import io.swagger.models.auth.In;
|
|
|
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
|
|
|
import org.apache.poi.hssf.usermodel.HSSFFont;
|
|
|
-import org.apache.poi.hssf.util.HSSFColor;
|
|
|
import org.apache.poi.ss.usermodel.*;
|
|
|
import org.apache.poi.xssf.usermodel.XSSFCell;
|
|
|
import org.apache.poi.xssf.usermodel.XSSFFont;
|
|
@@ -13,14 +11,12 @@ import org.apache.poi.xssf.usermodel.XSSFRow;
|
|
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
-import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* 写入表格中模板
|
|
|
*/
|
|
|
-public class ExportUtil2 {
|
|
|
+public class ExportUtil {
|
|
|
|
|
|
//导出表(一览表) 写入数据
|
|
|
public static void getSheetView(Sheet sheet,List<ErpCredit> erpCredits,List<MaintainData> maintainDataList,Workbook workbook){
|
|
@@ -30,7 +26,7 @@ public class ExportUtil2 {
|
|
|
Schedule schedule = null;
|
|
|
XSSFRow row = (XSSFRow) sheet.createRow(6);
|
|
|
XSSFCell cell = row.getCell(3);
|
|
|
- List<Schedule> scheduleList = ExportUtil1.getScheduleList(erpCredits, maintainDataList);
|
|
|
+ List<Schedule> scheduleList = ExportUtilCalculate.getScheduleList(erpCredits, maintainDataList);
|
|
|
for (int i = 0; i <scheduleList.size(); i++) {
|
|
|
schedule = scheduleList.get(i);
|
|
|
row=(XSSFRow)sheet.createRow(i+6);
|
|
@@ -164,8 +160,8 @@ public class ExportUtil2 {
|
|
|
if (null!=sheet){
|
|
|
XSSFRow row = (XSSFRow) sheet.getRow(0);
|
|
|
XSSFCell cell = row.getCell(3);
|
|
|
- ScheduleOther scheduleOtherAct = ExportUtil1.getScheduleOfOtherExpenses(erpCredits);
|
|
|
- ScheduleOther scheduleOtherBud = ExportUtil1.getScheduleOfOtherExpensesReg(maintainDataList);
|
|
|
+ ScheduleOther scheduleOtherAct = ExportUtilCalculate.getScheduleOfOtherExpenses(erpCredits);
|
|
|
+ ScheduleOther scheduleOtherBud = ExportUtilCalculate.getScheduleOfOtherExpensesReg(maintainDataList);
|
|
|
List<String> listAct = new ArrayList<String>();
|
|
|
List<String> listBud = new ArrayList<String>();
|
|
|
List<String> listActual = getListSchOther(listAct, scheduleOtherAct);
|
|
@@ -189,8 +185,8 @@ public class ExportUtil2 {
|
|
|
CellStyle cellStyle = getCellStyle(workbook);
|
|
|
XSSFRow row = (XSSFRow) sheet.createRow(4);
|
|
|
XSSFCell cell = row.getCell(0);
|
|
|
- TransferOfPower1 transferOfPower1 = null;
|
|
|
- List<TransferOfPower1> transferOfPower1s = ExportUtil1.getTransFerPower1(erpCredits);
|
|
|
+ TransferOfPowerLine transferOfPower1 = null;
|
|
|
+ List<TransferOfPowerLine> transferOfPower1s = ExportUtilCalculate.getTransFerPower1(erpCredits);
|
|
|
for (int i = 0; i < transferOfPower1s.size(); i++) {
|
|
|
transferOfPower1=transferOfPower1s.get(i);
|
|
|
row = (XSSFRow) sheet.createRow((int)i+4);
|
|
@@ -311,8 +307,8 @@ public class ExportUtil2 {
|
|
|
CellStyle cellStyle = getCellStyle(workbook);
|
|
|
XSSFRow row = (XSSFRow) sheet.createRow(4);
|
|
|
XSSFCell cell = row.getCell(0);
|
|
|
- TransferOfPower2 transferOfPower2 = null;
|
|
|
- List<TransferOfPower2> transferOfPower2s = ExportUtil1.getTransferOfPower2(erpCredits);
|
|
|
+ TransferOfEquipment transferOfPower2 = null;
|
|
|
+ List<TransferOfEquipment> transferOfPower2s = ExportUtilCalculate.getTransferOfPower2(erpCredits);
|
|
|
for (int i = 0; i < transferOfPower2s.size(); i++) {
|
|
|
transferOfPower2=transferOfPower2s.get(i);
|
|
|
row = (XSSFRow) sheet.createRow((int)i+4);
|
|
@@ -429,7 +425,7 @@ public class ExportUtil2 {
|
|
|
CellStyle cellStyle1 = getCellStyleAlign(workbook);
|
|
|
MaterialEquipment materialEquipment = null;
|
|
|
if (null!=sheet){
|
|
|
- List<MaterialEquipment> materialEquipments = ExportUtil1.getMaterialEquipment(erpCredits);
|
|
|
+ List<MaterialEquipment> materialEquipments = ExportUtilCalculate.getMaterialEquipment(erpCredits);
|
|
|
for (int i = 0; i < materialEquipments.size(); i++) {
|
|
|
materialEquipment = materialEquipments.get(i);
|
|
|
row = (XSSFRow) sheet.createRow((int)i+5);
|
|
@@ -507,8 +503,8 @@ public class ExportUtil2 {
|
|
|
CellStyle cellStyle = getCellStyle(workbook);
|
|
|
XSSFRow row = (XSSFRow) sheet.createRow(4);
|
|
|
XSSFCell cell = row.getCell(0);
|
|
|
- TransferOfPower1 transferOfPower1 = null;
|
|
|
- List<TransferOfPower1> transferOfPower1s = ExportUtil1.getTransFerPower1(erpCredits);
|
|
|
+ TransferOfPowerLine transferOfPower1 = null;
|
|
|
+ List<TransferOfPowerLine> transferOfPower1s = ExportUtilCalculate.getTransFerPower1(erpCredits);
|
|
|
for (int i = 0; i < transferOfPower1s.size(); i++) {
|
|
|
transferOfPower1=transferOfPower1s.get(i);
|
|
|
row = (XSSFRow) sheet.createRow((int)i+4);
|
|
@@ -641,8 +637,8 @@ public class ExportUtil2 {
|
|
|
CellStyle cellStyle = getCellStyle(workbook);
|
|
|
XSSFRow row = (XSSFRow) sheet.createRow(4);
|
|
|
XSSFCell cell = row.getCell(0);
|
|
|
- TransferOfPower2 transferOfPower2 = null;
|
|
|
- List<TransferOfPower2> transferOfPower2s = ExportUtil1.getTransferOfPower2(erpCredits);
|
|
|
+ TransferOfEquipment transferOfPower2 = null;
|
|
|
+ List<TransferOfEquipment> transferOfPower2s = ExportUtilCalculate.getTransferOfPower2(erpCredits);
|
|
|
for (int i = 0; i <transferOfPower2s.size(); i++) {
|
|
|
transferOfPower2=transferOfPower2s.get(i);
|
|
|
row = (XSSFRow) sheet.createRow((int)i+4);
|
|
@@ -761,7 +757,7 @@ public class ExportUtil2 {
|
|
|
//概述表
|
|
|
public static void getSheetOverView(Sheet sheet, List<ErpCredit> erpCredits, List<MaintainData> maintainDataList){
|
|
|
if (sheet!=null){
|
|
|
- GeneralSituation generalSituation = ExportUtil1.getFeneraSituation(erpCredits,maintainDataList);
|
|
|
+ GeneralSituation generalSituation = ExportUtilCalculate.getFeneraSituation(erpCredits,maintainDataList);
|
|
|
XSSFRow row = (XSSFRow) sheet.getRow(6);
|
|
|
XSSFCell cell = row.getCell(6);
|
|
|
cell.setCellValue(generalSituation.getOrganDataNumber());//日期,批文号
|
|
@@ -805,10 +801,10 @@ public class ExportUtil2 {
|
|
|
XSSFRow row = (XSSFRow) sheet.getRow(0);
|
|
|
XSSFCell cell = row.getCell(0);
|
|
|
TheAssetsTotal theAssetsTotal = null;
|
|
|
- List<TheAssetsTotal> theAssetsTotals = ExportUtil1.getTheAssetsTotal(erpCredits);
|
|
|
+ List<TheAssetsTotal> theAssetsTotals = ExportUtilCalculate.getTheAssetsTotal(erpCredits);
|
|
|
for (int i = 0; i < theAssetsTotals.size(); i++) {
|
|
|
theAssetsTotal = theAssetsTotals.get(i);
|
|
|
- row = (XSSFRow) sheet.getRow((int)i+6);
|
|
|
+ row = (XSSFRow) sheet.getRow((int)i+5);
|
|
|
cell = row.getCell(2);
|
|
|
cell.setCellValue(theAssetsTotal.getBuildProject());
|
|
|
cell=row.getCell(3);
|
|
@@ -827,7 +823,7 @@ public class ExportUtil2 {
|
|
|
if (null!=sheet){
|
|
|
XSSFRow row = (XSSFRow) sheet.getRow(0);
|
|
|
XSSFCell cell = row.getCell(0);
|
|
|
- MCompletionProject mCompletionProject = ExportUtil1.getMCompletionProject(erpCredits,maintainDataList);
|
|
|
+ MCompletionProject mCompletionProject = ExportUtilCalculate.getMCompletionProject(erpCredits,maintainDataList);
|
|
|
row = (XSSFRow)sheet.getRow(4);
|
|
|
cell = row.getCell(5);
|
|
|
cell.setCellValue(mCompletionProject.getTransferAssets());
|