Commit 74cb4f01 authored by sherlock's avatar sherlock

xxfp export

parent f2f32013
...@@ -111,22 +111,25 @@ public class OutputInvoiceController { ...@@ -111,22 +111,25 @@ public class OutputInvoiceController {
if (list.size() == 0) { if (list.size() == 0) {
return 0; return 0;
} }
OutputVATInvoiceInfoDto outputVATInvoiceInfoDto = new OutputVATInvoiceInfoDto(); pwc.taxtech.atms.dto.vatdto.OutputVATInvoiceInfoDto outputVATInvoiceInfoDto = new pwc.taxtech.atms.dto.vatdto.OutputVATInvoiceInfoDto();
outputVATInvoiceInfoDto.setTaxAmount(list.stream().map(OutputVATInvoiceInfoDto::getTaxAmount).reduce(BigDecimal::add).get()); outputVATInvoiceInfoDto.setTaxAmount(list.stream().map(OutputVATInvoiceInfoDto::getTaxAmount).reduce(BigDecimal::add).get());
outputVATInvoiceInfoDto.setAmount(list.stream().map(OutputVATInvoiceInfoDto::getAmount).reduce(BigDecimal::add).get()); outputVATInvoiceInfoDto.setAmount(list.stream().map(OutputVATInvoiceInfoDto::getAmount).reduce(BigDecimal::add).get());
OutputVATInvoiceInfoDto black = new OutputVATInvoiceInfoDto(); pwc.taxtech.atms.dto.vatdto.OutputVATInvoiceInfoDto black = new pwc.taxtech.atms.dto.vatdto.OutputVATInvoiceInfoDto();
list.add(black); // list.add(black);
list.add(outputVATInvoiceInfoDto); // list.add(outputVATInvoiceInfoDto);
List<pwc.taxtech.atms.dto.vatdto.OutputVATInvoiceInfoDto> list2 = new ArrayList<>(); List<pwc.taxtech.atms.dto.vatdto.OutputVATInvoiceInfoDto> list2 = new ArrayList<>();
list.stream().forEach(x -> { list.stream().forEach(x -> {
pwc.taxtech.atms.dto.vatdto.OutputVATInvoiceInfoDto d = pwc.taxtech.atms.dto.vatdto.OutputVATInvoiceInfoDto d =
new pwc.taxtech.atms.dto.vatdto.OutputVATInvoiceInfoDto(); new pwc.taxtech.atms.dto.vatdto.OutputVATInvoiceInfoDto();
d = beanUtil.copyProperties(x,d); d = beanUtil.copyProperties(x,d);
d.setInvoiceTypeName(d.getInvoiceTypeName()); d.setInvoiceTypeName(d.getInvoiceTypeName());
d.setTaxRate(x.getTaxRate().toString() + "%"); d.setTaxRateS(x.getTaxRate().toString() + "%");
list2.add(d); list2.add(d);
}); });
list2.add(black);
list2.add(outputVATInvoiceInfoDto);
Map<String, String> header = new LinkedHashMap<>(); Map<String, String> header = new LinkedHashMap<>();
header.put("InvoiceTypeName", "发票类型"); header.put("InvoiceTypeName", "发票类型");
header.put("ClassCode", "发票代码"); header.put("ClassCode", "发票代码");
...@@ -144,7 +147,7 @@ public class OutputInvoiceController { ...@@ -144,7 +147,7 @@ public class OutputInvoiceController {
header.put("Quantity", "数量"); header.put("Quantity", "数量");
header.put("UnitPrice", "单价"); header.put("UnitPrice", "单价");
header.put("Amount", "金额"); header.put("Amount", "金额");
header.put("TaxRate", "税率"); header.put("TaxRateS", "税率");
header.put("TaxAmount", "税额"); header.put("TaxAmount", "税额");
// header.put("TaxClassCode", "税收分类编码"); // header.put("TaxClassCode", "税收分类编码");
......
...@@ -45,7 +45,7 @@ public class OutputVATInvoiceInfoDto { ...@@ -45,7 +45,7 @@ public class OutputVATInvoiceInfoDto {
@ExcelCell(index=10) @ExcelCell(index=10)
private BigDecimal amount; private BigDecimal amount;
@ExcelCell(index=11) @ExcelCell(index=11)
private String taxRate; private String taxRateS;
@ExcelCell(index=12) @ExcelCell(index=12)
private BigDecimal taxAmount; private BigDecimal taxAmount;
private String taxClassCode; private String taxClassCode;
...@@ -194,12 +194,12 @@ public class OutputVATInvoiceInfoDto { ...@@ -194,12 +194,12 @@ public class OutputVATInvoiceInfoDto {
this.amount = amount; this.amount = amount;
} }
public String getTaxRate() { public String getTaxRateS() {
return taxRate; return taxRateS;
} }
public void setTaxRate(String taxRate) { public void setTaxRateS(String taxRateS) {
this.taxRate = taxRate; this.taxRateS = taxRateS;
} }
public BigDecimal getTaxAmount() { public BigDecimal getTaxAmount() {
......
...@@ -559,7 +559,7 @@ ...@@ -559,7 +559,7 @@
sheet.setValue(data.rowIndex, data.columnIndex, data.value); // 只有数值,设置为数值 sheet.setValue(data.rowIndex, data.columnIndex, data.value); // 只有数值,设置为数值
} }
} }
// sheet.setValue(data.rowIndex, data.columnIndex, '妈的有毒');
sheet.setTag(data.rowIndex, data.columnIndex, JSON.stringify(data)); sheet.setTag(data.rowIndex, data.columnIndex, JSON.stringify(data));
//设置 tooltip 和 图标信息 //设置 tooltip 和 图标信息
spreadJsTipService.setCellTipByCellData(sheet.getCell(data.rowIndex, data.columnIndex), data); spreadJsTipService.setCellTipByCellData(sheet.getCell(data.rowIndex, data.columnIndex), data);
...@@ -632,7 +632,6 @@ ...@@ -632,7 +632,6 @@
sheet.setTag(x.rowIndex, x.columnIndex, JSON.stringify(x)); sheet.setTag(x.rowIndex, x.columnIndex, JSON.stringify(x));
} }
}); });
spreadJsTipService.paintSheet(sheet);
loadSheet(scope.templateId); loadSheet(scope.templateId);
return cells; return cells;
}; };
......
...@@ -465,13 +465,7 @@ ...@@ -465,13 +465,7 @@
} }
} }
var value ; var value = jsonTagInfo.value;
if(isNaN(parseFloat(tmpValue))){
value = jsonTagInfo.keyinData;
} else {
value = jsonTagInfo.value;
}
// 保证无论jsonTagInfo.value是数字或是字符串都能执行以下操作 // 保证无论jsonTagInfo.value是数字或是字符串都能执行以下操作
if (jsonTagInfo.value || (jsonTagInfo.value + '').indexOf('0') > -1) { if (jsonTagInfo.value || (jsonTagInfo.value + '').indexOf('0') > -1) {
if (jsonTagInfo.dataType === enums.cellDataType.Integer) { if (jsonTagInfo.dataType === enums.cellDataType.Integer) {
...@@ -494,8 +488,7 @@ ...@@ -494,8 +488,7 @@
money: jsonTagInfo.value, money: jsonTagInfo.value,
value: value, value: value,
modelIdList: jsonTagInfo.cellTemplateConfig.modelIDs, modelIdList: jsonTagInfo.cellTemplateConfig.modelIDs,
modifiedReportCell: jsonTagInfo.modifiedReportCell, modifiedReportCell: jsonTagInfo.modifiedReportCell
keinData:value
}, },
dataType: jsonTagInfo.dataType, dataType: jsonTagInfo.dataType,
reportTemplateId: jsonTagInfo.reportTemplateID, reportTemplateId: jsonTagInfo.reportTemplateID,
...@@ -504,7 +497,6 @@ ...@@ -504,7 +497,6 @@
cellTemplateId: jsonTagInfo.cellTemplateID, cellTemplateId: jsonTagInfo.cellTemplateID,
inputValue: '', inputValue: '',
inputMemo: '', inputMemo: '',
keyinData:value,
allowAddDatasource: false, allowAddDatasource: false,
showFormulaSummary: true showFormulaSummary: true
}; };
......
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