|
|
|
@ -216,7 +216,6 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter { |
|
|
|
|
|
|
|
|
|
String check = JSONObject.toJSONString(request); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//2.获取token
|
|
|
|
|
TokenResponse token = apiUtils.getToken(appKey, appSecret); |
|
|
|
|
String access_token = token.getAccess_token(); |
|
|
|
@ -227,7 +226,7 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter { |
|
|
|
|
//4.封装返回参数
|
|
|
|
|
JSONObject jsonObject = new JSONObject(); |
|
|
|
|
if (StringUtils.isNoneBlank(apiResponse.getContent())) |
|
|
|
|
jsonObject = convertToSnObject(apiResponse.getContent(), jsonObject, snIinvoiceType); |
|
|
|
|
jsonObject = convertToSnObject(apiResponse.getContent(), jsonObject, fplxdm); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return jsonObject; |
|
|
|
@ -239,7 +238,6 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter { |
|
|
|
|
HashMap contentMap = JSONObject.parseObject(con, HashMap.class); |
|
|
|
|
|
|
|
|
|
if ("0000".equals(contentMap.get("code"))) { |
|
|
|
|
|
|
|
|
|
HashMap<String, Object> invoiceData = JSONObject.parseObject(contentMap.get("data").toString(), HashMap.class); |
|
|
|
|
if("0001".equals(invoiceData.get("cyjg"))) { |
|
|
|
|
jsonObject.put("invoiceType", invoiceType); |
|
|
|
@ -262,7 +260,14 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter { |
|
|
|
|
jsonObject.put("amountTax", invoiceData.get("jshj")); |
|
|
|
|
jsonObject.put("amountTaxCN", ""); |
|
|
|
|
jsonObject.put("checkCode", invoiceData.get("jym")); |
|
|
|
|
jsonObject.put("state", invoiceData.get("zfbz")); |
|
|
|
|
if("N".equals(invoiceData.get("zfbz"))){ |
|
|
|
|
jsonObject.put("state", "0"); |
|
|
|
|
}else if("H".equals(invoiceData.get("zfbz"))){ |
|
|
|
|
jsonObject.put("state", "2"); |
|
|
|
|
}else if("Y".equals(invoiceData.get("zfbz"))){ |
|
|
|
|
jsonObject.put("state", "1"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
jsonObject.put("carrierName", invoiceData.get("cyrmc")); |
|
|
|
|
jsonObject.put("carrierTaxNo", invoiceData.get("cyrsbh")); |
|
|
|
|
jsonObject.put("draweeName", invoiceData.get("spfmc")); |
|
|
|
|