|
|
|
@ -632,7 +632,9 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
decimalFormat(checkInvoiceByUuid); |
|
|
|
|
JSONObject checkInvoice = (JSONObject) JSONObject.toJSON(checkInvoiceByUuid); |
|
|
|
|
log.info("checkInvoice:{}",checkInvoice); |
|
|
|
|
JSONArray checkInvoiceDetail = (JSONArray) JSONObject.toJSON(baseTDxRecordInvoiceDetail); |
|
|
|
|
JSONObject vehicleDetail = new JSONObject(); |
|
|
|
|
if (vehicleList != null && vehicleList.size() > 0) { |
|
|
|
@ -676,6 +678,7 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
|
} |
|
|
|
|
checkInvoiceByUuid = snPushCheckRecordService.selectRecordByWrapper(recordWrapper); |
|
|
|
|
} |
|
|
|
|
decimalFormat(tdxSaleRecordInvoice); |
|
|
|
|
JSONObject checkInvoice = (JSONObject) JSONObject.toJSON(tdxSaleRecordInvoice); |
|
|
|
|
JSONArray saleDetail = (JSONArray) JSONObject.toJSON(recordInvoiceSaleDetailModel); |
|
|
|
|
if(baseTDxRecordInvoiceDetail!= null && baseTDxRecordInvoiceDetail.size() > 0){ |
|
|
|
@ -754,7 +757,8 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
|
|
|
|
|
|
data.put("data", checkInvoiceResult); |
|
|
|
|
} else { |
|
|
|
|
data.put("message", "error 其他类发票不支持查验"); |
|
|
|
|
//根据刘振要求进行提示修改
|
|
|
|
|
data.put("message", "请检查发票代码或者发票类型是否正确!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(data)); |
|
|
|
@ -775,6 +779,37 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(R.error().put("data", "请求正在处理,不要重复提交"))); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void decimalFormat(TdxSaleRecordInvoice tdxSaleRecordInvoice) { |
|
|
|
|
if (tdxSaleRecordInvoice != null){ |
|
|
|
|
if (tdxSaleRecordInvoice.getInvoiceAmount() != null){ |
|
|
|
|
tdxSaleRecordInvoice.setInvoiceAmount(tdxSaleRecordInvoice.getInvoiceAmount().setScale(2)); |
|
|
|
|
} |
|
|
|
|
if (tdxSaleRecordInvoice.getTaxAmount() != null){ |
|
|
|
|
tdxSaleRecordInvoice.setTaxAmount(tdxSaleRecordInvoice.getTaxAmount().setScale(2)); |
|
|
|
|
} |
|
|
|
|
if (tdxSaleRecordInvoice.getTotalAmount() != null){ |
|
|
|
|
tdxSaleRecordInvoice.setTotalAmount(tdxSaleRecordInvoice.getTotalAmount().setScale(2)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static void decimalFormat(BaseTDxRecordInvoice checkInvoiceByUuid) { |
|
|
|
|
if (checkInvoiceByUuid != null){ |
|
|
|
|
if (checkInvoiceByUuid.getInvoiceAmount() != null){ |
|
|
|
|
checkInvoiceByUuid.setInvoiceAmount(checkInvoiceByUuid.getInvoiceAmount().setScale(2)); |
|
|
|
|
} |
|
|
|
|
if (checkInvoiceByUuid.getTaxAmount() != null){ |
|
|
|
|
checkInvoiceByUuid.setTaxAmount(checkInvoiceByUuid.getTaxAmount().setScale(2)); |
|
|
|
|
} |
|
|
|
|
if (checkInvoiceByUuid.getTotalAmount() != null){ |
|
|
|
|
checkInvoiceByUuid.setTotalAmount(checkInvoiceByUuid.getTotalAmount().setScale(2)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Async |
|
|
|
|
void saveCheckLog(Map<String, String> pramsMap, JSONObject checkInvoice) { |
|
|
|
|
TdxPlatformCheckLog checkLog = new TdxPlatformCheckLog(); |
|
|
|
@ -884,6 +919,10 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
|
checkInvoice.put("invoiceCode", invoiceCode); |
|
|
|
|
checkInvoice.put("invoiceNumber", checkInvoice.get("invoiceNo").toString()); |
|
|
|
|
} |
|
|
|
|
//全电纸专发票类型185返回给影像01
|
|
|
|
|
if ("185".equals(checkInvoice.getString("invoiceType"))){ |
|
|
|
|
checkInvoice.put("invoiceType","01"); |
|
|
|
|
} |
|
|
|
|
String uuid = ""; |
|
|
|
|
if (invoiceCode != null && StringUtils.isNoneBlank(invoiceCode)) { |
|
|
|
|
uuid = invoiceCode + checkInvoice.get("invoiceNo").toString(); |
|
|
|
@ -1024,6 +1063,7 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
checkInvoice.put("invoiceType", invoiceType); |
|
|
|
|
|
|
|
|
|
checkInvoice.put("administrativeDivisionNo", ""); |
|
|
|
|
checkInvoice.put("administrativeDivisionName", ""); |
|
|
|
|
|
|
|
|
@ -1034,6 +1074,9 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
|
checkInvoice.put("invoiceCode", invoiceCode); |
|
|
|
|
checkInvoice.put("invoiceNumber", checkInvoice.get("invoiceNo").toString()); |
|
|
|
|
} |
|
|
|
|
if("185".equals(checkInvoice.getString("invoiceType"))){ |
|
|
|
|
checkInvoice.put("invoiceType", "01"); |
|
|
|
|
} |
|
|
|
|
String uuid = ""; |
|
|
|
|
if (invoiceCode != null && StringUtils.isNoneBlank(invoiceCode)) { |
|
|
|
|
uuid = invoiceCode + checkInvoice.get("invoiceNo").toString(); |
|
|
|
@ -1820,7 +1863,10 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
|
info.setZJSHJ(snInvoice.getAmountTax()); |
|
|
|
|
if (snInvoice.getAmountTax() == null && ("17".equals(info.getZFPLX()) || "18".equals(info.getZFPLX()))) { |
|
|
|
|
info.setZJSHJ(snInvoice.getTotalAmount()); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
//添加二手车返回价税合计
|
|
|
|
|
if (SNFplxEnum.ESC.getFplxDm().equals(info.getZFPLX())){ |
|
|
|
|
info.setZJSHJ(snInvoice.getTotalAmount()); |
|
|
|
|
} |
|
|
|
|
info.setZCYRMC(snInvoice.getCarrierName()); |
|
|
|
|
info.setZJGDM(snInvoice.getTaxAuthorityNo()); |
|
|
|
|