Commit 5f2457d1 authored by 蔡闯's avatar 蔡闯

修改建筑信息接口

parent 2bda122e
...@@ -156,9 +156,10 @@ class Build extends Base ...@@ -156,9 +156,10 @@ class Build extends Base
$data['parent_id'] = $buildInfo['parent_id']; $data['parent_id'] = $buildInfo['parent_id'];
$is_inherit = Request::param('is_inherit',1); //物业费等是否继承上一级,1继承,0不继承 $is_inherit = Request::param('is_inherit',1); //物业费等是否继承上一级,1继承,0不继承
unset($where['layout_build_id']);
if($is_inherit == 1 ) { if($is_inherit == 1 ) {
if($data['parent_id'] == 0) { if($data['parent_id'] == 0) {
$is_find = Db::name('house_village')->where(['village_id'=>$this->village_id])->where($where)->find(); $is_find = Db::name('house_village')->where(['village_id'=>$this->village_id])->where($where)->find();
} else { } else {
$is_find = Db::name('layout_build')->where(['village_id'=>$this->village_id,'layout_build_id'=>$data['parent_id']])->where($where)->find(); $is_find = Db::name('layout_build')->where(['village_id'=>$this->village_id,'layout_build_id'=>$data['parent_id']])->where($where)->find();
...@@ -172,7 +173,7 @@ class Build extends Base ...@@ -172,7 +173,7 @@ class Build extends Base
if($data['property_price'] != $buildInfo['property_price'] || $data['water_price'] != $buildInfo['water_price'] || $data['electric_price'] != $buildInfo['electric_price'] || $data['gas_price'] != $buildInfo['gas_price'] || $data['parking_price'] != $buildInfo['parking_price'] ) { if($data['property_price'] != $buildInfo['property_price'] || $data['water_price'] != $buildInfo['water_price'] || $data['electric_price'] != $buildInfo['electric_price'] || $data['gas_price'] != $buildInfo['gas_price'] || $data['parking_price'] != $buildInfo['parking_price'] ) {
//先修改下面的建筑,然后在修改其他 //先修改下面的建筑,然后在修改其他
$ids = $this->findBuildId($layout_build_id); $ids = $this->findBuildId($layout_build_id);
unset($where['layout_build_id']);
Db::name('layout_build')->where('layout_build_id','in',$ids)->save($where); Db::name('layout_build')->where('layout_build_id','in',$ids)->save($where);
} }
......
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