Merge branch 'master' of git.excellentkk.cn:mkm/nk-lihaink-cn

This commit is contained in:
monanxiao 2023-03-22 16:06:51 +08:00
commit 9f09cba053
2 changed files with 17 additions and 42 deletions

View File

@ -748,17 +748,18 @@ 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 (!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;
} }
} }
$waste_land_area = $post['land_area'] - $mianji - $post['breed_area'];
if($waste_land_area < 0){
$waste_land_area = 0;
}
if ($find) { if ($find) {
// 修改人员信息 // 修改人员信息
@ -769,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();
@ -792,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;
@ -1274,7 +1265,7 @@ class Maintainentry extends BaseController
$userid = Db::connect('shop')->table('eb_user')->strict(false)->insertGetId($params); $userid = Db::connect('shop')->table('eb_user')->strict(false)->insertGetId($params);
//写入用户信息表 //写入用户信息表
$post['user_id'] = 0; $post['user_id'] = $userid;
$post['createtime'] = $time; $post['createtime'] = $time;
$post['enter_id'] = $this->request->uid; $post['enter_id'] = $this->request->uid;
$post['gender']= $post['gender_id']; $post['gender']= $post['gender_id'];
@ -1382,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
@ -1402,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']??'';//养殖面积
@ -1490,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();

View File

@ -69,10 +69,6 @@ Route::group('/',function () {
* 获取 民族等 * 获取 民族等
*/ */
Route::get('Maintainentry/getcategory', 'Maintainentry/getcategory'); Route::get('Maintainentry/getcategory', 'Maintainentry/getcategory');
/**
* 身份证查询
*/
Route::get('idcard', 'idcard');
/** /**
* 获取验证码 * 获取验证码
*/ */