Browse Source

修改接口优化

曹鹤洋 1 year ago
parent
commit
99d70fb512
1 changed files with 4 additions and 1 deletions
  1. 4 1
      application/api/controller/PackagingCountDocument.php

+ 4 - 1
application/api/controller/PackagingCountDocument.php

@@ -389,13 +389,16 @@ class PackagingCountDocument extends Api
         $data = [];
         foreach ($arr as $key => $value){
             if (!isset($req[$value])){
-                $this->error('参数错误',$value,$key+1);
+                continue;
             }
             $data[$value] = $req[$value];
         }
         if (!(isset($req['UniqId']) && trim($req['UniqId'])!='')){
             $this->error('参数错误','UniqId',100);
         }
+        if (count($data)==0){
+            $this->error('参数错误','',111);
+        }
         $data['mod_rq'] = date('Y-m-d H:i:s');
 
         //开启事务