Przeglądaj źródła

Merge branch 'master' of https://git.7in6.com/Minong/mes-server-api

曹鹤洋 1 rok temu
rodzic
commit
1b8edffb96

+ 3 - 1
application/api/controller/Product.php

@@ -945,7 +945,9 @@ class Product extends Api
             $this->error('参数不能为空');
         }
         $code = $params['code'];
-        $data = \db('dic_lzsh')->where('sys_bh','like',$code.'%')->whereOr('sys_mc','like',$code.'%')
+        $where['sys_bh|sys_mc|适用机型'] = array('like','%'.$code.'%');
+        $data = \db('dic_lzsh')
+                ->where($where)
             ->field('rtrim(sys_bh) as sys_bh, rtrim(sys_mc) as sys_mc,sys_rate0,sys_rate1')
             ->select();
         $this->success('请求成功',$data);

+ 1 - 1
application/api/controller/WorkOrder.php

@@ -240,7 +240,7 @@ class WorkOrder extends Api
                 if ($value['Gy0_gxh']<10){
                     $value['Gy0_gxh'] = '0'.$value['Gy0_gxh'];
                 }
-                if (rtrim($value['Gy0_sbbh']) == '' || $value['Gy0_计划接货数'] == 0){
+                if (rtrim($value['Gy0_shdh']) == '' || $value['Gy0_计划接货数'] == 0){
                     $number = 0;
                 }else{
                     $number = round(((int)$value['Gy0_计划损耗']/(int)($value['Gy0_计划接货数']))*100,2).'%';