Browse Source
# Conflicts: # epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/datastats/DataStatsDao.java # epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/DataStatsService.java # epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.javafeature/evaluate
79 changed files with 3191 additions and 74 deletions
@ -0,0 +1,28 @@ |
|||
package com.epmet.dataaggre.dto.datastats.form; |
|||
|
|||
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 基础数据-网格各种数据汇总-接口入参 |
|||
* @Auth sun |
|||
*/ |
|||
@Data |
|||
public class GridBasicDataFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -3381286960911634231L; |
|||
/** |
|||
* 网格Id |
|||
*/ |
|||
@NotBlank(message = "网格ID不能为空",groups = GridBasicDataFormDTO.Grid.class) |
|||
private String gridId; |
|||
/** |
|||
* 日维度Id |
|||
*/ |
|||
private String dateId; |
|||
public interface Grid extends CustomerClientShowGroup{} |
|||
|
|||
} |
@ -0,0 +1,18 @@ |
|||
package com.epmet.dataaggre.dto.datastats.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2021/5/18 14:25 |
|||
*/ |
|||
@Data |
|||
public class PartyMemberVanguardFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -4331281350678714877L; |
|||
private String agencyId; |
|||
private String orgId; |
|||
private String orgType; |
|||
} |
@ -0,0 +1,96 @@ |
|||
package com.epmet.dataaggre.dto.datastats.result; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* @Description 基础数据-网格各种数据汇总-接口返参 |
|||
* @Auth sun |
|||
*/ |
|||
@Data |
|||
public class GridBasicDataResultDTO implements Serializable { |
|||
private static final long serialVersionUID = 466974582608407121L; |
|||
@JsonIgnore |
|||
BigDecimal bi = new BigDecimal(0); |
|||
/** |
|||
* 网格Id |
|||
*/ |
|||
private String gridId; |
|||
//用户总数
|
|||
private Integer userTotal = 0; |
|||
//党员总数
|
|||
private Integer partyMemberTotal = 0; |
|||
//党员总数占比
|
|||
private BigDecimal partyMemberRatio = bi; |
|||
//居民总数
|
|||
private Integer resiTotal = 0; |
|||
//居民总数占比
|
|||
private BigDecimal resiRatio = bi; |
|||
//党群小组总数
|
|||
private Integer groupTotal = 0; |
|||
//楼院小组总数
|
|||
private Integer ordinaryTotal = 0; |
|||
//楼院小组总数占比
|
|||
private BigDecimal ordinaryRatio = bi; |
|||
//支部小组总数
|
|||
private Integer branchTotal = 0; |
|||
//支部小组总数占比
|
|||
private BigDecimal branchRatio = bi; |
|||
//话题总数
|
|||
private Integer topicTotal = 0; |
|||
//热议中总数
|
|||
private Integer discussingTotal = 0; |
|||
//热议中总数占比
|
|||
private BigDecimal discussingRatio = bi; |
|||
//已处理总数
|
|||
private Integer closedTopicTotal = 0; |
|||
//已处理总数占比
|
|||
private BigDecimal closedTopicRatio = bi; |
|||
//转议题总数
|
|||
private Integer shiftIssueTotal = 0; |
|||
//转议题总数占比
|
|||
private BigDecimal shiftIssueRatio = bi; |
|||
//议题总数
|
|||
private Integer issueTotal = 0; |
|||
//表决中总数
|
|||
private Integer votingTotal = 0; |
|||
//表决中总数占比
|
|||
private BigDecimal votingRatio = bi; |
|||
//已处理总数
|
|||
private Integer closedIssueTotal = 0; |
|||
//已处理总数占比
|
|||
private BigDecimal closedIssueRatio = bi; |
|||
//已转项目总数
|
|||
private Integer shiftProjectTotal = 0; |
|||
//已转项目总数占比
|
|||
private BigDecimal shiftProjectRatio = bi; |
|||
//项目总数
|
|||
private Integer projectTotal = 0; |
|||
//处理中总数
|
|||
private Integer pendingTotal = 0; |
|||
//处理中总数占比
|
|||
private BigDecimal pendingRatio = bi; |
|||
//已结案总数
|
|||
private Integer closedProjectTotal = 0; |
|||
//已结案总数占比
|
|||
private BigDecimal closedProjectRatio = bi; |
|||
|
|||
|
|||
@Data |
|||
public static class Topic implements Serializable { |
|||
//话题总量
|
|||
private Integer topicTotal; |
|||
//话题数量
|
|||
private Integer topicCount; |
|||
//话题状态 已关闭:closed、已屏蔽:hidden、 讨论中:discussing
|
|||
private String topicStatus; |
|||
//话题已转议题数量
|
|||
private Integer shiftedIssueTotal; |
|||
//数据更新至 时间
|
|||
private String deadline; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,74 @@ |
|||
package com.epmet.dataaggre.dto.datastats.result; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2021/5/18 14:27 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class PartyMemberVanguardDetailResultDTO implements Serializable { |
|||
private static final long serialVersionUID = 8315392246739995430L; |
|||
/** |
|||
* 组织ID |
|||
*/ |
|||
private String orgId; |
|||
/** |
|||
* 组织名 |
|||
*/ |
|||
private String orgName; |
|||
/** |
|||
* 党员建组数 |
|||
*/ |
|||
private Integer groupCount; |
|||
/** |
|||
* 党员建组数占比 |
|||
*/ |
|||
private BigDecimal groupRatio; |
|||
/** |
|||
* 组内党员人数 |
|||
*/ |
|||
private Integer groupMemberCount; |
|||
/** |
|||
* 组内党员人数占比 |
|||
*/ |
|||
private BigDecimal groupMemberRatio; |
|||
/** |
|||
* 党员发布话题数 |
|||
*/ |
|||
private Integer topicCount; |
|||
/** |
|||
* 党员发布话题数占比 |
|||
*/ |
|||
private BigDecimal topicRatio; |
|||
/** |
|||
* 党员发布话题转议题数 |
|||
*/ |
|||
private Integer issueCount; |
|||
/** |
|||
* 党员发布话题转议题数占比 |
|||
*/ |
|||
private BigDecimal issueRatio; |
|||
/** |
|||
* 党员发布话题转项目数 |
|||
*/ |
|||
private Integer projectCount; |
|||
/** |
|||
* 党员发布话题转项目数占比 |
|||
*/ |
|||
private BigDecimal projectRatio; |
|||
/** |
|||
* 党员发布话题转项目结案数 |
|||
*/ |
|||
private Integer projectClosedCount; |
|||
/** |
|||
* 党员发布话题转项目结案数占比 |
|||
*/ |
|||
private BigDecimal projectClosedRatio; |
|||
} |
@ -0,0 +1,18 @@ |
|||
package com.epmet.dataaggre.dto.datastats.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2021/5/18 14:30 |
|||
*/ |
|||
@Data |
|||
public class PartyMemberVanguardRankResultDTO implements Serializable { |
|||
private static final long serialVersionUID = -3103242333633668412L; |
|||
private List<PartyMemberVanguardDetailResultDTO> agencyRank; |
|||
private List<PartyMemberVanguardDetailResultDTO> gridRank; |
|||
} |
@ -0,0 +1,51 @@ |
|||
package com.epmet.dataaggre.controller; |
|||
|
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dataaggre.dto.datastats.form.PartyMemberVanguardFormDTO; |
|||
import com.epmet.dataaggre.dto.datastats.result.PartyMemberVanguardDetailResultDTO; |
|||
import com.epmet.dataaggre.dto.datastats.result.PartyMemberVanguardRankResultDTO; |
|||
import com.epmet.dataaggre.service.datastats.DataStatsService; |
|||
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 javax.annotation.Resource; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2021/5/18 14:19 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("vanguard") |
|||
public class PartyMemberVanguardController { |
|||
@Resource |
|||
private DataStatsService dataStatsService; |
|||
|
|||
/** |
|||
* 党员先锋--组织/网格详情 |
|||
* @author zhaoqifeng |
|||
* @date 2021/5/18 15:16 |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result<com.epmet.dataaggre.dto.datastats.result.PartyMemberVanguardDetailResultDTO> |
|||
*/ |
|||
@PostMapping("detail") |
|||
public Result<PartyMemberVanguardDetailResultDTO> vanguardDetail(@RequestBody PartyMemberVanguardFormDTO formDTO) { |
|||
PartyMemberVanguardDetailResultDTO result = dataStatsService.vanguardDetail(formDTO); |
|||
return new Result<PartyMemberVanguardDetailResultDTO>().ok(result); |
|||
} |
|||
|
|||
/** |
|||
* 党员先锋--下级组织排行 |
|||
* @author zhaoqifeng |
|||
* @date 2021/5/18 15:16 |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result<com.epmet.dataaggre.dto.datastats.result.PartyMemberVanguardRankResultDTO> |
|||
*/ |
|||
@PostMapping("orgrank") |
|||
public Result<PartyMemberVanguardRankResultDTO> vanguardRank(@RequestBody PartyMemberVanguardFormDTO formDTO) { |
|||
PartyMemberVanguardRankResultDTO result = dataStatsService.vanguardRank(formDTO); |
|||
return new Result<PartyMemberVanguardRankResultDTO>().ok(result); |
|||
} |
|||
} |
@ -0,0 +1,126 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dto.stats.topic; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 热议中话题机关日统计表【热议中指的没有被关闭、屏蔽、转议题的话题】 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-05-17 |
|||
*/ |
|||
@Data |
|||
public class FactTopicHotdiscussAgencyDailyDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 唯一标识 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 机构ID 关联机关dm表 |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 父级机关ID |
|||
*/ |
|||
private String pid; |
|||
|
|||
/** |
|||
* 统计日期 关联日期dm表 |
|||
*/ |
|||
private String dateId; |
|||
|
|||
/** |
|||
* 周ID |
|||
*/ |
|||
private String weekId; |
|||
|
|||
/** |
|||
* 月ID |
|||
*/ |
|||
private String monthId; |
|||
|
|||
/** |
|||
* 季度ID |
|||
*/ |
|||
private String quarterId; |
|||
|
|||
/** |
|||
* 年ID |
|||
*/ |
|||
private String yearId; |
|||
|
|||
/** |
|||
* 话题总数 |
|||
*/ |
|||
private Integer topicTotal; |
|||
|
|||
/** |
|||
* 话题状态【热议中:hot_discuss】 |
|||
*/ |
|||
private String status; |
|||
|
|||
/** |
|||
* 状态话题数量 |
|||
*/ |
|||
private Integer topicCount; |
|||
|
|||
/** |
|||
* 删除标识 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,126 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dto.stats.topic; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 热议中话题网格日统计表【热议中指的没有被关闭、屏蔽、转议题的话题】 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-05-17 |
|||
*/ |
|||
@Data |
|||
public class FactTopicHotdiscussGridDailyDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 唯一标识 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 机关ID |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 网格ID 关联网格dm表 |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 日期ID |
|||
*/ |
|||
private String dateId; |
|||
|
|||
/** |
|||
* 周ID |
|||
*/ |
|||
private String weekId; |
|||
|
|||
/** |
|||
* 月ID |
|||
*/ |
|||
private String monthId; |
|||
|
|||
/** |
|||
* 季度ID |
|||
*/ |
|||
private String quarterId; |
|||
|
|||
/** |
|||
* 年ID |
|||
*/ |
|||
private String yearId; |
|||
|
|||
/** |
|||
* 话题总数 |
|||
*/ |
|||
private Integer topicTotal; |
|||
|
|||
/** |
|||
* 话题状态【热议中:hot_discuss】 |
|||
*/ |
|||
private String status; |
|||
|
|||
/** |
|||
* 状态话题数量 |
|||
*/ |
|||
private Integer topicCount; |
|||
|
|||
/** |
|||
* 删除标识 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.epmet.dto.stats.topic.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author sun |
|||
* 热议中话题-网格、机关日统计-接口入参 |
|||
*/ |
|||
@Data |
|||
public class TopicStatusFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -4527492073390715391L; |
|||
|
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId = ""; |
|||
/** |
|||
* 需要执行的日期(格式:yyyyMMdd) |
|||
*/ |
|||
private String dateId = ""; |
|||
} |
@ -0,0 +1,39 @@ |
|||
package com.epmet.dto.stats.topic.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author sun |
|||
* 热议中话题-网格、机关日统计-接口返参 |
|||
*/ |
|||
@Data |
|||
public class TopicListResultDTO implements Serializable { |
|||
private static final long serialVersionUID = -7427128491727512781L; |
|||
|
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId; |
|||
/** |
|||
* 话题Id |
|||
*/ |
|||
private String topicId; |
|||
/** |
|||
* 网格id |
|||
*/ |
|||
private String gridId; |
|||
/** |
|||
* 小组Id |
|||
*/ |
|||
private String groupId; |
|||
/** |
|||
* 话题状态(讨论中 - discussing、 已屏蔽 - hidden、 已关闭 - closed) |
|||
*/ |
|||
private String status; |
|||
/** |
|||
* 是否转为议题,0:false,1:true |
|||
* */ |
|||
private Boolean shiftIssue; |
|||
} |
@ -0,0 +1,49 @@ |
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.StatsFormDTO; |
|||
import com.epmet.service.StatsPartyMemberVanguardService; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import javax.annotation.Resource; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2021/5/18 9:23 |
|||
*/ |
|||
@RequestMapping("vanguard") |
|||
@RestController |
|||
public class StatsPartyMemberVanguardController { |
|||
@Resource |
|||
private StatsPartyMemberVanguardService statsPartyMemberVanguardService; |
|||
|
|||
/** |
|||
* 党员先锋统计-机关 |
|||
* @author zhaoqifeng |
|||
* @date 2021/5/18 9:26 |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
*/ |
|||
@PostMapping("agencyvanguardstats") |
|||
public Result agencyVanguardStats(StatsFormDTO formDTO) { |
|||
statsPartyMemberVanguardService.agencyStats(formDTO); |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* 党员先锋统计-网格 |
|||
* @author zhaoqifeng |
|||
* @date 2021/5/18 9:27 |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
*/ |
|||
@PostMapping("gridvanguardstats") |
|||
public Result gridVanguardStats(StatsFormDTO formDTO) { |
|||
statsPartyMemberVanguardService.gridStats(formDTO); |
|||
return new Result(); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,38 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dao.stats; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.stats.FactTopicHotdiscussAgencyDailyEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 热议中话题机关日统计表【热议中指的没有被关闭、屏蔽、转议题的话题】 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-05-17 |
|||
*/ |
|||
@Mapper |
|||
public interface FactTopicHotdiscussAgencyDailyDao extends BaseDao<FactTopicHotdiscussAgencyDailyEntity> { |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 根据客户Id、日维度Id批量物理删除一下可能存在的历史数据 |
|||
**/ |
|||
void delTopicAgency(FactTopicHotdiscussAgencyDailyEntity delEntity); |
|||
} |
@ -0,0 +1,38 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dao.stats; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.stats.FactTopicHotdiscussGridDailyEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 热议中话题网格日统计表【热议中指的没有被关闭、屏蔽、转议题的话题】 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-05-17 |
|||
*/ |
|||
@Mapper |
|||
public interface FactTopicHotdiscussGridDailyDao extends BaseDao<FactTopicHotdiscussGridDailyEntity> { |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 根据客户Id、日维度Id批量物理删除一下可能存在的历史数据 |
|||
**/ |
|||
void delTopicGrid(FactTopicHotdiscussGridDailyEntity delEntity); |
|||
} |
@ -0,0 +1,96 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.entity.stats; |
|||
|
|||
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 2021-05-17 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("fact_topic_hotdiscuss_agency_daily") |
|||
public class FactTopicHotdiscussAgencyDailyEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 机构ID 关联机关dm表 |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 父级机关ID |
|||
*/ |
|||
private String pid; |
|||
|
|||
/** |
|||
* 统计日期 关联日期dm表 |
|||
*/ |
|||
private String dateId; |
|||
|
|||
/** |
|||
* 周ID |
|||
*/ |
|||
private String weekId; |
|||
|
|||
/** |
|||
* 月ID |
|||
*/ |
|||
private String monthId; |
|||
|
|||
/** |
|||
* 季度ID |
|||
*/ |
|||
private String quarterId; |
|||
|
|||
/** |
|||
* 年ID |
|||
*/ |
|||
private String yearId; |
|||
|
|||
/** |
|||
* 话题总数 |
|||
*/ |
|||
private Integer topicTotal; |
|||
|
|||
/** |
|||
* 话题状态【热议中:hot_discuss】 |
|||
*/ |
|||
private String status; |
|||
|
|||
/** |
|||
* 状态话题数量 |
|||
*/ |
|||
private Integer topicCount; |
|||
|
|||
} |
@ -0,0 +1,96 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.entity.stats; |
|||
|
|||
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 2021-05-17 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("fact_topic_hotdiscuss_grid_daily") |
|||
public class FactTopicHotdiscussGridDailyEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 机关ID |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 网格ID 关联网格dm表 |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 日期ID |
|||
*/ |
|||
private String dateId; |
|||
|
|||
/** |
|||
* 周ID |
|||
*/ |
|||
private String weekId; |
|||
|
|||
/** |
|||
* 月ID |
|||
*/ |
|||
private String monthId; |
|||
|
|||
/** |
|||
* 季度ID |
|||
*/ |
|||
private String quarterId; |
|||
|
|||
/** |
|||
* 年ID |
|||
*/ |
|||
private String yearId; |
|||
|
|||
/** |
|||
* 话题总数 |
|||
*/ |
|||
private Integer topicTotal; |
|||
|
|||
/** |
|||
* 话题状态【热议中:hot_discuss】 |
|||
*/ |
|||
private String status; |
|||
|
|||
/** |
|||
* 状态话题数量 |
|||
*/ |
|||
private Integer topicCount; |
|||
|
|||
} |
@ -0,0 +1,101 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.stats; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.dto.stats.topic.FactTopicHotdiscussAgencyDailyDTO; |
|||
import com.epmet.entity.stats.FactTopicHotdiscussAgencyDailyEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 热议中话题机关日统计表【热议中指的没有被关闭、屏蔽、转议题的话题】 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-05-17 |
|||
*/ |
|||
public interface FactTopicHotdiscussAgencyDailyService extends BaseService<FactTopicHotdiscussAgencyDailyEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<FactTopicHotdiscussAgencyDailyDTO> |
|||
* @author generator |
|||
* @date 2021-05-17 |
|||
*/ |
|||
PageData<FactTopicHotdiscussAgencyDailyDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<FactTopicHotdiscussAgencyDailyDTO> |
|||
* @author generator |
|||
* @date 2021-05-17 |
|||
*/ |
|||
List<FactTopicHotdiscussAgencyDailyDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return FactTopicHotdiscussAgencyDailyDTO |
|||
* @author generator |
|||
* @date 2021-05-17 |
|||
*/ |
|||
FactTopicHotdiscussAgencyDailyDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-05-17 |
|||
*/ |
|||
void save(FactTopicHotdiscussAgencyDailyDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-05-17 |
|||
*/ |
|||
void update(FactTopicHotdiscussAgencyDailyDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-05-17 |
|||
*/ |
|||
void delete(String[] ids); |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 根据客户Id、日维度Id批量物理删除一下可能存在的历史数据 |
|||
**/ |
|||
void delTopicAgency(FactTopicHotdiscussAgencyDailyEntity delEntity); |
|||
} |
@ -0,0 +1,101 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.stats; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.dto.stats.topic.FactTopicHotdiscussGridDailyDTO; |
|||
import com.epmet.entity.stats.FactTopicHotdiscussGridDailyEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 热议中话题网格日统计表【热议中指的没有被关闭、屏蔽、转议题的话题】 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-05-17 |
|||
*/ |
|||
public interface FactTopicHotdiscussGridDailyService extends BaseService<FactTopicHotdiscussGridDailyEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<FactTopicHotdiscussGridDailyDTO> |
|||
* @author generator |
|||
* @date 2021-05-17 |
|||
*/ |
|||
PageData<FactTopicHotdiscussGridDailyDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<FactTopicHotdiscussGridDailyDTO> |
|||
* @author generator |
|||
* @date 2021-05-17 |
|||
*/ |
|||
List<FactTopicHotdiscussGridDailyDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return FactTopicHotdiscussGridDailyDTO |
|||
* @author generator |
|||
* @date 2021-05-17 |
|||
*/ |
|||
FactTopicHotdiscussGridDailyDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-05-17 |
|||
*/ |
|||
void save(FactTopicHotdiscussGridDailyDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-05-17 |
|||
*/ |
|||
void update(FactTopicHotdiscussGridDailyDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-05-17 |
|||
*/ |
|||
void delete(String[] ids); |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 根据客户Id、日维度Id批量物理删除一下可能存在的历史数据 |
|||
**/ |
|||
void delTopicGrid(FactTopicHotdiscussGridDailyEntity delEntity); |
|||
} |
@ -0,0 +1,109 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.stats.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.dao.stats.FactTopicHotdiscussAgencyDailyDao; |
|||
import com.epmet.dto.stats.topic.FactTopicHotdiscussAgencyDailyDTO; |
|||
import com.epmet.entity.stats.FactTopicHotdiscussAgencyDailyEntity; |
|||
import com.epmet.service.stats.FactTopicHotdiscussAgencyDailyService; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 热议中话题机关日统计表【热议中指的没有被关闭、屏蔽、转议题的话题】 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-05-17 |
|||
*/ |
|||
@Service |
|||
public class FactTopicHotdiscussAgencyDailyServiceImpl extends BaseServiceImpl<FactTopicHotdiscussAgencyDailyDao, FactTopicHotdiscussAgencyDailyEntity> implements FactTopicHotdiscussAgencyDailyService { |
|||
|
|||
|
|||
@Override |
|||
public PageData<FactTopicHotdiscussAgencyDailyDTO> page(Map<String, Object> params) { |
|||
IPage<FactTopicHotdiscussAgencyDailyEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, FactTopicHotdiscussAgencyDailyDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<FactTopicHotdiscussAgencyDailyDTO> list(Map<String, Object> params) { |
|||
List<FactTopicHotdiscussAgencyDailyEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, FactTopicHotdiscussAgencyDailyDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<FactTopicHotdiscussAgencyDailyEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<FactTopicHotdiscussAgencyDailyEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public FactTopicHotdiscussAgencyDailyDTO get(String id) { |
|||
FactTopicHotdiscussAgencyDailyEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, FactTopicHotdiscussAgencyDailyDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(FactTopicHotdiscussAgencyDailyDTO dto) { |
|||
FactTopicHotdiscussAgencyDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactTopicHotdiscussAgencyDailyEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(FactTopicHotdiscussAgencyDailyDTO dto) { |
|||
FactTopicHotdiscussAgencyDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactTopicHotdiscussAgencyDailyEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 根据客户Id、日维度Id批量物理删除一下可能存在的历史数据 |
|||
**/ |
|||
@Override |
|||
public void delTopicAgency(FactTopicHotdiscussAgencyDailyEntity delEntity) { |
|||
baseDao.delTopicAgency(delEntity); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,109 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.stats.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.dao.stats.FactTopicHotdiscussGridDailyDao; |
|||
import com.epmet.dto.stats.topic.FactTopicHotdiscussGridDailyDTO; |
|||
import com.epmet.entity.stats.FactTopicHotdiscussGridDailyEntity; |
|||
import com.epmet.service.stats.FactTopicHotdiscussGridDailyService; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 热议中话题网格日统计表【热议中指的没有被关闭、屏蔽、转议题的话题】 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-05-17 |
|||
*/ |
|||
@Service |
|||
public class FactTopicHotdiscussGridDailyServiceImpl extends BaseServiceImpl<FactTopicHotdiscussGridDailyDao, FactTopicHotdiscussGridDailyEntity> implements FactTopicHotdiscussGridDailyService { |
|||
|
|||
|
|||
@Override |
|||
public PageData<FactTopicHotdiscussGridDailyDTO> page(Map<String, Object> params) { |
|||
IPage<FactTopicHotdiscussGridDailyEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, FactTopicHotdiscussGridDailyDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<FactTopicHotdiscussGridDailyDTO> list(Map<String, Object> params) { |
|||
List<FactTopicHotdiscussGridDailyEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, FactTopicHotdiscussGridDailyDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<FactTopicHotdiscussGridDailyEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<FactTopicHotdiscussGridDailyEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public FactTopicHotdiscussGridDailyDTO get(String id) { |
|||
FactTopicHotdiscussGridDailyEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, FactTopicHotdiscussGridDailyDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(FactTopicHotdiscussGridDailyDTO dto) { |
|||
FactTopicHotdiscussGridDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactTopicHotdiscussGridDailyEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(FactTopicHotdiscussGridDailyDTO dto) { |
|||
FactTopicHotdiscussGridDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactTopicHotdiscussGridDailyEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 根据客户Id、日维度Id批量物理删除一下可能存在的历史数据 |
|||
**/ |
|||
@Override |
|||
public void delTopicGrid(FactTopicHotdiscussGridDailyEntity delEntity) { |
|||
baseDao.delTopicGrid(delEntity); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,87 @@ |
|||
CREATE TABLE `fact_group_total_agency_daily` ( |
|||
`ID` varchar(64) NOT NULL COMMENT '唯一标识', |
|||
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', |
|||
`AGENCY_ID` varchar(64) NOT NULL COMMENT '机构ID 关联机关dim表', |
|||
`PID` varchar(64) DEFAULT NULL COMMENT '父级机关ID', |
|||
`DATE_ID` varchar(32) NOT NULL COMMENT '统计日期 关联日期dim表', |
|||
`WEEK_ID` varchar(32) NOT NULL COMMENT '周ID', |
|||
`MONTH_ID` varchar(32) NOT NULL COMMENT '月份ID', |
|||
`QUARTER_ID` varchar(32) NOT NULL COMMENT '季度ID', |
|||
`YEAR_ID` varchar(32) NOT NULL COMMENT '年ID', |
|||
`GROUP_TOTAL` int(11) DEFAULT '0' COMMENT '当前组织及下级小组总数', |
|||
`ORDINARY_TOTAL` int(11) DEFAULT NULL COMMENT '当前组织及下级楼院小组总数', |
|||
`BRANCH_TOTAL` int(11) DEFAULT NULL COMMENT '当前组织及下级支部小组总数', |
|||
`DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 未删除:0,已删除:1', |
|||
`REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', |
|||
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', |
|||
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
|||
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
|||
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
|||
PRIMARY KEY (`ID`) |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='小组总数-机关日统计表'; |
|||
|
|||
CREATE TABLE `fact_group_total_grid_daily` ( |
|||
`ID` varchar(64) NOT NULL COMMENT '唯一标识', |
|||
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', |
|||
`AGENCY_ID` varchar(64) NOT NULL COMMENT '机构ID 关联机关dim表', |
|||
`GRID_ID` varchar(64) NOT NULL COMMENT '网格ID', |
|||
`DATE_ID` varchar(32) NOT NULL COMMENT '统计日期 关联日期dim表', |
|||
`WEEK_ID` varchar(32) NOT NULL COMMENT '周ID', |
|||
`MONTH_ID` varchar(32) NOT NULL COMMENT '月份ID', |
|||
`QUARTER_ID` varchar(32) NOT NULL COMMENT '季度ID', |
|||
`YEAR_ID` varchar(32) NOT NULL COMMENT '年ID', |
|||
`GROUP_TOTAL` int(11) DEFAULT '0' COMMENT '网格下小组总数', |
|||
`ORDINARY_TOTAL` int(11) DEFAULT NULL COMMENT '网格下楼院小组总数', |
|||
`BRANCH_TOTAL` int(11) DEFAULT NULL COMMENT '网格下支部小组总数', |
|||
`DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 未删除:0,已删除:1', |
|||
`REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', |
|||
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', |
|||
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
|||
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
|||
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
|||
PRIMARY KEY (`ID`) |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='小组总数-网格日统计表'; |
|||
|
|||
CREATE TABLE `fact_topic_hotdiscuss_agency_daily` ( |
|||
`ID` varchar(64) NOT NULL COMMENT '唯一标识', |
|||
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', |
|||
`AGENCY_ID` varchar(64) NOT NULL COMMENT '机构ID 关联机关dm表', |
|||
`PID` varchar(64) NOT NULL COMMENT '父级机关ID', |
|||
`DATE_ID` varchar(32) NOT NULL COMMENT '统计日期 关联日期dm表', |
|||
`WEEK_ID` varchar(32) NOT NULL COMMENT '周ID', |
|||
`MONTH_ID` varchar(32) NOT NULL COMMENT '月ID', |
|||
`QUARTER_ID` varchar(32) NOT NULL COMMENT '季度ID', |
|||
`YEAR_ID` varchar(32) NOT NULL COMMENT '年ID', |
|||
`TOPIC_TOTAL` int(11) DEFAULT '0' COMMENT '话题总数', |
|||
`STATUS` varchar(32) DEFAULT NULL COMMENT '话题状态【热议中:hot_discuss】', |
|||
`TOPIC_COUNT` int(11) DEFAULT '0' COMMENT '状态话题数量', |
|||
`DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识', |
|||
`REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', |
|||
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', |
|||
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
|||
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
|||
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
|||
PRIMARY KEY (`ID`) |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='热议中话题机关日统计表【热议中指的没有被关闭、屏蔽、转议题的话题】'; |
|||
|
|||
CREATE TABLE `fact_topic_hotdiscuss_grid_daily` ( |
|||
`ID` varchar(64) NOT NULL COMMENT '唯一标识', |
|||
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', |
|||
`AGENCY_ID` varchar(64) NOT NULL COMMENT '机关ID', |
|||
`GRID_ID` varchar(64) NOT NULL COMMENT '网格ID 关联网格dm表', |
|||
`DATE_ID` varchar(32) NOT NULL COMMENT '日期ID', |
|||
`WEEK_ID` varchar(32) NOT NULL COMMENT '周ID', |
|||
`MONTH_ID` varchar(32) NOT NULL COMMENT '月ID', |
|||
`QUARTER_ID` varchar(32) NOT NULL COMMENT '季度ID', |
|||
`YEAR_ID` varchar(32) NOT NULL COMMENT '年ID', |
|||
`TOPIC_TOTAL` int(11) DEFAULT '0' COMMENT '话题总数', |
|||
`STATUS` varchar(32) DEFAULT NULL COMMENT '话题状态【热议中:hot_discuss】', |
|||
`TOPIC_COUNT` int(11) DEFAULT '0' COMMENT '状态话题数量', |
|||
`DEL_FLAG` varchar(32) NOT NULL DEFAULT '0' COMMENT '删除标识', |
|||
`REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', |
|||
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', |
|||
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
|||
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
|||
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
|||
PRIMARY KEY (`ID`) |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='热议中话题网格日统计表【热议中指的没有被关闭、屏蔽、转议题的话题】'; |
@ -0,0 +1,15 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.epmet.dao.stats.FactTopicHotdiscussAgencyDailyDao"> |
|||
|
|||
<delete id="delTopicAgency"> |
|||
DELETE |
|||
FROM |
|||
fact_topic_hotdiscuss_agency_daily |
|||
WHERE |
|||
customer_id = #{customerId} |
|||
AND date_id = #{dateId} |
|||
</delete> |
|||
|
|||
</mapper> |
@ -0,0 +1,15 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.epmet.dao.stats.FactTopicHotdiscussGridDailyDao"> |
|||
|
|||
<delete id="delTopicGrid"> |
|||
DELETE |
|||
FROM |
|||
fact_topic_hotdiscuss_grid_daily |
|||
WHERE |
|||
customer_id = #{customerId} |
|||
AND date_id = #{dateId} |
|||
</delete> |
|||
|
|||
</mapper> |
@ -0,0 +1,29 @@ |
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.StatsFormDTO; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2021/5/18 9:56 |
|||
*/ |
|||
public interface StatsPartyMemberVanguardService { |
|||
/** |
|||
* 党员先锋统计-机关 |
|||
* @author zhaoqifeng |
|||
* @date 2021/5/18 9:58 |
|||
* @param params |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
*/ |
|||
Result agencyVanguardStats(StatsFormDTO params); |
|||
|
|||
/** |
|||
* 党员先锋统计-网格 |
|||
* @author zhaoqifeng |
|||
* @date 2021/5/18 9:58 |
|||
* @param params |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
*/ |
|||
Result gridVanguardStats(StatsFormDTO params); |
|||
} |
@ -0,0 +1,47 @@ |
|||
package com.epmet.service.impl; |
|||
|
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.StatsFormDTO; |
|||
import com.epmet.feign.DataStatisticalOpenFeignClient; |
|||
import com.epmet.service.StatsPartyMemberVanguardService; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import javax.annotation.Resource; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2021/5/18 9:56 |
|||
*/ |
|||
@Service |
|||
public class StatsPartyMemberVanguardServiceImpl implements StatsPartyMemberVanguardService { |
|||
@Resource |
|||
private DataStatisticalOpenFeignClient dataStatisticalOpenFeignClient; |
|||
|
|||
|
|||
/** |
|||
* 党员先锋统计-机关 |
|||
* |
|||
* @param params |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @author zhaoqifeng |
|||
* @date 2021/5/18 9:58 |
|||
*/ |
|||
@Override |
|||
public Result agencyVanguardStats(StatsFormDTO params) { |
|||
return dataStatisticalOpenFeignClient.agencyVanguardStats(params); |
|||
} |
|||
|
|||
/** |
|||
* 党员先锋统计-网格 |
|||
* |
|||
* @param params |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @author zhaoqifeng |
|||
* @date 2021/5/18 9:58 |
|||
*/ |
|||
@Override |
|||
public Result gridVanguardStats(StatsFormDTO params) { |
|||
return dataStatisticalOpenFeignClient.gridVanguardStats(params); |
|||
} |
|||
} |
@ -0,0 +1,46 @@ |
|||
package com.epmet.task; |
|||
|
|||
import com.alibaba.fastjson.JSON; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.StatsFormDTO; |
|||
import com.epmet.service.StatsPartyMemberVanguardService; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
import javax.annotation.Resource; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2021/5/18 9:55 |
|||
*/ |
|||
@Component("statsVanguardTask") |
|||
@Slf4j |
|||
public class StatsPartyMemberVanguardTask implements ITask { |
|||
|
|||
@Resource |
|||
private StatsPartyMemberVanguardService statsPartyMemberVanguardService; |
|||
|
|||
@Override |
|||
public void run(String params) { |
|||
log.info("statsVanguardTask定时任务正在执行,参数为:{}", params); |
|||
StatsFormDTO statsFormDTO = new StatsFormDTO(); |
|||
if (StringUtils.isNotBlank(params)) { |
|||
statsFormDTO = JSON.parseObject(params, StatsFormDTO.class); |
|||
} |
|||
Result result = statsPartyMemberVanguardService.agencyVanguardStats(statsFormDTO); |
|||
if (result.success()) { |
|||
log.info("statsVanguardTask组织级别定时任务执行成功"); |
|||
} else { |
|||
log.error("statsVanguardTask组织级别定时任务执行失败:" + result.getMsg()); |
|||
} |
|||
|
|||
result = statsPartyMemberVanguardService.gridVanguardStats(statsFormDTO); |
|||
if (result.success()) { |
|||
log.info("statsVanguardTask网格级别定时任务执行成功"); |
|||
} else { |
|||
log.error("statsVanguardTask网格级别定时任务执行失败:" + result.getMsg()); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,41 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2021/5/17 10:36 上午 |
|||
* @DESC |
|||
*/ |
|||
@Data |
|||
public class ProjectCategoryDisPoseResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -2434579745274187160L; |
|||
|
|||
/** |
|||
* 项目ID |
|||
*/ |
|||
private String projectId; |
|||
|
|||
/** |
|||
* 查询传参 |
|||
*/ |
|||
private String categoryCode; |
|||
|
|||
/** |
|||
* mysql查询接收结果 |
|||
*/ |
|||
private String categoryName; |
|||
|
|||
/** |
|||
* 反参 |
|||
*/ |
|||
private String projectCategory; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
} |
@ -0,0 +1,43 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2021/5/13 5:16 下午 |
|||
* @DESC |
|||
*/ |
|||
@Data |
|||
public class MassesDiscontentFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -9104774532905137856L; |
|||
|
|||
public interface MassesDiscontentForm{} |
|||
|
|||
/** |
|||
* 时间区间,三个月:threeMonth;半年:sixMonth;一年:twelveMonth |
|||
* 一个月按照30天,三个月90天,半年180天,一年365天 |
|||
*/ |
|||
private String timeSection; |
|||
|
|||
/** |
|||
* asc:分数由低到高 |
|||
* desc:分数由高到低 |
|||
*/ |
|||
private String sortType; |
|||
|
|||
/** |
|||
* 组织ID |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
@NotNull(message = "pageNo不能为空",groups = MassesDiscontentForm.class) |
|||
private Integer pageNo; |
|||
|
|||
@NotNull(message = "pageSize不能为空",groups = MassesDiscontentForm.class) |
|||
private Integer pageSize; |
|||
|
|||
} |
@ -0,0 +1,62 @@ |
|||
package com.epmet.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 2021/5/14 9:04 上午 |
|||
* @DESC |
|||
*/ |
|||
@Data |
|||
public class MassesDiscontentResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 8954504790464516198L; |
|||
|
|||
/** |
|||
* 项目ID |
|||
*/ |
|||
private String projectId; |
|||
|
|||
/** |
|||
* 议题ID |
|||
*/ |
|||
private String issueId; |
|||
|
|||
/** |
|||
* 话题所在网格 |
|||
*/ |
|||
private String gridName; |
|||
|
|||
/** |
|||
* 话题图片 |
|||
*/ |
|||
private List<String> photos; |
|||
|
|||
/** |
|||
* 话题内容 |
|||
*/ |
|||
private String topicContent; |
|||
|
|||
/** |
|||
* 项目分类标签 |
|||
*/ |
|||
private String projectCategory; |
|||
|
|||
/** |
|||
* 项目评价分数 |
|||
*/ |
|||
@JsonIgnore |
|||
private Integer score; |
|||
|
|||
public MassesDiscontentResultDTO() { |
|||
this.gridName = ""; |
|||
this.photos = new ArrayList<>(); |
|||
this.topicContent = ""; |
|||
this.projectCategory = ""; |
|||
} |
|||
} |
@ -0,0 +1,31 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2021/5/18 1:29 下午 |
|||
* @DESC |
|||
*/ |
|||
@Data |
|||
public class ProjectScoreResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 8559486245200043097L; |
|||
|
|||
/** |
|||
* 项目ID |
|||
*/ |
|||
private String projectId; |
|||
|
|||
/** |
|||
* 项目评价分数 |
|||
*/ |
|||
private Integer score; |
|||
|
|||
/** |
|||
* 议题ID |
|||
*/ |
|||
private String issueId; |
|||
} |
@ -0,0 +1,42 @@ |
|||
package com.epmet.resi.group.dto.topic.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2021/5/17 2:44 下午 |
|||
* @DESC |
|||
*/ |
|||
@Data |
|||
public class TopicInfoResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 4068679301595597877L; |
|||
|
|||
/** |
|||
* 议题ID |
|||
*/ |
|||
private String issueId; |
|||
|
|||
/** |
|||
* 话题所在网格 |
|||
*/ |
|||
private String gridName; |
|||
|
|||
/** |
|||
* 网格ID |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 话题图片 |
|||
*/ |
|||
private List<String> photos; |
|||
|
|||
/** |
|||
* 话题内容 |
|||
*/ |
|||
private String topicContent; |
|||
} |
Loading…
Reference in new issue