Commit 58d42ba0 authored by sherlock's avatar sherlock

Merge branch 'dev_oracle_sherlock' into 'dev_oracle'

export order

See merge request root/atms!194
parents 8b0f05f8 14c0f1ab
...@@ -112,7 +112,7 @@ public class InputInvoiceImportController { ...@@ -112,7 +112,7 @@ public class InputInvoiceImportController {
inputInvoiceExportDto.setTaxAmount(inputInvoice.getHJSE() != null ? new BigDecimal(inputInvoice.getHJJE().replace(",","")) : BigDecimal.ZERO); inputInvoiceExportDto.setTaxAmount(inputInvoice.getHJSE() != null ? new BigDecimal(inputInvoice.getHJJE().replace(",","")) : BigDecimal.ZERO);
inputInvoiceExportDtos.add(inputInvoiceExportDto); inputInvoiceExportDtos.add(inputInvoiceExportDto);
} }
Map<String, String> header = new HashMap<>(); Map<String, String> header = new LinkedHashMap<>();
header.put("PeriodId", "期间"); header.put("PeriodId", "期间");
header.put("InvoiceDate", "开票日期"); header.put("InvoiceDate", "开票日期");
header.put("InvoiceCode", "发票代码"); header.put("InvoiceCode", "发票代码");
...@@ -135,7 +135,7 @@ public class InputInvoiceImportController { ...@@ -135,7 +135,7 @@ public class InputInvoiceImportController {
excelSheetA.setSheetName("sheetA"); excelSheetA.setSheetName("sheetA");
Map<String, String> header2 = new HashMap<>(); Map<String, String> header2 = new LinkedHashMap<>();
header2.put("PeriodId", "期间"); header2.put("PeriodId", "期间");
header2.put("InvoiceCode", "发票代码"); header2.put("InvoiceCode", "发票代码");
header2.put("InvoiceNumber", "发票号码"); header2.put("InvoiceNumber", "发票号码");
......
...@@ -106,7 +106,7 @@ public class OutputInvoiceController { ...@@ -106,7 +106,7 @@ public class OutputInvoiceController {
d.setInvoiceTypeName(d.getInvoiceTypeName()); d.setInvoiceTypeName(d.getInvoiceTypeName());
list2.add(d); list2.add(d);
}); });
Map<String, String> header = new HashMap<>(); Map<String, String> header = new LinkedHashMap<>();
header.put("InvoiceTypeName", "发票类型"); header.put("InvoiceTypeName", "发票类型");
header.put("ClassCode", "发票代码"); header.put("ClassCode", "发票代码");
header.put("InvoiceNumber", "发票号码"); header.put("InvoiceNumber", "发票号码");
......
...@@ -273,12 +273,11 @@ public class ExcelUtil { ...@@ -273,12 +273,11 @@ public class ExcelUtil {
// 产生表格标题行 // 产生表格标题行
HSSFRow row = sheet.createRow(0); HSSFRow row = sheet.createRow(0);
// 标题行转中文 // 标题行转中文
Set<String> keys = headers.keySet(); Iterator<Map.Entry<String, String>> it1 = headers.entrySet().iterator();
Iterator<String> it1 = keys.iterator(); String key = StringUtils.EMPTY; //存放临时键变量
String key = ""; //存放临时键变量
int c= 0; //标题列数 int c= 0; //标题列数
while (it1.hasNext()){ while (it1.hasNext()){
key = it1.next(); key = it1.next().getKey();
if (headers.containsKey(key)) { if (headers.containsKey(key)) {
HSSFCell cell = row.createCell(c); HSSFCell cell = row.createCell(c);
HSSFRichTextString text = new HSSFRichTextString(headers.get(key)); HSSFRichTextString text = new HSSFRichTextString(headers.get(key));
...@@ -300,7 +299,7 @@ public class ExcelUtil { ...@@ -300,7 +299,7 @@ public class ExcelUtil {
Map<String, Object> map = (Map<String, Object>) t; Map<String, Object> map = (Map<String, Object>) t;
int cellNum = 0; int cellNum = 0;
//遍历列名 //遍历列名
Iterator<String> it2 = keys.iterator(); Iterator<String> it2 = headers.keySet().iterator();
while (it2.hasNext()){ while (it2.hasNext()){
key = it2.next(); key = it2.next();
if (!headers.containsKey(key)) { if (!headers.containsKey(key)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment