wugg 2 years ago
parent
commit
6bccf063d8

+ 1 - 1
app/admin/controller/Payment.php

@@ -24,7 +24,7 @@ class Payment extends BaseController
         "special_electronic"=>"增值税电子专用发票",
         "electronic"=>"增值税电子普通发票",
         "toll"=>"增值税电子普通发票(通行费)",
-    ];
+        ];
 //
 //    发票状态,取值范围:
 //

+ 17 - 2
app/admin/controller/Report.php

@@ -66,9 +66,24 @@ class Report extends BaseController
      *
      * @return \think\Response
      */
-    public function create()
+    public function info()
     {
-        //
+        $id = isset($this->post['id'])&&$this->post['id']!=""?intval($this->post['id']) :"";
+        if($id==''){
+            return error_show(1004,"参数 id 不能为空");
+        }
+        $report =Db::name("report_code")->where(["id"=>$id])->find();
+        if($report==false){
+            return error_show(1004,"未找到报表数据");
+        }
+        $report['DzNo'] =$report['DzNo']==""?[]:explode(",",$report['DzNo']);
+        $report['hpNo'] =$report['hpNo']==""?[]:explode(",",$report['hpNo']);
+        $report['invNo'] =$report['invNo']==""?[]:explode(",",$report['invNo']);
+        $report['tradNo'] =$report['tradNo']==""?[]:explode(",",$report['tradNo']);
+        $report['logNo'] =$report['logNo']==""?[]:explode(",",$report['logNo']);
+        $report['returnInv'] =$report['returnInv']==""?[]:explode(",",$report['returnInv']);
+        $report['returnTrad'] =$report['returnTrad']==""?[]:explode(",",$report['returnTrad']);
+        return app_show(0,"获取成功",$report);
     }
 
     /**

+ 3 - 14
app/admin/controller/index.php

@@ -4,6 +4,7 @@
 namespace app\admin\controller;
 
 use app\admin\model\ReportCode;
+use TaxInvoice;
 use think\Request;
 
 class index
@@ -15,20 +16,8 @@ class index
      */
     public function index()
     {
-
-        $report =ReportCode::where(['qrdNo'=>212])->find();
-//        $report =ReportCode::find(['id'=>1]);
-
-        if($report)$report->setField("payNo","222");
-
-//       $report->setpayNo('pay');
-//       $report->setinvNo('inv');
-//       $report->setlogNo('log');
-//       $report->settradNo('trad');
-//       $report->setDzNo('dz');
-//       $report->sethpNo('hp');
-//       $report->setreturnInv('returninv');
-//       $report->setreturnTrad('returntrad');
+        $data=new TaxInvoice("Mlfs7n9kofqPMaNVJSFoDcwS","awSW7gts8AS4StGV84HCKVCf");
+        var_dump($data->auth());
     }
 
     /**

+ 2 - 0
app/admin/route/app.php

@@ -106,6 +106,7 @@ Route::rule("importTrade","admin/OrderPay/importTrade");
 
 Route::rule("index","admin/index/index");
 Route::rule("report","admin/Report/index");
+Route::rule("reportinfo","admin/Report/info");
 
 Route::rule("orderlist","admin/Sale/list");
 Route::rule("orderchage","admin/Sale/status");
@@ -118,6 +119,7 @@ Route::rule("dzinfo","admin/Payment/DzInfo");
 Route::rule("hpinfo","admin/Payment/HpInfo");
 Route::rule("saleinfo","admin/Sale/saleinfo");
 
+
 Route::rule("returninvinfo","admin/OrderInv/returnInfo");
 Route::rule("tradeloginfo","admin/OrderPay/logInfo");
 Route::rule("tradeinfo","admin/OrderPay/tradeInfo");

+ 0 - 8
public/.htaccess

@@ -1,8 +0,0 @@
-<IfModule mod_rewrite.c>
-  Options +FollowSymlinks -Multiviews
-  RewriteEngine On
-
-  RewriteCond %{REQUEST_FILENAME} !-d
-  RewriteCond %{REQUEST_FILENAME} !-f
-  RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
-</IfModule>