Commit cefb934d authored by 蔡闯's avatar 蔡闯

1

parent e1101cc1
......@@ -136,14 +136,15 @@ class Build extends Base
$where['layout_build_id'] = $layout_build_id;
//先查询原先的数据
$buildInfo = Db::name('layout_build')->where($where)->find();
echo 1;
$code = Request::param('code');
//查询修改的code是否存在
$is_exit = Db::name('layout_build')->where(['village_id'=>$buildInfo['village_id'],'layout_id'=>$buildInfo['layout_id'],'parent_id'=>$buildInfo['parent_id'],'code'=>$code])->where('layout_build_id','<>',$buildInfo['layout_build_id'])->find();
if($is_exit) {
return $this->returnJson([],'该建筑编号已存在!',400);
}
echo 2;
exit;
$data['code']= $code;
$data['explain']= Request::param('explain');
$data['measure_area']= Request::param('measure_area');
......@@ -154,7 +155,7 @@ class Build extends Base
$data['gas_price'] = $where['gas_price'] = Request::param('gas_price');
$data['parking_price'] = $where['parking_price'] = Request::param('parking_price');
$data['parent_id'] = $buildInfo['parent_id'];
return 1;
$is_inherit = Request::param('is_inherit',1); //物业费等是否继承上一级,1继承,0不继承
unset($where['layout_build_id']);
if($is_inherit == 1 ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment