diff --git a/app/api/controller/Maintainentry.php b/app/api/controller/Maintainentry.php index ad2cd74..b0b9584 100644 --- a/app/api/controller/Maintainentry.php +++ b/app/api/controller/Maintainentry.php @@ -754,12 +754,17 @@ class Maintainentry extends BaseController // } } } + $waste_land_area = 0; - $waste_land_area = $post['land_area'] - $mianji - $post['breed_area']; - if($waste_land_area < 0){ - $waste_land_area = 0; + if (!empty($post['land_area']) && !empty($post['breed_area'])) + { + $waste_land_area = $post['land_area'] - $mianji - $post['breed_area']; + if($waste_land_area < 0){ + $waste_land_area = 0; + } } + if ($find) { // 修改人员信息 $data['tools_msg'] = $post['tools_msg'];