浏览代码

首页数据

qiuenguang 1 年之前
父节点
当前提交
887fe01232
共有 1 个文件被更改,包括 43 次插入1 次删除
  1. 43 1
      application/api/controller/Facility.php

+ 43 - 1
application/api/controller/Facility.php

@@ -955,7 +955,7 @@ class Facility extends Api
         if ($this->request->isGet() === false){
             $this->error('请求错误');
         }
-        $date = date('Y-m-d 00:00:00',time()-3888000);
+        $date = date('Y-m-d 00:00:00',time()-3456000);
         $nowTime = date('Y-m-d H:i:s',time());
         $list = \db('设备_基本资料')->where('使用状态',1)->order('设备编号')->column('设备编号');
         if (empty($list)){
@@ -1022,6 +1022,7 @@ class Facility extends Api
         }
         $list['日期'] = date('Y-m-d',strtotime($list['日期']));
         $list['印件名称A'] = \db('工单_印件资料')->where('Yj_Gdbh',$list['工单编号A'])->field('rtrim(yj_yjmc) as yjmc')->find()['yjmc'];
+//        if ()
         $list['印件名称B'] = \db('工单_印件资料')->where('Yj_Gdbh',$list['工单编号B'])->field('rtrim(yj_yjmc) as yjmc')->find()['yjmc'];
         $this->success('成功',$list);
     }
@@ -1554,4 +1555,45 @@ class Facility extends Api
             $this->success('设置成功');
         }
     }
+
+    //首页数据
+
+    public function index()
+    {
+        $data = [
+            'workOrderData' => [
+                '计划中' => 100,
+                '排程中' => 100,
+                '制程中' => 100,
+                '已完工' => 100,
+            ],
+            'MonthlyData' => [
+                '1' => 100,
+                '2' => 100,
+                '3' => 100,
+                '4' => 100,
+                '5' => 100,
+                '6' => 100,
+                '7' => 100,
+                '8' => 100,
+                '9' => 100,
+                '10' => 100,
+                '11' => 100,
+                '12' => 100,
+            ],
+            'customer' => [
+                '0' => ['包装用牛皮纸松,无法上高速机,烟厂手动加纸','2024-02-26'],
+                '1' => ['包装用牛皮纸松,无法上高速机,烟厂手动加纸','2024-02-26'],
+                '2' => ['包装用牛皮纸松,无法上高速机,烟厂手动加纸','2024-02-26'],
+                '3' => ['包装用牛皮纸松,无法上高速机,烟厂手动加纸','2024-02-26'],
+                '4' => ['包装用牛皮纸松,无法上高速机,烟厂手动加纸','2024-02-26'],
+                '5' => ['包装用牛皮纸松,无法上高速机,烟厂手动加纸','2024-02-26'],
+                '6' => ['包装用牛皮纸松,无法上高速机,烟厂手动加纸','2024-02-26'],
+                '7' => ['包装用牛皮纸松,无法上高速机,烟厂手动加纸','2024-02-26'],
+                '8' => ['包装用牛皮纸松,无法上高速机,烟厂手动加纸','2024-02-26'],
+                '9' => ['包装用牛皮纸松,无法上高速机,烟厂手动加纸','2024-02-26'],
+            ],
+        ];
+        return json($data);
+    }
 }