Commit 424abbe6 authored by chase's avatar chase

fix bug

parent 082b14c1
......@@ -184,8 +184,12 @@ public class RevenueConfService extends BaseService {
revenueConfig.setTbSegment6("");
}
String taxRat = POIUtil.getCellFormulaString(row.getCell(RevenueConfEnum.EXECLColumn.Column_7.getIndex()));
taxRat = taxRat.replaceAll("%","");
revenueConfig.setTaxRate(new BigDecimal(taxRat));
if(taxRat.indexOf("%")>0){
taxRat = taxRat.replaceAll("%","");
revenueConfig.setTaxRate(new BigDecimal(taxRat).divide(new BigDecimal(100)));
}else{
revenueConfig.setTaxRate(new BigDecimal(taxRat));
}
revenueConfig.setTaxBase(RevenueConfEnum.TaxBase.REVERSAL_MAPPING.get(POIUtil.getCellFormulaString(row.getCell(RevenueConfEnum.EXECLColumn.Column_8.getIndex()))));
if(revenueConfig.getTaxBase().intValue() == 4){
revenueConfig.setBaseDrCode(POIUtil.getCellFormulaString(row.getCell(RevenueConfEnum.EXECLColumn.Column_9.getIndex())));
......@@ -292,7 +296,7 @@ public class RevenueConfService extends BaseService {
row.getCell(RevenueConfEnum.EXECLColumn.Column_4.getIndex()).setCellValue(revenueConfig.getTbSegment3());
row.getCell(RevenueConfEnum.EXECLColumn.Column_5.getIndex()).setCellValue(revenueConfig.getTbSegment5());
row.getCell(RevenueConfEnum.EXECLColumn.Column_6.getIndex()).setCellValue(revenueConfig.getTbSegment6());
row.getCell(RevenueConfEnum.EXECLColumn.Column_7.getIndex()).setCellValue(String.valueOf(revenueConfig.getTaxRate().multiply(new BigDecimal(100)).intValue())+"%");
row.getCell(RevenueConfEnum.EXECLColumn.Column_7.getIndex()).setCellValue(revenueConfig.getTaxRate().doubleValue());
row.getCell(RevenueConfEnum.EXECLColumn.Column_8.getIndex()).setCellValue(RevenueConfEnum.TaxBase.MAPPING.get(revenueConfig.getTaxBase()));
if(revenueConfig.getTaxBase().intValue() == 4){
row.getCell(RevenueConfEnum.EXECLColumn.Column_9.getIndex()).setCellValue(revenueConfig.getBaseDrCode());
......
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