修改判断逻辑

release
zhenghaiyang@ele-cloud.com 2 years ago
parent a2ae8e152d
commit f32fd564b7
  1. 4
      dxhy-erp/src/main/java/com/dxhy/erp/controller/SDNYMainProcessController.java

@ -203,7 +203,7 @@ public class SDNYMainProcessController extends AbstractController {
List<BaseTDxRecordInvoiceDetail> baseTDxRecordInvoiceDetail = baseTDxRecordInvoiceDetailDao.selectList(detailWrapper); List<BaseTDxRecordInvoiceDetail> baseTDxRecordInvoiceDetail = baseTDxRecordInvoiceDetailDao.selectList(detailWrapper);
DynamicContextHolder.push("business" + DbConstant.BUSINESS_READ); DynamicContextHolder.push("business" + DbConstant.BUSINESS_READ);
if(baseTDxRecordInvoiceDetail != null && baseTDxRecordInvoiceDetail.size() == 0){ if(baseTDxRecordInvoiceDetail != null && baseTDxRecordInvoiceDetail.size() != 0){
//先删除原有主数据,再查验更新主数据和明细数据 //先删除原有主数据,再查验更新主数据和明细数据
int delete = baseTDxRecordInvoiceDao.delete(recordWrapper); int delete = baseTDxRecordInvoiceDao.delete(recordWrapper);
if(delete > 0) { if(delete > 0) {
@ -835,7 +835,7 @@ public class SDNYMainProcessController extends AbstractController {
sapInvoiceDetail.setZTAX(tax1.toString()); sapInvoiceDetail.setZTAX(tax1.toString());
if (tax1.compareTo(new BigDecimal("99")) > 0) { if (tax1.compareTo(new BigDecimal("99")) > 0) {
sapInvoiceDetail.setZTAX(taxRate); sapInvoiceDetail.setZTAX(taxRate);
}else if (tax1.scale() > 2){ }else {
DecimalFormat decimalFormat = new DecimalFormat("#.00"); DecimalFormat decimalFormat = new DecimalFormat("#.00");
String formattedDecimal = decimalFormat.format(tax1); String formattedDecimal = decimalFormat.format(tax1);
sapInvoiceDetail.setZTAX(formattedDecimal); sapInvoiceDetail.setZTAX(formattedDecimal);

Loading…
Cancel
Save