Browse Source
# Conflicts: # epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java # epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.javamaster
97 changed files with 4655 additions and 33 deletions
@ -0,0 +1,21 @@ |
|||
package com.epmet.commons.tools.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/9/15 5:41 下午 |
|||
*/ |
|||
@Data |
|||
public class TimeListResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1482639109300981626L; |
|||
|
|||
private String dateId; |
|||
private String weekId; |
|||
private String monthId; |
|||
private String quarterId; |
|||
private String yearId; |
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.epmet.constant; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/9/16 3:56 下午 |
|||
*/ |
|||
public interface ExtractConstant { |
|||
|
|||
String PARTY = "党员"; |
|||
|
|||
String STRANGER = "陌生人"; |
|||
|
|||
String ISSUE_INFO = "查询议题信息为空"; |
|||
|
|||
String CREATED_TOPIC_USER_IDENTITY = "查询创建话题用户身份信息为空"; |
|||
|
|||
String PARENT_AGENCY_ID_LIST = "查询组织上级ID集合为空......"; |
|||
|
|||
String ISSUE_PROCESS = "查询查询议题process集合为空"; |
|||
|
|||
} |
@ -0,0 +1,13 @@ |
|||
package com.epmet.constant; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/9/17 2:56 下午 |
|||
*/ |
|||
public interface StatsConstant { |
|||
|
|||
String PARTY_INFO_LIST = "客户【%s】查询党员信息集合为空......"; |
|||
|
|||
String CUSTOMER_INFO_NULL = "查询所有客户ID为空"; |
|||
|
|||
} |
@ -0,0 +1,91 @@ |
|||
/** |
|||
* 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.extract; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 对象行为动作维度表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-09-15 |
|||
*/ |
|||
@Data |
|||
public class DimObjectActionDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 行为code |
|||
*/ |
|||
private String actionCode; |
|||
|
|||
/** |
|||
* 行为描述 |
|||
*/ |
|||
private String actionDesc; |
|||
|
|||
/** |
|||
* 行为类型 topic,issue,project,article,group |
|||
*/ |
|||
private String actionType; |
|||
|
|||
/** |
|||
* 父级ID(本表id) |
|||
*/ |
|||
private String pid; |
|||
|
|||
/** |
|||
* 删除标识 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,86 @@ |
|||
/** |
|||
* 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.extract; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 对象行为状态维度表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-09-15 |
|||
*/ |
|||
@Data |
|||
public class DimObjectStatusDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 行为code |
|||
*/ |
|||
private String statusCode; |
|||
|
|||
/** |
|||
* 行为描述 |
|||
*/ |
|||
private String statusDesc; |
|||
|
|||
/** |
|||
* 行为类型 topic,issue,project,article,group |
|||
*/ |
|||
private String statusType; |
|||
|
|||
/** |
|||
* 删除标识 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,136 @@ |
|||
/** |
|||
* 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.extract; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 议题记录附表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-09-14 |
|||
*/ |
|||
@Data |
|||
public class FactOriginIssueLogDailyDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* id |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 网格ID |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 组织上级ID |
|||
*/ |
|||
private String pid; |
|||
|
|||
/** |
|||
* 机关ID |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 日期ID |
|||
*/ |
|||
private String dateId; |
|||
|
|||
/** |
|||
* 周ID |
|||
*/ |
|||
private String weekId; |
|||
|
|||
/** |
|||
* 月份ID |
|||
*/ |
|||
private String monthId; |
|||
|
|||
/** |
|||
* 季度ID |
|||
*/ |
|||
private String quarterId; |
|||
|
|||
/** |
|||
* 年度ID |
|||
*/ |
|||
private String yearId; |
|||
|
|||
/** |
|||
* 议题ID |
|||
*/ |
|||
private String issueId; |
|||
|
|||
/** |
|||
* 操作用户ID |
|||
*/ |
|||
private String operationUserId; |
|||
|
|||
/** |
|||
* 动作CODE |
|||
*/ |
|||
private String actionCode; |
|||
|
|||
/** |
|||
* 党员 热心居民 居民 |
|||
*/ |
|||
private Integer isParty; |
|||
|
|||
/** |
|||
* 删除状态,0:正常,1:删除 |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,152 @@ |
|||
/** |
|||
* 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.extract; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 议题主表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-09-14 |
|||
*/ |
|||
@Data |
|||
public class FactOriginIssueMainDailyDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 议题ID |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 日ID(指议题创建的yyyymmdd) |
|||
*/ |
|||
private String dateId; |
|||
|
|||
/** |
|||
* 周ID |
|||
*/ |
|||
private String weekId; |
|||
|
|||
/** |
|||
* 月份ID |
|||
*/ |
|||
private String monthId; |
|||
|
|||
/** |
|||
* 季度ID |
|||
*/ |
|||
private String quarterId; |
|||
|
|||
/** |
|||
* 年度ID |
|||
*/ |
|||
private String yearId; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 用户身份标识 |
|||
*/ |
|||
private Integer isParty; |
|||
|
|||
/** |
|||
* 转议题用户ID |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* 创建话题用户的ID |
|||
*/ |
|||
private String createTopicUserId; |
|||
|
|||
/** |
|||
* 转为议题的话题ID |
|||
*/ |
|||
private String topicId; |
|||
|
|||
/** |
|||
* 议题网格ID |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 上级ID |
|||
*/ |
|||
private String pid; |
|||
|
|||
/** |
|||
* 议题组织ID(网格所属组织ID) |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 议题状态 |
|||
*/ |
|||
private String issueStatus; |
|||
|
|||
/** |
|||
* 创建话题用户身份标识 |
|||
*/ |
|||
private Integer topicUserIsParty; |
|||
|
|||
/** |
|||
* 删除状态,0:正常,1:删除 |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
public FactOriginIssueMainDailyDTO() { |
|||
this.delFlag = 0; |
|||
this.revision = 0; |
|||
this.createdBy = "APP_USER"; |
|||
this.updatedBy = "APP_USER"; |
|||
} |
|||
} |
@ -0,0 +1,25 @@ |
|||
package com.epmet.dto.extract.form; |
|||
|
|||
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/9/16 6:01 下午 |
|||
*/ |
|||
@Data |
|||
public class ExtractFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -6180252151765854242L; |
|||
|
|||
public interface ExtractForm extends CustomerClientShowGroup{} |
|||
|
|||
@NotBlank(message = "客户ID不能为空",groups = ExtractForm.class) |
|||
private String customerId; |
|||
|
|||
@NotBlank(message = "dateId不能为空",groups = ExtractForm.class) |
|||
private String dateId; |
|||
} |
@ -0,0 +1,33 @@ |
|||
package com.epmet.dto.extract.form; |
|||
|
|||
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/9/15 2:23 下午 |
|||
*/ |
|||
@Data |
|||
@AllArgsConstructor |
|||
public class IssueInfoFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 8805754438522195653L; |
|||
|
|||
public interface IssueInfo extends CustomerClientShowGroup{} |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
@NotBlank(message = "customerId",groups = IssueInfo.class) |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 日期ID(实际为议题创建的 "yyyymmdd" ) |
|||
*/ |
|||
@NotBlank(message = "dateId",groups = IssueInfo.class) |
|||
private String dateId; |
|||
} |
@ -0,0 +1,112 @@ |
|||
package com.epmet.dto.extract.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/9/14 5:42 下午 |
|||
*/ |
|||
@Data |
|||
public class IssueLogDailyFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 7036617958351476594L; |
|||
|
|||
/** |
|||
* 议题ID |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 网格ID |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 组织上级ID |
|||
*/ |
|||
private String pid; |
|||
|
|||
/** |
|||
* 机关ID |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 议题ID |
|||
*/ |
|||
private String issueId; |
|||
|
|||
/** |
|||
* 日期ID |
|||
*/ |
|||
private String dateId; |
|||
|
|||
/** |
|||
* 周ID |
|||
*/ |
|||
private String weekId; |
|||
|
|||
/** |
|||
* 月份ID |
|||
*/ |
|||
private String monthId; |
|||
|
|||
/** |
|||
* 季度ID |
|||
*/ |
|||
private String quarterId; |
|||
|
|||
/** |
|||
* 年度ID |
|||
*/ |
|||
private String yearId; |
|||
|
|||
/** |
|||
* 操作用户ID |
|||
*/ |
|||
private String operationUserId; |
|||
|
|||
/** |
|||
* 动作CODE |
|||
*/ |
|||
private String actionCode; |
|||
|
|||
/** |
|||
* 党员 热心居民 居民 |
|||
*/ |
|||
private Integer isParty; |
|||
|
|||
/** |
|||
* 是否已删除(0-未删除,1-已删除) |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建者 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 修改者 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
public IssueLogDailyFormDTO() { |
|||
this.delFlag = delFlag = 0; |
|||
this.revision = revision = 0; |
|||
this.createdBy = createdBy = "APP_USER"; |
|||
this.updatedBy = updatedBy = "APP_USER"; |
|||
} |
|||
} |
@ -0,0 +1,123 @@ |
|||
package com.epmet.dto.extract.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/9/14 5:47 下午 |
|||
*/ |
|||
@Data |
|||
public class IssueMainDailyFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -5288003778076157611L; |
|||
|
|||
/** |
|||
* 议题ID |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 日ID(指议题创建的yyyymmdd) |
|||
*/ |
|||
private String dateId; |
|||
|
|||
/** |
|||
* 周ID |
|||
*/ |
|||
private String weekId; |
|||
|
|||
/** |
|||
* 月份ID |
|||
*/ |
|||
private String monthId; |
|||
|
|||
/** |
|||
* 季度ID |
|||
*/ |
|||
private String quarterId; |
|||
|
|||
/** |
|||
* 年度ID |
|||
*/ |
|||
private String yearId; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 用户身份标识 |
|||
*/ |
|||
private Integer isParty; |
|||
|
|||
/** |
|||
* 转议题用户ID |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* 创建话题用户的ID |
|||
*/ |
|||
private String createTopicUserId; |
|||
|
|||
/** |
|||
* 转为议题的话题ID |
|||
*/ |
|||
private String topicId; |
|||
|
|||
/** |
|||
* 议题网格ID |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 上级ID |
|||
*/ |
|||
private String pid; |
|||
|
|||
/** |
|||
* 议题组织ID(网格所属组织ID) |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 议题状态 |
|||
*/ |
|||
private String issueStatus; |
|||
|
|||
/** |
|||
* 创建话题用户身份标识 |
|||
*/ |
|||
private Integer topicUserIsParty; |
|||
|
|||
/** |
|||
* 删除状态,0:正常,1:删除 |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
public IssueMainDailyFormDTO() { |
|||
this.delFlag = 0; |
|||
this.revision = 0; |
|||
this.createdBy = "APP_USER"; |
|||
this.updatedBy = "APP_USER"; |
|||
} |
|||
} |
@ -0,0 +1,25 @@ |
|||
package com.epmet.dto.extract.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/9/15 6:13 下午 |
|||
*/ |
|||
@Data |
|||
public class AgencyInfoResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 2823049943836552367L; |
|||
|
|||
/** |
|||
* 机关ID |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 机关的父ID |
|||
*/ |
|||
private String pid; |
|||
} |
@ -0,0 +1,50 @@ |
|||
package com.epmet.dto.extract.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/9/15 2:04 下午 |
|||
*/ |
|||
@Data |
|||
public class IssueInfoResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 3097591617162404015L; |
|||
|
|||
/** |
|||
* 议题ID |
|||
*/ |
|||
private String issueId; |
|||
|
|||
/** |
|||
* 议题状态 |
|||
*/ |
|||
private String issueStatus; |
|||
|
|||
/** |
|||
* 话题ID |
|||
*/ |
|||
private String topicId; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 网格ID |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 机关ID |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 用户ID |
|||
*/ |
|||
private String userId; |
|||
} |
@ -0,0 +1,45 @@ |
|||
package com.epmet.dto.extract.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/9/16 1:27 下午 |
|||
*/ |
|||
@Data |
|||
public class IssueProcessInfoResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 104679947108492259L; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 网格ID |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 机关ID |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 议题ID |
|||
*/ |
|||
private String issueId; |
|||
|
|||
/** |
|||
* 动作CODE |
|||
*/ |
|||
private String actionCode; |
|||
|
|||
/** |
|||
* 用户ID |
|||
*/ |
|||
private String userId; |
|||
} |
@ -0,0 +1,45 @@ |
|||
package com.epmet.dto.extract.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/9/16 5:14 下午 |
|||
*/ |
|||
@Data |
|||
public class SatisfactionInfoResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1194031573388458848L; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 网格ID |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 机关ID |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 议题ID |
|||
*/ |
|||
private String issueId; |
|||
|
|||
/** |
|||
* 动作CODE |
|||
*/ |
|||
private String actionCode; |
|||
|
|||
/** |
|||
* 用户ID |
|||
*/ |
|||
private String userId; |
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.epmet.dto.extract.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/9/15 4:52 下午 |
|||
*/ |
|||
@Data |
|||
public class TopicInfoResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -5902552728088278104L; |
|||
|
|||
private String topicId; |
|||
|
|||
private String userId; |
|||
|
|||
private Integer isParty; |
|||
} |
@ -0,0 +1,19 @@ |
|||
package com.epmet.dto.extract.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/9/15 4:20 下午 |
|||
*/ |
|||
@Data |
|||
public class UserPartyResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 6688297568032159824L; |
|||
|
|||
private String userId; |
|||
|
|||
private String roleName; |
|||
} |
@ -0,0 +1,35 @@ |
|||
package com.epmet.dto.org; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 网格基本信息 |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2020/9/16 14:00 |
|||
*/ |
|||
@Data |
|||
public class GridInfoDTO implements Serializable { |
|||
private static final long serialVersionUID = -5328705277000477630L; |
|||
/** |
|||
* 话题所属的网格ID |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 所属机关ID 发布单位所属机关ID |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* agencyId的上一级组织id |
|||
*/ |
|||
private String pid; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
} |
@ -0,0 +1,131 @@ |
|||
/** |
|||
* 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; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 党员维度表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-09-17 |
|||
*/ |
|||
@Data |
|||
public class DimCustomerPartymemberDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 党员认证时的网格id |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 所属机关ID |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* agencyId的上一级组织id |
|||
*/ |
|||
private String parentId; |
|||
|
|||
/** |
|||
* 党员认证成功的日期yyyyMMdd |
|||
*/ |
|||
private String dateId; |
|||
|
|||
/** |
|||
* 周ID eg:2020W01 = 2020年第一周 |
|||
*/ |
|||
private String weekId; |
|||
|
|||
/** |
|||
* 月份ID eg:202006 = 2020年6月、2020-07 = 2020年7月 |
|||
*/ |
|||
private String monthId; |
|||
|
|||
/** |
|||
* 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度 |
|||
*/ |
|||
private String quarterId; |
|||
|
|||
/** |
|||
* 年度ID eg:2020 = 2020年、2021 = 2021年 |
|||
*/ |
|||
private String yearId; |
|||
|
|||
/** |
|||
* 用户id |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* 身份证 |
|||
*/ |
|||
private String idCard; |
|||
|
|||
/** |
|||
* 生日 |
|||
*/ |
|||
private Date birthday; |
|||
|
|||
/** |
|||
* 删除标识0未删除1已删除 |
|||
*/ |
|||
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.form; |
|||
|
|||
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/9/17 11:02 上午 |
|||
*/ |
|||
@Data |
|||
public class CustomerIdAndDateIdFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -3381286960911634231L; |
|||
|
|||
public interface CustomerIdAndDateId extends CustomerClientShowGroup{} |
|||
|
|||
private String customerId; |
|||
|
|||
@NotBlank(message = "日期Id不能为空",groups = CustomerIdAndDateId.class) |
|||
private String dateId; |
|||
} |
@ -0,0 +1,104 @@ |
|||
package com.epmet.dto.stats.form; |
|||
|
|||
import com.epmet.commons.tools.constant.NumConstant; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/9/17 11:15 上午 |
|||
*/ |
|||
@Data |
|||
public class DimCustomerPartyMemberFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -9178779369245037701L; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 党员认证时的网格id |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 所属机关ID |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* agencyId的上一级组织id |
|||
*/ |
|||
private String parentId; |
|||
|
|||
/** |
|||
* 党员认证成功的日期yyyyMMdd |
|||
*/ |
|||
private String dateId; |
|||
|
|||
/** |
|||
* 周ID eg:2020W01 = 2020年第一周 |
|||
*/ |
|||
private String weekId; |
|||
|
|||
/** |
|||
* 月份ID eg:202006 = 2020年6月、2020-07 = 2020年7月 |
|||
*/ |
|||
private String monthId; |
|||
|
|||
/** |
|||
* 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度 |
|||
*/ |
|||
private String quarterId; |
|||
|
|||
/** |
|||
* 年度ID eg:2020 = 2020年、2021 = 2021年 |
|||
*/ |
|||
private String yearId; |
|||
|
|||
/** |
|||
* 用户id |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* 身份证 |
|||
*/ |
|||
private String idCard; |
|||
|
|||
/** |
|||
* 生日 |
|||
*/ |
|||
private Date birthday; |
|||
|
|||
/** |
|||
* 删除标识0未删除1已删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
public DimCustomerPartyMemberFormDTO() { |
|||
this.delFlag = NumConstant.ZERO_STR; |
|||
this.revision = NumConstant.ZERO; |
|||
this.createdBy = "APP_USER"; |
|||
this.updatedBy = "APP_USER"; |
|||
} |
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.epmet.dto.stats.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/9/17 2:32 下午 |
|||
*/ |
|||
@Data |
|||
public class GridBelongAgencyResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 6781297915444918432L; |
|||
|
|||
/** |
|||
* 网格ID |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 网格所属机关ID |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 机关的上级ID |
|||
*/ |
|||
private String parentId; |
|||
} |
@ -0,0 +1,82 @@ |
|||
package com.epmet.dto.topic; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 原始话题相关信息 |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2020/9/15 18:01 |
|||
*/ |
|||
@Data |
|||
public class TopicOriginInfoDTO implements Serializable { |
|||
private static final long serialVersionUID = -182136873047614269L; |
|||
|
|||
/** |
|||
* 话题id |
|||
*/ |
|||
private String topicId; |
|||
|
|||
/** |
|||
* 操作类型(发布 - discussing 、 屏蔽 - hidden、 取消屏蔽 - hidden_cancelled、 关闭话题 - closed) |
|||
* 补充 转议题:shift_issue 、评论话题:comment |
|||
*/ |
|||
private String actionCode; |
|||
|
|||
/** |
|||
* 本条记录的操作人 resi_topic_operation.CREATED_BY |
|||
*/ |
|||
private String operateUserId; |
|||
|
|||
/** |
|||
* 用户操作时间 resi_topic_operation.CREATED_TIME 对应的yyyyMMdd |
|||
*/ |
|||
private String dateId; |
|||
|
|||
/** |
|||
* 用户操作时间 resi_topic_operation.CREATED_TIME 对应的yyyyMM |
|||
*/ |
|||
private String monthId; |
|||
|
|||
/** |
|||
* 用户操作时间 resi_topic_operation.CREATED_TIME 对应的yyyy |
|||
*/ |
|||
private String yearId; |
|||
|
|||
/** |
|||
* 用户操作时间 resi_topic_operation.CREATED_TIME |
|||
*/ |
|||
private Date originalBusinessTime; |
|||
|
|||
/** |
|||
* 话题状态(讨论中 - discussing、 已屏蔽 - hidden、 已关闭 - closed) |
|||
*/ |
|||
private String groupId; |
|||
|
|||
/** |
|||
* 话题的状态 |
|||
*/ |
|||
private String topicStatus; |
|||
|
|||
/** |
|||
* 话题关闭时的状态:已解决 resolved,未解决 unresolved |
|||
*/ |
|||
// private String closedStatus;
|
|||
|
|||
/** |
|||
* 网格id ( 其实就是小组所属的网格id) |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,14 @@ |
|||
package com.epmet.constant; |
|||
|
|||
/** |
|||
* 对象行为动作维度表 |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2020/9/16 10:13 |
|||
*/ |
|||
public interface DimObjectActionConstant { |
|||
/** |
|||
* 发布话题 |
|||
*/ |
|||
String TOPIC_PUBLISH="discussing"; |
|||
} |
@ -0,0 +1,10 @@ |
|||
package com.epmet.constant; |
|||
|
|||
/** |
|||
* 对象行为状态维度表 |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2020/9/16 10:14 |
|||
*/ |
|||
public interface DimObjectStatusConstant { |
|||
} |
@ -0,0 +1,76 @@ |
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.dto.extract.form.ExtractFormDTO; |
|||
import com.epmet.service.evaluationindex.extract.IssueExtractService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import com.epmet.service.evaluationindex.extract.FactOriginTopicMainDailyService; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
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/9/15 11:06 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("factorigin") |
|||
public class FactOriginController { |
|||
|
|||
@Autowired |
|||
private IssueExtractService issueExtractService; |
|||
@Autowired |
|||
private FactOriginTopicMainDailyService factOriginTopicMainDailyService; |
|||
|
|||
/** |
|||
* @Description 议题抽取(main) |
|||
* @param extractFormDTO |
|||
* @author zxc |
|||
* @date 2020/9/15 2:02 下午 |
|||
*/ |
|||
@PostMapping("issueextractmain") |
|||
public Result issueExtractMain(@RequestBody ExtractFormDTO extractFormDTO){ |
|||
ValidatorUtils.validateEntity(extractFormDTO, ExtractFormDTO.ExtractForm.class); |
|||
issueExtractService.issueExtractMain(extractFormDTO); |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* @Description 议题抽取(log) |
|||
* @param extractFormDTO |
|||
* @author zxc |
|||
* @date 2020/9/16 9:41 上午 |
|||
*/ |
|||
@PostMapping("issueextractlog") |
|||
public Result issueExtractLog(@RequestBody ExtractFormDTO extractFormDTO){ |
|||
ValidatorUtils.validateEntity(extractFormDTO, ExtractFormDTO.ExtractForm.class); |
|||
issueExtractService.issueExtractLog(extractFormDTO); |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* @param customerId yyyyMMdd |
|||
* @param dateId yyyyMMdd |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @author yinzuomei |
|||
* @description 话题 (fact_origin_topic_main_daily 话题主表_日统计 fact_origin_topic_log_daily 话题明细_日统计) |
|||
* @Date 2020/9/15 13:39 |
|||
**/ |
|||
@PostMapping("topic") |
|||
public Result topicDataCleaning(String customerId,String dateId) { |
|||
if (StringUtils.isNotBlank(customerId) && StringUtils.isNotBlank(dateId)) { |
|||
factOriginTopicMainDailyService.topicCleaning(customerId,dateId); |
|||
} |
|||
return new Result(); |
|||
} |
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,33 @@ |
|||
/** |
|||
* 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.evaluationindex.extract; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.evaluationindex.extract.DimObjectActionEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 对象行为动作维度表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-09-15 |
|||
*/ |
|||
@Mapper |
|||
public interface DimObjectActionDao extends BaseDao<DimObjectActionEntity> { |
|||
|
|||
} |
@ -0,0 +1,33 @@ |
|||
/** |
|||
* 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.evaluationindex.extract; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.evaluationindex.extract.DimObjectStatusEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 对象行为状态维度表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-09-15 |
|||
*/ |
|||
@Mapper |
|||
public interface DimObjectStatusDao extends BaseDao<DimObjectStatusEntity> { |
|||
|
|||
} |
@ -0,0 +1,54 @@ |
|||
/** |
|||
* 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.evaluationindex.extract; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.dto.extract.form.IssueLogDailyFormDTO; |
|||
import com.epmet.entity.evaluationindex.extract.FactOriginIssueLogDailyEntity; |
|||
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-09-14 |
|||
*/ |
|||
@Mapper |
|||
public interface FactOriginIssueLogDailyDao extends BaseDao<FactOriginIssueLogDailyEntity> { |
|||
|
|||
/** |
|||
* @Description 议题记录附表插入 |
|||
* @param issueLogList |
|||
* @author zxc |
|||
* @date 2020/9/14 5:53 下午 |
|||
*/ |
|||
void insertIssueLogList(@Param("issueLogList")List<IssueLogDailyFormDTO> issueLogList); |
|||
|
|||
/** |
|||
* @Description 删除旧的记录 |
|||
* @param customerId |
|||
* @param dateId |
|||
* @author zxc |
|||
* @date 2020/9/16 9:33 上午 |
|||
*/ |
|||
void deleteOldLogRecord(@Param("customerId")String customerId,@Param("dateId")String dateId); |
|||
|
|||
} |
@ -0,0 +1,53 @@ |
|||
/** |
|||
* 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.evaluationindex.extract; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.dto.extract.form.IssueMainDailyFormDTO; |
|||
import com.epmet.entity.evaluationindex.extract.FactOriginIssueMainDailyEntity; |
|||
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-09-14 |
|||
*/ |
|||
@Mapper |
|||
public interface FactOriginIssueMainDailyDao extends BaseDao<FactOriginIssueMainDailyEntity> { |
|||
|
|||
/** |
|||
* @Description 议题主表插入 |
|||
* @param issueMainList |
|||
* @author zxc |
|||
* @date 2020/9/14 5:53 下午 |
|||
*/ |
|||
void insertIssueMainList(@Param("issueMainList") List<IssueMainDailyFormDTO> issueMainList); |
|||
|
|||
/** |
|||
* @Description 删除旧的记录 |
|||
* @param customerId |
|||
* @param dateId |
|||
* @author zxc |
|||
* @date 2020/9/16 9:33 上午 |
|||
*/ |
|||
void deleteOldMainRecord(@Param("customerId")String customerId, @Param("dateId")String dateId); |
|||
} |
@ -0,0 +1,55 @@ |
|||
/** |
|||
* 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.evaluationindex.extract; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.evaluationindex.extract.FactOriginTopicLogDailyEntity; |
|||
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-09-15 |
|||
*/ |
|||
@Mapper |
|||
public interface FactOriginTopicLogDailyDao extends BaseDao<FactOriginTopicLogDailyEntity> { |
|||
/** |
|||
* @return int |
|||
* @param customerId |
|||
* @param dateId |
|||
* @param deleteSize |
|||
* @author yinzuomei |
|||
* @description 批量删除 |
|||
* @Date 2020/9/16 12:54 |
|||
**/ |
|||
int deleteByDateIdAndCustomerId(@Param("customerId") String customerId, |
|||
@Param("dateId") String dateId, |
|||
@Param("deleteSize") Integer deleteSize); |
|||
/** |
|||
* @return int |
|||
* @param list |
|||
* @author yinzuomei |
|||
* @description 批量插入 |
|||
* @Date 2020/9/16 12:54 |
|||
**/ |
|||
int insertBatchEntity(@Param("list") List<FactOriginTopicLogDailyEntity> list); |
|||
} |
@ -0,0 +1,57 @@ |
|||
/** |
|||
* 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.evaluationindex.extract; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.evaluationindex.extract.FactOriginTopicMainDailyEntity; |
|||
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-09-15 |
|||
*/ |
|||
@Mapper |
|||
public interface FactOriginTopicMainDailyDao extends BaseDao<FactOriginTopicMainDailyEntity> { |
|||
|
|||
/** |
|||
* @param customerId |
|||
* @param dateId |
|||
* @param deleteSize |
|||
* @return int |
|||
* @author yinzuomei |
|||
* @description 批量删除 |
|||
* @Date 2020/9/16 11:16 |
|||
**/ |
|||
int deleteByDateIdAndCustomerId(@Param("customerId") String customerId, |
|||
@Param("dateId") String dateId, |
|||
@Param("deleteSize") Integer deleteSize); |
|||
|
|||
/** |
|||
* @return int |
|||
* @param list |
|||
* @author yinzuomei |
|||
* @description 批量插入 |
|||
* @Date 2020/9/16 12:48 |
|||
**/ |
|||
int insertBatchEntity(@Param("list") List<FactOriginTopicMainDailyEntity> list); |
|||
} |
@ -0,0 +1,29 @@ |
|||
package com.epmet.dao.partymember; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.dto.extract.result.IssueInfoResultDTO; |
|||
import com.epmet.dto.extract.result.IssueProcessInfoResultDTO; |
|||
import com.epmet.dto.extract.result.SatisfactionInfoResultDTO; |
|||
import com.epmet.dto.issue.IssueAgencyDTO; |
|||
import com.epmet.dto.issue.IssueGridDTO; |
|||
import com.epmet.dto.issue.IssueProjectDTO; |
|||
import com.epmet.dto.stats.form.DimCustomerPartyMemberFormDTO; |
|||
import com.epmet.entity.issue.IssueEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
@Mapper |
|||
public interface PartyMemberDao{ |
|||
|
|||
/** |
|||
* @Description 查询党员信息 |
|||
* @param customerId |
|||
* @param dateId |
|||
* @author zxc |
|||
* @date 2020/9/17 1:58 下午 |
|||
*/ |
|||
List<DimCustomerPartyMemberFormDTO> selectPartyMemberInfo(@Param("customerId") String customerId,@Param("dateId") String dateId); |
|||
|
|||
} |
@ -0,0 +1,53 @@ |
|||
/** |
|||
* 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.dto.stats.form.DimCustomerPartyMemberFormDTO; |
|||
import com.epmet.entity.stats.DimCustomerPartymemberEntity; |
|||
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-09-17 |
|||
*/ |
|||
@Mapper |
|||
public interface DimCustomerPartymemberDao extends BaseDao<DimCustomerPartymemberEntity> { |
|||
|
|||
/** |
|||
* @Description 批量插入党员信息 |
|||
* @param partyMemberInfos |
|||
* @author zxc |
|||
* @date 2020/9/17 11:18 上午 |
|||
*/ |
|||
void insertPartyMemberInfo(@Param("partyMemberInfos")List<DimCustomerPartyMemberFormDTO> partyMemberInfos); |
|||
|
|||
/** |
|||
* @Description 删除旧党员记录 |
|||
* @param customerId |
|||
* @param dateId |
|||
* @author zxc |
|||
* @date 2020/9/17 2:43 下午 |
|||
*/ |
|||
void deleteOldPartyRecord(@Param("customerId")String customerId,@Param("dateId")String dateId); |
|||
} |
@ -0,0 +1,61 @@ |
|||
/** |
|||
* 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.evaluationindex.extract; |
|||
|
|||
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-09-15 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("dim_object_action") |
|||
public class DimObjectActionEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 行为code |
|||
*/ |
|||
private String actionCode; |
|||
|
|||
/** |
|||
* 行为描述 |
|||
*/ |
|||
private String actionDesc; |
|||
|
|||
/** |
|||
* 行为类型 topic,issue,project,article,group |
|||
*/ |
|||
private String actionType; |
|||
|
|||
/** |
|||
* 父级ID(本表id) |
|||
*/ |
|||
private String pid; |
|||
|
|||
} |
@ -0,0 +1,56 @@ |
|||
/** |
|||
* 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.evaluationindex.extract; |
|||
|
|||
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-09-15 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("dim_object_status") |
|||
public class DimObjectStatusEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 行为code |
|||
*/ |
|||
private String statusCode; |
|||
|
|||
/** |
|||
* 行为描述 |
|||
*/ |
|||
private String statusDesc; |
|||
|
|||
/** |
|||
* 行为类型 topic,issue,project,article,group |
|||
*/ |
|||
private String statusType; |
|||
|
|||
} |
@ -0,0 +1,106 @@ |
|||
/** |
|||
* 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.evaluationindex.extract; |
|||
|
|||
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-09-14 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("fact_origin_issue_log_daily") |
|||
public class FactOriginIssueLogDailyEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 网格ID |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 组织上级ID |
|||
*/ |
|||
private String pid; |
|||
|
|||
/** |
|||
* 机关ID |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 日期ID |
|||
*/ |
|||
private String dateId; |
|||
|
|||
/** |
|||
* 周ID |
|||
*/ |
|||
private String weekId; |
|||
|
|||
/** |
|||
* 月份ID |
|||
*/ |
|||
private String monthId; |
|||
|
|||
/** |
|||
* 季度ID |
|||
*/ |
|||
private String quarterId; |
|||
|
|||
/** |
|||
* 年度ID |
|||
*/ |
|||
private String yearId; |
|||
|
|||
/** |
|||
* 议题ID |
|||
*/ |
|||
private String issueId; |
|||
|
|||
/** |
|||
* 操作用户ID |
|||
*/ |
|||
private String operationUserId; |
|||
|
|||
/** |
|||
* 动作CODE |
|||
*/ |
|||
private String actionCode; |
|||
|
|||
/** |
|||
* 党员 热心居民 居民 |
|||
*/ |
|||
private String userIdentity; |
|||
|
|||
} |
@ -0,0 +1,121 @@ |
|||
/** |
|||
* 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.evaluationindex.extract; |
|||
|
|||
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-09-14 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("fact_origin_issue_main_daily") |
|||
public class FactOriginIssueMainDailyEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 日ID(指议题创建的yyyymmdd) |
|||
*/ |
|||
private String dateId; |
|||
|
|||
/** |
|||
* 周ID |
|||
*/ |
|||
private String weekId; |
|||
|
|||
/** |
|||
* 月份ID |
|||
*/ |
|||
private String monthId; |
|||
|
|||
/** |
|||
* 季度ID |
|||
*/ |
|||
private String quarterId; |
|||
|
|||
/** |
|||
* 年度ID |
|||
*/ |
|||
private String yearId; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 用户身份标识 |
|||
*/ |
|||
private String userIdentity; |
|||
|
|||
/** |
|||
* 转议题用户ID |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* 创建话题用户的ID |
|||
*/ |
|||
private String createTopicUserId; |
|||
|
|||
/** |
|||
* 议题ID |
|||
*/ |
|||
private String issueId; |
|||
|
|||
/** |
|||
* 转为议题的话题ID |
|||
*/ |
|||
private String topicId; |
|||
|
|||
/** |
|||
* 议题网格ID |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 上级ID |
|||
*/ |
|||
private String pid; |
|||
|
|||
/** |
|||
* 议题组织ID(网格所属组织ID) |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 议题状态 |
|||
*/ |
|||
private String issueStatus; |
|||
|
|||
/** |
|||
* 创建话题用户身份标识 |
|||
*/ |
|||
private String topicUserIdentity; |
|||
|
|||
} |
@ -0,0 +1,116 @@ |
|||
/** |
|||
* 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.evaluationindex.extract; |
|||
|
|||
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-09-15 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("fact_origin_topic_log_daily") |
|||
public class FactOriginTopicLogDailyEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 话题所属的网格ID |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 网格所属上级组织ID |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* agencyId的上一级组织id |
|||
*/ |
|||
private String pid; |
|||
|
|||
/** |
|||
* 业务的发生时间 格式:日期ID |
|||
*/ |
|||
private String dateId; |
|||
|
|||
/** |
|||
* 周ID eg:2020W01 = 2020年第一周 |
|||
*/ |
|||
private String weekId; |
|||
|
|||
/** |
|||
* 月份ID eg:202006 = 2020年6月、2020-07 = 2020年7月 |
|||
*/ |
|||
private String monthId; |
|||
|
|||
/** |
|||
* 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度 |
|||
*/ |
|||
private String quarterId; |
|||
|
|||
/** |
|||
* 年度ID eg:2020 = 2020年、2021 = 2021年 |
|||
*/ |
|||
private String yearId; |
|||
|
|||
/** |
|||
* 话题id |
|||
*/ |
|||
private String topicId; |
|||
|
|||
/** |
|||
* 话题所属小组id |
|||
*/ |
|||
private String groupId; |
|||
|
|||
/** |
|||
* 行为code 来自dim_object_action表 |
|||
*/ |
|||
private String actionCode; |
|||
|
|||
/** |
|||
* 本条数据操作用户Id |
|||
*/ |
|||
private String operateUserId; |
|||
|
|||
/** |
|||
* 本条数据操作用户是否是党员, 1是0不是 |
|||
*/ |
|||
private Boolean operateUserIsParty; |
|||
|
|||
/** |
|||
* 原始业务发生时间 |
|||
*/ |
|||
private Date originalBusinessTime; |
|||
|
|||
} |
@ -0,0 +1,106 @@ |
|||
/** |
|||
* 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.evaluationindex.extract; |
|||
|
|||
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-09-15 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("fact_origin_topic_main_daily") |
|||
public class FactOriginTopicMainDailyEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 话题所属的网格ID |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 所属机关ID 发布单位所属机关ID |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* agencyId的上一级组织id |
|||
*/ |
|||
private String pid; |
|||
|
|||
/** |
|||
* 话题的发布日期yyyyMMdd |
|||
*/ |
|||
private String dateId; |
|||
|
|||
/** |
|||
* 周ID eg:2020W01 = 2020年第一周 |
|||
*/ |
|||
private String weekId; |
|||
|
|||
/** |
|||
* 月份ID eg:202006 = 2020年6月、2020-07 = 2020年7月 |
|||
*/ |
|||
private String monthId; |
|||
|
|||
/** |
|||
* 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度 |
|||
*/ |
|||
private String quarterId; |
|||
|
|||
/** |
|||
* 年度ID eg:2020 = 2020年、2021 = 2021年 |
|||
*/ |
|||
private String yearId; |
|||
|
|||
/** |
|||
* 话题所属小组id |
|||
*/ |
|||
private String groupId; |
|||
|
|||
/** |
|||
* 话题状态 来自dim_object_status表 |
|||
*/ |
|||
private String topicStatus; |
|||
|
|||
/** |
|||
* 话题发布人id |
|||
*/ |
|||
private String createTopicUserId; |
|||
|
|||
/** |
|||
* 话题发布人是否是党员:1是党员0不是。 默认0 |
|||
*/ |
|||
private Boolean createTopicUserIsParty; |
|||
|
|||
} |
@ -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.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 2020-09-17 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("dim_customer_partymember") |
|||
public class DimCustomerPartymemberEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 党员认证时的网格id |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 所属机关ID |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* agencyId的上一级组织id |
|||
*/ |
|||
private String pid; |
|||
|
|||
/** |
|||
* 党员认证成功的日期yyyyMMdd |
|||
*/ |
|||
private String dateId; |
|||
|
|||
/** |
|||
* 周ID eg:2020W01 = 2020年第一周 |
|||
*/ |
|||
private String weekId; |
|||
|
|||
/** |
|||
* 月份ID eg:202006 = 2020年6月、2020-07 = 2020年7月 |
|||
*/ |
|||
private String monthId; |
|||
|
|||
/** |
|||
* 季度ID eg:2020Q1 = 2020年第一季度、2020Q2 = 2020年第二季度、2020Q3 = 2020年第三季度、2020Q4 = 2020年第四季度 |
|||
*/ |
|||
private String quarterId; |
|||
|
|||
/** |
|||
* 年度ID eg:2020 = 2020年、2021 = 2021年 |
|||
*/ |
|||
private String yearId; |
|||
|
|||
/** |
|||
* 用户id |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* 身份证 |
|||
*/ |
|||
private String idCard; |
|||
|
|||
/** |
|||
* 生日 |
|||
*/ |
|||
private Date birthday; |
|||
|
|||
} |
@ -0,0 +1,35 @@ |
|||
/** |
|||
* 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.evaluationindex.extract; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.entity.evaluationindex.extract.FactOriginTopicLogDailyEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 话题明细_日统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-09-15 |
|||
*/ |
|||
public interface FactOriginTopicLogDailyService extends BaseService<FactOriginTopicLogDailyEntity> { |
|||
|
|||
} |
@ -0,0 +1,46 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.evaluationindex.extract; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.dto.topic.TopicOriginInfoDTO; |
|||
import com.epmet.entity.evaluationindex.extract.FactOriginTopicMainDailyEntity; |
|||
|
|||
import java.util.List; |
|||
|
|||
|
|||
/** |
|||
* 话题主表_日统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-09-15 |
|||
*/ |
|||
public interface FactOriginTopicMainDailyService extends BaseService<FactOriginTopicMainDailyEntity> { |
|||
|
|||
/** |
|||
* @return void |
|||
* @param customerId 客户id |
|||
* @param dateId yyyyMMdd |
|||
* @author yinzuomei 数据采集:话题本身 |
|||
* @description fact_origin_topic_log_daily 话题明细_日统计 fact_origin_topic_main_daily 话题主表_日统计 |
|||
* @Date 2020/9/15 13:40 |
|||
**/ |
|||
Boolean topicCleaning(String customerId, String dateId); |
|||
|
|||
|
|||
} |
@ -0,0 +1,26 @@ |
|||
package com.epmet.service.evaluationindex.extract; |
|||
|
|||
import com.epmet.dto.extract.form.ExtractFormDTO; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/9/14 5:07 下午 |
|||
*/ |
|||
public interface IssueExtractService { |
|||
|
|||
/** |
|||
* @Description 议题抽取(main) |
|||
* @param extractFormDTO |
|||
* @author zxc |
|||
* @date 2020/9/15 2:02 下午 |
|||
*/ |
|||
Boolean issueExtractMain(ExtractFormDTO extractFormDTO); |
|||
|
|||
/** |
|||
* @Description 议题抽取(log) |
|||
* @param extractFormDTO |
|||
* @author zxc |
|||
* @date 2020/9/16 9:41 上午 |
|||
*/ |
|||
Boolean issueExtractLog(ExtractFormDTO extractFormDTO); |
|||
} |
@ -0,0 +1,36 @@ |
|||
/** |
|||
* 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.evaluationindex.extract.impl; |
|||
|
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.dao.evaluationindex.extract.FactOriginTopicLogDailyDao; |
|||
import com.epmet.entity.evaluationindex.extract.FactOriginTopicLogDailyEntity; |
|||
import com.epmet.service.evaluationindex.extract.FactOriginTopicLogDailyService; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* 话题明细_日统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-09-15 |
|||
*/ |
|||
@Service |
|||
public class FactOriginTopicLogDailyServiceImpl extends BaseServiceImpl<FactOriginTopicLogDailyDao, FactOriginTopicLogDailyEntity> implements FactOriginTopicLogDailyService { |
|||
|
|||
|
|||
} |
@ -0,0 +1,226 @@ |
|||
/** |
|||
* 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.evaluationindex.extract.impl; |
|||
|
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.constant.NumConstant; |
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.utils.DateUtils; |
|||
import com.epmet.constant.DimObjectActionConstant; |
|||
import com.epmet.constant.IndexCalConstant; |
|||
import com.epmet.dao.evaluationindex.extract.FactOriginTopicLogDailyDao; |
|||
import com.epmet.dao.evaluationindex.extract.FactOriginTopicMainDailyDao; |
|||
import com.epmet.dto.org.GridInfoDTO; |
|||
import com.epmet.dto.topic.TopicOriginInfoDTO; |
|||
import com.epmet.entity.evaluationindex.extract.FactOriginTopicLogDailyEntity; |
|||
import com.epmet.entity.evaluationindex.extract.FactOriginTopicMainDailyEntity; |
|||
import com.epmet.service.evaluationindex.extract.FactOriginTopicMainDailyService; |
|||
import com.epmet.service.org.CustomerGridService; |
|||
import com.epmet.service.topic.TopicService; |
|||
import com.epmet.service.user.UserService; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.commons.collections4.ListUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.util.CollectionUtils; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.HashMap; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
import java.util.stream.Collectors; |
|||
|
|||
|
|||
/** |
|||
* 话题主表_日统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-09-15 |
|||
*/ |
|||
@Slf4j |
|||
@Service |
|||
public class FactOriginTopicMainDailyServiceImpl extends BaseServiceImpl<FactOriginTopicMainDailyDao, FactOriginTopicMainDailyEntity> implements FactOriginTopicMainDailyService { |
|||
@Autowired |
|||
private TopicService topicService; |
|||
@Autowired |
|||
private CustomerGridService customerGridService; |
|||
@Autowired |
|||
private FactOriginTopicLogDailyDao factOriginTopicLogDailyDao; |
|||
@Autowired |
|||
private UserService userService; |
|||
/** |
|||
* @param customerId 客户id |
|||
* @param dateId yyyyMMdd |
|||
* @return void |
|||
* @author yinzuomei 数据采集:话题本身 |
|||
* @description fact_origin_topic_log_daily 话题明细_日统计 fact_origin_topic_main_daily 话题主表_日统计 |
|||
* @Date 2020/9/15 13:40 |
|||
**/ |
|||
@Override |
|||
public Boolean topicCleaning(String customerId, String dateId) { |
|||
List<TopicOriginInfoDTO> topicOriginInfoList = topicService.queryTopicOriginInfoList(customerId, dateId); |
|||
if (CollectionUtils.isEmpty(topicOriginInfoList)) { |
|||
log.info(String.format("customerId%s,dateId%s,doesn't have any topic operation record",customerId,dateId)); |
|||
return true; |
|||
} |
|||
Map<String,GridInfoDTO> gridMap=getGridInfoMap(customerId); |
|||
Map<String, Object> map=this.constructFactOriginData(topicOriginInfoList,gridMap); |
|||
List<FactOriginTopicMainDailyEntity> mainDailyEntityList= (List<FactOriginTopicMainDailyEntity>) map.get("main"); |
|||
List<FactOriginTopicLogDailyEntity> logDailyEntityList= (List<FactOriginTopicLogDailyEntity>) map.get("log"); |
|||
//删除之前统计的数据
|
|||
deleteFactOriginData(customerId,dateId); |
|||
//批量保存主表
|
|||
saveFactOriginTopicMainDailyEntity(mainDailyEntityList); |
|||
//批量保存明细表
|
|||
saveFactOriginTopicLogDailyEntity(logDailyEntityList); |
|||
return true; |
|||
} |
|||
|
|||
private Map<String, GridInfoDTO> getGridInfoMap(String customerId) { |
|||
Map<String ,GridInfoDTO> map=new HashMap<>(); |
|||
List<GridInfoDTO> list=customerGridService.queryGridInfoList(customerId); |
|||
if(!CollectionUtils.isEmpty(list)){ |
|||
return list.stream().collect(Collectors.toMap(GridInfoDTO::getGridId, gridInfoDTO -> gridInfoDTO)); |
|||
} |
|||
return map; |
|||
} |
|||
|
|||
|
|||
/** |
|||
* @return void |
|||
* @param mainDailyEntityList |
|||
* @author yinzuomei |
|||
* @description 批量插入 fact_origin_topic_main_daily |
|||
* @Date 2020/9/16 11:21 |
|||
**/ |
|||
private void saveFactOriginTopicMainDailyEntity(List<FactOriginTopicMainDailyEntity> mainDailyEntityList) { |
|||
//批量插入
|
|||
List<List<FactOriginTopicMainDailyEntity>> partition = ListUtils.partition(mainDailyEntityList, IndexCalConstant.INSERT_SIZE); |
|||
partition.forEach(list -> { |
|||
baseDao.insertBatchEntity(list); |
|||
}); |
|||
} |
|||
|
|||
/** |
|||
* @return void |
|||
* @param logDailyEntityList |
|||
* @author yinzuomei |
|||
* @description 批量插入fact_origin_topic_log_daily |
|||
* @Date 2020/9/16 12:53 |
|||
**/ |
|||
private void saveFactOriginTopicLogDailyEntity(List<FactOriginTopicLogDailyEntity> logDailyEntityList) { |
|||
//批量插入
|
|||
List<List<FactOriginTopicLogDailyEntity>> partition = ListUtils.partition(logDailyEntityList, IndexCalConstant.INSERT_SIZE); |
|||
partition.forEach(list -> { |
|||
factOriginTopicLogDailyDao.insertBatchEntity(list); |
|||
}); |
|||
} |
|||
|
|||
/** |
|||
* @return java.util.Map<java.lang.String,java.lang.Object> |
|||
* @param topicOriginInfoList |
|||
* @author yinzuomei |
|||
* @description 构造好要插入的数据 |
|||
* @Date 2020/9/16 11:21 |
|||
**/ |
|||
private Map<String, Object> constructFactOriginData(List<TopicOriginInfoDTO> topicOriginInfoList,Map<String,GridInfoDTO> gridMap) { |
|||
Map<String, Object> map=new HashMap<>(); |
|||
List<FactOriginTopicMainDailyEntity> mainDailyEntityList=new ArrayList<>(); |
|||
List<FactOriginTopicLogDailyEntity> logDailyEntityList=new ArrayList<>(); |
|||
List<String> userIds = topicOriginInfoList.stream().map(topic -> topic.getOperateUserId()).distinct().collect(Collectors.toList()); |
|||
Map<String,Integer> userIsPartyMap = userService.selectUserIsParty(userIds); |
|||
for(TopicOriginInfoDTO topicOriginInfoDTO:topicOriginInfoList){ |
|||
GridInfoDTO gridInfoDTO=gridMap.get(topicOriginInfoDTO.getGridId()); |
|||
if(null==gridInfoDTO){ |
|||
log.error("没有找到 gridId="+topicOriginInfoDTO.getGridId()+" 的基本信息"); |
|||
// continue;
|
|||
throw new RenException("xxxxxx"); |
|||
} |
|||
// 一年的第几周
|
|||
String weekId = DateUtils.format(topicOriginInfoDTO.getOriginalBusinessTime(), DateUtils.DATE_PATTERN_YYYY).concat("W").concat(String.valueOf(DateUtils.getWeekOfYear(topicOriginInfoDTO.getOriginalBusinessTime()))); |
|||
String quarterId=DateUtils.getQuarterId(topicOriginInfoDTO.getMonthId()); |
|||
if(DimObjectActionConstant.TOPIC_PUBLISH.equals(topicOriginInfoDTO.getActionCode())){ |
|||
//如果是新发布的话题需要插入主表
|
|||
FactOriginTopicMainDailyEntity mainDailyEntity=ConvertUtils.sourceToTarget(topicOriginInfoDTO, FactOriginTopicMainDailyEntity.class); |
|||
mainDailyEntity.setId(topicOriginInfoDTO.getTopicId()); |
|||
mainDailyEntity.setWeekId(weekId); |
|||
mainDailyEntity.setQuarterId(quarterId); |
|||
mainDailyEntity.setCreateTopicUserId(topicOriginInfoDTO.getOperateUserId()); |
|||
//网格所属的组织id
|
|||
mainDailyEntity.setAgencyId(gridInfoDTO.getAgencyId()); |
|||
//网格的上上级组织id=街道id
|
|||
mainDailyEntity.setPid(gridInfoDTO.getPid()); |
|||
//TODO
|
|||
//话题发布人是否是党员:1是党员0不是。 默认0
|
|||
if (null != userIsPartyMap && null != userIsPartyMap.get(topicOriginInfoDTO.getOperateUserId())) { |
|||
mainDailyEntity.setCreateTopicUserIsParty(userIsPartyMap.get(topicOriginInfoDTO.getOperateUserId()) == NumConstant.ONE ? true : false); |
|||
} else { |
|||
mainDailyEntity.setCreateTopicUserIsParty(false); |
|||
} |
|||
|
|||
mainDailyEntityList.add(mainDailyEntity); |
|||
} |
|||
FactOriginTopicLogDailyEntity logDailyEntity= ConvertUtils.sourceToTarget(topicOriginInfoDTO, FactOriginTopicLogDailyEntity.class); |
|||
logDailyEntity.setCustomerId(topicOriginInfoDTO.getCustomerId()); |
|||
logDailyEntity.setGridId(topicOriginInfoDTO.getGridId()); |
|||
logDailyEntity.setWeekId(weekId); |
|||
logDailyEntity.setQuarterId(quarterId); |
|||
logDailyEntity.setAgencyId(gridInfoDTO.getAgencyId()); |
|||
logDailyEntity.setPid(gridInfoDTO.getPid()); |
|||
//TODO
|
|||
if (null != userIsPartyMap && null != userIsPartyMap.get(topicOriginInfoDTO.getOperateUserId())) { |
|||
logDailyEntity.setOperateUserIsParty(userIsPartyMap.get(topicOriginInfoDTO.getOperateUserId()) == NumConstant.ONE ? true : false); |
|||
} else { |
|||
logDailyEntity.setOperateUserIsParty(false); |
|||
} |
|||
logDailyEntityList.add(logDailyEntity); |
|||
} |
|||
map.put("main",mainDailyEntityList); |
|||
map.put("log",logDailyEntityList); |
|||
return map; |
|||
} |
|||
|
|||
/** |
|||
* @return void |
|||
* @param customerId |
|||
* @param dateId |
|||
* @author yinzuomei |
|||
* @description 删除之前统计过的数据 |
|||
* @Date 2020/9/16 11:21 |
|||
**/ |
|||
private void deleteFactOriginData(String customerId, String dateId) { |
|||
int mainDeleteNum; |
|||
do { |
|||
//一次删除50条
|
|||
mainDeleteNum = baseDao.deleteByDateIdAndCustomerId(customerId, |
|||
dateId, |
|||
IndexCalConstant.DELETE_SIZE); |
|||
} while (mainDeleteNum > NumConstant.ZERO); |
|||
int logDeleteNum; |
|||
do { |
|||
//一次删除50条
|
|||
logDeleteNum = factOriginTopicLogDailyDao.deleteByDateIdAndCustomerId(customerId, |
|||
dateId, |
|||
IndexCalConstant.DELETE_SIZE); |
|||
} while (logDeleteNum > NumConstant.ZERO); |
|||
} |
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,243 @@ |
|||
package com.epmet.service.evaluationindex.extract.impl; |
|||
|
|||
import com.epmet.commons.tools.dto.form.TimeListResultDTO; |
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.utils.DateUtils; |
|||
import com.epmet.constant.ExtractConstant; |
|||
import com.epmet.dao.evaluationindex.extract.FactOriginIssueLogDailyDao; |
|||
import com.epmet.dao.evaluationindex.extract.FactOriginIssueMainDailyDao; |
|||
import com.epmet.dao.stats.DimAgencyDao; |
|||
import com.epmet.dto.extract.form.ExtractFormDTO; |
|||
import com.epmet.dto.extract.form.IssueLogDailyFormDTO; |
|||
import com.epmet.dto.extract.form.IssueMainDailyFormDTO; |
|||
import com.epmet.dto.extract.result.SatisfactionInfoResultDTO; |
|||
import com.epmet.dto.extract.result.AgencyInfoResultDTO; |
|||
import com.epmet.dto.extract.result.IssueInfoResultDTO; |
|||
import com.epmet.dto.extract.result.IssueProcessInfoResultDTO; |
|||
import com.epmet.dto.extract.result.TopicInfoResultDTO; |
|||
import com.epmet.service.Issue.IssueService; |
|||
import com.epmet.service.evaluationindex.extract.IssueExtractService; |
|||
import com.epmet.service.topic.TopicService; |
|||
import com.epmet.service.user.UserService; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
import org.springframework.util.CollectionUtils; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
import java.util.stream.Collectors; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/9/14 5:08 下午 |
|||
*/ |
|||
@Service |
|||
@Slf4j |
|||
public class IssueExtractServiceImpl implements IssueExtractService { |
|||
|
|||
@Autowired |
|||
private FactOriginIssueMainDailyDao issueMainDailyDao; |
|||
@Autowired |
|||
private IssueService issueService; |
|||
@Autowired |
|||
private UserService userService; |
|||
@Autowired |
|||
private TopicService topicService; |
|||
@Autowired |
|||
private DimAgencyDao dimAgencyDao; |
|||
@Autowired |
|||
private FactOriginIssueLogDailyDao issueLogDailyDao; |
|||
|
|||
/** |
|||
* @Description 议题抽取 |
|||
* @param extractFormDTO |
|||
* @author zxc |
|||
* @date 2020/9/15 2:02 下午 |
|||
*/ |
|||
@Override |
|||
public Boolean issueExtractMain(ExtractFormDTO extractFormDTO) { |
|||
String customerId = extractFormDTO.getCustomerId(); |
|||
String dateId = extractFormDTO.getDateId(); |
|||
// 1. 议题信息查询
|
|||
List<IssueInfoResultDTO> listResult = issueService.selectIssueInfo(customerId, dateId); |
|||
List<IssueMainDailyFormDTO> result = new ArrayList<>(); |
|||
if (CollectionUtils.isEmpty(listResult)){ |
|||
throw new RenException(ExtractConstant.ISSUE_INFO); |
|||
} |
|||
listResult.forEach(issue -> { |
|||
IssueMainDailyFormDTO issueMainDailyFormDTO = ConvertUtils.sourceToTarget(issue, IssueMainDailyFormDTO.class); |
|||
issueMainDailyFormDTO.setId(issue.getIssueId()); |
|||
result.add(issueMainDailyFormDTO); |
|||
}); |
|||
|
|||
// 2. 创建议题人ID
|
|||
List<String> userIds = listResult.stream().map(issue -> issue.getUserId()).distinct().collect(Collectors.toList()); |
|||
Map<String,Integer> map = userService.selectUserIsParty(userIds); |
|||
if (null != map){ |
|||
result.forEach(r -> { |
|||
map.forEach((userId,isParty) -> { |
|||
if (r.getUserId().equals(userId)){ |
|||
r.setIsParty(isParty); |
|||
} |
|||
}); |
|||
}); |
|||
} |
|||
// 3. 创建话题用户身份信息查询
|
|||
List<String> topicIds = listResult.stream().map(issue -> issue.getTopicId()).collect(Collectors.toList()); |
|||
List<TopicInfoResultDTO> topicInfoList = topicService.selectTopicInfo(topicIds); |
|||
if (CollectionUtils.isEmpty(topicInfoList)){ |
|||
throw new RenException(ExtractConstant.CREATED_TOPIC_USER_IDENTITY); |
|||
} |
|||
List<String> createTopicUserIds = topicInfoList.stream().map(topic -> topic.getUserId()).distinct().collect(Collectors.toList()); |
|||
Map<String, Integer> topicUserIsParty = userService.selectUserIsParty(createTopicUserIds); |
|||
topicInfoList.forEach(topic -> { |
|||
topicUserIsParty.forEach((userId,isParty) -> { |
|||
if (topic.getUserId().equals(userId)){ |
|||
topic.setIsParty(isParty); |
|||
} |
|||
}); |
|||
}); |
|||
// 4. 根据dateId赋值
|
|||
TimeListResultDTO timeList = DateUtils.getTimeList(dateId); |
|||
result.forEach(r -> { |
|||
r.setDateId(dateId); |
|||
r.setWeekId(timeList.getWeekId()); |
|||
r.setMonthId(timeList.getMonthId()); |
|||
r.setQuarterId(timeList.getQuarterId()); |
|||
r.setYearId(timeList.getYearId()); |
|||
topicInfoList.forEach(topic -> { |
|||
if (r.getTopicId().equals(topic.getTopicId())){ |
|||
r.setCreateTopicUserId(topic.getUserId()); |
|||
r.setTopicUserIsParty(topic.getIsParty()); |
|||
} |
|||
}); |
|||
}); |
|||
// 5. 查询pid
|
|||
List<String> agencyIds = result.stream().map(r -> r.getAgencyId()).distinct().collect(Collectors.toList()); |
|||
List<AgencyInfoResultDTO> agencyInfoList = dimAgencyDao.selectAgencyInfo(agencyIds); |
|||
if (CollectionUtils.isEmpty(agencyInfoList)){ |
|||
throw new RenException(ExtractConstant.PARENT_AGENCY_ID_LIST); |
|||
} |
|||
result.forEach(r -> { |
|||
agencyInfoList.forEach(pid -> { |
|||
if (r.getAgencyId().equals(pid.getAgencyId())){ |
|||
r.setPid(pid.getPid()); |
|||
} |
|||
}); |
|||
}); |
|||
delAndInsertMain(customerId,dateId,result); |
|||
return true; |
|||
} |
|||
|
|||
/** |
|||
* @Description 议题主表删除插入 |
|||
* @param customerId |
|||
* @param dateId |
|||
* @param result |
|||
* @author zxc |
|||
* @date 2020/9/16 3:32 下午 |
|||
*/ |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delAndInsertMain(String customerId,String dateId,List<IssueMainDailyFormDTO> result){ |
|||
issueMainDailyDao.deleteOldMainRecord(customerId, dateId); |
|||
issueMainDailyDao.insertIssueMainList(result); |
|||
} |
|||
|
|||
/** |
|||
* @Description 议题抽取(log) |
|||
* @param extractFormDTO |
|||
* @author zxc |
|||
* @date 2020/9/16 9:41 上午 |
|||
*/ |
|||
@Override |
|||
public Boolean issueExtractLog(ExtractFormDTO extractFormDTO) { |
|||
String customerId = extractFormDTO.getCustomerId(); |
|||
String dateId = extractFormDTO.getDateId(); |
|||
List<IssueLogDailyFormDTO> result = new ArrayList<>(); |
|||
// 1. 查询议题process
|
|||
List<IssueProcessInfoResultDTO> listResult = issueService.selectIssueProcessInfo(customerId, dateId); |
|||
if (CollectionUtils.isEmpty(listResult)){ |
|||
throw new RenException(ExtractConstant.ISSUE_PROCESS); |
|||
} |
|||
listResult.forEach(issueProcess -> { |
|||
IssueLogDailyFormDTO issueLogDailyFormDTO = ConvertUtils.sourceToTarget(issueProcess, IssueLogDailyFormDTO.class); |
|||
issueLogDailyFormDTO.setOperationUserId(issueProcess.getUserId()); |
|||
result.add(issueLogDailyFormDTO); |
|||
}); |
|||
|
|||
// 2. 查询议题满意度
|
|||
List<SatisfactionInfoResultDTO> satisfactionInfoList = issueService.selectIssueSatisfactionInfo(customerId, dateId); |
|||
if (!CollectionUtils.isEmpty(satisfactionInfoList)){ |
|||
satisfactionInfoList.forEach(s -> { |
|||
IssueLogDailyFormDTO issueLogDailyFormDTO = ConvertUtils.sourceToTarget(s, IssueLogDailyFormDTO.class); |
|||
issueLogDailyFormDTO.setOperationUserId(s.getUserId()); |
|||
result.add(issueLogDailyFormDTO); |
|||
}); |
|||
} |
|||
|
|||
// 3. 查询议题支持反对
|
|||
List<SatisfactionInfoResultDTO> voteInfoList = issueService.selectIssueVoteInfo(customerId, dateId); |
|||
if (!CollectionUtils.isEmpty(voteInfoList)){ |
|||
voteInfoList.forEach(v -> { |
|||
IssueLogDailyFormDTO issueLogDailyFormDTO = ConvertUtils.sourceToTarget(v, IssueLogDailyFormDTO.class); |
|||
issueLogDailyFormDTO.setOperationUserId(v.getUserId()); |
|||
result.add(issueLogDailyFormDTO); |
|||
}); |
|||
} |
|||
|
|||
// 4. 动作操作人的身份标识是否是党员
|
|||
List<String> userIds = listResult.stream().map(issue -> issue.getUserId()).distinct().collect(Collectors.toList()); |
|||
Map<String,Integer> map = userService.selectUserIsParty(userIds); |
|||
if (null != map){ |
|||
result.forEach(r -> { |
|||
map.forEach((userId,isParty) -> { |
|||
if (r.getOperationUserId().equals(userId)){ |
|||
r.setIsParty(isParty); |
|||
} |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
// 5. 上级ID
|
|||
List<String> agencyIds = listResult.stream().map(process -> process.getAgencyId()).distinct().collect(Collectors.toList()); |
|||
List<AgencyInfoResultDTO> agencyInfoList = dimAgencyDao.selectAgencyInfo(agencyIds); |
|||
if (CollectionUtils.isEmpty(agencyInfoList)){ |
|||
throw new RenException(ExtractConstant.PARENT_AGENCY_ID_LIST); |
|||
} |
|||
TimeListResultDTO timeList = DateUtils.getTimeList(dateId); |
|||
result.forEach(r -> { |
|||
r.setDateId(dateId); |
|||
r.setWeekId(timeList.getWeekId()); |
|||
r.setMonthId(timeList.getMonthId()); |
|||
r.setQuarterId(timeList.getQuarterId()); |
|||
r.setYearId(timeList.getYearId()); |
|||
agencyInfoList.forEach(agency -> { |
|||
if (r.getAgencyId().equals(agency.getAgencyId())){ |
|||
r.setPid(agency.getPid()); |
|||
} |
|||
}); |
|||
}); |
|||
delAndInsertLog(customerId,dateId,result); |
|||
return true; |
|||
} |
|||
|
|||
/** |
|||
* @Description 议题附表删除插入 |
|||
* @param customerId |
|||
* @param dateId |
|||
* @param result |
|||
* @author zxc |
|||
* @date 2020/9/16 3:32 下午 |
|||
*/ |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delAndInsertLog(String customerId,String dateId,List<IssueLogDailyFormDTO> result){ |
|||
issueLogDailyDao.deleteOldLogRecord(customerId, dateId); |
|||
issueLogDailyDao.insertIssueLogList(result); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.epmet.service.partymember; |
|||
|
|||
import com.epmet.dto.stats.form.DimCustomerPartyMemberFormDTO; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/9/17 1:52 下午 |
|||
*/ |
|||
public interface PartyMemberService { |
|||
|
|||
/** |
|||
* @Description 查询党员信息 |
|||
* @param customerId |
|||
* @param dateId |
|||
* @author zxc |
|||
* @date 2020/9/17 1:58 下午 |
|||
*/ |
|||
List<DimCustomerPartyMemberFormDTO> selectPartyMemberInfo(String customerId, String dateId); |
|||
|
|||
} |
@ -0,0 +1,38 @@ |
|||
package com.epmet.service.partymember.impl; |
|||
|
|||
import com.epmet.commons.dynamic.datasource.annotation.DataSource; |
|||
import com.epmet.constant.DataSourceConstant; |
|||
import com.epmet.dao.partymember.PartyMemberDao; |
|||
import com.epmet.dto.stats.form.DimCustomerPartyMemberFormDTO; |
|||
import com.epmet.service.partymember.PartyMemberService; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/9/17 1:53 下午 |
|||
*/ |
|||
@Service |
|||
@Slf4j |
|||
@DataSource(DataSourceConstant.PARTY_MEMBER) |
|||
public class PartyMemberServiceImpl implements PartyMemberService { |
|||
|
|||
@Autowired |
|||
private PartyMemberDao partyMemberDao; |
|||
|
|||
/** |
|||
* @Description 查询党员信息 |
|||
* @param customerId |
|||
* @param dateId |
|||
* @author zxc |
|||
* @date 2020/9/17 1:58 下午 |
|||
*/ |
|||
@Override |
|||
public List<DimCustomerPartyMemberFormDTO> selectPartyMemberInfo(String customerId, String dateId){ |
|||
return partyMemberDao.selectPartyMemberInfo(customerId, dateId); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,104 @@ |
|||
/** |
|||
* 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.DimCustomerPartymemberDTO; |
|||
import com.epmet.dto.stats.form.CustomerIdAndDateIdFormDTO; |
|||
import com.epmet.entity.stats.DimCustomerPartymemberEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 党员维度表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-09-17 |
|||
*/ |
|||
public interface DimCustomerPartymemberService extends BaseService<DimCustomerPartymemberEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<DimCustomerPartymemberDTO> |
|||
* @author generator |
|||
* @date 2020-09-17 |
|||
*/ |
|||
PageData<DimCustomerPartymemberDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<DimCustomerPartymemberDTO> |
|||
* @author generator |
|||
* @date 2020-09-17 |
|||
*/ |
|||
List<DimCustomerPartymemberDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return DimCustomerPartymemberDTO |
|||
* @author generator |
|||
* @date 2020-09-17 |
|||
*/ |
|||
DimCustomerPartymemberDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-09-17 |
|||
*/ |
|||
void save(DimCustomerPartymemberDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-09-17 |
|||
*/ |
|||
void update(DimCustomerPartymemberDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-09-17 |
|||
*/ |
|||
void delete(String[] ids); |
|||
|
|||
/** |
|||
* @Description 统计党员 |
|||
* @param customerIdAndDateIdFormDTO |
|||
* @author zxc |
|||
* @date 2020/9/17 11:05 上午 |
|||
*/ |
|||
Boolean statsPartyMember(CustomerIdAndDateIdFormDTO customerIdAndDateIdFormDTO); |
|||
} |
@ -0,0 +1,174 @@ |
|||
/** |
|||
* 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.dto.form.TimeListResultDTO; |
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.commons.tools.utils.DateUtils; |
|||
import com.epmet.constant.StatsConstant; |
|||
import com.epmet.dao.stats.DimCustomerPartymemberDao; |
|||
import com.epmet.dto.stats.DimCustomerPartymemberDTO; |
|||
import com.epmet.dto.stats.form.CustomerIdAndDateIdFormDTO; |
|||
import com.epmet.dto.stats.form.DimCustomerPartyMemberFormDTO; |
|||
import com.epmet.dto.stats.result.GridBelongAgencyResultDTO; |
|||
import com.epmet.entity.stats.DimCustomerPartymemberEntity; |
|||
import com.epmet.service.partymember.PartyMemberService; |
|||
import com.epmet.service.stats.DimCustomerPartymemberService; |
|||
import com.epmet.service.stats.DimCustomerService; |
|||
import com.epmet.service.stats.DimGridService; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.BeanUtils; |
|||
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.Arrays; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
import java.util.stream.Collectors; |
|||
|
|||
/** |
|||
* 党员维度表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-09-17 |
|||
*/ |
|||
@Service |
|||
public class DimCustomerPartymemberServiceImpl extends BaseServiceImpl<DimCustomerPartymemberDao, DimCustomerPartymemberEntity> implements DimCustomerPartymemberService { |
|||
|
|||
@Autowired |
|||
private DimCustomerPartymemberDao partyMemberDao; |
|||
@Autowired |
|||
private PartyMemberService partyMemberService; |
|||
@Autowired |
|||
private DimGridService dimGridService; |
|||
@Autowired |
|||
private DimCustomerService dimCustomerService; |
|||
|
|||
@Override |
|||
public PageData<DimCustomerPartymemberDTO> page(Map<String, Object> params) { |
|||
IPage<DimCustomerPartymemberEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, DimCustomerPartymemberDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<DimCustomerPartymemberDTO> list(Map<String, Object> params) { |
|||
List<DimCustomerPartymemberEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, DimCustomerPartymemberDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<DimCustomerPartymemberEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<DimCustomerPartymemberEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public DimCustomerPartymemberDTO get(String id) { |
|||
DimCustomerPartymemberEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, DimCustomerPartymemberDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(DimCustomerPartymemberDTO dto) { |
|||
DimCustomerPartymemberEntity entity = ConvertUtils.sourceToTarget(dto, DimCustomerPartymemberEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(DimCustomerPartymemberDTO dto) { |
|||
DimCustomerPartymemberEntity entity = ConvertUtils.sourceToTarget(dto, DimCustomerPartymemberEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
/** |
|||
* @Description 统计党员 |
|||
* @param customerIdAndDateIdFormDTO |
|||
* @author zxc |
|||
* @date 2020/9/17 11:05 上午 |
|||
*/ |
|||
@Override |
|||
public Boolean statsPartyMember(CustomerIdAndDateIdFormDTO customerIdAndDateIdFormDTO) { |
|||
|
|||
List<String> allCustomerId = dimCustomerService.getAllCustomerId(); |
|||
if (CollectionUtils.isEmpty(allCustomerId)){ |
|||
throw new RenException(StatsConstant.CUSTOMER_INFO_NULL); |
|||
} |
|||
allCustomerId.forEach(customerId -> { |
|||
String dateId = customerIdAndDateIdFormDTO.getDateId(); |
|||
List<DimCustomerPartyMemberFormDTO> partyMemberList = partyMemberService.selectPartyMemberInfo(customerId, dateId); |
|||
if (CollectionUtils.isEmpty(partyMemberList)){ |
|||
throw new RenException(String.format(StatsConstant.PARTY_INFO_LIST,customerId)); |
|||
} |
|||
List<String> gridIds = partyMemberList.stream().map(party -> party.getGridId()).distinct().collect(Collectors.toList()); |
|||
List<GridBelongAgencyResultDTO> agencyInfos = dimGridService.selectGridBelongAgencyInfo(gridIds); |
|||
TimeListResultDTO timeList = DateUtils.getTimeList(dateId); |
|||
partyMemberList.forEach(party -> { |
|||
BeanUtils.copyProperties(timeList,party); |
|||
agencyInfos.forEach(agency -> { |
|||
if (party.getGridId().equals(agency.getGridId())){ |
|||
party.setAgencyId(agency.getAgencyId()); |
|||
party.setParentId(agency.getParentId()); |
|||
} |
|||
}); |
|||
}); |
|||
delAndInsertParty(partyMemberList,customerId,dateId); |
|||
}); |
|||
return true; |
|||
} |
|||
|
|||
/** |
|||
* @Description 删除旧纪录,插入新纪录 |
|||
* @param partyMemberList |
|||
* @param customerId |
|||
* @param dateId |
|||
* @author zxc |
|||
* @date 2020/9/17 2:46 下午 |
|||
*/ |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delAndInsertParty(List<DimCustomerPartyMemberFormDTO> partyMemberList,String customerId,String dateId){ |
|||
if (!CollectionUtils.isEmpty(partyMemberList)){ |
|||
partyMemberDao.deleteOldPartyRecord(customerId, dateId); |
|||
partyMemberDao.insertPartyMemberInfo(partyMemberList); |
|||
} |
|||
} |
|||
|
|||
} |
@ -0,0 +1,7 @@ |
|||
<?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.evaluationindex.extract.DimObjectActionDao"> |
|||
|
|||
|
|||
</mapper> |
@ -0,0 +1,8 @@ |
|||
<?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.evaluationindex.extract.DimObjectStatusDao"> |
|||
|
|||
|
|||
|
|||
</mapper> |
@ -0,0 +1,65 @@ |
|||
<?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.evaluationindex.extract.FactOriginIssueLogDailyDao"> |
|||
|
|||
<!-- 议题记录附表插入 --> |
|||
<insert id="insertIssueLogList"> |
|||
INSERT INTO fact_origin_issue_log_daily ( |
|||
ID, |
|||
CUSTOMER_ID, |
|||
GRID_ID, |
|||
PID, |
|||
AGENCY_ID, |
|||
DATE_ID, |
|||
WEEK_ID, |
|||
MONTH_ID, |
|||
QUARTER_ID, |
|||
YEAR_ID, |
|||
ISSUE_ID, |
|||
OPERATION_USER_ID, |
|||
ACTION_CODE, |
|||
IS_PARTY, |
|||
DEL_FLAG, |
|||
REVISION, |
|||
CREATED_BY, |
|||
CREATED_TIME, |
|||
UPDATED_BY, |
|||
UPDATED_TIME) |
|||
VALUES |
|||
<foreach collection="issueLogList" item="item" index="index" separator=","> |
|||
( |
|||
REPLACE ( UUID(), '-', '' ), |
|||
#{item.customerId}, |
|||
#{item.gridId}, |
|||
#{item.pid}, |
|||
#{item.agencyId}, |
|||
#{item.dateId}, |
|||
#{item.weekId}, |
|||
#{item.monthId}, |
|||
#{item.quarterId}, |
|||
#{item.yearId}, |
|||
#{item.issueId}, |
|||
#{item.operationUserId}, |
|||
#{item.actionCode}, |
|||
#{item.isParty}, |
|||
#{item.delFlag}, |
|||
#{item.revision}, |
|||
#{item.createdBy}, |
|||
NOW(), |
|||
#{item.updatedBy}, |
|||
NOW() |
|||
) |
|||
</foreach> |
|||
</insert> |
|||
|
|||
<!-- 删除旧的记录 --> |
|||
<delete id="deleteOldLogRecord"> |
|||
DELETE |
|||
FROM |
|||
fact_origin_issue_log_daily |
|||
WHERE |
|||
CUSTOMER_ID = #{customerId} |
|||
AND DATE_ID = #{dateId} |
|||
</delete> |
|||
</mapper> |
@ -0,0 +1,69 @@ |
|||
<?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.evaluationindex.extract.FactOriginIssueMainDailyDao"> |
|||
|
|||
<!-- 议题主表插入 --> |
|||
<insert id="insertIssueMainList"> |
|||
INSERT INTO fact_origin_issue_main_daily( |
|||
ID, |
|||
DATE_ID, |
|||
WEEK_ID, |
|||
MONTH_ID, |
|||
QUARTER_ID, |
|||
YEAR_ID, |
|||
CUSTOMER_ID, |
|||
IS_PARTY, |
|||
USER_ID, |
|||
CREATE_TOPIC_USER_ID, |
|||
TOPIC_ID, |
|||
GRID_ID, |
|||
PID, |
|||
AGENCY_ID, |
|||
ISSUE_STATUS, |
|||
TOPIC_USER_IS_PARTY, |
|||
DEL_FLAG, |
|||
REVISION, |
|||
CREATED_BY, |
|||
CREATED_TIME, |
|||
UPDATED_BY, |
|||
UPDATED_TIME) |
|||
VALUES |
|||
<foreach collection="issueMainList" item="item" index="index" separator=","> |
|||
( |
|||
#{item.id}, |
|||
#{item.dateId}, |
|||
#{item.weekId}, |
|||
#{item.monthId}, |
|||
#{item.quarterId}, |
|||
#{item.yearId}, |
|||
#{item.customerId}, |
|||
#{item.isParty}, |
|||
#{item.userId}, |
|||
#{item.createTopicUserId}, |
|||
#{item.topicId}, |
|||
#{item.gridId}, |
|||
#{item.pid}, |
|||
#{item.agencyId}, |
|||
#{item.issueStatus}, |
|||
#{item.topicUserIsParty}, |
|||
#{item.delFlag}, |
|||
#{item.revision}, |
|||
#{item.createdBy}, |
|||
NOW(), |
|||
#{item.updatedBy}, |
|||
NOW() |
|||
) |
|||
</foreach> |
|||
</insert> |
|||
|
|||
<!-- 删除旧的记录 --> |
|||
<delete id="deleteOldMainRecord"> |
|||
DELETE |
|||
FROM |
|||
fact_origin_issue_main_daily |
|||
WHERE |
|||
CUSTOMER_ID = #{customerId} |
|||
AND DATE_ID = #{dateId} |
|||
</delete> |
|||
</mapper> |
@ -0,0 +1,68 @@ |
|||
<?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.evaluationindex.extract.FactOriginTopicLogDailyDao"> |
|||
<delete id="deleteByDateIdAndCustomerId" parameterType="map"> |
|||
DELETE |
|||
FROM |
|||
fact_origin_topic_log_daily |
|||
WHERE |
|||
CUSTOMER_ID = #{customerId} |
|||
AND DATE_ID = #{dateId} |
|||
LIMIT #{deleteSize} |
|||
</delete> |
|||
|
|||
<insert id="insertBatchEntity" parameterType="map"> |
|||
insert into fact_origin_topic_log_daily |
|||
( |
|||
ID, |
|||
CUSTOMER_ID, |
|||
GRID_ID, |
|||
AGENCY_ID, |
|||
PID, |
|||
DATE_ID, |
|||
WEEK_ID, |
|||
MONTH_ID, |
|||
QUARTER_ID, |
|||
YEAR_ID, |
|||
TOPIC_ID, |
|||
GROUP_ID, |
|||
ACTION_CODE, |
|||
OPERATE_USER_ID, |
|||
OPERATE_USER_IS_PARTY, |
|||
ORIGINAL_BUSINESS_TIME, |
|||
DEL_FLAG, |
|||
REVISION, |
|||
CREATED_BY, |
|||
CREATED_TIME, |
|||
UPDATED_BY, |
|||
UPDATED_TIME |
|||
) values |
|||
<foreach collection="list" item="item" index="index" separator=","> |
|||
( |
|||
#{item.id}, |
|||
#{item.customerId}, |
|||
#{item.gridId}, |
|||
#{item.agencyId}, |
|||
#{item.pid}, |
|||
#{item.dateId}, |
|||
#{item.weekId}, |
|||
#{item.monthId}, |
|||
#{item.quarterId}, |
|||
#{item.yearId}, |
|||
#{item.topicId}, |
|||
#{item.groupId}, |
|||
#{item.actionCode}, |
|||
#{item.operateUserId}, |
|||
#{item.operateUserIsParty}, |
|||
#{item.originalBusinessTime}, |
|||
0, |
|||
0, |
|||
'APP_USER', |
|||
now(), |
|||
'APP_USER', |
|||
now() |
|||
) |
|||
</foreach> |
|||
</insert> |
|||
</mapper> |
@ -0,0 +1,65 @@ |
|||
<?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.evaluationindex.extract.FactOriginTopicMainDailyDao"> |
|||
|
|||
<delete id="deleteByDateIdAndCustomerId" parameterType="map"> |
|||
DELETE |
|||
FROM |
|||
fact_origin_topic_main_daily |
|||
WHERE |
|||
CUSTOMER_ID = #{customerId} |
|||
AND DATE_ID = #{dateId} |
|||
LIMIT #{deleteSize} |
|||
</delete> |
|||
|
|||
<insert id="insertBatchEntity" parameterType="map"> |
|||
insert into fact_origin_topic_main_daily |
|||
( |
|||
ID, |
|||
CUSTOMER_ID, |
|||
GRID_ID, |
|||
AGENCY_ID, |
|||
PID, |
|||
DATE_ID, |
|||
WEEK_ID, |
|||
MONTH_ID, |
|||
QUARTER_ID, |
|||
YEAR_ID, |
|||
GROUP_ID, |
|||
TOPIC_STATUS, |
|||
CREATE_TOPIC_USER_ID, |
|||
CREATE_TOPIC_USER_IS_PARTY, |
|||
DEL_FLAG, |
|||
REVISION, |
|||
CREATED_BY, |
|||
CREATED_TIME, |
|||
UPDATED_BY, |
|||
UPDATED_TIME |
|||
) values |
|||
<foreach collection="list" item="item" index="index" separator=","> |
|||
( |
|||
#{item.id}, |
|||
#{item.customerId}, |
|||
#{item.gridId}, |
|||
#{item.agencyId}, |
|||
#{item.pid}, |
|||
#{item.dateId}, |
|||
#{item.weekId}, |
|||
#{item.monthId}, |
|||
#{item.quarterId}, |
|||
#{item.yearId}, |
|||
#{item.groupId}, |
|||
#{item.topicStatus}, |
|||
#{item.createTopicUserId}, |
|||
#{item.createTopicUserIsParty}, |
|||
0, |
|||
0, |
|||
'APP_USER', |
|||
now(), |
|||
'APP_USER', |
|||
now() |
|||
) |
|||
</foreach> |
|||
</insert> |
|||
</mapper> |
@ -0,0 +1,22 @@ |
|||
<?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.partymember.PartyMemberDao"> |
|||
|
|||
<!-- 查询党员信息 --> |
|||
<select id="selectPartyMemberInfo" resultType="com.epmet.dto.stats.form.DimCustomerPartyMemberFormDTO"> |
|||
SELECT |
|||
CUSTOMER_ID, |
|||
GRID_ID, |
|||
USER_ID, |
|||
ID_CARD, |
|||
STR_TO_DATE( SUBSTRING( ID_CARD, 7, 8 ),'%Y%m%d') AS birthday |
|||
FROM |
|||
partymember_info |
|||
WHERE |
|||
DEL_FLAG = 0 |
|||
AND ( CONFIRM_RESULT = 'auto_confirm_success' OR CONFIRM_RESULT = 'approved' ) |
|||
AND CUSTOMER_ID = #{customerId} |
|||
AND DATE_FORMAT( UPDATED_TIME, '%Y%m%d' ) = #{dateId} |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,62 @@ |
|||
<?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.DimCustomerPartymemberDao"> |
|||
|
|||
<!-- 批量插入党员信息 --> |
|||
<insert id="insertPartyMemberInfo"> |
|||
INSERT INTO dim_customer_partymember ( |
|||
ID, |
|||
CUSTOMER_ID, |
|||
GRID_ID, |
|||
AGENCY_ID, |
|||
PARENT_ID, |
|||
DATE_ID, |
|||
WEEK_ID, |
|||
MONTH_ID, |
|||
QUARTER_ID, |
|||
YEAR_ID, |
|||
USER_ID, |
|||
ID_CARD, |
|||
BIRTHDAY, |
|||
DEL_FLAG, |
|||
REVISION, |
|||
CREATED_BY, |
|||
CREATED_TIME, |
|||
UPDATED_BY, |
|||
UPDATED_TIME |
|||
) |
|||
VALUES |
|||
<foreach collection="partyMemberInfos" item="item" separator=","> |
|||
( |
|||
REPLACE ( UUID(), '-', '' ), |
|||
#{item.customerId}, |
|||
#{item.gridId}, |
|||
#{item.agencyId}, |
|||
#{item.parentId}, |
|||
#{item.dateId}, |
|||
#{item.weekId}, |
|||
#{item.monthId}, |
|||
#{item.quarterId}, |
|||
#{item.yearId}, |
|||
#{item.userId}, |
|||
#{item.idCard}, |
|||
#{item.birthday}, |
|||
#{item.delFlag}, |
|||
#{item.revision}, |
|||
#{item.createdBy}, |
|||
NOW(), |
|||
#{item.updatedBy}, |
|||
NOW() |
|||
) |
|||
</foreach> |
|||
</insert> |
|||
|
|||
<!-- 删除旧党员记录 --> |
|||
<delete id="deleteOldPartyRecord"> |
|||
DELETE FROM dim_customer_partymember |
|||
WHERE |
|||
CUSTOMER_ID = #{customerId} |
|||
AND DATE_ID = #{dateId} |
|||
</delete> |
|||
</mapper> |
@ -0,0 +1,13 @@ |
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.commons.tools.utils.Result; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/9/17 3:05 下午 |
|||
*/ |
|||
public interface DimPartyMemberService { |
|||
|
|||
Result getPartyInfo(String date); |
|||
|
|||
} |
@ -0,0 +1,27 @@ |
|||
package com.epmet.service.impl; |
|||
|
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.stats.form.CustomerIdAndDateIdFormDTO; |
|||
import com.epmet.feign.DataStatisticalOpenFeignClient; |
|||
import com.epmet.service.DimPartyMemberService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/9/17 3:06 下午 |
|||
*/ |
|||
@Service |
|||
public class DimPartyMemberServiceImpl implements DimPartyMemberService { |
|||
|
|||
@Autowired |
|||
private DataStatisticalOpenFeignClient statsFeignClient; |
|||
|
|||
|
|||
@Override |
|||
public Result getPartyInfo(String dateId) { |
|||
CustomerIdAndDateIdFormDTO c = new CustomerIdAndDateIdFormDTO(); |
|||
c.setDateId(dateId); |
|||
return statsFeignClient.getPartyInfo(c); |
|||
} |
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.epmet.task; |
|||
|
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.service.DimPartyMemberService; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/9/17 3:04 下午 |
|||
*/ |
|||
@Slf4j |
|||
@Component("dimPartyMemberTask") |
|||
public class DimPartyMemberTask implements ITask{ |
|||
|
|||
@Autowired |
|||
private DimPartyMemberService dimPartyMemberService; |
|||
|
|||
@Override |
|||
public void run(String params) { |
|||
log.info("dimPartyMemberTask定时任务正在执行,参数为:{}", params); |
|||
Result result = dimPartyMemberService.getPartyInfo(params); |
|||
if (result.success()){ |
|||
log.info("dimPartyMemberTask定时任务执行成功"); |
|||
}else { |
|||
log.error("dimPartyMemberTask定时任务执行失败:" + result.getMsg()); |
|||
} |
|||
} |
|||
} |
Loading…
Reference in new issue