From 5870683c226cb4c660316e8d11c2e2b479f3d130 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Wed, 22 Mar 2023 13:51:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dland=5Farea=20=E9=94=99?= =?UTF-8?q?=E8=AF=AF=20breed=5Farea=20=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/Maintainentry.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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'];