Prechádzať zdrojové kódy

Merge branch 'master' of http://git.jhcs888.com/ph/esign_serve

DESKTOP-70VPDLK\Administrator 5 mesiacov pred
rodič
commit
4c590db5d0

+ 7 - 5
app/Console/Commands/TestCommand.php

@@ -69,11 +69,11 @@ class TestCommand extends Command
     public function handle()
     {
 
-        $result = ESignContractServer::creatServer()->downloadFileUrl('2160ab8b01b4444384e48d4e72135584');
-        dd($result);
+//        $result = ESignContractServer::creatServer()->downloadFileUrl('2160ab8b01b4444384e48d4e72135584');
+//        dd($result);
 //        [{"keyword":"甲方:重庆振合网商业管理有限公司(公章)","auth_type":"ORG","id_no":"f09ba6fd02ed416690800c539ec4488a"},{"keyword":"乙方(盖章):","auth_type":"PSN","id_no":"337834e20a344e8b83c5fe115d230578"}]
 
-        $json = '{"action":"SIGN_MISSON_COMPLETE","timestamp":1749624805377,"signFlowId":"4abe45e1e76c4ca4a1df7c23a3ef9545","signOrder":1,"operateTime":1749624805000,"signResult":2,"resultDescription":"\u7b7e\u7f72\u5b8c\u6210","operator":{"psnId":"8e1a90f1a0b8409790ead3e342564090","psnAccount":{"accountMobile":"13512343341"}}}';
+        $json = '{"action":"SIGN_MISSON_COMPLETE","timestamp":1776392658818,"signFlowId":"c512c5e8e0404611a4d990db18870f6d","signOrder":1,"operateTime":1776392658000,"signResult":2,"resultDescription":"签署完成","operator":{"psnId":"69b1cd62aa0f481bb6dc12d76c26afc1","psnAccount":{"accountMobile":"15923811472"}}}';
 
         $data = json_decode($json,true);
         if ($data['action'] == 'SIGN_MISSON_COMPLETE'){
@@ -88,11 +88,13 @@ class TestCommand extends Command
                 $sign_id = $sign->{'id'};
                 if (!empty($operator)){
                     $psnId = $operator['psnId'];
-                    SignRecord::where('sign_id',$sign_id)->where('authType','PSN')->where('id_no',$psnId)->update(['status'=>$signFlowStatus]);
+//                    SignRecord::where('sign_id',$sign_id)->where('authType','PSN')->where('id_no',$psnId)->update(['status'=>$signFlowStatus]);
+                    SignRecord::where('sign_id',$sign_id)->where('authType','PSN')->update(['status'=>$signFlowStatus]);
                 }
                 if (!empty($organization)){
                     $orgId = $organization['orgId'];
-                    SignRecord::where('sign_id',$sign_id)->where('authType','ORG')->where('id_no',$orgId)->update(['status'=>$signFlowStatus]);
+//                    SignRecord::where('sign_id',$sign_id)->where('authType','ORG')->where('id_no',$orgId)->update(['status'=>$signFlowStatus]);
+                    SignRecord::where('sign_id',$sign_id)->where('authType','ORG')->update(['status'=>$signFlowStatus]);
                 }
             }
         }

+ 5 - 3
app/Http/Controllers/AdminApi/NotifyController.php

@@ -75,7 +75,7 @@ class NotifyController extends ApiController
             $signFlowId = $data['signFlowId'];
             SignContract::where('flow_id',$signFlowId)->update(['status'=>$signFlowStatus]);
         }elseif ($data['action'] == 'SIGN_MISSON_COMPLETE'){
-            file_put_contents('sign_misson_complete.txt', json_encode($data));
+//            file_put_contents('sign_misson_complete.txt', json_encode($data));
             //合同签署
             $signFlowStatus = $data['signResult'];
             $signFlowId = $data['signFlowId'];
@@ -86,11 +86,13 @@ class NotifyController extends ApiController
                 $sign_id = $sign->{'id'};
                 if (!empty($operator)){
                     $psnId = $operator['psnId'];
-                    SignRecord::where('sign_id',$sign_id)->where('authType','PSN')->where('id_no',$psnId)->update(['status'=>$signFlowStatus]);
+//                    SignRecord::where('sign_id',$sign_id)->where('authType','PSN')->where('id_no',$psnId)->update(['status'=>$signFlowStatus]);
+                    SignRecord::where('sign_id',$sign_id)->where('authType','PSN')->update(['status'=>$signFlowStatus]);
                 }
                 if (!empty($organization)){
                     $orgId = $organization['orgId'];
-                    SignRecord::where('sign_id',$sign_id)->where('authType','ORG')->where('id_no',$orgId)->update(['status'=>$signFlowStatus]);
+//                    SignRecord::where('sign_id',$sign_id)->where('authType','ORG')->where('id_no',$orgId)->update(['status'=>$signFlowStatus]);
+                    SignRecord::where('sign_id',$sign_id)->where('authType','ORG')->update(['status'=>$signFlowStatus]);
                 }
             }
         }elseif ($data['action']=='SEAL_AUTH_SIGN'){

+ 1 - 1
app/Http/Controllers/AdminApi/SignContractController.php

@@ -96,7 +96,7 @@ class SignContractController extends AdminController
         }
 
         $list = SignContract::where($where)
-            ->select(['id','contract_no','status','contract_id','created_at'])
+            ->select(['id','contract_no','status','contract_id','sign_url','created_at'])
             ->paginate(10);
 
         foreach ($list as $key => $value) {