From e0b90c355f71dbf527c8f42f57e5f361b4430385 Mon Sep 17 00:00:00 2001 From: lzh Date: Fri, 29 Oct 2021 09:12:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E5=8C=BA=EF=BC=8C=E6=A5=BC=E5=AE=87?= =?UTF-8?q?=EF=BC=8C=E6=88=BF=E5=B1=8B=E7=AE=A1=E7=90=86=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E6=94=B9=EF=BC=8C=E6=9F=A5=E8=AF=A2=EF=BC=8C?= =?UTF-8?q?=E5=88=A0=E9=99=A4=EF=BC=8C=E5=AF=BC=E5=85=A5=EF=BC=8C=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/BuildingTreeLevelDTO.java | 52 +++ .../java/com/epmet/dto/IcBuildingDTO.java | 1 + .../com/epmet/dto/form/IcBulidingFormDTO.java | 119 +++++++ .../com/epmet/dto/form/IcHouseFormDTO.java | 101 ++++++ .../dto/form/ListIcNeighborHoodFormDTO.java | 21 +- epmet-module/gov-org/gov-org-server/pom.xml | 11 + .../epmet/controller/BuildingController.java | 115 +++++++ .../com/epmet/controller/HouseController.java | 97 ++++++ .../controller/NeighborHoodController.java | 113 +++++-- .../java/com/epmet/dao/IcBuildingDao.java | 31 +- .../main/java/com/epmet/dao/IcHouseDao.java | 26 +- .../java/com/epmet/dao/IcNeighborHoodDao.java | 13 +- .../java/com/epmet/excel/IcBuildingExcel.java | 121 +++++++ .../java/com/epmet/excel/IcHouseExcel.java | 139 ++++++++ .../com/epmet/excel/IcNeighborHoodExcel.java | 123 ++++++++ .../java/com/epmet/redis/IcBuildingRedis.java | 47 +++ .../java/com/epmet/redis/IcHouseRedis.java | 47 +++ .../com/epmet/redis/IcNeighborHoodRedis.java | 47 +++ .../com/epmet/service/BuildingService.java | 53 ++++ .../java/com/epmet/service/HouseService.java | 47 +++ .../epmet/service/NeighborHoodService.java | 13 + .../service/impl/BuildingServiceImpl.java | 296 ++++++++++++++++++ .../epmet/service/impl/HouseServiceImpl.java | 152 +++++++++ .../service/impl/NeighborHoodServiceImpl.java | 268 ++++++++++++++-- .../java/com/epmet/util/ExcelPoiUtils.java | 276 ++++++++++++++++ .../src/main/resources/bootstrap.yml | 2 + .../resources/excel/building_template.xlsx | Bin 0 -> 11756 bytes .../main/resources/excel/house_template.xlsx | Bin 0 -> 11445 bytes .../resources/excel/neighbor_template.xlsx | Bin 0 -> 11674 bytes .../main/resources/mapper/IcBuildingDao.xml | 228 ++++++++++++++ .../src/main/resources/mapper/IcHouseDao.xml | 196 ++++++++++++ .../resources/mapper/IcNeighborHoodDao.xml | 117 ++++++- 32 files changed, 2806 insertions(+), 66 deletions(-) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/BuildingTreeLevelDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcBulidingFormDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseFormDTO.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/BuildingController.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcBuildingExcel.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcHouseExcel.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcNeighborHoodExcel.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/IcBuildingRedis.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/IcHouseRedis.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/IcNeighborHoodRedis.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/BuildingService.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/util/ExcelPoiUtils.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/resources/excel/building_template.xlsx create mode 100644 epmet-module/gov-org/gov-org-server/src/main/resources/excel/house_template.xlsx create mode 100644 epmet-module/gov-org/gov-org-server/src/main/resources/excel/neighbor_template.xlsx diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/BuildingTreeLevelDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/BuildingTreeLevelDTO.java new file mode 100644 index 0000000000..3d7da25047 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/BuildingTreeLevelDTO.java @@ -0,0 +1,52 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; + + +/** + * 楼栋信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-10-25 + */ +@Data +public class BuildingTreeLevelDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + + private String id; + + private String pId; + + private String label; + + + private String level; + + private List children; + + + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcBuildingDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcBuildingDTO.java index 61eba8fd2e..4d9aa11d17 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcBuildingDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcBuildingDTO.java @@ -59,6 +59,7 @@ public class IcBuildingDTO implements Serializable { */ private String buildingName; + /** * 楼栋类型,这里存储字典编码就可以 */ diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcBulidingFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcBulidingFormDTO.java new file mode 100644 index 0000000000..da2b08fc09 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcBulidingFormDTO.java @@ -0,0 +1,119 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + + +@Data +public class IcBulidingFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + public interface DeleteGroup extends CustomerClientShowGroup { + } + + @NotBlank(message = "楼栋ID不能为空", groups = { UpdateGroup.class,DeleteGroup.class}) + private String buildingId; + + /** + * 组织id + */ + @NotBlank(message = "组织id不能为空", groups = {AddGroup.class}) + private String agencyId; + + + /** + * 网格id + */ + + private String gridId; + + + /** + * 小区id + */ + @NotBlank(message = "小区id不能为空", groups = {AddGroup.class, UpdateGroup.class}) + private String neighborHoodId; + + /** + * 楼栋名称 + */ + @NotBlank(message = "楼栋名称不能为空", groups = {AddGroup.class, UpdateGroup.class}) + @Length(max=10,message = "楼栋名称不能超过10个字", groups = {AddGroup.class, UpdateGroup.class}) + private String buildingName; + + /** + * 客户id + */ + /* @NotBlank(message = "客户id不能为空", groups = {AddGroup.class, UpdateGroup.class}) + private String customerId;*/ + + /** + * 排序 + */ + @NotBlank(message = "排序不能为空", groups = { UpdateGroup.class}) + private Integer sort = 0; + + /** + * 总单元数 + */ + @NotBlank(message = "总单元数不能为空", groups = {AddGroup.class, UpdateGroup.class}) + private Integer totalUnitNum=1; + + /** + * 总楼层总数 + */ + @NotBlank(message = "总楼层总数不能为空", groups = {AddGroup.class, UpdateGroup.class}) + private Integer totalFloorNum; + + /** + * 总户数 + */ + @NotBlank(message = "总户数不能为空", groups = {AddGroup.class, UpdateGroup.class}) + private Integer totalHouseNum; + /** + * 坐标位置 + */ + @NotBlank(message = "坐标位置不能为空", groups = { UpdateGroup.class}) + private String location; + + + /** + * 中心点位:经度 + */ + @NotBlank(message = "经度不能为空", groups = {UpdateGroup.class}) + private String longitude; + + /** + * 中心点位:纬度 + */ + @NotBlank(message = "维度不能为空", groups = {UpdateGroup.class}) + private String latitude; + + + + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseFormDTO.java new file mode 100644 index 0000000000..022a34ad6e --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseFormDTO.java @@ -0,0 +1,101 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + + +@Data +public class IcHouseFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + public interface DeleteGroup extends CustomerClientShowGroup { + } + + @NotBlank(message = "房屋ID不能为空", groups = { UpdateGroup.class,DeleteGroup.class}) + private String houseId; + + + /** + * 小区id + */ + @NotBlank(message = "小区id不能为空", groups = {AddGroup.class, UpdateGroup.class}) + private String neighborHoodId; + + @NotBlank(message = "所属楼栋ID不能为空", groups = { UpdateGroup.class}) + private String belongBuildingId; + + /** + * 所属单元id + */ + @NotBlank(message = "所属单元id不能为空", groups = {AddGroup.class, UpdateGroup.class}) + private String buildingUnitId; + + + + /** + * 门牌号 + */ + @NotBlank(message = "门牌号不能为空", groups = {AddGroup.class, UpdateGroup.class}) + private String doorName; + + /** + * 房屋类型,这里存储字典value就可以 + */ + @NotBlank(message = "房屋类型不能为空", groups = {AddGroup.class, UpdateGroup.class}) + private String houseType; + + /** + * 存储字典value + */ + @NotBlank(message = "房屋用途不能为空", groups = {AddGroup.class, UpdateGroup.class}) + private String purpose; + + /** + * 1出租;0未出租 + */ + @NotBlank(message = "是否出租不能为空", groups = {AddGroup.class, UpdateGroup.class}) + private Boolean rentFlag; + + /** + * 房主姓名 + */ + @NotBlank(message = "房主姓名不能为空", groups = {AddGroup.class, UpdateGroup.class}) + private String ownerName; + + /** + * 房主电话 + */ + @NotBlank(message = "房主电话不能为空", groups = {AddGroup.class, UpdateGroup.class}) + private String ownerPhone; + + /** + * 房主身份证号 + */ + @NotBlank(message = "房主身份证号不能为空", groups = {AddGroup.class, UpdateGroup.class}) + private String ownerIdCard; + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/ListIcNeighborHoodFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/ListIcNeighborHoodFormDTO.java index 49839dfe4a..3e7eecf9b8 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/ListIcNeighborHoodFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/ListIcNeighborHoodFormDTO.java @@ -31,22 +31,29 @@ public class ListIcNeighborHoodFormDTO implements Serializable{ * */ private Integer pageSize = 20; + /** + * 组织类别 + */ + private String level ; + + private String id; + /** * 组织ID */ - private String agencyId; +// private String agencyId; /** * 网格ID */ - private String gridId; +// private String gridId; /** * 小区名字 */ - private String neighborHoodName; +// private String neighborHoodName; /** * 楼栋名字 */ - private String buildingName; +// private String buildingName; /** * 房主姓名 */ @@ -59,15 +66,15 @@ public class ListIcNeighborHoodFormDTO implements Serializable{ * 数据类型【小区:neighbourHood,楼栋:building,房屋:house】 */ // @Pattern(regexp = "^(neighbourHood|building|house)?$",message = "数据类型选择错误") - private String dataType; +// private String dataType; /** * 楼栋ID */ - private String buildingId; +// private String buildingId; /** * 小区ID */ - private String neighborHoodId; +// private String neighborHoodId; } diff --git a/epmet-module/gov-org/gov-org-server/pom.xml b/epmet-module/gov-org/gov-org-server/pom.xml index 13561a58a3..ccbc334ede 100644 --- a/epmet-module/gov-org/gov-org-server/pom.xml +++ b/epmet-module/gov-org/gov-org-server/pom.xml @@ -129,8 +129,19 @@ true + + org.apache.maven.plugins + maven-resources-plugin + + + xls + xlsx + + + + ${project.basedir}/src/main/java diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/BuildingController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/BuildingController.java new file mode 100644 index 0000000000..632f57fd3f --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/BuildingController.java @@ -0,0 +1,115 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.controller; + +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.dto.BuildingTreeLevelDTO; +import com.epmet.dto.IcNeighborHoodDTO; +import com.epmet.dto.form.IcBulidingFormDTO; +import com.epmet.dto.form.IcNeighborHoodFormDTO; +import com.epmet.dto.form.ListIcNeighborHoodFormDTO; +import com.epmet.dto.result.IcNeighborHoodResultDTO; +import com.epmet.excel.IcNeighborHoodExcel; +import com.epmet.service.BuildingService; +import com.epmet.service.IcBuildingService; +import com.epmet.service.IcNeighborHoodService; +import com.epmet.service.NeighborHoodService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 楼栋信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-10-25 + */ +@Slf4j +@RestController +@RequestMapping("building") +public class BuildingController { + + + @Autowired + private NeighborHoodService neighborHoodService; + + @Autowired + private IcBuildingService icBuildingService; + @Autowired + private BuildingService buildingService; + + + + @PostMapping("buildinglist") + public Result houseList(@RequestBody ListIcNeighborHoodFormDTO formDTO){ + //效验数据 + ValidatorUtils.validateEntity(ListIcNeighborHoodFormDTO.class); + IcNeighborHoodResultDTO icNeighborHoodResultDTO = neighborHoodService.listNeighborhood(formDTO); + return new Result().ok(icNeighborHoodResultDTO); + + } + + @PostMapping("buildingadd") + public Result buildingAdd(@LoginUser TokenDto tokenDTO, @RequestBody IcBulidingFormDTO formDTO){ + //效验数据 + ValidatorUtils.validateEntity(formDTO, AddGroup.class); + String customerId = tokenDTO.getCustomerId(); +// String customerId = "123123"; + + buildingService.AddBuilding(customerId,formDTO); + return new Result().ok("保存成功"); + } + + @PostMapping("buildingupdate") + public Result buildingUpdate(@LoginUser TokenDto tokenDTO, @RequestBody IcBulidingFormDTO formDTO){ + //效验数据 + ValidatorUtils.validateEntity(formDTO, UpdateGroup.class); + String customerId = tokenDTO.getCustomerId(); +// String customerId = "123123"; + buildingService.UpdateBuilding(customerId,formDTO); + return new Result().ok("修改成功"); + } + + @PostMapping("buildingdel") + public Result buildingDel(@LoginUser TokenDto tokenDTO, @RequestBody IcBulidingFormDTO formDTO){ + //效验数据 + ValidatorUtils.validateEntity(formDTO, IcBulidingFormDTO.DeleteGroup.class); + String buildingId = formDTO.getBuildingId(); + buildingService.DelBuilding(buildingId); + return new Result(); + } + + @PostMapping("treelist") + public Result treeList(@LoginUser TokenDto tokenDTO){ + List buildingTreeLevelDTOS =buildingService.treeList(tokenDTO.getUserId()); + return new Result().ok(buildingTreeLevelDTOS); + } + + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java new file mode 100644 index 0000000000..82eb115b44 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java @@ -0,0 +1,97 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.controller; + +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.dto.form.IcHouseFormDTO; +import com.epmet.dto.form.IcNeighborHoodFormDTO; +import com.epmet.dto.form.ListIcNeighborHoodFormDTO; +import com.epmet.dto.result.IcNeighborHoodResultDTO; +import com.epmet.service.HouseService; +import com.epmet.service.NeighborHoodService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + + +/** + * 房屋表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-10-25 + */ +@Slf4j +@RestController +@RequestMapping("house") +public class HouseController { + + + @Autowired + private NeighborHoodService neighborHoodService; + + @Autowired + private HouseService houseService; + + + @PostMapping("houselist") + public Result houseList(@RequestBody ListIcNeighborHoodFormDTO formDTO){ + //效验数据 + ValidatorUtils.validateEntity(ListIcNeighborHoodFormDTO.class); + IcNeighborHoodResultDTO icNeighborHoodResultDTO = neighborHoodService.listNeighborhood(formDTO); + return new Result().ok(icNeighborHoodResultDTO); + + } + + @PostMapping("houseadd") + public Result houseAdd(@LoginUser TokenDto tokenDTO, @RequestBody IcHouseFormDTO formDTO){ + //效验数据 + ValidatorUtils.validateEntity(formDTO, AddGroup.class); + String customerId = tokenDTO.getCustomerId(); +// String customerId = "123123"; + + houseService.addHouse(customerId,formDTO); + return new Result(); + } + + @PostMapping("houseupdate") + public Result houseUpdate(@LoginUser TokenDto tokenDTO, @RequestBody IcHouseFormDTO formDTO){ + //效验数据 + ValidatorUtils.validateEntity(formDTO, UpdateGroup.class); + String customerId = tokenDTO.getCustomerId(); +// String customerId = "123123"; + houseService.updateHouse(customerId,formDTO); + return new Result(); + } + + @PostMapping("housedel") + public Result houseDel(@LoginUser TokenDto tokenDTO, @RequestBody IcHouseFormDTO formDTO){ + //效验数据 + ValidatorUtils.validateEntity(formDTO, IcNeighborHoodFormDTO.DeleteGroup.class); + houseService.delHouse(formDTO.getHouseId()); + return new Result(); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/NeighborHoodController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/NeighborHoodController.java index bde7b11c0c..97aa10b5b8 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/NeighborHoodController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/NeighborHoodController.java @@ -17,24 +17,40 @@ package com.epmet.controller; +import cn.afterturn.easypoi.excel.ExcelExportUtil; +import cn.afterturn.easypoi.excel.entity.TemplateExportParams; import com.epmet.commons.tools.annotation.LoginUser; -import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.exception.ErrorCode; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.validator.AssertUtils; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.dto.IcNeighborHoodDTO; +import com.epmet.constant.NeighborhoodConstant; import com.epmet.dto.form.IcNeighborHoodFormDTO; import com.epmet.dto.form.ListIcNeighborHoodFormDTO; import com.epmet.dto.result.IcNeighborHoodResultDTO; +import com.epmet.excel.IcBuildingExcel; +import com.epmet.excel.IcHouseExcel; +import com.epmet.excel.IcNeighborHoodExcel; +import com.epmet.service.BuildingService; +import com.epmet.service.HouseService; import com.epmet.service.IcNeighborHoodService; import com.epmet.service.NeighborHoodService; +import com.epmet.util.ExcelPoiUtils; +import lombok.extern.slf4j.Slf4j; +import org.apache.poi.ss.usermodel.Workbook; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.*; - +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.net.URLEncoder; +import java.util.HashMap; +import java.util.List; import java.util.Map; @@ -44,6 +60,7 @@ import java.util.Map; * @author generator generator@elink-cn.com * @since v1.0.0 2021-10-25 */ +@Slf4j @RestController @RequestMapping("neighborhood") public class NeighborHoodController { @@ -52,6 +69,10 @@ public class NeighborHoodController { private IcNeighborHoodService icNeighborHoodService; @Autowired private NeighborHoodService neighborHoodService; + @Autowired + private BuildingService buildingService; + @Autowired + private HouseService houseService; @@ -70,6 +91,7 @@ public class NeighborHoodController { //效验数据 ValidatorUtils.validateEntity(formDTO, AddGroup.class); String customerId = tokenDTO.getCustomerId(); +// String customerId = "123123"; neighborHoodService.AddNeighborhood(customerId,formDTO); return new Result(); @@ -80,6 +102,7 @@ public class NeighborHoodController { //效验数据 ValidatorUtils.validateEntity(formDTO, UpdateGroup.class); String customerId = tokenDTO.getCustomerId(); +// String customerId = "123123"; neighborHoodService.UpdateNeighborhood(customerId,formDTO); return new Result(); } @@ -94,40 +117,62 @@ public class NeighborHoodController { } - @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = icNeighborHoodService.page(params); - return new Result>().ok(page); - } + /** + * 导出 + * @param formDTO + * @param response + * @throws Exception + */ + @RequestMapping("exportneighborhoodinfo") + public void exportneighborhoodinfo(@RequestBody ListIcNeighborHoodFormDTO formDTO, HttpServletResponse response) throws Exception { + ValidatorUtils.validateEntity(ListIcNeighborHoodFormDTO.class); + neighborHoodService.exportNeighborhoodinfo(formDTO,response); - @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - IcNeighborHoodDTO data = icNeighborHoodService.get(id); - return new Result().ok(data); } - @PostMapping - public Result save(@RequestBody IcNeighborHoodDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - icNeighborHoodService.save(dto); - return new Result(); - } - @PutMapping - public Result update(@RequestBody IcNeighborHoodDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - icNeighborHoodService.update(dto); - return new Result(); - } - @DeleteMapping - public Result delete(@RequestBody String[] ids){ - //效验数据 - AssertUtils.isArrayEmpty(ids, "id"); - icNeighborHoodService.delete(ids); - return new Result(); +// /** +// * 导入 +// * @param params +// * @param response +// * @throws Exception +// */ +// @PostMapping("importneighborhoodinfo") +// public void importneighborhoodinfo(@RequestParam Map params, HttpServletResponse response) throws Exception { +// List list = icNeighborHoodService.list(params); +// ExcelUtils.exportExcelToTarget(response, "小区信息录入表", list, IcNeighborHoodExcel.class); +//// ExcelUtils.expor +// } + + /** + * 导入数据 + * @param file + * @return + * @throws IOException + */ + @PostMapping("importneighborhoodinfo") + public Result importExcel(@LoginUser TokenDto tokenDTO, @RequestParam("file") MultipartFile file, HttpServletRequest request) throws IOException { + String dataType = request.getParameter("dataType"); + if(StringUtils.isEmpty(dataType)){ + return new Result().error(ErrorCode.PASSWORD_ERROR); + } + String customerId = tokenDTO.getCustomerId(); +// String customerId = "123123"; + if(NeighborhoodConstant.NEIGHBOR_HOOD.equals(dataType)){ + List result = ExcelPoiUtils.importExcel(file, 0, 1, IcNeighborHoodExcel.class); + neighborHoodService.importExcel(customerId,result); + }else if(NeighborhoodConstant.BUILDING.equals(dataType)){ + List result = ExcelPoiUtils.importExcel(file, 0, 1, IcBuildingExcel.class); + buildingService.importExcel(customerId,result); + }else if(NeighborhoodConstant.HOUSE.equals(dataType)){ + List result = ExcelPoiUtils.importExcel(file, 0, 1, IcHouseExcel.class); + houseService.importExcel(customerId,result); + } + return new Result().ok("导入成功"); } + + + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java index d800bb6761..becb5ad1b8 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java @@ -17,9 +17,20 @@ package com.epmet.dao; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.CustomerAgencyEntity; import com.epmet.entity.IcBuildingEntity; +import com.epmet.entity.IcNeighborHoodEntity; +import com.epmet.excel.IcBuildingExcel; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; /** * 楼栋信息 @@ -29,5 +40,23 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcBuildingDao extends BaseDao { - + +// IPage> searchBuildingByPage(IPage page, +// @Param("neighbor") IcNeighborHoodEntity neighbor, +// @Param("building")IcBuildingEntity building); + IPage> searchBuildingByPage(IPage page, + @Param("building")IcBuildingEntity building); + +// List searchAllBuilding(@Param(Constants.WRAPPER) QueryWrapper neighborHoodEntityQueryWrapper, +// @Param("ew1") QueryWrapper buildingEntityQueryWrapper); +// List searchAllBuilding(@Param("neighbor") IcNeighborHoodEntity neighbor, +// @Param("building")IcBuildingEntity building); + List searchAllBuilding( + @Param("building")IcBuildingEntity building); + + List selectAgencyChildrenList(@Param("agencyId") String agencyId); + + List> selectListByName(@Param("neighborNameList")ArrayList strings, + @Param("buildingNameList") ArrayList strings1, + @Param("buildingUnitList") ArrayList integers); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java index e8c196935d..929a8ab570 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java @@ -17,9 +17,19 @@ package com.epmet.dao; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcBuildingEntity; import com.epmet.entity.IcHouseEntity; +import com.epmet.entity.IcNeighborHoodEntity; +import com.epmet.excel.IcHouseExcel; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; /** * 房屋信息 @@ -29,5 +39,19 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcHouseDao extends BaseDao { - + +// IPage> searchHouseByPage(IPage page, +// @Param(Constants.WRAPPER) QueryWrapper neighborHoodEntityQueryWrapper, +// @Param("ew1") QueryWrapper buildingEntityQueryWrapper, +// @Param("ew2") QueryWrapper houseEntityQueryWrapper); +// IPage> searchHouseByPage(IPage page, +// @Param("neighbor") IcNeighborHoodEntity neighbor, +// @Param("building") IcBuildingEntity building, +// @Param("house") IcHouseEntity house); + IPage> searchHouseByPage(IPage page, + @Param("house") IcHouseEntity house); + + List searchAllHouse(@Param("neighbor") IcNeighborHoodEntity neighbor, + @Param("building") IcBuildingEntity building, + @Param("house") IcHouseEntity house); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java index 9616584401..919cd34707 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java @@ -22,10 +22,13 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Constants; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.entity.IcNeighborHoodEntity; +import com.epmet.excel.IcNeighborHoodExcel; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.util.List; import java.util.Map; +import java.util.Set; /** * 小区表 @@ -36,5 +39,13 @@ import java.util.Map; @Mapper public interface IcNeighborHoodDao extends BaseDao { - IPage> searchNeighborhoodByPage(IPage page,@Param(Constants.WRAPPER) QueryWrapper neighborHoodEntityQueryWrapper); +// IPage> searchNeighborhoodByPage(IPage page,@Param(Constants.WRAPPER) QueryWrapper neighborHoodEntityQueryWrapper); + IPage> searchNeighborhoodByPage(IPage page,@Param("neighbor") IcNeighborHoodEntity neighbor); + +// List searchAllNeighborhood(@Param(Constants.WRAPPER) QueryWrapper neighborHoodEntityQueryWrapper); + List searchAllNeighborhood(@Param("neighbor") IcNeighborHoodEntity neighbor); + + List selectListByName(@Param("neighborNameList")List neighborNameList, + @Param("agencyNameList") List agencyNameList, + @Param("gridNameList") List gridNameList); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcBuildingExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcBuildingExcel.java new file mode 100644 index 0000000000..230f8d26e0 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcBuildingExcel.java @@ -0,0 +1,121 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import java.util.Date; + +/** + * 楼栋信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-10-27 + */ +@Data +public class IcBuildingExcel { + + /*@Excel(name = "楼栋主键") + private String id; + + @Excel(name = "客户id") + private String customerId; + + @Excel(name = "小区id") + private String neighborHoodId; + + @Excel(name = "片区id,neighbor_hood_part.id,可为空。") + private String partId; + + @Excel(name = "楼栋名称") + private String buildingName; + + @Excel(name = "楼栋类型,这里存储字典编码就可以") + private String type; + + @Excel(name = "排序") + private Integer sort; + + @Excel(name = "总单元数") + private Integer totalUnitNum; + + @Excel(name = "总楼层总数") + private Integer totalFloorNum; + + @Excel(name = "总户数") + private Integer totalHouseNum; + + @Excel(name = "中心点位:经度") + private String longitude; + + @Excel(name = "中心点位:纬度") + private String latitude; + + @Excel(name = "坐标位置") + private String coordinatePosition; + + @Excel(name = "删除标识 0未删除、1已删除") + private String delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime;*/ + + @Excel(name = "所属组织") + @NotBlank(message = "所属组织不能位空") + private String agencyName; + + @Excel(name = "所属网格") + @NotBlank(message = "所属网格不能位空") + private String gridName; + + @Excel(name = "小区名称") + @NotBlank(message = "小区名称不能位空") + @Length(max=50,message = "小区名称不能超过50个字") + private String neighborHoodName; + + @Excel(name = "楼栋名称") + @NotBlank(message = "楼栋名称不能位空") + private String buildingName; + + @Excel(name = "单元数") + @NotBlank(message = "单元数不能位空") + private Integer totalUnitNum; + + @Excel(name = "层数") + @NotBlank(message = "层数不能位空") + private Integer totalFloorNum; + + @Excel(name = "户数") + @NotBlank(message = "户数不能位空") + private Integer totalHouseNum; +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcHouseExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcHouseExcel.java new file mode 100644 index 0000000000..d51725fd6e --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcHouseExcel.java @@ -0,0 +1,139 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import java.util.Date; + +/** + * 房屋信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-10-27 + */ +@Data +public class IcHouseExcel { + + /*@Excel(name = "房屋主键") + private String id; + + @Excel(name = "客户id") + private String customerId; + + @Excel(name = "小区id") + private String neighborHoodId; + + @Excel(name = "片区id,neighbor_hood_part.id,可为空。") + private String partId; + + @Excel(name = "所属楼栋id") + private String buildingId; + + @Excel(name = "所属单元id") + private String buildingUnitId; + + @Excel(name = "房屋名字后台插入时生成") + private String houseName; + + @Excel(name = "门牌号") + private String doorName; + + @Excel(name = "房屋类型,这里存储字典value就可以") + private String houseType; + + @Excel(name = "存储字典value") + private String purpose; + + @Excel(name = "1出租;0未出租") + private Integer rentFlag; + + @Excel(name = "房主姓名") + private String ownerName; + + @Excel(name = "房主电话") + private String ownerPhone; + + @Excel(name = "房主身份证号") + private String ownerIdCard; + + @Excel(name = "删除标识 0未删除、1已删除") + private String delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime;*/ + + + + @Excel(name = "小区名称") + @NotBlank(message = "小区名称不能位空") + @Length(max=50,message = "小区名称不能超过50个字") + private String neighborHoodName; + + @Excel(name = "楼栋名称") + @NotBlank(message = "楼栋名称不能位空") + private String buildingName; + + @Excel(name = "单元号") + @NotBlank(message = "单元号不能位空") + private Integer buildingUnit; + + @Excel(name = "门牌号") + @NotBlank(message = "门牌号不能位空") + private String doorName; + + @Excel(name = "房屋类型") + @NotBlank(message = "房屋类型不能位空") + private String houseType; + + @Excel(name = "房屋用途") + @NotBlank(message = "房屋用途不能位空") + private String purpose; + + @Excel(name = "出租") + @NotBlank(message = "出租不能位空") + private String rentFlag; + + @Excel(name = "房主姓名") + @NotBlank(message = "房主姓名不能位空") + private String ownerName; + + @Excel(name = "房主电话") + @NotBlank(message = "房主电话不能位空") + private String ownerPhone; + + @Excel(name = "房主身份证号") + @NotBlank(message = "房主身份证号不能位空") + private String ownerIdCard; + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcNeighborHoodExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcNeighborHoodExcel.java new file mode 100644 index 0000000000..2926485139 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/IcNeighborHoodExcel.java @@ -0,0 +1,123 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import java.util.Date; + +/** + * 小区表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-10-26 + */ +@Data +public class IcNeighborHoodExcel { + + /*@Excel(name = "小区主键") + private String id; + + @Excel(name = "客户id") + private String customerId; + + @Excel(name = "小区名称") + private String neighborHoodName; + + @Excel(name = "组织id") + private String agencyId; + + @Excel(name = "上级组织id") + private String parentAgencyId; + + @Excel(name = "组织的所有上级组织id") + private String agencyPids; + + @Excel(name = "网格id") + private String gridId; + + @Excel(name = "详细地址") + private String address; + + @Excel(name = "备注") + private String remark; + + @Excel(name = "中心点位:经度") + private String longitude; + + @Excel(name = "中心点位:纬度") + private String latitude; + + @Excel(name = "坐标区域") + private String coordinates; + + @Excel(name = "坐标位置") + private String location; + + @Excel(name = "删除标识 0未删除、1已删除") + private String delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime;*/ + + + + + @Excel(name = "所属组织") + @NotBlank(message = "所属组织不能位空") + private String agencyName; + + @Excel(name = "所属网格") + @NotBlank(message = "所属网格不能位空") + private String gridName; + + @Excel(name = "小区名称") + @NotBlank(message = "小区名称不能位空") + @Length(max=50,message = "小区名称不能超过50个字") + private String neighborHoodName; + + @Excel(name = "关联物业") + + private String propertyName; + + @Excel(name = "详细地址") + @NotBlank(message = "详细地址不能位空") + private String address; + + @Excel(name = "备注") + @Length(max=500,message = "备注不能超过500个字") + private String remark; + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/IcBuildingRedis.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/IcBuildingRedis.java new file mode 100644 index 0000000000..976590a3ae --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/IcBuildingRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 楼栋信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-10-27 + */ +@Component +public class IcBuildingRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/IcHouseRedis.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/IcHouseRedis.java new file mode 100644 index 0000000000..9159c6eb88 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/IcHouseRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 房屋信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-10-27 + */ +@Component +public class IcHouseRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/IcNeighborHoodRedis.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/IcNeighborHoodRedis.java new file mode 100644 index 0000000000..9de1516e7f --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/IcNeighborHoodRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 小区表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-10-26 + */ +@Component +public class IcNeighborHoodRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/BuildingService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/BuildingService.java new file mode 100644 index 0000000000..8cdad17d3e --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/BuildingService.java @@ -0,0 +1,53 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.dto.BuildingTreeLevelDTO; +import com.epmet.dto.form.IcBulidingFormDTO; +import com.epmet.excel.IcBuildingExcel; +import com.epmet.excel.IcNeighborHoodExcel; + +import java.util.List; + +/** + * 楼栋 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-10-25 + */ +public interface BuildingService { + + + + + + void UpdateBuilding(String customerId, IcBulidingFormDTO formDTO); + + /** + * 删除小区 + * @param buildingId + */ + void DelBuilding(String buildingId); + + + void AddBuilding(String customerId, IcBulidingFormDTO formDTO); + + List treeList(String customerId); + + void importExcel(String customerId, List list); +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java new file mode 100644 index 0000000000..258c8c020d --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.dto.form.IcHouseFormDTO; +import com.epmet.excel.IcHouseExcel; +import com.epmet.excel.IcNeighborHoodExcel; + +import java.util.List; + +/** + * 小区表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-10-25 + */ +public interface HouseService { + + void addHouse(String customerId, IcHouseFormDTO formDTO); + + + void updateHouse(String customerId, IcHouseFormDTO formDTO); + + /** + * 删除小区 + * @param houseId + */ + void delHouse(String houseId); + + + void importExcel(String customerId, List list); +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/NeighborHoodService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/NeighborHoodService.java index 7b25482b6a..f4c612a2b4 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/NeighborHoodService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/NeighborHoodService.java @@ -20,6 +20,10 @@ package com.epmet.service; import com.epmet.dto.form.IcNeighborHoodFormDTO; import com.epmet.dto.form.ListIcNeighborHoodFormDTO; import com.epmet.dto.result.IcNeighborHoodResultDTO; +import com.epmet.excel.IcNeighborHoodExcel; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; /** * 小区表 @@ -40,4 +44,13 @@ public interface NeighborHoodService{ * @param neighborHoodId */ void DelNeighborhood(String neighborHoodId); + + /** + * 导出数据 + * @param formDTO + * @param response + */ + void exportNeighborhoodinfo(ListIcNeighborHoodFormDTO formDTO, HttpServletResponse response) throws Exception ; + + void importExcel(String customerId,List list); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java new file mode 100644 index 0000000000..2ae7a5ac42 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java @@ -0,0 +1,296 @@ +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.*; +import com.epmet.dto.*; +import com.epmet.dto.form.IcBulidingFormDTO; +import com.epmet.dto.result.ExtStaffPermissionResultDTO; +import com.epmet.entity.*; +import com.epmet.excel.IcBuildingExcel; +import com.epmet.excel.IcNeighborHoodExcel; +import com.epmet.service.*; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import javax.annotation.Resource; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +@Slf4j +@Service +public class BuildingServiceImpl implements BuildingService { + + + @Autowired + private IcBuildingService icBuildingService; + @Resource + private IcBuildingDao icBuildingDao; + + @Autowired + private IcBuildingUnitService icBuildingUnitService; + + @Resource + private IcHouseDao icHouseDao; + @Autowired + private IcHouseService icHouseService; + + @Resource + private CustomerAgencyDao customerAgencyDao; + @Resource + private CustomerGridDao customerGridDao; + @Resource + private IcNeighborHoodDao icNeighborHoodDao; + @Resource + private CustomerStaffAgencyDao customerStaffAgencyDao; + + @Override + @Transactional(rollbackFor = Exception.class) + public void AddBuilding(String customerId, IcBulidingFormDTO formDTO) { + IcBuildingDTO icBuildingDTO= ConvertUtils.sourceToTarget(formDTO, IcBuildingDTO.class); + icBuildingDTO.setCustomerId(customerId); + IcBuildingEntity entity = ConvertUtils.sourceToTarget(icBuildingDTO, IcBuildingEntity.class); + icBuildingDao.insert(entity); + + //设置楼宇单元 + Integer totalUnitNum = formDTO.getTotalUnitNum(); + List unitList = new ArrayList<>(); + for(int i =0 ;i treeList(String staffId) { + CustomerStaffAgencyDTO agency = customerStaffAgencyDao.selectLatestCustomerByStaff(staffId); + if(null == agency || StringUtils.isBlank(agency.getAgencyId())){ + log.error("com.epmet.service.impl.BuildingServiceImpl.treeList,没有找到工作人员所属的机关信息,用户Id:{}",staffId); + return new ArrayList<>(); + } + //1.获取所在组织及下级组织 + CustomerAgencyEntity customerAgency = customerAgencyDao.selectById(agency.getAgencyId()); + List customerAgencyList = icBuildingDao.selectAgencyChildrenList(agency.getAgencyId()); + customerAgencyList.add(customerAgency); + + if(CollectionUtils.isEmpty(customerAgencyList)){ + return new ArrayList<>(); + } + + List agencyList = customerAgencyList.stream().map(item -> { + BuildingTreeLevelDTO buildingTreeLevelDTO = new BuildingTreeLevelDTO(); + buildingTreeLevelDTO.setId(item.getId()); + buildingTreeLevelDTO.setPId(item.getPid()); + buildingTreeLevelDTO.setLabel(item.getOrganizationName()); + buildingTreeLevelDTO.setLevel(item.getLevel()); + buildingTreeLevelDTO.setChildren(new ArrayList<>()); + return buildingTreeLevelDTO; + }).collect(Collectors.toList()); + + + + //2.获取组织所在网格 + List agencyIdList = customerAgencyList.stream().map(a->a.getId()).collect(Collectors.toList()); +// agencyIdList.add(customerAgency.getId()); + List customerGridList = customerGridDao.selectList(new QueryWrapper().lambda().in(CustomerGridEntity::getPid, agencyIdList)); + + if(CollectionUtils.isEmpty(customerGridList)){ + return covertToTree(customerAgency,agencyList); + } + + List gridList = customerGridList.stream().map(item -> { + BuildingTreeLevelDTO buildingTreeLevelDTO = new BuildingTreeLevelDTO(); + buildingTreeLevelDTO.setId(item.getId()); + buildingTreeLevelDTO.setLabel(item.getGridName()); + buildingTreeLevelDTO.setLevel("grid"); + buildingTreeLevelDTO.setPId(item.getPid()); + buildingTreeLevelDTO.setChildren(new ArrayList<>()); + return buildingTreeLevelDTO; + }).collect(Collectors.toList()); + + + //3.获取网格下的所有小区 + List gridIdList = customerGridList.stream().map(a->a.getId()).collect(Collectors.toList()); + List icNeighborHoodList = icNeighborHoodDao.selectList(new QueryWrapper().lambda().in(IcNeighborHoodEntity::getGridId, gridIdList)); + if(CollectionUtils.isEmpty(customerGridList)){ + agencyList.addAll(gridList); + return covertToTree(customerAgency,agencyList); + } + List neighbourHoodList = icNeighborHoodList.stream().map(item -> { + BuildingTreeLevelDTO buildingTreeLevelDTO = new BuildingTreeLevelDTO(); + buildingTreeLevelDTO.setId(item.getId()); + buildingTreeLevelDTO.setPId(item.getGridId()); + buildingTreeLevelDTO.setLabel(item.getNeighborHoodName()); + buildingTreeLevelDTO.setLevel("neighbourHood"); + buildingTreeLevelDTO.setChildren(new ArrayList<>()); + return buildingTreeLevelDTO; + }).collect(Collectors.toList()); + + //3.获取小区下的所有楼宇 + List neighborHoodIdList = icNeighborHoodList.stream().map(a->a.getId()).collect(Collectors.toList()); + List icBuildingList = icBuildingDao.selectList(new QueryWrapper().lambda().in(IcBuildingEntity::getNeighborHoodId, neighborHoodIdList)); + + if(CollectionUtils.isEmpty(neighborHoodIdList)){ + agencyList.addAll(gridList); + agencyList.addAll(neighbourHoodList); + return covertToTree(customerAgency,agencyList); + } + //组合封装 + + List buildingList = icBuildingList.stream().map(item -> { + BuildingTreeLevelDTO buildingTreeLevelDTO = new BuildingTreeLevelDTO(); + buildingTreeLevelDTO.setId(item.getId()); + buildingTreeLevelDTO.setPId(item.getNeighborHoodId()); + buildingTreeLevelDTO.setLabel(item.getBuildingName()); + buildingTreeLevelDTO.setLevel("building"); + buildingTreeLevelDTO.setChildren(new ArrayList<>()); + return buildingTreeLevelDTO; + }).collect(Collectors.toList()); + + + + + //组织 +// gridList.stream() +// Map> gridMap = gridList.stream().collect(Collectors.groupingBy(e -> e.getPId())); +// List allList = agencyList.addAll(gridList) + + agencyList.addAll(gridList); + agencyList.addAll(neighbourHoodList); + agencyList.addAll(buildingList); + return covertToTree(customerAgency,agencyList); + + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void importExcel(String customerId, List list) { + //导入 + if(CollectionUtils.isEmpty(list)){ + return ; + } + //查询所有组织和网格根据名字 + + + + //获取所有小区 list 根据组织和网格 + Set neighborNameList = list.stream().map(item -> item.getNeighborHoodName()).collect(Collectors.toSet()); + Set agencyNameList = list.stream().map(item -> item.getAgencyName()).collect(Collectors.toSet()); + Set gridNameList = list.stream().map(item -> item.getGridName()).collect(Collectors.toSet()); + List neighborHoodList = icNeighborHoodDao.selectListByName(new ArrayList(neighborNameList),new ArrayList(agencyNameList),new ArrayList(gridNameList)); +// List neighborHoodList = icNeighborHoodDao.selectList(new QueryWrapper().lambda().in(IcNeighborHoodEntity::getNeighborHoodName, neighborNameList)); + Map neighborHoodMap = neighborHoodList.stream().collect(Collectors.toMap(IcNeighborHoodEntity::getNeighborHoodName, Function.identity(),(key1, key2)->key1)); + + + //2.获取小区数据 + //封装数据 + List buildingEntityList = new ArrayList<>(); + List icBuildingUnitEntityList = new ArrayList<>(); + for (IcBuildingExcel icBuildingExcel : list) { + IcBuildingEntity entity = new IcBuildingEntity(); + String uuid = UUID.randomUUID().toString().replace("-", ""); + entity.setId(uuid); + entity.setCustomerId(customerId); + entity.setNeighborHoodId(neighborHoodMap.get(icBuildingExcel.getNeighborHoodName()).getId()); + entity.setBuildingName(icBuildingExcel.getBuildingName()); + entity.setTotalUnitNum(icBuildingExcel.getTotalUnitNum()); + entity.setTotalFloorNum(icBuildingExcel.getTotalFloorNum()); + entity.setTotalHouseNum(icBuildingExcel.getTotalHouseNum()); + buildingEntityList.add(entity); + + Integer totalUnitNum = icBuildingExcel.getTotalUnitNum(); + //设置楼宇单元 + List unitList = new ArrayList<>(); + for(int i =0 ;i covertToTree(CustomerAgencyEntity customerAgency,List agencyList) { + BuildingTreeLevelDTO buildingTreeLevelDTO = new BuildingTreeLevelDTO(); + buildingTreeLevelDTO.setId(customerAgency.getId()); + buildingTreeLevelDTO.setLabel(customerAgency.getOrganizationName()); + buildingTreeLevelDTO.setLevel(customerAgency.getLevel()); + buildingTreeLevelDTO.setChildren(new ArrayList<>()); + recursionCovertToTree(buildingTreeLevelDTO,agencyList); + List result = new ArrayList<>(); + result.add(buildingTreeLevelDTO); + return result; + } + + private void recursionCovertToTree(BuildingTreeLevelDTO parent, List customerAgencyList) { + //获取子节点 + List subList = customerAgencyList.stream().filter(item -> item.getPId().equals(parent.getId())).collect(Collectors.toList()); + + for(BuildingTreeLevelDTO agencyEntity :subList){ + recursionCovertToTree(agencyEntity,customerAgencyList); + } + parent.setChildren(subList); + + } + + + + /** + * 更新 + * @param customerId + * @param formDTO + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void UpdateBuilding(String customerId, IcBulidingFormDTO formDTO) { + IcBuildingDTO icBuilding= icBuildingService.get(formDTO.getBuildingId()); + + if(!icBuilding.getNeighborHoodId().equals(formDTO.getNeighborHoodId())){ + //更新对应房屋小区名 + List icHouseEntities = icHouseDao.selectList(new QueryWrapper().lambda().eq(IcHouseEntity::getBuildingId, formDTO.getBuildingId())); + icHouseEntities.forEach(item->{ + item.setNeighborHoodId(formDTO.getNeighborHoodId()); + }); + icHouseService.updateBatchById(icHouseEntities); + } + IcBuildingDTO icBuildingDTO= ConvertUtils.sourceToTarget(formDTO, IcBuildingDTO.class); + icBuildingDTO.setId(formDTO.getBuildingId()); + icBuildingDTO.setCustomerId(customerId); + icBuildingService.update(icBuildingDTO); + //更新楼宇单元 + //如果楼宇单元大于之前的楼宇单元,新增单元 + //如果小于,判断是否存在房屋,如果存在就提示不能更改 + + + } + + /** + * 删除 + * @param buildingId + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void DelBuilding(String buildingId) { + //删除小区 + icBuildingService.deleteById(buildingId); + } + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java new file mode 100644 index 0000000000..724a35b032 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java @@ -0,0 +1,152 @@ +package com.epmet.service.impl; + +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.IcBuildingDao; +import com.epmet.dao.IcBuildingUnitDao; +import com.epmet.dao.IcHouseDao; +import com.epmet.dao.IcNeighborHoodDao; +import com.epmet.dto.IcBuildingDTO; +import com.epmet.dto.IcBuildingUnitDTO; +import com.epmet.dto.IcHouseDTO; +import com.epmet.dto.form.IcHouseFormDTO; +import com.epmet.entity.IcHouseEntity; +import com.epmet.excel.IcHouseExcel; +import com.epmet.service.HouseService; +import com.epmet.service.IcBuildingService; +import com.epmet.service.IcBuildingUnitService; +import com.epmet.service.IcHouseService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import javax.annotation.Resource; +import java.util.*; +import java.util.stream.Collectors; + +@Slf4j +@Service +public class HouseServiceImpl implements HouseService { + + + + @Autowired + private IcHouseService icHouseService; + @Autowired + private IcBuildingService icBuildingService; + @Autowired + private IcBuildingUnitService icBuildingUnitService; + @Resource + private IcNeighborHoodDao icNeighborHoodDao; + @Resource + private IcBuildingDao icBuildingDao; + @Resource + private IcBuildingUnitDao icBuildingUnitDao; + @Resource + private IcHouseDao icHouseDao; + + @Override + @Transactional(rollbackFor = Exception.class) + public void addHouse(String customerId, IcHouseFormDTO formDTO) { + IcHouseDTO icHouseDTO= ConvertUtils.sourceToTarget(formDTO, IcHouseDTO.class); + icHouseDTO.setCustomerId(customerId); + icHouseDTO.setRentFlag(formDTO.getRentFlag()?1:0); + + icHouseDTO.setHouseName(getHouseName(formDTO)); + icHouseService.save(icHouseDTO); + } + + private String getHouseName(IcHouseFormDTO formDTO){ + //设置房间名 楼栋-单元号-门牌号 + IcBuildingDTO icBuilding = icBuildingService.get(formDTO.getBuildingUnitId()); + IcBuildingUnitDTO icBuildingUnit = icBuildingUnitService.get(formDTO.getBuildingUnitId()); + String doorName = formDTO.getDoorName(); + String buildingName = Optional.ofNullable(icBuilding).map(u->u.getBuildingName()).orElse(""); + String unitName = Optional.ofNullable(icBuildingUnit).map(u->u.getUnitNum()).orElse(""); + return new StringBuilder().append(buildingName).append("-").append(unitName).append("-").append(doorName).toString(); + } + + /** + * 更新 + * @param customerId + * @param formDTO + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void updateHouse(String customerId, IcHouseFormDTO formDTO) { + IcHouseDTO icHouseDTO = ConvertUtils.sourceToTarget(formDTO, IcHouseDTO.class); + icHouseDTO.setId(formDTO.getHouseId()); + icHouseDTO.setCustomerId(customerId); + icHouseDTO.setRentFlag(formDTO.getRentFlag()?1:0); + //设置 + icHouseDTO.setHouseName(getHouseName(formDTO)); + icHouseService.update(icHouseDTO); + } + + /** + * 删除 + * @param houseId + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void delHouse(String houseId) { + //删除小区 + icHouseService.deleteById(houseId); + } + + @Override + public void importExcel(String customerId, List list) { + //导入 + if(CollectionUtils.isEmpty(list)){ + return ; + } + //获取所有小区 list +// List neighborNameList = list.stream().map(item -> item.getNeighborHoodName()).collect(Collectors.toList()); +// List neighborHoodList = icNeighborHoodDao.selectList(new QueryWrapper().lambda().in(IcNeighborHoodEntity::getNeighborHoodName, neighborNameList)); +// Map neighborHoodMap = neighborHoodList.stream().collect(Collectors.toMap(IcNeighborHoodEntity::getNeighborHoodName, Function.identity(),(key1, key2)->key1)); + + //获取所有楼宇 list +// List buildingNameList = list.stream().map(item -> item.getBuildingName()).collect(Collectors.toList()); + +// icBuildingDao.selectList(new QueryWrapper().lambda().in(IcBuildingEntity::getBuildingName, buildingNameList).in(); + Set neighborNameList = list.stream().map(item -> item.getNeighborHoodName()).collect(Collectors.toSet()); + Set buildingNameList = list.stream().map(item -> item.getBuildingName()).collect(Collectors.toSet()); + Set buildingUnitList = list.stream().map(item -> item.getBuildingUnit()).collect(Collectors.toSet()); + List> buildMapList = icBuildingDao.selectListByName(new ArrayList(neighborNameList),new ArrayList(buildingNameList),new ArrayList(buildingUnitList)); + //转Map + Map> buildMap = new HashMap<>(); + buildMapList.forEach(item->{ + buildMap.put(item.get("neighborName")+","+item.get("buildingName")+","+item.get("unitNum"),item); + }); + //封装数据 + List houseEntityList = new ArrayList<>(); + for (IcHouseExcel icHouseExcel : list) { + IcHouseEntity entity = new IcHouseEntity(); + String uuid = UUID.randomUUID().toString().replace("-", ""); + entity.setId(uuid); + entity.setCustomerId(customerId); + Map item = buildMap.get(icHouseExcel.getNeighborHoodName()+","+icHouseExcel.getBuildingName()+","+icHouseExcel.getBuildingUnit()); + if(!CollectionUtils.isEmpty(item)){ + entity.setNeighborHoodId(String.valueOf(item.get("neighborId"))); + entity.setBuildingId(String.valueOf(item.get("buildingId"))); + entity.setBuildingUnitId(String.valueOf(item.get("buildingUnitId"))); + entity.setHouseName(icHouseExcel.getBuildingName()+"-"+icHouseExcel.getBuildingUnit()+"-"+icHouseExcel.getDoorName()); + } + entity.setDoorName(icHouseExcel.getDoorName()); + entity.setHouseType(icHouseExcel.getHouseType()); + entity.setPurpose(icHouseExcel.getPurpose()); + entity.setRentFlag("是".equals(icHouseExcel.getRentFlag())?1:0); + entity.setOwnerName(icHouseExcel.getOwnerName()); + entity.setOwnerPhone(icHouseExcel.getOwnerPhone()); + entity.setOwnerIdCard(icHouseExcel.getOwnerIdCard()); + houseEntityList.add(entity); + } + //3.保存 + //4.新增单元 + icHouseService.insertBatch(houseEntityList); + + } + + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/NeighborHoodServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/NeighborHoodServiceImpl.java index b6c2a4347c..fff8156f11 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/NeighborHoodServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/NeighborHoodServiceImpl.java @@ -1,37 +1,43 @@ package com.epmet.service.impl; +import cn.afterturn.easypoi.excel.entity.TemplateExportParams; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.NeighborhoodConstant; -import com.epmet.dao.IcNeighborHoodDao; -import com.epmet.dao.IcNeighborHoodPropertyDao; +import com.epmet.dao.*; import com.epmet.dto.CustomerAgencyDTO; import com.epmet.dto.IcNeighborHoodDTO; import com.epmet.dto.IcNeighborHoodPropertyDTO; import com.epmet.dto.form.IcNeighborHoodFormDTO; import com.epmet.dto.form.ListIcNeighborHoodFormDTO; import com.epmet.dto.result.IcNeighborHoodResultDTO; -import com.epmet.entity.IcNeighborHoodEntity; -import com.epmet.entity.IcNeighborHoodPropertyEntity; +import com.epmet.entity.*; +import com.epmet.excel.IcBuildingExcel; +import com.epmet.excel.IcHouseExcel; +import com.epmet.excel.IcNeighborHoodExcel; import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.service.IcNeighborHoodPropertyService; import com.epmet.service.IcNeighborHoodService; import com.epmet.service.NeighborHoodService; +import com.epmet.util.ExcelPoiUtils; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; import org.springframework.util.StringUtils; import javax.annotation.Resource; -import java.util.HashMap; -import java.util.Map; -import java.util.Optional; +import javax.servlet.http.HttpServletResponse; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; @Slf4j @Service @@ -52,6 +58,16 @@ public class NeighborHoodServiceImpl implements NeighborHoodService { @Resource private IcNeighborHoodDao icNeighborHoodDao; + @Resource + private IcBuildingDao icBuildingDao; + @Resource + private IcHouseDao icHouseDao; + @Resource + private CustomerAgencyDao customerAgencyDao; + @Resource + private CustomerGridDao customerGridDao; + @Resource + private IcPropertyManagementDao icPropertyManagementDao; @Override @Transactional(rollbackFor = Exception.class) @@ -66,14 +82,15 @@ public class NeighborHoodServiceImpl implements NeighborHoodService { CustomerAgencyDTO customerAgencyDTO = Optional.ofNullable(customerAgencyResult.getData()).orElse(new CustomerAgencyDTO()); icNeighborHoodDTO.setParentAgencyId(customerAgencyDTO.getPid()); icNeighborHoodDTO.setAgencyPids(customerAgencyDTO.getPids()); - icNeighborHoodService.save(icNeighborHoodDTO); - + IcNeighborHoodEntity entity = ConvertUtils.sourceToTarget(icNeighborHoodDTO, IcNeighborHoodEntity.class); +// icNeighborHoodService.save(icNeighborHoodDTO); + icNeighborHoodDao.insert(entity); //设置物业关联 String propertyId = formDTO.getPropertyId(); if(!StringUtils.isEmpty(propertyId)){ //保存物业关系表 IcNeighborHoodPropertyDTO icNeighborHoodPropertyDTO = new IcNeighborHoodPropertyDTO(); - icNeighborHoodPropertyDTO.setNeighborHoodId(icNeighborHoodDTO.getId()); + icNeighborHoodPropertyDTO.setNeighborHoodId(entity.getId()); icNeighborHoodPropertyDTO.setPropertyId(propertyId); icNeighborHoodPropertyService.save(icNeighborHoodPropertyDTO); } @@ -85,7 +102,7 @@ public class NeighborHoodServiceImpl implements NeighborHoodService { */ @Override public IcNeighborHoodResultDTO listNeighborhood(ListIcNeighborHoodFormDTO formDTO) { - String dataType = formDTO.getDataType(); + String dataType = formDTO.getLevel(); Integer pageNo = formDTO.getPageNo(); Integer pageSize = formDTO.getPageSize(); @@ -101,14 +118,93 @@ public class NeighborHoodServiceImpl implements NeighborHoodService { result.setList(resultMap.getRecords()); }else if(NeighborhoodConstant.BUILDING.equals(dataType)){ //如果类型是building 查楼栋 - IPage> resultMap = searchNeighborhood(formDTO); + IPage> resultMap = searchBuilding(formDTO); + result.setTotal(resultMap.getTotal()); + result.setList(resultMap.getRecords()); }else if(NeighborhoodConstant.HOUSE.equals(dataType)){ //如果类型是house 查房屋 - IPage> resultMap = searchNeighborhood(formDTO); + IPage> resultMap = searchHouse(formDTO); + result.setTotal(resultMap.getTotal()); + result.setList(resultMap.getRecords()); } return result; } + + + + private IPage> searchHouse(ListIcNeighborHoodFormDTO formDTO) { + IPage page = new Page(formDTO.getPageNo(),formDTO.getPageSize()); + +// QueryWrapper neighborHoodEntityQueryWrapper = new QueryWrapper<>(); +// neighborHoodEntityQueryWrapper.lambda() +// .eq(!StringUtils.isEmpty(formDTO.getAgencyId()),IcNeighborHoodEntity::getAgencyId,formDTO.getAgencyId()) +// .eq(!StringUtils.isEmpty(formDTO.getGridId()),IcNeighborHoodEntity::getId,formDTO.getGridId()) +// .eq(!StringUtils.isEmpty(formDTO.getNeighborHoodId()),IcNeighborHoodEntity::getId,formDTO.getNeighborHoodId()) +// .like(!StringUtils.isEmpty(formDTO.getNeighborHoodName()),IcNeighborHoodEntity::getNeighborHoodName,formDTO.getNeighborHoodName()); +// IcNeighborHoodEntity neighbor = ConvertUtils.sourceToTarget(formDTO, IcNeighborHoodEntity.class); + + +// QueryWrapper buildingEntityQueryWrapper = new QueryWrapper<>(); +// buildingEntityQueryWrapper.lambda() +// .eq(!StringUtils.isEmpty(formDTO.getBuildingId()),IcBuildingEntity::getId,formDTO.getBuildingId()) +// .like(!StringUtils.isEmpty(formDTO.getBuildingName()),IcBuildingEntity::getBuildingName,formDTO.getBuildingName()); +// IcBuildingEntity building = ConvertUtils.sourceToTarget(formDTO, IcBuildingEntity.class); + + +// QueryWrapper houseEntityQueryWrapper = new QueryWrapper<>(); +// houseEntityQueryWrapper.lambda() +// .eq(!StringUtils.isEmpty(formDTO.getOwnerName()),IcHouseEntity::getOwnerName,formDTO.getOwnerName()) +// .like(!StringUtils.isEmpty(formDTO.getOwnerPhone()),IcHouseEntity::getOwnerPhone,formDTO.getOwnerPhone()); +// houseEntityQueryWrapper.eq("a.DEL_FLAG","0"); + IcHouseEntity house = ConvertUtils.sourceToTarget(formDTO, IcHouseEntity.class); + house.setDelFlag("0"); + + return icHouseDao.searchHouseByPage(page,house); + } + private IPage> searchBuilding(ListIcNeighborHoodFormDTO formDTO) { + IPage page = new Page(formDTO.getPageNo(),formDTO.getPageSize()); + +// IcNeighborHoodEntity neighbor = new IcNeighborHoodEntity(); +// IcNeighborHoodEntity neighbor = ConvertUtils.sourceToTarget(formDTO, IcNeighborHoodEntity.class); + +// QueryWrapper neighborHoodEntityQueryWrapper = new QueryWrapper<>(); +// neighborHoodEntityQueryWrapper.lambda() +// .eq(!StringUtils.isEmpty(formDTO.getAgencyId()),IcNeighborHoodEntity::getAgencyId,formDTO.getAgencyId()) +// .eq(!StringUtils.isEmpty(formDTO.getGridId()),IcNeighborHoodEntity::getId,formDTO.getGridId()) +// .eq(!StringUtils.isEmpty(formDTO.getNeighborHoodId()),IcNeighborHoodEntity::getId,formDTO.getNeighborHoodId()) +// .like(!StringUtils.isEmpty(formDTO.getNeighborHoodName()),IcNeighborHoodEntity::getNeighborHoodName,formDTO.getNeighborHoodName()); + + + IcBuildingEntity building = ConvertUtils.sourceToTarget(formDTO, IcBuildingEntity.class); + building.setDelFlag("0"); +// QueryWrapper buildingEntityQueryWrapper = new QueryWrapper<>(); +// +// buildingEntityQueryWrapper.lambda() +// .eq(!StringUtils.isEmpty(formDTO.getBuildingId()),IcBuildingEntity::getId,formDTO.getBuildingId()) +// .like(!StringUtils.isEmpty(formDTO.getBuildingName()),IcBuildingEntity::getBuildingName,formDTO.getBuildingName()); +// buildingEntityQueryWrapper.eq("a.DEL_FLAG","0"); + + return icBuildingDao.searchBuildingByPage(page,building); + } + + private IPage> searchNeighborhood(ListIcNeighborHoodFormDTO formDTO) { + + IPage page = new Page(formDTO.getPageNo(),formDTO.getPageSize()); + +// QueryWrapper neighborHoodEntityQueryWrapper = new QueryWrapper<>(); +// neighborHoodEntityQueryWrapper.lambda() +// .eq(!StringUtils.isEmpty(formDTO.getAgencyId()),IcNeighborHoodEntity::getAgencyId,formDTO.getAgencyId()) +// .eq(!StringUtils.isEmpty(formDTO.getGridId()),IcNeighborHoodEntity::getId,formDTO.getGridId()) +// .eq(!StringUtils.isEmpty(formDTO.getNeighborHoodId()),IcNeighborHoodEntity::getId,formDTO.getNeighborHoodId()) +// .like(!StringUtils.isEmpty(formDTO.getNeighborHoodName()),IcNeighborHoodEntity::getNeighborHoodName,formDTO.getNeighborHoodName()); +// neighborHoodEntityQueryWrapper.eq("a.DEL_FLAG","0"); + + IcNeighborHoodEntity neighbor = ConvertUtils.sourceToTarget(formDTO, IcNeighborHoodEntity.class); + neighbor.setDelFlag("0"); + return icNeighborHoodDao.searchNeighborhoodByPage(page, neighbor); + } + /** * 更新 * @param customerId @@ -171,16 +267,148 @@ public class NeighborHoodServiceImpl implements NeighborHoodService { } - private IPage> searchNeighborhood(ListIcNeighborHoodFormDTO formDTO) { + /** + * 导出数据 + * @param formDTO + * @param response + */ + @Override + public void exportNeighborhoodinfo(ListIcNeighborHoodFormDTO formDTO, HttpServletResponse response) throws Exception { + String dataType = formDTO.getLevel(); - IPage page = new Page(formDTO.getPageNo(),formDTO.getPageSize()); + if(StringUtils.isEmpty(dataType)|| NeighborhoodConstant.NEIGHBOR_HOOD.equals(dataType)){ + //如果类型是neighbourHood 查小区 + //导出小区 + List icNeighborHoodExcels = searchAllNeighborhood(formDTO); +// ExcelUtils.exportExcelToTarget(response, "小区信息录入表", icNeighborHoodExcels, IcNeighborHoodExcel.class); + + TemplateExportParams templatePath = new TemplateExportParams("excel/neighbor_template.xlsx"); + ExcelPoiUtils.exportExcel(templatePath ,new HashMap<>(),"小区信息录入表",response); + + return ; + }else if(NeighborhoodConstant.BUILDING.equals(dataType)){ + //如果类型是building 查楼栋 + //导出楼栋 + List icBuildingExcels = searchAllBuilding(formDTO); +// ExcelUtils.exportExcelToTarget(response, "楼宇信息录入表", icBuildingExcels, IcBuildingExcel.class); + TemplateExportParams templatePath = new TemplateExportParams("excel/building_template.xlsx"); + ExcelPoiUtils.exportExcel(templatePath ,new HashMap<>(),"楼宇信息录入表",response); + + return ; + }else if(NeighborhoodConstant.HOUSE.equals(dataType)){ + //如果类型是house 查房屋 + //导出房屋 + + List icHouseExcels = searchAllHouse(formDTO); +// ExcelUtils.exportExcelToTarget(response, "房屋信息录入表", icHouseExcels, IcHouseExcel.class); + TemplateExportParams templatePath = new TemplateExportParams("excel/house_template.xlsx"); + ExcelPoiUtils.exportExcel(templatePath ,new HashMap<>(),"房屋信息录入表",response); + + return ; + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void importExcel(String customerId,List list) { + //导入 + if(CollectionUtils.isEmpty(list)){ + return ; + } + //获取所有组织 list + List agencyNameList = list.stream().map(item -> item.getAgencyName()).collect(Collectors.toList()); + //获取所有网格 list + List gridNameList = list.stream().map(item->item.getGridName()).collect(Collectors.toList()); + //获取所有物业 list + List propertyNameList = list.stream().map(item->item.getPropertyName()).collect(Collectors.toList()); + //查询对应的id + List customerAgencyList = customerAgencyDao.selectList(new QueryWrapper().lambda().in(CustomerAgencyEntity::getOrganizationName, agencyNameList)); + List customerGridList = customerGridDao.selectList(new QueryWrapper().lambda().in(CustomerGridEntity::getGridName, gridNameList)); + List icPropertyManagementList = icPropertyManagementDao.selectList(new QueryWrapper().lambda().in(IcPropertyManagementEntity::getName, propertyNameList)); + + Map agencyMap = customerAgencyList.stream().collect(Collectors.toMap(CustomerAgencyEntity::getOrganizationName, Function.identity(),(key1, key2)->key1)); + Map gridMap = customerGridList.stream().collect(Collectors.toMap(CustomerGridEntity::getGridName,Function.identity(),(key1,key2)->key1)); + Map propertyMap = icPropertyManagementList.stream().collect(Collectors.toMap(IcPropertyManagementEntity::getName,Function.identity(),(key1,key2)->key1)); + + //封装数据 + List neighborHoodEntityList = new ArrayList<>(); + List icNeighborHoodPropertyEntityList = new ArrayList<>(); + for (IcNeighborHoodExcel icNeighborHoodExcel : list) { + IcNeighborHoodEntity entity = new IcNeighborHoodEntity(); + String uuid =UUID.randomUUID().toString().replace("-", ""); + entity.setId(uuid); + entity.setCustomerId(customerId); + entity.setNeighborHoodName(icNeighborHoodExcel.getNeighborHoodName()); + entity.setAgencyId(agencyMap.get(icNeighborHoodExcel.getAgencyName()).getId()); + entity.setParentAgencyId(agencyMap.get(icNeighborHoodExcel.getAgencyName()).getPid()); + entity.setAgencyPids(agencyMap.get(icNeighborHoodExcel.getAgencyName()).getPids()); + entity.setGridId(gridMap.get(icNeighborHoodExcel.getGridName()).getId()); + entity.setAddress(icNeighborHoodExcel.getAddress()); + entity.setRemark(icNeighborHoodExcel.getRemark()); + neighborHoodEntityList.add(entity); - QueryWrapper neighborHoodEntityQueryWrapper = new QueryWrapper<>(); - neighborHoodEntityQueryWrapper.lambda() - .eq(!StringUtils.isEmpty(formDTO.getNeighborHoodId()),IcNeighborHoodEntity::getId,formDTO.getNeighborHoodId()) - .like(!StringUtils.isEmpty(formDTO.getNeighborHoodName()),IcNeighborHoodEntity::getNeighborHoodName,formDTO.getNeighborHoodName()); + IcNeighborHoodPropertyEntity entity1 = new IcNeighborHoodPropertyEntity(); + entity1.setPropertyId(propertyMap.get(icNeighborHoodExcel.getPropertyName()).getId()); + entity1.setNeighborHoodId(uuid); + icNeighborHoodPropertyEntityList.add(entity1); + } + +// icNeighborHoodDao. + //保存 + icNeighborHoodService.insertBatch(neighborHoodEntityList); + icNeighborHoodPropertyService.insertBatch(icNeighborHoodPropertyEntityList); + + } + + private List searchAllBuilding(ListIcNeighborHoodFormDTO formDTO) { + +// QueryWrapper neighborHoodEntityQueryWrapper = new QueryWrapper<>(); +// neighborHoodEntityQueryWrapper.lambda() +// .eq(!StringUtils.isEmpty(formDTO.getAgencyId()),IcNeighborHoodEntity::getAgencyId,formDTO.getAgencyId()) +// .eq(!StringUtils.isEmpty(formDTO.getGridId()),IcNeighborHoodEntity::getId,formDTO.getGridId()) +// .eq(!StringUtils.isEmpty(formDTO.getNeighborHoodId()),IcNeighborHoodEntity::getId,formDTO.getNeighborHoodId()) +// .like(!StringUtils.isEmpty(formDTO.getNeighborHoodName()),IcNeighborHoodEntity::getNeighborHoodName,formDTO.getNeighborHoodName()); +// IcNeighborHoodEntity neighbor = ConvertUtils.sourceToTarget(formDTO, IcNeighborHoodEntity.class); + +// QueryWrapper buildingEntityQueryWrapper = new QueryWrapper<>(); +// buildingEntityQueryWrapper.lambda() +// .eq(!StringUtils.isEmpty(formDTO.getBuildingId()),IcBuildingEntity::getId,formDTO.getBuildingId()) +// .like(!StringUtils.isEmpty(formDTO.getBuildingName()),IcBuildingEntity::getBuildingName,formDTO.getBuildingName()); +// buildingEntityQueryWrapper.eq("a.DEL_FLAG","0"); + IcBuildingEntity building = ConvertUtils.sourceToTarget(formDTO, IcBuildingEntity.class); + building.setDelFlag("0"); + + return icBuildingDao.searchAllBuilding(building); + } + + private List searchAllNeighborhood(ListIcNeighborHoodFormDTO formDTO) { +// QueryWrapper neighborHoodEntityQueryWrapper = new QueryWrapper<>(); +// neighborHoodEntityQueryWrapper.lambda() +// .eq(!StringUtils.isEmpty(formDTO.getAgencyId()),IcNeighborHoodEntity::getAgencyId,formDTO.getAgencyId()) +// .eq(!StringUtils.isEmpty(formDTO.getGridId()),IcNeighborHoodEntity::getId,formDTO.getGridId()) +// .eq(!StringUtils.isEmpty(formDTO.getNeighborHoodId()),IcNeighborHoodEntity::getId,formDTO.getNeighborHoodId()) +// .like(!StringUtils.isEmpty(formDTO.getNeighborHoodName()),IcNeighborHoodEntity::getNeighborHoodName,formDTO.getNeighborHoodName()); +// neighborHoodEntityQueryWrapper.eq("a.DEL_FLAG","0"); + IcNeighborHoodEntity neighbor = ConvertUtils.sourceToTarget(formDTO, IcNeighborHoodEntity.class); + neighbor.setDelFlag("0"); + + return icNeighborHoodDao.searchAllNeighborhood(neighbor); + } + + private List searchAllHouse(ListIcNeighborHoodFormDTO formDTO) { + + IcNeighborHoodEntity neighbor = ConvertUtils.sourceToTarget(formDTO, IcNeighborHoodEntity.class); + + IcBuildingEntity building = ConvertUtils.sourceToTarget(formDTO, IcBuildingEntity.class); - return icNeighborHoodDao.searchNeighborhoodByPage(page, neighborHoodEntityQueryWrapper); + IcHouseEntity house = ConvertUtils.sourceToTarget(formDTO, IcHouseEntity.class); + house.setDelFlag("0"); + + return icHouseDao.searchAllHouse(neighbor,building,house); } + + + + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/util/ExcelPoiUtils.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/util/ExcelPoiUtils.java new file mode 100644 index 0000000000..fa03b631d1 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/util/ExcelPoiUtils.java @@ -0,0 +1,276 @@ +package com.epmet.util; + +import cn.afterturn.easypoi.excel.ExcelExportUtil; +import cn.afterturn.easypoi.excel.ExcelImportUtil; +import cn.afterturn.easypoi.excel.entity.ExportParams; +import cn.afterturn.easypoi.excel.entity.ImportParams; +import cn.afterturn.easypoi.excel.entity.TemplateExportParams; +import cn.afterturn.easypoi.excel.entity.enmus.ExcelType; +import cn.afterturn.easypoi.excel.entity.result.ExcelImportResult; +import org.apache.commons.lang.StringUtils; +import org.apache.poi.ss.usermodel.Workbook; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletResponse; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.net.URLEncoder; +import java.util.List; +import java.util.Map; +import java.util.NoSuchElementException; + +public class ExcelPoiUtils { + /** + * excel 导出 + * + * @param list 数据列表 + * @param fileName 导出时的excel名称 + * @param response + */ + public static void exportExcel(List> list, String fileName, HttpServletResponse response) throws IOException { + defaultExport(list, fileName, response); + } + + /** + * 默认的 excel 导出 + * + * @param list 数据列表 + * @param fileName 导出时的excel名称 + * @param response + */ + private static void defaultExport(List> list, String fileName, HttpServletResponse response) throws IOException { + //把数据添加到excel表格中 + Workbook workbook = ExcelExportUtil.exportExcel(list, ExcelType.HSSF); + downLoadExcel(fileName, response, workbook); + } + + /** + * excel 导出 + * + * @param list 数据列表 + * @param pojoClass pojo类型 + * @param fileName 导出时的excel名称 + * @param response + * @param exportParams 导出参数(标题、sheet名称、是否创建表头,表格类型) + */ + private static void defaultExport(List list, Class pojoClass, String fileName, HttpServletResponse response, ExportParams exportParams) throws IOException { + //把数据添加到excel表格中 + Workbook workbook = ExcelExportUtil.exportExcel(exportParams, pojoClass, list); + downLoadExcel(fileName, response, workbook); + } + + /** + * excel 导出 + * + * @param list 数据列表 + * @param pojoClass pojo类型 + * @param fileName 导出时的excel名称 + * @param exportParams 导出参数(标题、sheet名称、是否创建表头,表格类型) + * @param response + */ + public static void exportExcel(List list, Class pojoClass, String fileName, ExportParams exportParams, HttpServletResponse response) throws IOException { + defaultExport(list, pojoClass, fileName, response, exportParams); + } + + /** + * excel 导出 + * + * @param list 数据列表 + * @param title 表格内数据标题 + * @param sheetName sheet名称 + * @param pojoClass pojo类型 + * @param fileName 导出时的excel名称 + * @param response + */ + public static void exportExcel(List list, String title, String sheetName, Class pojoClass, String fileName, HttpServletResponse response) throws IOException { + defaultExport(list, pojoClass, fileName, response, new ExportParams(title, sheetName, ExcelType.XSSF)); + } + + + + /** + * excel 导出 + * + * @param list 数据列表 + * @param title 表格内数据标题 + * @param sheetName sheet名称 + * @param pojoClass pojo类型 + * @param fileName 导出时的excel名称 + * @param isCreateHeader 是否创建表头 + * @param response + */ + public static void exportExcel(List list, String title, String sheetName, Class pojoClass, String fileName, boolean isCreateHeader, HttpServletResponse response) throws IOException { + ExportParams exportParams = new ExportParams(title, sheetName, ExcelType.XSSF); + exportParams.setCreateHeadRows(isCreateHeader); + defaultExport(list, pojoClass, fileName, response, exportParams); + } + /** + * 根据模板生成excel后导出 + * @param templatePath 模板路径 + * @param map 数据集合 + * @param fileName 文件名 + * @param response + * @throws IOException + */ + public static void exportExcel(TemplateExportParams templatePath, Map map, String fileName, HttpServletResponse response) throws IOException { + Workbook workbook = ExcelExportUtil.exportExcel(templatePath, map); + downLoadExcel(fileName, response, workbook); + } + + + /** + * excel下载 + * + * @param fileName 下载时的文件名称 + * @param response + * @param workbook excel数据 + */ + private static void downLoadExcel(String fileName, HttpServletResponse response, Workbook workbook) throws IOException { + try { + response.setCharacterEncoding("UTF-8"); + response.setHeader("content-Type", "application/vnd.ms-excel"); + response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName + ".xlsx", "UTF-8")); + workbook.write(response.getOutputStream()); + } catch (Exception e) { + throw new IOException(e.getMessage()); + } + } + + + + /** + * excel 导入 + * + * @param file excel文件 + * @param pojoClass pojo类型 + * @param + * @return + */ + public static List importExcel(MultipartFile file, Class pojoClass) throws IOException { + return importExcel(file, 1, 1, pojoClass); + } + + /** + * excel 导入 + * + * @param filePath excel文件路径 + * @param titleRows 表格内数据标题行 + * @param headerRows 表头行 + * @param pojoClass pojo类型 + * @param + * @return + */ + public static List importExcel(String filePath, Integer titleRows, Integer headerRows, Class pojoClass) throws IOException { + if (StringUtils.isBlank(filePath)) { + return null; + } + ImportParams params = new ImportParams(); + params.setTitleRows(titleRows); + params.setHeadRows(headerRows); + params.setNeedSave(true); + params.setSaveUrl("/excel/"); + try { + return ExcelImportUtil.importExcel(new File(filePath), pojoClass, params); + } catch (NoSuchElementException e) { + throw new IOException("模板不能为空"); + } catch (Exception e) { + throw new IOException(e.getMessage()); + } + } + + + /** + * excel 导入 + * + * @param file 上传的文件 + * @param titleRows 表格内数据标题行 + * @param headerRows 表头行 + * @param pojoClass pojo类型 + * @param + * @return + */ + public static List importExcel(MultipartFile file, Integer titleRows, Integer headerRows, Class pojoClass) throws IOException { + if (file == null) { + return null; + } + try { + return importExcel(file.getInputStream(), titleRows, headerRows, pojoClass); + } catch (Exception e) { + throw new IOException(e.getMessage()); + } + } + + /** + * excel 导入 + * + * @param inputStream 文件输入流 + * @param titleRows 表格内数据标题行 + * @param headerRows 表头行 + * @param pojoClass pojo类型 + * @param + * @return + */ + public static List importExcel(InputStream inputStream, Integer titleRows, Integer headerRows, Class pojoClass) throws IOException { + if (inputStream == null) { + return null; + } + ImportParams params = new ImportParams(); + params.setTitleRows(titleRows); + params.setHeadRows(headerRows); + params.setSaveUrl("/excel/"); + params.setNeedSave(true); + try { + return ExcelImportUtil.importExcel(inputStream, pojoClass, params); + } catch (NoSuchElementException e) { + throw new IOException("excel文件不能为空"); + } catch (Exception e) { + throw new IOException(e.getMessage()); + } + } + /** + * excel 导入,有错误信息 + * + * @param file 上传的文件 + * @param pojoClass pojo类型 + * @param + * @return + */ + public static ExcelImportResult importExcelMore(MultipartFile file, Class pojoClass) throws IOException { + if (file == null) { + return null; + } + try { + return importExcelMore(file.getInputStream(), pojoClass); + } catch (Exception e) { + throw new IOException(e.getMessage()); + } + } + + /** + * excel 导入 + * + * @param inputStream 文件输入流 + * @param pojoClass pojo类型 + * @param + * @return + */ + private static ExcelImportResult importExcelMore(InputStream inputStream, Class pojoClass) throws IOException { + if (inputStream == null) { + return null; + } + ImportParams params = new ImportParams(); + params.setTitleRows(1);//表格内数据标题行 + params.setHeadRows(1);//表头行 + params.setSaveUrl("/excel/"); + params.setNeedSave(true); + params.setNeedVerify(true); + try { + return ExcelImportUtil.importExcelMore(inputStream, pojoClass, params); + } catch (NoSuchElementException e) { + throw new IOException("excel文件不能为空"); + } catch (Exception e) { + throw new IOException(e.getMessage()); + } + } +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/bootstrap.yml b/epmet-module/gov-org/gov-org-server/src/main/resources/bootstrap.yml index dc1c51b285..dc2f9674ba 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/bootstrap.yml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/bootstrap.yml @@ -108,6 +108,8 @@ mybatis-plus: cache-enabled: false call-setters-on-nulls: true jdbc-type-for-null: 'null' + log-impl: org.apache.ibatis.logging.stdout.StdOutImpl + feign: hystrix: diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/excel/building_template.xlsx b/epmet-module/gov-org/gov-org-server/src/main/resources/excel/building_template.xlsx new file mode 100644 index 0000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=q}8vw|AFE866{QG>%?u*%I7cyA90Ub8YQfbmL;M)_ytY|0DkduJ-6@Lji=WeTn6%?Lq;;BsdRD;Sv_V$h6 zkxaRky#&w-{aj!XTS;ayxFB9C$;Zv3q& zbZPW}5X4%)W9$hOGbGIV=ef^cCjI@_KTLrt$^KQrU&qh>te^qnl>ao0_E_-o5Y8{r zJ&3P=G?MdJ_^8 zvqScOuO$leAGQ2!fjrjoxT^i@TTURsHN>osYut|&JT8s=QgA@{Q^Bu7$z##SN!~9} zebV1WAE$heH9Ss)erfO~du)S$Op6{Xe4JeTQs_zkyEz`G8jm&nHSYZ-4**b70sw!D zf**_jHAMNdcn$TR#Qz9b9!vlA5csonEZv`^js9~aD9OS?*z?<18#-VaLcnu|-~ReP D9sswP literal 0 HcmV?d00001 diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/excel/house_template.xlsx b/epmet-module/gov-org/gov-org-server/src/main/resources/excel/house_template.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..a095e3e0f5fcc4b93eaf764066d069a9bb5c9889 GIT binary patch literal 11445 zcmeHt^;?wf*7ndPFmy{uH`3BAB@L3&ox{*5oq{w7(u_3HUDDkk4I&`jCH;*)`+fCc zKkxSs?0x@m&v0O*X7=D$>K=|}&ibtGcD5AR@UZlm09fer|GoZ$S70z+-=>`%H~0YQ8k43rC-NDg z$;;-Mo^{&6Ti;^->Nf8foV2^^G-)yua5%j!FS;FQ>0(Rv7^8i2D&UDlDTo2*|u4ZwrRQ$JLdW2 zct1Jo<(I6?{whS0^`mfh!UM3S#T(w4FU`s}{;|=DlA$B*K*U#8cPs5Ti}fDmuOI>A zQ`Lo{4c12aa0pibabq}OBt$Nr6#ogf}?vc0|5~g75tD zHnwzQO)+c%-PMSK7aR)NA*m!-qAlH`vQDnP2Xohan~xR!Po9TifBnI_OO;bHEQBH! zirONcvvd5KUzIp*!PWBQg}>mJMjb=&chl=gg%EzF72zv*0O0-}4xs$ET*WbHF@uHX z>M}GH(V)5d3S?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FIp+Kr!e8{w9Z1L9K%2lZHcaD;~BkpD?0 zV=<*dwr!5;vsZ9klcn`c@+F7k1$o3QN7^arpatL@?Aujyi(bSYDfxRF9loifpb+nQ zNkayZj3G!rM*(4(?wiR3VTtdzy>+^hCbUnGHS3&FWMO+5tT2xv1)ERP zo9nyto0FZlUscGhU-Q|M^;}5~Uk4MC^0*?x$>3t3I4dG{=-0z5`M{({`FRDyxP8{v z2<0L>*?aC~b?#tALAG3&p|*A%xv4qdS> zx;TR!?EXvd{~b ziJpZZv3YuXlV@Cb9DFR&;)jd>$%BfjezidQRlN^o1SK&n43OgBVkcUtF1C z!txR%N;;~&&S2*AllY;}ZS_uJ(d$T*BqUcaFCi1sJi|%mQQ+w_J@phNRr(P6ZnRFi zovOf9UJUQ!M41aM)1u4S;r*Jtv7PT*1UIU4`*DzeR_YDwTQAhCR0n=O|YZzf+Ht7dUTnc8h%7O z{F6~QE5?0QvcBzp|6ms;cW1A2q-)4vY4e(EO- zEDN-C`sbO--%I+}w||(hdgdL4k)j4-bfcBRzfezc2A`$Hfm(9v;g4MuErrN0eVjG!Ic8+U37d%Akhi zzZT@rcll+WKSX)xWBx|b$Nz=$(A9hh@NhHy8$g@%7r^hW@x#!E-TCiOIEueQANJ}G z5&qs}{*H(4%_#wZe``4(hX1`E_%j@v`j7B`bq5cl|E{=yM(@-95pD9n`l~FD0Hx|r Q&j1~u2xYq}!_U9|ACWGEG5`Po literal 0 HcmV?d00001 diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/excel/neighbor_template.xlsx b/epmet-module/gov-org/gov-org-server/src/main/resources/excel/neighbor_template.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..36297ea510f4e9d917b11d0da6106ac096d05a27 GIT binary patch literal 11674 zcmeHtbyQVr*YB3@kOt}6bVvzEcSv_gckK;GNFxn`goJdbbTM^_8+K^?!KmpSMP>}Ecz5a_OFre0N)yay{gm;B5F=fOcoe}$( zHb~&DZTdDmaFUm+oH}D6yLZW@gdf-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8c?`^hX->Kl( zXrZP%z?uS$DQAJzWw{4B11%(`+`X(T>1yHL*dzlXUuGa=A>KEM?x8 z&|TxD^$fBlM_&r^2$_zxl2XC*7_(4eYi8!3;d;bn@2$0YCXNGwJm$m<=)jT&V7)9k z*d^Lk<1zdapVj>h+L9*ZkJ;;1StAGnxZ>IR8SdYbYEpW5a2R0WSXO;2V6YUAJcZ}U zoH}*=&V@tY<1*2M1rV=fpKOLxr;!^3C6?nh!O3FQS`$SJaLJRgcsF@n-<{u_?1n8X zky?53*b(Yf1qUsOjfUtb57((z52N7yC^gdeb>JhHHZ8Sa4&sx2sn?e0 z_LgMCOND7F>(>!m>T^8~OX~-Z5tiV+G_i}2_;Ep!jRAW|t29HiABNU5p&Gkan>Q6Q zUX!4AE=7%vN%JbKeU;>Fzi1V@gBa9*n%jwf=xGLsZlgioLgwfGVs4!so$PJ@Rqy{O zHvo|RPF}WC=#OcXz2`HLCUez+Iah1_K@)5$jmR&eaOV6j{UQaB{6YFK0er~eVKVfK0}#>-{<|c9 zn;Jc2_%Olv#gLlp4{ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml index 25df6ce4a6..e62cb42010 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml @@ -26,5 +26,201 @@ + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml index 8a057c3a9f..b1d6f0c7e3 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml @@ -25,7 +25,7 @@ - + select + a.id as neighborHoodId, + a.NEIGHBOR_HOOD_NAME as neighborHoodName, + a.ADDRESS as address, + a.REMARK as remark, + + b.ORGANIZATION_NAME as orgName, + c.GRID_NAME as gridName + from ic_neighbor_hood a + + left join customer_agency b on a.AGENCY_ID = b.ID + + left join customer_grid c on a.GRID_ID = c.ID + + + AND a.GRID_ID = #{neighbor.id} + + + AND a.DEL_FLAG = #{neighbor.delFlag} + + + + + + + \ No newline at end of file