diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/DataSourceConstant.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/DataSourceConstant.java index ce0dccf1a5..6daa79d0bf 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/DataSourceConstant.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/DataSourceConstant.java @@ -13,5 +13,4 @@ public interface DataSourceConstant { String EPMET_USER = "epmetuser"; String EVALUATION_INDEX = "evaluationIndex"; String PARTY_MEMBER = "partyMember"; - } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactOriginProjectLogDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactOriginProjectLogDailyDTO.java new file mode 100644 index 0000000000..4602fd81a3 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactOriginProjectLogDailyDTO.java @@ -0,0 +1,131 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.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-16 + */ +@Data +public class FactOriginProjectLogDailyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * id + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 网格grid,部门department + */ + private String orgType; + + /** + * 网格ID + */ + private String orgId; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 日期ID + */ + private String dateId; + + /** + * 月份ID + */ + private String monthId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 年度ID + */ + private String yearId; + + /** + * 议题ID + */ + private String issueId; + + /** + * 操作用户ID + */ + private String operationUserId; + + /** + * 动作CODE + */ + private String actionCode; + + /** + * 是否主动发起人 1 是, 0 否 + */ + private Integer isActive; + + /** + * 删除状态,0:正常,1:删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactOriginProjectMainDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactOriginProjectMainDailyDTO.java new file mode 100644 index 0000000000..de50b76511 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactOriginProjectMainDailyDTO.java @@ -0,0 +1,156 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.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-16 + */ +@Data +public class FactOriginProjectMainDailyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 项目ID + */ + private String 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; + + /** + * 转议题用户ID + */ + private String issueCreatorId; + + /** + * 转为项目的议题ID + */ + private String issueId; + + /** + * 转为议题的话题ID + */ + private String topicId; + + /** + * 网格ID + */ + private String gridId; + + /** + * 上级ID + */ + private String pid; + + /** + * 组织ID(网格所属组织ID) + */ + private String agencyId; + + /** + * 状态 + */ + private String projectStatus; + + /** + * 创建话题用户的ID + */ + private String topicCreatorId; + + /** + * 是否是党员 1:是 + */ + private String isParty; + + /** + * 是否超期 1:是 + */ + private String isOverdue; + + /** + * 办结组织Ids(:隔开,有可能是社区id可能是网格id,无需区分级别,在统计时模糊查询) + */ + private String finishOrgIds; + + /** + * 删除状态,0:正常,1:删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/form/ProjectFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/form/ProjectFormDTO.java new file mode 100644 index 0000000000..1089f09988 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/form/ProjectFormDTO.java @@ -0,0 +1,18 @@ +package com.epmet.dto.extract.form; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/9/17 16:24 + */ +@Data +public class ProjectFormDTO implements Serializable { + private static final long serialVersionUID = 5875702013226180335L; + private String customerId; + private Date date; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/issue/IssueDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/issue/IssueDTO.java new file mode 100644 index 0000000000..89035c396b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/issue/IssueDTO.java @@ -0,0 +1,147 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto.issue; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 议题详情表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-05-12 + */ +@Data +public class IssueDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 议题ID + */ + private String id; + + /** + * 议题状态 表决中:voting 已转项目:shift_project 已关闭:closed + */ + private String issueStatus; + + /** + * 来源类型 eg:resi_topic + */ + private String sourceType; + + /** + * 来源ID eg:2223232(当SOURCE_TYPE为"resi_topic"时,这里指话题的ID) + */ + private String sourceId; + + /** + * 关闭理由 【未关闭时可以为空】关闭议题时必填的理由,转项目后而且已经结案,这个字段不回写 + */ + private String closeReason; + + /** + * 解决类型 【未关闭时可以为空】已解决resolved、未解决unresolved,对应在关闭议题时所选的checkbox,转项目后而且已经结案,这个字段不回写 + */ + private String resolveType; + + /** + * 议题名称 最多20字 + */ + private String issueTitle; + + /** + * 建议 最多1000字 + */ + private String suggestion; + + /** + * 客户ID + */ + private String customerId; + + /** + * 网格ID 居民端议题对应一个网格Id + */ + private String gridId; + + /** + * 所属机关 【数据权限-非必填】11:22:33(agencyId)数据权限控制 + */ + private String orgIdPath; + + /** + * 组织ID 【数据权限-非必填】agencyId + */ + private String orgId; + + /** + * 表决截止日期 + */ + private Date votingDeadline; + + /** + * 表决发起日期(转议题日期) + */ + private Date decidedTime; + + /** + * 转项目日期 (服务间调用日期一致性) + */ + private Date shiftedTime; + + /** + * 关闭日期 + */ + private Date closedTime; + + /** + * 删除标识 0未删除、1已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/party/PartyMemberDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/party/PartyMemberDTO.java new file mode 100644 index 0000000000..b05a2438b4 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/party/PartyMemberDTO.java @@ -0,0 +1,17 @@ +package com.epmet.dto.party; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/9/16 10:50 + */ +@Data +public class PartyMemberDTO implements Serializable { + private static final long serialVersionUID = 7326830619481816838L; + private String gridId; + private String userId; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/ProcessInfoDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/ProcessInfoDTO.java new file mode 100644 index 0000000000..070f1ceb0b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/ProcessInfoDTO.java @@ -0,0 +1,28 @@ +package com.epmet.dto.project; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/9/16 17:00 + */ +@Data +public class ProcessInfoDTO implements Serializable { + private static final long serialVersionUID = 4586424046147127143L; + private String agencyId; + private String projectId; + /** + * 处理:结案close,退回return,部门流转transfer,创建项目created + */ + private String operation; + /** + * 负负责人ID + */ + private String staffId; + private Date createdTime; + +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/ProjectInfoDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/ProjectInfoDTO.java new file mode 100644 index 0000000000..db144d8323 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/ProjectInfoDTO.java @@ -0,0 +1,43 @@ +package com.epmet.dto.project; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/9/15 15:51 + */ +@Data +public class ProjectInfoDTO implements Serializable { + private static final long serialVersionUID = -143765862167548221L; + /** + * 项目ID + */ + private String id; + /** + * 客户ID + */ + private String customerId; + /** + * 组织ID + */ + private String agencyId; + /** + * 议题ID + */ + private String issueId; + /** + * 状态 + */ + private String status; + /** + * 结案状态 + */ + private String closedStatus; + /** + * 创建时间 + */ + private String createdDate; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/topic/ResiTopicDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/topic/ResiTopicDTO.java new file mode 100644 index 0000000000..4422bc5a74 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/topic/ResiTopicDTO.java @@ -0,0 +1,126 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto.topic; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 话题信息表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-31 + */ +@Data +public class ResiTopicDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 小组Id,关联resi_group的ID + */ + private String groupId; + /** + * 网格ID + */ + private String gridId; + + /** + * 话题内容 + */ + private String topicContent; + + /** + * 话题状态(讨论中 - discussing、 已屏蔽 - hidden、 已关闭 - closed) + */ + private String status; + + /** + * 是否解决(已解决 resolved,未解决 unresolved) + */ + private String closedStatus; + + /** + * 省 + */ + private String province; + + /** + * 市 + */ + private String city; + + /** + * 区 + */ + private String area; + + /** + * 地址 + */ + private String address; + + /** + * 经度 + */ + private String longitude; + + /** + * 维度 + */ + private String dimension; + + /** + * 删除标记 0:未删除,1:已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人,发布人Id来源于user + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/pom.xml b/epmet-module/data-statistical/data-statistical-server/pom.xml index 1d27bc53b7..3091f09be3 100644 --- a/epmet-module/data-statistical/data-statistical-server/pom.xml +++ b/epmet-module/data-statistical/data-statistical-server/pom.xml @@ -87,6 +87,12 @@ org.apache.poi poi-ooxml 3.17 + + + poi-ooxml-schemas + org.apache.poi + + com.alibaba @@ -98,6 +104,12 @@ pinyin4j 2.6.0 + + org.apache.commons + commons-collections4 + 4.3 + compile + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactOriginController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactOriginController.java index a8c2eff94f..7bda36e19f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactOriginController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactOriginController.java @@ -3,7 +3,9 @@ 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.dto.extract.form.ProjectFormDTO; import com.epmet.service.evaluationindex.extract.IssueExtractService; +import com.epmet.service.evaluationindex.extract.ProjectExtractService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import com.epmet.service.evaluationindex.extract.FactOriginTopicMainDailyService; @@ -12,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.util.Date; /** @@ -28,6 +31,8 @@ public class FactOriginController { private IssueExtractService issueExtractService; @Autowired private FactOriginTopicMainDailyService factOriginTopicMainDailyService; + @Autowired + private ProjectExtractService projectExtractService; /** * @Description 议题抽取(main) @@ -71,6 +76,9 @@ public class FactOriginController { return new Result(); } - - + @PostMapping("project") + public Result projectData(@RequestBody ProjectFormDTO formDTO) { + projectExtractService.saveOriginProjectDaily(formDTO.getCustomerId(), formDTO.getDate()); + return new Result(); + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectLogDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectLogDailyDao.java new file mode 100644 index 0000000000..a4729ec8ec --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectLogDailyDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao.evaluationindex.extract; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.evaluationindex.extract.FactOriginProjectLogDailyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 项目明细_日统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-16 + */ +@Mapper +public interface FactOriginProjectLogDailyDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java new file mode 100644 index 0000000000..1fc4f9b9a9 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java @@ -0,0 +1,54 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao.evaluationindex.extract; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.extract.FactOriginProjectMainDailyDTO; +import com.epmet.entity.evaluationindex.extract.FactOriginProjectMainDailyEntity; +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-16 + */ +@Mapper +public interface FactOriginProjectMainDailyDao extends BaseDao { + + /** + * 获取客户下项目 + * @author zhaoqifeng + * @date 2020/9/17 14:32 + * @param customerId + * @return java.util.List + */ + List getProjectByCustomer(@Param("customerId") String customerId); + + /** + * 获取未结案的项目 + * @author zhaoqifeng + * @date 2020/9/17 14:32 + * @param customerId + * @return java.util.List + */ + List getPendingList(@Param("customerId") String customerId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/issue/StatsIssueDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/issue/StatsIssueDao.java index 2ad3653c87..ca7a25d340 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/issue/StatsIssueDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/issue/StatsIssueDao.java @@ -4,6 +4,7 @@ import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.extract.result.SatisfactionInfoResultDTO; import com.epmet.dto.extract.result.IssueProcessInfoResultDTO; import com.epmet.dto.issue.IssueAgencyDTO; +import com.epmet.dto.issue.IssueDTO; import com.epmet.dto.issue.IssueGridDTO; import com.epmet.dto.issue.IssueProjectDTO; import com.epmet.dto.extract.result.IssueInfoResultDTO; @@ -115,6 +116,15 @@ public interface StatsIssueDao extends BaseDao { */ List selectIssueProjectList(@Param("customerId") String customerId); + /** + * 根据ID获取议题信息 + * @author zhaoqifeng + * @date 2020/9/15 16:56 + * @param ids + * @return java.util.List + */ + List selectIssueInfoByIds(@Param("ids") List ids); + /** * @Description 查询议题信息 * @param customerId diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/partymember/PartyMemberDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/partymember/PartyMemberDao.java index 02c0b76a95..7927e8bee1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/partymember/PartyMemberDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/partymember/PartyMemberDao.java @@ -7,6 +7,7 @@ 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.party.PartyMemberDTO; import com.epmet.dto.stats.form.DimCustomerPartyMemberFormDTO; import com.epmet.entity.issue.IssueEntity; import org.apache.ibatis.annotations.Mapper; @@ -26,4 +27,13 @@ public interface PartyMemberDao{ */ List selectPartyMemberInfo(@Param("customerId") String customerId,@Param("dateId") String dateId); + /** + * 获取客户网格下注册党员 + * @author zhaoqifeng + * @date 2020/9/16 10:56 + * @param customerId + * @return java.util.List + */ + List selectPartyMemberByCustomer(@Param("customerId") String customerId); + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectDao.java index a50874c99e..d676531771 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectDao.java @@ -18,8 +18,10 @@ package com.epmet.dao.project; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.ProjectDTO; import com.epmet.dto.project.ProjectAgencyDTO; import com.epmet.dto.project.ProjectGridDTO; +import com.epmet.dto.project.ProjectInfoDTO; import com.epmet.entity.project.ProjectEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -82,4 +84,14 @@ public interface ProjectDao extends BaseDao { * @return java.util.List */ List selectGridClosedProjectInc(@Param("customerId") String customerId, @Param("date") String date); + + /** + * 获取项目信息 + * @author zhaoqifeng + * @date 2020/9/15 16:13 + * @param customerId + * @param date + * @return java.util.List + */ + List selectProjectInfo(@Param("customerId") String customerId, @Param("date") String date); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectProcessDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectProcessDao.java index ad0c1ca057..8f0027e473 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectProcessDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectProcessDao.java @@ -18,6 +18,7 @@ package com.epmet.dao.project; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.project.ProcessInfoDTO; import com.epmet.entity.project.ProjectEntity; import com.epmet.entity.project.ProjectProcessEntity; import org.apache.ibatis.annotations.Mapper; @@ -41,4 +42,43 @@ public interface ProjectProcessDao extends BaseDao { **/ List selectProcessList(ProjectEntity projectEntity); + /** + * 根据客户查询项目处理进展 + * @author zhaoqifeng + * @date 2020/9/16 15:18 + * @param customerId + * @param date + * @return java.util.List + */ + List selectProcessListByCustomer(@Param("customerId") String customerId, @Param("date") String date); + + /** + * 查询各个节点的受理人 + * @author zhaoqifeng + * @date 2020/9/17 10:54 + * @param customerId + * @param date + * @return java.util.List + */ + List selectProcessStaffByCustomer(@Param("customerId") String customerId, @Param("date") String date); + + /** + * 获取满意度评价记录 + * @author zhaoqifeng + * @date 2020/9/17 14:44 + * @param customerId + * @param date + * @return java.util.List + */ + List selectSatisfactionRecordByCustomer(@Param("customerId") String customerId, @Param("date") String date); + + /** + * 获取已结案的项目列表 + * @author zhaoqifeng + * @date 2020/9/17 14:44 + * @param customerId + * @param date + * @return java.util.List + */ + List selectClosedProjectList(@Param("customerId") String customerId, @Param("date") String date); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/topic/TopicDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/topic/TopicDao.java index b317ee0d7c..b078ed45aa 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/topic/TopicDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/topic/TopicDao.java @@ -7,6 +7,7 @@ package com.epmet.dao.topic; * @since v1.0.0 2020-05-11 */ +import com.epmet.dto.topic.ResiTopicDTO; import com.epmet.dto.extract.result.TopicInfoResultDTO; import com.epmet.dto.topic.TopicOriginInfoDTO; import com.epmet.dto.topic.result.ResiGroupTopicResultDTO; @@ -59,6 +60,15 @@ public interface TopicDao { **/ List selectTopicOperationRecordBetweenTimeRange(@Param("startDate")Date startDate, @Param("endDate")Date endDate); + /** + * 根据ids获取话题信息 + * @author zhaoqifeng + * @date 2020/9/15 17:33 + * @param ids + * @return java.util.List + */ + List selectTopicByIds(@Param("ids") List ids); + /** * @Description 查询话题创建者信息 * @param topicIds diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactOriginProjectLogDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactOriginProjectLogDailyEntity.java new file mode 100644 index 0000000000..a6da04ce0a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactOriginProjectLogDailyEntity.java @@ -0,0 +1,99 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.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-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_origin_project_log_daily") +public class FactOriginProjectLogDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + /** + * 网格grid,部门department + */ + private String orgType; + /** + * 网格ID + */ + private String orgId; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 日期ID + */ + private String dateId; + + /** + * 月份ID + */ + private String monthId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 年度ID + */ + private String yearId; + + /** + * 议题ID + */ + private String projectId; + + /** + * 操作用户ID + */ + private String operationUserId; + + /** + * 动作CODE + */ + private String actionCode; + + /** + * 是否主动发起人 1 是, 0 否 + */ + private Integer isActive; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactOriginProjectMainDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactOriginProjectMainDailyEntity.java new file mode 100644 index 0000000000..bc7fe20ccc --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactOriginProjectMainDailyEntity.java @@ -0,0 +1,126 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.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-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_origin_project_main_daily") +public class FactOriginProjectMainDailyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 项目的发布日期yyyyMMdd + */ + private String dateId; + + /** + * 周ID + */ + private String weekId; + + /** + * 月份ID + */ + private String monthId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 年度ID + */ + private String yearId; + + /** + * 客户ID + */ + private String customerId; + + /** + * 转议题用户ID + */ + private String issueCreatorId; + + /** + * 转为项目的议题ID + */ + private String issueId; + + /** + * 转为议题的话题ID + */ + private String topicId; + + /** + * 网格ID + */ + private String gridId; + + /** + * 上级ID + */ + private String pid; + + /** + * 组织ID(网格所属组织ID) + */ + private String agencyId; + + /** + * 状态 + */ + private String projectStatus; + + /** + * 创建话题用户的ID + */ + private String topicCreatorId; + + /** + * 是否是党员 1:是 + */ + private String isParty; + + /** + * 是否超期 1:是 + */ + private String isOverdue; + + /** + * 办结组织Ids(:隔开,有可能是社区id可能是网格id,无需区分级别,在统计时模糊查询) + */ + private String finishOrgIds; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/IssueService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/IssueService.java index 1ace044dc5..c7ea8e56bb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/IssueService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/IssueService.java @@ -3,6 +3,7 @@ package com.epmet.service.Issue; import com.epmet.dto.extract.result.SatisfactionInfoResultDTO; import com.epmet.dto.extract.result.IssueProcessInfoResultDTO; import com.epmet.dto.issue.IssueAgencyDTO; +import com.epmet.dto.issue.IssueDTO; import com.epmet.dto.issue.IssueGridDTO; import com.epmet.dto.issue.IssueProjectDTO; import com.epmet.dto.extract.result.IssueInfoResultDTO; @@ -113,6 +114,16 @@ public interface IssueService { */ List getIssueProjectList(String customerId); + + /** + * 根据ID获取议题信息 + * @author zhaoqifeng + * @date 2020/9/15 16:56 + * @param ids + * @return java.util.List + */ + List getIssueInfoByIds(List ids); + /** * @Description 查询议题信息 * @param customerId diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/impl/IssueServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/impl/IssueServiceImpl.java index 9518266148..981082f743 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/impl/IssueServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/impl/IssueServiceImpl.java @@ -6,6 +6,7 @@ import com.epmet.dao.issue.StatsIssueDao; import com.epmet.dto.extract.result.SatisfactionInfoResultDTO; import com.epmet.dto.extract.result.IssueProcessInfoResultDTO; import com.epmet.dto.issue.IssueAgencyDTO; +import com.epmet.dto.issue.IssueDTO; import com.epmet.dto.issue.IssueGridDTO; import com.epmet.dto.issue.IssueProjectDTO; import com.epmet.dto.extract.result.IssueInfoResultDTO; @@ -84,6 +85,11 @@ public class IssueServiceImpl implements IssueService { return statsIssueDao.selectIssueProjectList(customerId); } + @Override + public List getIssueInfoByIds(List ids) { + return statsIssueDao.selectIssueInfoByIds(ids); + } + /** * @Description 查询议题信息 * @param customerId diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/FactOriginProjectLogDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/FactOriginProjectLogDailyService.java new file mode 100644 index 0000000000..8099ef503b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/FactOriginProjectLogDailyService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.extract; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.extract.FactOriginProjectLogDailyDTO; +import com.epmet.entity.evaluationindex.extract.FactOriginProjectLogDailyEntity; + +import java.util.List; +import java.util.Map; + +/** + * 项目明细_日统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-16 + */ +public interface FactOriginProjectLogDailyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-09-16 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-09-16 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return FactOriginProjectLogDailyDTO + * @author generator + * @date 2020-09-16 + */ + FactOriginProjectLogDailyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-09-16 + */ + void save(FactOriginProjectLogDailyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-09-16 + */ + void update(FactOriginProjectLogDailyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-09-16 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/FactOriginProjectMainDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/FactOriginProjectMainDailyService.java new file mode 100644 index 0000000000..749fdc4897 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/FactOriginProjectMainDailyService.java @@ -0,0 +1,113 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.extract; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.extract.FactOriginProjectMainDailyDTO; +import com.epmet.entity.evaluationindex.extract.FactOriginProjectMainDailyEntity; + +import java.util.List; +import java.util.Map; + +/** + * 项目主表_日统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-16 + */ +public interface FactOriginProjectMainDailyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-09-16 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-09-16 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return FactOriginProjectMainDailyDTO + * @author generator + * @date 2020-09-16 + */ + FactOriginProjectMainDailyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-09-16 + */ + void save(FactOriginProjectMainDailyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-09-16 + */ + void update(FactOriginProjectMainDailyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-09-16 + */ + void delete(String[] ids); + + /** + * 获取客户下项目 + * @author zhaoqifeng + * @date 2020/9/17 14:29 + * @param customerId + * @return java.util.List + */ + List getProjectByCustomer(String customerId); + + /** + * 获取未结案的项目 + * @author zhaoqifeng + * @date 2020/9/17 14:30 + * @param customerId + * @return java.util.List + */ + List getPendingList(String customerId); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/ProjectExtractService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/ProjectExtractService.java new file mode 100644 index 0000000000..88efc32884 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/ProjectExtractService.java @@ -0,0 +1,22 @@ +package com.epmet.service.evaluationindex.extract; + +import java.util.Date; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/9/15 14:00 + */ +public interface ProjectExtractService { + + + /** + * 项目主表、明细日统计 + * @author zhaoqifeng + * @date 2020/9/15 14:38 + * @param customerId + * @param date + * @return + */ + void saveOriginProjectDaily(String customerId, Date date); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactOriginProjectLogDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactOriginProjectLogDailyServiceImpl.java new file mode 100644 index 0000000000..e0d99443f7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactOriginProjectLogDailyServiceImpl.java @@ -0,0 +1,100 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.extract.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.evaluationindex.extract.FactOriginProjectLogDailyDao; +import com.epmet.dto.extract.FactOriginProjectLogDailyDTO; +import com.epmet.entity.evaluationindex.extract.FactOriginProjectLogDailyEntity; +import com.epmet.service.evaluationindex.extract.FactOriginProjectLogDailyService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 项目明细_日统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-16 + */ +@Service +public class FactOriginProjectLogDailyServiceImpl extends BaseServiceImpl implements FactOriginProjectLogDailyService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, FactOriginProjectLogDailyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, FactOriginProjectLogDailyDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public FactOriginProjectLogDailyDTO get(String id) { + FactOriginProjectLogDailyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, FactOriginProjectLogDailyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(FactOriginProjectLogDailyDTO dto) { + FactOriginProjectLogDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactOriginProjectLogDailyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(FactOriginProjectLogDailyDTO dto) { + FactOriginProjectLogDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactOriginProjectLogDailyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactOriginProjectMainDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactOriginProjectMainDailyServiceImpl.java new file mode 100644 index 0000000000..006476a093 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactOriginProjectMainDailyServiceImpl.java @@ -0,0 +1,109 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.extract.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.evaluationindex.extract.FactOriginProjectMainDailyDao; +import com.epmet.dto.extract.FactOriginProjectMainDailyDTO; +import com.epmet.entity.evaluationindex.extract.FactOriginProjectMainDailyEntity; +import com.epmet.service.evaluationindex.extract.FactOriginProjectMainDailyService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 项目主表_日统计 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-16 + */ +@Service +public class FactOriginProjectMainDailyServiceImpl extends BaseServiceImpl implements FactOriginProjectMainDailyService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, FactOriginProjectMainDailyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, FactOriginProjectMainDailyDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public FactOriginProjectMainDailyDTO get(String id) { + FactOriginProjectMainDailyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, FactOriginProjectMainDailyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(FactOriginProjectMainDailyDTO dto) { + FactOriginProjectMainDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactOriginProjectMainDailyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(FactOriginProjectMainDailyDTO dto) { + FactOriginProjectMainDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactOriginProjectMainDailyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public List getProjectByCustomer(String customerId) { + return baseDao.getProjectByCustomer(customerId); + } + + @Override + public List getPendingList(String customerId) { + return baseDao.getPendingList(customerId); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/ProjectExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/ProjectExtractServiceImpl.java new file mode 100644 index 0000000000..f6a262571a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/ProjectExtractServiceImpl.java @@ -0,0 +1,238 @@ +package com.epmet.service.evaluationindex.extract.impl; + +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.ProjectDTO; +import com.epmet.dto.extract.FactOriginProjectMainDailyDTO; +import com.epmet.dto.form.WorkDayFormDTO; +import com.epmet.dto.issue.IssueDTO; +import com.epmet.dto.party.PartyMemberDTO; +import com.epmet.dto.project.ProcessInfoDTO; +import com.epmet.dto.result.WorkDayResultDTO; +import com.epmet.dto.topic.ResiTopicDTO; +import com.epmet.entity.evaluationindex.extract.FactOriginProjectLogDailyEntity; +import com.epmet.entity.evaluationindex.extract.FactOriginProjectMainDailyEntity; +import com.epmet.entity.project.ProjectProcessEntity; +import com.epmet.feign.EpmetCommonServiceOpenFeignClient; +import com.epmet.service.Issue.IssueService; +import com.epmet.service.evaluationindex.extract.FactOriginProjectLogDailyService; +import com.epmet.service.evaluationindex.extract.FactOriginProjectMainDailyService; +import com.epmet.service.evaluationindex.extract.ProjectExtractService; +import com.epmet.service.partymember.PartyMemberService; +import com.epmet.service.project.ProjectProcessService; +import com.epmet.service.project.ProjectService; +import com.epmet.service.topic.TopicService; +import com.epmet.util.DimIdGenerator; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.stream.Collectors; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/9/15 14:00 + */ +@Service +public class ProjectExtractServiceImpl implements ProjectExtractService { + + @Autowired + private ProjectService projectService; + @Autowired + private IssueService issueService; + @Autowired + private TopicService topicService; + @Autowired + private PartyMemberService partyMemberService; + @Autowired + private FactOriginProjectLogDailyService factOriginProjectLogDailyService; + @Autowired + private FactOriginProjectMainDailyService factOriginProjectMainDailyService; + @Autowired + private ProjectProcessService projectProcessService; + @Autowired + private EpmetCommonServiceOpenFeignClient epmetCommonServiceOpenFeignClient; + + + @Override + public void saveOriginProjectDaily(String customerId, Date date) { + String dateString = null; + if (null != date) { + dateString = DateUtils.format(date); + } + //获取已关闭项目列表 + List closedList = projectProcessService.getClosedProjectList(customerId, dateString); + List pendingList = factOriginProjectMainDailyService.getPendingList(customerId); + List closeProjects = + pendingList.stream().flatMap(pending -> closedList.stream().filter(closed -> pending.getId().equals(closed.getProjectId())).map(process -> { + FactOriginProjectMainDailyEntity entity = new FactOriginProjectMainDailyEntity(); + entity.setId(process.getId()); + entity.setProjectStatus("close"); + entity.setCreatedTime(DateUtils.stringToDate(pending.getDateId(), DateUtils.DATE_PATTERN_YYYYMMDD)); + entity.setUpdatedTime(process.getUpdatedTime()); + return entity; + })).collect(Collectors.toList()); + //更新状态 + if (null != closeProjects && !closeProjects.isEmpty()) { + factOriginProjectMainDailyService.updateBatchById(closeProjects); + } + //获取项目信息 + List projectList = projectService.getProjectInfo(customerId, dateString); + if (null != projectList && !projectList.isEmpty()) { + //提取议题ID + List issueIds = projectList.stream().map(ProjectDTO::getOriginId).collect(Collectors.toList()); + //获取议题信息 + List issueList = issueService.getIssueInfoByIds(issueIds); + //提取话题ID + List topicIds = issueList.stream().map(IssueDTO::getSourceId).collect(Collectors.toList()); + //获取话题信息 + List topicList = topicService.getTopicByIds(topicIds); + //获取网格认证党员 + List partyMemberList = partyMemberService.getPartyMemberByCustomer(customerId); + //生成DTO + List list = projectList.stream().map(project -> { + //获取日期相关维度 + DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(project.getCreatedTime()); + FactOriginProjectMainDailyEntity entity = new FactOriginProjectMainDailyEntity(); + entity.setId(project.getId()); + entity.setAgencyId(project.getAgencyId()); + entity.setCustomerId(customerId); + entity.setYearId(dimId.getYearId()); + entity.setQuarterId(dimId.getQuarterId()); + entity.setMonthId(dimId.getMonthId()); + entity.setWeekId(dimId.getWeekId()); + entity.setDateId(dimId.getDateId()); + entity.setIssueId(project.getOriginId()); + entity.setProjectStatus(project.getStatus()); + entity.setCreatedTime(project.getCreatedTime()); + entity.setUpdatedTime(project.getUpdatedTime()); + String[] pIds = project.getOrgIdPath().split(":"); + if (pIds.length > 1) { + entity.setPid(pIds[pIds.length - 2]); + } else { + entity.setPid(pIds[0]); + } + entity.setIsParty(NumConstant.ZERO_STR); + entity.setIsOverdue(NumConstant.ZERO_STR); + return entity; + }).collect(Collectors.toList()); + list.forEach(entity -> issueList.stream().filter(issueDTO -> issueDTO.getId().equals(entity.getIssueId())).forEach(issue -> { + entity.setIssueCreatorId(issue.getCreatedBy()); + entity.setTopicId(issue.getSourceId()); + })); + list.forEach(entity -> topicList.stream().filter(topicDTO -> topicDTO.getId().equals(entity.getTopicId())).forEach(topic -> { + entity.setTopicCreatorId(topic.getCreatedBy()); + entity.setGridId(topic.getGridId()); + })); + list.forEach(entity -> partyMemberList.stream().filter(partyMemberDTO -> partyMemberDTO.getGridId().equals(entity.getGridId()) && partyMemberDTO.getUserId().equals(entity.getTopicCreatorId())).forEach(partyMember -> { + entity.setIsParty(NumConstant.ONE_STR); + })); + //插入数据 + factOriginProjectMainDailyService.insertBatch(list); + } + + //节点发起人 + List processList = projectProcessService.getProcessListByCustomer(customerId, dateString); + if (null != processList && !processList.isEmpty()) { + List logList = processList.stream().map(process -> { + //获取日期相关维度 + DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(process.getCreatedTime()); + FactOriginProjectLogDailyEntity entity = new FactOriginProjectLogDailyEntity(); + entity.setCustomerId(customerId); + entity.setAgencyId(process.getAgencyId()); + entity.setYearId(dimId.getYearId()); + entity.setQuarterId(dimId.getQuarterId()); + entity.setMonthId(dimId.getMonthId()); + entity.setDateId(dimId.getDateId()); + entity.setProjectId(process.getProjectId()); + entity.setOperationUserId(process.getStaffId()); + entity.setActionCode(process.getOperation()); + entity.setIsActive(NumConstant.ONE); + entity.setOrgType("grid"); + return entity; + }).collect(Collectors.toList()); + + //节点接收人 + List processStaffList = projectProcessService.getProcessStaffByCustomer(customerId, dateString); + logList.addAll(processStaffList.stream().map(process -> { + //获取日期相关维度 + DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(process.getCreatedTime()); + FactOriginProjectLogDailyEntity entity = new FactOriginProjectLogDailyEntity(); + entity.setCustomerId(customerId); + entity.setAgencyId(process.getAgencyId()); + entity.setYearId(dimId.getYearId()); + entity.setQuarterId(dimId.getQuarterId()); + entity.setMonthId(dimId.getMonthId()); + entity.setDateId(dimId.getDateId()); + entity.setProjectId(process.getProjectId()); + entity.setOperationUserId(process.getStaffId()); + entity.setActionCode(process.getOperation()); + entity.setIsActive(NumConstant.ZERO); + entity.setOrgType("grid"); + return entity; + }).collect(Collectors.toList())); + + //项目评论人 + List satisfactionRecordList = projectProcessService.getSatisfactionRecord(customerId, dateString); + logList.addAll(satisfactionRecordList.stream().map(process -> { + //获取日期相关维度 + DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(process.getCreatedTime()); + FactOriginProjectLogDailyEntity entity = new FactOriginProjectLogDailyEntity(); + entity.setCustomerId(customerId); + entity.setAgencyId(process.getAgencyId()); + entity.setYearId(dimId.getYearId()); + entity.setQuarterId(dimId.getQuarterId()); + entity.setMonthId(dimId.getMonthId()); + entity.setDateId(dimId.getDateId()); + entity.setProjectId(process.getProjectId()); + entity.setOperationUserId(process.getStaffId()); + entity.setActionCode(process.getOperation()); + entity.setIsActive(NumConstant.ONE); + entity.setOrgType("grid"); + return entity; + }).collect(Collectors.toList())); + + List projectMainList = factOriginProjectMainDailyService.getProjectByCustomer(customerId); + logList.forEach(log -> projectMainList.stream().filter(project -> log.getProjectId().equals(project.getId())).forEach(main -> { + log.setOrgId(main.getGridId()); + })); + + factOriginProjectLogDailyService.insertBatch(logList); + } + } + + + /** + * 工作日计算 + * @author zhaoqifeng + * @date 2020/9/17 17:02 + * @param id + * @param startDate + * @param endDate + * @return java.lang.Integer + */ + private Integer getDetentionDays(String id, Date startDate, Date endDate) { + int result; + SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd"); + + List list = new ArrayList<>(); + WorkDayFormDTO workDayFormDTO = new WorkDayFormDTO(); + workDayFormDTO.setId(id); + workDayFormDTO.setStartDate(format.format(startDate)); + workDayFormDTO.setEndDate(format.format(endDate)); + list.add(workDayFormDTO); + Result> detentionDays = epmetCommonServiceOpenFeignClient.detentionDays(list); + String days = detentionDays.getData().get(NumConstant.ZERO).getDetentionDays(); + if (("<1").equals(days)) { + result = 1; + } else { + result = Integer.parseInt(days); + } + return result; + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/partymember/PartyMemberService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/partymember/PartyMemberService.java index 9f8cdde947..aefae23621 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/partymember/PartyMemberService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/partymember/PartyMemberService.java @@ -1,5 +1,6 @@ package com.epmet.service.partymember; +import com.epmet.dto.party.PartyMemberDTO; import com.epmet.dto.stats.form.DimCustomerPartyMemberFormDTO; import java.util.List; @@ -19,4 +20,13 @@ public interface PartyMemberService { */ List selectPartyMemberInfo(String customerId, String dateId); + /** + * 获取客户网格下注册党员 + * @author zhaoqifeng + * @date 2020/9/16 10:51 + * @param customerId + * @return java.util.List + */ + List getPartyMemberByCustomer(String customerId); + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/partymember/impl/PartyMemberServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/partymember/impl/PartyMemberServiceImpl.java index 6e346a01d7..90f3cff949 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/partymember/impl/PartyMemberServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/partymember/impl/PartyMemberServiceImpl.java @@ -3,6 +3,7 @@ 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.party.PartyMemberDTO; import com.epmet.dto.stats.form.DimCustomerPartyMemberFormDTO; import com.epmet.service.partymember.PartyMemberService; import lombok.extern.slf4j.Slf4j; @@ -35,4 +36,9 @@ public class PartyMemberServiceImpl implements PartyMemberService { return partyMemberDao.selectPartyMemberInfo(customerId, dateId); } + @Override + public List getPartyMemberByCustomer(String customerId) { + return partyMemberDao.selectPartyMemberByCustomer(customerId); + } + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectProcessService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectProcessService.java index 729e724267..c60ff6c8cc 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectProcessService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectProcessService.java @@ -18,6 +18,7 @@ package com.epmet.service.project; import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.project.ProcessInfoDTO; import com.epmet.entity.project.ProjectEntity; import com.epmet.entity.project.ProjectProcessEntity; @@ -37,4 +38,44 @@ public interface ProjectProcessService extends BaseService * @Description 查询客户项目处理进展表中是创建项目和结案两种进展的有效数据(创建日期截取yyyy-mm-dd格式字段值) **/ List getProcessList(ProjectEntity projectEntity); + + /** + * 根据客户查询项目处理进展 + * @author zhaoqifeng + * @date 2020/9/16 15:42 + * @param customerId + * @param date + * @return java.util.List + */ + List getProcessListByCustomer(String customerId, String date); + + /** + * 查询各个节点的受理人 + * @author zhaoqifeng + * @date 2020/9/17 10:53 + * @param customerId + * @param date + * @return java.util.List + */ + List getProcessStaffByCustomer(String customerId, String date); + + /** + * 获取满意度评价记录 + * @author zhaoqifeng + * @date 2020/9/17 13:59 + * @param customerId + * @param date + * @return java.util.List + */ + List getSatisfactionRecord(String customerId, String date); + + /** + * 获取已结案的项目列表 + * @author zhaoqifeng + * @date 2020/9/17 14:43 + * @param customerId + * @param date + * @return java.util.List + */ + List getClosedProjectList(String customerId, String date); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java index 45929aebb7..de95867ded 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java @@ -18,8 +18,10 @@ package com.epmet.service.project; import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.ProjectDTO; import com.epmet.dto.project.ProjectAgencyDTO; import com.epmet.dto.project.ProjectGridDTO; +import com.epmet.dto.project.ProjectInfoDTO; import com.epmet.entity.project.ProjectEntity; import java.util.List; @@ -78,4 +80,14 @@ public interface ProjectService extends BaseService { * @return java.util.List */ List getGridClosedProjectInc(String customerId, String date); + + /** + * 获取项目信息 + * @author zhaoqifeng + * @date 2020/9/15 16:09 + * @param customerId + * @param date + * @return java.util.List + */ + List getProjectInfo(String customerId, String date); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java index de1a52e1c2..8bfa1c998c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java @@ -21,6 +21,7 @@ import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.constant.DataSourceConstant; import com.epmet.dao.project.ProjectProcessDao; +import com.epmet.dto.project.ProcessInfoDTO; import com.epmet.entity.project.ProjectEntity; import com.epmet.entity.project.ProjectProcessEntity; import com.epmet.service.project.ProjectProcessService; @@ -47,4 +48,24 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl getProcessList(ProjectEntity projectEntity) { return baseDao.selectProcessList(projectEntity); } + + @Override + public List getProcessListByCustomer(String customerId, String date) { + return baseDao.selectProcessListByCustomer(customerId, date); + } + + @Override + public List getProcessStaffByCustomer(String customerId, String date) { + return baseDao.selectProcessStaffByCustomer(customerId, date); + } + + @Override + public List getSatisfactionRecord(String customerId, String date) { + return baseDao.selectSatisfactionRecordByCustomer(customerId, date); + } + + @Override + public List getClosedProjectList(String customerId, String date) { + return baseDao.selectClosedProjectList(customerId, date); + } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java index 0a5bac27b6..d1f5e88b1d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java @@ -21,8 +21,10 @@ import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.constant.DataSourceConstant; import com.epmet.dao.project.ProjectDao; +import com.epmet.dto.ProjectDTO; import com.epmet.dto.project.ProjectAgencyDTO; import com.epmet.dto.project.ProjectGridDTO; +import com.epmet.dto.project.ProjectInfoDTO; import com.epmet.entity.project.ProjectEntity; import com.epmet.service.project.ProjectService; import org.springframework.beans.factory.annotation.Autowired; @@ -70,4 +72,9 @@ public class ProjectServiceImpl extends BaseServiceImpl getProjectInfo(String customerId, String date) { + return baseDao.selectProjectInfo(customerId, date); + } + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerPartymemberServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerPartymemberServiceImpl.java index 69f09d0ce0..e04247c46d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerPartymemberServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerPartymemberServiceImpl.java @@ -37,6 +37,7 @@ 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 lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -56,6 +57,7 @@ import java.util.stream.Collectors; * @since v1.0.0 2020-09-17 */ @Service +@Slf4j public class DimCustomerPartymemberServiceImpl extends BaseServiceImpl implements DimCustomerPartymemberService { @Autowired @@ -136,7 +138,8 @@ public class DimCustomerPartymemberServiceImpl extends BaseServiceImpl partyMemberList = partyMemberService.selectPartyMemberInfo(customerId, dateId); if (CollectionUtils.isEmpty(partyMemberList)){ - throw new RenException(String.format(StatsConstant.PARTY_INFO_LIST,customerId)); + log.error(String.format(StatsConstant.PARTY_INFO_LIST,customerId)); + return; } List gridIds = partyMemberList.stream().map(party -> party.getGridId()).distinct().collect(Collectors.toList()); List agencyInfos = dimGridService.selectGridBelongAgencyInfo(gridIds); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/topic/TopicService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/topic/TopicService.java index ee6181accb..db3c99f980 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/topic/TopicService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/topic/TopicService.java @@ -4,6 +4,7 @@ import com.epmet.dto.AgencySubTreeDto; import com.epmet.dto.extract.result.TopicInfoResultDTO; import com.epmet.dto.stats.DimTopicStatusDTO; import com.epmet.dto.stats.topic.result.TopicStatisticalData; +import com.epmet.dto.topic.ResiTopicDTO; import com.epmet.dto.topic.TopicOriginInfoDTO; import com.epmet.util.DimIdGenerator; @@ -27,6 +28,14 @@ public interface TopicService { **/ TopicStatisticalData compute(List agencies, Date targetDate, DimIdGenerator.DimIdBean timeDimension, String customerId, List statusDimension); + /** + * 根据ids获取话题信息 + * @author zhaoqifeng + * @date 2020/9/15 17:52 + * @param ids + * @return java.util.List + */ + List getTopicByIds(List ids); /** * @return java.util.List * @param customerId diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java index 6c80ecd8cf..706cc7bf33 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java @@ -11,6 +11,7 @@ import com.epmet.dto.stats.topic.*; import com.epmet.dto.stats.topic.result.GridTopicData; import com.epmet.dto.stats.topic.result.GroupTopicData; import com.epmet.dto.stats.topic.result.TopicStatisticalData; +import com.epmet.dto.topic.ResiTopicDTO; import com.epmet.dto.topic.TopicOriginInfoDTO; import com.epmet.dto.topic.result.ResiGroupTopicResultDTO; import com.epmet.dto.topic.result.ResiTopicOperationResultDTO; @@ -96,6 +97,11 @@ public class TopicServiceImpl implements TopicService { } + @Override + public List getTopicByIds(List ids) { + return topicDao.selectTopicByIds(ids); + } + /** * @Description 查询话题创建者信息 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml new file mode 100644 index 0000000000..71f24fc66c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml new file mode 100644 index 0000000000..58bdebeea2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/issue/StatsIssueDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/issue/StatsIssueDao.xml index 3cf6957432..f38b7a5715 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/issue/StatsIssueDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/issue/StatsIssueDao.xml @@ -181,6 +181,29 @@ AND i.customer_id = #{customerId} + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml index ed572b8f52..c44315b3e6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml @@ -76,5 +76,25 @@ AND CUSTOMER_ID = #{customerId} AND DATE_FORMAT(UPDATED_TIME, '%Y-%m-%d') = #{date} + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml index 5f6816ff3b..680a923090 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml @@ -19,5 +19,60 @@ ORDER BY pro.project_id,pro.CREATED_TIME ASC + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/topic/TopicDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/topic/TopicDao.xml index 7d84adfa91..bef60366bc 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/topic/TopicDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/topic/TopicDao.xml @@ -128,6 +128,18 @@ order by TOPIC_ID +