22 changed files with 792 additions and 4 deletions
@ -0,0 +1,96 @@ |
|||||
|
/** |
||||
|
* 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.dataaggre.dto.datastats; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* 组织活动(参加人数、组织次数、平均参加人数)按天累计值分析 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2021-05-13 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class FactGroupActDailyDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 4411632223804355342L; |
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 数据更新至日期Id:yyyyMMdd |
||||
|
*/ |
||||
|
private String dateId; |
||||
|
|
||||
|
/** |
||||
|
* 网格id |
||||
|
*/ |
||||
|
private String orgId; |
||||
|
|
||||
|
/** |
||||
|
* 网格:grid;组织:agency |
||||
|
*/ |
||||
|
private String orgType; |
||||
|
|
||||
|
/** |
||||
|
* 1)orgType=grid: pid=网格所属组织id; |
||||
|
2)orgType=agency: pid=当前组织的上级组织 |
||||
|
*/ |
||||
|
private String pid; |
||||
|
|
||||
|
/** |
||||
|
* 1)orgType=grid: pids=网格所有上级组织,包括pid; |
||||
|
2)orgType=agency: pids=当前组织的所有上级组织,包括pid. |
||||
|
*/ |
||||
|
private String pids; |
||||
|
|
||||
|
/** |
||||
|
* 活动分类编码 |
||||
|
*/ |
||||
|
private String categoryCode; |
||||
|
|
||||
|
/** |
||||
|
* 上级分类编码 |
||||
|
*/ |
||||
|
private String parentCode; |
||||
|
|
||||
|
/** |
||||
|
* 分类等级 |
||||
|
*/ |
||||
|
private Integer level; |
||||
|
|
||||
|
/** |
||||
|
* 截止到dateId: 组织次数;包含dateId这一天的数据 |
||||
|
*/ |
||||
|
private Integer organizeTotal; |
||||
|
|
||||
|
/** |
||||
|
* 截止到dateId: 参加人数;包含dateId这一天的数据 |
||||
|
*/ |
||||
|
private Integer participateUserTotal; |
||||
|
|
||||
|
/** |
||||
|
* 截止到dateId: 平均参加人数;包含dateId这一天的数据 |
||||
|
*/ |
||||
|
private Integer avgParticipateUserTotal; |
||||
|
|
||||
|
} |
@ -0,0 +1,76 @@ |
|||||
|
/** |
||||
|
* 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.dataaggre.dto.resigroup; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonIgnore; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 活动类别字典 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2021-04-16 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ActCategoryDictDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键 |
||||
|
*/ |
||||
|
@JsonIgnore |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
@JsonIgnore |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 类别编码 |
||||
|
*/ |
||||
|
private String categoryCode; |
||||
|
|
||||
|
/** |
||||
|
* 活动类别名称;eg:支部建设、联建共建 |
||||
|
*/ |
||||
|
private String categoryName; |
||||
|
|
||||
|
/** |
||||
|
* 等级1,2...... |
||||
|
*/ |
||||
|
@JsonIgnore |
||||
|
private Integer level; |
||||
|
|
||||
|
/** |
||||
|
* 排序 |
||||
|
*/ |
||||
|
@JsonIgnore |
||||
|
private Integer sort; |
||||
|
|
||||
|
/** |
||||
|
* 上级类别编码 |
||||
|
*/ |
||||
|
@JsonIgnore |
||||
|
private String parentCode; |
||||
|
} |
@ -0,0 +1,42 @@ |
|||||
|
package com.epmet.dataaggre.dto.resigroup.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* 001、【支建+联建】统计分析 入参 |
||||
|
* |
||||
|
* @author yinzuomei@elink-cn.com |
||||
|
* @date 2021/5/18 9:16 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class BranchConAnalysisFormDTO implements Serializable { |
||||
|
public interface AddUserInternalGroup { |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 支部建设:100;联建共建:101 |
||||
|
*/ |
||||
|
@NotBlank(message = "firstCategoryCode必传,支部建设:100;联建共建:101", groups = AddUserInternalGroup.class) |
||||
|
private String firstCategoryCode; |
||||
|
|
||||
|
/** |
||||
|
* 当前客户id |
||||
|
*/ |
||||
|
@NotBlank(message = "客户id不能为空", groups = AddUserInternalGroup.class) |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 当前组织或者网格id |
||||
|
*/ |
||||
|
@NotBlank(message = "orgId不能为空", groups = AddUserInternalGroup.class) |
||||
|
private String orgId; |
||||
|
|
||||
|
/** |
||||
|
* 默认传组织:agency; 网格:grid |
||||
|
*/ |
||||
|
@NotBlank(message = "orgType不能为空", groups = AddUserInternalGroup.class) |
||||
|
private String orgType; |
||||
|
} |
@ -0,0 +1,32 @@ |
|||||
|
package com.epmet.dataaggre.dto.resigroup.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* 002、【支建+联建】二级分类字典查询 入参 |
||||
|
* |
||||
|
* @author yinzuomei@elink-cn.com |
||||
|
* @date 2021/5/18 13:42 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class GroupActCategoryQueryFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 8373780230315448396L; |
||||
|
|
||||
|
public interface AddUserInternalGroup { |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 支部建设:100;联建共建:101 |
||||
|
*/ |
||||
|
@NotBlank(message = "firstCategoryCode必传,支部建设:100;联建共建:101", groups = AddUserInternalGroup.class) |
||||
|
private String firstCategoryCode; |
||||
|
|
||||
|
/** |
||||
|
* 当前客户id |
||||
|
*/ |
||||
|
@NotBlank(message = "客户id不能为空", groups = BranchConAnalysisFormDTO.AddUserInternalGroup.class) |
||||
|
private String customerId; |
||||
|
} |
@ -0,0 +1,44 @@ |
|||||
|
package com.epmet.dataaggre.dto.resigroup.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* 003、【支建+联建】下级组织折线图 入参 |
||||
|
* |
||||
|
* @author yinzuomei@elink-cn.com |
||||
|
* @date 2021/5/18 13:52 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class SubAnalysisByCodeFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -4132250208377993452L; |
||||
|
|
||||
|
public interface AddUserInternalGroup { |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 分类编码;002接口返回的 |
||||
|
*/ |
||||
|
@NotBlank(message = "categoryCode不能为空", groups = AddUserInternalGroup.class) |
||||
|
private String categoryCode; |
||||
|
|
||||
|
/** |
||||
|
* 当前客户id |
||||
|
*/ |
||||
|
@NotBlank(message = "客户id不能为空", groups = AddUserInternalGroup.class) |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 当前组织或者网格id |
||||
|
*/ |
||||
|
@NotBlank(message = "orgId不能为空", groups = AddUserInternalGroup.class) |
||||
|
private String orgId; |
||||
|
|
||||
|
/** |
||||
|
* 默认传组织:agency; 网格:grid |
||||
|
*/ |
||||
|
@NotBlank(message = "orgType不能为空", groups = AddUserInternalGroup.class) |
||||
|
private String orgType; |
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.epmet.dataaggre.dto.resigroup.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* 001、【支建+联建】统计分析 返参 |
||||
|
* |
||||
|
* @author yinzuomei@elink-cn.com |
||||
|
* @date 2021/5/18 15:12 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class BranchConAnalysisDetailDTO implements Serializable { |
||||
|
private String name; |
||||
|
private String type; |
||||
|
private Integer value; |
||||
|
private Integer avg; |
||||
|
private String categoryCode; |
||||
|
} |
@ -0,0 +1,37 @@ |
|||||
|
package com.epmet.dataaggre.dto.resigroup.result; |
||||
|
|
||||
|
import com.epmet.commons.tools.constant.NumConstant; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 001、【支建+联建】统计分析 返参 |
||||
|
* |
||||
|
* @author yinzuomei@elink-cn.com |
||||
|
* @date 2021/5/18 10:01 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class BranchConAnalysisResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -4998343002705222898L; |
||||
|
|
||||
|
/** |
||||
|
* 组织活动次数 |
||||
|
*/ |
||||
|
private Integer organizeTotal; |
||||
|
|
||||
|
/** |
||||
|
* 参加活动人数 |
||||
|
*/ |
||||
|
private Integer participateUserTotal; |
||||
|
|
||||
|
private List<BranchConAnalysisDetailDTO> dataList; |
||||
|
|
||||
|
public BranchConAnalysisResultDTO() { |
||||
|
this.organizeTotal = NumConstant.ZERO; |
||||
|
this.participateUserTotal = NumConstant.ZERO; |
||||
|
this.dataList=new ArrayList<>(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.epmet.dataaggre.dto.resigroup.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* 组织或者网格基本信息 |
||||
|
* |
||||
|
* @author yinzuomei@elink-cn.com |
||||
|
* @date 2021/5/18 14:36 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class OrgInfoCommonDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -2191521364070476999L; |
||||
|
|
||||
|
private String orgId; |
||||
|
private String orgName; |
||||
|
private String orgType; |
||||
|
} |
@ -0,0 +1,30 @@ |
|||||
|
package com.epmet.dataaggre.dto.resigroup.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* 003、【支建+联建】下级组织折线图 返参 |
||||
|
* |
||||
|
* @author yinzuomei@elink-cn.com |
||||
|
* @date 2021/5/18 14:09 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class SubAnalysisByCodeResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -6025482721295705372L; |
||||
|
|
||||
|
/** |
||||
|
* 横坐标名称:组织名或者网格名 |
||||
|
*/ |
||||
|
private String name; |
||||
|
|
||||
|
/** |
||||
|
* 参加人数、组织次数、平均参加人数 |
||||
|
*/ |
||||
|
private String type; |
||||
|
|
||||
|
private Integer value; |
||||
|
|
||||
|
private String orgId; |
||||
|
} |
@ -0,0 +1,74 @@ |
|||||
|
package com.epmet.dataaggre.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.dataaggre.dto.resigroup.ActCategoryDictDTO; |
||||
|
import com.epmet.dataaggre.dto.resigroup.form.BranchConAnalysisFormDTO; |
||||
|
import com.epmet.dataaggre.dto.resigroup.form.GroupActCategoryQueryFormDTO; |
||||
|
import com.epmet.dataaggre.dto.resigroup.form.SubAnalysisByCodeFormDTO; |
||||
|
import com.epmet.dataaggre.dto.resigroup.result.BranchConAnalysisResultDTO; |
||||
|
import com.epmet.dataaggre.dto.resigroup.result.SubAnalysisByCodeResultDTO; |
||||
|
import com.epmet.dataaggre.service.resigroup.ResiGroupService; |
||||
|
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; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 专项组-组织活动相关API放这 |
||||
|
* |
||||
|
* @author yinzuomei@elink-cn.com |
||||
|
* @date 2021/5/18 9:08 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("groupact") |
||||
|
public class GroupActController { |
||||
|
|
||||
|
@Autowired |
||||
|
private ResiGroupService resiGroupService; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* @return com.epmet.commons.tools.utils.Result<com.epmet.dataaggre.dto.resigroup.result.BranchConAnalysisResultDTO> |
||||
|
* @param formDTO |
||||
|
* @author yinzuomei |
||||
|
* @description 001、【支建+联建】统计分析 |
||||
|
* @Date 2021/5/18 10:17 |
||||
|
**/ |
||||
|
@PostMapping("branchconanalysis") |
||||
|
public Result<BranchConAnalysisResultDTO> branchConAnalysis(@RequestBody BranchConAnalysisFormDTO formDTO){ |
||||
|
ValidatorUtils.validateEntity(formDTO,BranchConAnalysisFormDTO.AddUserInternalGroup.class); |
||||
|
return new Result<BranchConAnalysisResultDTO>().ok(resiGroupService.branchConAnalysis(formDTO)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dataaggre.dto.resigroup.ActCategoryDictDTO>> |
||||
|
* @param formDTO |
||||
|
* @author yinzuomei |
||||
|
* @description 002、【支建+联建】二级分类字典查询 |
||||
|
* @Date 2021/5/18 13:49 |
||||
|
**/ |
||||
|
@PostMapping("categorydictlist") |
||||
|
public Result<List<ActCategoryDictDTO>> queryCategoryDictList(@RequestBody GroupActCategoryQueryFormDTO formDTO){ |
||||
|
ValidatorUtils.validateEntity(formDTO,GroupActCategoryQueryFormDTO.AddUserInternalGroup.class); |
||||
|
return new Result<List<ActCategoryDictDTO>>().ok(resiGroupService.queryActCategoryDictList(formDTO.getCustomerId(),formDTO.getFirstCategoryCode())); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* @return com.epmet.commons.tools.utils.Result<com.epmet.dataaggre.dto.resigroup.result.SubAnalysisByCodeResultDTO> |
||||
|
* @param formDTO |
||||
|
* @author yinzuomei |
||||
|
* @description 003、【支建+联建】下级组织折线图 |
||||
|
* @Date 2021/5/18 14:31 |
||||
|
**/ |
||||
|
@PostMapping("subanalysisbycode") |
||||
|
public Result<List<SubAnalysisByCodeResultDTO>> querySubAnalysisByCode(@RequestBody SubAnalysisByCodeFormDTO formDTO){ |
||||
|
ValidatorUtils.validateEntity(formDTO,GroupActCategoryQueryFormDTO.AddUserInternalGroup.class); |
||||
|
return new Result<List<SubAnalysisByCodeResultDTO>>().ok(resiGroupService.querySubAnalysisByCode(formDTO)); |
||||
|
} |
||||
|
|
||||
|
} |
Loading…
Reference in new issue