Browse Source

【英唐电子发票】

DINGYL 2 years ago
parent
commit
a691bbf7ca

+ 1 - 1
src/main/java/com/uas/eis/service/ERPService.java

@@ -18,5 +18,5 @@ public interface ERPService {
     Map<String, Object> getElecInvoicesById(String master, Integer id);
     Map<String, Object> getElecInvoices(String appKey,String appSecret,String token,String taxnum,int ioid,String ioCode);
     Map<String, Object> rushRed(String master, int id);
-    void queryInvoiceRedConfirm(String taxnum, String appKey, String appSecret, String token,String url,String redApplycode);
+    void queryInvoiceRedConfirm(String taxnum, String appKey, String appSecret, String token,String url,String redApplyId);
 }

+ 3 - 3
src/main/java/com/uas/eis/service/Impl/ERPServiceImpl.java

@@ -388,8 +388,8 @@ public class ERPServiceImpl implements ERPService {
                 Object describe=res.get("describe");
                 Object result=res.get("result");
                 if(code !=null && "E0000".equals(code.toString())){//调用成功
+                    baseDao.execute("update elecinvoice set ei_redapplyid='"+result.toString()+"' where ei_id="+rs_main.getGeneralInt("ei_id"));
                     queryInvoiceRedConfirm( taxnum,  appKey,  appSecret,  token, url, result.toString());
-                    baseDao.execute("update elecinvoice set ei_redapplycode='"+result.toString()+"' where ei_id="+rs_main.getGeneralInt("ei_id"));
                     commonService.logSRecord("红字确认单申请("+rs_main.getGeneralString("ei_refno")+")",id);
                 }else{
                     commonService.logFRecord("红字确认单申请("+rs_main.getGeneralInt("ei_id")+")","("+code+")"+describe,id);
@@ -410,12 +410,12 @@ public class ERPServiceImpl implements ERPService {
     }
 
     @Override
-    public void queryInvoiceRedConfirm(String taxnum, String appKey, String appSecret, String token,String url,String redApplycode) {
+    public void queryInvoiceRedConfirm(String taxnum, String appKey, String appSecret, String token,String url,String redApplyId) {
         NNOpenSDK sdk = NNOpenSDK.getIntance();
         String method = "nuonuo.OpeMplatform.queryInvoiceRedConfirm"; // API方法名
         Map<String,String> reqParam=new HashMap<>();
         reqParam.put("identity","0");
-        reqParam.put("billId",redApplycode);
+        reqParam.put("billId",redApplyId);
         String content=JSONArray.toJSONString(reqParam);
         String senid = UUID.randomUUID().toString().replace("-", ""); // 唯一标识,32位随机码,无需修改,保持默认即可
         String result = sdk.sendPostSyncRequest(url, senid, appKey, appSecret, token, taxnum, method, content);