Przeglądaj źródła

损耗代号获取优化

qiuenguang 1 rok temu
rodzic
commit
f47b030aa8
1 zmienionych plików z 3 dodań i 2 usunięć
  1. 3 2
      application/api/controller/WorkOrder.php

+ 3 - 2
application/api/controller/WorkOrder.php

@@ -969,7 +969,6 @@ class WorkOrder extends Api
                 $value['gxh'] = '0'.$value['gxh'];
                 $value['gxh'] = '0'.$value['gxh'];
             }
             }
             $list[$key]['印件号及工序名称'] = $value['yjno'].'-'.$value['gxh'].$value['gxmc'].'('.$value['add_gxmc'].')';
             $list[$key]['印件号及工序名称'] = $value['yjno'].'-'.$value['gxh'].$value['gxmc'].'('.$value['add_gxmc'].')';
-            unset($list[$key]['yjno'],$list[$key]['gxmc'],$list[$key]['add_gxmc']);
         }
         }
         $this->success('成功',$list);
         $this->success('成功',$list);
     }
     }
@@ -1395,7 +1394,6 @@ class WorkOrder extends Api
                 $value['gxh'] = '0'.$value['gxh'];
                 $value['gxh'] = '0'.$value['gxh'];
             }
             }
             if ($value['add_gxmc'] !== null){
             if ($value['add_gxmc'] !== null){
-
                 $list[$key]['印件及工序名称'] = $value['yjno'].'-'.$value['gxh'].'-->'.$value['gxmc'].'【'.$value['add_gxmc'].'】';
                 $list[$key]['印件及工序名称'] = $value['yjno'].'-'.$value['gxh'].'-->'.$value['gxmc'].'【'.$value['add_gxmc'].'】';
             }else{
             }else{
                 $list[$key]['印件及工序名称'] = $value['yjno'].'-'.$value['gxh'].'-->'.$value['gxmc'];
                 $list[$key]['印件及工序名称'] = $value['yjno'].'-'.$value['gxh'].'-->'.$value['gxmc'];
@@ -1926,6 +1924,9 @@ class WorkOrder extends Api
         if (empty($param['process'])){
         if (empty($param['process'])){
             $this->error('参数错误');
             $this->error('参数错误');
         }
         }
+        if (strlen($param['process'])>6){
+            $param['process'] = substr($param['process'],0,6);
+        }
         $order = \db('dic_lzsh')
         $order = \db('dic_lzsh')
             ->where('sys_mc','like',$param['process'].'%')
             ->where('sys_mc','like',$param['process'].'%')
             ->value('rtrim(sys_bh) as 编号');
             ->value('rtrim(sys_bh) as 编号');