huangsanjia 1 жил өмнө
parent
commit
7fc4367da0

+ 7 - 2
application/api/controller/PieceWorkSchedule.php

@@ -307,10 +307,15 @@ class PieceWorkSchedule extends Api
         if (empty($req['wgjs_rq']) || empty($req['wgjs_bh1'])){
             $this->error('参数不能为空');
         }
-
+        $UniqId = db()->table('db_wgjs')->order('UniqId desc')->value('UniqId');
+        if ($UniqId < 1000000){
+            $UniqId = 1000000;
+        }else{
+            $UniqId = $UniqId + 1;
+        }
         $req['wgjs_rq'] = $req['wgjs_rq'].' 00:00:00';
         $req['sys_rq'] = date('Y-m-d H:i:s');
-
+        $req['UniqId'] = $UniqId;
         //开启事务
         db()->startTrans();
         try{