|
|
|
@ -82,7 +82,6 @@ public class ImageSubmitServiceImpl implements ImageSubmitService { |
|
|
|
|
return R.error(500, "未查询到如下发票,请重新查验," + errorMsg); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
DynamicContextHolder.push(DbConstant.DETAIL_WRITE); |
|
|
|
|
QueryWrapper<SdnyTDxRecordInvoiceDetail> detailQueryWrapper = new QueryWrapper<>(); |
|
|
|
|
detailQueryWrapper.in("uuid", uuidList); |
|
|
|
|
List<SdnyTDxRecordInvoiceDetail> detailList = detailDao.selectList(detailQueryWrapper); |
|
|
|
@ -216,7 +215,7 @@ public class ImageSubmitServiceImpl implements ImageSubmitService { |
|
|
|
|
List<ZData> zDatas=new ArrayList<>(); |
|
|
|
|
for (SdnyTDxRecordInvoiceDetailSales detail : item.getDetailList()) { |
|
|
|
|
detail.setTaxRateOfSap(getTaxRate(detail.getTaxRate())); |
|
|
|
|
detail.setTaxRate(detail.getTaxRateOfSap().multiply(new BigDecimal(100)).toPlainString()+"%"); |
|
|
|
|
detail.setTaxRate(detail.getTaxRateOfSap().multiply(new BigDecimal(100)).toPlainString()); |
|
|
|
|
BigDecimal totalAmount = new BigDecimal(detail.getDetailAmount()).add(new BigDecimal(detail.getTaxAmount())); |
|
|
|
|
zDatas.add(ZData.builder() |
|
|
|
|
.ZBHSJE(detail.getDetailAmount()) |
|
|
|
@ -267,7 +266,10 @@ public class ImageSubmitServiceImpl implements ImageSubmitService { |
|
|
|
|
//推送到SAP
|
|
|
|
|
log.info("推送山能数据:{}", JSONObject.toJSONString(param)); |
|
|
|
|
String result = snPushCheckRecordService.pushCheckResultToSAP(param.toJSONString()); |
|
|
|
|
|
|
|
|
|
JSONObject rs = JSONObject.parseObject(result).getJSONObject("ES_OUTPUT"); |
|
|
|
|
if (!"S".equals(rs.getString("ZTYPE"))) { |
|
|
|
|
return R.error(500,rs.getString("ZMESSAGE")); |
|
|
|
|
} |
|
|
|
|
return R.success(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|