|
|
@ -39,6 +39,7 @@ import com.epmet.feign.EpmetUserOpenFeignClient; |
|
|
|
import com.epmet.feign.OperCustomizeOpenFeignClient; |
|
|
|
import com.epmet.redis.IcHouseRedis; |
|
|
|
import com.epmet.service.CustomerGridService; |
|
|
|
import com.epmet.service.HouseService; |
|
|
|
import com.epmet.service.IcHouseService; |
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
@ -541,13 +542,20 @@ public class IcHouseServiceImpl extends BaseServiceImpl<IcHouseDao, IcHouseEntit |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public void updatePartyCenterHouse(String houseId, String partyCenterHouseFlag) { |
|
|
|
LambdaUpdateWrapper<IcHouseEntity> update = new LambdaUpdateWrapper<>(); |
|
|
|
update.set(IcHouseEntity::getPartyCenterHouseFlag, partyCenterHouseFlag).eq(IcHouseEntity::getId, houseId); |
|
|
|
baseDao.update(null, update); |
|
|
|
if(NumConstant.ZERO_STR.equals(partyCenterHouseFlag)){ |
|
|
|
//房屋如果不是党员中心户,自动删除绑定的联户
|
|
|
|
partyCenterHouseLianhuDao.deleteByPartyCenterHouseId(houseId); |
|
|
|
} |
|
|
|
//加一条变更记录吧。。 就当留痕了
|
|
|
|
IcHouseEntity origin = baseDao.selectById(houseId); |
|
|
|
IcHouseDTO icHouseDTO = ConvertUtils.sourceToTarget(origin, IcHouseDTO.class); |
|
|
|
SpringContextUtils.getBean(HouseService.class).houseChangeRecord(houseId, icHouseDTO.getCustomerId(), icHouseDTO); |
|
|
|
//修改
|
|
|
|
LambdaUpdateWrapper<IcHouseEntity> update = new LambdaUpdateWrapper<>(); |
|
|
|
update.set(IcHouseEntity::getPartyCenterHouseFlag, partyCenterHouseFlag) |
|
|
|
.set(IcHouseEntity::getUpdatedTime,new Date()) |
|
|
|
.eq(IcHouseEntity::getId, houseId); |
|
|
|
baseDao.update(null, update); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|