Sfoglia il codice sorgente

当日制程检验记录

qiuenguang 1 anno fa
parent
commit
a4ede97d3b
1 ha cambiato i file con 2 aggiunte e 8 eliminazioni
  1. 2 8
      application/api/controller/Facility.php

+ 2 - 8
application/api/controller/Facility.php

@@ -155,7 +155,7 @@ class Facility extends Api
             ->where($where)
             ->field($field)
             ->cache(true,86400)
-            ->order('提交时间 desc')
+//            ->order('提交时间 desc')
             ->select();
         if (empty($list)){
             $this->success('未找到检验记录');
@@ -169,14 +169,13 @@ class Facility extends Api
         }
         $data['item'] = array_unique($data['item']);
         $data['InspectionTime'] = array_values(array_unique($data['InspectionTime']));
-        $data['工单编号'] = array_unique($data['工单编号']);
+        $data['工单编号'] = array_values(array_unique($data['工单编号']));
         foreach ($data['工单编号'] as $key => $value){
             foreach ($data['item'] as $k=>$v){
                 $time = '';
                 foreach ($list as $kk=>$vv){
                     if ($vv['工单编号'] === $value && $vv['检验项目'] === $v){
                         $time = $time.date('H:i',strtotime($vv['提交时间'])).',';
-
                         $data['row'][$key][$k] = [
                             '工单编号' => $value,
                             '印件号' => $vv['印件号'],
@@ -235,8 +234,6 @@ class Facility extends Api
                 AND b.Gy0_sj1 <> '1900-01-01 00:00:00'
             GROUP BY
                 a.Gd_gdbh
-            ORDER BY
-                b.Gy0_sj1
             LIMIT 1";
         $list = Db::query($sql);
         if (empty($list)){
@@ -451,11 +448,8 @@ class Facility extends Api
         if (empty($machine) || empty($workOrder) || empty($team)){
             $this->error('参数错误');
         }
-//        $lastUniqid = \db('设备_产量计酬')->field('UniqId')->order('UniqId desc')->find();
-//        $startUniqid = $lastUniqid['UniqId']-100000;
         $name = \db('工单_基本资料')->where('Gd_gdbh',$workOrder)->field('rtrim(Gd_cpmc) as productName')->find();
         $where = [
-//            'UniqId' => ['>',$startUniqid],
             'sczl_gdbh' => $workOrder,
             'sczl_jtbh' => $machine,
             'sczl_cl' => ['<>',0.0],