修复land_area 错误 breed_area 错误
This commit is contained in:
parent
5870683c22
commit
f6a7078a2d
@ -748,10 +748,6 @@ class Maintainentry extends BaseController
|
|||||||
$breed_data['createtime'] = $time;
|
$breed_data['createtime'] = $time;
|
||||||
Db::table('fa_szxc_breed')->strict(false)->insertGetId($breed_data);
|
Db::table('fa_szxc_breed')->strict(false)->insertGetId($breed_data);
|
||||||
}
|
}
|
||||||
//// 计算面积
|
|
||||||
// if($v['mianji']){
|
|
||||||
// $mianji += $v['mianji'];
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$waste_land_area = 0;
|
$waste_land_area = 0;
|
||||||
@ -774,11 +770,6 @@ class Maintainentry extends BaseController
|
|||||||
$data['land_area'] = $post['land_area'];
|
$data['land_area'] = $post['land_area'];
|
||||||
$data['nature_of_land'] = $post['nature_of_land_id'];
|
$data['nature_of_land'] = $post['nature_of_land_id'];
|
||||||
$data['is_wz'] = $post['is_wz'];
|
$data['is_wz'] = $post['is_wz'];
|
||||||
// $data['work_name'] = $post['work_name'];
|
|
||||||
// $data['work_gender'] = $post['work_gender'];
|
|
||||||
// $data['work_phone'] = $post['work_phone'] ?? '';
|
|
||||||
// $data['work_relation'] = $post['work_relation'];
|
|
||||||
// $data['work_id'] = $post['work_id'];
|
|
||||||
$data['waste_land_area'] = $waste_land_area;
|
$data['waste_land_area'] = $waste_land_area;
|
||||||
$data['user_id'] = $user_id;
|
$data['user_id'] = $user_id;
|
||||||
$data['updatetime'] = time();
|
$data['updatetime'] = time();
|
||||||
@ -797,11 +788,6 @@ class Maintainentry extends BaseController
|
|||||||
$data['land_area'] = $post['land_area'];
|
$data['land_area'] = $post['land_area'];
|
||||||
$data['nature_of_land'] = $post['nature_of_land_id'];
|
$data['nature_of_land'] = $post['nature_of_land_id'];
|
||||||
$data['is_wz'] = $post['is_wz'];
|
$data['is_wz'] = $post['is_wz'];
|
||||||
// $data['work_name'] = $post['work_name'];
|
|
||||||
// $data['work_gender'] = $post['work_gender'];
|
|
||||||
// $data['work_phone'] = $post['work_phone'] ?? '';
|
|
||||||
// $data['work_relation'] = $post['work_relation'];
|
|
||||||
// $data['work_id'] = $post['work_id'];
|
|
||||||
$data['waste_land_area'] = $waste_land_area;
|
$data['waste_land_area'] = $waste_land_area;
|
||||||
$data['user_id'] = $user_id;
|
$data['user_id'] = $user_id;
|
||||||
|
|
||||||
@ -1387,19 +1373,16 @@ class Maintainentry extends BaseController
|
|||||||
$breed_data['createtime'] = $time;
|
$breed_data['createtime'] = $time;
|
||||||
Db::table('fa_szxc_breed')->strict(false)->insertGetId($breed_data);
|
Db::table('fa_szxc_breed')->strict(false)->insertGetId($breed_data);
|
||||||
}
|
}
|
||||||
//// 计算面积
|
|
||||||
// if($v['mianji']){
|
|
||||||
// $mianji += $v['mianji'];
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$waste_land_area = 0;
|
||||||
|
|
||||||
if(!isset($post['breed_area'])){
|
if (!empty($post['land_area']) && !empty($post['breed_area']))
|
||||||
$post['breed_area'] = 0;
|
{
|
||||||
}
|
$waste_land_area = $post['land_area'] - $mianji - $post['breed_area'];
|
||||||
$waste_land_area = $post['land_area'] - $mianji - $post['breed_area'];
|
if($waste_land_area < 0){
|
||||||
if($waste_land_area < 0){
|
$waste_land_area = 0;
|
||||||
$waste_land_area = 0;
|
}
|
||||||
}
|
}
|
||||||
// 写入种植信息表
|
// 写入种植信息表
|
||||||
$cropsarr['user_id'] = $userid; //用户id
|
$cropsarr['user_id'] = $userid; //用户id
|
||||||
@ -1407,10 +1390,6 @@ class Maintainentry extends BaseController
|
|||||||
$cropsarr['crops_msg'] = $post['crops_msg'];//农作物信息
|
$cropsarr['crops_msg'] = $post['crops_msg'];//农作物信息
|
||||||
$cropsarr['land_area'] = $post['land_area'];//土地面积
|
$cropsarr['land_area'] = $post['land_area'];//土地面积
|
||||||
$cropsarr['nature_of_land'] = $post['nature_of_land'];//土地性质
|
$cropsarr['nature_of_land'] = $post['nature_of_land'];//土地性质
|
||||||
// $cropsarr['work_name'] = $post['work_name'];//劳动人姓名
|
|
||||||
// $cropsarr['work_gender'] = $post['work_gender'];//劳动人口性别
|
|
||||||
// $cropsarr['work_relation'] = $post['work_relation'];//劳动人与户主关系
|
|
||||||
// $cropsarr['work_id'] = $post['work_id'];//劳动人id
|
|
||||||
$cropsarr['waste_land_area'] = $waste_land_area;//荒地面积
|
$cropsarr['waste_land_area'] = $waste_land_area;//荒地面积
|
||||||
$cropsarr['breed_msg'] = $post['breed_msg']??'';//养殖详情信息
|
$cropsarr['breed_msg'] = $post['breed_msg']??'';//养殖详情信息
|
||||||
$cropsarr['breed_area'] = $post['breed_area']??'';//养殖面积
|
$cropsarr['breed_area'] = $post['breed_area']??'';//养殖面积
|
||||||
@ -1495,11 +1474,6 @@ class Maintainentry extends BaseController
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
if ($post) {
|
if ($post) {
|
||||||
//// 验证验证码
|
|
||||||
// if (! Sms::check($post['phone'], $post['captcha'], 'mobilelogin')) {
|
|
||||||
// $this->apiError(__('Captcha is incorrect'));
|
|
||||||
// }
|
|
||||||
|
|
||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
// 获取录入人地址
|
// 获取录入人地址
|
||||||
$add = Db::table('fa_szxc_information_useraddress')->where('user_id',$this->request->uid)->find();
|
$add = Db::table('fa_szxc_information_useraddress')->where('user_id',$this->request->uid)->find();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user