|
@@ -45,6 +45,8 @@ public class NuonuoServiceImpl implements NuonuoService {
|
|
|
|
|
|
private String APPSecret = "07168A248B2844E0";
|
|
|
|
|
|
+ @Value("${Nuonuo.host}")
|
|
|
+ private String NuonuoHost = "07168A248B2844E0";
|
|
|
|
|
|
@Autowired
|
|
|
private RedisCache redisCache;
|
|
@@ -73,11 +75,10 @@ public class NuonuoServiceImpl implements NuonuoService {
|
|
|
String taxnum = ""; // 授权企业税号
|
|
|
String method = "nuonuo.OpeMplatform.requestBillingNew"; // API方法名
|
|
|
String token = getAccessToken(); // 访问令牌
|
|
|
- String url = "https://sdk.nuonuo.com/open/v1/services"; // SDK请求地址
|
|
|
+ String url = NuonuoHost; // SDK请求地址
|
|
|
String content = params.get("content");
|
|
|
String senid = UUID.randomUUID().toString().replace("-", ""); // 唯一标识,32位随机码,无需修改,保持默认即可
|
|
|
String result = sdk.sendPostSyncRequest(url, senid, APPkey, APPSecret, token, taxnum, method, content);
|
|
|
- System.out.println(result);
|
|
|
return result;
|
|
|
}
|
|
|
|
|
@@ -91,9 +92,23 @@ public class NuonuoServiceImpl implements NuonuoService {
|
|
|
params.put("serialNos",snList);
|
|
|
params.put("isOfferInvoiceDetail",1);
|
|
|
String content = JSONObject.toJSONString(params);
|
|
|
- String url = "https://sdk.nuonuo.com/open/v1/services"; // SDK请求地址
|
|
|
+ String url = NuonuoHost; // SDK请求地址
|
|
|
+ String senid = UUID.randomUUID().toString().replace("-", ""); // 唯一标识,32位随机码,无需修改,保持默认即可
|
|
|
+ String result = sdk.sendPostSyncRequest(url, senid, APPkey, APPSecret, token, taxnum, method, content);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public String reOpenMplatform(Map<String, String> params) {
|
|
|
+ NNOpenSDK sdk = NNOpenSDK.getIntance();
|
|
|
+ String taxnum = ""; // 授权企业税号
|
|
|
+ String method = "nuonuo.OpeMplatform.reInvoice"; // API方法名
|
|
|
+ String token = getAccessToken(); // 访问令牌
|
|
|
+ String content = JSONObject.toJSONString(params);
|
|
|
+ String url = NuonuoHost; // SDK请求地址
|
|
|
String senid = UUID.randomUUID().toString().replace("-", ""); // 唯一标识,32位随机码,无需修改,保持默认即可
|
|
|
String result = sdk.sendPostSyncRequest(url, senid, APPkey, APPSecret, token, taxnum, method, content);
|
|
|
+ System.out.println(result);
|
|
|
return result;
|
|
|
}
|
|
|
}
|