| | |
| | | package org.springblade.modules.house.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.common.node.TreeNode; |
| | | import org.apache.logging.log4j.util.Strings; |
| | | import org.springblade.common.node.TreeStringNode; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | import org.springblade.modules.house.entity.HouseholdEntity; |
| | | import org.springblade.modules.house.vo.HouseholdOtherVO; |
| | | import org.springblade.modules.house.vo.HouseholdVO; |
| | | import org.springblade.modules.house.mapper.HouseholdMapper; |
| | | import org.springblade.modules.house.service.IHouseholdService; |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 住户 服务实现类 |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<TreeNode> selectHouseNodeList(Long userId) { |
| | | public List<TreeStringNode> selectHouseNodeList(Long userId) { |
| | | return baseMapper.selectHouseNodeList(userId); |
| | | } |
| | | |
| | |
| | | // 更新 |
| | | flag = updateById(household); |
| | | }else { |
| | | // 往用户表中插入数据 |
| | | // 通过手机号判断 |
| | | if (!Strings.isBlank(household.getPhoneNumber())){ |
| | | //判断用户是否存在 |
| | | |
| | | } |
| | | // 新增 |
| | | household.setCreateTime(new Date()); |
| | | household.setCreateUser(AuthUtil.getUserId()); |
| | |
| | | public Integer statistics(Long userId) { |
| | | return baseMapper.statistics(userId); |
| | | } |
| | | |
| | | /** |
| | | * 住户对应物业,网格,公安负责人查询 |
| | | * @param household |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Object getHouseholdOtherInfo(HouseholdVO household) { |
| | | Map<String, Object> map = new HashMap<>(3); |
| | | // 查询物业 |
| | | HouseholdOtherVO propertyOtherVO = baseMapper.getProperty(household); |
| | | map.put("wy",propertyOtherVO); |
| | | // 查询网格 |
| | | HouseholdOtherVO gridOtherVO = baseMapper.getGrid(household); |
| | | map.put("wg",gridOtherVO); |
| | | // 查询公安信息 |
| | | HouseholdOtherVO securityOtherVO = baseMapper.getSecurity(household); |
| | | map.put("ga",securityOtherVO); |
| | | // 返回 |
| | | return map; |
| | | } |
| | | } |