Ver Fonte

优化投料功能

huangsanjia há 3 anos atrás
pai
commit
de0d8e6130
1 ficheiros alterados com 3 adições e 0 exclusões
  1. 3 0
      application/admin/controller/Feeding.php

+ 3 - 0
application/admin/controller/Feeding.php

@@ -55,6 +55,9 @@ class Feeding extends Backend
         $params = $this->preExcludeFields($params);
         $tid = Db::name('task')->where('bach',$params['bach'])->order('id desc')->find();
         $arr = [];
+        if(empty($params['weight'])){
+            $this->error('投料数据不能为空');
+        }
         foreach($params['weight'] as $k=>$v){
             if($v){
                 $param['bach'] = $params['bach'];