|
@@ -12,6 +12,8 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import java.io.*;
|
|
import java.io.*;
|
|
import java.net.URLEncoder;
|
|
import java.net.URLEncoder;
|
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
|
+import java.util.Date;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
public class MyExportUtil {
|
|
public class MyExportUtil {
|
|
@@ -145,8 +147,8 @@ public class MyExportUtil {
|
|
cell4.setCellValue(view.getBuildingAddress());
|
|
cell4.setCellValue(view.getBuildingAddress());
|
|
cell5.setCellValue(view.getBuildingProperty());
|
|
cell5.setCellValue(view.getBuildingProperty());
|
|
cell6.setCellValue(view.getTotalInvestment());
|
|
cell6.setCellValue(view.getTotalInvestment());
|
|
- cell7.setCellValue(view.getStartTime());
|
|
|
|
- cell8.setCellValue(view.getStopTime());
|
|
|
|
|
|
+ cell7.setCellValue(getDate(view.getStartTime()));
|
|
|
|
+ cell8.setCellValue(getDate(view.getStopTime()));
|
|
cell9.setCellValue(view.getApprovalNumber());
|
|
cell9.setCellValue(view.getApprovalNumber());
|
|
cell10.setCellValue(getDouble(view.getConstructionCost()));
|
|
cell10.setCellValue(getDouble(view.getConstructionCost()));
|
|
cell11.setCellValue(getDouble(view.getInstallationCost()));
|
|
cell11.setCellValue(getDouble(view.getInstallationCost()));
|
|
@@ -257,4 +259,21 @@ public class MyExportUtil {
|
|
}
|
|
}
|
|
return returnDouble;
|
|
return returnDouble;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ String getString (String obj) {
|
|
|
|
+ String returnStr = "";
|
|
|
|
+ if (null!=obj) {
|
|
|
|
+ returnStr = obj;
|
|
|
|
+ }
|
|
|
|
+ return returnStr;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ String getDate(Date date) {
|
|
|
|
+ SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
+ String returnDate = "";
|
|
|
|
+ if (null != date) {
|
|
|
|
+ returnDate = dateFormat.format(date);
|
|
|
|
+ }
|
|
|
|
+ return returnDate;
|
|
|
|
+ }
|
|
}
|
|
}
|