381 changed files with 10805 additions and 498 deletions
@ -0,0 +1,9 @@ |
|||||
|
-- 1、增加字典类型 |
||||
|
INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000011, 'age_group', '年龄范围', '', 11, 1067246875800000001, '2021-11-18 16:29:58', 1067246875800000001, '2021-11-18 16:29:58'); |
||||
|
|
||||
|
-- 2、增加字典数据 |
||||
|
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000230, 1000000000000000011, '50岁以下', '0', '', 0, 1, '2021-11-23 14:04:42', 1, '2021-11-23 14:04:42'); |
||||
|
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000231, 1000000000000000011, '50-59岁', '1', '', 1, 1, '2021-11-23 14:04:42', 1, '2021-11-23 14:04:42'); |
||||
|
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000232, 1000000000000000011, '60-69岁', '2', '', 2, 1, '2021-11-23 14:04:42', 1, '2021-11-23 14:04:42'); |
||||
|
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000233, 1000000000000000011, '70-79岁', '3', '', 3, 1, '2021-11-23 14:04:42', 1, '2021-11-23 14:04:42'); |
||||
|
INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES (1000000000000000234, 1000000000000000011, '80岁以上', '4', '', 4, 1, '2021-11-23 14:04:42', 1, '2021-11-23 14:04:42'); |
||||
@ -0,0 +1,19 @@ |
|||||
|
package com.epmet.commons.tools.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2021/12/8 14:50 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class OptionDataResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 416877704759019210L; |
||||
|
private String label; |
||||
|
private String value; |
||||
|
private String code; |
||||
|
private String radio; |
||||
|
} |
||||
@ -0,0 +1,35 @@ |
|||||
|
package com.epmet.commons.tools.feign; |
||||
|
|
||||
|
import feign.RequestInterceptor; |
||||
|
import feign.RequestTemplate; |
||||
|
import org.springframework.web.context.request.RequestAttributes; |
||||
|
import org.springframework.web.context.request.RequestContextHolder; |
||||
|
import org.springframework.web.context.request.ServletRequestAttributes; |
||||
|
|
||||
|
import javax.servlet.http.HttpServletRequest; |
||||
|
import java.util.Enumeration; |
||||
|
|
||||
|
|
||||
|
public class EpmetBaseRequestInterceptor implements RequestInterceptor { |
||||
|
|
||||
|
@Override |
||||
|
public void apply(RequestTemplate template) { |
||||
|
RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes(); |
||||
|
if (requestAttributes == null) { |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
HttpServletRequest request = ((ServletRequestAttributes) requestAttributes).getRequest(); |
||||
|
Enumeration<String> headerNames = request.getHeaderNames(); |
||||
|
if (headerNames != null) { |
||||
|
while (headerNames.hasMoreElements()) { |
||||
|
String name = headerNames.nextElement(); |
||||
|
Enumeration<String> values = request.getHeaders(name); |
||||
|
while (values.hasMoreElements()) { |
||||
|
String value = values.nextElement(); |
||||
|
template.header(name, value); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,21 @@ |
|||||
|
package com.epmet.dataaggre.dto.datastats.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description 项目月数据-接口返参 |
||||
|
* @Auth sun |
||||
|
*/ |
||||
|
@Data |
||||
|
public class FactAgencyProjectMonthResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 466974582608407121L; |
||||
|
//组织Id
|
||||
|
private String agencyId; |
||||
|
//月维度Id
|
||||
|
private String monthId; |
||||
|
//当月项目总数 【当前组织及下级前一月新增项目数】
|
||||
|
private Integer projectIncr = 0; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,35 @@ |
|||||
|
package com.epmet.dataaggre.dto.datastats.result; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonIgnore; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.math.BigDecimal; |
||||
|
|
||||
|
/** |
||||
|
* @Description 项目总数-接口返参 |
||||
|
* @Auth sun |
||||
|
*/ |
||||
|
@Data |
||||
|
public class FactAgencyProjectResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 466974582608407121L; |
||||
|
@JsonIgnore |
||||
|
BigDecimal bi = new BigDecimal(0); |
||||
|
//组织Id
|
||||
|
private String agencyId; |
||||
|
//组织名称
|
||||
|
private String dateId; |
||||
|
//月维度Id
|
||||
|
private String monthId; |
||||
|
//项目总数
|
||||
|
private Integer projectTotal = 0; |
||||
|
//处理中项目数
|
||||
|
private Integer pendingTotal = 0; |
||||
|
//处理中项目占比
|
||||
|
private String pendingRatio = "0%"; |
||||
|
//已结案中项目数
|
||||
|
private Integer closedTotal = 0; |
||||
|
//已结案中项目占比
|
||||
|
private String closedRatio = "0%"; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,93 @@ |
|||||
|
/** |
||||
|
* 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.govissue; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 议题项目分类字典 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-12-08 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IssueProjectCategoryDictDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户id, 产品默认default |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 上级分类ID 顶级此列存储0 |
||||
|
*/ |
||||
|
private String pid; |
||||
|
|
||||
|
/** |
||||
|
* 所有上级分类ID,用逗号分开 |
||||
|
*/ |
||||
|
private String pids; |
||||
|
|
||||
|
/** |
||||
|
* 上级分类编码 |
||||
|
*/ |
||||
|
private String parentCategoryCode; |
||||
|
|
||||
|
/** |
||||
|
* 分类编码,分类编码+customer_id唯一 |
||||
|
*/ |
||||
|
private String categoryCode; |
||||
|
|
||||
|
/** |
||||
|
* 分类名称 |
||||
|
*/ |
||||
|
private String categoryName; |
||||
|
|
||||
|
/** |
||||
|
* 分类类别1,2,3,4.... |
||||
|
*/ |
||||
|
private String categoryType; |
||||
|
|
||||
|
/** |
||||
|
* 排序 |
||||
|
*/ |
||||
|
private Integer sort; |
||||
|
|
||||
|
/** |
||||
|
* 是否禁用(enable:启用 disable:禁用) |
||||
|
*/ |
||||
|
private String isDisable; |
||||
|
|
||||
|
/** |
||||
|
* 颜色 |
||||
|
*/ |
||||
|
private String color; |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,45 @@ |
|||||
|
/** |
||||
|
* 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.govproject; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* 居民报事表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2021-08-03 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ResiEventDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
private String projectId; |
||||
|
|
||||
|
private String reportUserId; |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,45 @@ |
|||||
|
package com.epmet.dataaggre.dto.govproject.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import javax.validation.constraints.Min; |
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Description 赋能平台【项目分类分析】-接口入参 |
||||
|
* @Auth sun |
||||
|
*/ |
||||
|
@NoArgsConstructor |
||||
|
@Data |
||||
|
public class CategoryProjectFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -8515172319313536407L; |
||||
|
//组织Id
|
||||
|
@NotBlank(message = "组织ID不能为空", groups = {Category.class}) |
||||
|
private String agencyId; |
||||
|
//日期yyyymmdd
|
||||
|
@NotBlank(message = "组织ID不能为空", groups = {Category.class}) |
||||
|
private String dateId; |
||||
|
//一级分类Id
|
||||
|
@NotBlank(message = "分类Code不能为空", groups = {Category.class}) |
||||
|
private String categoryCode; |
||||
|
//页码
|
||||
|
@Min(1) |
||||
|
private Integer pageNo = 1; |
||||
|
//每页多少条
|
||||
|
private Integer pageSize = 20; |
||||
|
//是否分页(是:true 否:false)
|
||||
|
private Boolean isPage = true; |
||||
|
//明天的dateId值
|
||||
|
private String toDateId; |
||||
|
private String customerId; |
||||
|
private List<String> categoreCodeList; |
||||
|
|
||||
|
|
||||
|
public interface Category extends CustomerClientShowGroup { |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,36 @@ |
|||||
|
package com.epmet.dataaggre.dto.govproject.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import javax.validation.constraints.Min; |
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import java.io.Serializable; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Description 赋能平台【项目分类分析】-接口入参 |
||||
|
* @Auth sun |
||||
|
*/ |
||||
|
@NoArgsConstructor |
||||
|
@Data |
||||
|
public class ProjectAnalysisFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -8515172319313536407L; |
||||
|
//小程序话题或事件发起人Id
|
||||
|
@NotBlank(message = "话题或事件发起人Id不能为空", groups = {Analysis.class}) |
||||
|
private String userId; |
||||
|
//一级分类Id集合
|
||||
|
@NotNull(message = "分类Code集合不能为空", groups = {Analysis.class}) |
||||
|
private List<String> categoryCodeList; |
||||
|
//当前查看的项目Id
|
||||
|
@NotBlank(message = "当前查看项目Id不能为空", groups = {Analysis.class}) |
||||
|
private String projectId; |
||||
|
|
||||
|
private String customerId; |
||||
|
|
||||
|
public interface Analysis extends CustomerClientShowGroup { |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,32 @@ |
|||||
|
package com.epmet.dataaggre.dto.govproject.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import javax.validation.constraints.Min; |
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Description 赋能平台【项目分类分析】-接口入参 |
||||
|
* @Auth sun |
||||
|
*/ |
||||
|
@NoArgsConstructor |
||||
|
@Data |
||||
|
public class ProjectCategoryTotalFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -8515172319313536407L; |
||||
|
//组织Id
|
||||
|
@NotBlank(message = "组织ID不能为空", groups = {Project.class}) |
||||
|
private String agencyId; |
||||
|
//日期yyyymmdd
|
||||
|
@NotBlank(message = "日维度ID不能为空", groups = {Project.class}) |
||||
|
private String dateId; |
||||
|
|
||||
|
private String customerId; |
||||
|
|
||||
|
public interface Project extends CustomerClientShowGroup { |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,57 @@ |
|||||
|
package com.epmet.dataaggre.dto.govproject.result; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonIgnore; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Description 赋能平台【项目处理分析】分类下项目列表-接口返参 |
||||
|
* @Auth sun |
||||
|
*/ |
||||
|
@Data |
||||
|
public class CategoryProjectResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 6188316867855643263L; |
||||
|
|
||||
|
//总条数
|
||||
|
private Integer total = 0; |
||||
|
|
||||
|
private List<Project> list; |
||||
|
|
||||
|
@Data |
||||
|
public static class Project { |
||||
|
//项目所属组织Id
|
||||
|
private String agencyId; |
||||
|
//项目Id
|
||||
|
private String projectId; |
||||
|
//项目编码[目前没这个功能 默认为空]
|
||||
|
private String projectCode = ""; |
||||
|
//一级分类Code集合
|
||||
|
private List<String> categoryCodes = new ArrayList<>(); |
||||
|
//一级分类名称集合
|
||||
|
private List<String> categoryNames = new ArrayList<>(); |
||||
|
//来源:议题issue 项目立项:agency 事件:resi_event【控制电机查看时里边三个按钮的显示】
|
||||
|
private String origin; |
||||
|
//网格Id[上报给组织的事件、直接立项的项目此值为空]
|
||||
|
private String gridId = ""; |
||||
|
//网格名[上报给组织的事件、直接立项的项目此值为空]
|
||||
|
private String gridName = ""; |
||||
|
//状态:待处理 pending,已结案closed
|
||||
|
private String status; |
||||
|
//标题
|
||||
|
private String title; |
||||
|
//转项目时间
|
||||
|
private String time; |
||||
|
//小程序居民端话题或事件创建人【立项项目此值为空】
|
||||
|
private String userId = ""; |
||||
|
//分类对应的所有上级,英文逗号隔开【目前分类只有两级,所以这个字段值其实就是一类的id值】
|
||||
|
@JsonIgnore |
||||
|
private String categoryPids; |
||||
|
//二级分类code
|
||||
|
@JsonIgnore |
||||
|
private String categoryCode; |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,12 @@ |
|||||
|
package com.epmet.dataaggre.dto.govproject.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
@Data |
||||
|
public class IssueProjectCategory implements Serializable { |
||||
|
private static final long serialVersionUID = -2226298165882293959L; |
||||
|
private String issueId; |
||||
|
private String projectId; |
||||
|
} |
||||
@ -0,0 +1,63 @@ |
|||||
|
package com.epmet.dataaggre.dto.govproject.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Description 赋能平台【项目处理分析】研判分析-接口返参 |
||||
|
* @Auth sun |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ProjectAnalysisResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 6188316867855643263L; |
||||
|
|
||||
|
//小程序居民Id
|
||||
|
private String userId; |
||||
|
//负能平台居民Id
|
||||
|
private String icUserId; |
||||
|
//负能平台居民名称
|
||||
|
private String icUserName; |
||||
|
//家庭里人员集合
|
||||
|
private List<Home> homeUserList = new ArrayList<>(); |
||||
|
//楼院小组下分类项目列表
|
||||
|
private List<Category> groupProjectList = new ArrayList<>(); |
||||
|
//事件上报下分类项目列表
|
||||
|
private List<Category> eventProjectList = new ArrayList<>(); |
||||
|
|
||||
|
@Data |
||||
|
public static class Home { |
||||
|
//家庭Id
|
||||
|
private String homeId; |
||||
|
//居民Id
|
||||
|
private String icUserId; |
||||
|
//居民姓名
|
||||
|
private String icUserName; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
public static class Category { |
||||
|
//一级分类Id
|
||||
|
private String categoryCode; |
||||
|
//一级分类名称
|
||||
|
private String categoryName; |
||||
|
//分类下项目列表【创建时间倒序】
|
||||
|
private List<Project> projectList = new ArrayList<>(); |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
public static class Project { |
||||
|
//项目Id
|
||||
|
private String projectId; |
||||
|
//项目标题
|
||||
|
private String title; |
||||
|
//状态:待处理 pending,结案closed
|
||||
|
private String status; |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,33 @@ |
|||||
|
package com.epmet.dataaggre.dto.govproject.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @author sun |
||||
|
* @dscription |
||||
|
*/ |
||||
|
@NoArgsConstructor |
||||
|
@Data |
||||
|
public class ProjectCategoryResultDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 3217246702883400582L; |
||||
|
/** |
||||
|
* 项目ID |
||||
|
*/ |
||||
|
private String projectId; |
||||
|
/** |
||||
|
* 项目标题 |
||||
|
*/ |
||||
|
private String title; |
||||
|
/** |
||||
|
* 项目状态 |
||||
|
*/ |
||||
|
private String status; |
||||
|
/** |
||||
|
* 二级分类Code |
||||
|
*/ |
||||
|
private String categoryCode; |
||||
|
} |
||||
@ -0,0 +1,26 @@ |
|||||
|
package com.epmet.dataaggre.dto.govproject.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description 赋能平台【项目分类分析】各分类项目数图表-接口返参 |
||||
|
* @Auth sun |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ProjectCategoryTotalResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 6188316867855643263L; |
||||
|
|
||||
|
//组织Id
|
||||
|
private String agencyId; |
||||
|
//一级分类Code
|
||||
|
private String categoryCode; |
||||
|
//一级分类名称
|
||||
|
private String categoryName; |
||||
|
//一级分类颜色
|
||||
|
private String color = ""; |
||||
|
//分类下项目总数
|
||||
|
private Integer total = 0; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,19 @@ |
|||||
|
package com.epmet.dataaggre.dto.resigroup.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import java.io.Serializable; |
||||
|
import java.util.List; |
||||
|
|
||||
|
@Data |
||||
|
public class UserTopicPageFormDTO implements Serializable { |
||||
|
public interface AddUserInternalGroup { |
||||
|
} |
||||
|
//@NotBlank(message = "epmetUserId不能为空" , groups = AddUserInternalGroup.class)
|
||||
|
private List<String> epmetUserIdList; |
||||
|
@NotNull(message = "pageNo不能为空",groups = AddUserInternalGroup.class) |
||||
|
private Integer pageNo; |
||||
|
@NotNull(message = "pageSize不能为空",groups = AddUserInternalGroup.class) |
||||
|
private Integer pageSize; |
||||
|
} |
||||
@ -0,0 +1,22 @@ |
|||||
|
package com.epmet.dataaggre.dto.resigroup.result; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 个人分析,发布话题分页列表 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class UserTopicResDTO implements Serializable { |
||||
|
private String topicId; |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
||||
|
private Date releaseTime; |
||||
|
private String topicContent; |
||||
|
private Boolean shiftIssue; |
||||
|
private String issueId; |
||||
|
private Boolean shiftProject=false; |
||||
|
private String projectId=""; |
||||
|
} |
||||
@ -0,0 +1,49 @@ |
|||||
|
/** |
||||
|
* 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.dao.epmetuser; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.dataaggre.dto.govproject.result.ProjectAnalysisResultDTO; |
||||
|
import com.epmet.dataaggre.entity.epmetuser.IcResiUserEntity; |
||||
|
import com.epmet.dto.IcResiUserDTO; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 用户基础信息 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2021-10-26 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface IcResiUserDao extends BaseDao<IcResiUserEntity> { |
||||
|
|
||||
|
/** |
||||
|
* @Description 根据身份证号查询负能平台用户信息 |
||||
|
* @author sun |
||||
|
*/ |
||||
|
IcResiUserDTO getIcResiUser(@Param("idCard") String idCard, @Param("customerId") String customerId); |
||||
|
|
||||
|
/** |
||||
|
* @Description 查询人员的家庭成员数据 |
||||
|
* @author sun |
||||
|
*/ |
||||
|
List<ProjectAnalysisResultDTO.Home> getHomeUserList(@Param("homeId") String homeId, @Param("icUserId") String icUserId); |
||||
|
} |
||||
@ -0,0 +1,493 @@ |
|||||
|
/** |
||||
|
* 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.entity.epmetuser; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
/** |
||||
|
* 用户基础信息 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2021-10-26 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("ic_resi_user") |
||||
|
public class IcResiUserEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户Id customer.id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private String agencyId; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private String pids; |
||||
|
|
||||
|
/** |
||||
|
* 网格ID |
||||
|
*/ |
||||
|
private String gridId; |
||||
|
|
||||
|
/** |
||||
|
* 所属小区ID |
||||
|
*/ |
||||
|
private String villageId; |
||||
|
|
||||
|
/** |
||||
|
* 所属楼宇Id |
||||
|
*/ |
||||
|
private String buildId; |
||||
|
|
||||
|
/** |
||||
|
* 单元id |
||||
|
*/ |
||||
|
private String unitId; |
||||
|
|
||||
|
/** |
||||
|
* 所属家庭Id |
||||
|
*/ |
||||
|
private String homeId; |
||||
|
|
||||
|
/** |
||||
|
* 是否本地户籍 |
||||
|
*/ |
||||
|
private String isBdhj; |
||||
|
|
||||
|
/** |
||||
|
* 姓名 |
||||
|
*/ |
||||
|
private String name; |
||||
|
|
||||
|
/** |
||||
|
* 手机号 |
||||
|
*/ |
||||
|
private String mobile; |
||||
|
|
||||
|
/** |
||||
|
* 性别 |
||||
|
*/ |
||||
|
private String gender; |
||||
|
|
||||
|
/** |
||||
|
* 身份证号 |
||||
|
*/ |
||||
|
private String idCard; |
||||
|
|
||||
|
/** |
||||
|
* 出生日期 |
||||
|
*/ |
||||
|
private String birthday; |
||||
|
|
||||
|
/** |
||||
|
* 备注 |
||||
|
*/ |
||||
|
private String remarks; |
||||
|
|
||||
|
/** |
||||
|
* 联系人 |
||||
|
*/ |
||||
|
private String contacts; |
||||
|
|
||||
|
/** |
||||
|
* 联系人电话 |
||||
|
*/ |
||||
|
private String contactsMobile; |
||||
|
|
||||
|
/** |
||||
|
* 九小场所url |
||||
|
*/ |
||||
|
private String ninePlace; |
||||
|
|
||||
|
/** |
||||
|
* 是否党员 |
||||
|
*/ |
||||
|
private String isParty; |
||||
|
|
||||
|
/** |
||||
|
* 是否低保户 |
||||
|
*/ |
||||
|
private String isDbh; |
||||
|
|
||||
|
/** |
||||
|
* 是否保障房 |
||||
|
*/ |
||||
|
private String isEnsureHouse; |
||||
|
|
||||
|
/** |
||||
|
* 是否失业 |
||||
|
*/ |
||||
|
private String isUnemployed; |
||||
|
|
||||
|
/** |
||||
|
* 是否育龄妇女 |
||||
|
*/ |
||||
|
private String isYlfn; |
||||
|
|
||||
|
/** |
||||
|
* 是否退役军人 |
||||
|
*/ |
||||
|
private String isVeterans; |
||||
|
|
||||
|
/** |
||||
|
* 是否统战人员 |
||||
|
*/ |
||||
|
private String isUnitedFront; |
||||
|
|
||||
|
/** |
||||
|
* 是否信访人员 |
||||
|
*/ |
||||
|
private String isXfry; |
||||
|
|
||||
|
/** |
||||
|
* 是否志愿者 |
||||
|
*/ |
||||
|
private String isVolunteer; |
||||
|
|
||||
|
/** |
||||
|
* 是否老年人 |
||||
|
*/ |
||||
|
private String isOldPeople; |
||||
|
|
||||
|
/** |
||||
|
* 是否空巢 |
||||
|
*/ |
||||
|
private String isKc; |
||||
|
|
||||
|
/** |
||||
|
* 是否失独 |
||||
|
*/ |
||||
|
private String isSd; |
||||
|
|
||||
|
/** |
||||
|
* 是否失能 |
||||
|
*/ |
||||
|
private String isSn; |
||||
|
|
||||
|
/** |
||||
|
* 是否失智 |
||||
|
*/ |
||||
|
private String isSz; |
||||
|
|
||||
|
/** |
||||
|
* 是否残疾 |
||||
|
*/ |
||||
|
private String isCj; |
||||
|
|
||||
|
/** |
||||
|
* 是否大病 |
||||
|
*/ |
||||
|
private String isDb; |
||||
|
|
||||
|
/** |
||||
|
* 是否慢病 |
||||
|
*/ |
||||
|
private String isMb; |
||||
|
|
||||
|
/** |
||||
|
* 是否特殊人群 |
||||
|
*/ |
||||
|
private String isSpecial; |
||||
|
|
||||
|
/** |
||||
|
* 文化程度【字典表】 |
||||
|
*/ |
||||
|
private String culture; |
||||
|
|
||||
|
/** |
||||
|
* 文化程度备注 |
||||
|
*/ |
||||
|
private String cultureRemakes; |
||||
|
|
||||
|
/** |
||||
|
* 特长【字典表】 |
||||
|
*/ |
||||
|
private String specialSkill; |
||||
|
|
||||
|
/** |
||||
|
* 兴趣爱好 |
||||
|
*/ |
||||
|
private String hobby; |
||||
|
|
||||
|
/** |
||||
|
* 兴趣爱好备注 |
||||
|
*/ |
||||
|
private String hobbyRemakes; |
||||
|
|
||||
|
/** |
||||
|
* 宗教信仰 |
||||
|
*/ |
||||
|
private String faith; |
||||
|
|
||||
|
/** |
||||
|
* 宗教信仰备注 |
||||
|
*/ |
||||
|
private String faithRemakes; |
||||
|
|
||||
|
/** |
||||
|
* 残疾类别【字典表】 |
||||
|
*/ |
||||
|
private String cjlb; |
||||
|
|
||||
|
/** |
||||
|
* 残疾登记(状况)【字典表】 |
||||
|
*/ |
||||
|
private String cjzk; |
||||
|
|
||||
|
/** |
||||
|
* 残疾证号 |
||||
|
*/ |
||||
|
private String cjzh; |
||||
|
|
||||
|
/** |
||||
|
* 残疾说明 |
||||
|
*/ |
||||
|
private String cjsm; |
||||
|
|
||||
|
/** |
||||
|
* 有无监护人【yes no】 |
||||
|
*/ |
||||
|
private String ynJdr; |
||||
|
|
||||
|
/** |
||||
|
* 有无技能特长【yes no】 |
||||
|
*/ |
||||
|
private String ynJntc; |
||||
|
|
||||
|
/** |
||||
|
* 有无劳动能力 |
||||
|
*/ |
||||
|
private String ynLdnl; |
||||
|
|
||||
|
/** |
||||
|
* 有无非义务教育阶段助学【yes no】 |
||||
|
*/ |
||||
|
private String ynFywjyjdzx; |
||||
|
|
||||
|
/** |
||||
|
* 所患大病 |
||||
|
*/ |
||||
|
private String shdb; |
||||
|
|
||||
|
/** |
||||
|
* 患大病时间 |
||||
|
*/ |
||||
|
private String dbsj; |
||||
|
|
||||
|
/** |
||||
|
* 所患慢性病 |
||||
|
*/ |
||||
|
private String shmxb; |
||||
|
|
||||
|
/** |
||||
|
* 患慢性病时间 |
||||
|
*/ |
||||
|
private String mxbsj; |
||||
|
|
||||
|
/** |
||||
|
* 是否参保 |
||||
|
*/ |
||||
|
private String isCb; |
||||
|
|
||||
|
/** |
||||
|
* 自付金额 |
||||
|
*/ |
||||
|
private String zfje; |
||||
|
|
||||
|
/** |
||||
|
* 救助金额 |
||||
|
*/ |
||||
|
private String jzje; |
||||
|
|
||||
|
/** |
||||
|
* 救助时间[yyyy-MM-dd] |
||||
|
*/ |
||||
|
private String jzsj; |
||||
|
|
||||
|
/** |
||||
|
* 享受救助明细序号 |
||||
|
*/ |
||||
|
private String jzmxxh; |
||||
|
|
||||
|
/** |
||||
|
* 健康信息备注 |
||||
|
*/ |
||||
|
private String healthRemakes; |
||||
|
|
||||
|
/** |
||||
|
* 工作单位 |
||||
|
*/ |
||||
|
private String gzdw; |
||||
|
|
||||
|
/** |
||||
|
* 职业 |
||||
|
*/ |
||||
|
private String zy; |
||||
|
|
||||
|
/** |
||||
|
* 离退休时间 |
||||
|
*/ |
||||
|
private String ltxsj; |
||||
|
|
||||
|
/** |
||||
|
* 工作信息备注 |
||||
|
*/ |
||||
|
private String workRemake; |
||||
|
|
||||
|
/** |
||||
|
* 退休金额 |
||||
|
*/ |
||||
|
private String txje; |
||||
|
|
||||
|
/** |
||||
|
* 月收入 |
||||
|
*/ |
||||
|
private String ysr; |
||||
|
|
||||
|
/** |
||||
|
* 籍贯 |
||||
|
*/ |
||||
|
private String jg; |
||||
|
|
||||
|
/** |
||||
|
* 户籍所在地 |
||||
|
*/ |
||||
|
private String hjszd; |
||||
|
|
||||
|
/** |
||||
|
* 现居住地 |
||||
|
*/ |
||||
|
private String xjzd; |
||||
|
|
||||
|
/** |
||||
|
* 人户情况 |
||||
|
*/ |
||||
|
private String rhzk; |
||||
|
|
||||
|
/** |
||||
|
* 居住信息备注 |
||||
|
*/ |
||||
|
private String jzxxRemakes; |
||||
|
|
||||
|
/** |
||||
|
* 民族【字典表】 |
||||
|
*/ |
||||
|
private String mz; |
||||
|
|
||||
|
/** |
||||
|
* 与户主关系【字典表】 |
||||
|
*/ |
||||
|
private String yhzgx; |
||||
|
|
||||
|
/** |
||||
|
* 居住情况【字典表】 |
||||
|
*/ |
||||
|
private String jzqk; |
||||
|
|
||||
|
/** |
||||
|
* 婚姻状况【字典表】 |
||||
|
*/ |
||||
|
private String hyzk; |
||||
|
|
||||
|
/** |
||||
|
* 配偶情况【字典表】 |
||||
|
*/ |
||||
|
private String poqk; |
||||
|
|
||||
|
/** |
||||
|
* 有无赡养人 |
||||
|
*/ |
||||
|
private String ynSyr; |
||||
|
|
||||
|
/** |
||||
|
* 与赡养人关系【字典表】 |
||||
|
*/ |
||||
|
private String ysyrgx; |
||||
|
|
||||
|
/** |
||||
|
* 赡养人电话 |
||||
|
*/ |
||||
|
private String syrMobile; |
||||
|
|
||||
|
/** |
||||
|
* 家庭信息备注 |
||||
|
*/ |
||||
|
private String jtxxRemakes; |
||||
|
|
||||
|
/** |
||||
|
* 预留字段1 |
||||
|
*/ |
||||
|
private String field1; |
||||
|
|
||||
|
/** |
||||
|
* 预留字段2 |
||||
|
*/ |
||||
|
private String field2; |
||||
|
|
||||
|
/** |
||||
|
* 预留字段3 |
||||
|
*/ |
||||
|
private String field3; |
||||
|
|
||||
|
/** |
||||
|
* 预留字段4 |
||||
|
*/ |
||||
|
private String field4; |
||||
|
|
||||
|
/** |
||||
|
* 预留字段5 |
||||
|
*/ |
||||
|
private String field5; |
||||
|
|
||||
|
/** |
||||
|
* 预留字段6 |
||||
|
*/ |
||||
|
private String field6; |
||||
|
|
||||
|
/** |
||||
|
* 预留字段7 |
||||
|
*/ |
||||
|
private String field7; |
||||
|
|
||||
|
/** |
||||
|
* 预留字段8 |
||||
|
*/ |
||||
|
private String field8; |
||||
|
|
||||
|
/** |
||||
|
* 预留字段9 |
||||
|
*/ |
||||
|
private String field9; |
||||
|
|
||||
|
/** |
||||
|
* 预留字段10 |
||||
|
*/ |
||||
|
private String field10; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,39 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
|
||||
|
<mapper namespace="com.epmet.dataaggre.dao.epmetuser.IcResiUserDao"> |
||||
|
|
||||
|
<select id="getIcResiUser" resultType="com.epmet.dto.IcResiUserDTO"> |
||||
|
SELECT |
||||
|
id, |
||||
|
customer_id, |
||||
|
agency_id, |
||||
|
grid_id, |
||||
|
home_id, |
||||
|
name, |
||||
|
mobile, |
||||
|
gender, |
||||
|
id_card, |
||||
|
birthday |
||||
|
FROM |
||||
|
ic_resi_user |
||||
|
WHERE |
||||
|
del_flag = '0' |
||||
|
AND customer_id = #{customerId} |
||||
|
AND id_card = #{idCard} |
||||
|
</select> |
||||
|
|
||||
|
<select id="getHomeUserList" resultType="com.epmet.dataaggre.dto.govproject.result.ProjectAnalysisResultDTO$Home"> |
||||
|
SELECT |
||||
|
id icUserId, |
||||
|
home_id homeId, |
||||
|
name icUserName |
||||
|
FROM |
||||
|
ic_resi_user |
||||
|
WHERE |
||||
|
del_flag = '0' |
||||
|
AND home_id = #{homeId} |
||||
|
ORDER BY id = #{icUserId} desc <!-- 指定某个人排在第一位 --> |
||||
|
</select> |
||||
|
|
||||
|
</mapper> |
||||
@ -0,0 +1,41 @@ |
|||||
|
package com.epmet.dto.result.heart; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @Description 描述 |
||||
|
* @Author wangxianzhang |
||||
|
* @Date 2021/12/10 4:24 下午 |
||||
|
* @Version 1.0 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class VolunteerDemandServiceStatsResultDTO { |
||||
|
|
||||
|
private String customerId; |
||||
|
private String dateId; |
||||
|
/** |
||||
|
* 客户下志愿者总数 |
||||
|
*/ |
||||
|
private Integer volunteerTotal; |
||||
|
/** |
||||
|
* 客户下志愿者中,党员数量 |
||||
|
*/ |
||||
|
private Integer partyTotal; |
||||
|
/** |
||||
|
* 客户下志愿者中,居民数量 |
||||
|
*/ |
||||
|
private Integer resiTotal; |
||||
|
/** |
||||
|
* 客户下志愿者服务总次数 |
||||
|
*/ |
||||
|
private Integer serviceTotal; |
||||
|
/** |
||||
|
* 客户下党员志愿者服务次数 |
||||
|
*/ |
||||
|
private Integer partyServiceTotal; |
||||
|
/** |
||||
|
* 客户下居民志愿者服务次数 |
||||
|
*/ |
||||
|
private Integer resiServiceTotal; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,38 @@ |
|||||
|
package com.epmet.datareport.controller.heart; |
||||
|
|
||||
|
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.datareport.service.heart.DemandService; |
||||
|
import com.epmet.dto.result.heart.VolunteerDemandServiceStatsResultDTO; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
/** |
||||
|
* @Description 描述 |
||||
|
* @Author wangxianzhang |
||||
|
* @Date 2021/12/10 3:55 下午 |
||||
|
* @Version 1.0 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("heart/demand") |
||||
|
public class DataReportHeartDemandController { |
||||
|
|
||||
|
@Autowired |
||||
|
private DemandService demandService; |
||||
|
|
||||
|
/** |
||||
|
* 查询志愿者需求服务统计信息 |
||||
|
* @param loginUser |
||||
|
* @return |
||||
|
*/ |
||||
|
@PostMapping("volunteer/service") |
||||
|
public Result<VolunteerDemandServiceStatsResultDTO> getVolunteerServiceStats(@LoginUser TokenDto loginUser) { |
||||
|
String customerId = loginUser.getCustomerId(); |
||||
|
VolunteerDemandServiceStatsResultDTO r = demandService.getVolunteerServiceStats(customerId); |
||||
|
return new Result<VolunteerDemandServiceStatsResultDTO>().ok(r); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,43 @@ |
|||||
|
/** |
||||
|
* 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.datareport.dao.fact; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.datareport.entity.heart.FactVolunteerServiceDailyEntity; |
||||
|
import com.epmet.dto.result.heart.VolunteerDemandServiceStatsResultDTO; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 志愿者服务情况统计 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2021-12-08 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface FactVolunteerServiceDailyDao extends BaseDao<FactVolunteerServiceDailyEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 查询最新一条"志愿者需求服务统计信息" |
||||
|
* @param customerId |
||||
|
* @return |
||||
|
*/ |
||||
|
VolunteerDemandServiceStatsResultDTO getLatestVolunteerDemandServiceStats(@Param("customerId") String customerId); |
||||
|
} |
||||
@ -0,0 +1,83 @@ |
|||||
|
/** |
||||
|
* 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.datareport.entity.heart; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
/** |
||||
|
* 志愿者服务情况统计 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2021-12-08 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("fact_volunteer_service_daily") |
||||
|
public class FactVolunteerServiceDailyEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* yyyyMMdd |
||||
|
*/ |
||||
|
private String dateId; |
||||
|
|
||||
|
/** |
||||
|
* yyyyMM |
||||
|
*/ |
||||
|
private String monthId; |
||||
|
|
||||
|
/** |
||||
|
* 截止到当前dateId,当前客户下,共有多少个爱心互助的志愿者 |
||||
|
*/ |
||||
|
private Integer volunteerTotal; |
||||
|
|
||||
|
/** |
||||
|
* 截止到当前dateId,当前客户下,XX个爱心互助志愿者中,党员有多少个 |
||||
|
*/ |
||||
|
private Integer partyTotal; |
||||
|
|
||||
|
/** |
||||
|
* 截止到当前dateId,当前客户下,XX个爱心互助志愿者中,居民有多少个 |
||||
|
*/ |
||||
|
private Integer resiTotal; |
||||
|
|
||||
|
/** |
||||
|
* 服务总次数 |
||||
|
*/ |
||||
|
private Integer serviceTotal; |
||||
|
|
||||
|
/** |
||||
|
* 党员服务总次数 |
||||
|
*/ |
||||
|
private Integer partyServiceTotal; |
||||
|
|
||||
|
/** |
||||
|
* 居民服务总次数 |
||||
|
*/ |
||||
|
private Integer resiServiceTotal; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,13 @@ |
|||||
|
package com.epmet.datareport.service.heart; |
||||
|
|
||||
|
import com.epmet.dto.result.heart.VolunteerDemandServiceStatsResultDTO; |
||||
|
|
||||
|
/** |
||||
|
* @Description 需求服务 |
||||
|
* @Author wangxianzhang |
||||
|
* @Date 2021/12/10 4:18 下午 |
||||
|
* @Version 1.0 |
||||
|
*/ |
||||
|
public interface DemandService { |
||||
|
VolunteerDemandServiceStatsResultDTO getVolunteerServiceStats(String customerId); |
||||
|
} |
||||
@ -0,0 +1,29 @@ |
|||||
|
package com.epmet.datareport.service.heart.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
|
import com.epmet.commons.dynamic.datasource.annotation.DataSource; |
||||
|
import com.epmet.constant.DataSourceConstant; |
||||
|
import com.epmet.datareport.dao.fact.FactVolunteerServiceDailyDao; |
||||
|
import com.epmet.datareport.entity.heart.FactVolunteerServiceDailyEntity; |
||||
|
import com.epmet.datareport.service.heart.DemandService; |
||||
|
import com.epmet.dto.result.heart.VolunteerDemandServiceStatsResultDTO; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* @Description 需求服务 |
||||
|
* @Author wangxianzhang |
||||
|
* @Date 2021/12/10 4:20 下午 |
||||
|
* @Version 1.0 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class DemandServiceImpl implements DemandService { |
||||
|
|
||||
|
@Autowired |
||||
|
private FactVolunteerServiceDailyDao factVolunteerServiceDailyDao; |
||||
|
|
||||
|
@Override |
||||
|
public VolunteerDemandServiceStatsResultDTO getVolunteerServiceStats(String customerId) { |
||||
|
return factVolunteerServiceDailyDao.getLatestVolunteerDemandServiceStats(customerId); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,36 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
|
||||
|
<mapper namespace="com.epmet.datareport.dao.fact.FactVolunteerServiceDailyDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.datareport.entity.heart.FactVolunteerServiceDailyEntity" id="factVolunteerServiceDailyMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="customerId" column="CUSTOMER_ID"/> |
||||
|
<result property="dateId" column="DATE_ID"/> |
||||
|
<result property="monthId" column="MONTH_ID"/> |
||||
|
<result property="volunteerTotal" column="VOLUNTEER_TOTAL"/> |
||||
|
<result property="partyTotal" column="PARTY_TOTAL"/> |
||||
|
<result property="resiTotal" column="RESI_TOTAL"/> |
||||
|
<result property="serviceTotal" column="SERVICE_TOTAL"/> |
||||
|
<result property="partyServiceTotal" column="PARTY_SERVICE_TOTAL"/> |
||||
|
<result property="resiServiceTotal" column="RESI_SERVICE_TOTAL"/> |
||||
|
<result property="delFlag" column="DEL_FLAG"/> |
||||
|
<result property="revision" column="REVISION"/> |
||||
|
<result property="createdBy" column="CREATED_BY"/> |
||||
|
<result property="createdTime" column="CREATED_TIME"/> |
||||
|
<result property="updatedBy" column="UPDATED_BY"/> |
||||
|
<result property="updatedTime" column="UPDATED_TIME"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
<select id="getLatestVolunteerDemandServiceStats" |
||||
|
resultType="com.epmet.dto.result.heart.VolunteerDemandServiceStatsResultDTO"> |
||||
|
select * |
||||
|
from fact_volunteer_service_daily |
||||
|
where DEL_FLAG = 0 |
||||
|
and CUSTOMER_ID = #{customerId} |
||||
|
order by DATE_ID desc |
||||
|
limit 1 |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
</mapper> |
||||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue