From 6abd984d8fc4e523dfe2cd0b23193bdc91c46fb0 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 14 Oct 2021 10:47:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B9=E6=B3=95=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/org/result/CustomerAgencyDTO.java | 145 ++++++++++++++++++ .../epmet/dto/org/result/CustomerGridDTO.java | 129 ++++++++++++++++ .../feign/DataStatisticalOpenFeignClient.java | 35 ++++- ...ataStatisticalOpenFeignClientFallBack.java | 23 +++ .../controller/DataReportingController.java | 6 +- .../epmet/service/DataReportingService.java | 15 +- .../impl/DataReportingServiceImpl.java | 15 +- 7 files changed, 351 insertions(+), 17 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/result/CustomerAgencyDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/result/CustomerGridDTO.java diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/result/CustomerAgencyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/result/CustomerAgencyDTO.java new file mode 100644 index 0000000000..c78138e9bf --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/result/CustomerAgencyDTO.java @@ -0,0 +1,145 @@ +/** + * 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.org.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 机关单位信息表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-04-20 + */ +@Data +public class CustomerAgencyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 上级组织机构ID + */ + private String pid; + + /** + * 所有上级组织机构ID(以英文:隔开) + */ + private String pids; + + /** + * 所有上级名称,以-连接 + */ + private String allParentName; + + /** + * 组织名称 + */ + private String organizationName; + + /** + * 机关级别(社区级:community, +乡(镇、街道)级:street, +区县级: district, +市级: city +省级:province) 机关级别(社区级:community,乡(镇、街道)级:street,区县级: district,市级: city省级:province) + */ + private String level; + + /** + * 地区编码 + */ + private String areaCode; + + /** + * 删除标识 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + /** + * 总人数 + */ + private Integer totalUser; + + /** + * 省 + */ + private String province; + + /** + * 市 + */ + private String city; + + /** + * 区县 + */ + private String district; + + /** + * 当前组织的上级行政地区编码add0204;举例平阴县对应的是济南市3701 + */ + private String parentAreaCode; + + /** + * 街道 + */ + private String street; + + /** + * 社区 + */ + private String community; +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/result/CustomerGridDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/result/CustomerGridDTO.java new file mode 100644 index 0000000000..bcff1ea7b0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/result/CustomerGridDTO.java @@ -0,0 +1,129 @@ +/** + * 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.org.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 客户网格表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-16 + */ +@Data +public class CustomerGridDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID 唯一标识 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 网格名称 + */ + private String gridName; + + /** 组织-网格 */ + private String gridNamePath; + + /** + * 中心位置经度 + */ + private String longitude; + + /** + * 中心位置纬度 + */ + private String latitude; + + /** + * 所属地区码(所属组织地区码) + */ + private String areaCode; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + /** + * 管辖区域 + */ + private String manageDistrict; + + /** + * 当前网格总人数 + */ + private Integer totalUser; + + /** + * 所属组织机构ID(customer_organization.id) + */ + private String pid; + + /** + * 所有上级组织ID + */ + private String pids; + + /** + * 所属组织机构名 + */ + private String agencyName; + + /** + * 所有上级组织名 + */ + private String allParentName; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java index 93d81104d5..e4a7e94dd6 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java @@ -3,17 +3,27 @@ package com.epmet.feign; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.StatsFormDTO; -import com.epmet.dto.extract.form.*; +import com.epmet.dto.extract.form.BizDataFormDTO; +import com.epmet.dto.extract.form.ExtractIndexFormDTO; +import com.epmet.dto.extract.form.ExtractOriginFormDTO; +import com.epmet.dto.extract.form.ExtractScreenFormDTO; import com.epmet.dto.group.form.GroupStatsFormDTO; import com.epmet.dto.group.form.GroupTotalFormDTO; +import com.epmet.dto.org.AgencyBaseInfoFormDTO; +import com.epmet.dto.org.GridBaseInfoFormDTO; +import com.epmet.dto.org.result.CustomerAgencyDTO; +import com.epmet.dto.org.result.CustomerGridDTO; import com.epmet.dto.screen.form.InitCustomerIndexForm; import com.epmet.dto.stats.form.CustomerIdAndDateIdFormDTO; -import com.epmet.feign.impl.DataStatisticalOpenFeignClientFallBack; +import com.epmet.dto.user.StaffBaseInfoFormDTO; +import com.epmet.dto.user.result.CustomerStaffDTO; import com.epmet.feign.impl.DataStatisticalOpenFeignClientFallBackFactory; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; +import java.util.List; + /** * desc: 数据统计 对外feign client * @@ -274,4 +284,25 @@ public interface DataStatisticalOpenFeignClient { */ @PostMapping("/data/stats/statsgroup/groupandhottopic") Result groupAndHotTopicTask(@RequestBody GroupTotalFormDTO formDTO); + + /** + * @dscription 批量查询客户组织基础信息 + * @author sun + */ + @PostMapping("/data/stats/datareporting/agencybaseinfo") + Result> getAgencyBaseInfo(@RequestBody AgencyBaseInfoFormDTO formDTO); + + /** + * @dscription 批量查询客户组织基础信息 + * @author sun + */ + @PostMapping("/data/stats/datareporting/gridbaseinfo") + Result> getGridBaseInfo(@RequestBody GridBaseInfoFormDTO formDTO); + + /** + * @dscription 批量查询客户组织基础信息 + * @author sun + */ + @PostMapping("/data/stats/datareporting/staffbaseinfo") + Result> getStaffBaseInfo(@RequestBody StaffBaseInfoFormDTO formDTO); } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java index 7bf37b9ce7..dd8e5ada80 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java @@ -7,11 +7,19 @@ import com.epmet.dto.StatsFormDTO; import com.epmet.dto.extract.form.*; import com.epmet.dto.group.form.GroupStatsFormDTO; import com.epmet.dto.group.form.GroupTotalFormDTO; +import com.epmet.dto.org.AgencyBaseInfoFormDTO; +import com.epmet.dto.org.GridBaseInfoFormDTO; +import com.epmet.dto.org.result.CustomerAgencyDTO; +import com.epmet.dto.org.result.CustomerGridDTO; import com.epmet.dto.screen.form.InitCustomerIndexForm; import com.epmet.dto.stats.form.CustomerIdAndDateIdFormDTO; +import com.epmet.dto.user.StaffBaseInfoFormDTO; +import com.epmet.dto.user.result.CustomerStaffDTO; import com.epmet.feign.DataStatisticalOpenFeignClient; import org.springframework.stereotype.Component; +import java.util.List; + /** * desc: * @@ -265,4 +273,19 @@ public class DataStatisticalOpenFeignClientFallBack implements DataStatisticalOp public Result groupAndHotTopicTask(GroupTotalFormDTO formDTO) { return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL_SERVER, "groupAndHotTopic", formDTO); } + + @Override + public Result> getAgencyBaseInfo(AgencyBaseInfoFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL_SERVER, "getAgencyBaseInfo", formDTO); + } + + @Override + public Result> getGridBaseInfo(GridBaseInfoFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL_SERVER, "getGridBaseInfo", formDTO); + } + + @Override + public Result> getStaffBaseInfo(StaffBaseInfoFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL_SERVER, "getStaffBaseInfo", formDTO); + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DataReportingController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DataReportingController.java index 1632ef903a..129c44d2aa 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DataReportingController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DataReportingController.java @@ -2,12 +2,12 @@ package com.epmet.controller; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.dto.CustomerAgencyDTO; -import com.epmet.dto.CustomerGridDTO; -import com.epmet.dto.CustomerStaffDTO; import com.epmet.dto.org.AgencyBaseInfoFormDTO; import com.epmet.dto.org.GridBaseInfoFormDTO; +import com.epmet.dto.org.result.CustomerAgencyDTO; +import com.epmet.dto.org.result.CustomerGridDTO; import com.epmet.dto.user.StaffBaseInfoFormDTO; +import com.epmet.dto.user.result.CustomerStaffDTO; import com.epmet.service.DataReportingService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/DataReportingService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/DataReportingService.java index e1bb8f1c53..779b430eeb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/DataReportingService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/DataReportingService.java @@ -1,11 +1,11 @@ package com.epmet.service; -import com.epmet.dto.CustomerAgencyDTO; -import com.epmet.dto.CustomerGridDTO; -import com.epmet.dto.CustomerStaffDTO; import com.epmet.dto.org.AgencyBaseInfoFormDTO; import com.epmet.dto.org.GridBaseInfoFormDTO; +import com.epmet.dto.org.result.CustomerAgencyDTO; +import com.epmet.dto.org.result.CustomerGridDTO; import com.epmet.dto.user.StaffBaseInfoFormDTO; +import com.epmet.dto.user.result.CustomerStaffDTO; import java.util.List; @@ -17,19 +17,22 @@ public interface DataReportingService { /** * @Author sun * @Description 批量查询客户组织基础信息 - **/ + * + * @return*/ List getAgencyBaseInfo(AgencyBaseInfoFormDTO formDTO); /** * @Author sun * @Description 批量查询客户网格基础信息 - **/ + * + * @return*/ List getGridBaseInfo(GridBaseInfoFormDTO formDTO); /** * @Author sun * @Description 批量查询客户网格人员基础信息 - **/ + * + * @return*/ List getStaffBaseInfo(StaffBaseInfoFormDTO formDTO); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java index 528cc90542..8aa77bc4d4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java @@ -1,11 +1,11 @@ package com.epmet.service.impl; -import com.epmet.dto.CustomerAgencyDTO; -import com.epmet.dto.CustomerGridDTO; -import com.epmet.dto.CustomerStaffDTO; import com.epmet.dto.org.AgencyBaseInfoFormDTO; import com.epmet.dto.org.GridBaseInfoFormDTO; +import com.epmet.dto.org.result.CustomerAgencyDTO; +import com.epmet.dto.org.result.CustomerGridDTO; import com.epmet.dto.user.StaffBaseInfoFormDTO; +import com.epmet.dto.user.result.CustomerStaffDTO; import com.epmet.service.DataReportingService; import com.epmet.service.org.CustomerAgencyService; import com.epmet.service.org.CustomerGridService; @@ -30,7 +30,8 @@ public class DataReportingServiceImpl implements DataReportingService { /** * @Author sun * @Description 批量查询客户组织基础信息 - **/ + * + * @return*/ @Override public List getAgencyBaseInfo(AgencyBaseInfoFormDTO formDTO) { //批量查询客户组织信息 @@ -40,7 +41,8 @@ public class DataReportingServiceImpl implements DataReportingService { /** * @Author sun * @Description 批量查询客户网格基础信息 - **/ + * + * @return*/ @Override public List getGridBaseInfo(GridBaseInfoFormDTO formDTO) { //批量查询客户网格信息 @@ -50,7 +52,8 @@ public class DataReportingServiceImpl implements DataReportingService { /** * @Author sun * @Description 批量查询客户网格人员基础信息 - **/ + * + * @return*/ @Override public List getStaffBaseInfo(StaffBaseInfoFormDTO formDTO) { //批量查询客户网格人员信息