|
|
@ -207,7 +207,7 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
//先删除原有主数据,再查验更新主数据和明细数据
|
|
|
|
//先删除原有主数据,再查验更新主数据和明细数据
|
|
|
|
int delete = baseTDxRecordInvoiceDao.delete(recordWrapper); |
|
|
|
int delete = baseTDxRecordInvoiceDao.delete(recordWrapper); |
|
|
|
if(delete > 0) { |
|
|
|
if(delete > 0) { |
|
|
|
checkInvoiceResult = snPushCheckRecordService.singleCheckInvoice(pramsMap); |
|
|
|
checkInvoiceResult = snPushCheckRecordService.singleCheckInvoice(pramsMap,null); |
|
|
|
|
|
|
|
|
|
|
|
if (!checkInvoiceResult.containsKey("code")) { |
|
|
|
if (!checkInvoiceResult.containsKey("code")) { |
|
|
|
if (!checkInvoiceResult.containsKey("cyjg")) { |
|
|
|
if (!checkInvoiceResult.containsKey("cyjg")) { |
|
|
@ -261,7 +261,7 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
checkInvoiceResult = snPushCheckRecordService.singleCheckInvoice(pramsMap); |
|
|
|
checkInvoiceResult = snPushCheckRecordService.singleCheckInvoice(pramsMap,"1"); |
|
|
|
log.info("查验结果为:{}", checkInvoiceResult); |
|
|
|
log.info("查验结果为:{}", checkInvoiceResult); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
e.printStackTrace(); |
|
|
@ -507,7 +507,7 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
} |
|
|
|
} |
|
|
|
BigDecimal tax = new BigDecimal(taxRateDetail); |
|
|
|
BigDecimal tax = new BigDecimal(taxRateDetail); |
|
|
|
BigDecimal tax1 = tax.divide(new BigDecimal("100")); |
|
|
|
BigDecimal tax1 = tax.divide(new BigDecimal("100")); |
|
|
|
if (tax.compareTo(new BigDecimal("1")) < 1) { |
|
|
|
if (tax.compareTo(new BigDecimal("0.99")) < 1) { |
|
|
|
taxRateDetail = tax.toPlainString(); |
|
|
|
taxRateDetail = tax.toPlainString(); |
|
|
|
}else { |
|
|
|
}else { |
|
|
|
taxRateDetail = tax1.toPlainString(); |
|
|
|
taxRateDetail = tax1.toPlainString(); |
|
|
@ -828,11 +828,12 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
sapInvoiceDetail.setZTAX("0.00"); |
|
|
|
sapInvoiceDetail.setZTAX("0.00"); |
|
|
|
sapInvoiceDetail.setZSM(sapInvoiceDetail.getZTAX()); |
|
|
|
sapInvoiceDetail.setZSM(sapInvoiceDetail.getZTAX()); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
//传给SAP税率为整数
|
|
|
|
BigDecimal tax = new BigDecimal(taxRate); |
|
|
|
BigDecimal tax = new BigDecimal(taxRate); |
|
|
|
sapInvoiceDetail.setZSM(getZSM(tax.toString())); |
|
|
|
sapInvoiceDetail.setZSM(getZSM(tax.toString())); |
|
|
|
BigDecimal tax1 = tax.multiply(new BigDecimal("100")); |
|
|
|
BigDecimal tax1 = tax.multiply(new BigDecimal("100")); |
|
|
|
sapInvoiceDetail.setZTAX(tax1.toString()); |
|
|
|
sapInvoiceDetail.setZTAX(tax1.toString()); |
|
|
|
if (tax1.compareTo(new BigDecimal("100")) > 0) { |
|
|
|
if (tax1.compareTo(new BigDecimal("99")) > 0) { |
|
|
|
sapInvoiceDetail.setZTAX(taxRate); |
|
|
|
sapInvoiceDetail.setZTAX(taxRate); |
|
|
|
}else if (tax1.scale() > 2){ |
|
|
|
}else if (tax1.scale() > 2){ |
|
|
|
DecimalFormat decimalFormat = new DecimalFormat("#.00"); |
|
|
|
DecimalFormat decimalFormat = new DecimalFormat("#.00"); |
|
|
@ -1261,7 +1262,7 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
DecimalFormat decimalFormat = new DecimalFormat("#.00"); |
|
|
|
DecimalFormat decimalFormat = new DecimalFormat("#.00"); |
|
|
|
String formattedDecimal = decimalFormat.format(new BigDecimal("15")); |
|
|
|
String formattedDecimal = decimalFormat.format(new BigDecimal("15")); |
|
|
|
BigDecimal bigDecimal = new BigDecimal("0.13"); |
|
|
|
BigDecimal bigDecimal = new BigDecimal("0.13"); |
|
|
|
boolean b = bigDecimal.compareTo(new BigDecimal("1")) < 1; |
|
|
|
boolean b = bigDecimal.compareTo(new BigDecimal("0.99")) < 1; |
|
|
|
System.out.println(); |
|
|
|
System.out.println(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|