wang jun 2 年之前
父节点
当前提交
652c97cfbc
共有 2 个文件被更改,包括 10 次插入2 次删除
  1. 9 1
      application/client/logic/tubelogic.php
  2. 1 1
      application/common/model/tubemodel.php

+ 9 - 1
application/client/logic/tubelogic.php

@@ -49,7 +49,10 @@ class tubelogic extends baselogic
         $size = $data['size'];
         $m_t = new tubemodel();
         $typelist = $m_t->gettesttypelist();
-        $where = ['create_date' => ['like', '%' . $date . '%'], 'detection_result' => 0];
+        $where = [
+            ['oprtime', 'like', '%' . $date . '%'],
+            ['detection_result', '=', 0],
+        ];
         $size = 10;
         $count = $m_t->getList($where, 'count');
         if (empty($count)) {
@@ -59,6 +62,11 @@ class tubelogic extends baselogic
         if (empty($list)) {
             return backarr(0, "无数据");
         }
+        foreach ($list as $key => $value) {
+            $testtype = $value['test_type'];
+            $testtype = isset($typelist[$testtype]) ? $typelist[$testtype] : $testtype;
+            $list[$key]['test_type_str'] = $testtype;
+        }
         return backarr(1, "查询成功", $list);
     }
 }

+ 1 - 1
application/common/model/tubemodel.php

@@ -77,7 +77,7 @@ class tubemodel extends Model
                 $data = $sqlObj->select();
             }
         } else {
-            $data = $sqlObj = $sqlObj->count();
+            $data = $sqlObj->count();
         }
         return $data;
     }