Răsfoiți Sursa

工单查询接口优化

qiuenguang 1 an în urmă
părinte
comite
bd92ad28ef
1 a modificat fișierele cu 3 adăugiri și 3 ștergeri
  1. 3 3
      application/api/controller/ProductionLot.php

+ 3 - 3
application/api/controller/ProductionLot.php

@@ -32,10 +32,10 @@ class ProductionLot extends Api
         $where = [
           'gd_statu' => '1-已完工',
         ];
-        if (isset($param['search'])){
-            $where['Gd_gdbh|Gd_客户代号|成品名称'] = ['like','%'.$param['search'].'%'];
-        }else{
+        if (empty($param['search'])){
             $where['Mod_rq'] = ['between',[date('Y-m-d 00:00:00',time()-1209600),date('Y-m-d H:i:s',time())]];
+        }else{
+            $where['Gd_gdbh|Gd_客户代号|成品名称'] = ['like','%'.$param['search'].'%'];
         }
         $list = \db('工单_基本资料')
             ->field('Gd_gdbh,Gd_cpmc,行号')