From 2101ade6dc076e75090f5d7a2e484043f8c2041b Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 24 Aug 2020 18:24:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9/data/report/screen/grassroot?= =?UTF-8?q?sgovern/publicpartirank=E6=96=B9=E6=B3=95=EF=BC=8C=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E6=9F=A5=E8=AF=A2screen=5Fpublic=5Fparti=5Ftotal=5Fda?= =?UTF-8?q?ta?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/ScreenPublicPartiTotalDataDao.java | 43 +++++++++ .../dao/screen/ScreenUserTotalDataDao.java | 9 -- .../impl/GrassRootsGovernServiceImpl.java | 17 +++- .../screen/ScreenPublicPartiTotalDataDao.xml | 29 ++++++ .../mapper/screen/ScreenUserTotalDataDao.xml | 23 ----- .../screen/ScreenPublicPartiTotalDataDao.java | 34 +++++++ .../ScreenPublicPartiTotalDataEntity.java | 96 +++++++++++++++++++ .../screen/ScreenPublicPartiTotalDataDao.xml | 28 ++++++ 8 files changed, 243 insertions(+), 36 deletions(-) create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPublicPartiTotalDataDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPublicPartiTotalDataDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPublicPartiTotalDataDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPublicPartiTotalDataEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPublicPartiTotalDataDao.xml diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPublicPartiTotalDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPublicPartiTotalDataDao.java new file mode 100644 index 0000000000..02d7e0c722 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPublicPartiTotalDataDao.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.commons.mybatis.dao.BaseDao; +import com.epmet.screen.dto.result.PublicPartiRankResultDTO; +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-24 + */ +@Mapper +public interface ScreenPublicPartiTotalDataDao{ + /** + * @Description 查询公众参与各类总数 + * @param agencyId + * @return + * @author wangc + * @date 2020.08.20 16:00 + **/ + List selectPublicPartiTotal(@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/ScreenUserTotalDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenUserTotalDataDao.java index a03353e825..2230e636b9 100644 --- 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 @@ -18,7 +18,6 @@ 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; @@ -60,12 +59,4 @@ public interface ScreenUserTotalDataDao { **/ 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/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 index 8b0db2c65a..2dd8233800 100644 --- 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 @@ -44,6 +44,9 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { private ScreenUserTotalDataDao screenUserTotalDataDao; @Autowired private ScreenGovernRankDataDao screenGovernRankDataDao; + @Autowired + private ScreenPublicPartiTotalDataDao screenPublicPartiTotalDataDao; + /** * @Description 1、热心市民积分排行 * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321544 @@ -122,11 +125,17 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { @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); + 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<>(); + List result = screenPublicPartiTotalDataDao.selectPublicPartiTotal(param.getAgencyId()); + if(null == result) { + return new ArrayList<>(); + } return result; } diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPublicPartiTotalDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPublicPartiTotalDataDao.xml new file mode 100644 index 0000000000..ff931885f6 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPublicPartiTotalDataDao.xml @@ -0,0 +1,29 @@ + + + + + + + + + \ 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 index a1700b05a4..5f3cbc0ef2 100644 --- 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 @@ -46,27 +46,4 @@ - - \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPublicPartiTotalDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPublicPartiTotalDataDao.java new file mode 100644 index 0000000000..f703978057 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPublicPartiTotalDataDao.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.ScreenPublicPartiTotalDataEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 公众参与-各类(话题|议题|项目|注册人数|参与人数)总数 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-24 + */ +@Mapper +public interface ScreenPublicPartiTotalDataDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPublicPartiTotalDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPublicPartiTotalDataEntity.java new file mode 100644 index 0000000000..56905509ad --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPublicPartiTotalDataEntity.java @@ -0,0 +1,96 @@ +/** + * 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-24 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_public_parti_total_data") +public class ScreenPublicPartiTotalDataEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织类别 agency:组织;网格:grid;部门:department; + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id,如果是网格,传入网格所属组织id + */ + private String parentId; + + /** + * 组织名称,也可能是网格名称 + */ + private String orgName; + + /** + * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) + */ + private String dataEndTime; + + /** + * 话题总数 + */ + private Integer topicTotal; + + /** + * 议题总数 + */ + private Integer issueTotal; + + /** + * 项目总数 + */ + private Integer projectTotal; + + /** + * 注册人数 + */ + private Integer regUserTotal; + + /** + * 参与人数 + */ + private Integer joinUserTotal; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPublicPartiTotalDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPublicPartiTotalDataDao.xml new file mode 100644 index 0000000000..5fefac34e9 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPublicPartiTotalDataDao.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file