소스 검색

优化投料功能

huangsanjia 3 년 전
부모
커밋
de0d8e6130
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  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'];