Przeglądaj źródła

发票查询优化,开票成功后任何查询,但不再下载pdf文件

沈静伟 4 lat temu
rodzic
commit
175cad5e57
1 zmienionych plików z 9 dodań i 5 usunięć
  1. 9 5
      src/apps/tinvoicebill/tinvoicebill.java

+ 9 - 5
src/apps/tinvoicebill/tinvoicebill.java

@@ -107,9 +107,9 @@ public class tinvoicebill extends PaoCust {
      * @return
      */
     public void queryInvoice() throws P2Exception {
-        if (getString("status").equals("2")) {
-            return;
-        }
+//        if (getString("status").equals("2")) {
+//            return;
+//        }
         String finvoiceserialnum = getString("finvoiceserialnum");//楷⑺霜阨瘍
 
         JSONObject contentObject = new JSONObject();
@@ -130,13 +130,17 @@ public class tinvoicebill extends PaoCust {
                 if (status.equals("2")) {
                     if (resultObject.containsKey("pdfUrl")) {
                         String pdfUrl = resultObject.getString("pdfUrl");
+                        if (getString("pdfUrl").equals("")) {
+                            upLoadDocUrl(pdfUrl, "楷⑺pdf華硊");
+                        }
                         setValue("pdfUrl", pdfUrl, 11L);
-                        upLoadDocUrl(pdfUrl, "楷⑺pdf華硊");
                     }
                     if (resultObject.containsKey("paperPdfUrl")) {
                         String paperPdfUrl = resultObject.getString("paperPdfUrl");
+                        if (getString("paperPdfUrl").equals("")) {
+                            upLoadDocUrl(paperPdfUrl, "祧⑺pdf華硊");
+                        }
                         setValue("paperPdfUrl", paperPdfUrl, 11L);
-                        upLoadDocUrl(paperPdfUrl, "祧⑺pdf華硊");
                     }
                     if (resultObject.containsKey("invoiceCode")) {
                         String invoiceCode = resultObject.getString("invoiceCode");