| | |
| | | <!--查询商超详情集合--> |
| | | <select id="getPlaceRelDetailList" resultType="org.springblade.modules.doorplateAddress.vo.FuncNode"> |
| | | select jp.id as addressCode, |
| | | jpl.grid_name as unitName, |
| | | jpl.community_code as unitCode, |
| | | doorplate_num as floor, |
| | | 4 as addressType |
| | | from jczz_place_rel jpl |
| | |
| | | getGridInfoByGridman(houseParam); |
| | | // 查询商超 |
| | | List<FuncNode> doorplateNameList = baseMapper.getPlaceRelDetailList(houseParam); |
| | | // 按单元(网格)分组 |
| | | Map<String, List<FuncNode>> listMap = doorplateNameList.stream().collect(Collectors.groupingBy(FuncNode::getUnitName)); |
| | | // |
| | | List<FuncNode> tempList = new ArrayList<>(); |
| | | // 遍历 |
| | | listMap.forEach((s, temps) -> { |
| | | FuncNode funcNode = new FuncNode(); |
| | | funcNode.setUnitName(s); |
| | | funcNode.setAddressType(4); |
| | | funcNode.setUnitCode(temps.get(0).getUnitCode()); |
| | | funcNode.setChildren(temps); |
| | | // 查询网格对应的排序 |
| | | QueryWrapper<GridEntity> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("community_code",funcNode.getUnitCode()).eq("grid_name",funcNode.getUnitName()); |
| | | // 查询网格 |
| | | GridEntity one = gridService.getOne(wrapper); |
| | | if (null!=one){ |
| | | funcNode.setSort(one.getSort()); |
| | | } |
| | | tempList.add(funcNode); |
| | | }); |
| | | // 排序 |
| | | List<FuncNode> sortList = tempList.stream().sorted(Comparator.comparing(X -> X.getSort())).collect(Collectors.toList()); |
| | | map.put("aoiList",new ArrayList<>()); |
| | | map.put("shopList",doorplateNameList); |
| | | map.put("shopList",sortList); |
| | | // 返回 |
| | | return map; |
| | | } |
| | |
| | | select |
| | | jh.id,jh.house_code,jh.name,jh.phone_number,jh.associated_user_id, |
| | | jh.role_type,jh.associated_user_name,jh.relationship,jh.is_primary_contact, |
| | | jh.residential_status,jh.gender,jh.birthday,jh.id_card,jh.hkmt_pass,jh.passport, |
| | | jh.residential_status,jh.gender,jh.birthday,jh.id_card,jh.card_type,jh.hkmt_pass,jh.passport, |
| | | jh.ethnicity,jh.education,jh.resident_type, |
| | | jh.hukou_registration,jh.resident_adcode,jh.native_place_adcode, |
| | | jh.religious_belief,jh.health_status,jh.disease_name, |
| | |
| | | User userParams = new User(); |
| | | userParams.setPhone(householdEntity.getPhoneNumber()); |
| | | User user = userService.getOne(Condition.getQueryWrapper(userParams)); |
| | | if (null==user) { |
| | | User userParams1 = new User(); |
| | | userParams1.setAccount(householdEntity.getPhoneNumber()); |
| | | userParams1.setIsDeleted(0); |
| | | user = userService.getOne(Condition.getQueryWrapper(userParams1)); |
| | | } |
| | | if (null!=user) { |
| | | //如果用户存在,则该用户id绑定场所 |
| | | householdEntity.setAssociatedUserId(user.getId()); |
| | |
| | | List<DoorplateAddressEntity> list = doorplateAddressService.list(wrapper); |
| | | if (list.size() > 0) { |
| | | placeVO.setDoorplateAddressEntity(list.get(0)); |
| | | placeVO.setNeiCode(list.get(0).getNeiCode().replaceAll("0+$", "")); |
| | | placeVO.setNeiCode(list.get(0).getNeiCode()); |
| | | } |
| | | // 查询网格数据 |
| | | GridVO gridVO = gridService.getGridDetailByHouseCode(place.getHouseCode()); |