Browse Source

搜索优化

shish 4 years ago
parent
commit
79fb736622
1 changed files with 0 additions and 13 deletions
  1. 0 13
      app-hd/controllers/WorkController.php

+ 0 - 13
app-hd/controllers/WorkController.php

@@ -63,25 +63,12 @@ class WorkController extends BaseController
                 $where['fromType'] = ['in', [1, 2, 3]];
             }
         }
-        if (isset($get['searchType'])) {
-            if ($get['searchType'] == 0) {
-                util::fail('暂不支持名称搜索');
-            } elseif ($get['searchType'] == 1) {
-                if (!empty($get['name'])) {
-                    if (!is_numeric($get['name'])) {
-                        util::fail('编号必须是数字');
-                    }
-                    $where['sn'] = $get['name'];
-                }
-            }
-        }
         if (isset($get['sn']) && !empty($get['sn']) && is_numeric($get['sn'])) {
             $where['sn'] = $get['sn'];
         }
         if (isset($get['thirdSn']) && !empty($get['thirdSn']) && is_numeric($get['thirdSn'])) {
             $where['thirdSn'] = $get['thirdSn'];
         }
-
         $list = WorkClass::getWorkList($where);
         $list['today'] = date("Y-m-d");
         util::success($list);