diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java index 92af86d3a9..0ac7dbf706 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java @@ -35,6 +35,10 @@ public interface NumConstant { int ONE_HUNDRED = 100; int ONE_THOUSAND = 1000; int MAX = 99999999; + int EIGHTY_EIGHT = 88; + + double ZERO_DOT_ZERO = 0.0; + long ZERO_L = 0L; long ONE_L = 1L; diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/UniqueIdGenerator.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/UniqueIdGenerator.java new file mode 100644 index 0000000000..fcefbdf2ca --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/UniqueIdGenerator.java @@ -0,0 +1,81 @@ +package com.epmet.commons.tools.utils; + + +import org.apache.commons.lang3.StringUtils; + +import java.util.Date; +import java.util.Random; +import java.util.concurrent.atomic.AtomicLong; + +/** + * 唯一ID生成器 + */ +public class UniqueIdGenerator { + + private static UniqueValue uniqueValue = new UniqueValue(); + private static String middle; + static { + String threadCode = StringUtils.right(String.valueOf(Math.abs(System.nanoTime()+"".hashCode())), 2); + middle = StringUtils.leftPad(threadCode, 2, "0"); + } + + /** + * 唯一时间值 + */ + private static class UniqueValue { + + private AtomicLong uniqueValue = new AtomicLong(0L); + private volatile String currentTime = DateUtils.format(new Date(), DateUtils.DATE_TIME_NO_SPLIT); + private volatile String lastTime = currentTime; + + /** + * 获取当前时间:yyyyMMddHHmmSS + * 如果到了下一秒,则唯一值从0开始 + * + * @return + */ + public String getCurrentTime() { + currentTime = DateUtils.format(new Date(), DateUtils.DATE_TIME_NO_SPLIT); + if (!currentTime.equals(lastTime)) { + lastTime = currentTime; + Random random = new Random(); + uniqueValue.set(Long.valueOf(random.nextInt(10))); + } + return currentTime; + } + + public String getCurrentValue() { + return StringUtils.leftPad(String.valueOf(uniqueValue.incrementAndGet()), 5, "0"); + } + } + + /** + * 生成一个24位唯一ID + * 15位时间+2位中间值(防止多服务冲突)+2个线程code+5位秒级递增值 + * + * @return + */ + public static String generate() { + StringBuilder builder = new StringBuilder(32); + builder.append(uniqueValue.getCurrentTime()) + .append(middle) + .append(getUniqueThreadCode()) + .append(uniqueValue.getCurrentValue()); + + return builder.toString(); + } + + public static String getUniqueThreadCode() { + String threadCode = StringUtils.left(String.valueOf(Thread.currentThread().hashCode()), 2); + return StringUtils.leftPad(threadCode, 2, "0"); + } + + public static void main(String[] args) throws InterruptedException { + + System.out.println(UniqueIdGenerator.uniqueValue.currentTime); + System.out.println(UniqueIdGenerator.middle); + System.out.println(UniqueIdGenerator.getUniqueThreadCode()); + System.out.println(uniqueValue.getCurrentValue()); + + } +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/constant/DataSourceConstant.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/constant/DataSourceConstant.java new file mode 100644 index 0000000000..b640b06b67 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/constant/DataSourceConstant.java @@ -0,0 +1,11 @@ +package com.epmet.constant; + +public interface DataSourceConstant { + + /** + * 统计数据库 + */ + String STATS = "stats"; + String STATS_DISPLAY = "statsDisplay"; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/constant/ScreenConstant.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/constant/ScreenConstant.java new file mode 100644 index 0000000000..b03dbe6466 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/constant/ScreenConstant.java @@ -0,0 +1,15 @@ +package com.epmet.screen.constant; + +/** + * @Author zxc + * @DateTime 2020/8/18 5:02 下午 + */ +public interface ScreenConstant { + + String COMMUNITY = "community"; + + String MONTH = "月"; + + String RATIO = "%"; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyAndNumFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyAndNumFormDTO.java new file mode 100644 index 0000000000..a20c10ce80 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyAndNumFormDTO.java @@ -0,0 +1,28 @@ +package com.epmet.screen.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description 通用的agencyId topNum入参 + * @ClassName AgencyAndNumFormDTO + * @Auth wangc + * @Date 2020-08-20 10:29 + */ +@Data +public class AgencyAndNumFormDTO implements Serializable { + private static final long serialVersionUID = -8674763412362557239L; + + /** + * 显示多少条 不在这里设置默认值 不同的接口使用的默认值不同 在逻辑中判断 + * */ + private Integer topNum; + + /** + * 机关Id + * */ + @NotBlank(message = "机关Id不能为空" , groups = AgencyFormDTO.CommonAgencyIdGroup.class) + private String agencyId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyFormDTO.java new file mode 100644 index 0000000000..a9e479e3a5 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.screen.dto.form; + + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description 通用 agencyId 入参 + ClassName AgencyFormDTO + * @Auth wangc + * @Date 2020-08-20 10:29 + */ +@Data +public class AgencyFormDTO implements Serializable { + private static final long serialVersionUID = -2880432640584616651L; + + public interface CommonAgencyIdGroup extends CustomerClientShowGroup{} + + @NotBlank(message = "机关Id不能为空" , groups = CommonAgencyIdGroup.class) + private String agencyId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyNumTypeParamFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyNumTypeParamFormDTO.java new file mode 100644 index 0000000000..04dfc0625e --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyNumTypeParamFormDTO.java @@ -0,0 +1,35 @@ +package com.epmet.screen.dto.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description 通用 agencyId topNum type(各种类型)传参dto + * @ClassName AgencyNumTypeParamFormDTO + * @Auth wangc + * @Date 2020-08-20 13:36 + */ +@Data +public class AgencyNumTypeParamFormDTO implements Serializable { + private static final long serialVersionUID = -8049013016922130410L; + + public interface AgencyNumTypeParamGroup extends CustomerClientShowGroup{} + + /** + * agencyId + * */ + @NotBlank(message = "机关Id不能为空", groups = AgencyNumTypeParamGroup.class) + private String agencyId; + + private Integer topNum; + + /** + * 各种类型 + * */ + @NotBlank(message = "类型不能为空", groups = AgencyNumTypeParamGroup.class) + private String type; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchBuildRankFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchBuildRankFormDTO.java new file mode 100644 index 0000000000..458f2e4af5 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchBuildRankFormDTO.java @@ -0,0 +1,43 @@ +package com.epmet.screen.dto.form; + +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description 4、支部建设情况|联建共建情况-排行 入参dto + * @NEI https://nei.netease.com/interface/detail/?pid=57068&id=321982 + * @ClassName BranchBuildRankFormDTO + * @Auth wangc + * @Date 2020-08-19 15:06 + */ +@Data +public class BranchBuildRankFormDTO implements Serializable { + private static final long serialVersionUID = -6580433475773171870L; + + public interface BranchBuildRankGroup extends CustomerClientShowGroup{} + + /** + * 机关Id + * */ + @NotBlank(message = "机关Id不能为空",groups = BranchBuildRankGroup.class) + private String agencyId; + + /** + * 支部建设情况:zbjs; 联建共建情况:ljgj;联建党员志愿服务情况:ljdyzy + * */ + @NotBlank(message = "类型key不能为空" , groups = BranchBuildRankGroup.class) + private String category; + + /** + * 默认显示前4,显示全部传入0 + * */ + private Integer topNum = NumConstant.FOUR; + + private String monthId; + + private String bottomMonthId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchBuildTrendFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchBuildTrendFormDTO.java new file mode 100644 index 0000000000..1d68458b20 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchBuildTrendFormDTO.java @@ -0,0 +1,39 @@ +package com.epmet.screen.dto.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description 3、支部建设情况|联建共建情况-折线图 入参DTO + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321981 + * @ClassName BranchBuildTrendFormDTO + * @Auth wangc + * @Date 2020-08-19 10:01 + */ +@Data +public class BranchBuildTrendFormDTO implements Serializable { + private static final long serialVersionUID = 2998463730542699247L; + + public interface branchBuildTrendGroup extends CustomerClientShowGroup{} + + /** + * 机关Id + * */ + @NotBlank(message = "agencyId不可为空" , groups = branchBuildTrendGroup.class) + private String agencyId; + + /** + * 组织次数:organize; 参加人数:joinuser; 平均参加人数:averagejoinuser + * */ + @NotBlank(message = "基层党建折线图类型不可为空" , groups = branchBuildTrendGroup.class) + private String type; + + /** + * 支部建设情况:zbjs; 联建共建情况:ljgj + * */ + @NotBlank(message = "基层党建情况不可为空" , groups = branchBuildTrendGroup.class) + private String category; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchFormDTO.java new file mode 100644 index 0000000000..89a7bc5eaa --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.screen.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/18 10:49 上午 + */ +@Data +public class BranchFormDTO implements Serializable { + + private static final long serialVersionUID = -8256381995441422191L; + + public interface Branch{} + + /** + * 机关ID + */ + @NotBlank(message = "机关ID不能为空",groups = {Branch.class}) + private String agencyId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/CompartmentFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/CompartmentFormDTO.java new file mode 100644 index 0000000000..3571ff7bb6 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/CompartmentFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.screen.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/18 2:14 下午 + */ +@Data +public class CompartmentFormDTO implements Serializable { + + private static final long serialVersionUID = -3354777434424878413L; + + public interface Compartment{} + + /** + * 机关ID + */ + @NotBlank(message = "机关ID不能为空",groups = {Compartment.class}) + private String agencyId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ContactMassLineChartFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ContactMassLineChartFormDTO.java new file mode 100644 index 0000000000..e82038de21 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ContactMassLineChartFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.screen.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/20 2:28 下午 + */ +@Data +public class ContactMassLineChartFormDTO implements Serializable { + + private static final long serialVersionUID = 5627978767044772204L; + + public interface ContactMassLineChart{} + + /** + * 机关ID + */ + @NotBlank(message = "机关ID不能为空",groups = {ContactMassLineChart.class}) + private String agencyId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/FineExampleFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/FineExampleFormDTO.java new file mode 100644 index 0000000000..1840c3048b --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/FineExampleFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.screen.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/20 1:46 下午 + */ +@Data +public class FineExampleFormDTO implements Serializable { + + private static final long serialVersionUID = -5402747414542735700L; + + public interface FineExample{} + + /** + * 机关ID + */ + @NotBlank(message = "机关ID不能为空",groups = {FineExample.class}) + private String agencyId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/MonthBarchartFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/MonthBarchartFormDTO.java new file mode 100644 index 0000000000..ad454ff8dc --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/MonthBarchartFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.screen.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/19 5:20 下午 + */ +@Data +public class MonthBarchartFormDTO implements Serializable { + + private static final long serialVersionUID = 4852721296827851714L; + + public interface MonthBarchart{} + + /** + * 机关ID + */ + @NotBlank(message = "机关ID不能为空",groups = {MonthBarchart.class}) + private String agencyId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/MonthPieChartFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/MonthPieChartFormDTO.java new file mode 100644 index 0000000000..0c188f427e --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/MonthPieChartFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.screen.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/19 3:10 下午 + */ +@Data +public class MonthPieChartFormDTO implements Serializable { + + private static final long serialVersionUID = -3163410637094615814L; + + public interface MonthPieChart{} + + /** + * 机关ID + */ + @NotBlank(message = "机关ID不能为空",groups = {MonthPieChart.class}) + private String agencyId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ParymemberFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ParymemberFormDTO.java new file mode 100644 index 0000000000..ee06b313d1 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ParymemberFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.screen.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/18 10:49 上午 + */ +@Data +public class ParymemberFormDTO implements Serializable { + + private static final long serialVersionUID = -5589396567320406525L; + + public interface Parymember{} + + /** + * 机关ID + */ + @NotBlank(message = "机关ID不能为空",groups = {Parymember.class}) + private String agencyId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ProjectDetailFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ProjectDetailFormDTO.java new file mode 100644 index 0000000000..32359cb03e --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ProjectDetailFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.screen.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/19 4:34 下午 + */ +@Data +public class ProjectDetailFormDTO implements Serializable { + + private static final long serialVersionUID = 6588246858516674808L; + + public interface ProjectDetail{} + + /** + * 项目ID + */ + @NotBlank(message = "项目ID不能为空",groups = {ProjectDetail.class}) + private String projectId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ProjectFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ProjectFormDTO.java new file mode 100644 index 0000000000..445cefc453 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ProjectFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.screen.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/19 1:25 下午 + */ +@Data +public class ProjectFormDTO implements Serializable { + + private static final long serialVersionUID = 7114390205886348751L; + + public interface Project{} + + /** + * 机关ID + */ + @NotBlank(message = "机关ID不能为空",groups = {Project.class}) + private String agencyId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/SubAgencyIndexRankFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/SubAgencyIndexRankFormDTO.java new file mode 100644 index 0000000000..3410d0638f --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/SubAgencyIndexRankFormDTO.java @@ -0,0 +1,33 @@ +package com.epmet.screen.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/20 9:54 上午 + */ +@Data +public class SubAgencyIndexRankFormDTO implements Serializable { + + private static final long serialVersionUID = -2920561669035794486L; + + public interface SubAgencyIndexRank{} + + /** + * 机关ID + */ + @NotBlank(message = "机关ID不能为空",groups = {SubAgencyIndexRank.class}) + private String agencyId; + + /** + * 默认查询前几名 + */ + @NotNull(message = "默认查询名次不能为空",groups = {SubAgencyIndexRank.class}) + private Integer topNum; + + private String yearId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/TopProfileFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/TopProfileFormDTO.java new file mode 100644 index 0000000000..6b0d00dae1 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/TopProfileFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.screen.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/19 1:43 下午 + */ +@Data +public class TopProfileFormDTO implements Serializable { + + private static final long serialVersionUID = -287352242311433250L; + + public interface TopProfile{} + + /** + * 机关ID + */ + @NotBlank(message = "机关ID不能为空",groups = {TopProfile.class}) + private String agencyId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/UserFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/UserFormDTO.java new file mode 100644 index 0000000000..4a3b23da00 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/UserFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.screen.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/18 10:49 上午 + */ +@Data +public class UserFormDTO implements Serializable { + + private static final long serialVersionUID = 4863908542899315106L; + + public interface User{} + + /** + * 机关ID + */ + @NotBlank(message = "机关ID不能为空",groups = {User.class}) + private String agencyId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/VolunteerServiceFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/VolunteerServiceFormDTO.java new file mode 100644 index 0000000000..510bb5ec41 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/VolunteerServiceFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.screen.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/20 3:12 下午 + */ +@Data +public class VolunteerServiceFormDTO implements Serializable { + + private static final long serialVersionUID = 7916606646764729831L; + + public interface VolunteerService{} + + /** + * 机关ID + */ + @NotBlank(message = "机关ID不能为空",groups = {VolunteerService.class}) + private String agencyId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/YearAverageIndexFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/YearAverageIndexFormDTO.java new file mode 100644 index 0000000000..80d526bd48 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/YearAverageIndexFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.screen.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/19 2:40 下午 + */ +@Data +public class YearAverageIndexFormDTO implements Serializable { + + private static final long serialVersionUID = -2389432085360116229L; + + public interface YearAverageIndex{} + + /** + * 机关Id + */ + @NotBlank(message = "机关ID不能为空",groups = {YearAverageIndex.class}) + private String agencyId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/AdvanceBranchRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/AdvanceBranchRankResultDTO.java new file mode 100644 index 0000000000..912aedc1df --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/AdvanceBranchRankResultDTO.java @@ -0,0 +1,53 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 4、先进排行榜单-先进支部排行 返参dto + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321539 + * @ClassName AdvanceBranchRankResultDTO + * @Auth wangc + * @Date 2020-08-21 10:47 + */ +@Data +public class AdvanceBranchRankResultDTO implements Serializable { + private static final long serialVersionUID = 330099297596334388L; + + /** + * 名称 XXXX社区党委 + * */ + private String name; + + /** + * 满意度 90.64% 返回字符串,前端直接显示 + * */ + private String satisfactionRatio; + + /** + * 结案率 94.3% 返回字符串,前端直接显示 + * */ + private String closedProjectRatio; + + /** + * 党员数 + * */ + private Integer partyMemberNum; + + /** + * 支部建设 GROUP_TOTAL + * */ + private Integer branchNum; + + /** + * 议题数 + * */ + private Integer issueNum; + + /** + * 项目数 + * */ + private Integer projectNum; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/AgencyDistributionResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/AgencyDistributionResultDTO.java new file mode 100644 index 0000000000..da0a5a389e --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/AgencyDistributionResultDTO.java @@ -0,0 +1,40 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/18 2:20 下午 + */ +@Data +public class AgencyDistributionResultDTO implements Serializable { + + private static final long serialVersionUID = -8404806508669824731L; + + /** + * 可能是gridId,可能是agencyId + */ + private String subId; + + /** + * 名称 + */ + private String subName; + + /** + * 坐标区域 + */ + private String subAreaMarks; + + /** + * 中心点位 + */ + private String subCenterMark; + + /** + * 组织:agency; 网格:grid ; 部门:dept + */ + private String type; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildOrderByCountResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildOrderByCountResultDTO.java new file mode 100644 index 0000000000..d6ba6ae18b --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildOrderByCountResultDTO.java @@ -0,0 +1,23 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 查询机关组织次数、参加人数的排序返参 + * @ClassName BranchBuildOrderByCountResultDTO + * @Auth wangc + * @Date 2020-08-20 09:20 + */ +@Data +public class BranchBuildOrderByCountResultDTO implements Serializable { + private static final long serialVersionUID = -8268706123005848128L; + + private String orgName; + + private Integer organizeData; + + private Integer joinData; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildRankResultDTO.java new file mode 100644 index 0000000000..f7593319e1 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildRankResultDTO.java @@ -0,0 +1,32 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Description 4、支部建设情况|联建共建情况-排行 返参dto + * @NEI https://nei.netease.com/interface/detail/?pid=57068&id=321982 + * @Auth wangc + * @Date 2020-08-19 15:09 + */ +@Data +public class BranchBuildRankResultDTO implements Serializable { + private static final long serialVersionUID = 6213072175254509349L; + + /** + * 组织次数 + * */ + private List organizeData; + + /** + * 组织名称数组 + * */ + private List xAxis; + + /** + * 参与人数 + * */ + private List joinData; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildTrendResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildTrendResultDTO.java new file mode 100644 index 0000000000..58a277322f --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildTrendResultDTO.java @@ -0,0 +1,31 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Description 3、支部建设情况|联建共建情况-折线图 返参DTO + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321981 + * @ClassName BranchBuildTrendResultDTO + * @Auth wangc + * @Date 2020-08-19 10:06 + */ +@Data +public class BranchBuildTrendResultDTO implements Serializable { + private static final long serialVersionUID = 2453727230656371207L; + + /** + * 分类数组 ["三会党课","主体党日","三述专题","志愿服务","党内关怀"] + * */ + private List legend; + + /** + * 横坐标,近12个月的结合 ["8月","9月"] + * */ + private List xAxis; + + private List seriesData; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchIssueDataResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchIssueDataResultDTO.java new file mode 100644 index 0000000000..65a6888047 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchIssueDataResultDTO.java @@ -0,0 +1,22 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description + * @ClassName BranchIssueDataResultDTO + * @Auth wangc + * @Date 2020-08-19 10:50 + */ +@Data +public class BranchIssueDataResultDTO implements Serializable { + private static final long serialVersionUID = 2417543749267496482L; + + private String issue; + + private String monthId; + + private Integer data; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchResultDTO.java new file mode 100644 index 0000000000..f4a611cc10 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchResultDTO.java @@ -0,0 +1,30 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/18 10:52 上午 + */ +@Data +public class BranchResultDTO implements Serializable { + + private static final long serialVersionUID = -8001714892170166320L; + + /** + * 网格ID + */ + private String gridId = ""; + + /** + * 网格名称 + */ + private String gridName = ""; + + /** + * 党支部(网格)位置 + */ + private String partyMark = ""; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchTrendSeriesDataResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchTrendSeriesDataResultDTO.java new file mode 100644 index 0000000000..7d5f415547 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchTrendSeriesDataResultDTO.java @@ -0,0 +1,27 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Description 3、支部建设情况|联建共建情况-折线图 返参中的系列数组 + * @ClassName BranchTrendSeriesDataResultDTO + * @Auth wangc + * @Date 2020-08-19 10:22 + */ +@Data +public class BranchTrendSeriesDataResultDTO implements Serializable { + private static final long serialVersionUID = -2288264050517402039L; + + /** + * 和legend集合值一致 + * */ + private String name; + + /** + * 对应每个月的数值 + * */ + private List data; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/CompartmentResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/CompartmentResultDTO.java new file mode 100644 index 0000000000..2bf8ffd3d6 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/CompartmentResultDTO.java @@ -0,0 +1,49 @@ +package com.epmet.screen.dto.result; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2020/8/18 14:18 + */ +@Data +public class CompartmentResultDTO implements Serializable { + + private static final long serialVersionUID = 7963177476365327829L; + + /** + * 当前所选组织 + */ + private String agencyId = ""; + + /** + * 当前所选组织名称 + */ + private String name = ""; + + /** + * 当前所选组织的坐标区域 + */ + private String areaMarks = ""; + + /** + * 机关级别 + * 社区级:community, + * 乡(镇、街道)级:street, + * 区县级: district, + * 市级: city + * 省级:province + */ + @JsonIgnore + private String level; + + /** + * 子级用户分布 + */ + private List agencyDistribution = new ArrayList<>(); +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ContactMassLineChartResult.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ContactMassLineChartResult.java new file mode 100644 index 0000000000..e77c336fbe --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ContactMassLineChartResult.java @@ -0,0 +1,30 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/20 2:45 下午 + */ +@Data +public class ContactMassLineChartResult implements Serializable { + + private static final long serialVersionUID = 5668549816473850787L; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 党员建群数 + */ + private Integer groupTotal; + + /** + * 群成员数 + */ + private Integer userTotal; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ContactMassLineChartResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ContactMassLineChartResultDTO.java new file mode 100644 index 0000000000..e57b0cc54f --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ContactMassLineChartResultDTO.java @@ -0,0 +1,31 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2020/8/20 2:31 下午 + */ +@Data +public class ContactMassLineChartResultDTO implements Serializable { + + private static final long serialVersionUID = 192666933158635787L; + + /** + * 横坐标集合 + */ + private List xAxis; + + /** + * 党员建群数 + */ + private List groupData; + + /** + * 群成员数 + */ + private List groupMemberData; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/DifficultProjectResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/DifficultProjectResultDTO.java new file mode 100644 index 0000000000..e89155d00c --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/DifficultProjectResultDTO.java @@ -0,0 +1,44 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 2、难点赌点-耗时最长|涉及部门最多|处理次数 返参DTO + * @NEI https://nei.netease.com/interface/detail/res/?pid=57068&id=321614 + * @ClassName DifficultProjectResultDTO + * @Auth wangc + * @Date 2020-08-20 13:43 + */ +@Data +public class DifficultProjectResultDTO implements Serializable { + private static final long serialVersionUID = -7338625142484943434L; + + private String projectId; + + private String title; + + /** + * 状态: 待处理: pending; 结案closed + * */ + private String status; + + private Integer totalHours; + + /** + * yyyy-MM-dd HH:mm + * */ + private String createDateTime; + + private String gridName; + + private String imgUrl; + + private String categoryName; + + private Integer handleDepts; + + private Integer handleCount; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/FineExampleResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/FineExampleResultDTO.java new file mode 100644 index 0000000000..a81f45fc05 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/FineExampleResultDTO.java @@ -0,0 +1,81 @@ +package com.epmet.screen.dto.result; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/20 1:48 下午 + */ +@Data +public class FineExampleResultDTO implements Serializable { + + private static final long serialVersionUID = -2754696449087950719L; + + /** + * 党员参与议事 + */ + private Integer issueTotal = 0; + + @JsonIgnore + private Double issueRatioA; + + /** + * 党员参与议事占比 + */ + private String issueRatio = "0.00%"; + + /** + * 党员发布话题总数 + */ + private Integer topicTotal = 0; + + @JsonIgnore + private Double topicRatioA; + + /** + * 党员发布话题占比 + */ + private String topicRatio = "0.00%"; + + /** + * 议题转项目 + */ + private Integer shiftProjectTotal = 0; + + @JsonIgnore + private Double shiftProjectRatioA; + + /** + * 议题转项目占比 + */ + private String shiftProjectRatio = "0.00%"; + + /** + * 解决项目 + */ + private Integer resolvedProjectTotal = 0; + + @JsonIgnore + private Double resolvedProjectRatioA; + + /** + * 解决项目占比 + */ + private String resolvedProjectRatio = "0.00%"; + + /** + * 党员发布议题数 + */ + private Integer publishIssueTotal = 0; + + @JsonIgnore + private Double publishIssueRatioA; + + /** + * 党员发布议题数占比 + */ + private String publishIssueRatio = "0.00%"; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/GovernCapacityRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/GovernCapacityRankResultDTO.java new file mode 100644 index 0000000000..318b290840 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/GovernCapacityRankResultDTO.java @@ -0,0 +1,42 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 治理能力榜单返参dto + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321627 + * @ClassName GovernCapacityRankResultDTO + * @Auth wangc + * @Date 2020-08-20 17:30 + */ +@Data +public class GovernCapacityRankResultDTO implements Serializable { + private static final long serialVersionUID = -3891870459284304022L; + + /** + * 名称 + * */ + private String agencyName; + + /** + * 响应率 + * */ + private String responseRatio; + + /** + * 解决率 + * */ + private String resolvedRatio; + + /** + * 自治率 + * */ + private String governRatio; + + /** + * 满意率 + * */ + private String satisfactionRatio; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/GovernCapacityResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/GovernCapacityResultDTO.java new file mode 100644 index 0000000000..dd2c09cd94 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/GovernCapacityResultDTO.java @@ -0,0 +1,42 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * @Description 治理能力查询结果dto + * @ClassName GovernCapacityResultDTO + * @Auth wangc + * @Date 2020-08-20 17:24 + */ +@Data +public class GovernCapacityResultDTO implements Serializable { + private static final long serialVersionUID = -2834039644611050304L; + + /** + * 名称 + * */ + private String agencyName; + + /** + * 响应率 + * */ + private BigDecimal responseRatio; + + /** + * 解决率 + * */ + private BigDecimal resolvedRatio; + + /** + * 自治率 + * */ + private BigDecimal governRatio; + + /** + * 满意率 + * */ + private BigDecimal satisfactionRatio; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthBarchartResult.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthBarchartResult.java new file mode 100644 index 0000000000..ebf0d9d276 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthBarchartResult.java @@ -0,0 +1,25 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/20 9:12 上午 + */ +@Data +public class MonthBarchartResult implements Serializable { + + private static final long serialVersionUID = 3777652772902180088L; + + private String monthId; + + private Double serviceAbility; + + private Double partyDevAbility; + + private Double governAbility; + + private Double indexTotal; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthBarchartResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthBarchartResultDTO.java new file mode 100644 index 0000000000..479547a883 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthBarchartResultDTO.java @@ -0,0 +1,42 @@ +package com.epmet.screen.dto.result; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2020/8/19 5:23 下午 + */ +@Data +public class MonthBarchartResultDTO implements Serializable { + + private static final long serialVersionUID = 561457498288576566L; + + /** + * 服务能力 + */ + private List serviceAbilityData; + + /** + * 党建能力 + */ + private List partyDevAbilityData; + + /** + * 治理能力 + */ + private List governAbilityData; + + /** + * 横坐标月份集合 + */ + private List xAxis; + + /** + * 总指数集合 + */ + private List totalIndexData; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthPieChartResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthPieChartResultDTO.java new file mode 100644 index 0000000000..248f69d5ce --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthPieChartResultDTO.java @@ -0,0 +1,30 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/19 3:12 下午 + */ +@Data +public class MonthPieChartResultDTO implements Serializable { + + private static final long serialVersionUID = 8399158251970739021L; + + /** + * 服务能力 + */ + private Double serviceAbility = 0.0; + + /** + * 党建能力 + */ + private Double partyDevAbility = 0.0; + + /** + * 治理能力 + */ + private Double governAbility = 0.0; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/OrgRankDataResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/OrgRankDataResultDTO.java new file mode 100644 index 0000000000..87a8d482c9 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/OrgRankDataResultDTO.java @@ -0,0 +1,54 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * @Description 党建引领-组织先进排行榜 查询结果dto + * @ClassName OrgRankDataResultDTO + * @Auth wangc + * @Date 2020-08-21 11:16 + */ +@Data +public class OrgRankDataResultDTO implements Serializable { + + private static final long serialVersionUID = -2980098512184391207L; + + /** + * 名称 XXXX社区党委 + * */ + private String name; + + /** + * 满意度 90.64% 返回字符串,前端直接显示 + * */ + private BigDecimal satisfactionRatio; + + /** + * 结案率 94.3% 返回字符串,前端直接显示 + * */ + private BigDecimal closedProjectRatio; + + /** + * 党员数 + * */ + private Integer partyMemberNum; + + /** + * 支部建设 GROUP_TOTAL + * */ + private Integer branchNum; + + /** + * 议题数 + * */ + private Integer issueNum; + + /** + * 项目数 + * */ + private Integer projectNum; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartyUserPointResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartyUserPointResultDTO.java new file mode 100644 index 0000000000..5ae10cb73e --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartyUserPointResultDTO.java @@ -0,0 +1,31 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 党员积分查询结果 dto 作为接口【5、先进排行榜单-先进党员排行】的返参对象 NEI地址: https://nei.netease.com/interface/detail/res/?pid=57068&id=321624 + * @ClassName PartyUserPointResultDTO + * @Auth wangc + * @Date 2020-08-21 14:18 + */ +@Data +public class PartyUserPointResultDTO implements Serializable { + private static final long serialVersionUID = -288523161283142460L; + + /** + * 用户Id + * */ + private String userId; + + /** + * 用户姓名 + * */ + private String name; + + /** + * 用户积分 + * */ + private Integer point; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberAgeDistributionResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberAgeDistributionResultDTO.java new file mode 100644 index 0000000000..6ae70d9a67 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberAgeDistributionResultDTO.java @@ -0,0 +1,44 @@ +package com.epmet.screen.dto.result; + +import com.epmet.commons.tools.constant.NumConstant; +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description + * @ClassName PartymemberAgeDistributionResultDTO + * @Auth wangc + * @Date 2020-08-18 17:04 + */ +@Data +public class PartymemberAgeDistributionResultDTO implements Serializable { + private static final long serialVersionUID = -3477512511475784330L; + + /** + * 30岁以下 的党员 + * */ + private Integer under30Count = NumConstant.ZERO; + + /** + * 31-50岁 的党员 + * */ + private Integer between31And50Count = NumConstant.ZERO; + + /** + * 51-60岁 的党员 + * */ + private Integer between51And60Count = NumConstant.ZERO; + + /** + * 61岁以上 的党员 + * */ + private Integer above61Count = NumConstant.ZERO; + + /** + * 党员总数 + * */ + private Integer partyTotal = NumConstant.ZERO; + + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberAgePercentResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberAgePercentResultDTO.java new file mode 100644 index 0000000000..c5eec4d539 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberAgePercentResultDTO.java @@ -0,0 +1,37 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * @Description + * @ClassName PartymemberAgePercentResultDTO + * @Auth wangc + * @Date 2020-08-19 09:13 + */ +@Data +public class PartymemberAgePercentResultDTO implements Serializable { + private static final long serialVersionUID = 2228109850328978771L; + + /** + * 30岁以下 的党员占 注册党员总数的百分比 (返回数字,小数点后保留两位) + * */ + private BigDecimal under30Ratio; + + /** + * 31-50岁 的党员占 注册党员总数的百分比(返回数字,小数点后保留两位) + * */ + private BigDecimal between31And50Ratio; + + /** + * 51-60岁 的党员占 注册党员总数的百分比(返回数字,小数点后保留两位) + * */ + private BigDecimal between51And60Ratio; + + /** + * 61岁以上 的党员占 注册党员总数的百分比(返回数字,小数点后保留两位) + * */ + private BigDecimal above61; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberPercentResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberPercentResultDTO.java new file mode 100644 index 0000000000..eb8bc35184 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberPercentResultDTO.java @@ -0,0 +1,34 @@ +package com.epmet.screen.dto.result; + +import com.epmet.commons.tools.constant.NumConstant; +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 1、党员基本情况-饼状图概况 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321324 + * @ClassName PartymemberPercentResultDTO + * @Auth wangc + * @Date 2020-08-18 14:54 + */ +@Data +public class PartymemberPercentResultDTO implements Serializable { + private static final long serialVersionUID = -2864099044581782674L; + + /** + * 注册党员总数 + * */ + private Integer partyMemberTotal = NumConstant.ZERO; + + /** + * 注册党员占比 + * */ + private String percentInPlatForm; + + /** + * 注册用户总数 + * */ + private Integer platFormTotal = NumConstant.ZERO; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberDistributionResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberDistributionResultDTO.java new file mode 100644 index 0000000000..397b53287b --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberDistributionResultDTO.java @@ -0,0 +1,46 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/18 11:06 上午 + */ +@Data +public class ParymemberDistributionResultDTO implements Serializable { + + private static final long serialVersionUID = 9180892033529262049L; + + /** + * 可能是gridId,可能是agencyId + */ + private String subId = ""; + + /** + * 中心点位 + */ + private String centerMark = ""; + + /** + * 党员总人数 + */ + private Integer totalNum = 0; + + /** + * 坐标区域 + */ + private String areaMarks = ""; + + /** + * 可以是网格的名称,可以是组织的名称 + */ + private String subName= ""; + + /** + * 组织:agency, 网格 : grid; + */ + private String type = ""; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberResultDTO.java new file mode 100644 index 0000000000..18bc33df48 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberResultDTO.java @@ -0,0 +1,49 @@ +package com.epmet.screen.dto.result; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2020/8/18 11:03 上午 + */ +@Data +public class ParymemberResultDTO implements Serializable { + + private static final long serialVersionUID = -7230556020628357047L; + + /** + * 当前所选组织 + */ + private String agencyId = ""; + + /** + * 当前所选组织名称 + */ + private String name = ""; + + /** + * 当前所选组织的坐标区域 + */ + private String areaMarks = ""; + + /** + * 机关级别 + * 社区级:community, + * 乡(镇、街道)级:street, + * 区县级: district, + * 市级: city + * 省级:province + */ + @JsonIgnore + private String level; + + /** + * 子级用户分布 + */ + private List userDistribution = new ArrayList<>(); +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ProjectDetailResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ProjectDetailResultDTO.java new file mode 100644 index 0000000000..234fe38034 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ProjectDetailResultDTO.java @@ -0,0 +1,47 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2020/8/19 4:37 下午 + */ +@Data +public class ProjectDetailResultDTO implements Serializable { + + private static final long serialVersionUID = 2884179183725459493L; + + /** + * 项目内容 + */ + private String projectContent = ""; + + /** + * 当前状态 + */ + private String status = ""; + + /** + * 最后一次处理的部门 + */ + private String latestHandleDept = ""; + + /** + * 最后一次处理的时间yyyy-MM-dd HH:mm + */ + private String latestHandleTime = ""; + + /** + * 操作描述 + */ + private String operDesc = ""; + + /** + * 图片列表 + */ + private List imgList = new ArrayList<>(); +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ProjectResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ProjectResultDTO.java new file mode 100644 index 0000000000..7a0a016b25 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ProjectResultDTO.java @@ -0,0 +1,45 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/19 1:27 下午 + */ +@Data +public class ProjectResultDTO implements Serializable { + + private static final long serialVersionUID = 7130615407473171093L; + + /** + * 项目标题 + */ + private String projectTitle = ""; + + /** + * red, green,yellow + */ + private String color = ""; + + /** + * 项目id + */ + private String projectId = ""; + + /** + * 网格名称 + */ + private String orgName = ""; + + /** + * 经度 + */ + private Double longitude = 0.0; + + /** + * 纬度 + */ + private Double latitude = 0.0; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiChartResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiChartResultDTO.java new file mode 100644 index 0000000000..45f4f801ce --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiChartResultDTO.java @@ -0,0 +1,38 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Description + * @ClassName PublicPartiChartResultDTO + * @Auth wangc + * @Date 2020-08-21 09:16 + */ +@Data +public class PublicPartiChartResultDTO implements Serializable { + private static final long serialVersionUID = 8366701017042226713L; + + /** + * 横坐标:近一年(不包含当前月) + * */ + private List xAxis; + + /** + * 组织次数 + * */ + private List organizeNumList; + + /** + * 参与人数 + * */ + private List joinUserNumList; + + /** + * 平均参与人次 + * */ + private List averageJoinNumList; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiProfileResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiProfileResultDTO.java new file mode 100644 index 0000000000..52a127fd77 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiProfileResultDTO.java @@ -0,0 +1,48 @@ +package com.epmet.screen.dto.result; + +import com.epmet.commons.tools.constant.NumConstant; +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 3、公众参与概况返参DTO + * @ClassName PublicPartiProfileResultDTO + * @Auth wangc + * @Date 2020-08-20 14:33 + */ +@Data +public class PublicPartiProfileResultDTO implements Serializable { + private static final long serialVersionUID = 2520835419152912027L; + + private Integer total = NumConstant.ZERO; + + private String monthIncr = ""; + + /** + * incr上升, decr下降 + * */ + private String monthTrend = ""; + + private Integer averageIssue = NumConstant.ZERO; + + /** + * 较上月百分比 + * */ + private String issueCompareLatestMonth = ""; + + /** + * 较上月趋势:incr上升,decr下降 + * */ + private String issueCompareLatestTrend = ""; + + /** + * 平均参与度 + * */ + private Integer averageJoin = NumConstant.ZERO; + + private String joinCompareLatestMonth = ""; + + private String joinCompareLatestTrend = ""; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiRankResultDTO.java new file mode 100644 index 0000000000..b151901bdf --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiRankResultDTO.java @@ -0,0 +1,28 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 公众参与-排行榜 传参dto + * @ClassName PublicPartiRankResultDTO + * @Auth wangc + * @Date 2020-08-20 15:29 + */ +@Data +public class PublicPartiRankResultDTO implements Serializable { + private static final long serialVersionUID = -2958188980327497507L; + + private String name; + + private Integer regNum; + + private Integer joinNum; + + private Integer topicNum; + + private Integer issueNum; + + private Integer projectNum; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/SubAgencyIndexRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/SubAgencyIndexRankResultDTO.java new file mode 100644 index 0000000000..5b0d89f39f --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/SubAgencyIndexRankResultDTO.java @@ -0,0 +1,40 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/20 9:58 上午 + */ +@Data +public class SubAgencyIndexRankResultDTO implements Serializable { + + private static final long serialVersionUID = -2767000156092731932L; + + /** + * 名称(组织或者网格名称,部门名称) + */ + private String name = ""; + + /** + * 总指数 + */ + private Double totalIndex = 0.0; + + /** + * 党建能力 + */ + private Double governAbility = 0.0; + + /** + * 治理能力 + */ + private Double partyDevAbility = 0.0; + + /** + * 服务能力 + */ + private Double serviceAbility = 0.0; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/TopProfileResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/TopProfileResultDTO.java new file mode 100644 index 0000000000..607891f5bf --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/TopProfileResultDTO.java @@ -0,0 +1,45 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/19 1:46 下午 + */ +@Data +public class TopProfileResultDTO implements Serializable { + + private static final long serialVersionUID = -5081563117620857359L; + + /** + * 用户总数 + */ + private Integer userNum = 0; + + /** + * 党员总数 + */ + private Integer partyMemberNum = 0; + + /** + * 党群总数 + */ + private Integer groupNum = 0; + + /** + * 话题总数 + */ + private Integer topicNum = 0; + + /** + * 议题总数 + */ + private Integer issueNum = 0; + + /** + * 项目总数 + */ + private Integer projectNum = 0; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/TreeResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/TreeResultDTO.java new file mode 100644 index 0000000000..b12a8f46f5 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/TreeResultDTO.java @@ -0,0 +1,37 @@ +package com.epmet.screen.dto.result; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2020/8/18 2:00 下午 + */ +@Data +public class TreeResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 显示名称 + */ + private String label = ""; + + /** + * agencyId下拉框value + */ + private String value = ""; + + @JsonIgnore + private String pids; + + /** + * 子目录 + */ + private List children = new ArrayList<>(); + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserDistributionResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserDistributionResultDTO.java new file mode 100644 index 0000000000..15787f28ed --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserDistributionResultDTO.java @@ -0,0 +1,46 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/18 11:06 上午 + */ +@Data +public class UserDistributionResultDTO implements Serializable { + + private static final long serialVersionUID = -7679590088019724244L; + + /** + * 可能是gridId,可能是agencyId + */ + private String subId; + + /** + * 中心点位 + */ + private String centerMark; + + /** + * 用户总人数 + */ + private Integer totalNum; + + /** + * 坐标区域 + */ + private String areaMarks; + + /** + * 可以是网格的名称,可以是组织的名称 + */ + private String subName; + + /** + * 组织:agency, 网格 : grid; + */ + private String type; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserJoinIndicatorGrowthRateResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserJoinIndicatorGrowthRateResultDTO.java new file mode 100644 index 0000000000..cf870c9b18 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserJoinIndicatorGrowthRateResultDTO.java @@ -0,0 +1,47 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * @Description 用户参与各项指标以及增长查询结果dto + * @ClassName UserJoinIndicatorGrowthRateResultDTO + * @Auth wangc + * @Date 2020-08-21 16:07 + */ +@Data +public class UserJoinIndicatorGrowthRateResultDTO implements Serializable { + private static final long serialVersionUID = -8830240350298414599L; + + private Integer total; + + private BigDecimal monthIncr; + + /** + * incr上升, decr下降 + * */ + private String monthTrend; + + private Integer averageIssue; + + /** + * 较上月百分比 + * */ + private BigDecimal issueCompareLatestMonth; + + /** + * 较上月趋势:incr上升,decr下降 + * */ + private String issueCompareLatestTrend; + + /** + * 平均参与度 + * */ + private Integer averageJoin; + + private BigDecimal joinCompareLatestMonth; + + private String joinCompareLatestTrend; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserJoinMonthlyResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserJoinMonthlyResultDTO.java new file mode 100644 index 0000000000..b35ce13c58 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserJoinMonthlyResultDTO.java @@ -0,0 +1,25 @@ +package com.epmet.screen.dto.result; + + +import lombok.Data; +import java.io.Serializable; + + +/** + * @Description 阅读用户参与查询返参dto screen_user_join + * @ClassName UserJoinMonthlyResultDTO + * @Auth wangc + * @Date 2020-08-21 09:20 + */ +@Data +public class UserJoinMonthlyResultDTO implements Serializable { + private static final long serialVersionUID = 4078219053108425375L; + + private String monthId; + + private Integer organizeNum; + + private Integer joinUserNum; + + private Integer averageJoinNum; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserPointRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserPointRankResultDTO.java new file mode 100644 index 0000000000..43cc73e066 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserPointRankResultDTO.java @@ -0,0 +1,28 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.LinkedList; +import java.util.List; + +/** + * @Description + * @ClassName UserPointRankResultDTO + * @Auth wangc + * @Date 2020-08-20 10:46 + */ +@Data +public class UserPointRankResultDTO implements Serializable { + private static final long serialVersionUID = 2829557017489626022L; + + /** + * 横坐标:姓名 + * */ + private List nameData = new LinkedList<>(); + + /** + * 纵坐标:积分 + * */ + private List pointsData = new LinkedList<>(); +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserPointResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserPointResultDTO.java new file mode 100644 index 0000000000..1f38d6886e --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserPointResultDTO.java @@ -0,0 +1,20 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 用户积分DTO - 查询结果 + * @ClassName UserPointResultDTO + * @Auth wangc + * @Date 2020-08-20 10:50 + */ +@Data +public class UserPointResultDTO implements Serializable { + private static final long serialVersionUID = -5174248184514429116L; + + private String name; + + private Integer point; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserResultDTO.java new file mode 100644 index 0000000000..179aa5bec2 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserResultDTO.java @@ -0,0 +1,49 @@ +package com.epmet.screen.dto.result; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2020/8/18 11:03 上午 + */ +@Data +public class UserResultDTO implements Serializable { + + private static final long serialVersionUID = -6633682494274511121L; + + /** + * 当前所选组织 + */ + private String agencyId = ""; + + /** + * 当前所选组织名称 + */ + private String name = ""; + + /** + * 当前所选组织的坐标区域 + */ + private String areaMarks = ""; + + /** + * 机关级别 + * 社区级:community, + * 乡(镇、街道)级:street, + * 区县级: district, + * 市级: city + * 省级:province + */ + @JsonIgnore + private String level; + + /** + * 子级用户分布 + */ + private List userDistribution = new ArrayList<>(); +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/VolunteerServiceResult.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/VolunteerServiceResult.java new file mode 100644 index 0000000000..bc2d53edff --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/VolunteerServiceResult.java @@ -0,0 +1,35 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/20 3:16 下午 + */ +@Data +public class VolunteerServiceResult implements Serializable { + + private static final long serialVersionUID = 959536759114517195L; + + /** + * 月份ID + */ + private String monthId; + + /** + * 组织次数 + */ + private Integer organizeData; + + /** + * 参与次数 + */ + private Integer joinData; + + /** + * 平均参与人次 + */ + private Integer averageJoinUserData; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/VolunteerServiceResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/VolunteerServiceResultDTO.java new file mode 100644 index 0000000000..18331f9ca7 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/VolunteerServiceResultDTO.java @@ -0,0 +1,36 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2020/8/20 3:14 下午 + */ +@Data +public class VolunteerServiceResultDTO implements Serializable { + + private static final long serialVersionUID = -6227889392267793005L; + + /** + * x轴,返回近12个月,不包含当前月 + */ + private List xAxis; + + /** + * 组织次数 + */ + private List organizeData; + + /** + * 参与次数 + */ + private List joinData; + + /** + * 平均参与人次 + */ + private List averageJoinUserData; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/YearAverageIndexResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/YearAverageIndexResultDTO.java new file mode 100644 index 0000000000..d05479d5d2 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/YearAverageIndexResultDTO.java @@ -0,0 +1,35 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/19 2:45 下午 + */ +@Data +public class YearAverageIndexResultDTO implements Serializable { + + private static final long serialVersionUID = 6453379153616899440L; + + /** + * 年度平均指数 + */ + private Double yearAverageIndex = 0.0; + + /** + * 服务能力 + */ + private Double serviceAbility = 0.0; + + /** + * 党建能力 + */ + private Double partyDevAbility = 0.0; + + /** + * 治理能力 + */ + private Double governAbility = 0.0; +} diff --git a/epmet-module/data-report/data-report-server/pom.xml b/epmet-module/data-report/data-report-server/pom.xml index a859f98664..e2239a5081 100644 --- a/epmet-module/data-report/data-report-server/pom.xml +++ b/epmet-module/data-report/data-report-server/pom.xml @@ -67,6 +67,12 @@ epmet-commons-extapp-auth 2.0.0 + + + com.epmet + epmet-commons-dynamic-datasource + 2.0.0 + @@ -104,11 +110,18 @@ dev - + - - epmet_data_statistical_user - EpmEt-db-UsEr + + epmet_data_statistical_user + EpmEt-db-UsEr + + + + + + epmet_data_stats_display_user + EpmEt-db-UsEr 0 @@ -139,11 +152,11 @@ test - + - - epmet - elink@833066 + + epmet + elink@833066 0 @@ -174,11 +187,11 @@ prod - + - - epmet_data_statistical - EpmEt-db-UsEr + + epmet_data_statistical + EpmEt-db-UsEr 0 diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/aspect/RequestLogAspect.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/aspect/RequestLogAspect.java similarity index 90% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/aspect/RequestLogAspect.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/aspect/RequestLogAspect.java index 7d4ff2d7d4..d57b2833e5 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/aspect/RequestLogAspect.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/aspect/RequestLogAspect.java @@ -1,4 +1,4 @@ -package com.epmet.aspect; +package com.epmet.datareport.aspect; import com.epmet.commons.tools.aspect.BaseRequestLogAspect; import org.aspectj.lang.ProceedingJoinPoint; @@ -21,7 +21,7 @@ import javax.servlet.http.HttpServletRequest; public class RequestLogAspect extends BaseRequestLogAspect { @Override - @Around(value = "execution(* com.epmet.controller.*.*Controller*.*(..)) ") + @Around(value = "execution(* com.epmet.datareport.controller.*.*Controller*.*(..)) ") public Object proceed(ProceedingJoinPoint point) throws Throwable { return super.proceed(point, getRequest()); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/config/ModuleConfigImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/config/ModuleConfigImpl.java similarity index 92% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/config/ModuleConfigImpl.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/config/ModuleConfigImpl.java index c52ec15b50..10a4cdd6d7 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/config/ModuleConfigImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/config/ModuleConfigImpl.java @@ -6,7 +6,7 @@ * 版权所有,侵权必究! */ -package com.epmet.config; +package com.epmet.datareport.config; import com.epmet.commons.tools.config.ModuleConfig; import org.springframework.stereotype.Service; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/.gitignore b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/.gitignore similarity index 100% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/.gitignore rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/.gitignore diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/group/GroupController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/group/GroupController.java similarity index 97% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/group/GroupController.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/group/GroupController.java index 88dd3bb376..1d269eddbd 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/group/GroupController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/group/GroupController.java @@ -9,7 +9,7 @@ import com.epmet.group.dto.result.GroupIncrTrendResultDTO; import com.epmet.group.dto.result.GroupSubAgencyResultDTO; import com.epmet.group.dto.result.GroupSubGridResultDTO; import com.epmet.group.dto.result.GroupSummaryInfoResultDTO; -import com.epmet.service.group.GroupService; +import com.epmet.datareport.service.group.GroupService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/issue/IssueController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/issue/IssueController.java similarity index 96% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/issue/IssueController.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/issue/IssueController.java index c9fad20ce2..afc732802d 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/issue/IssueController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/issue/IssueController.java @@ -1,11 +1,11 @@ -package com.epmet.controller.issue; +package com.epmet.datareport.controller.issue; 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.issue.dto.form.IssueIncrtrendFormDTO; import com.epmet.issue.dto.result.*; -import com.epmet.service.issue.IssueService; +import com.epmet.datareport.service.issue.IssueService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/project/ProjectController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java similarity index 100% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/project/ProjectController.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/publicity/PublicityController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/publicity/PublicityController.java similarity index 97% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/publicity/PublicityController.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/publicity/PublicityController.java index 8612d82002..f01540758c 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/publicity/PublicityController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/publicity/PublicityController.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.controller.publicity; +package com.epmet.datareport.controller.publicity; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.constant.NumConstant; @@ -24,7 +24,7 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.publicity.dto.form.TagFormDTO; import com.epmet.publicity.dto.result.*; -import com.epmet.service.publicity.PublicityService; +import com.epmet.datareport.service.publicity.PublicityService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java new file mode 100644 index 0000000000..d671c4cd05 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java @@ -0,0 +1,59 @@ +package com.epmet.datareport.controller.screen; + +import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; +import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; +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.commons.tools.validator.ValidatorUtils; +import com.epmet.screen.dto.form.CompartmentFormDTO; +import com.epmet.screen.dto.result.CompartmentResultDTO; +import com.epmet.screen.dto.result.TreeResultDTO; +import com.epmet.datareport.service.screen.AgencyService; +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 2020/8/18 10:15 + */ +@RestController +@RequestMapping("/screen/agency") +public class AgencyController { + + @Autowired + private AgencyService agencyService; + + /** + * @Description 1、组织机构树 + * @param + * @author zxc + * @date 2020/8/18 2:04 下午 + */ + @ExternalAppRequestAuth + @PostMapping("tree") + public Result tree(ExternalAppRequestParam externalAppRequestParam){ + return new Result().ok(agencyService.tree(externalAppRequestParam)); + } + + /** + * @Description 2、组织区域查询 + * @param compartmentFormDTO + * @author zxc + * @date 2020/8/18 2:33 下午 + */ + @ExternalAppRequestAuth + @PostMapping("compartment") + public Result compartment(@RequestBody CompartmentFormDTO compartmentFormDTO){ + ValidatorUtils.validateEntity(compartmentFormDTO, CompartmentFormDTO.Compartment.class); + return new Result().ok(agencyService.compartment(compartmentFormDTO)); + } + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/DistributionController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/DistributionController.java new file mode 100644 index 0000000000..b0b7c1f7a8 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/DistributionController.java @@ -0,0 +1,95 @@ +package com.epmet.datareport.controller.screen; + +import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.screen.dto.form.*; +import com.epmet.screen.dto.result.*; +import com.epmet.datareport.service.screen.DistributionService; +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; + +/** + * 中央区相关各指标查询 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:14 + */ +@RestController +@RequestMapping("/screen/distribution") +public class DistributionController { + + @Autowired + private DistributionService distributionService; + + /** + * @Description 1、党支部 + * @param formDTO + * @author zxc + * @date 2020/8/18 10:59 上午 + */ + @ExternalAppRequestAuth + @PostMapping("branch") + public Result> branch(@RequestBody BranchFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, BranchFormDTO.Branch.class); + return new Result>().ok(distributionService.branch(formDTO)); + } + + /** + * @Description 2、用户分布 + * @param userFormDTO + * @author zxc + * @date 2020/8/18 11:10 上午 + */ + @ExternalAppRequestAuth + @PostMapping("user") + public Result user(@RequestBody UserFormDTO userFormDTO){ + ValidatorUtils.validateEntity(userFormDTO, UserFormDTO.User.class); + return new Result().ok(distributionService.user(userFormDTO)); + } + + /** + * @Description 3、党员分布 + * @param parymemberFormDTO + * @author zxc + * @date 2020/8/18 11:20 上午 + */ + @ExternalAppRequestAuth + @PostMapping("parymember") + public Result parymember(@RequestBody ParymemberFormDTO parymemberFormDTO){ + ValidatorUtils.validateEntity(parymemberFormDTO, ParymemberFormDTO.Parymember.class); + return new Result().ok(distributionService.parymember(parymemberFormDTO)); + } + + /** + * @Description 4、事件 + * @param projectFormDTO + * @author zxc + * @date 2020/8/19 1:29 下午 + */ + @ExternalAppRequestAuth + @PostMapping("project") + public Result> project(@RequestBody ProjectFormDTO projectFormDTO){ + ValidatorUtils.validateEntity(projectFormDTO, ProjectFormDTO.Project.class); + return new Result>().ok(distributionService.project(projectFormDTO)); + } + + /** + * @Description 5、top区概况 + * @param topProfileFormDTO + * @author zxc + * @date 2020/8/19 1:52 下午 + */ + @ExternalAppRequestAuth + @PostMapping("topprofile") + public Result topProfile(@RequestBody TopProfileFormDTO topProfileFormDTO){ + ValidatorUtils.validateEntity(topProfileFormDTO, TopProfileFormDTO.TopProfile.class); + return new Result().ok(distributionService.topProfile(topProfileFormDTO)); + } + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassRootsGovernController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassRootsGovernController.java new file mode 100644 index 0000000000..325c4606c8 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassRootsGovernController.java @@ -0,0 +1,109 @@ +package com.epmet.datareport.controller.screen; + +import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.datareport.service.screen.GrassRootsGovernService; +import com.epmet.screen.dto.form.AgencyAndNumFormDTO; +import com.epmet.screen.dto.form.AgencyFormDTO; +import com.epmet.screen.dto.form.AgencyNumTypeParamFormDTO; +import com.epmet.screen.dto.result.*; +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; + +/** + * 基层治理相关各指标查询 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:12 + */ +@RestController +@RequestMapping("/screen/grassrootsgovern") +public class GrassRootsGovernController { + + @Autowired + private GrassRootsGovernService grassRootsGovernService; + + + + /** + * @Description 1、热心市民积分排行 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321544 + * @param param + * @return + * @author wangc + * @date 2020.08.20 11:16 + **/ + @ExternalAppRequestAuth + @PostMapping("userpointrank") + public Result userPointRank(@RequestBody AgencyAndNumFormDTO param){ + ValidatorUtils.validateEntity(param,AgencyFormDTO.CommonAgencyIdGroup.class); + return new Result().ok(grassRootsGovernService.userPointRank(param)); + } + + /** + * @Description 2、难点赌点-耗时最长|涉及部门最多|处理次数 + * @NEI https://nei.netease.com/interface/detail/res/?pid=57068&id=321614 + * @param param + * @return + * @author wangc + * @date 2020.08.20 13:55 + **/ + @ExternalAppRequestAuth + @PostMapping("difficultprojects") + public Result> difficultProject(@RequestBody AgencyNumTypeParamFormDTO param){ + ValidatorUtils.validateEntity(param, AgencyNumTypeParamFormDTO.AgencyNumTypeParamGroup.class); + return new Result>().ok(grassRootsGovernService.difficultProject(param)); + } + + /** + * @Description 3、公众参与概况 + * @NEI https://nei.netease.com/interface/detail/res/?pid=57068&id=321975 + * @param param + * @return + * @author wangc + * @date 2020.08.20 14:37 + **/ + @ExternalAppRequestAuth + @PostMapping("publicpartiprofile") + public Result publicPartiProfile(@RequestBody AgencyFormDTO param){ + ValidatorUtils.validateEntity(param, AgencyFormDTO.CommonAgencyIdGroup.class); + return new Result().ok(grassRootsGovernService.publicPartiProfile(param)); + } + + /** + * @Description 4、公众参与-排行榜 + * @NEI https://nei.netease.com/interface/detail/?pid=57068&id=321978 + * @param param + * @return + * @author wangc + * @date 2020.08.20 15:32 + **/ + @ExternalAppRequestAuth + @PostMapping("publicpartirank") + public Result> publicPartiRank(@RequestBody AgencyAndNumFormDTO param){ + ValidatorUtils.validateEntity(param,AgencyFormDTO.CommonAgencyIdGroup.class); + return new Result>().ok(grassRootsGovernService.publicPartiRank(param)); + } + + /** + * @Description 5、治理能力榜单 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321627 + * @param param + * @return + * @author wangc + * @date 2020.08.20 17:46 + **/ + @ExternalAppRequestAuth + @PostMapping("governcapacityrank") + public Result> governCapacityRank(@RequestBody AgencyAndNumFormDTO param){ + ValidatorUtils.validateEntity(param,AgencyFormDTO.CommonAgencyIdGroup.class); + return new Result>().ok(grassRootsGovernService.governCapacityRank(param)); + } + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassrootsPartyDevController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassrootsPartyDevController.java new file mode 100644 index 0000000000..7c536869e9 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassrootsPartyDevController.java @@ -0,0 +1,93 @@ +package com.epmet.datareport.controller.screen; + +import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.datareport.service.screen.GrassrootsPartyDevService; +import com.epmet.screen.dto.form.BranchBuildRankFormDTO; +import com.epmet.screen.dto.form.BranchBuildTrendFormDTO; +import com.epmet.screen.dto.form.ParymemberFormDTO; +import com.epmet.screen.dto.result.BranchBuildRankResultDTO; +import com.epmet.screen.dto.result.BranchBuildTrendResultDTO; +import com.epmet.screen.dto.result.PartymemberAgeDistributionResultDTO; +import com.epmet.screen.dto.result.PartymemberPercentResultDTO; +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; + +/** + * 基层党建相关各指标查询 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:11 + */ +@RestController +@RequestMapping("/screen/grassrootspartydev") +public class GrassrootsPartyDevController { + + @Autowired + private GrassrootsPartyDevService grassrootsPartyDevService; + + /** + * @Description 党员基本情况-饼状图概况 + * @NEI https://nei.netease.com/interface/detail/?pid=57068&id=321324 + * @param param + * @return + * @author wangc + * @date 2020.08.18 16:59 + **/ + @ExternalAppRequestAuth + @PostMapping("basicinfo") + public Result baseInfo(@RequestBody ParymemberFormDTO param){ + ValidatorUtils.validateEntity(param, ParymemberFormDTO.Parymember.class); + return new Result().ok(grassrootsPartyDevService.partymemberBaseInfo(param)); + } + + /** + * @Description 2、党员基本情况-年龄分布 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321980 + * @param param + * @return + * @author wangc + * @date 2020.08.18 17:54 + **/ + @ExternalAppRequestAuth + @PostMapping("ageinfo") + public Result ageInfo(@RequestBody ParymemberFormDTO param){ + ValidatorUtils.validateEntity(param, ParymemberFormDTO.Parymember.class); + return new Result().ok(grassrootsPartyDevService.partymemberAgeDistribution(param)); + } + + /** + * @Description 3、支部建设情况|联建共建情况-折线图 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321981 + * @param param + * @return BranchBuildTrendResultDTO + * @author wangc + * @date 2020.08.19 11:02 + **/ + @ExternalAppRequestAuth + @PostMapping("branchbuildtrend") + public Result branchBuildTrend(@RequestBody BranchBuildTrendFormDTO param){ + ValidatorUtils.validateEntity(param, BranchBuildTrendFormDTO.branchBuildTrendGroup.class); + return new Result().ok(grassrootsPartyDevService.branchBuildTrend(param)); + } + + /** + * @Description 4、支部建设情况|联建共建情况-排行 + * @NEI https://nei.netease.com/interface/detail/res/?pid=57068&id=321982 + * @param param + * @return + * @author wangc + * @date 2020.08.19 15:25 + **/ + @ExternalAppRequestAuth + @PostMapping("branchbuildrank") + public Result branchBuildRank(@RequestBody BranchBuildRankFormDTO param){ + ValidatorUtils.validateEntity(param, BranchBuildRankFormDTO.BranchBuildRankGroup.class); + return new Result().ok(grassrootsPartyDevService.branchBuildRank(param)); + } + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java new file mode 100644 index 0000000000..53b69591b4 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java @@ -0,0 +1,89 @@ +package com.epmet.datareport.controller.screen; + +import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; +import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.datareport.service.screen.IndexService; +import com.epmet.screen.dto.form.MonthBarchartFormDTO; +import com.epmet.screen.dto.form.MonthPieChartFormDTO; +import com.epmet.screen.dto.form.SubAgencyIndexRankFormDTO; +import com.epmet.screen.dto.form.YearAverageIndexFormDTO; +import com.epmet.screen.dto.result.MonthBarchartResultDTO; +import com.epmet.screen.dto.result.MonthPieChartResultDTO; +import com.epmet.screen.dto.result.SubAgencyIndexRankResultDTO; +import com.epmet.screen.dto.result.YearAverageIndexResultDTO; +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; + +/** + * 指数相关相关各指标查询 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:13 + */ +@RestController +@RequestMapping("/screen/index") +public class IndexController { + + @Autowired + private IndexService indexService; + + /** + * @Description 1、年度平均指数 + * @param yearAverageIndexFormDTO + * @author zxc + * @date 2020/8/19 2:53 下午 + */ + @ExternalAppRequestAuth + @PostMapping("yearaverageindex") + public Result yearAverageIndex(@RequestBody YearAverageIndexFormDTO yearAverageIndexFormDTO){ + ValidatorUtils.validateEntity(yearAverageIndexFormDTO, YearAverageIndexFormDTO.YearAverageIndex.class); + return new Result().ok(indexService.yearAverageIndex(yearAverageIndexFormDTO)); + } + + /** + * @Description 2、月度指数分析-饼状图 + * @param monthPieChartFormDTO + * @author zxc + * @date 2020/8/19 3:17 下午 + */ + @ExternalAppRequestAuth + @PostMapping("monthindexanalysis/piechart") + public Result monthPieChart(@RequestBody MonthPieChartFormDTO monthPieChartFormDTO){ + ValidatorUtils.validateEntity(monthPieChartFormDTO, MonthPieChartFormDTO.MonthPieChart.class); + return new Result().ok(indexService.monthPieChart(monthPieChartFormDTO)); + } + + /** + * @Description 3、月度指数分析-柱状图 + * @param monthBarchartFormDTO + * @author zxc + * @date 2020/8/19 5:27 下午 + */ + @ExternalAppRequestAuth + @PostMapping("monthindexanalysis/barchart") + public Result monthBarchart(@RequestBody MonthBarchartFormDTO monthBarchartFormDTO, ExternalAppRequestParam externalAppRequestParam){ + ValidatorUtils.validateEntity(monthBarchartFormDTO, MonthBarchartFormDTO.MonthBarchart.class); + return new Result().ok(indexService.monthBarchart(monthBarchartFormDTO,externalAppRequestParam)); + } + + /** + * @Description 4、下级部门指数排行 + * @param subAgencyIndexRankFormDTO + * @author zxc + * @date 2020/8/20 10:02 上午 + */ + @ExternalAppRequestAuth + @PostMapping("subagencyindexrank") + public Result> subAgencyIndexRank(@RequestBody SubAgencyIndexRankFormDTO subAgencyIndexRankFormDTO){ + ValidatorUtils.validateEntity(subAgencyIndexRankFormDTO, SubAgencyIndexRankFormDTO.SubAgencyIndexRank.class); + return new Result>().ok(indexService.subAgencyIndexRank(subAgencyIndexRankFormDTO)); + } + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/PartyMemberLeadController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/PartyMemberLeadController.java new file mode 100644 index 0000000000..5478956a32 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/PartyMemberLeadController.java @@ -0,0 +1,99 @@ +package com.epmet.datareport.controller.screen; + +import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.datareport.service.screen.PartyMemberLeadService; +import com.epmet.screen.dto.form.*; +import com.epmet.screen.dto.result.*; +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; + +/** + * 党建引领相关各指标查询 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:10 + */ +@RestController +@RequestMapping("/screen/partymemberlead") +public class PartyMemberLeadController { + + @Autowired + private PartyMemberLeadService partyMemberLeadService; + + /** + * @Description 1、先锋模范 + * @param fineExampleFormDTO + * @author zxc + * @date 2020/8/20 1:56 下午 + */ + @ExternalAppRequestAuth + @PostMapping("fineexample") + public Result fineExample(@RequestBody FineExampleFormDTO fineExampleFormDTO){ + ValidatorUtils.validateEntity(fineExampleFormDTO, FineExampleFormDTO.FineExample.class); + return new Result().ok(partyMemberLeadService.fineExample(fineExampleFormDTO)); + } + + /** + * @Description 2、党员联系群众 + * @param contactMassLineChartFormDTO + * @author zxc + * @date 2020/8/20 2:35 下午 + */ + @ExternalAppRequestAuth + @PostMapping("contactmasslinechart") + public Result contactMassLineChart(@RequestBody ContactMassLineChartFormDTO contactMassLineChartFormDTO){ + ValidatorUtils.validateEntity(contactMassLineChartFormDTO, ContactMassLineChartFormDTO.ContactMassLineChart.class); + return new Result().ok(partyMemberLeadService.contactMassLineChart(contactMassLineChartFormDTO)); + } + + /** + * @Description 3、党员志愿服务 + * @param volunteerServiceFormDTO + * @author zxc + * @date 2020/8/20 3:19 下午 + */ + @ExternalAppRequestAuth + @PostMapping("volunteerservice") + public Result volunteerService(@RequestBody VolunteerServiceFormDTO volunteerServiceFormDTO){ + ValidatorUtils.validateEntity(volunteerServiceFormDTO, VolunteerServiceFormDTO.VolunteerService.class); + return new Result().ok(partyMemberLeadService.volunteerService(volunteerServiceFormDTO)); + } + + /** + * @Description 4、先进排行榜单-先进支部排行 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321539 + * @param param + * @return + * @author wangc + * @date 2020.08.21 11:05 + **/ + @ExternalAppRequestAuth + @PostMapping("advancedbranchrank") + Result> advancedBranchRank(@RequestBody AgencyAndNumFormDTO param){ + ValidatorUtils.validateEntity(param, AgencyFormDTO.CommonAgencyIdGroup.class); + return new Result>().ok(partyMemberLeadService.advancedBranchRank(param)); + } + + /** + * @Description 5、先进排行榜单-先进党员排行 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321624 + * @param param + * @return List + * @author wangc + * @date 2020.08.21 14:22 + **/ + @ExternalAppRequestAuth + @PostMapping("advancedpartymemberrank") + Result> advancedPartymemberRank(@RequestBody AgencyAndNumFormDTO param){ + ValidatorUtils.validateEntity(param, AgencyFormDTO.CommonAgencyIdGroup.class); + return new Result>().ok(partyMemberLeadService.advancedPartymemberRank(param)); + } + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java new file mode 100644 index 0000000000..8c508e5eda --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java @@ -0,0 +1,41 @@ +package com.epmet.datareport.controller.screen; + +import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.datareport.service.screen.ScreenProjectService; +import com.epmet.screen.dto.form.ProjectDetailFormDTO; +import com.epmet.screen.dto.result.ProjectDetailResultDTO; +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; + +/** + * 项目 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:16 + */ +@RestController +@RequestMapping("/screen/project") +public class ScreenProjectController { + + @Autowired + private ScreenProjectService screenProjectService; + + /** + * @Description 3、项目详情 + * @param projectDetailFormDTO + * @author zxc + * @date 2020/8/19 4:36 下午 + */ + @ExternalAppRequestAuth + @PostMapping("detail") + public Result projectDetail(@RequestBody ProjectDetailFormDTO projectDetailFormDTO){ + ValidatorUtils.validateEntity(projectDetailFormDTO, ProjectDetailFormDTO.ProjectDetail.class); + return new Result().ok(screenProjectService.projectDetail(projectDetailFormDTO)); + } + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/topic/TopicController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/topic/TopicController.java similarity index 96% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/topic/TopicController.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/topic/TopicController.java index 233f31dc27..91edf636dd 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/topic/TopicController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/topic/TopicController.java @@ -1,10 +1,10 @@ -package com.epmet.controller.topic; +package com.epmet.datareport.controller.topic; 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.commons.tools.validator.ValidatorUtils; -import com.epmet.service.topic.TopicService; +import com.epmet.datareport.service.topic.TopicService; import com.epmet.topic.dto.form.TopicIncrTrendFormDTO; import com.epmet.topic.dto.result.*; import org.springframework.beans.factory.annotation.Autowired; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/user/UserAnalysisController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/user/UserAnalysisController.java similarity index 97% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/user/UserAnalysisController.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/user/UserAnalysisController.java index cceebbef37..dda6b177cf 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/user/UserAnalysisController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/user/UserAnalysisController.java @@ -1,4 +1,4 @@ -package com.epmet.controller.user; +package com.epmet.datareport.controller.user; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; @@ -7,7 +7,7 @@ import com.epmet.dto.form.user.UserSubAgencyFormDTO; import com.epmet.dto.form.user.UserSubGridFormDTO; import com.epmet.dto.form.user.UserSummaryInfoFormDTO; import com.epmet.dto.result.user.*; -import com.epmet.service.user.UserAnalysisService; +import com.epmet.datareport.service.user.UserAnalysisService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/.gitignore b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/.gitignore similarity index 100% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/.gitignore rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/.gitignore diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/group/GroupDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/group/GroupDao.java similarity index 97% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/group/GroupDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/group/GroupDao.java index e2a8410272..975b49ba5a 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/group/GroupDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/group/GroupDao.java @@ -1,4 +1,4 @@ -package com.epmet.dao.group; +package com.epmet.datareport.dao.group; import com.epmet.group.dto.result.*; import org.apache.ibatis.annotations.Mapper; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/issue/IssueDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/issue/IssueDao.java similarity index 97% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/issue/IssueDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/issue/IssueDao.java index abf2c4d350..53cab40c92 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/issue/IssueDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/issue/IssueDao.java @@ -1,4 +1,4 @@ -package com.epmet.dao.issue; +package com.epmet.datareport.dao.issue; import com.epmet.issue.dto.result.IssueDataDTO; import org.apache.ibatis.annotations.Mapper; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/project/ProjectDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/project/ProjectDao.java similarity index 97% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/project/ProjectDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/project/ProjectDao.java index 3ae53720f7..b8920580bf 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/project/ProjectDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/project/ProjectDao.java @@ -1,4 +1,4 @@ -package com.epmet.dao.project; +package com.epmet.datareport.dao.project; import com.epmet.project.dto.FactAgencyProjectDailyDTO; import com.epmet.project.dto.result.*; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/publicity/PublicityDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/publicity/PublicityDao.java similarity index 99% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/publicity/PublicityDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/publicity/PublicityDao.java index a4babe6039..b65c16b9a1 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/publicity/PublicityDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/publicity/PublicityDao.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.dao.publicity; +package com.epmet.datareport.dao.publicity; import com.epmet.publicity.dto.result.*; import org.apache.ibatis.annotations.Mapper; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCpcBaseDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCpcBaseDataDao.java new file mode 100644 index 0000000000..87f26f3b01 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCpcBaseDataDao.java @@ -0,0 +1,44 @@ +/** + * 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.datareport.dao.screen; + +import com.epmet.screen.dto.result.PartymemberAgeDistributionResultDTO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + + +/** + * 基层党建-党员基本情况 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenCpcBaseDataDao{ + + /** + * @Description 查询党员年龄分布情况 + * @param agencyId + * @return + * @author wangc + * @date 2020.08.18 17:47 + **/ + PartymemberAgeDistributionResultDTO selectPartymemberAgeDistribution(@Param("agencyId") String agencyId); + + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCustomerAgencyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCustomerAgencyDao.java new file mode 100644 index 0000000000..c97ac8b8e0 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCustomerAgencyDao.java @@ -0,0 +1,83 @@ +/** + * 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.datareport.dao.screen; + +import com.epmet.screen.dto.result.*; +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 2020-08-18 + */ +@Mapper +public interface ScreenCustomerAgencyDao { + + /** + * @Description 查询客户根组织ID + * @param customerId + * @author zxc + * @date 2020/8/18 2:44 下午 + */ + TreeResultDTO selectRootAgencyId(@Param("customerId")String customerId); + + /** + * @Description 查询下级机关的 名称和id + * @param subAgencyPids + * @author zxc + * @date 2020/8/18 4:48 下午 + */ + List selectSubAgencyList(@Param("subAgencyPids") String subAgencyPids); + + /** + * @Description 查询当前机关的区域信息 + * @param agencyId + * @author zxc + * @date 2020/8/18 4:51 下午 + */ + CompartmentResultDTO getAgencyAreaInfo(@Param("agencyId")String agencyId); + + /** + * @Description 查询子级区域分布信息【机关级别】 + * @param agencyId + * @author zxc + * @date 2020/8/18 5:12 下午 + */ + List selectSubDistribution(@Param("agencyId")String agencyId); + + /** + * @Description 查询子级用户分布【机关级别】 + * @param parentId + * @author zxc + * @date 2020/8/19 9:33 上午 + */ + List selectUserDistributionAgency(@Param("parentId")String parentId); + + /** + * @Description 查询子级党员分布【机关级别】 + * @param parentId + * @author zxc + * @date 2020/8/19 10:30 上午 + */ + List selectParymemberDistribution(@Param("parentId")String parentId); + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCustomerDeptDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCustomerDeptDao.java new file mode 100644 index 0000000000..e6ae450514 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCustomerDeptDao.java @@ -0,0 +1,31 @@ +/** + * 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.datareport.dao.screen; + +import org.apache.ibatis.annotations.Mapper; + +/** + * 部门信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenCustomerDeptDao { + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCustomerGridDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCustomerGridDao.java new file mode 100644 index 0000000000..4e57c2f71d --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCustomerGridDao.java @@ -0,0 +1,70 @@ +/** + * 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.datareport.dao.screen; + +import com.epmet.screen.dto.result.AgencyDistributionResultDTO; +import com.epmet.screen.dto.result.BranchResultDTO; +import com.epmet.screen.dto.result.ParymemberDistributionResultDTO; +import com.epmet.screen.dto.result.UserDistributionResultDTO; +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 2020-08-18 + */ +@Mapper +public interface ScreenCustomerGridDao { + + /** + * @Description 查询子级区域分布信息【网格级别】 + * @param agencyId + * @author zxc + * @date 2020/8/18 5:12 下午 + */ + List selectSubDistribution(@Param("agencyId")String agencyId); + + /** + * @Description 查询党支部信息 + * @param agencyId + * @author zxc + * @date 2020/8/19 9:13 上午 + */ + List selectBranch(@Param("agencyId")String agencyId); + + /** + * @Description 查询子级用户分布【网格级别】 + * @param parentId + * @author zxc + * @date 2020/8/19 9:33 上午 + */ + List selectUserDistribution(@Param("parentId")String parentId); + + /** + * @Description 查询子级党员分布【网格级别】 + * @param parentId + * @author zxc + * @date 2020/8/19 10:30 上午 + */ + List selectParymemberDistribution(@Param("parentId")String parentId); + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenDifficultyDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenDifficultyDataDao.java new file mode 100644 index 0000000000..17d2e7a420 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenDifficultyDataDao.java @@ -0,0 +1,44 @@ +/** + * 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.datareport.dao.screen; + +import com.epmet.screen.dto.result.DifficultProjectResultDTO; +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 2020-08-18 + */ +@Mapper +public interface ScreenDifficultyDataDao { + + /** + * @Description 查询难点赌点-耗时最长|涉及部门最多|处理次数 + * @param + * @return + * @author wangc + * @date 2020.08.20 14:26 + **/ + List selectDifficulty(@Param("agencyId")String agencyId,@Param("type")String type); + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenEventDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenEventDataDao.java new file mode 100644 index 0000000000..92f1641cce --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenEventDataDao.java @@ -0,0 +1,52 @@ +/** + * 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.datareport.dao.screen; + +import com.epmet.screen.dto.result.ProjectDetailResultDTO; +import com.epmet.screen.dto.result.ProjectResultDTO; +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 2020-08-18 + */ +@Mapper +public interface ScreenEventDataDao{ + + /** + * @Description 查询事件 + * @param parentId + * @author zxc + * @date 2020/8/19 2:09 下午 + */ + List selectEvent(@Param("parentId")String parentId); + + /** + * @Description 3、项目详情 + * @param projectId + * @author zxc + * @date 2020/8/19 4:36 下午 + */ + ProjectDetailResultDTO selectEventDetail(@Param("projectId")String projectId); + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenEventImgDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenEventImgDataDao.java new file mode 100644 index 0000000000..8090ce00c7 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenEventImgDataDao.java @@ -0,0 +1,42 @@ +/** + * 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.datareport.dao.screen; + +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 2020-08-18 + */ +@Mapper +public interface ScreenEventImgDataDao { + + /** + * @Description 查询事件imgUrl集合 + * @param projectId + * @author zxc + * @date 2020/8/19 5:11 下午 + */ + List selectEventImgList(@Param("projectId")String projectId); + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenGovernRankDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenGovernRankDataDao.java new file mode 100644 index 0000000000..3cf167fc5e --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenGovernRankDataDao.java @@ -0,0 +1,44 @@ +/** + * 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.datareport.dao.screen; + +import com.epmet.screen.dto.result.GovernCapacityResultDTO; +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 2020-08-18 + */ +@Mapper +public interface ScreenGovernRankDataDao{ + + /** + * @Description 查询政府治理能力各项指标 + * @param monthId + * @param agencyId + * @return + * @author wangc + * @date 2020.08.20 17:34 + **/ + List selectGovernCapacityRatio(@Param("monthId") String monthId,@Param("agencyId") String agencyId); +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenIndexDataMonthlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenIndexDataMonthlyDao.java new file mode 100644 index 0000000000..2e18647c39 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenIndexDataMonthlyDao.java @@ -0,0 +1,64 @@ +/** + * 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.datareport.dao.screen; + +import com.epmet.screen.dto.form.SubAgencyIndexRankFormDTO; +import com.epmet.screen.dto.result.MonthBarchartResult; +import com.epmet.screen.dto.result.MonthBarchartResultDTO; +import com.epmet.screen.dto.result.MonthPieChartResultDTO; +import com.epmet.screen.dto.result.SubAgencyIndexRankResultDTO; +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 2020-08-18 + */ +@Mapper +public interface ScreenIndexDataMonthlyDao{ + + /** + * @Description 2、月度指数分析-饼状图 + * @param agencyId + * @author zxc + * @date 2020/8/19 3:43 下午 + */ + MonthPieChartResultDTO selectMonthPieChart(@Param("agencyId")String agencyId); + + /** + * @Description 查询近一年的指数值【不包括本月】 + * @param customerId + * @param agencyId + * @author zxc + * @date 2020/8/20 9:02 上午 + */ + List selectMonthBarchart(@Param("customerId")String customerId, @Param("agencyId")String agencyId); + + /** + * @Description 4、下级部门指数排行 + * @param subAgencyIndexRankFormDTO + * @author zxc + * @date 2020/8/20 10:04 上午 + */ + List selectSubAgencyIndexRank(SubAgencyIndexRankFormDTO subAgencyIndexRankFormDTO); + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenIndexDataYearlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenIndexDataYearlyDao.java new file mode 100644 index 0000000000..304351b3b7 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenIndexDataYearlyDao.java @@ -0,0 +1,41 @@ +/** + * 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.datareport.dao.screen; + +import com.epmet.screen.dto.result.YearAverageIndexResultDTO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 指数-指数数据(按年统计) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +@Mapper +public interface ScreenIndexDataYearlyDao{ + + /** + * @Description 1、年度平均指数 + * @param agencyId + * @author zxc + * @date 2020/8/19 3:43 下午 + */ + YearAverageIndexResultDTO selectYearAverageIndex(@Param("agencyId")String agencyId); + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenOrgRankDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenOrgRankDataDao.java new file mode 100644 index 0000000000..fbee5cd15c --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenOrgRankDataDao.java @@ -0,0 +1,45 @@ +/** + * 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.datareport.dao.screen; + +import com.epmet.screen.dto.result.OrgRankDataResultDTO; +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 2020-08-18 + */ +@Mapper +public interface ScreenOrgRankDataDao{ + + /** + * @Description 查询指定机关的直属网格月度数据 + * @param agencyId + * @param monthId + * @return + * @author wangc + * @date 2020.08.21 13:58 + **/ + List selectGridDataMonthly(@Param("agencyId") String agencyId, @Param("monthId") String monthId); + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyBranchDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyBranchDataDao.java new file mode 100644 index 0000000000..0117eec4a7 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyBranchDataDao.java @@ -0,0 +1,71 @@ +/** + * 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.datareport.dao.screen; + +import com.epmet.screen.dto.result.BranchBuildOrderByCountResultDTO; +import com.epmet.screen.dto.result.BranchIssueDataResultDTO; +import com.epmet.screen.dto.result.VolunteerServiceResult; +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 2020-08-18 + */ +@Mapper +public interface ScreenPartyBranchDataDao { + + /** + * @Description 根据agencyTd、type(数据类别 party:支部建设;union:联合建设)查出共有多少议题主题 + * @param agencyId + * @param type + * @return List + * @author wangc + * @date 2020.08.19 10:44 + **/ + List selectIssueGroup(@Param("agencyId") String agencyId , @Param("type") String type); + + /** + * @Description 根据议题名称查找近12个月的数据 + * @param agencyId .. + * @return List + * @author wangc + * @date 2020.08.19 10:59 + **/ + List selectBranchDataByTypeAndTimeZone(@Param("agencyId") String agencyId , @Param("type") String type, @Param("category") String category, @Param("bottomMonthId") String bottomMonthId); + + /** + * @Description 查询党员志愿服务 + * @param agencyId + * @author zxc + * @date 2020/8/20 3:30 下午 + */ + List selectVolunteerServiceResult(@Param("agencyId")String agencyId); + /** + * @Description 查找指定组织的下一级组织的数据排行 + * @param agencyId .. + * @return List + * @author wangc + * @date 2020.08.20 09:46 + **/ + List selectBranchDataByTypeOrder(@Param("agencyId")String agencyId,@Param("category")String category,@Param("monthId")String monthId,@Param("bottomMonthId")String bottomMonthId); +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyLinkMassesDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyLinkMassesDataDao.java new file mode 100644 index 0000000000..dfa5c1f6d2 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyLinkMassesDataDao.java @@ -0,0 +1,43 @@ +/** + * 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.datareport.dao.screen; + +import com.epmet.screen.dto.result.ContactMassLineChartResult; +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 2020-08-18 + */ +@Mapper +public interface ScreenPartyLinkMassesDataDao { + + /** + * @Description 查询党员联系群众 + * @param agencyId + * @author zxc + * @date 2020/8/20 2:48 下午 + */ + List selectContactMassLineChart(@Param("agencyId")String agencyId); + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyUserRankDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyUserRankDataDao.java new file mode 100644 index 0000000000..946ac2a096 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyUserRankDataDao.java @@ -0,0 +1,54 @@ +/** + * 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.datareport.dao.screen; + +import com.epmet.screen.dto.result.PartyUserPointResultDTO; +import com.epmet.screen.dto.result.UserPointResultDTO; +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 2020-08-18 + */ +@Mapper +public interface ScreenPartyUserRankDataDao{ + + /** + * @Description 查询指定机关下的用户积分排名 + * @param agencyId + * @return + * @author wangc + * @date 2020.08.20 11:11 + **/ + List selectUserPointOrder(@Param("agencyId")String agencyId); + + /** + * @Description 查询指定机关所属网格的党员积分排名 + * @param agencyId + * @return + * @author wangc + * @date 2020.08.21 14:32 + **/ + List selectPartymemberPointOrder(@Param("agencyId")String agencyId); + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPioneerDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPioneerDataDao.java new file mode 100644 index 0000000000..4b477689c3 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPioneerDataDao.java @@ -0,0 +1,41 @@ +/** + * 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.datareport.dao.screen; + +import com.epmet.screen.dto.result.FineExampleResultDTO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 党建引领-先锋模范数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenPioneerDataDao{ + + /** + * @Description 查询先锋模范 + * @param agencyId + * @author zxc + * @date 2020/8/20 5:22 下午 + */ + FineExampleResultDTO selectFineExample(@Param("agencyId")String agencyId); + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenUserJoinDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenUserJoinDao.java new file mode 100644 index 0000000000..0edee635d4 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenUserJoinDao.java @@ -0,0 +1,54 @@ +/** + * 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.datareport.dao.screen; + +import com.epmet.screen.dto.result.UserJoinIndicatorGrowthRateResultDTO; +import com.epmet.screen.dto.result.UserJoinMonthlyResultDTO; +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 2020-08-18 + */ +@Mapper +public interface ScreenUserJoinDao { + + /** + * @Description 查询用户参与数据 + * @param agencyId + * @return + * @author wangc + * @date 2020.08.20 15:07 + **/ + UserJoinIndicatorGrowthRateResultDTO selectUserJoinData(@Param("agencyId") String agencyId, @Param("monthId")String monthId); + + /** + * @Description 查询月度用户参与数据 + * @param agencyId + * @param monthId + * @return + * @author wangc + * @date 2020.08.21 09:54 + **/ + List selectUserJoinDataMonthly(@Param("agencyId")String agencyId,@Param("monthId") String monthId); +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenUserTotalDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenUserTotalDataDao.java new file mode 100644 index 0000000000..a03353e825 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenUserTotalDataDao.java @@ -0,0 +1,71 @@ +/** + * 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.datareport.dao.screen; + +import com.epmet.screen.dto.result.PartymemberPercentResultDTO; +import com.epmet.screen.dto.result.PublicPartiRankResultDTO; +import com.epmet.screen.dto.result.TopProfileResultDTO; +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 2020-08-18 + */ +@Mapper +public interface ScreenUserTotalDataDao { + + /** + * @Description 党员基本情况-饼状图概况 + * @param agencyId + * @return + * @author wangc + * @date 2020.08.18 15:17 + **/ + PartymemberPercentResultDTO selectAgencyPartymemberPercent(@Param("agencyId")String agencyId); + + /** + * @Description 查询top区概况 + * @param agencyId + * @author zxc + * @date 2020/8/19 2:13 下午 + */ + TopProfileResultDTO selectTopProfile(@Param("agencyId")String agencyId); + + /** + * @Description 求出人均议题 + * @param agencyId + * @return + * @author wangc + * @date 2020.08.20 14:54 + **/ + int selectAvgIssue(@Param("agencyId")String agencyId); + + /** + * @Description 查询用户数据 + * @param agencyId + * @return + * @author wangc + * @date 2020.08.20 16:00 + **/ + List selectUserTotalData(@Param("agencyId") String agencyId); +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/topic/TopicDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/topic/TopicDao.java similarity index 97% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/topic/TopicDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/topic/TopicDao.java index 2ab863ab78..4c0fb9d377 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/topic/TopicDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/topic/TopicDao.java @@ -1,6 +1,5 @@ -package com.epmet.dao.topic; +package com.epmet.datareport.dao.topic; -import com.epmet.group.dto.result.GroupIncrTrendResultDTO; import com.epmet.topic.dto.result.*; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/user/UserAnalysisDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/user/UserAnalysisDao.java similarity index 99% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/user/UserAnalysisDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/user/UserAnalysisDao.java index 2df268feb2..c0a69f82fc 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/user/UserAnalysisDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/user/UserAnalysisDao.java @@ -1,4 +1,4 @@ -package com.epmet.dao.user; +package com.epmet.datareport.dao.user; import com.epmet.dto.DimAgencyDTO; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/.gitignore b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/.gitignore similarity index 100% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/.gitignore rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/.gitignore diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/group/GroupService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/group/GroupService.java similarity index 96% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/group/GroupService.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/group/GroupService.java index d644029bcf..66d57fc92c 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/group/GroupService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/group/GroupService.java @@ -1,4 +1,4 @@ -package com.epmet.service.group; +package com.epmet.datareport.service.group; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.group.dto.form.GroupIncrTrendFormDTO; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/group/impl/GroupServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/group/impl/GroupServiceImpl.java similarity index 96% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/group/impl/GroupServiceImpl.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/group/impl/GroupServiceImpl.java index d1be53ee85..be4faf115d 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/group/impl/GroupServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/group/impl/GroupServiceImpl.java @@ -1,15 +1,15 @@ -package com.epmet.service.group.impl; +package com.epmet.datareport.service.group.impl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.security.dto.TokenDto; -import com.epmet.dao.group.GroupDao; +import com.epmet.datareport.dao.group.GroupDao; import com.epmet.dto.form.LoginUserDetailsFormDTO; import com.epmet.dto.result.LoginUserDetailsResultDTO; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.group.constant.GroupConstant; import com.epmet.group.dto.form.GroupIncrTrendFormDTO; import com.epmet.group.dto.result.*; -import com.epmet.service.group.GroupService; +import com.epmet.datareport.service.group.GroupService; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/issue/IssueService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/issue/IssueService.java similarity index 97% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/issue/IssueService.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/issue/IssueService.java index c0d33b2a3b..d0b3b6156d 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/issue/IssueService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/issue/IssueService.java @@ -1,4 +1,4 @@ -package com.epmet.service.issue; +package com.epmet.datareport.service.issue; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.issue.dto.form.IssueIncrtrendFormDTO; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/issue/impl/IssueServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/issue/impl/IssueServiceImpl.java similarity index 97% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/issue/impl/IssueServiceImpl.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/issue/impl/IssueServiceImpl.java index d44576202e..86953616b1 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/issue/impl/IssueServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/issue/impl/IssueServiceImpl.java @@ -1,22 +1,20 @@ -package com.epmet.service.issue.impl; +package com.epmet.datareport.service.issue.impl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.DateUtils; -import com.epmet.dao.issue.IssueDao; +import com.epmet.datareport.dao.issue.IssueDao; import com.epmet.dto.form.LoginUserDetailsFormDTO; import com.epmet.dto.result.LoginUserDetailsResultDTO; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.issue.constant.IssueConstant; import com.epmet.issue.dto.form.IssueIncrtrendFormDTO; import com.epmet.issue.dto.result.*; -import com.epmet.service.issue.IssueService; +import com.epmet.datareport.service.issue.IssueService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.math.BigDecimal; -import java.math.RoundingMode; -import java.text.DecimalFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/project/ProjectService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/ProjectService.java similarity index 100% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/project/ProjectService.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/ProjectService.java diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java similarity index 98% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java index 6e5366827f..41af9351ac 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java @@ -1,10 +1,10 @@ -package com.epmet.service.project.impl; +package com.epmet.datareport.service.project.impl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.DateUtils; -import com.epmet.dao.project.ProjectDao; +import com.epmet.datareport.dao.project.ProjectDao; import com.epmet.dto.form.LoginUserDetailsFormDTO; import com.epmet.dto.result.LoginUserDetailsResultDTO; import com.epmet.feign.EpmetUserOpenFeignClient; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/publicity/PublicityService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/publicity/PublicityService.java similarity index 97% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/publicity/PublicityService.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/publicity/PublicityService.java index bec823066c..35b6fff93b 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/publicity/PublicityService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/publicity/PublicityService.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.service.publicity; +package com.epmet.datareport.service.publicity; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.publicity.dto.result.*; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/publicity/impl/PublicityServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/publicity/impl/PublicityServiceImpl.java similarity index 98% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/publicity/impl/PublicityServiceImpl.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/publicity/impl/PublicityServiceImpl.java index b01f9339bc..9a8ceaca2f 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/publicity/impl/PublicityServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/publicity/impl/PublicityServiceImpl.java @@ -15,16 +15,16 @@ * along with this program. If not, see . */ -package com.epmet.service.publicity.impl; +package com.epmet.datareport.service.publicity.impl; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.DateUtils; -import com.epmet.dao.publicity.PublicityDao; +import com.epmet.datareport.dao.publicity.PublicityDao; import com.epmet.dto.form.LoginUserDetailsFormDTO; import com.epmet.dto.result.LoginUserDetailsResultDTO; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.publicity.dto.result.*; -import com.epmet.service.publicity.PublicityService; +import com.epmet.datareport.service.publicity.PublicityService; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/AgencyService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/AgencyService.java new file mode 100644 index 0000000000..d3eee4f133 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/AgencyService.java @@ -0,0 +1,35 @@ +package com.epmet.datareport.service.screen; + +import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.screen.dto.form.CompartmentFormDTO; +import com.epmet.screen.dto.result.CompartmentResultDTO; +import com.epmet.screen.dto.result.TreeResultDTO; + +import java.util.List; + +/** + * 组织相关api + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:18 + */ +public interface AgencyService { + + /** + * @Description 1、组织机构树 + * @param + * @author zxc + * @date 2020/8/18 2:04 下午 + */ + TreeResultDTO tree(ExternalAppRequestParam externalAppRequestParam); + + /** + * @Description 2、组织区域查询 + * @param compartmentFormDTO + * @author zxc + * @date 2020/8/18 2:33 下午 + */ + CompartmentResultDTO compartment(CompartmentFormDTO compartmentFormDTO); + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/DistributionService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/DistributionService.java new file mode 100644 index 0000000000..62a0d0d7bf --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/DistributionService.java @@ -0,0 +1,56 @@ +package com.epmet.datareport.service.screen; + +import com.epmet.screen.dto.form.*; +import com.epmet.screen.dto.result.*; + +import java.util.List; + +/** + * 中央区相关各指标查询 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:19 + */ +public interface DistributionService { + + /** + * @Description 1、党支部 + * @param formDTO + * @author zxc + * @date 2020/8/18 10:59 上午 + */ + List branch(BranchFormDTO formDTO); + + /** + * @Description 2、用户分布 + * @param userFormDTO + * @author zxc + * @date 2020/8/18 11:10 上午 + */ + UserResultDTO user(UserFormDTO userFormDTO); + + /** + * @Description 3、党员分布 + * @param parymemberFormDTO + * @author zxc + * @date 2020/8/18 11:20 上午 + */ + ParymemberResultDTO parymember(ParymemberFormDTO parymemberFormDTO); + + /** + * @Description 4、事件 + * @param projectFormDTO + * @author zxc + * @date 2020/8/19 1:29 下午 + */ + List project(ProjectFormDTO projectFormDTO); + + /** + * @Description 5、top区概况 + * @param topProfileFormDTO + * @author zxc + * @date 2020/8/19 1:52 下午 + */ + TopProfileResultDTO topProfile(TopProfileFormDTO topProfileFormDTO); + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/GrassRootsGovernService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/GrassRootsGovernService.java new file mode 100644 index 0000000000..12315295b5 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/GrassRootsGovernService.java @@ -0,0 +1,77 @@ +package com.epmet.datareport.service.screen; + +import com.epmet.screen.dto.form.AgencyAndNumFormDTO; +import com.epmet.screen.dto.form.AgencyFormDTO; +import com.epmet.screen.dto.form.AgencyNumTypeParamFormDTO; +import com.epmet.screen.dto.result.*; + +import java.util.List; + +/** + * 基层治理相关各指标查询 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:20 + */ +public interface GrassRootsGovernService { + + /** + * @Description 1、热心市民积分排行 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321544 + * @param param + * @return + * @author wangc + * @date 2020.08.20 11:16 + **/ + UserPointRankResultDTO userPointRank(AgencyAndNumFormDTO param); + + /** + * @Description 2、难点赌点-耗时最长|涉及部门最多|处理次数 + * @NEI https://nei.netease.com/interface/detail/res/?pid=57068&id=321614 + * @param param + * @return + * @author wangc + * @date 2020.08.20 13:55 + **/ + List difficultProject(AgencyNumTypeParamFormDTO param); + + /** + * @Description 3、公众参与概况 + * @NEI https://nei.netease.com/interface/detail/res/?pid=57068&id=321975 + * @param param + * @return + * @author wangc + * @date 2020.08.20 14:37 + **/ + PublicPartiProfileResultDTO publicPartiProfile(AgencyFormDTO param); + + /** + * @Description 4、公众参与-排行榜 + * @NEI https://nei.netease.com/interface/detail/?pid=57068&id=321978 + * @param param + * @return + * @author wangc + * @date 2020.08.20 15:32 + **/ + List publicPartiRank(AgencyAndNumFormDTO param); + + /** + * @Description 5、治理能力榜单 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321627 + * @param param + * @return + * @author wangc + * @date 2020.08.20 17:46 + **/ + List governCapacityRank(AgencyAndNumFormDTO param); + + /** + * @Description 6、公众参与-柱状折线图 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=322434 + * @param param + * @return + * @author wangc + * @date 2020.08.21 09:58 + **/ + PublicPartiChartResultDTO publicPartiChart(AgencyFormDTO param); +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/GrassrootsPartyDevService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/GrassrootsPartyDevService.java new file mode 100644 index 0000000000..a870d21585 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/GrassrootsPartyDevService.java @@ -0,0 +1,58 @@ +package com.epmet.datareport.service.screen; + +import com.epmet.screen.dto.form.BranchBuildRankFormDTO; +import com.epmet.screen.dto.form.BranchBuildTrendFormDTO; +import com.epmet.screen.dto.form.ParymemberFormDTO; +import com.epmet.screen.dto.result.BranchBuildRankResultDTO; +import com.epmet.screen.dto.result.BranchBuildTrendResultDTO; +import com.epmet.screen.dto.result.PartymemberAgeDistributionResultDTO; +import com.epmet.screen.dto.result.PartymemberPercentResultDTO; + +/** + * 基层党建相关各指标查询 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:21 + */ +public interface GrassrootsPartyDevService { + + /** + * @Description 1、党员基本情况-饼状图概况 + * @NEI https://nei.netease.com/interface/detail/res/?pid=57068&id=321324 + * @param param + * @return + * @author wangc + * @date 2020.08.18 14:58 + **/ + PartymemberPercentResultDTO partymemberBaseInfo(ParymemberFormDTO param); + + /** + * @Description 2、党员基本情况-年龄分布 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321980 + * @param param + * @return + * @author wangc + * @date 2020.08.18 17:54 + **/ + PartymemberAgeDistributionResultDTO partymemberAgeDistribution(ParymemberFormDTO param); + + /** + * @Description 3、支部建设情况|联建共建情况-折线图 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321981 + * @param param + * @return BranchBuildTrendResultDTO + * @author wangc + * @date 2020.08.19 11:02 + **/ + BranchBuildTrendResultDTO branchBuildTrend(BranchBuildTrendFormDTO param); + + /** + * @Description 4、支部建设情况|联建共建情况-排行 + * @NEI https://nei.netease.com/interface/detail/res/?pid=57068&id=321982 + * @param param + * @return + * @author wangc + * @date 2020.08.19 15:25 + **/ + BranchBuildRankResultDTO branchBuildRank(BranchBuildRankFormDTO param); +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/IndexService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/IndexService.java new file mode 100644 index 0000000000..5c0b5e4ade --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/IndexService.java @@ -0,0 +1,55 @@ +package com.epmet.datareport.service.screen; + +import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; +import com.epmet.screen.dto.form.MonthBarchartFormDTO; +import com.epmet.screen.dto.form.MonthPieChartFormDTO; +import com.epmet.screen.dto.form.SubAgencyIndexRankFormDTO; +import com.epmet.screen.dto.form.YearAverageIndexFormDTO; +import com.epmet.screen.dto.result.MonthBarchartResultDTO; +import com.epmet.screen.dto.result.MonthPieChartResultDTO; +import com.epmet.screen.dto.result.SubAgencyIndexRankResultDTO; +import com.epmet.screen.dto.result.YearAverageIndexResultDTO; + +import java.util.List; + +/** + * 指数相关相关各指标查询 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:21 + */ +public interface IndexService { + + /** + * @Description 1、年度平均指数 + * @param yearAverageIndexFormDTO + * @author zxc + * @date 2020/8/19 2:53 下午 + */ + YearAverageIndexResultDTO yearAverageIndex(YearAverageIndexFormDTO yearAverageIndexFormDTO); + + /** + * @Description 2、月度指数分析-饼状图 + * @param monthPieChartFormDTO + * @author zxc + * @date 2020/8/19 3:17 下午 + */ + MonthPieChartResultDTO monthPieChart(MonthPieChartFormDTO monthPieChartFormDTO); + + /** + * @Description 3、月度指数分析-柱状图 + * @param monthBarchartFormDTO + * @author zxc + * @date 2020/8/19 5:27 下午 + */ + MonthBarchartResultDTO monthBarchart(MonthBarchartFormDTO monthBarchartFormDTO, ExternalAppRequestParam externalAppRequestParam); + + /** + * @Description 4、下级部门指数排行 + * @param subAgencyIndexRankFormDTO + * @author zxc + * @date 2020/8/20 10:04 上午 + */ + List subAgencyIndexRank(SubAgencyIndexRankFormDTO subAgencyIndexRankFormDTO); + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/PartyMemberLeadService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/PartyMemberLeadService.java new file mode 100644 index 0000000000..5f781b2622 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/PartyMemberLeadService.java @@ -0,0 +1,63 @@ +package com.epmet.datareport.service.screen; + +import com.epmet.screen.dto.form.AgencyAndNumFormDTO; +import com.epmet.screen.dto.form.ContactMassLineChartFormDTO; +import com.epmet.screen.dto.form.FineExampleFormDTO; +import com.epmet.screen.dto.form.VolunteerServiceFormDTO; +import com.epmet.screen.dto.result.*; + +import java.util.List; + +/** + * 党建引领相关各指标查询 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:22 + */ +public interface PartyMemberLeadService { + + /** + * @Description 1、先锋模范 + * @param fineExampleFormDTO + * @author zxc + * @date 2020/8/20 1:56 下午 + */ + FineExampleResultDTO fineExample(FineExampleFormDTO fineExampleFormDTO); + + /** + * @Description 2、党员联系群众 + * @param contactMassLineChartFormDTO + * @author zxc + * @date 2020/8/20 2:35 下午 + */ + ContactMassLineChartResultDTO contactMassLineChart(ContactMassLineChartFormDTO contactMassLineChartFormDTO); + + /** + * @Description 3、党员志愿服务 + * @param volunteerServiceFormDTO + * @author zxc + * @date 2020/8/20 3:19 下午 + */ + VolunteerServiceResultDTO volunteerService(VolunteerServiceFormDTO volunteerServiceFormDTO); + + /** + * @Description 4、先进排行榜单-先进支部排行 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321539 + * @param param + * @return + * @author wangc + * @date 2020.08.21 11:05 + **/ + List advancedBranchRank(AgencyAndNumFormDTO param); + + /** + * @Description 5、先进排行榜单-先进党员排行 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321624 + * @param param + * @return List + * @author wangc + * @date 2020.08.21 14:22 + **/ + List advancedPartymemberRank(AgencyAndNumFormDTO param); + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/ScreenProjectService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/ScreenProjectService.java new file mode 100644 index 0000000000..78543bc52f --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/ScreenProjectService.java @@ -0,0 +1,22 @@ +package com.epmet.datareport.service.screen; + +import com.epmet.screen.dto.form.ProjectDetailFormDTO; +import com.epmet.screen.dto.result.ProjectDetailResultDTO; + +/** + * 项目 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:22 + */ +public interface ScreenProjectService { + + /** + * @Description 3、项目详情 + * @param projectDetailFormDTO + * @author zxc + * @date 2020/8/19 4:36 下午 + */ + ProjectDetailResultDTO projectDetail(ProjectDetailFormDTO projectDetailFormDTO); + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/AgencyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/AgencyServiceImpl.java new file mode 100644 index 0000000000..9ca543828c --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/AgencyServiceImpl.java @@ -0,0 +1,94 @@ +package com.epmet.datareport.service.screen.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.constant.DataSourceConstant; +import com.epmet.datareport.dao.screen.ScreenCustomerAgencyDao; +import com.epmet.datareport.dao.screen.ScreenCustomerGridDao; +import com.epmet.screen.dto.form.CompartmentFormDTO; +import com.epmet.screen.dto.result.AgencyDistributionResultDTO; +import com.epmet.screen.constant.*; +import com.epmet.screen.dto.result.CompartmentResultDTO; +import com.epmet.screen.dto.result.TreeResultDTO; +import com.epmet.datareport.service.screen.AgencyService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 组织相关api + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:18 + */ +@Service +public class AgencyServiceImpl implements AgencyService { + + @Autowired + private ScreenCustomerAgencyDao screenCustomerAgencyDao; + @Autowired + private ScreenCustomerGridDao screenCustomerGridDao; + + /** + * @Description 1、组织机构树 + * @param + * @author zxc + * @date 2020/8/18 2:04 下午 + */ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @Override + public TreeResultDTO tree(ExternalAppRequestParam externalAppRequestParam) { + // 1. 查询客户根组织ID + String customerId = externalAppRequestParam.getCustomerId(); + TreeResultDTO rootAgency = screenCustomerAgencyDao.selectRootAgencyId(customerId); + if (null == rootAgency){ + return new TreeResultDTO(); + } + List departmentList = this.getDepartmentList(("".equals(rootAgency.getPids()) ? "" : rootAgency.getPids() + ",") + rootAgency.getValue()); + rootAgency.setChildren(departmentList); + return rootAgency; + } + + /** + * @Description 递归查询填充下级 + * @param subAgencyPids + * @author zxc + * @date 2020/8/18 4:42 下午 + */ + private List getDepartmentList(String subAgencyPids) { + List subAgencyList = screenCustomerAgencyDao.selectSubAgencyList(subAgencyPids); + if (subAgencyList.size() > NumConstant.ZERO) { + for (TreeResultDTO sub : subAgencyList) { + List subAgency = getDepartmentList(sub.getPids() + "," + sub.getValue()); + sub.setChildren(subAgency); + } + } + return subAgencyList; + } + + /** + * @Description 2、组织区域查询 + * @param compartmentFormDTO + * @author zxc + * @date 2020/8/18 2:33 下午 + */ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @Override + public CompartmentResultDTO compartment(CompartmentFormDTO compartmentFormDTO) { + CompartmentResultDTO agencyAreaInfo = screenCustomerAgencyDao.getAgencyAreaInfo(compartmentFormDTO.getAgencyId()); + if (null == agencyAreaInfo){ + return new CompartmentResultDTO(); + } + if (agencyAreaInfo.getLevel().equals(ScreenConstant.COMMUNITY)){ + // 当level为"community"时,查询screen_customer_grid表 + List agencyDistributionResultDTOS = screenCustomerGridDao.selectSubDistribution(compartmentFormDTO.getAgencyId()); + agencyAreaInfo.setAgencyDistribution(agencyDistributionResultDTOS); + }else { + List agencyDistributionResultDTOS = screenCustomerAgencyDao.selectSubDistribution(compartmentFormDTO.getAgencyId()); + agencyAreaInfo.setAgencyDistribution(agencyDistributionResultDTOS); + } + return agencyAreaInfo; + } +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/DistributionServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/DistributionServiceImpl.java new file mode 100644 index 0000000000..97a627fb23 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/DistributionServiceImpl.java @@ -0,0 +1,133 @@ +package com.epmet.datareport.service.screen.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.constant.DataSourceConstant; +import com.epmet.datareport.dao.screen.ScreenCustomerAgencyDao; +import com.epmet.datareport.dao.screen.ScreenCustomerGridDao; +import com.epmet.datareport.dao.screen.ScreenEventDataDao; +import com.epmet.datareport.dao.screen.ScreenUserTotalDataDao; +import com.epmet.screen.dto.form.*; +import com.epmet.screen.dto.result.*; +import com.epmet.screen.constant.*; +import com.epmet.datareport.service.screen.DistributionService; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; + +/** + * 中央区相关各指标查询 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:19 + */ +@Service +public class DistributionServiceImpl implements DistributionService { + + @Autowired + private ScreenCustomerGridDao screenCustomerGridDao; + @Autowired + private ScreenCustomerAgencyDao screenCustomerAgencyDao; + @Autowired + private ScreenEventDataDao screenEventDataDao; + @Autowired + private ScreenUserTotalDataDao screenUserTotalDataDao; + + /** + * @Description 1、党支部 + * @param formDTO + * @author zxc + * @date 2020/8/18 10:59 上午 + */ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @Override + public List branch(BranchFormDTO formDTO) { + List branchResultDTOS = screenCustomerGridDao.selectBranch(formDTO.getAgencyId()); + return branchResultDTOS; + } + + /** + * @Description 2、用户分布 + * @param userFormDTO + * @author zxc + * @date 2020/8/18 11:10 上午 + */ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @Override + public UserResultDTO user(UserFormDTO userFormDTO) { + UserResultDTO userResult = new UserResultDTO(); + CompartmentResultDTO agencyAreaInfo = screenCustomerAgencyDao.getAgencyAreaInfo(userFormDTO.getAgencyId()); + if (null == agencyAreaInfo){ + return userResult; + } + BeanUtils.copyProperties(agencyAreaInfo,userResult); + if (userResult.getLevel().equals(ScreenConstant.COMMUNITY)){ + List userDistributionResultDTOS = screenCustomerGridDao.selectUserDistribution(userFormDTO.getAgencyId()); + userResult.setUserDistribution(userDistributionResultDTOS); + }else { + List userDistributionResultDTOS = screenCustomerAgencyDao.selectUserDistributionAgency(userFormDTO.getAgencyId()); + userResult.setUserDistribution(userDistributionResultDTOS); + } + return userResult; + } + + /** + * @Description 3、党员分布 + * @param parymemberFormDTO + * @author zxc + * @date 2020/8/18 11:20 上午 + */ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @Override + public ParymemberResultDTO parymember(ParymemberFormDTO parymemberFormDTO) { + ParymemberResultDTO parymemberResult = new ParymemberResultDTO(); + CompartmentResultDTO agencyAreaInfo = screenCustomerAgencyDao.getAgencyAreaInfo(parymemberFormDTO.getAgencyId()); + if (null == agencyAreaInfo){ + return parymemberResult; + } + BeanUtils.copyProperties(agencyAreaInfo,parymemberResult); + if (parymemberResult.getLevel().equals(ScreenConstant.COMMUNITY)){ + List parymemberDistributionResultDTOS = screenCustomerGridDao.selectParymemberDistribution(parymemberFormDTO.getAgencyId()); + parymemberResult.setUserDistribution(parymemberDistributionResultDTOS); + }else { + List parymemberDistributionResultDTOS = screenCustomerAgencyDao.selectParymemberDistribution(parymemberFormDTO.getAgencyId()); + parymemberResult.setUserDistribution(parymemberDistributionResultDTOS); + } + return parymemberResult; + } + + /** + * @Description 4、事件 + * @param projectFormDTO + * @author zxc + * @date 2020/8/19 1:29 下午 + */ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @Override + public List project(ProjectFormDTO projectFormDTO) { + List projectResultDTOS = screenEventDataDao.selectEvent(projectFormDTO.getAgencyId()); + if (projectResultDTOS.size() == NumConstant.ZERO){ + return new ArrayList<>(); + } + return projectResultDTOS; + } + + /** + * @Description 5、top区概况 + * @param topProfileFormDTO + * @author zxc + * @date 2020/8/19 1:52 下午 + */ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @Override + public TopProfileResultDTO topProfile(TopProfileFormDTO topProfileFormDTO) { + TopProfileResultDTO topProfileResultDTO = screenUserTotalDataDao.selectTopProfile(topProfileFormDTO.getAgencyId()); + if (null == topProfileResultDTO){ + return new TopProfileResultDTO(); + } + return topProfileResultDTO; + } +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassRootsGovernServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassRootsGovernServiceImpl.java new file mode 100644 index 0000000000..8b0db2c65a --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassRootsGovernServiceImpl.java @@ -0,0 +1,229 @@ +package com.epmet.datareport.service.screen.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.constant.DataSourceConstant; +import com.epmet.datareport.dao.screen.*; +import com.epmet.datareport.service.screen.GrassRootsGovernService; +import com.epmet.datareport.utils.DateUtils; +import com.epmet.datareport.utils.ModuleConstant; +import com.epmet.screen.dto.form.AgencyAndNumFormDTO; +import com.epmet.screen.dto.form.AgencyFormDTO; +import com.epmet.screen.dto.form.AgencyNumTypeParamFormDTO; +import com.epmet.screen.dto.result.*; +import com.github.pagehelper.PageHelper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * 基层治理相关各指标查询 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:20 + */ +@Service +public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { + + @Autowired + private ScreenPartyUserRankDataDao screenPartyUserRankDataDao; + @Autowired + private ScreenDifficultyDataDao screenDifficultyDataDao; + @Autowired + private ScreenUserJoinDao screenUserJoinDao; + @Autowired + private DateUtils dateUtils; + @Autowired + private ScreenUserTotalDataDao screenUserTotalDataDao; + @Autowired + private ScreenGovernRankDataDao screenGovernRankDataDao; + /** + * @Description 1、热心市民积分排行 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321544 + * @param param + * @return + * @author wangc + * @date 2020.08.20 11:16 + **/ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @Override + public UserPointRankResultDTO userPointRank(AgencyAndNumFormDTO param) { + //默认5 + if(null == param.getTopNum()){ + param.setTopNum(NumConstant.FIVE); + } + PageHelper.startPage(NumConstant.ONE,param.getTopNum()); + List userPointList = screenPartyUserRankDataDao.selectUserPointOrder(param.getAgencyId()); + UserPointRankResultDTO result = new UserPointRankResultDTO(); + result.setNameData(userPointList.stream().map(UserPointResultDTO::getName).collect(Collectors.toList())); + result.setPointsData(userPointList.stream().map(UserPointResultDTO::getPoint).collect(Collectors.toList())); + return result; + } + + + /** + * @Description 2、难点赌点-耗时最长|涉及部门最多|处理次数 + * @NEI https://nei.netease.com/interface/detail/res/?pid=57068&id=321614 + * @param param + * @return + * @author wangc + * @date 2020.08.20 13:55 + **/ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @Override + public List difficultProject(AgencyNumTypeParamFormDTO param) { + if(null == param.getTopNum()){ + param.setTopNum(NumConstant.TWO); + } + PageHelper.startPage(NumConstant.ONE,param.getTopNum()); + List result = screenDifficultyDataDao.selectDifficulty(param.getAgencyId(),param.getType()); + if(null == result) return new ArrayList<>(); + return result; + } + + + /** + * @Description 3、公众参与概况 + * @NEI https://nei.netease.com/interface/detail/res/?pid=57068&id=321975 + * @param param + * @return + * @author wangc + * @date 2020.08.20 14:37 + **/ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @Override + public PublicPartiProfileResultDTO publicPartiProfile(AgencyFormDTO param) { + + String monthId = dateUtils.getPreviousMonthId(); + UserJoinIndicatorGrowthRateResultDTO latest = screenUserJoinDao.selectUserJoinData(param.getAgencyId(), monthId); + if(null == latest) return new PublicPartiProfileResultDTO(); + PublicPartiProfileResultDTO result = ConvertUtils.sourceToTarget(latest,PublicPartiProfileResultDTO.class); + result.setMonthIncr(convertPercentStr(latest.getMonthIncr(),NumConstant.ZERO)); + result.setJoinCompareLatestMonth(convertPercentStr(latest.getJoinCompareLatestMonth(),NumConstant.ZERO)); + result.setIssueCompareLatestMonth(convertPercentStr(latest.getIssueCompareLatestMonth(),NumConstant.ZERO)); + return result; + } + + /** + * @Description 4、公众参与-排行榜 + * @NEI https://nei.netease.com/interface/detail/?pid=57068&id=321978 + * @param param + * @return + * @author wangc + * @date 2020.08.20 15:32 + **/ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @Override + public List publicPartiRank(AgencyAndNumFormDTO param) { + if(null == param.getTopNum()) param.setTopNum(NumConstant.TWO); + if(NumConstant.ZERO == param.getTopNum()) param.setTopNum(NumConstant.MAX); + PageHelper.startPage(NumConstant.ONE,param.getTopNum()); + List result = screenUserTotalDataDao.selectUserTotalData(param.getAgencyId()); + if(null == result) return new ArrayList<>(); + return result; + } + + /** + * @Description 5、治理能力榜单 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321627 + * @param param + * @return + * @author wangc + * @date 2020.08.20 17:46 + **/ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @Override + public List governCapacityRank(AgencyAndNumFormDTO param) { + if(null == param.getTopNum()) param.setTopNum(NumConstant.FIVE); + if(NumConstant.ZERO == param.getTopNum()) param.setTopNum(NumConstant.MAX); + PageHelper.startPage(NumConstant.ONE,param.getTopNum()); + List orderList = + screenGovernRankDataDao.selectGovernCapacityRatio(dateUtils.getPreviousMonthId(),param.getAgencyId()); + if(null == orderList || orderList.isEmpty()) return new ArrayList<>(); + List result = new LinkedList<>(); + orderList.forEach(o -> { + GovernCapacityRankResultDTO rank = new GovernCapacityRankResultDTO(); + rank.setAgencyName(o.getAgencyName()); + rank.setGovernRatio(convertPercentStr(o.getGovernRatio(),NumConstant.ONE)); + rank.setResolvedRatio(convertPercentStr(o.getResolvedRatio(),NumConstant.ONE)); + rank.setResponseRatio(convertPercentStr(o.getResponseRatio(),NumConstant.ONE)); + rank.setSatisfactionRatio(convertPercentStr(o.getSatisfactionRatio(),NumConstant.ONE)); + result.add(rank); + }); + return result; + } + + /** + * @Description 6、公众参与-柱状折线图 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=322434 + * @param param + * @return + * @author wangc + * @date 2020.08.21 09:58 + **/ + @Override + public PublicPartiChartResultDTO publicPartiChart(AgencyFormDTO param) { + Map Xaxis = dateUtils.getXpro(); + List monthlyData = screenUserJoinDao.selectUserJoinDataMonthly(param.getAgencyId(),Xaxis.keySet().iterator().next()); + PublicPartiChartResultDTO result = new PublicPartiChartResultDTO(); + result.setXAxis(Xaxis.values().stream().collect(Collectors.toList())); + List defaultData = new LinkedList<>(); + for(int i = NumConstant.ZERO ; i < NumConstant.TWELVE ; i++){ + defaultData.add(NumConstant.ZERO); + } + if(null == monthlyData || monthlyData.isEmpty()){ + result.setAverageJoinNumList(defaultData); + result.setJoinUserNumList(defaultData); + result.setOrganizeNumList(defaultData); + return result; + } + result.setOrganizeNumList(new ArrayList<>()); + result.setJoinUserNumList(new ArrayList<>()); + result.setAverageJoinNumList(new ArrayList<>()); + Map> dataMap = monthlyData.stream().collect(Collectors.groupingBy(UserJoinMonthlyResultDTO :: getMonthId)); + Xaxis.keySet().stream().forEach(monthId -> { + List data = dataMap.get(monthId); + if(null == data || data.isEmpty()){ + result.getOrganizeNumList().add(NumConstant.ZERO); + result.getJoinUserNumList().add(NumConstant.ZERO); + result.getAverageJoinNumList().add(NumConstant.ZERO); + }else{ + Integer o = NumConstant.ZERO; + Integer j = NumConstant.ZERO; + Integer a = NumConstant.ZERO; + for(UserJoinMonthlyResultDTO unit : data){ + o = null == unit.getOrganizeNum() ? NumConstant.ZERO : o + unit.getOrganizeNum(); + j = null == unit.getJoinUserNum() ? NumConstant.ZERO : o + unit.getJoinUserNum(); + a = null == unit.getAverageJoinNum() ? NumConstant.ZERO : o + unit.getAverageJoinNum(); + } + result.getOrganizeNumList().add(o); + result.getJoinUserNumList().add(j); + result.getAverageJoinNumList().add(a); + } + }); + + return result; + } + + private String convertPercentStr(BigDecimal percent){ + if(null == percent || BigDecimal.ZERO == percent) return "0.00%"; + String percentStr = percent.setScale(NumConstant.TWO, BigDecimal.ROUND_HALF_UP).stripTrailingZeros().toPlainString(); + return percentStr.concat(ModuleConstant.SYMBOL_PERCENT); + } + + private String convertPercentStr(BigDecimal percent,Integer digits){ + if(null == percent) percent = BigDecimal.ZERO; + String percentStr = percent.setScale(digits, BigDecimal.ROUND_HALF_UP).stripTrailingZeros().toPlainString(); + return percentStr.concat(ModuleConstant.SYMBOL_PERCENT); + } + + + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassrootsPartyDevServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassrootsPartyDevServiceImpl.java new file mode 100644 index 0000000000..51a7a49ff6 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassrootsPartyDevServiceImpl.java @@ -0,0 +1,261 @@ +package com.epmet.datareport.service.screen.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.constant.DataSourceConstant; +import com.epmet.datareport.dao.screen.ScreenCpcBaseDataDao; +import com.epmet.datareport.dao.screen.ScreenPartyBranchDataDao; +import com.epmet.datareport.dao.screen.ScreenUserTotalDataDao; +import com.epmet.datareport.utils.ModuleConstant; +import com.epmet.screen.dto.form.BranchBuildRankFormDTO; +import com.epmet.screen.dto.form.BranchBuildTrendFormDTO; +import com.epmet.screen.dto.form.ParymemberFormDTO; +import com.epmet.screen.dto.result.*; +import com.epmet.datareport.service.screen.GrassrootsPartyDevService; +import com.github.pagehelper.PageHelper; +import com.google.common.collect.Maps; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.text.SimpleDateFormat; +import java.util.*; +import java.util.stream.Collectors; + +/** + * 基层党建相关各指标查询 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:21 + */ +@Service +public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService { + + private static final Logger logger = LoggerFactory.getLogger(GrassrootsPartyDevServiceImpl.class); + + @Autowired + private ScreenUserTotalDataDao screenUserTotalDataDao; + @Autowired + private ScreenCpcBaseDataDao screenCpcBaseDataDao; + @Autowired + private ScreenPartyBranchDataDao screenPartyBranchDataDao; + private List issueGroup; + + /** + * @Description 1、党员基本情况-饼状图概况 + * @NEI https://nei.netease.com/interface/detail/res/?pid=57068&id=321324 + * @param param + * @return + * @author wangc + * @date 2020.08.18 14:58 + **/ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @Override + public PartymemberPercentResultDTO partymemberBaseInfo(ParymemberFormDTO param) { + + PartymemberPercentResultDTO result = screenUserTotalDataDao.selectAgencyPartymemberPercent(param.getAgencyId()); + if(null == result){ + logger.warn("com.epmet.datareport.service.screen.impl.GrassrootsPartyDevServiceImpl.partymemberBaseInfo:未查询出指定agencyId下的党员基础信息数据,agencyId :: {}",param.getAgencyId()); + result.setPercentInPlatForm(convertPercentStr(BigDecimal.ZERO)); + return result; + } + //partymember / platform + if(null == result.getPlatFormTotal() || NumConstant.ZERO == result.getPlatFormTotal()){ + result.setPercentInPlatForm(convertPercentStr(BigDecimal.ZERO)); + }else{ + result.setPercentInPlatForm(convertPercentStr(new BigDecimal((result.getPartyMemberTotal().doubleValue()/result.getPlatFormTotal().doubleValue())))); + } + return result; + } + + /** + * @Description 2、党员基本情况-年龄分布 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321980 + * @param param + * @return + * @author wangc + * @date 2020.08.18 17:54 + **/ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @Override + public PartymemberAgeDistributionResultDTO partymemberAgeDistribution(ParymemberFormDTO param) { + return screenCpcBaseDataDao.selectPartymemberAgeDistribution(param.getAgencyId()); + } + + /** + * @Description 3、支部建设情况|联建共建情况-折线图 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321981 + * @param param + * @return BranchBuildTrendResultDTO + * @author wangc + * @date 2020.08.19 11:02 + **/ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @Override + public BranchBuildTrendResultDTO branchBuildTrend(BranchBuildTrendFormDTO param) { + if(StringUtils.equals(ModuleConstant.PARAM_BRANCH_CATEGORY_UNION,param.getCategory())){ + //联建共建情况 + param.setCategory(ModuleConstant.KEY_BRANCH_CATEGORY_UNION); + }else if(StringUtils.equals(ModuleConstant.PARAM_BRANCH_CATEGORY_VOLUNTARY_SERVICE,param.getCategory())){ + //联建党员志愿服务情况 + param.setCategory(ModuleConstant.KEY_BRANCH_CATEGORY_VOLUNTARY_SERVICE); + }else{ + //默认支部建设 + param.setCategory(ModuleConstant.KEY_BRANCH_CATEGORY_PARTY); + } + BranchBuildTrendResultDTO result = new BranchBuildTrendResultDTO(); + //生成近十二个月的横坐标数组 + Map monthMap = getX(); + result.setXAxis(monthMap.values().stream().collect(Collectors.toList())); + + List dataArray = new LinkedList<>(); + List yearlyDataList = + screenPartyBranchDataDao.selectBranchDataByTypeAndTimeZone(param.getAgencyId(),param.getType(),param.getCategory(),monthMap.keySet().iterator().next()); + + + if(null != yearlyDataList && !yearlyDataList.isEmpty()){ + + Map> dataMapByIssue = + yearlyDataList.stream().collect(Collectors.groupingBy(BranchIssueDataResultDTO::getIssue)); + + + result.setLegend(new LinkedList<>(dataMapByIssue.keySet())); + + dataMapByIssue.forEach((issue,val) ->{ + List issueYearlyDataList = val; + List numArray = new LinkedList<>(); + BranchTrendSeriesDataResultDTO data = new BranchTrendSeriesDataResultDTO(); + data.setName(issue); + if(null != issueYearlyDataList && !issueYearlyDataList.isEmpty()){ + monthMap.keySet().forEach( monthId ->{ + Optional optional + = issueYearlyDataList.stream().filter(yearly -> StringUtils.equals(monthId,yearly.getMonthId())).findAny(); + if(optional.isPresent()){ + numArray.add(optional.get().getData()); + }else{ + numArray.add(NumConstant.ZERO); + } + }); + }else{ + for(int i = NumConstant.ZERO ; i < NumConstant.TWELVE ; i++){ + numArray.add(NumConstant.ZERO); + } + } + data.setData(numArray); + dataArray.add(data); + }); + } + + result.setSeriesData(dataArray); + result.setLegend(null == result.getLegend() ? new ArrayList<>() : result.getLegend()); + + return result; + } + + /** + * @Description 4、支部建设情况|联建共建情况-排行 + * @NEI https://nei.netease.com/interface/detail/res/?pid=57068&id=321982 + * @param param + * @return BranchBuildRankResultDTO + * @author wangc + * @date 2020.08.19 15:25 + **/ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @Override + public BranchBuildRankResultDTO branchBuildRank(BranchBuildRankFormDTO param) { + if(StringUtils.equals(ModuleConstant.PARAM_BRANCH_CATEGORY_UNION,param.getCategory())){ + //联建共建情况 + param.setCategory(ModuleConstant.KEY_BRANCH_CATEGORY_UNION); + }else if(StringUtils.equals(ModuleConstant.PARAM_BRANCH_CATEGORY_VOLUNTARY_SERVICE,param.getCategory())){ + //联建党员志愿服务情况 + param.setCategory(ModuleConstant.KEY_BRANCH_CATEGORY_VOLUNTARY_SERVICE); + }else{ + //默认支部建设 + param.setCategory(ModuleConstant.KEY_BRANCH_CATEGORY_PARTY); + } + if(StringUtils.isBlank(param.getMonthId())){ + param.setMonthId(getPreviousMonthId()); + } + if(NumConstant.ZERO == param.getTopNum()) param.setTopNum(NumConstant.MAX); + PageHelper.startPage(NumConstant.ONE,param.getTopNum()); + List orderList = + screenPartyBranchDataDao.selectBranchDataByTypeOrder(param.getAgencyId(),param.getCategory(),param.getMonthId(),param.getBottomMonthId()); + + BranchBuildRankResultDTO result = new BranchBuildRankResultDTO(); + result.setJoinData(new LinkedList<>()); + result.setOrganizeData(new LinkedList<>()); + result.setXAxis(new LinkedList<>()); + for(BranchBuildOrderByCountResultDTO data : orderList){ + result.getXAxis().add(data.getOrgName()); + result.getOrganizeData().add(data.getOrganizeData()); + result.getJoinData().add(data.getJoinData()); + } + return result; + } + + + private String convertPercentStr(BigDecimal percent){ + if(null == percent || BigDecimal.ZERO == percent) return "0.00%"; + String percentStr = percent.setScale(NumConstant.TWO, BigDecimal.ROUND_HALF_UP).stripTrailingZeros().toPlainString(); + return percentStr.concat(ModuleConstant.SYMBOL_PERCENT); + } + + /** + * @Description 返回当前月以及前十一个月,升序 + * @param + * @return Map key:202001 value:1月 + * @author wangc + * @date 2020.08.19 12:46 + **/ + public Map getX(){ + SimpleDateFormat format = new SimpleDateFormat("yyyyMM"); + Calendar calendar = Calendar.getInstance(); + calendar.setTime(new Date()); // 设置为当前时间 + calendar.set(Calendar.MONTH, calendar.get(Calendar.MONTH) - 1); // 设置为上一个月 + String currentMonth = format.format(calendar.getTime()); + Integer monthCounter = Integer.parseInt(currentMonth); + Map monthMap = new HashMap<>(); + int i = NumConstant.ONE; + while(i <= NumConstant.TWELVE){ + + if(monthCounter.toString().endsWith("00")){ + monthCounter -= NumConstant.EIGHTY_EIGHT; + } + + String abscissa = monthCounter.toString().substring(monthCounter.toString().length() - NumConstant.TWO); + if(abscissa.startsWith("0")) { + abscissa = abscissa.replace("0","").concat("月"); + }else{ + abscissa = abscissa.concat("月"); + } + monthMap.put(monthCounter.toString(),abscissa); + monthCounter-- ; + i++; + } + + Map result = Maps.newLinkedHashMap(); + monthMap.entrySet().stream().sorted(Map.Entry.comparingByKey()) + .forEachOrdered((e -> result.put(e.getKey(),e.getValue()))); + + return result; + } + + + /** + * @Description 得到上个月的monthId + * @param + * @return + * @author wangc + * @date 2020.08.20 10:19 + **/ + private String getPreviousMonthId(){ + SimpleDateFormat format = new SimpleDateFormat("yyyyMM"); + Calendar calendar = Calendar.getInstance(); + calendar.setTime(new Date()); // 设置为当前时间 + calendar.set(Calendar.MONTH, calendar.get(Calendar.MONTH) - 1); // 设置为上一个月 + return format.format(calendar.getTime()); + } +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/IndexServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/IndexServiceImpl.java new file mode 100644 index 0000000000..e106a07d45 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/IndexServiceImpl.java @@ -0,0 +1,136 @@ +package com.epmet.datareport.service.screen.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.constant.DataSourceConstant; +import com.epmet.datareport.dao.screen.ScreenIndexDataMonthlyDao; +import com.epmet.datareport.dao.screen.ScreenIndexDataYearlyDao; +import com.epmet.datareport.service.screen.IndexService; +import com.epmet.screen.dto.form.MonthBarchartFormDTO; +import com.epmet.screen.dto.form.MonthPieChartFormDTO; +import com.epmet.screen.dto.form.SubAgencyIndexRankFormDTO; +import com.epmet.screen.dto.form.YearAverageIndexFormDTO; +import com.epmet.screen.dto.result.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Comparator; +import java.util.List; +import java.util.stream.Collectors; + +/** + * 指数相关相关各指标查询 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:21 + */ +@Service +public class IndexServiceImpl implements IndexService { + + @Autowired + private ScreenIndexDataYearlyDao screenIndexDataYearlyDao; + @Autowired + private ScreenIndexDataMonthlyDao screenIndexDataMonthlyDao; + @Autowired + private PartyMemberLeadServiceImpl partyMemberLeadServiceImpl; + + /** + * @Description 1、年度平均指数 + * @param yearAverageIndexFormDTO + * @author zxc + * @date 2020/8/19 2:53 下午 + */ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @Override + public YearAverageIndexResultDTO yearAverageIndex(YearAverageIndexFormDTO yearAverageIndexFormDTO) { + YearAverageIndexResultDTO yearAverageIndexResultDTO = screenIndexDataYearlyDao.selectYearAverageIndex(yearAverageIndexFormDTO.getAgencyId()); + if (null == yearAverageIndexResultDTO){ + return new YearAverageIndexResultDTO(); + } + return yearAverageIndexResultDTO; + } + + /** + * @Description 2、月度指数分析-饼状图 + * @param monthPieChartFormDTO + * @author zxc + * @date 2020/8/19 3:17 下午 + */ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @Override + public MonthPieChartResultDTO monthPieChart(MonthPieChartFormDTO monthPieChartFormDTO) { + MonthPieChartResultDTO monthPieChartResultDTO = screenIndexDataMonthlyDao.selectMonthPieChart(monthPieChartFormDTO.getAgencyId()); + if (null == monthPieChartResultDTO){ + return new MonthPieChartResultDTO(); + } + return monthPieChartResultDTO; + } + + /** + * @Description 3、月度指数分析-柱状图 + * @param monthBarchartFormDTO + * @author zxc + * @date 2020/8/19 5:27 下午 + */ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @Override + public MonthBarchartResultDTO monthBarchart(MonthBarchartFormDTO monthBarchartFormDTO, ExternalAppRequestParam externalAppRequestParam) { + String customerId = externalAppRequestParam.getCustomerId(); + MonthBarchartResultDTO result = new MonthBarchartResultDTO(); + List serviceAbilityData = new ArrayList<>(); + List partyDevAbilityData = new ArrayList<>(); + List governAbilityData = new ArrayList<>(); + List totalIndexData = new ArrayList<>(); + // 1. x轴 + result.setXAxis(partyMemberLeadServiceImpl.getXPro()); + // 2. 查询近一年的指数值【不包括本月】 + List monthBarchartResults = screenIndexDataMonthlyDao.selectMonthBarchart(customerId, monthBarchartFormDTO.getAgencyId()); + if (monthBarchartResults.size() == NumConstant.ZERO){ + for (int i = NumConstant.ZERO; i <= NumConstant.TWELVE; i++) { + serviceAbilityData.add(NumConstant.ZERO_DOT_ZERO); + partyDevAbilityData.add(NumConstant.ZERO_DOT_ZERO); + governAbilityData.add(NumConstant.ZERO_DOT_ZERO); + totalIndexData.add(NumConstant.ZERO_DOT_ZERO); + } + result.setServiceAbilityData(serviceAbilityData); + result.setPartyDevAbilityData(partyDevAbilityData); + result.setGovernAbilityData(governAbilityData); + result.setTotalIndexData(totalIndexData); + return result; + } + List collect = monthBarchartResults.stream().sorted(Comparator.comparing(MonthBarchartResult::getMonthId)).collect(Collectors.toList()); + collect.forEach(month -> { + serviceAbilityData.add(null == month.getServiceAbility() ? NumConstant.ZERO_DOT_ZERO : month.getServiceAbility()); + partyDevAbilityData.add(null == month.getPartyDevAbility() ? NumConstant.ZERO_DOT_ZERO : month.getPartyDevAbility()); + governAbilityData.add(null == month.getGovernAbility() ? NumConstant.ZERO_DOT_ZERO : month.getGovernAbility()); + totalIndexData.add(null == month.getIndexTotal() ? NumConstant.ZERO_DOT_ZERO : month.getIndexTotal()); + }); + result.setServiceAbilityData(serviceAbilityData); + result.setPartyDevAbilityData(partyDevAbilityData); + result.setGovernAbilityData(governAbilityData); + result.setTotalIndexData(totalIndexData); + return result; + } + + /** + * @Description 4、下级部门指数排行 + * @param subAgencyIndexRankFormDTO + * @author zxc + * @date 2020/8/20 10:04 上午 + */ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @Override + public List subAgencyIndexRank(SubAgencyIndexRankFormDTO subAgencyIndexRankFormDTO) { + LocalDate now = LocalDate.now().minusMonths(NumConstant.ONE); + int yearId = now.getYear(); + subAgencyIndexRankFormDTO.setYearId(String.valueOf(yearId)); + List subAgencyIndexRankResultDTOS = screenIndexDataMonthlyDao.selectSubAgencyIndexRank(subAgencyIndexRankFormDTO); + if (subAgencyIndexRankResultDTOS.size() == NumConstant.ZERO){ + return new ArrayList<>(); + } + return subAgencyIndexRankResultDTOS; + } +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/PartyMemberLeadServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/PartyMemberLeadServiceImpl.java new file mode 100644 index 0000000000..b1cecb92bb --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/PartyMemberLeadServiceImpl.java @@ -0,0 +1,224 @@ +package com.epmet.datareport.service.screen.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.constant.DataSourceConstant; +import com.epmet.datareport.dao.screen.ScreenOrgRankDataDao; +import com.epmet.datareport.dao.screen.ScreenPartyBranchDataDao; +import com.epmet.datareport.dao.screen.ScreenPartyLinkMassesDataDao; +import com.epmet.datareport.dao.screen.ScreenPioneerDataDao; +import com.epmet.datareport.dao.screen.ScreenPartyUserRankDataDao; +import com.epmet.datareport.service.screen.PartyMemberLeadService; +import com.epmet.datareport.utils.DateUtils; +import com.epmet.datareport.utils.ModuleConstant; +import com.epmet.screen.dto.form.AgencyAndNumFormDTO; +import com.epmet.screen.dto.form.ContactMassLineChartFormDTO; +import com.epmet.screen.dto.form.FineExampleFormDTO; +import com.epmet.screen.dto.form.VolunteerServiceFormDTO; +import com.epmet.screen.dto.result.*; +import com.epmet.screen.constant.*; +import com.github.pagehelper.PageHelper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.time.LocalDate; +import java.util.*; +import java.util.stream.Collectors; + +/** + * 党建引领相关各指标查询 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:22 + */ +@Service +public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { + + @Autowired + private ScreenPartyLinkMassesDataDao screenPartyLinkMassesDataDao; + @Autowired + private ScreenPartyBranchDataDao screenPartyBranchDataDao; + @Autowired + private ScreenPioneerDataDao screenPioneerDataDao; + @Autowired + private ScreenOrgRankDataDao screenOrgRankDataDao; + @Autowired + private DateUtils dateUtils; + @Autowired + private ScreenPartyUserRankDataDao screenPartyUserRankDataDao; + + /** + * @Description 1、先锋模范 + * @param fineExampleFormDTO + * @author zxc + * @date 2020/8/20 1:56 下午 + */ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @Override + public FineExampleResultDTO fineExample(FineExampleFormDTO fineExampleFormDTO) { + FineExampleResultDTO fineExampleResultDTO = screenPioneerDataDao.selectFineExample(fineExampleFormDTO.getAgencyId()); + if (null == fineExampleResultDTO){ + return new FineExampleResultDTO(); + } + fineExampleResultDTO.setIssueRatio(this.getRatio(fineExampleResultDTO.getIssueRatioA())); + fineExampleResultDTO.setPublishIssueRatio(this.getRatio(fineExampleResultDTO.getPublishIssueRatioA())); + fineExampleResultDTO.setResolvedProjectRatio(this.getRatio(fineExampleResultDTO.getResolvedProjectRatioA())); + fineExampleResultDTO.setTopicRatio(this.getRatio(fineExampleResultDTO.getTopicRatioA())); + fineExampleResultDTO.setShiftProjectRatio(this.getRatio(fineExampleResultDTO.getShiftProjectRatioA())); + return fineExampleResultDTO; + } + + /** + * @Description 小数转换百分比 + * @param d + * @author zxc + * @date 2020/8/20 6:06 下午 + */ + public String getRatio(Double d){ + BigDecimal bigDecimal = new BigDecimal(d * NumConstant.ONE_HUNDRED); + return bigDecimal.setScale(NumConstant.TWO, BigDecimal.ROUND_HALF_UP).toPlainString().concat(ScreenConstant.RATIO); + } + + /** + * @Description 2、党员联系群众 + * @param contactMassLineChartFormDTO + * @author zxc + * @date 2020/8/20 2:35 下午 + */ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @Override + public ContactMassLineChartResultDTO contactMassLineChart(ContactMassLineChartFormDTO contactMassLineChartFormDTO) { + ContactMassLineChartResultDTO result = new ContactMassLineChartResultDTO(); + List contactMassLineChartResults = screenPartyLinkMassesDataDao.selectContactMassLineChart(contactMassLineChartFormDTO.getAgencyId()); + if (contactMassLineChartResults.size() == NumConstant.ZERO){ + result.setXAxis(new ArrayList<>()); + result.setGroupMemberData(new ArrayList<>()); + result.setGroupData(new ArrayList<>()); + return result; + } + List xAxis = new ArrayList<>(); + List groupData = new ArrayList<>(); + List groupMemberData = new ArrayList<>(); + contactMassLineChartResults.forEach(contact -> { + xAxis.add(contact.getOrgName()); + groupData.add(contact.getGroupTotal()); + groupMemberData.add(contact.getUserTotal()); + }); + result.setXAxis(xAxis); + result.setGroupData(groupData); + result.setGroupMemberData(groupMemberData); + return result; + } + + /** + * @Description 3、党员志愿服务 + * @param volunteerServiceFormDTO + * @author zxc + * @date 2020/8/20 3:19 下午 + */ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @Override + public VolunteerServiceResultDTO volunteerService(VolunteerServiceFormDTO volunteerServiceFormDTO) { + VolunteerServiceResultDTO result = new VolunteerServiceResultDTO(); + List organizeData = new ArrayList<>(); + List joinData = new ArrayList<>(); + List averageJoinUserData = new ArrayList<>(); + result.setXAxis(this.getXPro()); + List volunteerServiceResults = screenPartyBranchDataDao.selectVolunteerServiceResult(volunteerServiceFormDTO.getAgencyId()); + if (volunteerServiceResults.size() == NumConstant.ZERO){ + for (int i = NumConstant.ZERO; i <= NumConstant.TWELVE; i++) { + organizeData.add(NumConstant.ZERO); + joinData.add(NumConstant.ZERO); + averageJoinUserData.add(NumConstant.ZERO); + } + result.setOrganizeData(organizeData); + result.setJoinData(joinData); + result.setAverageJoinUserData(averageJoinUserData); + return result; + } + List collect = volunteerServiceResults.stream().sorted(Comparator.comparing(VolunteerServiceResult::getMonthId)).collect(Collectors.toList()); + collect.forEach(volunteer -> { + organizeData.add(volunteer.getOrganizeData()); + joinData.add(volunteer.getJoinData()); + averageJoinUserData.add(volunteer.getAverageJoinUserData()); + }); + result.setOrganizeData(organizeData); + result.setJoinData(joinData); + result.setAverageJoinUserData(averageJoinUserData); + return result; + } + + /** + * @Description 获取之前的12个月份【不包括当前月】 + * @author zxc + * @date 2020/8/21 10:19 上午 + */ + public List getXPro(){ + List xAxis = new ArrayList<>(); + LocalDate today = LocalDate.now(); + for(int i = NumConstant.TWELVE;i >= NumConstant.ONE; i--){ + LocalDate localDate = today.minusMonths(i); + String s = localDate.getMonth().getValue() + ScreenConstant.MONTH; + xAxis.add(s); + } + return xAxis; + } + + /** + * @Description 4、先进排行榜单-先进支部排行 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321539 + * @param param + * @return + * @author wangc + * @date 2020.08.21 11:05 + **/ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @Override + public List advancedBranchRank(AgencyAndNumFormDTO param) { + if(null == param.getTopNum()){ + param.setTopNum(NumConstant.FIVE); + }else if(NumConstant.ZERO == param.getTopNum()){ + param.setTopNum(NumConstant.MAX); + } + PageHelper.startPage(NumConstant.ONE,param.getTopNum()); + List gridData = + screenOrgRankDataDao.selectGridDataMonthly(param.getAgencyId(),dateUtils.getPreviousMonthId()); + List result = new LinkedList<>(); + if(null == gridData || gridData.isEmpty()) return result; + gridData.forEach( data -> { + AdvanceBranchRankResultDTO o = ConvertUtils.sourceToTarget(data,AdvanceBranchRankResultDTO.class); + o.setClosedProjectRatio(convertPercentStr(data.getClosedProjectRatio())); + o.setSatisfactionRatio(convertPercentStr(data.getSatisfactionRatio())); + result.add(o); + }); + + return result; + } + + /** + * @Description 5、先进排行榜单-先进党员排行 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321624 + * @param param + * @return List + * @author wangc + * @date 2020.08.21 14:22 + **/ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @Override + public List advancedPartymemberRank(AgencyAndNumFormDTO param) { + if(null == param.getTopNum()) param.setTopNum(NumConstant.TEN); + PageHelper.startPage(NumConstant.ONE,param.getTopNum()); + List result = screenPartyUserRankDataDao.selectPartymemberPointOrder(param.getAgencyId()); + if(null == result) return new ArrayList<>(); + return result; + } + + + private String convertPercentStr(BigDecimal percent){ + if(null == percent || BigDecimal.ZERO == percent) return "0.0%"; + String percentStr = percent.setScale(NumConstant.ONE, BigDecimal.ROUND_HALF_UP).stripTrailingZeros().toPlainString(); + return percentStr.concat(ModuleConstant.SYMBOL_PERCENT); + } +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/ScreenProjectServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/ScreenProjectServiceImpl.java new file mode 100644 index 0000000000..dce609636d --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/ScreenProjectServiceImpl.java @@ -0,0 +1,46 @@ +package com.epmet.datareport.service.screen.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.constant.DataSourceConstant; +import com.epmet.datareport.dao.screen.ScreenEventDataDao; +import com.epmet.datareport.dao.screen.ScreenEventImgDataDao; +import com.epmet.datareport.service.screen.ScreenProjectService; +import com.epmet.screen.dto.form.ProjectDetailFormDTO; +import com.epmet.screen.dto.result.ProjectDetailResultDTO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 项目 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:23 + */ +@Service +public class ScreenProjectServiceImpl implements ScreenProjectService { + + @Autowired + private ScreenEventDataDao screenEventDataDao; + @Autowired + private ScreenEventImgDataDao screenEventImgDataDao; + + /** + * @Description 3、项目详情 + * @param projectDetailFormDTO + * @author zxc + * @date 2020/8/19 4:36 下午 + */ + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) + @Override + public ProjectDetailResultDTO projectDetail(ProjectDetailFormDTO projectDetailFormDTO) { + ProjectDetailResultDTO projectDetailResultDTO = screenEventDataDao.selectEventDetail(projectDetailFormDTO.getProjectId()); + if (null == projectDetailResultDTO){ + return new ProjectDetailResultDTO(); + } + List imgList = screenEventImgDataDao.selectEventImgList(projectDetailFormDTO.getProjectId()); + projectDetailResultDTO.setImgList(imgList); + return projectDetailResultDTO; + } +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/topic/TopicService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/topic/TopicService.java similarity index 96% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/topic/TopicService.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/topic/TopicService.java index 584ac1b1dc..f0dd505cb4 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/topic/TopicService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/topic/TopicService.java @@ -1,4 +1,4 @@ -package com.epmet.service.topic; +package com.epmet.datareport.service.topic; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.topic.dto.form.TopicIncrTrendFormDTO; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/topic/impl/TopicServiceImpl.java similarity index 97% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/topic/impl/TopicServiceImpl.java index 298dcae7a3..12889caaae 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/topic/impl/TopicServiceImpl.java @@ -1,13 +1,12 @@ -package com.epmet.service.topic.impl; +package com.epmet.datareport.service.topic.impl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.security.dto.TokenDto; -import com.epmet.dao.topic.TopicDao; +import com.epmet.datareport.dao.topic.TopicDao; import com.epmet.dto.form.LoginUserDetailsFormDTO; import com.epmet.dto.result.LoginUserDetailsResultDTO; import com.epmet.feign.EpmetUserOpenFeignClient; -import com.epmet.group.constant.GroupConstant; -import com.epmet.service.topic.TopicService; +import com.epmet.datareport.service.topic.TopicService; import com.epmet.topic.constant.TopicConstant; import com.epmet.topic.dto.form.TopicIncrTrendFormDTO; import com.epmet.topic.dto.result.*; @@ -16,8 +15,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.math.BigDecimal; -import java.text.DecimalFormat; -import java.text.NumberFormat; import java.time.LocalDate; import java.util.*; import java.util.stream.Collectors; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/user/UserAnalysisService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/UserAnalysisService.java similarity index 98% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/user/UserAnalysisService.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/UserAnalysisService.java index 2c658fc1da..47c304f1b2 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/user/UserAnalysisService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/UserAnalysisService.java @@ -1,4 +1,4 @@ -package com.epmet.service.user; +package com.epmet.datareport.service.user; import com.epmet.dto.form.user.UserIncrTrendFormDTO; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/user/impl/UserAnalysisServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/impl/UserAnalysisServiceImpl.java similarity index 99% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/user/impl/UserAnalysisServiceImpl.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/impl/UserAnalysisServiceImpl.java index 3244076896..88e39067b4 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/user/impl/UserAnalysisServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/impl/UserAnalysisServiceImpl.java @@ -1,4 +1,4 @@ -package com.epmet.service.user.impl; +package com.epmet.datareport.service.user.impl; import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.constant.NumConstant; @@ -7,7 +7,7 @@ import com.epmet.commons.tools.security.user.LoginUserUtil; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.UserAnalysisConstant; -import com.epmet.dao.user.UserAnalysisDao; +import com.epmet.datareport.dao.user.UserAnalysisDao; import com.epmet.dto.DimAgencyDTO; import com.epmet.dto.DimDepartmentDTO; import com.epmet.dto.DimGridDTO; @@ -19,7 +19,7 @@ import com.epmet.dto.form.user.UserSummaryInfoFormDTO; import com.epmet.dto.result.LoginUserDetailsResultDTO; import com.epmet.dto.result.user.*; import com.epmet.feign.EpmetUserOpenFeignClient; -import com.epmet.service.user.UserAnalysisService; +import com.epmet.datareport.service.user.UserAnalysisService; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/utils/DateUtils.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/utils/DateUtils.java new file mode 100644 index 0000000000..6db1756fdb --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/utils/DateUtils.java @@ -0,0 +1,128 @@ +package com.epmet.datareport.utils; + +import com.epmet.commons.tools.constant.NumConstant; +import com.google.common.collect.Maps; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Component; + +import java.text.SimpleDateFormat; +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; +import java.util.*; +import java.util.stream.Collectors; + +/** + * @Description + * @ClassName DateUtils + * @Auth wangc + * @Date 2020-08-20 10:56 + */ +@Component +public class DateUtils { + private static SimpleDateFormat defaultFormat = new SimpleDateFormat("yyyyMM"); + private static DateTimeFormatter fmt = DateTimeFormatter.ofPattern("yyyyMM"); + /** + * @Description 返回当前月以及前十一个月,升序 + * @param + * @return Map key:202001 value:1月 + * @author wangc + * @date 2020.08.19 12:46 + **/ + public Map getX(){ + Calendar calendar = Calendar.getInstance(); + calendar.setTime(new Date()); // 设置为当前时间 + calendar.set(Calendar.MONTH, calendar.get(Calendar.MONTH) - 1); // 设置为上一个月 + String currentMonth = defaultFormat.format(calendar.getTime()); + Integer monthCounter = Integer.parseInt(currentMonth); + Map monthMap = new HashMap<>(); + int i = NumConstant.ONE; + while(i <= NumConstant.TWELVE){ + + if(monthCounter.toString().endsWith("00")){ + monthCounter -= NumConstant.EIGHTY_EIGHT; + } + + String abscissa = monthCounter.toString().substring(monthCounter.toString().length() - NumConstant.TWO); + if(abscissa.startsWith("0")) { + abscissa = abscissa.replace("0","").concat("月"); + }else{ + abscissa = abscissa.concat("月"); + } + monthMap.put(monthCounter.toString(),abscissa); + monthCounter-- ; + i++; + } + + Map result = Maps.newLinkedHashMap(); + monthMap.entrySet().stream().sorted(Map.Entry.comparingByKey()) + .forEachOrdered((e -> result.put(e.getKey(),e.getValue()))); + + return result; + } + + public Map getXpro(){ + Map xAxis = new HashMap<>(); + LocalDate today = LocalDate.now(); + + for(int i = NumConstant.TWELVE;i >= NumConstant.ONE; i--){ + LocalDate localDate = today.minusMonths(i); + String s = localDate.getMonth().getValue() + "月"; + xAxis.put(localDate.format(fmt),s); + } + Map result = Maps.newLinkedHashMap(); + xAxis.entrySet().stream().sorted(Map.Entry.comparingByKey()) + .forEachOrdered((e -> result.put(e.getKey(),e.getValue()))); + return result; + } + + /** + * @Description 得到上个月的monthId + * @param + * @return + * @author wangc + * @date 2020.08.20 10:19 + **/ + public String getPreviousMonthId(){ + SimpleDateFormat format = new SimpleDateFormat("yyyyMM"); + Calendar calendar = Calendar.getInstance(); + calendar.setTime(new Date()); // 设置为当前时间 + calendar.set(Calendar.MONTH, calendar.get(Calendar.MONTH) - 1); // 设置为上一个月 + return format.format(calendar.getTime()); + } + + public String getPreviousMonthIdByDest(Date date,String dateStr){ + SimpleDateFormat format = new SimpleDateFormat("yyyyMM"); + Calendar c = Calendar.getInstance(); + if(null == date && StringUtils.isNotBlank(dateStr)){ + try{ + date = format.parse(dateStr); + + }catch(Exception e){ + e.printStackTrace(); + } + }else{ + return null; + } + c.setTime(date); + c.add(Calendar.MONTH, NumConstant.ONE_NEG); + return format.format(c.getTime()); + } + + public static void main(String[] args) { + DateUtils util = new DateUtils(); + Map result = util.getXpro(); + result.forEach((k,v) -> { + System.out.print(k); + System.out.print(" -> "); + System.out.print(v); + System.out.println(); + }); + + List xLine = result.values().stream().collect(Collectors.toList()); + xLine.forEach(x -> { + System.out.println(x); + }); + + result.keySet().forEach(key -> System.out.println(key)); + } +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/utils/ModuleConstant.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/utils/ModuleConstant.java new file mode 100644 index 0000000000..9314d3ba3b --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/utils/ModuleConstant.java @@ -0,0 +1,24 @@ +package com.epmet.datareport.utils; + +public interface ModuleConstant { + + String PARAM_BRANCH_CATEGORY_UNION = "ljgj"; + + String PARAM_BRANCH_CATEGORY_VOLUNTARY_SERVICE = "ljdyzy"; + + String PARAM_BRANCH_CATEGORY_PARTY = "zbjs"; + + String KEY_BRANCH_CATEGORY_UNION = "union"; + + String KEY_BRANCH_CATEGORY_VOLUNTARY_SERVICE = "voluntaryservice"; + + String KEY_BRANCH_CATEGORY_PARTY = "party"; + + String SYMBOL_PERCENT = "%"; + + String PARAM_DIFFICULTY_TYPE_TIME_LONGEST = "timelongest"; + + String PARAM_DIFFICULTY_TYPE_MOST_DEPTS = "mostdepts"; + + String PARAM_DIFFICULTY_TYPE_MOST_HANDLED = "mosthandled"; +} diff --git a/epmet-module/data-report/data-report-server/src/main/resources/bootstrap.yml b/epmet-module/data-report/data-report-server/src/main/resources/bootstrap.yml index 19e6e4b584..d4db395aa8 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/bootstrap.yml +++ b/epmet-module/data-report/data-report-server/src/main/resources/bootstrap.yml @@ -24,9 +24,9 @@ spring: druid: #MySQL driver-class-name: com.mysql.cj.jdbc.Driver - url: @datasource.druid.url@ - username: @datasource.druid.username@ - password: @datasource.druid.password@ + url: @datasource.druid.stats.url@ + username: @datasource.druid.stats.username@ + password: @datasource.druid.stats.password@ cloud: nacos: discovery: @@ -53,11 +53,11 @@ spring: # 数据迁移工具flyway flyway: - enabled: false + enabled: @spring.flyway.enabled@ locations: classpath:db/migration - url: @datasource.druid.url@ - user: @datasource.druid.username@ - password: @datasource.druid.password@ + url: @datasource.druid.stats.url@ + user: @datasource.druid.stats.username@ + password: @datasource.druid.stats.password@ baseline-on-migrate: true baseline-version: 0 @@ -91,6 +91,20 @@ mybatis-plus: call-setters-on-nulls: true jdbc-type-for-null: 'null' +#动态数据源 +dynamic: + datasource: + stats: + driver-class-name: com.mysql.cj.jdbc.Driver + url: @datasource.druid.stats.url@ + username: @datasource.druid.stats.username@ + password: @datasource.druid.stats.password@ + statsDisplay: + driver-class-name: com.mysql.cj.jdbc.Driver + url: @datasource.druid.statsdisplay.url@ + username: @datasource.druid.statsdisplay.username@ + password: @datasource.druid.statsdisplay.password@ + feign: hystrix: enabled: true diff --git a/epmet-module/data-report/data-report-server/src/main/resources/logback-spring.xml b/epmet-module/data-report/data-report-server/src/main/resources/logback-spring.xml index ad10364cb5..08a6a198d1 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/logback-spring.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/logback-spring.xml @@ -137,13 +137,14 @@ - - - - - - - + + + + + + + + @@ -156,13 +157,13 @@ - - - - - - - + + + + + + + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/group/GroupDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/group/GroupDao.xml index b3b1faecd7..159a814a61 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/group/GroupDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/group/GroupDao.xml @@ -1,7 +1,7 @@ - + SELECT AGENCY_ID, diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/project/ProjectDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/project/ProjectDao.xml index 9ea5c548d6..21b472e4de 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/project/ProjectDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/project/ProjectDao.xml @@ -1,7 +1,7 @@ - + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml new file mode 100644 index 0000000000..3fc9c990b3 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml @@ -0,0 +1,22 @@ + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml new file mode 100644 index 0000000000..cfdb8da6de --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerDeptDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerDeptDao.xml new file mode 100644 index 0000000000..58e2171c3d --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerDeptDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml new file mode 100644 index 0000000000..988e0b17cd --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml new file mode 100644 index 0000000000..ab381cebba --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml @@ -0,0 +1,34 @@ + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml new file mode 100644 index 0000000000..63cadbbd5e --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenEventImgDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenEventImgDataDao.xml new file mode 100644 index 0000000000..e5e3e636af --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenEventImgDataDao.xml @@ -0,0 +1,16 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml new file mode 100644 index 0000000000..3fb4174055 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml @@ -0,0 +1,25 @@ + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml new file mode 100644 index 0000000000..21293ad4c6 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml new file mode 100644 index 0000000000..3d9329846d --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml @@ -0,0 +1,21 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml new file mode 100644 index 0000000000..f83ec244d7 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml @@ -0,0 +1,34 @@ + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml new file mode 100644 index 0000000000..8fbf102170 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml new file mode 100644 index 0000000000..5643b1e31b --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml @@ -0,0 +1,18 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml new file mode 100644 index 0000000000..66fb4d6a80 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml new file mode 100644 index 0000000000..5e509c8329 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml @@ -0,0 +1,27 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml new file mode 100644 index 0000000000..8f17dc796a --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml new file mode 100644 index 0000000000..a1700b05a4 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/topic/TopicDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/topic/TopicDao.xml index 01d4a5d335..3b96ffc150 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/topic/TopicDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/topic/TopicDao.xml @@ -1,7 +1,7 @@ - + SELECT diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/CompareConstant.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/CompareConstant.java new file mode 100644 index 0000000000..119cd1ca31 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/CompareConstant.java @@ -0,0 +1,26 @@ +package com.epmet.constant; + +/** + * 比较结果常量 + * + * @author yujintao + * @email yujintao@elink-cn.com + * @date 2019/8/19 10:28 + */ +public interface CompareConstant { + + /** + * 增加 + */ + String INCR_STR = "incr"; + + /** + * 下降 + */ + String DECR_STR = "decr"; + + /** + * 相等 + */ + String EQ_STR = "eq"; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/DeptGovrnAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/DeptGovrnAbilityFormDTO.java new file mode 100644 index 0000000000..50cc040c44 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/DeptGovrnAbilityFormDTO.java @@ -0,0 +1,77 @@ +package com.epmet.dto.indexcollect.form; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 8、治理能力-部门相关指标 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class DeptGovrnAbilityFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 机关id:网格所属的组织id + */ + private String agencyId; + + /** + * 上级组织id + */ + private String deptId; + + /** + * yyyyMM + */ + private String monthId; + + /** + * yyyyQ1, yyyyQ2, yyyyQ3, yyyyQ4 + */ + private String quarterId; + + /** + * yyyy + */ + private String yearId; + + /** + * allRegion:全区;community:社区;street:街道 + */ + private String dataType; + + /** + * 区直部门被吹哨次数 + */ + private Integer transferedCount; + + /** + * 区直部门办结项目数 + */ + private Integer closedProjectCount; + + /** + * 区直部门项目响应度 所有被吹哨后的滞留时间除以项目数 + */ + private BigDecimal respProjectRatio; + + /** + * 区直部门办结项目的处理效率 + */ + private BigDecimal handleProjectRatio; + + /** + * 区直部门项目办结率 + */ + private BigDecimal closedProjectRatio; + + /** + * 办结项目满意度 + */ + private BigDecimal satisfactionRatio; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridGovrnAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridGovrnAbilityFormDTO.java new file mode 100644 index 0000000000..ef4efd6a24 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridGovrnAbilityFormDTO.java @@ -0,0 +1,82 @@ +package com.epmet.dto.indexcollect.form; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 6、治理能力-网格相关指标 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class GridGovrnAbilityFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 机关id:网格所属的组织id + */ + private String agencyId; + + /** + * 网格id + */ + private String gridId; + + /** + * yyyyMM + */ + private String monthId; + + /** + * yyyyQ1, yyyyQ2, yyyyQ3, yyyyQ4 + */ + private String quarterId; + + /** + * yyyy + */ + private String yearId; + + /** + * 网格总议题数 + */ + private Integer issueTotal; + + /** + * 网格人均议题数目 + */ + private Integer avgIssueCount; + + /** + * 网格总项目数 + */ + private Integer projectTotal; + + /** + * 网格办结项目数 + */ + private Integer resolveProjectCount; + + /** + * 网格吹哨部门准确率 + */ + private BigDecimal transferRightRatio; + + /** + * 网格内解决的项目的满意度 + */ + private BigDecimal satisfactionRatio; + + /** + * 网格议题转项目率 + */ + private BigDecimal avgShiftProjectRatio; + + /** + * 网格自治项目数 统计期网格自身内办结的项目数目 + */ + private Integer selfSolveProjectCount; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridPartyAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridPartyAbilityFormDTO.java new file mode 100644 index 0000000000..8738c5c3f2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridPartyAbilityFormDTO.java @@ -0,0 +1,107 @@ +package com.epmet.dto.indexcollect.form; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 2、党建能力-网格相关指标上报(按照月份) 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class GridPartyAbilityFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 机关id:网格所属的组织id + */ + private String agencyId; + + /** + * 网格id + */ + private String gridId; + + /** + * yyyyMM + */ + private String monthId; + + /** + * yyyyQ1, yyyyQ2, yyyyQ3, yyyyQ4 + */ + private String quarterId; + + /** + * yyyy + */ + private String yearId; + + /** + * 网格党员用户数 + */ + private Integer partyCount; + + /** + * 网格党员人均提出的议题转项目数 + */ + private Integer partyAvgShiftProjectCount; + + /** + * 网格活跃群众用户数 + */ + private Integer activeUserCount; + + /** + * 网格活跃党员用户数 + */ + private Integer activePartyCount; + + /** + * 网格党员人均提出话题数 + */ + private Integer partyAvgTopicCount; + + /** + * 网格群众人均提出话题数 + */ + private Integer userAvgTopicCount; + + /** + * 网格群众用户数 + */ + private Integer userCount; + + /** + * 网格群众人均提出的议题转项目数 + */ + private Integer userAvgShiftProjectCount; + + /** + * 建群党员数(累计值) + */ + private Integer createGroupPartyCount; + + /** + * 网格发文数 + */ + private Integer publishArticleCount; + + /** + * 网格议题转项目率 + */ + private BigDecimal issueToProjectRatio; + + /** + * 组织三会一课次数 + */ + private Integer createThreeMeetsCount; + + /** + * 党员参加三会一课人次 + */ + private Integer joinThreeMeetsCount; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridPartyMemberDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridPartyMemberDataFormDTO.java new file mode 100644 index 0000000000..7993cb2355 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridPartyMemberDataFormDTO.java @@ -0,0 +1,98 @@ +package com.epmet.dto.indexcollect.form; + +import lombok.Data; +import org.apache.poi.hpsf.Decimal; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 1、党建能力-党员相关指标上报(按照月份) 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class GridPartyMemberDataFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 机关id:网格所属的组织id + */ + private String agencyId; + + /** + * 网格id + */ + private String gridId; + + /** + * yyyyMM + */ + private String monthId; + + /** + * yyyyQ1, yyyyQ2, yyyyQ3, yyyyQ4 + */ + private String quarterId; + + /** + * yyyy + */ + private String yearId; + + /** + * 党员提出的话题数 + */ + private Integer createTopicCount; + + /** + * 党员参与话题数(支持,反对,评论,浏览) + */ + private Integer joinTopicCount; + + /** + * 话题转议题数 + */ + private Integer shiftIssueCount; + + /** + * 议题转项目数 + */ + private Integer shiftProjectCount; + + /** + * 参加三会一课次数 + */ + private Integer joinThreeMeetsCount; + + /** + * 自建群群众人数 + */ + private Integer groupUserCount; + + /** + * 自建群活跃度-话题数 + */ + private Integer groupTopicCount; + + /** + * 议题转项目率 + */ + private BigDecimal topicToIssueRatio; + + /** + * 提出的议题转项目数 + */ + private Integer issueToProjectCount; + + /** + * 用户id + */ + private String userId; + + /** + * 上级组织Id + */ + private String parentId; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridServiceAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridServiceAbilityFormDTO.java new file mode 100644 index 0000000000..02b7906a36 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridServiceAbilityFormDTO.java @@ -0,0 +1,58 @@ +package com.epmet.dto.indexcollect.form; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 4、服务能力-网格相关指标 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class GridServiceAbilityFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 机关id:网格所属的组织id + */ + private String agencyId; + + /** + * 网格id + */ + private String gridId; + + /** + * yyyyMM + */ + private String monthId; + + /** + * yyyyQ1, yyyyQ2, yyyyQ3, yyyyQ4 + */ + private String quarterId; + + /** + * yyyy + */ + private String yearId; + + /** + * 网格活动组织次数 爱心活动 + */ + private Integer activityCount; + + /** + * 网格志愿者占比 + */ + private Integer volunteerRatio; + + /** + * 网格党员志愿者率 + */ + private BigDecimal partyVolunteerRatio; + +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgGovrnAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgGovrnAbilityFormDTO.java new file mode 100644 index 0000000000..7ddb9e785a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgGovrnAbilityFormDTO.java @@ -0,0 +1,77 @@ +package com.epmet.dto.indexcollect.form; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 7、治理能力-街道及社区相关指标 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class OrgGovrnAbilityFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 机关id:网格所属的组织id + */ + private String agencyId; + + /** + * 上级组织id + */ + private String parentId; + + /** + * yyyyMM + */ + private String monthId; + + /** + * yyyyQ1, yyyyQ2, yyyyQ3, yyyyQ4 + */ + private String quarterId; + + /** + * yyyy + */ + private String yearId; + + /** + * allRegion:全区;community:社区;street:街道 + */ + private String dataType; + + /** + * 被吹哨次数 + */ + private Integer transferedCount; + + /** + * 办结项目数 + */ + private Integer closedProjectCount; + + /** + * 项目响应度 所有被吹哨后的滞留时间除以项目数 + */ + private BigDecimal respProjectRatio; + + /** + * 办结项目率 + */ + private BigDecimal closedProjectRatio; + + /** + * 办结项目满意度 + */ + private BigDecimal satisfactionRatio; + + /** + * 超期项目率 + */ + private BigDecimal overdueProjectRatio; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgPartyAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgPartyAbilityFormDTO.java new file mode 100644 index 0000000000..e5ad40ef3f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgPartyAbilityFormDTO.java @@ -0,0 +1,53 @@ +package com.epmet.dto.indexcollect.form; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 3、党建能力-街道及社区相关指标 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class OrgPartyAbilityFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 机关id:网格所属的组织id + */ + private String agencyId; + + /** + * 上级组织id + */ + private String parentId; + + /** + * yyyyMM + */ + private String monthId; + + /** + * yyyyQ1, yyyyQ2, yyyyQ3, yyyyQ4 + */ + private String quarterId; + + /** + * yyyy + */ + private String yearId; + + /** + * allRegion:全区;community:社区;street:街道 + */ + private String dataType; + + /** + * 发文数 + */ + private Integer publishArticleCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgServiceAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgServiceAbilityFormDTO.java new file mode 100644 index 0000000000..6ef48c6fa4 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgServiceAbilityFormDTO.java @@ -0,0 +1,53 @@ +package com.epmet.dto.indexcollect.form; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 5、服务能力-组织(街道|社区|全区)相关指标 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class OrgServiceAbilityFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 机关id:网格所属的组织id + */ + private String agencyId; + + /** + * 上级组织id + */ + private String parentId; + + /** + * yyyyMM + */ + private String monthId; + + /** + * yyyyQ1, yyyyQ2, yyyyQ3, yyyyQ4 + */ + private String quarterId; + + /** + * yyyy + */ + private String yearId; + + /** + * allRegion:全区;community:社区;street:街道 + */ + private String dataType; + + /** + * 社区/街道活动组织次数 爱心活动 + */ + private Integer activityCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/IndexCalculateForm.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/IndexCalculateForm.java new file mode 100644 index 0000000000..49e30cdb21 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/IndexCalculateForm.java @@ -0,0 +1,23 @@ +package com.epmet.dto.screen.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * desc:初始化客户指标权重参数实体类 + * @author liujianjun + */ +@Data +public class IndexCalculateForm implements Serializable { + private static final long serialVersionUID = 3280392511156378209L; + /** + * desc:客户id + */ + private String customerId; + + /** + * desc:月份id + */ + private String monthId; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/InitCustomerIndexForm.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/InitCustomerIndexForm.java new file mode 100644 index 0000000000..4016a9656e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/InitCustomerIndexForm.java @@ -0,0 +1,18 @@ +package com.epmet.dto.screen.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * desc:初始化客户指标权重参数实体类 + * @author liujianjun + */ +@Data +public class InitCustomerIndexForm implements Serializable { + private static final long serialVersionUID = 3280392511156378209L; + /** + * desc:客户id + */ + private String customerId; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/ImgDataListDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/ImgDataListDTO.java new file mode 100644 index 0000000000..fb63116850 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/ImgDataListDTO.java @@ -0,0 +1,31 @@ +package com.epmet.dto.screencoll; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 图片列表 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class ImgDataListDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 原始事件id + */ + private String eventId; + + /** + * 图片地址 + */ + private String imgUrl; + + /** + * 排序 + */ + private Integer sort; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CpcBaseDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CpcBaseDataFormDTO.java new file mode 100644 index 0000000000..ee1674ce96 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CpcBaseDataFormDTO.java @@ -0,0 +1,86 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 2、党员基本情况 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class CpcBaseDataFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 注册用户数 + */ + private Integer registerUserCount; + + /** + * 群众用户数 + */ + private Integer resiTotal; + + /** + * 注册党员数 + */ + private Integer partyMemberCount; + + /** + * 小于20岁 + */ + private Integer ageLevel1; + + /** + * 20-30岁 + */ + private Integer ageLevel2; + + /** + * 31-40岁 + */ + private Integer ageLevel3; + + /** + * 41-50岁 + */ + private Integer ageLevel4; + + /** + * 51-60岁 + */ + private Integer ageLevel5; + + /** + * 60+岁 + */ + private Integer ageLevel6; + + /** + * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) + */ + private String dataEndTime; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerAgencyFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerAgencyFormDTO.java new file mode 100644 index 0000000000..cebf258d31 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerAgencyFormDTO.java @@ -0,0 +1,71 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 14、组织层级 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class CustomerAgencyFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 组织id + */ + private String agencyId; + + /** + * 组织名称 + */ + private String agencyName; + + /** + * 父级id ,顶级,此列为0 + */ + private String pid; + + /** + * 所有上级ID,用逗号分开 + */ + private String pids; + + /** + * 所有组织名称以-链接 + */ + private String allParentNames; + + /** + * 坐标区域 + */ + private String areaMarks; + + /** + * 中心点位 + */ + private String centerMark; + + /** + * 党工委|街道党委的位置,预留字段 + */ + private String partyMark; + + /** + * 机关级别(社区级:community, 乡(镇、街道)级:street, 区县级: district, 市级: city 省级:province) + */ + private String level; + + /** + * 行政地区编码 + */ + private String areaCode; + + /** + * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) + */ + private String dataEndTime; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerDeptFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerDeptFormDTO.java new file mode 100644 index 0000000000..a99713701a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerDeptFormDTO.java @@ -0,0 +1,51 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 16、部门信息上传 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class CustomerDeptFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 部门id + */ + private String deptId; + + /** + * 部门名称 + */ + private String deptName; + + /** + * 部门所属组织id + */ + private String parentAgencyId; + + /** + * 坐标区域可空 + */ + private String areaMarks; + + /** + * 中心点位 + */ + private String centerMark; + + /** + * 部门所在位置 + */ + private String deptMark; + + /** + * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) + */ + private String dataEndTime; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerGridFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerGridFormDTO.java new file mode 100644 index 0000000000..38094a105a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerGridFormDTO.java @@ -0,0 +1,51 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 15、网格信息上传 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class CustomerGridFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属组织id + */ + private String parentAgencyId; + + /** + * 坐标区域可空 + */ + private String areaMarks; + + /** + * 中心点位 + */ + private String centerMark; + + /** + * 党支部的位置!!! + */ + private String partyMark; + + /** + * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) + */ + private String dataEndTime; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataFormDTO.java new file mode 100644 index 0000000000..7d136c4b27 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataFormDTO.java @@ -0,0 +1,102 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 3、难点赌点 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class DifficultyDataFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 事件原Id + */ + private String eventId; + + /** + * 事件图片 URL + */ + private String eventImgUrl; + + /** + * 事件来源 eg: XXX街道-xx社区-网格 + */ + private String eventSource; + + /** + * 事件内容 + */ + private String eventContent; + + /** + * 事件耗时单位:分钟 + */ + private Integer eventCostTime; + + /** + * 事件设计部门数 + */ + private Integer eventReOrg; + + /** + * 事件类别编码 + */ + private String eventCategoryCode; + + /** + * 事件状态编码 + */ + private String eventStatusCode; + + /** + * 事件类别名称 + */ + private String eventCategoryName; + + /** + * 事件状态描述 + */ + private String eventStatusDesc; + + /** + * 最近一次操作说明 eg: 转项目,结案,流转 + */ + private String latestOperateDesc; + + /** + * 事件被处理次数(08-21新增) + */ + private Integer eventHandledCount; + + + /** + * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) + */ + private String dataEndTime; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/EventDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/EventDataFormDTO.java new file mode 100644 index 0000000000..21e8ee718e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/EventDataFormDTO.java @@ -0,0 +1,124 @@ +package com.epmet.dto.screencoll.form; + +import com.epmet.dto.screencoll.ImgDataListDTO; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.List; + +/** + * 4、事件数据(中央区-事件数据) 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class EventDataFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 原始事件Id + */ + private String eventId; + + /** + * 事件名称 + */ + private String eventTitle; + + /** + * yyyy-MM-dd HH:mm:ss事件时间 + */ + private String eventCreateTime; + + /** + * 联系人 + */ + private String linkMobile; + + /** + * 事件内容 + */ + private String eventContent; + + /** + * 事件图片(如果有图片,此列为第一张图片) + */ + private String eventImgUrl; + + /** + * 事件待处理级别 red:红;yellow:黄 , green绿色 + */ + private String eventLevel; + + /** + * 事件发生的地址 + */ + private String eventAddress; + + /** + * 经度 + */ + private BigDecimal longitude; + + /** + * 维度 + */ + private BigDecimal latitude; + + /** + * 最后处理的组织名称 + */ + private String lastProcessDept; + + /** + * 最后处理的时间 + */ + private String lastProcessDate; + + /** + * 图片列表 + */ + private List imgDataList; + + /** + * 事件状态描述 + */ + private String eventStatusDesc; + + /** + * 事件状态key + */ + private String eventStatusCode; + + /** + * 最近一次操作说明 eg: 转项目,结案,流转 + */ + private String latestOperateDesc; + + /** + * 数据更新至: yyyy|yyyMM|yyyyMMdd 8.21增加字段 + */ + private String dataEndTime; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/GovernRankDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/GovernRankDataFormDTO.java new file mode 100644 index 0000000000..f12e196ab7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/GovernRankDataFormDTO.java @@ -0,0 +1,67 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 5、基层治理-治理能力数据 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class GovernRankDataFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 年Id :yyyy + */ + private String yearId; + + /** + * 月份Id :yyyyMM + */ + private String monthId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 响应率,最大值100,保留小数点后4位 + */ + private BigDecimal responseRatio; + + /** + * 解决率 最大值100,保留小数点后4位 + */ + private BigDecimal resolvedRatio; + + /** + * 自治率 最大值100,保留小数点后4位 + */ + private BigDecimal governRatio; + + /** + * 满意率,最大值100,保留小数点后四位 + */ + private BigDecimal satisfactionRatio; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataMonthlyFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataMonthlyFormDTO.java new file mode 100644 index 0000000000..c27f75db87 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataMonthlyFormDTO.java @@ -0,0 +1,67 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 1、指数_按月统计 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class IndexDataMonthlyFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * yyyy + */ + private String yearId; + + /** + * yyyyMM eg :202007 + */ + private String monthId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 总指数 + */ + private BigDecimal indexTotal; + + /** + * 党建能力指数 + */ + private BigDecimal partyDevAblity; + + /** + * 服务能力指数 + */ + private BigDecimal serviceAblity; + + /** + * 治理能力指数 + */ + private BigDecimal governAblity; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataYearlyFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataYearlyFormDTO.java new file mode 100644 index 0000000000..4eafd27be7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataYearlyFormDTO.java @@ -0,0 +1,62 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 17、指数_按年统计 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class IndexDataYearlyFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * yyyy + */ + private String yearId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 总指数 + */ + private BigDecimal indexTotal; + + /** + * 党建能力指数 + */ + private BigDecimal partyDevAblity; + + /** + * 服务能力指数 + */ + private BigDecimal serviceAblity; + + /** + * 治理能力指数 + */ + private BigDecimal governAblity; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/OrgRankDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/OrgRankDataFormDTO.java new file mode 100644 index 0000000000..8b0a753839 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/OrgRankDataFormDTO.java @@ -0,0 +1,82 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 6、党建引领-组织排行 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class OrgRankDataFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 年Id :yyyy + */ + private String yearId; + + /** + * 月份Id :yyyyMM + */ + private String monthId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 党员总数 + */ + private Integer partyTotal; + + /** + * 小组(支部建设总数) + */ + private Integer groupTotal; + + /** + * 话题总数 + */ + private Integer topicTotal; + + /** + * 议题总数 + */ + private Integer issueTotal; + + /** + * 项目总数 + */ + private Integer projectTotal; + + /** + * 结案率,最大值100,保留小数点后四位 + */ + private BigDecimal closeProjectRatio; + + /** + * 满意率,最大值100,保留小数点后四位 + */ + private BigDecimal satisfactionRatio; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyBranchDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyBranchDataFormDTO.java new file mode 100644 index 0000000000..21144c89ab --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyBranchDataFormDTO.java @@ -0,0 +1,76 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 7、基层党建-建设情况数据(支部、联建、志愿) 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class PartyBranchDataFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 年Id :yyyy + */ + private String yearId; + + /** + * 月份Id :yyyyMM + */ + private String monthId; + + /** + * 数据类别 party:支部建设;union:联合建设党员志愿服务:voluntaryservice + */ + private String type; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 会议分类名称 + */ + private String meetCategoryName; + + /** + * 会议分类id + */ + private String meetCategoryId; + + /** + * 组织次数 + */ + private Integer organizeCount; + + /** + * 参加人数 + */ + private Integer joinUserCount; + + /** + * 平均参加人数 + */ + private Integer averageJoinUserCount; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyLinkMassesDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyLinkMassesDataFormDTO.java new file mode 100644 index 0000000000..c57728d3fc --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyLinkMassesDataFormDTO.java @@ -0,0 +1,52 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 8、党建引领-党员联系群众数据 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class PartyLinkMassesDataFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 建群总数 + */ + private Integer createGroupTotal; + + /** + * 群成员总数 + */ + private Integer groupUserTotal; + + /** + * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) + */ + private String dataEndTime; + +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyUserRankDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyUserRankDataFormDTO.java new file mode 100644 index 0000000000..29b35aa147 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyUserRankDataFormDTO.java @@ -0,0 +1,76 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 9、党建引领|基层治理-居民(党员)积分排行榜 入参 + * @Auther: zhangyong + * @Date: 2020-08-21 09:59 + */ +@Data +public class PartyUserRankDataFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 数据更新至: yyyy|yyyyMM|yyyyMMdd + */ + private String dataEndTime; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 用户所属网格id + */ + private String gridId; + + /** + * 用户所属网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String orgId; + + /** + * 网格所属的组织名称 + */ + private String orgName; + + /** + * 是否是党员标志:1是。0不是党员 + */ + private String partyFlag; + + /** + * 用户Id + */ + private String userId; + + /** + * 用户名称 + */ + private String userName; + + /** + * 用户积分 + */ + private Integer pointTotal; + + /** + * 姓 + */ + private String surname; + + /** + * 名 + */ + private String name; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PioneerDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PioneerDataFormDTO.java new file mode 100644 index 0000000000..7e79fce0b8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PioneerDataFormDTO.java @@ -0,0 +1,93 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 10、党建引领-先锋模范数据 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class PioneerDataFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 党员发布议题 + */ + private Integer publishIssueTotal; + + /** + * 议事数 + */ + private Integer issueTotal; + + /** + * 话题总数 + */ + private Integer topicTotal; + + /** + * 议题转项目数 + */ + private Integer shiftProjectTotal; + + /** + * 解决项目总数 + */ + private Integer resolvedProjectTotal; + + + /** + * 议事占比 + */ + private BigDecimal issueRatio; + + /** + * 话题占比 + */ + private BigDecimal topicRatio; + + /** + * 议题转项目占比 + */ + private BigDecimal shiftProjectRatio; + + /** + * 解决项目占比 + */ + private BigDecimal resolvedProjectRatio; + + /** + * 党员发布议题占比 + */ + private BigDecimal publishIssueRatio; + + /** + * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) + */ + private String dataEndTime; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/UserJoinFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/UserJoinFormDTO.java new file mode 100644 index 0000000000..9abd6012d6 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/UserJoinFormDTO.java @@ -0,0 +1,61 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 11、基层治理-公众参与 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class UserJoinFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 年Id :yyyy + */ + private String yearId; + + /** + * 月份Id :yyyyMM + */ + private String monthId; + + /** + * 人均议题 + */ + private Integer avgIssue; + + /** + * 总的参与次数 + */ + private Integer joinTotal; + + /** + * 平均参与度 + */ + private Integer avgJoin; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/UserTotalDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/UserTotalDataFormDTO.java new file mode 100644 index 0000000000..14f4df673d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/UserTotalDataFormDTO.java @@ -0,0 +1,81 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 12、中央区各类总数 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class UserTotalDataFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 用户总数 + */ + private Integer userTotal; + + /** + * 注册党员数 + */ + private Integer partyTotal; + + /** + * 小组(党群)总数 + */ + private Integer groupTotal; + + /** + * 话题总数 + */ + private Integer topicTotal; + + /** + * 议题总数 + */ + private Integer issueTotal; + + /** + * 项目总数 + */ + private Integer projectTotal; + + /** + * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) + */ + private String dataEndTime; + + /** + * 注册人数(08-21新增) + */ + private Integer regUserTotal; + + /** + * 参与人数(08-21新增) + */ + private Integer joinUserTotal; +} diff --git a/epmet-module/data-statistical/data-statistical-server/pom.xml b/epmet-module/data-statistical/data-statistical-server/pom.xml index 0dfdd97d91..95c74f75d1 100644 --- a/epmet-module/data-statistical/data-statistical-server/pom.xml +++ b/epmet-module/data-statistical/data-statistical-server/pom.xml @@ -68,6 +68,31 @@ 2.0.0 compile + + com.epmet + epmet-commons-extapp-auth + 2.0.0 + compile + + + + + + org.apache.poi + poi + 3.17 + + + + org.apache.poi + poi-ooxml + 3.17 + + + com.alibaba + easyexcel + 2.2.6 + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/DataStatsApplication.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/DataStatsApplication.java index ad4e2110fa..21b5ea51b7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/DataStatsApplication.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/DataStatsApplication.java @@ -3,13 +3,18 @@ package com.epmet; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; +import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.scheduling.annotation.EnableAsync; +@EnableDiscoveryClient +@EnableFeignClients @SpringBootApplication (exclude = {DataSourceAutoConfiguration.class}) @EnableAsync public class DataStatsApplication { public static void main(String[] args) { SpringApplication.run(DataStatsApplication.class ,args); + //HttpClientManager.getInstance().sendAlarmMsg("DataStatsApplication started!"); } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java new file mode 100644 index 0000000000..7c12fec411 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java @@ -0,0 +1,156 @@ +package com.epmet.controller; + +import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; +import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.indexcollect.form.*; +import com.epmet.service.indexcollect.FactIndexCollectService; +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 2020/8/20 9:38 + */ +@RestController +@RequestMapping("indexcollect") +public class FactIndexCollectController { + + @Autowired + private FactIndexCollectService factIndexCollectService; + + /** + * 1、党建能力-党员相关指标上报(按照月份) + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + @ExternalAppRequestAuth + @PostMapping("gridpartymemberdata") + public Result gridPartyMemberData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + factIndexCollectService.insertGridPartyMemberData(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 2、党建能力-网格相关指标上报(按照月份) + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + @ExternalAppRequestAuth + @PostMapping("gridpartyability") + public Result gridPartyAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + factIndexCollectService.insertGridPartyAbility(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 3、党建能力-街道及社区相关指标 + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + @ExternalAppRequestAuth + @PostMapping("orgpartyability") + public Result orgPartyAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + factIndexCollectService.insertOrgPartyAbility(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 4、服务能力-网格相关指标 + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + @ExternalAppRequestAuth + @PostMapping("gridserviceability") + public Result gridServiceAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + factIndexCollectService.insertGridServiceAbility(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 5、服务能力-组织(街道|社区|全区)相关指标 + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + @ExternalAppRequestAuth + @PostMapping("orgserviceability") + public Result orgServiceAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + factIndexCollectService.insertOrgServiceAbility(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 6、治理能力-网格相关指标 + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + @ExternalAppRequestAuth + @PostMapping("gridgovrnability") + public Result gridGovrnAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + factIndexCollectService.insertGridGovrnAbility(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 7、治理能力-街道及社区相关指标 + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + @ExternalAppRequestAuth + @PostMapping("orggovrnability") + public Result orgGovrnAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + factIndexCollectService.insertOrgGovrnAbility(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 8、治理能力-部门相关指标 + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + @ExternalAppRequestAuth + @PostMapping("deptgovrnability") + public Result deptGovrnAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + factIndexCollectService.insertDeptGovrnAbility(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java new file mode 100644 index 0000000000..cba12740c5 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java @@ -0,0 +1,154 @@ +package com.epmet.controller; + +import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; +import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.screen.form.IndexCalculateForm; +import com.epmet.service.screen.IndexCalculateService; +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; + +/** + * 指标计算controller + * + * @author liujianjun@elink-cn.com + * @date 2020/8/24 14:38 + */ +@RestController +@RequestMapping("indexcalculate") +public class IndexCalculateController { + + @Autowired + private IndexCalculateService indexCalculateService; + + /** + * 1、党建能力-党员相关指标计算(按照月份) + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + @ExternalAppRequestAuth + @PostMapping("cpc") + public Result cpcIndexCalculate(ExternalAppRequestParam externalAppRequestParam, @RequestBody IndexCalculateForm formDTO) { + indexCalculateService.cpcIndexCalculate(formDTO); + return new Result(); + } + + /* *//** + * 2、党建能力-网格相关指标上报(按照月份) + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **//* + @ExternalAppRequestAuth + @PostMapping("gridpartyability") + public Result gridPartyAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + factIndexCollectService.insertGridPartyAbility(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + *//** + * 3、党建能力-街道及社区相关指标 + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **//* + @ExternalAppRequestAuth + @PostMapping("orgpartyability") + public Result orgPartyAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + factIndexCollectService.insertOrgPartyAbility(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + *//** + * 4、服务能力-网格相关指标 + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **//* + @ExternalAppRequestAuth + @PostMapping("gridserviceability") + public Result gridServiceAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + factIndexCollectService.insertGridServiceAbility(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + *//** + * 5、服务能力-组织(街道|社区|全区)相关指标 + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **//* + @ExternalAppRequestAuth + @PostMapping("orgserviceability") + public Result orgServiceAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + factIndexCollectService.insertOrgServiceAbility(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + *//** + * 6、治理能力-网格相关指标 + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **//* + @ExternalAppRequestAuth + @PostMapping("gridgovrnability") + public Result gridGovrnAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + factIndexCollectService.insertGridGovrnAbility(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + *//** + * 7、治理能力-街道及社区相关指标 + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **//* + @ExternalAppRequestAuth + @PostMapping("orggovrnability") + public Result orgGovrnAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + factIndexCollectService.insertOrgGovrnAbility(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + *//** + * 8、治理能力-部门相关指标 + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **//* + @ExternalAppRequestAuth + @PostMapping("deptgovrnability") + public Result deptGovrnAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + factIndexCollectService.insertDeptGovrnAbility(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + }*/ +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexDictController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexDictController.java new file mode 100644 index 0000000000..c26189717e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexDictController.java @@ -0,0 +1,86 @@ +package com.epmet.controller; + +import com.alibaba.excel.EasyExcel; +import com.alibaba.excel.ExcelReader; +import com.alibaba.excel.read.metadata.ReadSheet; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.screen.form.InitCustomerIndexForm; +import com.epmet.model.IndexExcelDataListener; +import com.epmet.model.IndexModel; +import com.epmet.service.screen.IndexDictService; +import com.epmet.service.screen.IndexGroupDetailTemplateService; +import com.epmet.service.screen.IndexGroupService; +import com.epmet.service.screen.IndexGroupTemplateService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.io.IOException; +import java.io.InputStream; + +/** + * @author liujianjun + */ +@RequestMapping("indexdict") +@RestController +@Slf4j +public class IndexDictController { + + @Autowired + private IndexDictService indexDictService; + @Autowired + private IndexGroupTemplateService indexGroupTemplateService; + @Autowired + private IndexGroupService indexGroupService; + @Autowired + private IndexGroupDetailTemplateService indexGroupDetailTemplateService; + + /** + * url:http://localhost:8108/data/stats/indexdict/initFromExcel + * desc:从excel初始化指标,分组,权重 + * + * @param file + * @return + */ + @PostMapping("initFromExcel") + public Result testTx(@RequestPart("file") MultipartFile file) { + ExcelReader excelReader = null; + try { + InputStream inputStream = null; + try { + inputStream = file.getInputStream(); + } catch (IOException e) { + return new Result().error("读取文件失败"); + } + excelReader = EasyExcel.read(inputStream).build(); + // 这里为了简单 所以注册了 同样的head 和Listener 自己使用功能必须不同的Listener + ReadSheet readSheet = EasyExcel.readSheet(1).head(IndexModel.class) + .registerReadListener(new IndexExcelDataListener(indexDictService, indexGroupTemplateService, indexGroupDetailTemplateService)) + .build(); + excelReader.read(readSheet); + } finally { + if (excelReader != null) { + excelReader.finish(); + } + } + return new Result<>(); + } + + /** + * url:http://localhost:8108/data/stats/indexdict/initCustomerIndex + * desc: 初始化客户的评价指标数据 + * @param formDTO customerId + * @return + */ + @PostMapping("initCustomerIndex") + public Result initCustomerIndex(@RequestBody InitCustomerIndexForm formDTO){ + if (StringUtils.isBlank(formDTO.getCustomerId())){ + throw new RenException("参数错误"); + } + Boolean aBoolean = indexGroupService.initCustomerIndexGroup(formDTO.getCustomerId()); + return new Result().ok(aBoolean); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenCollController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenCollController.java new file mode 100644 index 0000000000..080ba5384b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenCollController.java @@ -0,0 +1,286 @@ +package com.epmet.controller; + +import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; +import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.screencoll.form.*; +import com.epmet.service.screen.ScreenCollService; +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 2020/8/18 10:25 + */ +@RestController +@RequestMapping("screencoll") +public class ScreenCollController { + + @Autowired + private ScreenCollService screenCollService; + + /** + * 9、党建引领|基层治理-居民(党员)积分排行榜 + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + @ExternalAppRequestAuth + @PostMapping("partyuserrankdata") + public Result partyUserRankData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + screenCollService.insertPartyUserRankData(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 8、党建引领-党员联系群众数据 + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + @ExternalAppRequestAuth + @PostMapping("partylinkmassesdata") + public Result partyLinkMassesData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + screenCollService.insertPartyLinkMassesData(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 7、基层党建-建设情况数据(支部、联建、志愿) + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + @ExternalAppRequestAuth + @PostMapping("meetdata") + public Result meetData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + screenCollService.insertPartyBranchData(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 6、党建引领-组织排行 + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + @ExternalAppRequestAuth + @PostMapping("orgrankdata") + public Result orgRankData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + screenCollService.insertOrgRankData(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 5、基层治理-治理能力数据 + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + @ExternalAppRequestAuth + @PostMapping("governrankdata") + public Result governRankData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + screenCollService.insertGovernRankData(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 4、事件数据 + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + @ExternalAppRequestAuth + @PostMapping("eventdata") + public Result eventData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + screenCollService.insertEventData(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 3、难点赌点 + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + @ExternalAppRequestAuth + @PostMapping("difficultydata") + public Result difficultyData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + screenCollService.insertDifficultyData(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 2、党员基本情况 + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + @ExternalAppRequestAuth + @PostMapping("cpcbasedata") + public Result cpcbaseData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + screenCollService.insertCpcbaseData(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 1、指数_按月统计 + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + @ExternalAppRequestAuth + @PostMapping("indexdatamonthly") + public Result indexDataMonthly(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + screenCollService.insertIndexDataMonthly(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + // -- + + /** + * 17、指数_按年统计 + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + @ExternalAppRequestAuth + @PostMapping("indexdatayearly") + public Result indexDataYearly(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + screenCollService.insertIndexDataYearly(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 16、部门信息上传 + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + @ExternalAppRequestAuth + @PostMapping("customerdept") + public Result customerDept(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + screenCollService.insertCustomerDept(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 15、网格信息上传 + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + @ExternalAppRequestAuth + @PostMapping("customergrid") + public Result customerGrid(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + screenCollService.insertCustomerGrid(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 14、组织层级 + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + @ExternalAppRequestAuth + @PostMapping("customeragency") + public Result customerAgency(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + screenCollService.insertCustomerAgency(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 12、中央区各类总数 + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + @ExternalAppRequestAuth + @PostMapping("usertotaldata") + public Result userTotalData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + screenCollService.insertUserTotalData(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 11、基层治理-公众参与 + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + @ExternalAppRequestAuth + @PostMapping("userjoin") + public Result userJoin(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + screenCollService.insertUserJoin(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + /** + * 10、党建引领-先锋模范数据 + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + @ExternalAppRequestAuth + @PostMapping("pioneerdata") + public Result pioneerData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + screenCollService.insertPioneerData(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java new file mode 100644 index 0000000000..f56638a3f6 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java @@ -0,0 +1,66 @@ +package com.epmet.dao.indexcoll; /** + * 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 . + */ + + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcollect.form.DeptGovrnAbilityFormDTO; +import com.epmet.entity.indexcoll.FactIndexGovrnAblityDeptMonthlyEntity; +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 2020-08-20 + */ +@Mapper +public interface FactIndexGovrnAblityDeptMonthlyDao extends BaseDao { + /** + * 8、治理能力-部门相关指标 + * 据CUSTOMER_ID、AGENCY_ID、DEPT_ID、YEAR_ID、MONTH_ID、QUARTER_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param agencyId + * @param deptId + * @param yearId + * @param monthId + * @param quarterId + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void deleteFactIndexGovrnAblityDeptMonthly(@Param("customerId") String customerId, + @Param("agencyId") String agencyId, + @Param("deptId") String deptId, + @Param("yearId") String yearId, + @Param("monthId") String monthId, + @Param("quarterId") String quarterId); + + /** + * 8、治理能力-部门相关指标 + * 2) 在批量新增 + * + * @param list + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void batchInsertFactIndexGovrnAblityDeptMonthly(@Param("list") List list, @Param("customerId")String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java new file mode 100644 index 0000000000..e591ba928d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java @@ -0,0 +1,67 @@ +/** + * 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.dao.indexcoll; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcollect.form.GridGovrnAbilityFormDTO; +import com.epmet.entity.indexcoll.FactIndexGovrnAblityGridMonthlyEntity; +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 2020-08-20 + */ +@Mapper +public interface FactIndexGovrnAblityGridMonthlyDao extends BaseDao { + + /** + * 6、治理能力-网格相关指标 + * 根据CUSTOMER_ID、AGENCY_ID、GRID_ID、YEAR_ID、MONTH_ID、QUARTER_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param agencyId + * @param gridId + * @param yearId + * @param monthId + * @param quarterId + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void deleteFactIndexGovrnAblityGridMonthly(@Param("customerId") String customerId, + @Param("agencyId") String agencyId, + @Param("gridId") String gridId, + @Param("yearId") String yearId, + @Param("monthId") String monthId, + @Param("quarterId") String quarterId); + + /** + * 6、治理能力-网格相关指标 + * 2) 在批量新增 + * + * @param list + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void batchInsertFactIndexGovrnAblityGridMonthly(@Param("list") List list, @Param("customerId")String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java new file mode 100644 index 0000000000..9013d4f9cf --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java @@ -0,0 +1,64 @@ +/** + * 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.dao.indexcoll; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcollect.form.OrgGovrnAbilityFormDTO; +import com.epmet.entity.indexcoll.FactIndexGovrnAblityOrgMonthlyEntity; +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 2020-08-20 + */ +@Mapper +public interface FactIndexGovrnAblityOrgMonthlyDao extends BaseDao { + /** + * 7、治理能力-街道及社区相关指标 + * 据CUSTOMER_ID、AGENCY_ID、YEAR_ID、MONTH_ID、QUARTER_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param yearId + * @param monthId + * @param quarterId + * @param agencyIds + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void deleteFactIndexGovrnAblityOrgMonthly(@Param("customerId") String customerId, + @Param("yearId") String yearId, + @Param("monthId") String monthId, + @Param("quarterId") String quarterId, + @Param("agencyIds") String[] agencyIds); + + /** + * 7、治理能力-街道及社区相关指标 + * 2) 在批量新增 + * + * @param list + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void batchInsertFactIndexGovrnAblityOrgMonthly(@Param("list") List list, @Param("customerId")String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java new file mode 100644 index 0000000000..387a369af1 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java @@ -0,0 +1,70 @@ +/** + * 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.dao.indexcoll; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcollect.form.GridPartyMemberDataFormDTO; +import com.epmet.entity.indexcoll.FactIndexPartyAblityCpcMonthlyEntity; +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 2020-08-20 + */ +@Mapper +public interface FactIndexPartyAblityCpcMonthlyDao extends BaseDao { + + /** + * 1、党建能力-党员相关指标上报(按照月份) + * 1) 根据CUSTOMER_ID、AGENCY_ID、GRID_ID、USER_ID、YEAR_ID、MONTH_ID、QUARTER_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param agencyId + * @param gridId + * @param userId + * @param yearId + * @param monthId + * @param quarterId + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void deleteFactIndexPartyAblityCpcMonthly(@Param("customerId") String customerId, + @Param("agencyId") String agencyId, + @Param("gridId") String gridId, + @Param("userId") String userId, + @Param("yearId") String yearId, + @Param("monthId") String monthId, + @Param("quarterId") String quarterId); + + /** + * 1、党建能力-党员相关指标上报(按照月份) + * 2) 在批量新增 + * + * @param list + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void batchInsertFactIndexPartyAblityCpcMonthly(@Param("list") List list, + @Param("customerId")String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java new file mode 100644 index 0000000000..b5cb8d2c5e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java @@ -0,0 +1,67 @@ +/** + * 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.dao.indexcoll; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcollect.form.GridPartyAbilityFormDTO; +import com.epmet.entity.indexcoll.FactIndexPartyAblityGridMonthlyEntity; +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 2020-08-20 + */ +@Mapper +public interface FactIndexPartyAblityGridMonthlyDao extends BaseDao { + + /** + * 2、党建能力-网格相关指标上报(按照月份) + * 1) 根据CUSTOMER_ID、AGENCY_ID、GRID_ID、YEAR_ID、MONTH_ID、QUARTER_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param agencyId + * @param gridId + * @param yearId + * @param monthId + * @param quarterId + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void deleteFactIndexPartyAblityGridMonthly(@Param("customerId") String customerId, + @Param("agencyId") String agencyId, + @Param("gridId") String gridId, + @Param("yearId") String yearId, + @Param("monthId") String monthId, + @Param("quarterId") String quarterId); + + /** + * 2、党建能力-网格相关指标上报(按照月份) + * 2) 在批量新增 + * + * @param list + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void batchInsertFactIndexPartyAblityGridMonthly(@Param("list") List list, @Param("customerId")String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java new file mode 100644 index 0000000000..73a73a1c50 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java @@ -0,0 +1,65 @@ +/** + * 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.dao.indexcoll; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcollect.form.OrgPartyAbilityFormDTO; +import com.epmet.entity.indexcoll.FactIndexPartyAblityOrgMonthlyEntity; +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 2020-08-20 + */ +@Mapper +public interface FactIndexPartyAblityOrgMonthlyDao extends BaseDao { + + /** + * 3、党建能力-街道及社区相关指标 + * 根据CUSTOMER_ID、AGENCY_ID、YEAR_ID、MONTH_ID、QUARTER_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param yearId + * @param monthId + * @param quarterId + * @param agencyIds + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void deleteFactIndexPartyAblityOrgMonthly(@Param("customerId") String customerId, + @Param("yearId") String yearId, + @Param("monthId") String monthId, + @Param("quarterId") String quarterId, + @Param("agencyIds") String[] agencyIds); + + /** + * 3、党建能力-街道及社区相关指标 + * 2) 在批量新增 + * + * @param list + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void batchInsertFactIndexPartyAblityOrgMonthly(@Param("list") List list, @Param("customerId")String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java new file mode 100644 index 0000000000..9eb7051762 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java @@ -0,0 +1,66 @@ +/** + * 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.dao.indexcoll; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcollect.form.GridServiceAbilityFormDTO; +import com.epmet.entity.indexcoll.FactIndexServiceAblityGridMonthlyEntity; +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 2020-08-20 + */ +@Mapper +public interface FactIndexServiceAblityGridMonthlyDao extends BaseDao { + /** + * 4、服务能力-网格相关指标 + * 根据CUSTOMER_ID、AGENCY_ID、GRID_ID、YEAR_ID、MONTH_ID、QUARTER_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param agencyId + * @param gridId + * @param yearId + * @param monthId + * @param quarterId + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void deleteFactIndexServiceAblityGridMonthly(@Param("customerId") String customerId, + @Param("agencyId") String agencyId, + @Param("gridId") String gridId, + @Param("yearId") String yearId, + @Param("monthId") String monthId, + @Param("quarterId") String quarterId); + + /** + * 4、服务能力-网格相关指标 + * 2) 在批量新增 + * + * @param list + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void batchInsertFactIndexServiceAblityGridMonthly(@Param("list") List list, @Param("customerId")String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java new file mode 100644 index 0000000000..31c268cd75 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java @@ -0,0 +1,65 @@ +/** + * 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.dao.indexcoll; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcollect.form.OrgServiceAbilityFormDTO; +import com.epmet.entity.indexcoll.FactIndexServiceAblityOrgMonthlyEntity; +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 2020-08-20 + */ +@Mapper +public interface FactIndexServiceAblityOrgMonthlyDao extends BaseDao { + + /** + * 5、服务能力-组织(街道|社区|全区)相关指标 + * 根据CUSTOMER_ID、AGENCY_ID、YEAR_ID、MONTH_ID、QUARTER_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param yearId + * @param monthId + * @param quarterId + * @param agencyIds + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void deleteFactIndexServiceAblityOrgMonthly(@Param("customerId") String customerId, + @Param("yearId") String yearId, + @Param("monthId") String monthId, + @Param("quarterId") String quarterId, + @Param("agencyIds") String[] agencyIds); + + /** + * 5、服务能力-组织(街道|社区|全区)相关指标 + * 2) 在批量新增 + * + * @param list + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void batchInsertFactIndexServiceAblityOrgMonthly(@Param("list") List list, @Param("customerId")String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexDictDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexDictDao.java new file mode 100644 index 0000000000..7aa2ab9733 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexDictDao.java @@ -0,0 +1,34 @@ +/** + * 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.dao.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.screen.IndexDictEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 评价指标字典 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +@Mapper +public interface IndexDictDao extends BaseDao { + + int deleteAll(); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java new file mode 100644 index 0000000000..5458720940 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java @@ -0,0 +1,34 @@ +/** + * 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.dao.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.screen.IndexGroupEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 客户指标分组 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +@Mapper +public interface IndexGroupDao extends BaseDao { + + int inertGroupFromTable(String customerId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailDao.java new file mode 100644 index 0000000000..1a7dd4a0a8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailDao.java @@ -0,0 +1,33 @@ +/** + * 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.dao.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.screen.IndexGroupDetailEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 客户指标详情 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +@Mapper +public interface IndexGroupDetailDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailTemplateDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailTemplateDao.java new file mode 100644 index 0000000000..29f074c13f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailTemplateDao.java @@ -0,0 +1,39 @@ +/** + * 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.dao.screen; + + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.screen.IndexGroupDetailTemplateEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 客户指标详情 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +@Mapper +public interface IndexGroupDetailTemplateDao extends BaseDao { + + int deleteAll(); + + List selectAll(); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupTemplateDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupTemplateDao.java new file mode 100644 index 0000000000..c1e14b531c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupTemplateDao.java @@ -0,0 +1,38 @@ +/** + * 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.dao.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.screen.IndexGroupTemplateEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 默认指标分组 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +@Mapper +public interface IndexGroupTemplateDao extends BaseDao { + + int deleteAll(); + + List selectAll(); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java new file mode 100644 index 0000000000..12271b8e3c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java @@ -0,0 +1,59 @@ +/** + * 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.dao.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.CpcBaseDataFormDTO; +import com.epmet.entity.screen.ScreenCpcBaseDataEntity; +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 2020-08-18 + */ +@Mapper +public interface ScreenCpcBaseDataDao extends BaseDao { + + /** + * 2、党员基本情况 + * 1) 根据CUSTOMER_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param orgIds 组织Id集合 + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void deleteCpcBaseData(@Param("customerId") String customerId, + @Param("orgIds") String[] orgIds); + + /** + * 2、党员基本情况 + * 2) 在批量新增 + * + * @param list + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void batchInsertCpcBaseData(@Param("list") List list, @Param("customerId")String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java new file mode 100644 index 0000000000..d7851cd754 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java @@ -0,0 +1,59 @@ +/** + * 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.dao.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.CustomerAgencyFormDTO; +import com.epmet.dto.screencoll.form.CustomerGridFormDTO; +import com.epmet.entity.screen.ScreenCustomerAgencyEntity; +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 2020-08-18 + */ +@Mapper +public interface ScreenCustomerAgencyDao extends BaseDao { + /** + *14、组织层级 + * 1) 根据CUSTOMER_ID、AGENCY_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param agencyIds 组织id集合 + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void deleteCustomerAgency(@Param("customerId") String customerId, + @Param("agencyIds") String[] agencyIds); + + /** + * 14、组织层级 + * 2) 在批量新增 + * + * @param list + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void batchInsertCustomerAgency(@Param("list") List list, @Param("customerId")String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java new file mode 100644 index 0000000000..53f37049a3 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java @@ -0,0 +1,59 @@ +/** + * 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.dao.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.CustomerDeptFormDTO; +import com.epmet.entity.screen.ScreenCustomerDeptEntity; +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 2020-08-18 + */ +@Mapper +public interface ScreenCustomerDeptDao extends BaseDao { + + /** + *16、部门信息上传 + * 1) 根据CUSTOMER_ID、DEPT_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param deptIds 部门Id集合 + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void deleteCustomerDept(@Param("customerId") String customerId, + @Param("deptIds") String[] deptIds); + + /** + * 16、部门信息上传 + * 2) 在批量新增 + * + * @param list + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void batchInsertCustomerDept(@Param("list") List list, @Param("customerId")String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java new file mode 100644 index 0000000000..c9fa856582 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java @@ -0,0 +1,58 @@ +/** + * 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.dao.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.CustomerGridFormDTO; +import com.epmet.entity.screen.ScreenCustomerGridEntity; +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 2020-08-18 + */ +@Mapper +public interface ScreenCustomerGridDao extends BaseDao { + /** + *15、网格信息上传 + * 1) 根据CUSTOMER_ID、GRID_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param gridIds 网格Id集合 + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void deleteCustomerGrid(@Param("customerId") String customerId, + @Param("gridIds") String[] gridIds); + + /** + * 15、网格信息上传 + * 2) 在批量新增 + * + * @param list + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void batchInsertCustomerGrid(@Param("list") List list, @Param("customerId")String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java new file mode 100644 index 0000000000..1a9b991bac --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java @@ -0,0 +1,60 @@ +/** + * 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.dao.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.DifficultyDataFormDTO; +import com.epmet.entity.screen.ScreenDifficultyDataEntity; +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 2020-08-18 + */ +@Mapper +public interface ScreenDifficultyDataDao extends BaseDao { + /** + * 3、难点赌点 + * 1) 根据CUSTOMER_ID、EVENT_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + + * @param customerId 一 + * @param eventId 多 + * @param orgId 多 + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void deleteDifficultyData(@Param("customerId")String customerId, + @Param("eventId")String eventId, + @Param("orgId")String orgId); + + /** + * 3、难点赌点 + * 2) 在批量新增 + * + * @param list + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void batchInsertDifficultyData(@Param("list") List list, @Param("customerId")String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java new file mode 100644 index 0000000000..ec80809c55 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java @@ -0,0 +1,60 @@ +/** + * 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.dao.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.EventDataFormDTO; +import com.epmet.entity.screen.ScreenEventDataEntity; +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 2020-08-18 + */ +@Mapper +public interface ScreenEventDataDao extends BaseDao { + /** + * 4、事件数据 + * 1) 根据CUSTOMER_ID、EVENT_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId 一 + * @param eventId 多 + * @param orgId 多 + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void deleteEventData(@Param("customerId")String customerId, + @Param("eventId")String eventId, + @Param("orgId")String orgId); + + /** + * 4、事件数据 + * 2) 在批量新增 + * + * @param list + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void batchInsertEventData(@Param("list") List list, @Param("customerId")String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventImgDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventImgDataDao.java new file mode 100644 index 0000000000..42ca86859e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventImgDataDao.java @@ -0,0 +1,43 @@ +/** + * 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.dao.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.screen.ScreenEventImgDataEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 中央区-事件数据图片数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenEventImgDataDao extends BaseDao { + + /** + * 根据原始事件Id,进行物理删除 + * + * @param eventId + * @return void + * @Author zhangyong + * @Date 16:47 2020-08-18 + **/ + void delEventImgDataByEventId(@Param("eventId") String eventId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java new file mode 100644 index 0000000000..ea3d67aa68 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java @@ -0,0 +1,62 @@ +/** + * 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.dao.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.GovernRankDataFormDTO; +import com.epmet.entity.screen.ScreenGovernRankDataEntity; +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 2020-08-18 + */ +@Mapper +public interface ScreenGovernRankDataDao extends BaseDao { + /** + * 5、基层治理-治理能力数据 + * 1) 根据CUSTOMER_ID、YEAR_ID、MONTH_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param yearId + * @param monthId + * @param orgIds 组织Id集合 + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void deleteGovernRankData(@Param("customerId") String customerId, + @Param("yearId") String yearId, + @Param("monthId") String monthId, + @Param("orgIds") String[] orgIds); + + /** + * 5、基层治理-治理能力数据 + * 2) 在批量新增 + * + * @param list + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void batchInsertGovernRankData(@Param("list") List list, @Param("customerId")String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataMonthlyDao.java new file mode 100644 index 0000000000..e97406febf --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataMonthlyDao.java @@ -0,0 +1,63 @@ +/** + * 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.dao.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.IndexDataMonthlyFormDTO; +import com.epmet.entity.screen.ScreenIndexDataMonthlyEntity; +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 2020-08-18 + */ +@Mapper +public interface ScreenIndexDataMonthlyDao extends BaseDao { + + /** + *1、指数相关 + * 1) 根据CUSTOMER_ID、YEAR_ID、MONTH_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param yearId + * @param monthId + * @param orgIds 组织Id集合 + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void deleteIndexDataMonthly(@Param("customerId") String customerId, + @Param("yearId") String yearId, + @Param("monthId") String monthId, + @Param("orgIds") String[] orgIds); + + /** + * 1、指数相关 + * 2) 在批量新增 + * + * @param list + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void batchInsertIndexDataMonthly(@Param("list") List list, @Param("customerId")String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataYearlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataYearlyDao.java new file mode 100644 index 0000000000..4ca64f6944 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataYearlyDao.java @@ -0,0 +1,61 @@ +/** + * 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.dao.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.IndexDataYearlyFormDTO; +import com.epmet.entity.screen.ScreenIndexDataYearlyEntity; +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 2020-08-19 + */ +@Mapper +public interface ScreenIndexDataYearlyDao extends BaseDao { + + /** + * 17、指数_按年统计 + * 1) 根据CUSTOMER_ID、YEAR_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param yearId + * @param orgIds 组织Id集合 + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void deleteIndexDataYearly(@Param("customerId") String customerId, + @Param("yearId") String yearId, + @Param("orgIds") String[] orgIds); + + /** + * 17、指数_按年统计 + * 2) 在批量新增 + * + * @param list + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void batchInsertIndexDataYearly(@Param("list") List list, @Param("customerId")String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java new file mode 100644 index 0000000000..4eabfd508a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java @@ -0,0 +1,62 @@ +/** + * 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.dao.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.OrgRankDataFormDTO; +import com.epmet.entity.screen.ScreenOrgRankDataEntity; +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 2020-08-18 + */ +@Mapper +public interface ScreenOrgRankDataDao extends BaseDao { + /** + * 6、党建引领-组织排行 + * 1) 根据CUSTOMER_ID、YEAR_ID、MONTH_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param yearId + * @param monthId + * @param orgIds 组织Id集合 + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void deleteOrgRankData(@Param("customerId") String customerId, + @Param("yearId") String yearId, + @Param("monthId") String monthId, + @Param("orgIds") String[] orgIds); + + /** + * 6、党建引领-组织排行 + * 2) 在批量新增 + * + * @param list + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void batchInsertOrgRankData(@Param("list") List list, @Param("customerId")String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java new file mode 100644 index 0000000000..3cae4a160d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java @@ -0,0 +1,62 @@ +/** + * 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.dao.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.PartyBranchDataFormDTO; +import com.epmet.entity.screen.ScreenPartyBranchDataEntity; +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 2020-08-18 + */ +@Mapper +public interface ScreenPartyBranchDataDao extends BaseDao { + /** + * 7、基层党建-建设情况数据(支部、联建、志愿) + * 1) 根据CUSTOMER_ID、YEAR_ID、MONTH_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param yearId + * @param monthId + * @param orgIds 组织Id集合 + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void deletePartyBranchData(@Param("customerId") String customerId, + @Param("yearId") String yearId, + @Param("monthId") String monthId, + @Param("orgIds") String[] orgIds); + + /** + * 7、基层党建-建设情况数据(支部、联建、志愿) + * 2) 在批量新增 + * + * @param list + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void batchInsertPartyBranchData(@Param("list") List list, @Param("customerId")String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java new file mode 100644 index 0000000000..276b08e356 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java @@ -0,0 +1,59 @@ +/** + * 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.dao.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.PartyLinkMassesDataFormDTO; +import com.epmet.entity.screen.ScreenPartyLinkMassesDataEntity; +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 2020-08-18 + */ +@Mapper +public interface ScreenPartyLinkMassesDataDao extends BaseDao { + + /** + * 8、党建引领-党员联系群众数据 + * 1) 根据CUSTOMER_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param orgIds 组织Id集合 + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void deletePartyLinkMassesData(@Param("customerId") String customerId, + @Param("orgIds") String[] orgIds); + + /** + * 8、党建引领-党员联系群众数据 + * 2) 在批量新增 + * + * @param list + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void batchInsertPartyLinkMassesData(@Param("list") List list, @Param("customerId")String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java new file mode 100644 index 0000000000..9e43669618 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java @@ -0,0 +1,61 @@ +/** + * 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.dao.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.PartyUserRankDataFormDTO; +import com.epmet.entity.screen.ScreenPartyUserRankDataEntity; +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 2020-08-18 + */ +@Mapper +public interface ScreenPartyUserRankDataDao extends BaseDao { + + /** + * 9、党建引领|基层治理-居民(党员)积分排行榜 + * 1) 根据CUSTOMER_ID、GRID_ID、USER_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param gridId + * @param userId + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void deletePartyUserRankData(@Param("customerId") String customerId, + @Param("gridId") String gridId, + @Param("userId") String userId); + + /** + * 9、党建引领|基层治理-居民(党员)积分排行榜 + * 2) 在批量新增 + * + * @param list + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void batchInsertPartyUserRankData(@Param("list") List list,@Param("customerId")String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java new file mode 100644 index 0000000000..202fc4aa59 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java @@ -0,0 +1,59 @@ +/** + * 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.dao.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.PioneerDataFormDTO; +import com.epmet.entity.screen.ScreenPioneerDataEntity; +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 2020-08-18 + */ +@Mapper +public interface ScreenPioneerDataDao extends BaseDao { + + /** + * 10、党建引领-先锋模范数据 + * 1) 根据CUSTOMER_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param orgIds 组织Id集合 + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void deletePioneerData(@Param("customerId") String customerId, + @Param("orgIds") String[] orgIds); + + /** + * 10、党建引领-先锋模范数据 + * 2) 在批量新增 + * + * @param list + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void batchInsertPioneerData(@Param("list") List list, @Param("customerId")String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java new file mode 100644 index 0000000000..69422c07c4 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java @@ -0,0 +1,78 @@ +/** + * 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.dao.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.screen.ScreenUserJoinEntity; +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 2020-08-18 + */ +@Mapper +public interface ScreenUserJoinDao extends BaseDao { + + /** + * 11、基层治理-公众参与 + * 0) 查询上月的基础数据,可用来计算本月的增长率 + * @param customerId + * @param yearId + * @param monthId + * @param orgIds 组织Id集合 + * @return java.util.List + * @Author zhangyong + * @Date 14:46 2020-08-21 + **/ + List selectLastMonthScreenUserJoinList(@Param("customerId") String customerId, + @Param("yearId") String yearId, + @Param("monthId") String monthId, + @Param("orgIds") String[] orgIds); + + /** + * 11、基层治理-公众参与 + * 1) 根据CUSTOMER_ID、YEAR_ID、MONTH_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param yearId + * @param monthId + * @param orgIds 组织Id集合 + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void deleteUserJoin(@Param("customerId") String customerId, + @Param("yearId") String yearId, + @Param("monthId") String monthId, + @Param("orgIds") String[] orgIds); + + /** + * 11、基层治理-公众参与 + * 2) 在批量新增 + * + * @param list + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void batchInsertUserJoin(@Param("list") List list, @Param("customerId")String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java new file mode 100644 index 0000000000..e0712dee50 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java @@ -0,0 +1,59 @@ +/** + * 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.dao.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.UserTotalDataFormDTO; +import com.epmet.entity.screen.ScreenUserTotalDataEntity; +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 2020-08-18 + */ +@Mapper +public interface ScreenUserTotalDataDao extends BaseDao { + + /** + * 12、中央区各类总数 + * 1) 根据CUSTOMER_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param orgIds 组织Id集合 + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void deleteUserTotalData(@Param("customerId") String customerId, + @Param("orgIds") String[] orgIds); + + /** + * 12、中央区各类总数 + * 2) 在批量新增 + * + * @param list + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void batchInsertUserTotalData(@Param("list") List list, @Param("customerId")String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java new file mode 100644 index 0000000000..24827756fa --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java @@ -0,0 +1,102 @@ +/** + * 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.entity.indexcoll; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 治理能力-部门相关数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-20 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_govrn_ablity_dept_monthly") +public class FactIndexGovrnAblityDeptMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 部门所属机关Id + */ + private String agencyId; + + /** + * 部门id + */ + private String deptId; + + /** + * 月维度Id:yyyyMM + */ + private String monthId; + + /** + * 季度Id:yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4 + */ + private String quarterId; + + /** + * 年Id:yyyy + */ + private String yearId; + + /** + * 区直部门被吹哨次数 + */ + private Integer transferedCount; + + /** + * 区直部门办结项目数 + */ + private Integer closedProjectCount; + + /** + * 区直部门项目响应度 所有被吹哨后的滞留时间除以项目数 + */ + private BigDecimal respProjectRatio; + + /** + * 区直部门办结项目的处理效率 + */ + private BigDecimal handleProjectRatio; + + /** + * 区直部门项目办结率 + */ + private BigDecimal closedProjectRatio; + + /** + * 办结项目满意度 + */ + private BigDecimal satisfactionRatio; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java new file mode 100644 index 0000000000..c1c6553ef5 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java @@ -0,0 +1,112 @@ +/** + * 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.entity.indexcoll; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 治理能力-网格相关事实表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-20 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_govrn_ablity_grid_monthly") +public class FactIndexGovrnAblityGridMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 网格所属机关Id + */ + private String agencyId; + + /** + * 网格Id + */ + private String gridId; + + /** + * 月维度Id:yyyyMM + */ + private String monthId; + + /** + * 季度Id:yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4 + */ + private String quarterId; + + /** + * 年Id:yyyy + */ + private String yearId; + + /** + * 网格总议题数 + */ + private Integer issueTotal; + + /** + * 网格人均议题数目 + */ + private Integer avgIssueCount; + + /** + * 网格议题转项目率 + */ + private BigDecimal avgShiftProjectRatio; + + /** + * 网格总项目数 + */ + private Integer projectTotal; + + /** + * 网格自治项目数 统计期网格自身内办结的项目数目 + */ + private Integer selfSolveProjectCount; + + /** + * 网格办结项目数 统计期内办结的项目数目 + */ + private Integer resolveProjectCount; + + /** + * 网格吹哨部门准确率 + */ + private BigDecimal transferRightRatio; + + /** + * 网格内解决的项目的满意度 + */ + private BigDecimal satisfactionRatio; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java new file mode 100644 index 0000000000..94eec97d6f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java @@ -0,0 +1,107 @@ +/** + * 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.entity.indexcoll; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 治理能力-街道及社区相关数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-20 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_govrn_ablity_org_monthly") +public class FactIndexGovrnAblityOrgMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 机关Id + */ + private String agencyId; + + /** + * 上级组织Id,如果是根级组织,此列为0 + */ + private String parentId; + + /** + * 月维度Id:yyyyMM + */ + private String monthId; + + /** + * 季度Id:yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4 + */ + private String quarterId; + + /** + * 年Id:yyyy + */ + private String yearId; + + /** + * 数据类型 allRegion:全区;street:街道;community:社区;grid:网格 + */ + private String dataType; + + /** + * 被吹哨次数 + */ + private Integer transferedCount; + + /** + * 办结项目数 + */ + private Integer closedProjectCount; + + /** + * 项目响应度 所有被吹哨后的滞留时间除以项目数 + */ + private BigDecimal respProjectRatio; + + /** + * 办结项目率 + */ + private BigDecimal closedProjectRatio; + + /** + * 办结项目满意度 + */ + private BigDecimal satisfactionRatio; + + /** + * 超期项目率 + */ + private BigDecimal overdueProjectRatio; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java new file mode 100644 index 0000000000..e6ec77f0fa --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java @@ -0,0 +1,127 @@ +/** + * 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.entity.indexcoll; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 党建能力-党员相关的事实表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-20 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_party_ablity_cpc_monthly") +public class FactIndexPartyAblityCpcMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 机关Id + */ + private String agencyId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 网格Id + */ + private String gridId; + + /** + * 用户Id: + */ + private String userId; + + /** + * 月维度Id: yyyMM + */ + private String monthId; + + /** + * 季度Id: yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4 + */ + private String quarterId; + + /** + * 年Id : yyyy + */ + private String yearId; + + /** + * 党员提出的话题数 + */ + private Integer createTopicCount; + + /** + * 党员参与话题数(支持,反对,评论,浏览) + */ + private Integer joinTopicCount; + + /** + * 话题转议题数 + */ + private Integer shiftIssueCount; + + /** + * 议题转项目数 + */ + private Integer shiftProjectCount; + + /** + * 参加三会一课次数 + */ + private Integer joinThreeMeetsCount; + + /** + * 自建群群众人数 + */ + private Integer groupUserCount; + + /** + * 自建群活跃度-话题数 + */ + private Integer groupTopicCount; + + /** + * 议题转项目率 + */ + private BigDecimal topicToIssueRatio; + + /** + * 提出的议题转项目数 + */ + private Integer issueToProjectCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java new file mode 100644 index 0000000000..208106e87a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java @@ -0,0 +1,137 @@ +/** + * 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.entity.indexcoll; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 党建能力-网格相关事实表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-20 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_party_ablity_grid_monthly") +public class FactIndexPartyAblityGridMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 机关Id + */ + private String agencyId; + + /** + * 网格Id + */ + private String gridId; + + /** + * 月维度Id + */ + private String monthId; + + /** + * 季度Id + */ + private String quarterId; + + /** + * 年Id + */ + private String yearId; + + /** + * 网格群众用户数 + */ + private Integer userCount; + + /** + * 网格党员用户数 + */ + private Integer partyCount; + + /** + * 网格活跃群众用户数 + */ + private Integer activeUserCount; + + /** + * 网格活跃党员用户数 + */ + private Integer activePartyCount; + + /** + * 网格党员人均提出话题数 + */ + private Integer partyAvgTopicCount; + + /** + * 网格群众人均提出话题数 + */ + private Integer userAvgTopicCount; + + /** + * 网格党员人均提出的议题转项目数 + */ + private Integer partyAvgShiftProjectCount; + + /** + * 网格群众人均提出的议题转项目数 + */ + private Integer userAvgShiftProjectCount; + + /** + * 建群党员数(累计值) 去重 + */ + private Integer createGroupPartyCount; + + /** + * 网格发文数 + */ + private Integer publishArticleCount; + + /** + * 网格议题转项目率 + */ + private BigDecimal issueToProjectRatio; + + /** + * 组织三会一课次数 + */ + private Integer createThreeMeetsCount; + + /** + * 党员参加三会一课人次 + */ + private Integer joinThreeMeetsCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java new file mode 100644 index 0000000000..1bf023f055 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java @@ -0,0 +1,81 @@ +/** + * 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.entity.indexcoll; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 党建能力-街道及社区相关事实表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-20 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_party_ablity_org_monthly") +public class FactIndexPartyAblityOrgMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 机关Id + */ + private String agencyId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 月维度Id + */ + private String monthId; + + /** + * 季度Id + */ + private String quarterId; + + /** + * 年Id + */ + private String yearId; + + /** + * 发文数 + */ + private Integer publishArticleCount; + + /** + * 数据类型 allRegion:全区;community:社区;street:街道 + */ + private String dataType; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java new file mode 100644 index 0000000000..d4c6aa6ab6 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java @@ -0,0 +1,87 @@ +/** + * 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.entity.indexcoll; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 服务能力-网格相关事实表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-20 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_service_ablity_grid_monthly") +public class FactIndexServiceAblityGridMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 网格所属组织Id + */ + private String agencyId; + + /** + * 网格Id + */ + private String gridId; + + /** + * 月维度Id:yyyyMM + */ + private String monthId; + + /** + * 季度Id:yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4 + */ + private String quarterId; + + /** + * 年Id: yyyy + */ + private String yearId; + + /** + * 网格活动组织次数 爱心活动 + */ + private Integer activityCount; + + /** + * 网格志愿者占比 + */ + private BigDecimal volunteerRatio; + + /** + * 网格党员志愿者率 + */ + private BigDecimal partyVolunteerRatio; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java new file mode 100644 index 0000000000..8abeb1c172 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java @@ -0,0 +1,81 @@ +/** + * 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.entity.indexcoll; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 服务能力-组织(街道|社区|全区)相关事实表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-20 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_service_ablity_org_monthly") +public class FactIndexServiceAblityOrgMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织Id + */ + private String agencyId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 月维度Id:yyyyMM + */ + private String monthId; + + /** + * 季度Id:yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4 + */ + private String quarterId; + + /** + * 年Id:yyyy + */ + private String yearId; + + /** + * 社区/街道活动组织次数 爱心活动 + */ + private Integer activityCount; + + /** + * 数据类型 allRegion:全区;street:街道;community:社区;grid:网格 + */ + private String dataType; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexDictEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexDictEntity.java new file mode 100644 index 0000000000..2ea5745dba --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexDictEntity.java @@ -0,0 +1,53 @@ +/** + * 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.entity.screen; + +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 2020-08-19 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("index_dict") +public class IndexDictEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 指标名 + */ + private String indexName; + + /** + * 指标描述 + */ + private String indexDesc; + + /** + * 指标级别(1,2,3,4,5) + */ + private String level; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java new file mode 100644 index 0000000000..c0088d5383 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java @@ -0,0 +1,65 @@ +/** + * 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.entity.screen; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 客户指标详情 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("index_group_detail") +public class IndexGroupDetailEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * index_group.id + */ + private String indexGroupId; + + /** + * 指标id + */ + private String indexId; + + /** + * 权重(同一组权重总和=1) + */ + private BigDecimal weight; + + /** + * 是否启用:启用:enable 禁用:disabled + */ + private String status; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java new file mode 100644 index 0000000000..569cda48d9 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java @@ -0,0 +1,65 @@ +/** + * 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.entity.screen; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 客户指标详情 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("index_group_detail_template") +public class IndexGroupDetailTemplateEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * index_group.id + */ + private String indexGroupId; + + /** + * 指标id + */ + private String indexId; + + /** + * 权重(同一组权重总和=1) + */ + private BigDecimal weight; + + /** + * 是否启用:启用:enable 禁用:disabled + */ + private String status; + + /** + * 阈值 如果是百分比 则为除以100以后的值 + */ + private BigDecimal threshold; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupEntity.java new file mode 100644 index 0000000000..24df1ef18a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupEntity.java @@ -0,0 +1,58 @@ +/** + * 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.entity.screen; + +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 2020-08-19 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("index_group") +public class IndexGroupEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 指标id + */ + private String indexId; + + /** + * 是否启用:启用:enable 禁用:disabled + */ + private String status; + + /** + * 当前指标关联的上一级指标分组,如果没有上一级,则为0 + */ + private String parentIndexGroupId; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupTemplateEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupTemplateEntity.java new file mode 100644 index 0000000000..3348ebdeda --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupTemplateEntity.java @@ -0,0 +1,53 @@ +/** + * 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.entity.screen; + +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 2020-08-19 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("index_group_template") +public class IndexGroupTemplateEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 指标id + */ + private String indexId; + + /** + * 是否启用:启用:enable 禁用:disabled + */ + private String status; + + /** + * 当前指标关联的上一级指标分组,如果没有上一级,则为0 + */ + private String parentIndexGroupId; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCpcBaseDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCpcBaseDataEntity.java new file mode 100644 index 0000000000..e649e5e89f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCpcBaseDataEntity.java @@ -0,0 +1,116 @@ +/** + * 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.entity.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 基层党建-党员基本情况 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-21 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_cpc_base_data") +public class ScreenCpcBaseDataEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) + */ + private String dataEndTime; + + /** + * 注册用户数 + */ + private Integer registerUserCount; + + /** + * 群众用户数 + */ + private Integer resiTotal; + + /** + * 注册党员数 + */ + private Integer partyMemberCount; + + /** + * 小于20岁的党员总人数 + */ + private Integer ageLevel1; + + /** + * 20-30岁的党员总人数 + */ + private Integer ageLevel2; + + /** + * 31-40岁的党员总人数 + */ + private Integer ageLevel3; + + /** + * 41-50岁的党员总人数 + */ + private Integer ageLevel4; + + /** + * 51-60岁的党员总人数 + */ + private Integer ageLevel5; + + /** + * 60+岁的党员总人数 + */ + private Integer ageLevel6; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerAgencyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerAgencyEntity.java new file mode 100644 index 0000000000..96b2e23dfe --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerAgencyEntity.java @@ -0,0 +1,104 @@ +/** + * 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.entity.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 组织机构信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-21 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_customer_agency") +public class ScreenCustomerAgencyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 组织id + */ + private String agencyId; + + /** + * 组织名称 + */ + private String agencyName; + + /** + * 父级id ,顶级,此列为0 + */ + private String pid; + + /** + * 所有上级ID,用逗号(英文)分开 + */ + private String pids; + + /** + * 所有组织名称以-链接 + */ + private String allParentNames; + + /** + * 坐标区域 + */ + private String areaMarks; + + /** + * 中心点位 + */ + private String centerMark; + + /** + * 党工委或者党委的位置,目前此阶段为预留字段 + */ + private String partyMark; + + /** + * 机关级别(社区级:community, +乡(镇、街道)级:street, +区县级: district, +市级: city +省级:province) + */ + private String level; + + /** + * 行政地区编码 + */ + private String areaCode; + + /** + * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) + */ + private String dataEndTime; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerDeptEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerDeptEntity.java new file mode 100644 index 0000000000..f020e44cd8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerDeptEntity.java @@ -0,0 +1,81 @@ +/** + * 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.entity.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 部门信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-21 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_customer_dept") +public class ScreenCustomerDeptEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 部门id + */ + private String deptId; + + /** + * 部门名称 + */ + private String deptName; + + /** + * 部门所属组织id + */ + private String parentAgencyId; + + /** + * 坐标区域 + */ + private String areaMarks; + + /** + * 中心点位 + */ + private String centerMark; + + /** + * 部门所在位置(目前预留此字段) + */ + private String deptMark; + + /** + * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) + */ + private String dataEndTime; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java new file mode 100644 index 0000000000..99b6c99553 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java @@ -0,0 +1,81 @@ +/** + * 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.entity.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 网格(党支部)信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-21 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_customer_grid") +public class ScreenCustomerGridEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 网格id + */ + private String gridId; + + /** + * 组织名称 + */ + private String gridName; + + /** + * 网格所属组织id + */ + private String parentAgencyId; + + /** + * 坐标区域 + */ + private String areaMarks; + + /** + * 中心点位 + */ + private String centerMark; + + /** + * 党支部(=网格)的位置 + */ + private String partyMark; + + /** + * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) + */ + private String dataEndTime; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java new file mode 100644 index 0000000000..845bbb7db0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java @@ -0,0 +1,130 @@ +/** + * 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.entity.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 基层治理-难点堵点(耗时最长|设计部门最多|处理次数) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-21 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_difficulty_data") +public class ScreenDifficultyDataEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 事件原Id + */ + private String eventId; + + /** + * 事件图片 + */ + private String eventImgUrl; + + /** + * 事件来源 XX街道-社区-网格 + */ + private String eventSource; + + /** + * 事件内容 + */ + private String eventContent; + + /** + * 事件耗时 单位:分钟 + */ + private Integer eventCostTime; + + /** + * 事件涉及部门数 + */ + private Integer eventReOrg; + + /** + * 事件被处理次数(08-21新增) + */ + private Integer eventHandledCount; + /** + * 事件类别编码 + */ + private String eventCategoryCode; + + /** + * 事件类别名称 + */ + private String eventCategoryName; + + /** + * 事件状态key + */ + private String eventStatusCode; + + /** + * 事件状态描述 + */ + private String eventStatusDesc; + + /** + * 最近一次操作说明 + */ + private String latestOperateDesc; + + /** + * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) + */ + private String dataEndTime; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java new file mode 100644 index 0000000000..e666f852b0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java @@ -0,0 +1,147 @@ +/** + * 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.entity.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 中央区-事件数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-21 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_event_data") +public class ScreenEventDataEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 原始事件Id + */ + private String eventId; + + /** + * 事件名称 + */ + private String eventTitle; + + /** + * 事件时间 + */ + private Date eventCreateTime; + + /** + * 联系人 联系人 + */ + private String linkMobile; + + /** + * 事件描述 + */ + private String eventContent; + + /** + * 事件图片 + */ + private String eventImgUrl; + + /** + * 事件待处理级别 red:红;yellow:黄;绿色:green + */ + private String eventLevel; + + /** + * 事件地址 + */ + private String eventAddress; + + /** + * 事件所在经度 + */ + private BigDecimal longitude; + + /** + * 事件所在维度 + */ + private BigDecimal latitude; + + /** + * 最后处理组织 + */ + private String lastProcessDept; + + /** + * 最后处理时间 + */ + private Date lastProcessDate; + + /** + * 事件状态key + */ + private String eventStatusCode; + + /** + * 事件状态描述 + */ + private String eventStatusDesc; + + /** + * 最近一次操作说明 + */ + private String latestOperateDesc; + + /** + * 数据更新至: yyyy|yyyMM|yyyyMMdd + */ + private String dataEndTime; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventImgDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventImgDataEntity.java new file mode 100644 index 0000000000..fb0e81290b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventImgDataEntity.java @@ -0,0 +1,56 @@ +/** + * 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.entity.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 中央区-事件数据图片数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-21 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_event_img_data") +public class ScreenEventImgDataEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 原始事件Id + */ + private String eventId; + + /** + * 图片图片地址 + */ + private String eventImgUrl; + + /** + * 排序 + */ + private Integer sort; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenGovernRankDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenGovernRankDataEntity.java new file mode 100644 index 0000000000..d280785a6c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenGovernRankDataEntity.java @@ -0,0 +1,97 @@ +/** + * 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.entity.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 基层治理-治理能力排行数据(按月统计) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-21 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_govern_rank_data") +public class ScreenGovernRankDataEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 年Id + */ + private String yearId; + + /** + * 月份Id + */ + private String monthId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 响应率 + */ + private BigDecimal responseRatio; + + /** + * 解决率 + */ + private BigDecimal resolvedRatio; + + /** + * 自治率 + */ + private BigDecimal governRatio; + + /** + * 满意率 + */ + private BigDecimal satisfactionRatio; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataMonthlyEntity.java new file mode 100644 index 0000000000..fbeb83ba9a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataMonthlyEntity.java @@ -0,0 +1,97 @@ +/** + * 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.entity.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 指数-指数数据(每月数值) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-21 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_index_data_monthly") +public class ScreenIndexDataMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 年Id: yyyy + */ + private String yearId; + + /** + * 月份Id yyyyMM + */ + private String monthId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 总指数 + */ + private BigDecimal indexTotal; + + /** + * 党建能力指数 + */ + private BigDecimal partyDevAblity; + + /** + * 服务能力指数 + */ + private BigDecimal serviceAblity; + + /** + * 治理能力指数 + */ + private BigDecimal governAblity; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataYearlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataYearlyEntity.java new file mode 100644 index 0000000000..259947010d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataYearlyEntity.java @@ -0,0 +1,92 @@ +/** + * 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.entity.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 指数-指数数据(按年统计) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-21 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_index_data_yearly") +public class ScreenIndexDataYearlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 年Id: yyyy + */ + private String yearId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 总指数 + */ + private BigDecimal indexTotal; + + /** + * 党建能力指数 + */ + private BigDecimal partyDevAblity; + + /** + * 服务能力指数 + */ + private BigDecimal serviceAblity; + + /** + * 治理能力指数 + */ + private BigDecimal governAblity; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java new file mode 100644 index 0000000000..a732eda4b9 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java @@ -0,0 +1,112 @@ +/** + * 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.entity.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 党建引领-组织先进排行榜 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-21 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_org_rank_data") +public class ScreenOrgRankDataEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 年Id + */ + private String yearId; + + /** + * 月份Id + */ + private String monthId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 党员总数 + */ + private Integer partyTotal; + + /** + * 小组(支部建设)总数 + */ + private Integer groupTotal; + + /** + * 话题总数 + */ + private Integer topicTotal; + + /** + * 议题总数 + */ + private Integer issueTotal; + + /** + * 项目总数 + */ + private Integer projectTotal; + + /** + * 结案率 + */ + private BigDecimal closeProjectRatio; + + /** + * 满意率 + */ + private BigDecimal satisfactionRatio; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyBranchDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyBranchDataEntity.java new file mode 100644 index 0000000000..cb870d2de7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyBranchDataEntity.java @@ -0,0 +1,105 @@ +/** + * 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.entity.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 基层党建-建设情况数据(支部,联建,志愿服务)按月 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-21 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_party_branch_data") +public class ScreenPartyBranchDataEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 年Id + */ + private String yearId; + + /** + * 月份Id + */ + private String monthId; + + /** + * 数据类别 :party:支部建设; union:联合建设;党员志愿服务:voluntaryservice + */ + private String type; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 会议分类Id + */ + private String meetCategoryId; + + /** + * 会议分类名称(三会党课、主题党日.....等等) + */ + private String meetCategoryName; + + /** + * 组织次数 + */ + private Integer organizeCount; + + /** + * 参加人数 + */ + private Integer joinUserCount; + + /** + * 平均参加人数 + */ + private Integer averageJoinUserCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyLinkMassesDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyLinkMassesDataEntity.java new file mode 100644 index 0000000000..c663fc770b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyLinkMassesDataEntity.java @@ -0,0 +1,81 @@ +/** + * 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.entity.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 党建引领-党员联系群众数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-21 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_party_link_masses_data") +public class ScreenPartyLinkMassesDataEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 党员建群总数 + */ + private Integer createGroupTotal; + + /** + * 群成员总数 + */ + private Integer groupUserTotal; + + /** + * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) + */ + private String dataEndTime; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java new file mode 100644 index 0000000000..702e184439 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java @@ -0,0 +1,101 @@ +/** + * 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.entity.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 党建引领|基层治理-市民(党员)积分排行榜 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-21 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_party_user_rank_data") +public class ScreenPartyUserRankDataEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 网格id + */ + private String gridId; + + /** + * 组织名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String orgId; + + /** + * 网格所属的组织名称 + */ + private String orgName; + + /** + * 是否是党员标志:1是。0不是党员 + */ + private Integer partyFlag; + + /** + * 用户Id + */ + private String userId; + + /** + * 姓 + */ + private String surname; + + /** + * 名 + */ + private String name; + + /** + * 姓名 + */ + private String userName; + + /** + * 用户积分 + */ + private Integer pointTotal; + + /** + * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) + */ + private String dataEndTime; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPioneerDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPioneerDataEntity.java new file mode 100644 index 0000000000..b53561b229 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPioneerDataEntity.java @@ -0,0 +1,122 @@ +/** + * 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.entity.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 党建引领-先锋模范数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-21 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_pioneer_data") +public class ScreenPioneerDataEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 党员参与议事 + */ + private Integer issueTotal; + + /** + * 党员参与议事占比 + */ + private BigDecimal issueRatio; + + /** + * 党员发布话题 + */ + private Integer topicTotal; + + /** + * 党员发布话题占比 + */ + private BigDecimal topicRatio; + + /** + * 党员发布议题 + */ + private Integer publishIssueTotal; + + /** + * 党员发布议题占比 + */ + private BigDecimal publishIssueRatio; + + /** + * 议题转项目数 + */ + private Integer shiftProjectTotal; + + /** + * 议题转项目占比 + */ + private BigDecimal shiftProjectRatio; + + /** + * 解决项目总数 + */ + private Integer resolvedProjectTotal; + + /** + * 解决项目总数占比 + */ + private BigDecimal resolvedProjectRatio; + + /** + * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) + */ + private String dataEndTime; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java new file mode 100644 index 0000000000..8a2009d9ca --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java @@ -0,0 +1,122 @@ +/** + * 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.entity.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 基层治理-公众参与 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-21 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_user_join") +public class ScreenUserJoinEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 数据更新至 年Id: yyyy + */ + private String yearId; + + /** + * 数据更新至 :月份Id :yyyyMM + */ + private String monthId; + + /** + * 总的参与次数 + */ + private Integer joinTotal; + + /** + * 总的参与次数较上月增长率(采集的时候后台自己计算) + */ + private BigDecimal joinTotalUpRate; + + /** + * 增长:incr;下降:decr; 相等 :eq + */ + private String joinTotalUpFlag; + + /** + * 人均议题 + */ + private Integer avgIssue; + + /** + * 人均议题较上月增长率(采集的时候后台自己计算) + */ + private BigDecimal avgIssueUpRate; + + /** + * 增长:incr;下降:decr; 相等 :eq + */ + private String avgIssueUpFlag; + + /** + * 平均参与度 + */ + private Integer avgJoin; + + /** + * 平均参与度较上月增长率(采集的时候后台自己计算) + */ + private BigDecimal agvgJoinUpRate; + + /** + * 增长:incr;下降:decr; 相等 :eq + */ + private String agvgJoinUpFlag; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserTotalDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserTotalDataEntity.java new file mode 100644 index 0000000000..a58f257cc6 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserTotalDataEntity.java @@ -0,0 +1,111 @@ +/** + * 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.entity.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 中央区-各类(用户|党员|党群|话题|议题|项目|注册人数|参与人数)总数 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-21 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_user_total_data") +public class ScreenUserTotalDataEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织类别 agency:组织;网格:grid;部门:department; + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称,也可能是网格名称 + */ + private String orgName; + + /** + * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) + */ + private String dataEndTime; + + /** + * 用户总数 + */ + private Integer userTotal; + + /** + * 注册党总数 + */ + private Integer partyTotal; + + /** + * 小组(党群)总数 + */ + private Integer groupTotal; + + /** + * 话题总数 + */ + private Integer topicTotal; + + /** + * 议题总数 + */ + private Integer issueTotal; + + /** + * 项目总数 + */ + private Integer projectTotal; + + /** + * 注册人数(08-21新增) + */ + private Integer regUserTotal; + + /** + * 参与人数(08-21新增) + */ + private Integer joinUserTotal; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java new file mode 100644 index 0000000000..76f0897890 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java @@ -0,0 +1,272 @@ +package com.epmet.model; + +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.event.AnalysisEventListener; +import com.alibaba.fastjson.JSON; +import com.epmet.commons.tools.utils.UniqueIdGenerator; +import com.epmet.entity.screen.IndexDictEntity; +import com.epmet.entity.screen.IndexGroupDetailTemplateEntity; +import com.epmet.entity.screen.IndexGroupTemplateEntity; +import com.epmet.service.screen.IndexDictService; +import com.epmet.service.screen.IndexGroupDetailTemplateService; +import com.epmet.service.screen.IndexGroupTemplateService; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.util.*; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.stream.Collectors; + +/** + * 读取转换异常 + * + * @author Jiaju Zhuang + */ +public class IndexExcelDataListener extends AnalysisEventListener { + private static final Logger LOGGER = LoggerFactory.getLogger(IndexExcelDataListener.class); + /** + * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收 + */ + private static volatile boolean isGroup = false; + ; + AtomicInteger total = new AtomicInteger(0); + Map indexDicMap = new HashMap<>(); + Map indexGroupMap = new HashMap<>(); + Map indexGroupDetailMap = new HashMap<>(); + List indexModelList = new ArrayList<>(); + private String preWheight; + + private Integer wheightSum = 0; + /** + * 假设这个是一个DAO,当然有业务逻辑这个也可以是一个service。当然如果不用存储这个对象没用。 + */ + private IndexDictService indexDictService; + + private IndexGroupTemplateService indexGroupTemplateService; + + private IndexGroupDetailTemplateService indexGroupDetailTemplateService; + + + /** + * 如果使用了spring,请使用这个构造方法。每次创建Listener的时候需要把spring管理的类传进来 + * + * @param indexDictService + */ + public IndexExcelDataListener(IndexDictService indexDictService, IndexGroupTemplateService indexGroupTemplateService, IndexGroupDetailTemplateService indexGroupDetailTemplateService) { + this.indexDictService = indexDictService; + this.indexGroupTemplateService = indexGroupTemplateService; + this.indexGroupDetailTemplateService = indexGroupDetailTemplateService; + } + + /** + * 这个每一条数据解析都会来调用 + * + * @param data one row value. Is is same as {@link AnalysisContext#readRowHolder()} + * @param context + */ + @Override + public void invoke(IndexModel data, AnalysisContext context) { + if (data == null || data.getIsUsed() == null || data.getIsUsed() != 1) { + return; + } + + //合并单元格的 权重 处理 + String weight = data.getWeight(); + if (StringUtils.isNotBlank(weight)) { + weight = weight.replace("%", ""); + data.setWeight(weight); + preWheight = data.getWeight(); + } else { + data.setWeight(preWheight); + } + LOGGER.info("解析到一条数据:{}", JSON.toJSONString(data)); + + IndexDictEntity entity = new IndexDictEntity(); + IndexDictEntity entity2 = new IndexDictEntity(); + IndexDictEntity entity3 = new IndexDictEntity(); + IndexDictEntity entity4 = new IndexDictEntity(); + IndexDictEntity entity5 = new IndexDictEntity(); + + indexModelList.add(data); + buildIndexDicEntity(data, entity, entity2, entity3, entity4, entity5); + + buildIndexGroupEntity(); + + total.addAndGet(1); + + + // 达到BATCH_COUNT了,需要去存储一次数据库,防止数据几万条数据在内存,容易OOM + /*if (isGroup) { + saveData(); + // 存储完成清理 list + list.clear(); + }*/ + } + + private void buildIndexGroupEntity() { + List collect = indexModelList.stream().sorted(Comparator.comparing(IndexModel::getLevel1Index)).collect(Collectors.toList()); + collect.forEach(index -> { + if (index.getLevel1Index().equals("党员相关")) { + IndexDictEntity indexDictEntity = indexDicMap.get(index.getLevel1Index()); + String level1GroupId = UniqueIdGenerator.generate(); + IndexGroupTemplateEntity group1 = indexGroupMap.get(index.getLevel1Index()); + if (group1 == null) { + group1 = new IndexGroupTemplateEntity(); + group1.setIndexId(indexDictEntity.getId()); + group1.setParentIndexGroupId("0"); + group1.setId(level1GroupId); + indexGroupMap.put(index.getLevel1Index(), group1); + } + + String level4Index = index.getLevel4Index(); + indexDictEntity = indexDicMap.get(level4Index); + String level2GroupId = UniqueIdGenerator.generate(); + + IndexGroupTemplateEntity group2 = indexGroupMap.get(level4Index); + IndexGroupDetailTemplateEntity templateEntity = null; + if (group2 == null) { + group2 = new IndexGroupTemplateEntity(); + group2.setIndexId(indexDictEntity.getId()); + group2.setParentIndexGroupId(level1GroupId); + group2.setId(level2GroupId); + indexGroupMap.put(level4Index, group2); + //构建 分组明细 + templateEntity = indexGroupDetailMap.get(level4Index); + if (templateEntity == null) { + buildIndexGroupDetail(indexDictEntity, index, group1.getId(), 2); + } + } + indexDictEntity = indexDicMap.get(index.getLevel5Index()); + + templateEntity = indexGroupDetailMap.get(index.getLevel5Index()); + if (templateEntity == null) { + buildIndexGroupDetail(indexDictEntity, index, group2.getId(), 5); + } + } else { + //todo 测试完去掉 + //if ("街道相关".equals(index.getLevel1Index())) { + IndexDictEntity indexDictEntity = indexDicMap.get(index.getLevel1Index()); + String level1GroupId = UniqueIdGenerator.generate(); + IndexGroupTemplateEntity group1 = indexGroupMap.get(index.getLevel1Index()); + if (group1 == null) { + group1 = new IndexGroupTemplateEntity(); + group1.setIndexId(indexDictEntity.getId()); + group1.setParentIndexGroupId("0"); + group1.setId(level1GroupId); + indexGroupMap.put(index.getLevel1Index(), group1); + } + + String level2Index = index.getLevel2Index(); + indexDictEntity = indexDicMap.get(level2Index); + String level2GroupId = UniqueIdGenerator.generate(); + + IndexGroupTemplateEntity group2 = indexGroupMap.get(level2Index); + IndexGroupDetailTemplateEntity templateEntity = null; + if (group2 == null) { + group2 = new IndexGroupTemplateEntity(); + group2.setIndexId(indexDictEntity.getId()); + group2.setParentIndexGroupId(level1GroupId); + group2.setId(level2GroupId); + indexGroupMap.put(level2Index, group2); + //构建 分组明细 + templateEntity = indexGroupDetailMap.get(level2Index); + if (templateEntity == null) { + buildIndexGroupDetail(indexDictEntity, index, group1.getId(), 2); + } + } + indexDictEntity = indexDicMap.get(index.getLevel5Index()); + + templateEntity = indexGroupDetailMap.get(index.getLevel5Index()); + if (templateEntity == null) { + buildIndexGroupDetail(indexDictEntity, index, group2.getId(), 5); + } + } + //} + }); + LOGGER.info("所有指标分组数据解析完成:{}", JSON.toJSONString(indexGroupMap.values())); + LOGGER.info("所有指标分组明细数据解析完成:{}", JSON.toJSONString(indexGroupDetailMap.values())); + } + + private void buildIndexGroupDetail(IndexDictEntity indexDictEntity, IndexModel index, String groupId, Integer level) { + IndexGroupDetailTemplateEntity templateEntity; + templateEntity = new IndexGroupDetailTemplateEntity(); + templateEntity.setIndexGroupId(groupId); + templateEntity.setIndexId(indexDictEntity.getId()); + + if (level == 5) { + String level5WeightStr = index.getLevel5Weight().replace("%", ""); + templateEntity.setWeight(new BigDecimal(level5WeightStr).divide(new BigDecimal(100), 4, RoundingMode.HALF_UP)); + indexGroupDetailMap.put(index.getLevel5Index(), templateEntity); + } else { + indexGroupDetailMap.put(indexDictEntity.getIndexName(), templateEntity); + templateEntity.setWeight(new BigDecimal(index.getWeight()).divide(new BigDecimal(100), 4, RoundingMode.HALF_UP)); + } + templateEntity.setId(UniqueIdGenerator.generate()); + if (StringUtils.isNotBlank(index.getThreshold())) { + String thresholdStr = index.getThreshold().replace("%", ""); + templateEntity.setThreshold(new BigDecimal(thresholdStr).divide(new BigDecimal(100), 4, RoundingMode.HALF_UP)); + } + } + + private void buildIndexDicEntity(IndexModel data, IndexDictEntity entity, IndexDictEntity entity2, IndexDictEntity entity3, IndexDictEntity entity4, IndexDictEntity entity5) { + if (!indexDicMap.containsKey(data.getLevel1Index())) { + entity.setId(UniqueIdGenerator.generate()); + entity.setIndexName(data.getLevel1Index()); + entity.setLevel("1"); + indexDicMap.put(data.getLevel1Index(), entity); + } + if (!indexDicMap.containsKey(data.getLevel2Index())) { + entity2.setId(UniqueIdGenerator.generate()); + entity2.setIndexName(data.getLevel2Index()); + entity2.setLevel("2"); + indexDicMap.put(data.getLevel2Index(), entity2); + } + if (!indexDicMap.containsKey(data.getLevel3Index())) { + entity3.setId(UniqueIdGenerator.generate()); + entity3.setIndexName(data.getLevel3Index()); + entity3.setLevel("3"); + indexDicMap.put(data.getLevel3Index(), entity3); + } + if (!indexDicMap.containsKey(data.getLevel4Index())) { + entity4.setId(UniqueIdGenerator.generate()); + entity4.setIndexName(data.getLevel4Index()); + entity4.setLevel("4"); + indexDicMap.put(data.getLevel4Index(), entity4); + } + if (!indexDicMap.containsKey(data.getLevel5Index())) { + entity5.setId(UniqueIdGenerator.generate()); + entity5.setIndexName(data.getLevel5Index()); + entity5.setLevel("5"); + indexDicMap.put(data.getLevel5Index(), entity5); + } + } + + /** + * 所有数据解析完成了 都会来调用 + * + * @param context + */ + @Override + public void doAfterAllAnalysed(AnalysisContext context) { + // 这里也要保存数据,确保最后遗留的数据也存储到数据库 + saveData(); + LOGGER.info("所有数据解析完成!total:{}", total.intValue()); + } + + /** + * 加上存储数据库 + */ + private void saveData() { + LOGGER.info("{}条数据,开始存储数据库!", indexDicMap.size()); + indexDictService.deleteAndInsertBatch(indexDicMap.values()); + + buildIndexGroupEntity(); + + indexGroupTemplateService.deleteAndInsertBatch(indexGroupMap.values()); + indexGroupDetailTemplateService.deleteAndInsertBatch(indexGroupDetailMap.values()); + LOGGER.info("存储数据库成功!指标:{}个,分组:{}个,详情:{}个", indexDicMap.values().size(), indexGroupMap.values().size(), indexGroupDetailMap.values().size()); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexModel.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexModel.java new file mode 100644 index 0000000000..f264a2c39e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexModel.java @@ -0,0 +1,26 @@ +package com.epmet.model; + +import com.alibaba.excel.annotation.ExcelProperty; +import lombok.Data; + +@Data +public class IndexModel { + @ExcelProperty(value = "一级指标") + private String level1Index; + @ExcelProperty(value = "二级指标") + private String level2Index; + @ExcelProperty(value = "三级指标") + private String level3Index; + @ExcelProperty(value = "四级指标") + private String level4Index; + @ExcelProperty(value = "五级指标") + private String level5Index; + @ExcelProperty(value = "是否采用") + private Integer isUsed; + @ExcelProperty(value = "权重") + private String weight; + @ExcelProperty(value = "五级权重") + private String level5Weight; + @ExcelProperty(value = "阈值") + private String threshold; +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/ParseIndexExcelResult.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/ParseIndexExcelResult.java new file mode 100644 index 0000000000..17b4fa0634 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/ParseIndexExcelResult.java @@ -0,0 +1,54 @@ +package com.epmet.model; + +import lombok.Data; + +import java.io.Serializable; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; + +@Data +public class ParseIndexExcelResult implements Serializable { + private String id; + private String groupId; + /** + * 当前指标关联的上一级指标分组,如果没有上一级,则为0 + */ + private String parentIndexGroupId; + /** + * 指标编码(唯一) + */ + private String indexCode; + + /** + * 指标名 + */ + private String indexName; + + /** + * 指标描述 + */ + private String indexDesc; + + /** + * 指标级别(1,2,3,4,5) + */ + private String level; + + private Set children = new HashSet<>(); + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ParseIndexExcelResult that = (ParseIndexExcelResult) o; + return indexCode.equals(that.indexCode) && + indexName.equals(that.indexName) && + level.equals(that.level); + } + + @Override + public int hashCode() { + return Objects.hash(indexCode, indexName, indexDesc, level); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcollect/FactIndexCollectService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcollect/FactIndexCollectService.java new file mode 100644 index 0000000000..c9d876996b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcollect/FactIndexCollectService.java @@ -0,0 +1,110 @@ +package com.epmet.service.indexcollect; + +import com.epmet.dto.indexcollect.form.*; + +import java.util.List; + +/** + * 大屏数据采集api + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:25 + */ +public interface FactIndexCollectService { + + /** + * 1、党建能力-党员相关指标上报(按照月份) + * 根据CUSTOMER_ID、AGENCY_ID、GRID_ID、USER_ID、YEAR_ID、MONTH_ID、QUARTER_ID进行查询,如果有数据,则先进行物理删除 + * + * @param formDTO + * @param customerId + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void insertGridPartyMemberData(List formDTO, String customerId); + + /** + * 2、党建能力-网格相关指标上报(按照月份) + * 根据CUSTOMER_ID、AGENCY_ID、GRID_ID、YEAR_ID、MONTH_ID、QUARTER_ID进行查询,如果有数据,则先进行物理删除 + * + * @param formDTO + * @param customerId + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void insertGridPartyAbility(List formDTO, String customerId); + + /** + * 3、党建能力-街道及社区相关指标 + * 根据CUSTOMER_ID、AGENCY_ID、YEAR_ID、MONTH_ID、QUARTER_ID进行查询,如果有数据,则先进行物理删除 + * + * @param formDTO + * @param customerId + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void insertOrgPartyAbility(List formDTO, String customerId); + + /** + * 4、服务能力-网格相关指标 + * 据CUSTOMER_ID、AGENCY_ID、GRID_ID、YEAR_ID、MONTH_ID、QUARTER_ID进行查询,如果有数据,则先进行物理删除 + * + * @param formDTO + * @param customerId + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void insertGridServiceAbility(List formDTO, String customerId); + + /** + * 5、服务能力-组织(街道|社区|全区)相关指标 + * 据CUSTOMER_ID、AGENCY_ID、GRID_ID、YEAR_ID、MONTH_ID、QUARTER_ID进行查询,如果有数据,则先进行物理删除 + * + * @param formDTO + * @param customerId + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void insertOrgServiceAbility(List formDTO, String customerId); + + /** + * 6、治理能力-网格相关指标 + * 据CUSTOMER_ID、AGENCY_ID、GRID_ID、YEAR_ID、MONTH_ID、QUARTER_ID进行查询,如果有数据,则先进行物理删除 + * + * @param formDTO + * @param customerId + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void insertGridGovrnAbility(List formDTO, String customerId); + + /** + * 7、治理能力-街道及社区相关指标 + * 据CUSTOMER_ID、AGENCY_ID、YEAR_ID、MONTH_ID、QUARTER_ID进行查询,如果有数据,则先进行物理删除 + * + * @param formDTO + * @param customerId + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void insertOrgGovrnAbility(List formDTO, String customerId); + + /** + * 8、治理能力-部门相关指标 + * 据CUSTOMER_ID、AGENCY_ID、DEPT_ID、YEAR_ID、MONTH_ID、QUARTER_ID进行查询,如果有数据,则先进行物理删除 + * + * @param formDTO + * @param customerId + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void insertDeptGovrnAbility(List formDTO, String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcollect/impl/FactIndexCollectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcollect/impl/FactIndexCollectServiceImpl.java new file mode 100644 index 0000000000..cd767ff580 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcollect/impl/FactIndexCollectServiceImpl.java @@ -0,0 +1,162 @@ +package com.epmet.service.indexcollect.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.indexcoll.*; +import com.epmet.dto.indexcollect.form.*; +import com.epmet.service.indexcollect.FactIndexCollectService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +/** + * @Auther: zhangyong + * @Date: 2020-08-20 10:05 + */ +@Service +public class FactIndexCollectServiceImpl implements FactIndexCollectService { + + @Autowired + private FactIndexPartyAblityCpcMonthlyDao factIndexPartyAblityCpcMonthlyDao; + @Autowired + private FactIndexPartyAblityGridMonthlyDao factIndexPartyAblityGridMonthlyDao; + @Autowired + private FactIndexPartyAblityOrgMonthlyDao factIndexPartyAblityOrgMonthlyDao; + @Autowired + private FactIndexServiceAblityGridMonthlyDao factIndexServiceAblityGridMonthlyDao; + @Autowired + private FactIndexServiceAblityOrgMonthlyDao factIndexServiceAblityOrgMonthlyDao; + @Autowired + private FactIndexGovrnAblityGridMonthlyDao factIndexGovrnAblityGridMonthlyDao; + @Autowired + private FactIndexGovrnAblityOrgMonthlyDao factIndexGovrnAblityOrgMonthlyDao; + @Autowired + private FactIndexGovrnAblityDeptMonthlyDao factIndexGovrnAblityDeptMonthlyDao; + + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertGridPartyMemberData(List formDTO, String customerId) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + factIndexPartyAblityCpcMonthlyDao.deleteFactIndexPartyAblityCpcMonthly(customerId, + formDTO.get(i).getAgencyId(), formDTO.get(i).getGridId(), formDTO.get(i).getUserId(), + formDTO.get(i).getYearId(), formDTO.get(i).getMonthId(), formDTO.get(i).getQuarterId()); + } + factIndexPartyAblityCpcMonthlyDao.batchInsertFactIndexPartyAblityCpcMonthly(formDTO, customerId); + } + } + + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertGridPartyAbility(List formDTO, String customerId) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + factIndexPartyAblityGridMonthlyDao.deleteFactIndexPartyAblityGridMonthly(customerId, + formDTO.get(i).getAgencyId(), formDTO.get(i).getGridId(), formDTO.get(i).getYearId(), + formDTO.get(i).getMonthId(), formDTO.get(i).getQuarterId()); + } + factIndexPartyAblityGridMonthlyDao.batchInsertFactIndexPartyAblityGridMonthly(formDTO, customerId); + } + } + + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertOrgPartyAbility(List formDTO, String customerId) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + String[] agencyIds = new String[formDTO.size()]; + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + agencyIds[i] = formDTO.get(i).getAgencyId(); + } + factIndexPartyAblityOrgMonthlyDao.deleteFactIndexPartyAblityOrgMonthly(customerId, + formDTO.get(NumConstant.ZERO).getYearId(), + formDTO.get(NumConstant.ZERO).getMonthId(), + formDTO.get(NumConstant.ZERO).getQuarterId(), + agencyIds); + factIndexPartyAblityOrgMonthlyDao.batchInsertFactIndexPartyAblityOrgMonthly(formDTO, customerId); + } + } + + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertGridServiceAbility(List formDTO, String customerId) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + factIndexServiceAblityGridMonthlyDao.deleteFactIndexServiceAblityGridMonthly(customerId, + formDTO.get(i).getAgencyId(), formDTO.get(i).getGridId(), formDTO.get(i).getYearId(), + formDTO.get(i).getMonthId(), formDTO.get(i).getQuarterId()); + } + factIndexServiceAblityGridMonthlyDao.batchInsertFactIndexServiceAblityGridMonthly(formDTO, customerId); + } + } + + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertOrgServiceAbility(List formDTO, String customerId) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + String[] agencyIds = new String[formDTO.size()]; + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + agencyIds[i] = formDTO.get(i).getAgencyId(); + } + factIndexServiceAblityOrgMonthlyDao.deleteFactIndexServiceAblityOrgMonthly(customerId, + formDTO.get(NumConstant.ZERO).getYearId(), + formDTO.get(NumConstant.ZERO).getMonthId(), + formDTO.get(NumConstant.ZERO).getQuarterId(), + agencyIds); + factIndexServiceAblityOrgMonthlyDao.batchInsertFactIndexServiceAblityOrgMonthly(formDTO, customerId); + } + } + + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertGridGovrnAbility(List formDTO, String customerId) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + factIndexGovrnAblityGridMonthlyDao.deleteFactIndexGovrnAblityGridMonthly(customerId, + formDTO.get(i).getAgencyId(), formDTO.get(i).getGridId(), formDTO.get(i).getYearId(), + formDTO.get(i).getMonthId(), formDTO.get(i).getQuarterId()); + } + factIndexGovrnAblityGridMonthlyDao.batchInsertFactIndexGovrnAblityGridMonthly(formDTO, customerId); + } + } + + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertOrgGovrnAbility(List formDTO, String customerId) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + String[] agencyIds = new String[formDTO.size()]; + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + agencyIds[i] = formDTO.get(i).getAgencyId(); + } + factIndexGovrnAblityOrgMonthlyDao.deleteFactIndexGovrnAblityOrgMonthly(customerId, + formDTO.get(NumConstant.ZERO).getYearId(), + formDTO.get(NumConstant.ZERO).getMonthId(), + formDTO.get(NumConstant.ZERO).getQuarterId(), + agencyIds); + factIndexGovrnAblityOrgMonthlyDao.batchInsertFactIndexGovrnAblityOrgMonthly(formDTO, customerId); + } + } + + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertDeptGovrnAbility(List formDTO, String customerId) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + factIndexGovrnAblityDeptMonthlyDao.deleteFactIndexGovrnAblityDeptMonthly(customerId, + formDTO.get(i).getAgencyId(), formDTO.get(i).getDeptId(), formDTO.get(i).getYearId(), + formDTO.get(i).getMonthId(), formDTO.get(i).getQuarterId()); + } + factIndexGovrnAblityDeptMonthlyDao.batchInsertFactIndexGovrnAblityDeptMonthly(formDTO, customerId); + } + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateService.java new file mode 100644 index 0000000000..a43dcc2907 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateService.java @@ -0,0 +1,17 @@ +package com.epmet.service.screen; + +import com.epmet.dto.screen.form.IndexCalculateForm; + +/** + * 指标计算service + * + * @author liujianjun@elink-cn.com + * @date 2020/8/18 10:25 + */ +public interface IndexCalculateService { + /** + * desc:计算党员相关指标 + * @param formDTO + */ + void cpcIndexCalculate(IndexCalculateForm formDTO); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexDictService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexDictService.java new file mode 100644 index 0000000000..9e3b4f83ed --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexDictService.java @@ -0,0 +1,34 @@ +/** + * 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.service.screen; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.screen.IndexDictEntity; + +import java.util.Collection; + +/** + * 评价指标字典 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +public interface IndexDictService extends BaseService { + + Boolean deleteAndInsertBatch(Collection values); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupDetailService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupDetailService.java new file mode 100644 index 0000000000..ea03e298a1 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupDetailService.java @@ -0,0 +1,31 @@ +/** + * 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.service.screen; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.screen.IndexGroupDetailEntity; + +/** + * 客户指标详情 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +public interface IndexGroupDetailService extends BaseService { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupDetailTemplateService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupDetailTemplateService.java new file mode 100644 index 0000000000..3b0c48f7f9 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupDetailTemplateService.java @@ -0,0 +1,34 @@ +/** + * 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.service.screen; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.screen.IndexGroupDetailTemplateEntity; + +import java.util.Collection; + +/** + * 客户指标详情 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +public interface IndexGroupDetailTemplateService extends BaseService { + + Boolean deleteAndInsertBatch(Collection values); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupService.java new file mode 100644 index 0000000000..88c66b3da6 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupService.java @@ -0,0 +1,32 @@ +/** + * 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.service.screen; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.screen.IndexGroupEntity; + +/** + * 客户指标分组 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +public interface IndexGroupService extends BaseService { + + Boolean initCustomerIndexGroup(String customerId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupTemplateService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupTemplateService.java new file mode 100644 index 0000000000..1f23716176 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupTemplateService.java @@ -0,0 +1,34 @@ +/** + * 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.service.screen; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.screen.IndexGroupTemplateEntity; + +import java.util.Collection; + +/** + * 默认指标分组 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +public interface IndexGroupTemplateService extends BaseService { + + Boolean deleteAndInsertBatch(Collection values); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/ScreenCollService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/ScreenCollService.java new file mode 100644 index 0000000000..e81e4497c3 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/ScreenCollService.java @@ -0,0 +1,221 @@ +package com.epmet.service.screen; + +import com.epmet.dto.screencoll.form.*; + +import java.util.List; +/** + * 大屏数据采集api + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:25 + */ +public interface ScreenCollService { + + /** + * 9、党建引领|基层治理-居民(党员)积分排行榜 + * 1) 根据CUSTOMER_ID、GRID_ID、USER_ID进行查询,如果有数据,则先进行物理删除 + * 2) 在新增 + * + * @param formDTO + * @param customerId + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void insertPartyUserRankData(List formDTO, String customerId); + + /** + * 8、党建引领-党员联系群众数据 + * 1) 根据CUSTOMER_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * 2) 在新增 + * + * @param formDTO + * @param customerId + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void insertPartyLinkMassesData(List formDTO, String customerId); + + /** + * 7、基层党建-建设情况数据(支部、联建、志愿) + * 1) 根据CUSTOMER_ID、YEAR_ID、MONTH_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * 2) 在新增 + * + * @param formDTO + * @param customerId + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void insertPartyBranchData(List formDTO, String customerId); + + /** + * 6、党建引领-组织排行 + * 1) 根据CUSTOMER_ID、YEAR_ID、MONTH_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * 2) 在新增 + * + * @param formDTO + * @param customerId + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void insertOrgRankData(List formDTO, String customerId); + + /** + * 5、基层治理-治理能力数据 + * 1) 根据CUSTOMER_ID、YEAR_ID、MONTH_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * 2) 在新增 + * + * @param formDTO + * @param customerId + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void insertGovernRankData(List formDTO, String customerId); + + /** + * 4、事件数据 + * 1) 根据CUSTOMER_ID、EVENT_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * 2) 在新增 + * + * @param formDTO + * @param customerId + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void insertEventData(List formDTO, String customerId); + + /** + * 3、难点赌点 + * 1) 根据CUSTOMER_ID、EVENT_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * 2) 在新增 + * + * @param formDTO + * @param customerId + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void insertDifficultyData(List formDTO, String customerId); + + /** + * 2、党员基本情况 + * 1) 根据CUSTOMER_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * 2) 在新增 + * + * @param formDTO + * @param customerId + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void insertCpcbaseData(List formDTO, String customerId); + + /** + * 1、指数_按月统计 + * 1) 根据CUSTOMER_ID、YEAR_ID、MONTH_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * 2) 在新增 + * + * @param formDTO + * @param customerId + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void insertIndexDataMonthly(List formDTO, String customerId); + + /** + * 17、指数_按年统计 + * 1) 根据CUSTOMER_ID、YEAR_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * 2) 在新增 + * + * @param formDTO + * @param customerId + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void insertIndexDataYearly(List formDTO, String customerId); + + /** + * 16、部门信息上传 + * 1) 根据CUSTOMER_ID、DEPT_ID进行查询,如果有数据,则先进行物理删除 + * 2) 在新增 + * + * @param formDTO + * @param customerId + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void insertCustomerDept(List formDTO, String customerId); + + /** + * 15、网格信息上传 + * 1) 根据CUSTOMER_ID、GRID_ID进行查询,如果有数据,则先进行物理删除 + * 2) 在新增 + * + * @param formDTO + * @param customerId + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void insertCustomerGrid(List formDTO, String customerId); + + /** + * 14、组织层级 + * 1) 根据CUSTOMER_ID、AGENCY_ID进行查询,如果有数据,则先进行物理删除 + * 2) 在新增 + * + * @param formDTO + * @param customerId + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void insertCustomerAgency(List formDTO, String customerId); + + /** + * 12、中央区各类总数 + * 1) 根据CUSTOMER_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * 2) 在新增 + * + * @param formDTO + * @param customerId + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void insertUserTotalData(List formDTO, String customerId); + + /** + * 11、基层治理-公众参与 + * 1) 根据CUSTOMER_ID、YEAR_ID、MONTH_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * 2) 在新增 + * + * @param formDTO + * @param customerId + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void insertUserJoin(List formDTO, String customerId); + + /** + * 10、党建引领-先锋模范数据 + * 1) 根据CUSTOMER_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * 2) 在新增 + * + * @param formDTO + * @param customerId + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void insertPioneerData(List formDTO, String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateServiceImpl.java new file mode 100644 index 0000000000..55ccf0bc2d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateServiceImpl.java @@ -0,0 +1,14 @@ +package com.epmet.service.screen.impl; + +import com.epmet.dto.screen.form.IndexCalculateForm; +import com.epmet.service.screen.IndexCalculateService; + +/** + * @author liujianjun + */ +public class IndexCalculateServiceImpl implements IndexCalculateService { + @Override + public void cpcIndexCalculate(IndexCalculateForm formDTO) { + + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexDictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexDictServiceImpl.java new file mode 100644 index 0000000000..16e4815226 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexDictServiceImpl.java @@ -0,0 +1,43 @@ +/** + * 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.service.screen.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.dao.screen.IndexDictDao; +import com.epmet.entity.screen.IndexDictEntity; +import com.epmet.service.screen.IndexDictService; +import org.springframework.stereotype.Service; + +import java.util.Collection; + +/** + * 评价指标字典 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +@Service +public class IndexDictServiceImpl extends BaseServiceImpl implements IndexDictService { + + + @Override + public Boolean deleteAndInsertBatch(Collection values) { + int n = baseDao.deleteAll(); + return this.insertBatch(values,10); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupDetailServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupDetailServiceImpl.java new file mode 100644 index 0000000000..db9fe1f411 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupDetailServiceImpl.java @@ -0,0 +1,36 @@ +/** + * 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.service.screen.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.dao.screen.IndexGroupDetailDao; +import com.epmet.entity.screen.IndexGroupDetailEntity; +import com.epmet.service.screen.IndexGroupDetailService; +import org.springframework.stereotype.Service; + +/** + * 客户指标详情 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +@Service +public class IndexGroupDetailServiceImpl extends BaseServiceImpl implements IndexGroupDetailService { + + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupDetailTemplateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupDetailTemplateServiceImpl.java new file mode 100644 index 0000000000..081f94ef3c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupDetailTemplateServiceImpl.java @@ -0,0 +1,42 @@ +/** + * 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.service.screen.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.dao.screen.IndexGroupDetailTemplateDao; +import com.epmet.entity.screen.IndexGroupDetailTemplateEntity; +import com.epmet.service.screen.IndexGroupDetailTemplateService; +import org.springframework.stereotype.Service; + +import java.util.Collection; + +/** + * 客户指标详情 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +@Service +public class IndexGroupDetailTemplateServiceImpl extends BaseServiceImpl implements IndexGroupDetailTemplateService { + + @Override + public Boolean deleteAndInsertBatch(Collection values) { + baseDao.deleteAll(); + return this.insertBatch(values, 10); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupServiceImpl.java new file mode 100644 index 0000000000..65fc39f131 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupServiceImpl.java @@ -0,0 +1,84 @@ +/** + * 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.service.screen.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.UniqueIdGenerator; +import com.epmet.dao.screen.IndexGroupDao; +import com.epmet.dao.screen.IndexGroupDetailDao; +import com.epmet.dao.screen.IndexGroupDetailTemplateDao; +import com.epmet.dao.screen.IndexGroupTemplateDao; +import com.epmet.entity.screen.IndexGroupDetailEntity; +import com.epmet.entity.screen.IndexGroupDetailTemplateEntity; +import com.epmet.entity.screen.IndexGroupEntity; +import com.epmet.entity.screen.IndexGroupTemplateEntity; +import com.epmet.service.screen.IndexGroupService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.util.List; +import java.util.stream.Collectors; + +/** + * 客户指标分组 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +@Service +public class IndexGroupServiceImpl extends BaseServiceImpl implements IndexGroupService { +@Autowired +private IndexGroupTemplateDao indexGroupTemplateDao; + @Autowired + private IndexGroupDetailTemplateDao indexGroupDetailTemplateDao; + + @Autowired + private IndexGroupDetailDao indexGroupDetailDao; + + @Transactional(rollbackFor = Exception.class) + @Override + public Boolean initCustomerIndexGroup(String customerId) { + List groupTempList = indexGroupTemplateDao.selectAll(); + List groupDetailTempList = indexGroupDetailTemplateDao.selectAll(); + if (CollectionUtils.isEmpty(groupTempList) || CollectionUtils.isEmpty(groupDetailTempList)){ + throw new RenException("没有需要初始化的数据"); + } + List groupEntityList = groupTempList.stream().map(groupTemp -> { + IndexGroupEntity entity = ConvertUtils.sourceToTarget(groupTemp, IndexGroupEntity.class); + entity.setId(UniqueIdGenerator.generate()); + entity.setCustomerId(customerId); + return entity; + }).collect(Collectors.toList()); + this.insertBatch(groupEntityList,10); + + List groupTempEntityList = groupDetailTempList.stream().map(groupTemp -> { + IndexGroupDetailEntity entity = ConvertUtils.sourceToTarget(groupTemp, IndexGroupDetailEntity.class); + entity.setId(UniqueIdGenerator.generate()); + entity.setCustomerId(customerId); + return entity; + }).collect(Collectors.toList()); + groupTempEntityList.forEach(o->{ + indexGroupDetailDao.insert(o); + }); + return true; + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupTemplateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupTemplateServiceImpl.java new file mode 100644 index 0000000000..058cf911eb --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupTemplateServiceImpl.java @@ -0,0 +1,43 @@ +/** + * 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.service.screen.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.dao.screen.IndexGroupTemplateDao; +import com.epmet.entity.screen.IndexGroupTemplateEntity; +import com.epmet.service.screen.IndexGroupTemplateService; +import org.springframework.stereotype.Service; + +import java.util.Collection; + +/** + * 客户指标分组 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +@Service +public class IndexGroupTemplateServiceImpl extends BaseServiceImpl implements IndexGroupTemplateService { + + @Override + public Boolean deleteAndInsertBatch(Collection values) { + + baseDao.deleteAll(); + return this.insertBatch(values, 10); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/ScreenCollServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/ScreenCollServiceImpl.java new file mode 100644 index 0000000000..b5e65fd193 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/ScreenCollServiceImpl.java @@ -0,0 +1,448 @@ +/** + * 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.service.screen.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.constant.CompareConstant; +import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.screen.*; +import com.epmet.dto.screencoll.form.*; +import com.epmet.entity.screen.ScreenEventImgDataEntity; +import com.epmet.entity.screen.ScreenUserJoinEntity; +import com.epmet.service.screen.ScreenCollService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.List; + +/** + * 大屏数据采集 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-05-11 + */ +@Service +public class ScreenCollServiceImpl implements ScreenCollService { + + @Autowired + private ScreenPartyUserRankDataDao screenPartyUserRankDataDao; + @Autowired + private ScreenPartyLinkMassesDataDao screenPartyLinkMassesDataDao; + @Autowired + private ScreenPartyBranchDataDao screenPartyBranchDataDao; + @Autowired + private ScreenOrgRankDataDao screenOrgRankDataDao; + @Autowired + private ScreenGovernRankDataDao screenGovernRankDataDao; + @Autowired + private ScreenEventDataDao screenEventDataDao; + @Autowired + private ScreenEventImgDataDao screenEventImgDataDao; + @Autowired + private ScreenDifficultyDataDao screenDifficultyDataDao; + @Autowired + private ScreenCpcBaseDataDao screenCpcBaseDataDao; + @Autowired + private ScreenIndexDataMonthlyDao screenIndexDataMonthlyDao; + @Autowired + private ScreenCustomerDeptDao screenCustomerDeptDao; + @Autowired + private ScreenCustomerGridDao screenCustomerGridDao; + @Autowired + private ScreenCustomerAgencyDao screenCustomerAgencyDao; + @Autowired + private ScreenUserTotalDataDao screenUserTotalDataDao; + @Autowired + private ScreenUserJoinDao screenUserJoinDao; + @Autowired + private ScreenPioneerDataDao screenPioneerDataDao; + @Autowired + private ScreenIndexDataYearlyDao screenIndexDataYearlyDao; + + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertPartyUserRankData(List formDTO,String customerId) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + screenPartyUserRankDataDao.deletePartyUserRankData(customerId, + formDTO.get(NumConstant.ZERO).getGridId(), + formDTO.get(NumConstant.ZERO).getUserId()); + } + + screenPartyUserRankDataDao.batchInsertPartyUserRankData(formDTO,customerId); + } + } + + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertPartyLinkMassesData(List formDTO, String customerId) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + String[] orgIds = new String[formDTO.size()]; + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + orgIds[i] = formDTO.get(i).getOrgId(); + } + screenPartyLinkMassesDataDao.deletePartyLinkMassesData(customerId, orgIds); + + screenPartyLinkMassesDataDao.batchInsertPartyLinkMassesData(formDTO, customerId); + } + } + + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertPartyBranchData(List formDTO, String customerId) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + String[] orgIds = new String[formDTO.size()]; + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + orgIds[i] = formDTO.get(i).getOrgId(); + } + screenPartyBranchDataDao.deletePartyBranchData(customerId, + formDTO.get(NumConstant.ZERO).getYearId(), + formDTO.get(NumConstant.ZERO).getMonthId(), + orgIds); + + screenPartyBranchDataDao.batchInsertPartyBranchData(formDTO, customerId); + } + } + + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertOrgRankData(List formDTO, String customerId) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + String[] orgIds = new String[formDTO.size()]; + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + orgIds[i] = formDTO.get(i).getOrgId(); + } + screenOrgRankDataDao.deleteOrgRankData(customerId, + formDTO.get(NumConstant.ZERO).getYearId(), + formDTO.get(NumConstant.ZERO).getMonthId(), + orgIds); + + screenOrgRankDataDao.batchInsertOrgRankData(formDTO, customerId); + } + } + + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertGovernRankData(List formDTO, String customerId) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + String[] orgIds = new String[formDTO.size()]; + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + orgIds[i] = formDTO.get(i).getOrgId(); + } + screenGovernRankDataDao.deleteGovernRankData(customerId, + formDTO.get(NumConstant.ZERO).getYearId(), + formDTO.get(NumConstant.ZERO).getMonthId(), + orgIds); + + screenGovernRankDataDao.batchInsertGovernRankData(formDTO, customerId); + } + } + + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertEventData(List formDTO, String customerId) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + screenEventDataDao.deleteEventData(customerId, formDTO.get(i).getEventId(), formDTO.get(i).getOrgId()); + } + + screenEventDataDao.batchInsertEventData(formDTO, customerId); + + for (int i = NumConstant.ZERO; i < formDTO.size(); i++) { + if (null != formDTO.get(i).getImgDataList() && formDTO.get(i).getImgDataList().size() > NumConstant.ZERO) { + // 根据原始事件ID,物理删除 - 事件数据图片数据 + screenEventImgDataDao.delEventImgDataByEventId(formDTO.get(i).getEventId()); + for (int j = NumConstant.ZERO; j < formDTO.get(i).getImgDataList().size(); j++){ + // 新增 中央区-事件数据图片数据 表 + ScreenEventImgDataEntity imgDataEntity = new ScreenEventImgDataEntity(); + imgDataEntity.setEventId(formDTO.get(i).getImgDataList().get(j).getEventId()); + imgDataEntity.setEventImgUrl(formDTO.get(i).getImgDataList().get(j).getImgUrl()); + imgDataEntity.setSort(formDTO.get(i).getImgDataList().get(j).getSort()); + screenEventImgDataDao.insert(imgDataEntity); + } + } + } + } + } + + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertDifficultyData(List formDTO, String customerId) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + screenDifficultyDataDao.deleteDifficultyData(customerId, formDTO.get(i).getEventId(), formDTO.get(i).getOrgId()); + } + + screenDifficultyDataDao.batchInsertDifficultyData(formDTO, customerId); + } + } + + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertCpcbaseData(List formDTO, String customerId) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + String[] orgIds = new String[formDTO.size()]; + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + orgIds[i] = formDTO.get(i).getOrgId(); + } + screenCpcBaseDataDao.deleteCpcBaseData(customerId, orgIds); + + screenCpcBaseDataDao.batchInsertCpcBaseData(formDTO, customerId); + } + } + + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertIndexDataMonthly(List formDTO, String customerId) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + String[] orgIds = new String[formDTO.size()]; + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + orgIds[i] = formDTO.get(i).getOrgId(); + } + screenIndexDataMonthlyDao.deleteIndexDataMonthly(customerId, + formDTO.get(NumConstant.ZERO).getYearId(), + formDTO.get(NumConstant.ZERO).getMonthId(), + orgIds); + + screenIndexDataMonthlyDao.batchInsertIndexDataMonthly(formDTO, customerId); + } + } + + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertIndexDataYearly(List formDTO, String customerId) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + String[] orgIds = new String[formDTO.size()]; + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + orgIds[i] = formDTO.get(i).getOrgId(); + } + screenIndexDataYearlyDao.deleteIndexDataYearly(customerId, + formDTO.get(NumConstant.ZERO).getYearId(), + orgIds); + + screenIndexDataYearlyDao.batchInsertIndexDataYearly(formDTO, customerId); + } + } + + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertCustomerDept(List formDTO, String customerId) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + String[] deptIds = new String[formDTO.size()]; + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + deptIds[i] = formDTO.get(i).getDeptId(); + } + screenCustomerDeptDao.deleteCustomerDept(customerId, deptIds); + + screenCustomerDeptDao.batchInsertCustomerDept(formDTO, customerId); + } + } + + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertCustomerGrid(List formDTO, String customerId) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + String[] gridIds = new String[formDTO.size()]; + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + gridIds[i] = formDTO.get(i).getGridId(); + } + screenCustomerGridDao.deleteCustomerGrid(customerId, gridIds); + + screenCustomerGridDao.batchInsertCustomerGrid(formDTO, customerId); + } + } + + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertCustomerAgency(List formDTO, String customerId) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + String[] agencyIds = new String[formDTO.size()]; + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + agencyIds[i] = formDTO.get(i).getAgencyId(); + } + screenCustomerAgencyDao.deleteCustomerAgency(customerId, agencyIds); + + screenCustomerAgencyDao.batchInsertCustomerAgency(formDTO, customerId); + } + } + + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertUserTotalData(List formDTO, String customerId) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + String[] orgIds = new String[formDTO.size()]; + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + orgIds[i] = formDTO.get(i).getOrgId(); + } + screenUserTotalDataDao.deleteUserTotalData(customerId, orgIds); + + screenUserTotalDataDao.batchInsertUserTotalData(formDTO, customerId); + } + } + + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertUserJoin(List formDTO, String customerId) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + String[] orgIds = new String[formDTO.size()]; + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + orgIds[i] = formDTO.get(i).getOrgId(); + } + screenUserJoinDao.deleteUserJoin(customerId, + formDTO.get(NumConstant.ZERO).getYearId(), + formDTO.get(NumConstant.ZERO).getMonthId(), + orgIds); + + String[] lastMonth = this.lastMonthDate(); + // 获取上个月的基本数据 + List lastMonthJoinList = screenUserJoinDao.selectLastMonthScreenUserJoinList(customerId, + lastMonth[NumConstant.ZERO], + lastMonth[NumConstant.ONE], + orgIds); + + // 定义本月待添加数据的集合 + List curMonthJoinEntityList = new ArrayList<>(); + // 增加率计算 + if (null != lastMonthJoinList && lastMonthJoinList.size() > NumConstant.ZERO){ + // 存在上个月的数据 (本月-上月)/上月 *100 + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + for (int j = NumConstant.ZERO; j < lastMonthJoinList.size(); j++){ + if (formDTO.get(i).getOrgId().equals(lastMonthJoinList.get(j).getOrgId())){ + ScreenUserJoinEntity entity = ConvertUtils.sourceToTarget(formDTO.get(i), ScreenUserJoinEntity.class); + entity.setJoinTotalUpRate(this.calculateGrowthRateNumber(lastMonthJoinList.get(i).getJoinTotal(), formDTO.get(j).getJoinTotal())); + entity.setJoinTotalUpFlag(this.calculateGrowthRateFlag(lastMonthJoinList.get(i).getJoinTotal(), formDTO.get(j).getJoinTotal())); + entity.setAvgIssueUpRate(this.calculateGrowthRateNumber(lastMonthJoinList.get(i).getAvgIssue(), formDTO.get(j).getAvgIssue())); + entity.setAvgIssueUpFlag(this.calculateGrowthRateFlag(lastMonthJoinList.get(i).getAvgIssue(), formDTO.get(j).getAvgIssue())); + entity.setAgvgJoinUpRate(this.calculateGrowthRateNumber(lastMonthJoinList.get(i).getAvgJoin(), formDTO.get(j).getAvgJoin())); + entity.setAgvgJoinUpFlag(this.calculateGrowthRateFlag(lastMonthJoinList.get(i).getAvgJoin(), formDTO.get(j).getAvgJoin())); + curMonthJoinEntityList.add(entity); + } + } + } + } else { + // 计算增长率后的 待新增数据 + BigDecimal zero = new BigDecimal(NumConstant.ZERO); + // 不存在上个月的数据 + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + ScreenUserJoinEntity entity = ConvertUtils.sourceToTarget(formDTO.get(i), ScreenUserJoinEntity.class); + entity.setJoinTotalUpRate(zero); + entity.setJoinTotalUpFlag(""); + entity.setAvgIssueUpRate(zero); + entity.setAvgIssueUpFlag(""); + entity.setAgvgJoinUpRate(zero); + entity.setAgvgJoinUpFlag(""); + curMonthJoinEntityList.add(entity); + } + } + screenUserJoinDao.batchInsertUserJoin(curMonthJoinEntityList, customerId); + } + } + + /** + * 获取当前日期的前一个月的日期 + * @param + * @return java.lang.String[] + * @Author zhangyong + * @Date 15:33 2020-08-21 + **/ + private String[] lastMonthDate(){ + String[] date = new String[NumConstant.TWO]; + //Java获取当前日期的前一个月的日期 + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.MONTH, NumConstant.ONE_NEG); + int year = calendar.get(Calendar.YEAR); + int month = calendar.get(Calendar.MONTH) + NumConstant.ONE; + date[NumConstant.ZERO] = String.valueOf(year); + date[NumConstant.ONE] = String.valueOf(month);; + if (NumConstant.TEN >= month){ + date[NumConstant.ONE] = NumConstant.ZERO_STR + month; + } + return date; + } + + /** + * 计算 本月数值 相较于 上月数值,的增长率 + * + * @param old 上月数值 + * @param now 本月数值 + * @return java.math.BigDecimal + * @Author zhangyong + * @Date 15:38 2020-08-21 + **/ + private BigDecimal calculateGrowthRateNumber(Integer old, Integer now){ + BigDecimal bignum1 = new BigDecimal((now - old) * NumConstant.ONE_HUNDRED); + BigDecimal bignum2 = bignum1.divide(new BigDecimal(old),2,BigDecimal.ROUND_HALF_UP); + return bignum2; + } + + /** + * 计算 本月数值 相较于 上月数值,的增长率, 得出标识 + * + * @param old 上月数值 + * @param now 本月数值 + * @return java.util.String + * @Author zhangyong + * @Date 15:38 2020-08-21 + **/ + private String calculateGrowthRateFlag(Integer old, Integer now){ + if (old > now){ + return CompareConstant.DECR_STR; + } else if (old < now){ + return CompareConstant.INCR_STR; + } else { + return CompareConstant.EQ_STR; + } + } + + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertPioneerData(List formDTO, String customerId) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + String[] orgIds = new String[formDTO.size()]; + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + orgIds[i] = formDTO.get(i).getOrgId(); + } + screenPioneerDataDao.deletePioneerData(customerId, orgIds); + + screenPioneerDataDao.batchInsertPioneerData(formDTO, customerId); + } + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/Correlation.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/Correlation.java new file mode 100644 index 0000000000..f7a31b1436 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/Correlation.java @@ -0,0 +1,17 @@ +package com.epmet.support.normalizing; + +/** + * 指标正负相关枚举 + */ +public enum Correlation { + POSITIVE("positive","正相关"), + NEGATIVE("negative","负相关"), + ; + + private String code; + private String desc; + Correlation(String code,String desc){ + this.code = code; + this.desc = desc; + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/DoubleScoreCalculator.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/DoubleScoreCalculator.java new file mode 100644 index 0000000000..87f34db1f9 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/DoubleScoreCalculator.java @@ -0,0 +1,43 @@ +package com.epmet.support.normalizing; + +import java.math.BigDecimal; + +/** + * Double的分值计算 + * 每一种数据类型的计算都要继承ScoreCalculator并且实现其抽象方法,实现数据类型的转换 + */ +public class DoubleScoreCalculator extends ScoreCalculator { + + /** + * 初始化double类型分值计算 + * ☆☆☆ 务必在该构造方法最后调用父类的prepare()方法 ☆☆☆ + * @param sourceArray 数据所在的数组 + * @param minScore 分值区间的左边界 + * @param maxScore 分值区间的右边界 + * @param correlation 相关性 + */ + public DoubleScoreCalculator(Double[] sourceArray, BigDecimal minScore, BigDecimal maxScore, Correlation correlation) { + this.sourceArrary = sourceArray; + this.minScore = minScore; + this.maxScore = maxScore; + this.correlation = correlation; + this.prepare(); + } + + @Override + public BigDecimal getMaxFromSourceArray() { + Double[] doubleSourceArrary = (Double[]) this.sourceArrary; + return new BigDecimal(doubleSourceArrary[doubleSourceArrary.length - 1]); + } + + @Override + public BigDecimal getMinFromSourceArray() { + Double[] intSourceArrary = (Double[]) this.sourceArrary; + return new BigDecimal(intSourceArrary[0]); + } + + @Override + public BigDecimal convertValue2BigDecimal(Object sourceValue) { + return new BigDecimal((Double) sourceValue); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/IntegerScoreCalculator.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/IntegerScoreCalculator.java new file mode 100644 index 0000000000..333cd0a4a2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/IntegerScoreCalculator.java @@ -0,0 +1,45 @@ +package com.epmet.support.normalizing; + +import java.math.BigDecimal; + +/** + * Integer的分值计算 + * 每一种数据类型的计算都要继承ScoreCalculator并且实现其抽象方法,实现数据类型的转换 + */ +public class IntegerScoreCalculator extends ScoreCalculator { + + /** + * 初始化整数分值计算 + * ☆☆☆ 务必在该构造方法最后调用父类的prepare()方法 ☆☆☆ + * @param sourceArray 数据所在的数组 + * @param minScore 分值区间的左边界 + * @param maxScore 分值区间的右边界 + * @param correlation 相关性 + */ + public IntegerScoreCalculator(Integer[] sourceArray, BigDecimal minScore, BigDecimal maxScore, Correlation correlation) { + this.sourceArrary = sourceArray; + this.minScore = minScore; + this.maxScore = maxScore; + this.correlation = correlation; + this.prepare(); + System.out.println("最小值:"+minScore+";最大值:"+maxScore); + + } + + @Override + public BigDecimal getMaxFromSourceArray() { + Integer[] intSourceArrary = (Integer[]) this.sourceArrary; + return new BigDecimal(intSourceArrary[intSourceArrary.length - 1]); + } + + @Override + public BigDecimal getMinFromSourceArray() { + Integer[] intSourceArrary = (Integer[]) this.sourceArrary; + return new BigDecimal(intSourceArrary[0]); + } + + @Override + public BigDecimal convertValue2BigDecimal(Object sourceValue) { + return new BigDecimal((Integer) sourceValue); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/ScoreCalculator.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/ScoreCalculator.java new file mode 100644 index 0000000000..2fb3fab926 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/ScoreCalculator.java @@ -0,0 +1,114 @@ +package com.epmet.support.normalizing; + +import java.math.BigDecimal; +import java.math.MathContext; +import java.util.Arrays; + +/** + * 所有数据类型计算器的父类,实现算法骨架,数据类型转换方法则由子类实现 + * @param 数据类型泛型 + */ +public abstract class ScoreCalculator { + + protected T[] sourceArrary; + + protected BigDecimal minScore; + protected BigDecimal maxScore; + + protected Correlation correlation; + + private BigDecimal maxValue; + private BigDecimal minValue; + private BigDecimal coefficient; + + /** + * 计算准备 + */ + protected void prepare() { + // 校验数组 + if (!validSourceArray(sourceArrary)) { + throw new RuntimeException("入参数组错误:请设置非空数组"); + } + Arrays.sort(sourceArrary); + maxValue = getMaxFromSourceArray(); + minValue = getMinFromSourceArray(); + //计算系数 + System.out.println("最小值:"+minScore+";最大值:"+maxScore); + coefficient = getCoefficient(minValue, maxValue); + } + + /** + * 归一算法 + * @return + */ + public BigDecimal normalize(T sourceValue) { + + if (sourceValue == null) { + throw new RuntimeException("入参数组错误:请设置sourceValue"); + } + + if (!Arrays.asList(sourceArrary).contains(sourceValue)) { + throw new RuntimeException("请确认要计算的数组在数组中存在"); + } + + if (correlation == Correlation.POSITIVE) { + // 正相关 + BigDecimal x = coefficient.multiply(convertValue2BigDecimal(sourceValue).subtract(minValue)); + BigDecimal score = minScore.add(x, MathContext.DECIMAL32); + return score; + } else if (correlation == Correlation.NEGATIVE) { + // 负相关 + BigDecimal x = coefficient.multiply(convertValue2BigDecimal(sourceValue).subtract(minValue)); + BigDecimal score = minScore.add(x); + return maxScore.subtract(score, MathContext.DECIMAL32); + } else { + throw new RuntimeException("错误的相关性"); + } + } + + /** + * 校验数组 + * @param sourceArray + * @param + * @return + */ + protected boolean validSourceArray(T[] sourceArray) { + if (sourceArray == null || sourceArray.length == 0) { + return false; + } + return true; + } + + /** + * 计算系数 + * @return + */ + protected BigDecimal getCoefficient(BigDecimal min, BigDecimal max) { + BigDecimal fenmu = max.subtract(min); + if (fenmu.toString().equals("0"))return new BigDecimal(0); + BigDecimal fenzi = maxScore.subtract(minScore); + BigDecimal divide = fenzi.divide(fenmu, MathContext.DECIMAL32); + System.out.println("分子:"+fenzi+"分母:"+fenmu+"系数:"+divide.toString()); + return divide; + } + + /** + * 从源数组中获取最大值 + * @return + */ + protected abstract BigDecimal getMaxFromSourceArray(); + + /** + * 从源数组中获取最小值 + * @return + */ + protected abstract BigDecimal getMinFromSourceArray(); + + /** + * 将值转化为BigDecimal + * @param sourceValue + * @return + */ + protected abstract BigDecimal convertValue2BigDecimal(T sourceValue); + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/ExcelListener.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/ExcelListener.java new file mode 100644 index 0000000000..e8ad7cbe66 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/ExcelListener.java @@ -0,0 +1,17 @@ +package com.epmet.util; + +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.event.AnalysisEventListener; +import org.apache.poi.ss.formula.functions.T; + +public class ExcelListener extends AnalysisEventListener { + @Override + public void invoke(T t, AnalysisContext analysisContext) { + + } + + @Override + public void doAfterAllAnalysed(AnalysisContext analysisContext) { + System.out.println(analysisContext); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/TestFileUtil.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/TestFileUtil.java new file mode 100644 index 0000000000..865e691e80 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/TestFileUtil.java @@ -0,0 +1,35 @@ +package com.epmet.util; + +import java.io.File; +import java.io.InputStream; + +public class TestFileUtil { + + public static InputStream getResourcesFileInputStream(String fileName) { + return Thread.currentThread().getContextClassLoader().getResourceAsStream("" + fileName); + } + + public static String getPath() { + return TestFileUtil.class.getResource("/").getPath(); + } + + public static File createNewFile(String pathName) { + File file = new File(getPath() + pathName); + if (file.exists()) { + file.delete(); + } else { + if (!file.getParentFile().exists()) { + file.getParentFile().mkdirs(); + } + } + return file; + } + + public static File readFile(String pathName) { + return new File(getPath() + pathName); + } + + public static File readUserHomeFile(String pathName) { + return new File(System.getProperty("user.home") + File.separator + pathName); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml new file mode 100644 index 0000000000..107b94abc1 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete from fact_index_govrn_ablity_dept_monthly + where CUSTOMER_ID = #{customerId} AND AGENCY_ID = #{agencyId} AND DEPT_ID = #{deptId} + AND YEAR_ID = #{yearId} AND MONTH_ID = #{monthId} AND QUARTER_ID = #{quarterId} + + + + insert into fact_index_govrn_ablity_dept_monthly + ( + ID, + CUSTOMER_ID, + AGENCY_ID, + DEPT_ID, + MONTH_ID, + QUARTER_ID, + YEAR_ID, + TRANSFERED_COUNT, + CLOSED_PROJECT_COUNT, + RESP_PROJECT_RATIO, + HANDLE_PROJECT_RATIO, + CLOSED_PROJECT_RATIO, + SATISFACTION_RATIO, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{item.agencyId}, + #{item.deptId}, + #{item.monthId}, + #{item.quarterId}, + #{item.yearId}, + #{item.transferedCount}, + #{item.closedProjectCount}, + #{item.respProjectRatio}, + #{item.handleProjectRatio}, + #{item.closedProjectRatio}, + #{item.satisfactionRatio}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml new file mode 100644 index 0000000000..ed0f65cc79 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete from fact_index_govrn_ablity_grid_monthly + where CUSTOMER_ID = #{customerId} AND AGENCY_ID = #{agencyId} AND GRID_ID = #{gridId} + AND YEAR_ID = #{yearId} AND MONTH_ID = #{monthId} AND QUARTER_ID = #{quarterId} + + + + insert into fact_index_govrn_ablity_grid_monthly + ( + ID, + CUSTOMER_ID, + AGENCY_ID, + GRID_ID, + MONTH_ID, + QUARTER_ID, + YEAR_ID, + ISSUE_TOTAL, + AVG_ISSUE_COUNT, + AVG_SHIFT_PROJECT_RATIO, + PROJECT_TOTAL, + SELF_SOLVE_PROJECT_COUNT, + RESOLVE_PROJECT_COUNT, + TRANSFER_RIGHT_RATIO, + SATISFACTION_RATIO, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{item.agencyId}, + #{item.gridId}, + #{item.monthId}, + #{item.quarterId}, + #{item.yearId}, + #{item.issueTotal}, + #{item.avgIssueCount}, + #{item.avgShiftProjectRatio}, + #{item.projectTotal}, + #{item.selfSolveProjectCount}, + #{item.resolveProjectCount}, + #{item.transferRightRatio}, + #{item.satisfactionRatio}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml new file mode 100644 index 0000000000..36e4d07b3a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete from fact_index_govrn_ablity_org_monthly + where CUSTOMER_ID = #{customerId} + AND MONTH_ID = #{monthId} AND QUARTER_ID = #{quarterId} AND YEAR_ID = #{yearId} + AND AGENCY_ID IN + + #{item} + + + + + insert into fact_index_govrn_ablity_org_monthly + ( + ID, + CUSTOMER_ID, + AGENCY_ID, + PARENT_ID, + MONTH_ID, + QUARTER_ID, + YEAR_ID, + DATA_TYPE, + TRANSFERED_COUNT, + CLOSED_PROJECT_COUNT, + RESP_PROJECT_RATIO, + CLOSED_PROJECT_RATIO, + SATISFACTION_RATIO, + OVERDUE_PROJECT_RATIO, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{item.agencyId}, + #{item.parentId}, + #{item.monthId}, + #{item.quarterId}, + #{item.yearId}, + #{item.dataType}, + #{item.transferedCount}, + #{item.closedProjectCount}, + #{item.respProjectRatio}, + #{item.closedProjectRatio}, + #{item.satisfactionRatio}, + #{item.overdueProjectRatio}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml new file mode 100644 index 0000000000..836adcdb03 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete from fact_index_party_ablity_cpc_monthly + where CUSTOMER_ID = #{customerId} AND AGENCY_ID = #{agencyId} AND GRID_ID = #{gridId} AND USER_ID = #{userId} + AND YEAR_ID = #{yearId} AND MONTH_ID = #{monthId} AND QUARTER_ID = #{quarterId} + + + + insert into fact_index_party_ablity_cpc_monthly + ( + ID, + CUSTOMER_ID, + AGENCY_ID, + PARENT_ID, + GRID_ID, + USER_ID, + MONTH_ID, + QUARTER_ID, + YEAR_ID, + CREATE_TOPIC_COUNT, + JOIN__TOPIC_COUNT, + SHIFT_ISSUE_COUNT, + SHIFT_PROJECT_COUNT, + JOIN_THREE_MEETS_COUNT, + GROUP_USER_COUNT, + GROUP_TOPIC_COUNT, + TOPIC_TO_ISSUE_RATIO, + ISSUE_TO_PROJECT_COUNT, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{item.agencyId}, + #{item.parentId}, + #{item.gridId}, + #{item.userId}, + #{item.monthId}, + #{item.quarterId}, + #{item.yearId}, + #{item.createTopicCount}, + #{item.joinTopicCount}, + #{item.shiftIssueCount}, + #{item.shiftProjectCount}, + #{item.joinThreeMeetsCount}, + #{item.groupUserCount}, + #{item.groupTopicCount}, + #{item.topicToIssueRatio}, + #{item.issueToProjectCount}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml new file mode 100644 index 0000000000..e51a7d4f7f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete from fact_index_party_ablity_grid_monthly + where CUSTOMER_ID = #{customerId} AND AGENCY_ID = #{agencyId} AND GRID_ID = #{gridId} + AND MONTH_ID = #{monthId} AND QUARTER_ID = #{quarterId} AND YEAR_ID = #{yearId} + + + + insert into fact_index_party_ablity_grid_monthly + ( + ID, + CUSTOMER_ID, + AGENCY_ID, + GRID_ID, + MONTH_ID, + QUARTER_ID, + YEAR_ID, + USER_COUNT, + PARTY_COUNT, + ACTIVE_USER_COUNT, + ACTIVE_PARTY_COUNT, + PARTY_AVG_TOPIC_COUNT, + USER_AVG_TOPIC_COUNT, + PARTY_AVG_SHIFT_PROJECT_COUNT, + USER_AVG_SHIFT_PROJECT_COUNT, + CREATE_GROUP_PARTY_COUNT, + PUBLISH_ARTICLE_COUNT, + ISSUE_TO_PROJECT_RATIO, + CREATE_THREE_MEETS_COUNT, + JOIN_THREE_MEETS_COUNT, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{item.agencyId}, + #{item.gridId}, + #{item.monthId}, + #{item.quarterId}, + #{item.yearId}, + #{item.userCount}, + #{item.partyCount}, + #{item.activeUserCount}, + #{item.activePartyCount}, + #{item.partyAvgTopicCount}, + #{item.userAvgTopicCount}, + #{item.partyAvgShiftProjectCount}, + #{item.userAvgShiftProjectCount}, + #{item.createGroupPartyCount}, + #{item.publishArticleCount}, + #{item.issueToProjectRatio}, + #{item.createThreeMeetsCount}, + #{item.joinThreeMeetsCount}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml new file mode 100644 index 0000000000..758a686052 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + delete from fact_index_party_ablity_org_monthly + where CUSTOMER_ID = #{customerId} + AND MONTH_ID = #{monthId} AND QUARTER_ID = #{quarterId} AND YEAR_ID = #{yearId} + AND AGENCY_ID IN + + #{item} + + + + + insert into fact_index_party_ablity_org_monthly + ( + ID, + CUSTOMER_ID, + AGENCY_ID, + PARENT_ID, + MONTH_ID, + QUARTER_ID, + YEAR_ID, + PUBLISH_ARTICLE_COUNT, + DATA_TYPE, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{item.agencyId}, + #{item.parentId}, + #{item.monthId}, + #{item.quarterId}, + #{item.yearId}, + #{item.publishArticleCount}, + #{item.dataType}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityGridMonthlyDao.xml new file mode 100644 index 0000000000..bc4348ea56 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityGridMonthlyDao.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + delete from fact_index_service_ablity_grid_monthly + where CUSTOMER_ID = #{customerId} AND AGENCY_ID = #{agencyId} AND GRID_ID = #{gridId} + AND MONTH_ID = #{monthId} AND QUARTER_ID = #{quarterId} AND YEAR_ID = #{yearId} + + + + insert into fact_index_service_ablity_grid_monthly + ( + ID, + CUSTOMER_ID, + AGENCY_ID, + GRID_ID, + MONTH_ID, + QUARTER_ID, + YEAR_ID, + ACTIVITY_COUNT, + VOLUNTEER_RATIO, + PARTY_VOLUNTEER_RATIO, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{item.agencyId}, + #{item.gridId}, + #{item.monthId}, + #{item.quarterId}, + #{item.yearId}, + #{item.activityCount}, + #{item.volunteerRatio}, + #{item.partyVolunteerRatio}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml new file mode 100644 index 0000000000..c475e2aca1 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + delete from fact_index_service_ablity_org_monthly + where CUSTOMER_ID = #{customerId} + AND MONTH_ID = #{monthId} AND QUARTER_ID = #{quarterId} AND YEAR_ID = #{yearId} + AND AGENCY_ID IN + + #{item} + + + + + insert into fact_index_service_ablity_org_monthly + ( + ID, + CUSTOMER_ID, + AGENCY_ID, + PARENT_ID, + MONTH_ID, + QUARTER_ID, + YEAR_ID, + ACTIVITY_COUNT, + DATA_TYPE, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{item.agencyId}, + #{item.parentId}, + #{item.monthId}, + #{item.quarterId}, + #{item.yearId}, + #{item.activityCount}, + #{item.dataType}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexDictDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexDictDao.xml new file mode 100644 index 0000000000..a91513e1d5 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexDictDao.xml @@ -0,0 +1,8 @@ + + + + + + delete from index_dict + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDao.xml new file mode 100644 index 0000000000..4597456ae7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDao.xml @@ -0,0 +1,9 @@ + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailDao.xml new file mode 100644 index 0000000000..b7854f3338 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailDao.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailTemplateDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailTemplateDao.xml new file mode 100644 index 0000000000..c044654dd8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailTemplateDao.xml @@ -0,0 +1,14 @@ + + + + + + + delete from index_group_detail_template + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupTemplateDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupTemplateDao.xml new file mode 100644 index 0000000000..6adfa4474b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupTemplateDao.xml @@ -0,0 +1,13 @@ + + + + + + delete from index_group_template + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml new file mode 100644 index 0000000000..7f8ddaf4f0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml @@ -0,0 +1,71 @@ + + + + + + + delete from screen_cpc_base_data + where CUSTOMER_ID = #{customerId} + AND ORG_ID IN + + #{item} + + + + + insert into screen_cpc_base_data + ( + ID, + CUSTOMER_ID, + ORG_TYPE, + ORG_ID, + PARENT_ID, + ORG_NAME, + DATA_END_TIME, + REGISTER_USER_COUNT, + RESI_TOTAL, + PARTY_MEMBER_COUNT, + AGE_LEVEL_1, + AGE_LEVEL_2, + AGE_LEVEL_3, + AGE_LEVEL_4, + AGE_LEVEL_5, + AGE_LEVEL_6, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{item.orgType}, + #{item.orgId}, + #{item.parentId}, + #{item.orgName}, + #{item.dataEndTime}, + #{item.registerUserCount}, + #{item.resiTotal}, + + #{item.partyMemberCount}, + #{item.ageLevel1}, + #{item.ageLevel2}, + #{item.ageLevel3}, + #{item.ageLevel4}, + #{item.ageLevel5}, + #{item.ageLevel6}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml new file mode 100644 index 0000000000..a9c6911a70 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml @@ -0,0 +1,63 @@ + + + + + + + delete from screen_customer_agency + where CUSTOMER_ID = #{customerId} + AND AGENCY_ID IN + + #{item} + + + + + insert into screen_customer_agency + ( + ID, + CUSTOMER_ID, + AGENCY_ID, + AGENCY_NAME, + PID, + PIDS, + ALL_PARENT_NAMES, + AREA_MARKS, + CENTER_MARK, + PARTY_MARK, + `LEVEL`, + AREA_CODE, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME, + DATA_END_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{item.agencyId}, + #{item.agencyName}, + #{item.pid}, + #{item.pids}, + #{item.allParentNames}, + #{item.areaMarks}, + #{item.centerMark}, + #{item.partyMark}, + #{item.level}, + #{item.areaCode}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now(), + #{item.dataEndTime} + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerDeptDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerDeptDao.xml new file mode 100644 index 0000000000..a3fedbf4d5 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerDeptDao.xml @@ -0,0 +1,55 @@ + + + + + + + delete from screen_customer_dept + where CUSTOMER_ID = #{customerId} + AND DEPT_ID IN + + #{item} + + + + + insert into screen_customer_dept + ( + ID, + CUSTOMER_ID, + DEPT_ID, + DEPT_NAME, + PARENT_AGENCY_ID, + AREA_MARKS, + CENTER_MARK, + DEPT_MARK, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME, + DATA_END_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{item.deptId}, + #{item.deptName}, + #{item.parentAgencyId}, + #{item.areaMarks}, + #{item.centerMark}, + #{item.deptMark}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now(), + #{item.dataEndTime} + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml new file mode 100644 index 0000000000..5381e9ddd2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml @@ -0,0 +1,55 @@ + + + + + + + delete from screen_customer_grid + where CUSTOMER_ID = #{customerId} + AND GRID_ID IN + + #{item} + + + + + insert into screen_customer_grid + ( + ID, + CUSTOMER_ID, + GRID_ID, + GRID_NAME, + PARENT_AGENCY_ID, + AREA_MARKS, + CENTER_MARK, + PARTY_MARK, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME, + DATA_END_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{item.gridId}, + #{item.gridName}, + #{item.parentAgencyId}, + #{item.areaMarks}, + #{item.centerMark}, + #{item.partyMark}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now(), + #{item.dataEndTime} + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml new file mode 100644 index 0000000000..e26c43115c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml @@ -0,0 +1,71 @@ + + + + + + + delete from screen_difficulty_data + where CUSTOMER_ID = #{customerId} AND EVENT_ID = #{eventId} AND ORG_ID = #{orgId} + + + + insert into screen_difficulty_data + ( + ID, + CUSTOMER_ID, + ORG_TYPE, + ORG_ID, + PARENT_ID, + ORG_NAME, + EVENT_ID, + EVENT_IMG_URL, + EVENT_SOURCE, + EVENT_CONTENT, + EVENT_COST_TIME, + EVENT_RE_ORG, + EVENT_HANDLED_COUNT, + EVENT_CATEGORY_CODE, + EVENT_CATEGORY_NAME, + EVENT_STATUS_CODE, + EVENT_STATUS_DESC, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME, + LATEST_OPERATE_DESC, + DATA_END_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{item.orgType}, + #{item.orgId}, + #{item.parentId}, + #{item.orgName}, + #{item.eventId}, + #{item.eventImgUrl}, + #{item.eventSource}, + #{item.eventContent}, + #{item.eventCostTime}, + #{item.eventReOrg}, + #{item.eventHandledCount}, + #{item.eventCategoryCode}, + #{item.eventCategoryName}, + #{item.eventStatusCode}, + #{item.eventStatusDesc}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now(), + #{item.latestOperateDesc}, + #{item.dataEndTime} + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml new file mode 100644 index 0000000000..be95b118df --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml @@ -0,0 +1,77 @@ + + + + + + + delete from screen_event_data + where CUSTOMER_ID = #{customerId} AND EVENT_ID = #{eventId} AND ORG_ID = #{orgId} + + + + insert into screen_event_data + ( + ID, + CUSTOMER_ID, + ORG_TYPE, + ORG_ID, + PARENT_ID, + ORG_NAME, + EVENT_ID, + EVENT_TITLE, + EVENT_CREATE_TIME, + LINK_MOBILE, + EVENT_CONTENT, + EVENT_IMG_URL, + EVENT_LEVEL, + EVENT_ADDRESS, + LONGITUDE, + LATITUDE, + LAST_PROCESS_DEPT, + LAST_PROCESS_DATE, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME, + EVENT_STATUS_CODE, + EVENT_STATUS_DESC, + LATEST_OPERATE_DESC, + DATA_END_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{item.orgType}, + #{item.orgId}, + #{item.parentId}, + #{item.orgName}, + #{item.eventId}, + #{item.eventTitle}, + #{item.eventCreateTime}, + #{item.linkMobile}, + #{item.eventContent}, + #{item.eventImgUrl}, + #{item.eventLevel}, + #{item.eventAddress}, + #{item.longitude}, + #{item.latitude}, + #{item.lastProcessDept}, + #{item.lastProcessDate}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now(), + #{item.eventStatusCode}, + #{item.eventStatusDesc}, + #{item.latestOperateDesc}, + #{item.dataEndTime} + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventImgDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventImgDataDao.xml new file mode 100644 index 0000000000..eaef413fd8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventImgDataDao.xml @@ -0,0 +1,11 @@ + + + + + + + delete from screen_event_img_data + where DEL_FLAG = '0' AND EVENT_ID = #{eventId} + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml new file mode 100644 index 0000000000..9a6e6c3c44 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml @@ -0,0 +1,65 @@ + + + + + + + delete from screen_govern_rank_data + where CUSTOMER_ID = #{customerId} AND YEAR_ID = #{yearId} AND MONTH_ID = #{monthId} + AND ORG_ID IN + + #{item} + + + + + insert into screen_govern_rank_data + ( + ID, + CUSTOMER_ID, + YEAR_ID, + MONTH_ID, + ORG_TYPE, + ORG_ID, + PARENT_ID, + ORG_NAME, + + RESPONSE_RATIO, + RESOLVED_RATIO, + GOVERN_RATIO, + SATISFACTION_RATIO, + + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{item.yearId}, + #{item.monthId}, + #{item.orgType}, + #{item.orgId}, + #{item.parentId}, + #{item.orgName}, + + #{item.responseRatio}, + #{item.resolvedRatio}, + #{item.governRatio}, + #{item.satisfactionRatio}, + + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml new file mode 100644 index 0000000000..721c4e0af3 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml @@ -0,0 +1,62 @@ + + + + + + + delete from screen_index_data_monthly + where CUSTOMER_ID = #{customerId} AND YEAR_ID = #{yearId} AND MONTH_ID = #{monthId} + AND ORG_ID IN + + #{item} + + + + + insert into screen_index_data_monthly + ( + ID, + CUSTOMER_ID, + YEAR_ID, + MONTH_ID, + ORG_TYPE, + ORG_ID, + PARENT_ID, + ORG_NAME, + INDEX_TOTAL, + PARTY_DEV_ABLITY, + SERVICE_ABLITY, + GOVERN_ABLITY, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{item.yearId}, + #{item.monthId}, + #{item.orgType}, + #{item.orgId}, + #{item.parentId}, + #{item.orgName}, + + #{item.indexTotal}, + #{item.partyDevAblity}, + #{item.serviceAblity}, + #{item.governAblity}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml new file mode 100644 index 0000000000..8747e1219a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml @@ -0,0 +1,60 @@ + + + + + + + delete from screen_index_data_yearly + where CUSTOMER_ID = #{customerId} AND YEAR_ID = #{yearId} + AND ORG_ID IN + + #{item} + + + + + insert into screen_index_data_yearly + ( + ID, + CUSTOMER_ID, + YEAR_ID, + ORG_TYPE, + ORG_ID, + PARENT_ID, + ORG_NAME, + INDEX_TOTAL, + PARTY_DEV_ABLITY, + SERVICE_ABLITY, + GOVERN_ABLITY, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{item.yearId}, + #{item.orgType}, + #{item.orgId}, + #{item.parentId}, + #{item.orgName}, + + #{item.indexTotal}, + #{item.partyDevAblity}, + #{item.serviceAblity}, + #{item.governAblity}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml new file mode 100644 index 0000000000..4ebe5e2c28 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml @@ -0,0 +1,67 @@ + + + + + + + delete from screen_org_rank_data + where CUSTOMER_ID = #{customerId} AND YEAR_ID = #{yearId} AND MONTH_ID = #{monthId} + AND ORG_ID IN + + #{item} + + + + + insert into screen_org_rank_data + ( + ID, + CUSTOMER_ID, + YEAR_ID, + MONTH_ID, + ORG_TYPE, + ORG_ID, + PARENT_ID, + ORG_NAME, + PARTY_TOTAL, + GROUP_TOTAL, + TOPIC_TOTAL, + ISSUE_TOTAL, + PROJECT_TOTAL, + CLOSE_PROJECT_RATIO, + SATISFACTION_RATIO, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{item.yearId}, + #{item.monthId}, + #{item.orgType}, + #{item.orgId}, + #{item.parentId}, + #{item.orgName}, + #{item.partyTotal}, + #{item.groupTotal}, + #{item.topicTotal}, + #{item.issueTotal}, + #{item.projectTotal}, + #{item.closeProjectRatio}, + #{item.satisfactionRatio}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml new file mode 100644 index 0000000000..afeaca9651 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml @@ -0,0 +1,64 @@ + + + + + + + delete from screen_party_branch_data + where CUSTOMER_ID = #{customerId} AND YEAR_ID = #{yearId} AND MONTH_ID = #{monthId} + AND ORG_ID IN + + #{item} + + + + + insert into screen_party_branch_data + ( + ID, + CUSTOMER_ID, + YEAR_ID, + MONTH_ID, + `TYPE`, + ORG_TYPE, + ORG_ID, + PARENT_ID, + ORG_NAME, + MEET_CATEGORY_ID, + MEET_CATEGORY_NAME, + ORGANIZE_COUNT, + JOIN_USER_COUNT, + AVERAGE_JOIN_USER_COUNT, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{item.yearId}, + #{item.monthId}, + #{item.type}, + #{item.orgType}, + #{item.orgId}, + #{item.parentId}, + #{item.orgName}, + #{item.meetCategoryId}, + #{item.meetCategoryName}, + #{item.organizeCount}, + #{item.joinUserCount}, + #{item.averageJoinUserCount}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml new file mode 100644 index 0000000000..d317d97ee9 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml @@ -0,0 +1,55 @@ + + + + + + + delete from screen_party_link_masses_data + where CUSTOMER_ID = #{customerId} + AND ORG_ID IN + + #{item} + + + + + insert into screen_party_link_masses_data + ( + ID, + CUSTOMER_ID, + ORG_TYPE, + ORG_ID, + PARENT_ID, + ORG_NAME, + CREATE_GROUP_TOTAL, + GROUP_USER_TOTAL, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME, + DATA_END_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{item.orgType}, + #{item.orgId}, + #{item.parentId}, + #{item.orgName}, + #{item.createGroupTotal}, + #{item.groupUserTotal}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now(), + #{item.dataEndTime} + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml new file mode 100644 index 0000000000..070e952878 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml @@ -0,0 +1,59 @@ + + + + + + + delete from screen_party_user_rank_data + where CUSTOMER_ID = #{customerId} AND GRID_ID = #{gridId} AND USER_ID = #{userId} + + + + insert into screen_party_user_rank_data + ( + ID, + CUSTOMER_ID, + GRID_ID, + GRID_NAME, + ORG_ID, + ORG_NAME, + PARTY_FLAG, + USER_ID, + SURNAME, + `NAME`, + USER_NAME, + POINT_TOTAL, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME, + DATA_END_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{item.gridId}, + #{item.gridName}, + #{item.orgId}, + #{item.orgName}, + #{item.partyFlag}, + #{item.userId}, + #{item.surname}, + #{item.name}, + #{item.userName}, + #{item.pointTotal}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now(), + #{item.dataEndTime} + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml new file mode 100644 index 0000000000..8142176bee --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml @@ -0,0 +1,72 @@ + + + + + + + delete from screen_pioneer_data + where CUSTOMER_ID = #{customerId} + AND ORG_ID IN + + #{item} + + + + + insert into screen_pioneer_data + ( + ID, + CUSTOMER_ID, + ORG_TYPE, + ORG_ID, + PARENT_ID, + ORG_NAME, + PUBLISH_ISSUE_TOTAL, + ISSUE_TOTAL, + TOPIC_TOTAL, + SHIFT_PROJECT_TOTAL, + RESOLVED_PROJECT_TOTAL, + PUBLISH_ISSUE_RATIO, + ISSUE_RATIO, + TOPIC_RATIO, + SHIFT_PROJECT_RATIO, + RESOLVED_PROJECT_RATIO, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME, + DATA_END_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{item.orgType}, + #{item.orgId}, + #{item.parentId}, + #{item.orgName}, + #{item.publishIssueTotal}, + #{item.issueTotal}, + #{item.topicTotal}, + #{item.shiftProjectTotal}, + #{item.resolvedProjectTotal}, + + #{item.publishIssueRatio}, + #{item.issueRatio}, + #{item.topicRatio}, + #{item.shiftProjectRatio}, + #{item.resolvedProjectRatio}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now(), + #{item.dataEndTime} + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml new file mode 100644 index 0000000000..9751293f5f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml @@ -0,0 +1,91 @@ + + + + + + + + + delete from screen_user_join + where CUSTOMER_ID = #{customerId} AND YEAR_ID = #{yearId} AND MONTH_ID = #{monthId} + AND ORG_ID IN + + #{item} + + + + + insert into screen_user_join + ( + ID, + CUSTOMER_ID, + ORG_TYPE, + ORG_ID, + PARENT_ID, + ORG_NAME, + YEAR_ID, + MONTH_ID, + JOIN_TOTAL, + JOIN_TOTAL_UP_RATE, + JOIN_TOTAL_UP_FLAG, + AVG_ISSUE, + AVG_ISSUE_UP_RATE, + AVG_ISSUE_UP_FLAG, + AVG_JOIN, + AGVG_JOIN_UP_RATE, + AGVG_JOIN_UP_FLAG, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{item.orgType}, + #{item.orgId}, + #{item.parentId}, + #{item.orgName}, + #{item.yearId}, + #{item.monthId}, + + #{item.joinTotal}, + #{item.joinTotalUpRate}, + #{item.joinTotalUpFlag}, + + #{item.avgIssue}, + #{item.avgIssueUpRate}, + #{item.avgIssueUpFlag}, + + #{item.avgJoin}, + #{item.agvgJoinUpRate}, + #{item.agvgJoinUpFlag}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml new file mode 100644 index 0000000000..a3f29dd5a6 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml @@ -0,0 +1,67 @@ + + + + + + + delete from screen_user_total_data + where CUSTOMER_ID = #{customerId} + AND ORG_ID IN + + #{item} + + + + + insert into screen_user_total_data + ( + ID, + CUSTOMER_ID, + ORG_TYPE, + ORG_ID, + PARENT_ID, + ORG_NAME, + DATA_END_TIME, + USER_TOTAL, + PARTY_TOTAL, + GROUP_TOTAL, + TOPIC_TOTAL, + ISSUE_TOTAL, + PROJECT_TOTAL, + REG_USER_TOTAL, + JOIN_USER_TOTAL, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{item.orgType}, + #{item.orgId}, + #{item.parentId}, + #{item.orgName}, + #{item.dataEndTime}, + #{item.userTotal}, + #{item.partyTotal}, + #{item.groupTotal}, + #{item.topicTotal}, + #{item.issueTotal}, + #{item.projectTotal}, + #{item.regUserTotal}, + #{item.joinUserTotal}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/model/DemoData.java b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/model/DemoData.java new file mode 100644 index 0000000000..234e66cb58 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/model/DemoData.java @@ -0,0 +1,17 @@ +package com.epmet.stats.test.model; + +import lombok.Data; + +import java.util.Date; + +/** + * 基础数据类.这里的排序和excel里面的排序一致 + * + * @author Jiaju Zhuang + **/ +@Data +public class DemoData { + private String string; + private Date date; + private Double doubleData; +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/model/DemoDataListener.java b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/model/DemoDataListener.java new file mode 100644 index 0000000000..d218327ad1 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/model/DemoDataListener.java @@ -0,0 +1,84 @@ +package com.epmet.stats.test.model; + +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.event.AnalysisEventListener; +import com.alibaba.fastjson.JSON; +import com.epmet.dao.screen.ScreenCustomerAgencyDao; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.ArrayList; +import java.util.List; + +/** + * 模板的读取类 + * + * @author Jiaju Zhuang + */ +// 有个很重要的点 DemoDataListener 不能被spring管理,要每次读取excel都要new,然后里面用到spring可以构造方法传进去 +public class DemoDataListener extends AnalysisEventListener { + private static final Logger LOGGER = LoggerFactory.getLogger(DemoDataListener.class); + /** + * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收 + */ + private static final int BATCH_COUNT = 5; + List list = new ArrayList(); + /** + * 假设这个是一个DAO,当然有业务逻辑这个也可以是一个service。当然如果不用存储这个对象没用。 + */ + private ScreenCustomerAgencyDao demoDAO; + + public DemoDataListener() { + // 这里是demo,所以随便new一个。实际使用如果到了spring,请使用下面的有参构造函数 + demoDAO = null; + } + + /** + * 如果使用了spring,请使用这个构造方法。每次创建Listener的时候需要把spring管理的类传进来 + * + * @param demoDAO + */ + public DemoDataListener(ScreenCustomerAgencyDao demoDAO) { + this.demoDAO = demoDAO; + } + + /** + * 这个每一条数据解析都会来调用 + * + * @param data + * one row value. Is is same as {@link AnalysisContext#readRowHolder()} + * @param context + */ + @Override + public void invoke(DemoData data, AnalysisContext context) { + LOGGER.info("解析到一条数据:{}", JSON.toJSONString(data)); + list.add(data); + // 达到BATCH_COUNT了,需要去存储一次数据库,防止数据几万条数据在内存,容易OOM + if (list.size() >= BATCH_COUNT) { + saveData(); + // 存储完成清理 list + list.clear(); + } + } + + /** + * 所有数据解析完成了 都会来调用 + * + * @param context + */ + @Override + public void doAfterAllAnalysed(AnalysisContext context) { + // 这里也要保存数据,确保最后遗留的数据也存储到数据库 + saveData(); + LOGGER.info("所有数据解析完成!"); + } + + /** + * 加上存储数据库 + */ + private void saveData() { + LOGGER.info("{}条数据,开始存储数据库!", list.size()); + //demoDAO.save(list); + LOGGER.info("存储数据库成功!"); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/ConverterData.java b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/ConverterData.java new file mode 100644 index 0000000000..9a9be1642d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/ConverterData.java @@ -0,0 +1,30 @@ +package com.epmet.stats.test.read; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.format.DateTimeFormat; +import com.alibaba.excel.annotation.format.NumberFormat; +import lombok.Data; + +/** + * 基础数据类.这里的排序和excel里面的排序一致 + * + * @author Jiaju Zhuang + **/ +@Data +public class ConverterData { + /** + * 我自定义 转换器,不管数据库传过来什么 。我给他加上“自定义:” + */ + @ExcelProperty(converter = CustomStringStringConverter.class) + private String string; + /** + * 这里用string 去接日期才能格式化。我想接收年月日格式 + */ + @DateTimeFormat("yyyy年MM月dd日HH时mm分ss秒") + private String date; + /** + * 我想接收百分比的数字 + */ + @NumberFormat("#.##%") + private String doubleData; +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/ConverterDataListener.java b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/ConverterDataListener.java new file mode 100644 index 0000000000..7c28d41fe8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/ConverterDataListener.java @@ -0,0 +1,48 @@ +package com.epmet.stats.test.read; + +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.event.AnalysisEventListener; +import com.alibaba.fastjson.JSON; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.ArrayList; +import java.util.List; + +/** + * 模板的读取类 + * + * @author Jiaju Zhuang + */ +public class ConverterDataListener extends AnalysisEventListener { + private static final Logger LOGGER = LoggerFactory.getLogger(ConverterDataListener.class); + /** + * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收 + */ + private static final int BATCH_COUNT = 5; + List list = new ArrayList(); + + @Override + public void invoke(ConverterData data, AnalysisContext context) { + LOGGER.info("解析到一条数据:{}", JSON.toJSONString(data)); + list.add(data); + if (list.size() >= BATCH_COUNT) { + saveData(); + list.clear(); + } + } + + @Override + public void doAfterAllAnalysed(AnalysisContext context) { + saveData(); + LOGGER.info("所有数据解析完成!"); + } + + /** + * 加上存储数据库 + */ + private void saveData() { + LOGGER.info("{}条数据,开始存储数据库!", list.size()); + LOGGER.info("存储数据库成功!"); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/CustomStringStringConverter.java b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/CustomStringStringConverter.java new file mode 100644 index 0000000000..584e563a77 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/CustomStringStringConverter.java @@ -0,0 +1,59 @@ +package com.epmet.stats.test.read; + +import com.alibaba.excel.converters.Converter; +import com.alibaba.excel.enums.CellDataTypeEnum; +import com.alibaba.excel.metadata.CellData; +import com.alibaba.excel.metadata.GlobalConfiguration; +import com.alibaba.excel.metadata.property.ExcelContentProperty; + +/** + * String and string converter + * + * @author Jiaju Zhuang + */ +public class CustomStringStringConverter implements Converter { + @Override + public Class supportJavaTypeKey() { + return String.class; + } + + @Override + public CellDataTypeEnum supportExcelTypeKey() { + return CellDataTypeEnum.STRING; + } + + /** + * 这里读的时候会调用 + * + * @param cellData + * NotNull + * @param contentProperty + * Nullable + * @param globalConfiguration + * NotNull + * @return + */ + @Override + public String convertToJavaData(CellData cellData, ExcelContentProperty contentProperty, + GlobalConfiguration globalConfiguration) { + return "自定义:" + cellData.getStringValue(); + } + + /** + * 这里是写的时候会调用 不用管 + * + * @param value + * NotNull + * @param contentProperty + * Nullable + * @param globalConfiguration + * NotNull + * @return + */ + @Override + public CellData convertToExcelData(String value, ExcelContentProperty contentProperty, + GlobalConfiguration globalConfiguration) { + return new CellData(value); + } + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/DemoDAO.java b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/DemoDAO.java new file mode 100644 index 0000000000..bf09288f59 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/DemoDAO.java @@ -0,0 +1,15 @@ +package com.epmet.stats.test.read; + +import java.util.List; + +/** + * 假设这个是你的DAO存储。当然还要这个类让spring管理,当然你不用需要存储,也不需要这个类。 + * + * @author Jiaju Zhuang + **/ +public class DemoDAO { + + public void save(List list) { + // 如果是mybatis,尽量别直接调用多次insert,自己写一个mapper里面新增一个方法batchInsert,所有数据一次性插入 + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/DemoData.java b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/DemoData.java new file mode 100644 index 0000000000..ceb3dd37ca --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/DemoData.java @@ -0,0 +1,17 @@ +package com.epmet.stats.test.read; + +import lombok.Data; + +import java.util.Date; + +/** + * 基础数据类.这里的排序和excel里面的排序一致 + * + * @author Jiaju Zhuang + **/ +@Data +public class DemoData { + private String string; + private Date date; + private Double doubleData; +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/DemoDataListener.java b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/DemoDataListener.java new file mode 100644 index 0000000000..539f1903b0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/DemoDataListener.java @@ -0,0 +1,97 @@ +package com.epmet.stats.test.read; + +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.event.AnalysisEventListener; +import com.alibaba.fastjson.JSON; +import com.epmet.model.IndexModel; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.atomic.AtomicInteger; + +/** + * 模板的读取类 + * + * @author Jiaju Zhuang + */ +// 有个很重要的点 DemoDataListener 不能被spring管理,要每次读取excel都要new,然后里面用到spring可以构造方法传进去 +public class DemoDataListener extends AnalysisEventListener { + private static final Logger LOGGER = LoggerFactory.getLogger(DemoDataListener.class); + /** + * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收 + */ + private static final int BATCH_COUNT = 5; + List list = new ArrayList(); + AtomicInteger total = new AtomicInteger(0); + + private String preWheight; + /** + * 假设这个是一个DAO,当然有业务逻辑这个也可以是一个service。当然如果不用存储这个对象没用。 + */ + private DemoDAO demoDAO; + + public DemoDataListener() { + // 这里是demo,所以随便new一个。实际使用如果到了spring,请使用下面的有参构造函数 + demoDAO = new DemoDAO(); + } + + /** + * 如果使用了spring,请使用这个构造方法。每次创建Listener的时候需要把spring管理的类传进来 + * + * @param demoDAO + */ + public DemoDataListener(DemoDAO demoDAO) { + this.demoDAO = demoDAO; + } + + /** + * 这个每一条数据解析都会来调用 + * + * @param data + * one row value. Is is same as {@link AnalysisContext#readRowHolder()} + * @param context + */ + @Override + public void invoke(IndexModel data, AnalysisContext context) { + if (data == null || data.getIsUsed() == null || data.getIsUsed() != 1){ + return; + } + if ( data.getWeight() != null){ + preWheight = data.getWeight(); + }else{ + data.setWeight(preWheight); + } + LOGGER.info("解析到一条数据:{}", JSON.toJSONString(data)); + list.add(data); + total.addAndGet(1); + // 达到BATCH_COUNT了,需要去存储一次数据库,防止数据几万条数据在内存,容易OOM + if (list.size() >= BATCH_COUNT) { + saveData(); + // 存储完成清理 list + list.clear(); + } + } + + /** + * 所有数据解析完成了 都会来调用 + * + * @param context + */ + @Override + public void doAfterAllAnalysed(AnalysisContext context) { + // 这里也要保存数据,确保最后遗留的数据也存储到数据库 + saveData(); + LOGGER.info("所有数据解析完成!total:{}",total.intValue()); + } + + /** + * 加上存储数据库 + */ + private void saveData() { + LOGGER.info("{}条数据,开始存储数据库!", list.size()); + //demoDAO.save(list); + LOGGER.info("存储数据库成功!"); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/ReadTest.java b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/ReadTest.java new file mode 100644 index 0000000000..85ee1e7806 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/ReadTest.java @@ -0,0 +1,70 @@ +package com.epmet.stats.test.read; + +import com.alibaba.excel.EasyExcel; +import com.alibaba.excel.ExcelReader; +import com.alibaba.excel.read.metadata.ReadSheet; +import com.epmet.model.IndexModel; +import com.epmet.util.TestFileUtil; +import org.junit.Ignore; +import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.File; +import java.io.FileNotFoundException; + + +/** + * 读的常见写法 + * + * @author Jiaju Zhuang + */ +@Ignore +public class ReadTest { + + private static final Logger LOGGER = LoggerFactory.getLogger(ReadTest.class); + + + + /** + * 读多个或者全部sheet,这里注意一个sheet不能读取多次,多次读取需要重新读取文件 + *

+ * 1. 创建excel对应的实体对象 参照{@link DemoData} + *

+ * 2. 由于默认一行行的读取excel,所以需要创建excel一行一行的回调监听器,参照{@link DemoDataListener} + *

+ * 3. 直接读即可 + */ + @Test + public void repeatedRead() throws FileNotFoundException { + String fileName = ""; + /* String fileName = TestFileUtil.getPath() + File.separator + "评价指标体系算法需求-备注.xlsx"; + // 读取全部sheet + // 这里需要注意 DemoDataListener的doAfterAllAnalysed 会在每个sheet读取完毕后调用一次。然后所有sheet都会往同一个DemoDataListener里面写 + EasyExcel.read(fileName, IndexModel.class, new DemoDataListener()).doReadAll(); +*/ + // 读取部分sheet + String excelName = "评价指标体系算法需求-备注.xlsx"; + fileName = TestFileUtil.getPath() + File.separator + excelName; + //fileName = this.getClass().getResource(File.separator).getPath().concat(excelName); + ExcelReader excelReader = null; + try { + //ExcelImportUtil.importExcel(null); + + //EasyExcel.read(new FileInputStream(new File(fileName)),IndexModel.class); + excelReader = EasyExcel.read(fileName).build(); + // 这里为了简单 所以注册了 同样的head 和Listener 自己使用功能必须不同的Listener + ReadSheet readSheet1 = + EasyExcel.readSheet(0).head(IndexModel.class).registerReadListener(new DemoDataListener()).build(); + ReadSheet readSheet2 = + EasyExcel.readSheet(1).head(IndexModel.class).registerReadListener(new DemoDataListener()).build(); + // 这里注意 一定要把sheet1 sheet2 一起传进去,不然有个问题就是03版的excel 会读取多次,浪费性能 + excelReader.read(readSheet2); + } finally { + if (excelReader != null) { + // 这里千万别忘记关闭,读的时候会创建临时文件,到时磁盘会崩的 + excelReader.finish(); + } + } + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/util/TestFileUtil.java b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/util/TestFileUtil.java new file mode 100644 index 0000000000..5035e52046 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/util/TestFileUtil.java @@ -0,0 +1,35 @@ +package com.epmet.stats.test.util; + +import java.io.File; +import java.io.InputStream; + +public class TestFileUtil { + + public static InputStream getResourcesFileInputStream(String fileName) { + return Thread.currentThread().getContextClassLoader().getResourceAsStream("" + fileName); + } + + public static String getPath() { + return TestFileUtil.class.getResource("/").getPath(); + } + + public static File createNewFile(String pathName) { + File file = new File(getPath() + pathName); + if (file.exists()) { + file.delete(); + } else { + if (!file.getParentFile().exists()) { + file.getParentFile().mkdirs(); + } + } + return file; + } + + public static File readFile(String pathName) { + return new File(getPath() + pathName); + } + + public static File readUserHomeFile(String pathName) { + return new File(System.getProperty("user.home") + File.separator + pathName); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/resources/评价指标体系算法需求-备注.xlsx b/epmet-module/data-statistical/data-statistical-server/src/test/java/resources/评价指标体系算法需求-备注.xlsx new file mode 100644 index 0000000000..592e740466 Binary files /dev/null and b/epmet-module/data-statistical/data-statistical-server/src/test/java/resources/评价指标体系算法需求-备注.xlsx differ diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java index 1c3a326c75..80d21ccde0 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java @@ -76,7 +76,7 @@ public class ExtAppJwtTokenUtils { public static void genToken() { HashMap claim = new HashMap<>(); claim.put("appId", "227fb75ae4baa820755aaf43bf7f0a69"); - claim.put("customerId", "c1"); + claim.put("customerId", "b09527201c4409e19d1dbc5e3c3429a1 "); claim.put("ts", System.currentTimeMillis() - 1000 * 60 * 4); String abc = new ExtAppJwtTokenUtils().createToken(claim, "4a762660254c57996343f8ee42fbc0a6");