30 changed files with 1141 additions and 50 deletions
@ -0,0 +1,34 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 工作端小程序-数据上面的 当前组织调用此接口 |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2021/6/24 15:26 |
|||
*/ |
|||
@Data |
|||
public class AgencyDetailMulticFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 6603177626712295270L; |
|||
/** |
|||
* 内部错误分组 |
|||
* */ |
|||
public interface AddUserInternalGroup{} |
|||
|
|||
/** |
|||
* 机关组织Id |
|||
*/ |
|||
@NotBlank(message = "机关组织ID不能为空" , groups = {AddUserInternalGroup.class}) |
|||
private String agencyId; |
|||
|
|||
|
|||
/** |
|||
* 当前登录用户所属的客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
} |
@ -0,0 +1,57 @@ |
|||
package com.epmet.dto.form.project; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import javax.validation.constraints.NotNull; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 群众不满列表查询入参DTO,从指标库取值 |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2021/6/24 10:55 |
|||
*/ |
|||
@Data |
|||
public class MassesDiscontentFormV2DTO implements Serializable { |
|||
public interface MassesDiscontentFormV2 { |
|||
} |
|||
|
|||
/** |
|||
* 时间区间,三个月:threeMonth;半年:sixMonth;一年:twelveMonth |
|||
* 一个月按照30天,三个月90天,半年180天,一年365天 |
|||
*/ |
|||
@NotBlank(message = "timeSection不能为空,取值:三个月:threeMonth;半年:sixMonth;一年:twelveMonth", groups = MassesDiscontentFormV2.class) |
|||
private String timeSection; |
|||
|
|||
/** |
|||
* asc:分数由低到高 |
|||
* desc:分数由高到低 |
|||
*/ |
|||
@NotBlank(message = "sortType不能为空,取值:asc:分数由低到高;desc:分数由高到低", groups = MassesDiscontentFormV2.class) |
|||
private String sortType; |
|||
|
|||
/** |
|||
* 组织ID |
|||
*/ |
|||
@NotBlank(message = "agencyId不能为空", groups = MassesDiscontentFormV2.class) |
|||
private String agencyId; |
|||
|
|||
@NotNull(message = "pageNo不能为空", groups = MassesDiscontentFormV2.class) |
|||
private Integer pageNo; |
|||
|
|||
@NotNull(message = "pageSize不能为空", groups = MassesDiscontentFormV2.class) |
|||
private Integer pageSize; |
|||
|
|||
/** |
|||
* 当前agency对应的区域编码,由前端传入,前端从/data/report/screen/agency/agencydetail这取值 |
|||
*/ |
|||
private String areaCode; |
|||
|
|||
|
|||
|
|||
|
|||
//以下属性无需前端传入
|
|||
private String startDate; |
|||
private String endDate; |
|||
} |
@ -0,0 +1,97 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 描述一下 |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2021/6/24 15:31 |
|||
*/ |
|||
@Data |
|||
public class AgencyDetailMulticResultDTO implements Serializable { |
|||
/** |
|||
* 机关组织Id |
|||
*/ |
|||
private String agencyId = ""; |
|||
|
|||
/** |
|||
* 组织名称 |
|||
*/ |
|||
private String agencyName = ""; |
|||
|
|||
/** |
|||
* 机关级别(社区级:community, |
|||
* 乡(镇、街道)级:street, |
|||
* 区县级: district, |
|||
* 市级: city |
|||
* 省级:province) 机关级别(社区级:community,乡(镇、街道)级:street,区县级: district,市级: city省级:province) |
|||
*/ |
|||
private String level = ""; |
|||
|
|||
/** |
|||
* 地区编码 |
|||
*/ |
|||
private String areaCode = ""; |
|||
|
|||
/** |
|||
* 【省份】名称 |
|||
*/ |
|||
private String province = ""; |
|||
|
|||
/** |
|||
* 【城市】名称 |
|||
*/ |
|||
private String city = ""; |
|||
|
|||
/** |
|||
* 【区县】名称 |
|||
*/ |
|||
private String district = ""; |
|||
|
|||
/** |
|||
* 本机关的所有上级机关 |
|||
*/ |
|||
private List<ParentListResultDTO> parentList; |
|||
|
|||
/** |
|||
* 街道 |
|||
*/ |
|||
private String street; |
|||
|
|||
/** |
|||
* 社区 |
|||
*/ |
|||
private String community; |
|||
|
|||
/** |
|||
* open: 选择地区编码必填;closed: 无需选择地区编码;;0409新增返参 |
|||
*/ |
|||
private String areaCodeSwitch; |
|||
|
|||
/** |
|||
* 组织区划的名称 |
|||
*/ |
|||
private String areaName; |
|||
|
|||
/** |
|||
* 当前组织对应客户根组织级别(社区级:community,乡(镇、街道)级:street,区县级: district,市级: city省级:province) |
|||
*/ |
|||
private String rootlevel; |
|||
|
|||
|
|||
//以下参数是06.24新增
|
|||
private String parentAreaCode; |
|||
/** |
|||
* 是否有字客户 |
|||
*/ |
|||
private Boolean haveSubCustomer; |
|||
|
|||
/** |
|||
* 子客户列表 |
|||
*/ |
|||
private List<String> subCustomerIds; |
|||
} |
@ -0,0 +1,46 @@ |
|||
/** |
|||
* 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.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
|
|||
/** |
|||
* 组织首页-获取组织机构信息接口-本机关的所有上级机关信息 |
|||
* |
|||
* @author sun |
|||
*/ |
|||
@Data |
|||
public class ParentListResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 机关组织Id |
|||
*/ |
|||
private String id = ""; |
|||
/** |
|||
* 机关组织名称 |
|||
*/ |
|||
private String name = ""; |
|||
|
|||
|
|||
} |
@ -0,0 +1,69 @@ |
|||
package com.epmet.dto.result.project; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 群众不满列表查询返参DTO,从指标库取值 |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2021/6/24 11:02 |
|||
*/ |
|||
@Data |
|||
public class MassesDiscontentResultV2DTO implements Serializable { |
|||
private static final long serialVersionUID = 403953150174574960L; |
|||
/** |
|||
* 项目ID |
|||
*/ |
|||
private String projectId; |
|||
|
|||
/** |
|||
* 议题ID |
|||
*/ |
|||
private String issueId; |
|||
|
|||
/** |
|||
* 话题所在网格 |
|||
*/ |
|||
private String gridName; |
|||
|
|||
/** |
|||
* 话题图片 |
|||
*/ |
|||
private List<String> photos; |
|||
|
|||
/** |
|||
* 话题内容 |
|||
*/ |
|||
private String topicContent; |
|||
|
|||
/** |
|||
* 项目分类标签 |
|||
*/ |
|||
private String projectCategory; |
|||
|
|||
/** |
|||
* 项目评价分数 |
|||
* 直接取整数位展示 |
|||
*/ |
|||
private BigDecimal score; |
|||
|
|||
@JsonIgnore |
|||
private String customerId; |
|||
@JsonIgnore |
|||
private String parentAgencyId; |
|||
@JsonIgnore |
|||
private String areaCode; |
|||
|
|||
public MassesDiscontentResultV2DTO() { |
|||
this.gridName = ""; |
|||
this.photos = new ArrayList<>(); |
|||
this.topicContent = ""; |
|||
this.projectCategory = ""; |
|||
} |
|||
} |
@ -0,0 +1,44 @@ |
|||
package com.epmet.dao.stats; |
|||
|
|||
import com.epmet.dto.basereport.form.AgencyRegUserFormDTO; |
|||
import com.epmet.dto.basereport.form.GridRegUserFormDTO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 部分基础数据上报 |
|||
*/ |
|||
@Mapper |
|||
public interface BaseReportDao { |
|||
|
|||
/** |
|||
* @Param formDTO |
|||
* @Description 根据dateId删除客户网格注册用户数据 |
|||
* @author sun |
|||
*/ |
|||
int delGridRegUser(@Param("customerId") String customerId, @Param("dateId") String dateId); |
|||
|
|||
/** |
|||
* @Param formDTO |
|||
* @Description 批量新增客户网格注册用户数据 |
|||
* @author sun |
|||
*/ |
|||
void insertBatchGridRegUser(@Param("list") List<GridRegUserFormDTO.DataList> dataList); |
|||
|
|||
/** |
|||
* @Param formDTO |
|||
* @Description 根据dateId删除客户组织注册用户数据 |
|||
* @author sun |
|||
*/ |
|||
int delAgencyRegUser(@Param("customerId") String customerId, @Param("dateId") String dateId); |
|||
|
|||
/** |
|||
* @Param formDTO |
|||
* @Description 批量新增客户组织注册用户数据 |
|||
* @author sun |
|||
*/ |
|||
void insertBatchAgencyRegUser(@Param("list") List<AgencyRegUserFormDTO.DataList> dataList); |
|||
} |
@ -1,10 +1,109 @@ |
|||
package com.epmet.service; |
|||
|
|||
|
|||
import com.epmet.dto.basereport.form.*; |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 部分基础数据上报 |
|||
*/ |
|||
public interface BaseReportService { |
|||
|
|||
/** |
|||
* @Param formDTO |
|||
* @Description 网格注册用户数据 |
|||
* @author sun |
|||
*/ |
|||
void gridRegUser(GridRegUserFormDTO formDTO); |
|||
|
|||
/** |
|||
* @Param formDTO |
|||
* @Description 组织机关注册用户数据 |
|||
* @author sun |
|||
*/ |
|||
void agencyRegUser(AgencyRegUserFormDTO formDTO); |
|||
|
|||
/** |
|||
* @Param formDTO |
|||
* @Description 网格群组总数 |
|||
* @author sun |
|||
*/ |
|||
void gridGroupTotal(GridGroupTotalFormDTO formDTO); |
|||
|
|||
/** |
|||
* @Param formDTO |
|||
* @Description 组织群组总数 |
|||
* @author sun |
|||
*/ |
|||
void agencyGroupTotal(AgencyGroupTotalFormDTO formDTO); |
|||
|
|||
/** |
|||
* @Param formDTO |
|||
* @Description 网格热议话题数据 |
|||
* @author sun |
|||
*/ |
|||
void gridHotTopic(GridHotTopicFormDTO formDTO); |
|||
|
|||
/** |
|||
* @Param formDTO |
|||
* @Description 组织热议话题数据 |
|||
* @author sun |
|||
*/ |
|||
void agencyHotTopic(AgencyHotTopicFormDTO formDTO); |
|||
|
|||
/** |
|||
* @Param formDTO |
|||
* @Description 网格状态话题数据 |
|||
* @author sun |
|||
*/ |
|||
void gridTopicStatus(GridTopicStatusFormDTO formDTO); |
|||
|
|||
/** |
|||
* @Param formDTO |
|||
* @Description 组织状态话题数据 |
|||
* @author sun |
|||
*/ |
|||
void agencyTopicStatus(AgencyTopicStatusFormDTO formDTO); |
|||
|
|||
/** |
|||
* @Param formDTO |
|||
* @Description 网格话题转议题数据 |
|||
* @author sun |
|||
*/ |
|||
void gridTopicIssue(GridTopicIssueFormDTO formDTO); |
|||
|
|||
/** |
|||
* @Param formDTO |
|||
* @Description 组织话题转议题数据 |
|||
* @author sun |
|||
*/ |
|||
void agencyTopicIssue(AgencyTopicIssueFormDTO formDTO); |
|||
|
|||
/** |
|||
* @Param formDTO |
|||
* @Description 网格议题数据 |
|||
* @author sun |
|||
*/ |
|||
void gridIssue(GridIssueFormDTO formDTO); |
|||
|
|||
/** |
|||
* @Param formDTO |
|||
* @Description 组织议题数据 |
|||
* @author sun |
|||
*/ |
|||
void agencyIssue(AgencyIssueFormDTO formDTO); |
|||
|
|||
/** |
|||
* @Param formDTO |
|||
* @Description 网格项目数据 |
|||
* @author sun |
|||
*/ |
|||
void gridProject(GridProjectFormDTO formDTO); |
|||
|
|||
/** |
|||
* @Param formDTO |
|||
* @Description 组织项目数据 |
|||
* @author sun |
|||
*/ |
|||
void agencyProject(AgencyProjectFormDTO formDTO); |
|||
} |
|||
|
@ -0,0 +1,136 @@ |
|||
<?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.dao.stats.BaseReportDao"> |
|||
<delete id="delGridRegUser"> |
|||
DELETE |
|||
FROM |
|||
fact_reg_user_grid_daily |
|||
WHERE |
|||
customer_id = #{customerId} |
|||
AND date_id = #{dateId} |
|||
LIMIT 1000 |
|||
</delete> |
|||
|
|||
<insert id="insertBatchGridRegUser"> |
|||
insert into fact_reg_user_grid_daily |
|||
( |
|||
id, |
|||
customer_id, |
|||
agency_id, |
|||
grid_id, |
|||
date_id, |
|||
week_id, |
|||
year_id, |
|||
reg_total, |
|||
resi_total, |
|||
warm_hearted_total, |
|||
partymember_total, |
|||
reg_incr, |
|||
warm_incr, |
|||
partymember_incr, |
|||
resi_proportion, |
|||
partymember_proportion, |
|||
warm_hearted_proportion, |
|||
del_flag, |
|||
revision, |
|||
created_by, |
|||
created_time, |
|||
updated_by, |
|||
updated_time |
|||
) values |
|||
<foreach collection="list" item="item" index="index" separator=","> |
|||
( |
|||
(SELECT REPLACE(UUID(), '-', '') AS id), |
|||
#{item.customerId}, |
|||
#{item.agencyId}, |
|||
#{item.gridId}, |
|||
#{item.dateId}, |
|||
#{item.weekId}, |
|||
#{item.yearId}, |
|||
#{item.regTotal}, |
|||
#{item.resiTotal}, |
|||
#{item.warmHeartedTotal}, |
|||
#{item.partymemberTotal}, |
|||
#{item.regIncr}, |
|||
#{item.warmIncr}, |
|||
#{item.partymemberIncr}, |
|||
#{item.resiProportion}, |
|||
#{item.partymemberProportion}, |
|||
#{item.warmHeartedProportion}, |
|||
0, |
|||
0, |
|||
'BASE_REPORT', |
|||
now(), |
|||
'BASE_REPORT', |
|||
now() |
|||
) |
|||
</foreach> |
|||
</insert> |
|||
|
|||
<delete id="delAgencyRegUser"> |
|||
DELETE |
|||
FROM |
|||
fact_reg_user_agency_daily |
|||
WHERE |
|||
customer_id = #{customerId} |
|||
AND date_id = #{dateId} |
|||
LIMIT 1000 |
|||
</delete> |
|||
|
|||
<insert id="insertBatchAgencyRegUser"> |
|||
insert into fact_reg_user_agency_daily |
|||
( |
|||
id, |
|||
customer_id, |
|||
agency_id, |
|||
date_id, |
|||
week_id, |
|||
year_id, |
|||
reg_total, |
|||
resi_total, |
|||
warm_hearted_total, |
|||
partymember_total, |
|||
reg_incr, |
|||
warm_incr, |
|||
partymember_incr, |
|||
resi_proportion, |
|||
partymember_proportion, |
|||
warm_hearted_proportion, |
|||
del_flag, |
|||
revision, |
|||
created_by, |
|||
created_time, |
|||
updated_by, |
|||
updated_time |
|||
) values |
|||
<foreach collection="list" item="item" index="index" separator=","> |
|||
( |
|||
(SELECT REPLACE(UUID(), '-', '') AS id), |
|||
#{item.customerId}, |
|||
#{item.agencyId}, |
|||
#{item.dateId}, |
|||
#{item.weekId}, |
|||
#{item.yearId}, |
|||
#{item.regTotal}, |
|||
#{item.resiTotal}, |
|||
#{item.warmHeartedTotal}, |
|||
#{item.partymemberTotal}, |
|||
#{item.regIncr}, |
|||
#{item.warmIncr}, |
|||
#{item.partymemberIncr}, |
|||
#{item.resiProportion}, |
|||
#{item.partymemberProportion}, |
|||
#{item.warmHeartedProportion}, |
|||
0, |
|||
0, |
|||
'BASE_REPORT', |
|||
now(), |
|||
'BASE_REPORT', |
|||
now() |
|||
) |
|||
</foreach> |
|||
</insert> |
|||
|
|||
|
|||
</mapper> |
Loading…
Reference in new issue