Browse Source

方法模板

dev_shibei_match
sunyuchao 4 years ago
parent
commit
6abd984d8f
  1. 145
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/result/CustomerAgencyDTO.java
  2. 129
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/result/CustomerGridDTO.java
  3. 35
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java
  4. 23
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java
  5. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DataReportingController.java
  6. 15
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/DataReportingService.java
  7. 15
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java

145
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

129
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
/**
* 所属组织机构IDcustomer_organization.id
*/
private String pid;
/**
* 所有上级组织ID
*/
private String pids;
/**
* 所属组织机构名
*/
private String agencyName;
/**
* 所有上级组织名
*/
private String allParentName;
}

35
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.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.StatsFormDTO; 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.GroupStatsFormDTO;
import com.epmet.dto.group.form.GroupTotalFormDTO; 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.screen.form.InitCustomerIndexForm;
import com.epmet.dto.stats.form.CustomerIdAndDateIdFormDTO; 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 com.epmet.feign.impl.DataStatisticalOpenFeignClientFallBackFactory;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
/** /**
* desc: 数据统计 对外feign client * desc: 数据统计 对外feign client
* *
@ -274,4 +284,25 @@ public interface DataStatisticalOpenFeignClient {
*/ */
@PostMapping("/data/stats/statsgroup/groupandhottopic") @PostMapping("/data/stats/statsgroup/groupandhottopic")
Result groupAndHotTopicTask(@RequestBody GroupTotalFormDTO formDTO); Result groupAndHotTopicTask(@RequestBody GroupTotalFormDTO formDTO);
/**
* @dscription 批量查询客户组织基础信息
* @author sun
*/
@PostMapping("/data/stats/datareporting/agencybaseinfo")
Result<List<CustomerAgencyDTO>> getAgencyBaseInfo(@RequestBody AgencyBaseInfoFormDTO formDTO);
/**
* @dscription 批量查询客户组织基础信息
* @author sun
*/
@PostMapping("/data/stats/datareporting/gridbaseinfo")
Result<List<CustomerGridDTO>> getGridBaseInfo(@RequestBody GridBaseInfoFormDTO formDTO);
/**
* @dscription 批量查询客户组织基础信息
* @author sun
*/
@PostMapping("/data/stats/datareporting/staffbaseinfo")
Result<List<CustomerStaffDTO>> getStaffBaseInfo(@RequestBody StaffBaseInfoFormDTO formDTO);
} }

23
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.extract.form.*;
import com.epmet.dto.group.form.GroupStatsFormDTO; import com.epmet.dto.group.form.GroupStatsFormDTO;
import com.epmet.dto.group.form.GroupTotalFormDTO; 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.screen.form.InitCustomerIndexForm;
import com.epmet.dto.stats.form.CustomerIdAndDateIdFormDTO; 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 com.epmet.feign.DataStatisticalOpenFeignClient;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.util.List;
/** /**
* desc: * desc:
* *
@ -265,4 +273,19 @@ public class DataStatisticalOpenFeignClientFallBack implements DataStatisticalOp
public Result groupAndHotTopicTask(GroupTotalFormDTO formDTO) { public Result groupAndHotTopicTask(GroupTotalFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL_SERVER, "groupAndHotTopic", formDTO); return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL_SERVER, "groupAndHotTopic", formDTO);
} }
@Override
public Result<List<CustomerAgencyDTO>> getAgencyBaseInfo(AgencyBaseInfoFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL_SERVER, "getAgencyBaseInfo", formDTO);
}
@Override
public Result<List<CustomerGridDTO>> getGridBaseInfo(GridBaseInfoFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL_SERVER, "getGridBaseInfo", formDTO);
}
@Override
public Result<List<CustomerStaffDTO>> getStaffBaseInfo(StaffBaseInfoFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL_SERVER, "getStaffBaseInfo", formDTO);
}
} }

6
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.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils; 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.AgencyBaseInfoFormDTO;
import com.epmet.dto.org.GridBaseInfoFormDTO; 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.StaffBaseInfoFormDTO;
import com.epmet.dto.user.result.CustomerStaffDTO;
import com.epmet.service.DataReportingService; import com.epmet.service.DataReportingService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;

15
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/DataReportingService.java

@ -1,11 +1,11 @@
package com.epmet.service; 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.AgencyBaseInfoFormDTO;
import com.epmet.dto.org.GridBaseInfoFormDTO; 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.StaffBaseInfoFormDTO;
import com.epmet.dto.user.result.CustomerStaffDTO;
import java.util.List; import java.util.List;
@ -17,19 +17,22 @@ public interface DataReportingService {
/** /**
* @Author sun * @Author sun
* @Description 批量查询客户组织基础信息 * @Description 批量查询客户组织基础信息
**/ *
* @return*/
List<CustomerAgencyDTO> getAgencyBaseInfo(AgencyBaseInfoFormDTO formDTO); List<CustomerAgencyDTO> getAgencyBaseInfo(AgencyBaseInfoFormDTO formDTO);
/** /**
* @Author sun * @Author sun
* @Description 批量查询客户网格基础信息 * @Description 批量查询客户网格基础信息
**/ *
* @return*/
List<CustomerGridDTO> getGridBaseInfo(GridBaseInfoFormDTO formDTO); List<CustomerGridDTO> getGridBaseInfo(GridBaseInfoFormDTO formDTO);
/** /**
* @Author sun * @Author sun
* @Description 批量查询客户网格人员基础信息 * @Description 批量查询客户网格人员基础信息
**/ *
* @return*/
List<CustomerStaffDTO> getStaffBaseInfo(StaffBaseInfoFormDTO formDTO); List<CustomerStaffDTO> getStaffBaseInfo(StaffBaseInfoFormDTO formDTO);
} }

15
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; 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.AgencyBaseInfoFormDTO;
import com.epmet.dto.org.GridBaseInfoFormDTO; 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.StaffBaseInfoFormDTO;
import com.epmet.dto.user.result.CustomerStaffDTO;
import com.epmet.service.DataReportingService; import com.epmet.service.DataReportingService;
import com.epmet.service.org.CustomerAgencyService; import com.epmet.service.org.CustomerAgencyService;
import com.epmet.service.org.CustomerGridService; import com.epmet.service.org.CustomerGridService;
@ -30,7 +30,8 @@ public class DataReportingServiceImpl implements DataReportingService {
/** /**
* @Author sun * @Author sun
* @Description 批量查询客户组织基础信息 * @Description 批量查询客户组织基础信息
**/ *
* @return*/
@Override @Override
public List<CustomerAgencyDTO> getAgencyBaseInfo(AgencyBaseInfoFormDTO formDTO) { public List<CustomerAgencyDTO> getAgencyBaseInfo(AgencyBaseInfoFormDTO formDTO) {
//批量查询客户组织信息 //批量查询客户组织信息
@ -40,7 +41,8 @@ public class DataReportingServiceImpl implements DataReportingService {
/** /**
* @Author sun * @Author sun
* @Description 批量查询客户网格基础信息 * @Description 批量查询客户网格基础信息
**/ *
* @return*/
@Override @Override
public List<CustomerGridDTO> getGridBaseInfo(GridBaseInfoFormDTO formDTO) { public List<CustomerGridDTO> getGridBaseInfo(GridBaseInfoFormDTO formDTO) {
//批量查询客户网格信息 //批量查询客户网格信息
@ -50,7 +52,8 @@ public class DataReportingServiceImpl implements DataReportingService {
/** /**
* @Author sun * @Author sun
* @Description 批量查询客户网格人员基础信息 * @Description 批量查询客户网格人员基础信息
**/ *
* @return*/
@Override @Override
public List<CustomerStaffDTO> getStaffBaseInfo(StaffBaseInfoFormDTO formDTO) { public List<CustomerStaffDTO> getStaffBaseInfo(StaffBaseInfoFormDTO formDTO) {
//批量查询客户网格人员信息 //批量查询客户网格人员信息

Loading…
Cancel
Save