| | |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.utils.SpringUtil; |
| | | import org.springblade.modules.category.entity.CategoryEntity; |
| | | import org.springblade.modules.category.service.ICategoryService; |
| | | import org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity; |
| | | import org.springblade.modules.doorplateAddress.service.IDoorplateAddressService; |
| | | import org.springblade.modules.grid.entity.GridEntity; |
| | |
| | | import org.springblade.modules.house.entity.HouseholdEntity; |
| | | import org.springblade.modules.house.entity.UserHouseLabelEntity; |
| | | import org.springblade.modules.house.service.IHouseholdService; |
| | | import org.springblade.modules.label.entity.LabelEntity; |
| | | import org.springblade.modules.place.entity.*; |
| | | import org.springblade.modules.place.excel.NinePlaceExcel; |
| | | import org.springblade.modules.place.excel.PlaceAndRelExcel; |
| | |
| | | import org.springblade.modules.police.service.IPoliceAffairsGridService; |
| | | import org.springblade.modules.system.entity.Dept; |
| | | import org.springblade.modules.system.entity.DictBiz; |
| | | import org.springblade.modules.system.entity.Region; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IDeptService; |
| | | import org.springblade.modules.system.service.IDictBizService; |
| | |
| | | if (!Strings.isBlank(placeExcel.getPhoneNumber()) && |
| | | !Strings.isBlank(placeExcel.getName())) { |
| | | PlaceVO placeVO = new PlaceVO(); |
| | | placeVO.setPhone(placeExcel.getPhoneNumber()); |
| | | placeVO.setUsername(placeExcel.getName()); |
| | | placeVO.setPrincipalPhone(placeExcel.getPhoneNumber()); |
| | | placeVO.setPrincipal(placeExcel.getName()); |
| | | // 更新场所负责人 |
| | | User user = bindUserHandle(placeVO); |
| | | // 返回 |
| | |
| | | PlaceRelEntity placeRelEntity = new PlaceRelEntity(); |
| | | placeRelEntity.setPlaceId(placeEntity.getId()); |
| | | placeRelEntity.setStreetName(placeExcel.getStreetName()); |
| | | QueryWrapper<Region> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("name",placeExcel.getCommunityName()); |
| | | Region region = SpringUtils.getBean(IRegionService.class).getOne(wrapper); |
| | | if (null!=region){ |
| | | placeRelEntity.setCommunityCode(region.getCode()); |
| | | } |
| | | placeRelEntity.setCommunityName(placeExcel.getCommunityName()); |
| | | placeRelEntity.setGridName(placeExcel.getGridName()); |
| | | placeRelEntity.setBuildingName(placeExcel.getBuildingName()); |
| | |
| | | */ |
| | | public void savPlaceLabelBind(PlaceAndRelExcel placeExcel, PlaceEntity placeEntity) { |
| | | if (!Strings.isBlank(placeExcel.getLabelCode())) { |
| | | PlaceVO placeVO = new PlaceVO(); |
| | | placeVO.setId(placeEntity.getId()); |
| | | placeVO.setLabel(placeExcel.getLabelCode()); |
| | | // 插入标签 |
| | | placeLabelBind(placeVO); |
| | | // 匹配标签 |
| | | QueryWrapper<CategoryEntity> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("level",3).eq("category_name",placeExcel.getLabelCode()).eq("is_deleted",0); |
| | | // 查询 |
| | | List<CategoryEntity> list = SpringUtils.getBean(ICategoryService.class).list(wrapper); |
| | | if (list.size()>0){ |
| | | PlaceVO placeVO = new PlaceVO(); |
| | | CategoryEntity categoryEntity = list.get(0); |
| | | placeVO.setLabel(categoryEntity.getCategoryNo()); |
| | | placeVO.setId(placeEntity.getId()); |
| | | // 插入标签 |
| | | placeLabelBind(placeVO); |
| | | } |
| | | } |
| | | } |
| | | |