|
|
|
@ -134,8 +134,11 @@ public class ImageSubmitServiceImpl implements ImageSubmitService { |
|
|
|
|
} |
|
|
|
|
List<SdnyTDxRecordInvoiceDetailSales> salesDetailList = new ArrayList<>(); |
|
|
|
|
detailiMap.get(invoice.getUuid()).stream().forEach(item -> { |
|
|
|
|
log.info("进项表明细行:{}",JSONObject.toJSONString(item)); |
|
|
|
|
SdnyTDxRecordInvoiceDetailSales salesDetail = JsonUtils.getInstance().parseObject(JSONObject.toJSONString(item), SdnyTDxRecordInvoiceDetailSales.class); |
|
|
|
|
log.info("销项表明细行:{}",JSONObject.toJSONString(salesDetail)); |
|
|
|
|
salesDetail.setId(null); |
|
|
|
|
salesDetail.setTaxRate(item.getTaxRate()); |
|
|
|
|
salesDetailList.add(salesDetail); |
|
|
|
|
}); |
|
|
|
|
if (saleRecordInvoice == null) { |
|
|
|
@ -359,7 +362,9 @@ public class ImageSubmitServiceImpl implements ImageSubmitService { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static void main(String[] args) { |
|
|
|
|
BigDecimal a = new BigDecimal(0.015); |
|
|
|
|
System.out.println(a.multiply(new BigDecimal(100)).setScale(4,BigDecimal.ROUND_HALF_UP).stripTrailingZeros().toPlainString()); |
|
|
|
|
BigDecimal a = new BigDecimal(0.13); |
|
|
|
|
String tax = a.multiply(new BigDecimal(100)).setScale(4,BigDecimal.ROUND_HALF_UP).stripTrailingZeros().toPlainString(); |
|
|
|
|
System.out.println(tax); |
|
|
|
|
System.out.println(TaxRateCodeEnum.getCode(tax)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|