Commit 74cb4f01 authored by sherlock's avatar sherlock

xxfp export

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