$val){ if(!in_array($val, $bom_relationship_item_code) ){ $missing_material[] = $val; } } if(count($missing_material)>0){ throw new Exception("上传的item_code物料[".implode(',',$missing_material)."]不在本生产批次[$batch]的[$workingsubclass]工序中投料",4002); } $diff_item_code = array_diff($bom_relationship_item_code,$item_code); if(count($diff_item_code)>0){ throw new Exception("缺少item_code为[".implode(',',$diff_item_code)."]的物料",4002); } return ''; } }