From fc984fb0132c3aa1b3e2e2a576858d72b51739f6 Mon Sep 17 00:00:00 2001 From: liushaowen <565850092@qq.com> Date: Mon, 23 Nov 2020 14:17:12 +0800 Subject: [PATCH 001/375] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E8=AE=A2=E9=98=85?= =?UTF-8?q?=E5=A4=96=E6=8C=82bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/WxmpMessageExtServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageExtServiceImpl.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageExtServiceImpl.java index f9d1e17a67..86aeb1a379 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageExtServiceImpl.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageExtServiceImpl.java @@ -58,7 +58,9 @@ public class WxmpMessageExtServiceImpl implements WxmpMessageExtService { wxmpMsgList.add(wxSubscribeMessageFormDTO); } } - wxmpMessageService.sendWxSubscribeMessage(wxmpMsgList); + if (wxmpMsgList.size() > 0){ + wxmpMessageService.sendWxSubscribeMessage(wxmpMsgList); + } return userMessageService.saveUserMessageList(userMsgList); } From 2a9e44cda0a0fa3096649242c5bd2744e076ef59 Mon Sep 17 00:00:00 2001 From: liushaowen <565850092@qq.com> Date: Mon, 23 Nov 2020 15:27:44 +0800 Subject: [PATCH 002/375] =?UTF-8?q?=E5=A4=96=E6=8C=82=E5=8F=91=E9=80=81?= =?UTF-8?q?=E8=AE=A2=E9=98=85=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/impl/WxmpMessageExtServiceImpl.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageExtServiceImpl.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageExtServiceImpl.java index 86aeb1a379..3e857f2213 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageExtServiceImpl.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageExtServiceImpl.java @@ -9,6 +9,8 @@ import com.epmet.dto.result.WxmpTemplateListResultDTO; import com.epmet.service.UserMessageService; import com.epmet.service.WxmpMessageExtService; import com.epmet.service.WxmpMessageService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -24,6 +26,8 @@ import java.util.List; */ @Service public class WxmpMessageExtServiceImpl implements WxmpMessageExtService { + + private Logger logger = LoggerFactory.getLogger(getClass()); @Autowired private WxmpMessageService wxmpMessageService; @Autowired @@ -59,7 +63,12 @@ public class WxmpMessageExtServiceImpl implements WxmpMessageExtService { } } if (wxmpMsgList.size() > 0){ - wxmpMessageService.sendWxSubscribeMessage(wxmpMsgList); + try { + wxmpMessageService.sendWxSubscribeMessage(wxmpMsgList); + }catch (Exception e){ + logger.error("微信消息发送失败,入参:{},错误信息:{}",wxmpMsgList,e.getMessage()); + } + } return userMessageService.saveUserMessageList(userMsgList); } From 98463b39a29d509961c650aa018ada22c6c6368a Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 8 Dec 2020 14:12:27 +0800 Subject: [PATCH 003/375] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E3=80=81=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E5=88=86=E7=B1=BB=E3=80=81=E6=A0=87=E7=AD=BE=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/IssueCategoryDTO.java | 96 ++++++++++++++++ .../dto/IssueProjectCategoryDictDTO.java | 106 ++++++++++++++++++ .../com/epmet/dto/IssueProjectTagDictDTO.java | 96 ++++++++++++++++ .../main/java/com/epmet/dto/IssueTagsDTO.java | 96 ++++++++++++++++ .../controller/IssueCategoryController.java | 94 ++++++++++++++++ .../IssueProjectCategoryDictController.java | 94 ++++++++++++++++ .../IssueProjectTagDictController.java | 94 ++++++++++++++++ .../epmet/controller/IssueTagsController.java | 94 ++++++++++++++++ .../java/com/epmet/dao/IssueCategoryDao.java | 33 ++++++ .../dao/IssueProjectCategoryDictDao.java | 33 ++++++ .../com/epmet/dao/IssueProjectTagDictDao.java | 33 ++++++ .../main/java/com/epmet/dao/IssueTagsDao.java | 33 ++++++ .../com/epmet/entity/IssueCategoryEntity.java | 66 +++++++++++ .../IssueProjectCategoryDictEntity.java | 76 +++++++++++++ .../entity/IssueProjectTagDictEntity.java | 66 +++++++++++ .../com/epmet/entity/IssueTagsEntity.java | 66 +++++++++++ .../com/epmet/excel/IssueCategoryExcel.java | 71 ++++++++++++ .../excel/IssueProjectCategoryDictExcel.java | 77 +++++++++++++ .../epmet/excel/IssueProjectTagDictExcel.java | 71 ++++++++++++ .../java/com/epmet/excel/IssueTagsExcel.java | 71 ++++++++++++ .../com/epmet/redis/IssueCategoryRedis.java | 47 ++++++++ .../redis/IssueProjectCategoryDictRedis.java | 47 ++++++++ .../epmet/redis/IssueProjectTagDictRedis.java | 47 ++++++++ .../java/com/epmet/redis/IssueTagsRedis.java | 47 ++++++++ .../epmet/service/IssueCategoryService.java | 95 ++++++++++++++++ .../IssueProjectCategoryDictService.java | 95 ++++++++++++++++ .../service/IssueProjectTagDictService.java | 95 ++++++++++++++++ .../com/epmet/service/IssueTagsService.java | 95 ++++++++++++++++ .../impl/IssueCategoryServiceImpl.java | 104 +++++++++++++++++ .../IssueProjectCategoryDictServiceImpl.java | 104 +++++++++++++++++ .../impl/IssueProjectTagDictServiceImpl.java | 104 +++++++++++++++++ .../service/impl/IssueTagsServiceImpl.java | 104 +++++++++++++++++ .../resources/mapper/IssueCategoryDao.xml | 8 ++ .../mapper/IssueProjectCategoryDictDao.xml | 8 ++ .../mapper/IssueProjectTagDictDao.xml | 8 ++ .../main/resources/mapper/IssueTagsDao.xml | 8 ++ .../com/epmet/dto/ProjectCategoryDTO.java | 96 ++++++++++++++++ .../java/com/epmet/dto/ProjectTagsDTO.java | 91 +++++++++++++++ .../controller/ProjectCategoryController.java | 94 ++++++++++++++++ .../controller/ProjectTagsController.java | 94 ++++++++++++++++ .../com/epmet/dao/ProjectCategoryDao.java | 33 ++++++ .../java/com/epmet/dao/ProjectTagsDao.java | 33 ++++++ .../epmet/entity/ProjectCategoryEntity.java | 66 +++++++++++ .../com/epmet/entity/ProjectTagsEntity.java | 61 ++++++++++ .../com/epmet/excel/ProjectCategoryExcel.java | 71 ++++++++++++ .../com/epmet/excel/ProjectTagsExcel.java | 68 +++++++++++ .../com/epmet/redis/ProjectCategoryRedis.java | 47 ++++++++ .../com/epmet/redis/ProjectTagsRedis.java | 47 ++++++++ .../epmet/service/ProjectCategoryService.java | 95 ++++++++++++++++ .../com/epmet/service/ProjectTagsService.java | 95 ++++++++++++++++ .../impl/ProjectCategoryServiceImpl.java | 104 +++++++++++++++++ .../service/impl/ProjectTagsServiceImpl.java | 104 +++++++++++++++++ .../resources/mapper/ProjectCategoryDao.xml | 8 ++ .../main/resources/mapper/ProjectTagsDao.xml | 8 ++ 54 files changed, 3697 insertions(+) create mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueCategoryDTO.java create mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueProjectCategoryDictDTO.java create mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueProjectTagDictDTO.java create mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueTagsDTO.java create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCategoryController.java create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectTagDictController.java create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueTagsController.java create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueCategoryDao.java create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectTagDictDao.java create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueTagsDao.java create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueCategoryEntity.java create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueProjectCategoryDictEntity.java create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueProjectTagDictEntity.java create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueTagsEntity.java create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/excel/IssueCategoryExcel.java create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/excel/IssueProjectCategoryDictExcel.java create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/excel/IssueProjectTagDictExcel.java create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/excel/IssueTagsExcel.java create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueCategoryRedis.java create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectCategoryDictRedis.java create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueTagsRedis.java create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueCategoryService.java create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectTagDictService.java create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueTagsService.java create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectTagDictServiceImpl.java create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueTagsDao.xml create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectCategoryDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectTagsDTO.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectCategoryController.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTagsController.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectCategoryDao.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectTagsDao.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectCategoryEntity.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectTagsEntity.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/ProjectCategoryExcel.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/ProjectTagsExcel.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/redis/ProjectCategoryRedis.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/redis/ProjectTagsRedis.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectCategoryService.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectTagsService.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectCategoryServiceImpl.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTagsServiceImpl.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectCategoryDao.xml create mode 100644 epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectTagsDao.xml diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueCategoryDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueCategoryDTO.java new file mode 100644 index 0000000000..12d645937a --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueCategoryDTO.java @@ -0,0 +1,96 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 议题所属分类表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +@Data +public class IssueCategoryDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 网格ID: 议题所属网格Id + */ + private String gridId; + + /** + * 议题id + */ + private String issueId; + + /** + * 分类id + */ + private String categoryId; + + /** + * 分类对应的所有上级,英文逗号隔开 + */ + private String categoryPids; + + /** + * 删除标识 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/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueProjectCategoryDictDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueProjectCategoryDictDTO.java new file mode 100644 index 0000000000..d0df3169f5 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueProjectCategoryDictDTO.java @@ -0,0 +1,106 @@ +/** + * 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; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 议题项目分类字典 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +@Data +public class IssueProjectCategoryDictDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id, 产品默认default + */ + private String customerId; + + /** + * 上级分类ID 顶级此列存储0 + */ + private String pid; + + /** + * 所有上级分类ID,用逗号分开 + */ + private String pids; + + /** + * 分类编码,分类编码+customer_id唯一 + */ + private String categoryCode; + + /** + * 分类名称 + */ + private String categoryName; + + /** + * 分类类别1,2,3,4.... + */ + private String categoryType; + + /** + * 排序 + */ + private Integer sort; + + /** + * 删除标识 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/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueProjectTagDictDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueProjectTagDictDTO.java new file mode 100644 index 0000000000..7d3e767591 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueProjectTagDictDTO.java @@ -0,0 +1,96 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 议题、项目标签字典表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +@Data +public class IssueProjectTagDictDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 标签名称 + */ + private String tagName; + + /** + * 分类id, 用户自己添加的标签此列可为空 + */ + private String categoryId; + + /** + * 议题对标签的引用次数 + */ + private Integer issueUseCount; + + /** + * 项目对标签的引用次数 + */ + private Integer projectUseCount; + + /** + * 删除标识 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/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueTagsDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueTagsDTO.java new file mode 100644 index 0000000000..6ca1c51c6a --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueTagsDTO.java @@ -0,0 +1,96 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 议题关联标签表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +@Data +public class IssueTagsDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 议题所属网格id + */ + private String gridId; + + /** + * 议题ID + */ + private String issueId; + + /** + * 标签ID + */ + private String tagId; + + /** + * 标签名称 + */ + private String tagName; + + /** + * 删除标识 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/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCategoryController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCategoryController.java new file mode 100644 index 0000000000..ad5fd11583 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCategoryController.java @@ -0,0 +1,94 @@ +/** + * 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.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.IssueCategoryDTO; +import com.epmet.excel.IssueCategoryExcel; +import com.epmet.service.IssueCategoryService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 议题所属分类表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +@RestController +@RequestMapping("issuecategory") +public class IssueCategoryController { + + @Autowired + private IssueCategoryService issueCategoryService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = issueCategoryService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + IssueCategoryDTO data = issueCategoryService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody IssueCategoryDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + issueCategoryService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody IssueCategoryDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + issueCategoryService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + issueCategoryService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = issueCategoryService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, IssueCategoryExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java new file mode 100644 index 0000000000..4f09b23bc1 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java @@ -0,0 +1,94 @@ +/** + * 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.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.IssueProjectCategoryDictDTO; +import com.epmet.excel.IssueProjectCategoryDictExcel; +import com.epmet.service.IssueProjectCategoryDictService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 议题项目分类字典 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +@RestController +@RequestMapping("issueprojectcategorydict") +public class IssueProjectCategoryDictController { + + @Autowired + private IssueProjectCategoryDictService issueProjectCategoryDictService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = issueProjectCategoryDictService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + IssueProjectCategoryDictDTO data = issueProjectCategoryDictService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody IssueProjectCategoryDictDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + issueProjectCategoryDictService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody IssueProjectCategoryDictDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + issueProjectCategoryDictService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + issueProjectCategoryDictService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = issueProjectCategoryDictService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, IssueProjectCategoryDictExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectTagDictController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectTagDictController.java new file mode 100644 index 0000000000..f4dbe2b03e --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectTagDictController.java @@ -0,0 +1,94 @@ +/** + * 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.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.IssueProjectTagDictDTO; +import com.epmet.excel.IssueProjectTagDictExcel; +import com.epmet.service.IssueProjectTagDictService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 议题、项目标签字典表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +@RestController +@RequestMapping("issueprojecttagdict") +public class IssueProjectTagDictController { + + @Autowired + private IssueProjectTagDictService issueProjectTagDictService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = issueProjectTagDictService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + IssueProjectTagDictDTO data = issueProjectTagDictService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody IssueProjectTagDictDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + issueProjectTagDictService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody IssueProjectTagDictDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + issueProjectTagDictService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + issueProjectTagDictService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = issueProjectTagDictService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, IssueProjectTagDictExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueTagsController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueTagsController.java new file mode 100644 index 0000000000..4be04baf85 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueTagsController.java @@ -0,0 +1,94 @@ +/** + * 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.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.IssueTagsDTO; +import com.epmet.excel.IssueTagsExcel; +import com.epmet.service.IssueTagsService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 议题关联标签表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +@RestController +@RequestMapping("issuetags") +public class IssueTagsController { + + @Autowired + private IssueTagsService issueTagsService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = issueTagsService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + IssueTagsDTO data = issueTagsService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody IssueTagsDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + issueTagsService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody IssueTagsDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + issueTagsService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + issueTagsService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = issueTagsService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, IssueTagsExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueCategoryDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueCategoryDao.java new file mode 100644 index 0000000000..94e91b086b --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueCategoryDao.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; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IssueCategoryEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 议题所属分类表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +@Mapper +public interface IssueCategoryDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java new file mode 100644 index 0000000000..bd770671d5 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.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; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IssueProjectCategoryDictEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 议题项目分类字典 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +@Mapper +public interface IssueProjectCategoryDictDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectTagDictDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectTagDictDao.java new file mode 100644 index 0000000000..7f2bd323dd --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectTagDictDao.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; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IssueProjectTagDictEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 议题、项目标签字典表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +@Mapper +public interface IssueProjectTagDictDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueTagsDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueTagsDao.java new file mode 100644 index 0000000000..1cd8838351 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueTagsDao.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; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IssueTagsEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 议题关联标签表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +@Mapper +public interface IssueTagsDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueCategoryEntity.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueCategoryEntity.java new file mode 100644 index 0000000000..fa9e5b8d5b --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueCategoryEntity.java @@ -0,0 +1,66 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +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-12-08 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("issue_category") +public class IssueCategoryEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 网格ID: 议题所属网格Id + */ + private String gridId; + + /** + * 议题id + */ + private String issueId; + + /** + * 分类id + */ + private String categoryId; + + /** + * 分类对应的所有上级,英文逗号隔开 + */ + private String categoryPids; + +} diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueProjectCategoryDictEntity.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueProjectCategoryDictEntity.java new file mode 100644 index 0000000000..74a2e32b29 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueProjectCategoryDictEntity.java @@ -0,0 +1,76 @@ +/** + * 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; + +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-12-08 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("issue_project_category_dict") +public class IssueProjectCategoryDictEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id, 产品默认default + */ + private String customerId; + + /** + * 上级分类ID 顶级此列存储0 + */ + private String pid; + + /** + * 所有上级分类ID,用逗号分开 + */ + private String pids; + + /** + * 分类编码,分类编码+customer_id唯一 + */ + private String categoryCode; + + /** + * 分类名称 + */ + private String categoryName; + + /** + * 分类类别1,2,3,4.... + */ + private String categoryType; + + /** + * 排序 + */ + private Integer sort; + +} diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueProjectTagDictEntity.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueProjectTagDictEntity.java new file mode 100644 index 0000000000..52ad36b5ef --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueProjectTagDictEntity.java @@ -0,0 +1,66 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +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-12-08 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("issue_project_tag_dict") +public class IssueProjectTagDictEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 标签名称 + */ + private String tagName; + + /** + * 分类id, 用户自己添加的标签此列可为空 + */ + private String categoryId; + + /** + * 议题对标签的引用次数 + */ + private Integer issueUseCount; + + /** + * 项目对标签的引用次数 + */ + private Integer projectUseCount; + +} diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueTagsEntity.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueTagsEntity.java new file mode 100644 index 0000000000..1dc56255fc --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueTagsEntity.java @@ -0,0 +1,66 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +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-12-08 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("issue_tags") +public class IssueTagsEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 议题所属网格id + */ + private String gridId; + + /** + * 议题ID + */ + private String issueId; + + /** + * 标签ID + */ + private String tagId; + + /** + * 标签名称 + */ + private String tagName; + +} diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/excel/IssueCategoryExcel.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/excel/IssueCategoryExcel.java new file mode 100644 index 0000000000..1d74b3fe92 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/excel/IssueCategoryExcel.java @@ -0,0 +1,71 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 议题所属分类表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +@Data +public class IssueCategoryExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "客户id") + private String customerId; + + @Excel(name = "网格ID: 议题所属网格Id") + private String gridId; + + @Excel(name = "议题id") + private String issueId; + + @Excel(name = "分类id") + private String categoryId; + + @Excel(name = "分类对应的所有上级,英文逗号隔开") + private String categoryPids; + + @Excel(name = "删除标识 0未删除、1已删除") + private String delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/excel/IssueProjectCategoryDictExcel.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/excel/IssueProjectCategoryDictExcel.java new file mode 100644 index 0000000000..4cef5ada59 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/excel/IssueProjectCategoryDictExcel.java @@ -0,0 +1,77 @@ +/** + * 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.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 议题项目分类字典 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +@Data +public class IssueProjectCategoryDictExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "客户id, 产品默认default") + private String customerId; + + @Excel(name = "上级分类ID 顶级此列存储0") + private String pid; + + @Excel(name = "所有上级分类ID,用逗号分开") + private String pids; + + @Excel(name = "分类编码,分类编码+customer_id唯一") + private String categoryCode; + + @Excel(name = "分类名称") + private String categoryName; + + @Excel(name = "分类类别1,2,3,4....") + private String categoryType; + + @Excel(name = "排序") + private Integer sort; + + @Excel(name = "删除标识 0未删除、1已删除") + private String delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/excel/IssueProjectTagDictExcel.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/excel/IssueProjectTagDictExcel.java new file mode 100644 index 0000000000..2922932624 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/excel/IssueProjectTagDictExcel.java @@ -0,0 +1,71 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 议题、项目标签字典表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +@Data +public class IssueProjectTagDictExcel { + + @Excel(name = "主键ID") + private String id; + + @Excel(name = "客户ID") + private String customerId; + + @Excel(name = "标签名称") + private String tagName; + + @Excel(name = "分类id, 用户自己添加的标签此列可为空") + private String categoryId; + + @Excel(name = "议题对标签的引用次数") + private Integer issueUseCount; + + @Excel(name = "项目对标签的引用次数") + private Integer projectUseCount; + + @Excel(name = "删除标识 0.未删除 1.已删除") + private Integer delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/excel/IssueTagsExcel.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/excel/IssueTagsExcel.java new file mode 100644 index 0000000000..c790e5e6e2 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/excel/IssueTagsExcel.java @@ -0,0 +1,71 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 议题关联标签表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +@Data +public class IssueTagsExcel { + + @Excel(name = "主键ID") + private String id; + + @Excel(name = "客户ID") + private String customerId; + + @Excel(name = "议题所属网格id") + private String gridId; + + @Excel(name = "议题ID") + private String issueId; + + @Excel(name = "标签ID") + private String tagId; + + @Excel(name = "标签名称") + private String tagName; + + @Excel(name = "删除标识 0.未删除 1.已删除") + private Integer delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueCategoryRedis.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueCategoryRedis.java new file mode 100644 index 0000000000..f05e1bac72 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueCategoryRedis.java @@ -0,0 +1,47 @@ +/** + * 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.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 议题所属分类表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +@Component +public class IssueCategoryRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectCategoryDictRedis.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectCategoryDictRedis.java new file mode 100644 index 0000000000..f4bfbe0967 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectCategoryDictRedis.java @@ -0,0 +1,47 @@ +/** + * 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.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 议题项目分类字典 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +@Component +public class IssueProjectCategoryDictRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java new file mode 100644 index 0000000000..7c9f56bd38 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java @@ -0,0 +1,47 @@ +/** + * 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.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 议题、项目标签字典表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +@Component +public class IssueProjectTagDictRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueTagsRedis.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueTagsRedis.java new file mode 100644 index 0000000000..3219ea7b57 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueTagsRedis.java @@ -0,0 +1,47 @@ +/** + * 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.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 议题关联标签表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +@Component +public class IssueTagsRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueCategoryService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueCategoryService.java new file mode 100644 index 0000000000..92b700daa0 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueCategoryService.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; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.IssueCategoryDTO; +import com.epmet.entity.IssueCategoryEntity; + +import java.util.List; +import java.util.Map; + +/** + * 议题所属分类表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +public interface IssueCategoryService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-12-08 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-12-08 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IssueCategoryDTO + * @author generator + * @date 2020-12-08 + */ + IssueCategoryDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-12-08 + */ + void save(IssueCategoryDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-12-08 + */ + void update(IssueCategoryDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-12-08 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java new file mode 100644 index 0000000000..5937393e1a --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.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; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.IssueProjectCategoryDictDTO; +import com.epmet.entity.IssueProjectCategoryDictEntity; + +import java.util.List; +import java.util.Map; + +/** + * 议题项目分类字典 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +public interface IssueProjectCategoryDictService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-12-08 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-12-08 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IssueProjectCategoryDictDTO + * @author generator + * @date 2020-12-08 + */ + IssueProjectCategoryDictDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-12-08 + */ + void save(IssueProjectCategoryDictDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-12-08 + */ + void update(IssueProjectCategoryDictDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-12-08 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectTagDictService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectTagDictService.java new file mode 100644 index 0000000000..46521d6bbb --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectTagDictService.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; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.IssueProjectTagDictDTO; +import com.epmet.entity.IssueProjectTagDictEntity; + +import java.util.List; +import java.util.Map; + +/** + * 议题、项目标签字典表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +public interface IssueProjectTagDictService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-12-08 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-12-08 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IssueProjectTagDictDTO + * @author generator + * @date 2020-12-08 + */ + IssueProjectTagDictDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-12-08 + */ + void save(IssueProjectTagDictDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-12-08 + */ + void update(IssueProjectTagDictDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-12-08 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueTagsService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueTagsService.java new file mode 100644 index 0000000000..b4e37ae7c0 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueTagsService.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; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.IssueTagsDTO; +import com.epmet.entity.IssueTagsEntity; + +import java.util.List; +import java.util.Map; + +/** + * 议题关联标签表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +public interface IssueTagsService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-12-08 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-12-08 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IssueTagsDTO + * @author generator + * @date 2020-12-08 + */ + IssueTagsDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-12-08 + */ + void save(IssueTagsDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-12-08 + */ + void update(IssueTagsDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-12-08 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java new file mode 100644 index 0000000000..4e2a457af7 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java @@ -0,0 +1,104 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.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.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.IssueCategoryDao; +import com.epmet.dto.IssueCategoryDTO; +import com.epmet.entity.IssueCategoryEntity; +import com.epmet.redis.IssueCategoryRedis; +import com.epmet.service.IssueCategoryService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +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-12-08 + */ +@Service +public class IssueCategoryServiceImpl extends BaseServiceImpl implements IssueCategoryService { + + @Autowired + private IssueCategoryRedis issueCategoryRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IssueCategoryDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IssueCategoryDTO.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 IssueCategoryDTO get(String id) { + IssueCategoryEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IssueCategoryDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IssueCategoryDTO dto) { + IssueCategoryEntity entity = ConvertUtils.sourceToTarget(dto, IssueCategoryEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IssueCategoryDTO dto) { + IssueCategoryEntity entity = ConvertUtils.sourceToTarget(dto, IssueCategoryEntity.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/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java new file mode 100644 index 0000000000..1bdb075c24 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java @@ -0,0 +1,104 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.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.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.IssueProjectCategoryDictDao; +import com.epmet.dto.IssueProjectCategoryDictDTO; +import com.epmet.entity.IssueProjectCategoryDictEntity; +import com.epmet.redis.IssueProjectCategoryDictRedis; +import com.epmet.service.IssueProjectCategoryDictService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +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-12-08 + */ +@Service +public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl implements IssueProjectCategoryDictService { + + @Autowired + private IssueProjectCategoryDictRedis issueProjectCategoryDictRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IssueProjectCategoryDictDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IssueProjectCategoryDictDTO.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 IssueProjectCategoryDictDTO get(String id) { + IssueProjectCategoryDictEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IssueProjectCategoryDictDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IssueProjectCategoryDictDTO dto) { + IssueProjectCategoryDictEntity entity = ConvertUtils.sourceToTarget(dto, IssueProjectCategoryDictEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IssueProjectCategoryDictDTO dto) { + IssueProjectCategoryDictEntity entity = ConvertUtils.sourceToTarget(dto, IssueProjectCategoryDictEntity.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/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectTagDictServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectTagDictServiceImpl.java new file mode 100644 index 0000000000..2250587ec3 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectTagDictServiceImpl.java @@ -0,0 +1,104 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.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.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.IssueProjectTagDictDao; +import com.epmet.dto.IssueProjectTagDictDTO; +import com.epmet.entity.IssueProjectTagDictEntity; +import com.epmet.redis.IssueProjectTagDictRedis; +import com.epmet.service.IssueProjectTagDictService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +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-12-08 + */ +@Service +public class IssueProjectTagDictServiceImpl extends BaseServiceImpl implements IssueProjectTagDictService { + + @Autowired + private IssueProjectTagDictRedis issueProjectTagDictRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IssueProjectTagDictDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IssueProjectTagDictDTO.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 IssueProjectTagDictDTO get(String id) { + IssueProjectTagDictEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IssueProjectTagDictDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IssueProjectTagDictDTO dto) { + IssueProjectTagDictEntity entity = ConvertUtils.sourceToTarget(dto, IssueProjectTagDictEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IssueProjectTagDictDTO dto) { + IssueProjectTagDictEntity entity = ConvertUtils.sourceToTarget(dto, IssueProjectTagDictEntity.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/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java new file mode 100644 index 0000000000..6a9002cd7c --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java @@ -0,0 +1,104 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.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.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.IssueTagsDao; +import com.epmet.dto.IssueTagsDTO; +import com.epmet.entity.IssueTagsEntity; +import com.epmet.redis.IssueTagsRedis; +import com.epmet.service.IssueTagsService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +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-12-08 + */ +@Service +public class IssueTagsServiceImpl extends BaseServiceImpl implements IssueTagsService { + + @Autowired + private IssueTagsRedis issueTagsRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IssueTagsDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IssueTagsDTO.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 IssueTagsDTO get(String id) { + IssueTagsEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IssueTagsDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IssueTagsDTO dto) { + IssueTagsEntity entity = ConvertUtils.sourceToTarget(dto, IssueTagsEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IssueTagsDTO dto) { + IssueTagsEntity entity = ConvertUtils.sourceToTarget(dto, IssueTagsEntity.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/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml new file mode 100644 index 0000000000..20f349dad8 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml new file mode 100644 index 0000000000..8be2371d88 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml new file mode 100644 index 0000000000..24ce93f310 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueTagsDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueTagsDao.xml new file mode 100644 index 0000000000..d34e3bef22 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueTagsDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectCategoryDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectCategoryDTO.java new file mode 100644 index 0000000000..4c7b39c7d6 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectCategoryDTO.java @@ -0,0 +1,96 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 项目所属分类表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +@Data +public class ProjectCategoryDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 来源网格id + */ + private String gridId; + + /** + * 项目id + */ + private String projectId; + + /** + * 分类id + */ + private String categoryId; + + /** + * 分类对应的所有上级,英文逗号隔开 + */ + private String categoryPids; + + /** + * 删除标识 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/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectTagsDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectTagsDTO.java new file mode 100644 index 0000000000..1cc47c4bb6 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectTagsDTO.java @@ -0,0 +1,91 @@ +/** + * 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; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 项目关联标签表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +@Data +public class ProjectTagsDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 项目ID + */ + private String projectId; + + /** + * 标签ID + */ + private String tagId; + + /** + * 标签名称 + */ + private String tagName; + + /** + * 删除标识 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/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectCategoryController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectCategoryController.java new file mode 100644 index 0000000000..505d54c529 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectCategoryController.java @@ -0,0 +1,94 @@ +/** + * 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.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.ProjectCategoryDTO; +import com.epmet.excel.ProjectCategoryExcel; +import com.epmet.service.ProjectCategoryService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 项目所属分类表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +@RestController +@RequestMapping("projectcategory") +public class ProjectCategoryController { + + @Autowired + private ProjectCategoryService projectCategoryService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = projectCategoryService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + ProjectCategoryDTO data = projectCategoryService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody ProjectCategoryDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + projectCategoryService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody ProjectCategoryDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + projectCategoryService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + projectCategoryService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = projectCategoryService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, ProjectCategoryExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTagsController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTagsController.java new file mode 100644 index 0000000000..01ab68f1b9 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTagsController.java @@ -0,0 +1,94 @@ +/** + * 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.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.ProjectTagsDTO; +import com.epmet.excel.ProjectTagsExcel; +import com.epmet.service.ProjectTagsService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 项目关联标签表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +@RestController +@RequestMapping("projecttags") +public class ProjectTagsController { + + @Autowired + private ProjectTagsService projectTagsService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = projectTagsService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + ProjectTagsDTO data = projectTagsService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody ProjectTagsDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + projectTagsService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody ProjectTagsDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + projectTagsService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + projectTagsService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = projectTagsService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, ProjectTagsExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectCategoryDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectCategoryDao.java new file mode 100644 index 0000000000..8186178086 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectCategoryDao.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; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.ProjectCategoryEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 项目所属分类表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +@Mapper +public interface ProjectCategoryDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectTagsDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectTagsDao.java new file mode 100644 index 0000000000..2b4435ab5f --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectTagsDao.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; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.ProjectTagsEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 项目关联标签表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +@Mapper +public interface ProjectTagsDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectCategoryEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectCategoryEntity.java new file mode 100644 index 0000000000..ce718cc201 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectCategoryEntity.java @@ -0,0 +1,66 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +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-12-08 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("project_category") +public class ProjectCategoryEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 来源网格id + */ + private String gridId; + + /** + * 项目id + */ + private String projectId; + + /** + * 分类id + */ + private String categoryId; + + /** + * 分类对应的所有上级,英文逗号隔开 + */ + private String categoryPids; + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectTagsEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectTagsEntity.java new file mode 100644 index 0000000000..12febddfea --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectTagsEntity.java @@ -0,0 +1,61 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +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-12-08 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("project_tags") +public class ProjectTagsEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 项目ID + */ + private String projectId; + + /** + * 标签ID + */ + private String tagId; + + /** + * 标签名称 + */ + private String tagName; + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/ProjectCategoryExcel.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/ProjectCategoryExcel.java new file mode 100644 index 0000000000..515c2ddf7e --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/ProjectCategoryExcel.java @@ -0,0 +1,71 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 项目所属分类表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +@Data +public class ProjectCategoryExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "客户id") + private String customerId; + + @Excel(name = "来源网格id") + private String gridId; + + @Excel(name = "项目id") + private String projectId; + + @Excel(name = "分类id") + private String categoryId; + + @Excel(name = "分类对应的所有上级,英文逗号隔开") + private String categoryPids; + + @Excel(name = "删除标识 0未删除、1已删除") + private String delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/ProjectTagsExcel.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/ProjectTagsExcel.java new file mode 100644 index 0000000000..e923b47d6c --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/ProjectTagsExcel.java @@ -0,0 +1,68 @@ +/** + * 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.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 项目关联标签表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +@Data +public class ProjectTagsExcel { + + @Excel(name = "主键ID") + private String id; + + @Excel(name = "客户ID") + private String customerId; + + @Excel(name = "项目ID") + private String projectId; + + @Excel(name = "标签ID") + private String tagId; + + @Excel(name = "标签名称") + private String tagName; + + @Excel(name = "删除标识 0.未删除 1.已删除") + private Integer delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/redis/ProjectCategoryRedis.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/redis/ProjectCategoryRedis.java new file mode 100644 index 0000000000..cdf23a7a26 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/redis/ProjectCategoryRedis.java @@ -0,0 +1,47 @@ +/** + * 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.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 项目所属分类表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +@Component +public class ProjectCategoryRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/redis/ProjectTagsRedis.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/redis/ProjectTagsRedis.java new file mode 100644 index 0000000000..08f8b14e55 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/redis/ProjectTagsRedis.java @@ -0,0 +1,47 @@ +/** + * 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.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 项目关联标签表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +@Component +public class ProjectTagsRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectCategoryService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectCategoryService.java new file mode 100644 index 0000000000..551b77ffbb --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectCategoryService.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; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.ProjectCategoryDTO; +import com.epmet.entity.ProjectCategoryEntity; + +import java.util.List; +import java.util.Map; + +/** + * 项目所属分类表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +public interface ProjectCategoryService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-12-08 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-12-08 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return ProjectCategoryDTO + * @author generator + * @date 2020-12-08 + */ + ProjectCategoryDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-12-08 + */ + void save(ProjectCategoryDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-12-08 + */ + void update(ProjectCategoryDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-12-08 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectTagsService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectTagsService.java new file mode 100644 index 0000000000..d281c2100e --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectTagsService.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; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.ProjectTagsDTO; +import com.epmet.entity.ProjectTagsEntity; + +import java.util.List; +import java.util.Map; + +/** + * 项目关联标签表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +public interface ProjectTagsService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-12-08 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-12-08 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return ProjectTagsDTO + * @author generator + * @date 2020-12-08 + */ + ProjectTagsDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-12-08 + */ + void save(ProjectTagsDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-12-08 + */ + void update(ProjectTagsDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-12-08 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectCategoryServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectCategoryServiceImpl.java new file mode 100644 index 0000000000..5663981dba --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectCategoryServiceImpl.java @@ -0,0 +1,104 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.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.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.ProjectCategoryDao; +import com.epmet.dto.ProjectCategoryDTO; +import com.epmet.entity.ProjectCategoryEntity; +import com.epmet.redis.ProjectCategoryRedis; +import com.epmet.service.ProjectCategoryService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +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-12-08 + */ +@Service +public class ProjectCategoryServiceImpl extends BaseServiceImpl implements ProjectCategoryService { + + @Autowired + private ProjectCategoryRedis projectCategoryRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, ProjectCategoryDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, ProjectCategoryDTO.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 ProjectCategoryDTO get(String id) { + ProjectCategoryEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ProjectCategoryDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ProjectCategoryDTO dto) { + ProjectCategoryEntity entity = ConvertUtils.sourceToTarget(dto, ProjectCategoryEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ProjectCategoryDTO dto) { + ProjectCategoryEntity entity = ConvertUtils.sourceToTarget(dto, ProjectCategoryEntity.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/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTagsServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTagsServiceImpl.java new file mode 100644 index 0000000000..4d4f135b6e --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTagsServiceImpl.java @@ -0,0 +1,104 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.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.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.ProjectTagsDao; +import com.epmet.dto.ProjectTagsDTO; +import com.epmet.entity.ProjectTagsEntity; +import com.epmet.redis.ProjectTagsRedis; +import com.epmet.service.ProjectTagsService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +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-12-08 + */ +@Service +public class ProjectTagsServiceImpl extends BaseServiceImpl implements ProjectTagsService { + + @Autowired + private ProjectTagsRedis projectTagsRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, ProjectTagsDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, ProjectTagsDTO.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 ProjectTagsDTO get(String id) { + ProjectTagsEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ProjectTagsDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ProjectTagsDTO dto) { + ProjectTagsEntity entity = ConvertUtils.sourceToTarget(dto, ProjectTagsEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ProjectTagsDTO dto) { + ProjectTagsEntity entity = ConvertUtils.sourceToTarget(dto, ProjectTagsEntity.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/gov-project/gov-project-server/src/main/resources/mapper/ProjectCategoryDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectCategoryDao.xml new file mode 100644 index 0000000000..5689229906 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectCategoryDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectTagsDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectTagsDao.xml new file mode 100644 index 0000000000..50ed689ab5 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectTagsDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file From 866b4653c58f9864f3a38eaf76add10910a77023 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 8 Dec 2020 15:55:06 +0800 Subject: [PATCH 004/375] =?UTF-8?q?=E8=A1=A8=E4=B8=AD=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/IssueCategoryDTO.java | 5 +++++ .../src/main/java/com/epmet/dto/IssueProjectTagDictDTO.java | 5 +++++ .../src/main/java/com/epmet/entity/IssueCategoryEntity.java | 5 +++++ .../java/com/epmet/entity/IssueProjectTagDictEntity.java | 5 +++++ .../src/main/java/com/epmet/excel/IssueCategoryExcel.java | 3 +++ .../main/java/com/epmet/excel/IssueProjectTagDictExcel.java | 3 +++ .../src/main/java/com/epmet/dto/ProjectCategoryDTO.java | 5 +++++ .../main/java/com/epmet/entity/ProjectCategoryEntity.java | 5 +++++ .../src/main/java/com/epmet/excel/ProjectCategoryExcel.java | 3 +++ 9 files changed, 39 insertions(+) diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueCategoryDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueCategoryDTO.java index 12d645937a..3883dc4b0f 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueCategoryDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueCategoryDTO.java @@ -58,6 +58,11 @@ public class IssueCategoryDTO implements Serializable { */ private String categoryId; + /** + * 分类名称 + */ + private String categoryName; + /** * 分类对应的所有上级,英文逗号隔开 */ diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueProjectTagDictDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueProjectTagDictDTO.java index 7d3e767591..b13500e735 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueProjectTagDictDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueProjectTagDictDTO.java @@ -53,6 +53,11 @@ public class IssueProjectTagDictDTO implements Serializable { */ private String categoryId; + /** + * 是否是默认标签(0:是 1:否) + */ + private String isDefault; + /** * 议题对标签的引用次数 */ diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueCategoryEntity.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueCategoryEntity.java index fa9e5b8d5b..c977beb4bf 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueCategoryEntity.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueCategoryEntity.java @@ -58,6 +58,11 @@ public class IssueCategoryEntity extends BaseEpmetEntity { */ private String categoryId; + /** + * 分类名称 + */ + private String categoryName; + /** * 分类对应的所有上级,英文逗号隔开 */ diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueProjectTagDictEntity.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueProjectTagDictEntity.java index 52ad36b5ef..c56d5974a7 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueProjectTagDictEntity.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueProjectTagDictEntity.java @@ -53,6 +53,11 @@ public class IssueProjectTagDictEntity extends BaseEpmetEntity { */ private String categoryId; + /** + * 是否是默认标签(0:是 1:否) + */ + private String isDefault; + /** * 议题对标签的引用次数 */ diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/excel/IssueCategoryExcel.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/excel/IssueCategoryExcel.java index 1d74b3fe92..edb392740b 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/excel/IssueCategoryExcel.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/excel/IssueCategoryExcel.java @@ -46,6 +46,9 @@ public class IssueCategoryExcel { @Excel(name = "分类id") private String categoryId; + @Excel(name = "分类名称") + private String categoryName; + @Excel(name = "分类对应的所有上级,英文逗号隔开") private String categoryPids; diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/excel/IssueProjectTagDictExcel.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/excel/IssueProjectTagDictExcel.java index 2922932624..26fee432bd 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/excel/IssueProjectTagDictExcel.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/excel/IssueProjectTagDictExcel.java @@ -43,6 +43,9 @@ public class IssueProjectTagDictExcel { @Excel(name = "分类id, 用户自己添加的标签此列可为空") private String categoryId; + @Excel(name = "是否是默认标签(0:是 1:否)") + private String isDefault; + @Excel(name = "议题对标签的引用次数") private Integer issueUseCount; diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectCategoryDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectCategoryDTO.java index 4c7b39c7d6..8ac01ddb81 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectCategoryDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectCategoryDTO.java @@ -58,6 +58,11 @@ public class ProjectCategoryDTO implements Serializable { */ private String categoryId; + /** + * 分类名称 + */ + private String categoryName; + /** * 分类对应的所有上级,英文逗号隔开 */ diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectCategoryEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectCategoryEntity.java index ce718cc201..ffcbb81753 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectCategoryEntity.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectCategoryEntity.java @@ -58,6 +58,11 @@ public class ProjectCategoryEntity extends BaseEpmetEntity { */ private String categoryId; + /** + * 分类名称 + */ + private String categoryName; + /** * 分类对应的所有上级,英文逗号隔开 */ diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/ProjectCategoryExcel.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/ProjectCategoryExcel.java index 515c2ddf7e..fe471b49cd 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/ProjectCategoryExcel.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/ProjectCategoryExcel.java @@ -46,6 +46,9 @@ public class ProjectCategoryExcel { @Excel(name = "分类id") private String categoryId; + @Excel(name = "分类名称") + private String categoryName; + @Excel(name = "分类对应的所有上级,英文逗号隔开") private String categoryPids; From 4281356cee6142e7ddb3d8959f8d66671940a4bd Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 8 Dec 2020 16:02:16 +0800 Subject: [PATCH 005/375] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=BF=98=E5=8E=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/IssueCategoryDTO.java | 5 ----- .../src/main/java/com/epmet/entity/IssueCategoryEntity.java | 5 ----- .../src/main/java/com/epmet/excel/IssueCategoryExcel.java | 3 --- .../src/main/java/com/epmet/dto/ProjectCategoryDTO.java | 5 ----- .../main/java/com/epmet/entity/ProjectCategoryEntity.java | 5 ----- .../src/main/java/com/epmet/excel/ProjectCategoryExcel.java | 3 --- 6 files changed, 26 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueCategoryDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueCategoryDTO.java index 3883dc4b0f..12d645937a 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueCategoryDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueCategoryDTO.java @@ -58,11 +58,6 @@ public class IssueCategoryDTO implements Serializable { */ private String categoryId; - /** - * 分类名称 - */ - private String categoryName; - /** * 分类对应的所有上级,英文逗号隔开 */ diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueCategoryEntity.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueCategoryEntity.java index c977beb4bf..fa9e5b8d5b 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueCategoryEntity.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueCategoryEntity.java @@ -58,11 +58,6 @@ public class IssueCategoryEntity extends BaseEpmetEntity { */ private String categoryId; - /** - * 分类名称 - */ - private String categoryName; - /** * 分类对应的所有上级,英文逗号隔开 */ diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/excel/IssueCategoryExcel.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/excel/IssueCategoryExcel.java index edb392740b..1d74b3fe92 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/excel/IssueCategoryExcel.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/excel/IssueCategoryExcel.java @@ -46,9 +46,6 @@ public class IssueCategoryExcel { @Excel(name = "分类id") private String categoryId; - @Excel(name = "分类名称") - private String categoryName; - @Excel(name = "分类对应的所有上级,英文逗号隔开") private String categoryPids; diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectCategoryDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectCategoryDTO.java index 8ac01ddb81..4c7b39c7d6 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectCategoryDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectCategoryDTO.java @@ -58,11 +58,6 @@ public class ProjectCategoryDTO implements Serializable { */ private String categoryId; - /** - * 分类名称 - */ - private String categoryName; - /** * 分类对应的所有上级,英文逗号隔开 */ diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectCategoryEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectCategoryEntity.java index ffcbb81753..ce718cc201 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectCategoryEntity.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectCategoryEntity.java @@ -58,11 +58,6 @@ public class ProjectCategoryEntity extends BaseEpmetEntity { */ private String categoryId; - /** - * 分类名称 - */ - private String categoryName; - /** * 分类对应的所有上级,英文逗号隔开 */ diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/ProjectCategoryExcel.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/ProjectCategoryExcel.java index fe471b49cd..515c2ddf7e 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/ProjectCategoryExcel.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/ProjectCategoryExcel.java @@ -46,9 +46,6 @@ public class ProjectCategoryExcel { @Excel(name = "分类id") private String categoryId; - @Excel(name = "分类名称") - private String categoryName; - @Excel(name = "分类对应的所有上级,英文逗号隔开") private String categoryPids; From 11d79aac71e1b61da29a3690a968e4ff5dd443ba Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 8 Dec 2020 17:11:30 +0800 Subject: [PATCH 006/375] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E8=AF=A6=E6=83=85-?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E5=88=86=E7=B1=BB=E6=9F=A5=E8=AF=A2-?= =?UTF-8?q?=E4=B8=A4=E7=AB=AF=E5=85=AC=E5=85=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/CategoryTagListFormDTO.java | 21 +++++++++++++ .../controller/IssueCategoryController.java | 17 +++++++++++ .../java/com/epmet/dao/IssueCategoryDao.java | 11 ++++++- .../main/java/com/epmet/dao/IssueTagsDao.java | 11 ++++++- .../epmet/service/IssueCategoryService.java | 11 +++++++ .../impl/IssueCategoryServiceImpl.java | 30 +++++++++++++++++++ .../resources/mapper/IssueCategoryDao.xml | 15 +++++++++- .../main/resources/mapper/IssueTagsDao.xml | 13 +++++++- .../dto/result/CategoryTagListResultDTO.java | 27 +++++++++++++++++ .../dto/result/CategoryTagResultDTO.java | 25 ++++++++++++++++ 10 files changed, 177 insertions(+), 4 deletions(-) create mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/CategoryTagListFormDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/CategoryTagListResultDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/CategoryTagResultDTO.java diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/CategoryTagListFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/CategoryTagListFormDTO.java new file mode 100644 index 0000000000..0cece7cac2 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/CategoryTagListFormDTO.java @@ -0,0 +1,21 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 获取议题的分类、标签列表-接口入参 + * @Author sun + */ +@Data +public class CategoryTagListFormDTO implements Serializable { + + private static final long serialVersionUID = 2599592072265715951L; + @NotBlank(message = "议题ID不能为空",groups = {CategoryTagListFormDTO.CategoryTag.class}) + private String issueId; + + public interface CategoryTag{} + +} diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCategoryController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCategoryController.java index ad5fd11583..aaf37deea0 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCategoryController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCategoryController.java @@ -26,6 +26,11 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.IssueCategoryDTO; +import com.epmet.dto.form.CategoryTagListFormDTO; +import com.epmet.dto.form.ClosedProjectIssueListFormDTO; +import com.epmet.dto.form.MyShiftIssueTopicsFormDTO; +import com.epmet.dto.result.CategoryTagListResultDTO; +import com.epmet.dto.result.LatestListResultDTO; import com.epmet.excel.IssueCategoryExcel; import com.epmet.service.IssueCategoryService; import org.springframework.beans.factory.annotation.Autowired; @@ -91,4 +96,16 @@ public class IssueCategoryController { ExcelUtils.exportExcelToTarget(response, null, list, IssueCategoryExcel.class); } + /** + * @param formDTO + * @return + * @Description 获取议题的分类、标签列表 + * @Author sun + **/ + @PostMapping("categorytaglist") + public Result categoryTagList(@RequestBody CategoryTagListFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, CategoryTagListFormDTO.CategoryTag.class); + return new Result().ok(issueCategoryService.categoryTagList(formDTO)); + } + } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueCategoryDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueCategoryDao.java index 94e91b086b..8fc966c738 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueCategoryDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueCategoryDao.java @@ -18,8 +18,12 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.CategoryTagResultDTO; import com.epmet.entity.IssueCategoryEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 议题所属分类表 @@ -29,5 +33,10 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IssueCategoryDao extends BaseDao { - + + /** + * @Description 查询议题绑定的分类名称,按排序升序 + * @Author sun + **/ + List selectIssueCategoryList(@Param("issueId") String issueId); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueTagsDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueTagsDao.java index 1cd8838351..89c3d9ef69 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueTagsDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueTagsDao.java @@ -18,8 +18,12 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.CategoryTagResultDTO; import com.epmet.entity.IssueTagsEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 议题关联标签表 @@ -29,5 +33,10 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IssueTagsDao extends BaseDao { - + + /** + * @Description 查询议题绑定的标签,按绑定时间升序 + * @Author sun + **/ + List selectIssueTagList(@Param("issueId") String issueId); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueCategoryService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueCategoryService.java index 92b700daa0..167621df74 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueCategoryService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueCategoryService.java @@ -20,6 +20,8 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IssueCategoryDTO; +import com.epmet.dto.form.CategoryTagListFormDTO; +import com.epmet.dto.result.CategoryTagListResultDTO; import com.epmet.entity.IssueCategoryEntity; import java.util.List; @@ -92,4 +94,13 @@ public interface IssueCategoryService extends BaseService { * @date 2020-12-08 */ void delete(String[] ids); + + /** + * @param formDTO + * @return + * @Description 获取议题的分类、标签列表 + * @Author sun + **/ + CategoryTagListResultDTO categoryTagList(CategoryTagListFormDTO formDTO); + } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java index 4e2a457af7..0d9ae06927 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java @@ -20,11 +20,16 @@ package com.epmet.service.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.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.dao.IssueCategoryDao; +import com.epmet.dao.IssueTagsDao; import com.epmet.dto.IssueCategoryDTO; +import com.epmet.dto.form.CategoryTagListFormDTO; +import com.epmet.dto.result.CategoryTagListResultDTO; +import com.epmet.dto.result.CategoryTagResultDTO; import com.epmet.entity.IssueCategoryEntity; import com.epmet.redis.IssueCategoryRedis; import com.epmet.service.IssueCategoryService; @@ -33,6 +38,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; @@ -48,6 +54,8 @@ public class IssueCategoryServiceImpl extends BaseServiceImpl page(Map params) { @@ -101,4 +109,26 @@ public class IssueCategoryServiceImpl extends BaseServiceImpl categoryList = baseDao.selectIssueCategoryList(formDTO.getIssueId()); + if (categoryList.size() > NumConstant.ZERO) { + resultDTO.setCategoryList(categoryList); + } + //2.查询议题绑定的标签,按绑定时间升序 + List tagList = issueTagsDao.selectIssueTagList(formDTO.getIssueId()); + if (tagList.size() > NumConstant.ZERO) { + resultDTO.setTagList(tagList); + } + return resultDTO; + } + } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml index 20f349dad8..465833cee1 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml @@ -3,6 +3,19 @@ - + \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueTagsDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueTagsDao.xml index d34e3bef22..ca008c94f6 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueTagsDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueTagsDao.xml @@ -3,6 +3,17 @@ - + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/CategoryTagListResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/CategoryTagListResultDTO.java new file mode 100644 index 0000000000..ee6186e3aa --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/CategoryTagListResultDTO.java @@ -0,0 +1,27 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * @Description 获取议题的分类、标签列表-接口返参 + * @Author sun + */ +@Data +public class CategoryTagListResultDTO implements Serializable { + + private static final long serialVersionUID = 5957826616179876849L; + + /** + * 类别集合 + */ + private List categoryList = new ArrayList<>(); + /** + * 标签集合 + */ + private List tagList = new ArrayList<>(); + +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/CategoryTagResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/CategoryTagResultDTO.java new file mode 100644 index 0000000000..2b4aa63fbe --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/CategoryTagResultDTO.java @@ -0,0 +1,25 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 获取议题的分类、标签列表-接口返参 + * @Author sun + */ +@Data +public class CategoryTagResultDTO implements Serializable { + + private static final long serialVersionUID = 5957826616179876849L; + + /** + * 分类或标签Id + */ + private String id; + /** + * 分类或标签名称 + */ + private String name; + +} From 4840bf722fd6d0d45bbe49160a99387dc5286f53 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 8 Dec 2020 18:07:11 +0800 Subject: [PATCH 007/375] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AF=A6=E6=83=85-?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E5=88=86=E7=B1=BB=E6=9F=A5=E8=AF=A2-?= =?UTF-8?q?=E4=B8=A4=E7=AB=AF=E5=85=B1=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ....java => IssueCategoryTagListFormDTO.java} | 4 +- .../IssueCategoryTagListResultDTO.java} | 6 +-- .../result/IssueCategoryTagResultDTO.java} | 2 +- .../epmet/feign/GovIssueOpenFeignClient.java | 9 +++- .../GovIssueOpenFeignClientFallBack.java | 11 ++++- .../controller/IssueCategoryController.java | 27 ++++++++---- .../java/com/epmet/dao/IssueCategoryDao.java | 13 +++++- .../main/java/com/epmet/dao/IssueTagsDao.java | 4 +- .../epmet/service/IssueCategoryService.java | 14 +++++-- .../impl/IssueCategoryServiceImpl.java | 29 +++++++++---- .../resources/mapper/IssueCategoryDao.xml | 19 ++++++++- .../main/resources/mapper/IssueTagsDao.xml | 14 +++---- .../form/ProjectCategoryTagListFormDTO.java | 22 ++++++++++ .../ProjectCategoryTagListResultDTO.java | 27 ++++++++++++ .../result/ProjectCategoryTagResultDTO.java | 25 +++++++++++ .../controller/ProjectCategoryController.java | 16 ++++++- .../com/epmet/dao/ProjectCategoryDao.java | 11 ++++- .../java/com/epmet/dao/ProjectTagsDao.java | 11 ++++- .../epmet/service/ProjectCategoryService.java | 10 +++++ .../impl/ProjectCategoryServiceImpl.java | 42 ++++++++++++++++++- .../resources/mapper/ProjectCategoryDao.xml | 10 ++++- .../main/resources/mapper/ProjectTagsDao.xml | 13 +++++- 22 files changed, 292 insertions(+), 47 deletions(-) rename epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/{CategoryTagListFormDTO.java => IssueCategoryTagListFormDTO.java} (66%) rename epmet-module/{gov-project/gov-project-client/src/main/java/com/epmet/dto/result/CategoryTagListResultDTO.java => gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueCategoryTagListResultDTO.java} (63%) rename epmet-module/{gov-project/gov-project-client/src/main/java/com/epmet/dto/result/CategoryTagResultDTO.java => gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueCategoryTagResultDTO.java} (84%) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectCategoryTagListFormDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectCategoryTagListResultDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectCategoryTagResultDTO.java diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/CategoryTagListFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueCategoryTagListFormDTO.java similarity index 66% rename from epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/CategoryTagListFormDTO.java rename to epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueCategoryTagListFormDTO.java index 0cece7cac2..d9339a0e97 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/CategoryTagListFormDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueCategoryTagListFormDTO.java @@ -10,10 +10,10 @@ import java.io.Serializable; * @Author sun */ @Data -public class CategoryTagListFormDTO implements Serializable { +public class IssueCategoryTagListFormDTO implements Serializable { private static final long serialVersionUID = 2599592072265715951L; - @NotBlank(message = "议题ID不能为空",groups = {CategoryTagListFormDTO.CategoryTag.class}) + @NotBlank(message = "议题ID不能为空",groups = {ProjectCategoryTagListFormDTO.CategoryTag.class}) private String issueId; public interface CategoryTag{} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/CategoryTagListResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueCategoryTagListResultDTO.java similarity index 63% rename from epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/CategoryTagListResultDTO.java rename to epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueCategoryTagListResultDTO.java index ee6186e3aa..cd78b59aaf 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/CategoryTagListResultDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueCategoryTagListResultDTO.java @@ -11,17 +11,17 @@ import java.util.List; * @Author sun */ @Data -public class CategoryTagListResultDTO implements Serializable { +public class IssueCategoryTagListResultDTO implements Serializable { private static final long serialVersionUID = 5957826616179876849L; /** * 类别集合 */ - private List categoryList = new ArrayList<>(); + private List categoryList = new ArrayList<>(); /** * 标签集合 */ - private List tagList = new ArrayList<>(); + private List tagList = new ArrayList<>(); } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/CategoryTagResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueCategoryTagResultDTO.java similarity index 84% rename from epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/CategoryTagResultDTO.java rename to epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueCategoryTagResultDTO.java index 2b4aa63fbe..23ac6afece 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/CategoryTagResultDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueCategoryTagResultDTO.java @@ -9,7 +9,7 @@ import java.io.Serializable; * @Author sun */ @Data -public class CategoryTagResultDTO implements Serializable { +public class IssueCategoryTagResultDTO implements Serializable { private static final long serialVersionUID = 5957826616179876849L; diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java index a974ae1109..fc1da4b290 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java @@ -2,8 +2,8 @@ package com.epmet.feign; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.Result; -import com.epmet.dto.IssueDTO; import com.epmet.dto.IssueApplicationDTO; +import com.epmet.dto.IssueDTO; import com.epmet.dto.IssueSuggestionDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; @@ -209,4 +209,11 @@ public interface GovIssueOpenFeignClient { **/ @PostMapping(value = "/gov/issue/issueapplication/queryuserpubauditingissues") Result> queryUserPubAuditingIssues(@RequestBody UserPubAuditingIssueFormDTO fomrDTO); + + /** + * @description 调用issue库,查询分类Id对应的分类名称,按分类升序排列 + * @author sun + **/ + @PostMapping(value = "/gov/issue/issuecategory/projectcategorylist") + Result> projectCategoryList(@RequestBody List categoryIdList); } diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java index ea59c6d349..5866034512 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java @@ -3,8 +3,8 @@ package com.epmet.feign.fallback; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.Result; -import com.epmet.dto.IssueDTO; import com.epmet.dto.IssueApplicationDTO; +import com.epmet.dto.IssueDTO; import com.epmet.dto.IssueSuggestionDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; @@ -193,4 +193,13 @@ public class GovIssueOpenFeignClientFallBack implements GovIssueOpenFeignClient public Result> queryUserPubAuditingIssues(UserPubAuditingIssueFormDTO fomrDTO) { return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "queryUserPubAuditingIssues", fomrDTO); } + + /** + * @description 调用issue库,查询分类Id对应的分类名称,按分类升序排列 + * @author sun + **/ + @Override + public Result> projectCategoryList(List categoryIdList) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "projectCategoryList", categoryIdList); + } } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCategoryController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCategoryController.java index aaf37deea0..83aa6560d7 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCategoryController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCategoryController.java @@ -23,14 +23,12 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IssueCategoryDTO; -import com.epmet.dto.form.CategoryTagListFormDTO; -import com.epmet.dto.form.ClosedProjectIssueListFormDTO; -import com.epmet.dto.form.MyShiftIssueTopicsFormDTO; -import com.epmet.dto.result.CategoryTagListResultDTO; -import com.epmet.dto.result.LatestListResultDTO; +import com.epmet.dto.form.IssueCategoryTagListFormDTO; +import com.epmet.dto.result.IssueCategoryTagListResultDTO; +import com.epmet.dto.result.ProjectCategoryTagResultDTO; import com.epmet.excel.IssueCategoryExcel; import com.epmet.service.IssueCategoryService; import org.springframework.beans.factory.annotation.Autowired; @@ -103,9 +101,20 @@ public class IssueCategoryController { * @Author sun **/ @PostMapping("categorytaglist") - public Result categoryTagList(@RequestBody CategoryTagListFormDTO formDTO) { - ValidatorUtils.validateEntity(formDTO, CategoryTagListFormDTO.CategoryTag.class); - return new Result().ok(issueCategoryService.categoryTagList(formDTO)); + public Result categoryTagList(@RequestBody IssueCategoryTagListFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, IssueCategoryTagListFormDTO.CategoryTag.class); + return new Result().ok(issueCategoryService.categoryTagList(formDTO)); + } + + /** + * @param categoryIdList + * @return + * @Description 查询分类Id集合对应的分类名称,按分类升序排列 + * @Author sun + **/ + @PostMapping("projectcategorylist") + public Result> projectCategoryList(@RequestBody List categoryIdList) { + return new Result>().ok(issueCategoryService.projectCategoryList(categoryIdList)); } } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueCategoryDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueCategoryDao.java index 8fc966c738..b1929c55f7 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueCategoryDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueCategoryDao.java @@ -18,7 +18,8 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.dto.result.CategoryTagResultDTO; +import com.epmet.dto.result.IssueCategoryTagResultDTO; +import com.epmet.dto.result.ProjectCategoryTagResultDTO; import com.epmet.entity.IssueCategoryEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -38,5 +39,13 @@ public interface IssueCategoryDao extends BaseDao { * @Description 查询议题绑定的分类名称,按排序升序 * @Author sun **/ - List selectIssueCategoryList(@Param("issueId") String issueId); + List selectIssueCategoryList(@Param("issueId") String issueId); + + /** + * @param categoryIdList + * @return + * @Description 查询分类Id对应的分类名称,按分类升序排列 + * @Author sun + **/ + List selectProjectCategoryList(List categoryIdList); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueTagsDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueTagsDao.java index 89c3d9ef69..e4c1e9e81d 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueTagsDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueTagsDao.java @@ -18,7 +18,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.dto.result.CategoryTagResultDTO; +import com.epmet.dto.result.IssueCategoryTagResultDTO; import com.epmet.entity.IssueTagsEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -38,5 +38,5 @@ public interface IssueTagsDao extends BaseDao { * @Description 查询议题绑定的标签,按绑定时间升序 * @Author sun **/ - List selectIssueTagList(@Param("issueId") String issueId); + List selectIssueTagList(@Param("issueId") String issueId); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueCategoryService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueCategoryService.java index 167621df74..6a3324c908 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueCategoryService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueCategoryService.java @@ -20,8 +20,9 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IssueCategoryDTO; -import com.epmet.dto.form.CategoryTagListFormDTO; -import com.epmet.dto.result.CategoryTagListResultDTO; +import com.epmet.dto.form.IssueCategoryTagListFormDTO; +import com.epmet.dto.result.IssueCategoryTagListResultDTO; +import com.epmet.dto.result.ProjectCategoryTagResultDTO; import com.epmet.entity.IssueCategoryEntity; import java.util.List; @@ -101,6 +102,13 @@ public interface IssueCategoryService extends BaseService { * @Description 获取议题的分类、标签列表 * @Author sun **/ - CategoryTagListResultDTO categoryTagList(CategoryTagListFormDTO formDTO); + IssueCategoryTagListResultDTO categoryTagList(IssueCategoryTagListFormDTO formDTO); + /** + * @param categoryIdList + * @return + * @Description 查询分类Id集合对应的分类名称,按分类升序排列 + * @Author sun + **/ + List projectCategoryList(List categoryIdList); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java index 0d9ae06927..82405538d6 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java @@ -20,16 +20,17 @@ package com.epmet.service.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.constant.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.dao.IssueCategoryDao; import com.epmet.dao.IssueTagsDao; import com.epmet.dto.IssueCategoryDTO; -import com.epmet.dto.form.CategoryTagListFormDTO; -import com.epmet.dto.result.CategoryTagListResultDTO; -import com.epmet.dto.result.CategoryTagResultDTO; +import com.epmet.dto.form.IssueCategoryTagListFormDTO; +import com.epmet.dto.result.IssueCategoryTagListResultDTO; +import com.epmet.dto.result.IssueCategoryTagResultDTO; +import com.epmet.dto.result.ProjectCategoryTagResultDTO; import com.epmet.entity.IssueCategoryEntity; import com.epmet.redis.IssueCategoryRedis; import com.epmet.service.IssueCategoryService; @@ -38,7 +39,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; @@ -116,19 +116,30 @@ public class IssueCategoryServiceImpl extends BaseServiceImpl categoryList = baseDao.selectIssueCategoryList(formDTO.getIssueId()); + List categoryList = baseDao.selectIssueCategoryList(formDTO.getIssueId()); if (categoryList.size() > NumConstant.ZERO) { resultDTO.setCategoryList(categoryList); } //2.查询议题绑定的标签,按绑定时间升序 - List tagList = issueTagsDao.selectIssueTagList(formDTO.getIssueId()); + List tagList = issueTagsDao.selectIssueTagList(formDTO.getIssueId()); if (tagList.size() > NumConstant.ZERO) { resultDTO.setTagList(tagList); } return resultDTO; } + /** + * @param categoryIdList + * @return + * @Description 查询分类Id集合对应的分类名称,按分类升序排列 + * @Author sun + **/ + @Override + public List projectCategoryList(List categoryIdList) { + return baseDao.selectProjectCategoryList(categoryIdList); + } + } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml index 465833cee1..833bd4df11 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml @@ -3,7 +3,7 @@ - SELECT ic.category_id AS "id", ip.category_name AS "name" @@ -18,4 +18,21 @@ ip.sort ASC + + \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueTagsDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueTagsDao.xml index ca008c94f6..9e15021e6d 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueTagsDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueTagsDao.xml @@ -3,17 +3,17 @@ - SELECT - it.tag_id AS "id", - it.tag_name AS "name" + tag_id AS "id", + tag_name AS "name" FROM - issue_tags it + issue_tags WHERE - it.del_flag = '0' - AND it.issue_id = #{issueId} + del_flag = '0' + AND issue_id = #{issueId} ORDER BY - it.created_time ASC + created_time ASC \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectCategoryTagListFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectCategoryTagListFormDTO.java new file mode 100644 index 0000000000..9c179732ac --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectCategoryTagListFormDTO.java @@ -0,0 +1,22 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 获取议题的分类、标签列表-接口入参 + * @Author sun + */ +@Data +public class ProjectCategoryTagListFormDTO implements Serializable { + + private static final long serialVersionUID = 2599592072265715951L; + @NotBlank(message = "议题ID不能为空",groups = {ProjectCategoryTagListFormDTO.CategoryTag.class}) + private String projectId; + + public interface CategoryTag{} + + +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectCategoryTagListResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectCategoryTagListResultDTO.java new file mode 100644 index 0000000000..43b33a74bf --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectCategoryTagListResultDTO.java @@ -0,0 +1,27 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * @Description 获取议题的分类、标签列表-接口返参 + * @Author sun + */ +@Data +public class ProjectCategoryTagListResultDTO implements Serializable { + + private static final long serialVersionUID = 5957826616179876849L; + + /** + * 类别集合 + */ + private List categoryList = new ArrayList<>(); + /** + * 标签集合 + */ + private List tagList = new ArrayList<>(); + +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectCategoryTagResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectCategoryTagResultDTO.java new file mode 100644 index 0000000000..375bc1a898 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectCategoryTagResultDTO.java @@ -0,0 +1,25 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 获取议题的分类、标签列表-接口返参 + * @Author sun + */ +@Data +public class ProjectCategoryTagResultDTO implements Serializable { + + private static final long serialVersionUID = 5957826616179876849L; + + /** + * 分类或标签Id + */ + private String id; + /** + * 分类或标签名称 + */ + private String name; + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectCategoryController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectCategoryController.java index 505d54c529..c773ece4f9 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectCategoryController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectCategoryController.java @@ -23,9 +23,11 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.ProjectCategoryDTO; +import com.epmet.dto.form.ProjectCategoryTagListFormDTO; +import com.epmet.dto.result.ProjectCategoryTagListResultDTO; import com.epmet.excel.ProjectCategoryExcel; import com.epmet.service.ProjectCategoryService; import org.springframework.beans.factory.annotation.Autowired; @@ -91,4 +93,16 @@ public class ProjectCategoryController { ExcelUtils.exportExcelToTarget(response, null, list, ProjectCategoryExcel.class); } + /** + * @param formDTO + * @return + * @Description 获取项目的分类、标签列表 + * @Author sun + **/ + @PostMapping("categorytaglist") + public Result categoryTagList(@RequestBody ProjectCategoryTagListFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, ProjectCategoryTagListFormDTO.CategoryTag.class); + return new Result().ok(projectCategoryService.categoryTagList(formDTO)); + } + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectCategoryDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectCategoryDao.java index 8186178086..ac041659f7 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectCategoryDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectCategoryDao.java @@ -20,6 +20,9 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.entity.ProjectCategoryEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 项目所属分类表 @@ -29,5 +32,11 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ProjectCategoryDao extends BaseDao { - + + /** + * @Description 查询项目绑定的分类Id集合 + * @Author sun + **/ + List selectProjectCategoryIdList(@Param("projectId") String projectId); + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectTagsDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectTagsDao.java index 2b4435ab5f..da5b1d39c9 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectTagsDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectTagsDao.java @@ -18,8 +18,12 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.ProjectCategoryTagResultDTO; import com.epmet.entity.ProjectTagsEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 项目关联标签表 @@ -29,5 +33,10 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ProjectTagsDao extends BaseDao { - + + /** + * @Description 查询项目绑定的标签,按绑定时间升序 + * @Author sun + **/ + List selectProjectTagList(@Param("projectId") String projectId); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectCategoryService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectCategoryService.java index 551b77ffbb..e31a951784 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectCategoryService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectCategoryService.java @@ -20,6 +20,8 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.ProjectCategoryDTO; +import com.epmet.dto.form.ProjectCategoryTagListFormDTO; +import com.epmet.dto.result.ProjectCategoryTagListResultDTO; import com.epmet.entity.ProjectCategoryEntity; import java.util.List; @@ -92,4 +94,12 @@ public interface ProjectCategoryService extends BaseService page(Map params) { @@ -101,4 +114,31 @@ public class ProjectCategoryServiceImpl extends BaseServiceImpl categoryIdList = baseDao.selectProjectCategoryIdList(formDTO.getProjectId()); + if (categoryIdList.size() > NumConstant.ZERO) { + //1-1.调用issue库,查询分类Id对应的分类名称,按分类升序排列 + Result> result = govIssueOpenFeignClient.projectCategoryList(categoryIdList); + if (!result.success()) { + throw new RenException(result.getInternalMsg()); + } + resultDTO.setCategoryList(result.getData()); + } + //2.查询项目绑定的标签,按绑定时间升序 + List tagList = projectTagsDao.selectProjectTagList(formDTO.getProjectId()); + if (tagList.size() > NumConstant.ZERO) { + resultDTO.setTagList(tagList); + } + return resultDTO; + } + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectCategoryDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectCategoryDao.xml index 5689229906..da4a2d332e 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectCategoryDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectCategoryDao.xml @@ -3,6 +3,14 @@ - + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectTagsDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectTagsDao.xml index 50ed689ab5..0936bcc4d4 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectTagsDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectTagsDao.xml @@ -3,6 +3,17 @@ - + \ No newline at end of file From 281404050b1c4500d0adadaa0873f0fa02952fe5 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 9 Dec 2020 10:46:15 +0800 Subject: [PATCH 008/375] =?UTF-8?q?=E5=88=86=E7=B1=BB=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/CustomerCategoryListFormDTO.java | 22 +++++++++++++ .../IssueProjectCategoryDictController.java | 28 +++++++++++++---- .../dao/IssueProjectCategoryDictDao.java | 16 +++++++++- .../IssueProjectCategoryDictService.java | 10 ++++++ .../IssueProjectCategoryDictServiceImpl.java | 18 +++++++++-- .../mapper/IssueProjectCategoryDictDao.xml | 31 +++++++++++++++++++ .../result/CustomerCategoryListResultDTO.java | 31 +++++++++++++++++++ 7 files changed, 147 insertions(+), 9 deletions(-) create mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/CustomerCategoryListFormDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/CustomerCategoryListResultDTO.java diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/CustomerCategoryListFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/CustomerCategoryListFormDTO.java new file mode 100644 index 0000000000..39ae42441e --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/CustomerCategoryListFormDTO.java @@ -0,0 +1,22 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 分类列表查询-接口入参 + * @Author sun + */ +@Data +public class CustomerCategoryListFormDTO implements Serializable { + + private static final long serialVersionUID = 2599592072265715951L; + @NotBlank(message = "客户ID不能为空",groups = {CustomerCategoryListFormDTO.Category.class}) + private String customerId; + + public interface Category{} + + +} diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java index 4f09b23bc1..87a31f658f 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java @@ -26,6 +26,10 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.IssueProjectCategoryDictDTO; +import com.epmet.dto.form.CustomerCategoryListFormDTO; +import com.epmet.dto.form.IssueCategoryTagListFormDTO; +import com.epmet.dto.result.CustomerCategoryListResultDTO; +import com.epmet.dto.result.ProjectCategoryTagResultDTO; import com.epmet.excel.IssueProjectCategoryDictExcel; import com.epmet.service.IssueProjectCategoryDictService; import org.springframework.beans.factory.annotation.Autowired; @@ -45,24 +49,24 @@ import java.util.Map; @RestController @RequestMapping("issueprojectcategorydict") public class IssueProjectCategoryDictController { - + @Autowired private IssueProjectCategoryDictService issueProjectCategoryDictService; @GetMapping("page") - public Result> page(@RequestParam Map params){ + public Result> page(@RequestParam Map params) { PageData page = issueProjectCategoryDictService.page(params); return new Result>().ok(page); } @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ + public Result get(@PathVariable("id") String id) { IssueProjectCategoryDictDTO data = issueProjectCategoryDictService.get(id); return new Result().ok(data); } @PostMapping - public Result save(@RequestBody IssueProjectCategoryDictDTO dto){ + public Result save(@RequestBody IssueProjectCategoryDictDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); issueProjectCategoryDictService.save(dto); @@ -70,7 +74,7 @@ public class IssueProjectCategoryDictController { } @PutMapping - public Result update(@RequestBody IssueProjectCategoryDictDTO dto){ + public Result update(@RequestBody IssueProjectCategoryDictDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); issueProjectCategoryDictService.update(dto); @@ -78,7 +82,7 @@ public class IssueProjectCategoryDictController { } @DeleteMapping - public Result delete(@RequestBody String[] ids){ + public Result delete(@RequestBody String[] ids) { //效验数据 AssertUtils.isArrayEmpty(ids, "id"); issueProjectCategoryDictService.delete(ids); @@ -91,4 +95,16 @@ public class IssueProjectCategoryDictController { ExcelUtils.exportExcelToTarget(response, null, list, IssueProjectCategoryDictExcel.class); } + /** + * @param formDTO + * @return + * @Description 客户分类列表查询,按分类升序排列 + * @Author sun + **/ + @PostMapping("list") + public Result> categoryList(@RequestBody CustomerCategoryListFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, CustomerCategoryListFormDTO.Category.class); + return new Result>().ok(issueProjectCategoryDictService.categoryList(formDTO)); + } + } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java index bd770671d5..485fef9b4b 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java @@ -18,8 +18,12 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.CustomerCategoryListResultDTO; import com.epmet.entity.IssueProjectCategoryDictEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 议题项目分类字典 @@ -29,5 +33,15 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IssueProjectCategoryDictDao extends BaseDao { - + + /** + * @Description 客户分类列表查询,按分类升序排列 + * @Author sun + **/ + List selectCustomerCategoryList(@Param("customerId") String customerId); + /** + * @Description 查询某个分类的下级分类 + * @Author sun + **/ + List subCategoryList(@Param("categoryId") String categoryId); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java index 5937393e1a..41a807cd40 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java @@ -20,6 +20,8 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IssueProjectCategoryDictDTO; +import com.epmet.dto.form.CustomerCategoryListFormDTO; +import com.epmet.dto.result.CustomerCategoryListResultDTO; import com.epmet.entity.IssueProjectCategoryDictEntity; import java.util.List; @@ -92,4 +94,12 @@ public interface IssueProjectCategoryDictService extends BaseService categoryList(CustomerCategoryListFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java index 1bdb075c24..3aa823b8d3 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java @@ -25,6 +25,8 @@ import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.dao.IssueProjectCategoryDictDao; import com.epmet.dto.IssueProjectCategoryDictDTO; +import com.epmet.dto.form.CustomerCategoryListFormDTO; +import com.epmet.dto.result.CustomerCategoryListResultDTO; import com.epmet.entity.IssueProjectCategoryDictEntity; import com.epmet.redis.IssueProjectCategoryDictRedis; import com.epmet.service.IssueProjectCategoryDictService; @@ -65,8 +67,8 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl getWrapper(Map params){ - String id = (String)params.get(FieldConstant.ID_HUMP); + 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); @@ -101,4 +103,16 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl categoryList(CustomerCategoryListFormDTO formDTO) { + List resultList = baseDao.selectCustomerCategoryList(formDTO.getCustomerId()); + return resultList; + } + } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml index 8be2371d88..26caac2d50 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml @@ -3,6 +3,37 @@ + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/CustomerCategoryListResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/CustomerCategoryListResultDTO.java new file mode 100644 index 0000000000..2ae7331706 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/CustomerCategoryListResultDTO.java @@ -0,0 +1,31 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Description 获取议题的分类、标签列表-接口返参 + * @Author sun + */ +@Data +public class CustomerCategoryListResultDTO implements Serializable { + + private static final long serialVersionUID = 5957826616179876849L; + + /** + * 分类Id + */ + private String id; + /** + * 分类名称 + */ + private String name; + + /** + * 子级分类对象 + */ + private List subCategory; + +} From 42fa70c787ac3275c78181b4fbb5a59157e0e13f Mon Sep 17 00:00:00 2001 From: wangchao Date: Wed, 9 Dec 2020 13:52:08 +0800 Subject: [PATCH 009/375] =?UTF-8?q?=E6=A0=87=E7=AD=BEkey=20=20=20=20=20?= =?UTF-8?q?=E6=A0=87=E7=AD=BEredis=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/constant/GovIssueRedisKeys.java | 12 +++++++++ .../epmet/redis/IssueProjectTagDictRedis.java | 27 +++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/constant/GovIssueRedisKeys.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/constant/GovIssueRedisKeys.java index 1da3dc7911..80635a483b 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/constant/GovIssueRedisKeys.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/constant/GovIssueRedisKeys.java @@ -18,5 +18,17 @@ public class GovIssueRedisKeys { public static String getWorkGrassrootsIssueRedDotKey(String gridId) { return rootPrefix.concat(String.format("gov:wxmp:work:grassroots:issue:%s",gridId)); } + + /** + * 议题项目标签key epmet:govern:customer:category:[customerId]:[categoryId] + * + * 自定义标签的categoryId统一为[customize] + * @param customerId + * @param categoryId + * @return + */ + public static String getGovernmentTagKey(String customerId,String categoryId){ + return rootPrefix.concat("govern:customer:category:").concat(customerId).concat(":").concat(categoryId); + } } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java index 7c9f56bd38..662b85402c 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java @@ -18,9 +18,14 @@ package com.epmet.redis; import com.epmet.commons.tools.redis.RedisUtils; +import com.epmet.dto.result.IssueCategoryTagResultDTO; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; +import java.util.List; + /** * 议题、项目标签字典表 * @@ -28,6 +33,7 @@ import org.springframework.stereotype.Component; * @since v1.0.0 2020-12-08 */ @Component +@Slf4j public class IssueProjectTagDictRedis { @Autowired private RedisUtils redisUtils; @@ -44,4 +50,25 @@ public class IssueProjectTagDictRedis { return null; } + /** + * @Description 传入category列表,返回对应category下的标签,按热度排序 + * category列表为空则查询客户下全部 + * 如果想要自定义标签,单独请求一次,分类列表中只含"customize" + * + * @param customerId + * @param category + * @return java.util.List + * @author wangc + * @date 2020.12.09 11:16 + */ + public List getTagsOrderByRank(String customerId,List category){ + if(StringUtils.isBlank(customerId)) { + log.error("customerId can not be null when obtain govern tags cache"); + return null; + } + + + return null; + } + } \ No newline at end of file From 2533e106f0152d19849fbbe17d34afecdf05034c Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 9 Dec 2020 14:16:09 +0800 Subject: [PATCH 010/375] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=87=AA=E6=B5=8B?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dao/IssueCategoryDao.java | 2 +- .../com/epmet/dao/IssueProjectCategoryDictDao.java | 2 +- .../src/main/resources/mapper/IssueCategoryDao.xml | 4 ++-- .../resources/mapper/IssueProjectCategoryDictDao.xml | 12 ++++++------ 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueCategoryDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueCategoryDao.java index b1929c55f7..ad55b96802 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueCategoryDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueCategoryDao.java @@ -47,5 +47,5 @@ public interface IssueCategoryDao extends BaseDao { * @Description 查询分类Id对应的分类名称,按分类升序排列 * @Author sun **/ - List selectProjectCategoryList(List categoryIdList); + List selectProjectCategoryList(@Param("categoryIdList") List categoryIdList); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java index 485fef9b4b..c3e44340e4 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java @@ -43,5 +43,5 @@ public interface IssueProjectCategoryDictDao extends BaseDao subCategoryList(@Param("categoryId") String categoryId); + List subCategoryList(@Param("id") String categoryId); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml index 833bd4df11..875e1c755b 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml @@ -26,13 +26,13 @@ issue_project_category_dict WHERE del_flag = '0' - + id = #{id} ORDER BY - ip.sort ASC + sort ASC \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml index 26caac2d50..e638fec0b8 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml @@ -5,16 +5,16 @@ - - + + - + SELECT id AS "id", - category_type AS "name" + category_name AS "name" FROM issue_project_category_dict WHERE del_flag = '0' - AND pid = #{categoryId} + AND pid = #{id} ORDER BY sort ASC From 4b1cb6549835785774ec8763161bac4e0f410cf3 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 9 Dec 2020 14:39:39 +0800 Subject: [PATCH 011/375] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E3=80=81=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E5=88=86=E7=B1=BB=E3=80=81=E6=A0=87=E7=AD=BEspl?= =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V0.0.7__add_category_tag.sql | 67 +++++++++++++++++++ .../db/migration/V0.0.5__add_category_tag.sql | 30 +++++++++ 2 files changed, 97 insertions(+) create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.7__add_category_tag.sql create mode 100644 epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.5__add_category_tag.sql diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.7__add_category_tag.sql b/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.7__add_category_tag.sql new file mode 100644 index 0000000000..b198293630 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.7__add_category_tag.sql @@ -0,0 +1,67 @@ +CREATE TABLE `issue_project_category_dict` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id, 产品默认default', + `PID` varchar(64) NOT NULL COMMENT '上级分类ID 顶级此列存储0', + `PIDS` varchar(512) NOT NULL COMMENT '所有上级分类ID,用逗号分开', + `CATEGORY_CODE` varchar(50) DEFAULT NULL COMMENT '分类编码,分类编码+customer_id唯一', + `CATEGORY_NAME` varchar(500) NOT NULL COMMENT '分类名称', + `CATEGORY_TYPE` varchar(50) NOT NULL COMMENT '分类类别1,2,3,4....', + `SORT` int(10) unsigned NOT NULL COMMENT '排序', + `DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除、1已删除', + `REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', + `CREATED_BY` varchar(32) CHARACTER SET utf8mb4 NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`,`CUSTOMER_ID`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='议题项目分类字典'; + +CREATE TABLE `issue_project_tag_dict` ( + `ID` varchar(64) NOT NULL COMMENT '主键ID', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', + `TAG_NAME` varchar(32) NOT NULL COMMENT '标签名称', + `CATEGORY_ID` varchar(64) DEFAULT NULL COMMENT '分类id, 用户自己添加的标签此列可为空', + `IS_DEFAULT` varchar(32) NOT NULL COMMENT '是否是默认标签(0:是 1:否)', + `ISSUE_USE_COUNT` int(10) NOT NULL DEFAULT '0' COMMENT '议题对标签的引用次数', + `PROJECT_USE_COUNT` int(10) NOT NULL DEFAULT '0' COMMENT '项目对标签的引用次数', + `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='议题、项目标签字典表'; + + +CREATE TABLE `issue_category` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', + `GRID_ID` varchar(64) NOT NULL COMMENT '网格ID: 议题所属网格Id', + `ISSUE_ID` varchar(64) NOT NULL COMMENT '议题id', + `CATEGORY_ID` varchar(64) NOT NULL COMMENT '分类id', + `CATEGORY_PIDS` varchar(512) NOT NULL COMMENT '分类对应的所有上级,英文逗号隔开', + `DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除、1已删除', + `REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='议题所属分类表'; + +CREATE TABLE `issue_tags` ( + `ID` varchar(64) NOT NULL COMMENT '主键ID', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', + `GRID_ID` varchar(64) NOT NULL COMMENT '议题所属网格id', + `ISSUE_ID` varchar(64) NOT NULL COMMENT '议题ID', + `TAG_ID` varchar(64) NOT NULL COMMENT '标签ID', + `TAG_NAME` varchar(32) NOT NULL COMMENT '标签名称', + `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='议题关联标签表'; \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.5__add_category_tag.sql b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.5__add_category_tag.sql new file mode 100644 index 0000000000..b67338043b --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.5__add_category_tag.sql @@ -0,0 +1,30 @@ +CREATE TABLE `project_category` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', + `GRID_ID` varchar(64) DEFAULT NULL COMMENT '来源网格id', + `PROJECT_ID` varchar(64) NOT NULL COMMENT '项目id', + `CATEGORY_ID` varchar(64) NOT NULL COMMENT '分类id', + `CATEGORY_PIDS` varchar(512) NOT NULL COMMENT '分类对应的所有上级,英文逗号隔开', + `DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除、1已删除', + `REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='项目所属分类表'; + +CREATE TABLE `project_tags` ( + `ID` varchar(64) NOT NULL COMMENT '主键ID', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', + `PROJECT_ID` varchar(64) NOT NULL COMMENT '项目ID', + `TAG_ID` varchar(64) NOT NULL COMMENT '标签ID', + `TAG_NAME` varchar(32) NOT NULL COMMENT '标签名称', + `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='项目关联标签表'; From 95fc91a91024f4b8571a1f69be7bca9b3326c523 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 9 Dec 2020 15:12:27 +0800 Subject: [PATCH 012/375] =?UTF-8?q?=E6=A0=87=E7=AD=BE=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E6=AC=A1=E6=95=B0=E7=BC=93=E5=AD=98=E4=BF=AE=E6=94=B9=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/commons/tools/redis/RedisUtils.java | 18 ++++++++++--- .../epmet/redis/IssueProjectTagDictRedis.java | 27 ++++++++++++++++++- 2 files changed, 41 insertions(+), 4 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisUtils.java index af891dc817..6e96d4c9dc 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisUtils.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisUtils.java @@ -10,12 +10,13 @@ package com.epmet.commons.tools.redis; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.exception.RenException; -import com.epmet.commons.tools.utils.ConvertUtils; -import org.apache.poi.ss.formula.functions.T; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory; -import org.springframework.data.redis.core.*; +import org.springframework.data.redis.core.HashOperations; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.data.redis.core.StringRedisTemplate; +import org.springframework.data.redis.core.ZSetOperations; import org.springframework.data.redis.support.atomic.RedisAtomicLong; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; @@ -363,6 +364,17 @@ public class RedisUtils { return redisTemplate.opsForZSet().incrementScore(key, value, delta); } + /** + * @Description 获取某个Zset的score + * @Param key + * @Param o + * @author zxc + * @date 2020/12/9 下午3:07 + */ + public Double getScore(String key, Object o){ + return redisTemplate.opsForZSet().score(key,o); + } + /** * @Description 判断key是否存在 * @param key diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java index 662b85402c..bfb6355cfa 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java @@ -17,10 +17,12 @@ package com.epmet.redis; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.redis.RedisUtils; +import com.epmet.constant.GovIssueRedisKeys; import com.epmet.dto.result.IssueCategoryTagResultDTO; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @@ -71,4 +73,27 @@ public class IssueProjectTagDictRedis { return null; } + /** + * @Description 标签使用次数修改 + * @Param customerId 客户ID + * @Param categoryId 标签ID 自定义标签的categoryId统一为[customize] + * @Param formDTO + * @Param status 标签次数更新状态 0:+1,1:-1 + * @author zxc + * @date 2020/12/9 下午2:54 + */ + public void editTagUseCount(String customerId,String categoryId, Object formDTO,String status){ + String key = GovIssueRedisKeys.getGovernmentTagKey(customerId, categoryId); + if (status.equals(NumConstant.ZERO_STR)){ + // 标签使用次数+1 + redisUtils.zIncrementScore(key, formDTO,NumConstant.ONE); + } + if (status.equals(NumConstant.ONE_STR)){ + //标签使用次数-1 + if (redisUtils.getScore(key,formDTO)>NumConstant.ZERO){ + redisUtils.zIncrementScore(key, formDTO,NumConstant.ONE_NEG); + } + } + } + } \ No newline at end of file From 7a46652a74dc1c96491b05ce24b703843301ef4d Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 9 Dec 2020 15:22:02 +0800 Subject: [PATCH 013/375] =?UTF-8?q?=E6=A0=87=E7=AD=BE=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/commons/tools/redis/RedisUtils.java | 11 +++++++++++ .../com/epmet/redis/IssueProjectTagDictRedis.java | 13 +++++++++++++ 2 files changed, 24 insertions(+) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisUtils.java index 6e96d4c9dc..de481f10fd 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisUtils.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisUtils.java @@ -375,6 +375,17 @@ public class RedisUtils { return redisTemplate.opsForZSet().score(key,o); } + /** + * @Description zset添加 + * @Param key + * @Param o + * @author zxc + * @date 2020/12/9 下午3:18 + */ + public void zSetAdd(String key, Object o){ + redisTemplate.opsForZSet().add(key,o,NumConstant.ZERO); + } + /** * @Description 判断key是否存在 * @param key diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java index bfb6355cfa..5236c91a56 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java @@ -96,4 +96,17 @@ public class IssueProjectTagDictRedis { } } + /** + * @Description 标签添加 + * @Param customerId + * @Param categoryId + * @Param o + * @author zxc + * @date 2020/12/9 下午3:19 + */ + public void addIssueProjectTag(String customerId,String categoryId,Object o){ + String key = GovIssueRedisKeys.getGovernmentTagKey(customerId, categoryId); + redisUtils.zSetAdd(key,o); + } + } \ No newline at end of file From 8cfdf0b6678e2c63552c454cd77953c28589a2a8 Mon Sep 17 00:00:00 2001 From: wangchao Date: Wed, 9 Dec 2020 15:46:01 +0800 Subject: [PATCH 014/375] =?UTF-8?q?=E6=A0=87=E7=AD=BEredis=20fetch?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/IssueCategoryTagResultDTO.java | 15 ++++++ .../com/epmet/constant/GovIssueRedisKeys.java | 6 ++- .../epmet/redis/IssueProjectTagDictRedis.java | 48 +++++++++++++++++-- .../java/com/epmet/utils/ModuleConstants.java | 2 + 4 files changed, 67 insertions(+), 4 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueCategoryTagResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueCategoryTagResultDTO.java index 23ac6afece..a36724d35a 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueCategoryTagResultDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueCategoryTagResultDTO.java @@ -3,6 +3,7 @@ package com.epmet.dto.result; import lombok.Data; import java.io.Serializable; +import java.util.Objects; /** * @Description 获取议题的分类、标签列表-接口返参 @@ -22,4 +23,18 @@ public class IssueCategoryTagResultDTO implements Serializable { */ private String name; + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + IssueCategoryTagResultDTO that = (IssueCategoryTagResultDTO) o; + return Objects.equals(id, that.id) && + Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/constant/GovIssueRedisKeys.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/constant/GovIssueRedisKeys.java index 80635a483b..c9890f47b5 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/constant/GovIssueRedisKeys.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/constant/GovIssueRedisKeys.java @@ -1,5 +1,9 @@ package com.epmet.constant; +import com.epmet.utils.ModuleConstants; + +import java.util.Optional; + /** * @Description gov-issue-server模块redis key * @Author yinzuomei @@ -28,7 +32,7 @@ public class GovIssueRedisKeys { * @return */ public static String getGovernmentTagKey(String customerId,String categoryId){ - return rootPrefix.concat("govern:customer:category:").concat(customerId).concat(":").concat(categoryId); + return rootPrefix.concat("govern:customer:category:").concat(customerId).concat(":").concat(Optional.ofNullable(categoryId).orElse(ModuleConstants.ASTERISK)); } } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java index 5236c91a56..873a5c9f83 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java @@ -22,11 +22,22 @@ import com.epmet.commons.tools.redis.RedisUtils; import com.epmet.constant.GovIssueRedisKeys; import com.epmet.dto.result.IssueCategoryTagResultDTO; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.dao.DataAccessException; +import org.springframework.data.redis.connection.RedisConnection; +import org.springframework.data.redis.core.RedisCallback; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.data.redis.core.ZSetOperations; +import org.springframework.lang.Nullable; import org.springframework.stereotype.Component; +import org.springframework.util.CollectionUtils; +import java.util.HashMap; import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; /** * 议题、项目标签字典表 @@ -39,7 +50,8 @@ import java.util.List; public class IssueProjectTagDictRedis { @Autowired private RedisUtils redisUtils; - + @Autowired + private RedisTemplate redisTemplate; public void delete(Object[] ids) { } @@ -65,10 +77,40 @@ public class IssueProjectTagDictRedis { */ public List getTagsOrderByRank(String customerId,List category){ if(StringUtils.isBlank(customerId)) { - log.error("customerId can not be null when obtain govern tags cache"); + log.error("customerId can not be null when obtain govern tags."); return null; } + Set keys; + if(CollectionUtils.isEmpty(category)) + keys = redisUtils.keys(GovIssueRedisKeys.getGovernmentTagKey(customerId,null)); + else keys = category.stream().map(key -> {return GovIssueRedisKeys.getGovernmentTagKey(customerId,key);}).collect(Collectors.toSet()); + + List>> heatTuple = redisTemplate.executePipelined(new RedisCallback>>() { + @Nullable + @Override + public Set> doInRedis(RedisConnection connection) throws DataAccessException { + connection.openPipeline(); + keys.forEach(key -> { + connection.zSetCommands().zRangeByScoreWithScores(redisTemplate.getKeySerializer().serialize(key), NumConstant.ZERO_L, (long) (NumConstant.ONE_NEG)); + }); + return null; + } + },redisTemplate.getValueSerializer()); + //热度Map 分数为key + Map> heatMap = new HashMap<>(); + if(CollectionUtils.isEmpty(heatTuple)){ + + } + + log.warn("fetch customer govern tag cache blankly , customerId:{} , now begin compensation...",customerId); + //TODO 补偿机制 + + log.warn("compensation completed !!"); + return null; + } + + public List compensate(String customerId,List category){ return null; } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/utils/ModuleConstants.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/utils/ModuleConstants.java index 7aa596b986..a18dde80d5 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/utils/ModuleConstants.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/utils/ModuleConstants.java @@ -154,4 +154,6 @@ public interface ModuleConstants { String ISSUE_ACTION_SHIFT = "转议题"; String ISSUE_ACTION_REJECT = "驳回"; + + String ASTERISK = "*"; } From d537d7e8d6902b3a19331b25c26893f78776d8f3 Mon Sep 17 00:00:00 2001 From: wangchao Date: Wed, 9 Dec 2020 15:49:08 +0800 Subject: [PATCH 015/375] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/redis/IssueProjectTagDictRedis.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java index 873a5c9f83..df87613ffc 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java @@ -104,14 +104,16 @@ public class IssueProjectTagDictRedis { } log.warn("fetch customer govern tag cache blankly , customerId:{} , now begin compensation...",customerId); - //TODO 补偿机制 - log.warn("compensation completed !!"); - return null; + List compensate = compensate(customerId, category); + + if(CollectionUtils.isEmpty(compensate)) {log.error("compensation failure or there is no default tag data in database !!"); return null;} + else{log.warn("compensation completed !!"); return compensate;} + } public List compensate(String customerId,List category){ - + //TODO 补偿机制 return null; } From 9a5ed155611d6e752d15d64ff2da0ce15e36c414 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Wed, 9 Dec 2020 16:06:01 +0800 Subject: [PATCH 016/375] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E8=BD=AC=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE-=E5=88=86=E7=B1=BB=E6=A0=87=E7=AD=BE=20=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/exception/EpmetErrorCode.java | 1 + .../epmet/dto/form/ShiftProjectFormDTO.java | 10 ++ .../com/epmet/dto/form/TagListFormDTO.java | 17 +++ .../epmet/dto/result/TagListResultDTO.java | 18 +++ .../controller/IssueManageController.java | 16 +++ .../IssueProjectTagDictController.java | 16 +++ .../java/com/epmet/dao/IssueCategoryDao.java | 11 ++ .../main/java/com/epmet/dao/IssueTagsDao.java | 10 ++ .../epmet/service/IssueCategoryService.java | 9 ++ .../service/IssueProjectTagDictService.java | 13 ++ .../java/com/epmet/service/IssueService.java | 9 ++ .../com/epmet/service/IssueTagsService.java | 9 ++ .../impl/IssueCategoryServiceImpl.java | 13 ++ .../impl/IssueProjectTagDictServiceImpl.java | 17 +++ .../epmet/service/impl/IssueServiceImpl.java | 120 ++++++++++++++++++ .../service/impl/IssueTagsServiceImpl.java | 13 ++ .../resources/mapper/IssueCategoryDao.xml | 10 ++ .../main/resources/mapper/IssueTagsDao.xml | 12 ++ .../service/impl/ProjectServiceImpl.java | 33 +++++ 19 files changed, 357 insertions(+) create mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/TagListFormDTO.java create mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/TagListResultDTO.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index 4d3c107de3..102be5a3b7 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -126,6 +126,7 @@ public enum EpmetErrorCode { ARTICLE_PUBLISH_ERROR(8801, "发布文章失败,请刷新重试"), REPEATED_SUBMIT_ERROR(8998, "请勿重复提交"), CUSTOMER_VALIDATE_ERROR(8999, "内部数据校验异常"), + CATEGORY_IS_NULL(8811, "请设置分类"), //公众号 865..开头的码 PUBLIC_NOT_EXISTS(8651,"手机号未注册,请先完成信息注册"), diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ShiftProjectFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ShiftProjectFormDTO.java index cf576522ac..b44cdb4acd 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ShiftProjectFormDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ShiftProjectFormDTO.java @@ -1,6 +1,8 @@ package com.epmet.dto.form; +import com.epmet.dto.IssueCategoryDTO; import com.epmet.dto.IssueDTO; +import com.epmet.dto.IssueTagsDTO; import com.epmet.resi.group.dto.topic.ResiTopicDTO; import lombok.Data; import org.hibernate.validator.constraints.Length; @@ -42,6 +44,14 @@ public class ShiftProjectFormDTO implements Serializable { * 话题对象信息 */ private ResiTopicDTO topicDTO ; + /** + * 议题分类 + */ + private List categoryList; + /** + * 议题标签 + */ + private List tagList; } diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/TagListFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/TagListFormDTO.java new file mode 100644 index 0000000000..f09aaa4272 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/TagListFormDTO.java @@ -0,0 +1,17 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/12/9 15:32 + */ +@Data +public class TagListFormDTO implements Serializable { + private static final long serialVersionUID = -6448213704058150588L; + private List categoryIdList; +} diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/TagListResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/TagListResultDTO.java new file mode 100644 index 0000000000..1590463176 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/TagListResultDTO.java @@ -0,0 +1,18 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/12/9 15:33 + */ +@Data +public class TagListResultDTO implements Serializable { + private static final long serialVersionUID = -4247291364077634874L; + List defaulted; + List customized; +} diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueManageController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueManageController.java index 9eb5fb0c7d..3887b48938 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueManageController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueManageController.java @@ -168,6 +168,22 @@ public class IssueManageController { return new Result(); } + /** + * 议题管理-议题转项目-增加分类标签功能 + * @author zhaoqifeng + * @date 2020/12/9 9:58 + * @param tokenDTO + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + */ + @PostMapping("shiftproject-v2") + public Result shiftProjectV2(@LoginUser TokenDto tokenDTO, @RequestBody ShiftProjectFormDTO formDTO) { + formDTO.setStaffId(tokenDTO.getUserId()); + ValidatorUtils.validateEntity(formDTO); + issueService.shiftProject(formDTO); + return new Result(); + } + /** * @Description 政府端查看议题进展 (已关闭单表查询,转议题跨服务查询) * @param issueId diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectTagDictController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectTagDictController.java index f4dbe2b03e..67d923b73a 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectTagDictController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectTagDictController.java @@ -17,7 +17,9 @@ package com.epmet.controller; +import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; @@ -26,6 +28,8 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.IssueProjectTagDictDTO; +import com.epmet.dto.form.TagListFormDTO; +import com.epmet.dto.result.TagListResultDTO; import com.epmet.excel.IssueProjectTagDictExcel; import com.epmet.service.IssueProjectTagDictService; import org.springframework.beans.factory.annotation.Autowired; @@ -91,4 +95,16 @@ public class IssueProjectTagDictController { ExcelUtils.exportExcelToTarget(response, null, list, IssueProjectTagDictExcel.class); } + /** + * 标签列表 + * @author zhaoqifeng + * @date 2020/12/9 15:43 + * @param tokenDto + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + */ + @PostMapping("list") + public Result list(@LoginUser TokenDto tokenDto, @RequestBody TagListFormDTO formDTO) { + return new Result().ok(issueProjectTagDictService.getTagList(tokenDto, formDTO)); + } } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueCategoryDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueCategoryDao.java index ad55b96802..7c6d4dbcc8 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueCategoryDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueCategoryDao.java @@ -18,6 +18,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.IssueCategoryDTO; import com.epmet.dto.result.IssueCategoryTagResultDTO; import com.epmet.dto.result.ProjectCategoryTagResultDTO; import com.epmet.entity.IssueCategoryEntity; @@ -48,4 +49,14 @@ public interface IssueCategoryDao extends BaseDao { * @Author sun **/ List selectProjectCategoryList(@Param("categoryIdList") List categoryIdList); + List selectProjectCategoryList(List categoryIdList); + + /** + * 获取议题分类 + * @author zhaoqifeng + * @date 2020/12/9 10:46 + * @param issueId + * @return java.util.List + */ + List selectCategoryByIssue(@Param("issueId") String issueId); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueTagsDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueTagsDao.java index e4c1e9e81d..547b840c17 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueTagsDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueTagsDao.java @@ -18,6 +18,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.IssueTagsDTO; import com.epmet.dto.result.IssueCategoryTagResultDTO; import com.epmet.entity.IssueTagsEntity; import org.apache.ibatis.annotations.Mapper; @@ -39,4 +40,13 @@ public interface IssueTagsDao extends BaseDao { * @Author sun **/ List selectIssueTagList(@Param("issueId") String issueId); + + /** + * 获取议题标签 + * @author zhaoqifeng + * @date 2020/12/9 14:05 + * @param issueId + * @return java.util.List + */ + List selectTagsByIssue(@Param("issueId") String issueId); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueCategoryService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueCategoryService.java index 6a3324c908..412c9199f1 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueCategoryService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueCategoryService.java @@ -111,4 +111,13 @@ public interface IssueCategoryService extends BaseService { * @Author sun **/ List projectCategoryList(List categoryIdList); + + /** + * 获取议题分类 + * @author zhaoqifeng + * @date 2020/12/9 10:48 + * @param issueId + * @return java.util.List + */ + List getCategoryByIssue(String issueId); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectTagDictService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectTagDictService.java index 46521d6bbb..9c730be5bc 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectTagDictService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectTagDictService.java @@ -19,7 +19,10 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.IssueProjectTagDictDTO; +import com.epmet.dto.form.TagListFormDTO; +import com.epmet.dto.result.TagListResultDTO; import com.epmet.entity.IssueProjectTagDictEntity; import java.util.List; @@ -92,4 +95,14 @@ public interface IssueProjectTagDictService extends BaseService { **/ void shiftProject(ShiftProjectFormDTO formDTO); + /** + * 议题管理-议题转项目-增加分类标签功能 + * @author zhaoqifeng + * @date 2020/12/9 10:01 + * @param formDTO + * @return void + */ + void shiftProjectV2(ShiftProjectFormDTO formDTO); + /** * @Description 已关闭列表 政府端 * @param issueListForm diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueTagsService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueTagsService.java index b4e37ae7c0..5bc717fb3c 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueTagsService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueTagsService.java @@ -92,4 +92,13 @@ public interface IssueTagsService extends BaseService { * @date 2020-12-08 */ void delete(String[] ids); + + /** + * 获取议题标签 + * @author zhaoqifeng + * @date 2020/12/9 14:07 + * @param issueId + * @return java.util.List + */ + List getTagsByIssue(String issueId); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java index 82405538d6..94e492abf5 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java @@ -142,4 +142,17 @@ public class IssueCategoryServiceImpl extends BaseServiceImpl + * @author zhaoqifeng + * @date 2020/12/9 10:48 + */ + @Override + public List getCategoryByIssue(String issueId) { + return baseDao.selectCategoryByIssue(issueId); + } + } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectTagDictServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectTagDictServiceImpl.java index 2250587ec3..aae0d8dc5d 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectTagDictServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectTagDictServiceImpl.java @@ -21,10 +21,13 @@ 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.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.dao.IssueProjectTagDictDao; import com.epmet.dto.IssueProjectTagDictDTO; +import com.epmet.dto.form.TagListFormDTO; +import com.epmet.dto.result.TagListResultDTO; import com.epmet.entity.IssueProjectTagDictEntity; import com.epmet.redis.IssueProjectTagDictRedis; import com.epmet.service.IssueProjectTagDictService; @@ -101,4 +104,18 @@ public class IssueProjectTagDictServiceImpl extends BaseServiceImpl imp private EpmetUserOpenFeignClient userOpenFeignClient; @Autowired private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient; + @Autowired + private IssueCategoryService issueCategoryService; + @Autowired + private IssueTagsService issueTagsService; + @Autowired + private IssueProjectTagDictService issueProjectTagDictService; @Value("${openapi.scan.server.url}") @@ -879,6 +885,120 @@ public class IssueServiceImpl extends BaseServiceImpl imp } } + /** + * 议题管理-议题转项目-增加分类标签功能 + * + * @param formDTO + * @return void + * @author zhaoqifeng + * @date 2020/12/9 10:01 + */ + @Override + public void shiftProjectV2(ShiftProjectFormDTO formDTO) { + + //获取议题分类 + List categoryList = issueCategoryService.getCategoryByIssue(formDTO.getIssueId()); + if (CollectionUtils.isEmpty(categoryList)) { + throw new RenException(EpmetErrorCode.CATEGORY_IS_NULL.getCode()); + } + + //公开回复内容审核 + if (StringUtils.isNotBlank(formDTO.getPublicReply())) { + TextScanParamDTO textScanParamDTO = new TextScanParamDTO(); + TextTaskDTO taskDTO = new TextTaskDTO(); + taskDTO.setDataId(UUID.randomUUID().toString().replace("-", "")); + taskDTO.setContent(formDTO.getPublicReply()); + textScanParamDTO.getTasks().add(taskDTO); + Result textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); + if (!textSyncScanResult.success()) { + throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); + } else { + if (!textSyncScanResult.getData().isAllPass()) { + throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode()); + } + } + } + + //因需要保证议题表中的转项目时间与创建项目时间一致 因此先新增项目数据再更新议题数据 + //1:查询议题数据 + IssueEntity entity = baseDao.selectById(formDTO.getIssueId()); + if (null == entity) { + throw new RenException(IssueConstant.SELECT_EXCEPTION); + } + if (IssueConstant.ISSUE_SHIFT_PROJECT.equals(entity.getIssueStatus())) { + throw new RenException(IssueConstant.ISSUE_SHIFT_PROJECT_EXCEPTION); + } + if (!IssueConstant.ISSUE_VOTING.equals(entity.getIssueStatus())) { + throw new RenException(IssueConstant.ISSUE_VOTING_EXCEPTION); + } + formDTO.setIssueDTO(ConvertUtils.sourceToTarget(entity, IssueDTO.class)); + + //2:调用resi-group查询话题创建人数据(目前议题来源只有来自话题),为了到项目服务初始数据以及发送消息使用 + Result resultTopicDTO = resiGroupFeignClient.getTopicById(entity.getSourceId()); + if (!resultTopicDTO.success() || null == resultTopicDTO.getData()) { + throw new RenException(IssueConstant.SELECT_TOPIC_EXCEPTION); + } + ResiTopicDTO topicDTO = resultTopicDTO.getData(); + formDTO.setTopicDTO(topicDTO); + + //3:调用gov-project服务,新增项目各业务表初始数据 + formDTO.setCategoryList(categoryList); + List tagList = issueTagsService.getTagsByIssue(formDTO.getIssueId()); + formDTO.setTagList(tagList); + Result resultDTO = govProjectFeignClient.issueShiftProject(formDTO); + if (!resultDTO.success() || null == resultDTO.getData()) { + logger.error(resultDTO.getInternalMsg()); + throw new RenException(IssueConstant.GOV_PRJECT_EXCEPTION); + } + IssueProjectResultDTO issueProjectResultDTO = resultDTO.getData(); + //更新项目对标签的引用次数 + if (CollectionUtils.isNotEmpty(tagList)) { + tagList.forEach(item -> { + IssueProjectTagDictDTO tag = issueProjectTagDictService.get(item.getTagId()); + tag.setProjectUseCount(tag.getProjectUseCount() + NumConstant.ONE); + issueProjectTagDictService.update(tag); + }); + } + + //4:更新议题相关业务表数据 + //4.1:更新议题表数据 + entity.setIssueStatus(IssueConstant.ISSUE_SHIFT_PROJECT); + entity.setShiftedTime(issueProjectResultDTO.getShiftedTime()); + baseDao.updateById(entity); + + //4.2:议题处理进展表新增数据 + IssueProcessEntity processEntity = new IssueProcessEntity(); + processEntity.setIssueId(entity.getId()); + processEntity.setIssueStatus(IssueConstant.ISSUE_SHIFT_PROJECT); + processEntity.setOrgType(IssueConstant.ISSUE_GRID); + processEntity.setOrgId(entity.getGridId()); + processEntity.setOrgName(issueProjectResultDTO.getOrgName()); + issueProcessDao.insert(processEntity); + + //4.3:议题项目关系表新增数据 + IssueProjectRelationEntity relationEntity = new IssueProjectRelationEntity(); + relationEntity.setIssueId(entity.getId()); + relationEntity.setProjectId(issueProjectResultDTO.getProjectId()); + issueProjectRelationDao.insert(relationEntity); + + //5:调用epmet-message服务,给居民端话题创建人、议题发起人以及政府端工作人员发送消息 + if (!shiftProjectMessage(issueProjectResultDTO, formDTO, entity).success()) { + throw new RenException(IssueConstant.SAVE_MSG_EXCEPTION); + } + //5-1:2020.10.26 添加给居民端话题创建人、议题发起人以及政府端工作人员推送微信订阅消息功能 sun + if (!wxmpShiftProjectMessage(issueProjectResultDTO, formDTO, entity).success()) { + logger.error("议题转项目,推送微信订阅消息失败!"); + } + + //6:缓存中网格下表决中的议题总数减1 + govIssueRedis.subtractWorkGrassrootsIssueRedDotValue(entity.getGridId()); + try{ + issueVoteStatisticalService.syncVotingCacheToDbByParams(formDTO.getIssueId(),entity.getGridId(),null); + }catch(RenException e){ + logger.error(e.getInternalMsg()); + } + } + /** * @Description 议题转项目时给话题创建人、议题发起人、勾选的工作人员分别推送消息 * @author sun diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java index 6a9002cd7c..7641a4bacb 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java @@ -101,4 +101,17 @@ public class IssueTagsServiceImpl extends BaseServiceImpl + * @author zhaoqifeng + * @date 2020/12/9 14:07 + */ + @Override + public List getTagsByIssue(String issueId) { + return baseDao.selectTagsByIssue(issueId); + } + } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml index 875e1c755b..49a894c252 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml @@ -34,5 +34,15 @@ ORDER BY sort ASC + \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueTagsDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueTagsDao.xml index 9e15021e6d..960983e143 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueTagsDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueTagsDao.xml @@ -15,5 +15,17 @@ ORDER BY created_time ASC + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index 7334c73c39..be402ac8a4 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -102,6 +102,10 @@ public class ProjectServiceImpl extends BaseServiceImpl categoryList = new ArrayList<>(); + formDTO.getCategoryList().forEach(item -> { + ProjectCategoryEntity entity = new ProjectCategoryEntity(); + entity.setCategoryId(item.getCategoryId()); + entity.setCategoryPids(item.getCategoryPids()); + entity.setCustomerId(item.getCustomerId()); + entity.setGridId(item.getGridId()); + entity.setProjectId(projectEntity.getId()); + categoryList.add(entity); + }); + projectCategoryService.insertBatch(categoryList); + + if (CollectionUtils.isNotEmpty(formDTO.getTagList())) { + List tagList = new ArrayList<>(); + formDTO.getTagList().forEach(item -> { + ProjectTagsEntity entity = new ProjectTagsEntity(); + entity.setCustomerId(item.getCustomerId()); + entity.setTagId(item.getTagId()); + entity.setTagName(item.getTagName()); + entity.setProjectId(projectEntity.getId()); + tagList.add(entity); + }); + projectTagsService.insertBatch(tagList); + } + } + //6:返回接口参数 issueProjectResultDTO.setProjectId(projectEntity.getId()); issueProjectResultDTO.setOrgName(processEntity.getDepartmentName()); @@ -859,6 +891,7 @@ public class ProjectServiceImpl extends BaseServiceImpl Date: Wed, 9 Dec 2020 16:46:09 +0800 Subject: [PATCH 017/375] =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E7=B1=BB=E5=88=ABId=E5=B8=B8=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/redis/IssueProjectTagDictRedis.java | 45 ++++++++++++++----- .../java/com/epmet/utils/ModuleConstants.java | 4 ++ 2 files changed, 39 insertions(+), 10 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java index df87613ffc..119503607a 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java @@ -21,6 +21,8 @@ import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.redis.RedisUtils; import com.epmet.constant.GovIssueRedisKeys; import com.epmet.dto.result.IssueCategoryTagResultDTO; +import com.epmet.utils.ModuleConstants; +import com.fasterxml.jackson.databind.ObjectMapper; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang.StringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -33,10 +35,7 @@ import org.springframework.lang.Nullable; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; +import java.util.*; import java.util.stream.Collectors; /** @@ -99,21 +98,42 @@ public class IssueProjectTagDictRedis { },redisTemplate.getValueSerializer()); //热度Map 分数为key Map> heatMap = new HashMap<>(); - if(CollectionUtils.isEmpty(heatTuple)){ + if(!CollectionUtils.isEmpty(heatTuple)){ + heatTuple.forEach(tupleSet -> { + tupleSet.forEach( tuple -> { + IssueCategoryTagResultDTO entity = parseObject(tuple.getValue(),IssueCategoryTagResultDTO.class); + Double heatScore = tuple.getScore(); + List queue = heatMap.get(heatScore); + if(CollectionUtils.isEmpty(queue)) queue = new LinkedList<>(); + queue.add(entity); + } ); + }); + List result = new LinkedList<>(); + heatMap.keySet().stream().sorted(Comparator.reverseOrder()).collect(Collectors.toList()).forEach(count -> { + result.addAll(heatMap.get(count)); + }); + return result; } - log.warn("fetch customer govern tag cache blankly , customerId:{} , now begin compensation...",customerId); + if(CollectionUtils.isEmpty(keys) || !keys.iterator().next().contains(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_ID)) { + log.warn("fetch customer govern tag cache blankly , customerId:{} , now begin compensation...", customerId); - List compensate = compensate(customerId, category); - - if(CollectionUtils.isEmpty(compensate)) {log.error("compensation failure or there is no default tag data in database !!"); return null;} - else{log.warn("compensation completed !!"); return compensate;} + List compensate = compensate(customerId, category); + if (CollectionUtils.isEmpty(compensate)) { + log.error("compensation failure or there is no default tag data in database !!"); + return null; + } else { + log.warn("compensation completed !!"); + return compensate; + } + }return null; } public List compensate(String customerId,List category){ //TODO 补偿机制 + return null; } @@ -153,4 +173,9 @@ public class IssueProjectTagDictRedis { redisUtils.zSetAdd(key,o); } + public T parseObject(Object o,Class clazz){ + ObjectMapper objectMapper = new ObjectMapper(); + T t = objectMapper.convertValue(o, clazz); + return t; + } } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/utils/ModuleConstants.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/utils/ModuleConstants.java index a18dde80d5..2b90d2ff16 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/utils/ModuleConstants.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/utils/ModuleConstants.java @@ -156,4 +156,8 @@ public interface ModuleConstants { String ISSUE_ACTION_REJECT = "驳回"; String ASTERISK = "*"; + /** + * 自定义标签类别缺省值 + */ + String CUSTOMIZED_TAG_CATEGORY_ID = "customize"; } From 54c03c1dbd61ee99a7a37a8b49a4f58e32123641 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 9 Dec 2020 17:42:38 +0800 Subject: [PATCH 018/375] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E3=80=81=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=EF=BC=9A=E4=BF=9D=E5=AD=98/=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/IssueSaveCategoryFormDTO.java | 28 +++++++++ .../dto/form/SaveIssueCategoryFormDTO.java | 27 ++++++++ .../epmet/feign/GovIssueOpenFeignClient.java | 7 +++ .../GovIssueOpenFeignClientFallBack.java | 9 +++ .../controller/IssueCategoryController.java | 31 ++++++++-- .../IssueProjectCategoryDictController.java | 28 ++++++++- .../java/com/epmet/dao/IssueCategoryDao.java | 7 ++- .../dao/IssueProjectCategoryDictDao.java | 9 +++ .../epmet/dao/IssueProjectRelationDao.java | 6 ++ .../epmet/service/IssueCategoryService.java | 11 ++++ .../IssueProjectCategoryDictService.java | 18 ++++++ .../impl/IssueCategoryServiceImpl.java | 61 +++++++++++++++++++ .../IssueProjectCategoryDictServiceImpl.java | 48 ++++++++++++++- .../resources/mapper/IssueCategoryDao.xml | 9 +++ .../mapper/IssueProjectCategoryDictDao.xml | 16 +++++ .../mapper/IssueProjectRelationDao.xml | 12 ++++ .../gov-project/gov-project-client/pom.xml | 6 ++ .../dto/form/ProjectSaveCategoryFormDTO.java | 28 +++++++++ .../dto/form/SaveIssueCategoryFormDTO.java | 26 ++++++++ .../result/ProjectIssueCategoryResultDTO.java | 27 ++++++++ .../controller/ProjectCategoryController.java | 19 ++++++ .../com/epmet/dao/ProjectCategoryDao.java | 5 ++ .../epmet/service/ProjectCategoryService.java | 9 +++ .../impl/ProjectCategoryServiceImpl.java | 49 ++++++++++++++- .../resources/mapper/ProjectCategoryDao.xml | 14 ++++- 25 files changed, 495 insertions(+), 15 deletions(-) create mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueSaveCategoryFormDTO.java create mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/SaveIssueCategoryFormDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectSaveCategoryFormDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/SaveIssueCategoryFormDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectIssueCategoryResultDTO.java diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueSaveCategoryFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueSaveCategoryFormDTO.java new file mode 100644 index 0000000000..4a9ef489ba --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueSaveCategoryFormDTO.java @@ -0,0 +1,28 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.List; + +/** + * 议题:保存/修改分类-接口入参 + * @Author sun + */ +@Data +public class IssueSaveCategoryFormDTO implements Serializable { + + private static final long serialVersionUID = 2599592072265715951L; + /** + * 议题Id + */ + @NotBlank(message = "议题ID不能为空",groups = {ProjectSaveCategoryFormDTO.SaveCategory.class}) + private String issueId; + /** + * 议题分类集合 + */ + private List categoryList; + public interface SaveCategory{} + +} diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/SaveIssueCategoryFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/SaveIssueCategoryFormDTO.java new file mode 100644 index 0000000000..8941320269 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/SaveIssueCategoryFormDTO.java @@ -0,0 +1,27 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 议题:保存/修改分类-接口入参 + * + * @Author sun + */ +@Data +public class SaveIssueCategoryFormDTO implements Serializable { + + private static final long serialVersionUID = 2599592072265715951L; + /** + * 分类Id + */ + private String id; + /** + * 分类名称 + */ + private String name; + + +} diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java index fc1da4b290..f94291e5bb 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java @@ -216,4 +216,11 @@ public interface GovIssueOpenFeignClient { **/ @PostMapping(value = "/gov/issue/issuecategory/projectcategorylist") Result> projectCategoryList(@RequestBody List categoryIdList); + + /** + * @description 查询项目所属客户和所属网格信息以及分类对应的分类信息 + * @author sun + **/ + @PostMapping(value = "/gov/issue/issueprojectcategorydict/getprojectandcategoryinfo") + Result getProjectAndCategoryInfo(ProjectSaveCategoryFormDTO formDTO); } diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java index 5866034512..c261fa79d1 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java @@ -202,4 +202,13 @@ public class GovIssueOpenFeignClientFallBack implements GovIssueOpenFeignClient public Result> projectCategoryList(List categoryIdList) { return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "projectCategoryList", categoryIdList); } + + /** + * @description 查询项目所属客户和所属网格信息以及分类对应的分类信息 + * @author sun + **/ + @Override + public Result getProjectAndCategoryInfo(ProjectSaveCategoryFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "getProjectAndCategoryInfo", formDTO); + } } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCategoryController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCategoryController.java index 83aa6560d7..2da6a153eb 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCategoryController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCategoryController.java @@ -17,6 +17,8 @@ package com.epmet.controller; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; @@ -27,6 +29,7 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IssueCategoryDTO; import com.epmet.dto.form.IssueCategoryTagListFormDTO; +import com.epmet.dto.form.IssueSaveCategoryFormDTO; import com.epmet.dto.result.IssueCategoryTagListResultDTO; import com.epmet.dto.result.ProjectCategoryTagResultDTO; import com.epmet.excel.IssueCategoryExcel; @@ -48,24 +51,24 @@ import java.util.Map; @RestController @RequestMapping("issuecategory") public class IssueCategoryController { - + @Autowired private IssueCategoryService issueCategoryService; @GetMapping("page") - public Result> page(@RequestParam Map params){ + public Result> page(@RequestParam Map params) { PageData page = issueCategoryService.page(params); return new Result>().ok(page); } @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ + public Result get(@PathVariable("id") String id) { IssueCategoryDTO data = issueCategoryService.get(id); return new Result().ok(data); } @PostMapping - public Result save(@RequestBody IssueCategoryDTO dto){ + public Result save(@RequestBody IssueCategoryDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); issueCategoryService.save(dto); @@ -73,7 +76,7 @@ public class IssueCategoryController { } @PutMapping - public Result update(@RequestBody IssueCategoryDTO dto){ + public Result update(@RequestBody IssueCategoryDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); issueCategoryService.update(dto); @@ -81,7 +84,7 @@ public class IssueCategoryController { } @DeleteMapping - public Result delete(@RequestBody String[] ids){ + public Result delete(@RequestBody String[] ids) { //效验数据 AssertUtils.isArrayEmpty(ids, "id"); issueCategoryService.delete(ids); @@ -117,4 +120,20 @@ public class IssueCategoryController { return new Result>().ok(issueCategoryService.projectCategoryList(categoryIdList)); } + /** + * @param formDTO + * @return + * @Description 议题:保存/修改分类 + * @Author sun + **/ + @PostMapping("save") + public Result saveCategory(@RequestBody IssueSaveCategoryFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, IssueSaveCategoryFormDTO.SaveCategory.class); + if(formDTO.getCategoryList().size()< NumConstant.ONE){ + throw new RenException("请至少选择一个分类保存"); + } + issueCategoryService.saveCategory(formDTO); + return new Result(); + } + } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java index 87a31f658f..c7ffed58f3 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java @@ -23,13 +23,13 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IssueProjectCategoryDictDTO; import com.epmet.dto.form.CustomerCategoryListFormDTO; -import com.epmet.dto.form.IssueCategoryTagListFormDTO; +import com.epmet.dto.form.ProjectSaveCategoryFormDTO; import com.epmet.dto.result.CustomerCategoryListResultDTO; -import com.epmet.dto.result.ProjectCategoryTagResultDTO; +import com.epmet.dto.result.ProjectIssueCategoryResultDTO; import com.epmet.excel.IssueProjectCategoryDictExcel; import com.epmet.service.IssueProjectCategoryDictService; import org.springframework.beans.factory.annotation.Autowired; @@ -107,4 +107,26 @@ public class IssueProjectCategoryDictController { return new Result>().ok(issueProjectCategoryDictService.categoryList(formDTO)); } + /** + * @param cstegoryIdList + * @return + * @Description 批量查询分类信息 + * @Author sun + **/ + @PostMapping("getcategorylist") + public Result> getCategoryList(@RequestBody List cstegoryIdList) { + return new Result>().ok(issueProjectCategoryDictService.getCategoryList(cstegoryIdList)); + } + + /** + * @param formDTO + * @return + * @Description 查询项目所属客户和所属网格信息以及分类对应的分类信息 + * @Author sun + **/ + @PostMapping("getprojectandcategoryinfo") + public Result getProjectAndCategoryInfo(@RequestBody ProjectSaveCategoryFormDTO formDTO) { + return new Result().ok(issueProjectCategoryDictService.getProjectAndCategoryInfo(formDTO)); + } + } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueCategoryDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueCategoryDao.java index 7c6d4dbcc8..0e214708e0 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueCategoryDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueCategoryDao.java @@ -49,7 +49,6 @@ public interface IssueCategoryDao extends BaseDao { * @Author sun **/ List selectProjectCategoryList(@Param("categoryIdList") List categoryIdList); - List selectProjectCategoryList(List categoryIdList); /** * 获取议题分类 @@ -59,4 +58,10 @@ public interface IssueCategoryDao extends BaseDao { * @return java.util.List */ List selectCategoryByIssue(@Param("issueId") String issueId); + + /** + * @Description 删除议题的分类信息 + * @Author sun + **/ + void delByIssueId(@Param("issueId") String issueId); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java index c3e44340e4..3d21dfa3a7 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java @@ -18,6 +18,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.IssueProjectCategoryDictDTO; import com.epmet.dto.result.CustomerCategoryListResultDTO; import com.epmet.entity.IssueProjectCategoryDictEntity; import org.apache.ibatis.annotations.Mapper; @@ -44,4 +45,12 @@ public interface IssueProjectCategoryDictDao extends BaseDao subCategoryList(@Param("id") String categoryId); + + /** + * @param cstegoryIdList + * @return + * @Description 批量查询分类信息 + * @Author sun + **/ + List selectCategoryList(@Param("cstegoryIdList") List cstegoryIdList); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectRelationDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectRelationDao.java index 017723d64a..437c5e3fe9 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectRelationDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectRelationDao.java @@ -18,6 +18,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.IssueDTO; import com.epmet.entity.IssueProjectRelationEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -50,4 +51,9 @@ public interface IssueProjectRelationDao extends BaseDao selectRelationList(@Param("projectIdList") List projectIdList); + /** + * @Author sun + * @Description 根据项目id查询对应的议题基本信息 + **/ + IssueDTO selectProjectToIssue(@Param("issueId") String issueId); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueCategoryService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueCategoryService.java index 412c9199f1..3f051a29ff 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueCategoryService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueCategoryService.java @@ -21,6 +21,7 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IssueCategoryDTO; import com.epmet.dto.form.IssueCategoryTagListFormDTO; +import com.epmet.dto.form.IssueSaveCategoryFormDTO; import com.epmet.dto.result.IssueCategoryTagListResultDTO; import com.epmet.dto.result.ProjectCategoryTagResultDTO; import com.epmet.entity.IssueCategoryEntity; @@ -120,4 +121,14 @@ public interface IssueCategoryService extends BaseService { * @return java.util.List */ List getCategoryByIssue(String issueId); + + + /** + * @param formDTO + * @return + * @Description 议题:保存/修改分类 + * @Author sun + **/ + void saveCategory(IssueSaveCategoryFormDTO formDTO); + } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java index 41a807cd40..cd995afe87 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java @@ -21,7 +21,9 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IssueProjectCategoryDictDTO; import com.epmet.dto.form.CustomerCategoryListFormDTO; +import com.epmet.dto.form.ProjectSaveCategoryFormDTO; import com.epmet.dto.result.CustomerCategoryListResultDTO; +import com.epmet.dto.result.ProjectIssueCategoryResultDTO; import com.epmet.entity.IssueProjectCategoryDictEntity; import java.util.List; @@ -102,4 +104,20 @@ public interface IssueProjectCategoryDictService extends BaseService categoryList(CustomerCategoryListFormDTO formDTO); + + /** + * @param cstegoryIdList + * @return + * @Description 批量查询分类信息 + * @Author sun + **/ + List getCategoryList(List cstegoryIdList); + + /** + * @param formDTO + * @return + * @Description 查询项目所属客户和所属网格信息以及分类对应的分类信息 + * @Author sun + **/ + ProjectIssueCategoryResultDTO getProjectAndCategoryInfo(ProjectSaveCategoryFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java index 94e492abf5..32dcd13338 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java @@ -22,26 +22,35 @@ 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.constant.NumConstant; +import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.dao.IssueCategoryDao; import com.epmet.dao.IssueTagsDao; import com.epmet.dto.IssueCategoryDTO; +import com.epmet.dto.IssueProjectCategoryDictDTO; import com.epmet.dto.form.IssueCategoryTagListFormDTO; +import com.epmet.dto.form.IssueSaveCategoryFormDTO; +import com.epmet.dto.form.SaveIssueCategoryFormDTO; import com.epmet.dto.result.IssueCategoryTagListResultDTO; import com.epmet.dto.result.IssueCategoryTagResultDTO; import com.epmet.dto.result.ProjectCategoryTagResultDTO; import com.epmet.entity.IssueCategoryEntity; +import com.epmet.entity.IssueEntity; import com.epmet.redis.IssueCategoryRedis; import com.epmet.service.IssueCategoryService; +import com.epmet.service.IssueProjectCategoryDictService; +import com.epmet.service.IssueService; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; /** * 议题所属分类表 @@ -56,6 +65,10 @@ public class IssueCategoryServiceImpl extends BaseServiceImpl page(Map params) { @@ -155,4 +168,52 @@ public class IssueCategoryServiceImpl extends BaseServiceImpl%s", formDTO.getIssueId())); + } + + //2.批量查询分类信息 + List categoryIdList = formDTO.getCategoryList().stream().map(SaveIssueCategoryFormDTO::getId).collect(Collectors.toList()); + List categoryList = issueProjectCategoryDictService.getCategoryList(categoryIdList); + if (null == categoryList) { + throw new RenException(String.format("议题分类信息保存,根据分类Id获取分类信息失败")); + } + + //3.汇总批量新增数据 + List entityList = new ArrayList<>(); + formDTO.getCategoryList().forEach(ca -> { + IssueCategoryEntity entity = new IssueCategoryEntity(); + entity.setCustomerId(issue.getCustomerId()); + entity.setGridId(issue.getGridId()); + entity.setIssueId(formDTO.getIssueId()); + entity.setCategoryId(ca.getId()); + categoryList.forEach(cl -> { + if (ca.getId().equals(cl.getId())) { + entity.setCategoryPids(cl.getPids()); + } + }); + entityList.add(entity); + }); + + //4.根据议题Id删除可能存在的分类信息 + baseDao.delByIssueId(formDTO.getIssueId()); + + //5.批量保存议题分类信息 + if (!insertBatch(entityList)) { + throw new RenException(String.format("议题分类信息保存失败")); + } + + } + } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java index 3aa823b8d3..66dffc1690 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java @@ -20,13 +20,19 @@ package com.epmet.service.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.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.dao.IssueProjectCategoryDictDao; +import com.epmet.dao.IssueProjectRelationDao; +import com.epmet.dto.IssueDTO; import com.epmet.dto.IssueProjectCategoryDictDTO; import com.epmet.dto.form.CustomerCategoryListFormDTO; +import com.epmet.dto.form.ProjectSaveCategoryFormDTO; +import com.epmet.dto.form.SaveIssueCategoryFormDTO; import com.epmet.dto.result.CustomerCategoryListResultDTO; +import com.epmet.dto.result.ProjectIssueCategoryResultDTO; import com.epmet.entity.IssueProjectCategoryDictEntity; import com.epmet.redis.IssueProjectCategoryDictRedis; import com.epmet.service.IssueProjectCategoryDictService; @@ -38,6 +44,7 @@ import org.springframework.transaction.annotation.Transactional; import java.util.Arrays; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; /** * 议题项目分类字典 @@ -50,6 +57,8 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl page(Map params) { @@ -115,4 +124,41 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl getCategoryList(List cstegoryIdList) { + return baseDao.selectCategoryList(cstegoryIdList); + } + + /** + * @param formDTO + * @return + * @Description 查询项目所属客户和所属网格信息以及分类对应的分类信息 + * @Author sun + **/ + @Override + public ProjectIssueCategoryResultDTO getProjectAndCategoryInfo(ProjectSaveCategoryFormDTO formDTO) { + ProjectIssueCategoryResultDTO resultDTO = new ProjectIssueCategoryResultDTO(); + //1.根据项目id查询对应的议题基本信息 + IssueDTO dto = issueProjectRelationDao.selectProjectToIssue(formDTO.getProjectId()); + if (null == dto) { + throw new RenException(String.format("保存项目分类信息,获取项目对应的议题基本信息失败,projectId->%s", formDTO.getProjectId())); + } + resultDTO.setIssueDTO(dto); + //2.批量查询分类信息 + List categoryIdList = formDTO.getCategoryList().stream().map(SaveIssueCategoryFormDTO::getId).collect(Collectors.toList()); + List categoryList = getCategoryList(categoryIdList); + if (null == categoryList) { + throw new RenException(String.format("保存项目分类信息,根据分类Id获取分类信息失败")); + } + resultDTO.setCategoryList(categoryList); + + return resultDTO; + } + } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml index 49a894c252..9844127300 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml @@ -34,6 +34,7 @@ ORDER BY sort ASC + + + DELETE + FROM + issue_category + WHERE + issue_id = #{issueId} + + \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml index e638fec0b8..52bad40a4b 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml @@ -36,4 +36,20 @@ + + \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectRelationDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectRelationDao.xml index ae7ee4b255..44dac4af6c 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectRelationDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectRelationDao.xml @@ -46,4 +46,16 @@ ) + + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/pom.xml b/epmet-module/gov-project/gov-project-client/pom.xml index 6bf188e6e8..eabbdb58dc 100644 --- a/epmet-module/gov-project/gov-project-client/pom.xml +++ b/epmet-module/gov-project/gov-project-client/pom.xml @@ -23,5 +23,11 @@ 2.0.0 compile + + com.epmet + gov-issue-client + 2.0.0 + compile + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectSaveCategoryFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectSaveCategoryFormDTO.java new file mode 100644 index 0000000000..9d0d1a407f --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectSaveCategoryFormDTO.java @@ -0,0 +1,28 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.List; + +/** + * 议题:保存/修改分类-接口入参 + * @Author sun + */ +@Data +public class ProjectSaveCategoryFormDTO implements Serializable { + + private static final long serialVersionUID = 2599592072265715951L; + /** + * 议题Id + */ + @NotBlank(message = "项目ID不能为空",groups = {SaveCategory.class}) + private String projectId; + /** + * 议题分类集合 + */ + private List categoryList; + public interface SaveCategory{} + +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/SaveIssueCategoryFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/SaveIssueCategoryFormDTO.java new file mode 100644 index 0000000000..7c9a491004 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/SaveIssueCategoryFormDTO.java @@ -0,0 +1,26 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 议题:保存/修改分类-接口入参 + * + * @Author sun + */ +@Data +public class SaveIssueCategoryFormDTO implements Serializable { + + private static final long serialVersionUID = 2599592072265715951L; + /** + * 分类Id + */ + private String id; + /** + * 分类名称 + */ + private String name; + + +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectIssueCategoryResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectIssueCategoryResultDTO.java new file mode 100644 index 0000000000..d42075e2f5 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectIssueCategoryResultDTO.java @@ -0,0 +1,27 @@ +package com.epmet.dto.result; + +import com.epmet.dto.IssueDTO; +import com.epmet.dto.IssueProjectCategoryDictDTO; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @dscription 项目所属网格、分类基本信息-接口返参 + * @author sun + */ +@Data +public class ProjectIssueCategoryResultDTO implements Serializable { + + private static final long serialVersionUID = 5957826616179876849L; + /** + * 项目Id + */ + private IssueDTO issueDTO; + /** + * 项目标题 + */ + private List categoryList; + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectCategoryController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectCategoryController.java index c773ece4f9..2160f44778 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectCategoryController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectCategoryController.java @@ -17,6 +17,8 @@ package com.epmet.controller; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; @@ -27,6 +29,7 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.ProjectCategoryDTO; import com.epmet.dto.form.ProjectCategoryTagListFormDTO; +import com.epmet.dto.form.ProjectSaveCategoryFormDTO; import com.epmet.dto.result.ProjectCategoryTagListResultDTO; import com.epmet.excel.ProjectCategoryExcel; import com.epmet.service.ProjectCategoryService; @@ -105,4 +108,20 @@ public class ProjectCategoryController { return new Result().ok(projectCategoryService.categoryTagList(formDTO)); } + /** + * @param formDTO + * @return + * @Description 项目:保存/修改分类 + * @Author sun + **/ + @PostMapping("save") + public Result saveCategory(@RequestBody ProjectSaveCategoryFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, ProjectSaveCategoryFormDTO.SaveCategory.class); + if(formDTO.getCategoryList().size()< NumConstant.ONE){ + throw new RenException("请至少选择一个分类保存"); + } + projectCategoryService.saveCategory(formDTO); + return new Result(); + } + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectCategoryDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectCategoryDao.java index ac041659f7..424adbbc50 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectCategoryDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectCategoryDao.java @@ -39,4 +39,9 @@ public interface ProjectCategoryDao extends BaseDao { **/ List selectProjectCategoryIdList(@Param("projectId") String projectId); + /** + * @Description 删除项目的分类信息 + * @Author sun + **/ + void delByProjectId(@Param("projectId") String projectId); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectCategoryService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectCategoryService.java index e31a951784..d975623295 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectCategoryService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectCategoryService.java @@ -21,6 +21,7 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.ProjectCategoryDTO; import com.epmet.dto.form.ProjectCategoryTagListFormDTO; +import com.epmet.dto.form.ProjectSaveCategoryFormDTO; import com.epmet.dto.result.ProjectCategoryTagListResultDTO; import com.epmet.entity.ProjectCategoryEntity; @@ -102,4 +103,12 @@ public interface ProjectCategoryService extends BaseService result = govIssueOpenFeignClient.getProjectAndCategoryInfo(formDTO); + if (!result.success()) { + throw new RenException(String.format("保存项目分类,获取项目对应的议题信息以及分类信息失败,projiectId->%s", formDTO.getProjectId())); + } + IssueDTO issue = result.getData().getIssueDTO(); + List categoryList = result.getData().getCategoryList(); + + //2.汇总批量新增数据 + List entityList = new ArrayList<>(); + formDTO.getCategoryList().forEach(ca -> { + ProjectCategoryEntity entity = new ProjectCategoryEntity(); + entity.setCustomerId(issue.getCustomerId()); + entity.setGridId(issue.getGridId()); + entity.setProjectId(formDTO.getProjectId()); + entity.setCategoryId(ca.getId()); + categoryList.forEach(cl -> { + if (ca.getId().equals(cl.getId())) { + entity.setCategoryPids(cl.getPids()); + } + }); + entityList.add(entity); + }); + + //3.根据议题Id删除可能存在的分类信息 + baseDao.delByProjectId(formDTO.getProjectId()); + + //4.批量保存议题分类信息 + if (!insertBatch(entityList)) { + throw new RenException(String.format("项目分类信息保存失败")); + } + + } + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectCategoryDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectCategoryDao.xml index da4a2d332e..09dbfae3a9 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectCategoryDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectCategoryDao.xml @@ -5,12 +5,20 @@ + + DELETE + FROM + project_category + WHERE + project_id = #{projectId} + + \ No newline at end of file From ccd33df10d20d97510a7048742afe3149115826d Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 9 Dec 2020 17:50:47 +0800 Subject: [PATCH 019/375] =?UTF-8?q?=E6=A0=87=E7=AD=BE=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/form/AddTagFormDTO.java | 24 +++++++++++ .../com/epmet/dto/result/AddTagResultDTO.java | 23 ++++++++++ .../epmet/controller/IssueTagsController.java | 19 +++++++- .../java/com/epmet/dao/IssueCategoryDao.java | 1 + .../main/java/com/epmet/dao/IssueTagsDao.java | 9 ++++ .../com/epmet/service/IssueTagsService.java | 11 +++++ .../service/impl/IssueTagsServiceImpl.java | 43 ++++++++++++++++++- .../main/resources/mapper/IssueTagsDao.xml | 10 +++++ 8 files changed, 138 insertions(+), 2 deletions(-) create mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/AddTagFormDTO.java create mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/AddTagResultDTO.java diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/AddTagFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/AddTagFormDTO.java new file mode 100644 index 0000000000..889c042c5f --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/AddTagFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.dto.form; + +import com.google.gson.internal.$Gson$Types; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/12/9 下午3:25 + */ +@Data +public class AddTagFormDTO implements Serializable { + + private static final long serialVersionUID = -3245317956853388308L; + + public interface AddTag{} + + @NotBlank(message = "标签名称不能为空",groups = AddTag.class) + private String tagName; + + private String customerId; +} diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/AddTagResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/AddTagResultDTO.java new file mode 100644 index 0000000000..f78f4154c9 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/AddTagResultDTO.java @@ -0,0 +1,23 @@ +package com.epmet.dto.result; + +import lombok.AllArgsConstructor; +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/12/9 下午5:09 + */ +@Data +@AllArgsConstructor +public class AddTagResultDTO implements Serializable { + + private static final long serialVersionUID = 4769136806332933579L; + + private String tagId; + + public AddTagResultDTO() { + this.tagId = ""; + } +} diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueTagsController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueTagsController.java index 4be04baf85..6c6b768730 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueTagsController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueTagsController.java @@ -17,15 +17,19 @@ package com.epmet.controller; +import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IssueTagsDTO; +import com.epmet.dto.form.AddTagFormDTO; +import com.epmet.dto.result.AddTagResultDTO; import com.epmet.excel.IssueTagsExcel; import com.epmet.service.IssueTagsService; import org.springframework.beans.factory.annotation.Autowired; @@ -91,4 +95,17 @@ public class IssueTagsController { ExcelUtils.exportExcelToTarget(response, null, list, IssueTagsExcel.class); } + /** + * @Description 标签添加 + * @Param form + * @author zxc + * @date 2020/12/9 下午3:29 + */ + @PostMapping("add") + public Result addTag(@RequestBody AddTagFormDTO form, @LoginUser TokenDto tokenDto){ + ValidatorUtils.validateEntity(form, AddTagFormDTO.AddTag.class); + AddTagResultDTO addTagResultDTO = issueTagsService.addTag(form, tokenDto); + return new Result().ok(addTagResultDTO); + } + } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueCategoryDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueCategoryDao.java index 0e214708e0..0d88504d4c 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueCategoryDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueCategoryDao.java @@ -49,6 +49,7 @@ public interface IssueCategoryDao extends BaseDao { * @Author sun **/ List selectProjectCategoryList(@Param("categoryIdList") List categoryIdList); +// List selectProjectCategoryList(List categoryIdList); /** * 获取议题分类 diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueTagsDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueTagsDao.java index 547b840c17..ba73daf786 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueTagsDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueTagsDao.java @@ -19,6 +19,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.IssueTagsDTO; +import com.epmet.dto.form.AddTagFormDTO; import com.epmet.dto.result.IssueCategoryTagResultDTO; import com.epmet.entity.IssueTagsEntity; import org.apache.ibatis.annotations.Mapper; @@ -49,4 +50,12 @@ public interface IssueTagsDao extends BaseDao { * @return java.util.List */ List selectTagsByIssue(@Param("issueId") String issueId); + + /** + * @Description 查询标签是否重名 + * @Param form + * @author zxc + * @date 2020/12/9 下午3:40 + */ + String selectTagNameCount(AddTagFormDTO form); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueTagsService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueTagsService.java index 5bc717fb3c..c95e8cc51e 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueTagsService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueTagsService.java @@ -19,7 +19,10 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.IssueTagsDTO; +import com.epmet.dto.form.AddTagFormDTO; +import com.epmet.dto.result.AddTagResultDTO; import com.epmet.entity.IssueTagsEntity; import java.util.List; @@ -101,4 +104,12 @@ public interface IssueTagsService extends BaseService { * @return java.util.List */ List getTagsByIssue(String issueId); + + /** + * @Description 标签添加 + * @Param form + * @author zxc + * @date 2020/12/9 下午3:29 + */ + AddTagResultDTO addTag(AddTagFormDTO form, TokenDto tokenDto); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java index 7641a4bacb..6c2a1e6f2e 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java @@ -20,14 +20,23 @@ package com.epmet.service.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.constant.NumConstant; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.IssueProjectTagDictDao; import com.epmet.dao.IssueTagsDao; import com.epmet.dto.IssueTagsDTO; +import com.epmet.dto.form.AddTagFormDTO; +import com.epmet.dto.result.AddTagResultDTO; +import com.epmet.dto.result.IssueCategoryTagResultDTO; +import com.epmet.entity.IssueProjectTagDictEntity; import com.epmet.entity.IssueTagsEntity; +import com.epmet.redis.IssueProjectTagDictRedis; import com.epmet.redis.IssueTagsRedis; import com.epmet.service.IssueTagsService; +import com.epmet.utils.ModuleConstants; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -48,6 +57,10 @@ public class IssueTagsServiceImpl extends BaseServiceImpl page(Map params) { @@ -114,4 +127,32 @@ public class IssueTagsServiceImpl extends BaseServiceImpl + + + \ No newline at end of file From 5fe0f3d460c4160a1f182071d657b6890d062193 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 10 Dec 2020 09:29:10 +0800 Subject: [PATCH 020/375] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/IssueProjectCategoryDictServiceImpl.java | 4 ++-- epmet-module/gov-project/gov-project-client/pom.xml | 6 ------ .../dto/result/ProjectIssueCategoryResultDTO.java | 11 ++++------- .../service/impl/ProjectCategoryServiceImpl.java | 8 ++------ 4 files changed, 8 insertions(+), 21 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java index 66dffc1690..4c57777837 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java @@ -149,14 +149,14 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl%s", formDTO.getProjectId())); } - resultDTO.setIssueDTO(dto); + //resultDTO.setIssueDTO(dto); //2.批量查询分类信息 List categoryIdList = formDTO.getCategoryList().stream().map(SaveIssueCategoryFormDTO::getId).collect(Collectors.toList()); List categoryList = getCategoryList(categoryIdList); if (null == categoryList) { throw new RenException(String.format("保存项目分类信息,根据分类Id获取分类信息失败")); } - resultDTO.setCategoryList(categoryList); + // resultDTO.setCategoryList(categoryList); return resultDTO; } diff --git a/epmet-module/gov-project/gov-project-client/pom.xml b/epmet-module/gov-project/gov-project-client/pom.xml index eabbdb58dc..6bf188e6e8 100644 --- a/epmet-module/gov-project/gov-project-client/pom.xml +++ b/epmet-module/gov-project/gov-project-client/pom.xml @@ -23,11 +23,5 @@ 2.0.0 compile - - com.epmet - gov-issue-client - 2.0.0 - compile - \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectIssueCategoryResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectIssueCategoryResultDTO.java index d42075e2f5..9aad1bb5a9 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectIssueCategoryResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectIssueCategoryResultDTO.java @@ -1,11 +1,8 @@ package com.epmet.dto.result; -import com.epmet.dto.IssueDTO; -import com.epmet.dto.IssueProjectCategoryDictDTO; import lombok.Data; import java.io.Serializable; -import java.util.List; /** * @dscription 项目所属网格、分类基本信息-接口返参 @@ -18,10 +15,10 @@ public class ProjectIssueCategoryResultDTO implements Serializable { /** * 项目Id */ - private IssueDTO issueDTO; - /** + /*private IssueDTO issueDTO; + *//** * 项目标题 - */ - private List categoryList; + *//* + private List categoryList;*/ } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectCategoryServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectCategoryServiceImpl.java index 9d1700ce47..ca2febe86c 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectCategoryServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectCategoryServiceImpl.java @@ -28,14 +28,11 @@ import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dao.ProjectCategoryDao; import com.epmet.dao.ProjectTagsDao; -import com.epmet.dto.IssueDTO; -import com.epmet.dto.IssueProjectCategoryDictDTO; import com.epmet.dto.ProjectCategoryDTO; import com.epmet.dto.form.ProjectCategoryTagListFormDTO; import com.epmet.dto.form.ProjectSaveCategoryFormDTO; import com.epmet.dto.result.ProjectCategoryTagListResultDTO; import com.epmet.dto.result.ProjectCategoryTagResultDTO; -import com.epmet.dto.result.ProjectIssueCategoryResultDTO; import com.epmet.entity.ProjectCategoryEntity; import com.epmet.feign.GovIssueOpenFeignClient; import com.epmet.redis.ProjectCategoryRedis; @@ -45,7 +42,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; @@ -155,7 +151,7 @@ public class ProjectCategoryServiceImpl extends BaseServiceImpl result = govIssueOpenFeignClient.getProjectAndCategoryInfo(formDTO); + /*Result result = govIssueOpenFeignClient.getProjectAndCategoryInfo(formDTO); if (!result.success()) { throw new RenException(String.format("保存项目分类,获取项目对应的议题信息以及分类信息失败,projiectId->%s", formDTO.getProjectId())); } @@ -184,7 +180,7 @@ public class ProjectCategoryServiceImpl extends BaseServiceImpl Date: Thu, 10 Dec 2020 10:17:42 +0800 Subject: [PATCH 021/375] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E3=80=81=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E5=88=86=E7=B1=BB=E4=BF=A1=E6=81=AF=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E8=87=AA=E6=B5=8B=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/feign/GovIssueOpenFeignClient.java | 4 +- .../IssueProjectCategoryDictServiceImpl.java | 8 +- .../result/ProjectCategoryDTOResultDTO.java | 55 +++++++++++ .../result/ProjectIssueCategoryResultDTO.java | 9 +- .../dto/result/ProjectIssueDTOResultDTO.java | 96 +++++++++++++++++++ .../impl/ProjectCategoryServiceImpl.java | 12 +-- 6 files changed, 170 insertions(+), 14 deletions(-) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectCategoryDTOResultDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectIssueDTOResultDTO.java diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java index f94291e5bb..eebeae517c 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java @@ -34,8 +34,8 @@ import java.util.Map; * @author yinzuomei@elink-cn.com * @date 2020/6/4 13:37 */ -@FeignClient(name = ServiceConstant.GOV_ISSUE_SERVER, fallback = GovIssueOpenFeignClientFallBack.class) -//@FeignClient(name = ServiceConstant.GOV_ISSUE_SERVER, fallback = GovIssueOpenFeignClientFallBack.class,url = "localhost:8101") +//@FeignClient(name = ServiceConstant.GOV_ISSUE_SERVER, fallback = GovIssueOpenFeignClientFallBack.class) +@FeignClient(name = ServiceConstant.GOV_ISSUE_SERVER, fallback = GovIssueOpenFeignClientFallBack.class,url = "localhost:8101") public interface GovIssueOpenFeignClient { /** diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java index 4c57777837..2197ae8143 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java @@ -32,7 +32,9 @@ import com.epmet.dto.form.CustomerCategoryListFormDTO; import com.epmet.dto.form.ProjectSaveCategoryFormDTO; import com.epmet.dto.form.SaveIssueCategoryFormDTO; import com.epmet.dto.result.CustomerCategoryListResultDTO; +import com.epmet.dto.result.ProjectCategoryDTOResultDTO; import com.epmet.dto.result.ProjectIssueCategoryResultDTO; +import com.epmet.dto.result.ProjectIssueDTOResultDTO; import com.epmet.entity.IssueProjectCategoryDictEntity; import com.epmet.redis.IssueProjectCategoryDictRedis; import com.epmet.service.IssueProjectCategoryDictService; @@ -149,14 +151,16 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl%s", formDTO.getProjectId())); } - //resultDTO.setIssueDTO(dto); + ProjectIssueDTOResultDTO issueDTO = ConvertUtils.sourceToTarget(dto,ProjectIssueDTOResultDTO.class); + resultDTO.setIssueDTO(issueDTO); //2.批量查询分类信息 List categoryIdList = formDTO.getCategoryList().stream().map(SaveIssueCategoryFormDTO::getId).collect(Collectors.toList()); List categoryList = getCategoryList(categoryIdList); if (null == categoryList) { throw new RenException(String.format("保存项目分类信息,根据分类Id获取分类信息失败")); } - // resultDTO.setCategoryList(categoryList); + List list = ConvertUtils.sourceToTarget(categoryList,ProjectCategoryDTOResultDTO.class); + resultDTO.setCategoryList(list); return resultDTO; } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectCategoryDTOResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectCategoryDTOResultDTO.java new file mode 100644 index 0000000000..17a4e51c20 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectCategoryDTOResultDTO.java @@ -0,0 +1,55 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @dscription 项目所属网格、分类基本信息-接口返参 + * @author sun + */ +@Data +public class ProjectCategoryDTOResultDTO implements Serializable { + + private static final long serialVersionUID = 5957826616179876849L; + /** + * 主键 + */ + private String id; + + /** + * 客户id, 产品默认default + */ + private String customerId; + + /** + * 上级分类ID 顶级此列存储0 + */ + private String pid; + + /** + * 所有上级分类ID,用逗号分开 + */ + private String pids; + + /** + * 分类编码,分类编码+customer_id唯一 + */ + private String categoryCode; + + /** + * 分类名称 + */ + private String categoryName; + + /** + * 分类类别1,2,3,4.... + */ + private String categoryType; + + /** + * 排序 + */ + private Integer sort; + +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectIssueCategoryResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectIssueCategoryResultDTO.java index 9aad1bb5a9..e035523fe7 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectIssueCategoryResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectIssueCategoryResultDTO.java @@ -3,6 +3,7 @@ package com.epmet.dto.result; import lombok.Data; import java.io.Serializable; +import java.util.List; /** * @dscription 项目所属网格、分类基本信息-接口返参 @@ -15,10 +16,10 @@ public class ProjectIssueCategoryResultDTO implements Serializable { /** * 项目Id */ - /*private IssueDTO issueDTO; - *//** + private ProjectIssueDTOResultDTO issueDTO; + /** * 项目标题 - *//* - private List categoryList;*/ + */ + private List categoryList; } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectIssueDTOResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectIssueDTOResultDTO.java new file mode 100644 index 0000000000..0dd2698c4c --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectIssueDTOResultDTO.java @@ -0,0 +1,96 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * @dscription 项目所属网格、分类基本信息-接口返参 + * @author sun + */ +@Data +public class ProjectIssueDTOResultDTO implements Serializable { + + private static final long serialVersionUID = 5957826616179876849L; + /** + * 议题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; + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectCategoryServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectCategoryServiceImpl.java index ca2febe86c..74ed9133ee 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectCategoryServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectCategoryServiceImpl.java @@ -31,8 +31,7 @@ import com.epmet.dao.ProjectTagsDao; import com.epmet.dto.ProjectCategoryDTO; import com.epmet.dto.form.ProjectCategoryTagListFormDTO; import com.epmet.dto.form.ProjectSaveCategoryFormDTO; -import com.epmet.dto.result.ProjectCategoryTagListResultDTO; -import com.epmet.dto.result.ProjectCategoryTagResultDTO; +import com.epmet.dto.result.*; import com.epmet.entity.ProjectCategoryEntity; import com.epmet.feign.GovIssueOpenFeignClient; import com.epmet.redis.ProjectCategoryRedis; @@ -42,6 +41,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; @@ -151,12 +151,12 @@ public class ProjectCategoryServiceImpl extends BaseServiceImpl result = govIssueOpenFeignClient.getProjectAndCategoryInfo(formDTO); + Result result = govIssueOpenFeignClient.getProjectAndCategoryInfo(formDTO); if (!result.success()) { throw new RenException(String.format("保存项目分类,获取项目对应的议题信息以及分类信息失败,projiectId->%s", formDTO.getProjectId())); } - IssueDTO issue = result.getData().getIssueDTO(); - List categoryList = result.getData().getCategoryList(); + ProjectIssueDTOResultDTO issue = result.getData().getIssueDTO(); + List categoryList = result.getData().getCategoryList(); //2.汇总批量新增数据 List entityList = new ArrayList<>(); @@ -180,7 +180,7 @@ public class ProjectCategoryServiceImpl extends BaseServiceImpl Date: Thu, 10 Dec 2020 10:48:44 +0800 Subject: [PATCH 022/375] =?UTF-8?q?=E5=88=86=E7=B1=BB=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/CategoryTagInitFormDTO.java | 16 +++++++++ .../IssueProjectCategoryDictController.java | 14 ++++++++ .../dao/IssueProjectCategoryDictDao.java | 8 +++++ .../com/epmet/dao/IssueProjectTagDictDao.java | 23 ++++++++++++- .../IssueProjectCategoryDictService.java | 10 ++++++ .../service/IssueProjectTagDictService.java | 9 +++++ .../IssueProjectCategoryDictServiceImpl.java | 34 +++++++++++++++++++ .../impl/IssueProjectTagDictServiceImpl.java | 18 +++++++++- .../mapper/IssueProjectCategoryDictDao.xml | 15 ++++++++ .../mapper/IssueProjectTagDictDao.xml | 30 +++++++++++++++- 10 files changed, 174 insertions(+), 3 deletions(-) create mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/CategoryTagInitFormDTO.java diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/CategoryTagInitFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/CategoryTagInitFormDTO.java new file mode 100644 index 0000000000..ac83a9750a --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/CategoryTagInitFormDTO.java @@ -0,0 +1,16 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/12/10 10:00 + */ +@Data +public class CategoryTagInitFormDTO implements Serializable { + private static final long serialVersionUID = -3420775041990761296L; + private String customerId; +} diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java index c7ffed58f3..cd7948cf91 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java @@ -26,6 +26,7 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IssueProjectCategoryDictDTO; +import com.epmet.dto.form.CategoryTagInitFormDTO; import com.epmet.dto.form.CustomerCategoryListFormDTO; import com.epmet.dto.form.ProjectSaveCategoryFormDTO; import com.epmet.dto.result.CustomerCategoryListResultDTO; @@ -107,6 +108,19 @@ public class IssueProjectCategoryDictController { return new Result>().ok(issueProjectCategoryDictService.categoryList(formDTO)); } + /** + * 客户分类标签数据初始化 + * @author zhaoqifeng + * @date 2020/12/10 10:02 + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + */ + @PostMapping("init") + public Result init(@RequestBody CategoryTagInitFormDTO formDTO) { + issueProjectCategoryDictService.init(formDTO); + return new Result(); + } + /** * @param cstegoryIdList * @return diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java index 3d21dfa3a7..fcf13cfd4d 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java @@ -46,6 +46,14 @@ public interface IssueProjectCategoryDictDao extends BaseDao subCategoryList(@Param("id") String categoryId); + /** + * 获取默认标签配置 + * @author zhaoqifeng + * @date 2020/12/10 10:06 + * @return java.util.List + */ + List selectCategoryListByCustomer(@Param("customerId") String customerId); + /** * @param cstegoryIdList * @return diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectTagDictDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectTagDictDao.java index 7f2bd323dd..589fe93403 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectTagDictDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectTagDictDao.java @@ -18,8 +18,12 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.IssueCategoryTagResultDTO; import com.epmet.entity.IssueProjectTagDictEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 议题、项目标签字典表 @@ -29,5 +33,22 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IssueProjectTagDictDao extends BaseDao { - + /** + * 获取客户默认分类标签 + * @author zhaoqifeng + * @date 2020/12/10 9:26 + * @param customerId + * @param list + * @return java.util.List + */ + List selectDefaultList(@Param("customerId") String customerId, @Param("list") List list); + + /** + * 获取默认标签配置 + * @author zhaoqifeng + * @date 2020/12/10 10:09 + * @param customerId + * @return java.util.List + */ + List selectTagListByCustomer(@Param("customerId") String customerId); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java index cd995afe87..1e89188eff 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java @@ -20,6 +20,7 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IssueProjectCategoryDictDTO; +import com.epmet.dto.form.CategoryTagInitFormDTO; import com.epmet.dto.form.CustomerCategoryListFormDTO; import com.epmet.dto.form.ProjectSaveCategoryFormDTO; import com.epmet.dto.result.CustomerCategoryListResultDTO; @@ -105,6 +106,15 @@ public interface IssueProjectCategoryDictService extends BaseService categoryList(CustomerCategoryListFormDTO formDTO); + /** + * 客户分类标签数据初始化 + * @author zhaoqifeng + * @date 2020/12/10 10:02 + * @param formDTO + * @return void + */ + void init(CategoryTagInitFormDTO formDTO); + /** * @param cstegoryIdList * @return diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectTagDictService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectTagDictService.java index 9c730be5bc..089aac5d68 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectTagDictService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectTagDictService.java @@ -105,4 +105,13 @@ public interface IssueProjectTagDictService extends BaseService + */ + List getTagListByCustomer(String customerId); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java index 2197ae8143..3030b696fd 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java @@ -28,6 +28,7 @@ import com.epmet.dao.IssueProjectCategoryDictDao; import com.epmet.dao.IssueProjectRelationDao; import com.epmet.dto.IssueDTO; import com.epmet.dto.IssueProjectCategoryDictDTO; +import com.epmet.dto.form.CategoryTagInitFormDTO; import com.epmet.dto.form.CustomerCategoryListFormDTO; import com.epmet.dto.form.ProjectSaveCategoryFormDTO; import com.epmet.dto.form.SaveIssueCategoryFormDTO; @@ -36,8 +37,11 @@ import com.epmet.dto.result.ProjectCategoryDTOResultDTO; import com.epmet.dto.result.ProjectIssueCategoryResultDTO; import com.epmet.dto.result.ProjectIssueDTOResultDTO; import com.epmet.entity.IssueProjectCategoryDictEntity; +import com.epmet.entity.IssueProjectTagDictEntity; import com.epmet.redis.IssueProjectCategoryDictRedis; import com.epmet.service.IssueProjectCategoryDictService; +import com.epmet.service.IssueProjectTagDictService; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -61,6 +65,8 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl page(Map params) { @@ -165,4 +171,32 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl list = baseDao.selectCategoryListByCustomer(formDTO.getCustomerId()); + if (CollectionUtils.isEmpty(list)) { + //分类初始化 + List categoryList = baseDao.selectCategoryListByCustomer("default"); + categoryList.forEach(item -> { + item.setCustomerId(formDTO.getCustomerId()); + }); + this.insertBatch(categoryList); + //标签初始化 + List tagList = issueProjectTagDictService.getTagListByCustomer("default"); + tagList.forEach(item -> { + item.setCustomerId(formDTO.getCustomerId()); + }); + issueProjectTagDictService.insertBatch(tagList); + } + } + } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectTagDictServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectTagDictServiceImpl.java index aae0d8dc5d..9b40e3350b 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectTagDictServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectTagDictServiceImpl.java @@ -27,6 +27,7 @@ import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.dao.IssueProjectTagDictDao; import com.epmet.dto.IssueProjectTagDictDTO; import com.epmet.dto.form.TagListFormDTO; +import com.epmet.dto.result.IssueCategoryTagResultDTO; import com.epmet.dto.result.TagListResultDTO; import com.epmet.entity.IssueProjectTagDictEntity; import com.epmet.redis.IssueProjectTagDictRedis; @@ -115,7 +116,22 @@ public class IssueProjectTagDictServiceImpl extends BaseServiceImpl defaultList = baseDao.selectDefaultList(tokenDto.getCustomerId(), formDTO.getCategoryIdList()); + result.setDefaulted(defaultList); + return result; + } + + /** + * 获取默认标签配置 + * + * @return java.util.List + * @author zhaoqifeng + * @date 2020/12/10 10:12 + */ + @Override + public List getTagListByCustomer(String customerId) { + return baseDao.selectTagListByCustomer(customerId); } } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml index 52bad40a4b..6efb42b00c 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml @@ -35,6 +35,21 @@ ORDER BY sort ASC + + SELECT + TAG_ID AS "id", + TAG_NAME AS "name" + FROM + issue_tags + WHERE + DEL_FLAG = '0' + AND CUSTOMER_ID = #{customerId} + + + CATEGORY_ID = #{category} + + + ORDER BY TAG_ID + + \ No newline at end of file From 6bc5972bce0303a9ba621eb4fa0c67b256214b57 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 10 Dec 2020 13:35:59 +0800 Subject: [PATCH 023/375] =?UTF-8?q?sql=E8=84=9A=E6=9C=AC=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/db/migration/V0.0.7__add_category_tag.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.7__add_category_tag.sql b/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.7__add_category_tag.sql index b198293630..b610d1ebfe 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.7__add_category_tag.sql +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.7__add_category_tag.sql @@ -13,7 +13,7 @@ CREATE TABLE `issue_project_category_dict` ( `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 NOT NULL COMMENT '更新人', `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', - PRIMARY KEY (`ID`,`CUSTOMER_ID`) USING BTREE + PRIMARY KEY (`ID`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='议题项目分类字典'; CREATE TABLE `issue_project_tag_dict` ( From 55eed24e7318f343e276e7eeb9ec084f84880cad Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 10 Dec 2020 14:47:26 +0800 Subject: [PATCH 024/375] =?UTF-8?q?sql=E8=84=9A=E6=9C=AC=E8=BF=98=E5=8E=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/db/migration/V0.0.7__add_category_tag.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.7__add_category_tag.sql b/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.7__add_category_tag.sql index b610d1ebfe..b198293630 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.7__add_category_tag.sql +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.7__add_category_tag.sql @@ -13,7 +13,7 @@ CREATE TABLE `issue_project_category_dict` ( `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', `UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 NOT NULL COMMENT '更新人', `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', - PRIMARY KEY (`ID`) USING BTREE + PRIMARY KEY (`ID`,`CUSTOMER_ID`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='议题项目分类字典'; CREATE TABLE `issue_project_tag_dict` ( From 7d334a268fcfddc112ea740670b1739531f4218d Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 10 Dec 2020 15:19:58 +0800 Subject: [PATCH 025/375] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E4=BF=AE=E6=94=B9/=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/form/IssueTagFormDTO.java | 24 +++++++ .../com/epmet/dto/form/IssueTagsFormDTO.java | 72 +++++++++++++++++++ .../epmet/dto/form/IssueTagsSaveFormDTO.java | 28 ++++++++ .../dto/result/IssueProjectTagsResultDTO.java | 21 ++++++ .../epmet/controller/IssueTagsController.java | 15 ++++ .../com/epmet/dao/IssueProjectTagDictDao.java | 22 +++++- .../main/java/com/epmet/dao/IssueTagsDao.java | 34 +++++++++ .../epmet/redis/IssueProjectTagDictRedis.java | 2 +- .../com/epmet/service/IssueTagsService.java | 10 +++ .../service/impl/IssueTagsServiceImpl.java | 69 ++++++++++++++++++ .../mapper/IssueProjectTagDictDao.xml | 33 +++++++++ .../main/resources/mapper/IssueTagsDao.xml | 54 +++++++++++++- 12 files changed, 381 insertions(+), 3 deletions(-) create mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueTagFormDTO.java create mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueTagsFormDTO.java create mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueTagsSaveFormDTO.java create mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueProjectTagsResultDTO.java diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueTagFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueTagFormDTO.java new file mode 100644 index 0000000000..b49075bce4 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueTagFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/12/10 上午9:31 + */ +@Data +public class IssueTagFormDTO implements Serializable { + + private static final long serialVersionUID = -8678756265520573631L; + + private String id; + + private String tagName; + + private String categoryId; + + private String tagId; + +} diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueTagsFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueTagsFormDTO.java new file mode 100644 index 0000000000..e813b866f5 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueTagsFormDTO.java @@ -0,0 +1,72 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/12/10 上午9:31 + */ +@Data +public class IssueTagsFormDTO implements Serializable { + + private static final long serialVersionUID = -8678756265520570931L; + + /** + * 主键ID + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 议题所属网格id + */ + private String gridId; + + /** + * 议题ID + */ + private String issueId; + + /** + * 标签ID + */ + private String tagId; + + /** + * 标签名称 + */ + private String tagName; + + /** + * 删除标识 0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 更新人 + */ + private String updatedBy; + + public IssueTagsFormDTO() { + this.delFlag = 0; + this.revision = 0; + this.createdBy = "APP_USER"; + this.updatedBy = "APP_USER"; + } +} diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueTagsSaveFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueTagsSaveFormDTO.java new file mode 100644 index 0000000000..bbf3b9110e --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueTagsSaveFormDTO.java @@ -0,0 +1,28 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2020/12/10 上午9:29 + */ +@Data +public class IssueTagsSaveFormDTO implements Serializable { + + private static final long serialVersionUID = 4122102633306198151L; + + public interface IssueTagsSaveForm{} + + @NotBlank(message = "议题ID不能为空",groups = {IssueTagsSaveForm.class}) + private String issueId; + + /** + * 标签集合 为空,清除此议题标签 + */ + private List tagList; + +} diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueProjectTagsResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueProjectTagsResultDTO.java new file mode 100644 index 0000000000..55a738b52e --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueProjectTagsResultDTO.java @@ -0,0 +1,21 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/12/10 下午2:13 + */ +@Data +public class IssueProjectTagsResultDTO implements Serializable { + + private static final long serialVersionUID = -5035269596436047038L; + + private String tagId; + + private String tagName; + + private String categoryId; +} diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueTagsController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueTagsController.java index 6c6b768730..de6cfd4cc2 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueTagsController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueTagsController.java @@ -29,6 +29,7 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IssueTagsDTO; import com.epmet.dto.form.AddTagFormDTO; +import com.epmet.dto.form.IssueTagsSaveFormDTO; import com.epmet.dto.result.AddTagResultDTO; import com.epmet.excel.IssueTagsExcel; import com.epmet.service.IssueTagsService; @@ -108,4 +109,18 @@ public class IssueTagsController { return new Result().ok(addTagResultDTO); } + /** + * @Description 议题标签保存/修改 + * @Param form + * @Param tokenDto + * @author zxc + * @date 2020/12/10 上午9:37 + */ + @PostMapping("save") + public Result issueTagSave(@RequestBody IssueTagsSaveFormDTO form,@LoginUser TokenDto tokenDto){ + ValidatorUtils.validateEntity(form, IssueTagsSaveFormDTO.IssueTagsSaveForm.class); + issueTagsService.issueTagSave(form,tokenDto); + return new Result(); + } + } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectTagDictDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectTagDictDao.java index 589fe93403..5e615fca25 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectTagDictDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectTagDictDao.java @@ -18,10 +18,11 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.form.IssueTagFormDTO; import com.epmet.dto.result.IssueCategoryTagResultDTO; import com.epmet.entity.IssueProjectTagDictEntity; import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; +import org.springframework.data.repository.query.Param; import java.util.List; @@ -33,6 +34,25 @@ import java.util.List; */ @Mapper public interface IssueProjectTagDictDao extends BaseDao { + + /** + * @Description 更新标签使用次数 + * @Param tags + * @Param status 0:+1;1:-1 + * @author zxc + * @date 2020/12/10 上午10:29 + */ + void updateTagsUseCount(@Param("tags") List tags,@Param("customerId")String customerId,@Param("status")String status); + + /** + * @Description 查询标签ID + * @Param newTags + * @Param customerId + * @author zxc + * @date 2020/12/10 下午2:16 + */ + List selectTagId(@Param("tags") List newTags, @Param("customerId")String customerId); + /** * 获取客户默认分类标签 * @author zhaoqifeng diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueTagsDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueTagsDao.java index ba73daf786..97d3bbea5e 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueTagsDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueTagsDao.java @@ -20,6 +20,8 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.IssueTagsDTO; import com.epmet.dto.form.AddTagFormDTO; +import com.epmet.dto.form.IssueTagFormDTO; +import com.epmet.dto.form.IssueTagsFormDTO; import com.epmet.dto.result.IssueCategoryTagResultDTO; import com.epmet.entity.IssueTagsEntity; import org.apache.ibatis.annotations.Mapper; @@ -58,4 +60,36 @@ public interface IssueTagsDao extends BaseDao { * @date 2020/12/9 下午3:40 */ String selectTagNameCount(AddTagFormDTO form); + + /** + * @Description 根据IssueId查询标签 + * @Param issueId + * @author zxc + * @date 2020/12/10 上午10:05 + */ + List selectTagsByIssueId(@Param("issueId")String issueId); + + /** + * @Description 根据IssueId删除标签 + * @Param issueId + * @author zxc + * @date 2020/12/10 上午10:14 + */ + void deleteTagsByIssueId(@Param("issueId")String issueId); + + /** + * @Description 查询此议题一条标签记录 + * @Param issueId + * @author zxc + * @date 2020/12/10 下午1:49 + */ + IssueTagsDTO selectOneTagByIssueId(@Param("issueId")String issueId); + + /** + * @Description 插入新的标签 + * @Param needInsert + * @author zxc + * @date 2020/12/10 下午2:11 + */ + void insertNewTags(@Param("tags") List needInsert); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java index 119503607a..4bcaf18866 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java @@ -154,7 +154,7 @@ public class IssueProjectTagDictRedis { } if (status.equals(NumConstant.ONE_STR)){ //标签使用次数-1 - if (redisUtils.getScore(key,formDTO)>NumConstant.ZERO){ + if (null != redisUtils.getScore(key,formDTO) && redisUtils.getScore(key,formDTO)>NumConstant.ZERO){ redisUtils.zIncrementScore(key, formDTO,NumConstant.ONE_NEG); } } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueTagsService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueTagsService.java index c95e8cc51e..b7970e8793 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueTagsService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueTagsService.java @@ -22,6 +22,7 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.IssueTagsDTO; import com.epmet.dto.form.AddTagFormDTO; +import com.epmet.dto.form.IssueTagsSaveFormDTO; import com.epmet.dto.result.AddTagResultDTO; import com.epmet.entity.IssueTagsEntity; @@ -112,4 +113,13 @@ public interface IssueTagsService extends BaseService { * @date 2020/12/9 下午3:29 */ AddTagResultDTO addTag(AddTagFormDTO form, TokenDto tokenDto); + + /** + * @Description 议题标签保存/修改 + * @Param form + * @Param tokenDto + * @author zxc + * @date 2020/12/10 上午9:37 + */ + void issueTagSave(IssueTagsSaveFormDTO form, TokenDto tokenDto); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java index 6c2a1e6f2e..3b54780a02 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java @@ -29,6 +29,9 @@ import com.epmet.dao.IssueProjectTagDictDao; import com.epmet.dao.IssueTagsDao; import com.epmet.dto.IssueTagsDTO; import com.epmet.dto.form.AddTagFormDTO; +import com.epmet.dto.form.IssueTagFormDTO; +import com.epmet.dto.form.IssueTagsFormDTO; +import com.epmet.dto.form.IssueTagsSaveFormDTO; import com.epmet.dto.result.AddTagResultDTO; import com.epmet.dto.result.IssueCategoryTagResultDTO; import com.epmet.entity.IssueProjectTagDictEntity; @@ -41,11 +44,14 @@ import org.apache.commons.lang3.StringUtils; 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 static java.util.stream.Collectors.toList; + /** * 议题关联标签表 * @@ -134,6 +140,7 @@ public class IssueTagsServiceImpl extends BaseServiceImpl tags = baseDao.selectTagsByIssueId(form.getIssueId()); + if (CollectionUtils.isEmpty(form.getTagList())){ + // 清空此议题的标签 + if (!CollectionUtils.isEmpty(tags)){ + tags.forEach(t -> { + // 缓存标签 -1 + dictRedis.editTagUseCount(customerId,t.getCategoryId(),t,NumConstant.ONE_STR); + }); + // 数据库有关标签使用次数 -1 0:+1 ; 1:-1; + issueProjectTagDictDao.updateTagsUseCount(tags,customerId,NumConstant.ONE_STR); + } + // 删除数据库有关此议题标签 + baseDao.deleteTagsByIssueId(form.getIssueId()); + return; + } + List selectTags = form.getTagList(); + List newTags = issueProjectTagDictDao.selectTagId(selectTags, customerId); + IssueTagsDTO issueTagsDTO = baseDao.selectOneTagByIssueId(form.getIssueId()); + if (!CollectionUtils.isEmpty(newTags)){ + // 需要删除的标签 + List delList = tags.stream().filter(tag -> !newTags.contains(tag)).collect(toList()); + if (!CollectionUtils.isEmpty(delList)){ + delList.forEach(d -> { + dictRedis.editTagUseCount(customerId,d.getCategoryId(),d,NumConstant.ONE_STR); + }); + // 数据库有关标签使用次数 -1 0:+1 ; 1:-1; + issueProjectTagDictDao.updateTagsUseCount(delList,customerId,NumConstant.ONE_STR); + } + // 需要新增的标签 + List addList = newTags.stream().filter(tag -> !tags.contains(tag)).collect(toList()); + if (!CollectionUtils.isEmpty(addList)){ + addList.forEach(a -> { + // 缓存标签+1 + dictRedis.editTagUseCount(customerId,a.getCategoryId(),a,NumConstant.ZERO_STR); + }); + // 数据库对应标签 议题使用次数 +1 + issueProjectTagDictDao.updateTagsUseCount(addList,customerId,NumConstant.ZERO_STR); + } + // 删除数据库有关此议题标签 + baseDao.deleteTagsByIssueId(form.getIssueId()); + // 新增最新议题标签 + List needInsert = ConvertUtils.sourceToTarget(newTags, IssueTagsFormDTO.class); + needInsert.forEach(n -> { + n.setCustomerId(customerId); + n.setGridId(issueTagsDTO.getGridId()); + n.setIssueId(form.getIssueId()); + }); + baseDao.insertNewTags(needInsert); + } + } + } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml index ba99a65080..6300fb488c 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml @@ -3,6 +3,39 @@ + + + UPDATE issue_project_tag_dict + + SET ISSUE_USE_COUNT = (CASE WHEN ISSUE_USE_COUNT = 0 THEN 0 ELSE (ISSUE_USE_COUNT - 1) END) + + + SET ISSUE_USE_COUNT = ISSUE_USE_COUNT + 1 + + + DEL_FLAG = 0 + AND CUSTOMER_ID = #{customerId} + AND + + CATEGORY_ID = #{t.id} + AND TAG_NAME = #{t.tagName} + + + + + + + + + + + + DELETE FROM issue_tags + WHERE DEL_FLAG = 0 + AND ISSUE_ID = #{issueId} + + + + + + + + INSERT INTO issue_tags ( ID, CUSTOMER_ID, GRID_ID, ISSUE_ID, TAG_ID, TAG_NAME, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME ) + VALUES + + ( + REPLACE ( UUID(), '-', '' ), + #{l.customerId}, + #{l.gridId}, + #{l.issueId}, + #{l.tagId}, + #{l.tagName}, + #{l.delFlag}, + #{l.revision}, + #{l.createdBy}, + NOW(), + #{l.updatedBy}, + NOW() + ) + + + \ No newline at end of file From a4ff09ef58941fa05d3f503c457c15ea239a5627 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 10 Dec 2020 15:40:57 +0800 Subject: [PATCH 026/375] =?UTF-8?q?=E5=88=86=E7=B1=BB=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V0.0.7__add_category_tag.sql | 174 +++++++++++++++++- .../mapper/IssueProjectTagDictDao.xml | 13 +- 2 files changed, 182 insertions(+), 5 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.7__add_category_tag.sql b/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.7__add_category_tag.sql index b198293630..0695671d9a 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.7__add_category_tag.sql +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.7__add_category_tag.sql @@ -64,4 +64,176 @@ CREATE TABLE `issue_tags` ( `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', PRIMARY KEY (`ID`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='议题关联标签表'; \ No newline at end of file +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='议题关联标签表'; + + +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1001', 'default', '0', '0', 'A00000', '城市管理', '1', '1', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1002', 'default', '0', '0', 'B00000', '公安交通管理', '1', '2', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1003', 'default', '0', '0', 'C00000', '消防安全', '1', '3', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1004', 'default', '0', '0', 'D00000', '卫生计生监督执法', '1', '4', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1005', 'default', '0', '0', 'E00000', '其他', '1', '5', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1006', 'default', '0', '0', 'F00000', '创卫复审类', '1', '6', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1007', 'default', '0', '0', 'G00000', '环境保护', '1', '7', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1008', 'default', '0', '0', 'H00000', '安全监管', '1', '8', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1009', 'default', '0', '0', 'I00000', '民政', '1', '9', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1010', 'default', '0', '0', 'J00000', '建设管理', '1', '10', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1011', 'default', '0', '0', 'K00000', '文化执法', '1', '11', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1012', 'default', '0', '0', 'L00000', '社会治安综治', '1', '12', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1013', 'default', '0', '0', 'M00000', '食品药品监管', '1', '13', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1014', 'default', '0', '0', 'N00000', '市场监管', '1', '14', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1015', 'default', '1001', '1001', 'A00001', '市政设施管理', '2', '1', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1016', 'default', '1001', '1001', 'A00002', '环境卫生管理', '2', '2', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1017', 'default', '1001', '1001', 'A00003', '园林绿化管理', '2', '3', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1018', 'default', '1001', '1001', 'A00004', '市容市貌', '2', '4', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1019', 'default', '1001', '1001', 'A00005', '早、夜市(摊点群)', '2', '5', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1020', 'default', '1001', '1001', 'A00006', '城区公共健身设施管理', '2', '6', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1021', 'default', '1002', '1002', 'B00001', '交通设施', '2', '1', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1022', 'default', '1002', '1002', 'B00002', '车辆管理', '2', '2', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1023', 'default', '1002', '1002', 'B00003', '违法停车', '2', '3', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1024', 'default', '1003', '1003', 'C00001', '消防设施', '2', '1', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1025', 'default', '1003', '1003', 'C00002', '应急疏散', '2', '2', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1026', 'default', '1003', '1003', 'C00003', '消防隐患', '2', '3', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1027', 'default', '1004', '1004', 'D00001', '公共场所卫生执法', '2', '1', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1028', 'default', '1005', '1005', 'E00001', '其他', '2', '1', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1029', 'default', '1006', '1006', 'F00001', '健康教育促进、公共卫生与医疗服务', '2', '1', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1030', 'default', '1006', '1006', 'F00002', '农贸市场管理', '2', '2', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1031', 'default', '1006', '1006', 'F00003', '食品安全及重点场所卫生', '2', '3', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1032', 'default', '1006', '1006', 'F00004', '环境保护', '2', '4', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1033', 'default', '1006', '1006', 'F00005', '病媚生物防治和控烟', '2', '5', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1034', 'default', '1006', '1006', 'F00006', '市政道路与河道整治提升', '2', '6', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1035', 'default', '1006', '1006', 'F00007', '环境保洁提升', '2', '7', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1036', 'default', '1006', '1006', 'F00008', '绿化美化与铁路两侧环境提升', '2', '8', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1037', 'default', '1006', '1006', 'F00009', '夜景亮化提升', '2', '9', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1038', 'default', '1006', '1006', 'F00010', '单位和居民社区(小区)卫生', '2', '10', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1039', 'default', '1006', '1006', 'F00011', '广告牌匾、市容秩序、违建治理及居民楼院环境提升', '2', '11', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1040', 'default', '1006', '1006', 'F00012', '建筑立面、建设工地环境提升', '2', '12', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1041', 'default', '1007', '1007', 'G00001', '排放污水', '2', '1', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1042', 'default', '1007', '1007', 'G00002', '排放噪声', '2', '2', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1043', 'default', '1007', '1007', 'G00003', '排放固体废物', '2', '3', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1044', 'default', '1007', '1007', 'G00004', '排放大气污染物', '2', '4', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1045', 'default', '1008', '1008', 'H00001', '危险化学品', '2', '1', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1046', 'default', '1009', '1009', 'I00001', '救助管理', '2', '1', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1047', 'default', '1010', '1010', 'J00001', '建设施工管理', '2', '1', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1048', 'default', '1010', '1010', 'J00002', '河道管理', '2', '2', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1049', 'default', '1011', '1011', 'K00001', '文化领域', '2', '1', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1050', 'default', '1011', '1011', 'K00002', '广播影视领域', '2', '2', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1051', 'default', '1011', '1011', 'K00003', '新闻出版领域', '2', '3', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1052', 'default', '1012', '1012', 'L00001', '人口管理', '2', '1', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1053', 'default', '1012', '1012', 'L00002', '民事纠纷', '2', '2', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1054', 'default', '1012', '1012', 'L00003', '安全防控', '2', '3', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1055', 'default', '1012', '1012', 'L00004', '社会治安', '2', '4', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1056', 'default', '1012', '1012', 'L00005', '信访工作', '2', '5', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1057', 'default', '1013', '1013', 'M00001', '食品监管', '2', '1', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1058', 'default', '1013', '1013', 'M00002', '药品监管', '2', '2', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1059', 'default', '1013', '1013', 'M00003', '医疗器械监管', '2', '3', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1060', 'default', '1013', '1013', 'M00004', '保健食品监管', '2', '4', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1061', 'default', '1014', '1014', 'N00001', '营业执照管理', '2', '1', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1062', 'default', '1014', '1014', 'N00002', '特种设备安全', '2', '2', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_category_dict`(`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1063', 'default', '1014', '1014', 'N00003', '广告管理', '2', '3', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); + +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1020', 'default', '城管执法', '1018', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1021', 'default', '交易秩序', '1019', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1022', 'default', '健身设施维护与更新', '1020', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1023', 'default', '交通设施、标线', '1021', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1024', 'default', '废弃车辆', '1022', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1025', 'default', '畜力车进城', '1022', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1026', 'default', '人行道、车行道违法停车', '1023', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1027', 'default', '消防设施', '1024', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1028', 'default', '应急疏散', '1025', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1029', 'default', '各类大型活动不具备公共安全条件的严重隐患', '1026', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1030', 'default', '城市无烟草广告', '1027', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1031', 'default', '其他', '1028', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1032', 'default', '健康教育', '1029', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1033', 'default', '市民参与健身运动', '1029', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1034', 'default', '免疫门诊', '1029', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1035', 'default', '预检分诊点', '1029', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1036', 'default', '发热与肠道门诊设置', '1029', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1037', 'default', '医疗废弃物储存和处理', '1029', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1038', 'default', '基层医疗卫生机构标准化建设', '1029', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1039', 'default', '院内环卫设施及清扫保洁', '1029', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1040', 'default', '小型理发店、小旅店、小歌舞厅、小浴室等', '1029', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1041', 'default', '基本信息公示', '1030', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1042', 'default', '建设与管理', '1030', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1043', 'default', '市场公厕', '1030', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1044', 'default', '活禽售卖', '1030', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1045', 'default', '水产区', '1030', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1046', 'default', '食品安全', '1030', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1047', 'default', '基本信息公示', '1031', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1048', 'default', '设施与管理', '1031', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1049', 'default', '“五小”行业的食品安全管理', '1031', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1050', 'default', '噪音控制管理', '1032', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1051', 'default', '大气环境治理', '1032', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1052', 'default', '水源地保护', '1032', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1053', 'default', '医疗废弃物处置管理', '1032', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1054', 'default', '鼠防制', '1033', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1055', 'default', '蝇防制', '1033', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1056', 'default', '蚊防制', '1033', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1057', 'default', '蟑螂防制', '1033', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1058', 'default', '控制吸烟', '1033', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1059', 'default', '主次干道、背街小巷路面平坦,基础设施完好', '1034', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1060', 'default', '城中村及城乡结合部路面平整,沟渠密闭通畅', '1034', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1061', 'default', '公共河道、水域水面清洁,岸坡整洁完好,无直排污水现象', '1034', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1062', 'default', '清扫保洁', '1035', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1063', 'default', '垃圾收集运输', '1035', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1064', 'default', '垃圾中转站', '1035', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1065', 'default', '公厕', '1035', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1066', 'default', '社区与单位环境卫生', '1035', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1067', 'default', '城中村及城乡结合部卫生', '1035', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1068', 'default', '城市绿化', '1036', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1069', 'default', '社区、单位', '1036', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1070', 'default', '铁路沿线无“十乱”现象', '1036', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1071', 'default', '城市照明设施良好,保证路灯设施完好率和亮灯率达标', '1037', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1072', 'default', '社区(小区)居民和单位', '1038', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1073', 'default', '城中村及城乡结合部卫生', '1038', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1074', 'default', '城市户外广告、牌匾设置规范管理', '1039', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1075', 'default', '门前五包落实', '1039', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1076', 'default', '清理占道经营、店外经营', '1039', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1077', 'default', '“十乱”整治', '1039', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1078', 'default', '废品回收站规范管理', '1039', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1079', 'default', '流动商贩管理,早夜市卫生管理', '1039', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1080', 'default', '清理圈占绿地', '1039', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1081', 'default', '清理家畜饲养', '1039', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1082', 'default', '组织、指导各街道及相关部门清理乱搭乱建', '1039', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1083', 'default', '城市立面干净整洁', '1040', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1084', 'default', '建筑(代建、拆迁)工地', '1040', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1085', 'default', '向水体排放污染物', '1041', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1086', 'default', '向海域排放污染物', '1041', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1087', 'default', '生产、施工噪声', '1042', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1088', 'default', '室内音响噪声', '1042', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1089', 'default', '其他各种噪声', '1042', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1090', 'default', '排放固体废、危险废物、危险化学品、电子废物', '1043', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1091', 'default', '排放扬尘', '1044', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1092', 'default', '排放有毒有害气体', '1044', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1093', 'default', '排放油烟', '1044', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1094', 'default', '危险化学品', '1045', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1095', 'default', '流浪乞讨人员救助', '1046', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1096', 'default', '安全管理', '1047', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1097', 'default', '现场管理', '1047', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1098', 'default', '河堤破损', '1048', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1099', 'default', '歌舞娱乐场所', '1049', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1100', 'default', '游戏、游艺娱乐场所', '1049', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1101', 'default', '演出场所', '1049', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1102', 'default', '互联网商务服务营业场所', '1049', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1103', 'default', '文物监管', '1049', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1104', 'default', '卫星地面接收设施', '1050', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1105', 'default', '出版监管', '1051', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1106', 'default', '户籍人口', '1052', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1107', 'default', '流动人口', '1052', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1108', 'default', '矛盾纠纷排查化解', '1053', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1109', 'default', '涉及师生安全的案(事)件;涉及线、路案(事)件', '1054', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1110', 'default', '治安隐患上报;打架斗殴', '1055', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1111', 'default', '信访信息', '1056', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1112', 'default', '食品生产、流通企业监管', '1057', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1113', 'default', '活禽产品及冷鲜家禽质量问题', '1057', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1114', 'default', '餐饮服务单位监管', '1057', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1115', 'default', '药品生产、流通、使用单位监管', '1058', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1116', 'default', '医疗器械生产、经营、使用使用监管', '1059', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1117', 'default', '保健食品生产,经营监管', '1060', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1118', 'default', '显著位置悬挂营业执照', '1061', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1119', 'default', '门头字号与营业执照一致', '1061', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1120', 'default', '超出核准经营范围', '1061', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1121', 'default', '经营地址与营业执照一致', '1061', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1122', 'default', '无须许可、审批的各类经营主体无照经营', '1061', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1123', 'default', '电梯安全', '1062', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1124', 'default', '未经许可,擅自从事移动式压力容器或者气瓶充装活动的', '1062', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1125', 'default', '违法广告发布', '1063', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml index 6300fb488c..7aeeac687d 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml @@ -38,19 +38,24 @@ + SELECT + * + FROM + issue_project_category_dict + WHERE + del_flag = '0' + AND + customer_id = #{customerId} + AND + category_name = #{categoryName} + + + AND category_type = #{categoryType} + + + AND category_type = '2' + + + LIMIT 1 + \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml index 7aeeac687d..6815000576 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml @@ -70,5 +70,37 @@ DEL_FLAG = '0' AND CUSTOMER_ID = #{customerId} + + \ No newline at end of file From 15a4f4d319d43591867ecec53f7ec319dd5307a8 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 10 Dec 2020 15:56:56 +0800 Subject: [PATCH 028/375] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E4=BF=AE=E6=94=B9/=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dao/IssueProjectTagDictDao.java | 2 +- .../service/impl/IssueTagsServiceImpl.java | 17 +++++++++++++---- .../resources/mapper/IssueProjectTagDictDao.xml | 6 ++---- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectTagDictDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectTagDictDao.java index 88c196a8d7..2b61958883 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectTagDictDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectTagDictDao.java @@ -51,7 +51,7 @@ public interface IssueProjectTagDictDao extends BaseDao selectTagId(@Param("tags") List newTags, @Param("customerId")String customerId); + List selectTagId(@Param("list") List newTags); /** * 获取客户默认分类标签 diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java index 1b7d4ed8b1..26ce23bd7a 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java @@ -179,7 +179,10 @@ public class IssueTagsServiceImpl extends BaseServiceImpl { // 缓存标签 -1 - dictRedis.editTagUseCount(customerId,t.getCategoryId(),t,NumConstant.ONE_STR); + IssueCategoryTagResultDTO issueCategoryTagResultDTO = new IssueCategoryTagResultDTO(); + issueCategoryTagResultDTO.setName(t.getTagName()); + issueCategoryTagResultDTO.setId(t.getId()); + dictRedis.editTagUseCount(customerId,t.getCategoryId(),issueCategoryTagResultDTO,NumConstant.ONE_STR); }); // 数据库有关标签使用次数 -1 0:+1 ; 1:-1; issueProjectTagDictDao.updateTagsUseCount(tags,customerId,NumConstant.ONE_STR); @@ -189,14 +192,17 @@ public class IssueTagsServiceImpl extends BaseServiceImpl selectTags = form.getTagList(); - List newTags = issueProjectTagDictDao.selectTagId(selectTags, customerId); + List newTags = issueProjectTagDictDao.selectTagId(selectTags); IssueTagsDTO issueTagsDTO = baseDao.selectOneTagByIssueId(form.getIssueId()); if (!CollectionUtils.isEmpty(newTags)){ // 需要删除的标签 List delList = tags.stream().filter(tag -> !newTags.contains(tag)).collect(toList()); if (!CollectionUtils.isEmpty(delList)){ delList.forEach(d -> { - dictRedis.editTagUseCount(customerId,d.getCategoryId(),d,NumConstant.ONE_STR); + IssueCategoryTagResultDTO issueCategoryTagResultDTO = new IssueCategoryTagResultDTO(); + issueCategoryTagResultDTO.setName(d.getTagName()); + issueCategoryTagResultDTO.setId(d.getId()); + dictRedis.editTagUseCount(customerId,d.getCategoryId(),issueCategoryTagResultDTO,NumConstant.ONE_STR); }); // 数据库有关标签使用次数 -1 0:+1 ; 1:-1; issueProjectTagDictDao.updateTagsUseCount(delList,customerId,NumConstant.ONE_STR); @@ -206,7 +212,10 @@ public class IssueTagsServiceImpl extends BaseServiceImpl { // 缓存标签+1 - dictRedis.editTagUseCount(customerId,a.getCategoryId(),a,NumConstant.ZERO_STR); + IssueCategoryTagResultDTO issueCategoryTagResultDTO = new IssueCategoryTagResultDTO(); + issueCategoryTagResultDTO.setName(a.getTagName()); + issueCategoryTagResultDTO.setId(a.getId()); + dictRedis.editTagUseCount(customerId,a.getCategoryId(),issueCategoryTagResultDTO,NumConstant.ZERO_STR); }); // 数据库对应标签 议题使用次数 +1 issueProjectTagDictDao.updateTagsUseCount(addList,customerId,NumConstant.ZERO_STR); diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml index 6815000576..60beccaa6e 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml @@ -14,11 +14,9 @@ DEL_FLAG = 0 - AND CUSTOMER_ID = #{customerId} AND - CATEGORY_ID = #{t.id} - AND TAG_NAME = #{t.tagName} + id = #{t.id} @@ -32,7 +30,7 @@ FROM issue_project_tag_dict WHERE DEL_FLAG = 0 AND - + ID = #{t.id} From ac3a8dd59d80fbc72f090b5207353745cb0fccc8 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 10 Dec 2020 16:02:37 +0800 Subject: [PATCH 029/375] =?UTF-8?q?=E6=A0=87=E7=AD=BE=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/IssueProjectTagDictServiceImpl.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectTagDictServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectTagDictServiceImpl.java index 9b40e3350b..f2acf15e3c 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectTagDictServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectTagDictServiceImpl.java @@ -20,6 +20,7 @@ package com.epmet.service.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.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; @@ -32,14 +33,14 @@ import com.epmet.dto.result.TagListResultDTO; import com.epmet.entity.IssueProjectTagDictEntity; import com.epmet.redis.IssueProjectTagDictRedis; import com.epmet.service.IssueProjectTagDictService; +import com.epmet.utils.ModuleConstants; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.util.Arrays; -import java.util.List; -import java.util.Map; +import java.util.*; +import java.util.stream.Collectors; /** * 议题、项目标签字典表 @@ -117,8 +118,10 @@ public class IssueProjectTagDictServiceImpl extends BaseServiceImpl defaultList = baseDao.selectDefaultList(tokenDto.getCustomerId(), formDTO.getCategoryIdList()); - result.setDefaulted(defaultList); + Map> map = issueProjectTagDictRedis.getTagsOrderByRank(tokenDto.getCustomerId(), + formDTO.getCategoryIdList()); + result.setDefaulted(map.get(ModuleConstants.DEFAULT_TAG_CATEGORY_NAME)); + result.setCustomized(map.get(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME).stream().limit(NumConstant.TEN).collect(Collectors.toList())); return result; } From 137d296242f117f9e7f26597248163ff7fa08b70 Mon Sep 17 00:00:00 2001 From: wangchao Date: Thu, 10 Dec 2020 16:05:01 +0800 Subject: [PATCH 030/375] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E7=9A=84=E6=96=B9=E6=B3=95=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/redis/IssueProjectTagDictRedis.java | 39 +++++++++++-------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java index 18ebfdd206..9e0cd829cb 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java @@ -90,9 +90,9 @@ public class IssueProjectTagDictRedis { } IssueProjectCategoryDictEntity otherCategory = categoryDictDao.selectSingleByCustomerIdAndCategoryNameAndCategoryType(customerId, ModuleConstants.CATEGORY_NAME_OTHERS, null); - boolean ifOther = null == otherCategory ? false : (!CollectionUtils.isEmpty(category) && category.size() == NumConstant.ONE && category.contains(otherCategory.getId()) ? true : false); + boolean ifOtherOnly = null == otherCategory ? false : (!CollectionUtils.isEmpty(category) && category.size() == NumConstant.ONE && category.contains(otherCategory.getId()) ? true : false); Set keys; - if (CollectionUtils.isEmpty(category) || ifOther) + if (CollectionUtils.isEmpty(category) || ifOtherOnly) keys = redisUtils.keys(GovIssueRedisKeys.getGovernmentTagKey(customerId, null)); else keys = category.stream().map(key -> { return GovIssueRedisKeys.getGovernmentTagKey(customerId, key); @@ -111,32 +111,35 @@ public class IssueProjectTagDictRedis { return null; } }, redisTemplate.getValueSerializer()); - //热度Map 分数为key - Map> heatMap = new HashMap<>(); + + Map> result = new HashMap<>(); if (!CollectionUtils.isEmpty(heatTuple)) { + //热度Map 分数为key + Map> heatMap = new HashMap<>(); heatTuple.forEach(tupleSet -> { tupleSet.forEach(tuple -> { Double heatScore = tuple.getScore(); List queue = heatMap.get(heatScore); if (CollectionUtils.isEmpty(queue)) queue = new LinkedList<>(); queue.add(parseObject(tuple.getValue(), IssueCategoryTagResultDTO.class)); - heatMap.put(heatScore,queue); + heatMap.put(heatScore, queue); }); }); List defaultResult = new LinkedList<>(); heatMap.keySet().stream().sorted(Comparator.reverseOrder()).collect(Collectors.toList()).forEach(count -> { defaultResult.addAll(heatMap.get(count)); }); - Map> result = new HashMap<>(); - result.put(ModuleConstants.DEFAULT_TAG_CATEGORY_NAME,defaultResult); - Set> customizedTuples = redisUtils.zReverseRangeWithScores(GovIssueRedisKeys.getGovernmentTagKey(customerId, null), NumConstant.ZERO_L, (long) (NumConstant.ONE_NEG)); - if(!CollectionUtils.isEmpty(customizedTuples)){ + + result.put(ModuleConstants.DEFAULT_TAG_CATEGORY_NAME, defaultResult); + } + Set> customizedTuples = redisUtils.zReverseRangeWithScores(GovIssueRedisKeys.getGovernmentTagKey(customerId, null), NumConstant.ZERO_L, (long) (NumConstant.ONE_NEG)); + if(!CollectionUtils.isEmpty(customizedTuples)){ Map> customizedHeatMap = new HashMap<>(); customizedTuples.forEach(tuple -> { List queue = customizedHeatMap.get(tuple.getValue()); if((CollectionUtils.isEmpty(queue))) queue = new LinkedList<>(); queue.add(parseObject(tuple.getValue(), IssueCategoryTagResultDTO.class)); - heatMap.put((Double) tuple.getValue(),queue); + customizedHeatMap.put((Double) tuple.getValue(),queue); }); List customizedResult = new LinkedList<>(); customizedHeatMap.keySet().stream().sorted(Comparator.reverseOrder()).collect(Collectors.toList()).forEach(count -> { @@ -144,14 +147,14 @@ public class IssueProjectTagDictRedis { }); result.put(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME,customizedResult); } - return result; + return result; } - } + log.warn("fetch customer govern tag cache blankly,customerId:{},now begin compensation...", customerId); - Map> compensate = compensate(customerId, category, ifOther); + Map> compensate = compensate(customerId, category, ifOtherOnly); if (CollectionUtils.isEmpty(compensate)) { log.error("compensation failure or there is no default tag data in database!!"); @@ -173,14 +176,16 @@ public class IssueProjectTagDictRedis { * @author wangc * @date 2020.12.10 09:34 */ - public Map> compensate(String customerId,List category,boolean ifOther){ - //TODO 补偿机制 + public Map> compensate(String customerId,List category,boolean ifOtherOnly){ + - List _default = poolDao.selectTagByCategory(ifOther || CollectionUtils.isEmpty(category) ? null : category, NumConstant.ZERO_STR, customerId);//默认 + List _default = poolDao.selectTagByCategory(ifOtherOnly || CollectionUtils.isEmpty(category) ? null : category, NumConstant.ZERO_STR, customerId);//默认 List _customized = poolDao.selectTagByCategory(null,NumConstant.ONE_STR,customerId);//自定义 + Map>> fulfilled = new HashMap<>(); + Map> result = new HashMap<>(); - return null; + return result; } /** From ea574c055c3cf2891636b6bd061be585e14469d1 Mon Sep 17 00:00:00 2001 From: wangchao Date: Fri, 11 Dec 2020 10:20:21 +0800 Subject: [PATCH 031/375] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=96=B9=E6=B3=95?= =?UTF-8?q?=EF=BC=9A=E8=8E=B7=E5=8F=96=E9=BB=98=E8=AE=A4=E6=A0=87=E7=AD=BE?= =?UTF-8?q?(=E6=8C=89=E7=85=A7=E7=B1=BB=E5=88=AB=E6=8E=92=E5=BA=8F)?= =?UTF-8?q?=E5=92=8C=E8=87=AA=E5=AE=9A=E4=B9=89=E6=A0=87=E7=AD=BE(?= =?UTF-8?q?=E6=8C=89=E7=85=A7=E7=83=AD=E5=BA=A6=E6=8E=92=E5=BA=8F)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dao/IssueProjectTagDictDao.java | 3 +- .../epmet/redis/IssueProjectTagDictRedis.java | 246 +++++++++++++----- .../mapper/IssueProjectTagDictDao.xml | 18 +- 3 files changed, 191 insertions(+), 76 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectTagDictDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectTagDictDao.java index 2b61958883..3da76c1ca6 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectTagDictDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectTagDictDao.java @@ -75,11 +75,10 @@ public interface IssueProjectTagDictDao extends BaseDao * @author wangc * @date 2020.12.10 10:07 */ - List selectTagByCategory(@Param("categories") List categories,@Param("isDefault") String isDefault,@Param("customerId") String customerId); + List selectTagByCategory(@Param("categories") List categories,@Param("customerId") String customerId,@Param("isDefault")String isDefault); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java index 9e0cd829cb..1e4a4ec6f7 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java @@ -19,6 +19,7 @@ package com.epmet.redis; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.redis.RedisUtils; +import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.constant.GovIssueRedisKeys; import com.epmet.dao.IssueProjectCategoryDictDao; import com.epmet.dao.IssueProjectTagDictDao; @@ -72,18 +73,20 @@ public class IssueProjectTagDictRedis { return null; } + /** - * @Description 传入category列表,返回对应category下的标签,按热度排序 - * category列表为空则查询客户下全部 - * 如果想要自定义标签,单独请求一次,分类列表中只含"customize" + * @Description category为空,则补偿全部,返回默认标签和自定义标签 + * category仅包含"其他"这个分类的Id时,同上 + * category不为空且不只有"其他"这个分类的Id时,则返回集合中的类别标签以及自定义标签 + * 默认标签不按照热度排序,自定义标签按照热度排序 * * @param customerId * @param category - * @return java.util.List + * @return * @author wangc * @date 2020.12.09 11:16 - */ - public Map> getTagsOrderByRank(String customerId,List category) { + */ + public Map> getDefaultTagsSortedByCategoryAndCustomizedTagsOrderByRank(String customerId,List category) { if (StringUtils.isBlank(customerId)) { log.error("customerId can not be null when obtain govern tags."); return null; @@ -91,73 +94,140 @@ public class IssueProjectTagDictRedis { IssueProjectCategoryDictEntity otherCategory = categoryDictDao.selectSingleByCustomerIdAndCategoryNameAndCategoryType(customerId, ModuleConstants.CATEGORY_NAME_OTHERS, null); boolean ifOtherOnly = null == otherCategory ? false : (!CollectionUtils.isEmpty(category) && category.size() == NumConstant.ONE && category.contains(otherCategory.getId()) ? true : false); - Set keys; - if (CollectionUtils.isEmpty(category) || ifOtherOnly) - keys = redisUtils.keys(GovIssueRedisKeys.getGovernmentTagKey(customerId, null)); - else keys = category.stream().map(key -> { - return GovIssueRedisKeys.getGovernmentTagKey(customerId, key); - }).collect(Collectors.toSet()); + + Map> result = new HashMap<>(); + + List _default = poolDao.selectTagByCategory(ifOtherOnly || CollectionUtils.isEmpty(category) ? null : category, customerId, NumConstant.ZERO_STR);//默认 + if(!CollectionUtils.isEmpty(_default)){ + result.put(ModuleConstants.DEFAULT_TAG_CATEGORY_NAME,_default.stream().map(o -> { + IssueCategoryTagResultDTO tag = ConvertUtils.sourceToTarget(o,IssueCategoryTagResultDTO.class); + tag.setName(o.getTagName()); return tag;}).collect(Collectors.toList())); + }else log.error("there is no default tag data in database , customerId : {}",customerId); + + //如果keys集合为空,说明缓存中没有当前客户的标签排行信息,直接进行补偿 - if (!CollectionUtils.isEmpty(keys)){ - keys.remove(GovIssueRedisKeys.getGovernmentTagKey(customerId,ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME)); - List>> heatTuple = redisTemplate.executePipelined(new RedisCallback>>() { - @Nullable - @Override - public Set> doInRedis(RedisConnection connection) throws DataAccessException { - connection.openPipeline(); - keys.forEach(key -> { - connection.zSetCommands().zRangeByScoreWithScores(redisTemplate.getKeySerializer().serialize(key), NumConstant.ZERO_L, (long) (NumConstant.ONE_NEG)); - }); - return null; - } - }, redisTemplate.getValueSerializer()); - - Map> result = new HashMap<>(); - if (!CollectionUtils.isEmpty(heatTuple)) { - //热度Map 分数为key - Map> heatMap = new HashMap<>(); - heatTuple.forEach(tupleSet -> { - tupleSet.forEach(tuple -> { - Double heatScore = tuple.getScore(); - List queue = heatMap.get(heatScore); - if (CollectionUtils.isEmpty(queue)) queue = new LinkedList<>(); - queue.add(parseObject(tuple.getValue(), IssueCategoryTagResultDTO.class)); - heatMap.put(heatScore, queue); - }); + Set> customizedTuples = redisUtils.zReverseRangeWithScores(GovIssueRedisKeys.getGovernmentTagKey(customerId, null), NumConstant.ZERO_L, (long) (NumConstant.ONE_NEG)); + if(!CollectionUtils.isEmpty(customizedTuples)){ + Map> customizedHeatMap = new HashMap<>(); + customizedTuples.forEach(tuple -> { + List queue = customizedHeatMap.get(tuple.getValue()); + if((CollectionUtils.isEmpty(queue))) queue = new LinkedList<>(); + queue.add(parseObject(tuple.getValue(), IssueCategoryTagResultDTO.class)); + customizedHeatMap.put((Double) tuple.getValue(),queue); }); - List defaultResult = new LinkedList<>(); - heatMap.keySet().stream().sorted(Comparator.reverseOrder()).collect(Collectors.toList()).forEach(count -> { - defaultResult.addAll(heatMap.get(count)); + List customizedResult = new LinkedList<>(); + customizedHeatMap.keySet().stream().sorted(Comparator.reverseOrder()).collect(Collectors.toList()).forEach(count -> { + customizedResult.addAll(customizedHeatMap.get(count)); }); + result.put(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME,customizedResult); + } - result.put(ModuleConstants.DEFAULT_TAG_CATEGORY_NAME, defaultResult); + if(!CollectionUtils.isEmpty(result)) + return result; + + + log.warn("fetch customer govern tag cache blankly,customerId:{},now begin compensation...", customerId); + + Map> compensate = compensate(customerId, category, ifOtherOnly); + + if (CollectionUtils.isEmpty(compensate)) { + log.error("compensation failure or there is no tag data in database!!"); + return null; + } else { + log.warn("compensation completed!!"); + return compensate; + } + } + + + + + /** + * @Description category为空,则补偿全部,返回默认标签和自定义标签 + * category仅包含"其他"这个分类的Id时,同上 + * category不为空且不只有"其他"这个分类的Id时,则返回集合中的类别标签以及自定义标签 + * 默认标签不按照热度排序,自定义标签按照热度排序 + * + * @param customerId + * @param category + * @return + * @author wangc + * @date 2020.12.09 11:16 + */ + public Map> getTagsOrderByRank(String customerId,List category) { + if (StringUtils.isBlank(customerId)) { + log.error("customerId can not be null when obtain govern tags."); + return null; } - Set> customizedTuples = redisUtils.zReverseRangeWithScores(GovIssueRedisKeys.getGovernmentTagKey(customerId, null), NumConstant.ZERO_L, (long) (NumConstant.ONE_NEG)); - if(!CollectionUtils.isEmpty(customizedTuples)){ - Map> customizedHeatMap = new HashMap<>(); - customizedTuples.forEach(tuple -> { - List queue = customizedHeatMap.get(tuple.getValue()); - if((CollectionUtils.isEmpty(queue))) queue = new LinkedList<>(); + + IssueProjectCategoryDictEntity otherCategory = categoryDictDao.selectSingleByCustomerIdAndCategoryNameAndCategoryType(customerId, ModuleConstants.CATEGORY_NAME_OTHERS, null); + boolean ifOtherOnly = null == otherCategory ? false : (!CollectionUtils.isEmpty(category) && category.size() == NumConstant.ONE && category.contains(otherCategory.getId()) ? true : false); + Set keys; + if (CollectionUtils.isEmpty(category) || ifOtherOnly) + keys = redisUtils.keys(GovIssueRedisKeys.getGovernmentTagKey(customerId, null)); + else keys = category.stream().map(key -> { + return GovIssueRedisKeys.getGovernmentTagKey(customerId, key); + }).collect(Collectors.toSet()); + //如果keys集合为空,说明缓存中没有当前客户的标签排行信息,直接进行补偿 + if (!CollectionUtils.isEmpty(keys)){ + keys.remove(GovIssueRedisKeys.getGovernmentTagKey(customerId,ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME)); + List>> heatTuple = redisTemplate.executePipelined(new RedisCallback>>() { + @Nullable + @Override + public Set> doInRedis(RedisConnection connection) throws DataAccessException { + connection.openPipeline(); + keys.forEach(key -> { + connection.zSetCommands().zRangeByScoreWithScores(redisTemplate.getKeySerializer().serialize(key), NumConstant.ZERO_L, (long) (NumConstant.ONE_NEG)); + }); + return null; + } + }, redisTemplate.getValueSerializer()); + + Map> result = new HashMap<>(); + if (!CollectionUtils.isEmpty(heatTuple)) { + //热度Map 分数为key + Map> heatMap = new HashMap<>(); + heatTuple.forEach(tupleSet -> { + tupleSet.forEach(tuple -> { + Double heatScore = tuple.getScore(); + List queue = heatMap.get(heatScore); + if (CollectionUtils.isEmpty(queue)) queue = new LinkedList<>(); queue.add(parseObject(tuple.getValue(), IssueCategoryTagResultDTO.class)); - customizedHeatMap.put((Double) tuple.getValue(),queue); + heatMap.put(heatScore, queue); + }); }); - List customizedResult = new LinkedList<>(); - customizedHeatMap.keySet().stream().sorted(Comparator.reverseOrder()).collect(Collectors.toList()).forEach(count -> { - customizedResult.addAll(customizedHeatMap.get(count)); + List defaultResult = new LinkedList<>(); + heatMap.keySet().stream().sorted(Comparator.reverseOrder()).collect(Collectors.toList()).forEach(count -> { + defaultResult.addAll(heatMap.get(count)); }); - result.put(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME,customizedResult); - } - return result; - } + result.put(ModuleConstants.DEFAULT_TAG_CATEGORY_NAME, defaultResult); + } + Set> customizedTuples = redisUtils.zReverseRangeWithScores(GovIssueRedisKeys.getGovernmentTagKey(customerId, null), NumConstant.ZERO_L, (long) (NumConstant.ONE_NEG)); + if(!CollectionUtils.isEmpty(customizedTuples)){ + Map> customizedHeatMap = new HashMap<>(); + customizedTuples.forEach(tuple -> { + List queue = customizedHeatMap.get(tuple.getValue()); + if((CollectionUtils.isEmpty(queue))) queue = new LinkedList<>(); + queue.add(parseObject(tuple.getValue(), IssueCategoryTagResultDTO.class)); + customizedHeatMap.put((Double) tuple.getValue(),queue); + }); + List customizedResult = new LinkedList<>(); + customizedHeatMap.keySet().stream().sorted(Comparator.reverseOrder()).collect(Collectors.toList()).forEach(count -> { + customizedResult.addAll(customizedHeatMap.get(count)); + }); + result.put(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME,customizedResult); + } + return result; + } log.warn("fetch customer govern tag cache blankly,customerId:{},now begin compensation...", customerId); - Map> compensate = compensate(customerId, category, ifOtherOnly); + Map> compensate = compensate(customerId, category, ifOtherOnly); if (CollectionUtils.isEmpty(compensate)) { - log.error("compensation failure or there is no default tag data in database!!"); + log.error("compensation failure or there is no tag data in database!!"); return null; } else { log.warn("compensation completed!!"); @@ -165,26 +235,70 @@ public class IssueProjectTagDictRedis { } } + + /** - * @Description category为空,则补偿全部,返回全部 - * category不为空,则补偿集合中的类别标签以及自定义标签 - * category为"customize",只补偿自定义标签 - * 只需查询标签库(issue_project_tag_dict)中的issueUseCount和projectUseCount即可 + * @Description category为空,则补偿全部,返回默认标签和自定义标签,补偿全部 + * category仅包含"其他"这个分类的Id时,返回同上,补偿全部 + * category不为空且不只有"其他"这个分类的Id时,则返回并补偿集合中的类别标签以及自定义标签 + * 默认标签不按照热度排序,自定义标签按照热度排序 + * + * * @param customerId * @param category - * @return java.util.List + * @return * @author wangc * @date 2020.12.10 09:34 */ public Map> compensate(String customerId,List category,boolean ifOtherOnly){ - List _default = poolDao.selectTagByCategory(ifOtherOnly || CollectionUtils.isEmpty(category) ? null : category, NumConstant.ZERO_STR, customerId);//默认 - List _customized = poolDao.selectTagByCategory(null,NumConstant.ONE_STR,customerId);//自定义 + List db = poolDao.selectTagByCategory(ifOtherOnly || CollectionUtils.isEmpty(category) ? null : category, customerId, null); + + // key -> redisKey + // value -> [key : score ; value : object] Map>> fulfilled = new HashMap<>(); - Map> result = new HashMap<>(); + if(!CollectionUtils.isEmpty(db)) { + Map> categoryMap = db.stream().collect(Collectors.groupingBy(IssueProjectTagDictEntity::getCategoryId)); + //key -> categoryId + categoryMap.forEach((k, v) -> { + Map> scoreMap = new HashMap<>(); + String redisKey = GovIssueRedisKeys.getGovernmentTagKey(customerId, k); + v.forEach(tag -> { + List unit = scoreMap.get(tag.getIssueUseCount()); + if (CollectionUtils.isEmpty(unit)) unit = new LinkedList<>(); + IssueCategoryTagResultDTO object = ConvertUtils.sourceToTarget(tag, IssueCategoryTagResultDTO.class); + object.setName(tag.getTagName()); + unit.add(object); + scoreMap.put(tag.getIssueUseCount(), unit); + }); + fulfilled.put(redisKey, scoreMap); + }); + + redisTemplate.executePipelined((RedisCallback) connection -> { + fulfilled.forEach((redisKey, map) -> { + map.forEach((score,list) -> { + list.forEach(factor -> { + connection.zSetCommands().zAdd(redisTemplate.getValueSerializer().serialize(redisKey), + score.doubleValue(), + redisTemplate.getValueSerializer().serialize(factor)); + }); + }); + + }); + return null; + }); + } + + Map> result = new HashMap<>(); + result.put(ModuleConstants.DEFAULT_TAG_CATEGORY_NAME,CollectionUtils.isEmpty(db) ? null : db.stream().filter(o -> !StringUtils.equals(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME,o.getCategoryId())).map(entity -> { + IssueCategoryTagResultDTO tag = ConvertUtils.sourceToTarget(entity,IssueCategoryTagResultDTO.class); + tag.setName(entity.getTagName()); return tag;}).collect(Collectors.toList())); + result.put(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME,CollectionUtils.isEmpty(db) ? null : db.stream().filter(o -> !StringUtils.equals(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME,o.getCategoryId())).sorted(Comparator.comparing(IssueProjectTagDictEntity :: getIssueUseCount).reversed()).map(entity -> { + IssueCategoryTagResultDTO tag = ConvertUtils.sourceToTarget(entity,IssueCategoryTagResultDTO.class); + tag.setName(entity.getTagName());return tag;}).collect(Collectors.toList())); return result; } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml index 60beccaa6e..2c5f2aab17 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml @@ -73,7 +73,7 @@ SELECT tag.ID, tag.TAG_NAME, - tag.CATEGORY_ID, + IFNULL(tag.CATEGORY_ID,'customize') AS categoryId, tag.IS_DEFAULT, (IFNULL(tag.ISSUE_USE_COUNT,0) + IFNULL(tag.PROJECT_USE_COUNT,0)) AS issueUseCount FROM @@ -81,24 +81,26 @@ WHERE tag.DEL_FLAG = '0' AND tag.CUSTOMER_ID = #{customerId} - AND tag.IS_DEFAULT = #{isDefault} + + AND tag.IS_DEFAULT = #{isDefault} + - + tag.CATEGORY_ID = #{id} ORDER BY FIELD( - tag.CATEGORY_ID, - - #{id} - + tag.CATEGORY_ID, + + #{id} + ) ORDER BY type.SORT - , tag.TAG_NAME + , CONVERT ( tag.TAG_NAME USING gbk ) \ No newline at end of file From eb21708f4b499126e3d2fe200d014d87b43d1de3 Mon Sep 17 00:00:00 2001 From: wangchao Date: Fri, 11 Dec 2020 10:23:53 +0800 Subject: [PATCH 032/375] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=87=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/redis/IssueProjectTagDictRedis.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java index 1e4a4ec6f7..c19eeee7de 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java @@ -75,10 +75,11 @@ public class IssueProjectTagDictRedis { /** - * @Description category为空,则补偿全部,返回默认标签和自定义标签 - * category仅包含"其他"这个分类的Id时,同上 - * category不为空且不只有"其他"这个分类的Id时,则返回集合中的类别标签以及自定义标签 - * 默认标签不按照热度排序,自定义标签按照热度排序 + * @Description + * + * 排序规则: + * 1、默认标签,按照分类排序 + * 2、自定义标签,按照热度排序 * * @param customerId * @param category From f0b1db90f79a292be107411e03d11d3ee55ec1da Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 11 Dec 2020 10:35:27 +0800 Subject: [PATCH 033/375] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=85=A5=E5=8F=82=E5=8E=BB=E6=8E=89=E5=AE=A2?= =?UTF-8?q?=E6=88=B7Id=EF=BC=8C=E6=94=B9=E4=B8=BA=E5=9C=A8token=E4=B8=AD?= =?UTF-8?q?=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/CustomerCategoryListFormDTO.java | 22 ------------------- .../IssueProjectCategoryDictController.java | 10 ++++----- .../IssueProjectCategoryDictService.java | 5 ++--- .../IssueProjectCategoryDictServiceImpl.java | 7 +++--- 4 files changed, 10 insertions(+), 34 deletions(-) delete mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/CustomerCategoryListFormDTO.java diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/CustomerCategoryListFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/CustomerCategoryListFormDTO.java deleted file mode 100644 index 39ae42441e..0000000000 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/CustomerCategoryListFormDTO.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.epmet.dto.form; - -import lombok.Data; - -import javax.validation.constraints.NotBlank; -import java.io.Serializable; - -/** - * 分类列表查询-接口入参 - * @Author sun - */ -@Data -public class CustomerCategoryListFormDTO implements Serializable { - - private static final long serialVersionUID = 2599592072265715951L; - @NotBlank(message = "客户ID不能为空",groups = {CustomerCategoryListFormDTO.Category.class}) - private String customerId; - - public interface Category{} - - -} diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java index cd7948cf91..16fb700639 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java @@ -17,7 +17,9 @@ package com.epmet.controller; +import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; @@ -27,7 +29,6 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IssueProjectCategoryDictDTO; import com.epmet.dto.form.CategoryTagInitFormDTO; -import com.epmet.dto.form.CustomerCategoryListFormDTO; import com.epmet.dto.form.ProjectSaveCategoryFormDTO; import com.epmet.dto.result.CustomerCategoryListResultDTO; import com.epmet.dto.result.ProjectIssueCategoryResultDTO; @@ -97,15 +98,14 @@ public class IssueProjectCategoryDictController { } /** - * @param formDTO + * @param tokenDto * @return * @Description 客户分类列表查询,按分类升序排列 * @Author sun **/ @PostMapping("list") - public Result> categoryList(@RequestBody CustomerCategoryListFormDTO formDTO) { - ValidatorUtils.validateEntity(formDTO, CustomerCategoryListFormDTO.Category.class); - return new Result>().ok(issueProjectCategoryDictService.categoryList(formDTO)); + public Result> categoryList(@LoginUser TokenDto tokenDto) { + return new Result>().ok(issueProjectCategoryDictService.categoryList(tokenDto.getCustomerId())); } /** diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java index 1e89188eff..c283895c9f 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java @@ -21,7 +21,6 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IssueProjectCategoryDictDTO; import com.epmet.dto.form.CategoryTagInitFormDTO; -import com.epmet.dto.form.CustomerCategoryListFormDTO; import com.epmet.dto.form.ProjectSaveCategoryFormDTO; import com.epmet.dto.result.CustomerCategoryListResultDTO; import com.epmet.dto.result.ProjectIssueCategoryResultDTO; @@ -99,12 +98,12 @@ public interface IssueProjectCategoryDictService extends BaseService categoryList(CustomerCategoryListFormDTO formDTO); + List categoryList(String customerId); /** * 客户分类标签数据初始化 diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java index 3030b696fd..e767bc8113 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java @@ -29,7 +29,6 @@ import com.epmet.dao.IssueProjectRelationDao; import com.epmet.dto.IssueDTO; import com.epmet.dto.IssueProjectCategoryDictDTO; import com.epmet.dto.form.CategoryTagInitFormDTO; -import com.epmet.dto.form.CustomerCategoryListFormDTO; import com.epmet.dto.form.ProjectSaveCategoryFormDTO; import com.epmet.dto.form.SaveIssueCategoryFormDTO; import com.epmet.dto.result.CustomerCategoryListResultDTO; @@ -121,14 +120,14 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl categoryList(CustomerCategoryListFormDTO formDTO) { - List resultList = baseDao.selectCustomerCategoryList(formDTO.getCustomerId()); + public List categoryList(String customerId) { + List resultList = baseDao.selectCustomerCategoryList(customerId); return resultList; } From a910d2cfdda5d0c6ae167e6a193a08b1c430aade Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 11 Dec 2020 10:39:06 +0800 Subject: [PATCH 034/375] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E4=BF=AE=E6=94=B9/=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/IssueTagsServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java index 26ce23bd7a..fbe4f9782c 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java @@ -191,6 +191,7 @@ public class IssueTagsServiceImpl extends BaseServiceImpl selectTags = form.getTagList(); List newTags = issueProjectTagDictDao.selectTagId(selectTags); IssueTagsDTO issueTagsDTO = baseDao.selectOneTagByIssueId(form.getIssueId()); From 50e0558ca6d6593b3b1be86ea546a5d5597148cf Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 11 Dec 2020 11:02:41 +0800 Subject: [PATCH 035/375] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E8=81=94=E5=90=88?= =?UTF-8?q?=E4=B8=BB=E9=94=AE=E9=80=A0=E6=88=90=E7=9A=84=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dao/IssueProjectCategoryDictDao.java | 2 +- .../resources/mapper/IssueProjectCategoryDictDao.xml | 10 +++++++--- .../dto/result/CustomerCategoryListResultDTO.java | 6 ++++++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java index ec76ffd7b4..52405b07f5 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java @@ -44,7 +44,7 @@ public interface IssueProjectCategoryDictDao extends BaseDao subCategoryList(@Param("id") String categoryId); + List subCategoryList(@Param("id") String categoryId, @Param("customerId") String customerId); /** * 获取默认标签配置 diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml index 1e0d90e45c..9bcdc54cdf 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml @@ -7,14 +7,16 @@ + - + SELECT id AS "id", - category_name AS "name" + category_name AS "name", + customer_id AS "customerId" FROM issue_project_category_dict WHERE del_flag = '0' AND pid = #{id} + AND customer_id = #{customerId} ORDER BY sort ASC diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/CustomerCategoryListResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/CustomerCategoryListResultDTO.java index 2ae7331706..117c6cd42b 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/CustomerCategoryListResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/CustomerCategoryListResultDTO.java @@ -1,5 +1,6 @@ package com.epmet.dto.result; +import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; @@ -22,6 +23,11 @@ public class CustomerCategoryListResultDTO implements Serializable { * 分类名称 */ private String name; + /** + * 分类名称 + */ + @JsonIgnore + private String customerId; /** * 子级分类对象 From b96444ed21f3ae050e021d716f988f483380966f Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Fri, 11 Dec 2020 11:10:32 +0800 Subject: [PATCH 036/375] =?UTF-8?q?=E6=A0=87=E7=AD=BE=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/IssueProjectTagDictServiceImpl.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectTagDictServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectTagDictServiceImpl.java index f2acf15e3c..12c8cb4764 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectTagDictServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectTagDictServiceImpl.java @@ -34,6 +34,7 @@ import com.epmet.entity.IssueProjectTagDictEntity; import com.epmet.redis.IssueProjectTagDictRedis; import com.epmet.service.IssueProjectTagDictService; import com.epmet.utils.ModuleConstants; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -118,10 +119,15 @@ public class IssueProjectTagDictServiceImpl extends BaseServiceImpl> map = issueProjectTagDictRedis.getTagsOrderByRank(tokenDto.getCustomerId(), + Map> map = issueProjectTagDictRedis.getDefaultTagsSortedByCategoryAndCustomizedTagsOrderByRank(tokenDto.getCustomerId(), formDTO.getCategoryIdList()); result.setDefaulted(map.get(ModuleConstants.DEFAULT_TAG_CATEGORY_NAME)); - result.setCustomized(map.get(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME).stream().limit(NumConstant.TEN).collect(Collectors.toList())); + List list = map.get(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME); + if (CollectionUtils.isNotEmpty(list)) { + result.setCustomized(list.stream().limit(NumConstant.TEN).collect(Collectors.toList())); + } else { + result.setCustomized(Collections.emptyList()); + } return result; } From 1f08c1f64cfad0e5debd3746f3c89e0249ac0092 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 11 Dec 2020 13:47:44 +0800 Subject: [PATCH 037/375] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E4=BF=AE=E6=94=B9/=E4=BF=9D=E5=AD=98=20tagName=E4=BF=AE?= =?UTF-8?q?=E6=94=B9name?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/form/IssueTagFormDTO.java | 2 +- .../src/main/java/com/epmet/dto/form/IssueTagsFormDTO.java | 2 +- .../java/com/epmet/service/impl/IssueTagsServiceImpl.java | 6 +++--- .../src/main/resources/mapper/IssueProjectTagDictDao.xml | 2 +- .../src/main/resources/mapper/IssueTagsDao.xml | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueTagFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueTagFormDTO.java index b49075bce4..3b9cfedb13 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueTagFormDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueTagFormDTO.java @@ -15,7 +15,7 @@ public class IssueTagFormDTO implements Serializable { private String id; - private String tagName; + private String name; private String categoryId; diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueTagsFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueTagsFormDTO.java index e813b866f5..8cb89dc4d7 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueTagsFormDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueTagsFormDTO.java @@ -41,7 +41,7 @@ public class IssueTagsFormDTO implements Serializable { /** * 标签名称 */ - private String tagName; + private String name; /** * 删除标识 0.未删除 1.已删除 diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java index fbe4f9782c..744852e874 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java @@ -180,7 +180,7 @@ public class IssueTagsServiceImpl extends BaseServiceImpl { // 缓存标签 -1 IssueCategoryTagResultDTO issueCategoryTagResultDTO = new IssueCategoryTagResultDTO(); - issueCategoryTagResultDTO.setName(t.getTagName()); + issueCategoryTagResultDTO.setName(t.getName()); issueCategoryTagResultDTO.setId(t.getId()); dictRedis.editTagUseCount(customerId,t.getCategoryId(),issueCategoryTagResultDTO,NumConstant.ONE_STR); }); @@ -201,7 +201,7 @@ public class IssueTagsServiceImpl extends BaseServiceImpl { IssueCategoryTagResultDTO issueCategoryTagResultDTO = new IssueCategoryTagResultDTO(); - issueCategoryTagResultDTO.setName(d.getTagName()); + issueCategoryTagResultDTO.setName(d.getName()); issueCategoryTagResultDTO.setId(d.getId()); dictRedis.editTagUseCount(customerId,d.getCategoryId(),issueCategoryTagResultDTO,NumConstant.ONE_STR); }); @@ -214,7 +214,7 @@ public class IssueTagsServiceImpl extends BaseServiceImpl { // 缓存标签+1 IssueCategoryTagResultDTO issueCategoryTagResultDTO = new IssueCategoryTagResultDTO(); - issueCategoryTagResultDTO.setName(a.getTagName()); + issueCategoryTagResultDTO.setName(a.getName()); issueCategoryTagResultDTO.setId(a.getId()); dictRedis.editTagUseCount(customerId,a.getCategoryId(),issueCategoryTagResultDTO,NumConstant.ZERO_STR); }); diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml index 2c5f2aab17..8ed29444c2 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml @@ -24,7 +24,7 @@ SELECT it.TAG_ID AS id, - it.TAG_NAME, + it.TAG_NAME as name, td.CATEGORY_ID, it.TAG_ID AS tagId FROM issue_tags it @@ -79,7 +79,7 @@ #{l.gridId}, #{l.issueId}, #{l.tagId}, - #{l.tagName}, + #{l.name}, #{l.delFlag}, #{l.revision}, #{l.createdBy}, From 12cdac988c89371431cb53c64f50221643c6f0c3 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 11 Dec 2020 13:52:15 +0800 Subject: [PATCH 038/375] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9=EF=BC=8C=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E5=88=86=E7=B1=BB=E5=8F=AF=E4=BB=A5=E7=A9=BF=E7=A9=BA?= =?UTF-8?q?=E7=9A=84=E5=88=86=E7=B1=BB=E9=9B=86=E5=90=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/controller/IssueCategoryController.java | 3 --- .../com/epmet/service/impl/IssueCategoryServiceImpl.java | 6 ++++++ .../com/epmet/controller/ProjectCategoryController.java | 3 --- .../com/epmet/service/impl/ProjectCategoryServiceImpl.java | 5 +++++ 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCategoryController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCategoryController.java index 2da6a153eb..bfd770a5ff 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCategoryController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCategoryController.java @@ -129,9 +129,6 @@ public class IssueCategoryController { @PostMapping("save") public Result saveCategory(@RequestBody IssueSaveCategoryFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO, IssueSaveCategoryFormDTO.SaveCategory.class); - if(formDTO.getCategoryList().size()< NumConstant.ONE){ - throw new RenException("请至少选择一个分类保存"); - } issueCategoryService.saveCategory(formDTO); return new Result(); } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java index 32dcd13338..f806f28032 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java @@ -177,6 +177,12 @@ public class IssueCategoryServiceImpl extends BaseServiceImpl result = govIssueOpenFeignClient.getProjectAndCategoryInfo(formDTO); if (!result.success()) { From 7c5782f90c73553aba63203a7fba79f3d0779227 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 11 Dec 2020 14:11:31 +0800 Subject: [PATCH 039/375] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E7=BD=91=E6=A0=BCId?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/IssueTagsServiceImpl.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java index 744852e874..5b7b639389 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java @@ -25,6 +25,7 @@ import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.IssueDao; import com.epmet.dao.IssueProjectTagDictDao; import com.epmet.dao.IssueTagsDao; import com.epmet.dto.IssueTagsDTO; @@ -34,6 +35,7 @@ import com.epmet.dto.form.IssueTagsFormDTO; import com.epmet.dto.form.IssueTagsSaveFormDTO; import com.epmet.dto.result.AddTagResultDTO; import com.epmet.dto.result.IssueCategoryTagResultDTO; +import com.epmet.entity.IssueEntity; import com.epmet.entity.IssueProjectTagDictEntity; import com.epmet.entity.IssueTagsEntity; import com.epmet.redis.IssueProjectTagDictRedis; @@ -67,6 +69,8 @@ public class IssueTagsServiceImpl extends BaseServiceImpl page(Map params) { @@ -194,7 +198,7 @@ public class IssueTagsServiceImpl extends BaseServiceImpl selectTags = form.getTagList(); List newTags = issueProjectTagDictDao.selectTagId(selectTags); - IssueTagsDTO issueTagsDTO = baseDao.selectOneTagByIssueId(form.getIssueId()); + IssueEntity issueEntity = issueDao.selectById(form.getIssueId()); if (!CollectionUtils.isEmpty(newTags)){ // 需要删除的标签 List delList = tags.stream().filter(tag -> !newTags.contains(tag)).collect(toList()); @@ -227,7 +231,7 @@ public class IssueTagsServiceImpl extends BaseServiceImpl needInsert = ConvertUtils.sourceToTarget(newTags, IssueTagsFormDTO.class); needInsert.forEach(n -> { n.setCustomerId(customerId); - n.setGridId(issueTagsDTO.getGridId()); + n.setGridId(issueEntity.getGridId()); n.setIssueId(form.getIssueId()); }); baseDao.insertNewTags(needInsert); From 930859563a5b7e7fe03d4688dfa4d1d8a18103a9 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 11 Dec 2020 14:33:38 +0800 Subject: [PATCH 040/375] =?UTF-8?q?=E6=A0=87=E7=AD=BE=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/IssueTagsServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java index 5b7b639389..9598d00fbc 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java @@ -163,7 +163,7 @@ public class IssueTagsServiceImpl extends BaseServiceImpl Date: Fri, 11 Dec 2020 14:35:49 +0800 Subject: [PATCH 041/375] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=EF=BC=9A=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/TagDifferentSetFormDTO.java | 28 +++++++++++ .../epmet/feign/GovIssueOpenFeignClient.java | 11 +++++ .../GovIssueOpenFeignClientFallBack.java | 5 ++ .../IssueProjectTagDictController.java | 15 ++++++ .../epmet/redis/IssueProjectTagDictRedis.java | 7 ++- .../service/IssueProjectTagDictService.java | 10 ++++ .../IssueProjectCategoryDictServiceImpl.java | 1 - .../impl/IssueProjectTagDictServiceImpl.java | 13 +++++ .../epmet/dto/form/ProjectTagHookFormDTO.java | 43 +++++++++++++++++ .../controller/ProjectTagsController.java | 13 +++-- .../java/com/epmet/dao/ProjectTagsDao.java | 18 +++++++ .../com/epmet/service/ProjectTagsService.java | 11 +++++ .../service/impl/ProjectTagsServiceImpl.java | 48 +++++++++++++++++++ .../main/resources/mapper/ProjectTagsDao.xml | 38 +++++++++++++++ 14 files changed, 255 insertions(+), 6 deletions(-) create mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/TagDifferentSetFormDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectTagHookFormDTO.java diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/TagDifferentSetFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/TagDifferentSetFormDTO.java new file mode 100644 index 0000000000..93685f4a81 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/TagDifferentSetFormDTO.java @@ -0,0 +1,28 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.List; + +/** + * @Description 更新标签使用率入参DTO + * @ClassName TagDifferentSetFormDTO + * @Auth wangc + * @Date 2020-12-11 14:03 + */ +@Data +public class TagDifferentSetFormDTO implements Serializable { + private static final long serialVersionUID = -5232943723252172322L; + + private List plus; + + private List minus; + + @NotBlank(message = "客户Id不能为空") + private String customerId; + + @NotBlank(message = "用户Id不能为空") + private String userId; +} diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java index eebeae517c..5987bcacca 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java @@ -223,4 +223,15 @@ public interface GovIssueOpenFeignClient { **/ @PostMapping(value = "/gov/issue/issueprojectcategorydict/getprojectandcategoryinfo") Result getProjectAndCategoryInfo(ProjectSaveCategoryFormDTO formDTO); + + /** + * @Description 更新标签热度 数据库/缓存 + * @param param + * @return void + * @author wangc + * @date 2020.12.11 14:00 + */ + @PostMapping("/gov/issue/issueprojecttagdict/updatecitations") + Result updateCitations(@RequestBody TagDifferentSetFormDTO param); + } diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java index c261fa79d1..537b7d3265 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java @@ -211,4 +211,9 @@ public class GovIssueOpenFeignClientFallBack implements GovIssueOpenFeignClient public Result getProjectAndCategoryInfo(ProjectSaveCategoryFormDTO formDTO) { return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "getProjectAndCategoryInfo", formDTO); } + + @Override + public Result updateCitations(TagDifferentSetFormDTO param) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "updateCitations", param); + } } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectTagDictController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectTagDictController.java index 67d923b73a..e87f9996d7 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectTagDictController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectTagDictController.java @@ -28,6 +28,7 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.IssueProjectTagDictDTO; +import com.epmet.dto.form.TagDifferentSetFormDTO; import com.epmet.dto.form.TagListFormDTO; import com.epmet.dto.result.TagListResultDTO; import com.epmet.excel.IssueProjectTagDictExcel; @@ -107,4 +108,18 @@ public class IssueProjectTagDictController { public Result list(@LoginUser TokenDto tokenDto, @RequestBody TagListFormDTO formDTO) { return new Result().ok(issueProjectTagDictService.getTagList(tokenDto, formDTO)); } + + /** + * @Description 更新标签热度 数据库/缓存 + * @param param + * @return void + * @author wangc + * @date 2020.12.11 14:00 + */ + @PostMapping("updatecitations") + public Result updateCitations(@RequestBody TagDifferentSetFormDTO param){ + ValidatorUtils.validateEntity(param); + issueProjectTagDictService.updateTagHeat(param); + return new Result(); + } } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java index c19eeee7de..cabdeca377 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java @@ -144,7 +144,10 @@ public class IssueProjectTagDictRedis { /** - * @Description category为空,则补偿全部,返回默认标签和自定义标签 + * @Description FIXME 该方法保留,默认查询缓存,默认和自定义两种标签均按热度排序 + * FIXME 如果缓存中没有相关数据,则进行补偿,返回的数据为:1、默认标签(分类排序) 2、自定义标签(热度排序) + * FIXME 补偿机制均是在缓存中存储热度得分,因此在业务改变之前不要调用该方法 + * category为空,则补偿全部,返回默认标签和自定义标签 * category仅包含"其他"这个分类的Id时,同上 * category不为空且不只有"其他"这个分类的Id时,则返回集合中的类别标签以及自定义标签 * 默认标签不按照热度排序,自定义标签按照热度排序 @@ -294,9 +297,11 @@ public class IssueProjectTagDictRedis { } Map> result = new HashMap<>(); + //默认标签:按照分类排序 Mapper返回的查询结果是有序的 result.put(ModuleConstants.DEFAULT_TAG_CATEGORY_NAME,CollectionUtils.isEmpty(db) ? null : db.stream().filter(o -> !StringUtils.equals(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME,o.getCategoryId())).map(entity -> { IssueCategoryTagResultDTO tag = ConvertUtils.sourceToTarget(entity,IssueCategoryTagResultDTO.class); tag.setName(entity.getTagName()); return tag;}).collect(Collectors.toList())); + //自定义标签:按照热度排序 sorted(Comparator.comparing(IssueProjectTagDictEntity :: getIssueUseCount).reversed()) result.put(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME,CollectionUtils.isEmpty(db) ? null : db.stream().filter(o -> !StringUtils.equals(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME,o.getCategoryId())).sorted(Comparator.comparing(IssueProjectTagDictEntity :: getIssueUseCount).reversed()).map(entity -> { IssueCategoryTagResultDTO tag = ConvertUtils.sourceToTarget(entity,IssueCategoryTagResultDTO.class); tag.setName(entity.getTagName());return tag;}).collect(Collectors.toList())); diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectTagDictService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectTagDictService.java index 089aac5d68..4e37aaf0d0 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectTagDictService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectTagDictService.java @@ -21,6 +21,7 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.IssueProjectTagDictDTO; +import com.epmet.dto.form.TagDifferentSetFormDTO; import com.epmet.dto.form.TagListFormDTO; import com.epmet.dto.result.TagListResultDTO; import com.epmet.entity.IssueProjectTagDictEntity; @@ -114,4 +115,13 @@ public interface IssueProjectTagDictService extends BaseService */ List getTagListByCustomer(String customerId); + + /** + * @Description 更新标签热度 数据库/缓存 + * @param param + * @return void + * @author wangc + * @date 2020.12.11 14:00 + */ + void updateTagHeat(TagDifferentSetFormDTO param); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java index e767bc8113..966fb2ce14 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java @@ -197,5 +197,4 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl tagList; + + /** + * 客户Id,从token中获取 + */ + @NotBlank(message = "客户Id不能为空") + private String customerId; + + /** + * 工作人员Id,从token中获取 + */ + @NotBlank(message = "工作人员Id不能为空") + private String staffId; +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTagsController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTagsController.java index 01ab68f1b9..80fad9fab5 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTagsController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTagsController.java @@ -17,7 +17,9 @@ package com.epmet.controller; +import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; @@ -26,6 +28,7 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.ProjectTagsDTO; +import com.epmet.dto.form.ProjectTagHookFormDTO; import com.epmet.excel.ProjectTagsExcel; import com.epmet.service.ProjectTagsService; import org.springframework.beans.factory.annotation.Autowired; @@ -61,11 +64,13 @@ public class ProjectTagsController { return new Result().ok(data); } - @PostMapping - public Result save(@RequestBody ProjectTagsDTO dto){ + @PostMapping("save") + public Result save(@RequestBody ProjectTagHookFormDTO dto, @LoginUser TokenDto token){ + dto.setCustomerId(token.getCustomerId()); + dto.setStaffId(token.getUserId()); //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - projectTagsService.save(dto); + ValidatorUtils.validateEntity(dto); + projectTagsService.saveDifferentSet(dto); return new Result(); } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectTagsDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectTagsDao.java index da5b1d39c9..6c72f46614 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectTagsDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectTagsDao.java @@ -39,4 +39,22 @@ public interface ProjectTagsDao extends BaseDao { * @Author sun **/ List selectProjectTagList(@Param("projectId") String projectId); + + /** + * @Description 删除项目的标签 + * @param projectId + * @return void + * @author wangc + * @date 2020.12.11 13:26 + */ + void deleteProjectTags(@Param("projectId") String projectId); + + /** + * @Description 批量插入 + * @param list + * @return void + * @author wangc + * @date 2020.12.11 13:39 + */ + void insertBatch(@Param("list")List list); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectTagsService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectTagsService.java index d281c2100e..a16e725bec 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectTagsService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectTagsService.java @@ -20,6 +20,7 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.ProjectTagsDTO; +import com.epmet.dto.form.ProjectTagHookFormDTO; import com.epmet.entity.ProjectTagsEntity; import java.util.List; @@ -92,4 +93,14 @@ public interface ProjectTagsService extends BaseService { * @date 2020-12-08 */ void delete(String[] ids); + + /** + * @Description 修改项目于标签的绑定关系并对标签的引用量做出相应调整 + * saveDifferentSet :: 保存差集 + * @param param + * @return void + * @author wangc + * @date 2020.12.11 11:10 + */ + void saveDifferentSet(ProjectTagHookFormDTO param); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTagsServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTagsServiceImpl.java index 4d4f135b6e..4154c9bd24 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTagsServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTagsServiceImpl.java @@ -20,22 +20,30 @@ package com.epmet.service.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.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.Result; import com.epmet.dao.ProjectTagsDao; import com.epmet.dto.ProjectTagsDTO; +import com.epmet.dto.form.ProjectTagHookFormDTO; +import com.epmet.dto.form.TagDifferentSetFormDTO; +import com.epmet.dto.result.ProjectCategoryTagResultDTO; import com.epmet.entity.ProjectTagsEntity; +import com.epmet.feign.GovIssueOpenFeignClient; import com.epmet.redis.ProjectTagsRedis; import com.epmet.service.ProjectTagsService; import org.apache.commons.lang3.StringUtils; 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; /** * 项目关联标签表 @@ -49,6 +57,9 @@ public class ProjectTagsServiceImpl extends BaseServiceImpl page(Map params) { IPage page = baseDao.selectPage( @@ -101,4 +112,41 @@ public class ProjectTagsServiceImpl extends BaseServiceImpl orientHooks = baseDao.selectProjectTagList(param.getProjectId()); + //新增 + List newHooks = param.getTagList(); + if(!CollectionUtils.isEmpty(orientHooks)) baseDao.deleteProjectTags(param.getProjectId()); + if(!CollectionUtils.isEmpty(newHooks)){ + baseDao.insertBatch(newHooks.stream().map(o->{ + ProjectTagsEntity hook = ConvertUtils.sourceToTarget(param,ProjectTagsEntity.class);hook.setTagId(o.getId());hook.setTagName(o.getName());hook.setCreatedBy(param.getStaffId());return hook; + }).collect(Collectors.toList())); + } + + List orientIds = CollectionUtils.isEmpty(orientHooks) ? null : orientHooks.stream().map(ProjectCategoryTagResultDTO :: getId).collect(Collectors.toList()); + List newIds = CollectionUtils.isEmpty(newHooks) ? null : newHooks.stream().map(ProjectCategoryTagResultDTO::getId).collect(Collectors.toList()); + TagDifferentSetFormDTO differentSet = ConvertUtils.sourceToTarget(param,TagDifferentSetFormDTO.class); + differentSet.setUserId(param.getStaffId()); + if(null == orientIds && null == newIds) return ; + if(null != orientIds && null == newIds) differentSet.setMinus(orientIds); + if(null == orientIds && null != newIds) differentSet.setPlus(newIds); + if(null != orientIds && null != newIds){ + differentSet.setPlus(newIds.removeAll(orientIds) ? newIds : null); + differentSet.setMinus(orientIds.removeAll(newIds) ? orientIds : null); + } + Result result = issueClient.updateCitations(differentSet); + if(!result.success()) throw new RenException(result.getInternalMsg()); + } + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectTagsDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectTagsDao.xml index 0936bcc4d4..bf3fc03e65 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectTagsDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectTagsDao.xml @@ -16,4 +16,42 @@ created_time ASC + + + delete from project_tags + where del_flag = '0' + and project_id = #{projectId} + + + + INSERT INTO project_tags + ( + ID, + CUSTOMER_ID, + PROJECT_ID, + TAG_ID, + TAG_NAME, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{item.customerId}, + #{item.projectId}, + #{item.tagId}, + #{item.tagName}, + 0, + 0, + #{item.createdBy}, + now(), + #{item.createdBy}, + now() + ) + + \ No newline at end of file From 97c0a2a8ab0ef08c9ded3899d381312f170f111a Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Fri, 11 Dec 2020 14:57:19 +0800 Subject: [PATCH 042/375] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E8=BD=AC=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE-=E5=88=86=E7=B1=BB=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/controller/IssueManageController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueManageController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueManageController.java index 3887b48938..b0e7af6b86 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueManageController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueManageController.java @@ -180,7 +180,7 @@ public class IssueManageController { public Result shiftProjectV2(@LoginUser TokenDto tokenDTO, @RequestBody ShiftProjectFormDTO formDTO) { formDTO.setStaffId(tokenDTO.getUserId()); ValidatorUtils.validateEntity(formDTO); - issueService.shiftProject(formDTO); + issueService.shiftProjectV2(formDTO); return new Result(); } From eb4a2401b568d0cac9f8490002f2ad3d546fb1ed Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 11 Dec 2020 15:08:30 +0800 Subject: [PATCH 043/375] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/IssueCategoryDao.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml index 9844127300..e3713438a4 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml @@ -4,12 +4,13 @@ SELECT ID AS tagId, @@ -104,4 +120,19 @@ , CONVERT ( tag.TAG_NAME USING gbk ) + + \ No newline at end of file From b77916377d5a92dd45cd251728b0124432296039 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Tue, 15 Dec 2020 09:29:33 +0800 Subject: [PATCH 049/375] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V0.0.8__add_category_tag.sql | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.8__add_category_tag.sql diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.8__add_category_tag.sql b/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.8__add_category_tag.sql new file mode 100644 index 0000000000..155914a359 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.8__add_category_tag.sql @@ -0,0 +1,19 @@ +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1001', 'default', '车行道、人行道、盲道、无障碍通道、路名牌', '1015', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1002', 'default', '城市桥梁、人形天桥、地下人行通道管理', '1015', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1003', 'default', '道路占掘管理', '1015', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1004', 'default', '排水管理', '1015', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1005', 'default', '停车场管理', '1015', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1006', 'default', '公共事业', '1015', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1007', 'default', '照明路灯及景观灯饰管理', '1015', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1008', 'default', '城市广场管理', '1015', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1009', 'default', '防汛防滑', '1015', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1010', 'default', '清扫保洁', '1016', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1011', 'default', '垃圾收集和转运', '1016', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1012', 'default', '公厕', '1016', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1013', 'default', '病媚生物防治', '1016', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1014', 'default', '行道树、绿篱、绿地等职务养护', '1017', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1015', 'default', '环境管理', '1017', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1016', 'default', '公园管理', '1017', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1017', 'default', '市容秩序管理', '1018', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1018', 'default', '户外广告', '1018', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `issue_project_tag_dict`(`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1019', 'default', '规划管理', '1018', '0', '0', '0', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); From 6c7d7240b7ad87f9845b97a0268ff8262584abe0 Mon Sep 17 00:00:00 2001 From: wangchao Date: Tue, 15 Dec 2020 10:52:38 +0800 Subject: [PATCH 050/375] =?UTF-8?q?=E6=A0=87=E7=AD=BE=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E8=A1=A5=E5=81=BF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/redis/IssueProjectTagDictRedis.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java index 8494a00ec7..23229851b2 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java @@ -26,6 +26,7 @@ import com.epmet.dao.IssueProjectTagDictDao; import com.epmet.dto.result.IssueCategoryTagResultDTO; import com.epmet.entity.IssueProjectCategoryDictEntity; import com.epmet.entity.IssueProjectTagDictEntity; +import com.epmet.service.IssueProjectCategoryDictService; import com.epmet.utils.ModuleConstants; import com.fasterxml.jackson.databind.ObjectMapper; import lombok.extern.slf4j.Slf4j; @@ -39,7 +40,6 @@ import org.springframework.data.redis.core.ZSetOperations; import org.springframework.lang.Nullable; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; -import sun.security.krb5.internal.PAData; import java.util.*; import java.util.stream.Collectors; @@ -61,6 +61,8 @@ public class IssueProjectTagDictRedis { private IssueProjectTagDictDao poolDao; @Autowired private IssueProjectCategoryDictDao categoryDictDao; + @Autowired + private IssueProjectCategoryDictService categoryDictService; public void delete(Object[] ids) { } @@ -305,7 +307,7 @@ public class IssueProjectTagDictRedis { IssueCategoryTagResultDTO tag = ConvertUtils.sourceToTarget(entity,IssueCategoryTagResultDTO.class); tag.setName(entity.getTagName()); return tag;}).collect(Collectors.toList())); //自定义标签:按照热度排序 sorted(Comparator.comparing(IssueProjectTagDictEntity :: getIssueUseCount).reversed()) - result.put(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME,CollectionUtils.isEmpty(db) ? null : db.stream().filter(o -> !StringUtils.equals(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME,o.getCategoryId())).sorted(Comparator.comparing(IssueProjectTagDictEntity :: getIssueUseCount).reversed()).map(entity -> { + result.put(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME,CollectionUtils.isEmpty(db) ? null : db.stream().filter(o -> StringUtils.equals(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME,o.getCategoryId())).sorted(Comparator.comparing(IssueProjectTagDictEntity :: getIssueUseCount).reversed()).map(entity -> { IssueCategoryTagResultDTO tag = ConvertUtils.sourceToTarget(entity,IssueCategoryTagResultDTO.class); tag.setName(entity.getTagName());return tag;}).collect(Collectors.toList())); return result; From bc9002e5a890f328275b2e5ec725039db1b69fd1 Mon Sep 17 00:00:00 2001 From: wangchao Date: Tue, 15 Dec 2020 15:58:51 +0800 Subject: [PATCH 051/375] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E6=97=B6=E7=9A=84=E8=A1=A5=E5=81=BF=E6=9C=BA=E5=88=B6=E9=87=8C?= =?UTF-8?q?=EF=BC=8C=E5=A6=82=E6=9E=9C=E5=AE=A2=E6=88=B7=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E4=B8=80=E5=A5=97=E8=87=AA=E5=B7=B1=E7=9A=84=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=EF=BC=8C=E9=BB=98=E8=AE=A4=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E4=B8=80=E5=A5=97=E6=95=B0=E6=8D=AE=E8=BF=9B=E5=8E=BB?= =?UTF-8?q?=EF=BC=8C=E5=B9=B6=E6=94=BE=E5=85=A5=E7=BC=93=E5=AD=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/redis/IssueProjectTagDictRedis.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java index 23229851b2..e95f856aae 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java @@ -23,6 +23,7 @@ import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.constant.GovIssueRedisKeys; import com.epmet.dao.IssueProjectCategoryDictDao; import com.epmet.dao.IssueProjectTagDictDao; +import com.epmet.dto.form.CategoryTagInitFormDTO; import com.epmet.dto.result.IssueCategoryTagResultDTO; import com.epmet.entity.IssueProjectCategoryDictEntity; import com.epmet.entity.IssueProjectTagDictEntity; @@ -264,6 +265,11 @@ public class IssueProjectTagDictRedis { List db = poolDao.selectTagByCategory(ifOtherOnly || CollectionUtils.isEmpty(category) ? null : category, customerId, null); + if(CollectionUtils.isEmpty(db) && (ifOtherOnly || CollectionUtils.isEmpty(category))){ + CategoryTagInitFormDTO customerIdParam = new CategoryTagInitFormDTO(); customerIdParam.setCustomerId(customerId); + categoryDictService.init(customerIdParam); + db = poolDao.selectTagByCategory(ifOtherOnly || CollectionUtils.isEmpty(category) ? null : category, customerId, null); + } // key -> redisKey // value -> [key : score ; value : object] From e9ab4e1c65e216f75745cbf6d7573f60ebd02a1e Mon Sep 17 00:00:00 2001 From: wangchao Date: Tue, 15 Dec 2020 17:20:53 +0800 Subject: [PATCH 052/375] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E7=BC=93=E5=AD=98=E6=97=B6=E5=AF=B9=E4=BA=8E=E7=89=B9=E5=AE=9A?= =?UTF-8?q?=E5=9C=BA=E6=99=AF=E5=BC=BA=E5=88=B6=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/redis/IssueProjectTagDictRedis.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java index e95f856aae..7e4d3b456a 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java @@ -18,6 +18,7 @@ package com.epmet.redis; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.redis.RedisUtils; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.constant.GovIssueRedisKeys; @@ -93,7 +94,7 @@ public class IssueProjectTagDictRedis { public Map> getDefaultTagsSortedByCategoryAndCustomizedTagsOrderByRank(String customerId,List category) { if (StringUtils.isBlank(customerId)) { log.error("customerId can not be null when obtain govern tags."); - return null; + throw new RenException("customerId can not be null when obtain govern tags."); } IssueProjectCategoryDictEntity otherCategory = categoryDictDao.selectSingleByCustomerIdAndCategoryNameAndCategoryType(customerId, ModuleConstants.CATEGORY_NAME_OTHERS, null); @@ -139,7 +140,7 @@ public class IssueProjectTagDictRedis { if (CollectionUtils.isEmpty(compensate)) { log.error("compensation failure or there is no tag data in database!!"); - return null; + throw new RenException("compensation failure or there is no tag data in database!!"); } else { log.warn("compensation completed!!"); return compensate; From 575a9f19221f37b6b9458b02c96bcc954068b7b7 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 16 Dec 2020 16:46:20 +0800 Subject: [PATCH 053/375] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E3=80=81=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E6=8E=A5=E5=8F=A3=E6=9F=A5=E8=AF=A2=E5=B7=B2=E6=9C=89?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E6=8E=A5=E5=8F=A3=E8=BF=94=E5=9B=9E=E7=9A=84?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E5=90=8D=E7=A7=B0=E6=8B=BC=E6=8E=A5=E4=B8=8A?= =?UTF-8?q?=E4=B8=80=E7=BA=A7=E5=88=86=E7=B1=BB=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/IssueCategoryDao.xml | 29 ++++++++++++------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml index 93c51604f7..6d9b7b80da 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml @@ -9,32 +9,41 @@ ip.category_name AS "name" FROM issue_category ic - INNER JOIN issue_project_category_dict ip ON ic.category_id = ip.id + INNER JOIN ( + SELECT + a.id AS "idd", + a.customer_id AS "customer_id", + a.sort AS "sort", + CONCAT(b.category_name, '-', a.category_name) AS "category_name" + FROM issue_project_category_dict a + INNER JOIN issue_project_category_dict b ON a.pid = b.id + ) ip ON ic.category_id = ip.idd AND ic.customer_id = ip.customer_id WHERE ic.del_flag = '0' - AND ip.del_flag = '0' AND ic.issue_id = #{issueId} ORDER BY ip.sort ASC - + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectOrgDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectOrgDailyDao.xml index 27d91a7f2a..60a464c1e7 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectOrgDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectOrgDailyDao.xml @@ -50,6 +50,6 @@ and t1.CUSTOMER_ID=#{customerId} order by t1.DATE_ID desc limit 1 - ) + )and m.customerId=#{customerId} \ No newline at end of file From 007939a285dda4e3d746f2553d94c9a18c103ce3 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 5 Mar 2021 12:35:27 +0800 Subject: [PATCH 069/375] =?UTF-8?q?=E3=80=90send=5Fmsg=E3=80=91=E5=BC=80?= =?UTF-8?q?=E5=85=B3=E6=9C=AA=E5=BC=80=E5=90=AF=E6=94=B9=E4=B8=BAwarn?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/SysSmsServiceImpl.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/SysSmsServiceImpl.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/SysSmsServiceImpl.java index fe270e280c..e2c1d1f864 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/SysSmsServiceImpl.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/SysSmsServiceImpl.java @@ -201,7 +201,7 @@ public class SysSmsServiceImpl extends BaseServiceImpl @Override public void projectSendMsg(List formDTOList) { if (CollectionUtils.isEmpty(formDTOList)){ - logger.error(SysSmsConstant.IS_NULL_PARAM_LIST); + logger.warn(SysSmsConstant.IS_NULL_PARAM_LIST); return; } Map> groupByCustomer = formDTOList.stream().collect(Collectors.groupingBy(ProjectSendMsgFormDTO::getCustomerId)); @@ -213,7 +213,7 @@ public class SysSmsServiceImpl extends BaseServiceImpl } List parameterResult = listResult.getData(); if (CollectionUtils.isEmpty(parameterResult)){ - logger.error(SysSmsConstant.PARAMETER_INFO_IS_ZERO); + logger.warn(SysSmsConstant.PARAMETER_INFO_IS_ZERO); return; } groupByCustomer.forEach((customerId,v) -> { @@ -230,11 +230,11 @@ public class SysSmsServiceImpl extends BaseServiceImpl if (customerId.equals(p.getCustomerId())){ // 判断参数开关是否打开,false:未打开 if (p.getSwitchStatus() == false){ - logger.error(String.format(SysSmsConstant.NOT_ON_SWITCH,customerId,p.getParameterKey())); + logger.warn(String.format(SysSmsConstant.NOT_ON_SWITCH,customerId,p.getParameterKey())); }else { // 判断余额状态 false:余额不足 if (p.getBalanceStatus() == false){ - logger.error(String.format(SysSmsConstant.NOT_ENOUGH_BALANCE,customerId,p.getParameterValue())); + logger.warn(String.format(SysSmsConstant.NOT_ENOUGH_BALANCE,customerId,p.getParameterValue())); }else { v.forEach(dto->{ SysSmsDTO sysSmsDTO = new SysSmsDTO(); @@ -249,7 +249,7 @@ public class SysSmsServiceImpl extends BaseServiceImpl }); }); }catch (RenException e){ - logger.error(e.getInternalMsg()); + logger.warn(e.getInternalMsg()); } Map> groupBySwitch = parameterResult.stream().collect(Collectors.groupingBy(CrmParameterResultDTO::getSwitchStatus)); List crmParameterTrue = groupBySwitch.get(true); @@ -274,7 +274,7 @@ public class SysSmsServiceImpl extends BaseServiceImpl //短信服务 AbstractSmsService service = SmsFactory.build(); if (service == null) { - logger.error("发送短信异常,ErrorCode:%s,异常AbstractSmsService is null", ModuleErrorCode.SMS_CONFIG); + logger.warn("发送短信异常,ErrorCode:%s,异常AbstractSmsService is null", ModuleErrorCode.SMS_CONFIG); } //发送短信 if (StringUtils.isNotBlank(sysSmsDTO.getAliyunTemplateCode())) { @@ -283,7 +283,7 @@ public class SysSmsServiceImpl extends BaseServiceImpl service.sendSms(sysSmsDTO.getMobile(), map); } } catch (Exception e) { - logger.error(String.format("项目提醒发送短信失败,失败手机号:%s,ErrorCode:%s", sysSmsDTO.getMobile(), e.getMessage())); + logger.warn(String.format("项目提醒发送短信失败,失败手机号:%s,ErrorCode:%s", sysSmsDTO.getMobile(), e.getMessage())); } } From b4e50495a9b4670f02346b8705aee4ad6306211f Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 5 Mar 2021 12:47:46 +0800 Subject: [PATCH 070/375] CUSTOMER_ID --- .../main/resources/mapper/screen/ScreenProjectOrgDailyDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectOrgDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectOrgDailyDao.xml index 60a464c1e7..9ef167d327 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectOrgDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectOrgDailyDao.xml @@ -50,6 +50,6 @@ and t1.CUSTOMER_ID=#{customerId} order by t1.DATE_ID desc limit 1 - )and m.customerId=#{customerId} + )and m.CUSTOMER_ID=#{customerId} \ No newline at end of file From 0b515ea9bbbc7606390542f71efb8fb61b399ab3 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 5 Mar 2021 14:04:54 +0800 Subject: [PATCH 071/375] =?UTF-8?q?=E6=8C=87=E6=95=B0=E8=AE=A1=E7=AE=97=20?= =?UTF-8?q?street=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcal/CommunityScoreDao.java | 1 + .../FactIndexGovrnAblityOrgMonthlyDao.java | 1 + .../FactIndexPartyAblityOrgMonthlyDao.java | 1 + .../FactIndexServiceAblityOrgMonthlyDao.java | 1 + .../impl/IndexCalculateStreetServiceImpl.java | 12 +++++----- .../indexcal/CommunityScoreDao.xml | 21 +++++++++++++++++ .../FactIndexGovrnAblityOrgMonthlyDao.xml | 23 +++++++++++++++++++ .../FactIndexPartyAblityOrgMonthlyDao.xml | 18 +++++++++++++++ .../FactIndexServiceAblityOrgMonthlyDao.xml | 18 +++++++++++++++ 9 files changed, 90 insertions(+), 6 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunityScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunityScoreDao.java index 1e653e61a7..d88c05e053 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunityScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunityScoreDao.java @@ -97,6 +97,7 @@ public interface CommunityScoreDao extends BaseDao selectSubCommAvgScoreExistSub(@Param("monthId")String monthId, @Param("indexCode")String indexCode,@Param("areaCode")String areaCode); + List selectSubCommAvgScoreExistSubNotSelf(@Param("monthId")String monthId, @Param("indexCode")String indexCode,@Param("areaCode")String areaCode); /** * 根据入参查询 查询社区id diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java index 48d156cc81..72888053f3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java @@ -75,6 +75,7 @@ public interface FactIndexGovrnAblityOrgMonthlyDao extends BaseDao> selectCommunityGovernAbilityExistsSub(@Param("monthId")String monthId,@Param("areaCode")String areaCode); + List> selectCommunityGovernAbilityExistsSubNotSelf(@Param("monthId")String monthId,@Param("areaCode")String areaCode); /** * 根据组织类型删除数据 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java index ebbdc9424f..01d76af0bd 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java @@ -86,6 +86,7 @@ public interface FactIndexPartyAblityOrgMonthlyDao extends BaseDao> selectPublishArticleCountMapExistSub(@Param("monthId")String monthId,@Param("areaCode")String areaCode,@Param("areaCodeLength")Integer areaCodeLength); + List> selectPublishArticleCountMapExistSubNotSelf(@Param("monthId")String monthId,@Param("areaCode")String areaCode,@Param("areaCodeLength")Integer areaCodeLength); /** * @Description 查询社区下的发文数 Map【根据areaCode】 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java index bacc7b77ed..5bcd057058 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java @@ -87,6 +87,7 @@ public interface FactIndexServiceAblityOrgMonthlyDao extends BaseDao> selectActivityCountMapExistsSub(@Param("monthId")String monthId,@Param("areaCode")String areaCode); + List> selectActivityCountMapExistsSubNotSelf(@Param("monthId")String monthId,@Param("areaCode")String areaCode); /** * 根据组织类型删除数据 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java index c2d488ea41..9343575dc3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java @@ -613,7 +613,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ //下属所有社区的党建能力平均值 detailListByParentCode.forEach(detail -> { if (IndexCodeEnum.JIE_DAO_XIA_SHU_SYSQDJNLHZPJZ.getCode().equals(detail.getIndexCode())) { - List subCommPartyAvgScore = communityScoreDao.selectSubCommAvgScoreExistSub(monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),form.getCustomerAreaCode()); + List subCommPartyAvgScore = communityScoreDao.selectSubCommAvgScoreExistSubNotSelf(monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),form.getCustomerAreaCode()); if (CollectionUtils.isEmpty(subCommPartyAvgScore)) { log.warn(IndexCalConstant.COMMUNITY_PARTY_AVG_NULL); } else if (subCommPartyAvgScore.size() > NumConstant.ZERO) { @@ -634,7 +634,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ } } else { // 街道名义发文数量 - List> mapList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMapExistSub(monthId,form.getCustomerAreaCode(),NumConstant.NINE); + List> mapList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMapExistSubNotSelf(monthId,form.getCustomerAreaCode(),NumConstant.NINE); if (CollectionUtils.isEmpty(mapList)) { log.warn(IndexCalConstant.STREET_PUBLISH_ARTICLE_LIST_NULL); } else { @@ -688,7 +688,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ Map pid = new HashMap<>(); detailListByParentCode.forEach(detail -> { if (IndexCodeEnum.JIE_DAO_XIA_SHU_SYSQZLNLHZ.getCode().equals(detail.getIndexCode())) { - List subGridGovernAvg = communityScoreDao.selectSubCommAvgScoreExistSub(monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),form.getCustomerAreaCode()); + List subGridGovernAvg = communityScoreDao.selectSubCommAvgScoreExistSubNotSelf(monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),form.getCustomerAreaCode()); if (CollectionUtils.isEmpty(subGridGovernAvg)){ log.warn("查询街道下属所有社区治理能力汇总为空"); }else if (subGridGovernAvg.size() > NumConstant.ZERO) { @@ -708,7 +708,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ } } else { // 治理能力的六个五级指标 - List> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbilityExistsSub(monthId,form.getCustomerAreaCode()); + List> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbilityExistsSubNotSelf(monthId,form.getCustomerAreaCode()); if (CollectionUtils.isEmpty(communityGovernAbility)){ log.warn(IndexCalConstant.STREET_GOVERN_ABILITY_NULL); }else{ @@ -762,7 +762,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ detailListByParentCode.forEach(detail -> { String indexCode = detail.getIndexCode(); if (IndexCodeEnum.JIE_DAO_XIA_SHU_SQFWNLDFPYZ.getCode().equals(indexCode)) { - List subCommServiceAvg = communityScoreDao.selectSubCommAvgScoreExistSub(monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),form.getCustomerAreaCode()); + List subCommServiceAvg = communityScoreDao.selectSubCommAvgScoreExistSubNotSelf(monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),form.getCustomerAreaCode()); if (CollectionUtils.isEmpty(subCommServiceAvg)) { log.warn("查询街道下属社区服务能力得分平均值为空"); } else if (subCommServiceAvg.size() > NumConstant.ZERO) { @@ -781,7 +781,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ }); } } else { - List> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMapExistsSub(monthId,form.getCustomerAreaCode()); + List> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMapExistsSubNotSelf(monthId,form.getCustomerAreaCode()); if (CollectionUtils.isEmpty(communityActivityCountList)) { log.warn(IndexCalConstant.STREET_SERVICE_ABILITY_NULL); }else{ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml index 2ba5e4ef54..66be2a6a38 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml @@ -168,4 +168,25 @@ AND fics.index_code = #{indexCode} GROUP BY fics.parent_agency_id + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml index 8f93aa364b..19cfc84047 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml @@ -173,4 +173,27 @@ AND gm.month_id = #{monthId} AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%') + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml index 26974bd968..d3bab2a559 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml @@ -149,5 +149,23 @@ AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%') AND pm.month_id = #{monthId} + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml index 9bf7bc2570..0e35707bce 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml @@ -130,4 +130,22 @@ AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%') AND sm.month_id = #{monthId} + From 9c496342c556b9830604b140be0130e322d21760 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 5 Mar 2021 14:49:14 +0800 Subject: [PATCH 072/375] =?UTF-8?q?=E6=8C=87=E6=A0=87=E8=AE=A1=E7=AE=97=20?= =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E7=BA=A7=E5=88=AB=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FactIndexPartyAblityOrgMonthlyDao.java | 1 + .../IndexCalculateCommunityServiceImpl.java | 6 +++--- .../evaluationindex/indexcal/GridScoreDao.xml | 1 + .../FactIndexPartyAblityOrgMonthlyDao.xml | 18 ++++++++++++++++++ 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java index 01d76af0bd..99c0efaa60 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java @@ -97,6 +97,7 @@ public interface FactIndexPartyAblityOrgMonthlyDao extends BaseDao> selectPublishArticleCountMapbyAreaCode(@Param("monthId")String monthId,@Param("areaCode")String areaCode); + List> selectPublishArticleCountMapbyAreaCodeNotSelf(@Param("monthId")String monthId,@Param("areaCode")String areaCode); /** * 根据组织类型删除数据 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java index 8c03bf53f5..38d14d8667 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java @@ -628,7 +628,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni } } else { // 社区名义发文数量 - List> publishArticleCountList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMapbyAreaCode( form.getMonthId(),form.getCustomerAreaCode()); + List> publishArticleCountList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMapbyAreaCodeNotSelf( form.getMonthId(),form.getCustomerAreaCode()); if (CollectionUtils.isEmpty(publishArticleCountList)) { log.warn(IndexCalConstant.COMMUNITY_PUBLISH_ARTICLE_LIST_NULL); } else { @@ -702,7 +702,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni } } else { // 治理能力的六个五级指标 - List> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbilityExistsSub(form.getMonthId(),form.getCustomerAreaCode()); + List> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbilityExistsSubNotSelf(form.getMonthId(),form.getCustomerAreaCode()); if (CollectionUtils.isEmpty(communityGovernAbility)){ log.warn(IndexCalConstant.COMMUNITY_GOVERN_ABILITY_NULL); }else{ @@ -774,7 +774,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni }); } } else { - List> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMapExistsSub(form.getMonthId(),form.getCustomerAreaCode()); + List> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMapExistsSubNotSelf(form.getMonthId(),form.getCustomerAreaCode()); if (CollectionUtils.isEmpty(communityActivityCountList)) { log.warn(IndexCalConstant.COMMUNITY_SERVICE_ABILITY_NULL); }else{ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml index 87992f8ee7..cee52bfea1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml @@ -198,6 +198,7 @@ AND figc.month_id = #{monthId} AND figc.index_code = #{indexCode} AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%') + AND sca.AREA_CODE != #{areaCode} GROUP BY figc.agency_id diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml index d3bab2a559..9ce69d1128 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml @@ -167,5 +167,23 @@ AND sca.AREA_CODE != #{areaCode} AND pm.month_id = #{monthId} + From ae0a074dbd4466356fc492e35166d0ea7cc50f68 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 5 Mar 2021 15:38:00 +0800 Subject: [PATCH 073/375] =?UTF-8?q?=E8=81=94=E8=B0=83=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E6=97=A5=E5=BF=97fake=E6=95=B0=E6=8D=AE=EF=BC=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/commons/tools/constant/NumConstant.java | 1 + .../impl/ScreenWorkRecordOrgDailyServiceImpl.java | 12 ++++++++++-- .../mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml | 7 +++---- .../controller/plugins/WorkRecordColController.java | 3 +++ 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java index 59e3ce4bdc..a9cc07d7a4 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java @@ -26,6 +26,7 @@ public interface NumConstant { int TEN = 10; int ELEVEN = 11; int TWELVE = 12; + int THIRTEEN = 13; int SEVENTEEN = 17; int FIFTEEN = 15; int FOURTEEN=14; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java index 0474d32f2e..2144440ad0 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java @@ -143,6 +143,8 @@ public class ScreenWorkRecordOrgDailyServiceImpl extends BaseServiceImpl list = screenWorkRecordOrgMonthlyDao.selectMonthList(formDTO); //3-2.遍历封装数据并返回 @@ -299,4 +301,10 @@ public class ScreenWorkRecordOrgDailyServiceImpl extends BaseServiceImpl SELECT sw.MONTH_ID AS monthId, - (select resource_label from screen_customer_work_record_dict where resource_code = sw.type_code and customer_id = #{customerId})`name` + (select resource_label from screen_customer_work_record_dict where resource_code = sw.meeting_code and customer_id = #{customerId})`name` ,SUM(sw.organize_total) as `value` @@ -24,13 +24,12 @@ WHERE sw.del_flag = '0' AND sca.del_flag = '0' - AND sw.customer_id = #{customerId} AND sca.area_code LIKE CONCAT('%',(select area_code from screen_customer_agency where agency_id = #{agencyId}),'%') - AND sw.month_id > #{startMonth} + AND sw.month_id >= #{startMonth} AND sw.month_id #{endMonth} AND wrd.data_type = #{dataType} GROUP BY - sw.month_id,sw.type_code + sw.month_id,sw.meeting_code ORDER BY sw.month_id ASC diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/WorkRecordColController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/WorkRecordColController.java index 314a814ade..5331ca5cfa 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/WorkRecordColController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/WorkRecordColController.java @@ -49,6 +49,7 @@ public class WorkRecordColController { log.error("com.epmet.controller.plugins.WorkRecordColController.resourceDict,param:{}", JSON.toJSONString(data)); throw new ValidateException("客户Id、上传数据列表、日期Id不可为空"); } + // log.info("【工作日志】客户资源字典信息上传"+JSON.toJSONString(data,true)); dictService.collect(customerId,data); return new Result(); } @@ -68,6 +69,7 @@ public class WorkRecordColController { log.error("com.epmet.controller.plugins.WorkRecordColController.collectOrg,param:{}", JSON.toJSONString(data)); throw new ValidateException("客户Id、上传数据列表、月份Id不可为空"); } + // log.info("【工作日志】组织按月统计"+JSON.toJSONString(data,true)); screenWorkRecordOrgMonthlyService.collect(customerId,data); return new Result(); } @@ -87,6 +89,7 @@ public class WorkRecordColController { log.error("com.epmet.controller.plugins.WorkRecordColController.collectOrgDaily,param:{}", JSON.toJSONString(data)); throw new ValidateException("客户Id、上传数据列表、日期Id不可为空"); } + // log.info("【工作日志】组织按日统计 累计值"+JSON.toJSONString(data,true)); screenWorkRecordOrgDailyService.collectOrgDaily(customerId,data); return new Result(); } From 651722d42e0fbf5e827872bfa693704ef99438e8 Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 5 Mar 2021 17:36:05 +0800 Subject: [PATCH 074/375] =?UTF-8?q?=E9=83=A8=E7=BD=B2=E9=80=9A=E7=9F=A5=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20=E6=9C=8D=E5=8A=A1=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=B7=E7=9A=84=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/bootstrap.yml | 3 +- epmet-auth/src/main/resources/bootstrap.yml | 1 + epmet-commons/epmet-commons-tools/pom.xml | 5 ++ .../aspect/CustomerApplicationRunner.java | 81 ++++++++++++++----- .../src/main/resources/bootstrap.yml | 1 + .../src/main/resources/bootstrap.yml | 3 +- .../src/main/resources/bootstrap.yml | 3 +- .../src/main/resources/bootstrap.yml | 1 + .../src/main/resources/bootstrap.yml | 1 + .../src/main/resources/bootstrap.yml | 3 +- .../src/main/resources/bootstrap.yml | 1 + .../src/main/resources/bootstrap.yml | 3 +- .../src/main/resources/bootstrap.yml | 3 +- .../src/main/resources/bootstrap.yml | 1 + .../src/main/resources/bootstrap.yml | 3 +- .../src/main/resources/bootstrap.yml | 3 +- .../src/main/resources/bootstrap.yml | 3 +- .../epmet-third/epmet-third-server/pom.xml | 7 -- .../src/main/resources/bootstrap.yml | 3 +- .../src/main/resources/bootstrap.yml | 3 +- .../src/main/resources/bootstrap.yml | 3 +- .../src/main/resources/bootstrap.yml | 1 + .../src/main/resources/bootstrap.yml | 1 + .../src/main/resources/bootstrap.yml | 3 +- .../src/main/resources/bootstrap.yml | 3 +- .../src/main/resources/bootstrap.yml | 3 +- .../src/main/resources/bootstrap.yml | 3 +- .../src/main/resources/bootstrap.yml | 3 +- .../src/main/resources/bootstrap.yml | 3 +- .../src/main/resources/bootstrap.yml | 3 +- .../src/main/resources/bootstrap.yml | 3 +- .../src/main/resources/bootstrap.yml | 1 + .../src/main/resources/bootstrap.yml | 1 + .../src/main/resources/bootstrap.yml | 1 + .../src/main/resources/bootstrap.yml | 3 +- .../src/main/resources/bootstrap.yml | 1 + .../src/main/resources/bootstrap.yml | 3 +- .../src/main/resources/bootstrap.yml | 1 + .../src/main/resources/bootstrap.yml | 3 +- pom.xml | 28 ++++--- 40 files changed, 143 insertions(+), 60 deletions(-) diff --git a/epmet-admin/epmet-admin-server/src/main/resources/bootstrap.yml b/epmet-admin/epmet-admin-server/src/main/resources/bootstrap.yml index 7ecdd66d2b..152e65a3e0 100644 --- a/epmet-admin/epmet-admin-server/src/main/resources/bootstrap.yml +++ b/epmet-admin/epmet-admin-server/src/main/resources/bootstrap.yml @@ -1,5 +1,6 @@ server: port: @server.port@ + version: @version@ servlet: context-path: /sys @@ -132,4 +133,4 @@ ribbon: shutdown: graceful: enable: true #是否开启优雅停机 - waitTimeSecs: 30 # 优雅停机等待时间,超过30秒,发出告警 \ No newline at end of file + waitTimeSecs: 30 # 优雅停机等待时间,超过30秒,发出告警 diff --git a/epmet-auth/src/main/resources/bootstrap.yml b/epmet-auth/src/main/resources/bootstrap.yml index 412dba2dc3..25b9a31702 100644 --- a/epmet-auth/src/main/resources/bootstrap.yml +++ b/epmet-auth/src/main/resources/bootstrap.yml @@ -1,5 +1,6 @@ server: port: @server.port@ + version: @version@ servlet: context-path: /auth diff --git a/epmet-commons/epmet-commons-tools/pom.xml b/epmet-commons/epmet-commons-tools/pom.xml index e2fd786edf..10b76c6f11 100644 --- a/epmet-commons/epmet-commons-tools/pom.xml +++ b/epmet-commons/epmet-commons-tools/pom.xml @@ -149,6 +149,11 @@ commons-httpclient 3.1 + + + com.aliyun + alibaba-dingtalk-service-sdk + diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/CustomerApplicationRunner.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/CustomerApplicationRunner.java index 4500453213..4537414335 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/CustomerApplicationRunner.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/CustomerApplicationRunner.java @@ -8,11 +8,17 @@ package com.epmet.commons.tools.aspect; +import com.alibaba.fastjson.JSON; +import com.dingtalk.api.DefaultDingTalkClient; +import com.dingtalk.api.DingTalkClient; +import com.dingtalk.api.request.OapiRobotSendRequest; +import com.dingtalk.api.response.OapiRobotSendResponse; import com.epmet.commons.tools.dto.form.DingTalkTextMsg; import com.epmet.commons.tools.enums.EnvEnum; import com.epmet.commons.tools.utils.HttpClientManager; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.SpringContextUtils; +import com.taobao.api.ApiException; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Value; @@ -35,32 +41,69 @@ public class CustomerApplicationRunner implements ApplicationRunner { private static Logger logger = LogManager.getLogger(CustomerApplicationRunner.class); @Value("${spring.application.name}") private String appName; + @Value("${server.version}") + private String version; @Override public void run(ApplicationArguments args) { - //发送启动成功消息 EnvEnum currentEnv = EnvEnum.getCurrentEnv(); logger.info(currentEnv); if (!EnvEnum.DEV.getCode().equals(currentEnv.getCode()) && !EnvEnum.LOCAL.getCode().equals(currentEnv.getCode())) { - InetUtils inetUtils = SpringContextUtils.getBean(InetUtils.class); - String serverIp = inetUtils.findFirstNonLoopbackHostInfo().getIpAddress(); + //sendDingTextMsg(); + sendDingMarkDownMsg(); + } + } + + private void sendDingTextMsg() { + //发送启动成功消息 + InetUtils inetUtils = SpringContextUtils.getBean(InetUtils.class); + String serverIp = inetUtils.findFirstNonLoopbackHostInfo().getIpAddress(); + + //开发小组 群机器人地址 + String url = "https://oapi.dingtalk.com/robot/send?access_token=ffd7c972b0525e249283df1a16b65a8b9d0012601f3a458dfc588c2eac497bb5"; + StringBuilder stringBuilder = new StringBuilder(); + stringBuilder.append(EnvEnum.getCurrentEnv().getName()) + .append("【") + .append(appName) + .append("】") + .append("ip地址: ") + .append(serverIp) + .append("部署完毕!"); + DingTalkTextMsg msg = new DingTalkTextMsg(); + msg.setWebHook(url); + msg.setAtAll(true); + msg.setContent(stringBuilder.toString()); + Result stringResult = HttpClientManager.getInstance().sendPostByJSON(url, msg.getMsgContent()); + logger.info(stringResult); + } + + private String getServerIp() { + InetUtils inetUtils = SpringContextUtils.getBean(InetUtils.class); + return inetUtils.findFirstNonLoopbackHostInfo().getIpAddress(); + } + + private void sendDingMarkDownMsg() { + DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/robot/send?access_token=ffd7c972b0525e249283df1a16b65a8b9d0012601f3a458dfc588c2eac497bb5"); + OapiRobotSendRequest request = new OapiRobotSendRequest(); + request.setMsgtype("markdown"); + OapiRobotSendRequest.Markdown markdown = new OapiRobotSendRequest.Markdown(); + markdown.setTitle("部署成功通知"); - //开发小组 群机器人地址 - String url = "https://oapi.dingtalk.com/robot/send?access_token=ffd7c972b0525e249283df1a16b65a8b9d0012601f3a458dfc588c2eac497bb5"; - StringBuilder stringBuilder = new StringBuilder(); - stringBuilder.append(EnvEnum.getCurrentEnv().getName()) - .append("【") - .append(appName) - .append("】") - .append("ip地址: ") - .append(serverIp) - .append("部署完毕!"); - DingTalkTextMsg msg = new DingTalkTextMsg(); - msg.setWebHook(url); - msg.setAtAll(true); - msg.setContent(stringBuilder.toString()); - Result stringResult = HttpClientManager.getInstance().sendPostByJSON(url, msg.getMsgContent()); - logger.info(stringResult); + markdown.setText("部署成功通知 \n" + + "> 服务:" + appName + "\n\n" + + "> 版本:" + version + "\n\n" + + "> 环境:" + EnvEnum.getCurrentEnv().getName() + "\n\n" + + "> IP: " + getServerIp() + "\n\n" + ); + request.setMarkdown(markdown); + OapiRobotSendRequest.At at = new OapiRobotSendRequest.At(); + at.setIsAtAll(true); + request.setAt(at); + try { + OapiRobotSendResponse execute = client.execute(request); + logger.info("=====通知结果===>" + JSON.toJSONString(execute)); + } catch (ApiException e) { + logger.error("sendDingMarkDownMsg exception", e); } } diff --git a/epmet-gateway/src/main/resources/bootstrap.yml b/epmet-gateway/src/main/resources/bootstrap.yml index a0c1c35811..7a6c236128 100644 --- a/epmet-gateway/src/main/resources/bootstrap.yml +++ b/epmet-gateway/src/main/resources/bootstrap.yml @@ -2,6 +2,7 @@ server: tomcat: max-swallow-size: 100MB port: @server.port@ + version: @version@ servlet: context-path: /api spring: diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/bootstrap.yml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/bootstrap.yml index f889044c69..55e3265590 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/bootstrap.yml +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/bootstrap.yml @@ -1,5 +1,6 @@ server: port: @server.port@ + version: @version@ servlet: context-path: /data/aggregator @@ -153,4 +154,4 @@ dingTalk: logging: level: - com.epmet.dataaggre: debug \ No newline at end of file + com.epmet.dataaggre: debug diff --git a/epmet-module/data-report/data-report-server/src/main/resources/bootstrap.yml b/epmet-module/data-report/data-report-server/src/main/resources/bootstrap.yml index 01c4f3d8db..4b220e0c72 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/bootstrap.yml +++ b/epmet-module/data-report/data-report-server/src/main/resources/bootstrap.yml @@ -1,5 +1,6 @@ server: port: @server.port@ + version: @version@ servlet: context-path: /data/report @@ -154,4 +155,4 @@ jwt: shutdown: graceful: enable: true #是否开启优雅停机 - waitTimeSecs: 30 # 优雅停机等待时间,超过30秒,发出告警 \ No newline at end of file + waitTimeSecs: 30 # 优雅停机等待时间,超过30秒,发出告警 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml index dfbb2b9a4c..bc14f070f8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml @@ -1,5 +1,6 @@ server: port: @server.port@ + version: @version@ servlet: context-path: /data/stats diff --git a/epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/bootstrap.yml index f9a372c94e..110490c3af 100644 --- a/epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/bootstrap.yml @@ -1,5 +1,6 @@ server: port: @server.port@ + version: @version@ servlet: context-path: /activiti diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-common-service/common-service-server/src/main/resources/bootstrap.yml index 11cc4d6aef..8348460f3f 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-common-service/common-service-server/src/main/resources/bootstrap.yml @@ -1,5 +1,6 @@ server: port: @server.port@ + version: @version@ servlet: context-path: /commonservice @@ -136,4 +137,4 @@ dingTalk: shutdown: graceful: enable: true #是否开启优雅停机 - waitTimeSecs: 30 # 优雅停机等待时间,超过30秒,发出告警 \ No newline at end of file + waitTimeSecs: 30 # 优雅停机等待时间,超过30秒,发出告警 diff --git a/epmet-module/epmet-demo/epmet-demo-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-demo/epmet-demo-server/src/main/resources/bootstrap.yml index 1352c66f87..e131231414 100644 --- a/epmet-module/epmet-demo/epmet-demo-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-demo/epmet-demo-server/src/main/resources/bootstrap.yml @@ -1,5 +1,6 @@ server: port: @server.port@ + version: @version@ servlet: context-path: /demo diff --git a/epmet-module/epmet-ext/epmet-ext-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-ext/epmet-ext-server/src/main/resources/bootstrap.yml index 6ac74f4419..7a067d1606 100644 --- a/epmet-module/epmet-ext/epmet-ext-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-ext/epmet-ext-server/src/main/resources/bootstrap.yml @@ -1,5 +1,6 @@ server: port: @server.port@ + version: @version@ servlet: context-path: /epmet/ext @@ -108,4 +109,4 @@ dingTalk: shutdown: graceful: enable: true #是否开启优雅停机 - waitTimeSecs: 30 # 优雅停机等待时间,超过30秒,发出告警 \ No newline at end of file + waitTimeSecs: 30 # 优雅停机等待时间,超过30秒,发出告警 diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/bootstrap.yml index 07c67a3b3b..2cd6e68458 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/bootstrap.yml @@ -1,5 +1,6 @@ server: port: @server.port@ + version: @version@ servlet: context-path: /heart @@ -143,4 +144,4 @@ dingTalk: shutdown: graceful: enable: true #是否开启优雅停机 - waitTimeSecs: 30 # 优雅停机等待时间,超过30秒,发出告警 \ No newline at end of file + waitTimeSecs: 30 # 优雅停机等待时间,超过30秒,发出告警 diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml index f30a2913ad..85974efb60 100644 --- a/epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml @@ -1,5 +1,6 @@ server: port: @server.port@ + version: @version@ servlet: context-path: /job diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-message/epmet-message-server/src/main/resources/bootstrap.yml index 0639ecbfd2..b361be7236 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-message/epmet-message-server/src/main/resources/bootstrap.yml @@ -1,5 +1,6 @@ server: port: @server.port@ + version: @version@ servlet: context-path: /message @@ -142,4 +143,4 @@ shutdown: rocketmq: name-server: @rocketmq.nameserver@ producer: - group: @rocketmq.producer.group@ \ No newline at end of file + group: @rocketmq.producer.group@ diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-oss/epmet-oss-server/src/main/resources/bootstrap.yml index c05b439898..5b6b4b9e75 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/resources/bootstrap.yml @@ -1,5 +1,6 @@ server: port: @server.port@ + version: @version@ servlet: context-path: /oss @@ -139,4 +140,4 @@ dingTalk: shutdown: graceful: enable: true #是否开启优雅停机 - waitTimeSecs: 30 # 优雅停机等待时间,超过30秒,发出告警 \ No newline at end of file + waitTimeSecs: 30 # 优雅停机等待时间,超过30秒,发出告警 diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-point/epmet-point-server/src/main/resources/bootstrap.yml index b9d229a850..a6233bb7a3 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-point/epmet-point-server/src/main/resources/bootstrap.yml @@ -1,5 +1,6 @@ server: port: @server.port@ + version: @version@ servlet: context-path: /point @@ -135,4 +136,4 @@ dingTalk: shutdown: graceful: enable: true #是否开启优雅停机 - waitTimeSecs: 30 # 优雅停机等待时间,超过30秒,发出告警 \ No newline at end of file + waitTimeSecs: 30 # 优雅停机等待时间,超过30秒,发出告警 diff --git a/epmet-module/epmet-third/epmet-third-server/pom.xml b/epmet-module/epmet-third/epmet-third-server/pom.xml index ee37509ddc..fdd764c6e0 100644 --- a/epmet-module/epmet-third/epmet-third-server/pom.xml +++ b/epmet-module/epmet-third/epmet-third-server/pom.xml @@ -148,13 +148,6 @@ compile - - - com.aliyun - alibaba-dingtalk-service-sdk - 1.0.1 - - diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/bootstrap.yml index fbee2e36e0..0606e7f123 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/bootstrap.yml @@ -1,5 +1,6 @@ server: port: @server.port@ + version: @version@ servlet: context-path: /third @@ -145,4 +146,4 @@ dingTalk: shutdown: graceful: enable: true #是否开启优雅停机 - waitTimeSecs: 30 # 优雅停机等待时间,超过30秒,发出告警 \ No newline at end of file + waitTimeSecs: 30 # 优雅停机等待时间,超过30秒,发出告警 diff --git a/epmet-module/gov-access/gov-access-server/src/main/resources/bootstrap.yml b/epmet-module/gov-access/gov-access-server/src/main/resources/bootstrap.yml index 6fcc5979f5..c8fe1196c9 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/resources/bootstrap.yml +++ b/epmet-module/gov-access/gov-access-server/src/main/resources/bootstrap.yml @@ -1,5 +1,6 @@ server: port: @server.port@ + version: @version@ servlet: context-path: /gov/access @@ -122,4 +123,4 @@ pagehelper: #feign 日志需要该配置 logging: level: - com.epmet: debug \ No newline at end of file + com.epmet: debug diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/resources/bootstrap.yml b/epmet-module/gov-grid/gov-grid-server/src/main/resources/bootstrap.yml index 9153797714..241ae97b26 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/resources/bootstrap.yml +++ b/epmet-module/gov-grid/gov-grid-server/src/main/resources/bootstrap.yml @@ -1,5 +1,6 @@ server: port: @server.port@ + version: @version@ servlet: context-path: /gov/grid @@ -85,4 +86,4 @@ dingTalk: shutdown: graceful: enable: true #是否开启优雅停机 - waitTimeSecs: 30 # 优雅停机等待时间,超过30秒,发出告警 \ No newline at end of file + waitTimeSecs: 30 # 优雅停机等待时间,超过30秒,发出告警 diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/bootstrap.yml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/bootstrap.yml index 47a5ebc5a3..06974a6810 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/bootstrap.yml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/bootstrap.yml @@ -1,5 +1,6 @@ server: port: @server.port@ + version: @version@ servlet: context-path: /gov/issue diff --git a/epmet-module/gov-mine/gov-mine-server/src/main/resources/bootstrap.yml b/epmet-module/gov-mine/gov-mine-server/src/main/resources/bootstrap.yml index 80c0b06e6b..6c3a83e1f1 100644 --- a/epmet-module/gov-mine/gov-mine-server/src/main/resources/bootstrap.yml +++ b/epmet-module/gov-mine/gov-mine-server/src/main/resources/bootstrap.yml @@ -1,5 +1,6 @@ server: port: @server.port@ + version: @version@ servlet: context-path: /gov/mine diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/bootstrap.yml b/epmet-module/gov-org/gov-org-server/src/main/resources/bootstrap.yml index 6f63c9a156..0a9653fd28 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/bootstrap.yml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/bootstrap.yml @@ -1,5 +1,6 @@ server: port: @server.port@ + version: @version@ servlet: context-path: /gov/org @@ -144,4 +145,4 @@ shutdown: waitTimeSecs: 30 # 优雅停机等待时间,超过30秒,发出告警 rocketmq: - name-server: @rocketmq.nameserver@ \ No newline at end of file + name-server: @rocketmq.nameserver@ diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/bootstrap.yml b/epmet-module/gov-project/gov-project-server/src/main/resources/bootstrap.yml index fbe1c0a83e..2db2f15416 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/bootstrap.yml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/bootstrap.yml @@ -1,5 +1,6 @@ server: port: @server.port@ + version: @version@ servlet: context-path: /gov/project @@ -126,4 +127,4 @@ dingTalk: shutdown: graceful: enable: true #是否开启优雅停机 - waitTimeSecs: 30 # 优雅停机等待时间,超过30秒,发出告警 \ No newline at end of file + waitTimeSecs: 30 # 优雅停机等待时间,超过30秒,发出告警 diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/bootstrap.yml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/bootstrap.yml index e12f35bd48..c570e30147 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/bootstrap.yml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/bootstrap.yml @@ -1,5 +1,6 @@ server: port: @server.port@ + version: @version@ servlet: context-path: /gov/voice @@ -125,4 +126,4 @@ dingTalk: shutdown: graceful: enable: true #是否开启优雅停机 - waitTimeSecs: 30 # 优雅停机等待时间,超过30秒,发出告警 \ No newline at end of file + waitTimeSecs: 30 # 优雅停机等待时间,超过30秒,发出告警 diff --git a/epmet-module/oper-access/oper-access-server/src/main/resources/bootstrap.yml b/epmet-module/oper-access/oper-access-server/src/main/resources/bootstrap.yml index 34a87bb782..15ccaab5b1 100644 --- a/epmet-module/oper-access/oper-access-server/src/main/resources/bootstrap.yml +++ b/epmet-module/oper-access/oper-access-server/src/main/resources/bootstrap.yml @@ -1,5 +1,6 @@ server: port: @server.port@ + version: @version@ servlet: context-path: /oper/access @@ -128,4 +129,4 @@ dingTalk: shutdown: graceful: enable: true #是否开启优雅停机 - waitTimeSecs: 30 # 优雅停机等待时间,超过30秒,发出告警 \ No newline at end of file + waitTimeSecs: 30 # 优雅停机等待时间,超过30秒,发出告警 diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/resources/bootstrap.yml b/epmet-module/oper-crm/oper-crm-server/src/main/resources/bootstrap.yml index 30b2608312..f8760dbee8 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/resources/bootstrap.yml +++ b/epmet-module/oper-crm/oper-crm-server/src/main/resources/bootstrap.yml @@ -1,5 +1,6 @@ server: port: @server.port@ + version: @version@ servlet: context-path: /oper/crm @@ -134,4 +135,4 @@ dingTalk: shutdown: graceful: enable: true #是否开启优雅停机 - waitTimeSecs: 30 # 优雅停机等待时间,超过30秒,发出告警 \ No newline at end of file + waitTimeSecs: 30 # 优雅停机等待时间,超过30秒,发出告警 diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/bootstrap.yml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/bootstrap.yml index d9b167d150..360e2ad6e2 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/resources/bootstrap.yml +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/bootstrap.yml @@ -1,5 +1,6 @@ server: port: @server.port@ + version: @version@ servlet: context-path: /oper/customize @@ -131,4 +132,4 @@ rocketmq: shutdown: graceful: enable: true #是否开启优雅停机 - waitTimeSecs: 30 # 优雅停机等待时间,超过30秒,发出告警 \ No newline at end of file + waitTimeSecs: 30 # 优雅停机等待时间,超过30秒,发出告警 diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/bootstrap.yml b/epmet-module/resi-group/resi-group-server/src/main/resources/bootstrap.yml index 210ad19829..6823a772e7 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/bootstrap.yml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/bootstrap.yml @@ -1,5 +1,6 @@ server: port: @server.port@ + version: @version@ servlet: context-path: /resi/group @@ -155,4 +156,4 @@ elink: shutdown: graceful: enable: true #是否开启优雅停机 - waitTimeSecs: 30 # 优雅停机等待时间,每超过30秒,打印一次错误日志 \ No newline at end of file + waitTimeSecs: 30 # 优雅停机等待时间,每超过30秒,打印一次错误日志 diff --git a/epmet-module/resi-guide/resi-guide-server/src/main/resources/bootstrap.yml b/epmet-module/resi-guide/resi-guide-server/src/main/resources/bootstrap.yml index 4d85502367..9be4ac049f 100644 --- a/epmet-module/resi-guide/resi-guide-server/src/main/resources/bootstrap.yml +++ b/epmet-module/resi-guide/resi-guide-server/src/main/resources/bootstrap.yml @@ -1,5 +1,6 @@ server: port: @server.port@ + version: @version@ servlet: context-path: /resi/guide @@ -129,4 +130,4 @@ dingTalk: shutdown: graceful: enable: true #是否开启优雅停机 - waitTimeSecs: 30 # 优雅停机等待时间,超过30秒,发出告警 \ No newline at end of file + waitTimeSecs: 30 # 优雅停机等待时间,超过30秒,发出告警 diff --git a/epmet-module/resi-hall/resi-hall-server/src/main/resources/bootstrap.yml b/epmet-module/resi-hall/resi-hall-server/src/main/resources/bootstrap.yml index 12c7a97693..09b4ba2437 100644 --- a/epmet-module/resi-hall/resi-hall-server/src/main/resources/bootstrap.yml +++ b/epmet-module/resi-hall/resi-hall-server/src/main/resources/bootstrap.yml @@ -1,5 +1,6 @@ server: port: @server.port@ + version: @version@ servlet: context-path: /resi/hall diff --git a/epmet-module/resi-home/resi-home-server/src/main/resources/bootstrap.yml b/epmet-module/resi-home/resi-home-server/src/main/resources/bootstrap.yml index ec830e5a69..76f5542795 100644 --- a/epmet-module/resi-home/resi-home-server/src/main/resources/bootstrap.yml +++ b/epmet-module/resi-home/resi-home-server/src/main/resources/bootstrap.yml @@ -1,5 +1,6 @@ server: port: @server.port@ + version: @version@ servlet: context-path: /resi/home diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/resources/bootstrap.yml b/epmet-module/resi-mine/resi-mine-server/src/main/resources/bootstrap.yml index 7ba08a2040..48dc370737 100644 --- a/epmet-module/resi-mine/resi-mine-server/src/main/resources/bootstrap.yml +++ b/epmet-module/resi-mine/resi-mine-server/src/main/resources/bootstrap.yml @@ -1,5 +1,6 @@ server: port: @server.port@ + version: @version@ servlet: context-path: /resi/mine diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/bootstrap.yml b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/bootstrap.yml index efd4689143..4577b0cae3 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/bootstrap.yml +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/bootstrap.yml @@ -1,5 +1,6 @@ server: port: @server.port@ + version: @version@ servlet: context-path: /resi/partymember @@ -128,4 +129,4 @@ dingTalk: shutdown: graceful: enable: true #是否开启优雅停机 - waitTimeSecs: 30 # 优雅停机等待时间,超过30秒,发出告警 \ No newline at end of file + waitTimeSecs: 30 # 优雅停机等待时间,超过30秒,发出告警 diff --git a/epmet-module/resi-voice/resi-voice-server/src/main/resources/bootstrap.yml b/epmet-module/resi-voice/resi-voice-server/src/main/resources/bootstrap.yml index cbac285587..b1bca8e761 100644 --- a/epmet-module/resi-voice/resi-voice-server/src/main/resources/bootstrap.yml +++ b/epmet-module/resi-voice/resi-voice-server/src/main/resources/bootstrap.yml @@ -1,5 +1,6 @@ server: port: @server.port@ + version: @version@ servlet: context-path: /resi/voice diff --git a/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/resources/bootstrap.yml b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/resources/bootstrap.yml index 247b417689..3a3726f148 100644 --- a/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/resources/bootstrap.yml +++ b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/resources/bootstrap.yml @@ -1,5 +1,6 @@ server: port: @server.port@ + version: @version@ servlet: context-path: /adv @@ -136,4 +137,4 @@ pagehelper: dingTalk: robot: webHook: @dingTalk.robot.webHook@ - secret: @dingTalk.robot.secret@ \ No newline at end of file + secret: @dingTalk.robot.secret@ diff --git a/epmet-openapi/epmet-openapi-scan/src/main/resources/bootstrap.yml b/epmet-openapi/epmet-openapi-scan/src/main/resources/bootstrap.yml index e9de135959..0c5c04d86e 100644 --- a/epmet-openapi/epmet-openapi-scan/src/main/resources/bootstrap.yml +++ b/epmet-openapi/epmet-openapi-scan/src/main/resources/bootstrap.yml @@ -1,5 +1,6 @@ server: port: @server.port@ + version: @version@ servlet: context-path: /epmetscan diff --git a/epmet-user/epmet-user-server/src/main/resources/bootstrap.yml b/epmet-user/epmet-user-server/src/main/resources/bootstrap.yml index 68f5492ae8..0ff8f5dcc1 100644 --- a/epmet-user/epmet-user-server/src/main/resources/bootstrap.yml +++ b/epmet-user/epmet-user-server/src/main/resources/bootstrap.yml @@ -1,5 +1,6 @@ server: port: @server.port@ + version: @version@ servlet: context-path: /epmetuser @@ -153,4 +154,4 @@ rocketmq: shutdown: graceful: enable: true #是否开启优雅停机 - waitTimeSecs: 30 # 优雅停机等待时间,超过30秒,发出告警 \ No newline at end of file + waitTimeSecs: 30 # 优雅停机等待时间,超过30秒,发出告警 diff --git a/pom.xml b/pom.xml index dcbdbc44dc..b0d6621300 100644 --- a/pom.xml +++ b/pom.xml @@ -76,17 +76,23 @@ springfox-swagger-ui ${swagger.version} - - mysql - mysql-connector-java - ${mysql.version} - - - + + mysql + mysql-connector-java + ${mysql.version} + + + + + com.aliyun + alibaba-dingtalk-service-sdk + 1.0.1 + + From 25ec3f071ab3818e2a3096ca485c8651b004c52e Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 5 Mar 2021 17:46:07 +0800 Subject: [PATCH 075/375] =?UTF-8?q?=E5=85=A5=E5=8F=82key=E5=80=BC=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/plugins/result/WorkRecordTrendResultDTO.java | 2 +- .../controller/plugins/WorkRecordController.java | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/result/WorkRecordTrendResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/result/WorkRecordTrendResultDTO.java index eb5df34e99..6c0aec4959 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/result/WorkRecordTrendResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/result/WorkRecordTrendResultDTO.java @@ -50,7 +50,7 @@ public class WorkRecordTrendResultDTO implements Serializable { * 各项资源对应某一月份数据 */ @JsonIgnore - private Integer value; + private Integer value = 0; } } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/plugins/WorkRecordController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/plugins/WorkRecordController.java index 0e903b9120..4e409e6316 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/plugins/WorkRecordController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/plugins/WorkRecordController.java @@ -1,5 +1,6 @@ package com.epmet.datareport.controller.plugins; +import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.datareport.service.plugins.ScreenWorkRecordOrgDailyService; @@ -50,6 +51,12 @@ public class WorkRecordController { public Result trend(@RequestHeader("CustomerId")String customerId, @RequestBody WorkRecordTrendFormDTO formDTO){ formDTO.setCustomerId(customerId); ValidatorUtils.validateEntity(formDTO); + if(!"party".equals(formDTO.getDataType())&&!"union".equals(formDTO.getDataType())){ + throw new RenException("入参dataType值错误,可选值:party--支部建设; union--联建共建"); + } + if(!"organize".equals(formDTO.getType())&&!"joinuser".equals(formDTO.getType())&&!"avguser".equals(formDTO.getType())){ + throw new RenException("入参type值错误,可选值:组织次数--organize;参与人数--joinuser;平均参与人数--avguser"); + } return new Result().ok(screenWorkRecordOrgDailyService.trend(formDTO)); } From 38365ca401c8a4fa3aa160e02c2275a29c00eeb6 Mon Sep 17 00:00:00 2001 From: liushaowen <565850092@qq.com> Date: Mon, 8 Mar 2021 09:37:27 +0800 Subject: [PATCH 076/375] =?UTF-8?q?epmet=E8=B0=83=E7=94=A8=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E9=87=87=E9=9B=86=E6=8E=A5=E5=8F=A3=EF=BC=8C=E4=B8=8D?= =?UTF-8?q?=E9=9C=80=E8=AE=A1=E7=AE=97level?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ScreenProjectDataServiceImpl.java | 73 ++++++++++--------- 1 file changed, 38 insertions(+), 35 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java index b826fd1f6e..cd6117ce6c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java @@ -132,43 +132,46 @@ public class ScreenProjectDataServiceImpl extends BaseServiceImpl { String projectStatusCode = item.getProjectStatusCode(); - //todo 动态获取超时时间 - //如果结案 结案时间立项时间; - if ("closed_case".equals(projectStatusCode)) { - try { - Date createTime = sdf.parse(item.getProjectCreateTime()); - Date closeCaseTime = sdf.parse(item.getCloseCaseTime()); - - if (closeCaseTime.getTime() - createTime.getTime() <= 1000 * 60 * 60 * 24 * 4) { - //如果结案时间-立项时间小于等于4天 未超期 level3 - item.setProjectLevel(3); - } else if (closeCaseTime.getTime() - createTime.getTime() <= 1000 * 60 * 60 * 24 * 5) { - //如果结案时间-立项时间大于4天小于5天 即将超期 level2 - item.setProjectLevel(2); - } else { - //大于5天 已超期 level1 - item.setProjectLevel(1); + //2021.3.8 epmet中,调用方传level,这边不再计算 + if(item.getProjectLevel() == null){ + //todo 动态获取超时时间 + //如果结案 结案时间立项时间; + if ("closed_case".equals(projectStatusCode)) { + try { + Date createTime = sdf.parse(item.getProjectCreateTime()); + Date closeCaseTime = sdf.parse(item.getCloseCaseTime()); + + if (closeCaseTime.getTime() - createTime.getTime() <= 1000 * 60 * 60 * 24 * 4) { + //如果结案时间-立项时间小于等于4天 未超期 level3 + item.setProjectLevel(3); + } else if (closeCaseTime.getTime() - createTime.getTime() <= 1000 * 60 * 60 * 24 * 5) { + //如果结案时间-立项时间大于4天小于5天 即将超期 level2 + item.setProjectLevel(2); + } else { + //大于5天 已超期 level1 + item.setProjectLevel(1); + } + } catch (ParseException e) { + e.printStackTrace(); } - } catch (ParseException e) { - e.printStackTrace(); - } - } else if ("pending".equals(projectStatusCode)) { - //如果处理中 当前时间-立项时间; - try { - Date createTime = sdf.parse(item.getProjectCreateTime()); - - if (today.getTime() - createTime.getTime() <= 1000 * 60 * 60 * 24 * 4) { - //如果当前时间-立项时间小于等于4天 未超期 level3 - item.setProjectLevel(3); - } else if (today.getTime() - createTime.getTime() <= 1000 * 60 * 60 * 24 * 5) { - //如果当前时间-立项时间大于4天小于5天 即将超期 level2 - item.setProjectLevel(2); - } else { - //大于5天 已超期 level1 - item.setProjectLevel(1); + } else if ("pending".equals(projectStatusCode)) { + //如果处理中 当前时间-立项时间; + try { + Date createTime = sdf.parse(item.getProjectCreateTime()); + + if (today.getTime() - createTime.getTime() <= 1000 * 60 * 60 * 24 * 4) { + //如果当前时间-立项时间小于等于4天 未超期 level3 + item.setProjectLevel(3); + } else if (today.getTime() - createTime.getTime() <= 1000 * 60 * 60 * 24 * 5) { + //如果当前时间-立项时间大于4天小于5天 即将超期 level2 + item.setProjectLevel(2); + } else { + //大于5天 已超期 level1 + item.setProjectLevel(1); + } + } catch (ParseException e) { + e.printStackTrace(); } - } catch (ParseException e) { - e.printStackTrace(); } } //先删除该projectId对应的旧数据 From e9a07fdad60f789590bfad1c09fc9684cfeb39dc Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 8 Mar 2021 10:39:06 +0800 Subject: [PATCH 077/375] =?UTF-8?q?rankList=E6=8E=A5=E5=8F=A3=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=EF=BC=9AdateId=20is=20null=20=E8=B5=8B=E5=80=BC?= =?UTF-8?q?=E4=B8=BA=E6=98=A8=E5=A4=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ScreenWorkRecordOrgDailyServiceImpl.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java index 2144440ad0..8cabbe6145 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java @@ -134,20 +134,19 @@ public class ScreenWorkRecordOrgDailyServiceImpl extends BaseServiceImpl customerIds=new ArrayList<>(); Result> result=operCrmOpenFeignClient.getAllSubCustomerIds(formDTO.getCustomerId()); - // log.info("result: "+JSON.toJSONString(result)); + log.info("根据customerId查询其所有下级子客户idresult: "+JSON.toJSONString(result)); if (result.success() && CollectionUtils.isNotEmpty(result.getData())) { customerIds.addAll(result.getData()); } customerIds.add(formDTO.getCustomerId()); String dateId= baseDao.selectLatestDateId(customerIds); if(StringUtils.isBlank(dateId)){ - log.warn("selectLatestDateId dateId is null customerIds" + JSON.toJSONString(customerIds)); + dateId= com.epmet.commons.tools.utils.DateUtils.getBeforeNDay(NumConstant.ONE); + log.warn("dateId 赋值为"+dateId+" ; selectLatestDateId dateId is null customerIds" + JSON.toJSONString(customerIds)); } - log.info("=============dateId:"+dateId); - dateId= com.epmet.commons.tools.utils.DateUtils.getBeforeNDay(NumConstant.ONE); WorkRecordRankResultDTO returnDto = new WorkRecordRankResultDTO(); AgencyInfoDTO agencyInfoDTO = agencyService.getAgencyInfoDTO(formDTO.getAreaCode(), formDTO.getAgencyId()); - // log.info("agencyInfoDTO: "+JSON.toJSONString(agencyInfoDTO)); + log.info("agencyInfoDTO: "+JSON.toJSONString(agencyInfoDTO)); //当前组织的自身的数据 List currentAgency = baseDao.selectCurrentAgency(formDTO.getAgencyId(), formDTO.getDataType(), @@ -168,6 +167,7 @@ public class ScreenWorkRecordOrgDailyServiceImpl extends BaseServiceImpl currentAgency = baseDao.selectCurrentAgency(formDTO.getAgencyId(), formDTO.getDataType(), @@ -167,7 +167,7 @@ public class ScreenWorkRecordOrgDailyServiceImpl extends BaseServiceImpl + * @author wangc + * @date 2021.03.04 22:56 + */ + List initNewScreenProjectData(@Param("customerId")String customerId,@Param("dateId") String dateId); + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectOrgPeriodDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectOrgPeriodDailyDao.java index 70a1fee036..5f3bf2ae42 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectOrgPeriodDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectOrgPeriodDailyDao.java @@ -19,6 +19,7 @@ package com.epmet.dao.evaluationindex.extract; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.extract.result.OrgStatisticsResultDTO; +import com.epmet.dto.form.CostDayFormDTO; import com.epmet.entity.evaluationindex.extract.FactOriginProjectOrgPeriodDailyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -83,4 +84,13 @@ public interface FactOriginProjectOrgPeriodDailyDao extends BaseDao */ List selectDeptHandle(@Param("customerId") String customerId, @Param("monthId") String monthId); + + /** + * @Description + * @param list + * @return java.util.List + * @author wangc + * @date 2021.03.05 15:12 + */ + List selectProjectNodeStartStopTime(@Param("list")List list); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectDataDao.java index b1cea20772..83612bf486 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectDataDao.java @@ -18,7 +18,8 @@ package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.dto.screen.form.ScreenProjectDataInfoFormDTO; +import com.epmet.dto.project.result.ProjectExceedParamsResultDTO; +import com.epmet.dto.screen.ScreenProjectDataDTO; import com.epmet.entity.evaluationindex.screen.ScreenProjectDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -36,4 +37,7 @@ public interface ScreenProjectDataDao extends BaseDao { int deleteByDateIdAndCustomerId(@Param("customerId") String customerId,@Param("dateId") String dateId); + int checkIfExisted(@Param("customerId") String customerId); + + List selectPending(ScreenProjectDataDTO param); } 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 3d4526a0fe..3aac2d6ebe 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 @@ -21,6 +21,7 @@ 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.result.ProjectExceedParamsResultDTO; import com.epmet.entity.project.ProjectEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -103,5 +104,22 @@ public interface ProjectDao extends BaseDao { */ String selectParameterValueByKey(@Param("customerId") String customerId); + /** + * @Description 查找客户项目超期参数 + * + * @param customerId + * @return java.util.List + * @author wangc + * @date 2021.03.05 17:52 + */ + List selectProjectExceedParams(@Param("customerId") String customerId); + /** + * @Description 批量查询项目信息 + * @param ids + * @return java.util.List + * @author wangc + * @date 2021.03.08 10:32 + */ + List batchSelectProjectInfo(@Param("ids")List 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/todata/FactOriginProjectMainDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java index 3cb5f6e0e7..2a7a0f2cad 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java @@ -25,6 +25,7 @@ import com.epmet.dto.extract.result.OrgStatisticsResultDTO; import com.epmet.dto.extract.result.TransferRightRatioResultDTO; import com.epmet.dto.indexcollect.result.CpcIndexCommonDTO; import com.epmet.dto.pingyin.result.*; +import com.epmet.dto.screen.ScreenProjectDataDTO; import com.epmet.dto.screen.form.ProjectSourceMapFormDTO; import com.epmet.entity.evaluationindex.extract.FactOriginProjectMainDailyEntity; import com.epmet.entity.evaluationindex.screen.ScreenDifficultyDataEntity; @@ -319,4 +320,20 @@ public interface FactOriginProjectMainDailyService extends BaseService selectClosedIncr(String customerId, String monthId); + + /** + * @Description 初始化screen_project_data数据 + * 如果是dateId不为空,则查询前一天的数据 + * 否则全查(适用于首次初始化的场景) + * + * 这是只查询指定天新增的项目,对于需要更新状态的项目,对历史数据(流转中的项目)进行遍历查询 + * @param customerId + * @param dateId + * @param exceedLimit 超期上线 + * @param about2exceedLimit 即将超期参数 + * @return java.util.List + * @author wangc + * @date 2021.03.04 22:56 + */ + List initNewScreenProjectData(String customerId,String dateId,Integer exceedLimit,Integer about2exceedLimit); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java index c5aaa76daa..94a5fe0855 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java @@ -25,27 +25,33 @@ import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.commons.tools.utils.Result; import com.epmet.constant.DataSourceConstant; import com.epmet.dao.evaluationindex.extract.FactOriginProjectMainDailyDao; +import com.epmet.dao.evaluationindex.extract.FactOriginProjectOrgPeriodDailyDao; import com.epmet.dto.extract.FactOriginProjectMainDailyDTO; import com.epmet.dto.extract.result.GridProjectClosedTotalResultDTO; import com.epmet.dto.extract.result.OrgStatisticsResultDTO; import com.epmet.dto.extract.result.TransferRightRatioResultDTO; import com.epmet.dto.indexcollect.result.CpcIndexCommonDTO; import com.epmet.dto.pingyin.result.*; +import com.epmet.dto.result.CostDayResultDTO; +import com.epmet.dto.screen.ScreenProjectDataDTO; import com.epmet.dto.screen.form.ProjectSourceMapFormDTO; import com.epmet.entity.evaluationindex.extract.FactOriginProjectMainDailyEntity; import com.epmet.entity.evaluationindex.screen.ScreenDifficultyDataEntity; +import com.epmet.feign.EpmetCommonServiceOpenFeignClient; import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectMainDailyService; import org.apache.commons.lang3.StringUtils; +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.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Map; +import java.util.*; +import java.util.stream.Collector; +import java.util.stream.Collectors; /** * 项目主表_日统计 @@ -57,6 +63,10 @@ import java.util.Map; @DataSource(DataSourceConstant.STATS) public class FactOriginProjectMainDailyServiceImpl extends BaseServiceImpl implements FactOriginProjectMainDailyService { + @Autowired + private EpmetCommonServiceOpenFeignClient epmetCommonServiceOpenFeignClient; + @Autowired + private FactOriginProjectOrgPeriodDailyDao periodDao; @Override public PageData page(Map params) { IPage page = baseDao.selectPage( @@ -358,4 +368,49 @@ public class FactOriginProjectMainDailyServiceImpl extends BaseServiceImpl(); } + + /** + * @Description 初始化screen_project_data数据 + * 如果是dateId不为空,则查询前一天的数据 + * 否则全查(适用于首次初始化的场景) + * + * 这是只查询指定天新增的项目,对于需要更新状态的项目,对历史数据(流转中的项目)进行遍历查询 + * @param customerId + * @param dateId + * @param exceedLimit 超期上线 + * @param about2exceedLimit 即将超期参数 + * @return java.util.List + * @author wangc + * @date 2021.03.04 22:56 + */ + @Override + public List initNewScreenProjectData(String customerId, String dateId,Integer exceedLimit,Integer about2exceedLimit) { + boolean ifYesterday = true; + if(!StringUtils.equals(DateUtils.getBeforeNDay(NumConstant.ONE).substring(0,8),dateId)){ + ifYesterday = false; + } + List projects = baseDao.initNewScreenProjectData(customerId, dateId); + //如果不是昨天立项 + if(!CollectionUtils.isEmpty(projects) && !ifYesterday){ + Result> costDays = epmetCommonServiceOpenFeignClient.costWorkDays(periodDao.selectProjectNodeStartStopTime(projects.stream().map(ScreenProjectDataDTO::getProjectId).distinct().collect(Collectors.toList()))); + if(null != costDays && !CollectionUtils.isEmpty(costDays.getData())){ + Map> projectPeriodMap + = costDays.getData().stream().collect(Collectors.groupingBy(CostDayResultDTO :: getId)); + projects.stream().map(o -> { + + List days = projectPeriodMap.get(o.getProjectId()); + if(!CollectionUtils.isEmpty(days)){ + Integer max = days.stream().max(Comparator.comparing(CostDayResultDTO::getDetentionDays)).get().getDetentionDays(); + //事件级别 红色1级:已超期;黄色2级:即将超期;绿色3级:未超期 + if(max > exceedLimit) + o.setProjectLevel(NumConstant.ONE); + else if(max >= about2exceedLimit) + o.setProjectLevel(NumConstant.TWO); + } + return null; + }); + } + } + return projects; + } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/ScreenProjectSettleService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/ScreenProjectSettleService.java new file mode 100644 index 0000000000..fe147887b0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/ScreenProjectSettleService.java @@ -0,0 +1,27 @@ +package com.epmet.service.evaluationindex.extract.toscreen; + +import com.epmet.dto.screen.form.ScreenCentralZoneDataFormDTO; + +/** + * @Description + * 给【screen_project_data】 + * 【screen_project_process_attachment】 + * 【screen_project_img_data】 + * 【screen_project_process】这四个表定时整理数据 + * @author wangc + * @date 2021.03.04 13:38 +*/ + +public interface ScreenProjectSettleService { + + + /** + * @Description 抽取项目数据到screen_project_* + * @param param + * @return void + * @author wangc + * @date 2021.03.04 23:09 + */ + void extractScreenData(ScreenCentralZoneDataFormDTO param); + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java new file mode 100644 index 0000000000..c223dd32c5 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java @@ -0,0 +1,91 @@ +package com.epmet.service.evaluationindex.extract.toscreen.impl; + +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.dto.project.result.ProjectExceedParamsResultDTO; +import com.epmet.dto.screen.ScreenProjectDataDTO; +import com.epmet.dto.screen.form.ScreenCentralZoneDataFormDTO; +import com.epmet.entity.project.ProjectEntity; +import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectMainDailyService; +import com.epmet.service.evaluationindex.extract.toscreen.ScreenProjectSettleService; +import com.epmet.service.evaluationindex.screen.ScreenProjectDataService; +import com.epmet.service.project.ProjectProcessService; +import com.epmet.service.project.ProjectService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.util.List; +import java.util.stream.Collector; +import java.util.stream.Collectors; + +/** + * @Description + * @ClassName ScreenProjectSettleServiceImpl + * @Auth wangc + * @Date 2021-03-04 23:10 + */ +public class ScreenProjectSettleServiceImpl implements ScreenProjectSettleService { + + + @Autowired + private ScreenProjectDataService targetDbService; + @Autowired + private FactOriginProjectMainDailyService originMainService; + @Autowired + private ProjectService projectService; + @Autowired + private ProjectProcessService processService; + + /** + * @Description 抽取项目数据到screen_project_* + * @param param + * @return void + * @author wangc + * @date 2021.03.04 23:09 + */ + @Override + @Transactional + public void extractScreenData(ScreenCentralZoneDataFormDTO param) { + int rows = targetDbService.checkIfExisted(param.getCustomerId()); + List exceedParams = projectService.getProjectExceedParams(param.getCustomerId()); + Integer exceedLimit = NumConstant.FIVE; + Integer about2ExceedLimit = NumConstant.FIVE; + + + if(!CollectionUtils.isEmpty(exceedParams)){ + for(ProjectExceedParamsResultDTO ex :exceedParams){ + if(null != ex.getDefaultExceedLimit()){ + exceedLimit = null == ex.getExceedLimit() ? ex.getDefaultExceedLimit() : ex.getExceedLimit(); + } + if(null != ex.getDefaultAbout2ExceedLimit()){ + about2ExceedLimit = null == ex.getAbout2ExceedLimit() ? ex.getDefaultAbout2ExceedLimit() : ex.getDefaultAbout2ExceedLimit(); + } + } + + } + List metaData = + originMainService.initNewScreenProjectData(param.getCustomerId(), param.getDateId(),exceedLimit,about2ExceedLimit); + + if(!CollectionUtils.isEmpty(metaData)) { + List info = projectService.getProjectInfo(metaData.stream().map(ScreenProjectDataDTO::getProjectId).collect(Collectors.toList())); + if(!CollectionUtils.isEmpty(info)){ + metaData.stream().flatMap(meta -> info.stream().filter(nature -> StringUtils.equals(meta.getProjectId(), + nature.getId())).map(projectInfo -> { + meta.setProjectCreateTime(projectInfo.getCreatedTime()); + meta.setProjectTitle(projectInfo.getTitle()); + return null; + })); + } + + } + ScreenProjectDataDTO orientCase = new ScreenProjectDataDTO(); + orientCase.setCustomerId(param.getCustomerId()); + //待更新的数据 需要检测更新的字段为:①projectStatusCode ②closeCaseTime ③allCategoryName ④projectLevel + List orientData = + targetDbService.getPending(orientCase); + + + + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectDataService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectDataService.java index 82d296a1a3..5a30bcabf5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectDataService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectDataService.java @@ -96,4 +96,22 @@ public interface ScreenProjectDataService extends BaseService param); + + /** + * @Description 查询是否存在客户的数据 + * @param customerId + * @return int + * @author wangc + * @date 2021.03.04 23:35 + */ + int checkIfExisted(String customerId); + + /** + * @Description 获取客户下已经入库而且未结案的数据集 + * @param + * @return + * @author wangc + * @date 2021.03.08 09:32 + */ + List getPending(ScreenProjectDataDTO param); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java index cd6117ce6c..f3a2ca3bca 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java @@ -21,7 +21,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; -import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; @@ -32,10 +31,8 @@ import com.epmet.dto.screen.form.ScreenProjectDataInfoFormDTO; import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.entity.evaluationindex.screen.*; import com.epmet.service.evaluationindex.screen.*; -import com.google.common.collect.Lists; import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -222,4 +219,29 @@ public class ScreenProjectDataServiceImpl extends BaseServiceImpl getPending(ScreenProjectDataDTO param) { + return baseDao.selectPending(param); + } + } 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 2dc0e88aa6..26755f4421 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 @@ -22,9 +22,12 @@ 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.dto.project.result.ProjectExceedParamsResultDTO; import com.epmet.entity.project.ProjectEntity; +import org.apache.ibatis.annotations.Param; import java.util.List; +import java.util.Map; /** * 项目表 @@ -109,4 +112,32 @@ public interface ProjectService extends BaseService { * @date 2020.11.06 14:14 */ Integer getOvertimeProjectByParameter(String customerId); + + /** + * @Description 查找客户项目超期参数 + * + * @param customerId + * @return java.util.List + * @author wangc + * @date 2021.03.05 17:52 + */ + List getProjectExceedParams(@Param("customerId") String customerId); + + /** + * @Description 获取项目相关信息 + * @param projectIds + * @return java.util.List + * @author wangc + * @date 2021.03.08 10:28 + */ + List getProjectInfo(List projectIds); + + /** + * @Description 获取项目的所有标签名称 用-连接 + * @param projectIds + * @return java.util.Map + * @author wangc + * @date 2021.03.08 10:28 + */ + Map getProjectCategory(List projectIds); } \ 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 5ba8ea04d6..5edae89e65 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 @@ -25,12 +25,14 @@ 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.result.ProjectExceedParamsResultDTO; import com.epmet.entity.project.ProjectEntity; import com.epmet.service.project.ProjectService; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import java.util.List; +import java.util.Map; /** * 项目表 @@ -97,4 +99,41 @@ public class ProjectServiceImpl extends BaseServiceImpl + * @author wangc + * @date 2021.03.05 17:52 + */ + @Override + public List getProjectExceedParams(String customerId) { + return baseDao.selectProjectExceedParams(customerId); + } + + /** + * @Description 获取项目相关信息 + * @param projectIds + * @return java.util.List + * @author wangc + * @date 2021.03.08 10:28 + */ + @Override + public List getProjectInfo(List projectIds) { + return baseDao.batchSelectProjectInfo(projectIds); + } + + /** + * @Description 获取项目的所有标签名称 用-连接 + * @param projectIds + * @return java.util.Map + * @author wangc + * @date 2021.03.08 10:28 + */ + @Override + public Map getProjectCategory(List projectIds) { + return null; + } + } \ 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 index 3d21f70ce7..c33d899ce7 100644 --- 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 @@ -534,4 +534,33 @@ AND PROJECT_STATUS = 'closed' GROUP BY GRID_ID + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectOrgPeriodDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectOrgPeriodDailyDao.xml index d607aac0d0..53fc7a5a69 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectOrgPeriodDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectOrgPeriodDailyDao.xml @@ -140,4 +140,20 @@ GROUP BY fp.ORG_ID + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml index 82e0587dc5..8295404e77 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml @@ -40,4 +40,20 @@ limit 1000 + + + 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 08c8d78d5b..ce28113075 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 @@ -105,5 +105,25 @@ and CUSTOMER_ID = #{customerId} and PARAMETER_KEY ='detention_days' + + + + \ No newline at end of file From a516d6c965ddebc90106dbd39718995c5975d6d7 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 8 Mar 2021 14:46:38 +0800 Subject: [PATCH 080/375] =?UTF-8?q?=E9=94=99=E8=AF=AF=E6=8F=90=E9=86=92?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20=E8=AF=B7=E6=B1=82=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E5=8F=8A=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/logback-spring.xml | 2 +- .../tools/aspect/BaseRequestLogAspect.java | 3 + .../tools/constant/ThreadLocalConstant.java | 7 +- .../tools/filter/LogMsgSendFilter.java | 130 ++++-------------- 4 files changed, 39 insertions(+), 103 deletions(-) diff --git a/epmet-auth/src/main/resources/logback-spring.xml b/epmet-auth/src/main/resources/logback-spring.xml index 734c4114a1..0152e72505 100644 --- a/epmet-auth/src/main/resources/logback-spring.xml +++ b/epmet-auth/src/main/resources/logback-spring.xml @@ -139,7 +139,7 @@ - + diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/BaseRequestLogAspect.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/BaseRequestLogAspect.java index ff877a04be..02c3d8f18a 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/BaseRequestLogAspect.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/BaseRequestLogAspect.java @@ -1,6 +1,8 @@ package com.epmet.commons.tools.aspect; +import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.constant.AppClientConstant; +import com.epmet.commons.tools.constant.ThreadLocalConstant; import com.epmet.commons.tools.exception.*; import com.epmet.commons.tools.utils.Result; import org.apache.commons.lang3.StringUtils; @@ -61,6 +63,7 @@ public abstract class BaseRequestLogAspect { try { Object[] args = point.getArgs(); + ThreadLocalConstant.requestParam.set(JSON.toJSONString(args)); log.info(">>>>>>>>请求信息>>>>>>>>:事务流水号:{},url:{} ,method:{},请求参数:{}", transactionSerial, requestURI, method, objectsToString(args)); result = point.proceed(); resultInfoLog(transactionSerial, getExecPeriod(startTime), result); diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ThreadLocalConstant.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ThreadLocalConstant.java index 2dad0d6dba..6a2b304cfa 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ThreadLocalConstant.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ThreadLocalConstant.java @@ -1,7 +1,5 @@ package com.epmet.commons.tools.constant; -import com.epmet.commons.tools.dto.form.LoginUserInfoResultDTO; - /** * ThreadLocal常亮 */ @@ -16,4 +14,9 @@ public class ThreadLocalConstant { * 用于向DataFilterInterceptor传递权限过滤的sql片段(需要在Controller相关的AOP中进行清理,防止变量残留) */ public static final ThreadLocal sqlFilter = new ThreadLocal(); + + /** + * 用于本次的获取请求参数 + */ + public static final ThreadLocal requestParam = new ThreadLocal(); } diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/filter/LogMsgSendFilter.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/filter/LogMsgSendFilter.java index 4e2f0d16ab..df8121e059 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/filter/LogMsgSendFilter.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/filter/LogMsgSendFilter.java @@ -6,6 +6,7 @@ import ch.qos.logback.classic.spi.ILoggingEvent; import ch.qos.logback.classic.spi.IThrowableProxy; import ch.qos.logback.classic.spi.StackTraceElementProxy; import ch.qos.logback.core.spi.FilterReply; +import com.epmet.commons.tools.constant.ThreadLocalConstant; import com.epmet.commons.tools.dto.form.DingTalkTextMsg; import com.epmet.commons.tools.enums.EnvEnum; import com.epmet.commons.tools.utils.DingdingMsgSender; @@ -15,9 +16,12 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.cloud.commons.util.InetUtils; import org.springframework.core.env.Environment; +import org.springframework.web.context.request.RequestAttributes; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; +import javax.servlet.http.HttpServletRequest; import java.text.SimpleDateFormat; -import java.util.Arrays; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -64,14 +68,26 @@ public class LogMsgSendFilter extends LevelFilter { stringBuilder.append("IP地址:" + serverIp); stringBuilder.append("\n"); } + stringBuilder.append("故障时间:" + formatLongTime2Str(event.getTimeStamp())); stringBuilder.append("\n"); stringBuilder.append("TraceId:" + Thread.currentThread().getName()); stringBuilder.append("\n"); + + HttpServletRequest request = getRequest(); + if (request != null) { + String requestURI = request.getRequestURI(); + stringBuilder.append("请求路径:" + requestURI); + stringBuilder.append("\n"); + + stringBuilder.append("请求参数:" + ThreadLocalConstant.requestParam.get()); + stringBuilder.append("\n"); + } + String formattedMessage = event.getFormattedMessage(); IThrowableProxy throwableProxy = event.getThrowableProxy(); if (throwableProxy == null && formattedMessage.length() > 1000) { - formattedMessage = formattedMessage.substring(0, getCharacterPosition(formattedMessage, baseProjectPackage, 5)); + formattedMessage = formattedMessage.substring(0, getCharacterPosition(formattedMessage, baseProjectPackage, 5)); } stringBuilder.append("告警信息:" + formattedMessage); stringBuilder.append("\n"); @@ -159,105 +175,19 @@ public class LogMsgSendFilter extends LevelFilter { } } - public static void main(String[] args) { - String msg = "<<<<<<<<异常响应<<<<<<<<:事务流水号:na1597027822634, 执行时长:59ms, 响应数据:{\"code\":8102,\"internalMsg\":\"验证码错误\",\"msg\":\"验证码错误\"}, 异常信息:验证码错误, 堆栈信息:com.epmet.commons.tools.exception.RenException: \n" + - " at com.epmet.service.impl.VolunteerInfoServiceImpl.authenticate(VolunteerInfoServiceImpl.java:91)\n" + - " at com.epmet.service.impl.VolunteerInfoServiceImpl$$FastClassBySpringCGLIB$$7babb2e8.invoke()\n" + - " at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\n" + - " at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:750)\n" + - " at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n" + - " at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:295)\n" + - " at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)\n" + - " at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n" + - " at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:689)\n" + - " at com.epmet.service.impl.VolunteerInfoServiceImpl$$EnhancerBySpringCGLIB$$f78b4778.authenticate()\n" + - " at com.epmet.controller.ResiVolunteerController.authenticate(ResiVolunteerController.java:59)\n" + - " at com.epmet.controller.ResiVolunteerController$$FastClassBySpringCGLIB$$e023fb55.invoke()\n" + - " at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\n" + - " at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:750)\n" + - " at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n" + - " at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:56)\n" + - " at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n" + - " at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88)\n" + - " at com.epmet.commons.tools.aspect.BaseRequestLogAspect.proceed(BaseRequestLogAspect.java:66)\n" + - " at com.epmet.aspect.RequestLogAspect.proceed(RequestLogAspect.java:26)\n" + - " at sun.reflect.GeneratedMethodAccessor195.invoke(Unknown Source)\n" + - " at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n" + - " at java.lang.reflect.Method.invoke(Method.java:498)\n" + - " at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644)\n" + - " at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)\n" + - " at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)\n" + - " at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n" + - " at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)\n" + - " at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n" + - " at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:689)\n" + - " at com.epmet.controller.ResiVolunteerController$$EnhancerBySpringCGLIB$$1c0751c0.authenticate()\n" + - " at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n" + - " at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n" + - " at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n" + - " at java.lang.reflect.Method.invoke(Method.java:498)\n" + - " at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190)\n" + - " at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)\n" + - " at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:105)\n" + - " at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:893)\n" + - " at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:798)\n" + - " at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\n" + - " at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)\n" + - " at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)\n" + - " at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\n" + - " at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\n" + - " at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)\n" + - " at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\n" + - " at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)\n" + - " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)\n" + - " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\n" + - " at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\n" + - " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\n" + - " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\n" + - " at org.springframework.boot.actuate.web.trace.servlet.HttpTraceFilter.doFilterInternal(HttpTraceFilter.java:88)\n" + - " at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)\n" + - " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\n" + - " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\n" + - " at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)\n" + - " at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)\n" + - " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\n" + - " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\n" + - " at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)\n" + - " at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)\n" + - " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\n" + - " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\n" + - " at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:94)\n" + - " at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)\n" + - " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\n" + - " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\n" + - " at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.filterAndRecordMetrics(WebMvcMetricsFilter.java:114)\n" + - " at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:104)\n" + - " at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)\n" + - " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\n" + - " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\n" + - " at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\n" + - " at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)\n" + - " at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\n" + - " at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\n" + - " at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)\n" + - " at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)\n" + - " at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:526)\n" + - " at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)\n" + - " at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\n" + - " at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)\n" + - " at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)\n" + - " at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:367)\n" + - " at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\n" + - " at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:860)\n" + - " at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1591)\n" + - " at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\n" + - " at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\n" + - " at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\n" + - " at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\n" + - " at java.lang.Thread.run(Thread.java:745)"; + /** + * 获取Request对象 + * + * @return + */ + private HttpServletRequest getRequest() { + RequestAttributes ra = RequestContextHolder.getRequestAttributes(); + ServletRequestAttributes sra = (ServletRequestAttributes) ra; + if (sra == null){ + return null; + } + return sra.getRequest(); - String substring = msg.substring(0, getCharacterPosition(msg, "com.epme1t", 5)); - System.out.println(substring); } From 607e6a1e67a9d7de7ba1e72053d5f6bed9c3369f Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 8 Mar 2021 18:17:53 +0800 Subject: [PATCH 081/375] =?UTF-8?q?=E5=89=8D=E7=AB=AF=E5=AF=86=E7=A0=81?= =?UTF-8?q?=E5=8A=A0=E5=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/controller/GovWebController.java | 32 ++- epmet-auth/src/main/resources/bootstrap.yml | 6 + .../commons/tools/utils/RSASignature.java | 251 ++++++++++++++++++ .../scan/common/util/RSASignature.java | 152 ----------- 4 files changed, 287 insertions(+), 154 deletions(-) create mode 100644 epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/RSASignature.java delete mode 100644 epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/common/util/RSASignature.java diff --git a/epmet-auth/src/main/java/com/epmet/controller/GovWebController.java b/epmet-auth/src/main/java/com/epmet/controller/GovWebController.java index e096c6a65a..d0afcf3c32 100644 --- a/epmet-auth/src/main/java/com/epmet/controller/GovWebController.java +++ b/epmet-auth/src/main/java/com/epmet/controller/GovWebController.java @@ -1,19 +1,22 @@ package com.epmet.controller; +import com.epmet.commons.tools.utils.RSASignature; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.form.GovWebLoginFormDTO; import com.epmet.dto.result.UserTokenResultDTO; import com.epmet.service.GovWebService; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; + /** - * @Description PC工作端-登陆服务 * @author sun + * @Description PC工作端-登陆服务 */ @RestController @RequestMapping("govweb") @@ -21,7 +24,10 @@ public class GovWebController { @Autowired private GovWebService govWebService; - + @Value("${epmet.login.publicKey}") + private String publicKey; + @Value("${epmet.login.privateKey}") + private String privateKey; /** * @param formDTO @@ -32,8 +38,30 @@ public class GovWebController { @PostMapping("login") public Result workLogin(@RequestBody GovWebLoginFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO); + + try { + if (formDTO.getPassword().length() > 50) { + String newPassword = RSASignature.decryptByPrivateKey(formDTO.getPassword(), privateKey); + formDTO.setPassword(newPassword); + } + + } catch (Exception e) { + e.printStackTrace(); + } return new Result().ok(govWebService.login(formDTO)); } + /** + * desc: 获取前端密码加密 公钥 + * + * @return com.epmet.commons.tools.utils.Result + * @author LiuJanJun + * @date 2021/3/8 5:07 下午 + */ + @PostMapping("getKey") + public Result getResiWxPhone() { + return new Result().ok(publicKey); + } + } diff --git a/epmet-auth/src/main/resources/bootstrap.yml b/epmet-auth/src/main/resources/bootstrap.yml index 25b9a31702..b2068e7118 100644 --- a/epmet-auth/src/main/resources/bootstrap.yml +++ b/epmet-auth/src/main/resources/bootstrap.yml @@ -145,3 +145,9 @@ thirdplat: appId: 7a5aec009ba4eba8e254ee64fe3775e1 appKey: 14faef9af508d1c253b720ea5a43f9de appSecret: 38e7c2604c8dd33c445705d25eebbfc12a2f7ed8a87111e9e10a40312d3a1595 + +epmet: + login: + publicKey: MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKjgDaHWqWgquoatbC4zzQCgqE8C425VIOyzJVVgH1HUYCHpuNUnGCv3HBAl2RsziWQqQgd1xxl0C3a5J4J69o8CAwEAAQ== + privateKey: MIIBVQIBADANBgkqhkiG9w0BAQEFAASCAT8wggE7AgEAAkEAqOANodapaCq6hq1sLjPNAKCoTwLjblUg7LMlVWAfUdRgIem41ScYK/ccECXZGzOJZCpCB3XHGXQLdrkngnr2jwIDAQABAkAyYaWvgrtHuHetdk+v+QRQC54q9FGluP/5nfilX+f4IUf8j92o/ZohTtmJn9qcDiAP4wxCLIsfy4IW3psST78BAiEA0A/E0WvtI7spWnjfw+wMDhdVMIbIJvDbj/cqMwRZInUCIQDPyO2sbXpwDjmAvyn0jpGJJxU5POWYdI37rTf9fScMcwIhAMkWNHbjBHKANVuHb10ACjakPmWEHnXkW5AspdBg53TxAiARPbzq99KXBbcjxbj3f/T3inSqYTEz60f0wDTLJd1dnQIhAIFe6Jd1TduIxGk1PDh/b/3q0jNGgVXkFnUBnKWDaL9N + diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/RSASignature.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/RSASignature.java new file mode 100644 index 0000000000..ac051e7093 --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/RSASignature.java @@ -0,0 +1,251 @@ +package com.epmet.commons.tools.utils; + +import javax.crypto.Cipher; +import java.security.*; +import java.security.spec.PKCS8EncodedKeySpec; +import java.security.spec.X509EncodedKeySpec; +import java.util.Base64; + +/** + * @author jianjun liu + * @date 2020-06-05 16:48 + **/ + +public class RSASignature { + + + //非对称密钥算法 + private static final String KEY_ALGORITHM = "RSA"; + //密钥长度,在512到65536位之间,建议不要太长,否则速度很慢,生成的加密数据很长 + private static final int KEY_SIZE = 512; + //字符编码 + private static final String CHARSET = "UTF-8"; + + /** + * 生成密钥对 + * + * @return KeyPair 密钥对 + */ + public static KeyPair getKeyPair() throws Exception { + return getKeyPair(null); + } + + /** + * 生成密钥对 + * + * @param password 生成密钥对的密码 + * @return + * @throws Exception + */ + public static KeyPair getKeyPair(String password) throws Exception { + //实例化密钥生成器 + KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(KEY_ALGORITHM); + //初始化密钥生成器 + if (password == null) { + keyPairGenerator.initialize(KEY_SIZE); + } else { + SecureRandom secureRandom = SecureRandom.getInstance("SHA1PRNG"); + secureRandom.setSeed(password.getBytes(CHARSET)); + keyPairGenerator.initialize(KEY_SIZE, secureRandom); + } + //生成密钥对 + return keyPairGenerator.generateKeyPair(); + } + + /** + * 取得私钥 + * + * @param keyPair 密钥对 + * @return byte[] 私钥 + */ + public static byte[] getPrivateKeyBytes(KeyPair keyPair) { + return keyPair.getPrivate().getEncoded(); + } + + /** + * 取得Base64编码的私钥 + * + * @param keyPair 密钥对 + * @return String Base64编码的私钥 + */ + public static String getPrivateKey(KeyPair keyPair) { + return Base64.getEncoder().encodeToString(getPrivateKeyBytes(keyPair)); + } + + /** + * 取得公钥 + * + * @param keyPair 密钥对 + * @return byte[] 公钥 + */ + public static byte[] getPublicKeyBytes(KeyPair keyPair) { + return keyPair.getPublic().getEncoded(); + } + + /** + * 取得Base64编码的公钥 + * + * @param keyPair 密钥对 + * @return String Base64编码的公钥 + */ + public static String getPublicKey(KeyPair keyPair) { + return Base64.getEncoder().encodeToString(getPublicKeyBytes(keyPair)); + } + + /** + * 私钥加密 + * + * @param data 待加密数据 + * @param privateKey 私钥字节数组 + * @return byte[] 加密数据 + */ + public static byte[] encryptByPrivateKey(byte[] data, byte[] privateKey) throws Exception { + //实例化密钥工厂 + KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM); + //生成私钥 + PrivateKey key = keyFactory.generatePrivate(new PKCS8EncodedKeySpec(privateKey)); + //数据加密 + Cipher cipher = Cipher.getInstance(KEY_ALGORITHM); + cipher.init(Cipher.ENCRYPT_MODE, key); + return cipher.doFinal(data); + } + + /** + * 私钥加密 + * + * @param data 待加密数据 + * @param privateKey Base64编码的私钥 + * @return String Base64编码的加密数据 + */ + public static String encryptByPrivateKey(String data, String privateKey) throws Exception { + byte[] key = Base64.getDecoder().decode(privateKey); + return Base64.getEncoder().encodeToString(encryptByPrivateKey(data.getBytes(CHARSET), key)); + } + + /** + * 公钥加密 + * + * @param data 待加密数据 + * @param publicKey 公钥字节数组 + * @return byte[] 加密数据 + */ + public static byte[] encryptByPublicKey(byte[] data, byte[] publicKey) throws Exception { + //实例化密钥工厂 + KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM); + //生成公钥 + PublicKey key = keyFactory.generatePublic(new X509EncodedKeySpec(publicKey)); + //数据加密 + Cipher cipher = Cipher.getInstance(KEY_ALGORITHM); + cipher.init(Cipher.ENCRYPT_MODE, key); + return cipher.doFinal(data); + } + + /** + * 公钥加密 + * + * @param data 待加密数据 + * @param publicKey Base64编码的公钥 + * @return String Base64编码的加密数据 + */ + public static String encryptByPublicKey(String data, String publicKey) throws Exception { + byte[] key = Base64.getDecoder().decode(publicKey); + return Base64.getEncoder().encodeToString(encryptByPublicKey(data.getBytes(CHARSET), key)); + } + + /** + * 私钥解密 + * + * @param data 待解密数据 + * @param privateKey 私钥字节数组 + * @return byte[] 解密数据 + */ + public static byte[] decryptByPrivateKey(byte[] data, byte[] privateKey) throws Exception { + //实例化密钥工厂 + KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM); + //生成私钥 + PrivateKey key = keyFactory.generatePrivate(new PKCS8EncodedKeySpec(privateKey)); + //数据解密 + Cipher cipher = Cipher.getInstance(KEY_ALGORITHM); + cipher.init(Cipher.DECRYPT_MODE, key); + return cipher.doFinal(data); + } + + /** + * 私钥解密 + * + * @param data Base64编码的待解密数据 + * @param privateKey Base64编码的私钥 + * @return String 解密数据 + */ + public static String decryptByPrivateKey(String data, String privateKey) throws Exception { + byte[] key = Base64.getDecoder().decode(privateKey); + return new String(decryptByPrivateKey(Base64.getDecoder().decode(data), key), CHARSET); + } + + /** + * 公钥解密 + * + * @param data 待解密数据 + * @param publicKey 公钥字节数组 + * @return byte[] 解密数据 + */ + public static byte[] decryptByPublicKey(byte[] data, byte[] publicKey) throws Exception { + //实例化密钥工厂 + KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM); + //产生公钥 + PublicKey key = keyFactory.generatePublic(new X509EncodedKeySpec(publicKey)); + //数据解密 + Cipher cipher = Cipher.getInstance(KEY_ALGORITHM); + cipher.init(Cipher.DECRYPT_MODE, key); + return cipher.doFinal(data); + } + + /** + * 公钥解密 + * + * @param data Base64编码的待解密数据 + * @param publicKey Base64编码的公钥 + * @return String 解密数据 + */ + public static String decryptByPublicKey(String data, String publicKey) throws Exception { + byte[] key = Base64.getDecoder().decode(publicKey); + return new String(decryptByPublicKey(Base64.getDecoder().decode(data), key), CHARSET); + } + + /** + * 测试加解密方法 + * + * @param args + * @throws Exception + */ + public static void main(String[] args) throws Exception { + //生成密钥对,一般生成之后可以放到配置文件中 + KeyPair keyPair = RSASignature.getKeyPair(); + //公钥 + String publicKey = RSASignature.getPublicKey(keyPair); + //私钥 + String privateKey = RSASignature.getPrivateKey(keyPair); + + System.out.println("公钥:\n" + publicKey); + System.out.println("私钥:\n" + privateKey); + + String data = "RSA 加解密测试!"; + { + System.out.println("\n===========私钥加密,公钥解密=============="); + String s1 = RSASignature.encryptByPrivateKey(data, privateKey); + System.out.println("加密后的数据:" + s1); + String s2 = RSASignature.decryptByPublicKey(s1, publicKey); + System.out.println("解密后的数据:" + s2 + "\n\n"); + } + + { + System.out.println("\n===========公钥加密,私钥解密=============="); + String s1 = RSASignature.encryptByPublicKey(data, publicKey); + System.out.println("加密后的数据:" + s1); + String s2 = RSASignature.decryptByPrivateKey(s1, privateKey); + System.out.println("解密后的数据:" + s2 + "\n\n"); + } + + } + +} diff --git a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/common/util/RSASignature.java b/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/common/util/RSASignature.java deleted file mode 100644 index c79906908d..0000000000 --- a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/common/util/RSASignature.java +++ /dev/null @@ -1,152 +0,0 @@ -package com.epmet.openapi.scan.common.util; - -import org.apache.commons.codec.binary.Base64; -import org.bouncycastle.util.encoders.UrlBase64; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import javax.crypto.Cipher; -import java.io.ByteArrayInputStream; -import java.io.InputStream; -import java.security.KeyFactory; -import java.security.PrivateKey; -import java.security.PublicKey; -import java.security.Signature; -import java.security.cert.Certificate; -import java.security.cert.CertificateFactory; -import java.security.spec.PKCS8EncodedKeySpec; -import java.security.spec.X509EncodedKeySpec; - -/** - * @author jianjun liu - * @date 2020-06-05 16:48 - **/ - -public class RSASignature { - private static final Logger LOGGER = LoggerFactory.getLogger(RSASignature.class); - public static final String KEY_ALGORITHM = "RSA"; - public static final String SIGNATURE_ALGORITHM = "SHA1WithRSA"; - public static final String ENCODING = "utf-8"; - public static final String X509 = "X.509"; - - /** - * 获取私钥 - * - * @param key - * @return - * @throws Exception - */ - public static PrivateKey getPrivateKey(String key) throws Exception { - byte[] keyBytes = Base64.decodeBase64(key.getBytes(ENCODING)); - PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(keyBytes); - KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM); - PrivateKey privateKey = keyFactory.generatePrivate(keySpec); - return privateKey; - } - - /** - * 获取公钥 - * - * @param key - * @return - * @throws Exception - */ - public static PublicKey getPublicKey(String key) throws Exception { - byte[] keyBytes = Base64.decodeBase64(key.getBytes(ENCODING)); - CertificateFactory certificateFactory = CertificateFactory.getInstance(X509); - InputStream in = new ByteArrayInputStream(keyBytes); - Certificate certificate = certificateFactory.generateCertificate(in); - PublicKey publicKey = certificate.getPublicKey(); - return publicKey; - } - - /** - * 使用公钥对明文进行加密,返回BASE64编码的字符串 - * - * @param publicKey - * @param plainText - * @return - */ - public static String encrypt(String publicKey, String plainText) { - try { - KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM); - byte[] encodedKey = Base64.decodeBase64(publicKey.getBytes(ENCODING)); - PublicKey pubKey = keyFactory.generatePublic(new X509EncodedKeySpec(encodedKey)); - Cipher cipher = Cipher.getInstance(KEY_ALGORITHM); - cipher.init(Cipher.ENCRYPT_MODE, pubKey); - byte[] enBytes = cipher.doFinal(plainText.getBytes()); - return new String(Base64.encodeBase64(enBytes)); - } catch (Exception e) { - LOGGER.error("rsa encrypt exception: {}", e.getMessage(), e); - } - return null; - } - - /** - * 使用私钥对明文密文进行解密 - * - * @param privateKey - * @param enStr - * @return - */ - public static String decrypt(String privateKey, String enStr) { - try { - PrivateKey priKey = getPrivateKey(privateKey); - Cipher cipher = Cipher.getInstance(KEY_ALGORITHM); - cipher.init(Cipher.DECRYPT_MODE, priKey); - byte[] deBytes = cipher.doFinal(Base64.decodeBase64(enStr)); - return new String(deBytes); - } catch (Exception e) { - LOGGER.error("rsa decrypt exception: {}", e.getMessage(), e); - } - return null; - } - - /** - * RSA私钥签名 - * - * @param content 待签名数据 - * @param privateKey 私钥 - * @return 签名值 - */ - public static String signByPrivateKey(String content, String privateKey) { - try { - PrivateKey priKey = getPrivateKey(privateKey); - Signature signature = Signature.getInstance(SIGNATURE_ALGORITHM); - signature.initSign(priKey); - signature.update(content.getBytes(ENCODING)); - byte[] signed = signature.sign(); - return new String(UrlBase64.encode(signed), ENCODING); - } catch (Exception e) { - LOGGER.error("sign error, content: {}", content, e); - } - return null; - } - - /** - * 公钥验签 - * - * @param content - * @param sign - * @param publicKey - * @return - */ - public static boolean verifySignByPublicKey(String content, String sign, String publicKey) { - try { - KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM); - byte[] encodedKey = Base64.decodeBase64(publicKey.getBytes(ENCODING)); - PublicKey pubKey = keyFactory.generatePublic(new X509EncodedKeySpec(encodedKey)); - - Signature signature = Signature.getInstance(SIGNATURE_ALGORITHM); - signature.initVerify(pubKey); - signature.update(content.getBytes(ENCODING)); - - return signature.verify(UrlBase64.decode(sign.getBytes(ENCODING))); - - } catch (Exception e) { - LOGGER.error("verify sign error, content: {}, sign: {}", content, sign, e); - } - return false; - } - -} From 6d09f1f6665c900a7d6aa30d30e52b41867f0c61 Mon Sep 17 00:00:00 2001 From: wangchao Date: Mon, 8 Mar 2021 19:33:29 +0800 Subject: [PATCH 082/375] screenProjectData --- .../java/com/epmet/dao/topic/TopicDao.java | 10 +++++++ .../main/java/com/epmet/dao/user/UserDao.java | 11 ++++++++ .../impl/ScreenProjectSettleServiceImpl.java | 17 ++++++++++-- .../com/epmet/service/topic/TopicService.java | 11 ++++++++ .../service/topic/impl/TopicServiceImpl.java | 26 +++++++++++++++++++ .../com/epmet/service/user/UserService.java | 10 +++++++ .../service/user/impl/UserServiceImpl.java | 21 +++++++++++++++ .../extract/FactOriginProjectMainDailyDao.xml | 2 +- .../FactOriginProjectOrgPeriodDailyDao.xml | 16 +++++++----- .../main/resources/mapper/topic/TopicDao.xml | 14 ++++++++++ .../main/resources/mapper/user/UserDao.xml | 16 ++++++++++++ 11 files changed, 145 insertions(+), 9 deletions(-) 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 1d9a6125bc..8a888cb733 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 @@ -8,6 +8,7 @@ package com.epmet.dao.topic; */ import com.epmet.dto.group.result.TopicContentResultDTO; +import com.epmet.dto.screen.ScreenProjectDataDTO; import com.epmet.dto.screen.form.ProjectSourceMapFormDTO; import com.epmet.dto.topic.ResiTopicDTO; import com.epmet.dto.extract.result.TopicInfoResultDTO; @@ -117,4 +118,13 @@ public interface TopicDao { * @date 2020.09.28 16:28 */ List selectTopicContent(@Param("list") List list); + + /** + * @Description 根据话题Id查询大屏项目的相关信息 + * @param list + * @return java.util.List + * @author wangc + * @date 2021.03.08 17:13 + */ + List selectScreenProjectData(@Param("list") List list); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/user/UserDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/user/UserDao.java index b9162c30a2..411452caeb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/user/UserDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/user/UserDao.java @@ -2,6 +2,7 @@ package com.epmet.dao.user; import com.epmet.dto.extract.form.GridHeartedFormDTO; import com.epmet.dto.extract.result.UserPartyResultDTO; +import com.epmet.dto.screen.ScreenProjectDataDTO; import com.epmet.dto.user.result.CommonTotalAndIncCountResultDTO; import com.epmet.entity.evaluationindex.screen.ScreenPartyUserRankDataEntity; import org.apache.ibatis.annotations.Mapper; @@ -131,4 +132,14 @@ public interface UserDao { * @date 2020.09.25 13:54 **/ List selectRegisteredUserByCustomerId(@Param("customerId") String customerId); + + /** + * @Description 获取大屏项目相关信息 联系人 + * @param list + * @return java.util.List + * @author wangc + * @date 2021.03.08 17:16 + */ + List selectScreenProjectData(@Param("list") List list); } + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java index c223dd32c5..fcc94586f7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java @@ -10,13 +10,15 @@ import com.epmet.service.evaluationindex.extract.toscreen.ScreenProjectSettleSer import com.epmet.service.evaluationindex.screen.ScreenProjectDataService; import com.epmet.service.project.ProjectProcessService; import com.epmet.service.project.ProjectService; +import com.epmet.service.topic.TopicService; +import com.epmet.service.user.UserService; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import java.util.List; -import java.util.stream.Collector; +import java.util.Optional; import java.util.stream.Collectors; /** @@ -36,6 +38,10 @@ public class ScreenProjectSettleServiceImpl implements ScreenProjectSettleServic private ProjectService projectService; @Autowired private ProjectProcessService processService; + @Autowired + private TopicService topicService; + @Autowired + private UserService userService; /** * @Description 抽取项目数据到screen_project_* @@ -65,7 +71,7 @@ public class ScreenProjectSettleServiceImpl implements ScreenProjectSettleServic } List metaData = - originMainService.initNewScreenProjectData(param.getCustomerId(), param.getDateId(),exceedLimit,about2ExceedLimit); + originMainService.initNewScreenProjectData(param.getCustomerId(), rows <= NumConstant.ZERO ? null : param.getDateId(),exceedLimit,about2ExceedLimit); if(!CollectionUtils.isEmpty(metaData)) { List info = projectService.getProjectInfo(metaData.stream().map(ScreenProjectDataDTO::getProjectId).collect(Collectors.toList())); @@ -77,7 +83,9 @@ public class ScreenProjectSettleServiceImpl implements ScreenProjectSettleServic return null; })); } + metaData = Optional.ofNullable(topicService.getScreenProjectData(metaData)).orElse(metaData); + metaData = Optional.ofNullable(userService.getScreenProjectData(metaData)).orElse(metaData); } ScreenProjectDataDTO orientCase = new ScreenProjectDataDTO(); orientCase.setCustomerId(param.getCustomerId()); @@ -85,6 +93,11 @@ public class ScreenProjectSettleServiceImpl implements ScreenProjectSettleServic List orientData = targetDbService.getPending(orientCase); + //TODO 给metaData和orientData赋上分类信息 + + //TODO 重新计算orientData的级别 有现成的方法 fact_origin_project_org_period_daily + + //TODO 更新结案时间和结案状态 } 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 8acaa3c3ac..d1bcbb6823 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 @@ -2,6 +2,7 @@ package com.epmet.service.topic; import com.epmet.dto.AgencySubTreeDto; import com.epmet.dto.extract.result.TopicInfoResultDTO; +import com.epmet.dto.screen.ScreenProjectDataDTO; import com.epmet.dto.screen.form.ProjectSourceMapFormDTO; import com.epmet.dto.stats.DimTopicStatusDTO; import com.epmet.dto.stats.topic.result.TopicStatisticalData; @@ -83,4 +84,14 @@ public interface TopicService { * @date 2020.09.28 16:28 */ Map getTopicContent(List list); + + /** + * @Description 获取大屏项目相关信息 + * + * @param list + * @return java.util.List + * @author wangc + * @date 2021.03.08 17:16 + */ + List getScreenProjectData(List list); } 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 61c926507d..37160da483 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 @@ -7,6 +7,7 @@ import com.epmet.dao.topic.TopicDao; import com.epmet.dto.AgencySubTreeDto; import com.epmet.dto.extract.result.TopicInfoResultDTO; import com.epmet.dto.group.result.TopicContentResultDTO; +import com.epmet.dto.screen.ScreenProjectDataDTO; import com.epmet.dto.screen.form.ProjectSourceMapFormDTO; import com.epmet.dto.stats.DimTopicStatusDTO; import com.epmet.dto.stats.topic.*; @@ -183,6 +184,31 @@ public class TopicServiceImpl implements TopicService { return result; } + /** + * @Description 获取大屏项目相关信息 + * + * @param list + * @return java.util.List + * @author wangc + * @date 2021.03.08 17:16 + */ + @Override + public List getScreenProjectData(List list) { + List collection = topicDao.selectScreenProjectData(list); + if(!CollectionUtils.isEmpty(collection)){ + list.stream().flatMap(target -> collection.stream().filter( + res -> StringUtils.equals(target.getTopicId(),res.getTopicId()) + ).map(merge -> { + target.setLatitude(merge.getLatitude()); + target.setLongitude(merge.getLongitude()); + target.setProjectContent(merge.getProjectContent()); + target.setProjectAddress(merge.getProjectAddress()); + return null; + })); + } + return collection; + } + /** * @Description 初始化机关-所有下级网格Map * @param pid - 固定一个机关Id diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/UserService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/UserService.java index 767af842b0..862541c52c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/UserService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/UserService.java @@ -2,6 +2,7 @@ package com.epmet.service.user; import com.epmet.dto.AgencySubTreeDto; import com.epmet.dto.extract.form.GridHeartedFormDTO; +import com.epmet.dto.screen.ScreenProjectDataDTO; import com.epmet.dto.stats.user.result.UserStatisticalData; import com.epmet.entity.evaluationindex.screen.ScreenPartyUserRankDataEntity; import com.epmet.util.DimIdGenerator; @@ -75,4 +76,13 @@ public interface UserService { * @date 2020.09.25 13:54 **/ List getRegisteredUserList(String customerId); + + /** + * @Description 获取大屏项目相关信息 联系人 + * @param list + * @return java.util.List + * @author wangc + * @date 2021.03.08 17:16 + */ + List getScreenProjectData(List list); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java index bc0a9e83d2..bea50e548e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java @@ -8,6 +8,7 @@ import com.epmet.dao.user.UserDao; import com.epmet.dto.AgencySubTreeDto; import com.epmet.dto.extract.form.GridHeartedFormDTO; import com.epmet.dto.extract.result.UserPartyResultDTO; +import com.epmet.dto.screen.ScreenProjectDataDTO; import com.epmet.dto.stats.user.*; import com.epmet.dto.stats.user.result.UserStatisticalData; import com.epmet.dto.user.result.CommonTotalAndIncCountResultDTO; @@ -728,4 +729,24 @@ public class UserServiceImpl implements UserService { return userList; } + /** + * @Description 获取大屏项目相关信息 联系人 + * @param list + * @return java.util.List + * @author wangc + * @date 2021.03.08 17:16 + */ + @Override + public List getScreenProjectData(List list) { + List collection = userDao.selectScreenProjectData(list); + if(!CollectionUtils.isEmpty(collection)){ + list.stream().flatMap(target -> collection.stream().filter(res -> StringUtils.equals(target.getLinkName(),res.getTopicId())) + .map(merge -> { + target.setLinkName(merge.getLinkName()); + target.setLinkMobile(merge.getLinkMobile()); + return null;})); + } + return collection; + } + } 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 index c33d899ce7..6d6676b09b 100644 --- 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 @@ -546,7 +546,7 @@ data.AGENCY_ID as parentId, agency.AGENCY_NAME as orgName, data.ID as projectId, - data.TOPIC_CREATOR_ID as linkMan, + data.TOPIC_CREATOR_ID as linkName, IF(data.PROJECT_STATUS = 'closed','closed_case',data.PROJECT_STATUS) as projectStatusCode, 3 as projectLevel, IF(data.PIDS IS NULL || TRIM(data.PIDS) = '',data.AGENCY_ID,CONCAT(REPLACE(data.PIDS,':',','),',',data.AGENCY_ID)) as allParentIds, diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectOrgPeriodDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectOrgPeriodDailyDao.xml index 53fc7a5a69..0790001c64 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectOrgPeriodDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectOrgPeriodDailyDao.xml @@ -144,16 +144,20 @@ \ 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 ab24c331f7..8ad22fa07f 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 @@ -242,4 +242,18 @@ ID = #{item.sourceId} + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/UserDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/UserDao.xml index 810a972262..969a848ae3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/UserDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/UserDao.xml @@ -514,4 +514,20 @@ AND register.CUSTOMER_ID = #{customerId} AND register.FIRST_REGISTER = '1' + + + + From 0a2df53b4e3288616941725ce40b643c6ed80fde Mon Sep 17 00:00:00 2001 From: wangchao Date: Tue, 9 Mar 2021 00:28:51 +0800 Subject: [PATCH 083/375] screenProjectData --- .../epmet/dto/project/ProjectCategoryDTO.java | 97 +++++++++++++++++++ .../com/epmet/dao/project/ProjectDao.java | 10 ++ .../com/epmet/service/Issue/IssueService.java | 11 +++ .../impl/ScreenProjectSettleServiceImpl.java | 8 ++ .../epmet/service/project/ProjectService.java | 9 +- .../project/impl/ProjectServiceImpl.java | 19 +++- .../resources/mapper/project/ProjectDao.xml | 9 ++ 7 files changed, 156 insertions(+), 7 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/ProjectCategoryDTO.java diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/ProjectCategoryDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/ProjectCategoryDTO.java new file mode 100644 index 0000000000..3ca8dc43fc --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/ProjectCategoryDTO.java @@ -0,0 +1,97 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto.project; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 项目所属分类表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-25 + */ +@Data +public class ProjectCategoryDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 来源网格id + */ + private String gridId; + + /** + * 项目id + */ + private String projectId; + + /** + * 分类id + */ + private String categoryId; + + /** + * 分类对应的所有上级,英文逗号隔开 + */ + private String categoryPids; + + /** + * 删除标识 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-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 3aac2d6ebe..6cde49825c 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 @@ -20,6 +20,7 @@ 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.ProjectCategoryDTO; import com.epmet.dto.project.ProjectGridDTO; import com.epmet.dto.project.result.ProjectExceedParamsResultDTO; import com.epmet.entity.project.ProjectEntity; @@ -122,4 +123,13 @@ public interface ProjectDao extends BaseDao { * @date 2021.03.08 10:32 */ List batchSelectProjectInfo(@Param("ids")List ids); + + /** + * @Description 查询项目的分类信息 + * @param list + * @return java.util.List + * @author wangc + * @date 2021.03.08 23:44 + */ + List selectProjectCategory(@Param("list")List list); } \ No newline at end of file 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 239ad2d8b1..3d40be1a94 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 @@ -11,6 +11,8 @@ import com.epmet.dto.issue.IssueProjectDTO; import com.epmet.entity.issue.IssueEntity; import java.util.List; +import java.util.Map; +import java.util.Set; /** * @author zhaoqifeng @@ -172,4 +174,13 @@ public interface IssueService { * @date 2020/9/27 11:20 上午 */ List selectIssueVoteStatis(String customerId, String monthId); + + /** + * @Description 查找项目的分类名称 以-相连 + * @param param + * @return java.util.Map + * @author wangc + * @date 2021.03.09 00:23 + */ + Map getIntegratedProjectCategory(Map> param); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java index fcc94586f7..67a01c50d9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java @@ -5,6 +5,7 @@ import com.epmet.dto.project.result.ProjectExceedParamsResultDTO; import com.epmet.dto.screen.ScreenProjectDataDTO; import com.epmet.dto.screen.form.ScreenCentralZoneDataFormDTO; import com.epmet.entity.project.ProjectEntity; +import com.epmet.service.Issue.IssueService; import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectMainDailyService; import com.epmet.service.evaluationindex.extract.toscreen.ScreenProjectSettleService; import com.epmet.service.evaluationindex.screen.ScreenProjectDataService; @@ -18,7 +19,9 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import java.util.List; +import java.util.Map; import java.util.Optional; +import java.util.Set; import java.util.stream.Collectors; /** @@ -42,6 +45,8 @@ public class ScreenProjectSettleServiceImpl implements ScreenProjectSettleServic private TopicService topicService; @Autowired private UserService userService; + @Autowired + private IssueService issueService; /** * @Description 抽取项目数据到screen_project_* @@ -94,6 +99,9 @@ public class ScreenProjectSettleServiceImpl implements ScreenProjectSettleServic targetDbService.getPending(orientCase); //TODO 给metaData和orientData赋上分类信息 + List projectIds = metaData.stream().map(ScreenProjectDataDTO::getProjectId).distinct().collect(Collectors.toList()); + projectIds.addAll(orientData.stream().map(ScreenProjectDataDTO::getProjectId).distinct().collect(Collectors.toList())); + Map> categoryMap = projectService.getProjectCategory(projectIds); //TODO 重新计算orientData的级别 有现成的方法 fact_origin_project_org_period_daily 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 26755f4421..e5f8d822f2 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 @@ -28,6 +28,7 @@ import org.apache.ibatis.annotations.Param; import java.util.List; import java.util.Map; +import java.util.Set; /** * 项目表 @@ -133,11 +134,11 @@ public interface ProjectService extends BaseService { List getProjectInfo(List projectIds); /** - * @Description 获取项目的所有标签名称 用-连接 + * @Description 获取项目的所有标签名称 用-连接 * @param projectIds - * @return java.util.Map + * @return java.util.Map> * @author wangc - * @date 2021.03.08 10:28 + * @date 2021.03.08 23:46 */ - Map getProjectCategory(List projectIds); + Map> getProjectCategory(List projectIds); } \ 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 5edae89e65..27c628fe21 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 @@ -24,15 +24,20 @@ 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.ProjectCategoryDTO; import com.epmet.dto.project.ProjectGridDTO; import com.epmet.dto.project.result.ProjectExceedParamsResultDTO; import com.epmet.entity.project.ProjectEntity; import com.epmet.service.project.ProjectService; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; +import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; /** * 项目表 @@ -127,13 +132,21 @@ public class ProjectServiceImpl extends BaseServiceImpl + * @return java.util.Map> * @author wangc * @date 2021.03.08 10:28 */ @Override - public Map getProjectCategory(List projectIds) { - return null; + public Map> getProjectCategory(List projectIds) { + List categories = baseDao.selectProjectCategory(projectIds); + if(CollectionUtils.isEmpty(categories)) return null; + Map> map = new HashMap<>(); + Map> projectMap = categories.stream().collect(Collectors.groupingBy(ProjectCategoryDTO::getProjectId)); + projectMap.forEach((k,v) -> { + Set categoryIds = v.stream().map(ProjectCategoryDTO::getCategoryId).collect(Collectors.toSet()); + map.put(k,categoryIds); + }); + return map; } } \ 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 ce28113075..2a8699d341 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 @@ -126,4 +126,13 @@ + + \ No newline at end of file From ae1ce33407957e373b0ee6807bc9ffa391dc365c Mon Sep 17 00:00:00 2001 From: wangchao Date: Tue, 9 Mar 2021 02:10:56 +0800 Subject: [PATCH 084/375] screenProjectData --- .../issue/IssueProjectCategoryDictDTO.java | 106 ++++++++++++++++++ .../FactOriginProjectMainDailyDao.java | 2 +- .../com/epmet/dao/issue/StatsIssueDao.java | 8 +- .../com/epmet/service/Issue/IssueService.java | 2 +- .../service/Issue/impl/IssueServiceImpl.java | 25 ++++- .../FactOriginProjectLogDailyService.java | 1 + .../FactOriginProjectMainDailyService.java | 6 +- .../FactOriginProjectLogDailyServiceImpl.java | 1 + ...FactOriginProjectMainDailyServiceImpl.java | 55 +++++---- .../impl/ScreenProjectSettleServiceImpl.java | 22 +++- .../project/ProjectProcessService.java | 3 + .../impl/ProjectProcessServiceImpl.java | 7 ++ .../extract/FactOriginProjectMainDailyDao.xml | 6 +- .../resources/mapper/issue/StatsIssueDao.xml | 34 ++++++ 14 files changed, 239 insertions(+), 39 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/issue/IssueProjectCategoryDictDTO.java diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/issue/IssueProjectCategoryDictDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/issue/IssueProjectCategoryDictDTO.java new file mode 100644 index 0000000000..1955847edd --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/issue/IssueProjectCategoryDictDTO.java @@ -0,0 +1,106 @@ +/** + * 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 java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 议题项目分类字典 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +@Data +public class IssueProjectCategoryDictDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id, 产品默认default + */ + private String customerId; + + /** + * 上级分类ID 顶级此列存储0 + */ + private String pid; + + /** + * 所有上级分类ID,用逗号分开 + */ + private String pids; + + /** + * 分类编码,分类编码+customer_id唯一 + */ + private String categoryCode; + + /** + * 分类名称 + */ + private String categoryName; + + /** + * 分类类别1,2,3,4.... + */ + private String categoryType; + + /** + * 排序 + */ + private Integer sort; + + /** + * 删除标识 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-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 index 2e2328d1c2..086c2e4b61 100644 --- 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 @@ -287,6 +287,6 @@ public interface FactOriginProjectMainDailyDao extends BaseDao initNewScreenProjectData(@Param("customerId")String customerId,@Param("dateId") String dateId); + List initNewScreenProjectData(@Param("customerId")String customerId,@Param("dateId") String dateId,@Param("dataEndTime")String dataEndTime); } \ 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 190353059f..875efb82e1 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 @@ -5,15 +5,13 @@ import com.epmet.dto.extract.result.IssueInfoResultDTO; import com.epmet.dto.extract.result.IssueProcessInfoResultDTO; import com.epmet.dto.extract.result.IssueVoteStatisticalResultDTO; import com.epmet.dto.extract.result.SatisfactionInfoResultDTO; -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.issue.*; import com.epmet.entity.issue.IssueEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; +import java.util.Set; @Mapper public interface StatsIssueDao extends BaseDao { @@ -181,4 +179,6 @@ public interface StatsIssueDao extends BaseDao { * @date 2020/9/27 1:22 下午 */ List selectIssueVoteStatis(@Param("customerId") String customerId, @Param("dateId") String dateId); + + List selectCategory(@Param("customerId") String customerId, @Param("ids") Set set); } 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 3d40be1a94..22201f81ab 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 @@ -182,5 +182,5 @@ public interface IssueService { * @author wangc * @date 2021.03.09 00:23 */ - Map getIntegratedProjectCategory(Map> param); + Map getIntegratedProjectCategory(Map> param,String 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 e134358618..4ad4e58488 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 @@ -1,22 +1,24 @@ package com.epmet.service.Issue.impl; import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.constant.DataSourceConstant; import com.epmet.dao.issue.StatsIssueDao; import com.epmet.dto.extract.result.IssueInfoResultDTO; import com.epmet.dto.extract.result.IssueProcessInfoResultDTO; import com.epmet.dto.extract.result.IssueVoteStatisticalResultDTO; import com.epmet.dto.extract.result.SatisfactionInfoResultDTO; -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.issue.*; import com.epmet.entity.issue.IssueEntity; import com.epmet.service.Issue.IssueService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; +import java.util.HashMap; import java.util.List; +import java.util.Map; +import java.util.Set; /** * @author zhaoqifeng @@ -143,4 +145,19 @@ public class IssueServiceImpl implements IssueService { public List selectIssueVoteStatis(String customerId, String dateId) { return statsIssueDao.selectIssueVoteStatis(customerId, dateId); } + + @Override + public Map getIntegratedProjectCategory(Map> param,String customerId) { + Map map = new HashMap<>(); + param.forEach((projectId,categoryIds) -> { + List categories = statsIssueDao.selectCategory(customerId, categoryIds); + if(!CollectionUtils.isEmpty(categories)){ + StringBuilder str = new StringBuilder(); + categories.forEach(category -> {str.append(category.getCategoryName()).append("-");}); + map.put(projectId,str.substring(NumConstant.ZERO,str.length() - NumConstant.TWO)); + } + }); + + return map; + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectLogDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectLogDailyService.java index 2a3c3ab304..c337c085da 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectLogDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectLogDailyService.java @@ -21,6 +21,7 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.extract.FactOriginProjectLogDailyDTO; import com.epmet.dto.extract.result.*; +import com.epmet.dto.screen.ScreenProjectDataDTO; import com.epmet.entity.evaluationindex.extract.FactOriginProjectLogDailyEntity; import java.math.BigDecimal; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java index 2a7a0f2cad..ea44540cd9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java @@ -328,6 +328,7 @@ public interface FactOriginProjectMainDailyService extends BaseService initNewScreenProjectData(String customerId,String dateId,Integer exceedLimit,Integer about2exceedLimit); + List initNewScreenProjectData(String customerId,Integer rows ,String dateId,Integer exceedLimit,Integer about2exceedLimit); + + void computerIfExceed(List list,Integer exceedLimit,Integer about2exceedLimit); + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectLogDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectLogDailyServiceImpl.java index 7b3f127cd2..641b7efa03 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectLogDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectLogDailyServiceImpl.java @@ -30,6 +30,7 @@ import com.epmet.dao.evaluationindex.extract.FactOriginProjectLogDailyDao; import com.epmet.dao.evaluationindex.extract.FactOriginProjectOrgPeriodDailyDao; import com.epmet.dto.extract.FactOriginProjectLogDailyDTO; import com.epmet.dto.extract.result.*; +import com.epmet.dto.screen.ScreenProjectDataDTO; import com.epmet.entity.evaluationindex.extract.FactOriginProjectLogDailyEntity; import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectLogDailyService; import org.apache.commons.lang3.StringUtils; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java index 94a5fe0855..dde63f6ead 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java @@ -376,6 +376,7 @@ public class FactOriginProjectMainDailyServiceImpl extends BaseServiceImpl initNewScreenProjectData(String customerId, String dateId,Integer exceedLimit,Integer about2exceedLimit) { + public List initNewScreenProjectData(String customerId,Integer rows , String dateId,Integer exceedLimit,Integer about2exceedLimit) { boolean ifYesterday = true; - if(!StringUtils.equals(DateUtils.getBeforeNDay(NumConstant.ONE).substring(0,8),dateId)){ + if(!StringUtils.equals(DateUtils.getBeforeNDay(NumConstant.ONE),dateId)){ ifYesterday = false; } - List projects = baseDao.initNewScreenProjectData(customerId, dateId); + List projects = baseDao.initNewScreenProjectData(customerId, rows == NumConstant.ZERO && ifYesterday ? "" : dateId, dateId); //如果不是昨天立项 - if(!CollectionUtils.isEmpty(projects) && !ifYesterday){ - Result> costDays = epmetCommonServiceOpenFeignClient.costWorkDays(periodDao.selectProjectNodeStartStopTime(projects.stream().map(ScreenProjectDataDTO::getProjectId).distinct().collect(Collectors.toList()))); - if(null != costDays && !CollectionUtils.isEmpty(costDays.getData())){ - Map> projectPeriodMap - = costDays.getData().stream().collect(Collectors.groupingBy(CostDayResultDTO :: getId)); - projects.stream().map(o -> { - - List days = projectPeriodMap.get(o.getProjectId()); - if(!CollectionUtils.isEmpty(days)){ - Integer max = days.stream().max(Comparator.comparing(CostDayResultDTO::getDetentionDays)).get().getDetentionDays(); - //事件级别 红色1级:已超期;黄色2级:即将超期;绿色3级:未超期 - if(max > exceedLimit) - o.setProjectLevel(NumConstant.ONE); - else if(max >= about2exceedLimit) - o.setProjectLevel(NumConstant.TWO); - } - return null; - }); - } - } + if(!CollectionUtils.isEmpty(projects) && !ifYesterday) + computerIfExceed(projects,exceedLimit,about2exceedLimit); + return projects; } + + @Override + public void computerIfExceed(List list,Integer exceedLimit,Integer about2exceedLimit){ + if(CollectionUtils.isEmpty(list)) return; + Result> costDays = epmetCommonServiceOpenFeignClient.costWorkDays(periodDao.selectProjectNodeStartStopTime(list.stream().map(ScreenProjectDataDTO::getProjectId).distinct().collect(Collectors.toList()))); + if(null != costDays && !CollectionUtils.isEmpty(costDays.getData())){ + Map> projectPeriodMap + = costDays.getData().stream().collect(Collectors.groupingBy(CostDayResultDTO :: getId)); + list.stream().map(o -> { + List days = projectPeriodMap.get(o.getProjectId()); + if(!CollectionUtils.isEmpty(days)){ + Integer max = days.stream().max(Comparator.comparing(CostDayResultDTO::getDetentionDays)).get().getDetentionDays(); + //事件级别 红色1级:已超期;黄色2级:即将超期;绿色3级:未超期 + if(max > exceedLimit) + o.setProjectLevel(NumConstant.ONE); + else if(max >= about2exceedLimit) + o.setProjectLevel(NumConstant.TWO); + } + return null; + }); + } + } + + + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java index 67a01c50d9..e49ca919f2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java @@ -6,6 +6,7 @@ import com.epmet.dto.screen.ScreenProjectDataDTO; import com.epmet.dto.screen.form.ScreenCentralZoneDataFormDTO; import com.epmet.entity.project.ProjectEntity; import com.epmet.service.Issue.IssueService; +import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectLogDailyService; import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectMainDailyService; import com.epmet.service.evaluationindex.extract.toscreen.ScreenProjectSettleService; import com.epmet.service.evaluationindex.screen.ScreenProjectDataService; @@ -38,6 +39,8 @@ public class ScreenProjectSettleServiceImpl implements ScreenProjectSettleServic @Autowired private FactOriginProjectMainDailyService originMainService; @Autowired + private FactOriginProjectLogDailyService logService; + @Autowired private ProjectService projectService; @Autowired private ProjectProcessService processService; @@ -76,7 +79,7 @@ public class ScreenProjectSettleServiceImpl implements ScreenProjectSettleServic } List metaData = - originMainService.initNewScreenProjectData(param.getCustomerId(), rows <= NumConstant.ZERO ? null : param.getDateId(),exceedLimit,about2ExceedLimit); + originMainService.initNewScreenProjectData(param.getCustomerId(), rows , param.getDateId(),exceedLimit,about2ExceedLimit); if(!CollectionUtils.isEmpty(metaData)) { List info = projectService.getProjectInfo(metaData.stream().map(ScreenProjectDataDTO::getProjectId).collect(Collectors.toList())); @@ -98,13 +101,24 @@ public class ScreenProjectSettleServiceImpl implements ScreenProjectSettleServic List orientData = targetDbService.getPending(orientCase); - //TODO 给metaData和orientData赋上分类信息 + // 给metaData和orientData赋上分类信息 List projectIds = metaData.stream().map(ScreenProjectDataDTO::getProjectId).distinct().collect(Collectors.toList()); projectIds.addAll(orientData.stream().map(ScreenProjectDataDTO::getProjectId).distinct().collect(Collectors.toList())); Map> categoryMap = projectService.getProjectCategory(projectIds); + if(!CollectionUtils.isEmpty(categoryMap)){ + Map integratedProjectCategoryMap = issueService.getIntegratedProjectCategory(categoryMap, param.getCustomerId()); + if(!CollectionUtils.isEmpty(integratedProjectCategoryMap)){ + metaData.forEach(meta -> { + meta.setAllCategoryName(integratedProjectCategoryMap.get(meta.getProjectId())); + }); + orientData.forEach(orient -> { + orient.setAllCategoryName(integratedProjectCategoryMap.get(orient.getProjectId())); + }); + } + } - //TODO 重新计算orientData的级别 有现成的方法 fact_origin_project_org_period_daily - + //重新计算orientData的级别 有现成的方法 fact_origin_project_org_period_daily + originMainService.computerIfExceed(orientData, exceedLimit,about2ExceedLimit); //TODO 更新结案时间和结案状态 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 5a27fdca62..2405390872 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 @@ -22,6 +22,7 @@ import com.epmet.dto.project.FinishOrgDTO; import com.epmet.dto.project.ProcessInfoDTO; import com.epmet.dto.project.result.ProjectLatestOperationResultDTO; import com.epmet.dto.project.result.ProjectOrgPeriodResultDTO; +import com.epmet.dto.screen.ScreenProjectDataDTO; import com.epmet.entity.project.ProjectEntity; import com.epmet.entity.project.ProjectProcessEntity; @@ -124,4 +125,6 @@ public interface ProjectProcessService extends BaseService * @date 2020.09.28 14:44 */ Map getLatestOperation(List list, String customerId); + + void updateProjectStatus(List list, String dateId); } \ 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 d45bad78ed..16f140f165 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 @@ -30,6 +30,7 @@ import com.epmet.dto.project.ProjectOrgRelationDTO; import com.epmet.dto.project.result.ProjectLatestOperationResultDTO; import com.epmet.dto.project.result.ProjectOrgPeriodResultDTO; import com.epmet.dto.project.result.ProjectOrgRelationWhenResponseResultDTO; +import com.epmet.dto.screen.ScreenProjectDataDTO; import com.epmet.entity.project.ProjectEntity; import com.epmet.entity.project.ProjectProcessEntity; import com.epmet.service.project.ProjectProcessService; @@ -125,4 +126,10 @@ public class ProjectProcessServiceImpl extends BaseServiceImplo,(a,n)-> a)); } } + + @Override + public void updateProjectStatus(List list,String dateId) { + if(CollectionUtils.isEmpty(list)) return; + + } } \ 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 index 6d6676b09b..b4e887642a 100644 --- 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 @@ -550,7 +550,8 @@ IF(data.PROJECT_STATUS = 'closed','closed_case',data.PROJECT_STATUS) as projectStatusCode, 3 as projectLevel, IF(data.PIDS IS NULL || TRIM(data.PIDS) = '',data.AGENCY_ID,CONCAT(REPLACE(data.PIDS,':',','),',',data.AGENCY_ID)) as allParentIds, - data.TOPIC_ID + data.TOPIC_ID, + #{dataEndTime} as dataEndTime FROM `fact_origin_project_main_daily` data LEFT JOIN DIM_AGENCY agency on data.agency_id = agency.id @@ -561,6 +562,9 @@ AND data.DATE_ID = #{dateId} + + AND CAST(data.DATE_ID AS SIGNED) CAST(#{dataEndTime} AS SIGNED) + \ 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 bd307d1d78..ad18c3d988 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 @@ -287,4 +287,38 @@ AND DATE_FORMAT(ivd.CREATED_TIME,'%Y%m%d') = #{dateId} + + \ No newline at end of file From d086ecef931fe921b0ef1ea47d0718aa8672c3ac Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 9 Mar 2021 10:30:41 +0800 Subject: [PATCH 085/375] =?UTF-8?q?=E8=A7=A3=E5=86=B3sso=E7=AC=AC=E4=B8=89?= =?UTF-8?q?=E6=96=B9=E5=B9=B3=E5=8F=B0=E5=90=88=E5=B9=B6=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/SsoServiceImpl.java | 2 +- .../commons/thirdplat/apiservice/jcet/JcetApiService.java | 3 ++- .../commons/thirdplat/apiservice/pyld/PyldApiService.java | 7 ++++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/epmet-auth/src/main/java/com/epmet/service/impl/SsoServiceImpl.java b/epmet-auth/src/main/java/com/epmet/service/impl/SsoServiceImpl.java index 860719988d..3f77b56af1 100644 --- a/epmet-auth/src/main/java/com/epmet/service/impl/SsoServiceImpl.java +++ b/epmet-auth/src/main/java/com/epmet/service/impl/SsoServiceImpl.java @@ -144,7 +144,7 @@ public class SsoServiceImpl implements SsoService { ThirdPlatformEnum platformEnum = ThirdPlatformEnum.getEnum(formDTO.getPlatform()); String apiService = platformEnum.getApiService(); AbstractApiService apiServiceImpl = (AbstractApiService) SpringContextUtils.getBean(apiService); - thirdUser = apiServiceImpl.getUserInfoByTicket(formDTO.getThirdToken()); + thirdUser = apiServiceImpl.getGUserInfoBySSOToken(formDTO.getThirdToken()); } catch (RenException e) { throw new RenException(e.getCode(), e.getMessage()); } catch (Exception e) { diff --git a/epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/apiservice/jcet/JcetApiService.java b/epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/apiservice/jcet/JcetApiService.java index e12d008941..f499156947 100644 --- a/epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/apiservice/jcet/JcetApiService.java +++ b/epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/apiservice/jcet/JcetApiService.java @@ -14,6 +14,7 @@ import com.epmet.commons.tools.utils.HttpClientManager; import com.epmet.commons.tools.utils.Result; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Service; import java.io.UnsupportedEncodingException; import java.util.HashMap; @@ -38,7 +39,7 @@ public class JcetApiService extends AbstractApiService { * @author wxz * @date 2021.01.19 10:26 */ - public ThirdPlatUserInfo getUserInfoByTicket(String ticket) throws UnsupportedEncodingException { + public ThirdPlatUserInfo getCUserInfoByTicket(String ticket) throws UnsupportedEncodingException { logger.info("【请求酒城e通第三方平台】getUserInfoByTicket()接口开始>>>>>>>>>>>>"); logger.info("【请求酒城e通第三方平台】getUserInfoByTicket()接口入参 ticket:{}", ticket); diff --git a/epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/apiservice/pyld/PyldApiService.java b/epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/apiservice/pyld/PyldApiService.java index 958fd8b1bb..b5307c2951 100644 --- a/epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/apiservice/pyld/PyldApiService.java +++ b/epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/apiservice/pyld/PyldApiService.java @@ -40,6 +40,11 @@ public class PyldApiService extends AbstractApiService { pyldThirdplatProps = props.getPyld(); } + @Override + public ThirdPlatUserInfo getCUserInfoByTicket(String ticket) throws Exception { + return null; + } + /** * @return * @Description 通过第三方平台ticket获取用户信息 @@ -47,7 +52,7 @@ public class PyldApiService extends AbstractApiService { * @date 2021.01.19 10:26 */ @Override - public ThirdPlatUserInfo getUserInfoByTicket(String platformToken) { + public ThirdPlatUserInfo getGUserInfoBySSOToken(String platformToken) { logger.info("【请求平阴联动指挥平台第三方平台】getUserInfoByTicket()接口开始>>>>>>>>>>>>"); logger.info("【请求平阴联动指挥平台第三方平台】getUserInfoByTicket()接口入参 platformToken:{}", platformToken); From 3b9297b7482a00c75f4eacc95c8e1b56d0166dd9 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 9 Mar 2021 11:03:35 +0800 Subject: [PATCH 086/375] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ApplicationFailedEventListener.java | 84 +++++++++++++++++++ ...ava => ApplicationReadyEventListener.java} | 13 ++- 2 files changed, 90 insertions(+), 7 deletions(-) create mode 100644 epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/ApplicationFailedEventListener.java rename epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/{CustomerApplicationRunner.java => ApplicationReadyEventListener.java} (90%) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/ApplicationFailedEventListener.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/ApplicationFailedEventListener.java new file mode 100644 index 0000000000..5c219ab095 --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/ApplicationFailedEventListener.java @@ -0,0 +1,84 @@ +/** + * Copyright (c) 2018 人人开源 All rights reserved. + *

+ * https://www.renren.io + *

+ * 版权所有,侵权必究! + */ + +package com.epmet.commons.tools.aspect; + +import com.alibaba.fastjson.JSON; +import com.dingtalk.api.DefaultDingTalkClient; +import com.dingtalk.api.DingTalkClient; +import com.dingtalk.api.request.OapiRobotSendRequest; +import com.dingtalk.api.response.OapiRobotSendResponse; +import com.epmet.commons.tools.enums.EnvEnum; +import com.epmet.commons.tools.utils.SpringContextUtils; +import com.taobao.api.ApiException; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.context.event.ApplicationFailedEvent; +import org.springframework.cloud.commons.util.InetUtils; +import org.springframework.context.ApplicationListener; +import org.springframework.stereotype.Component; + +/** + * 应用 启动健康检查 通知类 + * CustomerApplicationRunner + * + * @author Mark sunlightcs@gmail.com + * @since 1.0.0 + */ +@Component +public class ApplicationFailedEventListener implements ApplicationListener { + private static Logger logger = LogManager.getLogger(ApplicationFailedEventListener.class); + @Value("${spring.application.name}") + private String appName; + @Value("${server.version}") + private String version; + + @Override + public void onApplicationEvent(ApplicationFailedEvent applicationFailedEvent) { + Throwable exception = applicationFailedEvent.getException(); + EnvEnum currentEnv = EnvEnum.getCurrentEnv(); + logger.info(currentEnv); + if (!EnvEnum.DEV.getCode().equals(currentEnv.getCode()) && !EnvEnum.LOCAL.getCode().equals(currentEnv.getCode())) { + sendDingMarkDownMsg(exception); + } + } + + + private String getServerIp() { + InetUtils inetUtils = SpringContextUtils.getBean(InetUtils.class); + return inetUtils.findFirstNonLoopbackHostInfo().getIpAddress(); + } + + private void sendDingMarkDownMsg(Throwable exception) { + DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/robot/send?access_token=ffd7c972b0525e249283df1a16b65a8b9d0012601f3a458dfc588c2eac497bb5"); + OapiRobotSendRequest request = new OapiRobotSendRequest(); + request.setMsgtype("markdown"); + OapiRobotSendRequest.Markdown markdown = new OapiRobotSendRequest.Markdown(); + markdown.setTitle("部署失败通知"); + + markdown.setText("部署失败通知 \n" + + "> 服务:" + appName + "\n\n" + + "> 版本:" + version + "\n\n" + + "> 环境:" + EnvEnum.getCurrentEnv().getName() + "\n\n" + + "> IP: " + getServerIp() + "\n\n" + + "> 异常:" + exception.getMessage() + "\n\n" + ); + request.setMarkdown(markdown); + OapiRobotSendRequest.At at = new OapiRobotSendRequest.At(); + at.setIsAtAll(true); + request.setAt(at); + try { + OapiRobotSendResponse execute = client.execute(request); + logger.info("=====通知结果===>" + JSON.toJSONString(execute)); + } catch (ApiException e) { + logger.error("sendDingMarkDownMsg exception", e); + } + } + +} diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/CustomerApplicationRunner.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/ApplicationReadyEventListener.java similarity index 90% rename from epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/CustomerApplicationRunner.java rename to epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/ApplicationReadyEventListener.java index 4537414335..901163e7ac 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/CustomerApplicationRunner.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/ApplicationReadyEventListener.java @@ -22,10 +22,9 @@ import com.taobao.api.ApiException; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.ApplicationArguments; -import org.springframework.boot.ApplicationRunner; +import org.springframework.boot.context.event.ApplicationReadyEvent; import org.springframework.cloud.commons.util.InetUtils; -import org.springframework.core.annotation.Order; +import org.springframework.context.ApplicationListener; import org.springframework.stereotype.Component; /** @@ -36,16 +35,15 @@ import org.springframework.stereotype.Component; * @since 1.0.0 */ @Component -@Order(value = 99) -public class CustomerApplicationRunner implements ApplicationRunner { - private static Logger logger = LogManager.getLogger(CustomerApplicationRunner.class); +public class ApplicationReadyEventListener implements ApplicationListener { + private static Logger logger = LogManager.getLogger(ApplicationReadyEventListener.class); @Value("${spring.application.name}") private String appName; @Value("${server.version}") private String version; @Override - public void run(ApplicationArguments args) { + public void onApplicationEvent(ApplicationReadyEvent applicationReadyEvent) { EnvEnum currentEnv = EnvEnum.getCurrentEnv(); logger.info(currentEnv); if (!EnvEnum.DEV.getCode().equals(currentEnv.getCode()) && !EnvEnum.LOCAL.getCode().equals(currentEnv.getCode())) { @@ -107,4 +105,5 @@ public class CustomerApplicationRunner implements ApplicationRunner { } } + } From df3fe4cbaa0e5d83c5df80c37dd3a6c5b42cd721 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 9 Mar 2021 12:53:22 +0800 Subject: [PATCH 087/375] =?UTF-8?q?=E5=B9=B3=E9=98=B4=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=8A=BD=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcal/AgencyScoreDao.java | 2 + .../indexcal/DeptScoreDao.java | 1 + .../screen/ScreenCustomerAgencyDao.java | 8 +++ .../IndexCalculateDistrictServiceImpl.java | 19 ++++--- .../indexcal/AgencyScoreDao.xml | 50 ++++++++++++++++++- .../evaluationindex/indexcal/DeptScoreDao.xml | 21 ++++++++ .../FactIndexPartyAblityOrgMonthlyDao.xml | 3 +- .../screen/ScreenCustomerAgencyDao.xml | 14 ++++++ 8 files changed, 109 insertions(+), 9 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java index 5e0d0585be..bc00d9e97b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java @@ -71,6 +71,7 @@ public interface AgencyScoreDao extends BaseDao { * @date 2021/1/15 下午4:23 */ List selectAgencyScoreInfoExistsSub(@Param("areaCode") String areaCode,@Param("areaCodeLength") Integer areaCodeLength, @Param("monthId")String monthId, @Param("dataType")String dataType); + List selectAgencyScoreInfoExistsSubSelf(@Param("areaCode") String areaCode, @Param("monthId")String monthId, @Param("dataType")String dataType); /** * @Description 区下级街道得分平均值 @@ -91,6 +92,7 @@ public interface AgencyScoreDao extends BaseDao { * @date 2021/1/18 上午9:09 */ List selectAgencyScoreAvgExistsSub(@Param("monthId")String monthId, @Param("indexCode")String indexCode,@Param("dataType")String dataType,@Param("areaCode")String areaCode,@Param("areaCodeLength")Integer areaCodeLength); + List selectAgencyScoreAvgByOrgIds(@Param("monthId")String monthId, @Param("indexCode")String indexCode,@Param("orgIds")List orgIds); /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java index a22317c371..cc35dbb875 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java @@ -77,6 +77,7 @@ public interface DeptScoreDao extends BaseDao { * @date 2021/1/18 上午9:31 */ List selectGovernDeptScoreAvgExistsSub(@Param("areaCode")String areaCode, @Param("monthId")String monthId, @Param("indexCode")String indexCode); + List selectGovernDeptScoreAvgExistsSubNotSelf(@Param("areaCode")String areaCode, @Param("monthId")String monthId, @Param("indexCode")String indexCode); /** * @return int diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java index f61e21f2ad..44eeb11fa6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java @@ -194,4 +194,12 @@ public interface ScreenCustomerAgencyDao extends BaseDao selectAgencyByCustomer(@Param("customerId")String customerId); List selectAgencyByAreaCode(String areaCode); + + /** + * @Description 根据areaCode查询下级组织 + * @Param areaCode + * @author zxc + * @date 2021/3/9 上午9:41 + */ + List selectAgencyByParentAreaCode(@Param("areaCode") String areaCode); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java index 592c114fd4..5ea39f0d4c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java @@ -23,6 +23,7 @@ import com.epmet.dto.indexcal.AgencyCalResultDTO; import com.epmet.dto.indexcal.AgencyScoreDTO; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.SubAgencyScoreAvgResultDTO; +import com.epmet.dto.screen.ScreenProjectOrgDailyDTO; import com.epmet.dto.screen.result.MaxAndMinBigDecimalResultDTO; import com.epmet.entity.evaluationindex.indexcal.AgencySelfSubScoreEntity; import com.epmet.entity.evaluationindex.indexcal.AgencySubScoreEntity; @@ -604,10 +605,11 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict } List indexInputVOS = new ArrayList<>(); Map pid = new HashMap<>(); + List orgInfos = customerAgencyDao.selectAgencyByParentAreaCode(form.getCustomerAreaCode()); //党建能力平均值 indexDetailList.forEach(detail -> { if (IndexCodeEnum.QU_XIA_JI_JIE_DDJNLHZPJZ.getCode().equals(detail.getIndexCode())) { - List subGridPartyAvgScore = agencyScoreDao.selectAgencyScoreAvgExistsSub(monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL,form.getCustomerAreaCode(),NumConstant.SIX); + List subGridPartyAvgScore = agencyScoreDao.selectAgencyScoreAvgByOrgIds(monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),orgInfos.stream().map(o -> o.getOrgId()).collect(Collectors.toList())); if (CollectionUtils.isEmpty(subGridPartyAvgScore)) { log.warn(IndexCalConstant.DISTRICT_PARTY_AVG_NULL); } else if (subGridPartyAvgScore.size() > NumConstant.ZERO) { @@ -629,7 +631,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict } } else { // 区名义发文数量 - List> publishArticleCountList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMapExistSub(monthId,form.getCustomerAreaCode(),NumConstant.SIX); + List> publishArticleCountList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMapExistSubNotSelf(monthId,form.getCustomerAreaCode(),NumConstant.SIX); if (CollectionUtils.isEmpty(publishArticleCountList)) { log.warn(IndexCalConstant.DISTRICT_PUBLISH_ARTICLE_LIST_NULL); } else { @@ -682,9 +684,12 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict } List indexInputVOS = new ArrayList<>(); Map pid = new HashMap<>(); + List orgInfos = customerAgencyDao.selectAgencyByParentAreaCode(form.getCustomerAreaCode()); detailListByParentCode.forEach(detail -> { if (IndexCodeEnum.SUO_YOU_JIE_DAO_ZLNLPJZ.getCode().equals(detail.getIndexCode())) { - List districtGovernAvgList = agencyScoreDao.selectAgencyScoreAvgExistsSub(monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL,form.getCustomerAreaCode(),NumConstant.SIX); +// List districtGovernAvgList = agencyScoreDao.selectAgencyScoreAvgExistsSub(monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL,form.getCustomerAreaCode(),NumConstant.SIX); + List districtGovernAvgList = agencyScoreDao.selectAgencyScoreAvgByOrgIds(monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),orgInfos.stream().map(m -> m.getOrgId()).collect(Collectors.toList())); + log.info(districtGovernAvgList.toString()); for (int i = 0; i < districtGovernAvgList.size(); i++) { if (districtGovernAvgList.get(i).getAgencyId().equals(NumConstant.ZERO_STR)){ districtGovernAvgList.remove(districtGovernAvgList.get(i)); @@ -710,7 +715,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict }); } } else if (IndexCodeEnum.SUO_YOU_ZHI_SHU_BMZLNLPJZ.getCode().equals(detail.getIndexCode())){ - List deptScoreAvgList = deptScoreDao.selectGovernDeptScoreAvgExistsSub(monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),form.getCustomerAreaCode()); + List deptScoreAvgList = deptScoreDao.selectGovernDeptScoreAvgExistsSubNotSelf(monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),form.getCustomerAreaCode()); for (int i = 0; i < deptScoreAvgList.size(); i++) { if (deptScoreAvgList.get(i).getAgencyId().equals(NumConstant.ZERO_STR)){ deptScoreAvgList.remove(deptScoreAvgList.get(i)); @@ -762,10 +767,12 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict } List indexInputVOS = new ArrayList<>(); Map pid = new HashMap<>(); + List orgInfos = customerAgencyDao.selectAgencyByParentAreaCode(form.getCustomerAreaCode()); detailListByParentCode.forEach(detail -> { String indexCode = detail.getIndexCode(); if (IndexCodeEnum.QU_XIA_SHU_JIE_DFWNLHZPJZ.getCode().equals(indexCode)) { - List subStreetAvgList = agencyScoreDao.selectAgencyScoreAvgExistsSub(monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL,form.getCustomerAreaCode(),NumConstant.SIX); +// List subStreetAvgList = agencyScoreDao.selectAgencyScoreAvgExistsSub(monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL,form.getCustomerAreaCode(),NumConstant.SIX); + List subStreetAvgList = agencyScoreDao.selectAgencyScoreAvgByOrgIds(monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),orgInfos.stream().map(m -> m.getOrgId()).collect(Collectors.toList())); for (int i = 0; i < subStreetAvgList.size(); i++) { if (subStreetAvgList.get(i).getAgencyId().equals(NumConstant.ZERO_STR)){ subStreetAvgList.remove(subStreetAvgList.get(i)); @@ -815,7 +822,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict String customerId = form.getCustomerId(); String monthId = form.getMonthId(); List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode()); - List agencyScoreList = agencyScoreDao.selectAgencyScoreInfoExistsSub(form.getCustomerAreaCode(),NumConstant.SIX,monthId, IndexCalConstant.DISTRICT_LEVEL); + List agencyScoreList = agencyScoreDao.selectAgencyScoreInfoExistsSubSelf(form.getCustomerAreaCode(),monthId, IndexCalConstant.DISTRICT_LEVEL); detailListByParentCode.forEach(detail -> { agencyScoreList.forEach(community -> { if (detail.getIndexCode().equals(community.getIndexCode())) { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml index 6ba1ac05cf..c082758802 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml @@ -142,6 +142,7 @@ WHERE fias.del_flag = 0 AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%') + AND sca.AREA_CODE != #{areaCode} AND fias.MONTH_ID = #{monthId} AND fias.data_type = #{dataType} AND fias.IS_TOTAL = "0" @@ -159,7 +160,7 @@ fics.year_id, ROUND(AVG( fics.score ),6) AS score, fics.customer_id, - PARENT_AGENCY_ID AS parentId + fics.PARENT_AGENCY_ID AS parentId FROM fact_index_agency_score fics LEFT JOIN screen_customer_agency sca ON sca.AGENCY_ID = fics.PARENT_AGENCY_ID @@ -172,4 +173,51 @@ AND fics.DATA_TYPE = #{dataType} GROUP BY fics.parent_agency_id + + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml index d5f2e9b8a0..f0dc795c8e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml @@ -172,4 +172,25 @@ AND fidc.index_code = #{indexCode} GROUP BY fidc.agency_id + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml index 9ce69d1128..c0f9e6e261 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml @@ -163,8 +163,7 @@ LEFT JOIN screen_customer_agency sca ON sca.AGENCY_ID = pm.AGENCY_ID WHERE pm.del_flag = '0' - AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%') - AND sca.AREA_CODE != #{areaCode} + AND sca.AREA_CODE = #{areaCode} AND pm.month_id = #{monthId} + + + From 797011a8ef7b8b9c00ed649b3d5deb3f7ad2d797 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 9 Mar 2021 13:25:11 +0800 Subject: [PATCH 088/375] =?UTF-8?q?sql=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml index 9c3497f29e..5552a9df4b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml @@ -402,6 +402,6 @@ sca.AREA_CODE FROM screen_customer_agency sca WHERE DEL_FLAG = 0 - and sca.PARENT_AREA_CODE like #{areaCode} + and sca.PARENT_AREA_CODE = #{areaCode} From b89490cf08e0fc41192d52b01503f5f9aedc8155 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 9 Mar 2021 13:33:49 +0800 Subject: [PATCH 089/375] test --- .../java/com/epmet/commons/tools/filter/LogMsgSendFilter.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/filter/LogMsgSendFilter.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/filter/LogMsgSendFilter.java index 4e2f0d16ab..79d0b59f6e 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/filter/LogMsgSendFilter.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/filter/LogMsgSendFilter.java @@ -17,7 +17,6 @@ import org.springframework.cloud.commons.util.InetUtils; import org.springframework.core.env.Environment; import java.text.SimpleDateFormat; -import java.util.Arrays; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -274,7 +273,7 @@ public class LogMsgSendFilter extends LevelFilter { } return slashMatcher.start(); } catch (Exception e) { - logger.warn("getCharacterPosition no matche"); + logger.warn("getCharacterPosition no matche", e); return 0; } } From bd23c5c5ded97aa5f817634f43a7dd92ffdc3ccc Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 9 Mar 2021 13:43:56 +0800 Subject: [PATCH 090/375] test --- .../com/epmet/controller/LoginController.java | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/epmet-auth/src/main/java/com/epmet/controller/LoginController.java b/epmet-auth/src/main/java/com/epmet/controller/LoginController.java index 45c8950d9c..f70495eb51 100644 --- a/epmet-auth/src/main/java/com/epmet/controller/LoginController.java +++ b/epmet-auth/src/main/java/com/epmet/controller/LoginController.java @@ -12,6 +12,7 @@ import com.epmet.dto.form.ResiWxPhoneFormDTO; import com.epmet.dto.result.UserTokenResultDTO; import com.epmet.service.CaptchaService; import com.epmet.service.LoginService; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -28,6 +29,7 @@ import java.io.IOException; * @Author yinzuomei * @Date 2020/3/14 13:58 */ +@Slf4j @RestController @RequestMapping("login") public class LoginController { @@ -47,15 +49,20 @@ public class LoginController { **/ @GetMapping("captcha") public void captcha(HttpServletResponse response, String uuid) throws IOException { - //uuid不能为空 - AssertUtils.isBlank(uuid, ErrorCode.IDENTIFIER_NOT_NULL); - //生成图片验证码 - BufferedImage image = captchaService.create(uuid); - response.setHeader("Cache-Control", "no-store, no-cache"); - response.setContentType("image/jpeg"); - ServletOutputStream out = response.getOutputStream(); - ImageIO.write(image, "jpg", out); - out.close(); + try { + //uuid不能为空 + AssertUtils.isBlank(uuid, ErrorCode.IDENTIFIER_NOT_NULL); + //生成图片验证码 + BufferedImage image = captchaService.create(uuid); + response.reset(); + response.setHeader("Cache-Control", "no-store, no-cache"); + response.setContentType("image/jpeg"); + ServletOutputStream out = response.getOutputStream(); + ImageIO.write(image, "jpg", out); + out.close(); + } catch (IOException e) { + log.error("获取登陆验证码异常", e); + } } /** From cc2b5b3a6dbda3c3fe09a8b04b6eaf6e664b3e81 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 9 Mar 2021 13:49:34 +0800 Subject: [PATCH 091/375] =?UTF-8?q?=E5=BC=82=E5=B8=B8=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/commons/tools/aspect/BaseRequestLogAspect.java | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/BaseRequestLogAspect.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/BaseRequestLogAspect.java index ff877a04be..5eaada034e 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/BaseRequestLogAspect.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/BaseRequestLogAspect.java @@ -61,6 +61,7 @@ public abstract class BaseRequestLogAspect { try { Object[] args = point.getArgs(); + ThreadLocalConstant.requestParam.set(objectsToString(args)); log.info(">>>>>>>>请求信息>>>>>>>>:事务流水号:{},url:{} ,method:{},请求参数:{}", transactionSerial, requestURI, method, objectsToString(args)); result = point.proceed(); resultInfoLog(transactionSerial, getExecPeriod(startTime), result); From ff1d9694224c3ecb4ee249ccce693c55105862ec Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 9 Mar 2021 14:05:59 +0800 Subject: [PATCH 092/375] =?UTF-8?q?=E5=8F=82=E6=95=B0=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/commons/tools/aspect/BaseRequestLogAspect.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/BaseRequestLogAspect.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/BaseRequestLogAspect.java index 02c3d8f18a..4b3496ee36 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/BaseRequestLogAspect.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/BaseRequestLogAspect.java @@ -1,6 +1,5 @@ package com.epmet.commons.tools.aspect; -import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.constant.ThreadLocalConstant; import com.epmet.commons.tools.exception.*; @@ -14,6 +13,7 @@ import org.springframework.dao.DuplicateKeyException; import javax.servlet.http.HttpServletRequest; import java.time.Duration; import java.time.LocalDateTime; +import java.util.Arrays; /** * 日志切面 @@ -63,7 +63,7 @@ public abstract class BaseRequestLogAspect { try { Object[] args = point.getArgs(); - ThreadLocalConstant.requestParam.set(JSON.toJSONString(args)); + ThreadLocalConstant.requestParam.set(Arrays.toString(point.getArgs())); log.info(">>>>>>>>请求信息>>>>>>>>:事务流水号:{},url:{} ,method:{},请求参数:{}", transactionSerial, requestURI, method, objectsToString(args)); result = point.proceed(); resultInfoLog(transactionSerial, getExecPeriod(startTime), result); From d7bf8d2eb9cc7b56228d9d4428c9c4b322da34c2 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 9 Mar 2021 14:13:12 +0800 Subject: [PATCH 093/375] =?UTF-8?q?=E8=8E=B7=E5=8F=96pubkey?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/controller/GovWebController.java | 2 +- .../main/java/com/epmet/commons/tools/utils/RSASignature.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-auth/src/main/java/com/epmet/controller/GovWebController.java b/epmet-auth/src/main/java/com/epmet/controller/GovWebController.java index d0afcf3c32..8a85cb9da4 100644 --- a/epmet-auth/src/main/java/com/epmet/controller/GovWebController.java +++ b/epmet-auth/src/main/java/com/epmet/controller/GovWebController.java @@ -59,7 +59,7 @@ public class GovWebController { * @date 2021/3/8 5:07 下午 */ @PostMapping("getKey") - public Result getResiWxPhone() { + public Result getPubKey() { return new Result().ok(publicKey); } diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/RSASignature.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/RSASignature.java index ac051e7093..6de665f7eb 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/RSASignature.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/RSASignature.java @@ -237,7 +237,7 @@ public class RSASignature { String s2 = RSASignature.decryptByPublicKey(s1, publicKey); System.out.println("解密后的数据:" + s2 + "\n\n"); } - + //===== { System.out.println("\n===========公钥加密,私钥解密=============="); String s1 = RSASignature.encryptByPublicKey(data, publicKey); From e83a8c8386feb5242d8a282fa3680b8215523576 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 9 Mar 2021 14:47:18 +0800 Subject: [PATCH 094/375] =?UTF-8?q?=E5=B9=B3=E9=98=B4=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=8A=BD=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcoll/FactIndexPartyAblityOrgMonthlyDao.java | 4 ++-- .../indexcal/impl/IndexCalculateDistrictServiceImpl.java | 2 +- .../indexcal/impl/IndexCalculateStreetServiceImpl.java | 2 +- .../indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml | 3 ++- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java index 99c0efaa60..dd3774be45 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java @@ -85,8 +85,8 @@ public interface FactIndexPartyAblityOrgMonthlyDao extends BaseDao> selectPublishArticleCountMapExistSub(@Param("monthId")String monthId,@Param("areaCode")String areaCode,@Param("areaCodeLength")Integer areaCodeLength); - List> selectPublishArticleCountMapExistSubNotSelf(@Param("monthId")String monthId,@Param("areaCode")String areaCode,@Param("areaCodeLength")Integer areaCodeLength); + List> selectPublishArticleCountMapExistSubStreet(@Param("monthId")String monthId,@Param("areaCode")String areaCode); + List> selectPublishArticleCountMapExistSubNotSelf(@Param("monthId")String monthId,@Param("areaCode")String areaCode); /** * @Description 查询社区下的发文数 Map【根据areaCode】 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java index 5ea39f0d4c..b679cd8c99 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java @@ -631,7 +631,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict } } else { // 区名义发文数量 - List> publishArticleCountList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMapExistSubNotSelf(monthId,form.getCustomerAreaCode(),NumConstant.SIX); + List> publishArticleCountList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMapExistSubNotSelf(monthId,form.getCustomerAreaCode()); if (CollectionUtils.isEmpty(publishArticleCountList)) { log.warn(IndexCalConstant.DISTRICT_PUBLISH_ARTICLE_LIST_NULL); } else { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java index 9343575dc3..539667b0a3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java @@ -634,7 +634,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ } } else { // 街道名义发文数量 - List> mapList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMapExistSubNotSelf(monthId,form.getCustomerAreaCode(),NumConstant.NINE); + List> mapList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMapExistSubStreet(monthId,form.getCustomerAreaCode()); if (CollectionUtils.isEmpty(mapList)) { log.warn(IndexCalConstant.STREET_PUBLISH_ARTICLE_LIST_NULL); } else { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml index c0f9e6e261..457443543b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml @@ -132,7 +132,7 @@ - SELECT pm.AGENCY_ID, pm.PARENT_ID, @@ -147,6 +147,7 @@ WHERE pm.del_flag = '0' AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%') + AND sca.AREA_CODE != #{areaCode} AND pm.month_id = #{monthId} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectProcessDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectProcessDao.xml index 06023e11b6..d9e112ddca 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectProcessDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectProcessDao.xml @@ -10,4 +10,9 @@ limit 1000 + + 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 9e2bd9fe1d..2ee1a3c029 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 @@ -311,4 +311,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ 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 8ad22fa07f..f272c6f692 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 @@ -256,4 +256,20 @@ ID = #{project.topicId} + + \ No newline at end of file From 9feedc7b912c173600792a4f819c19a655f69b19 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Tue, 9 Mar 2021 17:54:24 +0800 Subject: [PATCH 099/375] =?UTF-8?q?=E7=89=B9=E6=AE=8A=E5=AE=A2=E6=88=B7-?= =?UTF-8?q?=E5=B1=85=E6=B0=91=E5=92=8C=E7=83=AD=E5=BF=83=E5=B1=85=E6=B0=91?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=90=8D=E7=A7=B0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/controller/ResiGroupController.java | 3 +- .../group/form/CommonGridAndPageFormDTO.java | 2 + .../group/controller/ResiGroupController.java | 13 +++++- .../service/impl/ResiGroupServiceImpl.java | 42 +++++++++++++++---- .../impl/GroupInvitationServiceImpl.java | 12 +++++- .../impl/ResiGroupMemberServiceImpl.java | 6 ++- .../impl/ResiWarmheartedApplyServiceImpl.java | 9 +++- 7 files changed, 71 insertions(+), 16 deletions(-) diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/ResiGroupController.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/ResiGroupController.java index 193e5bac1e..4ee3b04ee8 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/ResiGroupController.java +++ b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/controller/ResiGroupController.java @@ -140,8 +140,9 @@ public class ResiGroupController { */ @PostMapping("edit-auditing-list") @RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_GROUP_EDIT_AUDITINGLIST) - public Result> getEditAuditingList(@RequestBody CommonGridAndPageFormDTO param){ + public Result> getEditAuditingList(@LoginUser TokenDto tokenDto, @RequestBody CommonGridAndPageFormDTO param){ ValidatorUtils.validateEntity(param, CommonGridAndPageFormDTO.GridPageGroup.class); + param.setCustomerId(tokenDto.getCustomerId()); return groupOpenFeignClient.govEditAuditingList(param); } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/CommonGridAndPageFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/CommonGridAndPageFormDTO.java index 169073eb68..1e4b79644c 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/CommonGridAndPageFormDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/CommonGridAndPageFormDTO.java @@ -37,4 +37,6 @@ public class CommonGridAndPageFormDTO implements Serializable { @Min(1) private Integer pageSize; + private String customerId; + } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupController.java index d8e11dc942..569a9137b3 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupController.java @@ -19,6 +19,7 @@ package com.epmet.modules.group.controller; import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; @@ -405,7 +406,17 @@ public class ResiGroupController { */ @PostMapping("gov-edit-auditing-list") public Result> govEditAuditingList(@RequestBody CommonGridAndPageFormDTO param){ - return new Result>().ok(resiGroupService.getEditAuditingList(param)); + List list = resiGroupService.getEditAuditingList(param); + if (StrConstant.SPECIAL_CUSTOMER.equals(param.getCustomerId())) { + list.forEach(item -> { + if (item.getMessageText().contains("热心居民")) { + item.setMessageText(item.getMessageText().replace("热心居民", "组长")); + } else if (item.getMessageText().contains("居民")) { + item.setMessageText(item.getMessageText().replace("居民", "学员")); + } + }); + } + return new Result>().ok(list); } /** diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java index 0f64fe67d7..a4d13430a4 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java @@ -21,10 +21,7 @@ import com.alibaba.fastjson.JSON; 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.AppClientConstant; -import com.epmet.commons.tools.constant.EpmetRoleKeyConstant; -import com.epmet.commons.tools.constant.FieldConstant; -import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.*; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; @@ -384,7 +381,11 @@ public class ResiGroupServiceImpl extends BaseServiceImpl result = epmetUserFeignClient.getUserResiInfoDTO(resiUserInfoFormDTO); if (!result.success() || null == result.getData() || StringUtils.isBlank(result.getData().getRegMobile())) { logger.info(String.format("加入小组界面初始化查询成功,当前用户非注册居民,epmet-user-server接口入参%s,返回%s",JSON.toJSONString(resiUserInfoFormDTO),JSON.toJSONString(result))); - throw new RenException(EpmetErrorCode.CANNOT_JOIN_GROUP.getCode()); + if (StrConstant.SPECIAL_CUSTOMER.equals(initApplyGroupFormDTO.getCustomerId())) { + throw new RenException(8001, "只有注册学员才可以加入小组"); + } else { + throw new RenException(EpmetErrorCode.CANNOT_JOIN_GROUP.getCode()); + } + } } @@ -526,7 +532,11 @@ public class ResiGroupServiceImpl extends BaseServiceImpl>().ok(baseDao.getApplyingGroupsByCustIdAndGridId(params)); + List list = baseDao.getApplyingGroupsByCustIdAndGridId(params); + if (StrConstant.SPECIAL_CUSTOMER.equals(params.getCustomerId())) { + list.forEach(item -> { + if (item.getMessageText().contains("热心居民")) { + item.setMessageText(item.getMessageText().replace("热心居民", "组长")); + } else if (item.getMessageText().contains("居民")) { + item.setMessageText(item.getMessageText().replace("居民", "学员")); + } + }); + } + return new Result>().ok(list); } /** @@ -1234,7 +1254,11 @@ public class ResiGroupServiceImpl extends BaseServiceImpl result1 = epmetUserFeignClient.getUserResiInfoDTO(userResiInfoFormDTO); if (!result1.success() || null == result1.getData()) { - result.setCode(EpmetErrorCode.CANNOT_AUDIT_WARM.getCode()); - result.setMsg(EpmetErrorCode.CANNOT_AUDIT_WARM.getMsg()); + if (StrConstant.SPECIAL_CUSTOMER.equals(formDTO.getCustomerId())) { + result.setCode(8201); + result.setMsg("请完善学员信息"); + } else { + result.setCode(EpmetErrorCode.CANNOT_AUDIT_WARM.getCode()); + result.setMsg(EpmetErrorCode.CANNOT_AUDIT_WARM.getMsg()); + } return result; } //1:热心居民申请行为记录表新增数据 From e2632a25cc6589ab337d619f4d2199e8d65e7dbf Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 9 Mar 2021 19:24:16 +0800 Subject: [PATCH 100/375] =?UTF-8?q?=E5=B9=B3=E9=98=B4=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=8A=BD=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/IndexCalculateDistrictServiceImpl.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java index 0071929851..b21a19ceac 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java @@ -626,11 +626,11 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict subPartyAvgList.forEach(party -> { List index1SampleValues = new ArrayList<>(); party.forEach(c -> { - if (!c.getParentId().equals(NumConstant.ZERO_STR)) { + pid.put(c.getParentId(), customerAgencyDao.selectPid(c.getParentId())); SampleValue s = new SampleValue(c.getParentId(), c.getScore()); index1SampleValues.add(s); - } + }); BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc); @@ -714,11 +714,11 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict governAvg.forEach(avg -> { List index1SampleValues = new ArrayList<>(); avg.forEach(c -> { - if (!c.getParentId().equals(NumConstant.ZERO_STR)) { +// if (!c.getParentId().equals(NumConstant.ZERO_STR)) { pid.put(c.getParentId(), customerAgencyDao.selectPid(c.getParentId())); SampleValue s = new SampleValue(c.getParentId(), c.getScore()); index1SampleValues.add(s); - } +// } }); BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc); @@ -786,7 +786,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict if (IndexCodeEnum.QU_XIA_SHU_JIE_DFWNLHZPJZ.getCode().equals(indexCode)) { // List subStreetAvgList = agencyScoreDao.selectAgencyScoreAvgExistsSub(monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL,form.getCustomerAreaCode(),NumConstant.SIX); List subStreetAvgList = agencyScoreDao.selectAgencyScoreAvgByOrgIds(monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),orgInfos.stream().map(m -> m.getOrgId()).collect(Collectors.toList())); - log.info("subStreetAvgList"+subStreetAvgList.toString()); + log.info("subStreetAvgList:::"+subStreetAvgList.toString()); for (int i = 0; i < subStreetAvgList.size(); i++) { if (subStreetAvgList.get(i).getAgencyId().equals(NumConstant.ZERO_STR)){ subStreetAvgList.remove(subStreetAvgList.get(i)); @@ -801,11 +801,11 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); List index1SampleValues = new ArrayList<>(); serviceAvg.forEach(c -> { - if (!c.getParentId().equals(NumConstant.ZERO_STR)) { +// if (!c.getParentId().equals(NumConstant.ZERO_STR)) { pid.put(c.getParentId(), customerAgencyDao.selectPid(c.getParentId())); SampleValue s = new SampleValue(c.getParentId(), c.getScore()); index1SampleValues.add(s); - } +// } }); IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc1); indexInputVOS.add(index1VO); @@ -837,7 +837,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict String monthId = form.getMonthId(); List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode()); List agencyScoreList = agencyScoreDao.selectAgencyScoreInfoExistsSubSelf(form.getCustomerAreaCode(),monthId, IndexCalConstant.DISTRICT_LEVEL); - log.info("agencyScoreList"+agencyScoreList.toString()); + log.info("agencyScoreList:::"+agencyScoreList.toString()); detailListByParentCode.forEach(detail -> { agencyScoreList.forEach(community -> { if (detail.getIndexCode().equals(community.getIndexCode())) { @@ -865,6 +865,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict }); result.add(score); }); + log.info("result:::"+result.toString()); if (!CollectionUtils.isEmpty(result)){ agencyScoreDao.insertStreetRecord(result); } From 64ef6b3a53325d28852afcaa8e5d6443160da796 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 9 Mar 2021 19:43:36 +0800 Subject: [PATCH 101/375] =?UTF-8?q?=E5=B9=B3=E9=98=B4=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IndexCalculateDistrictServiceImpl.java | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java index b21a19ceac..66beab2f9e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java @@ -626,11 +626,15 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict subPartyAvgList.forEach(party -> { List index1SampleValues = new ArrayList<>(); party.forEach(c -> { - + if (!c.getParentId().equals(NumConstant.ZERO_STR)) { pid.put(c.getParentId(), customerAgencyDao.selectPid(c.getParentId())); SampleValue s = new SampleValue(c.getParentId(), c.getScore()); index1SampleValues.add(s); - + }else { + pid.put(c.getAgencyId(), customerAgencyDao.selectPid(c.getAgencyId())); + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + } }); BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc); @@ -714,11 +718,15 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict governAvg.forEach(avg -> { List index1SampleValues = new ArrayList<>(); avg.forEach(c -> { -// if (!c.getParentId().equals(NumConstant.ZERO_STR)) { + if (!c.getParentId().equals(NumConstant.ZERO_STR)) { pid.put(c.getParentId(), customerAgencyDao.selectPid(c.getParentId())); SampleValue s = new SampleValue(c.getParentId(), c.getScore()); index1SampleValues.add(s); -// } + }else { + pid.put(c.getAgencyId(), customerAgencyDao.selectPid(c.getAgencyId())); + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + } }); BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc); @@ -801,11 +809,15 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); List index1SampleValues = new ArrayList<>(); serviceAvg.forEach(c -> { -// if (!c.getParentId().equals(NumConstant.ZERO_STR)) { + if (!c.getParentId().equals(NumConstant.ZERO_STR)) { pid.put(c.getParentId(), customerAgencyDao.selectPid(c.getParentId())); SampleValue s = new SampleValue(c.getParentId(), c.getScore()); index1SampleValues.add(s); -// } + }else { + pid.put(c.getAgencyId(), customerAgencyDao.selectPid(c.getAgencyId())); + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + } }); IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc1); indexInputVOS.add(index1VO); From b2b0bc794e134cf0eed81f923d51d792d0248485 Mon Sep 17 00:00:00 2001 From: wangchao Date: Tue, 9 Mar 2021 19:45:09 +0800 Subject: [PATCH 102/375] screenProjectData --- .../dto/screen/ScreenProjectProcessDTO.java | 2 +- .../screen/ScreenProjectDataDao.java | 4 + .../screen/ScreenProjectImgDataDao.java | 7 ++ .../ScreenProjectProcessAttachmentDao.java | 8 ++ .../screen/ScreenProjectProcessDao.java | 5 + .../epmet/dao/project/ProjectProcessDao.java | 1 + .../impl/ScreenExtractServiceImpl.java | 8 ++ .../impl/ScreenProjectSettleServiceImpl.java | 22 ++-- .../screen/ScreenProjectDataService.java | 17 +-- .../screen/ScreenProjectImgDataService.java | 2 + ...ScreenProjectProcessAttachmentService.java | 2 + .../screen/ScreenProjectProcessService.java | 2 + .../impl/ScreenProjectDataServiceImpl.java | 49 ++++++--- .../impl/ScreenProjectImgDataServiceImpl.java | 10 ++ ...enProjectProcessAttachmentServiceImpl.java | 10 ++ .../impl/ScreenProjectProcessServiceImpl.java | 14 +++ .../project/ProjectProcessService.java | 9 ++ .../impl/ProjectProcessServiceImpl.java | 22 ++++ .../screen/ScreenProjectDataDao.xml | 102 ++++++++++++++++++ .../screen/ScreenProjectImgDataDao.xml | 40 +++++++ .../ScreenProjectProcessAttachmentDao.xml | 58 ++++++++++ .../screen/ScreenProjectProcessDao.xml | 54 +++++++++- .../mapper/project/ProjectProcessDao.xml | 19 +++- 23 files changed, 432 insertions(+), 35 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectProcessDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectProcessDTO.java index 20daa5ec73..e2479d607a 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectProcessDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectProcessDTO.java @@ -143,7 +143,7 @@ public class ScreenProjectProcessDTO implements Serializable { /** * 数据截止日期 */ - private String DataEndTime; + private String dataEndTime; private List points; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectDataDao.java index 83612bf486..48a06725cc 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectDataDao.java @@ -40,4 +40,8 @@ public interface ScreenProjectDataDao extends BaseDao { int checkIfExisted(@Param("customerId") String customerId); List selectPending(ScreenProjectDataDTO param); + + void insertBatch(@Param("list") List list); + + void updateBatch(@Param("list") List list,@Param("dateId") String dateId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectImgDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectImgDataDao.java index 2c4039af04..4904f32724 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectImgDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectImgDataDao.java @@ -18,8 +18,12 @@ package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screen.ScreenProjectImgDataDTO; import com.epmet.entity.evaluationindex.screen.ScreenProjectImgDataEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 中央区-项目数据图片 @@ -30,4 +34,7 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenProjectImgDataDao extends BaseDao { + void deleteByProjectIds(@Param("list") List list); + + void insertBatch(@Param("list") List list); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectProcessAttachmentDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectProcessAttachmentDao.java index d4650815f5..4a84a02c90 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectProcessAttachmentDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectProcessAttachmentDao.java @@ -18,8 +18,12 @@ package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screen.ScreenProjectProcessAttachmentDTO; import com.epmet.entity.evaluationindex.screen.ScreenProjectProcessAttachmentEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 中央区-项目数据处理节点附件表 @@ -30,4 +34,8 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenProjectProcessAttachmentDao extends BaseDao { + void deleteByProcessId(@Param("list") List list); + + void insertBatch(@Param("list")List list); + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectProcessDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectProcessDao.java index 15c9c8e372..fb8a8b0bd1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectProcessDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectProcessDao.java @@ -18,10 +18,13 @@ package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screen.ScreenProjectProcessDTO; import com.epmet.entity.evaluationindex.screen.ScreenProjectProcessEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.util.List; + /** * 中央区-项目数据项目处理进展表 * @@ -34,4 +37,6 @@ public interface ScreenProjectProcessDao extends BaseDao list); } 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 65230a0fef..f9647a4fe0 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 @@ -166,6 +166,7 @@ public interface ProjectProcessDao extends BaseDao { */ List selectClosedProjectOnAppointedDay(@Param("customerId") String customerId, @Param("dateId") String dateId); + List selectClosedProjectByProjectIds(@Param("list")List list); /** * @Description 统计新增项目节点以及被流转到的指向部门 * @param customerId diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java index 8eda9e93c6..a3ef916716 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java @@ -66,6 +66,8 @@ public class ScreenExtractServiceImpl implements ScreenExtractService { private ScreenProjectGridDailyService screenProjectGridDailyService; @Autowired private ScreenProjectOrgDailyService screenProjectOrgDailyService; + @Autowired + private ScreenProjectSettleServiceImpl screenProjectSettleService; /** * @param extractOriginFormDTO @@ -195,6 +197,12 @@ public class ScreenExtractServiceImpl implements ScreenExtractService { }catch (Exception e){ log.error("项目(事件)分析按组织_按天统计失败,customerId为:"+customerId+"dateId为:"+dateId, e); } + try{ + //大屏项目数据抽取_按天抽取 + screenProjectSettleService.extractScreenData(param); + }catch (Exception e){ + log.error("大屏项目数据抽取_按天抽取_按天统计失败,customerId为:"+customerId+"dateId为:"+dateId, e); + } log.info("===== extractDaily method end ======"); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java index 42faad98fd..c416b69b0b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java @@ -129,24 +129,32 @@ public class ScreenProjectSettleServiceImpl implements ScreenProjectSettleServic //重新计算orientData的级别 有现成的方法 fact_origin_project_org_period_daily originMainService.computerIfExceed(orientData, exceedLimit,about2ExceedLimit); + processService.updateProjectCloseTime(metaData); //更新结案时间和结案状态 processService.updateProjectStatus(orientData,param.getDateId(),param.getCustomerId()); - - //TODO collect - metaData - //TODO update - orientData + //FIXME release here + targetDbService.insertOrUpdateBatch(param.getCustomerId(),param.getDateId(),metaData,orientData); if(!CollectionUtils.isEmpty(metaData)){ List imgs = topicService.buildNewScreenProjectImgData(metaData); - //TODO collect img - //TODO 先按照项目Id全删除,再insert + if(CollectionUtils.isEmpty(imgs)){ + //FIXME release here + targetImgService.insertBatch(imgs); + } } // List processes = processService.buildNewScreenProjectProcessData(param.getCustomerId(), param.getDateId(),!targetProcessService.checkIfHistoricalDataExists(param.getCustomerId())); - //TODO collect process 按照processId删除,再insert - if(!CollectionUtils.isEmpty(processes)){ + //FIXME release here + targetProcessService.insertBatch(processes,param.getCustomerId(),param.getDateId()); List attachments = processService.buildProcessAttachmentData(processes.stream().map(ScreenProjectProcessDTO::getProcessId).distinct().collect(Collectors.toList())); + if(!CollectionUtils.isEmpty(attachments)){ + //FIXME release here + targetAttachmentService.insertBatch(attachments); + } } + + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectDataService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectDataService.java index e7429f5b52..7078f229d1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectDataService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectDataService.java @@ -97,14 +97,6 @@ public interface ScreenProjectDataService extends BaseService param); - /** - * @Description 内部数据入库 - * @param param - * @return void - * @author wangc - * @date 2021.03.09 11:10 - */ - void collect(ScreenCollFormDTO param); /** * @Description 查询是否存在客户的数据 @@ -123,4 +115,13 @@ public interface ScreenProjectDataService extends BaseService getPending(ScreenProjectDataDTO param); + + /** + * @Description collect或更新 + * @param + * @return void + * @author wangc + * @date 2021.03.09 17:36 + */ + void insertOrUpdateBatch(String customerId,String dateId,List meta,List orient); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectImgDataService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectImgDataService.java index eba2c666d8..fb170d618d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectImgDataService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectImgDataService.java @@ -93,4 +93,6 @@ public interface ScreenProjectImgDataService extends BaseService list); + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectProcessAttachmentService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectProcessAttachmentService.java index de086e33a2..44289bdfc7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectProcessAttachmentService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectProcessAttachmentService.java @@ -92,4 +92,6 @@ public interface ScreenProjectProcessAttachmentService extends BaseService list); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectProcessService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectProcessService.java index e43d603711..e9b1154699 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectProcessService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectProcessService.java @@ -98,4 +98,6 @@ public interface ScreenProjectProcessService extends BaseService param); boolean checkIfHistoricalDataExists(String customerId); + + void insertBatch(List list,String customerId,String dateId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java index 296250b420..f31ac40995 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java @@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; @@ -31,10 +32,12 @@ import com.epmet.dto.screen.form.ScreenProjectDataInfoFormDTO; import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.entity.evaluationindex.screen.*; import com.epmet.service.evaluationindex.screen.*; +import org.apache.commons.collections4.ListUtils; import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; import javax.annotation.Resource; import java.text.ParseException; @@ -219,23 +222,6 @@ public class ScreenProjectDataServiceImpl extends BaseServiceImpl param) { - //内部数据抽取的逻辑是,不管dateId指定的哪一天,只要在抽取时,目标数据库中没有相应数据 - //就抽取指定日期及其之前的所有数据,因此在删除时只需对指定日期删除即可,上述情况是因为 - //库中无数据,范围性删除无意义,只是针对在数据库有历史数据的情况下,保证对同一天进行反 - //复采集时数不会重复 - - - } - /** * @Description 查询是否存在客户的数据 @@ -261,4 +247,33 @@ public class ScreenProjectDataServiceImpl extends BaseServiceImpl meta, List orient) { + //内部数据抽取的逻辑是,不管dateId指定的哪一天,只要在抽取时,目标数据库中没有相应数据 + //就抽取指定日期及其之前的所有数据,因此在删除时只需对指定日期删除即可,上述情况是因为 + //库中无数据,范围性删除无意义,只是针对在数据库有历史数据的情况下,保证对同一天进行反 + //复采集时数不会重复 + if(!CollectionUtils.isEmpty(meta)){ + int affectedRows = baseDao.deleteByDateIdAndCustomerId(customerId,dateId); + while (affectedRows > 0) { + affectedRows = baseDao.deleteByDateIdAndCustomerId(customerId, dateId); + } + List> partition = ListUtils.partition(meta, NumConstant.ONE_HUNDRED); + partition.forEach(part -> baseDao.insertBatch(part)); + } + + + if(!CollectionUtils.isEmpty(orient)){ + List> partition = ListUtils.partition(orient, NumConstant.ONE_HUNDRED); + partition.forEach(part -> baseDao.updateBatch(part,dateId)); + } + } + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectImgDataServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectImgDataServiceImpl.java index 3b149b2d37..7e12e3924b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectImgDataServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectImgDataServiceImpl.java @@ -20,6 +20,7 @@ package com.epmet.service.evaluationindex.screen.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.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; @@ -27,6 +28,7 @@ import com.epmet.dao.evaluationindex.screen.ScreenProjectImgDataDao; import com.epmet.dto.screen.ScreenProjectImgDataDTO; import com.epmet.entity.evaluationindex.screen.ScreenProjectImgDataEntity; import com.epmet.service.evaluationindex.screen.ScreenProjectImgDataService; +import org.apache.commons.collections4.ListUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -34,6 +36,7 @@ import org.springframework.transaction.annotation.Transactional; import java.util.Arrays; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; /** * 中央区-项目数据图片 @@ -96,4 +99,11 @@ public class ScreenProjectImgDataServiceImpl extends BaseServiceImpl list) { + baseDao.deleteByProjectIds(list.stream().map(ScreenProjectImgDataDTO::getProjectId).distinct().collect(Collectors.toList())); + List> partition = ListUtils.partition(list, NumConstant.ONE_HUNDRED); + partition.forEach(part -> baseDao.insertBatch(list)); + } + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectProcessAttachmentServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectProcessAttachmentServiceImpl.java index 7219b2ae21..7a3e382e70 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectProcessAttachmentServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectProcessAttachmentServiceImpl.java @@ -20,6 +20,7 @@ package com.epmet.service.evaluationindex.screen.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.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; @@ -27,6 +28,7 @@ import com.epmet.dao.evaluationindex.screen.ScreenProjectProcessAttachmentDao; import com.epmet.dto.screen.ScreenProjectProcessAttachmentDTO; import com.epmet.entity.evaluationindex.screen.ScreenProjectProcessAttachmentEntity; import com.epmet.service.evaluationindex.screen.ScreenProjectProcessAttachmentService; +import org.apache.commons.collections4.ListUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -34,6 +36,7 @@ import org.springframework.transaction.annotation.Transactional; import java.util.Arrays; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; /** * 中央区-项目数据处理节点附件表 @@ -95,4 +98,11 @@ public class ScreenProjectProcessAttachmentServiceImpl extends BaseServiceImpl list) { + baseDao.deleteByProcessId(list.stream().map(ScreenProjectProcessAttachmentDTO::getProcessId).distinct().collect(Collectors.toList())); + List> partition = ListUtils.partition(list,NumConstant.ONE_HUNDRED); + partition.forEach(part -> baseDao.insertBatch(part)); + } + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectProcessServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectProcessServiceImpl.java index f7d6a80805..26e08a99bf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectProcessServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectProcessServiceImpl.java @@ -35,6 +35,7 @@ import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.entity.evaluationindex.screen.ScreenProjectProcessAttachmentEntity; import com.epmet.entity.evaluationindex.screen.ScreenProjectProcessEntity; import com.epmet.service.evaluationindex.screen.ScreenProjectProcessService; +import org.apache.commons.collections4.ListUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -159,4 +160,17 @@ public class ScreenProjectProcessServiceImpl extends BaseServiceImpl NumConstant.ZERO; } + @Override + public void insertBatch(List list,String customerId,String dateId) { + int affectedRows = baseDao.deleteByDateIdAndCustomerId(customerId, dateId); + while (affectedRows > 0) { + affectedRows = baseDao.deleteByDateIdAndCustomerId(customerId, dateId); + } + + List> partition = ListUtils.partition(list,NumConstant.ONE_HUNDRED); + partition.forEach(part -> { + baseDao.insertBatch(part); + }); + } + } 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 0604fa56c3..84386e9ec3 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 @@ -138,6 +138,15 @@ public interface ProjectProcessService extends BaseService */ void updateProjectStatus(List list, String dateId,String customerId); + /** + * @Description 查询指定日期关闭的项目 然后将状态由【pending】改为【closed_case】,并加上结案时间 + * @param list + * @return void + * @author wangc + * @date 2021.03.09 09:54 + */ + void updateProjectCloseTime(List list); + /** * @Description 构建大屏项目进展数据 * 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 ecb329a522..bb53ec2891 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 @@ -156,6 +156,28 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl list) { + if(CollectionUtils.isEmpty(list)) return; + List closedInfo = baseDao.selectClosedProjectByProjectIds(list.stream().map(ScreenProjectDataDTO::getProjectId).distinct().collect(Collectors.toList())); + if(CollectionUtils.isEmpty(closedInfo)) return; + + list.stream().flatMap(target -> closedInfo.stream().filter(closedCase -> StringUtils.equals(closedCase.getProjectId(),target.getProjectId())).map( + merge -> { + //target.setProjectStatusCode("closed_case"); + target.setCloseCaseTime(DateUtils.format(merge.getCreatedTime(),DateUtils.DATE_TIME_PATTERN)); + return null; + } + )); + } + /** * @Description 构建大屏项目进展数据 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml index 8295404e77..58dc3978e7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml @@ -56,4 +56,106 @@ and project_level = #{projectLevel} + + + INSERT INTO screen_project_data + ( + id, + customer_id, + org_type, + org_id, + parent_id, + org_name, + project_id, + project_title, + project_create_time, + link_name, + link_mobile, + project_content, + project_level, + project_address, + all_category_name, + longitude, + latitude, + close_case_time, + data_end_time, + all_parent_ids, + project_status_code, + revision, + created_by, + created_time, + updated_by, + updated_time + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{item.customerId}, + #{item.orgType}, + #{item.orgId}, + #{item.parentId}, + #{item.orgName}, + #{item.projectId}, + #{item.projectTitle}, + #{item.projectCreateTime}, + #{item.linkName}, + #{item.linkMobile}, + #{item.projectContent}, + #{item.projectLevel}, + #{item.projectAddress}, + #{item.allCategoryName}, + #{item.longitude}, + #{item.latitude}, + #{item.closeCaseTime}, + #{item.dataEndTime}, + #{item.allParentIds}, + #{item.projectStatusCode}, + 0, + 'CRAWLER_ROBOT', + now(), + 'CRAWLER_ROBOT', + now() + ) + + + + + update screen_project_data + + + + + when PROJECT_ID=#{i.projectId} then #{i.projectStatusCode} + + + + + + + when PROJECT_ID=#{i.projectId} then #{i.closeCaseTime} + + + + + + + when PROJECT_ID=#{i.projectId} then #{i.allCategoryName} + + + + + + + when PROJECT_ID=#{i.projectId} then #{i.projectLevel} + + + + + DATA_END_TIME = #{dataEndTime}, + updated_time = now() + where + + PROJECT_ID=#{i.projectId} + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectImgDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectImgDataDao.xml index 3604a5df25..a9caf4992e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectImgDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectImgDataDao.xml @@ -18,4 +18,44 @@ + + delete from screen_project_img_data + + + PROJECT_ID = #{projectId} + + + + + + + INSERT INTO screen_project_img_data + ( + id, + customer_id, + project_id, + project_img_url, + sort, + revision, + created_by, + created_time, + updated_by, + updated_time + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{item.customerId}, + #{item.projectId}, + #{item.projectImgUrl}, + #{item.sort}, + 0, + 'CRAWLER_ROBOT', + now(), + 'CRAWLER_ROBOT', + now() + ) + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectProcessAttachmentDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectProcessAttachmentDao.xml index 8560281d3b..953f2bee72 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectProcessAttachmentDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectProcessAttachmentDao.xml @@ -26,5 +26,63 @@ + + delete from screen_project_process_attachment + + + PROCESS_ID = #{processId} + + + + + + INSERT INTO screen_project_process_attachment + ( + id, + attachment_id, + customer_id, + project_id, + process_id, + file_place, + file_name, + attachment_name, + attachment_size, + attachment_format, + attachment_type, + attachment_url, + sort, + duration, + del_flag, + revision, + created_by, + created_time, + updated_by, + updated_time + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{item.attachmentId}, + #{item.customerId}, + #{item.projectId}, + #{item.processId}, + #{item.filePlace}, + #{item.fileName}, + #{item.attachmentName}, + #{item.attachmentSize}, + #{item.attachmentFormat}, + #{item.attachmentType}, + #{item.attachmentUrl}, + #{item.sort}, + #{item.duration}, + '0', + 0, + 'CRAWLER_ROBOT', + now(), + 'CRAWLER_ROBOT', + now() + ) + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectProcessDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectProcessDao.xml index d9e112ddca..1a37f2bb88 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectProcessDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectProcessDao.xml @@ -6,7 +6,7 @@ delete from screen_project_process where customer_id = #{customerId} - and DATA_END_TIME = #{dateId} + and DATA_END_TIME = #{ } limit 1000 @@ -15,4 +15,56 @@ select count(id) from `screen_project_process` where del_flag = '0' and customer_id = #{customerId} + + + INSERT INTO screen_project_process + ( + id, + customer_id, + process_id, + project_id, + transfer_dept_ids, + transfer_dept_name, + handler_name, + handler_id, + handler_type, + org_id_path, + operation, + public_reply, + internal_remark, + process_time, + data_end_time, + del_flag, + revision, + created_by, + created_time, + updated_by, + updated_time + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{item.customerId}, + #{item.processId}, + #{item.projectId}, + #{item.transferDeptName}, + #{item.transferDeptIds}, + #{item.handlerName}, + #{item.handlerId}, + #{item.handlerType}, + #{item.orgIdPath}, + #{item.operation}, + #{item.publicReply}, + #{item.internalRemark}, + #{item.processTime}, + #{item.dataEndTime}, + '0', + 0, + 'CRAWLER_ROBOT', + now(), + 'CRAWLER_ROBOT', + now() + ) + + 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 2ee1a3c029..ff952f62eb 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 @@ -326,6 +326,23 @@ AND DATE_FORMAT( CREATED_TIME, '%Y%m%d' ) = #{dateId} + + + @@ -362,7 +379,7 @@ process.PUBLIC_REPLY, process.INTERNAL_REMARK, process.CREATED_TIME as processTime, - #{dataEndTime} as dataEndTime + #{dataEndTime} as dataEndTime, staff.DEPARTMENT_NAME, CASE WHEN staff.DEPARTMENT_ID IS NOT NULL trim(staff.DEPARTMENT_ID) ]]> '' THEN staff.DEPARTMENT_ID WHEN staff.GRID_ID IS NOT NULL trim(staff.GRID_ID) ]]> '' THEN staff.GRID_ID From 2570557e122a3d8692de7a803742addb8aae0598 Mon Sep 17 00:00:00 2001 From: wangchao Date: Tue, 9 Mar 2021 20:02:47 +0800 Subject: [PATCH 103/375] screenProjectData --- .../extract/toscreen/impl/ScreenExtractServiceImpl.java | 2 +- .../extract/toscreen/impl/ScreenProjectSettleServiceImpl.java | 4 ++++ .../mapper/evaluationindex/screen/ScreenProjectProcessDao.xml | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java index a3ef916716..37eae6ac60 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java @@ -67,7 +67,7 @@ public class ScreenExtractServiceImpl implements ScreenExtractService { @Autowired private ScreenProjectOrgDailyService screenProjectOrgDailyService; @Autowired - private ScreenProjectSettleServiceImpl screenProjectSettleService; + private ScreenProjectSettleService screenProjectSettleService; /** * @param extractOriginFormDTO diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java index c416b69b0b..d73cbe09a4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java @@ -19,8 +19,10 @@ import com.epmet.service.project.ProjectProcessService; import com.epmet.service.project.ProjectService; import com.epmet.service.topic.TopicService; import com.epmet.service.user.UserService; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; @@ -33,6 +35,8 @@ import java.util.stream.Collectors; * @Auth wangc * @Date 2021-03-04 23:10 */ +@Service +@Slf4j public class ScreenProjectSettleServiceImpl implements ScreenProjectSettleService { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectProcessDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectProcessDao.xml index 1a37f2bb88..b1072ad590 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectProcessDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectProcessDao.xml @@ -6,7 +6,7 @@ delete from screen_project_process where customer_id = #{customerId} - and DATA_END_TIME = #{ } + and DATA_END_TIME = #{dateId} limit 1000 From 9c1f78cb828c14632e802b8f0d333196c6972544 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 9 Mar 2021 20:08:08 +0800 Subject: [PATCH 104/375] =?UTF-8?q?=E5=B9=B3=E9=98=B4=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/ScreenCustomerAgencyDao.java | 1 + .../impl/IndexCalculateDistrictServiceImpl.java | 12 ++++++++++++ .../screen/ScreenCustomerAgencyDao.xml | 8 ++++++++ 3 files changed, 21 insertions(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java index 44eeb11fa6..2953077792 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java @@ -95,6 +95,7 @@ public interface ScreenCustomerAgencyDao extends BaseDao { if (IndexCodeEnum.QU_XIA_JI_JIE_DDJNLHZPJZ.getCode().equals(detail.getIndexCode())) { List subGridPartyAvgScore = agencyScoreDao.selectAgencyScoreAvgByOrgIds(monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),orgInfos.stream().map(o -> o.getOrgId()).collect(Collectors.toList())); + // 暂时的 + subGridPartyAvgScore.forEach(s -> { + s.setParentId(customerAgencyDao.selectParentId(s.getAgencyId())); + }); log.info("subGridPartyAvgScore:::"+subGridPartyAvgScore.toString()); if (CollectionUtils.isEmpty(subGridPartyAvgScore)) { log.warn(IndexCalConstant.DISTRICT_PARTY_AVG_NULL); @@ -703,6 +707,10 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict if (IndexCodeEnum.SUO_YOU_JIE_DAO_ZLNLPJZ.getCode().equals(detail.getIndexCode())) { // List districtGovernAvgList = agencyScoreDao.selectAgencyScoreAvgExistsSub(monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL,form.getCustomerAreaCode(),NumConstant.SIX); List districtGovernAvgList = agencyScoreDao.selectAgencyScoreAvgByOrgIds(monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),orgInfos.stream().map(m -> m.getOrgId()).collect(Collectors.toList())); + // 暂时的 + districtGovernAvgList.forEach(s -> { + s.setParentId(customerAgencyDao.selectParentId(s.getAgencyId())); + }); log.info("districtGovernAvgList:::"+districtGovernAvgList.toString()); log.info(districtGovernAvgList.toString()); for (int i = 0; i < districtGovernAvgList.size(); i++) { @@ -794,6 +802,10 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict if (IndexCodeEnum.QU_XIA_SHU_JIE_DFWNLHZPJZ.getCode().equals(indexCode)) { // List subStreetAvgList = agencyScoreDao.selectAgencyScoreAvgExistsSub(monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL,form.getCustomerAreaCode(),NumConstant.SIX); List subStreetAvgList = agencyScoreDao.selectAgencyScoreAvgByOrgIds(monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),orgInfos.stream().map(m -> m.getOrgId()).collect(Collectors.toList())); + // 暂时的 + subStreetAvgList.forEach(s -> { + s.setParentId(customerAgencyDao.selectParentId(s.getAgencyId())); + }); log.info("subStreetAvgList:::"+subStreetAvgList.toString()); for (int i = 0; i < subStreetAvgList.size(); i++) { if (subStreetAvgList.get(i).getAgencyId().equals(NumConstant.ZERO_STR)){ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml index 5552a9df4b..13d48fe24c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml @@ -404,4 +404,12 @@ WHERE DEL_FLAG = 0 and sca.PARENT_AREA_CODE = #{areaCode} + From e4e3166c1a61e2352f4e84869a255d7079b2d2e4 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 10 Mar 2021 09:42:03 +0800 Subject: [PATCH 105/375] =?UTF-8?q?=E5=B9=B3=E9=98=B4=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml index c082758802..f42c0de60c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml @@ -195,7 +195,6 @@ fics.agency_id = #{org} ) - GROUP BY AGENCY_ID + From 9d99e4a784b5e527c8ffed978e7ecd646f77b245 Mon Sep 17 00:00:00 2001 From: wangchao Date: Wed, 10 Mar 2021 11:16:16 +0800 Subject: [PATCH 109/375] screenProjectData --- .../com/epmet/controller/DemoController.java | 11 +++++++++-- ...FactOriginProjectMainDailyServiceImpl.java | 6 +++--- .../impl/ScreenProjectSettleServiceImpl.java | 11 ++++++----- .../impl/ScreenProjectDataServiceImpl.java | 4 ++++ .../impl/ScreenProjectImgDataServiceImpl.java | 3 +++ ...enProjectProcessAttachmentServiceImpl.java | 3 +++ .../impl/ScreenProjectProcessServiceImpl.java | 1 + .../impl/ProjectProcessServiceImpl.java | 19 +++++++++---------- .../service/topic/impl/TopicServiceImpl.java | 13 ++++++------- .../service/user/impl/UserServiceImpl.java | 4 ++-- .../screen/ScreenProjectDataDao.xml | 2 +- .../resources/mapper/issue/StatsIssueDao.xml | 2 +- .../mapper/project/ProjectProcessDao.xml | 2 +- 13 files changed, 49 insertions(+), 32 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java index 829a345264..4bb409b6eb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java @@ -806,15 +806,22 @@ public class DemoController { return new Result(); } - @Autowired + /*@Autowired private ScreenGrassrootsGovernDataAbsorptionService ndddYhjfService; @PostMapping("diff") public Result diff(@RequestBody ScreenCentralZoneDataFormDTO param){ ndddYhjfService.difficultyDataHub(param); return new Result(); - } + }*/ + @Autowired + private ScreenProjectSettleService screenProjectSettleService; + @PostMapping("project-test") + public Result project(@RequestBody ScreenCentralZoneDataFormDTO param){ + screenProjectSettleService.extractScreenData(param); + return new Result(); + } public static void main(String[] args) { List monthIds = DateUtils.getMonthBetween("202001","202012"); for(String monthId:monthIds){ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java index 905c67cc3c..c20f350797 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java @@ -406,7 +406,7 @@ public class FactOriginProjectMainDailyServiceImpl extends BaseServiceImpl> projectPeriodMap = costDays.getData().stream().collect(Collectors.groupingBy(CostDayResultDTO :: getId)); - list.stream().map(o -> { + list = list.stream().map(o -> { List days = projectPeriodMap.get(o.getProjectId()); if(!CollectionUtils.isEmpty(days)){ Integer max = days.stream().max(Comparator.comparing(CostDayResultDTO::getDetentionDays)).get().getDetentionDays(); @@ -416,8 +416,8 @@ public class FactOriginProjectMainDailyServiceImpl extends BaseServiceImpl= about2exceedLimit) o.setProjectLevel(NumConstant.TWO); } - return null; - }); + return o; + }).collect(Collectors.toList()); } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java index d73cbe09a4..7d97fd2674 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java @@ -69,7 +69,6 @@ public class ScreenProjectSettleServiceImpl implements ScreenProjectSettleServic * @date 2021.03.04 23:09 */ @Override - @Transactional public void extractScreenData(ScreenCentralZoneDataFormDTO param) { int rows = targetDbService.checkIfExisted(param.getCustomerId()); List exceedParams = projectService.getProjectExceedParams(param.getCustomerId()); @@ -96,12 +95,12 @@ public class ScreenProjectSettleServiceImpl implements ScreenProjectSettleServic if(!CollectionUtils.isEmpty(metaData)) { List info = projectService.getProjectInfo(metaData.stream().map(ScreenProjectDataDTO::getProjectId).collect(Collectors.toList())); if(!CollectionUtils.isEmpty(info)){ - metaData.stream().flatMap(meta -> info.stream().filter(nature -> StringUtils.equals(meta.getProjectId(), + metaData = metaData.stream().flatMap(meta -> info.stream().filter(nature -> StringUtils.equals(meta.getProjectId(), nature.getId())).map(projectInfo -> { meta.setProjectCreateTime(projectInfo.getCreatedTime()); meta.setProjectTitle(projectInfo.getTitle()); - return null; - })); + return meta; + })).collect(Collectors.toList()); } topicService.fillScreenProjectData(metaData); //metaData = Optional.ofNullable(topicService.getScreenProjectData(metaData)).orElse(metaData); @@ -117,7 +116,8 @@ public class ScreenProjectSettleServiceImpl implements ScreenProjectSettleServic // 给metaData和orientData赋上分类信息 List projectIds = Optional.ofNullable(metaData.stream().map(ScreenProjectDataDTO::getProjectId).distinct().collect(Collectors.toList())).orElse(new ArrayList<>()); - projectIds.addAll(orientData.stream().map(ScreenProjectDataDTO::getProjectId).distinct().collect(Collectors.toList())); + if(!CollectionUtils.isEmpty(orientData)) + projectIds.addAll(orientData.stream().map(ScreenProjectDataDTO::getProjectId).distinct().collect(Collectors.toList())); Map> categoryMap = projectService.getProjectCategory(projectIds); if(!CollectionUtils.isEmpty(categoryMap)){ Map integratedProjectCategoryMap = issueService.getIntegratedProjectCategory(categoryMap, param.getCustomerId()); @@ -161,4 +161,5 @@ public class ScreenProjectSettleServiceImpl implements ScreenProjectSettleServic } + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java index f31ac40995..9152e8f0b6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java @@ -54,6 +54,7 @@ import java.util.Map; * @since v1.0.0 2021-02-23 */ @Service +@DataSource(value = DataSourceConstant.EVALUATION_INDEX) public class ScreenProjectDataServiceImpl extends BaseServiceImpl implements ScreenProjectDataService { @Resource @@ -231,6 +232,7 @@ public class ScreenProjectDataServiceImpl extends BaseServiceImpl getPending(ScreenProjectDataDTO param) { return baseDao.selectPending(param); } @@ -255,6 +258,7 @@ public class ScreenProjectDataServiceImpl extends BaseServiceImpl meta, List orient) { //内部数据抽取的逻辑是,不管dateId指定的哪一天,只要在抽取时,目标数据库中没有相应数据 //就抽取指定日期及其之前的所有数据,因此在删除时只需对指定日期删除即可,上述情况是因为 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectImgDataServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectImgDataServiceImpl.java index 7e12e3924b..cb1217f055 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectImgDataServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectImgDataServiceImpl.java @@ -19,11 +19,13 @@ package com.epmet.service.evaluationindex.screen.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.evaluationindex.screen.ScreenProjectImgDataDao; import com.epmet.dto.screen.ScreenProjectImgDataDTO; import com.epmet.entity.evaluationindex.screen.ScreenProjectImgDataEntity; @@ -45,6 +47,7 @@ import java.util.stream.Collectors; * @since v1.0.0 2021-02-23 */ @Service +@DataSource(value = DataSourceConstant.EVALUATION_INDEX) public class ScreenProjectImgDataServiceImpl extends BaseServiceImpl implements ScreenProjectImgDataService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectProcessAttachmentServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectProcessAttachmentServiceImpl.java index 7a3e382e70..e750394f9b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectProcessAttachmentServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectProcessAttachmentServiceImpl.java @@ -19,11 +19,13 @@ package com.epmet.service.evaluationindex.screen.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.evaluationindex.screen.ScreenProjectProcessAttachmentDao; import com.epmet.dto.screen.ScreenProjectProcessAttachmentDTO; import com.epmet.entity.evaluationindex.screen.ScreenProjectProcessAttachmentEntity; @@ -45,6 +47,7 @@ import java.util.stream.Collectors; * @since v1.0.0 2021-02-23 */ @Service +@DataSource(value = DataSourceConstant.EVALUATION_INDEX) public class ScreenProjectProcessAttachmentServiceImpl extends BaseServiceImpl implements ScreenProjectProcessAttachmentService { @Override public PageData page(Map params) { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectProcessServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectProcessServiceImpl.java index 26e08a99bf..71c461e0e6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectProcessServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectProcessServiceImpl.java @@ -53,6 +53,7 @@ import java.util.Map; * @since v1.0.0 2021-02-23 */ @Service +@DataSource(value = DataSourceConstant.EVALUATION_INDEX) public class ScreenProjectProcessServiceImpl extends BaseServiceImpl implements ScreenProjectProcessService { @Resource 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 bb53ec2891..0c5c4117e0 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 @@ -147,13 +147,13 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl closedInfo = baseDao.selectClosedProjectOnAppointedDay(customerId, dateId); if(CollectionUtils.isEmpty(closedInfo)) return; - list.stream().flatMap(target -> closedInfo.stream().filter(closedCase -> StringUtils.equals(closedCase.getProjectId(),target.getProjectId())).map( + list = list.stream().flatMap(target -> closedInfo.stream().filter(closedCase -> StringUtils.equals(closedCase.getProjectId(),target.getProjectId())).map( merge -> { target.setProjectStatusCode("closed_case"); target.setCloseCaseTime(DateUtils.format(merge.getCreatedTime(),DateUtils.DATE_TIME_PATTERN)); - return null; + return target; } - )); + )).collect(Collectors.toList()); } /** @@ -169,13 +169,13 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl closedInfo = baseDao.selectClosedProjectByProjectIds(list.stream().map(ScreenProjectDataDTO::getProjectId).distinct().collect(Collectors.toList())); if(CollectionUtils.isEmpty(closedInfo)) return; - list.stream().flatMap(target -> closedInfo.stream().filter(closedCase -> StringUtils.equals(closedCase.getProjectId(),target.getProjectId())).map( + list = list.stream().flatMap(target -> closedInfo.stream().filter(closedCase -> StringUtils.equals(closedCase.getProjectId(),target.getProjectId())).map( merge -> { //target.setProjectStatusCode("closed_case"); target.setCloseCaseTime(DateUtils.format(merge.getCreatedTime(),DateUtils.DATE_TIME_PATTERN)); - return null; + return target; } - )); + )).collect(Collectors.toList()); } /** @@ -191,7 +191,7 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl buildNewScreenProjectProcessData(String customerId, String dateId, boolean ifRanged) { List processes = baseDao.selectProjectProcessAndDirection(customerId, ifRanged ? null : dateId, dateId); if(CollectionUtils.isEmpty(processes)) return null; - processes.stream().filter(process -> StringUtils.equalsAny(process.getOperation(), + return processes.stream().filter(process -> StringUtils.equalsAny(process.getOperation(), "close","return","transfer")).map(target -> { List points = target.getPoints(); if(!CollectionUtils.isEmpty(points)){ @@ -204,10 +204,9 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl fillScreenProjectData(List list) { List collection = topicDao.selectScreenProjectData(list); if(!CollectionUtils.isEmpty(collection)){ - list.stream().flatMap(target -> collection.stream().filter( + list = list.stream().flatMap(target -> collection.stream().filter( res -> StringUtils.equals(target.getTopicId(),res.getTopicId()) ).map(merge -> { target.setLatitude(merge.getLatitude()); target.setLongitude(merge.getLongitude()); target.setProjectContent(merge.getProjectContent()); target.setProjectAddress(merge.getProjectAddress()); - return null; - })); + return target; + })).collect(Collectors.toList()); } return collection; } @@ -221,13 +221,12 @@ public class TopicServiceImpl implements TopicService { public List buildNewScreenProjectImgData(List list) { List imgs = topicDao.initNewScreenProjectImgData(list.get(NumConstant.ZERO).getCustomerId(), list); if(CollectionUtils.isEmpty(imgs)) return null; - imgs.stream().flatMap(img -> list.stream().filter(project -> StringUtils.equals(img.getTopicId(),project.getTopicId())).map( + return imgs.stream().flatMap(img -> list.stream().filter(project -> StringUtils.equals(img.getTopicId(),project.getTopicId())).map( match -> { img.setProjectId(match.getProjectId()); - return null; + return img; } - )); - return imgs; + )).collect(Collectors.toList()); } /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java index efa1893cba..db739b79ab 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java @@ -740,11 +740,11 @@ public class UserServiceImpl implements UserService { public List fillScreenProjectData(List list) { List collection = userDao.selectScreenProjectData(list); if(!CollectionUtils.isEmpty(collection)){ - list.stream().flatMap(target -> collection.stream().filter(res -> StringUtils.equals(target.getLinkName(),res.getTopicId())) + list = list.stream().flatMap(target -> collection.stream().filter(res -> StringUtils.equals(target.getLinkName(),res.getTopicId())) .map(merge -> { target.setLinkName(merge.getLinkName()); target.setLinkMobile(merge.getLinkMobile()); - return null;})); + return target;})).collect(Collectors.toList()); } return collection; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml index 58dc3978e7..1f439d7a3a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml @@ -50,7 +50,7 @@ select * from screen_project_data where del_flag = '0' - and customerId = #{customerId} + and customer_id = #{customerId} and project_status_code = 'pending' and project_level = #{projectLevel} 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 ad18c3d988..b4619ff0a2 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 @@ -314,7 +314,7 @@ outter.id = #{id} - AND NOT EXIST ( + AND NOT EXISTS ( SELECT * FROM issue_project_category_dict WHERE del_flag = '0' AND customer_id = #{customerId} and id = outter.id ) 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 ff952f62eb..698d7d2417 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 @@ -334,7 +334,7 @@ `project_process` WHERE del_flag = '0' - AND customer_id = #{customerId} + AND operation = 'close' From f9852f088b20bb1fa0ed44f3904ba9491eb415d6 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 10 Mar 2021 14:36:49 +0800 Subject: [PATCH 110/375] =?UTF-8?q?=E5=B9=B3=E9=98=B4=E6=95=B0=E6=8D=AE-?= =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E7=BA=A7=E5=88=AB=E5=8F=91=E6=96=87=E6=95=B0?= =?UTF-8?q?=E9=87=8Fsql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml index 457443543b..911b62e8c6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml @@ -182,6 +182,7 @@ WHERE fm.del_flag = '0' AND fm.month_id = #{monthId} + AND fm.DATA_TYPE = 'community' AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%') AND sca.AREA_CODE != #{areaCode} From 510dec45eac48fb225a46411d6f692b9d4319cd2 Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 10 Mar 2021 16:50:06 +0800 Subject: [PATCH 111/375] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=20jcet=20g=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-auth/pom.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/epmet-auth/pom.xml b/epmet-auth/pom.xml index eaa22e7557..5af5eae312 100644 --- a/epmet-auth/pom.xml +++ b/epmet-auth/pom.xml @@ -363,6 +363,10 @@ 2cy0a9lA 6hU3PQgxLcXr27SE + http://101.206.141.219:21006 + xSMONWwP + UUCnxLyXiB4eBF4p + https://epmet-cloud.elinkservice.cn From 9693fd1f7743e6d7d7afb516b4d58dbca5385770 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 10 Mar 2021 16:55:10 +0800 Subject: [PATCH 112/375] =?UTF-8?q?=E5=B9=B3=E9=98=B4=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml | 1 + .../indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml index 19cfc84047..d189ad2ee6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml @@ -193,6 +193,7 @@ WHERE gm.del_flag = '0' AND gm.month_id = #{monthId} + AND gm.DATA_TYPE = 'community' AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%') AND sca.AREA_CODE != #{areaCode} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml index 0e35707bce..e35e4de6f8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml @@ -144,6 +144,7 @@ LEFT JOIN screen_customer_agency sca ON sca.AGENCY_ID = sm.AGENCY_ID WHERE sm.del_flag = '0' + AND sm.DATA_TYPE = 'community' AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%') AND sca.AREA_CODE != #{areaCode} AND sm.month_id = #{monthId} From 7df97b77db21ff926c13ecff2c6fa45ed969149a Mon Sep 17 00:00:00 2001 From: wangchao Date: Wed, 10 Mar 2021 17:15:24 +0800 Subject: [PATCH 113/375] =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=B3=A8=E5=86=8C?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E6=9F=A5=E8=AF=A2=EF=BC=8C=E4=BF=9D=E8=AF=81?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E7=94=A8=E6=88=B7=E6=9C=80=E5=A4=9A=E5=8F=AA?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E4=B8=80=E6=9D=A1=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dao/RegisterRelationDao.java | 5 +- .../com/epmet/redis/UserBaseInfoRedis.java | 91 +++++++++++++++++++ .../service/impl/GridLatestServiceImpl.java | 2 +- .../service/impl/UserBadgeServiceImpl.java | 2 +- .../resources/mapper/RegisterRelationDao.xml | 28 ++++++ 5 files changed, 125 insertions(+), 3 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/RegisterRelationDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/RegisterRelationDao.java index 4570711923..a19881ce9a 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/RegisterRelationDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/RegisterRelationDao.java @@ -18,11 +18,11 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.dto.RegisterRelationDTO; import com.epmet.entity.RegisterRelationEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; + import java.util.List; /** @@ -44,4 +44,7 @@ public interface RegisterRelationDao extends BaseDao { * @date 2020.07.23 15:31 **/ RegisterRelationEntity selectRegisteredGridIdByUserId(@Param("userId") String userId); + + + RegisterRelationEntity selectRegisteredGridIdByUserIdAndCustomerId(@Param("userId") String userId, @Param("customerId")String customerId); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserBaseInfoRedis.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserBaseInfoRedis.java index ec6d1eb485..315341ae84 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserBaseInfoRedis.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserBaseInfoRedis.java @@ -190,6 +190,97 @@ public class UserBaseInfoRedis { return null; } + + /** + * @Description 缓存中获取用户基本信息 + * @param userId + * @return + * @author wangc + * @date 2020.07.23 14:58 + **/ + public UserBaseInfoResultDTO getUserInfo(String userId,String customerId){ + if(StringUtils.isNotBlank(userId)){ + //获取居民缓存key + Map map = redisUtils.hGetAll(UserRedisKeys.getResiUserKey(userId)); + if(null != map && !map.isEmpty()) { + //缓存中有数据,直接返回 + return BeanUtil.mapToBean(map, UserBaseInfoResultDTO.class, true); + } + //缓存中没有数据,先查数据库,放入缓存后再返回 + UserBaseInfoResultDTO baseInfo = userBaseInfoDao.selectListByUserIdList(userId); + + if(null != baseInfo && StringUtils.isNotBlank(baseInfo.getId())){ + + //如果没有首次注册网格,则没有网格名称(xx机关-xx网格)、显示昵称(xx网格-x先生/女士) + RegisterRelationEntity relation = registerRelationDao.selectRegisteredGridIdByUserIdAndCustomerId(userId,customerId); + if(null != relation && StringUtils.isNotBlank(relation.getGridId())){ + baseInfo.setCustomerId(relation.getCustomerId()); + BelongGridNameFormDTO gridParam = new BelongGridNameFormDTO(); + gridParam.setGridId(relation.getGridId()); + baseInfo.setRegisteredGridId(relation.getGridId()); + Result gridResult = + govOrgOpenFeignClient.getGridNameByGridId(gridParam); + if(gridResult.success() && null != gridResult.getData() + && StringUtils.isNotBlank(gridResult.getData().getBelongsGridName())){ + String gridFullName = gridResult.getData().getBelongsGridName(); + baseInfo.setRegisteredGridName(gridFullName); + StringBuffer buffer = new StringBuffer(gridFullName.split(ModuleConstant.DASH)[NumConstant.ONE]).append(ModuleConstant.DASH).append(baseInfo.getSurname()); + switch (baseInfo.getGender()) { + case NumConstant.ONE_STR: + buffer.append(ModuleConstant.RESI_USER_NICKNAME_SUFFIX_MALE); + break; + case NumConstant.TWO_STR: + buffer.append(ModuleConstant.RESI_USER_NICKNAME_SUFFIX_FEMALE); + break; + default: + buffer.append(ModuleConstant.RESI_USER_NICKNAME_SUFFIX_GENDER_UNKNOWN); + } + baseInfo.setShowName(buffer.toString()); + } + } + else{ + //如果没有居民注册记录,说明当前用户是陌生人,需要从陌生人网格访问列表中查询所属的客户Id + LatestGridInfoResultDTO gridLatest = + gridLatestDao.selectLatestGridInfoByUserId(userId); + if(null != gridLatest){ + baseInfo.setCustomerId(gridLatest.getCustomerId()); + } + } + set(baseInfo); + return baseInfo; + }else{ + //如果没有,说明这里是陌生人 + //陌生人不放入缓存,也不更新用户基础信息表 + baseInfo = new UserBaseInfoResultDTO(); + baseInfo.setUserId(userId); + List wechatInfo = userWechatDao.selectByUserId(userId); + if(null != wechatInfo && !wechatInfo.isEmpty()){ + baseInfo.setNickname(wechatInfo.get(NumConstant.ZERO).getNickname()); + if(StringUtils.isBlank(baseInfo.getNickname())){ + baseInfo.setNickname(ModuleConstant.EMPTY_STR); + } + }else{ + return null; + } + RegisterRelationEntity relation = registerRelationDao.selectRegisteredGridIdByUserId(userId); + if(null != relation && StringUtils.isNotBlank(relation.getGridId())){ + baseInfo.setCustomerId(relation.getCustomerId()); + }else{ + LatestGridInfoResultDTO gridLatest = + gridLatestDao.selectLatestGridInfoByUserId(userId); + if(null != gridLatest){ + baseInfo.setCustomerId(gridLatest.getCustomerId()); + } + } + } + + return baseInfo; + + } + + return null; + } + /** * @Description 更新缓存 * @param entity diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java index 46bd30dfff..c18e91c05d 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java @@ -210,7 +210,7 @@ public class GridLatestServiceImpl extends BaseServiceImpl { if(StringUtils.isNotBlank(info.getUserId())){ - UserBaseInfoResultDTO cache = userBaseInfoRedis.getUserInfo(info.getUserId()); + UserBaseInfoResultDTO cache = userBaseInfoRedis.getUserInfo(info.getUserId(),customerUserFormDTO.getCustomerId()); if(null != cache) { info.setRegisteredGrid(StringUtils.isBlank(cache.getRegisteredGridName()) ? ModuleConstant.EMPTY_STR : cache.getRegisteredGridName()); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java index 02e3c8c875..391ad95b7c 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java @@ -342,7 +342,7 @@ public class UserBadgeServiceImpl implements UserBadgeService { //居民端 CertificationDetailResultDTO resiResult = userBadgeDao.selectBadgeAuthRecord(tokenDto.getUserId(), certificationDetailFormDTO.getBadgeId(),certificationDetailFormDTO.getRecordId()); if(null == resiResult){ - UserBaseInfoResultDTO userInfo = userBaseInfoRedis.getUserInfo(tokenDto.getUserId()); + UserBaseInfoResultDTO userInfo = userBaseInfoRedis.getUserInfo(tokenDto.getUserId(),certificationDetailFormDTO.getCustomerId()); resiResult = ConvertUtils.sourceToTarget(userInfo,CertificationDetailResultDTO.class); if(null != resiResult) resiResult.setIdcard(userInfo.getIdNum()); } diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/RegisterRelationDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/RegisterRelationDao.xml index 44dbb58269..403e3fcc8e 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/RegisterRelationDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/RegisterRelationDao.xml @@ -33,6 +33,7 @@ + + + + \ No newline at end of file From 7193a584bd243e60a2c027d996e763c0d0fcffba Mon Sep 17 00:00:00 2001 From: wangchao Date: Wed, 10 Mar 2021 18:01:57 +0800 Subject: [PATCH 114/375] =?UTF-8?q?extUserInfo=20=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E5=8A=A0=E4=B8=8AcustomerId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/UserBaseInfoServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java index 2072097574..f76628b60d 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java @@ -366,6 +366,7 @@ public class UserBaseInfoServiceImpl extends BaseServiceImpl Date: Wed, 10 Mar 2021 18:52:33 +0800 Subject: [PATCH 115/375] screenProjectData --- .../toscreen/impl/ScreenProjectSettleServiceImpl.java | 5 +++-- .../screen/ScreenProjectDataService.java | 2 +- .../screen/impl/ScreenProjectDataServiceImpl.java | 3 ++- .../evaluationindex/screen/ScreenProjectDataDao.xml | 11 +++++++++-- .../resources/mapper/project/ProjectProcessDao.xml | 2 +- 5 files changed, 16 insertions(+), 7 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java index 7d97fd2674..7f94601066 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java @@ -107,11 +107,12 @@ public class ScreenProjectSettleServiceImpl implements ScreenProjectSettleServic userService.fillScreenProjectData(metaData); //metaData = Optional.ofNullable(userService.getScreenProjectData(metaData)).orElse(metaData); } + ScreenProjectDataDTO orientCase = new ScreenProjectDataDTO(); orientCase.setCustomerId(param.getCustomerId()); //待更新的数据 需要检测更新的字段为:①projectStatusCode ②closeCaseTime ③allCategoryName ④projectLevel List orientData = - targetDbService.getPending(orientCase); + targetDbService.getPending(orientCase,param.getDateId()); // 给metaData和orientData赋上分类信息 List projectIds = @@ -141,7 +142,7 @@ public class ScreenProjectSettleServiceImpl implements ScreenProjectSettleServic if(!CollectionUtils.isEmpty(metaData)){ List imgs = topicService.buildNewScreenProjectImgData(metaData); - if(CollectionUtils.isEmpty(imgs)){ + if(!CollectionUtils.isEmpty(imgs)){ //FIXME release here targetImgService.insertBatch(imgs); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectDataService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectDataService.java index 7078f229d1..3838eb4c50 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectDataService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectDataService.java @@ -114,7 +114,7 @@ public interface ScreenProjectDataService extends BaseService getPending(ScreenProjectDataDTO param); + List getPending(ScreenProjectDataDTO param,String dateId); /** * @Description collect或更新 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java index 9152e8f0b6..dbe158ef98 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java @@ -246,7 +246,8 @@ public class ScreenProjectDataServiceImpl extends BaseServiceImpl getPending(ScreenProjectDataDTO param) { + public List getPending(ScreenProjectDataDTO param,String dateId) { + param.setDataEndTime(dateId); return baseDao.selectPending(param); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml index 1f439d7a3a..a6c7b1eb6b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml @@ -55,6 +55,7 @@ and project_level = #{projectLevel} + and data_end_time ]]> #{dataEndTime} @@ -150,9 +151,15 @@ + + + #{dataEndTime} + + + now() + - DATA_END_TIME = #{dataEndTime}, - updated_time = now() + where PROJECT_ID=#{i.projectId} 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 698d7d2417..e9079abc3b 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 @@ -403,7 +403,7 @@ select count(id) from screen_project_data where del_flag = '0' and customer_id = #{customerId} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectProcessDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectProcessDao.xml index b1072ad590..fc19f60add 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectProcessDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectProcessDao.xml @@ -10,6 +10,12 @@ limit 1000 + + delete from screen_project_process + where customer_id = #{customerId} + and DATE_FORMAT(PROCESS_TIME,'%Y%m%d') = #{dateId} + limit 1000 + - SELECT - fics.agency_id, - fics.month_id, - fics.quarter_id, - fics.year_id, - ROUND(AVG( fics.score ),6) AS score, - fics.customer_id, - fics.PARENT_AGENCY_ID AS parentId - FROM - fact_index_agency_score fics - LEFT JOIN screen_customer_agency sca ON sca.AGENCY_ID = fics.PARENT_AGENCY_ID - WHERE - fics.del_flag = '0' - AND sca.level = 'district' - AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%') - AND fics.month_id = #{monthId} - AND fics.index_code = #{indexCode} - AND fics.DATA_TYPE = #{dataType} - GROUP BY fics.parent_agency_id + SELECT a2.pid AS parentId,a.monthId,a.quarterId,a.yearId,ROUND(AVG( a.score ),6) AS score,a.customerId,a.parentId AS agencyId FROM + (SELECT + fics.agency_id AS agencyId, + fics.month_id AS monthId, + fics.quarter_id AS quarterId, + fics.year_id AS yearId, + ROUND(AVG( fics.score ),6) AS score, + fics.customer_id AS customerId, + (SELECT AGENCY_ID FROM screen_customer_agency WHERE AREA_CODE = #{areaCode}) AS parentId + FROM + fact_index_agency_score fics + WHERE + fics.del_flag = '0' + AND fics.month_id = #{monthId} + AND fics.index_code = #{indexCode} + AND fics.agency_id IN (SELECT AGENCY_ID FROM screen_customer_agency WHERE PARENT_AREA_CODE = #{areaCode}) + GROUP BY agencyId) a + LEFT JOIN screen_customer_agency a2 ON a2.AGENCY_ID = a.parentId + GROUP BY a2.AGENCY_ID @@ -214,6 +215,7 @@ fias.del_flag = 0 AND sca.AREA_CODE = #{areaCode} AND fias.MONTH_ID = #{monthId} + AND fias.customer_id = #{customerId} AND fias.IS_TOTAL = "0" AND (fias.INDEX_CODE = "zhilinengli" OR fias.INDEX_CODE = "dangjiannengli" diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml index 5690d1a665..28eda4f99c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml @@ -142,6 +142,7 @@ AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%') AND cs.MONTH_ID = #{monthId} AND cs.IS_TOTAL = "0" + AND cs.customer_id = #{customerId} AND (cs.INDEX_CODE = "dangjiannengli" OR cs.INDEX_CODE = "zhilinengli" OR cs.INDEX_CODE = "fuwunengli") @@ -179,14 +180,14 @@ sca.pid AS parentId FROM fact_index_community_score fics - LEFT JOIN screen_customer_agency sca ON sca.AGENCY_ID = fics.PARENT_AGENCY_ID + LEFT JOIN screen_customer_agency sca ON sca.AGENCY_ID = fics.AGENCY_ID WHERE fics.del_flag = '0' AND sca.DEL_FLAG = 0 - AND sca.AREA_CODE IN - (SELECT AREA_CODE FROM screen_customer_agency WHERE DEL_FLAG = '0' AND PARENT_AREA_CODE = #{areaCode}) + AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%') + AND sca.`LEVEL` = 'community' AND fics.month_id = #{monthId} AND fics.index_code = #{indexCode} - GROUP BY fics.parent_agency_id + GROUP BY parentId diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml index d189ad2ee6..1217c43131 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml @@ -193,8 +193,37 @@ WHERE gm.del_flag = '0' AND gm.month_id = #{monthId} - AND gm.DATA_TYPE = 'community' + AND gm.DATA_TYPE = 'street' AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%') AND sca.AREA_CODE != #{areaCode} + AND gm.PARENT_ID = '0' + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml index 911b62e8c6..eeddf7a408 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml @@ -146,8 +146,7 @@ LEFT JOIN screen_customer_agency sca ON sca.AGENCY_ID = pm.AGENCY_ID WHERE pm.del_flag = '0' - AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%') - AND sca.AREA_CODE != #{areaCode} + AND sca.PARENT_AREA_CODE = #{areaCode} AND pm.month_id = #{monthId} + From 4a3ca383ccd4649752d47d9b30e71253f6b117c3 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 12 Mar 2021 09:49:43 +0800 Subject: [PATCH 122/375] =?UTF-8?q?=E5=B9=B3=E9=98=B4=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java | 2 +- .../indexcal/impl/IndexCalculateCommunityServiceImpl.java | 3 ++- .../indexcal/impl/IndexCalculateStreetServiceImpl.java | 7 ++----- .../indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java index 4188e5f96f..24f48eef4f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java @@ -75,7 +75,7 @@ public interface FactIndexGovrnAblityOrgMonthlyDao extends BaseDao> selectCommunityGovernAbilityExistsSub(@Param("monthId")String monthId,@Param("areaCode")String areaCode); - List> selectCommunityGovernAbilityExistsSubNotSelf(@Param("monthId")String monthId,@Param("areaCode")String areaCode); + List> selectCommunityGovernAbilityExistsSubNotSelf(@Param("monthId")String monthId,@Param("areaCode")String areaCode,@Param("level")String level); /** * @Description 孔村单独查询 * @Param monthId diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java index 0d084096ec..693f02c50d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java @@ -11,6 +11,7 @@ import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; import com.epmet.constant.ProjectConstant; +import com.epmet.constant.ScreenConstant; import com.epmet.dao.evaluationindex.indexcal.CommunityScoreDao; import com.epmet.dao.evaluationindex.indexcal.CommunitySelfSubScoreDao; import com.epmet.dao.evaluationindex.indexcal.CommunitySubScoreDao; @@ -702,7 +703,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni } } else { // 治理能力的六个五级指标 - List> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbilityExistsSubNotSelf(form.getMonthId(),form.getCustomerAreaCode()); + List> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbilityExistsSubNotSelf(form.getMonthId(),form.getCustomerAreaCode(), ScreenConstant.COMMUNITY); if (CollectionUtils.isEmpty(communityGovernAbility)){ log.warn(IndexCalConstant.COMMUNITY_GOVERN_ABILITY_NULL); }else{ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java index 000b41921c..552efefa9d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java @@ -8,10 +8,7 @@ import com.epmet.commons.tools.constant.StrConstant; 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.DataSourceConstant; -import com.epmet.constant.IndexCalConstant; -import com.epmet.constant.OrgTypeConstant; -import com.epmet.constant.ProjectConstant; +import com.epmet.constant.*; import com.epmet.dao.evaluationindex.indexcal.AgencyScoreDao; import com.epmet.dao.evaluationindex.indexcal.AgencySelfSubScoreDao; import com.epmet.dao.evaluationindex.indexcal.AgencySubScoreDao; @@ -908,7 +905,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ public List> disposeFiveLevel(CalculateCommonFormDTO formDTO){ List> result = new ArrayList<>(); - List> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbilityExistsSubNotSelf(formDTO.getMonthId(),formDTO.getCustomerAreaCode()); + List> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbilityExistsSubNotSelf(formDTO.getMonthId(),formDTO.getCustomerAreaCode(), ScreenConstant.STREET); List> kongCunGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbilityIsKongCun(formDTO.getMonthId(),formDTO.getCustomerAreaCode()); if (!CollectionUtils.isEmpty(kongCunGovernAbility)){ kongCunGovernAbility.forEach(k -> { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml index 1217c43131..3dbe2956ed 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml @@ -193,7 +193,7 @@ WHERE gm.del_flag = '0' AND gm.month_id = #{monthId} - AND gm.DATA_TYPE = 'street' + AND gm.DATA_TYPE = #{level} AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%') AND sca.AREA_CODE != #{areaCode} AND gm.PARENT_ID = '0' From 2d5e64b207c020fc49389a8c87ec1d7ab6b7e844 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Fri, 12 Mar 2021 14:29:51 +0800 Subject: [PATCH 123/375] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E5=AE=9A=E5=88=B6?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E4=BF=AE=E6=94=B9=EF=BC=8C=E8=BF=BD=E5=8A=A0?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=8C=83=E5=9B=B4=EF=BC=9A=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E5=9F=9F=E5=90=8D=E3=80=81=E5=A4=96=E9=93=BE=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/UpdateCustomerFunctionFormDTO.java | 10 ++++++++++ .../controller/CustomerFunctionDetailController.java | 1 - .../java/com/epmet/dao/CustomerFunctionDetailDao.java | 1 + .../epmet/service/CustomerFunctionDetailService.java | 1 + .../resources/mapper/CustomerFunctionDetailDao.xml | 7 +++++++ 5 files changed, 19 insertions(+), 1 deletion(-) diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/UpdateCustomerFunctionFormDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/UpdateCustomerFunctionFormDTO.java index 83800e2af5..3f65de5bb8 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/UpdateCustomerFunctionFormDTO.java +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/UpdateCustomerFunctionFormDTO.java @@ -50,4 +50,14 @@ public class UpdateCustomerFunctionFormDTO implements Serializable { private String iconSmallImg; private String userId; + + /** + * 外链地址 + */ + private String targetLink; + + /** + * 自定义业务域名(可设置多个 用分号分隔) + */ + private String domainName; } diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFunctionDetailController.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFunctionDetailController.java index 0778f3d989..3a69b6da62 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFunctionDetailController.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFunctionDetailController.java @@ -143,7 +143,6 @@ public class CustomerFunctionDetailController { /** * 客户定制功能修改 入参 - * 目前允许修改功能名称、大小图标 * * @param tokenDto * @param formDTO diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFunctionDetailDao.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFunctionDetailDao.java index bfbefc518d..8334159e8c 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFunctionDetailDao.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFunctionDetailDao.java @@ -73,6 +73,7 @@ public interface CustomerFunctionDetailDao extends BaseDao ICON_SMALL_IMG = #{iconSmallImg}, + + + DOMAIN_NAME = #{domainName}, + + + TARGET_LINK = #{targetLink}, + UPDATED_BY = #{userId}, UPDATED_TIME = now() WHERE From 875b87cf1d3b870147585a3c45acc0d196fad4da Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 15 Mar 2021 15:29:13 +0800 Subject: [PATCH 124/375] =?UTF-8?q?=E5=BE=BD=E7=AB=A0=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=8F=92=E5=85=A5=E5=8A=A0log=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/UserBadgeServiceImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java index 391ad95b7c..9a342916e4 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java @@ -153,6 +153,7 @@ public class UserBadgeServiceImpl implements UserBadgeService { */ @Override public void initPartyMemberBadge(String userId,TokenDto tokenDto){ + log.info("开始初始化【"+userId+"】党员徽章"); List userIds = resiUserBadgeDao.selectUserIds(); List badges = new ArrayList<>(); String partyBadgeId = badgeDao.getPartyBadgeId(null); @@ -195,6 +196,7 @@ public class UserBadgeServiceImpl implements UserBadgeService { List oneUserIds = new ArrayList<>(); oneUserIds.add(userId); List userBaseInfoResultDTOS = userBaseInfoService.queryUserBaseInfo(oneUserIds); + log.info("user【"+userId+"】基本信息:"+userBaseInfoResultDTOS.toString()); if (!CollectionUtils.isEmpty(userIds)) { AtomicReference status = new AtomicReference<>(true); userIds.forEach(u -> { @@ -232,6 +234,7 @@ public class UserBadgeServiceImpl implements UserBadgeService { badges.add(dto); }); } + log.info("即将插入的徽章信息:"+badges); resiUserBadgeDao.insertResiUserBadge(badges); } } From 8c5ffb9209e0b338a77929269c1a3c9ef2520ea1 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 15 Mar 2021 15:41:47 +0800 Subject: [PATCH 125/375] =?UTF-8?q?=E5=BE=BD=E7=AB=A0=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=8F=92=E5=85=A5=E5=8A=A0log=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/UserBadgeServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java index 9a342916e4..41ef5f072a 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java @@ -200,7 +200,7 @@ public class UserBadgeServiceImpl implements UserBadgeService { if (!CollectionUtils.isEmpty(userIds)) { AtomicReference status = new AtomicReference<>(true); userIds.forEach(u -> { - if(u.equals(userId)){ + if(u.getUserId().equals(userId)){ status.set(false); } }); From 5b9a75601585aa42e454cd0400c6dcb94cf8277c Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 15 Mar 2021 15:43:16 +0800 Subject: [PATCH 126/375] =?UTF-8?q?=E5=BE=BD=E7=AB=A0=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=8F=92=E5=85=A5=E5=8A=A0log=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/UserBadgeServiceImpl.java | 1 - 1 file changed, 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java index 41ef5f072a..b076c7eaff 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java @@ -153,7 +153,6 @@ public class UserBadgeServiceImpl implements UserBadgeService { */ @Override public void initPartyMemberBadge(String userId,TokenDto tokenDto){ - log.info("开始初始化【"+userId+"】党员徽章"); List userIds = resiUserBadgeDao.selectUserIds(); List badges = new ArrayList<>(); String partyBadgeId = badgeDao.getPartyBadgeId(null); From 68817f0770cf4618dba15dd5c5b2d6522ebaec86 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 16 Mar 2021 09:51:37 +0800 Subject: [PATCH 127/375] =?UTF-8?q?=E5=BE=BD=E7=AB=A0bug=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/UserBadgeServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java index b076c7eaff..110739d089 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java @@ -199,7 +199,7 @@ public class UserBadgeServiceImpl implements UserBadgeService { if (!CollectionUtils.isEmpty(userIds)) { AtomicReference status = new AtomicReference<>(true); userIds.forEach(u -> { - if(u.getUserId().equals(userId)){ + if(u.equals(userId)){ status.set(false); } }); From 0d4a1ee11eed68dcc27c77642dbcc277be888e61 Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 16 Mar 2021 09:52:51 +0800 Subject: [PATCH 128/375] =?UTF-8?q?=E5=AE=8C=E6=88=90ApiService=E4=BD=93?= =?UTF-8?q?=E7=B3=BB=E8=AE=BE=E8=AE=A1=EF=BC=8C=E5=87=86=E5=A4=87=E6=8E=A5?= =?UTF-8?q?=E5=85=A5=E5=85=B7=E4=BD=93=E7=9A=84=E5=B9=B3=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/commons/tools/redis/RedisKeys.java | 9 +++ .../com/epmet/constant/ApiServiceActions.java | 11 ++++ .../epmet/dto/form/ProjectAssistFormDTO.java | 15 +++++ .../com/epmet/dto/form/TPFDemoFormDTO.java | 20 ++++++ .../java/com/epmet/apiservice/ApiService.java | 63 +++++++++++++++++++ .../epmet/apiservice/impl/DemoApiService.java | 31 +++++++++ .../impl/LuzhouGridPlatformApiService.java | 19 ++++++ .../LZGridPlatformProjectAssistResult.java | 4 ++ .../result/ProjectAssistResult.java | 8 +++ .../com/epmet/controller/BizController.java | 54 ++++++++++++++++ .../com/epmet/dao/ThirdplatformActionDao.java | 33 ++++++++++ .../dao/ThirdplatformCustomerRegisterDao.java | 36 +++++++++++ .../java/com/epmet/dao/ThirdplatformDao.java | 33 ++++++++++ .../entity/ThirdplatformActionEntity.java | 51 +++++++++++++++ .../ThirdplatformCustomerRegisterEntity.java | 51 +++++++++++++++ .../com/epmet/entity/ThirdplatformEntity.java | 61 ++++++++++++++++++ .../com/epmet/service/ApiServiceSelector.java | 46 ++++++++++++++ .../com/epmet/service/ProjectService.java | 15 +++++ .../service/impl/ProjectServiceImpl.java | 40 ++++++++++++ .../mapper/ThirdplatformActionDao.xml | 19 ++++++ .../ThirdplatformCustomerRegisterDao.xml | 36 +++++++++++ .../resources/mapper/ThirdplatformDao.xml | 21 +++++++ .../epmet/feign/OperCrmOpenFeignClient.java | 9 +++ .../OperCrmOpenFeignClientFallback.java | 5 ++ .../epmet/controller/CustomerController.java | 13 ++++ .../dao/CustomerThirdplatApiserviceDao.java | 10 +++ .../CustomerThirdplatApiServiceService.java | 9 +++ ...ustomerThirdplatApiServiceServiceImpl.java | 19 ++++++ .../mapper/CustomerThirdplatApiserviceDao.xml | 14 +++++ 29 files changed, 755 insertions(+) create mode 100644 epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/constant/ApiServiceActions.java create mode 100644 epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ProjectAssistFormDTO.java create mode 100644 epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/TPFDemoFormDTO.java create mode 100644 epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java create mode 100644 epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/DemoApiService.java create mode 100644 epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java create mode 100644 epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/result/LZGridPlatformProjectAssistResult.java create mode 100644 epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/result/ProjectAssistResult.java create mode 100644 epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/BizController.java create mode 100644 epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformActionDao.java create mode 100644 epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformCustomerRegisterDao.java create mode 100644 epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformDao.java create mode 100644 epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/ThirdplatformActionEntity.java create mode 100644 epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/ThirdplatformCustomerRegisterEntity.java create mode 100644 epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/ThirdplatformEntity.java create mode 100644 epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ApiServiceSelector.java create mode 100644 epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ProjectService.java create mode 100644 epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java create mode 100644 epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformActionDao.xml create mode 100644 epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformCustomerRegisterDao.xml create mode 100644 epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformDao.xml diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java index 098dd1c14d..220d621195 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java @@ -370,4 +370,13 @@ public class RedisKeys { public static String getCustomerApiServiceKey(String customerId) { return rootPrefix.concat("customer:thirdplat:apiservice:").concat(customerId); } + + /** + * 一个客户对应多个第三方平台,多个ApiService的key + * @param customerId + * @return + */ + public static String listCustomerApiServiceListKey(String customerId) { + return rootPrefix.concat("customer:thirdplat:apiservicelist:").concat(customerId); + } } diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/constant/ApiServiceActions.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/constant/ApiServiceActions.java new file mode 100644 index 0000000000..e754e8f31e --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/constant/ApiServiceActions.java @@ -0,0 +1,11 @@ +package com.epmet.constant; + +/** + * api service 常量列表 + */ +public interface ApiServiceActions { + + // 测试动作 + String DEMO_ACTION = "demoAction"; + +} diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ProjectAssistFormDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ProjectAssistFormDTO.java new file mode 100644 index 0000000000..543524f1b1 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ProjectAssistFormDTO.java @@ -0,0 +1,15 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +@Data +public class ProjectAssistFormDTO { + + private String customerId; + + @NotBlank(message = "平台ID不能为空") + private String platformId; + +} diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/TPFDemoFormDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/TPFDemoFormDTO.java new file mode 100644 index 0000000000..c790a4a529 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/TPFDemoFormDTO.java @@ -0,0 +1,20 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * 第三方平台-demo form dto + */ +@Data +public class TPFDemoFormDTO { + + private String demoString; + + @NotBlank(message = "客户ID不能为空") + private String customerId; + + @NotBlank(message = "平台ID不能为空") + private String platformId; +} diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java new file mode 100644 index 0000000000..da169d165a --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java @@ -0,0 +1,63 @@ +package com.epmet.apiservice; + +import com.epmet.apiservice.result.ProjectAssistResult; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.utils.SpringContextUtils; +import com.epmet.dao.ThirdplatformCustomerRegisterDao; +import com.epmet.dto.form.ProjectAssistFormDTO; +import com.epmet.dto.form.TPFDemoFormDTO; +import com.epmet.entity.ThirdplatformCustomerRegisterEntity; + +/** + * ApiService,对接第三方平台的抽象类 + * 每一个具体平台的ApiService都是该抽象类的子类,选择性实现抽象类中的某些方法,提供具体业务逻辑 + */ +public abstract class ApiService { + + /** + * @Description 判断该客户是否注册了该平台 + * @return true:已注册该平台,可以使用;false:未注册,无法使用 + * @author wxz + * @date 2021.03.15 11:09 + */ + public boolean isRegistered(String customerId, String platformId) { + ThirdplatformCustomerRegisterDao tpcRegDao = SpringContextUtils.getBean(ThirdplatformCustomerRegisterDao.class); + ThirdplatformCustomerRegisterEntity tpcReg = tpcRegDao.getByCustomerIdAndPlatformId(customerId, platformId); + if (tpcReg == null) { + return false; + } + return true; + } + + /** + * @Description 判断客户是否注册了指定的平台,如果没有注册,则抛出异常 + * @return + * @author wxz + * @date 2021.03.15 21:39 + */ + public void judgeRegistered(String customerId, String platformId) { + if (!isRegistered(customerId, platformId)) { + throw new RenException(String.format("客户:%s没有配置第三方平台:%s", customerId, platformId)); + } + } + + /** + * @Description demo示例方法 + * @return + * @author wxz + * @date 2021.03.15 10:46 + */ + public String demoAction(TPFDemoFormDTO tpfDemoFormDTO) { + return "do success !!"; + } + + /** + * @Description 项目协同处理 + * @return 项目协同处理的Result。具体的平台返回的结果最终都要转化为这个ProjectAssistResult返回 + * @author wxz + * @date 2021.03.16 09:28 + */ + public ProjectAssistResult projectAssist(ProjectAssistFormDTO formDTO) { + return null; + } +} diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/DemoApiService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/DemoApiService.java new file mode 100644 index 0000000000..6c1aca3917 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/DemoApiService.java @@ -0,0 +1,31 @@ +package com.epmet.apiservice.impl; + +import com.epmet.apiservice.ApiService; +import com.epmet.apiservice.result.ProjectAssistResult; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.ApiServiceActions; +import com.epmet.dto.form.ProjectAssistFormDTO; +import com.epmet.dto.form.TPFDemoFormDTO; +import com.epmet.feign.OperCrmOpenFeignClient; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * demo api service + */ +@Component(value = "demoApiService") +public class DemoApiService extends ApiService { + + Logger logger = LoggerFactory.getLogger(DemoApiService.class); + + @Autowired + private OperCrmOpenFeignClient operCrmOpenFeignClient; + + @Override + public ProjectAssistResult projectAssist(ProjectAssistFormDTO formDTO) { + logger.info("DemoApiService发送项目协助到第三方平台成功"); + return null; + } +} diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java new file mode 100644 index 0000000000..4081bfad61 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java @@ -0,0 +1,19 @@ +package com.epmet.apiservice.impl; + +import com.epmet.apiservice.ApiService; +import com.epmet.apiservice.result.ProjectAssistResult; +import com.epmet.dto.form.ProjectAssistFormDTO; +import org.springframework.stereotype.Component; + +/** + * 泸州网格化平台ApiService + */ +@Component("luzhouGridPlatformApiService") +public class LuzhouGridPlatformApiService extends ApiService { + + @Override + public ProjectAssistResult projectAssist(ProjectAssistFormDTO formDTO) { + System.out.println("泸州网格化平台项目协助发送成功"); + return null; + } +} diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/result/LZGridPlatformProjectAssistResult.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/result/LZGridPlatformProjectAssistResult.java new file mode 100644 index 0000000000..ef74410885 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/result/LZGridPlatformProjectAssistResult.java @@ -0,0 +1,4 @@ +package com.epmet.apiservice.result; + +public class LZGridPlatformProjectAssistResult { +} diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/result/ProjectAssistResult.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/result/ProjectAssistResult.java new file mode 100644 index 0000000000..2da96d1e17 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/result/ProjectAssistResult.java @@ -0,0 +1,8 @@ +package com.epmet.apiservice.result; + +import lombok.Data; + +@Data +public class ProjectAssistResult { + +} diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/BizController.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/BizController.java new file mode 100644 index 0000000000..ed83a196bf --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/BizController.java @@ -0,0 +1,54 @@ +package com.epmet.controller; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.dto.form.ProjectAssistFormDTO; +import com.epmet.dto.form.TPFDemoFormDTO; +import com.epmet.service.ProjectService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.lang.management.MemoryManagerMXBean; + +/** + * 对接第三方平台业务相关的controller + * 我们系统当中每一个需要发送到第三方平台的操作,只对应这里的一个方法,根据参数传入platformId,内部根据配置获取指定的APiService进行具体平台的调用 + * 每一个平台都有自己的ApiSerivce + */ +@RestController +@RequestMapping("biz") +public class BizController { + + @Autowired + private ProjectService projectService; + + /** + * @Description demo方法 + * @return + * @author wxz + * @date 2021.03.15 21:11 + */ + @PostMapping("demo-action") + public Result demoAction(@RequestBody TPFDemoFormDTO tpfDemoFormDTO) { + ValidatorUtils.validateEntity(tpfDemoFormDTO); + String r = projectService.demoAction(tpfDemoFormDTO); + return new Result().ok(r); + } + + /** + * @Description 发送项目协同处理方法 + * @return + * @author wxz + * @date 2021.03.15 21:13 + */ + @PostMapping("project-assist") + public Result projectAssist(@RequestBody ProjectAssistFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO); + projectService.projectAssist(formDTO); + return new Result(); + } + +} diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformActionDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformActionDao.java new file mode 100644 index 0000000000..9b309c15fc --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformActionDao.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; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.ThirdplatformActionEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-15 + */ +@Mapper +public interface ThirdplatformActionDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformCustomerRegisterDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformCustomerRegisterDao.java new file mode 100644 index 0000000000..e3a39cbbe2 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformCustomerRegisterDao.java @@ -0,0 +1,36 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.constant.ThirdPlatformConstant; +import com.epmet.entity.ThirdplatformCustomerRegisterEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-15 + */ +@Mapper +public interface ThirdplatformCustomerRegisterDao extends BaseDao { + + ThirdplatformCustomerRegisterEntity getByCustomerIdAndPlatformId(@Param("customerId") String customerId, @Param("platformId") String platformId); +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformDao.java new file mode 100644 index 0000000000..593d20923f --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformDao.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; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.ThirdplatformEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-15 + */ +@Mapper +public interface ThirdplatformDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/ThirdplatformActionEntity.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/ThirdplatformActionEntity.java new file mode 100644 index 0000000000..88c7a8cd2f --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/ThirdplatformActionEntity.java @@ -0,0 +1,51 @@ +/** + * 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; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-15 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("thirdplatform_action") +public class ThirdplatformActionEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private String platformId; + + /** + * + */ + private String actionKey; + +} diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/ThirdplatformCustomerRegisterEntity.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/ThirdplatformCustomerRegisterEntity.java new file mode 100644 index 0000000000..b3b77fb626 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/ThirdplatformCustomerRegisterEntity.java @@ -0,0 +1,51 @@ +/** + * 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; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-15 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("thirdplatform_customer_register") +public class ThirdplatformCustomerRegisterEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private String customerId; + + /** + * + */ + private String platformId; + +} diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/ThirdplatformEntity.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/ThirdplatformEntity.java new file mode 100644 index 0000000000..4fede6dcdf --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/ThirdplatformEntity.java @@ -0,0 +1,61 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-15 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("thirdplatform") +public class ThirdplatformEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 平台名称 + */ + private String platformName; + + /** + * 平台唯一KEY + */ + private String platformKey; + + /** + * + */ + private String platformSecret; + + /** + * apiservice + */ + private String apiService; + +} diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ApiServiceSelector.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ApiServiceSelector.java new file mode 100644 index 0000000000..6e45fc2122 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ApiServiceSelector.java @@ -0,0 +1,46 @@ +package com.epmet.service; + +import com.epmet.apiservice.ApiService; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.utils.SpringContextUtils; +import com.epmet.dao.ThirdplatformDao; +import com.epmet.entity.ThirdplatformEntity; + +/** + * ApiService选择器 + */ +public interface ApiServiceSelector { + + /** + * @Description 根据platformId查找platform对应的ApiService。如果找不到对应的api service,则返回null + * @return ApiService + * @author wxz + * @date 2021.03.15 20:59 + */ + default ApiService trySelectApiService(String platformId) { + ThirdplatformDao thirdplatformDao = SpringContextUtils.getBean(ThirdplatformDao.class); + ThirdplatformEntity thirdplatform = thirdplatformDao.selectById(platformId); + + if (thirdplatform == null) { + return null; + } + return (ApiService)SpringContextUtils.getBean(thirdplatform.getApiService()); + } + + /** + * @Description 根据platformId查找platform对应的ApiService。如果找不到对应的api service,则抛出RenException异常 + * @return ApiService + * @author wxz + * @date 2021.03.15 21:08 + */ + default ApiService selectApiService(String platformId) { + ThirdplatformDao thirdplatformDao = SpringContextUtils.getBean(ThirdplatformDao.class); + ThirdplatformEntity thirdplatform = thirdplatformDao.selectById(platformId); + + if (thirdplatform == null) { + throw new RenException(String.format("ID为%s的第三方平台不存在", platformId)); + } + return (ApiService)SpringContextUtils.getBean(thirdplatform.getApiService()); + } + +} diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ProjectService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ProjectService.java new file mode 100644 index 0000000000..25d4f6de51 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ProjectService.java @@ -0,0 +1,15 @@ +package com.epmet.service; + +import com.epmet.dto.form.ProjectAssistFormDTO; +import com.epmet.dto.form.TPFDemoFormDTO; +import org.springframework.stereotype.Service; + +/** + * 该service用于封装project相关的代码 + */ +public interface ProjectService { + + String demoAction(TPFDemoFormDTO formDTO); + + void projectAssist(ProjectAssistFormDTO formDTO); +} diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java new file mode 100644 index 0000000000..fb57663d72 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -0,0 +1,40 @@ +package com.epmet.service.impl; + +import com.epmet.apiservice.ApiService; +import com.epmet.apiservice.result.ProjectAssistResult; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.dto.form.ProjectAssistFormDTO; +import com.epmet.dto.form.TPFDemoFormDTO; +import com.epmet.service.ApiServiceSelector; +import com.epmet.service.ProjectService; +import org.springframework.stereotype.Service; + +@Service +public class ProjectServiceImpl implements ProjectService, ApiServiceSelector { + + @Override + public String demoAction(TPFDemoFormDTO formDTO) { + String customerId = formDTO.getCustomerId(); + String platformId = formDTO.getPlatformId(); + + // 注意,此处会如果找不到对应的ApiService会抛出异常 + ApiService apiService = selectApiService(platformId); + apiService.judgeRegistered(customerId, platformId); + + return apiService.demoAction(formDTO); + } + + @Override + public void projectAssist(ProjectAssistFormDTO formDTO) { + String customerId = formDTO.getCustomerId(); + String platformId = formDTO.getPlatformId(); + + // 注意,此处会如果找不到对应的ApiService会抛出异常 + ApiService apiService = selectApiService(platformId); + apiService.judgeRegistered(customerId, platformId); + + System.out.println(apiService); + + ProjectAssistResult projectAssistResult = apiService.projectAssist(formDTO); + } +} diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformActionDao.xml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformActionDao.xml new file mode 100644 index 0000000000..03cf514cda --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformActionDao.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformCustomerRegisterDao.xml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformCustomerRegisterDao.xml new file mode 100644 index 0000000000..c8545d01ee --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformCustomerRegisterDao.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformDao.xml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformDao.xml new file mode 100644 index 0000000000..0bc68d7af2 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformDao.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/OperCrmOpenFeignClient.java b/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/OperCrmOpenFeignClient.java index 0f4313dfad..f4dec72cac 100644 --- a/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/OperCrmOpenFeignClient.java +++ b/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/OperCrmOpenFeignClient.java @@ -122,4 +122,13 @@ public interface OperCrmOpenFeignClient { **/ @GetMapping("/oper/crm/customer/getallsubcustomerids/{customerId}") Result> getAllSubCustomerIds(@PathVariable("customerId") String customerId); + + /** + * @Description 根据客户id列出该客户所有的apiService + * @return + * @author wxz + * @date 2021.03.15 15:13 + */ + @PostMapping("list-apiservice-by-customerid") + Result> listApiServiceByCustomerId(@RequestBody ApiServiceFormDTO form); } diff --git a/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/fallback/OperCrmOpenFeignClientFallback.java b/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/fallback/OperCrmOpenFeignClientFallback.java index 5de09ce167..134ffcb242 100644 --- a/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/fallback/OperCrmOpenFeignClientFallback.java +++ b/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/fallback/OperCrmOpenFeignClientFallback.java @@ -95,4 +95,9 @@ public class OperCrmOpenFeignClientFallback implements OperCrmOpenFeignClient { public Result> getAllSubCustomerIds(String customerId) { return ModuleUtils.feignConError(ServiceConstant.OPER_CRM_SERVER, "getAllSubCustomerIds", customerId); } + + @Override + public Result> listApiServiceByCustomerId(ApiServiceFormDTO form) { + return ModuleUtils.feignConError(ServiceConstant.OPER_CRM_SERVER, "listApiServiceByCustomerId", form); + } } diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java index c5330a9abd..461c06f3f6 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java @@ -376,4 +376,17 @@ public class CustomerController { } return new Result<>(); } + + /** + * @Description 根据客户id列出该客户所有的apiService + * @return + * @author wxz + * @date 2021.03.15 15:13 + */ + @PostMapping("list-apiservice-by-customerid") + public Result> listApiServiceByCustomerId(@RequestBody ApiServiceFormDTO form) { + ValidatorUtils.validateEntity(form, ApiServiceFormDTO.GetByCustomerId.class); + String customerId = form.getCustomerId(); + return new Result>().ok(customerThirdplatApiServiceService.listByCustomerId(customerId)); + } } diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/dao/CustomerThirdplatApiserviceDao.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/dao/CustomerThirdplatApiserviceDao.java index 52f05556b1..a879264c54 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/dao/CustomerThirdplatApiserviceDao.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/dao/CustomerThirdplatApiserviceDao.java @@ -23,6 +23,8 @@ import com.epmet.entity.CustomerThirdplatApiserviceEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.util.List; + /** * 客户所属的第三方平台的apiService列表 * @@ -33,4 +35,12 @@ import org.apache.ibatis.annotations.Param; public interface CustomerThirdplatApiserviceDao extends BaseDao { ThirdplatApiserviceResultDTO getByCustomerId(@Param("customerId") String customerId); + + /** + * @Description 列出该客户所有的ApiService + * @return + * @author wxz + * @date 2021.03.15 15:07 + */ + List listByCustomerId(String customerId); } \ No newline at end of file diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerThirdplatApiServiceService.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerThirdplatApiServiceService.java index a1f9fa91e9..eb6adbe6ec 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerThirdplatApiServiceService.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerThirdplatApiServiceService.java @@ -3,6 +3,8 @@ package com.epmet.service; import com.epmet.dto.result.ThirdplatApiserviceResultDTO; import com.epmet.entity.CustomerThirdplatApiserviceEntity; +import java.util.List; + public interface CustomerThirdplatApiServiceService { /** @@ -13,4 +15,11 @@ public interface CustomerThirdplatApiServiceService { */ ThirdplatApiserviceResultDTO getByCustomerId(String customerId); + /** + * 根据客户id列出第三方平台列表 + * @param customerId + * @return + */ + List listByCustomerId(String customerId); + } diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerThirdplatApiServiceServiceImpl.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerThirdplatApiServiceServiceImpl.java index 9cfa19a820..9613f30f60 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerThirdplatApiServiceServiceImpl.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerThirdplatApiServiceServiceImpl.java @@ -8,9 +8,12 @@ import com.epmet.dto.result.ThirdplatApiserviceResultDTO; import com.epmet.entity.CustomerThirdplatApiserviceEntity; import com.epmet.service.CustomerThirdplatApiServiceService; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; +import java.util.ArrayList; +import java.util.List; import java.util.Map; @Service @@ -22,6 +25,10 @@ public class CustomerThirdplatApiServiceServiceImpl implements CustomerThirdplat @Autowired private CustomerThirdplatApiserviceDao thirdplatApiserviceDao; + @Autowired + private RedisTemplate tpasRedisTemplate; + + @Override public ThirdplatApiserviceResultDTO getByCustomerId(String customerId) { ThirdplatApiserviceResultDTO apiService = null; @@ -39,4 +46,16 @@ public class CustomerThirdplatApiServiceServiceImpl implements CustomerThirdplat return apiService; } + + @Override + public List listByCustomerId(String customerId) { + List apiServices = tpasRedisTemplate.opsForList().range(RedisKeys.listCustomerApiServiceListKey(customerId), 0, -1); + if (!CollectionUtils.isEmpty(apiServices)) { + return apiServices; + } + + apiServices = thirdplatApiserviceDao.listByCustomerId(customerId); + tpasRedisTemplate.opsForList().rightPushAll(RedisKeys.listCustomerApiServiceListKey(customerId), apiServices); + return apiServices; + } } diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/resources/mapper/CustomerThirdplatApiserviceDao.xml b/epmet-module/oper-crm/oper-crm-server/src/main/resources/mapper/CustomerThirdplatApiserviceDao.xml index 8390e5647f..86f93189e2 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/resources/mapper/CustomerThirdplatApiserviceDao.xml +++ b/epmet-module/oper-crm/oper-crm-server/src/main/resources/mapper/CustomerThirdplatApiserviceDao.xml @@ -29,5 +29,19 @@ where cta.CUSTOMER_ID = #{customerId} + + \ No newline at end of file From 62e68b5d23e22dec514a21eb1f321ac36bf5f319 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 16 Mar 2021 10:15:53 +0800 Subject: [PATCH 129/375] =?UTF-8?q?=E5=BE=BD=E7=AB=A0bug=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/UserBadgeServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java index 110739d089..b076c7eaff 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java @@ -199,7 +199,7 @@ public class UserBadgeServiceImpl implements UserBadgeService { if (!CollectionUtils.isEmpty(userIds)) { AtomicReference status = new AtomicReference<>(true); userIds.forEach(u -> { - if(u.equals(userId)){ + if(u.getUserId().equals(userId)){ status.set(false); } }); From 8595a1d68884c84f05a4209441d07f3ec8098985 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 16 Mar 2021 12:47:12 +0800 Subject: [PATCH 130/375] =?UTF-8?q?=E5=AE=89=E5=AE=81=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=87=87=E9=9B=86=E6=8E=A5=E5=8F=A3=E6=B7=BB=E5=8A=A0=E9=AA=8C?= =?UTF-8?q?=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/screencoll/ScreenCollFormDTO.java | 35 ++++++- .../AnCommunityProjectProfileFormDTO.java | 10 ++ .../AnGrassRootsGovernMonthlyFormDTO.java | 17 +++- .../form/AnGrassRootsOrgMonthlyFormDTO.java | 13 +++ .../form/AnGrassRootsPmRankFormDTO.java | 19 +++- .../AnGrassRootsPmTotalMonthlyFormDTO.java | 13 +++ .../controller/AnScreenCollController.java | 94 +++++++++++++------ .../screen/AnScreenCollService.java | 10 +- .../screen/impl/AnScreenCollServiceImpl.java | 70 ++++++-------- 9 files changed, 205 insertions(+), 76 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/ScreenCollFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/ScreenCollFormDTO.java index fa3e97d11d..16ab5fee7d 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/ScreenCollFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/ScreenCollFormDTO.java @@ -1,8 +1,12 @@ package com.epmet.dto.screencoll; import com.alibaba.fastjson.JSON; +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; +import org.hibernate.validator.constraints.Length; +import javax.validation.Valid; +import javax.validation.constraints.*; import java.io.Serializable; import java.util.List; @@ -14,21 +18,47 @@ import java.util.List; */ @Data public class ScreenCollFormDTO implements Serializable { - private static final long serialVersionUID = 4605543711669000348L; + + /** + * 添加用户操作的用户可见异常分组 + * 该分组用于校验需要返回给前端错误信息提示的列,需要继承CustomerClientShowGroup + * 返回错误码为8999,提示信息为DTO中具体的列的校验注解message的内容 + */ + public interface IsFirstShowGroup extends CustomerClientShowGroup { + } + + public interface DateIdShowGroup extends CustomerClientShowGroup { + } + + public interface MonthIdShowGroup extends CustomerClientShowGroup { + } + + public interface CustomerIdShowGroup extends CustomerClientShowGroup { + } + + public interface DataListShowGroup extends CustomerClientShowGroup { + + } + /** * 当为true时后台将先删除当前维度的数据,后新增 */ + @NotNull(message = "isFirst不能为空", groups = IsFirstShowGroup.class) private Boolean isFirst; /** * 日期Id, 数据更新至:yyyyMMdd */ + @NotBlank(message = "dateId不能为空;", groups = DateIdShowGroup.class) + @Length(min = 8, max = 8, message = "dateId不能为空,格式应为yyyyMMdd;", groups = {DateIdShowGroup.class}) private String dateId; /** * yyyyMM */ + @NotBlank(message = "monthId不能为空,格式yyyyMM;", groups = MonthIdShowGroup.class) + @Length(min = 6, max = 6, message = "monthId不能为空,格式应为yyyyMM;", groups = {MonthIdShowGroup.class}) private String monthId; /** @@ -39,6 +69,8 @@ public class ScreenCollFormDTO implements Serializable { /** * 数据集合 */ + @Valid + @NotEmpty(message = "dataList不能为空", groups = DataListShowGroup.class) private List dataList; @Override @@ -49,5 +81,6 @@ public class ScreenCollFormDTO implements Serializable { /** * 当前客户id */ + @NotBlank(message = "customerId不能为空;", groups = CustomerIdShowGroup.class) private String customerId; } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/AnCommunityProjectProfileFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/AnCommunityProjectProfileFormDTO.java index d81ae5cf9e..0d52614cfd 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/AnCommunityProjectProfileFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/AnCommunityProjectProfileFormDTO.java @@ -1,7 +1,10 @@ package com.epmet.dto.screencoll.form; +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; import java.io.Serializable; /** @@ -14,23 +17,30 @@ import java.io.Serializable; public class AnCommunityProjectProfileFormDTO implements Serializable { private static final long serialVersionUID = 1466172677051250092L; + public interface DefaultShowGroup extends CustomerClientShowGroup { + } + /** * 数据更新至: yyyy|yyyyMM|yyyyMMdd,项目根据实际情况赋值 */ + @NotBlank(message = "dataEndTime不能为空;", groups = DefaultShowGroup.class) private String dataEndTime; /** * 社区id */ + @NotBlank(message = "orgId不能为空;", groups = DefaultShowGroup.class) private String orgId; /** * 项目数 */ + @NotNull(message = "projectTotal不能为空;", groups = DefaultShowGroup.class) private Integer projectTotal; /** * 等级 */ + @NotBlank(message = "level不能为空;", groups = DefaultShowGroup.class) private String level; } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/AnGrassRootsGovernMonthlyFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/AnGrassRootsGovernMonthlyFormDTO.java index adcb9f63b2..ff3727625b 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/AnGrassRootsGovernMonthlyFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/AnGrassRootsGovernMonthlyFormDTO.java @@ -1,7 +1,10 @@ package com.epmet.dto.screencoll.form; +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; import java.io.Serializable; import java.math.BigDecimal; @@ -12,51 +15,63 @@ import java.math.BigDecimal; * @since v1.0.0 2020-10-09 */ @Data -public class AnGrassRootsGovernMonthlyFormDTO implements Serializable { +public class AnGrassRootsGovernMonthlyFormDTO implements Serializable { private static final long serialVersionUID = -6947401956711903753L; + public interface DefaultShowGroup extends CustomerClientShowGroup { + } + /** * 网格,街道或社区id */ + @NotBlank(message = "orgId不能为空;", groups = DefaultShowGroup.class) private String orgId; /** * 网格,街道名称或者社区名称 */ + @NotBlank(message = "orgName不能为空;", groups = DefaultShowGroup.class) private String orgName; /** * 网格:grid;组织:agency */ + @NotBlank(message = "orgType不能为空,网格:grid;组织:agency;", groups = DefaultShowGroup.class) private String orgType; /** * org_id的上一级id */ + @NotBlank(message = "pid不能为空;", groups = DefaultShowGroup.class) private String pid; /** * 参与项目数 */ + @NotNull(message = "partiProjectTotal不能为空;", groups = DefaultShowGroup.class) private Integer partiProjectTotal; /** * 办结项目数 */ + @NotNull(message = "closedProjectTotal不能为空;", groups = DefaultShowGroup.class) private Integer closedProjectTotal; /** * 项目响应度 存储的是%前面的数 */ + @NotNull(message = "projectResponseRatio不能为空;", groups = DefaultShowGroup.class) private BigDecimal projectResponseRatio; /** * 项目满意率,存储的是%前面的数 */ + @NotNull(message = "projectSatisRatio不能为空;", groups = DefaultShowGroup.class) private BigDecimal projectSatisRatio; /** * 办结率 for 社区 */ + @NotNull(message = "closedProjectRatio不能为空;", groups = DefaultShowGroup.class) private BigDecimal closedProjectRatio; } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/AnGrassRootsOrgMonthlyFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/AnGrassRootsOrgMonthlyFormDTO.java index 70242f1ad3..5ca82e599e 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/AnGrassRootsOrgMonthlyFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/AnGrassRootsOrgMonthlyFormDTO.java @@ -1,7 +1,10 @@ package com.epmet.dto.screencoll.form; +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; import java.io.Serializable; /** @@ -13,39 +16,49 @@ import java.io.Serializable; @Data public class AnGrassRootsOrgMonthlyFormDTO implements Serializable { private static final long serialVersionUID = -7389300512268641307L; + + public interface DefaultShowGroup extends CustomerClientShowGroup {} + /** * 网格id或者组织(街道或社区)id */ + @NotBlank(message = "orgId不能为空;", groups = DefaultShowGroup.class) private String orgId; /** * 组织名称OR网格名称 */ + @NotBlank(message = "orgName不能为空;", groups = DefaultShowGroup.class) private String orgName; /** * 网格:grid; 组织:agency */ + @NotBlank(message = "orgType不能为空;", groups = DefaultShowGroup.class) private String orgType; /** * org_id的上一级id */ + @NotBlank(message = "pid不能为空;", groups = DefaultShowGroup.class) private String pid; /** * 党群数 */ + @NotNull(message = "groupTotal不能为空;", groups = DefaultShowGroup.class) private Integer groupTotal; /** * 议题数 */ + @NotNull(message = "issueTotal不能为空;", groups = DefaultShowGroup.class) private Integer issueTotal; /** * 项目数 */ + @NotNull(message = "projectTotal不能为空;", groups = DefaultShowGroup.class) private Integer projectTotal; } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/AnGrassRootsPmRankFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/AnGrassRootsPmRankFormDTO.java index b889e54661..c558760bf4 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/AnGrassRootsPmRankFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/AnGrassRootsPmRankFormDTO.java @@ -1,7 +1,11 @@ package com.epmet.dto.screencoll.form; +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; +import org.hibernate.validator.constraints.Length; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; import java.io.Serializable; /** @@ -13,60 +17,73 @@ import java.io.Serializable; @Data public class AnGrassRootsPmRankFormDTO implements Serializable { private static final long serialVersionUID = 3642729389245262928L; + public interface DefaultShowGroup extends CustomerClientShowGroup {} /** - * 月份Id + * 月份Id */ + @NotBlank(message = "monthId不能为空;", groups = DefaultShowGroup.class) + @Length(min = 6, max = 6, message = "monthId不能为空,格式应为yyyyMM;", groups = {DefaultShowGroup.class}) private String monthId; /** * 用户id */ + @NotBlank(message = "userId不能为空;", groups = DefaultShowGroup.class) private String userId; /** * 姓名 */ + @NotBlank(message = "userName不能为空;", groups = DefaultShowGroup.class) private String userName; /** * 所属支部id */ + @NotBlank(message = "branchId不能为空;", groups = DefaultShowGroup.class) private String branchId; /** * 所属支部名称 */ + @NotBlank(message = "branchName不能为空;", groups = DefaultShowGroup.class) private String branchName; /** * 所属社区id */ + @NotBlank(message = "communityId不能为空;", groups = DefaultShowGroup.class) private String communityId; /** * 所属社区名称 */ + @NotBlank(message = "communityName不能为空;", groups = DefaultShowGroup.class) private String communityName; /** * 群成员数 */ + @NotNull(message = "groupMemberTotal不能为空;",groups =DefaultShowGroup.class ) private Integer groupMemberTotal; /** * 话题数 */ + @NotNull(message = "topicTotal不能为空;",groups =DefaultShowGroup.class ) private Integer topicTotal; /** * 参与人次 */ + @NotNull(message = "partiUserTotal不能为空;",groups =DefaultShowGroup.class ) private Integer partiUserTotal; /** * 议题数 */ + @NotNull(message = "issueTotal不能为空;",groups =DefaultShowGroup.class ) private Integer issueTotal; /** diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/AnGrassRootsPmTotalMonthlyFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/AnGrassRootsPmTotalMonthlyFormDTO.java index 4adb2ee168..1f1bcb4315 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/AnGrassRootsPmTotalMonthlyFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/AnGrassRootsPmTotalMonthlyFormDTO.java @@ -1,7 +1,10 @@ package com.epmet.dto.screencoll.form; +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; import java.io.Serializable; /** @@ -14,44 +17,54 @@ import java.io.Serializable; public class AnGrassRootsPmTotalMonthlyFormDTO implements Serializable { private static final long serialVersionUID = 8675347783888892404L; + public interface DefaultShowGroup extends CustomerClientShowGroup {} + /** * 网格id或者组织(街道或社区)id */ + @NotBlank(message = "orgId不能为空;", groups = DefaultShowGroup.class) private String orgId; /** * 组织名称OR网格名称 */ + @NotBlank(message = "orgName不能为空;", groups = DefaultShowGroup.class) private String orgName; /** * 网格:grid;组织:agency */ + @NotBlank(message = "orgType不能为空;", groups = DefaultShowGroup.class) private String orgType; /** * org_id的上一级id */ + @NotBlank(message = "pid不能为空;", groups = DefaultShowGroup.class) private String pid; /** * 群成员数 */ + @NotNull(message = "groupMemberTotal不能为空;", groups = DefaultShowGroup.class) private Integer groupMemberTotal; /** * 话题数 */ + @NotNull(message = "topicTotal不能为空;", groups = DefaultShowGroup.class) private Integer topicTotal; /** * 话题参与人次 */ + @NotNull(message = "topicPartiUserTotal不能为空;", groups = DefaultShowGroup.class) private Integer topicPartiUserTotal; /** * 议题数 */ + @NotNull(message = "issueTotal不能为空;", groups = DefaultShowGroup.class) private Integer issueTotal; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/AnScreenCollController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/AnScreenCollController.java index 0766df597b..5b862b66ec 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/AnScreenCollController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/AnScreenCollController.java @@ -1,11 +1,10 @@ package com.epmet.controller; -import com.epmet.commons.tools.exception.ValidateException; import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.dto.screencoll.form.*; import com.epmet.service.evaluationindex.screen.AnScreenCollService; -import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -23,79 +22,116 @@ public class AnScreenCollController { private AnScreenCollService screenCollService; /** - * @Description 安宁大屏数据采集 - 基层党员-各类总数 - * @NEI https://nei.netease.com/interface/detail/?pid=57069&id=329494 * @param formDTO * @return void + * @Description 安宁大屏数据采集 - 基层党员-各类总数 + * @NEI https://nei.netease.com/interface/detail/?pid=57069&id=329494 * @author wangc * @date 2020.10.09 17:20 */ @PostMapping("pmtotal") - public Result pmTotal(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO){ - if(StringUtils.isBlank(customerId)) throw new ValidateException("客户Id不能为空"); - screenCollService.pmTotal(formDTO,customerId); + public Result pmTotal(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO) { + formDTO.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDTO, + ScreenCollFormDTO.IsFirstShowGroup.class, + ScreenCollFormDTO.MonthIdShowGroup.class, + ScreenCollFormDTO.CustomerIdShowGroup.class, + ScreenCollFormDTO.DataListShowGroup.class); + formDTO.getDataList().forEach(data -> { + ValidatorUtils.validateEntity(data, AnGrassRootsPmTotalMonthlyFormDTO.DefaultShowGroup.class); + }); + screenCollService.pmTotal(formDTO); return new Result(); } /** - * @Description 安宁大屏数据采集 - 基层党员-党员排行榜单 - * @NEI https://nei.netease.com/interface/detail/?pid=57069&id=329483 * @param formDTO * @return void + * @Description 安宁大屏数据采集 - 基层党员-党员排行榜单 按月 + * @NEI https://nei.netease.com/interface/detail/?pid=57069&id=329483 * @author wangc * @date 2020.10.09 17:19 */ @PostMapping("pmrank") - public Result pmRank(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO){ - if (StringUtils.isBlank(formDTO.getMonthId())){ - throw new ValidateException("月份Id不能为空"); - } - screenCollService.pmRank(formDTO,customerId); + public Result pmRank(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO) { + formDTO.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDTO, + ScreenCollFormDTO.IsFirstShowGroup.class, + ScreenCollFormDTO.MonthIdShowGroup.class, + ScreenCollFormDTO.CustomerIdShowGroup.class, + ScreenCollFormDTO.DataListShowGroup.class); + formDTO.getDataList().forEach(data -> { + ValidatorUtils.validateEntity(data, AnGrassRootsPmRankFormDTO.DefaultShowGroup.class); + }); + screenCollService.pmRank(formDTO); return new Result(); } /** - * @Description 安宁大屏数据采集 - 基层组织(党群数|议题数|项目数)-按月 - * @NEI https://nei.netease.com/interface/detail/?pid=57069&id=329498 * @param formDTO * @return void + * @Description 安宁大屏数据采集 - 基层组织(党群数|议题数|项目数)-按月 + * @NEI https://nei.netease.com/interface/detail/?pid=57069&id=329498 * @author wangc * @date 2020.10.09 17:22 */ @PostMapping("grassrootsorg") - public Result grassrootsOrg(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO){ - if(StringUtils.isBlank(customerId)) throw new ValidateException("客户Id不能为空"); - screenCollService.grassrootsOrg(formDTO,customerId); + public Result grassrootsOrg(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO) { + formDTO.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDTO, + ScreenCollFormDTO.IsFirstShowGroup.class, + ScreenCollFormDTO.MonthIdShowGroup.class, + ScreenCollFormDTO.CustomerIdShowGroup.class, + ScreenCollFormDTO.DataListShowGroup.class); + formDTO.getDataList().forEach(data -> { + ValidatorUtils.validateEntity(data, AnGrassRootsOrgMonthlyFormDTO.DefaultShowGroup.class); + }); + screenCollService.grassrootsOrg(formDTO); return new Result(); } /** - * @Description 安宁大屏数据采集 - 基层治理-各类数 - * @NEI https://nei.netease.com/interface/detail/?pid=57069&id=329499 * @param formDTO * @return void + * @Description 安宁大屏数据采集 - 基层治理-各类数 按月 + * @NEI https://nei.netease.com/interface/detail/?pid=57069&id=329499 * @author wangc * @date 2020.10.09 17:23 */ @PostMapping("grassrootsgovern") - public Result grassrootsGovern(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO){ - if(StringUtils.isBlank(customerId)) throw new ValidateException("客户Id不能为空"); - screenCollService.grassrootsGovern(formDTO,customerId); + public Result grassrootsGovern(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO) { + formDTO.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDTO, + ScreenCollFormDTO.IsFirstShowGroup.class, + ScreenCollFormDTO.MonthIdShowGroup.class, + ScreenCollFormDTO.CustomerIdShowGroup.class, + ScreenCollFormDTO.DataListShowGroup.class); + formDTO.getDataList().forEach(data -> { + ValidatorUtils.validateEntity(data, AnGrassRootsGovernMonthlyFormDTO.DefaultShowGroup.class); + }); + screenCollService.grassrootsGovern(formDTO); return new Result(); } /** - * @Description 安宁大屏数据采集 - 中央区-项目概要 - * @NEI https://nei.netease.com/interface/detail/?pid=57069&id=329502 * @param formDTO * @return void + * @Description 安宁大屏数据采集 - 中央区-项目概要 + * @NEI https://nei.netease.com/interface/detail/?pid=57069&id=329502 * @author wangc * @date 2020.10.09 16:41 */ @PostMapping("projectfile") - public Result projectFile(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO){ - if(StringUtils.isBlank(customerId)) throw new ValidateException("客户Id不能为空"); - screenCollService.communityProjectProfile(formDTO,customerId); + public Result projectFile(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO) { + formDTO.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDTO, + ScreenCollFormDTO.IsFirstShowGroup.class, + ScreenCollFormDTO.CustomerIdShowGroup.class, + ScreenCollFormDTO.DataListShowGroup.class); + formDTO.getDataList().forEach(data -> { + ValidatorUtils.validateEntity(data, AnCommunityProjectProfileFormDTO.DefaultShowGroup.class); + }); + screenCollService.communityProjectProfile(formDTO); return new Result(); } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/AnScreenCollService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/AnScreenCollService.java index 15a9d72a35..a347d5286d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/AnScreenCollService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/AnScreenCollService.java @@ -17,7 +17,7 @@ public interface AnScreenCollService { * @author wangc * @date 2020.10.09 16:41 */ - void communityProjectProfile(ScreenCollFormDTO formDTO,String customerId); + void communityProjectProfile(ScreenCollFormDTO formDTO); /** * @Description 安宁大屏数据采集 - 基层党员-党员排行榜单 @@ -27,7 +27,7 @@ public interface AnScreenCollService { * @author wangc * @date 2020.10.09 17:19 */ - void pmRank(ScreenCollFormDTO formDTO,String customerId); + void pmRank(ScreenCollFormDTO formDTO); /** * @Description 安宁大屏数据采集 - 基层党员-各类总数 @@ -37,7 +37,7 @@ public interface AnScreenCollService { * @author wangc * @date 2020.10.09 17:20 */ - void pmTotal(ScreenCollFormDTO formDTO,String customerId); + void pmTotal(ScreenCollFormDTO formDTO); /** * @Description 安宁大屏数据采集 - 基层组织(党群数|议题数|项目数)-按月 @@ -46,7 +46,7 @@ public interface AnScreenCollService { * @author wangc * @date 2020.10.09 17:22 */ - void grassrootsOrg(ScreenCollFormDTO formDTO,String customerId); + void grassrootsOrg(ScreenCollFormDTO formDTO); /** * @Description 安宁大屏数据采集 - 基层治理-各类数 @@ -55,5 +55,5 @@ public interface AnScreenCollService { * @author wangc * @date 2020.10.09 17:23 */ - void grassrootsGovern(ScreenCollFormDTO formDTO,String customerId); + void grassrootsGovern(ScreenCollFormDTO formDTO); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/AnScreenCollServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/AnScreenCollServiceImpl.java index e5229f146b..30adab1c63 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/AnScreenCollServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/AnScreenCollServiceImpl.java @@ -4,11 +4,7 @@ import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.DataSourceConstant; -import com.epmet.dao.evaluationindex.screen.ScreenAnCommunityProjectProfileDao; -import com.epmet.dao.evaluationindex.screen.ScreenAnGrassRootsGovernMonthlyDao; -import com.epmet.dao.evaluationindex.screen.ScreenAnGrassRootsOrgMonthlyDao; -import com.epmet.dao.evaluationindex.screen.ScreenAnGrassRootsPmRankDao; -import com.epmet.dao.evaluationindex.screen.ScreenAnGrassRootsPmTotalMonthlyDao; +import com.epmet.dao.evaluationindex.screen.*; import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.dto.screencoll.form.*; import com.epmet.service.evaluationindex.screen.AnScreenCollService; @@ -17,10 +13,6 @@ 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 java.util.List; /** @@ -56,17 +48,17 @@ public class AnScreenCollServiceImpl implements AnScreenCollService { */ @Override @Transactional(rollbackFor = Exception.class) - public void communityProjectProfile(ScreenCollFormDTO formDTO,String customerId) { - List dataList = formDTO.getDataList(); - if(CollectionUtils.isEmpty(dataList)) return ; + public void communityProjectProfile(ScreenCollFormDTO formDTO) { + /*List dataList = formDTO.getDataList(); + if(CollectionUtils.isEmpty(dataList)) return ;*/ if(formDTO.getIsFirst()){ - int affectRows = communityProjectProfileDao.deleteBatch(customerId); + int affectRows = communityProjectProfileDao.deleteBatch(formDTO.getCustomerId()); while(affectRows >= NumConstant.ONE){ - affectRows = communityProjectProfileDao.deleteBatch(customerId); + affectRows = communityProjectProfileDao.deleteBatch(formDTO.getCustomerId()); } } Lists.partition(formDTO.getDataList(),NumConstant.ONE_HUNDRED).forEach(list -> { - communityProjectProfileDao.insertBatch(list,customerId); + communityProjectProfileDao.insertBatch(list,formDTO.getCustomerId()); }); } @@ -81,17 +73,17 @@ public class AnScreenCollServiceImpl implements AnScreenCollService { */ @Override @Transactional(rollbackFor = Exception.class) - public void pmRank(ScreenCollFormDTO formDTO,String customerId) { - List dataList = formDTO.getDataList(); - if(CollectionUtils.isEmpty(dataList)) return ; + public void pmRank(ScreenCollFormDTO formDTO) { + /*List dataList = formDTO.getDataList(); + if(CollectionUtils.isEmpty(dataList)) return ;*/ if(formDTO.getIsFirst()){ - int affectRows = pmRankDao.deleteBatch(customerId,formDTO.getMonthId()); + int affectRows = pmRankDao.deleteBatch(formDTO.getCustomerId(),formDTO.getMonthId()); while(affectRows >= NumConstant.ONE){ - affectRows = pmRankDao.deleteBatch(customerId,formDTO.getMonthId()); + affectRows = pmRankDao.deleteBatch(formDTO.getCustomerId(),formDTO.getMonthId()); } } Lists.partition(formDTO.getDataList(),NumConstant.ONE_HUNDRED).forEach(list -> { - pmRankDao.insertBatch(list,customerId); + pmRankDao.insertBatch(list,formDTO.getCustomerId()); }); } @@ -105,21 +97,21 @@ public class AnScreenCollServiceImpl implements AnScreenCollService { */ @Override @Transactional(rollbackFor = Exception.class) - public void pmTotal(ScreenCollFormDTO formDTO,String customerId) { - List dataList = formDTO.getDataList(); - if(CollectionUtils.isEmpty(dataList)) return ; + public void pmTotal(ScreenCollFormDTO formDTO) { + /*List dataList = formDTO.getDataList(); + if(CollectionUtils.isEmpty(dataList)) return ;*/ if(formDTO.getIsFirst()){ - int affectRows = pmTotalMonthlyDao.deleteBatch(customerId,formDTO.getMonthId()); + int affectRows = pmTotalMonthlyDao.deleteBatch(formDTO.getCustomerId(),formDTO.getMonthId()); while(affectRows >= NumConstant.ONE){ - affectRows = pmTotalMonthlyDao.deleteBatch(customerId,formDTO.getMonthId()); + affectRows = pmTotalMonthlyDao.deleteBatch(formDTO.getCustomerId(),formDTO.getMonthId()); } } String quarterId = DateUtils.getQuarterId(formDTO.getMonthId()); String yearId = DateUtils.getYearId(formDTO.getMonthId()); Lists.partition(formDTO.getDataList(),NumConstant.ONE_HUNDRED).forEach(list -> { pmTotalMonthlyDao.insertBatch(list, - customerId, + formDTO.getCustomerId(), formDTO.getMonthId(), quarterId, yearId); @@ -136,21 +128,21 @@ public class AnScreenCollServiceImpl implements AnScreenCollService { */ @Override @Transactional(rollbackFor = Exception.class) - public void grassrootsOrg(ScreenCollFormDTO formDTO,String customerId) { - List dataList = formDTO.getDataList(); - if(CollectionUtils.isEmpty(dataList)) return ; + public void grassrootsOrg(ScreenCollFormDTO formDTO) { + /*List dataList = formDTO.getDataList(); + if(CollectionUtils.isEmpty(dataList)) return ;*/ if(formDTO.getIsFirst()){ - int affectRows = orgMonthlyDao.deleteBatch(customerId,formDTO.getMonthId()); + int affectRows = orgMonthlyDao.deleteBatch(formDTO.getCustomerId(),formDTO.getMonthId()); while(affectRows >= NumConstant.ONE){ - affectRows = orgMonthlyDao.deleteBatch(customerId,formDTO.getMonthId()); + affectRows = orgMonthlyDao.deleteBatch(formDTO.getCustomerId(),formDTO.getMonthId()); } } String quarterId = DateUtils.getQuarterId(formDTO.getMonthId()); String yearId = DateUtils.getYearId(formDTO.getMonthId()); Lists.partition(formDTO.getDataList(),NumConstant.ONE_HUNDRED).forEach(list -> { orgMonthlyDao.insertBatch(list, - customerId, + formDTO.getCustomerId(), formDTO.getMonthId(), quarterId, yearId); @@ -167,21 +159,21 @@ public class AnScreenCollServiceImpl implements AnScreenCollService { */ @Override @Transactional(rollbackFor = Exception.class) - public void grassrootsGovern(ScreenCollFormDTO formDTO,String customerId) { - List dataList = formDTO.getDataList(); - if(CollectionUtils.isEmpty(dataList)) return ; + public void grassrootsGovern(ScreenCollFormDTO formDTO) { + /*List dataList = formDTO.getDataList(); + if(CollectionUtils.isEmpty(dataList)) return ;*/ if(formDTO.getIsFirst()){ - int affectRows = governMonthlyDao.deleteBatch(customerId,formDTO.getMonthId()); + int affectRows = governMonthlyDao.deleteBatch(formDTO.getCustomerId(),formDTO.getMonthId()); while(affectRows >= NumConstant.ONE){ - affectRows = governMonthlyDao.deleteBatch(customerId,formDTO.getMonthId()); + affectRows = governMonthlyDao.deleteBatch(formDTO.getCustomerId(),formDTO.getMonthId()); } } String quarterId = DateUtils.getQuarterId(formDTO.getMonthId()); String yearId = DateUtils.getYearId(formDTO.getMonthId()); Lists.partition(formDTO.getDataList(),NumConstant.ONE_HUNDRED).forEach(list -> { governMonthlyDao.insertBatch(list, - customerId, + formDTO.getCustomerId(), formDTO.getMonthId(), quarterId, yearId); From 093e33c22a3d5f2b434d06ec8a341824d79d511e Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 16 Mar 2021 13:44:56 +0800 Subject: [PATCH 131/375] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=87=87=E9=9B=86?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=80=9A=E7=94=A8=E5=8F=82=E6=95=B0=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/KcScreenCollController.java | 77 +++++++++--- .../ScreenProjectDataCollController.java | 60 ++++----- .../controller/plugins/OfsController.java | 4 + .../plugins/WorkRecordColController.java | 35 ++---- .../screen/KcScreenCollService.java | 57 +++------ ...ScreenProjectCategoryGridDailyService.java | 3 +- .../ScreenProjectCategoryOrgDailyService.java | 3 +- .../screen/ScreenProjectDataService.java | 2 +- .../screen/ScreenProjectGridDailyService.java | 3 +- .../screen/ScreenProjectOrgDailyService.java | 3 +- .../screen/ScreenProjectProcessService.java | 2 +- ...reenProjectQuantityGridMonthlyService.java | 3 +- ...creenProjectQuantityOrgMonthlyService.java | 3 +- .../screen/impl/KcScreenCollServiceImpl.java | 114 +++++++++--------- ...enProjectCategoryGridDailyServiceImpl.java | 11 +- ...eenProjectCategoryOrgDailyServiceImpl.java | 7 +- .../impl/ScreenProjectDataServiceImpl.java | 24 ++-- .../ScreenProjectGridDailyServiceImpl.java | 9 +- .../ScreenProjectOrgDailyServiceImpl.java | 9 +- .../impl/ScreenProjectProcessServiceImpl.java | 14 +-- ...ProjectQuantityGridMonthlyServiceImpl.java | 9 +- ...nProjectQuantityOrgMonthlyServiceImpl.java | 9 +- .../ScreenCustomerWorkRecordDictService.java | 3 +- .../ScreenWorkRecordOrgDailyService.java | 2 +- .../ScreenWorkRecordOrgMonthlyService.java | 3 +- ...reenCustomerWorkRecordDictServiceImpl.java | 8 +- .../ScreenWorkRecordOrgDailyServiceImpl.java | 8 +- ...ScreenWorkRecordOrgMonthlyServiceImpl.java | 9 +- 28 files changed, 237 insertions(+), 257 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/KcScreenCollController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/KcScreenCollController.java index b64d7855a0..34269ee507 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/KcScreenCollController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/KcScreenCollController.java @@ -1,6 +1,7 @@ package com.epmet.controller; import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.dto.screencoll.form.*; import com.epmet.service.evaluationindex.screen.KcScreenCollService; @@ -35,7 +36,9 @@ public class KcScreenCollController { @PostMapping("homepage/platformsummary") public Result platFormSummary(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO) { - kcScreenCollService.insertPlatFormSummary(formDTO, customerId); + formDTO.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDTO, ScreenCollFormDTO.CustomerIdShowGroup.class, ScreenCollFormDTO.DateIdShowGroup.class); + kcScreenCollService.insertPlatFormSummary(formDTO); return new Result(); } @@ -54,7 +57,9 @@ public class KcScreenCollController { @PostMapping("issue/summary") public Result issueSummary(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO) { - kcScreenCollService.insertIssueSummary(formDTO, customerId); + formDTO.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDTO, ScreenCollFormDTO.CustomerIdShowGroup.class, ScreenCollFormDTO.DateIdShowGroup.class); + kcScreenCollService.insertIssueSummary(formDTO); return new Result(); } @@ -73,7 +78,9 @@ public class KcScreenCollController { @PostMapping("issue/trend") public Result issueTrend(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO) { - kcScreenCollService.insertIssueTrend(formDTO, customerId); + formDTO.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDTO, ScreenCollFormDTO.CustomerIdShowGroup.class, ScreenCollFormDTO.MonthIdShowGroup.class); + kcScreenCollService.insertIssueTrend(formDTO); return new Result(); } @@ -92,7 +99,9 @@ public class KcScreenCollController { @PostMapping("user/summary") public Result userSummary(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO) { - kcScreenCollService.insertUserSummary(formDTO, customerId); + formDTO.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDTO, ScreenCollFormDTO.CustomerIdShowGroup.class, ScreenCollFormDTO.DateIdShowGroup.class); + kcScreenCollService.insertUserSummary(formDTO); return new Result(); } @@ -111,7 +120,9 @@ public class KcScreenCollController { @PostMapping("volunteer/heartrank") public Result volunteerHeartRank(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO) { - kcScreenCollService.insertVolunteerHeartRank(formDTO, customerId); + formDTO.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDTO, ScreenCollFormDTO.CustomerIdShowGroup.class, ScreenCollFormDTO.DateIdShowGroup.class); + kcScreenCollService.insertVolunteerHeartRank(formDTO); return new Result(); } @@ -130,7 +141,9 @@ public class KcScreenCollController { @PostMapping("user/userheartrank") public Result userHeartRank(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO) { - kcScreenCollService.insertUserHeartRank(formDTO, customerId); + formDTO.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDTO, ScreenCollFormDTO.CustomerIdShowGroup.class, ScreenCollFormDTO.MonthIdShowGroup.class); + kcScreenCollService.insertUserHeartRank(formDTO); return new Result(); } @@ -149,7 +162,9 @@ public class KcScreenCollController { @PostMapping("act/summary") public Result actSummary(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO) { - kcScreenCollService.insertActSummary(formDTO, customerId); + formDTO.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDTO, ScreenCollFormDTO.CustomerIdShowGroup.class, ScreenCollFormDTO.DateIdShowGroup.class); + kcScreenCollService.insertActSummary(formDTO); return new Result(); } @@ -168,7 +183,9 @@ public class KcScreenCollController { @PostMapping("act/trend") public Result actTrend(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO) { - kcScreenCollService.insertActTrend(formDTO, customerId); + formDTO.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDTO, ScreenCollFormDTO.CustomerIdShowGroup.class, ScreenCollFormDTO.MonthIdShowGroup.class); + kcScreenCollService.insertActTrend(formDTO); return new Result(); } @@ -187,7 +204,9 @@ public class KcScreenCollController { @PostMapping("act/volunteersummary") public Result volunteerSummary(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO) { - kcScreenCollService.insertVolunteerSummary(formDTO, customerId); + formDTO.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDTO, ScreenCollFormDTO.CustomerIdShowGroup.class, ScreenCollFormDTO.DateIdShowGroup.class); + kcScreenCollService.insertVolunteerSummary(formDTO); return new Result(); } @@ -206,7 +225,9 @@ public class KcScreenCollController { @PostMapping("project/summary") public Result projectSummary(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO) { - kcScreenCollService.insertProjectSummary(formDTO, customerId); + formDTO.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDTO, ScreenCollFormDTO.CustomerIdShowGroup.class, ScreenCollFormDTO.DateIdShowGroup.class); + kcScreenCollService.insertProjectSummary(formDTO); return new Result(); } @@ -225,7 +246,9 @@ public class KcScreenCollController { @PostMapping("project/categorysummary") public Result categorySummary(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO) { - kcScreenCollService.insertCategorySummary(formDTO, customerId); + formDTO.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDTO, ScreenCollFormDTO.CustomerIdShowGroup.class, ScreenCollFormDTO.DateIdShowGroup.class); + kcScreenCollService.insertCategorySummary(formDTO); return new Result(); } @@ -244,7 +267,9 @@ public class KcScreenCollController { @PostMapping("project/satisanalysis") public Result projectSatisanalysis(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO) { - kcScreenCollService.insertProjectSatisanalysis(formDTO, customerId); + formDTO.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDTO, ScreenCollFormDTO.CustomerIdShowGroup.class, ScreenCollFormDTO.MonthIdShowGroup.class); + kcScreenCollService.insertProjectSatisanalysis(formDTO); return new Result(); } @@ -263,7 +288,9 @@ public class KcScreenCollController { @PostMapping("news/summary") public Result newsSummary(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO) { - kcScreenCollService.insertNewsSummary(formDTO, customerId); + formDTO.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDTO, ScreenCollFormDTO.CustomerIdShowGroup.class, ScreenCollFormDTO.DateIdShowGroup.class); + kcScreenCollService.insertNewsSummary(formDTO); return new Result(); } @@ -282,7 +309,9 @@ public class KcScreenCollController { @PostMapping("news/trend") public Result newsTrend(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO) { - kcScreenCollService.insertNewsTrend(formDTO, customerId); + formDTO.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDTO, ScreenCollFormDTO.CustomerIdShowGroup.class, ScreenCollFormDTO.MonthIdShowGroup.class); + kcScreenCollService.insertNewsTrend(formDTO); return new Result(); } @@ -301,7 +330,9 @@ public class KcScreenCollController { @PostMapping("news/hotrank") public Result newsHotRank(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO) { - kcScreenCollService.insertNewsHotRank(formDTO, customerId); + formDTO.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDTO, ScreenCollFormDTO.CustomerIdShowGroup.class, ScreenCollFormDTO.DateIdShowGroup.class); + kcScreenCollService.insertNewsHotRank(formDTO); return new Result(); } @@ -320,7 +351,9 @@ public class KcScreenCollController { @PostMapping("news/categoryanalysis") public Result newsCategoryAnalysis(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO) { - kcScreenCollService.insertNewsCategoryAnalysis(formDTO, customerId); + formDTO.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDTO, ScreenCollFormDTO.CustomerIdShowGroup.class, ScreenCollFormDTO.DateIdShowGroup.class); + kcScreenCollService.insertNewsCategoryAnalysis(formDTO); return new Result(); } @@ -339,7 +372,9 @@ public class KcScreenCollController { @PostMapping("group/summary") public Result groupSummary(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO) { - kcScreenCollService.insertGroupSummary(formDTO, customerId); + formDTO.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDTO, ScreenCollFormDTO.CustomerIdShowGroup.class, ScreenCollFormDTO.DateIdShowGroup.class); + kcScreenCollService.insertGroupSummary(formDTO); return new Result(); } @@ -358,7 +393,9 @@ public class KcScreenCollController { @PostMapping("group/detail") public Result groupDetail(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO) { - kcScreenCollService.insertGroupDetail(formDTO, customerId); + formDTO.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDTO, ScreenCollFormDTO.CustomerIdShowGroup.class, ScreenCollFormDTO.DateIdShowGroup.class); + kcScreenCollService.insertGroupDetail(formDTO); return new Result(); } @@ -377,7 +414,9 @@ public class KcScreenCollController { @PostMapping("group/topictrend") public Result groupTopicTrend(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO) { - kcScreenCollService.insertGroupTopicTrend(formDTO, customerId); + formDTO.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDTO, ScreenCollFormDTO.CustomerIdShowGroup.class, ScreenCollFormDTO.MonthIdShowGroup.class); + kcScreenCollService.insertGroupTopicTrend(formDTO); return new Result(); } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java index 43b6171c05..0af70355e9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java @@ -1,16 +1,14 @@ package com.epmet.controller; -import com.epmet.commons.tools.exception.ValidateException; import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.screen.*; import com.epmet.dto.screen.form.ScreenProjectDataInfoFormDTO; import com.epmet.dto.screen.form.ScreenProjectProcessFormDTO; import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.service.evaluationindex.screen.*; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.util.CollectionUtils; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestHeader; import org.springframework.web.bind.annotation.RequestMapping; @@ -50,10 +48,9 @@ public class ScreenProjectDataCollController { **/ @RequestMapping("quantity-grid-monthly") public Result quantityGridMonthly(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO param) { - if (null == param || CollectionUtils.isEmpty(param.getDataList()) || StringUtils.isBlank(param.getMonthId())) { - throw new ValidateException("参数错误:dataList不能为空且monthId不能为空"); - } - projectQuantityGridMonthlyService.collect(customerId, param); + param.setCustomerId(customerId); + ValidatorUtils.validateEntity(param, ScreenCollFormDTO.CustomerIdShowGroup.class, ScreenCollFormDTO.MonthIdShowGroup.class, ScreenCollFormDTO.DataListShowGroup.class); + projectQuantityGridMonthlyService.collect(param); return new Result(); } @@ -63,10 +60,9 @@ public class ScreenProjectDataCollController { **/ @RequestMapping("quantity-org-monthly") public Result quantityOrgMonthly(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO param) { - if (null == param || CollectionUtils.isEmpty(param.getDataList()) || StringUtils.isBlank(param.getMonthId())) { - throw new ValidateException("参数错误:dataList不能为空且monthId不能为空"); - } - projectQuantityOrgMonthlyService.collect(customerId, param); + param.setCustomerId(customerId); + ValidatorUtils.validateEntity(param, ScreenCollFormDTO.CustomerIdShowGroup.class, ScreenCollFormDTO.MonthIdShowGroup.class, ScreenCollFormDTO.DataListShowGroup.class); + projectQuantityOrgMonthlyService.collect(param); return new Result(); } @@ -76,10 +72,9 @@ public class ScreenProjectDataCollController { **/ @RequestMapping("project-grid-daily") public Result projectGridDaily(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO param) { - if (null == param || CollectionUtils.isEmpty(param.getDataList()) || StringUtils.isBlank(param.getDateId())) { - throw new ValidateException("参数错误:dataList不能为空且dataId不能为空"); - } - projectGridDailyService.collect(customerId, param); + param.setCustomerId(customerId); + ValidatorUtils.validateEntity(param, ScreenCollFormDTO.CustomerIdShowGroup.class, ScreenCollFormDTO.DateIdShowGroup.class, ScreenCollFormDTO.DataListShowGroup.class); + projectGridDailyService.collect(param); return new Result(); } @@ -89,10 +84,9 @@ public class ScreenProjectDataCollController { **/ @RequestMapping("project-org-daily") public Result projectOrgDaily(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO param) { - if (null == param || CollectionUtils.isEmpty(param.getDataList()) || StringUtils.isBlank(param.getDateId())) { - throw new ValidateException("参数错误:dataList不能为空且dataId不能为空"); - } - projectOrgDailyService.collect(customerId, param); + param.setCustomerId(customerId); + ValidatorUtils.validateEntity(param, ScreenCollFormDTO.CustomerIdShowGroup.class, ScreenCollFormDTO.DateIdShowGroup.class, ScreenCollFormDTO.DataListShowGroup.class); + projectOrgDailyService.collect(param); return new Result(); } @@ -107,10 +101,9 @@ public class ScreenProjectDataCollController { */ @RequestMapping("category-grid-daily") public Result categoryGridDaily(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO param) { - if (null == param || CollectionUtils.isEmpty(param.getDataList()) || StringUtils.isBlank(param.getDateId())) { - throw new ValidateException("参数错误:dataList不能为空且dataId不能为空"); - } - projectCategoryGridDailyService.collect(customerId, param); + param.setCustomerId(customerId); + ValidatorUtils.validateEntity(param, ScreenCollFormDTO.CustomerIdShowGroup.class, ScreenCollFormDTO.DateIdShowGroup.class, ScreenCollFormDTO.DataListShowGroup.class); + projectCategoryGridDailyService.collect(param); return new Result(); } @@ -124,10 +117,9 @@ public class ScreenProjectDataCollController { */ @RequestMapping("category-org-daily") public Result categoryOrgDaily(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO param) { - if (null == param || CollectionUtils.isEmpty(param.getDataList()) || StringUtils.isBlank(param.getDateId())) { - throw new ValidateException("参数错误:dataList不能为空且dataId不能为空"); - } - projectCategoryOrgDailyService.collect(customerId, param); + param.setCustomerId(customerId); + ValidatorUtils.validateEntity(param, ScreenCollFormDTO.CustomerIdShowGroup.class, ScreenCollFormDTO.DateIdShowGroup.class, ScreenCollFormDTO.DataListShowGroup.class); + projectCategoryOrgDailyService.collect(param); return new Result(); } //上述两个接口可以有采集接口方便灌假数。后面项目分类统计两个方案A:从项目信息中分析计算到大屏表; B:下面三个子客户(榆山街道、孔村街道、锦水街道)单独上报;子客户根据area_code计算 @@ -140,10 +132,9 @@ public class ScreenProjectDataCollController { */ @RequestMapping("uploadprojectinfo") public Result uploadProjectInfo(@RequestHeader("CustomerId") String customerId,@RequestBody ScreenCollFormDTO param){ - if (null == param || CollectionUtils.isEmpty(param.getDataList()) || StringUtils.isBlank(param.getDateId())) { - throw new ValidateException("参数错误:dataList不能为空且dateId不能为空"); - } - projectDataService.collect(customerId,param); + param.setCustomerId(customerId); + ValidatorUtils.validateEntity(param, ScreenCollFormDTO.CustomerIdShowGroup.class, ScreenCollFormDTO.DateIdShowGroup.class, ScreenCollFormDTO.DataListShowGroup.class); + projectDataService.collect(param); return new Result(); } @@ -155,10 +146,9 @@ public class ScreenProjectDataCollController { */ @RequestMapping("uploadprojectprocess") public Result uploadProjectProcess(@RequestHeader("CustomerId") String customerId,@RequestBody ScreenCollFormDTO param){ - if (null == param || CollectionUtils.isEmpty(param.getDataList()) || StringUtils.isBlank(param.getDateId())) { - throw new ValidateException("参数错误:dataList不能为空且dataId不能为空"); - } - projectProcessService.collect(customerId,param); + param.setCustomerId(customerId); + ValidatorUtils.validateEntity(param, ScreenCollFormDTO.CustomerIdShowGroup.class, ScreenCollFormDTO.DateIdShowGroup.class, ScreenCollFormDTO.DataListShowGroup.class); + projectProcessService.collect(param); return new Result(); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/OfsController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/OfsController.java index ca112ac6a9..33e7c281aa 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/OfsController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/OfsController.java @@ -1,6 +1,7 @@ package com.epmet.controller.plugins; import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.plugins.BidFormDTO; import com.epmet.dto.plugins.ContractFormDTO; import com.epmet.dto.plugins.OneListFormDTO; @@ -32,6 +33,7 @@ public class OfsController { @PostMapping("onelist-daily") public Result collOneList(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO){ formDTO.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDTO, ScreenCollFormDTO.CustomerIdShowGroup.class, ScreenCollFormDTO.DateIdShowGroup.class); ofsService.collOneList(formDTO); return new Result(); } @@ -46,6 +48,7 @@ public class OfsController { @PostMapping("contract-daily") public Result collContract(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO){ formDTO.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDTO, ScreenCollFormDTO.CustomerIdShowGroup.class, ScreenCollFormDTO.DateIdShowGroup.class); ofsService.collContract(formDTO); return new Result(); } @@ -60,6 +63,7 @@ public class OfsController { @PostMapping("bid-daily") public Result collBid(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO){ formDTO.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDTO, ScreenCollFormDTO.CustomerIdShowGroup.class, ScreenCollFormDTO.DateIdShowGroup.class); ofsService.collBid(formDTO); return new Result(); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/WorkRecordColController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/WorkRecordColController.java index 5331ca5cfa..8bbce3e324 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/WorkRecordColController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/WorkRecordColController.java @@ -1,8 +1,7 @@ package com.epmet.controller.plugins; -import com.alibaba.fastjson.JSON; -import com.epmet.commons.tools.exception.ValidateException; import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.plugins.ScreenCustomerWorkRecordDictDTO; import com.epmet.dto.plugins.ScreenWorkRecordCommonFormDTO; import com.epmet.dto.screencoll.ScreenCollFormDTO; @@ -10,9 +9,7 @@ import com.epmet.service.plugins.ScreenCustomerWorkRecordDictService; import com.epmet.service.plugins.ScreenWorkRecordOrgDailyService; import com.epmet.service.plugins.ScreenWorkRecordOrgMonthlyService; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.util.CollectionUtils; import org.springframework.web.bind.annotation.*; /** @@ -44,13 +41,9 @@ public class WorkRecordColController { */ @PostMapping("resource-dict") public Result resourceDict(@RequestHeader("CustomerId")String customerId, @RequestBody ScreenCollFormDTO data){ - if(StringUtils.isBlank(customerId) || CollectionUtils.isEmpty(data.getDataList()) || - StringUtils.isBlank(data.getDateId())) { - log.error("com.epmet.controller.plugins.WorkRecordColController.resourceDict,param:{}", JSON.toJSONString(data)); - throw new ValidateException("客户Id、上传数据列表、日期Id不可为空"); - } - // log.info("【工作日志】客户资源字典信息上传"+JSON.toJSONString(data,true)); - dictService.collect(customerId,data); + data.setCustomerId(customerId); + ValidatorUtils.validateEntity(data, ScreenCollFormDTO.CustomerIdShowGroup.class, ScreenCollFormDTO.DateIdShowGroup.class, ScreenCollFormDTO.DataListShowGroup.class); + dictService.collect(data); return new Result(); } @@ -64,13 +57,9 @@ public class WorkRecordColController { */ @PostMapping("org-monthly") public Result collectOrg(@RequestHeader("CustomerId")String customerId, @RequestBody ScreenCollFormDTO data){ - if(StringUtils.isBlank(customerId) || CollectionUtils.isEmpty(data.getDataList()) || - StringUtils.isBlank(data.getMonthId())) { - log.error("com.epmet.controller.plugins.WorkRecordColController.collectOrg,param:{}", JSON.toJSONString(data)); - throw new ValidateException("客户Id、上传数据列表、月份Id不可为空"); - } - // log.info("【工作日志】组织按月统计"+JSON.toJSONString(data,true)); - screenWorkRecordOrgMonthlyService.collect(customerId,data); + data.setCustomerId(customerId); + ValidatorUtils.validateEntity(data, ScreenCollFormDTO.CustomerIdShowGroup.class, ScreenCollFormDTO.MonthIdShowGroup.class, ScreenCollFormDTO.DataListShowGroup.class); + screenWorkRecordOrgMonthlyService.collect(data); return new Result(); } @@ -84,13 +73,9 @@ public class WorkRecordColController { */ @PostMapping("org-daily") public Result collectOrgDaily(@RequestHeader("CustomerId")String customerId, @RequestBody ScreenCollFormDTO data){ - if(StringUtils.isBlank(customerId) || CollectionUtils.isEmpty(data.getDataList()) || - StringUtils.isBlank(data.getDateId())) { - log.error("com.epmet.controller.plugins.WorkRecordColController.collectOrgDaily,param:{}", JSON.toJSONString(data)); - throw new ValidateException("客户Id、上传数据列表、日期Id不可为空"); - } - // log.info("【工作日志】组织按日统计 累计值"+JSON.toJSONString(data,true)); - screenWorkRecordOrgDailyService.collectOrgDaily(customerId,data); + data.setCustomerId(customerId); + ValidatorUtils.validateEntity(data, ScreenCollFormDTO.CustomerIdShowGroup.class, ScreenCollFormDTO.DateIdShowGroup.class, ScreenCollFormDTO.DataListShowGroup.class); + screenWorkRecordOrgDailyService.collectOrgDaily(data); return new Result(); } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/KcScreenCollService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/KcScreenCollService.java index 492a951156..5eaca5388c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/KcScreenCollService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/KcScreenCollService.java @@ -17,12 +17,11 @@ public interface KcScreenCollService { * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false * * @param formDTO - * @param customerId * @return void * @Author zhangyong * @Date 15:57 2020-09-09 **/ - void insertPlatFormSummary(ScreenCollFormDTO formDTO, String customerId); + void insertPlatFormSummary(ScreenCollFormDTO formDTO); /** * 2、议题分析-各类总数 @@ -30,12 +29,11 @@ public interface KcScreenCollService { * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false * * @param formDTO - * @param customerId * @return void * @Author zhangyong * @Date 15:57 2020-09-09 **/ - void insertIssueSummary(ScreenCollFormDTO formDTO, String customerId); + void insertIssueSummary(ScreenCollFormDTO formDTO); /** * 3、议题分析-参与趋势 @@ -43,12 +41,11 @@ public interface KcScreenCollService { * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false * * @param formDTO - * @param customerId * @return void * @Author zhangyong * @Date 15:57 2020-09-09 **/ - void insertIssueTrend(ScreenCollFormDTO formDTO, String customerId); + void insertIssueTrend(ScreenCollFormDTO formDTO); /** * 4、用户分析-各类总数 @@ -56,12 +53,11 @@ public interface KcScreenCollService { * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false * * @param formDTO - * @param customerId * @return void * @Author zhangyong * @Date 15:57 2020-09-09 **/ - void insertUserSummary(ScreenCollFormDTO formDTO, String customerId); + void insertUserSummary(ScreenCollFormDTO formDTO); /** * 5、公益互助-志愿者公益时长排名 @@ -69,12 +65,11 @@ public interface KcScreenCollService { * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false * * @param formDTO - * @param customerId * @return void * @Author zhangyong * @Date 15:57 2020-09-09 **/ - void insertVolunteerHeartRank(ScreenCollFormDTO formDTO, String customerId); + void insertVolunteerHeartRank(ScreenCollFormDTO formDTO); /** * 6、用户分析-用户趋势 @@ -82,12 +77,11 @@ public interface KcScreenCollService { * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false * * @param formDTO - * @param customerId * @return void * @Author zhangyong * @Date 15:57 2020-09-09 **/ - void insertUserHeartRank(ScreenCollFormDTO formDTO, String customerId); + void insertUserHeartRank(ScreenCollFormDTO formDTO); /** * 7、公益互助-活动各类总数 @@ -95,12 +89,11 @@ public interface KcScreenCollService { * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false * * @param formDTO - * @param customerId * @return void * @Author zhangyong * @Date 15:57 2020-09-09 **/ - void insertActSummary(ScreenCollFormDTO formDTO, String customerId); + void insertActSummary(ScreenCollFormDTO formDTO); /** * 8、公益互助-活动次数趋势 @@ -108,12 +101,11 @@ public interface KcScreenCollService { * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false * * @param formDTO - * @param customerId * @return void * @Author zhangyong * @Date 15:57 2020-09-09 **/ - void insertActTrend(ScreenCollFormDTO formDTO, String customerId); + void insertActTrend(ScreenCollFormDTO formDTO); /** * 9、公益互助-志愿者画像 @@ -121,12 +113,11 @@ public interface KcScreenCollService { * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false * * @param formDTO - * @param customerId * @return void * @Author zhangyong * @Date 15:57 2020-09-09 **/ - void insertVolunteerSummary(ScreenCollFormDTO formDTO, String customerId); + void insertVolunteerSummary(ScreenCollFormDTO formDTO); /** * 10、项目分析-各类总数 @@ -134,12 +125,11 @@ public interface KcScreenCollService { * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false * * @param formDTO - * @param customerId * @return void * @Author zhangyong * @Date 15:57 2020-09-09 **/ - void insertProjectSummary(ScreenCollFormDTO formDTO, String customerId); + void insertProjectSummary(ScreenCollFormDTO formDTO); /** * 11、项目分析-按分类统计 @@ -147,12 +137,11 @@ public interface KcScreenCollService { * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false * * @param formDTO - * @param customerId * @return void * @Author zhangyong * @Date 15:57 2020-09-09 **/ - void insertCategorySummary(ScreenCollFormDTO formDTO, String customerId); + void insertCategorySummary(ScreenCollFormDTO formDTO); /** * 12、项目分析-满意度分析 @@ -160,12 +149,11 @@ public interface KcScreenCollService { * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false * * @param formDTO - * @param customerId * @return void * @Author zhangyong * @Date 15:57 2020-09-09 **/ - void insertProjectSatisanalysis(ScreenCollFormDTO formDTO, String customerId); + void insertProjectSatisanalysis(ScreenCollFormDTO formDTO); /** * 13、党建声音-新闻各类总数汇总 @@ -173,12 +161,11 @@ public interface KcScreenCollService { * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false * * @param formDTO - * @param customerId * @return void * @Author zhangyong * @Date 15:57 2020-09-09 **/ - void insertNewsSummary(ScreenCollFormDTO formDTO, String customerId); + void insertNewsSummary(ScreenCollFormDTO formDTO); /** * 14、党建声音-新闻阅读参与趋势 @@ -186,12 +173,11 @@ public interface KcScreenCollService { * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false * * @param formDTO - * @param customerId * @return void * @Author zhangyong * @Date 15:57 2020-09-09 **/ - void insertNewsTrend(ScreenCollFormDTO formDTO, String customerId); + void insertNewsTrend(ScreenCollFormDTO formDTO); /** * 15、党建声音-热度新闻排行 @@ -199,12 +185,11 @@ public interface KcScreenCollService { * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false * * @param formDTO - * @param customerId * @return void * @Author zhangyong * @Date 15:57 2020-09-09 **/ - void insertNewsHotRank(ScreenCollFormDTO formDTO, String customerId); + void insertNewsHotRank(ScreenCollFormDTO formDTO); /** * 16、党建声音-新闻按类别统计 @@ -212,12 +197,11 @@ public interface KcScreenCollService { * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false * * @param formDTO - * @param customerId * @return void * @Author zhangyong * @Date 15:57 2020-09-09 **/ - void insertNewsCategoryAnalysis(ScreenCollFormDTO formDTO, String customerId); + void insertNewsCategoryAnalysis(ScreenCollFormDTO formDTO); /** * 17、邻里党群-各类总数汇总 @@ -225,12 +209,11 @@ public interface KcScreenCollService { * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false * * @param formDTO - * @param customerId * @return void * @Author zhangyong * @Date 15:57 2020-09-09 **/ - void insertGroupSummary(ScreenCollFormDTO formDTO, String customerId); + void insertGroupSummary(ScreenCollFormDTO formDTO); /** * 18、邻里党群-小组详情 @@ -238,12 +221,11 @@ public interface KcScreenCollService { * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false * * @param formDTO - * @param customerId * @return void * @Author zhangyong * @Date 15:57 2020-09-09 **/ - void insertGroupDetail(ScreenCollFormDTO formDTO, String customerId); + void insertGroupDetail(ScreenCollFormDTO formDTO); /** * 19、邻里党群-话题参与趋势 @@ -251,10 +233,9 @@ public interface KcScreenCollService { * 所以如果项目上是分批上传,第一次为isFirst=true,后面isFirst应为false * * @param formDTO - * @param customerId * @return void * @Author zhangyong * @Date 15:57 2020-09-09 **/ - void insertGroupTopicTrend(ScreenCollFormDTO formDTO, String customerId); + void insertGroupTopicTrend(ScreenCollFormDTO formDTO); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectCategoryGridDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectCategoryGridDailyService.java index 5306e7f73b..da711d85e3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectCategoryGridDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectCategoryGridDailyService.java @@ -98,9 +98,8 @@ public interface ScreenProjectCategoryGridDailyService extends BaseService param); + void collect(ScreenCollFormDTO param); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectCategoryOrgDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectCategoryOrgDailyService.java index 005232d59a..ce71722794 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectCategoryOrgDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectCategoryOrgDailyService.java @@ -98,9 +98,8 @@ public interface ScreenProjectCategoryOrgDailyService extends BaseService param); + void collect(ScreenCollFormDTO param); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectDataService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectDataService.java index 82d296a1a3..1db733c72c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectDataService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectDataService.java @@ -95,5 +95,5 @@ public interface ScreenProjectDataService extends BaseService param); + void collect(ScreenCollFormDTO param); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectGridDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectGridDailyService.java index 2b710cefb3..7702f0cfd1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectGridDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectGridDailyService.java @@ -96,13 +96,12 @@ public interface ScreenProjectGridDailyService extends BaseService data); + void collect(ScreenCollFormDTO data); /** * @Description 数据抽取【网格-日】 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectOrgDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectOrgDailyService.java index 587a6eef72..ee1f4bf1e7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectOrgDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectOrgDailyService.java @@ -96,13 +96,12 @@ public interface ScreenProjectOrgDailyService extends BaseService data); + void collect(ScreenCollFormDTO data); /** * @Description 数据抽取【机关-日】 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectProcessService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectProcessService.java index f4b050fe13..986161a667 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectProcessService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectProcessService.java @@ -95,5 +95,5 @@ public interface ScreenProjectProcessService extends BaseService param); + void collect(ScreenCollFormDTO param); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectQuantityGridMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectQuantityGridMonthlyService.java index 6d5e5b909d..da29112ad7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectQuantityGridMonthlyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectQuantityGridMonthlyService.java @@ -95,13 +95,12 @@ public interface ScreenProjectQuantityGridMonthlyService extends BaseService data); + void collect(ScreenCollFormDTO data); /** * @Description 数据抽取 【网格-月】 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyService.java index 88c451bcfc..6088a6dba4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectQuantityOrgMonthlyService.java @@ -96,13 +96,12 @@ public interface ScreenProjectQuantityOrgMonthlyService extends BaseService data); + void collect(ScreenCollFormDTO data); /** * @Description 数据抽取【组织-月】 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/KcScreenCollServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/KcScreenCollServiceImpl.java index 2e4abd79df..dc3bed6bd7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/KcScreenCollServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/KcScreenCollServiceImpl.java @@ -82,285 +82,285 @@ public class KcScreenCollServiceImpl implements KcScreenCollService { @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) - public void insertPlatFormSummary(ScreenCollFormDTO formDTO, String customerId) { + public void insertPlatFormSummary(ScreenCollFormDTO formDTO) { if (formDTO.getIsFirst()) { int deleteNum; do { - deleteNum = screenKcPlatformSummaryDailyDao.deletePlatFormSummary(customerId, formDTO.getDateId()); + deleteNum = screenKcPlatformSummaryDailyDao.deletePlatFormSummary(formDTO.getCustomerId(), formDTO.getDateId()); } while (deleteNum > NumConstant.ZERO); } if (!CollectionUtils.isEmpty(formDTO.getDataList())) { - screenKcPlatformSummaryDailyDao.batchInsertPlatFormSummary(formDTO.getDataList(), customerId, formDTO.getDateId()); + screenKcPlatformSummaryDailyDao.batchInsertPlatFormSummary(formDTO.getDataList(), formDTO.getCustomerId(), formDTO.getDateId()); } } @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) - public void insertIssueSummary(ScreenCollFormDTO formDTO, String customerId) { + public void insertIssueSummary(ScreenCollFormDTO formDTO) { if (formDTO.getIsFirst()) { int deleteNum; do { - deleteNum = screenKcIssueSummaryGridDailyDao.deleteIssueSummaryGrid(customerId, formDTO.getDateId()); + deleteNum = screenKcIssueSummaryGridDailyDao.deleteIssueSummaryGrid(formDTO.getCustomerId(), formDTO.getDateId()); } while (deleteNum > NumConstant.ZERO); } if (!CollectionUtils.isEmpty(formDTO.getDataList())) { - screenKcIssueSummaryGridDailyDao.batchInsertIssueSummaryGrid(formDTO.getDataList(), customerId, formDTO.getDateId()); + screenKcIssueSummaryGridDailyDao.batchInsertIssueSummaryGrid(formDTO.getDataList(), formDTO.getCustomerId(), formDTO.getDateId()); } } @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) - public void insertIssueTrend(ScreenCollFormDTO formDTO, String customerId) { + public void insertIssueTrend(ScreenCollFormDTO formDTO) { if (formDTO.getIsFirst()) { int deleteNum; do { - deleteNum = screenKcIssueTrendGridMonthlyDao.deleteIssueTrendGrid(customerId, formDTO.getMonthId()); + deleteNum = screenKcIssueTrendGridMonthlyDao.deleteIssueTrendGrid(formDTO.getCustomerId(), formDTO.getMonthId()); } while (deleteNum > NumConstant.ZERO); } if (!CollectionUtils.isEmpty(formDTO.getDataList())) { - screenKcIssueTrendGridMonthlyDao.batchInsertIssueTrendGrid(formDTO.getDataList(), customerId, formDTO.getMonthId()); + screenKcIssueTrendGridMonthlyDao.batchInsertIssueTrendGrid(formDTO.getDataList(), formDTO.getCustomerId(), formDTO.getMonthId()); } } @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) - public void insertUserSummary(ScreenCollFormDTO formDTO, String customerId) { + public void insertUserSummary(ScreenCollFormDTO formDTO) { if (formDTO.getIsFirst()) { int deleteNum; do { - deleteNum = screenKcUserSummaryDailyDao.deleteUserSummary(customerId, formDTO.getDateId()); + deleteNum = screenKcUserSummaryDailyDao.deleteUserSummary(formDTO.getCustomerId(), formDTO.getDateId()); } while (deleteNum > NumConstant.ZERO); } if (!CollectionUtils.isEmpty(formDTO.getDataList())) { - screenKcUserSummaryDailyDao.batchInsertUserSummary(formDTO.getDataList(), customerId, formDTO.getDateId()); + screenKcUserSummaryDailyDao.batchInsertUserSummary(formDTO.getDataList(), formDTO.getCustomerId(), formDTO.getDateId()); } } @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) - public void insertVolunteerHeartRank(ScreenCollFormDTO formDTO, String customerId) { + public void insertVolunteerHeartRank(ScreenCollFormDTO formDTO) { if (formDTO.getIsFirst()) { int deleteNum; do { - deleteNum = screenKcVolunteerHeatRankGridDailyDao.deleteVolunteerHeatRankGrid(customerId); + deleteNum = screenKcVolunteerHeatRankGridDailyDao.deleteVolunteerHeatRankGrid(formDTO.getCustomerId()); } while (deleteNum > NumConstant.ZERO); } if (!CollectionUtils.isEmpty(formDTO.getDataList())) { - screenKcVolunteerHeatRankGridDailyDao.batchInsertVolunteerHeatRankGrid(formDTO.getDataList(), customerId, formDTO.getDateId()); + screenKcVolunteerHeatRankGridDailyDao.batchInsertVolunteerHeatRankGrid(formDTO.getDataList(), formDTO.getCustomerId(), formDTO.getDateId()); } } @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) - public void insertUserHeartRank(ScreenCollFormDTO formDTO, String customerId) { + public void insertUserHeartRank(ScreenCollFormDTO formDTO) { if (formDTO.getIsFirst()) { int deleteNum; do { - deleteNum = screenKcUserTrendGridMonthlyDao.deleteUserTrendGrid(customerId, formDTO.getMonthId()); + deleteNum = screenKcUserTrendGridMonthlyDao.deleteUserTrendGrid(formDTO.getCustomerId(), formDTO.getMonthId()); } while (deleteNum > NumConstant.ZERO); } if (!CollectionUtils.isEmpty(formDTO.getDataList())) { - screenKcUserTrendGridMonthlyDao.batchInsertUserTrendGrid(formDTO.getDataList(), customerId, formDTO.getMonthId()); + screenKcUserTrendGridMonthlyDao.batchInsertUserTrendGrid(formDTO.getDataList(), formDTO.getCustomerId(), formDTO.getMonthId()); } } @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) - public void insertActSummary(ScreenCollFormDTO formDTO, String customerId) { + public void insertActSummary(ScreenCollFormDTO formDTO) { if (formDTO.getIsFirst()) { int deleteNum; do { - deleteNum = screenKcActSummaryDailyDao.deleteActSummary(customerId, formDTO.getDateId()); + deleteNum = screenKcActSummaryDailyDao.deleteActSummary(formDTO.getCustomerId(), formDTO.getDateId()); } while (deleteNum > NumConstant.ZERO); } if (!CollectionUtils.isEmpty(formDTO.getDataList())) { - screenKcActSummaryDailyDao.batchInsertActSummary(formDTO.getDataList(), customerId, formDTO.getDateId()); + screenKcActSummaryDailyDao.batchInsertActSummary(formDTO.getDataList(), formDTO.getCustomerId(), formDTO.getDateId()); } } @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) - public void insertActTrend(ScreenCollFormDTO formDTO, String customerId) { + public void insertActTrend(ScreenCollFormDTO formDTO) { if (formDTO.getIsFirst()) { int deleteNum; do { - deleteNum = screenKcActTrendMonthlyDao.deleteActTrend(customerId, formDTO.getMonthId()); + deleteNum = screenKcActTrendMonthlyDao.deleteActTrend(formDTO.getCustomerId(), formDTO.getMonthId()); } while (deleteNum > NumConstant.ZERO); } if (!CollectionUtils.isEmpty(formDTO.getDataList())) { - screenKcActTrendMonthlyDao.batchInsertActTrend(formDTO.getDataList(), customerId, formDTO.getMonthId()); + screenKcActTrendMonthlyDao.batchInsertActTrend(formDTO.getDataList(), formDTO.getCustomerId(), formDTO.getMonthId()); } } @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) - public void insertVolunteerSummary(ScreenCollFormDTO formDTO, String customerId) { + public void insertVolunteerSummary(ScreenCollFormDTO formDTO) { if (formDTO.getIsFirst()) { int deleteNum; do { - deleteNum = screenKcVolunteerSummaryDailyDao.deleteVolunteerSummary(customerId, formDTO.getDateId()); + deleteNum = screenKcVolunteerSummaryDailyDao.deleteVolunteerSummary(formDTO.getCustomerId(), formDTO.getDateId()); } while (deleteNum > NumConstant.ZERO); } if (!CollectionUtils.isEmpty(formDTO.getDataList())) { - screenKcVolunteerSummaryDailyDao.batchInsertVolunteerSummary(formDTO.getDataList(), customerId, formDTO.getDateId()); + screenKcVolunteerSummaryDailyDao.batchInsertVolunteerSummary(formDTO.getDataList(), formDTO.getCustomerId(), formDTO.getDateId()); } } @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) - public void insertProjectSummary(ScreenCollFormDTO formDTO, String customerId) { + public void insertProjectSummary(ScreenCollFormDTO formDTO) { if (formDTO.getIsFirst()) { int deleteNum; do { - deleteNum = screenKcProjectSummaryGridDailyDao.deleteProjectSummary(customerId, formDTO.getDateId()); + deleteNum = screenKcProjectSummaryGridDailyDao.deleteProjectSummary(formDTO.getCustomerId(), formDTO.getDateId()); } while (deleteNum > NumConstant.ZERO); } if (!CollectionUtils.isEmpty(formDTO.getDataList())) { - screenKcProjectSummaryGridDailyDao.batchInsertProjectSummary(formDTO.getDataList(), customerId, formDTO.getDateId()); + screenKcProjectSummaryGridDailyDao.batchInsertProjectSummary(formDTO.getDataList(), formDTO.getCustomerId(), formDTO.getDateId()); } } @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) - public void insertCategorySummary(ScreenCollFormDTO formDTO, String customerId) { + public void insertCategorySummary(ScreenCollFormDTO formDTO) { if (formDTO.getIsFirst()) { int deleteNum; do { - deleteNum = screenKcProjectCategoryGridDailyDao.deleteCategoryGrid(customerId, formDTO.getDateId()); + deleteNum = screenKcProjectCategoryGridDailyDao.deleteCategoryGrid(formDTO.getCustomerId(), formDTO.getDateId()); } while (deleteNum > NumConstant.ZERO); } if (!CollectionUtils.isEmpty(formDTO.getDataList())) { - screenKcProjectCategoryGridDailyDao.batchInsertCategoryGrid(formDTO.getDataList(), customerId, formDTO.getDateId()); + screenKcProjectCategoryGridDailyDao.batchInsertCategoryGrid(formDTO.getDataList(), formDTO.getCustomerId(), formDTO.getDateId()); } } @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) - public void insertProjectSatisanalysis(ScreenCollFormDTO formDTO, String customerId) { + public void insertProjectSatisanalysis(ScreenCollFormDTO formDTO) { if (formDTO.getIsFirst()) { int deleteNum; do { - deleteNum = screenKcProjectSatisGridMonthlyDao.deleteProjectSatisGrid(customerId, formDTO.getMonthId()); + deleteNum = screenKcProjectSatisGridMonthlyDao.deleteProjectSatisGrid(formDTO.getCustomerId(), formDTO.getMonthId()); } while (deleteNum > NumConstant.ZERO); } if (!CollectionUtils.isEmpty(formDTO.getDataList())) { - screenKcProjectSatisGridMonthlyDao.batchInsertProjectSatisGrid(formDTO.getDataList(), customerId, formDTO.getMonthId()); + screenKcProjectSatisGridMonthlyDao.batchInsertProjectSatisGrid(formDTO.getDataList(), formDTO.getCustomerId(), formDTO.getMonthId()); } } @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) - public void insertNewsSummary(ScreenCollFormDTO formDTO, String customerId) { + public void insertNewsSummary(ScreenCollFormDTO formDTO) { if (formDTO.getIsFirst()) { int deleteNum; do { - deleteNum = screenKcNewsSummaryDailyDao.deleteNewsSummary(customerId, formDTO.getDateId()); + deleteNum = screenKcNewsSummaryDailyDao.deleteNewsSummary(formDTO.getCustomerId(), formDTO.getDateId()); } while (deleteNum > NumConstant.ZERO); } if (!CollectionUtils.isEmpty(formDTO.getDataList())) { - screenKcNewsSummaryDailyDao.batchInsertNewsSummary(formDTO.getDataList(), customerId, formDTO.getDateId()); + screenKcNewsSummaryDailyDao.batchInsertNewsSummary(formDTO.getDataList(), formDTO.getCustomerId(), formDTO.getDateId()); } } @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) - public void insertNewsTrend(ScreenCollFormDTO formDTO, String customerId) { + public void insertNewsTrend(ScreenCollFormDTO formDTO) { if (formDTO.getIsFirst()) { int deleteNum; do { - deleteNum = screenKcNewsTrendMonthlyDao.deleteNewsTrend(customerId, formDTO.getMonthId()); + deleteNum = screenKcNewsTrendMonthlyDao.deleteNewsTrend(formDTO.getCustomerId(), formDTO.getMonthId()); } while (deleteNum > NumConstant.ZERO); } if (!CollectionUtils.isEmpty(formDTO.getDataList())) { - screenKcNewsTrendMonthlyDao.batchInsertNewsTrend(formDTO.getDataList(), customerId, formDTO.getMonthId()); + screenKcNewsTrendMonthlyDao.batchInsertNewsTrend(formDTO.getDataList(), formDTO.getCustomerId(), formDTO.getMonthId()); } } @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) - public void insertNewsHotRank(ScreenCollFormDTO formDTO, String customerId) { + public void insertNewsHotRank(ScreenCollFormDTO formDTO) { if (formDTO.getIsFirst()) { int deleteNum; do { - deleteNum = screenKcNewsRankDao.deleteNewsRank(customerId); + deleteNum = screenKcNewsRankDao.deleteNewsRank(formDTO.getCustomerId()); } while (deleteNum > NumConstant.ZERO); } if (!CollectionUtils.isEmpty(formDTO.getDataList())) { - screenKcNewsRankDao.batchInsertNewsRank(formDTO.getDataList(), customerId, formDTO.getDateId()); + screenKcNewsRankDao.batchInsertNewsRank(formDTO.getDataList(), formDTO.getCustomerId(), formDTO.getDateId()); } } @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) - public void insertNewsCategoryAnalysis(ScreenCollFormDTO formDTO, String customerId) { + public void insertNewsCategoryAnalysis(ScreenCollFormDTO formDTO) { if (formDTO.getIsFirst()) { int deleteNum; do { - deleteNum = screenKcNewsCategoryAnalysisDao.deleteNewsCategoryAnalysis(customerId, formDTO.getDateId()); + deleteNum = screenKcNewsCategoryAnalysisDao.deleteNewsCategoryAnalysis(formDTO.getCustomerId(), formDTO.getDateId()); } while (deleteNum > NumConstant.ZERO); } if (!CollectionUtils.isEmpty(formDTO.getDataList())) { - screenKcNewsCategoryAnalysisDao.batchInsertNewsCategoryAnalysis(formDTO.getDataList(), customerId, formDTO.getDateId()); + screenKcNewsCategoryAnalysisDao.batchInsertNewsCategoryAnalysis(formDTO.getDataList(), formDTO.getCustomerId(), formDTO.getDateId()); } } @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) - public void insertGroupSummary(ScreenCollFormDTO formDTO, String customerId) { + public void insertGroupSummary(ScreenCollFormDTO formDTO) { if (formDTO.getIsFirst()) { int deleteNum; do { - deleteNum = screenKcGroupSummaryGridDailyDao.deleteGroupSummaryGrid(customerId, formDTO.getDateId()); + deleteNum = screenKcGroupSummaryGridDailyDao.deleteGroupSummaryGrid(formDTO.getCustomerId(), formDTO.getDateId()); } while (deleteNum > NumConstant.ZERO); } if (!CollectionUtils.isEmpty(formDTO.getDataList())) { - screenKcGroupSummaryGridDailyDao.batchInsertGroupSummaryGrid(formDTO.getDataList(), customerId, formDTO.getDateId()); + screenKcGroupSummaryGridDailyDao.batchInsertGroupSummaryGrid(formDTO.getDataList(), formDTO.getCustomerId(), formDTO.getDateId()); } } @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) - public void insertGroupDetail(ScreenCollFormDTO formDTO, String customerId) { + public void insertGroupDetail(ScreenCollFormDTO formDTO) { if (formDTO.getIsFirst()) { int deleteNum; do { - deleteNum = screenKcGroupDetailGridDailyDao.deleteGroupDetailGrid(customerId, formDTO.getDateId()); + deleteNum = screenKcGroupDetailGridDailyDao.deleteGroupDetailGrid(formDTO.getCustomerId(), formDTO.getDateId()); } while (deleteNum > NumConstant.ZERO); } if (!CollectionUtils.isEmpty(formDTO.getDataList())) { - screenKcGroupDetailGridDailyDao.batchInsertGroupDetailGrid(formDTO.getDataList(), customerId, formDTO.getDateId()); + screenKcGroupDetailGridDailyDao.batchInsertGroupDetailGrid(formDTO.getDataList(), formDTO.getCustomerId(), formDTO.getDateId()); } } @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) - public void insertGroupTopicTrend(ScreenCollFormDTO formDTO, String customerId) { + public void insertGroupTopicTrend(ScreenCollFormDTO formDTO) { if (formDTO.getIsFirst()) { int deleteNum; do { - deleteNum = screenKcTopicTrendGridMonthlyDao.deleteTopicTrendGrid(customerId, formDTO.getMonthId()); + deleteNum = screenKcTopicTrendGridMonthlyDao.deleteTopicTrendGrid(formDTO.getCustomerId(), formDTO.getMonthId()); } while (deleteNum > NumConstant.ZERO); } if (!CollectionUtils.isEmpty(formDTO.getDataList())) { - screenKcTopicTrendGridMonthlyDao.batchInsertTopicTrendGrid(formDTO.getDataList(), customerId, formDTO.getMonthId()); + screenKcTopicTrendGridMonthlyDao.batchInsertTopicTrendGrid(formDTO.getDataList(), formDTO.getCustomerId(), formDTO.getMonthId()); } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java index 70ce72a036..acc891ac1a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java @@ -21,19 +21,17 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.constant.DataSourceConstant; import com.epmet.dao.evaluationindex.screen.ScreenProjectCategoryGridDailyDao; import com.epmet.dto.screen.ScreenProjectCategoryGridDailyDTO; import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.entity.evaluationindex.screen.ScreenProjectCategoryGridDailyEntity; import com.epmet.service.evaluationindex.screen.ScreenProjectCategoryGridDailyService; -import com.google.common.collect.Lists; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; @@ -108,23 +106,22 @@ public class ScreenProjectCategoryGridDailyServiceImpl extends BaseServiceImpl param) { + public void collect(ScreenCollFormDTO param) { if(param.getIsFirst()){ int deleteNum; do { - deleteNum = baseDao.deleteByDateIdAndCustomerId(customerId,param.getDateId()); + deleteNum = baseDao.deleteByDateIdAndCustomerId(param.getCustomerId(),param.getDateId()); } while (deleteNum > NumConstant.ZERO); } if (!CollectionUtils.isEmpty(param.getDataList())) { param.getDataList().forEach(item -> { - item.setCustomerId(customerId); + item.setCustomerId(param.getCustomerId()); item.setDateId(param.getDateId()); }); insertBatch(ConvertUtils.sourceToTarget(param.getDataList(), ScreenProjectCategoryGridDailyEntity.class)); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java index 290b30cf74..5660fad150 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java @@ -107,23 +107,22 @@ public class ScreenProjectCategoryOrgDailyServiceImpl extends BaseServiceImpl param) { + public void collect(ScreenCollFormDTO param) { if(param.getIsFirst()){ int deleteNum; do { - deleteNum = baseDao.deleteByDateIdAndCustomerId(customerId,param.getDateId()); + deleteNum = baseDao.deleteByDateIdAndCustomerId(param.getCustomerId(),param.getDateId()); } while (deleteNum > NumConstant.ZERO); } if (!CollectionUtils.isEmpty(param.getDataList())) { param.getDataList().forEach(item -> { - item.setCustomerId(customerId); + item.setCustomerId(param.getCustomerId()); item.setDateId(param.getDateId()); }); Lists.partition(param.getDataList(), NumConstant.ONE_HUNDRED).forEach(list -> { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java index cd6117ce6c..d74577768f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java @@ -21,21 +21,19 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; -import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.constant.DataSourceConstant; import com.epmet.dao.evaluationindex.screen.*; import com.epmet.dto.screen.ScreenProjectDataDTO; import com.epmet.dto.screen.form.ScreenProjectDataInfoFormDTO; import com.epmet.dto.screencoll.ScreenCollFormDTO; -import com.epmet.entity.evaluationindex.screen.*; -import com.epmet.service.evaluationindex.screen.*; -import com.google.common.collect.Lists; +import com.epmet.entity.evaluationindex.screen.ScreenProjectDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenProjectImgDataEntity; +import com.epmet.service.evaluationindex.screen.ScreenProjectDataService; import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -120,11 +118,11 @@ public class ScreenProjectDataServiceImpl extends BaseServiceImpl param) { + public void collect(ScreenCollFormDTO param) { if (param.getIsFirst()) { - int affectedRows = baseDao.deleteByDateIdAndCustomerId(customerId, param.getDateId()); + int affectedRows = baseDao.deleteByDateIdAndCustomerId(param.getCustomerId(), param.getDateId()); while (affectedRows > 0) { - affectedRows = baseDao.deleteByDateIdAndCustomerId(customerId, param.getDateId()); + affectedRows = baseDao.deleteByDateIdAndCustomerId(param.getCustomerId(), param.getDateId()); } } SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); @@ -177,11 +175,11 @@ public class ScreenProjectDataServiceImpl extends BaseServiceImpl deleteWrapper = new QueryWrapper<>(); deleteWrapper.eq(StringUtils.isNotBlank(item.getProjectId()), "project_id", item.getProjectId()) - .eq(StringUtils.isNotBlank(customerId), "customer_id", customerId); + .eq(StringUtils.isNotBlank(param.getCustomerId()), "customer_id", param.getCustomerId()); baseDao.delete(deleteWrapper); QueryWrapper screenProjectImgDataEntityQueryWrapper = new QueryWrapper<>(); screenProjectImgDataEntityQueryWrapper.eq(StringUtils.isNotBlank(item.getProjectId()), "project_id", item.getProjectId()) - .eq(StringUtils.isNotBlank(customerId), "customer_id", customerId); + .eq(StringUtils.isNotBlank(param.getCustomerId()), "customer_id", param.getCustomerId()); screenProjectImgDataDao.delete(screenProjectImgDataEntityQueryWrapper); //如果orgType未知,获取一下 @@ -204,7 +202,7 @@ public class ScreenProjectDataServiceImpl extends BaseServiceImpl data) { + public void collect(ScreenCollFormDTO data) { if(data.getIsFirst()){ - int affectedRows = baseDao.deleteByDateIdAndCustomerId(customerId,data.getDateId()); + int affectedRows = baseDao.deleteByDateIdAndCustomerId(data.getCustomerId(),data.getDateId()); while(affectedRows > 0){ - affectedRows = baseDao.deleteByDateIdAndCustomerId(customerId,data.getDateId()); + affectedRows = baseDao.deleteByDateIdAndCustomerId(data.getCustomerId(),data.getDateId()); } } Lists.partition(data.getDataList(), NumConstant.ONE_HUNDRED).forEach(list -> { - baseDao.insertBatch(list,customerId,"APP_USER",data.getDateId()); + baseDao.insertBatch(list,data.getCustomerId(),"APP_USER",data.getDateId()); }); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectOrgDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectOrgDailyServiceImpl.java index b5c71b558b..98fc2f38f7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectOrgDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectOrgDailyServiceImpl.java @@ -125,7 +125,6 @@ public class ScreenProjectOrgDailyServiceImpl extends BaseServiceImpl data) { + public void collect(ScreenCollFormDTO data) { if(data.getIsFirst()){ - int affectedRows = baseDao.deleteByDateIdAndCustomerId(customerId,data.getDateId()); + int affectedRows = baseDao.deleteByDateIdAndCustomerId(data.getCustomerId(),data.getDateId()); while(affectedRows > 0){ - affectedRows = baseDao.deleteByDateIdAndCustomerId(customerId,data.getDateId()); + affectedRows = baseDao.deleteByDateIdAndCustomerId(data.getCustomerId(),data.getDateId()); } } Lists.partition(data.getDataList(), NumConstant.ONE_HUNDRED).forEach(list -> { - baseDao.insertBatch(list,customerId,"APP_USER",data.getDateId()); + baseDao.insertBatch(list,data.getCustomerId(),"APP_USER",data.getDateId()); }); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectProcessServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectProcessServiceImpl.java index 1d18eb0b7f..8d6cde3ed0 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectProcessServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectProcessServiceImpl.java @@ -110,29 +110,29 @@ public class ScreenProjectProcessServiceImpl extends BaseServiceImpl param) { + public void collect(ScreenCollFormDTO param) { if (param.getIsFirst()) { - int affectedRows = baseDao.deleteByDateIdAndCustomerId(customerId, param.getDateId()); + int affectedRows = baseDao.deleteByDateIdAndCustomerId(param.getCustomerId(), param.getDateId()); while (affectedRows > 0) { - affectedRows = baseDao.deleteByDateIdAndCustomerId(customerId, param.getDateId()); + affectedRows = baseDao.deleteByDateIdAndCustomerId(param.getCustomerId(), param.getDateId()); } } param.getDataList().forEach(item -> { //先删除旧数据 QueryWrapper screenProjectProcessEntityQueryWrapper = new QueryWrapper<>(); screenProjectProcessEntityQueryWrapper.eq(StringUtils.isNotBlank(item.getProjectId()), "project_id", item.getProjectId()) - .eq(StringUtils.isNotBlank(customerId), "customer_id", customerId) + .eq(StringUtils.isNotBlank(param.getCustomerId()), "customer_id", param.getCustomerId()) .eq(StringUtils.isNotBlank(item.getProcessId()), "process_id", item.getProcessId()); baseDao.delete(screenProjectProcessEntityQueryWrapper); QueryWrapper screenProjectProcessAttachmentEntityQueryWrapper = new QueryWrapper<>(); screenProjectProcessAttachmentEntityQueryWrapper.eq(StringUtils.isNotBlank(item.getProjectId()), "project_id", item.getProjectId()) - .eq(StringUtils.isNotBlank(customerId), "customer_id", customerId) + .eq(StringUtils.isNotBlank(param.getCustomerId()), "customer_id", param.getCustomerId()) .eq(StringUtils.isNotBlank(item.getProcessId()), "process_id", item.getProcessId()); screenProjectProcessAttachmentDao.delete(screenProjectProcessAttachmentEntityQueryWrapper); //插入 ScreenProjectProcessEntity screenProjectProcessEntity = ConvertUtils.sourceToTarget(item, ScreenProjectProcessEntity.class); - screenProjectProcessEntity.setCustomerId(customerId); + screenProjectProcessEntity.setCustomerId(param.getCustomerId()); screenProjectProcessEntity.setDataEndTime(param.getDateId()); baseDao.insert(screenProjectProcessEntity); @@ -140,7 +140,7 @@ public class ScreenProjectProcessServiceImpl extends BaseServiceImpl data) { + public void collect(ScreenCollFormDTO data) { if(data.getIsFirst()){ - int affectedRows = baseDao.deleteByMonthIdAndCustomerId(customerId,data.getMonthId()); + int affectedRows = baseDao.deleteByMonthIdAndCustomerId(data.getCustomerId(),data.getMonthId()); while(affectedRows > 0){ - affectedRows = baseDao.deleteByMonthIdAndCustomerId(customerId,data.getMonthId()); + affectedRows = baseDao.deleteByMonthIdAndCustomerId(data.getCustomerId(),data.getMonthId()); } } Lists.partition(data.getDataList(), NumConstant.ONE_HUNDRED).forEach(list -> { - baseDao.insertBatch(list,customerId,"APP_USER",data.getMonthId()); + baseDao.insertBatch(list,data.getCustomerId(),"APP_USER",data.getMonthId()); }); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java index 730719d035..91917d22b7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectQuantityOrgMonthlyServiceImpl.java @@ -123,7 +123,6 @@ public class ScreenProjectQuantityOrgMonthlyServiceImpl extends BaseServiceImpl< /** * @Description 数据采集 - * @param customerId * @param data * @return void * @author wangc @@ -132,15 +131,15 @@ public class ScreenProjectQuantityOrgMonthlyServiceImpl extends BaseServiceImpl< @Transactional(rollbackFor = Exception.class) @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override - public void collect(String customerId, ScreenCollFormDTO data) { + public void collect(ScreenCollFormDTO data) { if(data.getIsFirst()){ - int affectedRows = baseDao.deleteByMonthIdAndCustomerId(customerId,data.getMonthId()); + int affectedRows = baseDao.deleteByMonthIdAndCustomerId(data.getCustomerId(),data.getMonthId()); while(affectedRows > 0){ - affectedRows = baseDao.deleteByMonthIdAndCustomerId(customerId,data.getMonthId()); + affectedRows = baseDao.deleteByMonthIdAndCustomerId(data.getCustomerId(),data.getMonthId()); } } Lists.partition(data.getDataList(), NumConstant.ONE_HUNDRED).forEach(list -> { - baseDao.insertBatch(list,customerId,"APP_USER",data.getMonthId()); + baseDao.insertBatch(list,data.getCustomerId(),"APP_USER",data.getMonthId()); }); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenCustomerWorkRecordDictService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenCustomerWorkRecordDictService.java index 6f5ac2573e..98d18d8339 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenCustomerWorkRecordDictService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenCustomerWorkRecordDictService.java @@ -96,11 +96,10 @@ public interface ScreenCustomerWorkRecordDictService extends BaseService data); + void collect(ScreenCollFormDTO data); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenWorkRecordOrgDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenWorkRecordOrgDailyService.java index 6edbb9ba92..c14291c641 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenWorkRecordOrgDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenWorkRecordOrgDailyService.java @@ -30,5 +30,5 @@ import com.epmet.entity.plugins.ScreenWorkRecordOrgDailyEntity; */ public interface ScreenWorkRecordOrgDailyService extends BaseService { - void collectOrgDaily(String customerId, ScreenCollFormDTO data); + void collectOrgDaily(ScreenCollFormDTO data); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenWorkRecordOrgMonthlyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenWorkRecordOrgMonthlyService.java index 0e16b4b1fe..7804957e4e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenWorkRecordOrgMonthlyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/ScreenWorkRecordOrgMonthlyService.java @@ -32,11 +32,10 @@ public interface ScreenWorkRecordOrgMonthlyService extends BaseService data); + void collect(ScreenCollFormDTO data); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenCustomerWorkRecordDictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenCustomerWorkRecordDictServiceImpl.java index 05b1172eb7..7a6291717a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenCustomerWorkRecordDictServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenCustomerWorkRecordDictServiceImpl.java @@ -107,15 +107,15 @@ public class ScreenCustomerWorkRecordDictServiceImpl extends BaseServiceImpl data) { + public void collect(ScreenCollFormDTO data) { if(data.getIsFirst()){ - int affectedRows = baseDao.deleteBatch(customerId); + int affectedRows = baseDao.deleteBatch(data.getCustomerId()); while(affectedRows > 0){ - affectedRows = baseDao.deleteBatch(customerId); + affectedRows = baseDao.deleteBatch(data.getCustomerId()); } } Lists.partition(data.getDataList(), NumConstant.ONE_HUNDRED).forEach(list -> { - baseDao.insertBatch(list,customerId,data.getDateId()); + baseDao.insertBatch(list,data.getCustomerId(),data.getDateId()); }); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java index c517555fbc..8f4d4f7c84 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java @@ -41,15 +41,15 @@ public class ScreenWorkRecordOrgDailyServiceImpl extends BaseServiceImpl data) { + public void collectOrgDaily(ScreenCollFormDTO data) { if(data.getIsFirst()){ - int affectedRows = baseDao.deleteBatch(customerId,data.getDateId()); + int affectedRows = baseDao.deleteBatch(data.getCustomerId(),data.getDateId()); while(affectedRows > 0){ - affectedRows = baseDao.deleteBatch(customerId,data.getDateId()); + affectedRows = baseDao.deleteBatch(data.getCustomerId(),data.getDateId()); } } Lists.partition(data.getDataList(), NumConstant.ONE_HUNDRED).forEach(list -> { - baseDao.insertBatch(list,customerId,data.getDateId()); + baseDao.insertBatch(list,data.getCustomerId(),data.getDateId()); }); } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordOrgMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordOrgMonthlyServiceImpl.java index a27cb040aa..7ecd3c4eb6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordOrgMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/plugins/impl/ScreenWorkRecordOrgMonthlyServiceImpl.java @@ -42,7 +42,6 @@ public class ScreenWorkRecordOrgMonthlyServiceImpl extends BaseServiceImpl data) { + public void collect(ScreenCollFormDTO data) { if(data.getIsFirst()){ - int affectedRows = baseDao.deleteBatch(customerId,data.getMonthId()); + int affectedRows = baseDao.deleteBatch(data.getCustomerId(),data.getMonthId()); while(affectedRows > 0){ - affectedRows = baseDao.deleteBatch(customerId,data.getMonthId()); + affectedRows = baseDao.deleteBatch(data.getCustomerId(),data.getMonthId()); } } Lists.partition(data.getDataList(), NumConstant.ONE_HUNDRED).forEach(list -> { - baseDao.insertBatch(list,customerId,data.getMonthId()); + baseDao.insertBatch(list,data.getCustomerId(),data.getMonthId()); }); } From 342715a9f9e4d8fb175efe9f39d2677b1ef47d8e Mon Sep 17 00:00:00 2001 From: wangchao Date: Tue, 16 Mar 2021 13:58:40 +0800 Subject: [PATCH 132/375] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=9F=A5=E6=89=BE=E6=B3=A8=E5=86=8C=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E4=BC=A0=E5=85=A5customerId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/redis/UserBaseInfoRedis.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserBaseInfoRedis.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserBaseInfoRedis.java index 315341ae84..2476662ba7 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserBaseInfoRedis.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserBaseInfoRedis.java @@ -262,7 +262,7 @@ public class UserBaseInfoRedis { }else{ return null; } - RegisterRelationEntity relation = registerRelationDao.selectRegisteredGridIdByUserId(userId); + RegisterRelationEntity relation = registerRelationDao.selectRegisteredGridIdByUserIdAndCustomerId(userId,customerId); if(null != relation && StringUtils.isNotBlank(relation.getGridId())){ baseInfo.setCustomerId(relation.getCustomerId()); }else{ From c677cabebadd44cb554b9555b42ca39ca05e14b2 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 16 Mar 2021 15:21:09 +0800 Subject: [PATCH 133/375] =?UTF-8?q?=E5=BE=BD=E7=AB=A0bug=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dao/RegisterRelationDao.java | 8 +++++++ .../service/RegisterRelationService.java | 2 ++ .../epmet/service/UserBaseInfoService.java | 8 +++++++ .../impl/RegisterRelationServiceImpl.java | 5 ++++ .../service/impl/UserBadgeServiceImpl.java | 2 +- .../service/impl/UserBaseInfoServiceImpl.java | 24 +++++++++++++++++++ .../resources/mapper/RegisterRelationDao.xml | 5 ++++ 7 files changed, 53 insertions(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/RegisterRelationDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/RegisterRelationDao.java index a19881ce9a..160e1a4afc 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/RegisterRelationDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/RegisterRelationDao.java @@ -47,4 +47,12 @@ public interface RegisterRelationDao extends BaseDao { RegisterRelationEntity selectRegisteredGridIdByUserIdAndCustomerId(@Param("userId") String userId, @Param("customerId")String customerId); + + /** + * @Description 根据userId查询注册网格ID + * @Param userId + * @author zxc + * @date 2021/3/16 下午3:05 + */ + String selectRegisterGridIdByUserId(@Param("userId")String userId); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/RegisterRelationService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/RegisterRelationService.java index e40e9ea607..96814c5fce 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/RegisterRelationService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/RegisterRelationService.java @@ -112,4 +112,6 @@ public interface RegisterRelationService extends BaseService { **/ List queryUserBaseInfo(List userIdList); + /** + * @Description 查询用户信息 + * @Param userIdList + * @author zxc + * @date 2021/3/16 下午2:52 + */ + List queryUserBaseInfoPlus(List userIdList); + /** * @return void * @param diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/RegisterRelationServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/RegisterRelationServiceImpl.java index f8a78f8c14..ca7b3db589 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/RegisterRelationServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/RegisterRelationServiceImpl.java @@ -339,4 +339,9 @@ public class RegisterRelationServiceImpl extends BaseServiceImpl oneUserIds = new ArrayList<>(); oneUserIds.add(userId); - List userBaseInfoResultDTOS = userBaseInfoService.queryUserBaseInfo(oneUserIds); + List userBaseInfoResultDTOS = userBaseInfoService.queryUserBaseInfoPlus(oneUserIds); log.info("user【"+userId+"】基本信息:"+userBaseInfoResultDTOS.toString()); if (!CollectionUtils.isEmpty(userIds)) { AtomicReference status = new AtomicReference<>(true); diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java index f76628b60d..852ca55843 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java @@ -40,6 +40,7 @@ import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.redis.UserBaseInfoRedis; import com.epmet.resi.partymember.dto.partymember.PartymemberInfoDTO; import com.epmet.resi.partymember.feign.ResiPartyMemberOpenFeignClient; +import com.epmet.service.RegisterRelationService; import com.epmet.service.UserBaseInfoService; import com.epmet.util.ModuleConstant; import org.apache.commons.lang3.StringUtils; @@ -77,6 +78,8 @@ public class UserBaseInfoServiceImpl extends BaseServiceImpl page(Map params) { @@ -181,6 +184,27 @@ public class UserBaseInfoServiceImpl extends BaseServiceImpl queryUserBaseInfoPlus(List userIdList) { + if (CollectionUtils.isEmpty(userIdList)){ + return new ArrayList<>(); + } + List result = new ArrayList<>(); + userIdList.forEach(id -> { + UserBaseInfoResultDTO baseInfo = userBaseInfoRedis.getUserInfo(id); + if (null != baseInfo && StringUtils.isEmpty(baseInfo.getRegisteredGridId())){ + String gridId = registerRelationService.selectRegisterGridIdByUserId(id); + if (StringUtils.isNotEmpty(gridId)){ + baseInfo.setRegisteredGridId(gridId); + }else { + throw new RenException("查询用户【"+id+"】所属网格失败"); + } + } + result.add(baseInfo); + }); + return result; + } + /** * @return void * @author yinzuomei diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/RegisterRelationDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/RegisterRelationDao.xml index 403e3fcc8e..c3f7bf7682 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/RegisterRelationDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/RegisterRelationDao.xml @@ -72,5 +72,10 @@ LIMIT 1 + + + \ No newline at end of file From e6a74e72ac8305d53a6133148c1f85f9699290f3 Mon Sep 17 00:00:00 2001 From: wangchao Date: Tue, 16 Mar 2021 15:33:17 +0800 Subject: [PATCH 134/375] =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=B3=A8=E5=86=8C?= =?UTF-8?q?=E5=85=9A=E5=91=98=E8=BF=9E=E5=B8=A6=E8=AE=A4=E8=AF=81=E5=B1=85?= =?UTF-8?q?=E6=B0=91=E6=97=B6=E5=85=88=E6=8F=92=E5=85=A5register=5Frelatio?= =?UTF-8?q?n=E5=86=8D=E6=9B=B4=E6=96=B0=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/UserResiInfoServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java index 9c973e7b78..e5e7678835 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java @@ -271,10 +271,10 @@ public class UserResiInfoServiceImpl extends BaseServiceImpl Date: Tue, 16 Mar 2021 15:44:26 +0800 Subject: [PATCH 135/375] =?UTF-8?q?=E5=88=9D=E6=AD=A5=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E5=B9=B3=E5=8F=B0=E7=9A=84=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=EF=BC=8C=E5=B9=B3=E5=8F=B0=E4=B8=8D=E9=80=9A=EF=BC=8C=E5=BE=85?= =?UTF-8?q?=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application.yml | 2 +- .../epmet/commons/tools/redis/RedisKeys.java | 9 ++ .../epmet/constant/ThirdPlatformActions.java | 13 ++ .../java/com/epmet/apiservice/ApiService.java | 123 ++++++++++++++++++ .../impl/LuzhouGridPlatformApiService.java | 11 +- .../com/epmet/dao/ThirdplatformActionDao.java | 10 +- .../entity/ThirdplatformActionEntity.java | 1 + .../com/epmet/entity/ThirdplatformEntity.java | 5 + .../mapper/ThirdplatformActionDao.xml | 17 +++ 9 files changed, 188 insertions(+), 3 deletions(-) create mode 100644 epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/constant/ThirdPlatformActions.java diff --git a/epmet-cloud-generator/src/main/resources/application.yml b/epmet-cloud-generator/src/main/resources/application.yml index bfea2783f9..5a36af7c15 100644 --- a/epmet-cloud-generator/src/main/resources/application.yml +++ b/epmet-cloud-generator/src/main/resources/application.yml @@ -9,7 +9,7 @@ spring: type: com.alibaba.druid.pool.DruidDataSource #MySQL配置 driverClassName: com.mysql.jdbc.Driver - url: jdbc:mysql://192.168.1.130:3306/epmet_gov_project?useUnicode=true&characterEncoding=UTF-8&useSSL=false + url: jdbc:mysql://192.168.1.130:3306/epmet_third?useUnicode=true&characterEncoding=UTF-8&useSSL=false username: epmet_dba password: EpmEt-dbA-UsEr #oracle配置 diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java index 220d621195..3a2e5b0fa9 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java @@ -379,4 +379,13 @@ public class RedisKeys { public static String listCustomerApiServiceListKey(String customerId) { return rootPrefix.concat("customer:thirdplat:apiservicelist:").concat(customerId); } + + /** + * 查询第三方平台access token + * @param platformId + * @return + */ + public static String getThirdPlatformAccessTokenKey(String platformId) { + return rootPrefix.concat("thirdplatform:accesstoken:").concat(platformId); + } } diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/constant/ThirdPlatformActions.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/constant/ThirdPlatformActions.java new file mode 100644 index 0000000000..43390a2e14 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/constant/ThirdPlatformActions.java @@ -0,0 +1,13 @@ +package com.epmet.constant; + +/** + * 第三方平台动作常量 + */ +public interface ThirdPlatformActions { + + // 获取accessToken + String GET_ACCESS_TOKEN = "GET_ACCESS_TOKEN"; + // 项目协助 + String PROJECT_ASSIST = "PROJECT_ASSIST"; + +} diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java index da169d165a..c0326a98a5 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java @@ -2,11 +2,26 @@ package com.epmet.apiservice; import com.epmet.apiservice.result.ProjectAssistResult; import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.redis.RedisKeys; +import com.epmet.commons.tools.utils.HttpClientManager; +import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.SpringContextUtils; +import com.epmet.constant.ThirdPlatformActions; +import com.epmet.dao.PaUserDao; +import com.epmet.dao.ThirdplatformActionDao; import com.epmet.dao.ThirdplatformCustomerRegisterDao; +import com.epmet.dao.ThirdplatformDao; import com.epmet.dto.form.ProjectAssistFormDTO; import com.epmet.dto.form.TPFDemoFormDTO; +import com.epmet.entity.ThirdplatformActionEntity; import com.epmet.entity.ThirdplatformCustomerRegisterEntity; +import com.epmet.entity.ThirdplatformEntity; +import org.apache.commons.lang3.StringUtils; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.http.HttpMethod; + +import java.util.HashMap; +import java.util.Map; /** * ApiService,对接第三方平台的抽象类 @@ -29,6 +44,114 @@ public abstract class ApiService { return true; } + /** + * 发送get请求。目前仅支持GET/POST + * @param platformId + * @param action + * @param params + * @param headers + * @return + */ + public String sendGetRequest(String platformId, String action, Map params, Map headers) { + // 1.获取token + String accessToken = getAccessToken(platformId); + //2.获取url + ThirdplatformEntity thirdplatform = SpringContextUtils.getBean(ThirdplatformDao.class).selectById(platformId); + ThirdplatformActionEntity actionEntity = SpringContextUtils.getBean(ThirdplatformActionDao.class) + .getByPlatformIdAndActionKey(platformId, action); + + if (headers == null) { + headers = new HashMap<>(); + } + + // 填充access token到头当中 + headers.put("X-Access-Token", accessToken); + + Result result = HttpClientManager.getInstance().sendGet(thirdplatform.getBaseUrl().concat(actionEntity.getApiUrl()), + thirdplatform.getBaseUrl().startsWith("https://"), + params, + headers); + + if (result == null) { + throw new RenException("请求第三方平台,获取AccessToken失败。result为null"); + } + if (result.success()) { + throw new RenException("请求第三方平台,获取AccessToken失败。"); + } + return result.getData(); + } + + /** + * 发送post请求 + * @param platformId + * @param action + * @param jsonString + * @param headers + * @return + */ + public String sendPostRequest(String platformId, String action, String jsonString, Map headers) { + // 1.获取token + String accessToken = getAccessToken(platformId); + //2.获取url + ThirdplatformEntity thirdplatform = SpringContextUtils.getBean(ThirdplatformDao.class).selectById(platformId); + ThirdplatformActionEntity actionEntity = SpringContextUtils.getBean(ThirdplatformActionDao.class) + .getByPlatformIdAndActionKey(platformId, action); + + if (headers == null) { + headers = new HashMap<>(); + } + + // 填充access token到头当中 + headers.put("X-Access-Token", accessToken); + + Result result = HttpClientManager.getInstance().sendPost(thirdplatform.getBaseUrl().concat(actionEntity.getApiUrl()), + thirdplatform.getBaseUrl().startsWith("https://"), + jsonString, + headers); + + if (result == null) { + throw new RenException("请求第三方平台,获取AccessToken失败。result为null"); + } + if (result.success()) { + throw new RenException("请求第三方平台,获取AccessToken失败。"); + } + return result.getData(); + } + + /** + * @Description 获取accessToken + * @return + * @author wxz + * @date 2021.03.16 13:45 + */ + private String getAccessToken(String platformId) { + RedisTemplate rt = SpringContextUtils.getBean("redisTemplate", RedisTemplate.class); + String token = rt.opsForValue().get(RedisKeys.getThirdPlatformAccessTokenKey(platformId)); + if (StringUtils.isBlank(token)) { + ThirdplatformEntity thirdplatform = SpringContextUtils.getBean(ThirdplatformDao.class).selectById(platformId); + ThirdplatformActionEntity actionEntity = SpringContextUtils.getBean(ThirdplatformActionDao.class) + .getByPlatformIdAndActionKey(platformId, ThirdPlatformActions.GET_ACCESS_TOKEN); + + String baseUrl = thirdplatform.getBaseUrl(); + String platformKey = thirdplatform.getPlatformKey(); + String platformSecret = thirdplatform.getPlatformSecret(); + + HashMap params = new HashMap<>(); + params.put("appKey", platformKey); + params.put("appSecret", platformSecret); + Result result = HttpClientManager.getInstance().sendGet(baseUrl.concat(actionEntity.getApiUrl()), params); + if (result == null) { + throw new RenException("请求第三方平台,获取AccessToken失败。result为null"); + } + if (result.success()) { + throw new RenException("请求第三方平台,获取AccessToken失败。"); + } + token = result.getData(); + rt.opsForValue().set(RedisKeys.getThirdPlatformAccessTokenKey(platformId), token); + } + return token; + } + /** * @Description 判断客户是否注册了指定的平台,如果没有注册,则抛出异常 * @return diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java index 4081bfad61..646ce55af9 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java @@ -1,8 +1,11 @@ package com.epmet.apiservice.impl; +import com.alibaba.fastjson.JSON; import com.epmet.apiservice.ApiService; import com.epmet.apiservice.result.ProjectAssistResult; +import com.epmet.constant.ThirdPlatformActions; import com.epmet.dto.form.ProjectAssistFormDTO; +import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Component; /** @@ -13,7 +16,13 @@ public class LuzhouGridPlatformApiService extends ApiService { @Override public ProjectAssistResult projectAssist(ProjectAssistFormDTO formDTO) { + String platformId = formDTO.getPlatformId(); + String result = sendPostRequest(platformId, ThirdPlatformActions.PROJECT_ASSIST, "{}", null); + ProjectAssistResult projectAssistResult = null; + if (!StringUtils.isBlank(result)) { + projectAssistResult = JSON.parseObject(result, ProjectAssistResult.class); + } System.out.println("泸州网格化平台项目协助发送成功"); - return null; + return projectAssistResult; } } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformActionDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformActionDao.java index 9b309c15fc..50de9d3629 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformActionDao.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformActionDao.java @@ -20,6 +20,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.entity.ThirdplatformActionEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * @@ -29,5 +30,12 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ThirdplatformActionDao extends BaseDao { - + + /** + * @Description 根据平台id和action操作查询 + * @return + * @author wxz + * @date 2021.03.16 13:35 + */ + ThirdplatformActionEntity getByPlatformIdAndActionKey(@Param("platformId") String platformId, @Param("action") String action); } \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/ThirdplatformActionEntity.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/ThirdplatformActionEntity.java index 88c7a8cd2f..97283b9c05 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/ThirdplatformActionEntity.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/ThirdplatformActionEntity.java @@ -47,5 +47,6 @@ public class ThirdplatformActionEntity extends BaseEpmetEntity { * */ private String actionKey; + private String apiUrl; } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/ThirdplatformEntity.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/ThirdplatformEntity.java index 4fede6dcdf..d756c81b88 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/ThirdplatformEntity.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/ThirdplatformEntity.java @@ -58,4 +58,9 @@ public class ThirdplatformEntity extends BaseEpmetEntity { */ private String apiService; + /** + * 基础url + */ + private String baseUrl; + } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformActionDao.xml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformActionDao.xml index 03cf514cda..39de22dca5 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformActionDao.xml +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformActionDao.xml @@ -7,6 +7,7 @@ + @@ -15,5 +16,21 @@ + + \ No newline at end of file From 45df6641ebc67cc3167ad927a44ddfe592836a80 Mon Sep 17 00:00:00 2001 From: wangchao Date: Tue, 16 Mar 2021 15:53:14 +0800 Subject: [PATCH 136/375] screenProjectData --- .../impl/FactOriginProjectMainDailyServiceImpl.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java index 7bc06ac834..1a51ba5690 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java @@ -385,13 +385,13 @@ public class FactOriginProjectMainDailyServiceImpl extends BaseServiceImpl initNewScreenProjectData(String customerId,Integer rows , String dateId,Integer exceedLimit,Integer about2exceedLimit) { - boolean ifYesterday = true; - if(!StringUtils.equals(DateUtils.getBeforeNDay(NumConstant.ONE),dateId)){ - ifYesterday = false; + boolean ifBeforeYesterday = true; + if(Integer.parseInt(DateUtils.getBeforeNDay(NumConstant.ONE)) > Integer.parseInt(dateId)){ + ifBeforeYesterday = false; } - List projects = baseDao.initNewScreenProjectData(customerId, rows == NumConstant.ZERO && ifYesterday ? "" : dateId, dateId); + List projects = baseDao.initNewScreenProjectData(customerId, rows <= NumConstant.ZERO ? "" : dateId, dateId); //如果不是昨天立项 - if(!CollectionUtils.isEmpty(projects) && !ifYesterday) + if(!CollectionUtils.isEmpty(projects) && !ifBeforeYesterday) computerIfExceed(projects,exceedLimit,about2exceedLimit); return projects; From 47a41ed1fc1b91f792f0c81655cd06612eb3e52d Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 16 Mar 2021 16:47:32 +0800 Subject: [PATCH 137/375] =?UTF-8?q?controller=E5=91=BD=E5=90=8D=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...rmDTO.java => ProjectApplyAssistFormDTO.java} | 2 +- .../java/com/epmet/apiservice/ApiService.java | 6 ++---- .../epmet/apiservice/impl/DemoApiService.java | 7 ++----- .../impl/LuzhouGridPlatformApiService.java | 4 ++-- ...BizController.java => ProjectController.java} | 16 +++++++--------- .../java/com/epmet/service/ProjectService.java | 5 ++--- .../epmet/service/impl/ProjectServiceImpl.java | 8 ++++---- 7 files changed, 20 insertions(+), 28 deletions(-) rename epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/{ProjectAssistFormDTO.java => ProjectApplyAssistFormDTO.java} (84%) rename epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/{BizController.java => ProjectController.java} (79%) diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ProjectAssistFormDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ProjectApplyAssistFormDTO.java similarity index 84% rename from epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ProjectAssistFormDTO.java rename to epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ProjectApplyAssistFormDTO.java index 543524f1b1..bbbe9d17c5 100644 --- a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ProjectAssistFormDTO.java +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ProjectApplyAssistFormDTO.java @@ -5,7 +5,7 @@ import lombok.Data; import javax.validation.constraints.NotBlank; @Data -public class ProjectAssistFormDTO { +public class ProjectApplyAssistFormDTO { private String customerId; diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java index c0326a98a5..4c581a916d 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java @@ -7,18 +7,16 @@ import com.epmet.commons.tools.utils.HttpClientManager; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.SpringContextUtils; import com.epmet.constant.ThirdPlatformActions; -import com.epmet.dao.PaUserDao; import com.epmet.dao.ThirdplatformActionDao; import com.epmet.dao.ThirdplatformCustomerRegisterDao; import com.epmet.dao.ThirdplatformDao; -import com.epmet.dto.form.ProjectAssistFormDTO; +import com.epmet.dto.form.ProjectApplyAssistFormDTO; import com.epmet.dto.form.TPFDemoFormDTO; import com.epmet.entity.ThirdplatformActionEntity; import com.epmet.entity.ThirdplatformCustomerRegisterEntity; import com.epmet.entity.ThirdplatformEntity; import org.apache.commons.lang3.StringUtils; import org.springframework.data.redis.core.RedisTemplate; -import org.springframework.http.HttpMethod; import java.util.HashMap; import java.util.Map; @@ -180,7 +178,7 @@ public abstract class ApiService { * @author wxz * @date 2021.03.16 09:28 */ - public ProjectAssistResult projectAssist(ProjectAssistFormDTO formDTO) { + public ProjectAssistResult projectAssist(ProjectApplyAssistFormDTO formDTO) { return null; } } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/DemoApiService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/DemoApiService.java index 6c1aca3917..9dcc3854c5 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/DemoApiService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/DemoApiService.java @@ -2,10 +2,7 @@ package com.epmet.apiservice.impl; import com.epmet.apiservice.ApiService; import com.epmet.apiservice.result.ProjectAssistResult; -import com.epmet.commons.tools.exception.RenException; -import com.epmet.constant.ApiServiceActions; -import com.epmet.dto.form.ProjectAssistFormDTO; -import com.epmet.dto.form.TPFDemoFormDTO; +import com.epmet.dto.form.ProjectApplyAssistFormDTO; import com.epmet.feign.OperCrmOpenFeignClient; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -24,7 +21,7 @@ public class DemoApiService extends ApiService { private OperCrmOpenFeignClient operCrmOpenFeignClient; @Override - public ProjectAssistResult projectAssist(ProjectAssistFormDTO formDTO) { + public ProjectAssistResult projectAssist(ProjectApplyAssistFormDTO formDTO) { logger.info("DemoApiService发送项目协助到第三方平台成功"); return null; } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java index 646ce55af9..8ff454f60d 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java @@ -4,7 +4,7 @@ import com.alibaba.fastjson.JSON; import com.epmet.apiservice.ApiService; import com.epmet.apiservice.result.ProjectAssistResult; import com.epmet.constant.ThirdPlatformActions; -import com.epmet.dto.form.ProjectAssistFormDTO; +import com.epmet.dto.form.ProjectApplyAssistFormDTO; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Component; @@ -15,7 +15,7 @@ import org.springframework.stereotype.Component; public class LuzhouGridPlatformApiService extends ApiService { @Override - public ProjectAssistResult projectAssist(ProjectAssistFormDTO formDTO) { + public ProjectAssistResult projectAssist(ProjectApplyAssistFormDTO formDTO) { String platformId = formDTO.getPlatformId(); String result = sendPostRequest(platformId, ThirdPlatformActions.PROJECT_ASSIST, "{}", null); ProjectAssistResult projectAssistResult = null; diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/BizController.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ProjectController.java similarity index 79% rename from epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/BizController.java rename to epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ProjectController.java index ed83a196bf..af4d756ca2 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/BizController.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ProjectController.java @@ -2,7 +2,7 @@ package com.epmet.controller; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.dto.form.ProjectAssistFormDTO; +import com.epmet.dto.form.ProjectApplyAssistFormDTO; import com.epmet.dto.form.TPFDemoFormDTO; import com.epmet.service.ProjectService; import org.springframework.beans.factory.annotation.Autowired; @@ -11,16 +11,14 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import java.lang.management.MemoryManagerMXBean; - /** - * 对接第三方平台业务相关的controller + * 对接第三方平台业务Project相关的controller * 我们系统当中每一个需要发送到第三方平台的操作,只对应这里的一个方法,根据参数传入platformId,内部根据配置获取指定的APiService进行具体平台的调用 * 每一个平台都有自己的ApiSerivce */ @RestController -@RequestMapping("biz") -public class BizController { +@RequestMapping("project") +public class ProjectController { @Autowired private ProjectService projectService; @@ -39,13 +37,13 @@ public class BizController { } /** - * @Description 发送项目协同处理方法 + * @Description 请求项目协助 * @return * @author wxz * @date 2021.03.15 21:13 */ - @PostMapping("project-assist") - public Result projectAssist(@RequestBody ProjectAssistFormDTO formDTO) { + @PostMapping("apply-assist") + public Result applyAssist(@RequestBody ProjectApplyAssistFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO); projectService.projectAssist(formDTO); return new Result(); diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ProjectService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ProjectService.java index 25d4f6de51..c190dc71ae 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ProjectService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ProjectService.java @@ -1,8 +1,7 @@ package com.epmet.service; -import com.epmet.dto.form.ProjectAssistFormDTO; +import com.epmet.dto.form.ProjectApplyAssistFormDTO; import com.epmet.dto.form.TPFDemoFormDTO; -import org.springframework.stereotype.Service; /** * 该service用于封装project相关的代码 @@ -11,5 +10,5 @@ public interface ProjectService { String demoAction(TPFDemoFormDTO formDTO); - void projectAssist(ProjectAssistFormDTO formDTO); + void projectAssist(ProjectApplyAssistFormDTO formDTO); } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index fb57663d72..91ebd234c3 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -2,8 +2,7 @@ package com.epmet.service.impl; import com.epmet.apiservice.ApiService; import com.epmet.apiservice.result.ProjectAssistResult; -import com.epmet.commons.tools.exception.RenException; -import com.epmet.dto.form.ProjectAssistFormDTO; +import com.epmet.dto.form.ProjectApplyAssistFormDTO; import com.epmet.dto.form.TPFDemoFormDTO; import com.epmet.service.ApiServiceSelector; import com.epmet.service.ProjectService; @@ -25,12 +24,13 @@ public class ProjectServiceImpl implements ProjectService, ApiServiceSelector { } @Override - public void projectAssist(ProjectAssistFormDTO formDTO) { + public void projectAssist(ProjectApplyAssistFormDTO formDTO) { String customerId = formDTO.getCustomerId(); String platformId = formDTO.getPlatformId(); - // 注意,此处会如果找不到对应的ApiService会抛出异常 + // 根据平台ID找到注意,此处会如果找不到对应的ApiService会抛出异常 ApiService apiService = selectApiService(platformId); + // 判断该客户是否注册了该平台,如果没有的话,抛出异常 apiService.judgeRegistered(customerId, platformId); System.out.println(apiService); From 5d5f16364864c99dba180ee84379ad4eb3d06943 Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 16 Mar 2021 17:10:46 +0800 Subject: [PATCH 138/375] =?UTF-8?q?=E5=91=BD=E5=90=8D=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/apiservice/ApiService.java | 5 +++-- .../epmet/apiservice/impl/LuzhouGridPlatformApiService.java | 5 ++++- .../main/java/com/epmet/controller/ProjectController.java | 2 +- .../src/main/java/com/epmet/service/ProjectService.java | 6 +++++- .../java/com/epmet/service/impl/ProjectServiceImpl.java | 4 +--- 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java index 4c581a916d..0a6ac8de63 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java @@ -22,8 +22,9 @@ import java.util.HashMap; import java.util.Map; /** - * ApiService,对接第三方平台的抽象类 - * 每一个具体平台的ApiService都是该抽象类的子类,选择性实现抽象类中的某些方法,提供具体业务逻辑 + * ApiService,对接第三方平台的抽象类。每一个子类都对应一个第三方平台,每个第三方平台都实现唯一一个子类 + * 每一个具体平台的ApiService都是该抽象类的子类,选择性实现抽象类中的某些需要实现方法,提供具体业务逻辑 + * 此抽象类中定义方法的具体返回类型,所有子类都要统一使用,在具体实现中做转换。若是不需要返回,返回null即可。 */ public abstract class ApiService { diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java index 8ff454f60d..433deb8f7a 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java @@ -20,7 +20,10 @@ public class LuzhouGridPlatformApiService extends ApiService { String result = sendPostRequest(platformId, ThirdPlatformActions.PROJECT_ASSIST, "{}", null); ProjectAssistResult projectAssistResult = null; if (!StringUtils.isBlank(result)) { - projectAssistResult = JSON.parseObject(result, ProjectAssistResult.class); + // 此处要经过一系列业务处理,将第三方平台返回的数据进行解析,等处理最后转换成ProjectAssistResult类型,返回。ProjectAssistResult这个类型是 + // 所有apiService的projectAssist方法返回值的统一类型,是我们的epmet-cloud所需要的数据的实体, + // 所有apiService都要想办法转化成这个类型。 + //projectAssistResult = JSON.parseObject(result, ProjectAssistResult.class); } System.out.println("泸州网格化平台项目协助发送成功"); return projectAssistResult; diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ProjectController.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ProjectController.java index af4d756ca2..746205b85c 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ProjectController.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ProjectController.java @@ -45,7 +45,7 @@ public class ProjectController { @PostMapping("apply-assist") public Result applyAssist(@RequestBody ProjectApplyAssistFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO); - projectService.projectAssist(formDTO); + projectService.applyAssist(formDTO); return new Result(); } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ProjectService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ProjectService.java index c190dc71ae..9ac4b55558 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ProjectService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ProjectService.java @@ -10,5 +10,9 @@ public interface ProjectService { String demoAction(TPFDemoFormDTO formDTO); - void projectAssist(ProjectApplyAssistFormDTO formDTO); + /** + * + * @param formDTO + */ + void applyAssist(ProjectApplyAssistFormDTO formDTO); } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index 91ebd234c3..4401c6fba2 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -24,7 +24,7 @@ public class ProjectServiceImpl implements ProjectService, ApiServiceSelector { } @Override - public void projectAssist(ProjectApplyAssistFormDTO formDTO) { + public void applyAssist(ProjectApplyAssistFormDTO formDTO) { String customerId = formDTO.getCustomerId(); String platformId = formDTO.getPlatformId(); @@ -33,8 +33,6 @@ public class ProjectServiceImpl implements ProjectService, ApiServiceSelector { // 判断该客户是否注册了该平台,如果没有的话,抛出异常 apiService.judgeRegistered(customerId, platformId); - System.out.println(apiService); - ProjectAssistResult projectAssistResult = apiService.projectAssist(formDTO); } } From bf3cd3b7428ee9260aef5f419a7b147a03808290 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Tue, 16 Mar 2021 17:43:05 +0800 Subject: [PATCH 139/375] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E8=8F=9C=E5=8D=95-?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/GovCustomerMenuDTO.java | 81 +++++++++++ .../com/epmet/dto/form/MenuConfigFormDTO.java | 27 ++++ .../controller/GovCustomerMenuController.java | 129 +++++++++++++++++ .../com/epmet/dao/GovCustomerMenuDao.java | 55 ++++++++ .../main/java/com/epmet/dao/GovMenuDao.java | 9 ++ .../epmet/entity/GovCustomerMenuEntity.java | 51 +++++++ .../com/epmet/excel/GovCustomerMenuExcel.java | 62 ++++++++ .../com/epmet/redis/GovCustomerMenuRedis.java | 47 +++++++ .../epmet/service/GovCustomerMenuService.java | 126 +++++++++++++++++ .../impl/GovCustomerMenuServiceImpl.java | 132 ++++++++++++++++++ .../service/impl/GovMenuServiceImpl.java | 30 +++- .../resources/mapper/GovCustomerMenuDao.xml | 29 ++++ .../src/main/resources/mapper/GovMenuDao.xml | 14 ++ 13 files changed, 785 insertions(+), 7 deletions(-) create mode 100644 epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/GovCustomerMenuDTO.java create mode 100644 epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/MenuConfigFormDTO.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovCustomerMenuController.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovCustomerMenuDao.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/GovCustomerMenuEntity.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/excel/GovCustomerMenuExcel.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovCustomerMenuRedis.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovCustomerMenuService.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovCustomerMenuServiceImpl.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/resources/mapper/GovCustomerMenuDao.xml diff --git a/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/GovCustomerMenuDTO.java b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/GovCustomerMenuDTO.java new file mode 100644 index 0000000000..93d5e9c66e --- /dev/null +++ b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/GovCustomerMenuDTO.java @@ -0,0 +1,81 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 客户菜单配置表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-16 + */ +@Data +public class GovCustomerMenuDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键ID + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * gov_menu表主键 + */ + private String tableId; + + /** + * 删除标识 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/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/MenuConfigFormDTO.java b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/MenuConfigFormDTO.java new file mode 100644 index 0000000000..1bd4fc67bc --- /dev/null +++ b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/MenuConfigFormDTO.java @@ -0,0 +1,27 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.List; + +/** + * 菜单配置 - 一菜单 多 客户 + */ +@Data +public class MenuConfigFormDTO implements Serializable { + private static final long serialVersionUID = -2898130727929596798L; + + /** + * gov_menu表主键 + */ + @NotBlank(message = "菜单ID不能为空") + private String tableId; + + /** + * 客户id 列表 + */ + @NotBlank(message = "客户id 列表不能为空") + private List customerIds; +} diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovCustomerMenuController.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovCustomerMenuController.java new file mode 100644 index 0000000000..5e60482a5f --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovCustomerMenuController.java @@ -0,0 +1,129 @@ +/** + * 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.controller; + +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.GovCustomerMenuDTO; +import com.epmet.dto.form.MenuConfigFormDTO; +import com.epmet.excel.GovCustomerMenuExcel; +import com.epmet.service.GovCustomerMenuService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 客户菜单配置表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-16 + */ +@RestController +@RequestMapping("govcustomermenu") +public class GovCustomerMenuController { + + @Autowired + private GovCustomerMenuService govCustomerMenuService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = govCustomerMenuService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + GovCustomerMenuDTO data = govCustomerMenuService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody GovCustomerMenuDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + govCustomerMenuService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody GovCustomerMenuDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + govCustomerMenuService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + govCustomerMenuService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = govCustomerMenuService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, GovCustomerMenuExcel.class); + } + + /** + * 给每个客户 配置可见菜单 + * 先删除,后新增 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 14:15 2021-03-16 + **/ + @PostMapping("addcustomermenu") + public Result addCustomerMenu(@RequestBody MenuConfigFormDTO formDTO) { + //效验数据 + if (StringUtils.isBlank(formDTO.getTableId())) { + throw new RenException("菜单ID不能为空"); + } + govCustomerMenuService.saveCustomerMenu(formDTO); + return new Result(); + } + + /** + * 根据gov_menu表主键,查询拥有这项菜单的所有客户(customerIds) + * + * @param tableId + * @return com.epmet.commons.tools.utils.Result> + * @Author zhangyong + * @Date 16:26 2021-03-16 + **/ + @GetMapping("getcustomerids/{tableid}") + public Result> getcustomerids(@PathVariable("tableid") String tableId){ + List data = govCustomerMenuService.getcustomerIds(tableId); + return new Result>().ok(data); + } +} diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovCustomerMenuDao.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovCustomerMenuDao.java new file mode 100644 index 0000000000..6daa27f116 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovCustomerMenuDao.java @@ -0,0 +1,55 @@ +/** + * 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; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.GovCustomerMenuEntity; +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 2021-03-16 + */ +@Mapper +public interface GovCustomerMenuDao extends BaseDao { + + /** + * 根据gov_menu表主键,先清除之前配置的客户信息 + * + * @param tableId + * @return void + * @Author zhangyong + * @Date 14:24 2021-03-16 + **/ + void deleteBatchTableIds(@Param("tableId") String tableId); + + /** + * 根据gov_menu表主键,查询拥有这项菜单的所有客户(customerIds) + * + * @param tableId + * @return java.util.List + * @Author zhangyong + * @Date 16:29 2021-03-16 + **/ + List selectListcustomerIds(@Param("tableId") String tableId); +} diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovMenuDao.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovMenuDao.java index 1e36bff758..ba05556dc1 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovMenuDao.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovMenuDao.java @@ -49,4 +49,13 @@ public interface GovMenuDao extends BaseDao { * @param pid 父菜单ID */ List getListPid(String pid); + + /** + * 查询客户菜单列表 + * + * @param customerId 客户id + * @param type 菜单类型 + * @param language 语言 + */ + List getCustomerMenuList(@Param("customerId") String customerId, @Param("type") Integer type, @Param("language") String language); } diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/GovCustomerMenuEntity.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/GovCustomerMenuEntity.java new file mode 100644 index 0000000000..d0358e7124 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/GovCustomerMenuEntity.java @@ -0,0 +1,51 @@ +/** + * 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; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 客户菜单配置表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("gov_customer_menu") +public class GovCustomerMenuEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * gov_menu表主键 + */ + private String tableId; + +} diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/excel/GovCustomerMenuExcel.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/excel/GovCustomerMenuExcel.java new file mode 100644 index 0000000000..1ac8f2d886 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/excel/GovCustomerMenuExcel.java @@ -0,0 +1,62 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 客户菜单配置表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-16 + */ +@Data +public class GovCustomerMenuExcel { + + @Excel(name = "主键ID") + private String id; + + @Excel(name = "客户ID") + private String customerId; + + @Excel(name = "gov_menu表主键") + private String tableId; + + @Excel(name = "删除标识 0未删除、1已删除") + private String delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovCustomerMenuRedis.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovCustomerMenuRedis.java new file mode 100644 index 0000000000..2333a6bd48 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovCustomerMenuRedis.java @@ -0,0 +1,47 @@ +/** + * 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.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 客户菜单配置表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-16 + */ +@Component +public class GovCustomerMenuRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovCustomerMenuService.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovCustomerMenuService.java new file mode 100644 index 0000000000..dea2a31ca0 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovCustomerMenuService.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.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.GovCustomerMenuDTO; +import com.epmet.dto.form.MenuConfigFormDTO; +import com.epmet.entity.GovCustomerMenuEntity; + +import java.util.List; +import java.util.Map; + +/** + * 客户菜单配置表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-16 + */ +public interface GovCustomerMenuService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-03-16 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-03-16 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return GovCustomerMenuDTO + * @author generator + * @date 2021-03-16 + */ + GovCustomerMenuDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-03-16 + */ + void save(GovCustomerMenuDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-03-16 + */ + void update(GovCustomerMenuDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-03-16 + */ + void delete(String[] ids); + + /** + * 给每个客户 配置可见菜单 + * + * @param formDTO + * @return void + * @Author zhangyong + * @Date 14:16 2021-03-16 + **/ + void saveCustomerMenu(MenuConfigFormDTO formDTO); + + /** + * 根据gov_menu表主键,查询拥有这项菜单的所有客户(customerIds) + * + * @param tableId + * @return java.util.List + * @Author zhangyong + * @Date 16:29 2021-03-16 + **/ + List getcustomerIds(String tableId); + + /** + * 根据gov_menu表主键,先清除之前配置的客户信息 + * + * @param tableId + * @return void + * @Author zhangyong + * @Date 14:24 2021-03-16 + **/ + void deleteBatchTableIds(String tableId); +} diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovCustomerMenuServiceImpl.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovCustomerMenuServiceImpl.java new file mode 100644 index 0000000000..32cf57e0c7 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovCustomerMenuServiceImpl.java @@ -0,0 +1,132 @@ +/** + * 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.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.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.GovCustomerMenuDao; +import com.epmet.dto.GovCustomerMenuDTO; +import com.epmet.dto.form.MenuConfigFormDTO; +import com.epmet.entity.GovCustomerMenuEntity; +import com.epmet.redis.GovCustomerMenuRedis; +import com.epmet.service.GovCustomerMenuService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 客户菜单配置表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-16 + */ +@Service +public class GovCustomerMenuServiceImpl extends BaseServiceImpl implements GovCustomerMenuService { + + @Autowired + private GovCustomerMenuRedis govCustomerMenuRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, GovCustomerMenuDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, GovCustomerMenuDTO.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 GovCustomerMenuDTO get(String id) { + GovCustomerMenuEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, GovCustomerMenuDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(GovCustomerMenuDTO dto) { + GovCustomerMenuEntity entity = ConvertUtils.sourceToTarget(dto, GovCustomerMenuEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(GovCustomerMenuDTO dto) { + GovCustomerMenuEntity entity = ConvertUtils.sourceToTarget(dto, GovCustomerMenuEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public void saveCustomerMenu(MenuConfigFormDTO formDTO) { + if (NumConstant.ZERO < formDTO.getCustomerIds().size()) { + baseDao.deleteBatchTableIds(formDTO.getTableId()); + + List entities = new ArrayList<>(); + for (String customerId : formDTO.getCustomerIds()) { + GovCustomerMenuEntity entity = new GovCustomerMenuEntity(); + entity.setCustomerId(customerId); + entity.setTableId(formDTO.getTableId()); + entities.add(entity); + } + insertBatch(entities); + } + } + + @Override + public List getcustomerIds(String tableId) { + return baseDao.selectListcustomerIds(tableId); + } + + @Override + public void deleteBatchTableIds(String tableId) { + baseDao.deleteBatchTableIds(tableId); + } +} diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovMenuServiceImpl.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovMenuServiceImpl.java index 5a6efd43f2..cfa42e4975 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovMenuServiceImpl.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovMenuServiceImpl.java @@ -35,10 +35,7 @@ import com.epmet.entity.GovMenuEntity; import com.epmet.enums.MenuTypeEnum; import com.epmet.feign.EpmetUserFeignClient; import com.epmet.redis.GovMenuRedis; -import com.epmet.service.GovLanguageService; -import com.epmet.service.GovMenuService; -import com.epmet.service.GovResourceService; -import com.epmet.service.GovRoleMenuService; +import com.epmet.service.*; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -67,6 +64,8 @@ public class GovMenuServiceImpl extends BaseServiceImpl page(Map params) { @@ -154,6 +153,9 @@ public class GovMenuServiceImpl extends BaseServiceImpl getUserMenuNavList(TokenDto tokenDto) { List menuList = govMenuRedis.getUserMenuNavList(tokenDto.getUserId(), tokenDto.getApp(), tokenDto.getClient()); if(menuList == null){ - menuList = getUserMenuList(tokenDto, MenuTypeEnum.MENU.value()); + menuList = getCustomerMenuList(tokenDto.getCustomerId(), MenuTypeEnum.MENU.value()); govMenuRedis.setUserMenuNavList(tokenDto.getUserId(), tokenDto.getApp(), tokenDto.getClient(), menuList); } @@ -195,6 +197,21 @@ public class GovMenuServiceImpl extends BaseServiceImpl + * @Author zhangyong + * @Date 15:51 2021-03-16 + **/ + private List getCustomerMenuList(String customerId, Integer type) { + List menuList = baseDao.getCustomerMenuList(customerId, type, HttpContextUtils.getLanguage()); + List dtoList = ConvertUtils.sourceToTarget(menuList, GovMenuDTO.class); + return TreeUtils.buildTree(dtoList); + } + @Override public Set getUserPermissions(TokenDto tokenDto) { //用户权限列表 @@ -243,5 +260,4 @@ public class GovMenuServiceImpl extends BaseServiceImpl + + + + + + + + + + + + + + + + + + UPDATE gov_customer_menu SET DEL_FLAG = '1' + WHERE DEL_FLAG = '0' + AND TABLE_ID = #{tableId, jdbcType=VARCHAR} + + + + diff --git a/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/GovMenuDao.xml b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/GovMenuDao.xml index 90d0b8ee92..9ac55ce17b 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/GovMenuDao.xml +++ b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/GovMenuDao.xml @@ -39,4 +39,18 @@ select * from gov_menu where del_flag = 0 and pid = #{value} + From 3a3a1cab733ae07715ed8a77303fa9adc621ff15 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Wed, 17 Mar 2021 09:42:36 +0800 Subject: [PATCH 140/375] =?UTF-8?q?=E8=8F=9C=E5=8D=95=E7=BC=93=E5=AD=98key?= =?UTF-8?q?=EF=BC=8C=E7=94=B1userId=20=E6=94=B9=E4=B8=BA=20customerId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/GovMenuServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovMenuServiceImpl.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovMenuServiceImpl.java index cfa42e4975..1f16ad89e9 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovMenuServiceImpl.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovMenuServiceImpl.java @@ -187,11 +187,11 @@ public class GovMenuServiceImpl extends BaseServiceImpl getUserMenuNavList(TokenDto tokenDto) { - List menuList = govMenuRedis.getUserMenuNavList(tokenDto.getUserId(), tokenDto.getApp(), tokenDto.getClient()); + List menuList = govMenuRedis.getUserMenuNavList(tokenDto.getCustomerId(), tokenDto.getApp(), tokenDto.getClient()); if(menuList == null){ menuList = getCustomerMenuList(tokenDto.getCustomerId(), MenuTypeEnum.MENU.value()); - govMenuRedis.setUserMenuNavList(tokenDto.getUserId(), tokenDto.getApp(), tokenDto.getClient(), menuList); + govMenuRedis.setUserMenuNavList(tokenDto.getCustomerId(), tokenDto.getApp(), tokenDto.getClient(), menuList); } return menuList; From 4a564833ae92d8356be3bbb47e2a7e5761dba652 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 17 Mar 2021 09:43:08 +0800 Subject: [PATCH 141/375] NumConstant --- .../screen/impl/ScreenProjectDataServiceImpl.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java index d5e656e71b..501bfa2c43 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java @@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.constant.DataSourceConstant; @@ -32,8 +33,6 @@ import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.entity.evaluationindex.screen.ScreenProjectDataEntity; import com.epmet.entity.evaluationindex.screen.ScreenProjectImgDataEntity; import com.epmet.service.evaluationindex.screen.ScreenProjectDataService; -import com.epmet.entity.evaluationindex.screen.*; -import com.epmet.service.evaluationindex.screen.*; import org.apache.commons.collections4.ListUtils; import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils; From 41e26e774a2573954984f75fa31c856754e810b5 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Wed, 17 Mar 2021 10:13:39 +0800 Subject: [PATCH 142/375] =?UTF-8?q?=E6=94=B9=E6=88=90post=E8=AF=B7?= =?UTF-8?q?=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/controller/GovCustomerMenuController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovCustomerMenuController.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovCustomerMenuController.java index 5e60482a5f..a3cb9f8946 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovCustomerMenuController.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovCustomerMenuController.java @@ -121,7 +121,7 @@ public class GovCustomerMenuController { * @Author zhangyong * @Date 16:26 2021-03-16 **/ - @GetMapping("getcustomerids/{tableid}") + @PostMapping("getcustomerids/{tableid}") public Result> getcustomerids(@PathVariable("tableid") String tableId){ List data = govCustomerMenuService.getcustomerIds(tableId); return new Result>().ok(data); From 440472f1ec77aeab4034eae923d23eeb0180f630 Mon Sep 17 00:00:00 2001 From: wxz Date: Wed, 17 Mar 2021 10:53:07 +0800 Subject: [PATCH 143/375] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E4=B8=89=E6=96=B9?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/ThirdPlatformFormDTO.java | 19 ++++++++ ...hirdplatformCustomerRegisterResultDTO.java | 18 ++++++++ .../impl/LuzhouGridPlatformApiService.java | 15 +++++-- .../LZGridPlatformProjectAssistResult.java | 9 ++++ .../result/ProjectAssistResult.java | 5 +++ .../epmet/controller/ProjectController.java | 5 ++- .../controller/ThirdPlatformController.java | 43 +++++++++++++++++++ .../dao/ThirdplatformCustomerRegisterDao.java | 10 +++++ .../com/epmet/service/ProjectService.java | 3 +- .../epmet/service/ThirdPlatformService.java | 11 +++++ .../service/impl/ProjectServiceImpl.java | 4 +- .../impl/ThirdPlatformServiceImpl.java | 21 +++++++++ .../ThirdplatformCustomerRegisterDao.xml | 22 ++++++++++ 13 files changed, 177 insertions(+), 8 deletions(-) create mode 100644 epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ThirdPlatformFormDTO.java create mode 100644 epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/ThirdplatformCustomerRegisterResultDTO.java create mode 100644 epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ThirdPlatformController.java create mode 100644 epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ThirdPlatformService.java create mode 100644 epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ThirdPlatformServiceImpl.java diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ThirdPlatformFormDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ThirdPlatformFormDTO.java new file mode 100644 index 0000000000..3f488e75c1 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ThirdPlatformFormDTO.java @@ -0,0 +1,19 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +@Data +public class ThirdPlatformFormDTO { + + // 列出注册关系分组 + public static interface ListRegRelsGroups {} + + @NotBlank(message = "客户ID不能为空", groups = { ListRegRelsGroups.class }) + private String customerId; + + @NotBlank(message = "客户ID不能为空", groups = { ListRegRelsGroups.class }) + private String actionKey; + +} diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/ThirdplatformCustomerRegisterResultDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/ThirdplatformCustomerRegisterResultDTO.java new file mode 100644 index 0000000000..d637837fbc --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/ThirdplatformCustomerRegisterResultDTO.java @@ -0,0 +1,18 @@ +package com.epmet.dto.result; + +import lombok.Data; + +@Data +public class ThirdplatformCustomerRegisterResultDTO { + /** + * + */ + private String customerId; + + /** + * + */ + private String platformId; + + private String platformName; +} diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java index 433deb8f7a..b38a3e6758 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java @@ -2,6 +2,7 @@ package com.epmet.apiservice.impl; import com.alibaba.fastjson.JSON; import com.epmet.apiservice.ApiService; +import com.epmet.apiservice.result.LZGridPlatformProjectAssistResult; import com.epmet.apiservice.result.ProjectAssistResult; import com.epmet.constant.ThirdPlatformActions; import com.epmet.dto.form.ProjectApplyAssistFormDTO; @@ -17,13 +18,21 @@ public class LuzhouGridPlatformApiService extends ApiService { @Override public ProjectAssistResult projectAssist(ProjectApplyAssistFormDTO formDTO) { String platformId = formDTO.getPlatformId(); - String result = sendPostRequest(platformId, ThirdPlatformActions.PROJECT_ASSIST, "{}", null); - ProjectAssistResult projectAssistResult = null; + + // 正式调用第三方平台 + //String result = sendPostRequest(platformId, ThirdPlatformActions.PROJECT_ASSIST, "{}", null); + + // 开发阶段临时写死 + String result = "{\"eventId\":\"test-task-id\"}"; + ProjectAssistResult projectAssistResult = new ProjectAssistResult(); if (!StringUtils.isBlank(result)) { // 此处要经过一系列业务处理,将第三方平台返回的数据进行解析,等处理最后转换成ProjectAssistResult类型,返回。ProjectAssistResult这个类型是 // 所有apiService的projectAssist方法返回值的统一类型,是我们的epmet-cloud所需要的数据的实体, // 所有apiService都要想办法转化成这个类型。 - //projectAssistResult = JSON.parseObject(result, ProjectAssistResult.class); + LZGridPlatformProjectAssistResult lzResult = JSON.parseObject(result, LZGridPlatformProjectAssistResult.class); + + // 此处设置为第三方系统返回的唯一id + projectAssistResult.setTaskId(lzResult.getEventId()); } System.out.println("泸州网格化平台项目协助发送成功"); return projectAssistResult; diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/result/LZGridPlatformProjectAssistResult.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/result/LZGridPlatformProjectAssistResult.java index ef74410885..1ffd372576 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/result/LZGridPlatformProjectAssistResult.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/result/LZGridPlatformProjectAssistResult.java @@ -1,4 +1,13 @@ package com.epmet.apiservice.result; +import lombok.Data; + +@Data public class LZGridPlatformProjectAssistResult { + + /** + * 事件id + */ + private String eventId; + } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/result/ProjectAssistResult.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/result/ProjectAssistResult.java index 2da96d1e17..de992bdd0f 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/result/ProjectAssistResult.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/result/ProjectAssistResult.java @@ -5,4 +5,9 @@ import lombok.Data; @Data public class ProjectAssistResult { + /** + * 任务id + */ + private String taskId; + } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ProjectController.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ProjectController.java index 746205b85c..3899ed9fda 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ProjectController.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ProjectController.java @@ -1,5 +1,6 @@ package com.epmet.controller; +import com.epmet.apiservice.result.ProjectAssistResult; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.form.ProjectApplyAssistFormDTO; @@ -45,8 +46,8 @@ public class ProjectController { @PostMapping("apply-assist") public Result applyAssist(@RequestBody ProjectApplyAssistFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO); - projectService.applyAssist(formDTO); - return new Result(); + ProjectAssistResult projectAssistResult = projectService.applyAssist(formDTO); + return new Result().ok(projectAssistResult); } } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ThirdPlatformController.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ThirdPlatformController.java new file mode 100644 index 0000000000..64c7f0e7f0 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ThirdPlatformController.java @@ -0,0 +1,43 @@ +package com.epmet.controller; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.dto.form.ThirdPlatformFormDTO; +import com.epmet.dto.result.ThirdplatformCustomerRegisterResultDTO; +import com.epmet.service.ThirdPlatformService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +/** + * 第三方平台维护相关api + */ +@RestController +@RequestMapping("thirdplatform") +public class ThirdPlatformController { + + + @Autowired + private ThirdPlatformService thirdPlatformService; + + /** + * 列出第三方平台注册关系 + * @param input + * @return + */ + @PostMapping("list-reg-rels") + public Result> listRegsteredPlatforms(@RequestBody ThirdPlatformFormDTO input) { + ValidatorUtils.validateEntity(input); + List platformRegs = thirdPlatformService.listByCustomerId(input.getCustomerId(), input.getActionKey()); + return new Result>().ok(platformRegs); + } + + //@PostMapping("register") + + + +} diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformCustomerRegisterDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformCustomerRegisterDao.java index e3a39cbbe2..b5ffe5cf82 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformCustomerRegisterDao.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformCustomerRegisterDao.java @@ -19,10 +19,13 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.constant.ThirdPlatformConstant; +import com.epmet.dto.result.ThirdplatformCustomerRegisterResultDTO; import com.epmet.entity.ThirdplatformCustomerRegisterEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.util.List; + /** * * @@ -32,5 +35,12 @@ import org.apache.ibatis.annotations.Param; @Mapper public interface ThirdplatformCustomerRegisterDao extends BaseDao { + /** + * 动态sql查询 + * @param customerId + * @return + */ + List listDTOS(@Param("customerId") String customerId, @Param("actionKey") String actionKey); + ThirdplatformCustomerRegisterEntity getByCustomerIdAndPlatformId(@Param("customerId") String customerId, @Param("platformId") String platformId); } \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ProjectService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ProjectService.java index 9ac4b55558..1e9d75fdc1 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ProjectService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ProjectService.java @@ -1,5 +1,6 @@ package com.epmet.service; +import com.epmet.apiservice.result.ProjectAssistResult; import com.epmet.dto.form.ProjectApplyAssistFormDTO; import com.epmet.dto.form.TPFDemoFormDTO; @@ -14,5 +15,5 @@ public interface ProjectService { * * @param formDTO */ - void applyAssist(ProjectApplyAssistFormDTO formDTO); + ProjectAssistResult applyAssist(ProjectApplyAssistFormDTO formDTO); } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ThirdPlatformService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ThirdPlatformService.java new file mode 100644 index 0000000000..74b4cab44f --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ThirdPlatformService.java @@ -0,0 +1,11 @@ +package com.epmet.service; + +import com.epmet.dto.result.ThirdplatformCustomerRegisterResultDTO; + +import java.util.List; + +public interface ThirdPlatformService { + + List listByCustomerId(String customerId, String actionKey); + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index 4401c6fba2..f652f6b995 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -24,7 +24,7 @@ public class ProjectServiceImpl implements ProjectService, ApiServiceSelector { } @Override - public void applyAssist(ProjectApplyAssistFormDTO formDTO) { + public ProjectAssistResult applyAssist(ProjectApplyAssistFormDTO formDTO) { String customerId = formDTO.getCustomerId(); String platformId = formDTO.getPlatformId(); @@ -33,6 +33,6 @@ public class ProjectServiceImpl implements ProjectService, ApiServiceSelector { // 判断该客户是否注册了该平台,如果没有的话,抛出异常 apiService.judgeRegistered(customerId, platformId); - ProjectAssistResult projectAssistResult = apiService.projectAssist(formDTO); + return apiService.projectAssist(formDTO); } } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ThirdPlatformServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ThirdPlatformServiceImpl.java new file mode 100644 index 0000000000..40556ebaca --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ThirdPlatformServiceImpl.java @@ -0,0 +1,21 @@ +package com.epmet.service.impl; + +import com.epmet.dao.ThirdplatformCustomerRegisterDao; +import com.epmet.dto.result.ThirdplatformCustomerRegisterResultDTO; +import com.epmet.service.ThirdPlatformService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class ThirdPlatformServiceImpl implements ThirdPlatformService { + + @Autowired + private ThirdplatformCustomerRegisterDao thirdplatformCustomerRegisterDao; + + @Override + public List listByCustomerId(String customerId, String actionKey) { + return thirdplatformCustomerRegisterDao.listDTOS(customerId, actionKey); + } +} diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformCustomerRegisterDao.xml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformCustomerRegisterDao.xml index c8545d01ee..10edc458e3 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformCustomerRegisterDao.xml +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformCustomerRegisterDao.xml @@ -32,5 +32,27 @@ and DEL_FLAG = 0 + + \ No newline at end of file From 5182ba8f637b5f547bc2ad853107befec8f3a571 Mon Sep 17 00:00:00 2001 From: wangchao Date: Wed, 17 Mar 2021 11:13:00 +0800 Subject: [PATCH 144/375] =?UTF-8?q?=E9=9A=BE=E7=82=B9=E8=B5=8C=E7=82=B9?= =?UTF-8?q?=E7=94=9F=E6=88=90=E9=A1=B9=E7=9B=AE=E8=AF=9D=E9=A2=98Map?= =?UTF-8?q?=E6=97=B6=E9=81=87=E5=88=B0=E5=90=8C=E6=A0=B7=E7=9A=84key?= =?UTF-8?q?=E8=A6=86=E7=9B=96=E4=B8=8A=E4=B8=80=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/topic/impl/TopicServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 6d9a78381e..83e3b9da38 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 @@ -147,7 +147,7 @@ public class TopicServiceImpl implements TopicService { List imgs = topicDao.selectTopicImgs(list); if(CollectionUtils.isEmpty(imgs)) return Collections.EMPTY_MAP; //key -> topicId | value -> projectId - Map projectTopicMap = list.stream().collect(Collectors.toMap(ProjectSourceMapFormDTO :: getSourceId,ProjectSourceMapFormDTO :: getProjectId)); + Map projectTopicMap = list.stream().collect(Collectors.toMap(ProjectSourceMapFormDTO :: getSourceId,ProjectSourceMapFormDTO :: getProjectId,(o,n)->n)); //key -> topicId Map> result = imgs.stream().collect(Collectors.groupingBy(ScreenDifficultyImgDataEntity :: getEventId)); @@ -178,7 +178,7 @@ public class TopicServiceImpl implements TopicService { if(CollectionUtils.isEmpty(contents)) return Collections.EMPTY_MAP; Map topicContentMap = contents.stream().collect(Collectors.toMap(TopicContentResultDTO :: getTopicId,TopicContentResultDTO::getContent)); //key -> topicId | value -> projectId - Map projectTopicMap = list.stream().collect(Collectors.toMap(ProjectSourceMapFormDTO :: getSourceId,ProjectSourceMapFormDTO :: getProjectId)); + Map projectTopicMap = list.stream().collect(Collectors.toMap(ProjectSourceMapFormDTO :: getSourceId,ProjectSourceMapFormDTO :: getProjectId,(o,n)->n)); Map result = new HashMap<>(); projectTopicMap.forEach((topic,project) -> { result.put(project,topicContentMap.get(topic)); From 820e8dc642c37243cdb21a617f5ba646679351a7 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 17 Mar 2021 13:13:17 +0800 Subject: [PATCH 145/375] =?UTF-8?q?=E6=8C=89=E5=A4=A9=E6=8A=BD=E5=8F=96?= =?UTF-8?q?=E6=9A=82=E6=97=B6=E6=B3=A8=E9=87=8A=EF=BC=9AscreenProjectSettl?= =?UTF-8?q?eService.extractScreenData?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extract/toscreen/impl/ScreenExtractServiceImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java index 37eae6ac60..74e3021a00 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java @@ -197,12 +197,13 @@ public class ScreenExtractServiceImpl implements ScreenExtractService { }catch (Exception e){ log.error("项目(事件)分析按组织_按天统计失败,customerId为:"+customerId+"dateId为:"+dateId, e); } - try{ + //项目分类打标签未上线,暂时屏蔽 + /*try{ //大屏项目数据抽取_按天抽取 screenProjectSettleService.extractScreenData(param); }catch (Exception e){ log.error("大屏项目数据抽取_按天抽取_按天统计失败,customerId为:"+customerId+"dateId为:"+dateId, e); - } + }*/ log.info("===== extractDaily method end ======"); } From f1fc9d552b205a6a0dd661835217085ea6928518 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Wed, 17 Mar 2021 16:31:01 +0800 Subject: [PATCH 146/375] =?UTF-8?q?=E7=89=B9=E6=AE=8A=E5=AE=A2=E6=88=B7-?= =?UTF-8?q?=E5=B1=85=E6=B0=91=E5=92=8C=E7=83=AD=E5=BF=83=E5=B1=85=E6=B0=91?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=90=8D=E7=A7=B0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/ProjectSubAttachmentDTO.java | 126 ++++++++++++++++ .../com/epmet/dto/ProjectSubProcessDTO.java | 136 ++++++++++++++++++ .../com/epmet/dto/form/SendToFormDTO.java | 49 +++++++ .../dto/result/ProcessListV2ResultDTO.java | 5 + .../dto/result/ProjectDetailResultDTO.java | 4 + .../com/epmet/dto/result/SubProcessDTO.java | 40 ++++++ .../ProjectSubAttachmentController.java | 85 +++++++++++ .../ProjectSubProcessController.java | 85 +++++++++++ .../controller/ProjectTraceController.java | 16 +++ .../epmet/dao/ProjectSubAttachmentDao.java | 33 +++++ .../com/epmet/dao/ProjectSubProcessDao.java | 33 +++++ .../entity/ProjectSubAttachmentEntity.java | 96 +++++++++++++ .../epmet/entity/ProjectSubProcessEntity.java | 106 ++++++++++++++ .../service/ProjectSubAttachmentService.java | 95 ++++++++++++ .../service/ProjectSubProcessService.java | 95 ++++++++++++ .../epmet/service/ProjectTraceService.java | 10 ++ .../service/impl/ProjectServiceImpl.java | 3 + .../impl/ProjectSubAttachmentServiceImpl.java | 100 +++++++++++++ .../impl/ProjectSubProcessServiceImpl.java | 100 +++++++++++++ .../service/impl/ProjectTraceServiceImpl.java | 14 ++ .../mapper/ProjectSubAttachmentDao.xml | 28 ++++ .../resources/mapper/ProjectSubProcessDao.xml | 30 ++++ 22 files changed, 1289 insertions(+) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectSubAttachmentDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectSubProcessDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/SendToFormDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/SubProcessDTO.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectSubAttachmentController.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectSubProcessController.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSubAttachmentDao.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSubProcessDao.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectSubAttachmentEntity.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectSubProcessEntity.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectSubAttachmentService.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectSubProcessService.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSubAttachmentServiceImpl.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSubProcessServiceImpl.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSubAttachmentDao.xml create mode 100644 epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSubProcessDao.xml diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectSubAttachmentDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectSubAttachmentDTO.java new file mode 100644 index 0000000000..e966d0f026 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectSubAttachmentDTO.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; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 外部系统事件附件 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-17 + */ +@Data +public class ProjectSubAttachmentDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 唯一标识 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 项目ID + */ + private String projectId; + + /** + * 子节点ID + */ + private String subId; + + /** + * 事件ID + */ + private String taskId; + + /** + * 附件名 + */ + private String attachmentName; + + /** + * 文件大小 单位b + */ + private Integer attachmentSize; + + /** + * 文件格式 + */ + private String attachmentFormat; + + /** + * 类型 + */ + private String attachmentType; + + /** + * 附件地址 + */ + private String attachmentUrl; + + /** + * 语音或视频时长,秒 + */ + private Integer duration; + + /** + * 排序 + */ + private Integer sort; + + /** + * 删除标识 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/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectSubProcessDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectSubProcessDTO.java new file mode 100644 index 0000000000..5edffc797a --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectSubProcessDTO.java @@ -0,0 +1,136 @@ +/** + * 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; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 节点事件关联表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-17 + */ +@Data +public class ProjectSubProcessDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 唯一标识 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 项目ID + */ + private String projectId; + + /** + * 节点ID + */ + private String processId; + + /** + * 项目人员关联表ID + */ + private String staffId; + + /** + * 系统ID + */ + private String platformId; + + /** + * 系统名 + */ + private String platformName; + + /** + * 第三方平台返回的项目关联ID(事件Id) + */ + private String taskId; + + /** + * 事件处理详细内容 + */ + private String result; + + /** + * 外部状态:1待处理,2待核实,3已上报,4已完结,5处理中,6待分发,7归档,8催办,9超时 + */ + private String externalStatus; + + /** + * 外部状态描述 + */ + private String externalStatusDesc; + + /** + * 内部状态:待处理 pending,结案closed + */ + private String internalStatus; + + /** + * 处理日期 + */ + private Date handleDate; + + /** + * 处理人姓名 + */ + private String handleUserName; + + /** + * 删除标识 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/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/SendToFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/SendToFormDTO.java new file mode 100644 index 0000000000..4060fc2c43 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/SendToFormDTO.java @@ -0,0 +1,49 @@ +package com.epmet.dto.form; + +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.Valid; +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.List; + +/** + * @author zhaoqifeng + * @dscription + * @date 2021/3/17 14:31 + */ +@Data +public class SendToFormDTO implements Serializable { + private static final long serialVersionUID = -2556534032778491105L; + @NotBlank(message = "项目Id不能为空") + private String projectId; + + @NotBlank(message = "项目人员关联Id不能为空") + private String projectStaffId; + + @Length(max=1000,message = "公开答复内容不能超过1000位") + private String publicReply; + + @NotBlank(message = "内部备注不能为空") + @Length(max=1000,message = "内部备注不能超过1000位") + private String internalRemark; + + @NotBlank(message = "外部系统ID不能为空") + private String platformId; + + @NotBlank(message = "外部系统名不能为空") + private String platformName; + + @Valid + private List staffList; + + /** + * 公开答复对应文件集合 + */ + private List publicFile; + /** + * 内部备注对应文件集合 + */ + private List internalFile; +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessListV2ResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessListV2ResultDTO.java index 1e7460c5ad..2f3da4a57f 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessListV2ResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessListV2ResultDTO.java @@ -13,6 +13,7 @@ import java.util.List; @Data public class ProcessListV2ResultDTO implements Serializable { + private static final long serialVersionUID = 5762152044573235897L; /** * 项目ID */ @@ -47,6 +48,10 @@ public class ProcessListV2ResultDTO implements Serializable { * 内部备注 */ private String internalRemark; + /** + * 子节点 + */ + private List subProcess; /** * diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectDetailResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectDetailResultDTO.java index 7f309667f0..71bf83682a 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectDetailResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectDetailResultDTO.java @@ -60,6 +60,10 @@ public class ProjectDetailResultDTO implements Serializable { * 当前跟进部门 */ private List departmentList; + /** + * 是否能发送到外部系统 + */ + private Boolean isSend; @NoArgsConstructor @Data diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/SubProcessDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/SubProcessDTO.java new file mode 100644 index 0000000000..9a2c3406f7 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/SubProcessDTO.java @@ -0,0 +1,40 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @author zhaoqifeng + * @dscription + * @date 2021/3/17 14:45 + */ +@Data +public class SubProcessDTO implements Serializable { + private static final long serialVersionUID = -3292921180067385861L; + /** + * 外部平台名 + */ + private String platformName; + /** + * 处理状态 + */ + private String externalStatus; + /** + * 处理时间 + */ + private String processTime; + /** + * 处理人 + */ + private String handleUserName; + /** + * 处理内容 + */ + private String result; + private List subFile; + + + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectSubAttachmentController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectSubAttachmentController.java new file mode 100644 index 0000000000..cf760dab22 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectSubAttachmentController.java @@ -0,0 +1,85 @@ +/** + * 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.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.dto.ProjectSubAttachmentDTO; +import com.epmet.service.ProjectSubAttachmentService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.Map; + + +/** + * 外部系统事件附件 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-17 + */ +@RestController +@RequestMapping("projectsubattachment") +public class ProjectSubAttachmentController { + + @Autowired + private ProjectSubAttachmentService projectSubAttachmentService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = projectSubAttachmentService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + ProjectSubAttachmentDTO data = projectSubAttachmentService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody ProjectSubAttachmentDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + projectSubAttachmentService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody ProjectSubAttachmentDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + projectSubAttachmentService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + projectSubAttachmentService.delete(ids); + return new Result(); + } + + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectSubProcessController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectSubProcessController.java new file mode 100644 index 0000000000..f91488f983 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectSubProcessController.java @@ -0,0 +1,85 @@ +/** + * 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.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.dto.ProjectSubProcessDTO; +import com.epmet.service.ProjectSubProcessService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.Map; + + +/** + * 节点事件关联表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-17 + */ +@RestController +@RequestMapping("projectsubprocess") +public class ProjectSubProcessController { + + @Autowired + private ProjectSubProcessService projectSubProcessService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = projectSubProcessService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + ProjectSubProcessDTO data = projectSubProcessService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody ProjectSubProcessDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + projectSubProcessService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody ProjectSubProcessDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + projectSubProcessService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + projectSubProcessService.delete(ids); + return new Result(); + } + + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTraceController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTraceController.java index db5d13ab24..c7d3a8c09a 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTraceController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTraceController.java @@ -319,5 +319,21 @@ public class ProjectTraceController { return new Result(); } + /** + * 发送到外部平台 + * @author zhaoqifeng + * @date 2021/3/17 14:34 + * @param tokenDTO + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + */ + @PostMapping("sendto") + @RequirePermission(requirePermission = RequirePermissionEnum.WORK_PROJECT_TRACE_TRANSFER) + public Result sendTo(@LoginUser TokenDto tokenDTO, @RequestBody SendToFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO); + projectTraceService.sendTo(tokenDTO, formDTO); + return new Result(); + } + } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSubAttachmentDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSubAttachmentDao.java new file mode 100644 index 0000000000..58b5a192c8 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSubAttachmentDao.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; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.ProjectSubAttachmentEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 外部系统事件附件 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-17 + */ +@Mapper +public interface ProjectSubAttachmentDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSubProcessDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSubProcessDao.java new file mode 100644 index 0000000000..0d36cd36c3 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSubProcessDao.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; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.ProjectSubProcessEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 节点事件关联表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-17 + */ +@Mapper +public interface ProjectSubProcessDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectSubAttachmentEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectSubAttachmentEntity.java new file mode 100644 index 0000000000..f0f0ac20ba --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectSubAttachmentEntity.java @@ -0,0 +1,96 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 外部系统事件附件 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-17 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("project_sub_attachment") +public class ProjectSubAttachmentEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 项目ID + */ + private String projectId; + + /** + * 子节点ID + */ + private String subId; + + /** + * 事件ID + */ + private String taskId; + + /** + * 附件名 + */ + private String attachmentName; + + /** + * 文件大小 单位b + */ + private Integer attachmentSize; + + /** + * 文件格式 + */ + private String attachmentFormat; + + /** + * 类型 + */ + private String attachmentType; + + /** + * 附件地址 + */ + private String attachmentUrl; + + /** + * 语音或视频时长,秒 + */ + private Integer duration; + + /** + * 排序 + */ + private Integer sort; + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectSubProcessEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectSubProcessEntity.java new file mode 100644 index 0000000000..ee451e6416 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectSubProcessEntity.java @@ -0,0 +1,106 @@ +/** + * 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; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 节点事件关联表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-17 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("project_sub_process") +public class ProjectSubProcessEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 项目ID + */ + private String projectId; + + /** + * 节点ID + */ + private String processId; + + /** + * 项目人员关联表ID + */ + private String staffId; + + /** + * 系统ID + */ + private String platformId; + + /** + * 系统名 + */ + private String platformName; + + /** + * 第三方平台返回的项目关联ID(事件Id) + */ + private String taskId; + + /** + * 事件处理详细内容 + */ + private String result; + + /** + * 外部状态:1待处理,2待核实,3已上报,4已完结,5处理中,6待分发,7归档,8催办,9超时 + */ + private String externalStatus; + + /** + * 外部状态描述 + */ + private String externalStatusDesc; + + /** + * 内部状态:待处理 pending,结案closed + */ + private String internalStatus; + + /** + * 处理日期 + */ + private Date handleDate; + + /** + * 处理人姓名 + */ + private String handleUserName; + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectSubAttachmentService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectSubAttachmentService.java new file mode 100644 index 0000000000..94ee34d06f --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectSubAttachmentService.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; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.ProjectSubAttachmentDTO; +import com.epmet.entity.ProjectSubAttachmentEntity; + +import java.util.List; +import java.util.Map; + +/** + * 外部系统事件附件 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-17 + */ +public interface ProjectSubAttachmentService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-03-17 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-03-17 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return ProjectSubAttachmentDTO + * @author generator + * @date 2021-03-17 + */ + ProjectSubAttachmentDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-03-17 + */ + void save(ProjectSubAttachmentDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-03-17 + */ + void update(ProjectSubAttachmentDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-03-17 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectSubProcessService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectSubProcessService.java new file mode 100644 index 0000000000..c329a3aa95 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectSubProcessService.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; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.ProjectSubProcessDTO; +import com.epmet.entity.ProjectSubProcessEntity; + +import java.util.List; +import java.util.Map; + +/** + * 节点事件关联表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-17 + */ +public interface ProjectSubProcessService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-03-17 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-03-17 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return ProjectSubProcessDTO + * @author generator + * @date 2021-03-17 + */ + ProjectSubProcessDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-03-17 + */ + void save(ProjectSubProcessDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-03-17 + */ + void update(ProjectSubProcessDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-03-17 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectTraceService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectTraceService.java index 3b5d227ea4..f692900851 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectTraceService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectTraceService.java @@ -149,4 +149,14 @@ public interface ProjectTraceService { * @author sun */ void responseV2(TokenDto tokenDto, ProjectResponseFormDTO formDTO); + + /** + * 发送到外部平台 + * @author zhaoqifeng + * @date 2021/3/17 14:33 + * @param tokenDto + * @param formDTO + * @return void + */ + void sendTo(TokenDto tokenDto, SendToFormDTO formDTO); } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index 309377bb4b..ec471bd67b 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -280,6 +280,7 @@ public class ProjectServiceImpl extends BaseServiceImpl departmentList = projectStaffService.getDepartmentNameList(projectStaffDTO); if (null != departmentList && departmentList.size() > NumConstant.ZERO) { + //TODO external_system值为1时,根据departmentList里的projectStaffId在project_sub_process表找最新的一条记录,如果没有记录或者INTERNAL_STATUS是closed,processable + // 的值为true resultDTO.setProcessable(true); } else { resultDTO.setProcessable(false); diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSubAttachmentServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSubAttachmentServiceImpl.java new file mode 100644 index 0000000000..b87f5238ac --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSubAttachmentServiceImpl.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.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.ProjectSubAttachmentDao; +import com.epmet.dto.ProjectSubAttachmentDTO; +import com.epmet.entity.ProjectSubAttachmentEntity; +import com.epmet.service.ProjectSubAttachmentService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 外部系统事件附件 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-17 + */ +@Service +public class ProjectSubAttachmentServiceImpl extends BaseServiceImpl implements ProjectSubAttachmentService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, ProjectSubAttachmentDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, ProjectSubAttachmentDTO.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 ProjectSubAttachmentDTO get(String id) { + ProjectSubAttachmentEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ProjectSubAttachmentDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ProjectSubAttachmentDTO dto) { + ProjectSubAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, ProjectSubAttachmentEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ProjectSubAttachmentDTO dto) { + ProjectSubAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, ProjectSubAttachmentEntity.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/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSubProcessServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSubProcessServiceImpl.java new file mode 100644 index 0000000000..d3cb6457c1 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSubProcessServiceImpl.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.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.ProjectSubProcessDao; +import com.epmet.dto.ProjectSubProcessDTO; +import com.epmet.entity.ProjectSubProcessEntity; +import com.epmet.service.ProjectSubProcessService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 节点事件关联表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-17 + */ +@Service +public class ProjectSubProcessServiceImpl extends BaseServiceImpl implements ProjectSubProcessService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, ProjectSubProcessDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, ProjectSubProcessDTO.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 ProjectSubProcessDTO get(String id) { + ProjectSubProcessEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ProjectSubProcessDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ProjectSubProcessDTO dto) { + ProjectSubProcessEntity entity = ConvertUtils.sourceToTarget(dto, ProjectSubProcessEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ProjectSubProcessDTO dto) { + ProjectSubProcessEntity entity = ConvertUtils.sourceToTarget(dto, ProjectSubProcessEntity.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/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java index f2801b0c25..9009eedc3c 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java @@ -182,4 +182,18 @@ public class ProjectTraceServiceImpl implements ProjectTraceService { projectService.responseV2(formDTO); } + /** + * 发送到外部平台 + * + * @param tokenDto + * @param formDTO + * @return void + * @author zhaoqifeng + * @date 2021/3/17 14:33 + */ + @Override + public void sendTo(TokenDto tokenDto, SendToFormDTO formDTO) { + + } + } diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSubAttachmentDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSubAttachmentDao.xml new file mode 100644 index 0000000000..119e821d5b --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSubAttachmentDao.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSubProcessDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSubProcessDao.xml new file mode 100644 index 0000000000..7bbb56d5bc --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSubProcessDao.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 9c1a1d89efa7f8ed83ed2b47b97f27a7b882aaaa Mon Sep 17 00:00:00 2001 From: wxz Date: Thu, 18 Mar 2021 13:35:04 +0800 Subject: [PATCH 147/375] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E4=B8=89=E6=96=B9?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/ThirdPlatformFormDTO.java | 10 ++++--- ...ltDTO.java => ThirdplatformResultDTO.java} | 9 ++---- .../controller/ThirdPlatformController.java | 28 +++++++++++++------ .../dao/ThirdplatformCustomerRegisterDao.java | 10 +------ .../java/com/epmet/dao/ThirdplatformDao.java | 11 +++++++- .../com/epmet/entity/ThirdplatformEntity.java | 5 ++++ .../epmet/service/ThirdPlatformService.java | 4 +-- .../impl/ThirdPlatformServiceImpl.java | 9 +++--- .../ThirdplatformCustomerRegisterDao.xml | 24 ---------------- .../resources/mapper/ThirdplatformDao.xml | 27 ++++++++++++++++++ 10 files changed, 79 insertions(+), 58 deletions(-) rename epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/{ThirdplatformCustomerRegisterResultDTO.java => ThirdplatformResultDTO.java} (57%) diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ThirdPlatformFormDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ThirdPlatformFormDTO.java index 3f488e75c1..c2ff1a3666 100644 --- a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ThirdPlatformFormDTO.java +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ThirdPlatformFormDTO.java @@ -7,13 +7,15 @@ import javax.validation.constraints.NotBlank; @Data public class ThirdPlatformFormDTO { - // 列出注册关系分组 - public static interface ListRegRelsGroups {} + // 根据客户和动作查询分组 + public interface ListByCustomerAndActionGroup {} + // 根据动作查询分组 + public interface ListByActionGroup {} - @NotBlank(message = "客户ID不能为空", groups = { ListRegRelsGroups.class }) + @NotBlank(message = "客户ID不能为空", groups = { ListByCustomerAndActionGroup.class }) private String customerId; - @NotBlank(message = "客户ID不能为空", groups = { ListRegRelsGroups.class }) + @NotBlank(message = "客户ID不能为空", groups = { ListByCustomerAndActionGroup.class, ListByActionGroup.class }) private String actionKey; } diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/ThirdplatformCustomerRegisterResultDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/ThirdplatformResultDTO.java similarity index 57% rename from epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/ThirdplatformCustomerRegisterResultDTO.java rename to epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/ThirdplatformResultDTO.java index d637837fbc..6b0b163048 100644 --- a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/ThirdplatformCustomerRegisterResultDTO.java +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/ThirdplatformResultDTO.java @@ -3,16 +3,13 @@ package com.epmet.dto.result; import lombok.Data; @Data -public class ThirdplatformCustomerRegisterResultDTO { - /** - * - */ - private String customerId; - +public class ThirdplatformResultDTO { /** * */ private String platformId; private String platformName; + + private String icon; } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ThirdPlatformController.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ThirdPlatformController.java index 64c7f0e7f0..a8196d2520 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ThirdPlatformController.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ThirdPlatformController.java @@ -3,7 +3,7 @@ package com.epmet.controller; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.form.ThirdPlatformFormDTO; -import com.epmet.dto.result.ThirdplatformCustomerRegisterResultDTO; +import com.epmet.dto.result.ThirdplatformResultDTO; import com.epmet.service.ThirdPlatformService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; @@ -20,20 +20,32 @@ import java.util.List; @RequestMapping("thirdplatform") public class ThirdPlatformController { - @Autowired private ThirdPlatformService thirdPlatformService; /** - * 列出第三方平台注册关系 + * 根据客户id和动作,列出客户开通可用的第三方平台 * @param input * @return */ - @PostMapping("list-reg-rels") - public Result> listRegsteredPlatforms(@RequestBody ThirdPlatformFormDTO input) { - ValidatorUtils.validateEntity(input); - List platformRegs = thirdPlatformService.listByCustomerId(input.getCustomerId(), input.getActionKey()); - return new Result>().ok(platformRegs); + @PostMapping("customer/list-platforms-by-action") + public Result> listPlatformsByCustomerAndAction(@RequestBody ThirdPlatformFormDTO input) { + ValidatorUtils.validateEntity(input, ThirdPlatformFormDTO.ListByCustomerAndActionGroup.class); + List platformRegs = thirdPlatformService.listDTOS(input.getCustomerId(), input.getActionKey()); + return new Result>().ok(platformRegs); + } + + /** + * @Description 根据动作列出平台列表 + * @return + * @author wxz + * @date 2021.03.18 10:54 + */ + @PostMapping("list-platforms-by-action") + public Result> listPlatformsByAction(@RequestBody ThirdPlatformFormDTO input) { + ValidatorUtils.validateEntity(input, ThirdPlatformFormDTO.ListByActionGroup.class); + List platformRegs = thirdPlatformService.listDTOS(null, input.getActionKey()); + return new Result>().ok(platformRegs); } //@PostMapping("register") diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformCustomerRegisterDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformCustomerRegisterDao.java index b5ffe5cf82..cbae094292 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformCustomerRegisterDao.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformCustomerRegisterDao.java @@ -18,8 +18,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.constant.ThirdPlatformConstant; -import com.epmet.dto.result.ThirdplatformCustomerRegisterResultDTO; +import com.epmet.dto.result.ThirdplatformResultDTO; import com.epmet.entity.ThirdplatformCustomerRegisterEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -35,12 +34,5 @@ import java.util.List; @Mapper public interface ThirdplatformCustomerRegisterDao extends BaseDao { - /** - * 动态sql查询 - * @param customerId - * @return - */ - List listDTOS(@Param("customerId") String customerId, @Param("actionKey") String actionKey); - ThirdplatformCustomerRegisterEntity getByCustomerIdAndPlatformId(@Param("customerId") String customerId, @Param("platformId") String platformId); } \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformDao.java index 593d20923f..e86e63b7f2 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformDao.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformDao.java @@ -18,8 +18,12 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.ThirdplatformResultDTO; import com.epmet.entity.ThirdplatformEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * @@ -29,5 +33,10 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ThirdplatformDao extends BaseDao { - + /** + * 动态sql查询 + * @param customerId + * @return + */ + List listDTOS(@Param("customerId") String customerId, @Param("actionKey") String actionKey); } \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/ThirdplatformEntity.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/ThirdplatformEntity.java index d756c81b88..d5b20b8eab 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/ThirdplatformEntity.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/ThirdplatformEntity.java @@ -63,4 +63,9 @@ public class ThirdplatformEntity extends BaseEpmetEntity { */ private String baseUrl; + /** + * icon + */ + private String icon; + } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ThirdPlatformService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ThirdPlatformService.java index 74b4cab44f..8110c4b5b3 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ThirdPlatformService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ThirdPlatformService.java @@ -1,11 +1,11 @@ package com.epmet.service; -import com.epmet.dto.result.ThirdplatformCustomerRegisterResultDTO; +import com.epmet.dto.result.ThirdplatformResultDTO; import java.util.List; public interface ThirdPlatformService { - List listByCustomerId(String customerId, String actionKey); + List listDTOS(String customerId, String actionKey); } \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ThirdPlatformServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ThirdPlatformServiceImpl.java index 40556ebaca..5e23671983 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ThirdPlatformServiceImpl.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ThirdPlatformServiceImpl.java @@ -1,7 +1,8 @@ package com.epmet.service.impl; import com.epmet.dao.ThirdplatformCustomerRegisterDao; -import com.epmet.dto.result.ThirdplatformCustomerRegisterResultDTO; +import com.epmet.dao.ThirdplatformDao; +import com.epmet.dto.result.ThirdplatformResultDTO; import com.epmet.service.ThirdPlatformService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -12,10 +13,10 @@ import java.util.List; public class ThirdPlatformServiceImpl implements ThirdPlatformService { @Autowired - private ThirdplatformCustomerRegisterDao thirdplatformCustomerRegisterDao; + private ThirdplatformDao thirdplatformDao; @Override - public List listByCustomerId(String customerId, String actionKey) { - return thirdplatformCustomerRegisterDao.listDTOS(customerId, actionKey); + public List listDTOS(String customerId, String actionKey) { + return thirdplatformDao.listDTOS(customerId, actionKey); } } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformCustomerRegisterDao.xml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformCustomerRegisterDao.xml index 10edc458e3..4e5577228e 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformCustomerRegisterDao.xml +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformCustomerRegisterDao.xml @@ -31,28 +31,4 @@ and PLATFORM_ID = #{platformId} and DEL_FLAG = 0 - - - - \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformDao.xml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformDao.xml index 0bc68d7af2..0db6eba1f2 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformDao.xml +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformDao.xml @@ -9,6 +9,7 @@ + @@ -17,5 +18,31 @@ + \ No newline at end of file From 6f9bbcfaa991d301d25c78f187244702551a83e4 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 18 Mar 2021 13:42:59 +0800 Subject: [PATCH 148/375] =?UTF-8?q?trace/projectdetail=20api=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/ProjectDetailFromDTO.java | 5 +++++ .../com/epmet/constant/ProjectConstant.java | 2 ++ .../com/epmet/dao/ProjectSubProcessDao.java | 14 +++++++++++++- .../service/ProjectSubProcessService.java | 8 ++++++++ .../service/impl/ProjectServiceImpl.java | 19 ++++++++++++++++--- .../impl/ProjectSubProcessServiceImpl.java | 11 +++++++++++ .../service/impl/ProjectTraceServiceImpl.java | 1 + .../resources/mapper/ProjectSubProcessDao.xml | 18 ++++++++++++++++++ 8 files changed, 74 insertions(+), 4 deletions(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectDetailFromDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectDetailFromDTO.java index 28178701c5..7bf6e633a8 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectDetailFromDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectDetailFromDTO.java @@ -22,4 +22,9 @@ public class ProjectDetailFromDTO implements Serializable { * 用户ID */ private String userId; + + /** + * 客户ID + */ + private String customerId; } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/constant/ProjectConstant.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/constant/ProjectConstant.java index c883ad7153..6bae43e57b 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/constant/ProjectConstant.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/constant/ProjectConstant.java @@ -158,4 +158,6 @@ public interface ProjectConstant { String INTERNAL = "internal"; String NOT_EXIST_PROJECT = "未查询带此项目信息......"; + + String EXTERNAL_SYSTEM = "external_system"; } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSubProcessDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSubProcessDao.java index 0d36cd36c3..43dcf571db 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSubProcessDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSubProcessDao.java @@ -18,8 +18,12 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.ProjectSubProcessDTO; import com.epmet.entity.ProjectSubProcessEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 节点事件关联表 @@ -29,5 +33,13 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ProjectSubProcessDao extends BaseDao { - + + /** + * @Description 查询最新记录 + * @Param projectStaffIds + * @author zxc + * @date 2021/3/18 上午11:17 + */ + ProjectSubProcessDTO selectSubProcess(@Param("projectStaffIds") List projectStaffIds); + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectSubProcessService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectSubProcessService.java index c329a3aa95..b58f9c8a5a 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectSubProcessService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectSubProcessService.java @@ -92,4 +92,12 @@ public interface ProjectSubProcessService extends BaseService projectStaffIds); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index ec471bd67b..65da591036 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -107,6 +107,8 @@ public class ProjectServiceImpl extends BaseServiceImpl departmentList = projectStaffService.getDepartmentNameList(projectStaffDTO); if (null != departmentList && departmentList.size() > NumConstant.ZERO) { - //TODO external_system值为1时,根据departmentList里的projectStaffId在project_sub_process表找最新的一条记录,如果没有记录或者INTERNAL_STATUS是closed,processable - // 的值为true - resultDTO.setProcessable(true); + //TODO external_system值为1时,根据departmentList里的projectStaffId在project_sub_process表找最新的一条记录, + // 如果没有记录或者INTERNAL_STATUS是closed,processable的值为true + if (resultDTO.getIsSend()){ + List projectStaffIds = departmentList.stream().map(m -> m.getProjectStaffId()).distinct().collect(Collectors.toList()); + ProjectSubProcessDTO projectSubProcessDTO = projectSubProcessService.selectSubProcess(projectStaffIds); + resultDTO.setProcessable((null == projectSubProcessDTO || projectSubProcessDTO.getInternalStatus().equals(ProjectConstant.CLOSED)) ? true : false); + }else { + resultDTO.setProcessable(false); + } } else { resultDTO.setProcessable(false); } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSubProcessServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSubProcessServiceImpl.java index d3cb6457c1..ed03aefbc4 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSubProcessServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSubProcessServiceImpl.java @@ -97,4 +97,15 @@ public class ProjectSubProcessServiceImpl extends BaseServiceImpl projectStaffIds) { + return null; + } + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java index 9009eedc3c..c3c88b663f 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java @@ -67,6 +67,7 @@ public class ProjectTraceServiceImpl implements ProjectTraceService { @Override public ProjectDetailResultDTO getProjectDetail(TokenDto tokenDto, ProjectDetailFromDTO fromDTO) { fromDTO.setUserId(tokenDto.getUserId()); + fromDTO.setCustomerId(tokenDto.getCustomerId()); return projectService.getProjectDetail(fromDTO); } diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSubProcessDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSubProcessDao.xml index 7bbb56d5bc..f81f5e23f8 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSubProcessDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSubProcessDao.xml @@ -26,5 +26,23 @@ + + + \ No newline at end of file From f970eeb74ee1743a7ffb7033da92e87e863013e8 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 18 Mar 2021 14:17:31 +0800 Subject: [PATCH 149/375] =?UTF-8?q?trace/projectdetail=20api=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/impl/ProjectServiceImpl.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index 65da591036..5e07865804 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -301,12 +301,20 @@ public class ProjectServiceImpl extends BaseServiceImpl NumConstant.ZERO) { //TODO external_system值为1时,根据departmentList里的projectStaffId在project_sub_process表找最新的一条记录, // 如果没有记录或者INTERNAL_STATUS是closed,processable的值为true - if (resultDTO.getIsSend()){ + if (parameterValue.equals(NumConstant.ONE_STR)) { List projectStaffIds = departmentList.stream().map(m -> m.getProjectStaffId()).distinct().collect(Collectors.toList()); + // 根据departmentList里的projectStaffId在project_sub_process表找最新的一条记录 ProjectSubProcessDTO projectSubProcessDTO = projectSubProcessService.selectSubProcess(projectStaffIds); - resultDTO.setProcessable((null == projectSubProcessDTO || projectSubProcessDTO.getInternalStatus().equals(ProjectConstant.CLOSED)) ? true : false); - }else { - resultDTO.setProcessable(false); + if (null == projectSubProcessDTO || projectSubProcessDTO.getInternalStatus().equals(ProjectConstant.CLOSED)) { + resultDTO.setProcessable(true); + resultDTO.setIsSend(true); + } else { + resultDTO.setProcessable(false); + resultDTO.setIsSend(false); + } + } else { + resultDTO.setProcessable(true); + resultDTO.setIsSend(false); } } else { resultDTO.setProcessable(false); From 2d72f75c8d8c615a74c444034c6f95d7b8628c02 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 18 Mar 2021 14:25:42 +0800 Subject: [PATCH 150/375] =?UTF-8?q?project=5Fprocess=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/ProjectProcessDTO.java | 5 +++++ .../src/main/java/com/epmet/entity/ProjectProcessEntity.java | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectProcessDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectProcessDTO.java index 689b3317d1..aa8bfd0387 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectProcessDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectProcessDTO.java @@ -134,4 +134,9 @@ public class ProjectProcessDTO implements Serializable { */ private String orgIdPath; + /** + * 是否发送到外部系统 + */ + private Integer isSend; + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectProcessEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectProcessEntity.java index a862140529..9569803906 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectProcessEntity.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectProcessEntity.java @@ -108,4 +108,9 @@ public class ProjectProcessEntity extends BaseEpmetEntity { */ private String orgIdPath; + /** + * 是否发送到外部系统 + */ + private Integer isSend; + } From 56cd038c34fb6f3c0b4097232a1d79f34f88585e Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 18 Mar 2021 14:26:48 +0800 Subject: [PATCH 151/375] =?UTF-8?q?=E5=8D=87=E7=BA=A7auth=EF=BC=9A?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E7=94=9F=E4=BA=A7=E7=8E=AF=E5=A2=83=20jcet?= =?UTF-8?q?=20g=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/service/impl/SsoServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-auth/src/main/java/com/epmet/service/impl/SsoServiceImpl.java b/epmet-auth/src/main/java/com/epmet/service/impl/SsoServiceImpl.java index 3f77b56af1..f051924c9e 100644 --- a/epmet-auth/src/main/java/com/epmet/service/impl/SsoServiceImpl.java +++ b/epmet-auth/src/main/java/com/epmet/service/impl/SsoServiceImpl.java @@ -166,7 +166,7 @@ public class SsoServiceImpl implements SsoService { //test end if (!result.success() || null == result.getData() || null == result.getData().getUserId()) { - logger.error("根据手机号查询PC工作端登陆人员信息失败,返回10003账号不存在"); + logger.error("根据手机号查询PC工作端登陆人员信息失败,返回10003账号不存在,param:{}", JSON.toJSONString(form)); throw new RenException(EpmetErrorCode.ERR10003.getCode()); } From 1d16f90d3e437d1dcfdf50f1b4e7697dbcf4d382 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 18 Mar 2021 15:06:39 +0800 Subject: [PATCH 152/375] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E6=97=A7=E7=A8=8B=E5=BA=8F=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/IssueSaveCategoryFormDTO.java | 6 +++++ .../controller/IssueCategoryController.java | 7 +++--- .../IssueProjectCategoryDictController.java | 7 +++--- .../dao/IssueProjectCategoryDictDao.java | 5 ++-- .../IssueProjectCategoryDictService.java | 5 ++-- .../impl/IssueCategoryServiceImpl.java | 10 ++++---- .../IssueProjectCategoryDictServiceImpl.java | 12 ++++++--- .../mapper/IssueProjectCategoryDictDao.xml | 1 + .../IssueProjectCategoryDictListFormDTO.java | 25 +++++++++++++++++++ .../dto/form/ProjectSaveCategoryFormDTO.java | 8 +++++- .../controller/ProjectCategoryController.java | 3 ++- 11 files changed, 68 insertions(+), 21 deletions(-) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IssueProjectCategoryDictListFormDTO.java diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueSaveCategoryFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueSaveCategoryFormDTO.java index 4a9ef489ba..299a2d25d2 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueSaveCategoryFormDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueSaveCategoryFormDTO.java @@ -23,6 +23,12 @@ public class IssueSaveCategoryFormDTO implements Serializable { * 议题分类集合 */ private List categoryList; + + /** + * 客户Id + */ + private String customerId; + public interface SaveCategory{} } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCategoryController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCategoryController.java index f8755d1037..cba3ed0825 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCategoryController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCategoryController.java @@ -17,9 +17,9 @@ package com.epmet.controller; -import com.epmet.commons.tools.constant.NumConstant; -import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; @@ -128,7 +128,8 @@ public class IssueCategoryController { * @Author sun **/ @PostMapping("save") - public Result saveCategory(@RequestBody IssueSaveCategoryFormDTO formDTO) { + public Result saveCategory(@LoginUser TokenDto tokenDto, @RequestBody IssueSaveCategoryFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); ValidatorUtils.validateEntity(formDTO, IssueSaveCategoryFormDTO.SaveCategory.class); issueCategoryService.saveCategory(formDTO); return new Result(); diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java index 16fb700639..d6fb36123d 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java @@ -29,6 +29,7 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IssueProjectCategoryDictDTO; import com.epmet.dto.form.CategoryTagInitFormDTO; +import com.epmet.dto.form.IssueProjectCategoryDictListFormDTO; import com.epmet.dto.form.ProjectSaveCategoryFormDTO; import com.epmet.dto.result.CustomerCategoryListResultDTO; import com.epmet.dto.result.ProjectIssueCategoryResultDTO; @@ -122,14 +123,14 @@ public class IssueProjectCategoryDictController { } /** - * @param cstegoryIdList + * @param formDTO * @return * @Description 批量查询分类信息 * @Author sun **/ @PostMapping("getcategorylist") - public Result> getCategoryList(@RequestBody List cstegoryIdList) { - return new Result>().ok(issueProjectCategoryDictService.getCategoryList(cstegoryIdList)); + public Result> getCategoryList(@RequestBody IssueProjectCategoryDictListFormDTO formDTO) { + return new Result>().ok(issueProjectCategoryDictService.getCategoryList(formDTO)); } /** diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java index 52405b07f5..28e1522491 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java @@ -19,6 +19,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.IssueProjectCategoryDictDTO; +import com.epmet.dto.form.IssueProjectCategoryDictListFormDTO; import com.epmet.dto.result.CustomerCategoryListResultDTO; import com.epmet.entity.IssueProjectCategoryDictEntity; import org.apache.ibatis.annotations.Mapper; @@ -55,12 +56,12 @@ public interface IssueProjectCategoryDictDao extends BaseDao selectCategoryListByCustomer(@Param("customerId") String customerId); /** - * @param cstegoryIdList + * @param formDTO * @return * @Description 批量查询分类信息 * @Author sun **/ - List selectCategoryList(@Param("cstegoryIdList") List cstegoryIdList); + List selectCategoryList(IssueProjectCategoryDictListFormDTO formDTO); /** * @Description 根据客户Id、类别名称、类型查询单个类别 默认查询二级分类 diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java index c283895c9f..3b1fa1def1 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java @@ -21,6 +21,7 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IssueProjectCategoryDictDTO; import com.epmet.dto.form.CategoryTagInitFormDTO; +import com.epmet.dto.form.IssueProjectCategoryDictListFormDTO; import com.epmet.dto.form.ProjectSaveCategoryFormDTO; import com.epmet.dto.result.CustomerCategoryListResultDTO; import com.epmet.dto.result.ProjectIssueCategoryResultDTO; @@ -115,12 +116,12 @@ public interface IssueProjectCategoryDictService extends BaseService getCategoryList(List cstegoryIdList); + List getCategoryList(IssueProjectCategoryDictListFormDTO formDTO); /** * @param formDTO diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java index 85d52737da..724d256e34 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java @@ -29,10 +29,7 @@ import com.epmet.dao.IssueCategoryDao; import com.epmet.dao.IssueTagsDao; import com.epmet.dto.IssueCategoryDTO; import com.epmet.dto.IssueProjectCategoryDictDTO; -import com.epmet.dto.form.IssueCategoryTagListFormDTO; -import com.epmet.dto.form.IssueSaveCategoryFormDTO; -import com.epmet.dto.form.ProjectCategoryTagListFormDTO; -import com.epmet.dto.form.SaveIssueCategoryFormDTO; +import com.epmet.dto.form.*; import com.epmet.dto.result.IssueCategoryTagListResultDTO; import com.epmet.dto.result.IssueCategoryTagResultDTO; import com.epmet.dto.result.ProjectCategoryTagResultDTO; @@ -192,7 +189,10 @@ public class IssueCategoryServiceImpl extends BaseServiceImpl categoryIdList = formDTO.getCategoryList().stream().map(SaveIssueCategoryFormDTO::getId).collect(Collectors.toList()); - List categoryList = issueProjectCategoryDictService.getCategoryList(categoryIdList); + IssueProjectCategoryDictListFormDTO dictDto = new IssueProjectCategoryDictListFormDTO(); + dictDto.setCustomerId(formDTO.getCustomerId()); + dictDto.setCstegoryIdList(categoryIdList); + List categoryList = issueProjectCategoryDictService.getCategoryList(dictDto); if (null == categoryList) { throw new RenException(String.format("议题分类信息保存,根据分类Id获取分类信息失败")); } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java index 966fb2ce14..6b8f05d845 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java @@ -29,6 +29,7 @@ import com.epmet.dao.IssueProjectRelationDao; import com.epmet.dto.IssueDTO; import com.epmet.dto.IssueProjectCategoryDictDTO; import com.epmet.dto.form.CategoryTagInitFormDTO; +import com.epmet.dto.form.IssueProjectCategoryDictListFormDTO; import com.epmet.dto.form.ProjectSaveCategoryFormDTO; import com.epmet.dto.form.SaveIssueCategoryFormDTO; import com.epmet.dto.result.CustomerCategoryListResultDTO; @@ -132,14 +133,14 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl getCategoryList(List cstegoryIdList) { - return baseDao.selectCategoryList(cstegoryIdList); + public List getCategoryList(IssueProjectCategoryDictListFormDTO formDTO) { + return baseDao.selectCategoryList(formDTO); } /** @@ -160,7 +161,10 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl categoryIdList = formDTO.getCategoryList().stream().map(SaveIssueCategoryFormDTO::getId).collect(Collectors.toList()); - List categoryList = getCategoryList(categoryIdList); + IssueProjectCategoryDictListFormDTO dictDto = new IssueProjectCategoryDictListFormDTO(); + dictDto.setCustomerId(formDTO.getCustomerId()); + dictDto.setCstegoryIdList(categoryIdList); + List categoryList = getCategoryList(dictDto); if (null == categoryList) { throw new RenException(String.format("保存项目分类信息,根据分类Id获取分类信息失败")); } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml index 9bcdc54cdf..b531d9d26e 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml @@ -62,6 +62,7 @@ issue_project_category_dict WHERE del_flag = '0' + AND customer_id = #{customerId} id = #{id} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IssueProjectCategoryDictListFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IssueProjectCategoryDictListFormDTO.java new file mode 100644 index 0000000000..ac2903fe32 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IssueProjectCategoryDictListFormDTO.java @@ -0,0 +1,25 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * 批量查询分类信息-接口入参 + * @Author sun + */ +@Data +public class IssueProjectCategoryDictListFormDTO implements Serializable { + + private static final long serialVersionUID = 2599592072265715951L; + /** + * 客户Id + */ + private String customerId; + /** + * 分类Id集合 + */ + private List cstegoryIdList; + +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectSaveCategoryFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectSaveCategoryFormDTO.java index 9d0d1a407f..34a8732be5 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectSaveCategoryFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectSaveCategoryFormDTO.java @@ -15,7 +15,7 @@ public class ProjectSaveCategoryFormDTO implements Serializable { private static final long serialVersionUID = 2599592072265715951L; /** - * 议题Id + * 项目Id */ @NotBlank(message = "项目ID不能为空",groups = {SaveCategory.class}) private String projectId; @@ -23,6 +23,12 @@ public class ProjectSaveCategoryFormDTO implements Serializable { * 议题分类集合 */ private List categoryList; + + /** + * 客户Id + */ + private String customerId; + public interface SaveCategory{} } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectCategoryController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectCategoryController.java index c47fb0ea4c..d1392bd0a6 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectCategoryController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectCategoryController.java @@ -118,7 +118,8 @@ public class ProjectCategoryController { * @Author sun **/ @PostMapping("save") - public Result saveCategory(@RequestBody ProjectSaveCategoryFormDTO formDTO) { + public Result saveCategory(@LoginUser TokenDto tokenDto, @RequestBody ProjectSaveCategoryFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); ValidatorUtils.validateEntity(formDTO, ProjectSaveCategoryFormDTO.SaveCategory.class); projectCategoryService.saveCategory(formDTO); return new Result(); From f1be2842b8944c85a22992b7d83037b7c8f3a13a Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 18 Mar 2021 15:53:15 +0800 Subject: [PATCH 153/375] =?UTF-8?q?trace/processList-v2=20api=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/ProcessListV2ResultDTO.java | 6 ++++ .../com/epmet/dto/result/SubProcessDTO.java | 1 + .../com/epmet/dao/ProjectSubProcessDao.java | 9 +++++ .../service/ProjectSubProcessService.java | 9 +++++ .../impl/ProjectSubProcessServiceImpl.java | 14 +++++++- .../service/impl/ProjectTraceServiceImpl.java | 15 +++++--- .../resources/mapper/ProjectProcessDao.xml | 3 +- .../resources/mapper/ProjectSubProcessDao.xml | 36 +++++++++++++++++++ 8 files changed, 87 insertions(+), 6 deletions(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessListV2ResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessListV2ResultDTO.java index 2f3da4a57f..cea1ce6288 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessListV2ResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessListV2ResultDTO.java @@ -44,6 +44,11 @@ public class ProcessListV2ResultDTO implements Serializable { */ private String publicReply; + /** + * 是否发送到外部系统 0否 1是 + */ + private Integer isSend; + /** * 内部备注 */ @@ -73,5 +78,6 @@ public class ProcessListV2ResultDTO implements Serializable { this.internalRemark = ""; this.publicFile = new ArrayList<>(); this.internalFile = new ArrayList<>(); + this.subProcess = new ArrayList<>(); } } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/SubProcessDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/SubProcessDTO.java index 9a2c3406f7..a5a8f871f8 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/SubProcessDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/SubProcessDTO.java @@ -29,6 +29,7 @@ public class SubProcessDTO implements Serializable { * 处理人 */ private String handleUserName; + private String subId; /** * 处理内容 */ diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSubProcessDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSubProcessDao.java index 43dcf571db..dd887c38be 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSubProcessDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSubProcessDao.java @@ -19,6 +19,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.ProjectSubProcessDTO; +import com.epmet.dto.result.SubProcessDTO; import com.epmet.entity.ProjectSubProcessEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -42,4 +43,12 @@ public interface ProjectSubProcessDao extends BaseDao { */ ProjectSubProcessDTO selectSubProcess(@Param("projectStaffIds") List projectStaffIds); + /** + * @Description 查询进展和附件 + * @Param processId + * @author zxc + * @date 2021/3/18 下午2:57 + */ + List selectSubProcessAndAttachment(@Param("processId") String processId); + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectSubProcessService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectSubProcessService.java index b58f9c8a5a..9d1aba55f9 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectSubProcessService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectSubProcessService.java @@ -20,6 +20,7 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.ProjectSubProcessDTO; +import com.epmet.dto.result.SubProcessDTO; import com.epmet.entity.ProjectSubProcessEntity; import java.util.List; @@ -100,4 +101,12 @@ public interface ProjectSubProcessService extends BaseService projectStaffIds); + + /** + * @Description 查询进展和附件 + * @Param processId + * @author zxc + * @date 2021/3/18 下午2:57 + */ + List selectSubProcessAndAttachment(String processId); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSubProcessServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSubProcessServiceImpl.java index ed03aefbc4..3314826387 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSubProcessServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSubProcessServiceImpl.java @@ -25,6 +25,7 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.dao.ProjectSubProcessDao; import com.epmet.dto.ProjectSubProcessDTO; +import com.epmet.dto.result.SubProcessDTO; import com.epmet.entity.ProjectSubProcessEntity; import com.epmet.service.ProjectSubProcessService; import org.apache.commons.lang3.StringUtils; @@ -105,7 +106,18 @@ public class ProjectSubProcessServiceImpl extends BaseServiceImpl projectStaffIds) { - return null; + return baseDao.selectSubProcess(projectStaffIds); + } + + /** + * @Description 查询进展和附件 + * @Param processId + * @author zxc + * @date 2021/3/18 下午2:57 + */ + @Override + public List selectSubProcessAndAttachment(String processId) { + return baseDao.selectSubProcessAndAttachment(processId); } } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java index c3c88b663f..0faaefda73 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java @@ -1,5 +1,6 @@ package com.epmet.service.impl; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; @@ -11,10 +12,7 @@ import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.entity.ProjectStaffEntity; import com.epmet.feign.GovOrgFeignClient; -import com.epmet.service.ProjectProcessService; -import com.epmet.service.ProjectService; -import com.epmet.service.ProjectStaffService; -import com.epmet.service.ProjectTraceService; +import com.epmet.service.*; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -45,6 +43,8 @@ public class ProjectTraceServiceImpl implements ProjectTraceService { private ProjectProcessDao projectProcessDao; @Autowired private ProjectProcessAttachmentDao attachmentDao; + @Autowired + private ProjectSubProcessService projectSubProcessService; @Override public List getPendProjectList(TokenDto tokenDto, ProjectListFromDTO fromDTO) { @@ -144,6 +144,13 @@ public class ProjectTraceServiceImpl implements ProjectTraceService { log.warn(ProjectConstant.NOT_EXIST_PROJECT); return new ArrayList<>(); } + // 是否发送到外部系统 0否 1是 + processList.forEach(p -> { + if (p.getIsSend().equals(NumConstant.ONE)){ + p.setSubProcess(projectSubProcessService.selectSubProcessAndAttachment(p.getProcessId())); + } + }); + // 查询进展附件列表 List files = attachmentDao.selectAttachByProjectId(formDTO.getProjectId()); if (!CollectionUtils.isEmpty(files)){ diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectProcessDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectProcessDao.xml index 27bb86c807..131ba02434 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectProcessDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectProcessDao.xml @@ -94,7 +94,8 @@ UNIX_TIMESTAMP(created_time) AS processTime, DEPARTMENT_NAME, PUBLIC_REPLY, - INTERNAL_REMARK + INTERNAL_REMARK, + IS_SEND FROM project_process WHERE DEL_FLAG = '0' AND PROJECT_ID = #{projectId} diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSubProcessDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSubProcessDao.xml index f81f5e23f8..893fb54b1c 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSubProcessDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSubProcessDao.xml @@ -44,5 +44,41 @@ + + + + + + + + + + + + + \ No newline at end of file From c5fd4f60adb2ab735a9f2bd5242fdf31e84f45d2 Mon Sep 17 00:00:00 2001 From: wxz Date: Thu, 18 Mar 2021 16:01:22 +0800 Subject: [PATCH 154/375] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=AC=AC=E4=B8=89?= =?UTF-8?q?=E6=96=B9=E5=B9=B3=E5=8F=B0=E5=AF=B9=E6=8E=A5=E7=9A=84=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/ThirdPlatformFormDTO.java | 8 +-- .../controller/ThirdPlatformController.java | 26 ++++----- .../dao/ThirdplatformCustomerActionDao.java | 33 +++++++++++ .../java/com/epmet/dao/ThirdplatformDao.java | 4 ++ .../ThirdplatformCustomerActionEntity.java | 56 +++++++++++++++++++ .../ThirdplatformCustomerRegisterEntity.java | 4 ++ .../epmet/service/ThirdPlatformService.java | 3 +- .../impl/ThirdPlatformServiceImpl.java | 10 +++- .../mapper/ThirdplatformCustomerActionDao.xml | 20 +++++++ .../ThirdplatformCustomerRegisterDao.xml | 4 ++ .../resources/mapper/ThirdplatformDao.xml | 42 ++++++++++++++ 11 files changed, 189 insertions(+), 21 deletions(-) create mode 100644 epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformCustomerActionDao.java create mode 100644 epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/ThirdplatformCustomerActionEntity.java create mode 100644 epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformCustomerActionDao.xml diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ThirdPlatformFormDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ThirdPlatformFormDTO.java index c2ff1a3666..475a09a4de 100644 --- a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ThirdPlatformFormDTO.java +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ThirdPlatformFormDTO.java @@ -8,14 +8,14 @@ import javax.validation.constraints.NotBlank; public class ThirdPlatformFormDTO { // 根据客户和动作查询分组 - public interface ListByCustomerAndActionGroup {} + public interface ListAvailableByCustomerAndActionGroup {} // 根据动作查询分组 - public interface ListByActionGroup {} + public interface ListSelectableByCustomerAndActionGroup {} - @NotBlank(message = "客户ID不能为空", groups = { ListByCustomerAndActionGroup.class }) + @NotBlank(message = "客户ID不能为空", groups = { ListAvailableByCustomerAndActionGroup.class }) private String customerId; - @NotBlank(message = "客户ID不能为空", groups = { ListByCustomerAndActionGroup.class, ListByActionGroup.class }) + @NotBlank(message = "客户ID不能为空", groups = { ListAvailableByCustomerAndActionGroup.class, ListSelectableByCustomerAndActionGroup.class }) private String actionKey; } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ThirdPlatformController.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ThirdPlatformController.java index a8196d2520..92976c57e1 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ThirdPlatformController.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ThirdPlatformController.java @@ -24,32 +24,32 @@ public class ThirdPlatformController { private ThirdPlatformService thirdPlatformService; /** - * 根据客户id和动作,列出客户开通可用的第三方平台 + * 根据客户id和动作,列出客户登记可用的第三方平台 + * * @param input * @return */ - @PostMapping("customer/list-platforms-by-action") - public Result> listPlatformsByCustomerAndAction(@RequestBody ThirdPlatformFormDTO input) { - ValidatorUtils.validateEntity(input, ThirdPlatformFormDTO.ListByCustomerAndActionGroup.class); - List platformRegs = thirdPlatformService.listDTOS(input.getCustomerId(), input.getActionKey()); + @PostMapping("customer/list-available-platforms-by-action") + public Result> listAvailablePlatformsByCustomerAndAction(@RequestBody ThirdPlatformFormDTO input) { + ValidatorUtils.validateEntity(input, ThirdPlatformFormDTO.ListAvailableByCustomerAndActionGroup.class); + List platformRegs = thirdPlatformService.listAvailablePlatformsByCustomerAndAction(input.getCustomerId(), input.getActionKey()); return new Result>().ok(platformRegs); } /** - * @Description 根据动作列出平台列表 * @return + * @Description 根据客户id和动作,列出客户可选的第三方系统 * @author wxz * @date 2021.03.18 10:54 - */ - @PostMapping("list-platforms-by-action") - public Result> listPlatformsByAction(@RequestBody ThirdPlatformFormDTO input) { - ValidatorUtils.validateEntity(input, ThirdPlatformFormDTO.ListByActionGroup.class); - List platformRegs = thirdPlatformService.listDTOS(null, input.getActionKey()); - return new Result>().ok(platformRegs); + */ + @PostMapping("customer/list-selectable-platforms-by-action") + public Result> listSelectablePlatformsByAction(@RequestBody ThirdPlatformFormDTO input) { + ValidatorUtils.validateEntity(input, ThirdPlatformFormDTO.ListSelectableByCustomerAndActionGroup.class); + List platformRegs = thirdPlatformService.listSelectableByCustomerAndActionGroup(input.getCustomerId(), input.getActionKey()); + return new Result>().ok(platformRegs); } //@PostMapping("register") - } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformCustomerActionDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformCustomerActionDao.java new file mode 100644 index 0000000000..4b937061fd --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformCustomerActionDao.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; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.ThirdplatformCustomerActionEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 客户针对指定操作所选用的第三方平台列表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-18 + */ +@Mapper +public interface ThirdplatformCustomerActionDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformDao.java index e86e63b7f2..8b5e7840cc 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformDao.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformDao.java @@ -39,4 +39,8 @@ public interface ThirdplatformDao extends BaseDao { * @return */ List listDTOS(@Param("customerId") String customerId, @Param("actionKey") String actionKey); + + List listAvailablePlatformsByCustomerAndAction(@Param("customerId") String customerId, @Param("actionKey") String actionKey); + + List listSelectableByCustomerAndActionGroup(@Param("customerId") String customerId, @Param("actionKey") String actionKey); } \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/ThirdplatformCustomerActionEntity.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/ThirdplatformCustomerActionEntity.java new file mode 100644 index 0000000000..8be40a1a0b --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/ThirdplatformCustomerActionEntity.java @@ -0,0 +1,56 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 客户针对指定操作所选用的第三方平台列表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("thirdplatform_customer_action") +public class ThirdplatformCustomerActionEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 平台ID + */ + private String platformId; + + /** + * 动作key + */ + private String actionKey; + +} diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/ThirdplatformCustomerRegisterEntity.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/ThirdplatformCustomerRegisterEntity.java index b3b77fb626..8f19691433 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/ThirdplatformCustomerRegisterEntity.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/ThirdplatformCustomerRegisterEntity.java @@ -48,4 +48,8 @@ public class ThirdplatformCustomerRegisterEntity extends BaseEpmetEntity { */ private String platformId; + private String customizedPlatformName; + + private String customizedPlatformIcon; + } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ThirdPlatformService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ThirdPlatformService.java index 8110c4b5b3..aa86027db9 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ThirdPlatformService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ThirdPlatformService.java @@ -6,6 +6,7 @@ import java.util.List; public interface ThirdPlatformService { - List listDTOS(String customerId, String actionKey); + List listAvailablePlatformsByCustomerAndAction(String customerId, String actionKey); + List listSelectableByCustomerAndActionGroup(String customerId, String actionKey); } \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ThirdPlatformServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ThirdPlatformServiceImpl.java index 5e23671983..9a7ed8bb3c 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ThirdPlatformServiceImpl.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ThirdPlatformServiceImpl.java @@ -1,6 +1,5 @@ package com.epmet.service.impl; -import com.epmet.dao.ThirdplatformCustomerRegisterDao; import com.epmet.dao.ThirdplatformDao; import com.epmet.dto.result.ThirdplatformResultDTO; import com.epmet.service.ThirdPlatformService; @@ -16,7 +15,12 @@ public class ThirdPlatformServiceImpl implements ThirdPlatformService { private ThirdplatformDao thirdplatformDao; @Override - public List listDTOS(String customerId, String actionKey) { - return thirdplatformDao.listDTOS(customerId, actionKey); + public List listAvailablePlatformsByCustomerAndAction(String customerId, String actionKey) { + return thirdplatformDao.listAvailablePlatformsByCustomerAndAction(customerId, actionKey); + } + + @Override + public List listSelectableByCustomerAndActionGroup(String customerId, String actionKey) { + return thirdplatformDao.listSelectableByCustomerAndActionGroup(customerId, actionKey); } } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformCustomerActionDao.xml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformCustomerActionDao.xml new file mode 100644 index 0000000000..33c76cfd7a --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformCustomerActionDao.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformCustomerRegisterDao.xml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformCustomerRegisterDao.xml index 4e5577228e..e4cdddc98d 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformCustomerRegisterDao.xml +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformCustomerRegisterDao.xml @@ -7,6 +7,8 @@ + + @@ -20,6 +22,8 @@ select tcr.id, customer_id, platform_id, + customized_platform_name, + customized_platform_icon, del_flag, revision, created_by, diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformDao.xml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformDao.xml index 0db6eba1f2..beec9ed36d 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformDao.xml +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformDao.xml @@ -45,4 +45,46 @@ + + + \ No newline at end of file From a66f848d956b58910150c106a6a4952b229c350f Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 18 Mar 2021 16:09:46 +0800 Subject: [PATCH 155/375] =?UTF-8?q?trace/processList-v2=20api=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/impl/ProjectSubProcessServiceImpl.java | 8 ++++++++ .../com/epmet/service/impl/ProjectTraceServiceImpl.java | 1 + 2 files changed, 9 insertions(+) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSubProcessServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSubProcessServiceImpl.java index 3314826387..ffbae9a85f 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSubProcessServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSubProcessServiceImpl.java @@ -31,7 +31,9 @@ import com.epmet.service.ProjectSubProcessService; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; @@ -106,6 +108,9 @@ public class ProjectSubProcessServiceImpl extends BaseServiceImpl projectStaffIds) { + if (CollectionUtils.isEmpty(projectStaffIds)){ + return null; + } return baseDao.selectSubProcess(projectStaffIds); } @@ -117,6 +122,9 @@ public class ProjectSubProcessServiceImpl extends BaseServiceImpl selectSubProcessAndAttachment(String processId) { + if (StringUtils.isEmpty(processId)){ + return new ArrayList<>(); + } return baseDao.selectSubProcessAndAttachment(processId); } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java index 0faaefda73..c7d29968da 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java @@ -147,6 +147,7 @@ public class ProjectTraceServiceImpl implements ProjectTraceService { // 是否发送到外部系统 0否 1是 processList.forEach(p -> { if (p.getIsSend().equals(NumConstant.ONE)){ + // 赋值 子节点 p.setSubProcess(projectSubProcessService.selectSubProcessAndAttachment(p.getProcessId())); } }); From 57900ec03fc5e09f6e71f799a64e0b8a792c6b06 Mon Sep 17 00:00:00 2001 From: wangchao Date: Thu, 18 Mar 2021 16:19:31 +0800 Subject: [PATCH 156/375] =?UTF-8?q?issueVoteStats=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dao/IssueVoteDetailDao.java | 18 ++++ .../com/epmet/redis/IssueVoteDetailRedis.java | 37 +++++++- .../impl/IssueVoteStatisticalServiceImpl.java | 86 ++++++++++++------- .../resources/mapper/IssueVoteDetailDao.xml | 36 ++++++++ 4 files changed, 141 insertions(+), 36 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueVoteDetailDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueVoteDetailDao.java index 622a68e6cd..c5c96901ea 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueVoteDetailDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueVoteDetailDao.java @@ -20,6 +20,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.IssueVoteDetailDTO; import com.epmet.dto.form.VoteFormDTO; +import com.epmet.dto.form.VoteRedisFormDTO; import com.epmet.dto.result.IssueAttitudeCountResultDTO; import com.epmet.dto.result.MyPartIssuesResultDTO; import com.epmet.entity.IssueVoteDetailEntity; @@ -95,4 +96,21 @@ public interface IssueVoteDetailDao extends BaseDao { * @Date 2020/11/18 14:35 **/ IssueVoteDetailDTO selectUserIssueDet(@Param("userId") String userId, @Param("issueId") String issueId); + + /** + * @Description 统计出一个议题的所有支持数和反对数 + * @param issueId + * @return com.epmet.dto.form.VoteRedisFormDTO + * @author wangc + * @date 2021.03.03 18:09 + */ + VoteRedisFormDTO selectInfo4Cache(@Param("issueId") String issueId); + /** + * @Description 批量统计出议题的所有支持数和反对数 + * @param issueIds + * @return java.util.Set + * @author wangc + * @date 2021.03.18 14:58 + */ + List selectBatchVoteCount(@Param("issueIds")Set issueIds); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueVoteDetailRedis.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueVoteDetailRedis.java index 268ddfbf88..a4a1439936 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueVoteDetailRedis.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueVoteDetailRedis.java @@ -22,6 +22,7 @@ import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.redis.RedisUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.IssueConstant; +import com.epmet.dao.IssueVoteDetailDao; import com.epmet.dto.IssueDTO; import com.epmet.dto.form.CommonGridIdFormDTO; import com.epmet.dto.form.VoteRedisFormDTO; @@ -29,14 +30,20 @@ import com.epmet.feign.ResiGroupFeignClient; import com.epmet.service.IssueService; import com.epmet.service.IssueVoteDetailService; import com.epmet.utils.ModuleConstants; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.redis.core.RedisCallback; +import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Component; import java.lang.reflect.Field; +import java.util.List; import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; import static com.epmet.commons.tools.redis.RedisUtils.NOT_EXPIRE; @@ -59,13 +66,37 @@ public class IssueVoteDetailRedis { @Autowired private IssueService issueService; + @Autowired + private RedisTemplate redisTemplate; + @Autowired private IssueVoteDetailService issueVoteDetailService; + @Autowired + private IssueVoteDetailDao issueVoteDetailDao; + public void delete(Object[] ids) { } + public void deleteBatch(List issueIds){ + if(CollectionUtils.isEmpty(issueIds)) return ; + Set keys = issueIds.stream().map(id -> { + return IssueConstant.REDIS_KEY + id; + }).collect(Collectors.toSet()); + + redisTemplate.executePipelined((RedisCallback) connection ->{ + keys.forEach( ser -> {connection.del(redisTemplate.getKeySerializer().serialize(ser));}); + return null; + }); + } + + + public void delete(String issueId){ + redisUtils.delete(IssueConstant.REDIS_KEY +issueId); + } + + public void set(VoteRedisFormDTO vote){ @@ -185,10 +216,8 @@ public class IssueVoteDetailRedis { } //如果缓存中没有,去表决详情中计算出实时数据,并放入缓存中 //无需查询issue_vote_statistical中的数据,因为不是实时数据,可能不准确,有定时任务会自动同步 - VoteRedisFormDTO voteCache = new VoteRedisFormDTO(); - voteCache.setIssueId(issueId); - voteCache.setSupportAmount(issueVoteDetailService.getVotingCount(issueId,IssueConstant.SUPPORT)); - voteCache.setOppositionAmount(issueVoteDetailService.getVotingCount(issueId,IssueConstant.OPPOSE)); + VoteRedisFormDTO voteCache = issueVoteDetailDao.selectInfo4Cache(issueId); + if(StringUtils.isBlank(voteCache.getIssueId())) voteCache.setIssueId(issueId); IssueDTO issue = issueService.get(issueId); if(null != issue){ CommonGridIdFormDTO gridId = new CommonGridIdFormDTO(); diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java index fc8a5138de..003b0acd9e 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java @@ -63,7 +63,6 @@ import java.time.LocalDateTime; import java.time.ZoneOffset; import java.util.*; import java.util.stream.Collectors; -import java.util.stream.Stream; /** * 议题表决统计表 @@ -256,6 +255,7 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl ids = issues.stream().map(IssueDTO::getId).collect(Collectors.toSet()); - List gridIds = issues.stream().map(IssueDTO::getGridId).collect(Collectors.toList()); + List gridIds = issues.stream().map(IssueDTO::getGridId).distinct().collect(Collectors.toList()); CommonGridIdListFormDTO gridIdList = new CommonGridIdListFormDTO(); gridIdList.setGridIds(gridIds); Result votableCountResult = resiGroupFeignClient.votableCounts(gridIdList); - Map votableCountMap = null; + Map votableCountMap1 = null; if(votableCountResult.success() && null != votableCountResult.getData() && null != votableCountResult.getData().getVotableCountMap()){ - votableCountMap = votableCountResult.getData().getVotableCountMap(); + votableCountMap1 = votableCountResult.getData().getVotableCountMap(); } + final Map votableCountMap = votableCountMap1; List statisticalList = baseDao.selectListByIds(ids); @@ -287,9 +288,8 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl existedIds = new HashSet<>(); - existedIds.addAll(ids); - existedIds.retainAll(statisiticalIds); + Set existedIds = new HashSet<>(statisiticalIds); + //更新 //对ids进行更新 - 从缓存中拿取 List listToUpdate = new ArrayList<>(); @@ -302,12 +302,42 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl NumConstant.ZERO) { + Map issueGridMap = issues.stream().collect(Collectors.toMap(IssueDTO::getId,IssueDTO::getGridId,(o, n) -> o)); //新增 - List toInsert = new ArrayList<>(); + List toInsert = new LinkedList<>(); + List voteList = issueVoteDetailDao.selectBatchVoteCount(notExistedIds); + List votedIssueIds = new ArrayList<>(); + if(!CollectionUtils.isEmpty(voteList) && StringUtils.isNotBlank(voteList.get(NumConstant.ZERO).getIssueId())) { + toInsert = voteList.stream().map(o -> { + IssueVoteStatisticalDTO dto = new IssueVoteStatisticalDTO(); + dto.setIssueId(o.getIssueId()); + dto.setOppositionCount(o.getOppositionAmount()); + dto.setSupportCount(o.getSupportAmount()); + dto.setVotableCount(Optional.ofNullable(votableCountMap.get(issueGridMap.get(o.getIssueId()))).orElse(NumConstant.ZERO)); + dto.setCreatedBy(ModuleConstants.CREATED_BY_SYSTEM);dto.setUpdatedBy(ModuleConstants.CREATED_BY_SYSTEM); + return dto; + }).collect(Collectors.toList()); + votedIssueIds = voteList.stream().map(VoteRedisFormDTO::getIssueId).collect(Collectors.toList()); + } - List summaryList = issueVoteDetailDao.getVotingSummaryList(ids); + notExistedIds.removeAll(votedIssueIds); + if(!notExistedIds.isEmpty()){ + List collect = notExistedIds.stream().map(issueId -> { + IssueVoteStatisticalDTO dto = new IssueVoteStatisticalDTO(); + dto.setIssueId(issueId); + dto.setSupportCount(NumConstant.ZERO); + dto.setOppositionCount(NumConstant.ZERO); + dto.setVotableCount(Optional.ofNullable(votableCountMap.get(issueGridMap.get(issueId))).orElse(NumConstant.ZERO)); + dto.setCreatedBy(ModuleConstants.CREATED_BY_SYSTEM);dto.setUpdatedBy(ModuleConstants.CREATED_BY_SYSTEM); + return dto; + }).collect(Collectors.toList()); + if(!CollectionUtils.isEmpty(collect)) toInsert.addAll(collect);} + + /* + List summaryList = issueVoteDetailDao.getVotingSummaryList(notExistedIds); Map> summaryMap = summaryList.stream().collect(Collectors.groupingBy(IssueAttitudeCountResultDTO::getIssueId)); + for (Map.Entry> entry : summaryMap.entrySet()) { IssueVoteStatisticalDTO obj = new IssueVoteStatisticalDTO(); obj.setCreatedBy(ModuleConstants.CREATED_BY_SYSTEM); @@ -322,19 +352,15 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl setToInsert = toInsert.stream().map(IssueVoteStatisticalDTO::getIssueId).collect(Collectors.toSet()); +*/ + /* Set setToInsert = toInsert.stream().map(IssueVoteStatisticalDTO::getIssueId).collect(Collectors.toSet()); Set issuesNeverVotedIds = new HashSet(); issuesNeverVotedIds.addAll(ids); @@ -372,30 +398,27 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl redundantIds = new HashSet(); - redundantIds.addAll(statisiticalIds); - redundantIds.removeAll(ids); + //Set redundantIds = new HashSet(); + //redundantIds.addAll(statisiticalIds); + //redundantIds.removeAll(ids); //将redundantIds的议题统计信息删除 //因为statisiticalIds是通过ids查询出,因此不会出现这种情况 } else { //数据吻合,全部更新 List listToUpdate = new ArrayList<>(); - Map> gridIssueMap = - issues.stream().collect(Collectors.groupingBy(IssueDTO::getGridId)); - setVotableCountsAndUpdateCache(listToUpdate,issues,votableCountMap); // listToUpdate批量更新 @@ -518,8 +541,7 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl + issue_id = #{issueId} + GROUP BY issue_id, attitude @@ -119,4 +122,37 @@ AND ivd.ISSUE_ID =#{issueId} AND ivd.CREATED_BY =#{userId} + + + + \ No newline at end of file From 48f093e704b668011829c8533187af7e6b4a8a23 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 18 Mar 2021 16:23:53 +0800 Subject: [PATCH 157/375] =?UTF-8?q?trace/processList-v2=20api=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/result/SubProcessDTO.java | 1 + .../com/epmet/dao/ProjectSubProcessDao.java | 4 ++-- .../service/ProjectSubProcessService.java | 4 ++-- .../impl/ProjectSubProcessServiceImpl.java | 8 ++++---- .../service/impl/ProjectTraceServiceImpl.java | 19 +++++++++++++------ .../resources/mapper/ProjectSubProcessDao.xml | 11 ++++++++--- 6 files changed, 30 insertions(+), 17 deletions(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/SubProcessDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/SubProcessDTO.java index a5a8f871f8..4ef4534545 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/SubProcessDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/SubProcessDTO.java @@ -30,6 +30,7 @@ public class SubProcessDTO implements Serializable { */ private String handleUserName; private String subId; + private String processId; /** * 处理内容 */ diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSubProcessDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSubProcessDao.java index dd887c38be..e030f34669 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSubProcessDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSubProcessDao.java @@ -45,10 +45,10 @@ public interface ProjectSubProcessDao extends BaseDao { /** * @Description 查询进展和附件 - * @Param processId + * @Param processIds * @author zxc * @date 2021/3/18 下午2:57 */ - List selectSubProcessAndAttachment(@Param("processId") String processId); + List selectSubProcessAndAttachment(@Param("processIds")List processIds); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectSubProcessService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectSubProcessService.java index 9d1aba55f9..d822ed2c39 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectSubProcessService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectSubProcessService.java @@ -104,9 +104,9 @@ public interface ProjectSubProcessService extends BaseService selectSubProcessAndAttachment(String processId); + List selectSubProcessAndAttachment(List processIds); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSubProcessServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSubProcessServiceImpl.java index ffbae9a85f..0bdbbdb8df 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSubProcessServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSubProcessServiceImpl.java @@ -116,16 +116,16 @@ public class ProjectSubProcessServiceImpl extends BaseServiceImpl selectSubProcessAndAttachment(String processId) { - if (StringUtils.isEmpty(processId)){ + public List selectSubProcessAndAttachment(List processIds) { + if (CollectionUtils.isEmpty(processIds)){ return new ArrayList<>(); } - return baseDao.selectSubProcessAndAttachment(processId); + return baseDao.selectSubProcessAndAttachment(processIds); } } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java index c7d29968da..c35a1e33fc 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java @@ -144,13 +144,20 @@ public class ProjectTraceServiceImpl implements ProjectTraceService { log.warn(ProjectConstant.NOT_EXIST_PROJECT); return new ArrayList<>(); } + List processIds = processList.stream().filter(f -> f.getIsSend().equals(NumConstant.ONE)).map(m -> m.getProcessId()).collect(Collectors.toList()); + List subProcess = projectSubProcessService.selectSubProcessAndAttachment(processIds); // 是否发送到外部系统 0否 1是 - processList.forEach(p -> { - if (p.getIsSend().equals(NumConstant.ONE)){ - // 赋值 子节点 - p.setSubProcess(projectSubProcessService.selectSubProcessAndAttachment(p.getProcessId())); - } - }); + if (!CollectionUtils.isEmpty(subProcess)){ + processList.forEach(p -> { + subProcess.forEach(s -> { + if (p.getProcessId().equals(s.getProcessId())){ + List process = new ArrayList<>(); + process.add(s); + p.setSubProcess(process); + } + }); + }); + } // 查询进展附件列表 List files = attachmentDao.selectAttachByProjectId(formDTO.getProjectId()); diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSubProcessDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSubProcessDao.xml index 893fb54b1c..f503a81c5d 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSubProcessDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSubProcessDao.xml @@ -51,6 +51,7 @@ + @@ -60,11 +61,15 @@ psp.EXTERNAL_STATUS as externalStatus, psp.CREATED_TIME AS processTime, psp.HANDLE_USER_NAME as handleUserName, - psp.RESULT as result + psp.RESULT as result, + psp.process_id as processId FROM project_sub_process psp - WHERE psp.DEL_FLAG = 0 - AND psp.PROCESS_ID = #{processId} + AND ( + + psp.PROCESS_ID = #{processId} + + ) + select tca.id, + tca.customer_id, + tca.platform_id, + tca.action_key, + tca.del_flag, + tca.revision, + tca.created_by, + tca.created_time, + tca.updated_by, + tca.updated_time + from thirdplatform_customer_action tca + where tca.CUSTOMER_ID = #{customerId} + and tca.PLATFORM_ID = #{platformId} + and tca.ACTION_KEY = #{actionKey} + and tca.DEL_FLAG = 0 + + \ No newline at end of file From 40afaa0c5c873923d0b233b0ce5de3954d750b60 Mon Sep 17 00:00:00 2001 From: wxz Date: Fri, 19 Mar 2021 00:08:52 +0800 Subject: [PATCH 160/375] =?UTF-8?q?=E9=94=99=E8=AF=AF=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E4=BA=86=E6=95=B0=E6=8D=AE=E5=BA=93=E5=A4=96=E7=BD=91=E5=9C=B0?= =?UTF-8?q?=E5=9D=80=EF=BC=8C=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-module/epmet-third/epmet-third-server/pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/epmet-third/epmet-third-server/pom.xml b/epmet-module/epmet-third/epmet-third-server/pom.xml index 87fd48048b..fdd764c6e0 100644 --- a/epmet-module/epmet-third/epmet-third-server/pom.xml +++ b/epmet-module/epmet-third/epmet-third-server/pom.xml @@ -221,14 +221,14 @@ - + epmet_third_user EpmEt-db-UsEr 0 - 118.190.150.119 - 47379 + 192.168.1.130 + 6379 123456 false From 683326487fe576af3df9b37a8c3f2ec29995e2f1 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Fri, 19 Mar 2021 10:13:01 +0800 Subject: [PATCH 161/375] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E6=8E=A5=E5=8F=A3=20-=20=E5=85=A5=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/form/MenuFormDTO.java | 22 +++++++++++++++++++ .../controller/GovCustomerMenuController.java | 9 ++++---- 2 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/MenuFormDTO.java diff --git a/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/MenuFormDTO.java b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/MenuFormDTO.java new file mode 100644 index 0000000000..83149065c5 --- /dev/null +++ b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/MenuFormDTO.java @@ -0,0 +1,22 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.List; + +/** + * 菜单基础入参 + */ +@Data +public class MenuFormDTO implements Serializable { + private static final long serialVersionUID = -2898130727929596798L; + + /** + * gov_menu表主键 + */ + @NotBlank(message = "菜单ID不能为空") + private String tableId; + +} diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovCustomerMenuController.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovCustomerMenuController.java index a3cb9f8946..77d498fb37 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovCustomerMenuController.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovCustomerMenuController.java @@ -28,6 +28,7 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.GovCustomerMenuDTO; import com.epmet.dto.form.MenuConfigFormDTO; +import com.epmet.dto.form.MenuFormDTO; import com.epmet.excel.GovCustomerMenuExcel; import com.epmet.service.GovCustomerMenuService; import org.apache.commons.lang3.StringUtils; @@ -116,14 +117,14 @@ public class GovCustomerMenuController { /** * 根据gov_menu表主键,查询拥有这项菜单的所有客户(customerIds) * - * @param tableId + * @param formDTO * @return com.epmet.commons.tools.utils.Result> * @Author zhangyong * @Date 16:26 2021-03-16 **/ - @PostMapping("getcustomerids/{tableid}") - public Result> getcustomerids(@PathVariable("tableid") String tableId){ - List data = govCustomerMenuService.getcustomerIds(tableId); + @PostMapping("getcustomerids") + public Result> getcustomerids(@RequestBody MenuFormDTO formDTO){ + List data = govCustomerMenuService.getcustomerIds(formDTO.getTableId()); return new Result>().ok(data); } } From 1bf983225849a51e0923467ae796f3c378132fa3 Mon Sep 17 00:00:00 2001 From: wangchao Date: Fri, 19 Mar 2021 10:13:25 +0800 Subject: [PATCH 162/375] =?UTF-8?q?1=E3=80=81=E5=A4=A7=E5=B1=8F=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E9=87=87=E9=9B=86=E5=88=86=E7=B1=BB=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=B8=8A=E7=BA=A7=E5=88=86=E7=B1=BB=E7=94=A8-=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=EF=BC=8C=E5=A4=9A=E4=B8=AA=E5=88=86=E7=B1=BB=E7=94=A8?= =?UTF-8?q?,=E5=88=86=E5=89=B2=202=E3=80=81=E8=AE=AE=E9=A2=98=E8=BD=AC?= =?UTF-8?q?=E9=A1=B9=E7=9B=AEV2=E6=8E=A5=E5=8F=A3=E5=8F=91=E9=80=81?= =?UTF-8?q?=E7=A7=AF=E5=88=86=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/Issue/IssueService.java | 2 +- .../service/Issue/impl/IssueServiceImpl.java | 11 +++++- .../resources/mapper/issue/StatsIssueDao.xml | 36 +++++-------------- .../epmet/service/impl/IssueServiceImpl.java | 9 +++++ .../impl/IssueVoteStatisticalServiceImpl.java | 2 ++ 5 files changed, 30 insertions(+), 30 deletions(-) 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 22201f81ab..b920c0e29a 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 @@ -176,7 +176,7 @@ public interface IssueService { List selectIssueVoteStatis(String customerId, String monthId); /** - * @Description 查找项目的分类名称 以-相连 + * @Description 查找项目的分类名称 以-相连,以,分隔, * @param param * @return java.util.Map * @author wangc 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 4ad4e58488..44578a426a 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 @@ -2,6 +2,7 @@ package com.epmet.service.Issue.impl; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.StrConstant; import com.epmet.constant.DataSourceConstant; import com.epmet.dao.issue.StatsIssueDao; import com.epmet.dto.extract.result.IssueInfoResultDTO; @@ -146,14 +147,22 @@ public class IssueServiceImpl implements IssueService { return statsIssueDao.selectIssueVoteStatis(customerId, dateId); } + /** + * @Description 查找项目的分类名称 以-相连,以,分隔, + * @param param + * @return java.util.Map + * @author wangc + * @date 2021.03.09 00:23 + */ @Override public Map getIntegratedProjectCategory(Map> param,String customerId) { Map map = new HashMap<>(); param.forEach((projectId,categoryIds) -> { + //以下查询只适用于二级分类,如果分类层级变多了要修改此查询 List categories = statsIssueDao.selectCategory(customerId, categoryIds); if(!CollectionUtils.isEmpty(categories)){ StringBuilder str = new StringBuilder(); - categories.forEach(category -> {str.append(category.getCategoryName()).append("-");}); + categories.forEach(category -> {str.append(category.getCategoryName()).append(StrConstant.COMMA);}); map.put(projectId,str.substring(NumConstant.ZERO,str.length() - NumConstant.TWO)); } }); 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 b4619ff0a2..ce72f989f2 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 @@ -290,35 +290,15 @@ \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java index fb3c07e7e8..c7856788b8 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java @@ -1011,6 +1011,15 @@ public class IssueServiceImpl extends BaseServiceImpl imp }catch(RenException e){ logger.error(e.getInternalMsg()); } + + + //7:发送话题转议题积分事件 + TopicEventFormDTO eventParam = new TopicEventFormDTO(); + eventParam.setTopicId(entity.getSourceId()); + eventParam.setEvent(EventEnum.TOPIC_SHIFTED_TO_PROJECT); + if(!resiGroupOpenFeignClient.sendEvent(eventParam).success()){ + logger.warn("com.epmet.service.impl.IssueServiceImpl.shiftProjectV2,话题被转为项目积分事件发送失败,参数:{}", JSON.toJSONString(formDTO)); + } } /** diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java index fc8a5138de..24845d3b7a 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java @@ -493,6 +493,8 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl Date: Fri, 19 Mar 2021 10:30:33 +0800 Subject: [PATCH 163/375] =?UTF-8?q?trace/projectDetail=20api=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/result/ProjectDetailResultDTO.java | 5 +++++ .../main/java/com/epmet/dao/ProjectProcessDao.java | 8 ++++++++ .../com/epmet/service/ProjectProcessService.java | 8 ++++++++ .../service/impl/ProjectProcessServiceImpl.java | 13 +++++++++++++ .../com/epmet/service/impl/ProjectServiceImpl.java | 1 + .../src/main/resources/mapper/ProjectProcessDao.xml | 10 ++++++++++ 6 files changed, 45 insertions(+) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectDetailResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectDetailResultDTO.java index 71bf83682a..61c23453d9 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectDetailResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectDetailResultDTO.java @@ -65,6 +65,11 @@ public class ProjectDetailResultDTO implements Serializable { */ private Boolean isSend; + /** + * 当前流转到外部系统的ID + */ + private List platformIds; + @NoArgsConstructor @Data public static class DepartmentNameListBean { diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectProcessDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectProcessDao.java index 80fa2b05a0..46974a22f6 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectProcessDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectProcessDao.java @@ -86,4 +86,12 @@ public interface ProjectProcessDao extends BaseDao { * @date 2020/12/21 下午4:18 */ List selectProcessList(@Param("projectId")String projectId); + + /** + * @Description 查询当前流转到外部系统的ID + * @Param projectId + * @author zxc + * @date 2021/3/19 上午10:18 + */ + List selectPlatFormIds(@Param("projectId") String projectId); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectProcessService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectProcessService.java index 3a7643f3a5..582726205a 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectProcessService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectProcessService.java @@ -159,4 +159,12 @@ public interface ProjectProcessService extends BaseService **/ void transferV2(TransferFormDTO formDTO); + /** + * @Description 查询当前流转到外部系统的ID + * @Param projectId + * @author zxc + * @date 2021/3/19 上午10:18 + */ + List selectPlatFormIds(String projectId); + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java index 8575f2d4a8..5f57a00488 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java @@ -730,4 +730,17 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl selectPlatFormIds(String projectId) { + List platFormIds = baseDao.selectPlatFormIds(projectId); + if (CollectionUtils.isEmpty(platFormIds))return new ArrayList<>(); + return platFormIds; + } + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index 5e07865804..44dcff034b 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -288,6 +288,7 @@ public class ProjectServiceImpl extends BaseServiceImpl + + + \ No newline at end of file From 4ef62337867c0589342a3a2981d3504fc92d5ec6 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 19 Mar 2021 10:34:24 +0800 Subject: [PATCH 164/375] =?UTF-8?q?trace/projectDetail=20api=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/service/impl/ProjectServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index 44dcff034b..6b53b1ef2a 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -288,6 +288,7 @@ public class ProjectServiceImpl extends BaseServiceImpl Date: Fri, 19 Mar 2021 13:49:40 +0800 Subject: [PATCH 165/375] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E3=80=81=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E5=88=86=E7=B1=BB=E3=80=81=E6=A0=87=E7=AD=BEdb?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=BC=95=E8=B5=B7=E7=9A=84=E5=8F=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/govproject/ProjectCategoryDTO.java | 10 + .../dto/govproject/ProjectTagsDTO.java | 5 + .../issue/IssueProjectCategoryDictDTO.java | 10 + .../epmet/dto/project/ProjectCategoryDTO.java | 10 + .../java/com/epmet/dto/IssueCategoryDTO.java | 10 + .../dto/IssueProjectCategoryDictDTO.java | 10 + .../com/epmet/dto/IssueProjectTagDictDTO.java | 5 + .../main/java/com/epmet/dto/IssueTagsDTO.java | 5 + .../com/epmet/entity/IssueCategoryEntity.java | 10 + .../IssueProjectCategoryDictEntity.java | 10 + .../entity/IssueProjectTagDictEntity.java | 5 + .../com/epmet/entity/IssueTagsEntity.java | 5 + .../migration/V0.0.11__alter_category_tag.sql | 212 ++++++++++++++++++ .../com/epmet/dto/ProjectCategoryDTO.java | 10 + .../java/com/epmet/dto/ProjectTagsDTO.java | 5 + .../epmet/entity/ProjectCategoryEntity.java | 10 + .../com/epmet/entity/ProjectTagsEntity.java | 5 + .../migration/V0.0.7__alter_category_tag.sql | 10 + 18 files changed, 347 insertions(+) create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.11__alter_category_tag.sql create mode 100644 epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.7__alter_category_tag.sql diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectCategoryDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectCategoryDTO.java index cbda7d52f6..a4d6c1f284 100644 --- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectCategoryDTO.java +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectCategoryDTO.java @@ -64,6 +64,16 @@ public class ProjectCategoryDTO implements Serializable { */ private String categoryPids; + /** + * 分类编码,分类编码+customer_id唯一 + */ + private String categoryCode; + + /** + * 是否禁用(enable:启用 disable:禁用) + */ + private String isDisable; + /** * 删除标识 0未删除、1已删除 */ diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectTagsDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectTagsDTO.java index 60f01c7299..9873ed3ddd 100644 --- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectTagsDTO.java +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectTagsDTO.java @@ -58,6 +58,11 @@ public class ProjectTagsDTO implements Serializable { */ private String tagName; + /** + * 是否禁用(enable:启用 disable:禁用) + */ + private String isDisable; + /** * 删除标识 0.未删除 1.已删除 */ diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/issue/IssueProjectCategoryDictDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/issue/IssueProjectCategoryDictDTO.java index 1955847edd..c07037ee92 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/issue/IssueProjectCategoryDictDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/issue/IssueProjectCategoryDictDTO.java @@ -53,6 +53,11 @@ public class IssueProjectCategoryDictDTO implements Serializable { */ private String pids; + /** + * 上级分类编码 + */ + private String parentCategoryCode; + /** * 分类编码,分类编码+customer_id唯一 */ @@ -73,6 +78,11 @@ public class IssueProjectCategoryDictDTO implements Serializable { */ private Integer sort; + /** + * 是否禁用(enable:启用 disable:禁用) + */ + private String isDisable; + /** * 删除标识 0未删除、1已删除 */ diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/ProjectCategoryDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/ProjectCategoryDTO.java index 3ca8dc43fc..07ab948199 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/ProjectCategoryDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/ProjectCategoryDTO.java @@ -64,6 +64,16 @@ public class ProjectCategoryDTO implements Serializable { */ private String categoryPids; + /** + * 分类编码,分类编码+customer_id唯一 + */ + private String categoryCode; + + /** + * 是否禁用(enable:启用 disable:禁用) + */ + private String isDisable; + /** * 删除标识 0未删除、1已删除 */ diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueCategoryDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueCategoryDTO.java index 12d645937a..06d1f9d07d 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueCategoryDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueCategoryDTO.java @@ -63,6 +63,16 @@ public class IssueCategoryDTO implements Serializable { */ private String categoryPids; + /** + * 分类编码,分类编码+customer_id唯一 + */ + private String categoryCode; + + /** + * 是否禁用(enable:启用 disable:禁用) + */ + private String isDisable; + /** * 删除标识 0未删除、1已删除 */ diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueProjectCategoryDictDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueProjectCategoryDictDTO.java index d0df3169f5..a93a616cbf 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueProjectCategoryDictDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueProjectCategoryDictDTO.java @@ -53,6 +53,11 @@ public class IssueProjectCategoryDictDTO implements Serializable { */ private String pids; + /** + * 上级分类编码 + */ + private String parentCategoryCode; + /** * 分类编码,分类编码+customer_id唯一 */ @@ -73,6 +78,11 @@ public class IssueProjectCategoryDictDTO implements Serializable { */ private Integer sort; + /** + * 是否禁用(enable:启用 disable:禁用) + */ + private String isDisable; + /** * 删除标识 0未删除、1已删除 */ diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueProjectTagDictDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueProjectTagDictDTO.java index b13500e735..b07cf0042e 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueProjectTagDictDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueProjectTagDictDTO.java @@ -68,6 +68,11 @@ public class IssueProjectTagDictDTO implements Serializable { */ private Integer projectUseCount; + /** + * 是否禁用(enable:启用 disable:禁用) + */ + private String isDisable; + /** * 删除标识 0.未删除 1.已删除 */ diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueTagsDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueTagsDTO.java index 6ca1c51c6a..87e464f4db 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueTagsDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueTagsDTO.java @@ -63,6 +63,11 @@ public class IssueTagsDTO implements Serializable { */ private String tagName; + /** + * 是否禁用(enable:启用 disable:禁用) + */ + private String isDisable; + /** * 删除标识 0.未删除 1.已删除 */ diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueCategoryEntity.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueCategoryEntity.java index fa9e5b8d5b..4f92ac6e6b 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueCategoryEntity.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueCategoryEntity.java @@ -63,4 +63,14 @@ public class IssueCategoryEntity extends BaseEpmetEntity { */ private String categoryPids; + /** + * 分类编码,分类编码+customer_id唯一 + */ + private String categoryCode; + + /** + * 是否禁用(enable:启用 disable:禁用) + */ + private String isDisable; + } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueProjectCategoryDictEntity.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueProjectCategoryDictEntity.java index 74a2e32b29..b99f37a2bf 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueProjectCategoryDictEntity.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueProjectCategoryDictEntity.java @@ -53,6 +53,11 @@ public class IssueProjectCategoryDictEntity extends BaseEpmetEntity { */ private String pids; + /** + * 上级分类编码 + */ + private String parentCategoryCode; + /** * 分类编码,分类编码+customer_id唯一 */ @@ -73,4 +78,9 @@ public class IssueProjectCategoryDictEntity extends BaseEpmetEntity { */ private Integer sort; + /** + * 是否禁用(enable:启用 disable:禁用) + */ + private String isDisable; + } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueProjectTagDictEntity.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueProjectTagDictEntity.java index c56d5974a7..48d457624b 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueProjectTagDictEntity.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueProjectTagDictEntity.java @@ -68,4 +68,9 @@ public class IssueProjectTagDictEntity extends BaseEpmetEntity { */ private Integer projectUseCount; + /** + * 是否禁用(enable:启用 disable:禁用) + */ + private String isDisable; + } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueTagsEntity.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueTagsEntity.java index 1dc56255fc..0933fa1402 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueTagsEntity.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueTagsEntity.java @@ -63,4 +63,9 @@ public class IssueTagsEntity extends BaseEpmetEntity { */ private String tagName; + /** + * 是否禁用(enable:启用 disable:禁用) + */ + private String isDisable; + } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.11__alter_category_tag.sql b/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.11__alter_category_tag.sql new file mode 100644 index 0000000000..e405d88027 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.11__alter_category_tag.sql @@ -0,0 +1,212 @@ +ALTER TABLE `issue_project_category_dict` +MODIFY COLUMN `CATEGORY_CODE` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '分类编码,分类编码+customer_id唯一' AFTER `PIDS`, +ADD COLUMN `PARENT_CATEGORY_CODE` varchar(50) NOT NULL COMMENT '上级分类编码' AFTER `PIDS`, +ADD COLUMN `IS_DISABLE` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '是否禁用(enable:启用 disable:禁用)' AFTER `SORT`; + +ALTER TABLE `issue_project_tag_dict` +ADD COLUMN `IS_DISABLE` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '是否禁用(enable:启用 disable:禁用)' AFTER `PROJECT_USE_COUNT`; + +ALTER TABLE `issue_category` +ADD COLUMN `CATEGORY_CODE` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '分类编码,分类编码+customer_id唯一' AFTER `CATEGORY_PIDS`, +ADD COLUMN `IS_DISABLE` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '是否禁用(enable:启用 disable:禁用)' AFTER `CATEGORY_CODE`; + +ALTER TABLE `issue_tags` +ADD COLUMN `IS_DISABLE` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '是否禁用(enable:启用 disable:禁用)' AFTER `TAG_NAME`; + +-- 删除表中历史数据,因为db做了调整 +DELETE FROM issue_project_category_dict; +DELETE FROM issue_project_tag_dict; +DELETE FROM issue_category; +DELETE FROM issue_tags; + +-- issue_project_category_dict表初始化默认数据 +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1001', 'default', '0', '0', '0', '1001', '城市管理', '1', '1', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1002', 'default', '0', '0', '0', '1002', '公安交通管理', '1', '2', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1003', 'default', '0', '0', '0', '1003', '消防安全', '1', '3', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1004', 'default', '0', '0', '0', '1004', '卫生计生监督执法', '1', '4', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1005', 'default', '0', '0', '0', '1005', '其他', '1', '5', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1006', 'default', '0', '0', '0', '1006', '创卫复审类', '1', '6', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1007', 'default', '0', '0', '0', '1007', '环境保护', '1', '7', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1008', 'default', '0', '0', '0', '1008', '安全监管', '1', '8', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1009', 'default', '0', '0', '0', '1009', '民政', '1', '9', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1010', 'default', '0', '0', '0', '1010', '建设管理', '1', '10', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1011', 'default', '0', '0', '0', '1011', '文化执法', '1', '11', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1012', 'default', '0', '0', '0', '1012', '社会治安综治', '1', '12', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1013', 'default', '0', '0', '0', '1013', '食品药品监管', '1', '13', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1014', 'default', '0', '0', '0', '1014', '市场监管', '1', '14', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1015', 'default', '1001', '1001', '1001', '10010001', '市政设施管理', '2', '1', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1016', 'default', '1001', '1001', '1001', '10010002', '环境卫生管理', '2', '2', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1017', 'default', '1001', '1001', '1001', '10010003', '园林绿化管理', '2', '3', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1018', 'default', '1001', '1001', '1001', '10010004', '市容市貌', '2', '4', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1019', 'default', '1001', '1001', '1001', '10010005', '早、夜市(摊点群)', '2', '5', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1020', 'default', '1001', '1001', '1001', '10010006', '城区公共健身设施管理', '2', '6', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1021', 'default', '1002', '1002', '1002', '10020001', '交通设施', '2', '1', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1022', 'default', '1002', '1002', '1002', '10020002', '车辆管理', '2', '2', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1023', 'default', '1002', '1002', '1002', '10020003', '违法停车', '2', '3', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1024', 'default', '1003', '1003', '1003', '10030001', '消防设施', '2', '1', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1025', 'default', '1003', '1003', '1003', '10030002', '应急疏散', '2', '2', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1026', 'default', '1003', '1003', '1003', '10030003', '消防隐患', '2', '3', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1027', 'default', '1004', '1004', '1004', '10040001', '公共场所卫生执法', '2', '1', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1028', 'default', '1005', '1005', '1005', '10050001', '其他', '2', '1', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1029', 'default', '1006', '1006', '1006', '10060001', '健康教育促进、公共卫生与医疗服务', '2', '1', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1030', 'default', '1006', '1006', '1006', '10060002', '农贸市场管理', '2', '2', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1031', 'default', '1006', '1006', '1006', '10060003', '食品安全及重点场所卫生', '2', '3', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1032', 'default', '1006', '1006', '1006', '10060004', '环境保护', '2', '4', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1033', 'default', '1006', '1006', '1006', '10060005', '病媚生物防治和控烟', '2', '5', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1034', 'default', '1006', '1006', '1006', '10060006', '市政道路与河道整治提升', '2', '6', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1035', 'default', '1006', '1006', '1006', '10060007', '环境保洁提升', '2', '7', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1036', 'default', '1006', '1006', '1006', '10060008', '绿化美化与铁路两侧环境提升', '2', '8', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1037', 'default', '1006', '1006', '1006', '10060009', '夜景亮化提升', '2', '9', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1038', 'default', '1006', '1006', '1006', '10060010', '单位和居民社区(小区)卫生', '2', '10', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1039', 'default', '1006', '1006', '1006', '10060011', '广告牌匾、市容秩序、违建治理及居民楼院环境提升', '2', '11', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1040', 'default', '1006', '1006', '1006', '10060012', '建筑立面、建设工地环境提升', '2', '12', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1041', 'default', '1007', '1007', '1007', '10070001', '排放污水', '2', '1', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1042', 'default', '1007', '1007', '1007', '10070002', '排放噪声', '2', '2', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1043', 'default', '1007', '1007', '1007', '10070003', '排放固体废物', '2', '3', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1044', 'default', '1007', '1007', '1007', '10070004', '排放大气污染物', '2', '4', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1045', 'default', '1008', '1008', '1008', '10080001', '危险化学品', '2', '1', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1046', 'default', '1009', '1009', '1009', '10090001', '救助管理', '2', '1', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1047', 'default', '1010', '1010', '1010', '10100001', '建设施工管理', '2', '1', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1048', 'default', '1010', '1010', '1010', '10100002', '河道管理', '2', '2', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1049', 'default', '1011', '1011', '1011', '10110001', '文化领域', '2', '1', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1050', 'default', '1011', '1011', '1011', '10110002', '广播影视领域', '2', '2', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1051', 'default', '1011', '1011', '1011', '10110003', '新闻出版领域', '2', '3', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1052', 'default', '1012', '1012', '1012', '10120001', '人口管理', '2', '1', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1053', 'default', '1012', '1012', '1012', '10120002', '民事纠纷', '2', '2', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1054', 'default', '1012', '1012', '1012', '10120003', '安全防控', '2', '3', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1055', 'default', '1012', '1012', '1012', '10120004', '社会治安', '2', '4', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1056', 'default', '1012', '1012', '1012', '10120005', '信访工作', '2', '5', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1057', 'default', '1013', '1013', '1013', '10130001', '食品监管', '2', '1', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1058', 'default', '1013', '1013', '1013', '10130002', '药品监管', '2', '2', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1059', 'default', '1013', '1013', '1013', '10130003', '医疗器械监管', '2', '3', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1060', 'default', '1013', '1013', '1013', '10130004', '保健食品监管', '2', '4', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1061', 'default', '1014', '1014', '1014', '10140001', '营业执照管理', '2', '1', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1062', 'default', '1014', '1014', '1014', '10140002', '特种设备安全', '2', '2', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_category_dict` (`ID`, `CUSTOMER_ID`, `PID`, `PIDS`, `PARENT_CATEGORY_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `CATEGORY_TYPE`, `SORT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1063', 'default', '1014', '1014', '1014', '10140003', '广告管理', '2', '3', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); + +-- issue_project_tag_dict表初始化默认数据 +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1001', 'default', '车行道、人行道、盲道、无障碍通道、路名牌', '1015', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1002', 'default', '城市桥梁、人形天桥、地下人行通道管理', '1015', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1003', 'default', '道路占掘管理', '1015', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1004', 'default', '排水管理', '1015', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1005', 'default', '停车场管理', '1015', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1006', 'default', '公共事业', '1015', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1007', 'default', '照明路灯及景观灯饰管理', '1015', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1008', 'default', '城市广场管理', '1015', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1009', 'default', '防汛防滑', '1015', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1010', 'default', '清扫保洁', '1016', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1011', 'default', '垃圾收集和转运', '1016', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1012', 'default', '公厕', '1016', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1013', 'default', '病媚生物防治', '1016', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1014', 'default', '行道树、绿篱、绿地等职务养护', '1017', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1015', 'default', '环境管理', '1017', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1016', 'default', '公园管理', '1017', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1017', 'default', '市容秩序管理', '1018', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1018', 'default', '户外广告', '1018', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1019', 'default', '规划管理', '1018', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1020', 'default', '城管执法', '1018', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1021', 'default', '交易秩序', '1019', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1022', 'default', '健身设施维护与更新', '1020', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1023', 'default', '交通设施、标线', '1021', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1024', 'default', '废弃车辆', '1022', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1025', 'default', '畜力车进城', '1022', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1026', 'default', '人行道、车行道违法停车', '1023', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1027', 'default', '消防设施', '1024', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1028', 'default', '应急疏散', '1025', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1029', 'default', '各类大型活动不具备公共安全条件的严重隐患', '1026', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1030', 'default', '城市无烟草广告', '1027', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1031', 'default', '其他', '1028', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1032', 'default', '健康教育', '1029', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1033', 'default', '市民参与健身运动', '1029', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1034', 'default', '免疫门诊', '1029', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1035', 'default', '预检分诊点', '1029', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1036', 'default', '发热与肠道门诊设置', '1029', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1037', 'default', '医疗废弃物储存和处理', '1029', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1038', 'default', '基层医疗卫生机构标准化建设', '1029', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1039', 'default', '院内环卫设施及清扫保洁', '1029', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1040', 'default', '小型理发店、小旅店、小歌舞厅、小浴室等', '1029', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1041', 'default', '基本信息公示', '1030', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1042', 'default', '建设与管理', '1030', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1043', 'default', '市场公厕', '1030', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1044', 'default', '活禽售卖', '1030', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1045', 'default', '水产区', '1030', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1046', 'default', '食品安全', '1030', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1047', 'default', '基本信息公示', '1031', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1048', 'default', '设施与管理', '1031', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1049', 'default', '“五小”行业的食品安全管理', '1031', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1050', 'default', '噪音控制管理', '1032', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1051', 'default', '大气环境治理', '1032', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1052', 'default', '水源地保护', '1032', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1053', 'default', '医疗废弃物处置管理', '1032', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1054', 'default', '鼠防制', '1033', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1055', 'default', '蝇防制', '1033', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1056', 'default', '蚊防制', '1033', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1057', 'default', '蟑螂防制', '1033', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1058', 'default', '控制吸烟', '1033', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1059', 'default', '主次干道、背街小巷路面平坦,基础设施完好', '1034', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1060', 'default', '城中村及城乡结合部路面平整,沟渠密闭通畅', '1034', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1061', 'default', '公共河道、水域水面清洁,岸坡整洁完好,无直排污水现象', '1034', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1062', 'default', '清扫保洁', '1035', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1063', 'default', '垃圾收集运输', '1035', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1064', 'default', '垃圾中转站', '1035', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1065', 'default', '公厕', '1035', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1066', 'default', '社区与单位环境卫生', '1035', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1067', 'default', '城中村及城乡结合部卫生', '1035', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1068', 'default', '城市绿化', '1036', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1069', 'default', '社区、单位', '1036', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1070', 'default', '铁路沿线无“十乱”现象', '1036', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1071', 'default', '城市照明设施良好,保证路灯设施完好率和亮灯率达标', '1037', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1072', 'default', '社区(小区)居民和单位', '1038', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1073', 'default', '城中村及城乡结合部卫生', '1038', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1074', 'default', '城市户外广告、牌匾设置规范管理', '1039', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1075', 'default', '门前五包落实', '1039', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1076', 'default', '清理占道经营、店外经营', '1039', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1077', 'default', '“十乱”整治', '1039', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1078', 'default', '废品回收站规范管理', '1039', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1079', 'default', '流动商贩管理,早夜市卫生管理', '1039', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1080', 'default', '清理圈占绿地', '1039', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1081', 'default', '清理家畜饲养', '1039', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1082', 'default', '组织、指导各街道及相关部门清理乱搭乱建', '1039', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1083', 'default', '城市立面干净整洁', '1040', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1084', 'default', '建筑(代建、拆迁)工地', '1040', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1085', 'default', '向水体排放污染物', '1041', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1086', 'default', '向海域排放污染物', '1041', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1087', 'default', '生产、施工噪声', '1042', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1088', 'default', '室内音响噪声', '1042', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1089', 'default', '其他各种噪声', '1042', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1090', 'default', '排放固体废、危险废物、危险化学品、电子废物', '1043', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1091', 'default', '排放扬尘', '1044', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1092', 'default', '排放有毒有害气体', '1044', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1093', 'default', '排放油烟', '1044', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1094', 'default', '危险化学品', '1045', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1095', 'default', '流浪乞讨人员救助', '1046', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1096', 'default', '安全管理', '1047', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1097', 'default', '现场管理', '1047', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1098', 'default', '河堤破损', '1048', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1099', 'default', '歌舞娱乐场所', '1049', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1100', 'default', '游戏、游艺娱乐场所', '1049', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1101', 'default', '演出场所', '1049', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1102', 'default', '互联网商务服务营业场所', '1049', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1103', 'default', '文物监管', '1049', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1104', 'default', '卫星地面接收设施', '1050', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1105', 'default', '出版监管', '1051', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1106', 'default', '户籍人口', '1052', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1107', 'default', '流动人口', '1052', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1108', 'default', '矛盾纠纷排查化解', '1053', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1109', 'default', '涉及师生安全的案(事)件;涉及线、路案(事)件', '1054', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1110', 'default', '治安隐患上报;打架斗殴', '1055', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1111', 'default', '信访信息', '1056', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1112', 'default', '食品生产、流通企业监管', '1057', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1113', 'default', '活禽产品及冷鲜家禽质量问题', '1057', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1114', 'default', '餐饮服务单位监管', '1057', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1115', 'default', '药品生产、流通、使用单位监管', '1058', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1116', 'default', '医疗器械生产、经营、使用使用监管', '1059', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1117', 'default', '保健食品生产,经营监管', '1060', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1118', 'default', '显著位置悬挂营业执照', '1061', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1119', 'default', '门头字号与营业执照一致', '1061', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1120', 'default', '超出核准经营范围', '1061', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1121', 'default', '经营地址与营业执照一致', '1061', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1122', 'default', '无须许可、审批的各类经营主体无照经营', '1061', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1123', 'default', '电梯安全', '1062', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1124', 'default', '未经许可,擅自从事移动式压力容器或者气瓶充装活动的', '1062', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); +INSERT INTO `epmet_gov_issue`.`issue_project_tag_dict` (`ID`, `CUSTOMER_ID`, `TAG_NAME`, `CATEGORY_ID`, `IS_DEFAULT`, `ISSUE_USE_COUNT`, `PROJECT_USE_COUNT`, `IS_DISABLE`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1125', 'default', '违法广告发布', '1063', '0', '0', '0', 'enable', '0', '0', '1', '2020-08-04 17:40:41', '1', '2020-08-04 17:40:41'); diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectCategoryDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectCategoryDTO.java index 4c7b39c7d6..e04ce6da98 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectCategoryDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectCategoryDTO.java @@ -63,6 +63,16 @@ public class ProjectCategoryDTO implements Serializable { */ private String categoryPids; + /** + * 分类编码,分类编码+customer_id唯一 + */ + private String categoryCode; + + /** + * 是否禁用(enable:启用 disable:禁用) + */ + private String isDisable; + /** * 删除标识 0未删除、1已删除 */ diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectTagsDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectTagsDTO.java index 1cc47c4bb6..30a3cf75d6 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectTagsDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectTagsDTO.java @@ -58,6 +58,11 @@ public class ProjectTagsDTO implements Serializable { */ private String tagName; + /** + * 是否禁用(enable:启用 disable:禁用) + */ + private String isDisable; + /** * 删除标识 0.未删除 1.已删除 */ diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectCategoryEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectCategoryEntity.java index ce718cc201..5a9fff63dc 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectCategoryEntity.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectCategoryEntity.java @@ -63,4 +63,14 @@ public class ProjectCategoryEntity extends BaseEpmetEntity { */ private String categoryPids; + /** + * 分类编码,分类编码+customer_id唯一 + */ + private String categoryCode; + + /** + * 是否禁用(enable:启用 disable:禁用) + */ + private String isDisable; + } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectTagsEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectTagsEntity.java index 12febddfea..2917f7e5e8 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectTagsEntity.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectTagsEntity.java @@ -58,4 +58,9 @@ public class ProjectTagsEntity extends BaseEpmetEntity { */ private String tagName; + /** + * 是否禁用(enable:启用 disable:禁用) + */ + private String isDisable; + } diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.7__alter_category_tag.sql b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.7__alter_category_tag.sql new file mode 100644 index 0000000000..9b343fa74a --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.7__alter_category_tag.sql @@ -0,0 +1,10 @@ +ALTER TABLE `project_category` +ADD COLUMN `CATEGORY_CODE` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '分类编码,分类编码+customer_id唯一' AFTER `CATEGORY_PIDS`, +ADD COLUMN `IS_DISABLE` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '是否禁用(enable:启用 disable:禁用)' AFTER `CATEGORY_CODE`; + +ALTER TABLE `project_tags` +ADD COLUMN `IS_DISABLE` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '是否禁用(enable:启用 disable:禁用)' AFTER `TAG_NAME`; + +-- 删除表中历史数据,因为db做了调整 +DELETE FROM project_category; +DELETE FROM project_tags; From 8b5d7cf0f9ede1af33dea501879e525d26af7e67 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 19 Mar 2021 16:01:09 +0800 Subject: [PATCH 166/375] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/impl/IssueVoteStatisticalServiceImpl.java | 5 ++++- .../member/service/impl/ResiGroupMemberServiceImpl.java | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java index 003b0acd9e..258f91bd74 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java @@ -258,6 +258,7 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl issues = @@ -265,18 +266,20 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl ids = issues.stream().map(IssueDTO::getId).collect(Collectors.toSet()); List gridIds = issues.stream().map(IssueDTO::getGridId).distinct().collect(Collectors.toList()); CommonGridIdListFormDTO gridIdList = new CommonGridIdListFormDTO(); gridIdList.setGridIds(gridIds); + // 根据网格Id查询网格下所有加入组的组员 Result votableCountResult = resiGroupFeignClient.votableCounts(gridIdList); Map votableCountMap1 = null; if(votableCountResult.success() && null != votableCountResult.getData() && null != votableCountResult.getData().getVotableCountMap()){ votableCountMap1 = votableCountResult.getData().getVotableCountMap(); } final Map votableCountMap = votableCountMap1; - + //查询指定议题的统计数据 List statisticalList = baseDao.selectListByIds(ids); if (null != statisticalList && statisticalList.size() > NumConstant.ZERO) { diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/ResiGroupMemberServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/ResiGroupMemberServiceImpl.java index d420a7205b..33c2af52a6 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/ResiGroupMemberServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/ResiGroupMemberServiceImpl.java @@ -814,9 +814,11 @@ public class ResiGroupMemberServiceImpl extends BaseServiceImpl votableCountMap = new HashMap<>(); + // 给每个网格初始化 加入小组人数:0 gridList.getGridIds().forEach(gridId -> { votableCountMap.put(gridId, NumConstant.ZERO ); }); + // 查询 每个网格的人数 STATE = approved的 List list = baseDao.getMembersCountInGrids(gridList.getGridIds()); if(null == list || list.size() < NumConstant.ZERO){ result.setVotableCountMap(votableCountMap); From 7b3c63a2e2d981545c8860b86a5ba9b984c3950a Mon Sep 17 00:00:00 2001 From: wxz Date: Fri, 19 Mar 2021 16:49:11 +0800 Subject: [PATCH 167/375] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=80=E6=AC=A1?= =?UTF-8?q?=E6=80=A7=E4=BF=9D=E5=AD=98=E5=AE=A2=E6=88=B7-=E7=AC=AC?= =?UTF-8?q?=E4=B8=89=E6=96=B9=E5=B9=B3=E5=8F=B0-action=E7=9A=84=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/ThirdPlatformFormDTO.java | 17 ++++-- .../com/epmet/feign/ThirdOpenFeignClient.java | 26 +++++++++ .../ThirdOpenFeignClientFallback.java | 18 ++++++ .../controller/ThirdPlatformController.java | 12 ++++ .../dao/ThirdplatformCustomerActionDao.java | 2 + .../epmet/service/ThirdPlatformService.java | 2 + .../impl/ThirdPlatformServiceImpl.java | 52 +++++++++++++++++ .../mapper/ThirdplatformCustomerActionDao.xml | 7 +++ .../com/epmet/dto/form/ParameterFormDTO.java | 7 +++ .../dto/form/ThirdPlatformConfigFormDTO.java | 30 ++++++++++ .../gov-project/gov-project-server/pom.xml | 5 ++ .../epmet/constant/ParameterKeyConstant.java | 6 ++ .../CustomerProjectParameterController.java | 26 +++++++++ .../CustomerProjectParameterService.java | 7 +++ .../CustomerProjectParameterServiceImpl.java | 56 +++++++++++++++++-- 15 files changed, 262 insertions(+), 11 deletions(-) create mode 100644 epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/ThirdOpenFeignClient.java create mode 100644 epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/fallback/ThirdOpenFeignClientFallback.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ThirdPlatformConfigFormDTO.java diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ThirdPlatformFormDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ThirdPlatformFormDTO.java index f1793c1fb3..185eb5cab9 100644 --- a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ThirdPlatformFormDTO.java +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ThirdPlatformFormDTO.java @@ -21,26 +21,33 @@ public class ThirdPlatformFormDTO { // 更新客户自定义的平台信息 public interface UpdateCustomizePlatformInfo {} + public interface SaveOrUpdateSelectedPlatformInfo {} + @NotBlank(message = "客户ID不能为空", groups = { ListAvailableByCustomerAndActionGroup.class, ListSelectableByCustomerAndActionGroup.class, SaveCustomerSelectedPlatformGroup.class, ListSelectedPlatforms.class, - UpdateCustomizePlatformInfo.class }) + UpdateCustomizePlatformInfo.class, + SaveOrUpdateSelectedPlatformInfo.class }) private String customerId; @NotBlank(message = "动作不能为空", groups = { ListAvailableByCustomerAndActionGroup.class, ListSelectableByCustomerAndActionGroup.class, - SaveCustomerSelectedPlatformGroup.class }) + SaveCustomerSelectedPlatformGroup.class, + SaveOrUpdateSelectedPlatformInfo.class }) private String actionKey; @NotBlank(message = "平台ID不能为空", groups = { SaveCustomerSelectedPlatformGroup.class, - UpdateCustomizePlatformInfo.class }) + UpdateCustomizePlatformInfo.class, + SaveOrUpdateSelectedPlatformInfo.class }) private String platformId; - @NotBlank(message = "平台名称不能为空", groups = { UpdateCustomizePlatformInfo.class }) + @NotBlank(message = "平台名称不能为空", groups = { UpdateCustomizePlatformInfo.class, + SaveOrUpdateSelectedPlatformInfo.class }) private String platformName; - @NotBlank(message = "平台图标不能为空", groups = { UpdateCustomizePlatformInfo.class }) + @NotBlank(message = "平台图标不能为空", groups = { UpdateCustomizePlatformInfo.class, + SaveOrUpdateSelectedPlatformInfo.class }) private String icon; } diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/ThirdOpenFeignClient.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/ThirdOpenFeignClient.java new file mode 100644 index 0000000000..f81e1b0db7 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/ThirdOpenFeignClient.java @@ -0,0 +1,26 @@ +package com.epmet.feign; + +import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.form.ThirdPlatformFormDTO; +import com.epmet.feign.fallback.ThirdOpenFeignClientFallback; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; + +import java.util.List; + +//@FeignClient(name = ServiceConstant.EPMET_THIRD_SERVER, fallback = ThirdOpenFeignClientFallback.class) +@FeignClient(name = ServiceConstant.EPMET_THIRD_SERVER, fallback = ThirdOpenFeignClientFallback.class, url = "http://localhost:8110") +public interface ThirdOpenFeignClient { + + /** + * @Description 保存或修改客户选中的第三方平台信息 + * @return + * @author wxz + * @date 2021.03.19 15:25 + */ + @PostMapping("/third/thirdplatform/customer/saveorupdate-selected-platforms") + Result saveOrUpdateSelectedPlatformsInfo(@RequestBody List input); + +} diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/fallback/ThirdOpenFeignClientFallback.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/fallback/ThirdOpenFeignClientFallback.java new file mode 100644 index 0000000000..abd22929ee --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/fallback/ThirdOpenFeignClientFallback.java @@ -0,0 +1,18 @@ +package com.epmet.feign.fallback; + +import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.utils.ModuleUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.form.ThirdPlatformFormDTO; +import com.epmet.feign.ThirdOpenFeignClient; +import org.springframework.stereotype.Component; + +import java.util.List; + +@Component +public class ThirdOpenFeignClientFallback implements ThirdOpenFeignClient { + @Override + public Result saveOrUpdateSelectedPlatformsInfo(List input) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_THIRD_SERVER, "saveOrUpdateSelectedPlatformsInfo", input); + } +} diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ThirdPlatformController.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ThirdPlatformController.java index e3f1998793..9288625bee 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ThirdPlatformController.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ThirdPlatformController.java @@ -76,4 +76,16 @@ public class ThirdPlatformController { return new Result(); } + /** + * @Description 保存或修改客户选中的第三方平台信息 + * @return + * @author wxz + * @date 2021.03.19 15:25 + */ + @PostMapping("customer/saveorupdate-selected-platforms") + public Result saveOrUpdateSelectedPlatformsInfo(@RequestBody List input) { + input.stream().forEach(i -> ValidatorUtils.validateEntity(i, ThirdPlatformFormDTO.SaveOrUpdateSelectedPlatformInfo.class)); + thirdPlatformService.saveOrUpdateSelectedPlatformInfo(input); + return new Result(); + } } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformCustomerActionDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformCustomerActionDao.java index 49ac3a5431..cf4640fcc8 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformCustomerActionDao.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformCustomerActionDao.java @@ -33,4 +33,6 @@ public interface ThirdplatformCustomerActionDao extends BaseDao platforms); void updateCustomizePlatformInfo(ThirdPlatformFormDTO input); + + void saveOrUpdateSelectedPlatformInfo(List platforms); } \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ThirdPlatformServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ThirdPlatformServiceImpl.java index ad4e81254e..39d3e33cae 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ThirdPlatformServiceImpl.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ThirdPlatformServiceImpl.java @@ -1,18 +1,25 @@ package com.epmet.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.epmet.dao.ThirdplatformCustomerActionDao; import com.epmet.dao.ThirdplatformCustomerRegisterDao; import com.epmet.dao.ThirdplatformDao; import com.epmet.dto.form.ThirdPlatformFormDTO; import com.epmet.dto.result.ThirdplatformResultDTO; +import com.epmet.entity.ThirdplatformActionEntity; import com.epmet.entity.ThirdplatformCustomerActionEntity; import com.epmet.entity.ThirdplatformCustomerRegisterEntity; import com.epmet.service.ThirdPlatformService; +import jodd.util.CollectionUtil; 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.List; +import java.util.stream.Collectors; @Service public class ThirdPlatformServiceImpl implements ThirdPlatformService { @@ -60,4 +67,49 @@ public class ThirdPlatformServiceImpl implements ThirdPlatformService { thirdplatformCustomerRegisterDao.updateById(exist); } } + + @Transactional(rollbackFor = Exception.class) + @Override + public void saveOrUpdateSelectedPlatformInfo(List platforms) { + if (CollectionUtils.isEmpty(platforms)) { + return; + } + + // 1.物理删除客户-action所有对应关系 + int deletedCount = thirdplatformCustomerActionDao.deleteByCustomerIdAndActionKey(platforms.get(0).getCustomerId(), platforms.get(0).getActionKey()); + + platforms.stream().forEach(pt -> { + String customerId = pt.getCustomerId(); + String platformId = pt.getPlatformId(); + + // 2.更新用户自定义的平台信息 + updateThirdPlatformCustomerRegInfo(pt); + + // 3.重新建立customer-platform-action对应关系 + ThirdplatformCustomerActionEntity tpcaEntity = new ThirdplatformCustomerActionEntity(); + tpcaEntity.setPlatformId(platformId); + tpcaEntity.setCustomerId(customerId); + tpcaEntity.setActionKey(pt.getActionKey()); + thirdplatformCustomerActionDao.insert(tpcaEntity); + }); + + } + + /** + * @Description 更新第三方品台客户对应关系 + * @return + * @author wxz + * @date 2021.03.19 15:22 + */ + private void updateThirdPlatformCustomerRegInfo(ThirdPlatformFormDTO platformFormDTO) { + LambdaQueryWrapper conditions = new QueryWrapper() + .lambda() + .eq(ThirdplatformCustomerRegisterEntity::getCustomerId, platformFormDTO.getCustomerId()) + .eq(ThirdplatformCustomerRegisterEntity::getPlatformId, platformFormDTO.getPlatformId()); + + ThirdplatformCustomerRegisterEntity entity = new ThirdplatformCustomerRegisterEntity(); + entity.setCustomizedPlatformName(platformFormDTO.getPlatformName()); + entity.setCustomizedPlatformIcon(platformFormDTO.getIcon()); + thirdplatformCustomerRegisterDao.update(entity, conditions); + } } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformCustomerActionDao.xml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformCustomerActionDao.xml index 4decbb7c0f..f23ff18cc3 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformCustomerActionDao.xml +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformCustomerActionDao.xml @@ -16,6 +16,13 @@ + + delete + from thirdplatform_customer_action + where CUSTOMER_ID = #{customerId} + and ACTION_KEY = #{actionKey} + + @@ -36,6 +37,7 @@ del_flag = '0' AND pid = #{id} AND customer_id = #{customerId} + AND is_disable = 'enable' ORDER BY sort ASC diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueTagsDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueTagsDao.xml index 5f134b85a3..592cdb43fb 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueTagsDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueTagsDao.xml @@ -70,7 +70,7 @@ - INSERT INTO issue_tags ( ID, CUSTOMER_ID, GRID_ID, ISSUE_ID, TAG_ID, TAG_NAME, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME ) + INSERT INTO issue_tags ( ID, CUSTOMER_ID, GRID_ID, ISSUE_ID, TAG_ID, TAG_NAME, IS_DISABLE, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME ) VALUES ( @@ -80,6 +80,7 @@ #{l.issueId}, #{l.tagId}, #{l.name}, + #{l.isDisable}, #{l.delFlag}, #{l.revision}, #{l.createdBy}, diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectCategoryDTOResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectCategoryDTOResultDTO.java index 17a4e51c20..8215a8850f 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectCategoryDTOResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectCategoryDTOResultDTO.java @@ -32,6 +32,11 @@ public class ProjectCategoryDTOResultDTO implements Serializable { */ private String pids; + /** + * 上级分类编码 + */ + private String parentCategoryCode; + /** * 分类编码,分类编码+customer_id唯一 */ @@ -52,4 +57,9 @@ public class ProjectCategoryDTOResultDTO implements Serializable { */ private Integer sort; + /** + * 是否禁用(enable:启用 disable:禁用) + */ + private String isDisable; + } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectCategoryServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectCategoryServiceImpl.java index 2db7977d67..f2a12df324 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectCategoryServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectCategoryServiceImpl.java @@ -175,6 +175,8 @@ public class ProjectCategoryServiceImpl extends BaseServiceImpl { if (ca.getId().equals(cl.getId())) { entity.setCategoryPids(cl.getPids()); + entity.setCategoryCode(cl.getCategoryCode()); + entity.setIsDisable(cl.getIsDisable()); } }); entityList.add(entity); From 4b142408e0185ce4721fff0d4cc08a2790006220 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Fri, 19 Mar 2021 17:36:26 +0800 Subject: [PATCH 170/375] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=8F=91=E9=80=81?= =?UTF-8?q?=E5=88=B0=E7=AC=AC=E4=B8=89=E6=96=B9=E5=B9=B3=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/tools/constant/NumConstant.java | 4 + .../dto/form/ProjectApplyAssistFormDTO.java | 94 ++++++- .../com/epmet/dto/form/ProjectDetailDTO.java | 78 ++++++ .../dto}/result/ProjectAssistResult.java | 2 +- .../feign/EpmetThirdOpenFeignClient.java | 41 +++ .../EpmetThirdOpenFeignClientFallback.java | 38 +++ .../java/com/epmet/apiservice/ApiService.java | 2 +- .../epmet/apiservice/impl/DemoApiService.java | 2 +- .../impl/LuzhouGridPlatformApiService.java | 3 +- .../epmet/controller/ProjectController.java | 2 +- .../com/epmet/service/ProjectService.java | 2 +- .../service/impl/ProjectServiceImpl.java | 2 +- .../epmet/feign/GovIssueOpenFeignClient.java | 3 + .../GovIssueOpenFeignClientFallBack.java | 5 + .../com/epmet/dto/ProjectSubProcessDTO.java | 2 +- .../dto/form/PlatformCallBackFormDTO.java | 39 +++ .../com/epmet/dto/form/SendToFormDTO.java | 6 + .../gov-project/gov-project-server/pom.xml | 6 + .../dao/CustomerProjectParameterDao.java | 10 + .../com/epmet/dao/ProjectSubProcessDao.java | 9 + .../epmet/entity/ProjectSubProcessEntity.java | 2 +- .../com/epmet/service/ProjectService.java | 19 ++ .../service/ProjectSubProcessService.java | 10 + .../service/impl/ProjectServiceImpl.java | 241 +++++++++++++++++- .../impl/ProjectSubProcessServiceImpl.java | 14 + .../service/impl/ProjectTraceServiceImpl.java | 3 +- .../resources/mapper/ProjectSubProcessDao.xml | 23 ++ 27 files changed, 642 insertions(+), 20 deletions(-) create mode 100644 epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ProjectDetailDTO.java rename epmet-module/epmet-third/{epmet-third-server/src/main/java/com/epmet/apiservice => epmet-third-client/src/main/java/com/epmet/dto}/result/ProjectAssistResult.java (77%) create mode 100644 epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/EpmetThirdOpenFeignClient.java create mode 100644 epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/fallback/EpmetThirdOpenFeignClientFallback.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/PlatformCallBackFormDTO.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java index a9cc07d7a4..8f416ef8e9 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java @@ -63,6 +63,10 @@ public interface NumConstant { String THREE_STR = "3"; String FOUR_STR = "4"; String FIVE_STR = "5"; + String SIX_STR = "6"; + String SEVEN_STR = "7"; + String EIGHT_STR = "8"; + String NINE_STR = "9"; String POSITIVE_EIGHT_STR = "+8"; String EMPTY_STR = ""; String ONE_NEG_STR = "-1"; diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ProjectApplyAssistFormDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ProjectApplyAssistFormDTO.java index bbbe9d17c5..ca273d70db 100644 --- a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ProjectApplyAssistFormDTO.java +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ProjectApplyAssistFormDTO.java @@ -3,13 +3,105 @@ package com.epmet.dto.form; import lombok.Data; import javax.validation.constraints.NotBlank; +import java.io.Serializable; +/** + * @author kamui + */ @Data -public class ProjectApplyAssistFormDTO { +public class ProjectApplyAssistFormDTO implements Serializable { + private static final long serialVersionUID = 2052722763454170462L; private String customerId; @NotBlank(message = "平台ID不能为空") private String platformId; + /** + * 标题 + */ + private String title; + /** + * 详细内容 + */ + @NotBlank(message = "详细内容不能为空") + private String detail; + /** + * 期望结束时间 + */ + private String expectEndTime; + /** + * 图片链接,英文逗号分割的字符串 + */ + private String imageLink; + /** + * 音频链接,英文逗号分割的字符串 + */ + private String voiceLink; + /** + * 视频链接,英文逗号分割的字符串 + */ + private String videoLink; + /** + * 当事人姓名 + */ + private String personName; + /** + * 当事人手机 + */ + private String mobile; + /** + * 详细地址 + */ + @NotBlank(message = "详细地址不能为空") + private String detailAddress; + /** + * 来源,需根据调用方,传对应的值, + * 封面新闻需传:“群众爆料”, + * 党建引领传:“党建引领 + */ + @NotBlank(message = "来源不能为空") + private String source; + /** + * 经度 + */ + @NotBlank(message = "经度不能为空") + private String longitude; + /** + * 纬度 + */ + @NotBlank(message = "纬度不能为空") + private String latitude; + /** + * 省 + */ + private String province; + /** + * 市 + */ + private String city; + /** + * 区县 + */ + private String area; + /** + * 街道 + */ + private String street; + /** + * 社区 + */ + private String houseEstate; + /** + * 外部事件id + */ + private String outEventId; + /** + * 外部用户id + */ + private String outUserId; + /** + * 通知接口的地址 + */ + private String notifyUrl; } diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ProjectDetailDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ProjectDetailDTO.java new file mode 100644 index 0000000000..a3fa6c0ae7 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ProjectDetailDTO.java @@ -0,0 +1,78 @@ +package com.epmet.dto.form; + +import lombok.Data; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import java.io.Serializable; +import java.util.List; + +/** + * @author zhaoqifeng + * @dscription + * @date 2021/3/18 17:12 + */ +@Data +public class ProjectDetailDTO implements Serializable { + private static final long serialVersionUID = -2172640364021337846L; + /** + * 议题标题 + */ + private String issueTitle; + + /** + * 议题状态(voting 已转项目:shift_project 已关闭:closed) + */ + private String issueStatus; + + /** + * 议题发起人电话 + * */ + private String issuePublisherMobile; + + /** + * 议题建议处理方式 + */ + private String issueSuggestion; + + /** + * 所属网格(网格所属机关单位名称-网格名称) + */ + private String belongsGridName; + + /** + * 议题发起人(山东路168-尹女士) + */ + private String issueInitiator; + + /** + * 话题内容 + */ + private String topicContent; + + /** + * 图片列表 + */ + private List photoList; + + /** + * 话题发表人(山东路168-尹女士) + */ + private String topicPublisher; + + /** + * 话题发表时间 (时间戳 毫秒级) + */ + private Long topicPublishTime; + + /** + * 话题发表人电话 + * */ + private String topicPublisherMobile; + + @Override + public String toString() { + return ToStringBuilder.reflectionToString(this, ToStringStyle.SIMPLE_STYLE); + } + +} diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/result/ProjectAssistResult.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/ProjectAssistResult.java similarity index 77% rename from epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/result/ProjectAssistResult.java rename to epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/ProjectAssistResult.java index de992bdd0f..f306ccd4da 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/result/ProjectAssistResult.java +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/ProjectAssistResult.java @@ -1,4 +1,4 @@ -package com.epmet.apiservice.result; +package com.epmet.dto.result; import lombok.Data; diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/EpmetThirdOpenFeignClient.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/EpmetThirdOpenFeignClient.java new file mode 100644 index 0000000000..0e2b93e4d3 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/EpmetThirdOpenFeignClient.java @@ -0,0 +1,41 @@ +package com.epmet.feign; + +import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.ProjectDTO; +import com.epmet.dto.form.ProcessListFormDTO; +import com.epmet.dto.form.ProjectApplyAssistFormDTO; +import com.epmet.dto.form.ProjectByCreateTopicUserFormDTO; +import com.epmet.dto.form.ProjectListFromDTO; +import com.epmet.dto.result.*; +import com.epmet.feign.fallback.EpmetThirdOpenFeignClientFallback; +import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; + +import java.util.List; + +/** + * 本服务对外开放的API,其他服务通过引用此client调用该服务 + * + * @author zhaoqifeng + * @date 2021/3/18 14:18 + */ +// @FeignClient(name = ServiceConstant.EPMET_THIRD_SERVER, fallback = GovProjectOpenFeignClientFallback.class,url = "localhost:8110") +@FeignClient(name = ServiceConstant.EPMET_THIRD_SERVER, fallback = EpmetThirdOpenFeignClientFallback.class) +public interface EpmetThirdOpenFeignClient { + /** + * 请求项目协助 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @author zhaoqifeng + * @date 2021/3/18 11:08 + */ + @PostMapping("third/project/apply-assist") + Result applyAssist(@RequestBody ProjectApplyAssistFormDTO formDTO); + +} diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/fallback/EpmetThirdOpenFeignClientFallback.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/fallback/EpmetThirdOpenFeignClientFallback.java new file mode 100644 index 0000000000..10abcf6992 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/fallback/EpmetThirdOpenFeignClientFallback.java @@ -0,0 +1,38 @@ +package com.epmet.feign.fallback; + +import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.utils.ModuleUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.ProjectDTO; +import com.epmet.dto.form.ProcessListFormDTO; +import com.epmet.dto.form.ProjectApplyAssistFormDTO; +import com.epmet.dto.form.ProjectByCreateTopicUserFormDTO; +import com.epmet.dto.form.ProjectListFromDTO; +import com.epmet.dto.result.*; +import com.epmet.feign.EpmetThirdOpenFeignClient; +import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO; +import org.springframework.stereotype.Component; + +import java.util.List; + +/** + * + * @author zhaoqifeng + * @date 2021/3/18 14:17 + */ +@Component +public class EpmetThirdOpenFeignClientFallback implements EpmetThirdOpenFeignClient { + + /** + * 请求项目协助 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @author zhaoqifeng + * @date 2021/3/18 11:08 + */ + @Override + public Result applyAssist(ProjectApplyAssistFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_THIRD_SERVER, "applyAssist", formDTO); + } +} diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java index 0a6ac8de63..6debb8dac2 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java @@ -1,6 +1,6 @@ package com.epmet.apiservice; -import com.epmet.apiservice.result.ProjectAssistResult; +import com.epmet.dto.result.ProjectAssistResult; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.redis.RedisKeys; import com.epmet.commons.tools.utils.HttpClientManager; diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/DemoApiService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/DemoApiService.java index 9dcc3854c5..94c3127d00 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/DemoApiService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/DemoApiService.java @@ -1,7 +1,7 @@ package com.epmet.apiservice.impl; import com.epmet.apiservice.ApiService; -import com.epmet.apiservice.result.ProjectAssistResult; +import com.epmet.dto.result.ProjectAssistResult; import com.epmet.dto.form.ProjectApplyAssistFormDTO; import com.epmet.feign.OperCrmOpenFeignClient; import org.slf4j.Logger; diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java index b38a3e6758..d4c062bb09 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java @@ -3,8 +3,7 @@ package com.epmet.apiservice.impl; import com.alibaba.fastjson.JSON; import com.epmet.apiservice.ApiService; import com.epmet.apiservice.result.LZGridPlatformProjectAssistResult; -import com.epmet.apiservice.result.ProjectAssistResult; -import com.epmet.constant.ThirdPlatformActions; +import com.epmet.dto.result.ProjectAssistResult; import com.epmet.dto.form.ProjectApplyAssistFormDTO; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Component; diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ProjectController.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ProjectController.java index 3899ed9fda..0b32b9c2dd 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ProjectController.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ProjectController.java @@ -1,6 +1,6 @@ package com.epmet.controller; -import com.epmet.apiservice.result.ProjectAssistResult; +import com.epmet.dto.result.ProjectAssistResult; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.form.ProjectApplyAssistFormDTO; diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ProjectService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ProjectService.java index 1e9d75fdc1..2b6e8601a5 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ProjectService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ProjectService.java @@ -1,6 +1,6 @@ package com.epmet.service; -import com.epmet.apiservice.result.ProjectAssistResult; +import com.epmet.dto.result.ProjectAssistResult; import com.epmet.dto.form.ProjectApplyAssistFormDTO; import com.epmet.dto.form.TPFDemoFormDTO; diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index f652f6b995..b9f539a7a7 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -1,7 +1,7 @@ package com.epmet.service.impl; import com.epmet.apiservice.ApiService; -import com.epmet.apiservice.result.ProjectAssistResult; +import com.epmet.dto.result.ProjectAssistResult; import com.epmet.dto.form.ProjectApplyAssistFormDTO; import com.epmet.dto.form.TPFDemoFormDTO; import com.epmet.service.ApiServiceSelector; diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java index f5d2786c93..f30bd40420 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java @@ -244,4 +244,7 @@ public interface GovIssueOpenFeignClient { @PostMapping("/gov/issue/issue/detail") Result queryIssueDetail(@RequestBody IssueDetailFormDTO formDTO); + + @PostMapping(value = "/gov/issue/manage/votingissuedetail") + Result votingissuedetail(@RequestBody IssueDetailFormDTO issueDetail); } diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java index 84b1220993..e0e9e935c5 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java @@ -211,4 +211,9 @@ public class GovIssueOpenFeignClientFallBack implements GovIssueOpenFeignClient public Result queryIssueDetail(IssueDetailFormDTO formDTO) { return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "detail", formDTO); } + + @Override + public Result votingissuedetail(IssueDetailFormDTO issueDetail) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "votingissuedetail", issueDetail); + } } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectSubProcessDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectSubProcessDTO.java index 5edffc797a..866594f1ab 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectSubProcessDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectSubProcessDTO.java @@ -56,7 +56,7 @@ public class ProjectSubProcessDTO implements Serializable { /** * 项目人员关联表ID */ - private String staffId; + private String projectStaffId; /** * 系统ID diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/PlatformCallBackFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/PlatformCallBackFormDTO.java new file mode 100644 index 0000000000..545206dfdc --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/PlatformCallBackFormDTO.java @@ -0,0 +1,39 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author zhaoqifeng + * @dscription + * @date 2021/3/19 15:08 + */ +@Data +public class PlatformCallBackFormDTO implements Serializable { + private static final long serialVersionUID = 6350776148129116395L; + /** + * 事件id + */ + private String eventId; + /** + * 事件新的状态 + */ + private String status; + /** + * 事件处理详细内容 + */ + private String note; + /** + * 事件处理日期, 时区GMT+8, 格式:YYYY-MM-dd HH:mm:ss + */ + private String handleDate; + /** + * 事件处理人姓名 + */ + private String handleUserName; + /** + * 参数签名,签名算法 + */ + private String sign; +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/SendToFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/SendToFormDTO.java index 4060fc2c43..479cf64b30 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/SendToFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/SendToFormDTO.java @@ -34,6 +34,12 @@ public class SendToFormDTO implements Serializable { @NotBlank(message = "外部系统名不能为空") private String platformName; + /** + * 部门名 + */ + private String departmentName; + + private String userId; @Valid private List staffList; diff --git a/epmet-module/gov-project/gov-project-server/pom.xml b/epmet-module/gov-project/gov-project-server/pom.xml index 5acbc26ffb..fd8153b479 100644 --- a/epmet-module/gov-project/gov-project-server/pom.xml +++ b/epmet-module/gov-project/gov-project-server/pom.xml @@ -107,6 +107,12 @@ 2.0.0 compile + + com.epmet + epmet-third-client + 2.0.0 + compile + diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/CustomerProjectParameterDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/CustomerProjectParameterDao.java index f7ae09d16e..2610167069 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/CustomerProjectParameterDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/CustomerProjectParameterDao.java @@ -79,4 +79,14 @@ public interface CustomerProjectParameterDao extends BaseDao { */ List selectSubProcessAndAttachment(@Param("processIds")List processIds); + /** + * 根据platformId查找最新的记录 + * @author zhaoqifeng + * @date 2021/3/19 15:26 + * @param platformId + * @return com.epmet.dto.ProjectSubProcessDTO + */ + ProjectSubProcessDTO selectSubProcessByPlatformId(@Param("platformId") String platformId); + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectSubProcessEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectSubProcessEntity.java index ee451e6416..bee3af437b 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectSubProcessEntity.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectSubProcessEntity.java @@ -56,7 +56,7 @@ public class ProjectSubProcessEntity extends BaseEpmetEntity { /** * 项目人员关联表ID */ - private String staffId; + private String projectStaffId; /** * 系统ID diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java index 3216f2d576..67112ab5d4 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java @@ -19,6 +19,7 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.ProjectDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; @@ -276,4 +277,22 @@ public interface ProjectService extends BaseService { * @Date 2021/2/24 17:07 **/ ProjectInfoDTO queryProjectInfoByProjectId(String projectId); + + /** + * 发送到外部平台 + * @author zhaoqifeng + * @date 2021/3/17 14:33 + * @param formDTO + * @return void + */ + void sendTo(SendToFormDTO formDTO); + + /** + * 第三方平台回调 + * @author zhaoqifeng + * @date 2021/3/19 15:12 + * @param formDTO + * @return void + */ + void platformCallBack(PlatformCallBackFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectSubProcessService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectSubProcessService.java index d822ed2c39..702192d210 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectSubProcessService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectSubProcessService.java @@ -109,4 +109,14 @@ public interface ProjectSubProcessService extends BaseService selectSubProcessAndAttachment(List processIds); + + /** + * 根据platformId查找最新的记录 + * + * @author zhaoqifeng + * @date 2021/3/19 15:24 + * @param platformId + * @return com.epmet.dto.ProjectSubProcessDTO + */ + ProjectSubProcessDTO getSubProcessByPlatformId(String platformId); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index 6b53b1ef2a..3429a814b6 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -29,6 +29,7 @@ import com.epmet.commons.tools.scan.param.TextScanParamDTO; import com.epmet.commons.tools.scan.param.TextTaskDTO; import com.epmet.commons.tools.scan.result.SyncScanResult; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.ScanContentUtils; import com.epmet.constant.ParameterKeyConstant; @@ -43,6 +44,7 @@ import com.epmet.dto.result.*; import com.epmet.entity.*; import com.epmet.feign.*; import com.epmet.redis.ProjectRedis; +import com.epmet.resi.group.constant.TopicConstant; import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO; import com.epmet.service.*; import com.github.pagehelper.PageHelper; @@ -109,6 +111,11 @@ public class ProjectServiceImpl extends BaseServiceImpl customers = baseDao.selectAllCustomerIds(); - if(CollectionUtils.isEmpty(customers))return; + if(CollectionUtils.isEmpty(customers)) { + return; + } List totalContainer = new LinkedList<>(); customers.forEach(customerId -> { List projectNodePeriodPerOrgList = projectStaffService.selectProjectOrgPeriod(customerId); @@ -1364,8 +1373,11 @@ public class ProjectServiceImpl extends BaseServiceImpl { if(null != v){ v.setTotalPeriod(batchDelta_T.get(k)); - if(v.getHandledDate() == v.getFirstDealtDate())v.setFirstReplyPeriod(batchDelta_T.get(k)); - else v.setFirstReplyPeriod(batchDelta_TResponse.get(k)); + if(v.getHandledDate() == v.getFirstDealtDate()) { + v.setFirstReplyPeriod(batchDelta_T.get(k)); + } else { + v.setFirstReplyPeriod(batchDelta_TResponse.get(k)); + } } }); List> partition = ListUtils.partition(totalContainer, NumConstant.ONE_HUNDRED); @@ -1557,17 +1569,25 @@ public class ProjectServiceImpl extends BaseServiceImplstaff ProjectOrgPeriodResultDTO target = dest.get(seq); - if(null != target) target.setPeriodTillReplyFirstly(staffResponseTraceUnit.getCreatedTime()); + if(null != target) { + target.setPeriodTillReplyFirstly(staffResponseTraceUnit.getCreatedTime()); + } } /** @@ -1968,4 +1990,207 @@ public class ProjectServiceImpl extends BaseServiceImpl textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); + if (!textSyncScanResult.success()) { + throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); + } else { + if (!textSyncScanResult.getData().isAllPass()) { + throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode()); + } + } + } + + //获取项目相关信息 + ProjectEntity projectEntity = baseDao.selectById(formDTO.getProjectId()); + if (ProjectConstant.CLOSED.equals(projectEntity.getStatus())) { + throw new RenException(EpmetErrorCode.PROJECT_IS_CLOSED.getCode()); + } + + if(StringUtils.isBlank(formDTO.getProjectStaffId())){ + ProjectStaffDTO projectStaff = projectStaffService.getLatestIdByProjectIdAndStaffId(formDTO.getProjectId(),formDTO.getUserId()); + if(null == projectStaff){ + log.error("com.epmet.service.impl.ProjectServiceImpl.response,project_staff表中没有与之对应的数据,传参:{}", JSON.toJSONString(formDTO)); + throw new RenException("未找到项目相关人员记录"); + } + formDTO.setProjectStaffId(projectStaff.getId()); + } + ProjectStaffDTO projectStaff = projectStaffService.get(formDTO.getProjectStaffId()); + //处理响应记录加入项目进展表 + ProjectProcessEntity projectProcessEntity = new ProjectProcessEntity(); + projectProcessEntity.setProjectId(formDTO.getProjectId()); + projectProcessEntity.setCustomerId(projectStaff.getCustomerId()); + projectProcessEntity.setDepartmentName(formDTO.getDepartmentName()); + projectProcessEntity.setOrgIdPath(projectStaff.getOrgIdPath()); + projectProcessEntity.setGridId(projectStaff.getGridId()); + projectProcessEntity.setDepartmentId(projectStaff.getDepartmentId()); + projectProcessEntity.setAgencyId(projectStaff.getOrgId()); + projectProcessEntity.setOperation(ProjectConstant.OPERATION_RESPONSES); + projectProcessEntity.setOperationName(ProjectConstant.OPERATION_RESPONSES_NAME); + projectProcessEntity.setPublicReply(formDTO.getPublicReply()); + projectProcessEntity.setInternalRemark(formDTO.getInternalRemark()); + projectProcessEntity.setStaffId(formDTO.getUserId()); + projectProcessEntity.setIsSend(NumConstant.ONE); + projectProcessService.insert(projectProcessEntity); + + //项目附件表新增数据 sun 2020.12.22 + if (CollectionUtils.isNotEmpty(formDTO.getPublicFile()) || CollectionUtils.isNotEmpty(formDTO.getInternalFile())) { + saveFile(formDTO.getPublicFile(), formDTO.getInternalFile(), projectStaff.getCustomerId(), formDTO.getProjectId(), projectProcessEntity.getId()); + }//end + + //TODO 发送到外部系统 start + ProjectApplyAssistFormDTO applyAssistFormDTO = new ProjectApplyAssistFormDTO(); + applyAssistFormDTO.setCustomerId(projectStaff.getCustomerId()); + applyAssistFormDTO.setPlatformId(formDTO.getPlatformId()); + if (CollectionUtils.isNotEmpty(formDTO.getInternalFile())) { + List imageList = + formDTO.getInternalFile().stream().filter(fileDTO -> TopicConstant.IMAGE.equals(fileDTO.getType())).map(FileDTO::getUrl).collect(Collectors.toList()); + if (CollectionUtils.isNotEmpty(imageList)) { + applyAssistFormDTO.setImageLink(String.join(StrConstant.COMMA, imageList)); + } + List voiceList = + formDTO.getInternalFile().stream().filter(fileDTO -> TopicConstant.VOICE.equals(fileDTO.getType())).map(FileDTO::getUrl).collect(Collectors.toList()); + if (CollectionUtils.isNotEmpty(imageList)) { + applyAssistFormDTO.setVoiceLink(String.join(StrConstant.COMMA, voiceList)); + } + List videoList = + formDTO.getInternalFile().stream().filter(fileDTO -> TopicConstant.VIDEO.equals(fileDTO.getType())).map(FileDTO::getUrl).collect(Collectors.toList()); + if (CollectionUtils.isNotEmpty(imageList)) { + applyAssistFormDTO.setVideoLink(String.join(StrConstant.COMMA, videoList)); + } + + } + + //获取网格信息 + List relatedPersonnel = projectRelatedPersonnelService.getPersonnelListByProjectId(formDTO.getProjectId()); + CustomerGridFormDTO customerGridFormDTO = new CustomerGridFormDTO(); + customerGridFormDTO.setGridId(relatedPersonnel.get(0).getGridId()); + Result gridResult = govOrgOpenFeignClient.getCustomerGridByGridId(customerGridFormDTO); + if (!gridResult.success()) { + throw new RenException(gridResult.getCode(), gridResult.getMsg()); + } + applyAssistFormDTO.setLatitude(gridResult.getData().getLatitude()); + applyAssistFormDTO.setLongitude(gridResult.getData().getLongitude()); + + //获取议题详情 + IssueDetailFormDTO issueDetailFormDTO = new IssueDetailFormDTO(); + issueDetailFormDTO.setIssueId(projectEntity.getOriginId()); + Result issueDetail = govIssueOpenFeignClient.votingissuedetail(issueDetailFormDTO); + if (!issueDetail.success()) { + throw new RenException(issueDetail.getCode(), issueDetail.getMsg()); + } + ProjectDetailDTO projectDetailDTO = ConvertUtils.sourceToTarget(issueDetail.getData(), ProjectDetailDTO.class); + projectDetailDTO = ConvertUtils.sourceToTarget(issueDetail.getData().getTopicInfo(), ProjectDetailDTO.class); + applyAssistFormDTO.setDetail(projectDetailDTO.toString()); + applyAssistFormDTO.setDetailAddress(projectDetailDTO.getBelongsGridName()); + Result result = epmetThirdOpenFeignClient.applyAssist(applyAssistFormDTO); + if (!result.success()) { + throw new RenException(result.getCode(), result.getMsg()); + } + applyAssistFormDTO.setSource("党建引领"); + ProjectAssistResult assistResult = (ProjectAssistResult)result.getData(); + //发送到外部系统 end + + //结果存入project_sub_process表 + ProjectSubProcessDTO projectSubProcess = new ProjectSubProcessDTO(); + projectSubProcess.setCustomerId(projectStaff.getCustomerId()); + projectSubProcess.setProjectId(formDTO.getProjectId()); + projectSubProcess.setProcessId(projectProcessEntity.getId()); + projectSubProcess.setProjectStaffId(formDTO.getProjectStaffId()); + projectSubProcess.setPlatformId(formDTO.getPlatformId()); + projectSubProcess.setPlatformName(formDTO.getPlatformName()); + projectSubProcess.setTaskId(assistResult.getTaskId()); + projectSubProcess.setExternalStatus(NumConstant.ONE_STR); + projectSubProcess.setExternalStatusDesc("待处理"); + projectSubProcess.setInternalStatus(ProjectConstant.PENDING); + projectSubProcessService.save(projectSubProcess); + + //项目节点历时 + ProjectOrgRelationEntity relationEntity = relationDao.selectByProjectStaffId(formDTO.getProjectStaffId()); + if(null != relationEntity){ + ProjectOrgRelationEntity relationDto = new ProjectOrgRelationEntity(); + relationDto.setProjectStaffId(relationEntity.getProjectStaffId()); + if(null == relationEntity.getFirstDealtDate()){ + Date current = new Date(); + relationDto.setFirstDealtDate(current); + relationDto.setFirstReplyPeriod(calculateDelta_T(ProjectConstant.IMPRECISE_CALCULATION, + ProjectConstant.CALCULATION_TYPE_DEFAULT,projectStaff.getId(), + relationEntity.getInformedDate(),current)); + relationDto.setOperation(ProjectConstant.OPERATION_RESPONSES); + relationDao.maintainTimePropertyConsistency(relationDto); + } + }else{ + log.error("com.epmet.service.impl.ProjectServiceImpl#response,没有找到相关的节点耗时记录,参数:{}",JSON.toJSONString(formDTO)); + throw new RenException("没有找到相关的节点耗时记录"); + } + } + + /** + * 第三方平台回调 + * + * @param formDTO + * @return void + * @author zhaoqifeng + * @date 2021/3/19 15:12 + */ + @Override + public void platformCallBack(PlatformCallBackFormDTO formDTO) { + ProjectSubProcessDTO projectSubProcessDTO = projectSubProcessService.getSubProcessByPlatformId(formDTO.getEventId()); + projectSubProcessDTO.setExternalStatus(formDTO.getStatus()); + projectSubProcessDTO.setResult(formDTO.getNote()); + projectSubProcessDTO.setHandleDate(DateUtils.stringToDate(formDTO.getHandleDate(), DateUtils.DATE_TIME_PATTERN)); + projectSubProcessDTO.setHandleUserName(formDTO.getHandleUserName()); + switch (formDTO.getStatus()) { + case NumConstant.ONE_STR: + projectSubProcessDTO.setExternalStatusDesc("待处理"); + break; + case NumConstant.TWO_STR: + projectSubProcessDTO.setExternalStatusDesc("待核实"); + break; + case NumConstant.THREE_STR: + projectSubProcessDTO.setExternalStatusDesc("已上报"); + break; + case NumConstant.FOUR_STR: + projectSubProcessDTO.setExternalStatusDesc("已完结"); + projectSubProcessDTO.setInternalStatus(NumConstant.ONE_STR); + break; + case NumConstant.FIVE_STR: + projectSubProcessDTO.setExternalStatusDesc("处理中"); + break; + case NumConstant.SIX_STR: + projectSubProcessDTO.setExternalStatusDesc("待分发"); + break; + case NumConstant.SEVEN_STR: + projectSubProcessDTO.setExternalStatusDesc("归档"); + break; + case NumConstant.EIGHT_STR: + projectSubProcessDTO.setExternalStatusDesc("催办"); + break; + case NumConstant.NINE_STR: + projectSubProcessDTO.setExternalStatusDesc("超时"); + break; + default: + break; + } + projectSubProcessService.save(projectSubProcessDTO); + //TODO 保存附件 + } + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSubProcessServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSubProcessServiceImpl.java index 0bdbbdb8df..9506c781bd 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSubProcessServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSubProcessServiceImpl.java @@ -84,6 +84,7 @@ public class ProjectSubProcessServiceImpl extends BaseServiceImpl + \ No newline at end of file From b4d30dc027df653f9daae8e83268ac4483815068 Mon Sep 17 00:00:00 2001 From: wangchao Date: Sat, 20 Mar 2021 00:19:05 +0800 Subject: [PATCH 171/375] =?UTF-8?q?=E6=B3=A8=E9=87=8A=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/controller/IssueAuditController.java | 8 ++++++++ .../src/main/java/com/epmet/service/IssueService.java | 9 ++++++++- .../java/com/epmet/service/impl/IssueServiceImpl.java | 8 ++++++++ .../group/dto/member/ResiGroupMemberInfoRedisDTO.java | 5 +++-- .../modules/member/redis/ResiGroupMemberRedis.java | 5 ++--- .../com/epmet/controller/UserResiInfoController.java | 10 ++++++++++ 6 files changed, 39 insertions(+), 6 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueAuditController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueAuditController.java index d6519fb6e9..f3320a96b8 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueAuditController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueAuditController.java @@ -115,6 +115,14 @@ public class IssueAuditController { return new Result>().ok(issueApplicationHistoryService.applicationHistoryWork(applicationHistoryWorkFormDTO)); } + /** + * @Description 工作端议题审核 + * @param token + * @param param + * @return java.lang.String + * @author wangc + * @date 2021.03.19 23:40 + */ @PostMapping("audit") public Result audit(@LoginUser TokenDto token, @RequestBody IssueAuditionFormDTO param){ return new Result().ok(issueService.audit(token,param)); diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java index 0c58cfc807..4b14996149 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java @@ -152,7 +152,14 @@ public interface IssueService extends BaseService { * @date 2020.11.19 10:02 */ FirstTopicShiftedToIssueApplicationResultDTO topicShiftedToIssueV2(IssueShiftedFromTopicFormDTO issueShiftedFromTopicFormDTO); - + /** + * @Description 工作端议题审核 + * @param token + * @param param + * @return java.lang.String + * @author wangc + * @date 2021.03.19 23:40 + */ String audit(TokenDto token, IssueAuditionFormDTO param); /** diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java index 40fb145f77..b7d6c57015 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java @@ -443,6 +443,14 @@ public class IssueServiceImpl extends BaseServiceImpl imp return result; } + /** + * @Description 工作端议题审核 + * @param token + * @param param + * @return java.lang.String + * @author wangc + * @date 2021.03.19 23:40 + */ @Override @Transactional(rollbackFor = Exception.class) public String audit(TokenDto token, IssueAuditionFormDTO param){ diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/ResiGroupMemberInfoRedisDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/ResiGroupMemberInfoRedisDTO.java index 1bbabfc036..cb468c33fe 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/ResiGroupMemberInfoRedisDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/ResiGroupMemberInfoRedisDTO.java @@ -51,7 +51,7 @@ public class ResiGroupMemberInfoRedisDTO implements Serializable { * */ private String memberMobile; /** - * 组Id,不存在redis的value中,存在redis的key中 + * 组Id * */ private String groupId; @@ -64,7 +64,8 @@ public class ResiGroupMemberInfoRedisDTO implements Serializable { "userShowName": "山东路-尹女士", "groupLeaderFlag": "leader", "enterGroupType": "created", - "memberStatus": "approved" + "memberStatus": "approved", + "groupId":"***" } * * diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/redis/ResiGroupMemberRedis.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/redis/ResiGroupMemberRedis.java index d635bd1dea..c2c735c70b 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/redis/ResiGroupMemberRedis.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/redis/ResiGroupMemberRedis.java @@ -85,7 +85,7 @@ public class ResiGroupMemberRedis { } /** - * @Description 得到一个指定组内成员信息,如果redis中没有,则返回null + * @Description 得到一个指定组内成员信息,如果redis中没有,则去数据库查询并放入缓存 * @Param groupId * @Param userId * @return ResiGroupMemberInfoRedisDTO.class @@ -97,7 +97,7 @@ public class ResiGroupMemberRedis { ResiGroupMemberInfoRedisDTO memberCache = (ResiGroupMemberInfoRedisDTO) redisUtils.get(ResiGroupRedisKeys.getResiGroupMemberInfoKey(groupId,userId)); //如果缓存中没有该成员数据 - if(null == memberCache || StringUtils.isNotBlank(memberCache.getUserId())){ + if(null == memberCache || StringUtils.isBlank(memberCache.getUserId())){ Map param = new HashMap<>(); param.put(TopicConstant.CUSTOMER_USER_ID,userId); param.put(TopicConstant.RESI_GROUP_ID,groupId); @@ -140,7 +140,6 @@ public class ResiGroupMemberRedis { .concat(userId)); } } - memberCache.setGroupId(groupId); return memberCache; } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserResiInfoController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserResiInfoController.java index e4f54f6aa7..9275fb8707 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserResiInfoController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserResiInfoController.java @@ -202,6 +202,16 @@ public class UserResiInfoController { return new Result(); } + /** + * @Description 在分享链接之后完成注册居民之后调用的接口 + * 作用 + * + * 更改邀请浏览记录里"是否通过邀请链接注册居民" + * @param param + * @return void + * @author wangc + * @date 2020.12.18 16:34 + */ @PostMapping("submitinlink") public Result submitInLink(@RequestBody AfterRegisterResidentInSharableLinkFormDTO param, @LoginUser TokenDto token){ param.setInviteeId(token.getUserId()); From 070c228db323942fd473d7f68e76f74cb0052bd3 Mon Sep 17 00:00:00 2001 From: wangchao Date: Sun, 21 Mar 2021 23:37:37 +0800 Subject: [PATCH 172/375] =?UTF-8?q?=E6=B3=A8=E9=87=8A=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/ProjectServiceImpl.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index 309377bb4b..e3c0f23a2d 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -1107,6 +1107,17 @@ public class ProjectServiceImpl extends BaseServiceImpl Date: Mon, 22 Mar 2021 00:40:31 +0800 Subject: [PATCH 173/375] =?UTF-8?q?=E6=B3=A8=E9=87=8A=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/topic/impl/TopicServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 83e3b9da38..3046f2d6c6 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 @@ -74,7 +74,7 @@ public class TopicServiceImpl implements TopicService { agencies.forEach(agency -> { initAgencyGridMap(agency.getAgencyId(),agency,subGridOfAgency); }); - + //计算网格-组映射关系 List topics = topicDao.selectGroupOrderByGrid(targetDate,customerId); topics.forEach(groupTopic -> { if(null != groupTopic.getTopics() && groupTopic.getTopics().size() == NumConstant.ONE && StringUtils.isBlank(groupTopic.getTopics().get(NumConstant.ZERO).getTopicId())){ From efe7e7405f7afc84d3aef2860ac24683c683fea6 Mon Sep 17 00:00:00 2001 From: wangchao Date: Mon, 22 Mar 2021 00:43:00 +0800 Subject: [PATCH 174/375] =?UTF-8?q?=E6=B3=A8=E9=87=8A=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/topic/impl/TopicServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 3046f2d6c6..c832202e70 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 @@ -74,7 +74,7 @@ public class TopicServiceImpl implements TopicService { agencies.forEach(agency -> { initAgencyGridMap(agency.getAgencyId(),agency,subGridOfAgency); }); - //计算网格-组映射关系 + //计算网格-组-话题映射关系 List topics = topicDao.selectGroupOrderByGrid(targetDate,customerId); topics.forEach(groupTopic -> { if(null != groupTopic.getTopics() && groupTopic.getTopics().size() == NumConstant.ONE && StringUtils.isBlank(groupTopic.getTopics().get(NumConstant.ZERO).getTopicId())){ From ef7e198e12ed3a5fbc4a5d43e09dfd1ac4c65825 Mon Sep 17 00:00:00 2001 From: wxz Date: Mon, 22 Mar 2021 09:34:17 +0800 Subject: [PATCH 175/375] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=201.?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=AE=A2=E6=88=B7=E7=AC=AC=E4=B8=89=E6=96=B9?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E9=85=8D=E7=BD=AE=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/feign/ThirdOpenFeignClient.java | 14 +++++- .../ThirdOpenFeignClientFallback.java | 6 +++ .../dto/form/ThirdPlatformConfigFormDTO.java | 9 +++- .../result/ThirdPlatformConfigResultDTO.java | 21 +++++++++ .../CustomerProjectParameterController.java | 15 +++++++ .../CustomerProjectParameterService.java | 3 ++ .../CustomerProjectParameterServiceImpl.java | 44 ++++++++++++++++++- 7 files changed, 107 insertions(+), 5 deletions(-) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ThirdPlatformConfigResultDTO.java diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/ThirdOpenFeignClient.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/ThirdOpenFeignClient.java index 2459873c91..ab5c26cc4b 100644 --- a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/ThirdOpenFeignClient.java +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/ThirdOpenFeignClient.java @@ -3,6 +3,7 @@ package com.epmet.feign; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.form.ThirdPlatformFormDTO; +import com.epmet.dto.result.ThirdplatformResultDTO; import com.epmet.feign.fallback.ThirdOpenFeignClientFallback; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PostMapping; @@ -10,8 +11,8 @@ import org.springframework.web.bind.annotation.RequestBody; import java.util.List; -@FeignClient(name = ServiceConstant.EPMET_THIRD_SERVER, fallback = ThirdOpenFeignClientFallback.class) -//@FeignClient(name = ServiceConstant.EPMET_THIRD_SERVER, fallback = ThirdOpenFeignClientFallback.class, url = "http://localhost:8110") +//@FeignClient(name = ServiceConstant.EPMET_THIRD_SERVER, fallback = ThirdOpenFeignClientFallback.class) +@FeignClient(name = ServiceConstant.EPMET_THIRD_SERVER, fallback = ThirdOpenFeignClientFallback.class, url = "http://localhost:8110") public interface ThirdOpenFeignClient { /** @@ -23,4 +24,13 @@ public interface ThirdOpenFeignClient { @PostMapping("/third/thirdplatform/customer/saveorupdate-selected-platforms") Result saveOrUpdateSelectedPlatformsInfo(@RequestBody List input); + /** + * 根据客户id和动作,列出客户在指定动作下可用的第三方平台 + * 用途:工作端,运营端配置界面 + * + * @param input + * @return + */ + @PostMapping("/third/thirdplatform/customer/list-available-platforms-by-action") + Result> listAvailablePlatformsByCustomerAndAction(@RequestBody ThirdPlatformFormDTO input); } diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/fallback/ThirdOpenFeignClientFallback.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/fallback/ThirdOpenFeignClientFallback.java index abd22929ee..9322354512 100644 --- a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/fallback/ThirdOpenFeignClientFallback.java +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/fallback/ThirdOpenFeignClientFallback.java @@ -4,6 +4,7 @@ import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.form.ThirdPlatformFormDTO; +import com.epmet.dto.result.ThirdplatformResultDTO; import com.epmet.feign.ThirdOpenFeignClient; import org.springframework.stereotype.Component; @@ -15,4 +16,9 @@ public class ThirdOpenFeignClientFallback implements ThirdOpenFeignClient { public Result saveOrUpdateSelectedPlatformsInfo(List input) { return ModuleUtils.feignConError(ServiceConstant.EPMET_THIRD_SERVER, "saveOrUpdateSelectedPlatformsInfo", input); } + + @Override + public Result> listAvailablePlatformsByCustomerAndAction(ThirdPlatformFormDTO input) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_THIRD_SERVER, "listAvailablePlatformsByCustomerAndAction", input); + } } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ThirdPlatformConfigFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ThirdPlatformConfigFormDTO.java index 519c1a1371..d816340cc6 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ThirdPlatformConfigFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ThirdPlatformConfigFormDTO.java @@ -12,10 +12,15 @@ public class ThirdPlatformConfigFormDTO { public interface SaveThirdplatformConfig { } - @NotBlank(message = "客户ID不能为空", groups = {SaveThirdplatformConfig.class}) + public interface LoadThirdplatformConfig { } + + @NotBlank(message = "客户ID不能为空", groups = { + SaveThirdplatformConfig.class, + LoadThirdplatformConfig.class}) private String customerId; - @NotBlank(message = "项目协助发送开关状态不能为空", groups = {SaveThirdplatformConfig.class}) + @NotBlank(message = "项目协助发送开关状态不能为空", groups = { + SaveThirdplatformConfig.class}) private String sendProjectSwitch; private List customerSelectedPlatformList; diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ThirdPlatformConfigResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ThirdPlatformConfigResultDTO.java new file mode 100644 index 0000000000..3e08815493 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ThirdPlatformConfigResultDTO.java @@ -0,0 +1,21 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +@Data +public class ThirdPlatformConfigResultDTO { + + private String sendProjectSwitch; + private List customerSelectedPlatformList = new ArrayList(); + + @Data + public static class CustomerSelectedPlatform { + private String customerId; + private String platformId; + private String platformName; + private String icon; + } +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/CustomerProjectParameterController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/CustomerProjectParameterController.java index aeb93e41c8..de479f7344 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/CustomerProjectParameterController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/CustomerProjectParameterController.java @@ -25,10 +25,12 @@ import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.constant.ParameterKeyConstant; import com.epmet.dto.CustomerProjectParameterDTO; import com.epmet.dto.form.ParameterFormDTO; import com.epmet.dto.form.ThirdPlatformConfigFormDTO; import com.epmet.dto.result.ParameterResultDTO; +import com.epmet.dto.result.ThirdPlatformConfigResultDTO; import com.epmet.excel.CustomerProjectParameterExcel; import com.epmet.service.CustomerProjectParameterService; import org.springframework.beans.factory.annotation.Autowired; @@ -161,4 +163,17 @@ public class CustomerProjectParameterController { customerProjectParameterService.saveThirdplatformConfig(customerId, sendProjectSwitch, platformList); return new Result(); } + + /** + * @Description 保存项目第三方平台的配置 + * @return + * @author wxz + * @date 2021.03.19 17:10 + */ + @PostMapping("load-thirdplatform-config") + public Result loadThirdplatformConfig(@RequestBody ThirdPlatformConfigFormDTO input) { + ValidatorUtils.validateEntity(input, ThirdPlatformConfigFormDTO.LoadThirdplatformConfig.class); + ThirdPlatformConfigResultDTO resultDTO = customerProjectParameterService.loadThirdplatformConfig(input.getCustomerId(), ParameterKeyConstant.THIRD_PLATFORM_PROJECT_SEND); + return new Result().ok(resultDTO); + } } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/CustomerProjectParameterService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/CustomerProjectParameterService.java index 4f1d6e9ea8..e7473100f0 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/CustomerProjectParameterService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/CustomerProjectParameterService.java @@ -23,6 +23,7 @@ import com.epmet.dto.CustomerProjectParameterDTO; import com.epmet.dto.form.ParameterFormDTO; import com.epmet.dto.form.ThirdPlatformConfigFormDTO; import com.epmet.dto.result.ParameterResultDTO; +import com.epmet.dto.result.ThirdPlatformConfigResultDTO; import com.epmet.entity.CustomerProjectParameterEntity; import java.util.List; @@ -173,4 +174,6 @@ public interface CustomerProjectParameterService extends BaseService platformList); + + ThirdPlatformConfigResultDTO loadThirdplatformConfig(String customerId, String parameterKey); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/CustomerProjectParameterServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/CustomerProjectParameterServiceImpl.java index ab36ac3469..3595f23a94 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/CustomerProjectParameterServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/CustomerProjectParameterServiceImpl.java @@ -21,9 +21,11 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; 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.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.Result; import com.epmet.constant.ParameterKeyConstant; import com.epmet.constant.ThirdPlatformActions; import com.epmet.dao.CustomerProjectParameterDao; @@ -32,6 +34,8 @@ import com.epmet.dto.form.ParameterFormDTO; import com.epmet.dto.form.ThirdPlatformConfigFormDTO; import com.epmet.dto.form.ThirdPlatformFormDTO; import com.epmet.dto.result.ParameterResultDTO; +import com.epmet.dto.result.ThirdPlatformConfigResultDTO; +import com.epmet.dto.result.ThirdplatformResultDTO; import com.epmet.entity.CustomerProjectParameterEntity; import com.epmet.feign.ThirdOpenFeignClient; import com.epmet.redis.CustomerProjectParameterRedis; @@ -332,6 +336,44 @@ public class CustomerProjectParameterServiceImpl extends BaseServiceImpl> listResult = thirdOpenFeignClient.listAvailablePlatformsByCustomerAndAction(form); + + if (listResult == null || !listResult.success()) { + throw new RenException("调用Third服务,获取第三方平台列表失败"); + } + List platforms = listResult.getData(); + + // 2.本地查询 + CustomerProjectParameterEntity params = new CustomerProjectParameterEntity(); + params.setCustomerId(customerId); + params.setParameterKey(parameterKey); + String value = baseDao.selectParameterValueByKey(params); + value = StringUtils.isBlank(value) ? "0" : value; + + ThirdPlatformConfigResultDTO result = new ThirdPlatformConfigResultDTO(); + result.setSendProjectSwitch(value); + + platforms.forEach(p -> { + ThirdPlatformConfigResultDTO.CustomerSelectedPlatform platform = new ThirdPlatformConfigResultDTO.CustomerSelectedPlatform(); + platform.setCustomerId(customerId); + platform.setIcon(p.getIcon()); + platform.setPlatformId(p.getPlatformId()); + platform.setPlatformName(p.getPlatformName()); + result.getCustomerSelectedPlatformList().add(platform); + }); + + return result; } } \ No newline at end of file From 5d642275cb4cc28287db0bc9e921d008f27bf1db Mon Sep 17 00:00:00 2001 From: wxz Date: Mon, 22 Mar 2021 09:34:38 +0800 Subject: [PATCH 176/375] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=20=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E9=85=8D=E7=BD=AE=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/feign/ThirdOpenFeignClient.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/ThirdOpenFeignClient.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/ThirdOpenFeignClient.java index ab5c26cc4b..de647e726e 100644 --- a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/ThirdOpenFeignClient.java +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/ThirdOpenFeignClient.java @@ -11,8 +11,8 @@ import org.springframework.web.bind.annotation.RequestBody; import java.util.List; -//@FeignClient(name = ServiceConstant.EPMET_THIRD_SERVER, fallback = ThirdOpenFeignClientFallback.class) -@FeignClient(name = ServiceConstant.EPMET_THIRD_SERVER, fallback = ThirdOpenFeignClientFallback.class, url = "http://localhost:8110") +@FeignClient(name = ServiceConstant.EPMET_THIRD_SERVER, fallback = ThirdOpenFeignClientFallback.class) +//@FeignClient(name = ServiceConstant.EPMET_THIRD_SERVER, fallback = ThirdOpenFeignClientFallback.class, url = "http://localhost:8110") public interface ThirdOpenFeignClient { /** From a4b49c3ba996f1d6b099bc3594e0b24a5dd6f5d2 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 22 Mar 2021 10:31:05 +0800 Subject: [PATCH 177/375] =?UTF-8?q?=E6=96=B9=E6=B3=95=E4=BD=93=E6=96=B0?= =?UTF-8?q?=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IssueProjectCategoryDictController.java | 22 +++++++++++++++++++ .../IssueProjectCategoryDictService.java | 12 ++++++++++ .../IssueProjectCategoryDictServiceImpl.java | 20 +++++++++++++++++ 3 files changed, 54 insertions(+) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java index d6fb36123d..b0d5a7fd1f 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java @@ -144,4 +144,26 @@ public class IssueProjectCategoryDictController { return new Result().ok(issueProjectCategoryDictService.getProjectAndCategoryInfo(formDTO)); } + /** + * @param formDTO + * @return + * @Description 分类启用与禁用 + * @Author sun + **/ + @PostMapping("isdisablecategory") + public Result isDisableCategory(@RequestBody ProjectSaveCategoryFormDTO formDTO) { + return new Result().ok(issueProjectCategoryDictService.isDisableCategory(formDTO)); + } + + /** + * @param formDTO + * @return + * @Description 分类删除 + * @Author sun + **/ + @PostMapping("delcategory") + public Result delCategory(@RequestBody ProjectSaveCategoryFormDTO formDTO) { + return new Result().ok(issueProjectCategoryDictService.delCategory(formDTO)); + } + } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java index 3b1fa1def1..9de4150e08 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java @@ -130,4 +130,16 @@ public interface IssueProjectCategoryDictService extends BaseService Date: Mon, 22 Mar 2021 10:34:29 +0800 Subject: [PATCH 178/375] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/IssueVoteStatisticalDailyDao.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteStatisticalDailyDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteStatisticalDailyDao.xml index 84d66f138b..71da21f685 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteStatisticalDailyDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteStatisticalDailyDao.xml @@ -23,6 +23,9 @@ + + + + SELECT + * + FROM + issue_project_category_dict + + DEL_FLAG = 0 + and CUSTOMER_ID !='default' + + AND CREATED_TIME > #{start} + + + AND CREATED_TIME < #{end} + + + ORDER BY CREATED_TIME ASC + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/CustomerProjectCategoryDictDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/CustomerProjectCategoryDictDao.xml new file mode 100644 index 0000000000..63b47e4456 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/CustomerProjectCategoryDictDao.xml @@ -0,0 +1,41 @@ + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactOrginProjectCategoryDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactOrginProjectCategoryDao.xml new file mode 100644 index 0000000000..572c1dc091 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactOrginProjectCategoryDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file From 6702899ec7e270317fb54df4c00d9d42192e9da8 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 22 Mar 2021 13:28:14 +0800 Subject: [PATCH 180/375] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E5=86=85=E3=80=81?= =?UTF-8?q?=E7=BB=84=E7=BB=87=E5=86=85=E9=A1=B9=E7=9B=AE=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E9=A1=B9=E7=9B=AE=E6=95=B0=E9=87=8F=E9=87=87?= =?UTF-8?q?=E9=9B=86API=E8=B0=83=E6=95=B4=EF=BC=8C=20=E5=A4=A7=E5=B1=8F?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E7=B1=BB=E5=9E=8B=E5=88=86=E6=9E=90=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=8E=A5=E5=8F=A3=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ScreenProjectCategoryGridDailyDTO.java | 42 ++--------------- .../dto/ScreenProjectCategoryOrgDailyDTO.java | 42 ++--------------- .../ScreenProjectCategoryOrgDailyDao.xml | 40 +++++++++-------- .../ScreenProjectCategoryGridDailyDTO.java | 44 ++---------------- .../ScreenProjectCategoryOrgDailyDTO.java | 44 ++---------------- .../ScreenProjectCategoryGridDailyEntity.java | 45 +------------------ .../ScreenProjectCategoryOrgDailyEntity.java | 43 +----------------- .../ScreenProjectCategoryGridDailyDao.xml | 23 ---------- .../ScreenProjectCategoryOrgDailyDao.xml | 25 ----------- 9 files changed, 36 insertions(+), 312 deletions(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenProjectCategoryGridDailyDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenProjectCategoryGridDailyDTO.java index b9cd6657b6..166be073a1 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenProjectCategoryGridDailyDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenProjectCategoryGridDailyDTO.java @@ -17,11 +17,10 @@ package com.epmet.dto; -import java.io.Serializable; -import java.util.Date; import lombok.Data; -import java.math.BigDecimal; +import java.io.Serializable; +import java.util.Date; /** * 项目(事件)分类按网格_按天统计 @@ -67,48 +66,13 @@ public class ScreenProjectCategoryGridDailyDTO implements Serializable { /** * e世通中的项目类别编码 */ - private String epmetCategoryCode; + private String categoryCode; /** * 该分类下所有项目总数 */ private Integer projectTotal; - /** - * 该分类下,正在处理中的项目总数 - */ - private Integer pendingTotal; - - /** - * 该分类下已结案的项目总数 - */ - private Integer closedTotal; - - /** - * 该分类下已结案无需解决的项目总数 - */ - private Integer unResolvedTotal; - - /** - * 该分类下已结案已解决的项目总数 - */ - private Integer resolvedTotal; - - /** - * 该分类下项目结案率 - */ - private BigDecimal closedRatio; - - /** - * 该分类下已结案项目解决率 - */ - private BigDecimal resolvedRatio; - - /** - * 该分类下已结案项目未解决率 - */ - private BigDecimal unResolvedRatio; - /** * 删除标识 */ diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenProjectCategoryOrgDailyDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenProjectCategoryOrgDailyDTO.java index 1507a1f88a..0404581cf7 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenProjectCategoryOrgDailyDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenProjectCategoryOrgDailyDTO.java @@ -17,11 +17,10 @@ package com.epmet.dto; -import java.io.Serializable; -import java.util.Date; import lombok.Data; -import java.math.BigDecimal; +import java.io.Serializable; +import java.util.Date; /** * 项目(事件)分类按组织_按天统计 @@ -72,48 +71,13 @@ public class ScreenProjectCategoryOrgDailyDTO implements Serializable { /** * e世通中的项目类别编码 */ - private String epmetCategoryCode; + private String categoryCode; /** * 该分类下所有项目总数 */ private Integer projectTotal; - /** - * 该分类下,正在处理中的项目总数 - */ - private Integer pendingTotal; - - /** - * 该分类下已结案的项目总数 - */ - private Integer closedTotal; - - /** - * 该分类下已结案无需解决的项目总数 - */ - private Integer unResolvedTotal; - - /** - * 该分类下已结案已解决的项目总数 - */ - private Integer resolvedTotal; - - /** - * 该分类下项目结案率 - */ - private BigDecimal closedRatio; - - /** - * 该分类下已结案项目解决率 - */ - private BigDecimal resolvedRatio; - - /** - * 该分类下已结案项目未解决率 - */ - private BigDecimal unResolvedRatio; - /** * 删除标识 */ diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectCategoryOrgDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectCategoryOrgDailyDao.xml index 5816def044..d2ac38a7f7 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectCategoryOrgDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectCategoryOrgDailyDao.xml @@ -5,24 +5,26 @@ \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectCategoryGridDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectCategoryGridDailyDTO.java index 50afc350ef..582fc6d842 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectCategoryGridDailyDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectCategoryGridDailyDTO.java @@ -17,11 +17,10 @@ package com.epmet.dto.screen; -import java.io.Serializable; -import java.util.Date; import lombok.Data; -import java.math.BigDecimal; +import java.io.Serializable; +import java.util.Date; /** * 项目(事件)分类按网格_按天统计 @@ -67,50 +66,13 @@ public class ScreenProjectCategoryGridDailyDTO implements Serializable { /** * e世通中的项目类别编码 */ - private String epmetCategoryCode; - - private String epmetCategoryName; + private String categoryCode; /** * 该分类下所有项目总数 */ private Integer projectTotal; - /** - * 该分类下,正在处理中的项目总数 - */ - private Integer pendingTotal; - - /** - * 该分类下已结案的项目总数 - */ - private Integer closedTotal; - - /** - * 该分类下已结案无需解决的项目总数 - */ - private Integer unResolvedTotal; - - /** - * 该分类下已结案已解决的项目总数 - */ - private Integer resolvedTotal; - - /** - * 该分类下项目结案率 - */ - private BigDecimal closedRatio; - - /** - * 该分类下已结案项目解决率 - */ - private BigDecimal resolvedRatio; - - /** - * 该分类下已结案项目未解决率 - */ - private BigDecimal unResolvedRatio; - /** * 删除标识 */ diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectCategoryOrgDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectCategoryOrgDailyDTO.java index 49c85be67e..ed598e903f 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectCategoryOrgDailyDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectCategoryOrgDailyDTO.java @@ -17,11 +17,10 @@ package com.epmet.dto.screen; -import java.io.Serializable; -import java.util.Date; import lombok.Data; -import java.math.BigDecimal; +import java.io.Serializable; +import java.util.Date; /** * 项目(事件)分类按组织_按天统计 @@ -72,50 +71,13 @@ public class ScreenProjectCategoryOrgDailyDTO implements Serializable { /** * e世通中的项目类别编码 */ - private String epmetCategoryCode; - - private String epmetCategoryName; + private String categoryCode; /** * 该分类下所有项目总数 */ private Integer projectTotal; - /** - * 该分类下,正在处理中的项目总数 - */ - private Integer pendingTotal; - - /** - * 该分类下已结案的项目总数 - */ - private Integer closedTotal; - - /** - * 该分类下已结案无需解决的项目总数 - */ - private Integer unResolvedTotal; - - /** - * 该分类下已结案已解决的项目总数 - */ - private Integer resolvedTotal; - - /** - * 该分类下项目结案率 - */ - private BigDecimal closedRatio; - - /** - * 该分类下已结案项目解决率 - */ - private BigDecimal resolvedRatio; - - /** - * 该分类下已结案项目未解决率 - */ - private BigDecimal unResolvedRatio; - /** * 删除标识 */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectCategoryGridDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectCategoryGridDailyEntity.java index ef91f696c2..5d40a12628 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectCategoryGridDailyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectCategoryGridDailyEntity.java @@ -18,14 +18,10 @@ package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; -import java.math.BigDecimal; -import java.util.Date; - /** * 项目(事件)分类按网格_按天统计 * @@ -65,50 +61,13 @@ public class ScreenProjectCategoryGridDailyEntity extends BaseEpmetEntity { private String pids; /** - * e世通中的项目类别编码 + * 项目类别编码 */ - private String epmetCategoryCode; - - private String epmetCategoryName; + private String categoryCode; /** * 该分类下所有项目总数 */ private Integer projectTotal; - /** - * 该分类下,正在处理中的项目总数 - */ - private Integer pendingTotal; - - /** - * 该分类下已结案的项目总数 - */ - private Integer closedTotal; - - /** - * 该分类下已结案无需解决的项目总数 - */ - private Integer unResolvedTotal; - - /** - * 该分类下已结案已解决的项目总数 - */ - private Integer resolvedTotal; - - /** - * 该分类下项目结案率 - */ - private BigDecimal closedRatio; - - /** - * 该分类下已结案项目解决率 - */ - private BigDecimal resolvedRatio; - - /** - * 该分类下已结案项目未解决率 - */ - private BigDecimal unResolvedRatio; - } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectCategoryOrgDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectCategoryOrgDailyEntity.java index 1ac6c76145..7c61d7069d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectCategoryOrgDailyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectCategoryOrgDailyEntity.java @@ -18,14 +18,10 @@ package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; -import java.math.BigDecimal; -import java.util.Date; - /** * 项目(事件)分类按组织_按天统计 * @@ -72,48 +68,11 @@ public class ScreenProjectCategoryOrgDailyEntity extends BaseEpmetEntity { /** * e世通中的项目类别编码 */ - private String epmetCategoryCode; - - private String epmetCategoryName; + private String categoryCode; /** * 该分类下所有项目总数 */ private Integer projectTotal; - /** - * 该分类下,正在处理中的项目总数 - */ - private Integer pendingTotal; - - /** - * 该分类下已结案的项目总数 - */ - private Integer closedTotal; - - /** - * 该分类下已结案无需解决的项目总数 - */ - private Integer unResolvedTotal; - - /** - * 该分类下已结案已解决的项目总数 - */ - private Integer resolvedTotal; - - /** - * 该分类下项目结案率 - */ - private BigDecimal closedRatio; - - /** - * 该分类下已结案项目解决率 - */ - private BigDecimal resolvedRatio; - - /** - * 该分类下已结案项目未解决率 - */ - private BigDecimal unResolvedRatio; - } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.xml index bc84c6b2df..e79da541d9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.xml @@ -3,29 +3,6 @@ - - - - - - - - - - - - - - - - - - - - - - - delete from screen_project_category_grid_daily where customer_id = #{customerId} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.xml index 5d8cd9a73a..20c4452e69 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.xml @@ -2,31 +2,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - delete from screen_project_category_org_daily where customer_id = #{customerId} From 2ec89584216ca2a893c38cbb5588d6aa9940e8e1 Mon Sep 17 00:00:00 2001 From: wangchao Date: Mon, 22 Mar 2021 13:32:06 +0800 Subject: [PATCH 181/375] =?UTF-8?q?=E6=B3=A8=E9=87=8A=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/PointRuleServiceImpl.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointRuleServiceImpl.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointRuleServiceImpl.java index 8665b1921a..99a88c18a3 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointRuleServiceImpl.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointRuleServiceImpl.java @@ -197,12 +197,14 @@ public class PointRuleServiceImpl extends BaseServiceImpl> customerListResult = operCrmOpenFeignClient.getAllCustomerList(); log.info("initPointRule operCrmOpenFeignClient.getAllCustomerList result:{}",JSON.toJSONString(customerListResult)); if (!customerListResult.success() || CollectionUtils.isEmpty(customerListResult.getData())) { throw new RenException("获取所有客户列表失败"); } List customerDTOList = customerListResult.getData(); + //获取默认规则列表 List ruleDefaultEntities = pointRuleDefaultDao.selectList(null); if (CollectionUtils.isEmpty(ruleDefaultEntities)) { log.warn("initPointRule pointRuleDefaultDao.selectList return empty"); @@ -211,15 +213,18 @@ public class PointRuleServiceImpl extends BaseServiceImpl insertList = new ArrayList<>(); + //获取全部默认规则code集合 List defaultEventCodeList = ruleDefaultEntities.stream().map(PointRuleDefaultEntity :: getEventCode).distinct().collect(Collectors.toList()); + //获取所有客户的积分规则 List customerRule = baseDao.selectList(null); if(!CollectionUtils.isEmpty(customerRule)){ + //key :: customerId || value :: 客户规则集合 Map> customerRuleMap = customerRule.stream().collect(Collectors.groupingBy(PointRuleEntity :: getCustomerId)); customerRuleMap.forEach((customerId,ruleList) -> { if(null != ruleList){ List event = new LinkedList<>(defaultEventCodeList); - //取差集 + //取差集,event只剩下当前客户没有的积分规则 event.removeAll(ruleList.stream().map(PointRuleEntity :: getEventCode).distinct().collect(Collectors.toList())); if(!CollectionUtils.isEmpty(event)){ ruleDefaultEntities.stream().filter(rule -> event.contains(rule.getEventCode())).map(o -> { @@ -238,7 +243,7 @@ public class PointRuleServiceImpl extends BaseServiceImpl haveInitCustomerIds = baseDao.selectCustomerIds(); if (haveInitCustomerIds == null) { haveInitCustomerIds = new ArrayList<>(); @@ -249,6 +254,7 @@ public class PointRuleServiceImpl extends BaseServiceImpl Date: Mon, 22 Mar 2021 13:59:54 +0800 Subject: [PATCH 182/375] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ScreenCentralZoneDataExtractServiceImpl.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/ScreenCentralZoneDataExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/ScreenCentralZoneDataExtractServiceImpl.java index 24811db736..99c45d2f95 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/ScreenCentralZoneDataExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/ScreenCentralZoneDataExtractServiceImpl.java @@ -63,7 +63,7 @@ public class ScreenCentralZoneDataExtractServiceImpl implements ScreenCentralZon //1.查询用户与党员数据,判断dimId是否为昨天,如果根据这个dimId没有查询出结果,则取前天的数据 //如果还是查不出数据,继续向下执行,这部分数据设置默认值 - //注册用户数 + //注册用户数 fact_reg_user_grid_daily 或 fact_reg_user_agency_daily agency级别 List result = factRegUserGridDailyDao.selectUserAndPartymemberByOrgLevel(ORG_LEVEL_AGENCY,customerId,dimId); if(CollectionUtils.isEmpty(result)){ @@ -72,6 +72,7 @@ public class ScreenCentralZoneDataExtractServiceImpl implements ScreenCentralZon } if(null == result) result = new LinkedList<>(); } + // 网格级别 List gridUserResult = factRegUserGridDailyDao.selectUserAndPartymemberByOrgLevel(ORG_LEVEL_GRID,customerId,dimId); @@ -84,13 +85,14 @@ public class ScreenCentralZoneDataExtractServiceImpl implements ScreenCentralZon result.addAll(gridUserResult); } - //2.组 + //2.组 fact_group_grid_daily 或 fact_group_agency_daily List agencyGroup = factGroupGridDailyDao.selectGroupCountByOrgLevel(ORG_LEVEL_AGENCY,customerId,dimId); if(CollectionUtils.isEmpty(agencyGroup)){ if(DateUtils.getBeforeNDay(NumConstant.ONE).equals(dimId)){ agencyGroup = factGroupGridDailyDao.selectGroupCountByOrgLevel(ORG_LEVEL_AGENCY,customerId,DateUtils.getBeforeNDay(NumConstant.TWO)); } } + // 网格级别 List gridGroup = factGroupGridDailyDao.selectGroupCountByOrgLevel(ORG_LEVEL_GRID,customerId,dimId); if(CollectionUtils.isEmpty(gridGroup)){ if(DateUtils.getBeforeNDay(NumConstant.ONE).equals(dimId)){ @@ -101,13 +103,14 @@ public class ScreenCentralZoneDataExtractServiceImpl implements ScreenCentralZon groupMap.putAll(gridGroup.stream().collect(Collectors.toMap(ScreenUserTotalDataEntity::getOrgId,ScreenUserTotalDataEntity::getGroupTotal))); - //3.话题 + //3.话题 fact_topic_total_grid_daily或fact_topic_total_agency_daily List agencyTopic = factTopicTotalGridDailyDao.selectTopicCountByOrgLevel(ORG_LEVEL_AGENCY,customerId,dimId); if(CollectionUtils.isEmpty(agencyTopic)){ if(DateUtils.getBeforeNDay(NumConstant.ONE).equals(dimId)){ agencyTopic = factTopicTotalGridDailyDao.selectTopicCountByOrgLevel(ORG_LEVEL_AGENCY,customerId,DateUtils.getBeforeNDay(NumConstant.TWO)); } } + // 网格级别 List gridTopic = factTopicTotalGridDailyDao.selectTopicCountByOrgLevel(ORG_LEVEL_GRID,customerId,dimId); if(CollectionUtils.isEmpty(gridTopic)){ if(DateUtils.getBeforeNDay(NumConstant.ONE).equals(dimId)){ @@ -117,13 +120,14 @@ public class ScreenCentralZoneDataExtractServiceImpl implements ScreenCentralZon Map topicMap = agencyTopic.stream().collect(Collectors.toMap(ScreenUserTotalDataEntity::getOrgId,ScreenUserTotalDataEntity::getTopicTotal)); topicMap.putAll(gridTopic.stream().collect(Collectors.toMap(ScreenUserTotalDataEntity::getOrgId,ScreenUserTotalDataEntity::getTopicTotal))); - //4.议题 + //4.议题 fact_issue_grid_daily 或 fact_issue_agency_daily List agencyIssue = factIssueGridDailyDao.selectIssueCountByOrgLevel(ORG_LEVEL_AGENCY,customerId,dimId); if(CollectionUtils.isEmpty(agencyIssue)){ if(DateUtils.getBeforeNDay(NumConstant.ONE).equals(dimId)){ agencyIssue = factIssueGridDailyDao.selectIssueCountByOrgLevel(ORG_LEVEL_AGENCY,customerId,DateUtils.getBeforeNDay(NumConstant.TWO)); } } + // 网格级别 List gridIssue = factIssueGridDailyDao.selectIssueCountByOrgLevel(ORG_LEVEL_GRID,customerId,dimId); if(CollectionUtils.isEmpty(gridIssue)){ if(DateUtils.getBeforeNDay(NumConstant.ONE).equals(dimId)){ @@ -133,13 +137,14 @@ public class ScreenCentralZoneDataExtractServiceImpl implements ScreenCentralZon Map issueMap = agencyIssue.stream().collect(Collectors.toMap(ScreenUserTotalDataEntity::getOrgId,ScreenUserTotalDataEntity::getIssueTotal)); issueMap.putAll(gridIssue.stream().collect(Collectors.toMap(ScreenUserTotalDataEntity::getOrgId,ScreenUserTotalDataEntity::getIssueTotal))); - //5.项目 + //5.项目 fact_grid_project_daily 或 fact_agency_project_daily List agencyProject = factAgencyProjectDailyDao.selectProjectCountByOrgLevel(ORG_LEVEL_AGENCY,customerId,dimId); if(CollectionUtils.isEmpty(agencyProject)){ if(DateUtils.getBeforeNDay(NumConstant.ONE).equals(dimId)){ agencyProject = factAgencyProjectDailyDao.selectProjectCountByOrgLevel(ORG_LEVEL_AGENCY,customerId,DateUtils.getBeforeNDay(NumConstant.TWO)); } } + // 网格级别 List gridProject = factAgencyProjectDailyDao.selectProjectCountByOrgLevel(ORG_LEVEL_GRID,customerId,dimId); if(CollectionUtils.isEmpty(gridProject)){ if(DateUtils.getBeforeNDay(NumConstant.ONE).equals(dimId)){ From f449c114660ba9acefc3fd11fac8ad8f63e14008 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 22 Mar 2021 14:14:20 +0800 Subject: [PATCH 183/375] =?UTF-8?q?=E6=96=B0=E5=A2=9Efact=5Forigin=5Fproje?= =?UTF-8?q?ct=5Fcategory=5Fdaily?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extract/FactOriginProjectCategoryDailyDao.java} | 6 +++--- .../FactOriginProjectCategoryDailyEntity.java} | 6 +++--- .../FactOriginProjectCategoryDailyService.java} | 8 ++++---- .../todata/impl/FactOriginExtractServiceImpl.java | 7 ++++++- .../FactOriginProjectCategoryDailyServiceImpl.java} | 13 ++++++++----- .../extract/FactOriginProjectCategoryDailyDao.xml} | 2 +- 6 files changed, 25 insertions(+), 17 deletions(-) rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/{stats/FactOrginProjectCategoryDao.java => evaluationindex/extract/FactOriginProjectCategoryDailyDao.java} (79%) rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/{stats/FactOrginProjectCategoryEntity.java => evaluationindex/extract/FactOriginProjectCategoryDailyEntity.java} (89%) rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/{stats/FactOrginProjectCategoryService.java => evaluationindex/extract/todata/FactOriginProjectCategoryDailyService.java} (69%) rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/{stats/impl/FactOrginProjectCategoryServiceImpl.java => evaluationindex/extract/todata/impl/FactOriginProjectCategoryDailyServiceImpl.java} (58%) rename epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/{stats/FactOrginProjectCategoryDao.xml => evaluationindex/extract/FactOriginProjectCategoryDailyDao.xml} (59%) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactOrginProjectCategoryDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectCategoryDailyDao.java similarity index 79% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactOrginProjectCategoryDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectCategoryDailyDao.java index 789dc926bb..ff9f8c1885 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactOrginProjectCategoryDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectCategoryDailyDao.java @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -package com.epmet.dao.stats; +package com.epmet.dao.evaluationindex.extract; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.stats.FactOrginProjectCategoryEntity; +import com.epmet.entity.evaluationindex.extract.FactOriginProjectCategoryDailyEntity; import org.apache.ibatis.annotations.Mapper; /** @@ -28,6 +28,6 @@ import org.apache.ibatis.annotations.Mapper; * @since v1.0.0 2021-03-19 */ @Mapper -public interface FactOrginProjectCategoryDao extends BaseDao { +public interface FactOriginProjectCategoryDailyDao extends BaseDao { } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactOrginProjectCategoryEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactOriginProjectCategoryDailyEntity.java similarity index 89% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactOrginProjectCategoryEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactOriginProjectCategoryDailyEntity.java index 294bdfd92e..4587577a2d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactOrginProjectCategoryEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactOriginProjectCategoryDailyEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.stats; +package com.epmet.entity.evaluationindex.extract; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; @@ -30,8 +30,8 @@ import lombok.EqualsAndHashCode; */ @Data @EqualsAndHashCode(callSuper=false) -@TableName("fact_orgin_project_category") -public class FactOrginProjectCategoryEntity extends BaseEpmetEntity { +@TableName("fact_origin_project_category_daily") +public class FactOriginProjectCategoryDailyEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactOrginProjectCategoryService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectCategoryDailyService.java similarity index 69% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactOrginProjectCategoryService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectCategoryDailyService.java index 1d3a614ead..2eb2de215e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactOrginProjectCategoryService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectCategoryDailyService.java @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -package com.epmet.service.stats; +package com.epmet.service.evaluationindex.extract.todata; import com.epmet.commons.mybatis.service.BaseService; -import com.epmet.entity.stats.FactOrginProjectCategoryEntity; +import com.epmet.entity.evaluationindex.extract.FactOriginProjectCategoryDailyEntity; /** * 项目所属分类表 @@ -26,6 +26,6 @@ import com.epmet.entity.stats.FactOrginProjectCategoryEntity; * @author generator generator@elink-cn.com * @since v1.0.0 2021-03-19 */ -public interface FactOrginProjectCategoryService extends BaseService { - +public interface FactOriginProjectCategoryDailyService extends BaseService { + //todo 将epmet_gov_project库中的项目分类信息(project_category)同步到统计库epmet_data_statistical } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginExtractServiceImpl.java index f44eef01de..67ba0f0c4f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginExtractServiceImpl.java @@ -46,7 +46,8 @@ public class FactOriginExtractServiceImpl implements FactOriginExtractService { private GroupExtractService groupExtractService; @Autowired private DimCustomerPartymemberService dimCustomerPartymemberService; - + @Autowired + private FactOriginProjectCategoryDailyService originProjectCategoryDailyService; @Override public void extractAll(ExtractOriginFormDTO extractOriginFormDTO) { @@ -200,6 +201,8 @@ public class FactOriginExtractServiceImpl implements FactOriginExtractService { } catch (Exception e) { log.error("抽取【项目数据】发生异常,参数:" + JSON.toJSONString(paramNew), e); } + //todo 新增项目分类抽取 shaowen + // originProjectCategoryDailyService.xxxx(); } else { try { for (int i = 0; i < finalDaysBetween.size(); i++) { @@ -219,6 +222,8 @@ public class FactOriginExtractServiceImpl implements FactOriginExtractService { } catch (Exception e) { log.error("抽取【项目数据】发生异常,参数:" + JSON.toJSONString(paramNew), e); } + //todo 新增项目分类抽取 shaowen + // originProjectCategoryDailyService.xxxx(); } }); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactOrginProjectCategoryServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectCategoryDailyServiceImpl.java similarity index 58% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactOrginProjectCategoryServiceImpl.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectCategoryDailyServiceImpl.java index c2190ca008..f9bd902765 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactOrginProjectCategoryServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectCategoryDailyServiceImpl.java @@ -15,12 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.service.stats.impl; +package com.epmet.service.evaluationindex.extract.todata.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; -import com.epmet.dao.stats.FactOrginProjectCategoryDao; -import com.epmet.entity.stats.FactOrginProjectCategoryEntity; -import com.epmet.service.stats.FactOrginProjectCategoryService; +import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.evaluationindex.extract.FactOriginProjectCategoryDailyDao; +import com.epmet.entity.evaluationindex.extract.FactOriginProjectCategoryDailyEntity; +import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectCategoryDailyService; import org.springframework.stereotype.Service; /** @@ -30,6 +32,7 @@ import org.springframework.stereotype.Service; * @since v1.0.0 2021-03-19 */ @Service -public class FactOrginProjectCategoryServiceImpl extends BaseServiceImpl implements FactOrginProjectCategoryService { +@DataSource(DataSourceConstant.STATS) +public class FactOriginProjectCategoryDailyServiceImpl extends BaseServiceImpl implements FactOriginProjectCategoryDailyService { } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactOrginProjectCategoryDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectCategoryDailyDao.xml similarity index 59% rename from epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactOrginProjectCategoryDao.xml rename to epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectCategoryDailyDao.xml index 572c1dc091..56ab802c01 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactOrginProjectCategoryDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectCategoryDailyDao.xml @@ -1,7 +1,7 @@ - + From 7f04bad985089655ac140aa1061aff3b1984d74d Mon Sep 17 00:00:00 2001 From: wxz Date: Mon, 22 Mar 2021 14:58:01 +0800 Subject: [PATCH 184/375] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=201.?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E4=BF=9D=E5=AD=98=E9=80=89=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E7=AC=AC=E4=B8=89=E6=96=B9=E5=88=97=E8=A1=A8=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=E7=9A=84=E6=97=B6=E5=80=99=EF=BC=8C=E4=B8=8D=E5=A4=84=E7=90=86?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SaveOrUpdateCustSelPlatformFormDTO.java | 19 +++++++ .../com/epmet/feign/ThirdOpenFeignClient.java | 3 +- .../ThirdOpenFeignClientFallback.java | 3 +- .../java/com/epmet/apiservice/ApiService.java | 40 ++++---------- .../epmet/apiservice/impl/DemoApiService.java | 10 ++++ .../impl/LuzhouGridPlatformApiService.java | 55 ++++++++++++++++++- .../result/LZGridPlatformBaseResult.java | 11 ++++ .../controller/ThirdPlatformController.java | 7 ++- .../epmet/service/ThirdPlatformService.java | 2 +- .../impl/ThirdPlatformServiceImpl.java | 21 +++---- .../CustomerProjectParameterServiceImpl.java | 10 +++- 11 files changed, 130 insertions(+), 51 deletions(-) create mode 100644 epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/SaveOrUpdateCustSelPlatformFormDTO.java create mode 100644 epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/result/LZGridPlatformBaseResult.java diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/SaveOrUpdateCustSelPlatformFormDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/SaveOrUpdateCustSelPlatformFormDTO.java new file mode 100644 index 0000000000..5ba026cd80 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/SaveOrUpdateCustSelPlatformFormDTO.java @@ -0,0 +1,19 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.util.List; + +@Data +public class SaveOrUpdateCustSelPlatformFormDTO { + + @NotBlank(message = "客户id不能为空") + private String customerId; + + @NotBlank(message = "actionKey不能为空") + private String actionKey; + + private List platforms; + +} diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/ThirdOpenFeignClient.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/ThirdOpenFeignClient.java index de647e726e..4a139daabd 100644 --- a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/ThirdOpenFeignClient.java +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/ThirdOpenFeignClient.java @@ -2,6 +2,7 @@ package com.epmet.feign; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.form.SaveOrUpdateCustSelPlatformFormDTO; import com.epmet.dto.form.ThirdPlatformFormDTO; import com.epmet.dto.result.ThirdplatformResultDTO; import com.epmet.feign.fallback.ThirdOpenFeignClientFallback; @@ -22,7 +23,7 @@ public interface ThirdOpenFeignClient { * @date 2021.03.19 15:25 */ @PostMapping("/third/thirdplatform/customer/saveorupdate-selected-platforms") - Result saveOrUpdateSelectedPlatformsInfo(@RequestBody List input); + Result saveOrUpdateSelectedPlatformsInfo(@RequestBody SaveOrUpdateCustSelPlatformFormDTO input); /** * 根据客户id和动作,列出客户在指定动作下可用的第三方平台 diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/fallback/ThirdOpenFeignClientFallback.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/fallback/ThirdOpenFeignClientFallback.java index 9322354512..57a9c808c3 100644 --- a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/fallback/ThirdOpenFeignClientFallback.java +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/fallback/ThirdOpenFeignClientFallback.java @@ -3,6 +3,7 @@ package com.epmet.feign.fallback; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.form.SaveOrUpdateCustSelPlatformFormDTO; import com.epmet.dto.form.ThirdPlatformFormDTO; import com.epmet.dto.result.ThirdplatformResultDTO; import com.epmet.feign.ThirdOpenFeignClient; @@ -13,7 +14,7 @@ import java.util.List; @Component public class ThirdOpenFeignClientFallback implements ThirdOpenFeignClient { @Override - public Result saveOrUpdateSelectedPlatformsInfo(List input) { + public Result saveOrUpdateSelectedPlatformsInfo(SaveOrUpdateCustSelPlatformFormDTO input) { return ModuleUtils.feignConError(ServiceConstant.EPMET_THIRD_SERVER, "saveOrUpdateSelectedPlatformsInfo", input); } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java index 6debb8dac2..7aff23fd7a 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java @@ -77,6 +77,7 @@ public abstract class ApiService { if (result.success()) { throw new RenException("请求第三方平台,获取AccessToken失败。"); } + judgeResultSuccess(result.getData()); return result.getData(); } @@ -114,42 +115,17 @@ public abstract class ApiService { if (result.success()) { throw new RenException("请求第三方平台,获取AccessToken失败。"); } + judgeResultSuccess(result.getData()); return result.getData(); } /** - * @Description 获取accessToken + * @Description 获取accessToken,由子类具体实现 * @return * @author wxz * @date 2021.03.16 13:45 */ - private String getAccessToken(String platformId) { - RedisTemplate rt = SpringContextUtils.getBean("redisTemplate", RedisTemplate.class); - String token = rt.opsForValue().get(RedisKeys.getThirdPlatformAccessTokenKey(platformId)); - if (StringUtils.isBlank(token)) { - ThirdplatformEntity thirdplatform = SpringContextUtils.getBean(ThirdplatformDao.class).selectById(platformId); - ThirdplatformActionEntity actionEntity = SpringContextUtils.getBean(ThirdplatformActionDao.class) - .getByPlatformIdAndActionKey(platformId, ThirdPlatformActions.GET_ACCESS_TOKEN); - - String baseUrl = thirdplatform.getBaseUrl(); - String platformKey = thirdplatform.getPlatformKey(); - String platformSecret = thirdplatform.getPlatformSecret(); - - HashMap params = new HashMap<>(); - params.put("appKey", platformKey); - params.put("appSecret", platformSecret); - Result result = HttpClientManager.getInstance().sendGet(baseUrl.concat(actionEntity.getApiUrl()), params); - if (result == null) { - throw new RenException("请求第三方平台,获取AccessToken失败。result为null"); - } - if (result.success()) { - throw new RenException("请求第三方平台,获取AccessToken失败。"); - } - token = result.getData(); - rt.opsForValue().set(RedisKeys.getThirdPlatformAccessTokenKey(platformId), token); - } - return token; - } + public abstract String getAccessToken(String platformId); /** * @Description 判断客户是否注册了指定的平台,如果没有注册,则抛出异常 @@ -182,4 +158,12 @@ public abstract class ApiService { public ProjectAssistResult projectAssist(ProjectApplyAssistFormDTO formDTO) { return null; } + + /** + * @Description 判断第三方平台返回结果成功失败。如果失败,则抛出异常 + * @return + * @author wxz + * @date 2021.03.22 10:32 + */ + public abstract void judgeResultSuccess(String stringData); } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/DemoApiService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/DemoApiService.java index 94c3127d00..1a1e00cd4e 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/DemoApiService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/DemoApiService.java @@ -20,9 +20,19 @@ public class DemoApiService extends ApiService { @Autowired private OperCrmOpenFeignClient operCrmOpenFeignClient; + @Override + public String getAccessToken(String platformId) { + return null; + } + @Override public ProjectAssistResult projectAssist(ProjectApplyAssistFormDTO formDTO) { logger.info("DemoApiService发送项目协助到第三方平台成功"); return null; } + + @Override + public void judgeResultSuccess(String stringData) { + + } } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java index d4c062bb09..026b40654d 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java @@ -2,24 +2,68 @@ package com.epmet.apiservice.impl; import com.alibaba.fastjson.JSON; import com.epmet.apiservice.ApiService; +import com.epmet.apiservice.result.LZGridPlatformBaseResult; import com.epmet.apiservice.result.LZGridPlatformProjectAssistResult; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.redis.RedisKeys; +import com.epmet.commons.tools.utils.HttpClientManager; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.utils.SpringContextUtils; +import com.epmet.constant.ThirdPlatformActions; +import com.epmet.dao.ThirdplatformActionDao; +import com.epmet.dao.ThirdplatformDao; import com.epmet.dto.result.ProjectAssistResult; import com.epmet.dto.form.ProjectApplyAssistFormDTO; +import com.epmet.entity.ThirdplatformActionEntity; +import com.epmet.entity.ThirdplatformEntity; import org.apache.commons.lang3.StringUtils; +import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Component; +import java.util.HashMap; + /** * 泸州网格化平台ApiService */ @Component("luzhouGridPlatformApiService") public class LuzhouGridPlatformApiService extends ApiService { + @Override + public String getAccessToken(String platformId) { + RedisTemplate rt = SpringContextUtils.getBean("redisTemplate", RedisTemplate.class); + String token = rt.opsForValue().get(RedisKeys.getThirdPlatformAccessTokenKey(platformId)); + if (StringUtils.isBlank(token)) { + ThirdplatformEntity thirdplatform = SpringContextUtils.getBean(ThirdplatformDao.class).selectById(platformId); + ThirdplatformActionEntity actionEntity = SpringContextUtils.getBean(ThirdplatformActionDao.class) + .getByPlatformIdAndActionKey(platformId, ThirdPlatformActions.GET_ACCESS_TOKEN); + + String baseUrl = thirdplatform.getBaseUrl(); + String platformKey = thirdplatform.getPlatformKey(); + String platformSecret = thirdplatform.getPlatformSecret(); + + HashMap params = new HashMap<>(); + params.put("appKey", platformKey); + params.put("appSecret", platformSecret); + Result result = HttpClientManager.getInstance().sendGet(baseUrl.concat(actionEntity.getApiUrl()), params); + if (result == null) { + throw new RenException("请求第三方平台,获取AccessToken失败。result为null"); + } + if (!result.success()) { + throw new RenException("请求第三方平台,获取AccessToken失败。"); + } + judgeResultSuccess(result.getData()); + token = result.getData(); + rt.opsForValue().set(RedisKeys.getThirdPlatformAccessTokenKey(platformId), token); + } + return token; + } + @Override public ProjectAssistResult projectAssist(ProjectApplyAssistFormDTO formDTO) { String platformId = formDTO.getPlatformId(); // 正式调用第三方平台 - //String result = sendPostRequest(platformId, ThirdPlatformActions.PROJECT_ASSIST, "{}", null); + //String result1 = sendPostRequest(platformId, ThirdPlatformActions.PROJECT_ASSIST, "{}", null); // 开发阶段临时写死 String result = "{\"eventId\":\"test-task-id\"}"; @@ -36,4 +80,13 @@ public class LuzhouGridPlatformApiService extends ApiService { System.out.println("泸州网格化平台项目协助发送成功"); return projectAssistResult; } + + @Override + public void judgeResultSuccess(String stringData) { + //LZGridPlatformBaseResult; + LZGridPlatformBaseResult result = JSON.parseObject(stringData, LZGridPlatformBaseResult.class); + if (!"200".equalsIgnoreCase(result.getCode())) { + throw new RenException("泸州网格化平台:返回失败结果,错误码:" + result.getCode()); + } + } } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/result/LZGridPlatformBaseResult.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/result/LZGridPlatformBaseResult.java new file mode 100644 index 0000000000..c0f4ed190a --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/result/LZGridPlatformBaseResult.java @@ -0,0 +1,11 @@ +package com.epmet.apiservice.result; + +import lombok.Data; + +@Data +public class LZGridPlatformBaseResult { + private Boolean success; + private String code; + private R result; + // 有其他内容可直接写上 +} diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ThirdPlatformController.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ThirdPlatformController.java index 9288625bee..f0bdb4d5ab 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ThirdPlatformController.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ThirdPlatformController.java @@ -2,6 +2,7 @@ package com.epmet.controller; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.dto.form.SaveOrUpdateCustSelPlatformFormDTO; import com.epmet.dto.form.ThirdPlatformFormDTO; import com.epmet.dto.result.ThirdplatformResultDTO; import com.epmet.service.ThirdPlatformService; @@ -83,9 +84,9 @@ public class ThirdPlatformController { * @date 2021.03.19 15:25 */ @PostMapping("customer/saveorupdate-selected-platforms") - public Result saveOrUpdateSelectedPlatformsInfo(@RequestBody List input) { - input.stream().forEach(i -> ValidatorUtils.validateEntity(i, ThirdPlatformFormDTO.SaveOrUpdateSelectedPlatformInfo.class)); - thirdPlatformService.saveOrUpdateSelectedPlatformInfo(input); + public Result saveOrUpdateSelectedPlatformsInfo(@RequestBody SaveOrUpdateCustSelPlatformFormDTO input) { + ValidatorUtils.validateEntity(input); + thirdPlatformService.saveOrUpdateSelectedPlatformInfo(input.getCustomerId(), input.getActionKey(), input.getPlatforms()); return new Result(); } } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ThirdPlatformService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ThirdPlatformService.java index add4c63a2a..9a0042f6e7 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ThirdPlatformService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ThirdPlatformService.java @@ -21,5 +21,5 @@ public interface ThirdPlatformService { void updateCustomizePlatformInfo(ThirdPlatformFormDTO input); - void saveOrUpdateSelectedPlatformInfo(List platforms); + void saveOrUpdateSelectedPlatformInfo(String customerId, String actionKey, List platforms); } \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ThirdPlatformServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ThirdPlatformServiceImpl.java index 39d3e33cae..7e92c34223 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ThirdPlatformServiceImpl.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ThirdPlatformServiceImpl.java @@ -70,26 +70,19 @@ public class ThirdPlatformServiceImpl implements ThirdPlatformService { @Transactional(rollbackFor = Exception.class) @Override - public void saveOrUpdateSelectedPlatformInfo(List platforms) { - if (CollectionUtils.isEmpty(platforms)) { - return; - } - + public void saveOrUpdateSelectedPlatformInfo(String customerId, String actionKey, List platforms) { // 1.物理删除客户-action所有对应关系 - int deletedCount = thirdplatformCustomerActionDao.deleteByCustomerIdAndActionKey(platforms.get(0).getCustomerId(), platforms.get(0).getActionKey()); + thirdplatformCustomerActionDao.deleteByCustomerIdAndActionKey(customerId, actionKey); platforms.stream().forEach(pt -> { - String customerId = pt.getCustomerId(); - String platformId = pt.getPlatformId(); - // 2.更新用户自定义的平台信息 - updateThirdPlatformCustomerRegInfo(pt); + updateThirdPlatformCustomerRegInfo(customerId, pt); // 3.重新建立customer-platform-action对应关系 ThirdplatformCustomerActionEntity tpcaEntity = new ThirdplatformCustomerActionEntity(); - tpcaEntity.setPlatformId(platformId); + tpcaEntity.setPlatformId(pt.getPlatformId()); tpcaEntity.setCustomerId(customerId); - tpcaEntity.setActionKey(pt.getActionKey()); + tpcaEntity.setActionKey(actionKey); thirdplatformCustomerActionDao.insert(tpcaEntity); }); @@ -101,10 +94,10 @@ public class ThirdPlatformServiceImpl implements ThirdPlatformService { * @author wxz * @date 2021.03.19 15:22 */ - private void updateThirdPlatformCustomerRegInfo(ThirdPlatformFormDTO platformFormDTO) { + private void updateThirdPlatformCustomerRegInfo(String customerId, ThirdPlatformFormDTO platformFormDTO) { LambdaQueryWrapper conditions = new QueryWrapper() .lambda() - .eq(ThirdplatformCustomerRegisterEntity::getCustomerId, platformFormDTO.getCustomerId()) + .eq(ThirdplatformCustomerRegisterEntity::getCustomerId, customerId) .eq(ThirdplatformCustomerRegisterEntity::getPlatformId, platformFormDTO.getPlatformId()); ThirdplatformCustomerRegisterEntity entity = new ThirdplatformCustomerRegisterEntity(); diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/CustomerProjectParameterServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/CustomerProjectParameterServiceImpl.java index 3595f23a94..6142562041 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/CustomerProjectParameterServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/CustomerProjectParameterServiceImpl.java @@ -31,6 +31,7 @@ import com.epmet.constant.ThirdPlatformActions; import com.epmet.dao.CustomerProjectParameterDao; import com.epmet.dto.CustomerProjectParameterDTO; import com.epmet.dto.form.ParameterFormDTO; +import com.epmet.dto.form.SaveOrUpdateCustSelPlatformFormDTO; import com.epmet.dto.form.ThirdPlatformConfigFormDTO; import com.epmet.dto.form.ThirdPlatformFormDTO; import com.epmet.dto.result.ParameterResultDTO; @@ -327,7 +328,7 @@ public class CustomerProjectParameterServiceImpl extends BaseServiceImpl formDTOS = platformList.stream().map(p -> { + List platforms = platformList.stream().map(p -> { ThirdPlatformFormDTO thirdPlatformFormDTO = new ThirdPlatformFormDTO(); thirdPlatformFormDTO.setActionKey(ThirdPlatformActions.PROJECT_ASSIST); thirdPlatformFormDTO.setCustomerId(customerId); @@ -336,7 +337,12 @@ public class CustomerProjectParameterServiceImpl extends BaseServiceImpl Date: Mon, 22 Mar 2021 15:41:26 +0800 Subject: [PATCH 185/375] =?UTF-8?q?=E5=A2=9E=E5=8A=A0level?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/ScreenProjectCategoryGridDailyDTO.java | 5 +++++ .../java/com/epmet/dto/ScreenProjectCategoryOrgDailyDTO.java | 5 +++++ .../epmet/dto/screen/ScreenProjectCategoryGridDailyDTO.java | 5 +++++ .../epmet/dto/screen/ScreenProjectCategoryOrgDailyDTO.java | 5 +++++ .../screen/ScreenProjectCategoryGridDailyEntity.java | 4 ++++ .../screen/ScreenProjectCategoryOrgDailyEntity.java | 4 ++++ 6 files changed, 28 insertions(+) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenProjectCategoryGridDailyDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenProjectCategoryGridDailyDTO.java index 166be073a1..0a015c6762 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenProjectCategoryGridDailyDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenProjectCategoryGridDailyDTO.java @@ -73,6 +73,11 @@ public class ScreenProjectCategoryGridDailyDTO implements Serializable { */ private Integer projectTotal; + /** + * 分类等级1、2.... + */ + private Integer level; + /** * 删除标识 */ diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenProjectCategoryOrgDailyDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenProjectCategoryOrgDailyDTO.java index 0404581cf7..95d65184a8 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenProjectCategoryOrgDailyDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/ScreenProjectCategoryOrgDailyDTO.java @@ -78,6 +78,11 @@ public class ScreenProjectCategoryOrgDailyDTO implements Serializable { */ private Integer projectTotal; + /** + * 分类等级1、2.... + */ + private Integer level; + /** * 删除标识 */ diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectCategoryGridDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectCategoryGridDailyDTO.java index 582fc6d842..0406fb26f2 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectCategoryGridDailyDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectCategoryGridDailyDTO.java @@ -73,6 +73,11 @@ public class ScreenProjectCategoryGridDailyDTO implements Serializable { */ private Integer projectTotal; + /** + * 分类等级1、2.... + */ + private Integer level; + /** * 删除标识 */ diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectCategoryOrgDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectCategoryOrgDailyDTO.java index ed598e903f..117db2716c 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectCategoryOrgDailyDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectCategoryOrgDailyDTO.java @@ -78,6 +78,11 @@ public class ScreenProjectCategoryOrgDailyDTO implements Serializable { */ private Integer projectTotal; + /** + * 分类等级1、2.... + */ + private Integer level; + /** * 删除标识 */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectCategoryGridDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectCategoryGridDailyEntity.java index 5d40a12628..82b03555ac 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectCategoryGridDailyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectCategoryGridDailyEntity.java @@ -70,4 +70,8 @@ public class ScreenProjectCategoryGridDailyEntity extends BaseEpmetEntity { */ private Integer projectTotal; + /** + * 分类等级1、2.... + */ + private Integer level; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectCategoryOrgDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectCategoryOrgDailyEntity.java index 7c61d7069d..5c097997a6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectCategoryOrgDailyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenProjectCategoryOrgDailyEntity.java @@ -75,4 +75,8 @@ public class ScreenProjectCategoryOrgDailyEntity extends BaseEpmetEntity { */ private Integer projectTotal; + /** + * 分类等级1、2.... + */ + private Integer level; } From c548c5b4defc63a15094b870e6d0ab24e5388b72 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Mon, 22 Mar 2021 15:45:26 +0800 Subject: [PATCH 186/375] =?UTF-8?q?=E3=80=8A002=E3=80=81=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E5=AD=97=E5=85=B8=E6=9F=A5=E8=AF=A2=E3=80=8B?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../project/dto/CustomerCategoryDTO.java | 43 +++++++++++++++ .../result/ProjectCategoryDictResultDTO.java | 41 ++++++++++++++ .../data-report/data-report-server/pom.xml | 6 +++ .../controller/project/ProjectController.java | 14 +++++ .../service/project/ProjectService.java | 10 ++++ .../project/impl/ProjectServiceImpl.java | 54 +++++++++++++++++-- .../gov-issue/gov-issue-client/pom.xml | 8 ++- .../epmet/feign/GovIssueOpenFeignClient.java | 16 ++++-- .../GovIssueOpenFeignClientFallBack.java | 10 ++-- .../gov-issue/gov-issue-server/pom.xml | 8 ++- .../IssueProjectCategoryDictController.java | 19 ++++++- .../dao/IssueProjectCategoryDictDao.java | 16 +++++- .../IssueProjectCategoryDictService.java | 16 +++++- .../IssueProjectCategoryDictServiceImpl.java | 7 ++- .../mapper/IssueProjectCategoryDictDao.xml | 19 ++++++- .../epmet/feign/OperCrmOpenFeignClient.java | 11 ++++ .../OperCrmOpenFeignClientFallback.java | 5 ++ .../epmet/controller/CustomerController.java | 17 ++++++ .../main/java/com/epmet/dao/CustomerDao.java | 11 +++- .../com/epmet/service/CustomerService.java | 10 ++++ .../service/impl/CustomerServiceImpl.java | 4 ++ .../src/main/resources/mapper/CustomerDao.xml | 10 ++++ 22 files changed, 336 insertions(+), 19 deletions(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/CustomerCategoryDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectCategoryDictResultDTO.java diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/CustomerCategoryDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/CustomerCategoryDTO.java new file mode 100644 index 0000000000..d351ae7346 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/CustomerCategoryDTO.java @@ -0,0 +1,43 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.project.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +@Data +public class CustomerCategoryDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 父id + * pid = 0 查询一级分类 + * pid != 0 查询二级分类 + */ + private String pid; + + /** + * 客户Id + */ + private String customerId; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectCategoryDictResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectCategoryDictResultDTO.java new file mode 100644 index 0000000000..ca534db2a9 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectCategoryDictResultDTO.java @@ -0,0 +1,41 @@ +package com.epmet.project.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author zhangyong + * @Description 002、项目分类字典查询 + **/ +@Data +public class ProjectCategoryDictResultDTO implements Serializable { + + private static final long serialVersionUID = 8529179932504931368L; + + /** + * 一级分类编码 + */ + private String categoryCode; + + /** + * 一级分类名称 + */ + private String categoryName; + + /** + * 二级分类列表 + */ + private List children; + + /** + * 主键 + **/ + private String id; + + /** + * 上级分类ID 顶级此列存储0 + **/ + private String pid; +} diff --git a/epmet-module/data-report/data-report-server/pom.xml b/epmet-module/data-report/data-report-server/pom.xml index 8cb39e2c6b..4480ac88e7 100644 --- a/epmet-module/data-report/data-report-server/pom.xml +++ b/epmet-module/data-report/data-report-server/pom.xml @@ -94,6 +94,12 @@ 2.0.0 compile + + com.epmet + gov-issue-client + 2.0.0 + compile + diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java index ed31aef27a..2bb49d5c25 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java @@ -129,4 +129,18 @@ public class ProjectController { public Result> myNextAgency(@LoginUser TokenDto tokenDto){ return new Result>().ok(projectService.getMyNextAgency(tokenDto)); } + + /** + * 002、项目分类字典查询 + * 查询当前客户的父客户下,项目分类字典 + * + * @param tokenDto + * @return com.epmet.commons.tools.utils.Result> + * @Author zhangyong + * @Date 10:41 2021-03-22 + **/ + @PostMapping("categorydict") + public Result> categoryDict(@LoginUser TokenDto tokenDto) { + return new Result>().ok(projectService.getCategoryDict(tokenDto)); + } } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/ProjectService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/ProjectService.java index 18246addc6..bb2ffedd9c 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/ProjectService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/ProjectService.java @@ -70,4 +70,14 @@ public interface ProjectService { * @date 2020.10.19 16:38 **/ List getMyNextAgency(TokenDto tokenDto); + + /** + * 002、项目分类字典查询 + * + * @param tokenDto + * @return java.util.List + * @Author zhangyong + * @Date 14:26 2021-03-22 + **/ + List getCategoryDict(TokenDto tokenDto); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java index f095fb0666..4da82573c9 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java @@ -3,6 +3,7 @@ package com.epmet.datareport.service.project.impl; import com.alibaba.fastjson.JSON; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; @@ -18,20 +19,21 @@ import com.epmet.dto.form.ProcessListFormDTO; import com.epmet.dto.form.SubAgencyFormDTO; import com.epmet.dto.result.*; import com.epmet.evaluationindex.screen.dto.result.DepartmentNameListResultDTO; -import com.epmet.feign.EpmetUserOpenFeignClient; -import com.epmet.feign.GovOrgOpenFeignClient; -import com.epmet.feign.GovProjectOpenFeignClient; +import com.epmet.feign.*; import com.epmet.project.constant.ProjectConstant; +import com.epmet.project.dto.CustomerCategoryDTO; import com.epmet.project.dto.FactAgencyProjectDailyDTO; import com.epmet.project.dto.form.DifficultyRankFormDTO; import com.epmet.project.dto.form.ProjectIncrTrendFormDTO; -import com.epmet.project.dto.result.ProjectDetailResultDTO; import com.epmet.project.dto.result.*; +import com.epmet.project.dto.result.ProjectDetailResultDTO; import com.epmet.resi.group.dto.topic.ResiTopicDTO; import com.epmet.resi.group.feign.ResiGroupOpenFeignClient; import com.github.pagehelper.PageHelper; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -50,7 +52,7 @@ import java.util.List; @Slf4j @Service public class ProjectServiceImpl implements ProjectService { - + private Logger logger = LogManager.getLogger(getClass()); @Autowired private ProjectDao projectDao; @Autowired @@ -64,6 +66,11 @@ public class ProjectServiceImpl implements ProjectService { private GovOrgOpenFeignClient govOrgOpenFeignClient; @Autowired private ResiGroupOpenFeignClient resiGroupOpenFeignClient; + @Autowired + private GovIssueOpenFeignClient govIssueOpenFeignClient; + @Autowired + private OperCrmOpenFeignClient operCrmOpenFeignClient; + /** * @Author sun * @Description 数据-项目-获取汇总数据 @@ -350,4 +357,41 @@ public class ProjectServiceImpl implements ProjectService { return result; } + @Override + public List getCategoryDict(TokenDto tokenDto) { + List result = new ArrayList<>(); + Result parentCustomerId = operCrmOpenFeignClient.getExternalAndParentCustomerId(tokenDto.getCustomerId()); + if (!parentCustomerId.success() && null == parentCustomerId.getData()) { + logger.warn(String.format("调用%s服务查询外部客户的 父级客户ID 失败,入参%s", ServiceConstant.OPER_CRM_SERVER, + JSON.toJSONString(tokenDto.getCustomerId()))); + return result; + } + CustomerCategoryDTO argDto = new CustomerCategoryDTO(); + argDto.setCustomerId(parentCustomerId.getData()); + argDto.setPid(NumConstant.ZERO_STR); + // 获取客户一级分类 + Result> parentCategoryDict = govIssueOpenFeignClient.getCustomerCategoryDict(argDto); + if (!parentCategoryDict.success()) { + logger.warn(String.format("调用%s服务查询当前客户的父客户下,项目分类字典失败,入参%s", ServiceConstant.GOV_ISSUE_SERVER, + JSON.toJSONString(tokenDto.getCustomerId()))); + } else { + result = parentCategoryDict.getData(); + // 获取客户二级分类 + argDto.setPid(NumConstant.TWO_STR); + Result> childrenCategoryDict = govIssueOpenFeignClient.getCustomerCategoryDict(argDto); + for (ProjectCategoryDictResultDTO p : result) { + List children = new ArrayList<>(); + for (ProjectCategoryDictResultDTO c : childrenCategoryDict.getData()) { + if (p.getId().equals(c.getPid())) { + ProjectCategoryDictResultDTO dto = new ProjectCategoryDictResultDTO(); + dto.setCategoryCode(c.getCategoryCode()); + dto.setCategoryName(c.getCategoryName()); + children.add(dto); + } + } + p.setChildren(children); + } + } + return result; + } } diff --git a/epmet-module/gov-issue/gov-issue-client/pom.xml b/epmet-module/gov-issue/gov-issue-client/pom.xml index f77ec89656..9d07717da1 100644 --- a/epmet-module/gov-issue/gov-issue-client/pom.xml +++ b/epmet-module/gov-issue/gov-issue-client/pom.xml @@ -29,5 +29,11 @@ 2.0.0 compile + + com.epmet + data-report-client + 2.0.0 + compile + - \ No newline at end of file + diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java index 38bc581f8c..277239669d 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java @@ -2,13 +2,12 @@ package com.epmet.feign; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.Result; -import com.epmet.dto.IssueApplicationDTO; -import com.epmet.dto.IssueDTO; -import com.epmet.dto.IssueSuggestionDTO; import com.epmet.dto.*; import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.feign.fallback.GovIssueOpenFeignClientFallBack; +import com.epmet.project.dto.CustomerCategoryDTO; +import com.epmet.project.dto.result.ProjectCategoryDictResultDTO; import com.epmet.resi.group.dto.group.form.AllIssueFormDTO; import com.epmet.resi.group.dto.group.form.ApplicationDetailFormDTO; import com.epmet.resi.group.dto.group.form.ApplicationHistoryFormDTO; @@ -272,4 +271,15 @@ public interface GovIssueOpenFeignClient { @PostMapping("/gov/issue/issue/detail") Result queryIssueDetail(@RequestBody IssueDetailFormDTO formDTO); + + /** + * 获取客户 分类字典 信息 + * + * @param dto + * @return com.epmet.commons.tools.utils.Result> + * @Author zhangyong + * @Date 14:10 2021-03-22 + **/ + @PostMapping(value = "/gov/issue/issueprojectcategorydict/getcustomercategorydict") + Result> getCustomerCategoryDict(@RequestBody CustomerCategoryDTO dto); } diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java index 0046975f18..a304db1fa7 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java @@ -3,13 +3,12 @@ package com.epmet.feign.fallback; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.Result; -import com.epmet.dto.IssueApplicationDTO; -import com.epmet.dto.IssueDTO; -import com.epmet.dto.IssueSuggestionDTO; import com.epmet.dto.*; import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.feign.GovIssueOpenFeignClient; +import com.epmet.project.dto.CustomerCategoryDTO; +import com.epmet.project.dto.result.ProjectCategoryDictResultDTO; import com.epmet.resi.group.dto.group.form.AllIssueFormDTO; import com.epmet.resi.group.dto.group.form.ApplicationDetailFormDTO; import com.epmet.resi.group.dto.group.form.ApplicationHistoryFormDTO; @@ -237,4 +236,9 @@ public class GovIssueOpenFeignClientFallBack implements GovIssueOpenFeignClient public Result queryIssueDetail(IssueDetailFormDTO formDTO) { return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "detail", formDTO); } + + @Override + public Result> getCustomerCategoryDict(CustomerCategoryDTO customerCategoryDTO) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "getCustomerCategoryDict", customerCategoryDTO); + } } diff --git a/epmet-module/gov-issue/gov-issue-server/pom.xml b/epmet-module/gov-issue/gov-issue-server/pom.xml index 68e7b17d5b..673a33aeb9 100644 --- a/epmet-module/gov-issue/gov-issue-server/pom.xml +++ b/epmet-module/gov-issue/gov-issue-server/pom.xml @@ -96,6 +96,12 @@ 2.0.0 compile + + com.epmet + data-report-client + 2.0.0 + compile + @@ -270,4 +276,4 @@ - \ No newline at end of file + diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java index b0d5a7fd1f..cbd7c63190 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java @@ -34,6 +34,8 @@ import com.epmet.dto.form.ProjectSaveCategoryFormDTO; import com.epmet.dto.result.CustomerCategoryListResultDTO; import com.epmet.dto.result.ProjectIssueCategoryResultDTO; import com.epmet.excel.IssueProjectCategoryDictExcel; +import com.epmet.project.dto.CustomerCategoryDTO; +import com.epmet.project.dto.result.ProjectCategoryDictResultDTO; import com.epmet.service.IssueProjectCategoryDictService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -166,4 +168,19 @@ public class IssueProjectCategoryDictController { return new Result().ok(issueProjectCategoryDictService.delCategory(formDTO)); } -} \ No newline at end of file + /** + * 获取客户 分类字典 信息 + * + * @param dto + * pid = 0 查询一级分类 + * pid != 0 查询二级分类 + * @return com.epmet.commons.tools.utils.Result> + * @Author zhangyong + * @Date 14:10 2021-03-22 + **/ + @PostMapping("getcustomercategorydict") + public Result> getCustomerCategoryDict(@RequestBody CustomerCategoryDTO dto){ + return new Result>().ok(issueProjectCategoryDictService.listCategoryDict(dto.getCustomerId(), + dto.getPid())); + } +} diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java index 770c10cb99..1524bc1fc0 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java @@ -22,6 +22,7 @@ import com.epmet.dto.IssueProjectCategoryDictDTO; import com.epmet.dto.form.IssueProjectCategoryDictListFormDTO; import com.epmet.dto.result.CustomerCategoryListResultDTO; import com.epmet.entity.IssueProjectCategoryDictEntity; +import com.epmet.project.dto.result.ProjectCategoryDictResultDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -73,4 +74,17 @@ public interface IssueProjectCategoryDictDao extends BaseDao + * @Author zhangyong + * @Date 14:10 2021-03-22 + **/ + List selectListCategoryDict(@Param("customerId") String customerId, @Param("pid") String pid); +} diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java index 9de4150e08..24e824ffff 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java @@ -26,6 +26,7 @@ import com.epmet.dto.form.ProjectSaveCategoryFormDTO; import com.epmet.dto.result.CustomerCategoryListResultDTO; import com.epmet.dto.result.ProjectIssueCategoryResultDTO; import com.epmet.entity.IssueProjectCategoryDictEntity; +import com.epmet.project.dto.result.ProjectCategoryDictResultDTO; import java.util.List; import java.util.Map; @@ -142,4 +143,17 @@ public interface IssueProjectCategoryDictService extends BaseService + * @Author zhangyong + * @Date 14:10 2021-03-22 + **/ + List listCategoryDict(String customerId, String pid); +} diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java index c77651b103..c154a5f7e2 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java @@ -38,6 +38,7 @@ import com.epmet.dto.result.ProjectIssueCategoryResultDTO; import com.epmet.dto.result.ProjectIssueDTOResultDTO; import com.epmet.entity.IssueProjectCategoryDictEntity; import com.epmet.entity.IssueProjectTagDictEntity; +import com.epmet.project.dto.result.ProjectCategoryDictResultDTO; import com.epmet.redis.IssueProjectCategoryDictRedis; import com.epmet.service.IssueProjectCategoryDictService; import com.epmet.service.IssueProjectTagDictService; @@ -221,4 +222,8 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl listCategoryDict(String customerId, String pid) { + return baseDao.selectListCategoryDict(customerId, pid); + } +} diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml index 096d54422a..5054069566 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml @@ -96,4 +96,21 @@ LIMIT 1 - \ No newline at end of file + + + diff --git a/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/OperCrmOpenFeignClient.java b/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/OperCrmOpenFeignClient.java index 0f4313dfad..04508ac6df 100644 --- a/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/OperCrmOpenFeignClient.java +++ b/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/OperCrmOpenFeignClient.java @@ -122,4 +122,15 @@ public interface OperCrmOpenFeignClient { **/ @GetMapping("/oper/crm/customer/getallsubcustomerids/{customerId}") Result> getAllSubCustomerIds(@PathVariable("customerId") String customerId); + + /** + * 获取外部客户,的父级 客户id + * + * @param customerId + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 14:57 2021-03-22 + **/ + @GetMapping("/oper/crm/customer/getexternalandparentcustomerid/{customerId}") + Result getExternalAndParentCustomerId(@PathVariable("customerId") String customerId); } diff --git a/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/fallback/OperCrmOpenFeignClientFallback.java b/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/fallback/OperCrmOpenFeignClientFallback.java index 5de09ce167..b718517d4b 100644 --- a/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/fallback/OperCrmOpenFeignClientFallback.java +++ b/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/fallback/OperCrmOpenFeignClientFallback.java @@ -95,4 +95,9 @@ public class OperCrmOpenFeignClientFallback implements OperCrmOpenFeignClient { public Result> getAllSubCustomerIds(String customerId) { return ModuleUtils.feignConError(ServiceConstant.OPER_CRM_SERVER, "getAllSubCustomerIds", customerId); } + + @Override + public Result getExternalAndParentCustomerId(String customerId) { + return ModuleUtils.feignConError(ServiceConstant.OPER_CRM_SERVER, "getExternalAndParentCustomerId", customerId); + } } diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java index c5330a9abd..30fe309079 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java @@ -376,4 +376,21 @@ public class CustomerController { } return new Result<>(); } + + /** + * 获取外部客户,的父级 客户id + * + * @param customerId + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 14:57 2021-03-22 + **/ + @GetMapping("getexternalandparentcustomerid/{customerId}") + public Result getExternalAndParentCustomerId(@PathVariable("customerId") String customerId){ + if(StringUtils.isNotBlank(customerId)){ + String resultDTO = customerService.getExternalAndParentCustomerId(customerId); + return new Result().ok(resultDTO); + } + return new Result<>(); + } } diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/dao/CustomerDao.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/dao/CustomerDao.java index b7aed8f55a..02ae9d9890 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/dao/CustomerDao.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/dao/CustomerDao.java @@ -48,7 +48,7 @@ public interface CustomerDao extends BaseDao { * @param customerIdList * @Author yinzuomei * @Description 根据客户id查询客户信息 - * @Date 2020/4/24 9:21 + * @Date 2020/4/24 9:21 **/ List selectListByIds(@Param("customerIdList") List customerIdList); @@ -98,4 +98,13 @@ public interface CustomerDao extends BaseDao { */ List selectAllCustomerList(@Param("customerName") String customerName); + /** + * 获取外部客户,的父级 客户id + * + * @param customerId + * @return java.lang.String + * @Author zhangyong + * @Date 14:57 2021-03-22 + **/ + String getExternalAndParentCustomerId(@Param("customerId") String customerId); } diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerService.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerService.java index 82e872e511..f1efa2d087 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerService.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerService.java @@ -226,4 +226,14 @@ public interface CustomerService extends BaseService { * @Date 2021/2/3 12:52 **/ CustomerRelationInfoResultDTO queryCustomerInfoByCustomerId(String customerId); + + /** + * 获取外部客户,的父级 客户id + * + * @param customerId + * @return java.lang.String + * @Author zhangyong + * @Date 14:57 2021-03-22 + **/ + String getExternalAndParentCustomerId(String customerId); } diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java index 1fadbd8443..c2677c0504 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java @@ -785,4 +785,8 @@ public class CustomerServiceImpl extends BaseServiceImpl + + From f04ac459e287fb96f140d91dfccd9b2f727a94f2 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Mon, 22 Mar 2021 16:12:33 +0800 Subject: [PATCH 187/375] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=8F=91=E9=80=81?= =?UTF-8?q?=E5=88=B0=E7=AC=AC=E4=B8=89=E6=96=B9=E5=B9=B3=E5=8F=B0=20sql?= =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V0.0.7__platform.sql | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.7__platform.sql diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.7__platform.sql b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.7__platform.sql new file mode 100644 index 0000000000..e4b723ea22 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.7__platform.sql @@ -0,0 +1,50 @@ +CREATE TABLE `project_sub_process` ( + `ID` varchar(64) NOT NULL COMMENT '唯一标识', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', + `PROJECT_ID` varchar(64) NOT NULL COMMENT '项目ID', + `PROCESS_ID` varchar(64) NOT NULL COMMENT '节点ID', + `PROJECT_STAFF_ID` varchar(64) NOT NULL COMMENT '项目人员关联表ID:project_staff.id', + `PLATFORM_ID` varchar(64) NOT NULL COMMENT '系统ID', + `PLATFORM_NAME` varchar(32) NOT NULL COMMENT '系统名', + `TASK_ID` varchar(32) NOT NULL COMMENT '第三方平台返回的项目关联ID(事件Id)', + `RESULT` varchar(1024) DEFAULT NULL COMMENT '事件处理详细内容', + `EXTERNAL_STATUS` varchar(16) DEFAULT NULL COMMENT '外部状态:1待处理,2待核实,3已上报,4已完结,5处理中,6待分发,7归档,8催办,9超时', + `EXTERNAL_STATUS_DESC` varchar(32) DEFAULT NULL COMMENT '外部状态描述', + `INTERNAL_STATUS` varchar(16) DEFAULT NULL COMMENT '内部状态:待处理 pending,结案closed', + `HANDLE_DATE` datetime DEFAULT NULL COMMENT '处理日期', + `HANDLE_USER_NAME` varchar(32) DEFAULT NULL COMMENT '处理人姓名', + `DEL_FLAG` int(1) NOT NULL COMMENT '删除标识 0.未删除 1.已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='节点事件关联表 '; + +CREATE TABLE `project_sub_attachment` ( + `ID` varchar(64) NOT NULL COMMENT '唯一标识', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', + `PROJECT_ID` varchar(64) NOT NULL COMMENT '项目ID', + `SUB_ID` varchar(64) NOT NULL COMMENT '子节点ID,project_sub_process.id', + `TASK_ID` varchar(64) NOT NULL COMMENT '第三方平台返回的项目关联ID(事件Id)', + `ATTACHMENT_NAME` varchar(128) DEFAULT NULL COMMENT '附件名', + `ATTACHMENT_SIZE` int(11) DEFAULT NULL COMMENT '文件大小 单位b', + `ATTACHMENT_FORMAT` varchar(32) DEFAULT NULL COMMENT '文件格式', + `ATTACHMENT_TYPE` varchar(32) DEFAULT NULL COMMENT '类型', + `ATTACHMENT_URL` varchar(256) DEFAULT NULL COMMENT '附件地址', + `DURATION` int(11) DEFAULT NULL COMMENT '语音或视频时长,秒', + `SORT` int(11) NOT NULL COMMENT '排序', + `DEL_FLAG` int(1) NOT NULL COMMENT '删除标识 0.未删除 1.已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='外部系统事件附件 '; + +ALTER TABLE `project_process` + ADD COLUMN `IS_SEND` int(1) NOT NULL DEFAULT 0 COMMENT '是否发送到外部系统 0否 1是' AFTER `END_TIME`; + +INSERT INTO `customer_project_parameter`(`ID`, `CUSTOMER_ID`, `PARAMETER_KEY`, `PARAMETER_NAME`, `PARAMETER_VALUE`, `DESCRIPTION`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1006', 'default', 'third_platform_project_send', '发送外部系统项目协助开关', '0', '0:关(默认) 1:开 ', '0', 1, '1', '2020-10-26 10:57:41', '1', '2020-10-26 10:57:45'); From 0b0470e84eae17190898f79151028ac4deacd689 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Mon, 22 Mar 2021 16:26:41 +0800 Subject: [PATCH 188/375] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=8F=91=E9=80=81?= =?UTF-8?q?=E5=88=B0=E7=AC=AC=E4=B8=89=E6=96=B9=E5=B9=B3=E5=8F=B0=20sql?= =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/form/ProjectDetailDTO.java | 11 ++++++++++- .../com/epmet/service/impl/ProjectServiceImpl.java | 11 +++++++++-- .../{V0.0.7__platform.sql => V0.0.8__platform.sql} | 0 3 files changed, 19 insertions(+), 3 deletions(-) rename epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/{V0.0.7__platform.sql => V0.0.8__platform.sql} (100%) diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ProjectDetailDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ProjectDetailDTO.java index a3fa6c0ae7..8fb394aa93 100644 --- a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ProjectDetailDTO.java +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ProjectDetailDTO.java @@ -3,6 +3,7 @@ package com.epmet.dto.form; import lombok.Data; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; +import org.hibernate.validator.constraints.Length; import java.io.Serializable; import java.util.List; @@ -67,8 +68,16 @@ public class ProjectDetailDTO implements Serializable { /** * 话题发表人电话 - * */ + */ private String topicPublisherMobile; + /** + * 公开答复 + */ + private String publicReply; + /** + * 内部备注 + */ + private String internalRemark; @Override public String toString() { diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index 3429a814b6..5a6ffdd448 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -2075,9 +2075,14 @@ public class ProjectServiceImpl extends BaseServiceImpl staffInfo = epmetUserOpenFeignClient.getCustomerStaff(formDTO.getUserId()); + if (!staffInfo.success()) { + throw new RenException(staffInfo.getCode(), staffInfo.getMsg()); + } + applyAssistFormDTO.setPersonName(staffInfo.getData().getRealName()); + applyAssistFormDTO.setMobile(staffInfo.getData().getMobile()); //获取网格信息 List relatedPersonnel = projectRelatedPersonnelService.getPersonnelListByProjectId(formDTO.getProjectId()); CustomerGridFormDTO customerGridFormDTO = new CustomerGridFormDTO(); @@ -2098,6 +2103,8 @@ public class ProjectServiceImpl extends BaseServiceImpl Date: Mon, 22 Mar 2021 16:40:37 +0800 Subject: [PATCH 189/375] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E5=AD=97=E5=85=B8=E4=B8=8A=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/screen/CategoryDictDataFormDTO.java | 27 +++++++ .../dto/screen/form/CategoryDictFormDTO.java | 72 +++++++++++++++++++ .../ScreenProjectDataCollController.java | 25 +++++-- .../stats/CustomerProjectCategoryDictDao.java | 26 ++++++- .../CustomerProjectCategoryDictService.java | 15 +++- ...ustomerProjectCategoryDictServiceImpl.java | 19 ++++- .../stats/CustomerProjectCategoryDictDao.xml | 56 ++++++++++++++- 7 files changed, 231 insertions(+), 9 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/CategoryDictDataFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/CategoryDictFormDTO.java diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/CategoryDictDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/CategoryDictDataFormDTO.java new file mode 100644 index 0000000000..bd88161f54 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/CategoryDictDataFormDTO.java @@ -0,0 +1,27 @@ +package com.epmet.dto.screen; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import com.epmet.dto.screen.form.CategoryDictFormDTO; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.List; + +/** + * 项目分类字典上报 + * @Auther: zhangyong + * @Date: 2021-03-22 + */ +@Data +public class CategoryDictDataFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 当isFirst=true时,直接根据 customerId 删除原有数据,再批量insert。 + */ + private Boolean isFirst; + + private List dataList; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/CategoryDictFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/CategoryDictFormDTO.java new file mode 100644 index 0000000000..f60c33faa4 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/CategoryDictFormDTO.java @@ -0,0 +1,72 @@ +package com.epmet.dto.screen.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 项目分类字典上报 + * @Auther: zhangyong + * @Date: 2021-03-22 + */ +@Data +public class CategoryDictFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + +// public interface ExtractDailyForm extends CustomerClientShowGroup {} + + /** + * 客户内自己的分类编码 + */ +// @NotBlank(message = "客户分类编码不能为空", groups = { ExtractDailyForm.class }) + private String categoryCode; + + /** + * 客户内自己的分类名称 + */ +// @NotBlank(message = "客户分类名称不能为空", groups = { ExtractDailyForm.class }) + private String categoryName; + + /** + * 父类分类编码,如果是一级分类,此列赋值为0 + */ +// @NotBlank(message = "父类分类编码不能为空", groups = { ExtractDailyForm.class }) + private String parentCategoryCode; + + /** + * 分类等级:1、2....; + */ +// @NotBlank(message = "分类等级不能为空", groups = { ExtractDailyForm.class }) + private Integer level; + + /** + * 排序 + */ +// @NotBlank(message = "排序不能为空", groups = { ExtractDailyForm.class }) + private Integer sort; + + /** + * 当前分类对应产品内的分类编码,如果对应不上,此列传空 + */ + private String epmetCategoryCode; + + /** + * 原始创建时间yyyy-MM-dd HH:mm:ss + */ + private String originCreatedTime; + + /** + * 原始更新时间yyyy-MM-dd HH:mm:ss + */ + private String orginUpdatedTime; + + /** + * 分类字典表主键 + */ +// @NotBlank(message = "分类字典表主键不能为空", groups = { ExtractDailyForm.class }) + private String categoryId; +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java index 0af70355e9..d51ca41f31 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java @@ -3,16 +3,15 @@ package com.epmet.controller; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.screen.*; +import com.epmet.dto.screen.form.CategoryDictFormDTO; import com.epmet.dto.screen.form.ScreenProjectDataInfoFormDTO; import com.epmet.dto.screen.form.ScreenProjectProcessFormDTO; import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.service.evaluationindex.screen.*; +import com.epmet.service.stats.CustomerProjectCategoryDictService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestHeader; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; /** * @Description 事件/项目采集接口入口 @@ -41,7 +40,8 @@ public class ScreenProjectDataCollController { private ScreenProjectDataService projectDataService; @Autowired private ScreenProjectProcessService projectProcessService; - + @Autowired + private CustomerProjectCategoryDictService customerProjectCategoryDictService; /** * @author wangc * @description 【事件/项目分析】网格内月度数量统计 @@ -152,4 +152,19 @@ public class ScreenProjectDataCollController { return new Result(); } + /** + * 项目分类字典上报 + * 目标表:epmet_evaluation_index库的customer_project_category_dict + * + * @param customerId + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 16:03 2021-03-22 + **/ + @PostMapping("uploadcategorydict") + public Result uploadcategorydict(@RequestHeader("CustomerId") String customerId, @RequestBody CategoryDictDataFormDTO formDTO) { + customerProjectCategoryDictService.uploadCategoryDict(customerId, formDTO); + return new Result(); + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/CustomerProjectCategoryDictDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/CustomerProjectCategoryDictDao.java index fd0cdd6eb2..3489fc5917 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/CustomerProjectCategoryDictDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/CustomerProjectCategoryDictDao.java @@ -18,10 +18,13 @@ package com.epmet.dao.stats; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screen.form.CategoryDictFormDTO; import com.epmet.entity.stats.CustomerProjectCategoryDictEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.util.List; + /** * 客户项目分类字典表 * @@ -36,4 +39,25 @@ public interface CustomerProjectCategoryDictDao extends BaseDao list, @Param("customerId")String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/CustomerProjectCategoryDictService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/CustomerProjectCategoryDictService.java index 36861d7b35..1b37c9448a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/CustomerProjectCategoryDictService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/CustomerProjectCategoryDictService.java @@ -18,6 +18,7 @@ package com.epmet.service.stats; import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.screen.CategoryDictDataFormDTO; import com.epmet.entity.issue.IssueProjectCategoryDictEntity; import com.epmet.entity.stats.CustomerProjectCategoryDictEntity; @@ -42,4 +43,16 @@ public interface CustomerProjectCategoryDictService extends BaseService NumConstant.ZERO); + } + if (!CollectionUtils.isEmpty(formDTO.getDataList())) { + baseDao.batchInsertCustomerProjectCategoryDict(formDTO.getDataList(), customerId); + } + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/CustomerProjectCategoryDictDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/CustomerProjectCategoryDictDao.xml index 63b47e4456..2802dc7625 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/CustomerProjectCategoryDictDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/CustomerProjectCategoryDictDao.xml @@ -38,4 +38,58 @@ and m.customer_id=#{customerId} and m.CATEGORY_ID=#{categoryId} - \ No newline at end of file + + + delete from customer_project_category_dict + where CUSTOMER_ID = #{customerId} + limit 1000; + + + + insert into customer_project_category_dict + ( + ID, + CUSTOMER_ID, + CUSTOMER_TYPE, + CATEGORY_CODE, + CATEGORY_NAME, + PARENT_CATEGORY_CODE, + `LEVEL`, + SORT, + IS_DISABLE, + EPMET_CATEGORY_CODE, + ORIGIN_CREATED_TIME, + ORIGIN_UPDATED_TIME, + CATEGORY_ID, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + 'external', + #{item.categoryCode}, + #{item.categoryName}, + #{item.parentCategoryCode}, + #{item.level}, + #{item.sort}, + 'enable', + #{item.epmetCategoryCode}, + #{item.originCreatedTime}, + #{item.orginUpdatedTime}, + #{item.categoryId}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + From cd09ef54e259c51a5b7803c683d9788cc4747fdb Mon Sep 17 00:00:00 2001 From: wangchao Date: Mon, 22 Mar 2021 16:42:55 +0800 Subject: [PATCH 190/375] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E7=BC=93=E5=AD=98=E6=96=B0=E5=A2=9E=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/redis/IssueProjectTagDictRedis.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java index 7e4d3b456a..33896d5b16 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java @@ -378,6 +378,19 @@ public class IssueProjectTagDictRedis { }); } + /** + * @Description 批量更新指定分类下的标签的禁用/启用属性 + * @param customerId 客户Id + * @param secondCategoryIds 二级分类集合 + * @param availableFlag enable | disabled + * @return void + * @author wangc + * @date 2021.03.22 16:20 + */ + public void updateTagAvailabilityBySecondCategoryIds(String customerId,ListsecondCategoryIds,String availableFlag){ + + } + public T parseObject(Object o,Class clazz){ ObjectMapper objectMapper = new ObjectMapper(); T t = objectMapper.convertValue(o, clazz); From 4c8e9d806156fb1382e93ef3279982a42399530a Mon Sep 17 00:00:00 2001 From: wangchao Date: Mon, 22 Mar 2021 16:56:53 +0800 Subject: [PATCH 191/375] =?UTF-8?q?get=E7=BB=84=E5=91=98=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../member/redis/ResiGroupMemberRedis.java | 41 +++++++++++++------ 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/redis/ResiGroupMemberRedis.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/redis/ResiGroupMemberRedis.java index c2c735c70b..fcb7cb7b4a 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/redis/ResiGroupMemberRedis.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/redis/ResiGroupMemberRedis.java @@ -18,6 +18,7 @@ package com.epmet.modules.member.redis; +import cn.hutool.core.bean.BeanUtil; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.redis.RedisKeys; @@ -25,6 +26,7 @@ import com.epmet.commons.tools.redis.RedisUtils; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.form.UserResiInfoFormDTO; +import com.epmet.dto.result.UserBaseInfoResultDTO; import com.epmet.dto.result.UserResiInfoResultDTO; import com.epmet.modules.constant.ResiGroupRedisKeys; import com.epmet.modules.feign.EpmetUserFeignClient; @@ -115,21 +117,34 @@ public class ResiGroupMemberRedis { memberRedis.setMemberStatus(memberMySql.getStatus()); - UserResiInfoFormDTO userParam = new UserResiInfoFormDTO(); - userParam.setUserId(memberMySql.getCustomerUserId()); - userParam.setCustomerId(groupService.get(groupId).getCustomerId()); - Result userInfo = epmetUserFeignClient.getUserResiInfoDTO(userParam); - if(userInfo.success()){ - if(null != userInfo.getData()){ - memberRedis.setUserShowName(userInfo.getData().getShowName()); - memberRedis.setUserHeadPhoto(userInfo.getData().getHeadPhoto()); - memberRedis.setMemberMobile(userInfo.getData().getRegMobile()); + + Map map = redisUtils.hGetAll(String.format("epmet:resi:user:%s",userId)); + if(null != map && !map.isEmpty()) { + //缓存中有数据,直接返回 + UserBaseInfoResultDTO userInfo = + BeanUtil.mapToBean(map, UserBaseInfoResultDTO.class, true); + if(null != userInfo){ + memberRedis.setUserShowName(userInfo.getShowName()); + memberRedis.setUserHeadPhoto(userInfo.getHeadImgUrl()); + memberRedis.setMemberMobile(userInfo.getMobile()); + set(memberRedis); + } + }else { + UserResiInfoFormDTO userParam = new UserResiInfoFormDTO(); + userParam.setUserId(memberMySql.getCustomerUserId()); + userParam.setCustomerId(groupService.get(groupId).getCustomerId()); + Result userInfo = epmetUserFeignClient.getUserResiInfoDTO(userParam); + if (userInfo.success()) { + if (null != userInfo.getData()) { + memberRedis.setUserShowName(userInfo.getData().getShowName()); + memberRedis.setUserHeadPhoto(userInfo.getData().getHeadPhoto()); + memberRedis.setMemberMobile(userInfo.getData().getRegMobile()); + set(memberRedis); + } + } else { + logger.warn(ModuleConstant.USER_INFO_LIST_NOT_FOUND); } - }else{ - logger.warn(ModuleConstant.USER_INFO_LIST_NOT_FOUND); } - - set(memberRedis); return memberRedis; }else{ //日志打印效果:找不到组员信息,组Id: ********,用户Id:******** From 8bbbbc2610e567508520612c9036b1d9cec19283 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 22 Mar 2021 17:06:30 +0800 Subject: [PATCH 192/375] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...V0.0.10__add_project_category_analysis.sql | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.10__add_project_category_analysis.sql diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.10__add_project_category_analysis.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.10__add_project_category_analysis.sql new file mode 100644 index 0000000000..391bb2af03 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.10__add_project_category_analysis.sql @@ -0,0 +1,47 @@ +-- epmet_data_statistical 库: +drop table if exists fact_origin_project_category_daily; +CREATE TABLE `fact_origin_project_category_daily` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', + `PROJECT_ID` varchar(64) NOT NULL COMMENT '项目id', + `CATEGORY_CODE` varchar(50) NOT NULL COMMENT '分类编码', + `PARENT_CATEGORY_CODE` varchar(50) NOT NULL COMMENT '所属父类分类编码', + `LEVEL` int(11) NOT NULL COMMENT '分类等级:1、2....;产品目前只有2级分类', + `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='项目所属分类表'; + +-- epmet_data_statistical_display 、epmet_evaluation_index: +drop table if exists customer_project_category_dict; +CREATE TABLE `customer_project_category_dict` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', + `CUSTOMER_TYPE` varchar(20) NOT NULL COMMENT '外部客户:external;内部客户:internal', + `CATEGORY_CODE` varchar(64) NOT NULL COMMENT '客户自己的分类编码', + `CATEGORY_NAME` varchar(500) CHARACTER SET utf8 NOT NULL COMMENT '客户自己的分类名称', + `PARENT_CATEGORY_CODE` varchar(64) NOT NULL COMMENT '父类分类编码,如果是一级分类,此列赋值为0', + `LEVEL` int(11) NOT NULL COMMENT '分类等级:1、2....;产品只有2级分类', + `SORT` int(11) unsigned NOT NULL COMMENT '排序', + `IS_DISABLE` varchar(32) CHARACTER SET utf8 NOT NULL COMMENT '是否禁用(enable:启用 disable:禁用)', + `EPMET_CATEGORY_CODE` varchar(64) DEFAULT NULL COMMENT '对应e世通中的分类编码,没有此列为空', + `ORIGIN_CREATED_TIME` datetime DEFAULT NULL COMMENT '原始创建时间', + `ORIGIN_UPDATED_TIME` datetime DEFAULT NULL COMMENT '原始更新时间', + `CATEGORY_ID` varchar(64) NOT NULL COMMENT '分类字典表主键', + `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE, + UNIQUE KEY `UN_KEY` (`CUSTOMER_ID`,`CATEGORY_CODE`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='客户项目分类字典表'; +-- epmet_data_statistical_display 、epmet_evaluation_index: + +alter table screen_project_category_org_daily add column `LEVEL` int(11) NOT NULL COMMENT '分类等级1、2....'; +alter table screen_project_category_grid_daily add column `LEVEL` int(11) NOT NULL COMMENT '分类等级1、2....'; From e209a6b90d5d828a5ca334a3551dce42b3063f6e Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 22 Mar 2021 17:20:14 +0800 Subject: [PATCH 193/375] =?UTF-8?q?=E6=8E=A8=E8=8D=90=E5=B0=8F=E7=BB=84-?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E7=BB=84=E9=95=BF=E4=BF=A1=E6=81=AF=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E4=BC=98=E5=8C=96=20=E7=9B=B4=E6=8E=A5=E4=BB=8E?= =?UTF-8?q?=E7=BC=93=E5=AD=98=E5=8F=96=E7=94=A8=E6=88=B7=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/commons/tools/redis/RedisKeys.java | 30 ++++++++++--- .../resi-group/resi-group-server/pom.xml | 6 +++ .../service/impl/ResiGroupServiceImpl.java | 43 +++++++++++++++++-- .../resources/mapper/group/ResiGroupDao.xml | 9 +++- .../com/epmet/constant/UserRedisKeys.java | 38 ---------------- .../java/com/epmet/redis/UserBadgeRedis.java | 1 - .../com/epmet/redis/UserBaseInfoRedis.java | 3 +- 7 files changed, 77 insertions(+), 53 deletions(-) delete mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/constant/UserRedisKeys.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java index 098dd1c14d..faee6de155 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java @@ -9,6 +9,7 @@ package com.epmet.commons.tools.redis; import com.epmet.commons.tools.constant.StrConstant; +import org.apache.commons.lang3.StringUtils; /** * @author Mark sunlightcs@gmail.com @@ -355,19 +356,34 @@ public class RedisKeys { } /** + * @return + * @Description 客户的ApiService + * @author wxz + * @date 2021.01.20 16:56 + */ + public static String getCustomerApiServiceKey(String customerId) { + return rootPrefix.concat("customer:thirdplat:apiservice:").concat(customerId); + } + + /** + * @return epmet:resi:user:userId * @Description 用户缓存Key + * @Param 用户Id + * @Author wangc + * @Date 2020.04.13 11:27 **/ - public static String getResiUserKey(String userId){ + public static String getResiUserKey(String userId) { return rootPrefix.concat("resi:user:").concat(userId); } /** - * @Description 客户的ApiService - * @return - * @author wxz - * @date 2021.01.20 16:56 + * @param userId + * @return epmet:badge:user:[customerId]:[userId] + * @Description 用户勋章缓存 epmet:badge:user:[customerId]:[userId] + * @author wangc + * @date 2020.11.05 13:34 */ - public static String getCustomerApiServiceKey(String customerId) { - return rootPrefix.concat("customer:thirdplat:apiservice:").concat(customerId); + public static String getResiUserBadgeKey(String customerId, String userId) { + return rootPrefix.concat("badge:user:").concat(customerId).concat(":").concat(StringUtils.isBlank(userId) ? "*" : userId); } } diff --git a/epmet-module/resi-group/resi-group-server/pom.xml b/epmet-module/resi-group/resi-group-server/pom.xml index 7f86290566..e7432526b2 100644 --- a/epmet-module/resi-group/resi-group-server/pom.xml +++ b/epmet-module/resi-group/resi-group-server/pom.xml @@ -106,6 +106,12 @@ 2.0.0 compile + + com.epmet + epmet-user-client + 2.0.0 + compile + diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java index a4d13430a4..bfa6a16c94 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java @@ -17,6 +17,7 @@ package com.epmet.modules.group.service.impl; +import cn.hutool.core.bean.BeanUtil; import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -25,6 +26,8 @@ import com.epmet.commons.tools.constant.*; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.redis.RedisKeys; +import com.epmet.commons.tools.redis.RedisUtils; import com.epmet.commons.tools.scan.param.ImgScanParamDTO; import com.epmet.commons.tools.scan.param.ImgTaskDTO; import com.epmet.commons.tools.scan.param.TextScanParamDTO; @@ -34,6 +37,7 @@ import com.epmet.commons.tools.security.user.LoginUserUtil; import com.epmet.commons.tools.utils.*; import com.epmet.constant.ReadFlagConstant; import com.epmet.dto.form.*; +import com.epmet.dto.result.UserBaseInfoResultDTO; import com.epmet.dto.result.UserResiInfoResultDTO; import com.epmet.dto.result.UserRoleResultDTO; import com.epmet.feign.EpmetMessageOpenFeignClient; @@ -156,6 +160,8 @@ public class ResiGroupServiceImpl extends BaseServiceImpl page(Map params) { @@ -1000,11 +1006,40 @@ public class ResiGroupServiceImpl extends BaseServiceImpl recommendGroupList = baseDao.selectListRecommendList(formDTO); recommendGroupList.forEach(dto -> { - Result groupLeaderUserInfo = this.getGroupLeaderUserInfo(dto.getGroupId()); - if (groupLeaderUserInfo.success() && null != groupLeaderUserInfo.getData()) { - dto.setLeaderName(groupLeaderUserInfo.getData().getShowName()); + ResiGroupMemberDTO groupMemberDTO = baseDao.selectGroupLeader(dto.getGroupId()); + if (groupMemberDTO == null) { + logger.error("recommendedList 组长信息不存在,groupId:{}", dto.getGroupId()); + return; + } + //获取居民缓存key + Map map = redisUtils.hGetAll(RedisKeys.getResiUserKey(groupMemberDTO.getCustomerUserId())); + UserBaseInfoResultDTO userInfo = null; + if (null != map && !map.isEmpty()) { + //缓存中有数据,直接返回 + userInfo = BeanUtil.mapToBean(map, UserBaseInfoResultDTO.class, true); + } + if (userInfo == null) { + logger.error("recommendedList 用户基础信息不存在,customerUserId:{}", groupMemberDTO.getCustomerUserId()); + UserResiInfoFormDTO resiUserInfoFormDTO = new UserResiInfoFormDTO(); + resiUserInfoFormDTO.setUserId(groupMemberDTO.getCustomerUserId()); + Result groupLeaderUserInfo = epmetUserFeignClient.getUserResiInfoDTO(resiUserInfoFormDTO); + + if (groupLeaderUserInfo.success() && null != groupLeaderUserInfo.getData()) { + dto.setLeaderName(groupLeaderUserInfo.getData().getShowName()); + } else { + logger.error("组长注册信息查询失败,msg:{},groupId:{}", groupLeaderUserInfo.getMsg(), dto.getGroupId()); + } } else { - logger.warn("组长注册信息查询失败,msg:{},groupId:{}", groupLeaderUserInfo.getMsg(), dto.getGroupId()); + String gender = null; + if (NumConstant.ONE_STR.equals(userInfo.getGender())) { + gender = "先生"; + } else if (NumConstant.TWO_STR.equals(userInfo.getGender())) { + gender = "女士"; + } else { + gender = "先生/女士"; + } + String leaderName = userInfo.getStreet().concat(StrConstant.HYPHEN).concat(userInfo.getSurname()).concat(gender); + dto.setLeaderName(leaderName); } }); return recommendGroupList; diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml index d21ed5ccdd..5ccd3cdb7d 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml @@ -165,7 +165,14 @@ + + DELETE FROM diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml index 5054069566..ac2dcd2730 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml @@ -113,4 +113,29 @@ AND d.PID != '0' + + + + + UPDATE issue_project_category_dict + SET DEL_FLAG = '1' + WHERE + CUSTOMER_ID = #{customerId} + + AND id = #{categoryId} + + + AND pid = #{categoryId} + + + diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/DelCategoryFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/DelCategoryFormDTO.java new file mode 100644 index 0000000000..c1fa3252c6 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/DelCategoryFormDTO.java @@ -0,0 +1,35 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.List; + +/** + * 分类删除-接口入参 + * @Author sun + */ +@Data +public class DelCategoryFormDTO implements Serializable { + + private static final long serialVersionUID = 2599592072265715951L; + public interface DelCategory{} + + /** + * 客户Id + */ + @NotBlank(message = "客户ID不能为空",groups = {DelCategory.class}) + private String customerId; + /** + * 分类Id + */ + @NotBlank(message = "分类ID不能为空",groups = {DelCategory.class}) + private String categoryId; + /** + * 分类级别 1:一类 2:二类 + */ + private String level; + + +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java index 49b573f0be..e3246e8bae 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java @@ -2,7 +2,9 @@ package com.epmet.feign; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.ProjectCategoryDTO; import com.epmet.dto.ProjectDTO; +import com.epmet.dto.form.DelCategoryFormDTO; import com.epmet.dto.form.ProcessListFormDTO; import com.epmet.dto.form.ProjectByCreateTopicUserFormDTO; import com.epmet.dto.form.ProjectListFromDTO; @@ -77,4 +79,11 @@ public interface GovProjectOpenFeignClient { @GetMapping("gov/project/project/queryprojectinfobyprojectid/{projectId}") Result queryProjectInfoByProjectId(@PathVariable("projectId")String projectId); + + /** + * @Description 判断分类有没有被项目使用 + * @Author sun + **/ + @PostMapping("gov/project/projectcategory/getprojectcategorylist") + Result> getProjectCategoryList(@RequestBody DelCategoryFormDTO formDTO); } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java index ca4488be17..f03dabfef1 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java @@ -3,7 +3,9 @@ package com.epmet.feign.fallback; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.ProjectCategoryDTO; import com.epmet.dto.ProjectDTO; +import com.epmet.dto.form.DelCategoryFormDTO; import com.epmet.dto.form.ProcessListFormDTO; import com.epmet.dto.form.ProjectByCreateTopicUserFormDTO; import com.epmet.dto.form.ProjectListFromDTO; @@ -71,4 +73,9 @@ public class GovProjectOpenFeignClientFallback implements GovProjectOpenFeignCli public Result queryProjectInfoByProjectId(String projectId) { return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "queryProjectInfoByProjectId", projectId); } + + @Override + public Result> getProjectCategoryList(DelCategoryFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "getProjectCategoryList", formDTO); + } } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectCategoryController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectCategoryController.java index d1392bd0a6..ff9417e6ca 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectCategoryController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectCategoryController.java @@ -30,6 +30,7 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.ProjectCategoryDTO; +import com.epmet.dto.form.DelCategoryFormDTO; import com.epmet.dto.form.ProjectCategoryTagListFormDTO; import com.epmet.dto.form.ProjectSaveCategoryFormDTO; import com.epmet.dto.result.ProjectCategoryTagListResultDTO; @@ -125,4 +126,14 @@ public class ProjectCategoryController { return new Result(); } + /** + * @param formDTO + * @Description 判断分类有没有被项目使用 + * @Author sun + **/ + @PostMapping("getprojectcategorylist") + public Result> getProjectCategoryList(@RequestBody DelCategoryFormDTO formDTO) { + return new Result>().ok(projectCategoryService.getProjectCategoryList(formDTO)); + } + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectCategoryDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectCategoryDao.java index 424adbbc50..247f239261 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectCategoryDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectCategoryDao.java @@ -18,6 +18,8 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.ProjectCategoryDTO; +import com.epmet.dto.form.DelCategoryFormDTO; import com.epmet.entity.ProjectCategoryEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -44,4 +46,10 @@ public interface ProjectCategoryDao extends BaseDao { * @Author sun **/ void delByProjectId(@Param("projectId") String projectId); + + /** + * @Description 判断分类有没有被项目使用 + * @Author sun + **/ + List selectProjectCategoryList(DelCategoryFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectCategoryService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectCategoryService.java index d975623295..37fb5fa984 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectCategoryService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectCategoryService.java @@ -20,6 +20,7 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.ProjectCategoryDTO; +import com.epmet.dto.form.DelCategoryFormDTO; import com.epmet.dto.form.ProjectCategoryTagListFormDTO; import com.epmet.dto.form.ProjectSaveCategoryFormDTO; import com.epmet.dto.result.ProjectCategoryTagListResultDTO; @@ -111,4 +112,11 @@ public interface ProjectCategoryService extends BaseService getProjectCategoryList(DelCategoryFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectCategoryServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectCategoryServiceImpl.java index f2a12df324..4562835095 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectCategoryServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectCategoryServiceImpl.java @@ -29,6 +29,7 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.dao.ProjectCategoryDao; import com.epmet.dao.ProjectTagsDao; import com.epmet.dto.ProjectCategoryDTO; +import com.epmet.dto.form.DelCategoryFormDTO; import com.epmet.dto.form.ProjectCategoryTagListFormDTO; import com.epmet.dto.form.ProjectSaveCategoryFormDTO; import com.epmet.dto.result.*; @@ -192,4 +193,14 @@ public class ProjectCategoryServiceImpl extends BaseServiceImpl getProjectCategoryList(DelCategoryFormDTO formDTO) { + return baseDao.selectProjectCategoryList(formDTO); + } + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectCategoryDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectCategoryDao.xml index 09dbfae3a9..bb6a148e90 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectCategoryDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectCategoryDao.xml @@ -13,6 +13,20 @@ AND project_id = #{projectId} + + DELETE FROM From ef551f3eebd92a83ecd2414cbea8e10ef1627744 Mon Sep 17 00:00:00 2001 From: liushaowen <565850092@qq.com> Date: Mon, 22 Mar 2021 17:41:29 +0800 Subject: [PATCH 196/375] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=8A=BD=E5=8F=96=E5=88=B0=E6=8C=87=E6=A0=87?= =?UTF-8?q?=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FactOriginProjectCategoryDailyDao.java | 6 +- .../issue/IssueProjectCategoryDictDao.java | 4 +- .../com/epmet/dao/project/ProjectDao.java | 4 +- .../IssueProjectCategoryDictService.java | 4 +- .../IssueProjectCategoryDictServiceImpl.java | 6 ++ ...FactOriginProjectCategoryDailyService.java | 12 ++- .../impl/FactOriginExtractServiceImpl.java | 19 ++++- ...OriginProjectCategoryDailyServiceImpl.java | 82 ++++++++++++++++++- .../epmet/service/project/ProjectService.java | 13 ++- .../project/impl/ProjectServiceImpl.java | 14 +++- .../FactOriginProjectCategoryDailyDao.xml | 13 ++- .../issue/IssueProjectCategoryDictDao.xml | 9 +- .../resources/mapper/project/ProjectDao.xml | 14 +++- 13 files changed, 180 insertions(+), 20 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectCategoryDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectCategoryDailyDao.java index ff9f8c1885..537468724a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectCategoryDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectCategoryDailyDao.java @@ -20,6 +20,7 @@ package com.epmet.dao.evaluationindex.extract; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.entity.evaluationindex.extract.FactOriginProjectCategoryDailyEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * 项目所属分类表 @@ -29,5 +30,6 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface FactOriginProjectCategoryDailyDao extends BaseDao { - -} \ No newline at end of file + + void deleteOldData(@Param("customerId") String customerId,@Param("dateId") String dateId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/issue/IssueProjectCategoryDictDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/issue/IssueProjectCategoryDictDao.java index 9cc59cf996..371cda3cf2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/issue/IssueProjectCategoryDictDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/issue/IssueProjectCategoryDictDao.java @@ -36,4 +36,6 @@ public interface IssueProjectCategoryDictDao { List listInsertCategoies(@Param("start") Date start, @Param("end") Date end); List listByUpdatedTime(@Param("start") Date start, @Param("end") Date end); -} \ No newline at end of file + + IssueProjectCategoryDictEntity getById(@Param("customerId")String customerId, @Param("id")String id);; +} 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 9d64b829da..2d3318c262 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 @@ -133,4 +133,6 @@ public interface ProjectDao extends BaseDao { * @date 2021.03.08 23:44 */ List selectProjectCategory(@Param("list")List list); -} \ No newline at end of file + + List getProjectCategoryData(@Param("customerId") String customerId, @Param("dateId") String dateId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/IssueProjectCategoryDictService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/IssueProjectCategoryDictService.java index 3067657abb..4d2a96f7be 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/IssueProjectCategoryDictService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/IssueProjectCategoryDictService.java @@ -34,4 +34,6 @@ public interface IssueProjectCategoryDictService{ List listInsertCategoies(Date start, Date end); List listByUpdatedTime(Date start, Date end); -} \ No newline at end of file + + IssueProjectCategoryDictEntity getById(String customerId,String id); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/impl/IssueProjectCategoryDictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/impl/IssueProjectCategoryDictServiceImpl.java index 98c18ec1fc..982030799f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/impl/IssueProjectCategoryDictServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/impl/IssueProjectCategoryDictServiceImpl.java @@ -5,6 +5,7 @@ import com.epmet.constant.DataSourceConstant; import com.epmet.dao.issue.IssueProjectCategoryDictDao; import com.epmet.entity.issue.IssueProjectCategoryDictEntity; import com.epmet.service.Issue.IssueProjectCategoryDictService; +import org.apache.ibatis.annotations.Param; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -33,4 +34,9 @@ public class IssueProjectCategoryDictServiceImpl implements IssueProjectCategory return issueProjectCategoryDictDao.listByUpdatedTime(start, end); } + @Override + public IssueProjectCategoryDictEntity getById(String customerId, String id) { + return issueProjectCategoryDictDao.getById(customerId,id); + } + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectCategoryDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectCategoryDailyService.java index 2eb2de215e..70b5a73adb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectCategoryDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectCategoryDailyService.java @@ -18,6 +18,7 @@ package com.epmet.service.evaluationindex.extract.todata; import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.extract.form.ExtractOriginFormDTO; import com.epmet.entity.evaluationindex.extract.FactOriginProjectCategoryDailyEntity; /** @@ -27,5 +28,12 @@ import com.epmet.entity.evaluationindex.extract.FactOriginProjectCategoryDailyEn * @since v1.0.0 2021-03-19 */ public interface FactOriginProjectCategoryDailyService extends BaseService { - //todo 将epmet_gov_project库中的项目分类信息(project_category)同步到统计库epmet_data_statistical -} \ No newline at end of file + /** + * @Description 将epmet_gov_project库中的项目分类信息(project_category)同步到统计库epmet_data_statistical + * @param paramNew + * @return void + * @Author liushaowen + * @Date 2021/3/22 15:28 + */ + void extractProjectCategory(ExtractOriginFormDTO paramNew); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginExtractServiceImpl.java index 67ba0f0c4f..d35cee00ee 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginExtractServiceImpl.java @@ -201,8 +201,11 @@ public class FactOriginExtractServiceImpl implements FactOriginExtractService { } catch (Exception e) { log.error("抽取【项目数据】发生异常,参数:" + JSON.toJSONString(paramNew), e); } - //todo 新增项目分类抽取 shaowen - // originProjectCategoryDailyService.xxxx(); + try { + originProjectCategoryDailyService.extractProjectCategory(paramNew); + } catch (Exception e) { + log.error("抽取【项目分类数据】发生异常,参数:" + JSON.toJSONString(paramNew), e); + } } else { try { for (int i = 0; i < finalDaysBetween.size(); i++) { @@ -222,8 +225,16 @@ public class FactOriginExtractServiceImpl implements FactOriginExtractService { } catch (Exception e) { log.error("抽取【项目数据】发生异常,参数:" + JSON.toJSONString(paramNew), e); } - //todo 新增项目分类抽取 shaowen - // originProjectCategoryDailyService.xxxx(); + try { + for (int i = 0; i < finalDaysBetween.size(); i++) { + String dateDimId = finalDaysBetween.get(i); + paramNew.setDateId(dateDimId); + originProjectCategoryDailyService.extractProjectCategory(paramNew); + } + } catch (Exception e) { + log.error("抽取【项目分类数据】发生异常,参数:" + JSON.toJSONString(paramNew), e); + } + } }); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectCategoryDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectCategoryDailyServiceImpl.java index f9bd902765..abce84673b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectCategoryDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectCategoryDailyServiceImpl.java @@ -17,13 +17,30 @@ package com.epmet.service.evaluationindex.extract.todata.impl; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.constant.DataSourceConstant; import com.epmet.dao.evaluationindex.extract.FactOriginProjectCategoryDailyDao; +import com.epmet.dto.ProjectCategoryDTO; +import com.epmet.dto.extract.form.ExtractOriginFormDTO; +import com.epmet.dto.extract.form.IssueMainDailyFormDTO; import com.epmet.entity.evaluationindex.extract.FactOriginProjectCategoryDailyEntity; +import com.epmet.entity.issue.IssueProjectCategoryDictEntity; +import com.epmet.service.Issue.IssueProjectCategoryDictService; +import com.epmet.service.Issue.IssueService; import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectCategoryDailyService; +import com.epmet.service.project.ProjectService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +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.ArrayList; +import java.util.List; /** * 项目所属分类表 @@ -33,6 +50,67 @@ import org.springframework.stereotype.Service; */ @Service @DataSource(DataSourceConstant.STATS) +@Slf4j public class FactOriginProjectCategoryDailyServiceImpl extends BaseServiceImpl implements FactOriginProjectCategoryDailyService { - -} \ No newline at end of file + @Autowired + private ProjectService projectService; + @Autowired + private IssueProjectCategoryDictService issueProjectCategoryDictService; + /** + * @param extractOriginFormDTO + * @return void + * @Description 将epmet_gov_project库中的项目分类信息(project_category)同步到统计库epmet_data_statistical + * @Author liushaowen + * @Date 2021/3/22 15:28 + */ + @Override + public void extractProjectCategory(ExtractOriginFormDTO extractOriginFormDTO) { + String dateString = extractOriginFormDTO.getDateId(); + String customerId = extractOriginFormDTO.getCustomerId(); + List entities = new ArrayList<>(); + Integer count = baseDao.selectCount(new QueryWrapper().eq("customer_id",customerId)); + //如果count = 0 初始化该customer所有数据 + if (NumConstant.ZERO == count){ + dateString = null; + } + List projectCategoryData = projectService.getProjectCategoryData(customerId, dateString); + if (!CollectionUtils.isEmpty(projectCategoryData)){ + projectCategoryData.forEach(data->{ + FactOriginProjectCategoryDailyEntity insertEntity = new FactOriginProjectCategoryDailyEntity(); + IssueProjectCategoryDictEntity categoryDictEntity = issueProjectCategoryDictService.getById(customerId, data.getCategoryId()); + if (categoryDictEntity == null){ + log.warn("categoryDict not found : customerId:{},categoryId:{}",customerId,data.getCategoryId()); + } + insertEntity.setProjectId(data.getProjectId()); + insertEntity.setCategoryCode(categoryDictEntity.getCategoryCode()); + insertEntity.setParentCategoryCode(categoryDictEntity.getParentCategoryCode()); + insertEntity.setCustomerId(customerId); + //如果pid为0,说明是1级分类 + if (NumConstant.ZERO_STR.equals(categoryDictEntity.getPid())){ + insertEntity.setLevel(1); + }else { + insertEntity.setLevel(2); + } + insertEntity.setCreatedTime(data.getCreatedTime()); + entities.add(insertEntity); + }); + if (!CollectionUtils.isEmpty(entities)){ + delAndInsert(customerId,dateString,entities); + } + } + } + /** + * @Description category表删除插入 + * @param customerId + * @param dateId + * @param result + * @return void + * @Author liushaowen + * @Date 2021/3/22 17:01 + */ + @Transactional(rollbackFor = Exception.class) + public void delAndInsert(String customerId,String dateId,List result){ + baseDao.deleteOldData(customerId, dateId); + insertBatch(result); + } +} 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 6f283b852a..56a99d5257 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,6 +18,7 @@ package com.epmet.service.project; import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.ProjectCategoryDTO; import com.epmet.dto.ProjectDTO; import com.epmet.dto.project.ProjectAgencyDTO; import com.epmet.dto.project.ProjectGridDTO; @@ -141,4 +142,14 @@ public interface ProjectService extends BaseService { */ Map> getProjectCategory(List projectIds); -} \ No newline at end of file + /** + * @Description 抽取project_category + * @param customerId + * @param dateId + * @return java.util.List + * @Author liushaowen + * @Date 2021/3/22 15:44 + */ + List getProjectCategoryData(String customerId, String dateId); + +} 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 294d0e4f31..d2a3ff001d 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 @@ -150,6 +150,18 @@ public class ProjectServiceImpl extends BaseServiceImpl + * @Description 抽取project_category + * @Author liushaowen + * @Date 2021/3/22 15:44 + */ + @Override + public List getProjectCategoryData(String customerId, String dateId) { + return baseDao.getProjectCategoryData(customerId,dateId); + } -} \ No newline at end of file +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectCategoryDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectCategoryDailyDao.xml index 56ab802c01..73b0945d0b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectCategoryDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectCategoryDailyDao.xml @@ -3,6 +3,15 @@ + + DELETE + FROM + fact_origin_project_category_daily + WHERE + CUSTOMER_ID = #{customerId} + + AND DATE_FORMAT(CREATED_TIME,'%Y%m%d') = #{dateId} + + - - \ No newline at end of file + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/issue/IssueProjectCategoryDictDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/issue/IssueProjectCategoryDictDao.xml index a1207ecd06..50185c99cb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/issue/IssueProjectCategoryDictDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/issue/IssueProjectCategoryDictDao.xml @@ -41,4 +41,11 @@ ORDER BY UPDATED_TIME ASC - \ 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 2a8699d341..ec1cf07215 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 @@ -105,7 +105,7 @@ and CUSTOMER_ID = #{customerId} and PARAMETER_KEY ='detention_days' - + - \ No newline at end of file + + + From 7d6d8c0e86c04921598f2b7f38b554985f735c7b Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 22 Mar 2021 17:42:53 +0800 Subject: [PATCH 197/375] =?UTF-8?q?=E6=8E=A8=E8=8D=90=E5=B0=8F=E7=BB=84-?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E7=BB=84=E9=95=BF=E4=BF=A1=E6=81=AF=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E4=BC=98=E5=8C=96=20=E5=A6=82=E6=9E=9C=E7=BC=93?= =?UTF-8?q?=E5=AD=98=E4=B8=8D=E5=9C=A8=E4=BD=BF=E7=94=A8=E5=8E=9F=E6=9D=A5?= =?UTF-8?q?=E7=9A=84=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/group/service/impl/ResiGroupServiceImpl.java | 4 +--- .../java/com/epmet/controller/UserResiInfoController.java | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java index bfa6a16c94..a6bb7833fc 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java @@ -1020,9 +1020,7 @@ public class ResiGroupServiceImpl extends BaseServiceImpl groupLeaderUserInfo = epmetUserFeignClient.getUserResiInfoDTO(resiUserInfoFormDTO); + Result groupLeaderUserInfo = this.getGroupLeaderUserInfo(dto.getGroupId()); if (groupLeaderUserInfo.success() && null != groupLeaderUserInfo.getData()) { dto.setLeaderName(groupLeaderUserInfo.getData().getShowName()); diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserResiInfoController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserResiInfoController.java index e4f54f6aa7..a8fc12840e 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserResiInfoController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserResiInfoController.java @@ -33,7 +33,6 @@ import com.epmet.dto.result.IssueInitiatorResultDTO; import com.epmet.dto.result.UserResiInfoResultDTO; import com.epmet.excel.UserResiInfoExcel; import com.epmet.service.UserResiInfoService; -import jdk.nashorn.internal.parser.Token; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; From 27dcd06da9b1cdebd8c0bd65154b7cf15f2fee4f Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 22 Mar 2021 17:48:03 +0800 Subject: [PATCH 198/375] =?UTF-8?q?=20=E9=A1=B9=E7=9B=AE=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=8A=BD=E5=8F=96=E5=88=B0=E6=8C=87=E6=A0=87?= =?UTF-8?q?=E5=BA=93level=E8=B5=8B=E5=80=BC=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FactOriginProjectCategoryDailyServiceImpl.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectCategoryDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectCategoryDailyServiceImpl.java index abce84673b..3f9a27c34b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectCategoryDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectCategoryDailyServiceImpl.java @@ -25,15 +25,12 @@ import com.epmet.constant.DataSourceConstant; import com.epmet.dao.evaluationindex.extract.FactOriginProjectCategoryDailyDao; import com.epmet.dto.ProjectCategoryDTO; import com.epmet.dto.extract.form.ExtractOriginFormDTO; -import com.epmet.dto.extract.form.IssueMainDailyFormDTO; import com.epmet.entity.evaluationindex.extract.FactOriginProjectCategoryDailyEntity; import com.epmet.entity.issue.IssueProjectCategoryDictEntity; import com.epmet.service.Issue.IssueProjectCategoryDictService; -import com.epmet.service.Issue.IssueService; import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectCategoryDailyService; import com.epmet.service.project.ProjectService; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -85,12 +82,7 @@ public class FactOriginProjectCategoryDailyServiceImpl extends BaseServiceImpl Date: Mon, 22 Mar 2021 17:50:28 +0800 Subject: [PATCH 199/375] =?UTF-8?q?=E9=80=BB=E8=BE=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/ProjectDetailResultDTO.java | 5 ++++ .../service/impl/ProjectServiceImpl.java | 24 ++++++++++--------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectDetailResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectDetailResultDTO.java index 61c23453d9..0b1cb8d020 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectDetailResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectDetailResultDTO.java @@ -70,6 +70,11 @@ public class ProjectDetailResultDTO implements Serializable { */ private List platformIds; + public ProjectDetailResultDTO() { + this.processable = false; + this.isSend = false; + } + @NoArgsConstructor @Data public static class DepartmentNameListBean { diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index 5a6ffdd448..5b5a1c1988 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -310,20 +310,22 @@ public class ProjectServiceImpl extends BaseServiceImpl NumConstant.ZERO) { //TODO external_system值为1时,根据departmentList里的projectStaffId在project_sub_process表找最新的一条记录, // 如果没有记录或者INTERNAL_STATUS是closed,processable的值为true - if (parameterValue.equals(NumConstant.ONE_STR)) { - List projectStaffIds = departmentList.stream().map(m -> m.getProjectStaffId()).distinct().collect(Collectors.toList()); - // 根据departmentList里的projectStaffId在project_sub_process表找最新的一条记录 - ProjectSubProcessDTO projectSubProcessDTO = projectSubProcessService.selectSubProcess(projectStaffIds); - if (null == projectSubProcessDTO || projectSubProcessDTO.getInternalStatus().equals(ProjectConstant.CLOSED)) { - resultDTO.setProcessable(true); - resultDTO.setIsSend(true); + if (StringUtils.isNotEmpty(parameterValue)){ + if (parameterValue.equals(NumConstant.ONE_STR)) { + List projectStaffIds = departmentList.stream().map(m -> m.getProjectStaffId()).distinct().collect(Collectors.toList()); + // 根据departmentList里的projectStaffId在project_sub_process表找最新的一条记录 + ProjectSubProcessDTO projectSubProcessDTO = projectSubProcessService.selectSubProcess(projectStaffIds); + if (null == projectSubProcessDTO || projectSubProcessDTO.getInternalStatus().equals(ProjectConstant.CLOSED)) { + resultDTO.setProcessable(true); + resultDTO.setIsSend(true); + } else { + resultDTO.setProcessable(false); + resultDTO.setIsSend(false); + } } else { - resultDTO.setProcessable(false); + resultDTO.setProcessable(true); resultDTO.setIsSend(false); } - } else { - resultDTO.setProcessable(true); - resultDTO.setIsSend(false); } } else { resultDTO.setProcessable(false); From 45de6c7e2b8f9b50d85b33eaaa712b5aebf8b5d3 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 22 Mar 2021 17:55:30 +0800 Subject: [PATCH 200/375] =?UTF-8?q?=E9=80=BB=E8=BE=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/ProjectServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index 5b5a1c1988..63d3dacc1d 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -297,7 +297,6 @@ public class ProjectServiceImpl extends BaseServiceImpl Date: Mon, 22 Mar 2021 17:58:41 +0800 Subject: [PATCH 201/375] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E5=86=85=E6=8C=89?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E7=BB=9F=E8=AE=A1=E9=A1=B9=E7=9B=AE=E6=95=B0?= =?UTF-8?q?=E9=87=8F=20start?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../toscreen/impl/ScreenExtractServiceImpl.java | 17 +++++++++++------ .../ScreenProjectCategoryGridDailyService.java | 10 ++++++++++ ...reenProjectCategoryGridDailyServiceImpl.java | 13 +++++++++++++ 3 files changed, 34 insertions(+), 6 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java index 74e3021a00..e145f3e1bf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java @@ -11,10 +11,7 @@ import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.screen.form.ScreenCentralZoneDataFormDTO; import com.epmet.service.evaluationindex.extract.toscreen.*; import com.epmet.service.evaluationindex.indexcal.IndexCalculateService; -import com.epmet.service.evaluationindex.screen.ScreenProjectGridDailyService; -import com.epmet.service.evaluationindex.screen.ScreenProjectOrgDailyService; -import com.epmet.service.evaluationindex.screen.ScreenProjectQuantityGridMonthlyService; -import com.epmet.service.evaluationindex.screen.ScreenProjectQuantityOrgMonthlyService; +import com.epmet.service.evaluationindex.screen.*; import com.epmet.service.stats.DimCustomerService; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -68,6 +65,8 @@ public class ScreenExtractServiceImpl implements ScreenExtractService { private ScreenProjectOrgDailyService screenProjectOrgDailyService; @Autowired private ScreenProjectSettleService screenProjectSettleService; + @Autowired + private ScreenProjectCategoryGridDailyService projectCategoryGridDailyService; /** * @param extractOriginFormDTO @@ -198,12 +197,18 @@ public class ScreenExtractServiceImpl implements ScreenExtractService { log.error("项目(事件)分析按组织_按天统计失败,customerId为:"+customerId+"dateId为:"+dateId, e); } //项目分类打标签未上线,暂时屏蔽 - /*try{ + try{ //大屏项目数据抽取_按天抽取 screenProjectSettleService.extractScreenData(param); }catch (Exception e){ log.error("大屏项目数据抽取_按天抽取_按天统计失败,customerId为:"+customerId+"dateId为:"+dateId, e); - }*/ + } + //按天统计:网格内各个分类下的项目总数 + try{ + projectCategoryGridDailyService.extractProjectCategoryData(customerId,dateId); + }catch(Exception e){ + log.error("按天统计:网格内各个分类下的项目总数,customerId为:"+customerId+"dateId为:"+dateId, e); + } log.info("===== extractDaily method end ======"); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectCategoryGridDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectCategoryGridDailyService.java index da711d85e3..4fcb249db1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectCategoryGridDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectCategoryGridDailyService.java @@ -102,4 +102,14 @@ public interface ScreenProjectCategoryGridDailyService extends BaseService param); + + /** + * @return void + * @param customerId + * @param dateId + * @author yinzuomei + * @description 产品内部计算:网格内按分类统计项目数量 + * @Date 2021/3/22 16:46 + **/ + void extractProjectCategoryData(String customerId, String dateId); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java index acc891ac1a..a7be71b6ae 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java @@ -128,4 +128,17 @@ public class ScreenProjectCategoryGridDailyServiceImpl extends BaseServiceImpl Date: Mon, 22 Mar 2021 18:01:28 +0800 Subject: [PATCH 202/375] =?UTF-8?q?=E7=BB=99=E6=A0=87=E7=AD=BE=E7=83=AD?= =?UTF-8?q?=E5=BA=A6=E7=BC=93=E5=AD=98dto=E5=8A=A0=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/result/IssueCategoryTagResultDTO.java | 5 +++++ .../epmet/service/impl/IssueProjectTagDictServiceImpl.java | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueCategoryTagResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueCategoryTagResultDTO.java index a36724d35a..bfd9eec5f4 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueCategoryTagResultDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueCategoryTagResultDTO.java @@ -23,7 +23,12 @@ public class IssueCategoryTagResultDTO implements Serializable { */ private String name; + /** + * 是否禁用(enable:启用 disable:禁用) + */ + private String isDisable; + //equals计算时忽略isDisable属性 @Override public boolean equals(Object o) { if (this == o) return true; diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectTagDictServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectTagDictServiceImpl.java index 2fe298a91a..5919990477 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectTagDictServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectTagDictServiceImpl.java @@ -170,7 +170,7 @@ public class IssueProjectTagDictServiceImpl extends BaseServiceImpl { String redisKey = GovIssueRedisKeys.getGovernmentTagKey(param.getCustomerId(),tag.getCategoryId()); IssueCategoryTagResultDTO cache = new IssueCategoryTagResultDTO(); - cache.setId(tag.getId());cache.setName(tag.getTagName()); + cache.setId(tag.getId());cache.setName(tag.getTagName());cache.setIsDisable(tag.getIsDisable()); if(CollectionUtils.isNotEmpty(value.get(redisKey))){ value.get(redisKey).add(cache); }else{ @@ -191,7 +191,7 @@ public class IssueProjectTagDictServiceImpl extends BaseServiceImpl { String redisKey = GovIssueRedisKeys.getGovernmentTagKey(param.getCustomerId(),tag.getCategoryId()); IssueCategoryTagResultDTO cache = new IssueCategoryTagResultDTO(); - cache.setId(tag.getId());cache.setName(tag.getTagName()); + cache.setId(tag.getId());cache.setName(tag.getTagName());cache.setIsDisable(tag.getIsDisable()); if(CollectionUtils.isNotEmpty(value.get(redisKey))){ value.get(redisKey).add(cache); }else{ From f7cc19944d0483b6284e21a6f2b66a91f6819015 Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 23 Mar 2021 09:34:37 +0800 Subject: [PATCH 203/375] =?UTF-8?q?=E5=88=A0=E9=99=A4=EF=BC=9A=201.oper=5F?= =?UTF-8?q?crm=E4=B8=AD=E5=A4=9A=E4=BD=99=E7=9A=84list=5Fby=5Fcustomer?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/result/ProjectDetailResultDTO.java | 1 - .../com/epmet/feign/OperCrmOpenFeignClient.java | 9 --------- .../fallback/OperCrmOpenFeignClientFallback.java | 5 ----- .../com/epmet/controller/CustomerController.java | 13 ------------- .../CustomerThirdplatApiServiceService.java | 7 ------- .../CustomerThirdplatApiServiceServiceImpl.java | 16 ---------------- 6 files changed, 51 deletions(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectDetailResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectDetailResultDTO.java index 0b1cb8d020..cd3c278259 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectDetailResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectDetailResultDTO.java @@ -11,7 +11,6 @@ import java.util.List; * @dscription * @date 2020/5/11 15:33 */ -@NoArgsConstructor @Data public class ProjectDetailResultDTO implements Serializable { diff --git a/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/OperCrmOpenFeignClient.java b/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/OperCrmOpenFeignClient.java index f4dec72cac..0f4313dfad 100644 --- a/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/OperCrmOpenFeignClient.java +++ b/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/OperCrmOpenFeignClient.java @@ -122,13 +122,4 @@ public interface OperCrmOpenFeignClient { **/ @GetMapping("/oper/crm/customer/getallsubcustomerids/{customerId}") Result> getAllSubCustomerIds(@PathVariable("customerId") String customerId); - - /** - * @Description 根据客户id列出该客户所有的apiService - * @return - * @author wxz - * @date 2021.03.15 15:13 - */ - @PostMapping("list-apiservice-by-customerid") - Result> listApiServiceByCustomerId(@RequestBody ApiServiceFormDTO form); } diff --git a/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/fallback/OperCrmOpenFeignClientFallback.java b/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/fallback/OperCrmOpenFeignClientFallback.java index 134ffcb242..5de09ce167 100644 --- a/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/fallback/OperCrmOpenFeignClientFallback.java +++ b/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/feign/fallback/OperCrmOpenFeignClientFallback.java @@ -95,9 +95,4 @@ public class OperCrmOpenFeignClientFallback implements OperCrmOpenFeignClient { public Result> getAllSubCustomerIds(String customerId) { return ModuleUtils.feignConError(ServiceConstant.OPER_CRM_SERVER, "getAllSubCustomerIds", customerId); } - - @Override - public Result> listApiServiceByCustomerId(ApiServiceFormDTO form) { - return ModuleUtils.feignConError(ServiceConstant.OPER_CRM_SERVER, "listApiServiceByCustomerId", form); - } } diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java index 461c06f3f6..c5330a9abd 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java @@ -376,17 +376,4 @@ public class CustomerController { } return new Result<>(); } - - /** - * @Description 根据客户id列出该客户所有的apiService - * @return - * @author wxz - * @date 2021.03.15 15:13 - */ - @PostMapping("list-apiservice-by-customerid") - public Result> listApiServiceByCustomerId(@RequestBody ApiServiceFormDTO form) { - ValidatorUtils.validateEntity(form, ApiServiceFormDTO.GetByCustomerId.class); - String customerId = form.getCustomerId(); - return new Result>().ok(customerThirdplatApiServiceService.listByCustomerId(customerId)); - } } diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerThirdplatApiServiceService.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerThirdplatApiServiceService.java index eb6adbe6ec..59a9876535 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerThirdplatApiServiceService.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerThirdplatApiServiceService.java @@ -15,11 +15,4 @@ public interface CustomerThirdplatApiServiceService { */ ThirdplatApiserviceResultDTO getByCustomerId(String customerId); - /** - * 根据客户id列出第三方平台列表 - * @param customerId - * @return - */ - List listByCustomerId(String customerId); - } diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerThirdplatApiServiceServiceImpl.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerThirdplatApiServiceServiceImpl.java index 9613f30f60..f5ff00ca39 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerThirdplatApiServiceServiceImpl.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerThirdplatApiServiceServiceImpl.java @@ -25,10 +25,6 @@ public class CustomerThirdplatApiServiceServiceImpl implements CustomerThirdplat @Autowired private CustomerThirdplatApiserviceDao thirdplatApiserviceDao; - @Autowired - private RedisTemplate tpasRedisTemplate; - - @Override public ThirdplatApiserviceResultDTO getByCustomerId(String customerId) { ThirdplatApiserviceResultDTO apiService = null; @@ -46,16 +42,4 @@ public class CustomerThirdplatApiServiceServiceImpl implements CustomerThirdplat return apiService; } - - @Override - public List listByCustomerId(String customerId) { - List apiServices = tpasRedisTemplate.opsForList().range(RedisKeys.listCustomerApiServiceListKey(customerId), 0, -1); - if (!CollectionUtils.isEmpty(apiServices)) { - return apiServices; - } - - apiServices = thirdplatApiserviceDao.listByCustomerId(customerId); - tpasRedisTemplate.opsForList().rightPushAll(RedisKeys.listCustomerApiServiceListKey(customerId), apiServices); - return apiServices; - } } From 2d3231993e41169c168717fe89e1e9ba3b2c335e Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 23 Mar 2021 09:37:51 +0800 Subject: [PATCH 204/375] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E8=A1=A8=20=20=E8=BF=94=E5=9B=9E=E5=85=B7=E4=BD=93=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/UserWechatDao.xml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/UserWechatDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/UserWechatDao.xml index f59dc05973..4c2adabf2f 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/UserWechatDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/UserWechatDao.xml @@ -59,7 +59,12 @@ SELECT * - + FROM USER_WECHAT WHERE From c6e4dbcbd5420082f006e411d62879da569de138 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Tue, 23 Mar 2021 09:58:19 +0800 Subject: [PATCH 205/375] =?UTF-8?q?=E5=BB=BA=E8=A1=A8=E8=AF=AD=E5=8F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V0.0.5__gov_customer_menu.sql | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 epmet-module/gov-access/gov-access-server/src/main/resources/db/migration/V0.0.5__gov_customer_menu.sql diff --git a/epmet-module/gov-access/gov-access-server/src/main/resources/db/migration/V0.0.5__gov_customer_menu.sql b/epmet-module/gov-access/gov-access-server/src/main/resources/db/migration/V0.0.5__gov_customer_menu.sql new file mode 100644 index 0000000000..ce584ac5e9 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/resources/db/migration/V0.0.5__gov_customer_menu.sql @@ -0,0 +1,12 @@ +CREATE TABLE `gov_customer_menu` ( + `ID` varchar(32) NOT NULL COMMENT '主键ID', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', + `TABLE_ID` varchar(32) NOT NULL COMMENT 'gov_menu表主键', + `DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除、1已删除', + `REVISION` int(11) DEFAULT '0' COMMENT '乐观锁', + `CREATED_BY` varchar(32) DEFAULT NULL COMMENT '创建人', + `CREATED_TIME` datetime DEFAULT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) DEFAULT NULL COMMENT '更新人', + `UPDATED_TIME` datetime DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='客户菜单配置表'; From 6581047b40ae2508e2792fdd2167a045d533856b Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 23 Mar 2021 10:21:28 +0800 Subject: [PATCH 206/375] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E5=86=85=E6=8C=89?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E7=BB=9F=E8=AE=A1=E9=A1=B9=E7=9B=AE=E6=95=B0?= =?UTF-8?q?=E9=87=8F=20start1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/controller/DemoController.java | 21 +++++--- .../FactOriginProjectCategoryDailyDao.java | 11 +++++ ...FactOriginProjectCategoryDailyService.java | 11 +++++ ...OriginProjectCategoryDailyServiceImpl.java | 14 ++++++ ...enProjectCategoryGridDailyServiceImpl.java | 11 ++++- .../FactOriginProjectCategoryDailyDao.xml | 48 +++++++++++++++++++ 6 files changed, 108 insertions(+), 8 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java index 4bb409b6eb..85befe73c6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java @@ -2,6 +2,7 @@ package com.epmet.controller; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.Result; @@ -37,10 +38,7 @@ import com.epmet.service.evaluationindex.extract.dataToIndex.*; import com.epmet.service.evaluationindex.extract.todata.FactOriginTopicMainDailyService; import com.epmet.service.evaluationindex.extract.toscreen.*; import com.epmet.service.evaluationindex.indexcal.*; -import com.epmet.service.evaluationindex.screen.ScreenProjectGridDailyService; -import com.epmet.service.evaluationindex.screen.ScreenProjectOrgDailyService; -import com.epmet.service.evaluationindex.screen.ScreenProjectQuantityGridMonthlyService; -import com.epmet.service.evaluationindex.screen.ScreenProjectQuantityOrgMonthlyService; +import com.epmet.service.evaluationindex.screen.*; import com.epmet.service.stats.DimAgencyService; import com.epmet.service.stats.DimCustomerPartymemberService; import lombok.extern.slf4j.Slf4j; @@ -49,6 +47,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.math.BigDecimal; +import java.time.LocalDate; import java.time.LocalDateTime; import java.util.List; import java.util.concurrent.ExecutionException; @@ -103,6 +102,11 @@ public class DemoController { private GovernRankDataExtractService governRankDataExtractService; @Autowired private OrgRankExtractService orgRankExtractService; + @Autowired + private ScreenProjectSettleService screenProjectSettleService; + @Autowired + private ScreenProjectCategoryGridDailyService projectCategoryGridDailyService; + @GetMapping("testAlarm") public void testAlarm() { //for (int i = 0; i < 20; i++) { @@ -815,8 +819,6 @@ public class DemoController { return new Result(); }*/ - @Autowired - private ScreenProjectSettleService screenProjectSettleService; @PostMapping("project-test") public Result project(@RequestBody ScreenCentralZoneDataFormDTO param){ screenProjectSettleService.extractScreenData(param); @@ -828,4 +830,11 @@ public class DemoController { System.out.println(monthId); } } + + @PostMapping("extractProjectCategoryData") + public Result extractProjectCategoryData(@RequestParam("customerId") String customerId){ + String dateId = LocalDate.now().minusDays(NumConstant.ONE).toString().replace("-", ""); + projectCategoryGridDailyService.extractProjectCategoryData(customerId,dateId); + return new Result(); + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectCategoryDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectCategoryDailyDao.java index 537468724a..010004d7ba 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectCategoryDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectCategoryDailyDao.java @@ -18,10 +18,13 @@ package com.epmet.dao.evaluationindex.extract; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screen.ScreenProjectCategoryGridDailyDTO; import com.epmet.entity.evaluationindex.extract.FactOriginProjectCategoryDailyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.util.List; + /** * 项目所属分类表 * @@ -32,4 +35,12 @@ import org.apache.ibatis.annotations.Param; public interface FactOriginProjectCategoryDailyDao extends BaseDao { void deleteOldData(@Param("customerId") String customerId,@Param("dateId") String dateId); + + /** + * @param customerId + * @author yinzuomei + * @description 计算当前客户下,各个网格内,各项目分类下项目数量 + * @Date 2021/3/23 9:58 + **/ + List selectListProjectCategoryGridDailyDTO(@Param("customerId") String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectCategoryDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectCategoryDailyService.java index 70b5a73adb..1a0a27eda9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectCategoryDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectCategoryDailyService.java @@ -19,8 +19,11 @@ package com.epmet.service.evaluationindex.extract.todata; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.dto.extract.form.ExtractOriginFormDTO; +import com.epmet.dto.screen.ScreenProjectCategoryGridDailyDTO; import com.epmet.entity.evaluationindex.extract.FactOriginProjectCategoryDailyEntity; +import java.util.List; + /** * 项目所属分类表 * @@ -36,4 +39,12 @@ public interface FactOriginProjectCategoryDailyService extends BaseService selectListProjectCategoryGridDailyDTO(String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectCategoryDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectCategoryDailyServiceImpl.java index 3f9a27c34b..c97322b4b4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectCategoryDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectCategoryDailyServiceImpl.java @@ -25,6 +25,7 @@ import com.epmet.constant.DataSourceConstant; import com.epmet.dao.evaluationindex.extract.FactOriginProjectCategoryDailyDao; import com.epmet.dto.ProjectCategoryDTO; import com.epmet.dto.extract.form.ExtractOriginFormDTO; +import com.epmet.dto.screen.ScreenProjectCategoryGridDailyDTO; import com.epmet.entity.evaluationindex.extract.FactOriginProjectCategoryDailyEntity; import com.epmet.entity.issue.IssueProjectCategoryDictEntity; import com.epmet.service.Issue.IssueProjectCategoryDictService; @@ -105,4 +106,17 @@ public class FactOriginProjectCategoryDailyServiceImpl extends BaseServiceImpl selectListProjectCategoryGridDailyDTO(String customerId) { + List list=baseDao.selectListProjectCategoryGridDailyDTO(customerId); + return list; + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java index a7be71b6ae..5901e47b35 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java @@ -30,8 +30,11 @@ import com.epmet.dao.evaluationindex.screen.ScreenProjectCategoryGridDailyDao; import com.epmet.dto.screen.ScreenProjectCategoryGridDailyDTO; import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.entity.evaluationindex.screen.ScreenProjectCategoryGridDailyEntity; +import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectCategoryDailyService; import com.epmet.service.evaluationindex.screen.ScreenProjectCategoryGridDailyService; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; @@ -46,10 +49,12 @@ import java.util.Map; * @author generator generator@elink-cn.com * @since v1.0.0 2021-02-23 */ +@Slf4j @Service @DataSource(DataSourceConstant.EVALUATION_INDEX) public class ScreenProjectCategoryGridDailyServiceImpl extends BaseServiceImpl implements ScreenProjectCategoryGridDailyService { - + @Autowired + private FactOriginProjectCategoryDailyService factOriginProjectCategoryDailyService; @Override public PageData page(Map params) { @@ -138,7 +143,9 @@ public class ScreenProjectCategoryGridDailyServiceImpl extends BaseServiceImpl listDTO= factOriginProjectCategoryDailyService.selectListProjectCategoryGridDailyDTO(customerId); + boolean insertRes=insertBatch(ConvertUtils.sourceToTarget(listDTO, ScreenProjectCategoryGridDailyEntity.class)); + log.info("insertRes is {}",insertRes); } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectCategoryDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectCategoryDailyDao.xml index 73b0945d0b..451acb81d5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectCategoryDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectCategoryDailyDao.xml @@ -14,4 +14,52 @@ + + + From fc3952b77aa2b197e2f9f250dc813152f0ad1a5d Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 23 Mar 2021 10:34:28 +0800 Subject: [PATCH 207/375] =?UTF-8?q?=E5=90=AF=E7=94=A8=E3=80=81=E7=A6=81?= =?UTF-8?q?=E7=94=A8=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IssueProjectCategoryDictController.java | 15 ++++---- .../dao/IssueProjectCategoryDictDao.java | 11 ++++++ .../IssueProjectCategoryDictService.java | 7 ++-- .../IssueProjectCategoryDictServiceImpl.java | 33 +++++++++++++++-- .../mapper/IssueProjectCategoryDictDao.xml | 25 +++++++++++-- .../dto/form/IsDisableCategoryFormDTO.java | 36 +++++++++++++++++++ 6 files changed, 112 insertions(+), 15 deletions(-) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IsDisableCategoryFormDTO.java diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java index 484636d73f..bc6a3607c6 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java @@ -28,16 +28,14 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IssueProjectCategoryDictDTO; -import com.epmet.dto.form.CategoryTagInitFormDTO; -import com.epmet.dto.form.DelCategoryFormDTO; -import com.epmet.dto.form.IssueProjectCategoryDictListFormDTO; -import com.epmet.dto.form.ProjectSaveCategoryFormDTO; +import com.epmet.dto.form.*; import com.epmet.dto.result.CustomerCategoryListResultDTO; import com.epmet.dto.result.ProjectIssueCategoryResultDTO; import com.epmet.excel.IssueProjectCategoryDictExcel; import com.epmet.project.dto.CustomerCategoryDTO; import com.epmet.project.dto.result.ProjectCategoryDictResultDTO; import com.epmet.service.IssueProjectCategoryDictService; +import com.epmet.utils.ModuleConstants; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -154,8 +152,13 @@ public class IssueProjectCategoryDictController { * @Author sun **/ @PostMapping("isdisablecategory") - public Result isDisableCategory(@RequestBody ProjectSaveCategoryFormDTO formDTO) { - return new Result().ok(issueProjectCategoryDictService.isDisableCategory(formDTO)); + public Result isDisableCategory(@RequestBody IsDisableCategoryFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, IsDisableCategoryFormDTO.IsDisableCategory.class); + if(!ModuleConstants.ID_ENABLE.equals(formDTO.getType())&&!ModuleConstants.IS_DISABLE.equals(formDTO.getType())){ + throw new RuntimeException("参数错误,操作类型值错误!"); + } + issueProjectCategoryDictService.isDisableCategory(formDTO); + return new Result(); } /** diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java index 45ec49e689..6698b28722 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java @@ -20,6 +20,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.IssueProjectCategoryDictDTO; import com.epmet.dto.form.DelCategoryFormDTO; +import com.epmet.dto.form.IsDisableCategoryFormDTO; import com.epmet.dto.form.IssueProjectCategoryDictListFormDTO; import com.epmet.dto.result.CustomerCategoryListResultDTO; import com.epmet.entity.IssueProjectCategoryDictEntity; @@ -101,5 +102,15 @@ public interface IssueProjectCategoryDictDao extends BaseDao selectSubCustomerCategoryDict(@Param("customerId") String customerId, @Param("pid") String pid); + /** + * 批量修改分类启用、禁用状态 + * @author sun + */ + int updateCustomerCategory(IsDisableCategoryFormDTO formDTO); } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java index 067c0a059d..55fc4871c3 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java @@ -20,10 +20,7 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IssueProjectCategoryDictDTO; -import com.epmet.dto.form.CategoryTagInitFormDTO; -import com.epmet.dto.form.DelCategoryFormDTO; -import com.epmet.dto.form.IssueProjectCategoryDictListFormDTO; -import com.epmet.dto.form.ProjectSaveCategoryFormDTO; +import com.epmet.dto.form.*; import com.epmet.dto.result.CustomerCategoryListResultDTO; import com.epmet.dto.result.ProjectIssueCategoryResultDTO; import com.epmet.entity.IssueProjectCategoryDictEntity; @@ -137,7 +134,7 @@ public interface IssueProjectCategoryDictService extends BaseService categoryList = new ArrayList<>(); + //待修改的二级分类Id汇总 + List secondList = new ArrayList<>(); + if("1".equals(dto.getCategoryType())){ + //2-1.查询子类信息 + List subList = baseDao.selectSubCustomerCategoryDict(formDTO.getCustomerId(),formDTO.getCategoryId()); + secondList = subList.stream().map(sub->sub.getId()).collect(Collectors.toList()); + categoryList.add(formDTO.getCategoryId()); + }else { + secondList.add(formDTO.getCategoryId()); + } + categoryList.addAll(secondList); + formDTO.setCategoryList(categoryList); + + //3.修改标签、分类表数据状态 + if(baseDao.updateCustomerCategory(formDTO)%s,分类Id->%s", formDTO.getCustomerId(), formDTO.getCategoryId())); + throw new RuntimeException("分类信息修改失败!"); + } + //4.修改缓存中标签状态 todo } @@ -231,6 +259,7 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl + + UPDATE issue_project_category_dict - SET DEL_FLAG = '1' + SET del_flag = '1' WHERE - CUSTOMER_ID = #{customerId} + customer_id = #{customerId} AND id = #{categoryId} @@ -138,4 +149,14 @@ + + UPDATE issue_project_category_dict + SET is_disable = #{type} + WHERE + customer_id = #{customerId} + + id = #{ids} + + + diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IsDisableCategoryFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IsDisableCategoryFormDTO.java new file mode 100644 index 0000000000..e259fd81a9 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IsDisableCategoryFormDTO.java @@ -0,0 +1,36 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.List; + +/** + * 议题:保存/修改分类-接口入参 + * @Author sun + */ +@Data +public class IsDisableCategoryFormDTO implements Serializable { + + private static final long serialVersionUID = 2599592072265715951L; + public interface IsDisableCategory{} + /** + * 客户Id + */ + @NotBlank(message = "客户ID不能为空",groups = {IsDisableCategory.class}) + private String customerId; + /** + * 分类Id + */ + @NotBlank(message = "分类ID不能为空",groups = {IsDisableCategory.class}) + private String categoryId; + /** + * 操作类型(启用:enable 禁用:disable) + */ + @NotBlank(message = "是否启用类型不能为空",groups = {IsDisableCategory.class}) + private String type; + + private List categoryList; + +} From a1636d49336f9fe855d9c7d9b09b36304999efb2 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 23 Mar 2021 10:39:10 +0800 Subject: [PATCH 208/375] =?UTF-8?q?=E5=8A=A0=E5=BC=BA=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/commons/tools/filter/LogMsgSendFilter.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/filter/LogMsgSendFilter.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/filter/LogMsgSendFilter.java index 942e4a6570..0651951d56 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/filter/LogMsgSendFilter.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/filter/LogMsgSendFilter.java @@ -123,6 +123,9 @@ public class LogMsgSendFilter extends LevelFilter { try { if (serverIp == null) { InetUtils inetUtils = SpringContextUtils.getBean(InetUtils.class); + if (inetUtils.findFirstNonLoopbackHostInfo() == null){ + return; + } serverIp = inetUtils.findFirstNonLoopbackHostInfo().getIpAddress(); } } catch (Exception e) { From c779d674bc3c2b82d09b7e18362c882fbc958d40 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 23 Mar 2021 10:53:30 +0800 Subject: [PATCH 209/375] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E5=86=85=E6=8C=89?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E7=BB=9F=E8=AE=A1=E9=A1=B9=E7=9B=AE=E6=95=B0?= =?UTF-8?q?=E9=87=8F=20start2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/controller/DemoController.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java index 85befe73c6..720b3d9a23 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java @@ -35,6 +35,7 @@ import com.epmet.entity.stats.DimDateEntity; import com.epmet.entity.stats.DimMonthEntity; import com.epmet.service.StatsDemoService; import com.epmet.service.evaluationindex.extract.dataToIndex.*; +import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectCategoryDailyService; import com.epmet.service.evaluationindex.extract.todata.FactOriginTopicMainDailyService; import com.epmet.service.evaluationindex.extract.toscreen.*; import com.epmet.service.evaluationindex.indexcal.*; @@ -106,6 +107,8 @@ public class DemoController { private ScreenProjectSettleService screenProjectSettleService; @Autowired private ScreenProjectCategoryGridDailyService projectCategoryGridDailyService; + @Autowired + private FactOriginProjectCategoryDailyService originProjectCategoryDailyService; @GetMapping("testAlarm") public void testAlarm() { @@ -831,10 +834,29 @@ public class DemoController { } } + /** + * @return com.epmet.commons.tools.utils.Result + * @param customerId + * @author yinzuomei + * @description 产品内部计算:网格内按分类统计项目数量 + * @Date 2021/3/23 10:52 + **/ @PostMapping("extractProjectCategoryData") public Result extractProjectCategoryData(@RequestParam("customerId") String customerId){ String dateId = LocalDate.now().minusDays(NumConstant.ONE).toString().replace("-", ""); projectCategoryGridDailyService.extractProjectCategoryData(customerId,dateId); return new Result(); } + + /** + * @return com.epmet.commons.tools.utils.Result + * @author yinzuomei + * @description 将epmet_gov_project库中的项目分类信息(project_category)同步到统计库epmet_data_statistical + * @Date 2021/3/23 10:52 + **/ + @PostMapping("extractProjectCategory") + public Result extractProjectCategory(@RequestBody ExtractOriginFormDTO formDTO){ + originProjectCategoryDailyService.extractProjectCategory(formDTO); + return new Result(); + } } From c72cf84966b4995d56d4fb512b4d30669b3497dd Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 23 Mar 2021 11:03:54 +0800 Subject: [PATCH 210/375] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dao/crm/CustomerRelationDao.java | 8 ++ .../service/crm/CustomerRelationService.java | 10 +++ .../crm/impl/CustomerRelationServiceImpl.java | 16 ++++ .../ScreenProjectCategoryOrgDailyService.java | 9 +++ ...eenProjectCategoryOrgDailyServiceImpl.java | 74 +++++++++++++++++++ .../mapper/crm/CustomerRelationDao.xml | 5 ++ 6 files changed, 122 insertions(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/crm/CustomerRelationDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/crm/CustomerRelationDao.java index fabee946e7..11ec9c119c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/crm/CustomerRelationDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/crm/CustomerRelationDao.java @@ -43,4 +43,12 @@ public interface CustomerRelationDao extends BaseDao { CustomerSubInfoDTO selectCustomerSubInfo(@Param("customerId")String customerId); List selectListByPids(String customerId); + + /** + * @Description 查询子级客户 + * @Param customerId + * @author zxc + * @date 2021/3/23 上午10:21 + */ + List selectSubCustomer(@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/service/crm/CustomerRelationService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/CustomerRelationService.java index f139c49bab..4c2a37620f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/CustomerRelationService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/CustomerRelationService.java @@ -22,6 +22,8 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.dto.indexcal.CustomerSubInfoDTO; import com.epmet.entity.crm.CustomerRelationEntity; +import java.util.List; + /** * 客户关系表(01.14 add) * @@ -40,4 +42,12 @@ public interface CustomerRelationService extends BaseService selectSubCustomer(String customerId); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/impl/CustomerRelationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/impl/CustomerRelationServiceImpl.java index cab6ed0adc..06d2b580fc 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/impl/CustomerRelationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/impl/CustomerRelationServiceImpl.java @@ -27,9 +27,11 @@ import com.epmet.entity.crm.CustomerRelationEntity; import com.epmet.service.crm.CustomerRelationService; import com.epmet.service.stats.DimCustomerService; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.ArrayList; import java.util.List; /** @@ -70,4 +72,18 @@ public class CustomerRelationServiceImpl extends BaseServiceImpl selectSubCustomer(String customerId) { + if (StringUtils.isEmpty(customerId)){ + return new ArrayList<>(); + } + return baseDao.selectSubCustomer(customerId); + } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectCategoryOrgDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectCategoryOrgDailyService.java index ce71722794..150c15a0d4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectCategoryOrgDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectCategoryOrgDailyService.java @@ -102,4 +102,13 @@ public interface ScreenProjectCategoryOrgDailyService extends BaseService param); + + /** + * @Description 按组织计算分类统计项目数量 + * @Param customerId + * @Param dateId + * @author zxc + * @date 2021/3/23 上午10:07 + */ + void extractProjectCategoryOrgData(String customerId, String dateId); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java index 5660fad150..c9af2a289c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java @@ -29,14 +29,19 @@ import com.epmet.constant.DataSourceConstant; import com.epmet.dao.evaluationindex.screen.ScreenProjectCategoryOrgDailyDao; import com.epmet.dto.screen.ScreenProjectCategoryOrgDailyDTO; import com.epmet.dto.screencoll.ScreenCollFormDTO; +import com.epmet.entity.crm.CustomerRelationEntity; import com.epmet.entity.evaluationindex.screen.ScreenProjectCategoryOrgDailyEntity; +import com.epmet.service.crm.CustomerRelationService; import com.epmet.service.evaluationindex.screen.ScreenProjectCategoryOrgDailyService; import com.google.common.collect.Lists; +import org.apache.commons.collections4.ListUtils; import org.apache.commons.lang3.StringUtils; +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.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; @@ -51,6 +56,8 @@ import java.util.Map; @DataSource(DataSourceConstant.EVALUATION_INDEX) public class ScreenProjectCategoryOrgDailyServiceImpl extends BaseServiceImpl implements ScreenProjectCategoryOrgDailyService { + @Autowired + private CustomerRelationService relationService; @Override public PageData page(Map params) { @@ -131,4 +138,71 @@ public class ScreenProjectCategoryOrgDailyServiceImpl extends BaseServiceImpl needInsert = new ArrayList<>(); + // 先查询有无子客户 + List relationInfo = relationService.selectSubCustomer(customerId); + if (CollectionUtils.isEmpty(relationInfo)){ + needInsert = disposeOneCustomer(customerId, dateId); + }else { + needInsert = disposeMoreCustomer(customerId,dateId,relationInfo); + } + deleteAndInsert(customerId,dateId,needInsert); + } + + /** + * @Description 单客户处理 + * @Param customerId + * @Param dateId + * @author zxc + * @date 2021/3/23 上午10:40 + */ + private List disposeOneCustomer(String customerId, String dateId){ + + return new ArrayList<>(); + } + + /** + * @Description 多客户处理 + * @Param customerId + * @Param dateId + * @Param relationInfo 子级客户信息 + * @author zxc + * @date 2021/3/23 上午10:40 + */ + private List disposeMoreCustomer(String customerId, String dateId,List relationInfo){ + + return new ArrayList<>(); + } + + /** + * @Description 删除和新增 + * @Param customerId + * @Param dateId + * @author zxc + * @date 2021/3/23 上午10:52 + */ + @Transactional(rollbackFor = Exception.class) + public void deleteAndInsert(String customerId, String dateId, List needInsert){ + if (CollectionUtils.isEmpty(needInsert)){ + return; + } + Integer row = NumConstant.ZERO; + do { + row = baseDao.deleteByDateIdAndCustomerId(customerId, dateId); + }while (row > NumConstant.ZERO && row == NumConstant.ONE_THOUSAND); + List> partition = ListUtils.partition(needInsert, NumConstant.ONE_HUNDRED); + partition.forEach(p -> { + insertBatch(p); + }); + } + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/crm/CustomerRelationDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/crm/CustomerRelationDao.xml index 88c12c8deb..fad1ca0443 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/crm/CustomerRelationDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/crm/CustomerRelationDao.xml @@ -34,4 +34,9 @@ #{customerId}, '%') + + + \ No newline at end of file From 7477d6f536ac585a4607e37d254f380a93adc116 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 23 Mar 2021 11:15:02 +0800 Subject: [PATCH 211/375] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E3=80=81=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E5=AF=B9=E5=BA=94=E7=9A=84=E5=88=86=E7=B1=BB=E3=80=81?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E5=85=B3=E7=B3=BB=E8=A1=A8=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E5=A4=9A=E4=BD=99=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dataaggre/dto/govproject/ProjectCategoryDTO.java | 5 ----- .../com/epmet/dataaggre/dto/govproject/ProjectTagsDTO.java | 5 ----- .../main/java/com/epmet/dto/project/ProjectCategoryDTO.java | 5 ----- .../src/main/java/com/epmet/dto/IssueCategoryDTO.java | 5 ----- .../src/main/java/com/epmet/dto/IssueTagsDTO.java | 5 ----- .../src/main/java/com/epmet/dto/form/IssueTagsFormDTO.java | 5 ----- .../src/main/java/com/epmet/entity/IssueCategoryEntity.java | 5 ----- .../src/main/java/com/epmet/entity/IssueTagsEntity.java | 5 ----- .../com/epmet/service/impl/IssueCategoryServiceImpl.java | 1 - .../java/com/epmet/service/impl/IssueTagsServiceImpl.java | 1 - .../db/migration/V0.0.12__del_category_tag_field.sql | 4 ++++ .../src/main/resources/mapper/IssueTagsDao.xml | 3 +-- .../src/main/java/com/epmet/dto/ProjectCategoryDTO.java | 5 ----- .../src/main/java/com/epmet/dto/ProjectTagsDTO.java | 5 ----- .../main/java/com/epmet/entity/ProjectCategoryEntity.java | 5 ----- .../src/main/java/com/epmet/entity/ProjectTagsEntity.java | 5 ----- .../com/epmet/service/impl/ProjectCategoryServiceImpl.java | 1 - .../db/migration/V0.0.8__del_category_tag_field.sql | 4 ++++ 18 files changed, 9 insertions(+), 65 deletions(-) create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.12__del_category_tag_field.sql create mode 100644 epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.8__del_category_tag_field.sql diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectCategoryDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectCategoryDTO.java index a4d6c1f284..752262827e 100644 --- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectCategoryDTO.java +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectCategoryDTO.java @@ -69,11 +69,6 @@ public class ProjectCategoryDTO implements Serializable { */ private String categoryCode; - /** - * 是否禁用(enable:启用 disable:禁用) - */ - private String isDisable; - /** * 删除标识 0未删除、1已删除 */ diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectTagsDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectTagsDTO.java index 9873ed3ddd..60f01c7299 100644 --- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectTagsDTO.java +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectTagsDTO.java @@ -58,11 +58,6 @@ public class ProjectTagsDTO implements Serializable { */ private String tagName; - /** - * 是否禁用(enable:启用 disable:禁用) - */ - private String isDisable; - /** * 删除标识 0.未删除 1.已删除 */ diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/ProjectCategoryDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/ProjectCategoryDTO.java index 07ab948199..8977da4ee3 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/ProjectCategoryDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/ProjectCategoryDTO.java @@ -69,11 +69,6 @@ public class ProjectCategoryDTO implements Serializable { */ private String categoryCode; - /** - * 是否禁用(enable:启用 disable:禁用) - */ - private String isDisable; - /** * 删除标识 0未删除、1已删除 */ diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueCategoryDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueCategoryDTO.java index 06d1f9d07d..fd33177b01 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueCategoryDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueCategoryDTO.java @@ -68,11 +68,6 @@ public class IssueCategoryDTO implements Serializable { */ private String categoryCode; - /** - * 是否禁用(enable:启用 disable:禁用) - */ - private String isDisable; - /** * 删除标识 0未删除、1已删除 */ diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueTagsDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueTagsDTO.java index 87e464f4db..6ca1c51c6a 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueTagsDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueTagsDTO.java @@ -63,11 +63,6 @@ public class IssueTagsDTO implements Serializable { */ private String tagName; - /** - * 是否禁用(enable:启用 disable:禁用) - */ - private String isDisable; - /** * 删除标识 0.未删除 1.已删除 */ diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueTagsFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueTagsFormDTO.java index 908edfba19..8cb89dc4d7 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueTagsFormDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueTagsFormDTO.java @@ -43,11 +43,6 @@ public class IssueTagsFormDTO implements Serializable { */ private String name; - /** - * 是否禁用(enable:启用 disable:禁用) - */ - private String isDisable; - /** * 删除标识 0.未删除 1.已删除 */ diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueCategoryEntity.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueCategoryEntity.java index 4f92ac6e6b..f0478e560f 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueCategoryEntity.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueCategoryEntity.java @@ -68,9 +68,4 @@ public class IssueCategoryEntity extends BaseEpmetEntity { */ private String categoryCode; - /** - * 是否禁用(enable:启用 disable:禁用) - */ - private String isDisable; - } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueTagsEntity.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueTagsEntity.java index 0933fa1402..1dc56255fc 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueTagsEntity.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueTagsEntity.java @@ -63,9 +63,4 @@ public class IssueTagsEntity extends BaseEpmetEntity { */ private String tagName; - /** - * 是否禁用(enable:启用 disable:禁用) - */ - private String isDisable; - } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java index 2ca1c6a005..c86e5d926d 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java @@ -209,7 +209,6 @@ public class IssueCategoryServiceImpl extends BaseServiceImpl - INSERT INTO issue_tags ( ID, CUSTOMER_ID, GRID_ID, ISSUE_ID, TAG_ID, TAG_NAME, IS_DISABLE, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME ) + INSERT INTO issue_tags ( ID, CUSTOMER_ID, GRID_ID, ISSUE_ID, TAG_ID, TAG_NAME, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME ) VALUES ( @@ -80,7 +80,6 @@ #{l.issueId}, #{l.tagId}, #{l.name}, - #{l.isDisable}, #{l.delFlag}, #{l.revision}, #{l.createdBy}, diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectCategoryDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectCategoryDTO.java index e04ce6da98..cbce91656e 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectCategoryDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectCategoryDTO.java @@ -68,11 +68,6 @@ public class ProjectCategoryDTO implements Serializable { */ private String categoryCode; - /** - * 是否禁用(enable:启用 disable:禁用) - */ - private String isDisable; - /** * 删除标识 0未删除、1已删除 */ diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectTagsDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectTagsDTO.java index 30a3cf75d6..1cc47c4bb6 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectTagsDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectTagsDTO.java @@ -58,11 +58,6 @@ public class ProjectTagsDTO implements Serializable { */ private String tagName; - /** - * 是否禁用(enable:启用 disable:禁用) - */ - private String isDisable; - /** * 删除标识 0.未删除 1.已删除 */ diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectCategoryEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectCategoryEntity.java index 5a9fff63dc..f1fc7eb4e8 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectCategoryEntity.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectCategoryEntity.java @@ -68,9 +68,4 @@ public class ProjectCategoryEntity extends BaseEpmetEntity { */ private String categoryCode; - /** - * 是否禁用(enable:启用 disable:禁用) - */ - private String isDisable; - } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectTagsEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectTagsEntity.java index 2917f7e5e8..12febddfea 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectTagsEntity.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectTagsEntity.java @@ -58,9 +58,4 @@ public class ProjectTagsEntity extends BaseEpmetEntity { */ private String tagName; - /** - * 是否禁用(enable:启用 disable:禁用) - */ - private String isDisable; - } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectCategoryServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectCategoryServiceImpl.java index 4562835095..022e777d9a 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectCategoryServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectCategoryServiceImpl.java @@ -177,7 +177,6 @@ public class ProjectCategoryServiceImpl extends BaseServiceImpl Date: Tue, 23 Mar 2021 13:20:09 +0800 Subject: [PATCH 212/375] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E5=86=85=E6=8C=89?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E7=BB=9F=E8=AE=A1=E9=A1=B9=E7=9B=AE=E6=95=B0?= =?UTF-8?q?=E9=87=8F=20start3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java | 3 +++ .../extract/FactOriginProjectCategoryDailyDao.xml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java index 5901e47b35..3a8752e20e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryGridDailyServiceImpl.java @@ -144,6 +144,9 @@ public class ScreenProjectCategoryGridDailyServiceImpl extends BaseServiceImpl listDTO= factOriginProjectCategoryDailyService.selectListProjectCategoryGridDailyDTO(customerId); + listDTO.forEach(dto->{ + dto.setDateId(dateId); + }); boolean insertRes=insertBatch(ConvertUtils.sourceToTarget(listDTO, ScreenProjectCategoryGridDailyEntity.class)); log.info("insertRes is {}",insertRes); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectCategoryDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectCategoryDailyDao.xml index 451acb81d5..7836274c05 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectCategoryDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectCategoryDailyDao.xml @@ -43,7 +43,7 @@ SELECT c.CUSTOMER_ID, left(c.CATEGORY_CODE, 4) as CATEGORY_CODE, - c.`LEVEL`, + '1'as `LEVEL`, p.GRID_ID, p.AGENCY_ID AS PID, P.PIDS, From 4fa14db16bd61ad9da5983e26a9fd72cbf36e81b Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 23 Mar 2021 13:37:28 +0800 Subject: [PATCH 213/375] =?UTF-8?q?=E8=A7=A3=E5=86=B3sql=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=86=B2=E7=AA=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ..._category_tag_field.sql => V0.0.9__del_category_tag_field.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/{V0.0.8__del_category_tag_field.sql => V0.0.9__del_category_tag_field.sql} (100%) diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.8__del_category_tag_field.sql b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.9__del_category_tag_field.sql similarity index 100% rename from epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.8__del_category_tag_field.sql rename to epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.9__del_category_tag_field.sql From b5f2aab02997ed9e718f20ea9b95304d580ed49d Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 23 Mar 2021 13:56:07 +0800 Subject: [PATCH 214/375] =?UTF-8?q?/data/report/project/categorydict?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/project/ProjectController.java | 11 ++++------- .../datareport/service/project/ProjectService.java | 4 ++-- .../service/project/impl/ProjectServiceImpl.java | 8 ++++---- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java index 2bb49d5c25..2f704b6b16 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java @@ -16,10 +16,7 @@ import com.epmet.project.dto.form.DifficultyRankFormDTO; import com.epmet.project.dto.form.ProjectIncrTrendFormDTO; import com.epmet.project.dto.result.*; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import java.util.List; @@ -134,13 +131,13 @@ public class ProjectController { * 002、项目分类字典查询 * 查询当前客户的父客户下,项目分类字典 * - * @param tokenDto + * @param customerId * @return com.epmet.commons.tools.utils.Result> * @Author zhangyong * @Date 10:41 2021-03-22 **/ @PostMapping("categorydict") - public Result> categoryDict(@LoginUser TokenDto tokenDto) { - return new Result>().ok(projectService.getCategoryDict(tokenDto)); + public Result> categoryDict(@RequestHeader("CustomerId") String customerId) { + return new Result>().ok(projectService.getCategoryDict(customerId)); } } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/ProjectService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/ProjectService.java index bb2ffedd9c..917113fe12 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/ProjectService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/ProjectService.java @@ -74,10 +74,10 @@ public interface ProjectService { /** * 002、项目分类字典查询 * - * @param tokenDto + * @param customerId * @return java.util.List * @Author zhangyong * @Date 14:26 2021-03-22 **/ - List getCategoryDict(TokenDto tokenDto); + List getCategoryDict(String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java index 4da82573c9..4d2df70470 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java @@ -358,12 +358,12 @@ public class ProjectServiceImpl implements ProjectService { } @Override - public List getCategoryDict(TokenDto tokenDto) { + public List getCategoryDict(String customerId) { List result = new ArrayList<>(); - Result parentCustomerId = operCrmOpenFeignClient.getExternalAndParentCustomerId(tokenDto.getCustomerId()); + Result parentCustomerId = operCrmOpenFeignClient.getExternalAndParentCustomerId(customerId); if (!parentCustomerId.success() && null == parentCustomerId.getData()) { logger.warn(String.format("调用%s服务查询外部客户的 父级客户ID 失败,入参%s", ServiceConstant.OPER_CRM_SERVER, - JSON.toJSONString(tokenDto.getCustomerId()))); + JSON.toJSONString(customerId))); return result; } CustomerCategoryDTO argDto = new CustomerCategoryDTO(); @@ -373,7 +373,7 @@ public class ProjectServiceImpl implements ProjectService { Result> parentCategoryDict = govIssueOpenFeignClient.getCustomerCategoryDict(argDto); if (!parentCategoryDict.success()) { logger.warn(String.format("调用%s服务查询当前客户的父客户下,项目分类字典失败,入参%s", ServiceConstant.GOV_ISSUE_SERVER, - JSON.toJSONString(tokenDto.getCustomerId()))); + JSON.toJSONString(customerId))); } else { result = parentCategoryDict.getData(); // 获取客户二级分类 From e391ab9b13183c1f50bad960ba01079c601f87c4 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 23 Mar 2021 14:09:22 +0800 Subject: [PATCH 215/375] =?UTF-8?q?/data/report/project/categorydict?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=B0=83=E6=95=B42?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/project/dto/result/ProjectCategoryDictResultDTO.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectCategoryDictResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectCategoryDictResultDTO.java index ca534db2a9..ad19f97e1c 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectCategoryDictResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectCategoryDictResultDTO.java @@ -1,5 +1,6 @@ package com.epmet.project.dto.result; +import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; @@ -32,10 +33,12 @@ public class ProjectCategoryDictResultDTO implements Serializable { /** * 主键 **/ + @JsonIgnore private String id; /** * 上级分类ID 顶级此列存储0 **/ + @JsonIgnore private String pid; } From 7d7975a4ae7683a626bfa719c592ed2d2d289607 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 23 Mar 2021 14:16:09 +0800 Subject: [PATCH 216/375] =?UTF-8?q?/data/report/project/categorydict?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=B0=83=E6=95=B4back?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/project/dto/result/ProjectCategoryDictResultDTO.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectCategoryDictResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectCategoryDictResultDTO.java index ad19f97e1c..ca534db2a9 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectCategoryDictResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectCategoryDictResultDTO.java @@ -1,6 +1,5 @@ package com.epmet.project.dto.result; -import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; @@ -33,12 +32,10 @@ public class ProjectCategoryDictResultDTO implements Serializable { /** * 主键 **/ - @JsonIgnore private String id; /** * 上级分类ID 顶级此列存储0 **/ - @JsonIgnore private String pid; } From b3b2e51df83211dbb50e4d1b6242e9e076f53220 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 23 Mar 2021 14:19:38 +0800 Subject: [PATCH 217/375] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E5=88=86=E7=B1=BB=E3=80=81=E6=A0=87=E7=AD=BE=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-issue/gov-issue-server/pom.xml | 6 +++ .../IssueProjectCategoryDictServiceImpl.java | 51 ++++++++++++------- .../mapper/IssueProjectCategoryDictDao.xml | 1 + 3 files changed, 39 insertions(+), 19 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/pom.xml b/epmet-module/gov-issue/gov-issue-server/pom.xml index 673a33aeb9..54a2ff009c 100644 --- a/epmet-module/gov-issue/gov-issue-server/pom.xml +++ b/epmet-module/gov-issue/gov-issue-server/pom.xml @@ -102,6 +102,12 @@ 2.0.0 compile + + com.epmet + oper-crm-client + 2.0.0 + compile + diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java index 0a9a266b67..1ba11ff550 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java @@ -30,10 +30,7 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.dao.IssueCategoryDao; import com.epmet.dao.IssueProjectCategoryDictDao; import com.epmet.dao.IssueProjectRelationDao; -import com.epmet.dto.IssueCategoryDTO; -import com.epmet.dto.IssueDTO; -import com.epmet.dto.IssueProjectCategoryDictDTO; -import com.epmet.dto.ProjectCategoryDTO; +import com.epmet.dto.*; import com.epmet.dto.form.*; import com.epmet.dto.result.CustomerCategoryListResultDTO; import com.epmet.dto.result.ProjectCategoryDTOResultDTO; @@ -42,6 +39,7 @@ import com.epmet.dto.result.ProjectIssueDTOResultDTO; import com.epmet.entity.IssueProjectCategoryDictEntity; import com.epmet.entity.IssueProjectTagDictEntity; import com.epmet.feign.GovProjectOpenFeignClient; +import com.epmet.feign.OperCrmOpenFeignClient; import com.epmet.project.dto.result.ProjectCategoryDictResultDTO; import com.epmet.redis.IssueProjectCategoryDictRedis; import com.epmet.service.IssueProjectCategoryDictService; @@ -76,11 +74,12 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl page(Map params) { @@ -199,21 +198,35 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl list = baseDao.selectCategoryListByCustomer(formDTO.getCustomerId()); - if (CollectionUtils.isEmpty(list)) { - //分类初始化 - List categoryList = baseDao.selectCategoryListByCustomer("default"); - categoryList.forEach(item -> { - item.setCustomerId(formDTO.getCustomerId()); - }); - this.insertBatch(categoryList); - //标签初始化 - List tagList = issueProjectTagDictService.getTagListByCustomer("default"); - tagList.forEach(item -> { - item.setCustomerId(formDTO.getCustomerId()); - }); - issueProjectTagDictService.insertBatch(tagList); + //2021.3.23 sun 不传客户Id时默认查询所有有效客户列表 循环添加 + List customerIdList = new ArrayList<>(); + if(StringUtils.isBlank(formDTO.getCustomerId())){ + Result> resultList = operCrmOpenFeignClient.getAllCustomerList(); + if(!resultList.success()){ + throw new RuntimeException("crm库获取有效客户列表失败!"); + } + customerIdList = resultList.getData().stream().map(cu->cu.getId()).collect(Collectors.toList()); + }else { + customerIdList.add(formDTO.getCustomerId()); } + //end sun + customerIdList.forEach(cu->{ + List list = baseDao.selectCategoryListByCustomer(formDTO.getCustomerId()); + if (CollectionUtils.isEmpty(list)) { + //分类初始化 + List categoryList = baseDao.selectCategoryListByCustomer("default"); + categoryList.forEach(item -> { + item.setCustomerId(formDTO.getCustomerId()); + }); + this.insertBatch(categoryList); + //标签初始化 + List tagList = issueProjectTagDictService.getTagListByCustomer("default"); + tagList.forEach(item -> { + item.setCustomerId(formDTO.getCustomerId()); + }); + issueProjectTagDictService.insertBatch(tagList); + } + }); } /** diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml index 7752ab2c35..4d1bc0da0b 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml @@ -46,6 +46,7 @@ ID, PID, PIDS, + PARENT_CATEGORY_CODE, CATEGORY_CODE, CATEGORY_NAME, CATEGORY_TYPE, From 945d994c15b76043b258aa1ef47f6955236ceabb Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 23 Mar 2021 14:28:30 +0800 Subject: [PATCH 218/375] =?UTF-8?q?=E6=BC=8F=E6=8F=90=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/IssueProjectCategoryDictDao.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml index 4d1bc0da0b..20f8c5cfdd 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml @@ -50,7 +50,8 @@ CATEGORY_CODE, CATEGORY_NAME, CATEGORY_TYPE, - SORT + SORT, + IS_DISABLE FROM issue_project_category_dict WHERE From b129219f2722c67272330129ebd91ef53f89360d Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 23 Mar 2021 14:35:07 +0800 Subject: [PATCH 219/375] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=AD=97=E6=AE=B5=20sql=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/IssueProjectTagDictDao.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml index ec80fe2af3..5988ddbbbd 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml @@ -77,7 +77,8 @@ CATEGORY_ID, IS_DEFAULT, ISSUE_USE_COUNT, - PROJECT_USE_COUNT + PROJECT_USE_COUNT, + IS_DISABLE FROM issue_project_tag_dict WHERE From 322701126842c472acaee3c4c3adad8bc5e24adc Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 23 Mar 2021 14:53:58 +0800 Subject: [PATCH 220/375] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/IssueProjectCategoryDictServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java index 1ba11ff550..c4faa05e5d 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java @@ -211,18 +211,18 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl{ - List list = baseDao.selectCategoryListByCustomer(formDTO.getCustomerId()); + List list = baseDao.selectCategoryListByCustomer(cu); if (CollectionUtils.isEmpty(list)) { //分类初始化 List categoryList = baseDao.selectCategoryListByCustomer("default"); categoryList.forEach(item -> { - item.setCustomerId(formDTO.getCustomerId()); + item.setCustomerId(cu); }); this.insertBatch(categoryList); //标签初始化 List tagList = issueProjectTagDictService.getTagListByCustomer("default"); tagList.forEach(item -> { - item.setCustomerId(formDTO.getCustomerId()); + item.setCustomerId(cu); }); issueProjectTagDictService.insertBatch(tagList); } From 4945189426e524eb9361764b700ee74b593c2481 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 23 Mar 2021 15:44:28 +0800 Subject: [PATCH 221/375] =?UTF-8?q?=E9=BE=99=E6=B9=BE=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=88=86=E5=B8=83=E6=8E=A5=E5=8F=A3=E9=BB=98=E8=AE=A4=E6=8C=89?= =?UTF-8?q?=E7=85=A7=E8=BD=AC=E9=A1=B9=E7=9B=AE=E6=97=B6=E9=97=B4=E9=99=8D?= =?UTF-8?q?=E5=BA=8F=E8=BF=94=E5=9B=9E=E5=89=8D20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../govproject/form/ProjectDistributionFormDTO.java | 13 +++++++++++++ .../dataaggre/service/govissue/GovIssueService.java | 2 +- .../service/govissue/impl/GovIssueServiceImpl.java | 9 +++++++-- .../govproject/impl/GovProjectServiceImpl.java | 2 +- .../src/main/resources/mapper/govissue/IssueDao.xml | 2 +- .../main/resources/mapper/govproject/ProjectDao.xml | 1 - 6 files changed, 23 insertions(+), 6 deletions(-) diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/form/ProjectDistributionFormDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/form/ProjectDistributionFormDTO.java index f1f25aeb05..4e6f37f537 100644 --- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/form/ProjectDistributionFormDTO.java +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/form/ProjectDistributionFormDTO.java @@ -13,7 +13,20 @@ import java.io.Serializable; */ @Data public class ProjectDistributionFormDTO implements Serializable { + /** + * 网格id不必填 + */ private String gridId; @NotBlank(message = "customerId不能为空") private String customerId; + + /** + * 默认1 + */ + private Integer pageNo; + + /** + * 默认20 + */ + private Integer pageSize; } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/GovIssueService.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/GovIssueService.java index b3a96f917c..5159bda48f 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/GovIssueService.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/GovIssueService.java @@ -44,5 +44,5 @@ public interface GovIssueService { **/ List closedIssueList(ClosedIssueListFormDTO fromDTO); - List selectShiftProjectIssueList(String customerId,String gridId); + List selectShiftProjectIssueList(String customerId,String gridId,Integer pageNo,Integer pageSize); } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/impl/GovIssueServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/impl/GovIssueServiceImpl.java index e379b75a38..7b68d96332 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/impl/GovIssueServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govissue/impl/GovIssueServiceImpl.java @@ -314,8 +314,13 @@ public class GovIssueServiceImpl implements GovIssueService { } @Override - public List selectShiftProjectIssueList(String customerId,String gridId) { - return issueDao.selectShiftProjectIssueList(customerId,gridId); + public List selectShiftProjectIssueList(String customerId, String gridId, Integer pageNo, Integer pageSize) { + if (pageNo != null && pageSize != null) { + PageHelper.startPage(pageNo, pageSize); + }else{ + PageHelper.startPage(NumConstant.ONE, NumConstant.TWENTY); + } + return issueDao.selectShiftProjectIssueList(customerId, gridId); } } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java index cc664bf225..abc34e5c5c 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java @@ -114,7 +114,7 @@ public class GovProjectServiceImpl implements GovProjectService { @Override public List queryProjectDistribution(ProjectDistributionFormDTO formDTO) { List resultDTOList = new ArrayList<>(); - List issueInfoDTOList = govIssueService.selectShiftProjectIssueList(formDTO.getCustomerId(), formDTO.getGridId()); + List issueInfoDTOList = govIssueService.selectShiftProjectIssueList(formDTO.getCustomerId(), formDTO.getGridId(),formDTO.getPageNo(),formDTO.getPageSize()); if (CollectionUtils.isNotEmpty(issueInfoDTOList)) { List topicIds = issueInfoDTOList.stream().map(data -> data.getTopicId()).collect(Collectors.toList()); // log.info("话题id集合:" + JSON.toJSONString(topicIds, true)); diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govissue/IssueDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govissue/IssueDao.xml index 44c2924ba8..185816c9bb 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govissue/IssueDao.xml +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govissue/IssueDao.xml @@ -122,6 +122,6 @@ AND i.GRID_ID = #{gridId} - order by i.SHIFTED_TIME desc limit 100 + order by i.SHIFTED_TIME desc \ No newline at end of file diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govproject/ProjectDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govproject/ProjectDao.xml index f171a790e3..eb4c0e2d93 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govproject/ProjectDao.xml +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govproject/ProjectDao.xml @@ -140,6 +140,5 @@ #{issueId} - order by CREATED_TIME desc limit 100 \ No newline at end of file From 25f34e8c976f51162b4ff418a570153493e3c7e1 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 23 Mar 2021 16:11:44 +0800 Subject: [PATCH 222/375] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E9=87=87=E9=9B=86api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/screen/form/CategoryDictFormDTO.java | 13 +------------ .../ScreenProjectDataCollController.java | 6 ++++-- .../stats/CustomerProjectCategoryDictService.java | 6 +++--- .../CustomerProjectCategoryDictServiceImpl.java | 14 ++++++++------ 4 files changed, 16 insertions(+), 23 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/CategoryDictFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/CategoryDictFormDTO.java index f60c33faa4..364c497eb1 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/CategoryDictFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/CategoryDictFormDTO.java @@ -1,11 +1,8 @@ package com.epmet.dto.screen.form; -import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; -import javax.validation.constraints.NotBlank; import java.io.Serializable; -import java.math.BigDecimal; /** * 项目分类字典上报 @@ -15,38 +12,31 @@ import java.math.BigDecimal; @Data public class CategoryDictFormDTO implements Serializable { - private static final long serialVersionUID = 1L; - -// public interface ExtractDailyForm extends CustomerClientShowGroup {} + private static final long serialVersionUID = 1245827825857891963L; /** * 客户内自己的分类编码 */ -// @NotBlank(message = "客户分类编码不能为空", groups = { ExtractDailyForm.class }) private String categoryCode; /** * 客户内自己的分类名称 */ -// @NotBlank(message = "客户分类名称不能为空", groups = { ExtractDailyForm.class }) private String categoryName; /** * 父类分类编码,如果是一级分类,此列赋值为0 */ -// @NotBlank(message = "父类分类编码不能为空", groups = { ExtractDailyForm.class }) private String parentCategoryCode; /** * 分类等级:1、2....; */ -// @NotBlank(message = "分类等级不能为空", groups = { ExtractDailyForm.class }) private Integer level; /** * 排序 */ -// @NotBlank(message = "排序不能为空", groups = { ExtractDailyForm.class }) private Integer sort; /** @@ -67,6 +57,5 @@ public class CategoryDictFormDTO implements Serializable { /** * 分类字典表主键 */ -// @NotBlank(message = "分类字典表主键不能为空", groups = { ExtractDailyForm.class }) private String categoryId; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java index d51ca41f31..db45cca198 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenProjectDataCollController.java @@ -163,8 +163,10 @@ public class ScreenProjectDataCollController { * @Date 16:03 2021-03-22 **/ @PostMapping("uploadcategorydict") - public Result uploadcategorydict(@RequestHeader("CustomerId") String customerId, @RequestBody CategoryDictDataFormDTO formDTO) { - customerProjectCategoryDictService.uploadCategoryDict(customerId, formDTO); + public Result uploadcategorydict(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO formDTO) { + formDTO.setCustomerId(customerId); + ValidatorUtils.validateEntity(formDTO, ScreenCollFormDTO.CustomerIdShowGroup.class, ScreenCollFormDTO.DataListShowGroup.class); + customerProjectCategoryDictService.uploadCategoryDict(formDTO); return new Result(); } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/CustomerProjectCategoryDictService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/CustomerProjectCategoryDictService.java index 1b37c9448a..ef8440c594 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/CustomerProjectCategoryDictService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/CustomerProjectCategoryDictService.java @@ -18,7 +18,8 @@ package com.epmet.service.stats; import com.epmet.commons.mybatis.service.BaseService; -import com.epmet.dto.screen.CategoryDictDataFormDTO; +import com.epmet.dto.screen.form.CategoryDictFormDTO; +import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.entity.issue.IssueProjectCategoryDictEntity; import com.epmet.entity.stats.CustomerProjectCategoryDictEntity; @@ -48,11 +49,10 @@ public interface CustomerProjectCategoryDictService extends BaseService formDTO); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/CustomerProjectCategoryDictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/CustomerProjectCategoryDictServiceImpl.java index 455039a2a9..b610fa9c6c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/CustomerProjectCategoryDictServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/CustomerProjectCategoryDictServiceImpl.java @@ -22,14 +22,15 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.CustomerProjectCategoryDictDao; -import com.epmet.dto.screen.CategoryDictDataFormDTO; +import com.epmet.dto.screen.form.CategoryDictFormDTO; +import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.entity.issue.IssueProjectCategoryDictEntity; import com.epmet.entity.stats.CustomerProjectCategoryDictEntity; import com.epmet.service.stats.CustomerProjectCategoryDictService; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import org.apache.commons.collections4.CollectionUtils; import java.util.List; @@ -97,18 +98,19 @@ public class CustomerProjectCategoryDictServiceImpl extends BaseServiceImpl formDTO) { if (formDTO.getIsFirst()) { int deleteNum; do { - deleteNum = baseDao.deleteCustomerProjectCategoryDict(customerId); + deleteNum = baseDao.deleteCustomerProjectCategoryDict(formDTO.getCustomerId()); } while (deleteNum > NumConstant.ZERO); } if (!CollectionUtils.isEmpty(formDTO.getDataList())) { - baseDao.batchInsertCustomerProjectCategoryDict(formDTO.getDataList(), customerId); + baseDao.batchInsertCustomerProjectCategoryDict(formDTO.getDataList(), formDTO.getCustomerId()); } } } From 87868161caa25fccd3827a3389ce5abd6a13c143 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Tue, 23 Mar 2021 16:19:44 +0800 Subject: [PATCH 223/375] =?UTF-8?q?=E4=B8=80=E7=BA=A7=E3=80=81=E4=BA=8C?= =?UTF-8?q?=E7=BA=A7=E5=88=86=E7=B1=BB=E6=96=B0=E5=A2=9E/=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/FirstCategoryFormDTO.java | 47 +++++++ .../epmet/dto/form/SecondCategoryFormDTO.java | 21 +++ .../IssueProjectCategoryDictController.java | 50 +++++++ .../dao/IssueProjectCategoryDictDao.java | 29 +++++ .../IssueProjectCategoryDictService.java | 42 ++++++ .../IssueProjectCategoryDictServiceImpl.java | 122 ++++++++++++++++++ .../mapper/IssueProjectCategoryDictDao.xml | 27 ++++ 7 files changed, 338 insertions(+) create mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/FirstCategoryFormDTO.java create mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/SecondCategoryFormDTO.java diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/FirstCategoryFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/FirstCategoryFormDTO.java new file mode 100644 index 0000000000..cb50e8dbe2 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/FirstCategoryFormDTO.java @@ -0,0 +1,47 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.List; + +/** + * @Description 一级分类 新增/修改 + * @Auth zy + * @Date 2021-03-22 09:17 + */ +@Data +public class FirstCategoryFormDTO implements Serializable { + private static final long serialVersionUID = 3188828578545996470L; + public interface AddCategoryInternalGroup { + } + + /** + * 客户Id + **/ + @NotBlank(message = "customerId不能为空", groups = AddCategoryInternalGroup.class) + private String customerId; + + /** + * 分类Id + * issue_project_category_dict 表主键,只有执行修改操作时,才会传入 + **/ + private String categoryId; + + /** + * 分类名称 + **/ + private String categoryName; + + /** + * 排序 + **/ + private Integer sort; + + /** + * 操作类型(add:新增 edit:编辑) + **/ + @NotBlank(message = "操作类型不能为空", groups = AddCategoryInternalGroup.class) + private String type; +} diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/SecondCategoryFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/SecondCategoryFormDTO.java new file mode 100644 index 0000000000..7b3d389462 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/SecondCategoryFormDTO.java @@ -0,0 +1,21 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 二级分类 新增/修改 + * @ClassName CommonGridIdListFormDTO + * @Auth zy + * @Date 2021-03-22 09:17 + */ +@Data +public class SecondCategoryFormDTO extends FirstCategoryFormDTO implements Serializable{ + private static final long serialVersionUID = 3188828578545996470L; + + /** + * 一级分类Id + **/ + private String parentCategoryId; +} diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java index bc6a3607c6..44464df978 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java @@ -18,6 +18,8 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.enums.CommonOperateTypeEnum; +import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; @@ -31,11 +33,13 @@ import com.epmet.dto.IssueProjectCategoryDictDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.CustomerCategoryListResultDTO; import com.epmet.dto.result.ProjectIssueCategoryResultDTO; +import com.epmet.entity.IssueProjectCategoryDictEntity; import com.epmet.excel.IssueProjectCategoryDictExcel; import com.epmet.project.dto.CustomerCategoryDTO; import com.epmet.project.dto.result.ProjectCategoryDictResultDTO; import com.epmet.service.IssueProjectCategoryDictService; import com.epmet.utils.ModuleConstants; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -189,4 +193,50 @@ public class IssueProjectCategoryDictController { return new Result>().ok(issueProjectCategoryDictService.listCategoryDict(dto.getCustomerId(), dto.getPid())); } + + /** + * 新增或修改一级分类信息,分类名称在同一个客户下有效数据中不允许重复 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:27 2021-03-23 + **/ + @PostMapping("savefirstcategory") + public Result saveFirstCategory(@RequestBody SecondCategoryFormDTO formDTO) { + if (StringUtils.isBlank(formDTO.getCustomerId())) { + throw new RenException("客户id 不能为空"); + } + if (CommonOperateTypeEnum.ADD.getCode().equals(formDTO.getType())) { + return issueProjectCategoryDictService.saveFirstCategory(formDTO); + } else if (CommonOperateTypeEnum.EDIT.getCode().equals(formDTO.getType())){ + return issueProjectCategoryDictService.editFirstCategory(formDTO); + } + throw new RenException("操作类型为空,或错误。type:" + formDTO.getType()); + } + + /** + * 新增或修改二级分类信息,分类名称在同一个客户下同一 一级分类下有效数据中不允许重复 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:27 2021-03-23 + **/ + @PostMapping("savesecondcategory") + public Result saveSecondCategory(@RequestBody SecondCategoryFormDTO formDTO) { + if (StringUtils.isBlank(formDTO.getCustomerId())) { + throw new RenException("客户id 不能为空"); + } + if (StringUtils.isBlank(formDTO.getParentCategoryId())) { + throw new RenException("一级分类Id 不能为空"); + } + if (CommonOperateTypeEnum.ADD.getCode().equals(formDTO.getType())) { + return issueProjectCategoryDictService.saveSecondCategory(formDTO); + } else if (CommonOperateTypeEnum.EDIT.getCode().equals(formDTO.getType())){ + return issueProjectCategoryDictService.editSecondCategory(formDTO); + } + throw new RenException("操作类型为空,或错误。type:" + formDTO.getType()); + } } + diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java index 6698b28722..293e469d1f 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java @@ -113,4 +113,33 @@ public interface IssueProjectCategoryDictDao extends BaseDao 0 则为重复 + * + * + * @param customerId + * @param categoryName + * @param pid != null 表示 将查询范围,限制在某一个一级分类 及 一级分类下的有效数据 + * @param id 修改时,不一定会修改分类名称,所以需通过id 过滤自己 + * @return java.lang.Boolean + * @Author zhangyong + * @Date 14:11 2021-03-23 + **/ + Integer isCategoryName(@Param("customerId") String customerId, @Param("categoryName") String categoryName, + @Param("pid") String pid, @Param("id") String id); } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java index 55fc4871c3..b310f32706 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java @@ -19,12 +19,14 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.Result; import com.epmet.dto.IssueProjectCategoryDictDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.CustomerCategoryListResultDTO; import com.epmet.dto.result.ProjectIssueCategoryResultDTO; import com.epmet.entity.IssueProjectCategoryDictEntity; import com.epmet.project.dto.result.ProjectCategoryDictResultDTO; +import org.springframework.web.bind.annotation.RequestBody; import java.util.List; import java.util.Map; @@ -154,4 +156,44 @@ public interface IssueProjectCategoryDictService extends BaseService listCategoryDict(String customerId, String pid); + + /** + * 新增一级分类信息,分类名称在同一个客户下有效数据中不允许重复 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result 新增后的主键 + * @Author zhangyong + * @Date 10:27 2021-03-23 + **/ + Result saveFirstCategory(SecondCategoryFormDTO formDTO); + + /** + * 修改一级分类信息,分类名称在同一个客户下有效数据中不允许重复 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result 新增后的主键 + * @Author zhangyong + * @Date 10:27 2021-03-23 + **/ + Result editFirstCategory(SecondCategoryFormDTO formDTO); + + /** + * 新增二级分类信息,分类名称在同一个客户下同一 一级分类下有效数据中不允许重复 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result 新增后的主键 + * @Author zhangyong + * @Date 10:27 2021-03-23 + **/ + Result saveSecondCategory(SecondCategoryFormDTO formDTO); + + /** + * 修改二级分类信息,分类名称在同一个客户下有效数据中不允许重复 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result 新增后的主键 + * @Author zhangyong + * @Date 10:27 2021-03-23 + **/ + Result editSecondCategory(SecondCategoryFormDTO formDTO); } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java index c4faa05e5d..56463a8854 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java @@ -22,6 +22,7 @@ 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.constant.NumConstant; +import com.epmet.commons.tools.enums.CommonOperateTypeEnum; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; @@ -307,5 +308,126 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl listCategoryDict(String customerId, String pid) { return baseDao.selectListCategoryDict(customerId, pid); + } + + @Override + public Result saveFirstCategory(SecondCategoryFormDTO formDTO) { + // 分类名称在同一个客户下有效数据中不允许重复 + Integer numCategoryName = baseDao.isCategoryName(formDTO.getCustomerId(), formDTO.getCategoryName(), null,null); + if (NumConstant.ZERO < numCategoryName) { + throw new RenException("现添加的一级分类名称 重复"); + } + IssueProjectCategoryDictEntity entity = this.packageFirstCategoryDictEntity(formDTO); + baseDao.insert(entity); + return new Result().ok(entity.getId()); + } + + /** + * 一级分类 组装字段 + * + * @param formDTO + * @return com.epmet.entity.IssueProjectCategoryDictEntity + * @Author zhangyong + * @Date 10:46 2021-03-23 + **/ + private IssueProjectCategoryDictEntity packageFirstCategoryDictEntity(SecondCategoryFormDTO formDTO) { + IssueProjectCategoryDictEntity entity = new IssueProjectCategoryDictEntity(); + entity.setCustomerId(formDTO.getCustomerId()); + entity.setPid(NumConstant.ZERO_STR ); + entity.setPids(NumConstant.ZERO_STR ); + entity.setParentCategoryCode(NumConstant.ZERO_STR); + // 查询 当前客户下,+1 后最大的一级分类数。从1开始 + Integer maxCategoryCode = baseDao.getMaxCategoryCode(formDTO.getCustomerId(), NumConstant.ZERO_STR); + if (NumConstant.ZERO == maxCategoryCode) { + maxCategoryCode = 1001; + } else { + maxCategoryCode++; + } + entity.setCategoryCode(String.valueOf(maxCategoryCode)); + + entity.setCategoryName(formDTO.getCategoryName()); + entity.setCategoryType(NumConstant.ONE_STR); + entity.setSort(formDTO.getSort()); + entity.setIsDisable("enable"); + return entity; + } + + @Override + public Result editFirstCategory(SecondCategoryFormDTO formDTO) { + if (StringUtils.isBlank(formDTO.getCategoryId())) { + throw new RenException("分类Id 不能为空"); + } + // 分类名称在同一个客户下有效数据中不允许重复 + Integer numCategoryName = baseDao.isCategoryName(formDTO.getCustomerId(), formDTO.getCategoryName(), null, formDTO.getCategoryId()); + if (NumConstant.ZERO < numCategoryName) { + throw new RenException("现添加的一级分类名称 重复"); + } + IssueProjectCategoryDictEntity entity = new IssueProjectCategoryDictEntity(); + entity.setCategoryName(formDTO.getCategoryName()); + entity.setSort(formDTO.getSort()); + entity.setId(formDTO.getCategoryId()); + baseDao.updateById(entity); + return new Result<>(); + } + + @Override + public Result saveSecondCategory(SecondCategoryFormDTO formDTO) { + // 分类名称在同一个客户下同一 一级分类下有效数据中不允许重复 + Integer numCategoryName = baseDao.isCategoryName(formDTO.getCustomerId(), formDTO.getCategoryName(), formDTO.getParentCategoryId(), null); + if (NumConstant.ZERO < numCategoryName) { + throw new RenException("现添加的二级分类名称 重复"); + } + IssueProjectCategoryDictEntity entity = this.packageSecondCategoryDictEntity(formDTO); + baseDao.insert(entity); + return new Result().ok(entity.getId()); + } + + /** + * 二级分类 组装字段 + * + * @param formDTO + * @return com.epmet.entity.IssueProjectCategoryDictEntity + * @Author zhangyong + * @Date 10:46 2021-03-23 + **/ + private IssueProjectCategoryDictEntity packageSecondCategoryDictEntity(SecondCategoryFormDTO formDTO) { + IssueProjectCategoryDictEntity entity = new IssueProjectCategoryDictEntity(); + entity.setCustomerId(formDTO.getCustomerId()); + entity.setPid(formDTO.getParentCategoryId()); + entity.setPids(formDTO.getParentCategoryId()); + IssueProjectCategoryDictEntity parentCategoryCode = baseDao.selectById(formDTO.getParentCategoryId()); + entity.setParentCategoryCode(parentCategoryCode.getCategoryCode()); + // 查询 当前客户下,+1 后最大的一级分类数 + Integer maxCategoryCode = baseDao.getMaxCategoryCode(formDTO.getCustomerId(), parentCategoryCode.getCategoryCode()); + if (NumConstant.ZERO == maxCategoryCode) { + maxCategoryCode = Integer.valueOf(parentCategoryCode.getCategoryCode() + "1001"); + } else { + maxCategoryCode++; + } + entity.setCategoryCode(String.valueOf(maxCategoryCode)); + + entity.setCategoryName(formDTO.getCategoryName()); + entity.setCategoryType(NumConstant.TWO_STR); + entity.setSort(formDTO.getSort()); + entity.setIsDisable("enable"); + return entity; + } + + @Override + public Result editSecondCategory(SecondCategoryFormDTO formDTO) { + if (StringUtils.isBlank(formDTO.getCategoryId())) { + throw new RenException("分类Id 不能为空"); + } + // 分类名称在同一个客户下同一 一级分类下有效数据中不允许重复 + Integer numCategoryName = baseDao.isCategoryName(formDTO.getCustomerId(), formDTO.getCategoryName(), formDTO.getParentCategoryId(), formDTO.getCategoryId()); + if (NumConstant.ZERO < numCategoryName) { + throw new RenException("现添加的二级分类名称 重复"); + } + IssueProjectCategoryDictEntity entity = new IssueProjectCategoryDictEntity(); + entity.setCategoryName(formDTO.getCategoryName()); + entity.setSort(formDTO.getSort()); + entity.setId(formDTO.getCategoryId()); + baseDao.updateById(entity); + return new Result<>(); } } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml index 20f8c5cfdd..52fc76e925 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml @@ -161,4 +161,31 @@ + + + From cfe0913cb059e07553904664be1931afbb7aff1f Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Tue, 23 Mar 2021 16:55:20 +0800 Subject: [PATCH 224/375] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/CustomerCategoryResultDTO.java | 48 +++++++++++++++++++ .../IssueProjectCategoryDictController.java | 20 ++++++++ .../dao/IssueProjectCategoryDictDao.java | 14 ++++++ .../IssueProjectCategoryDictService.java | 12 +++++ .../IssueProjectCategoryDictServiceImpl.java | 29 +++++++++-- .../mapper/IssueProjectCategoryDictDao.xml | 20 ++++++++ 6 files changed, 138 insertions(+), 5 deletions(-) create mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/CustomerCategoryResultDTO.java diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/CustomerCategoryResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/CustomerCategoryResultDTO.java new file mode 100644 index 0000000000..5121a13471 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/CustomerCategoryResultDTO.java @@ -0,0 +1,48 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * 客户分类列表 + * + * @Author ZY + * @DateTime 2021/03/23 + */ +@Data +public class CustomerCategoryResultDTO implements Serializable { + + private static final long serialVersionUID = 4769136806332933579L; + + /** + * 分类Id + */ + private String categoryId; + + /** + * 分类名称 + */ + private String categoryName; + + /** + * 排序 + */ + private Integer sort; + + /** + * 是否禁用(enable:启用 disable:禁用) + */ + private String isDisable; + + /** + * 二级分类 + */ + private List children; + + /** + * pid + */ + private String pid; +} diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java index 44464df978..7f1e1f3e7b 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java @@ -18,6 +18,7 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.enums.CommonOperateTypeEnum; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; @@ -32,6 +33,7 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IssueProjectCategoryDictDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.CustomerCategoryListResultDTO; +import com.epmet.dto.result.CustomerCategoryResultDTO; import com.epmet.dto.result.ProjectIssueCategoryResultDTO; import com.epmet.entity.IssueProjectCategoryDictEntity; import com.epmet.excel.IssueProjectCategoryDictExcel; @@ -238,5 +240,23 @@ public class IssueProjectCategoryDictController { } throw new RenException("操作类型为空,或错误。type:" + formDTO.getType()); } + + /** + * 客户分类列表 + * 按客户查询已有一级二级分类列表,升序排列,全部查询,不涉及分页 + * + * @param map + * customerId + * @return com.epmet.commons.tools.utils.Result> + * @Author zhangyong + * @Date 16:30 2021-03-23 + **/ + @PostMapping("customercategorylist") + public Result> customerCategoryList(@RequestBody Map map) { + if (StringUtils.isBlank(map.get(FieldConstant.CUSTOMER_ID_HUMP))) { + throw new RenException("客户id 不能为空"); + } + return new Result>().ok(issueProjectCategoryDictService.customerCategoryList(map.get(FieldConstant.CUSTOMER_ID_HUMP))); + } } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java index 293e469d1f..d85eaa3295 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java @@ -23,6 +23,7 @@ import com.epmet.dto.form.DelCategoryFormDTO; import com.epmet.dto.form.IsDisableCategoryFormDTO; import com.epmet.dto.form.IssueProjectCategoryDictListFormDTO; import com.epmet.dto.result.CustomerCategoryListResultDTO; +import com.epmet.dto.result.CustomerCategoryResultDTO; import com.epmet.entity.IssueProjectCategoryDictEntity; import com.epmet.project.dto.result.ProjectCategoryDictResultDTO; import org.apache.ibatis.annotations.Mapper; @@ -142,4 +143,17 @@ public interface IssueProjectCategoryDictDao extends BaseDao + * @Author zhangyong + * @Date 14:10 2021-03-22 + **/ + List selectListAllCategoryDict(@Param("customerId") String customerId, @Param("pid") String pid); } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java index b310f32706..639888bc23 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java @@ -23,6 +23,7 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.dto.IssueProjectCategoryDictDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.CustomerCategoryListResultDTO; +import com.epmet.dto.result.CustomerCategoryResultDTO; import com.epmet.dto.result.ProjectIssueCategoryResultDTO; import com.epmet.entity.IssueProjectCategoryDictEntity; import com.epmet.project.dto.result.ProjectCategoryDictResultDTO; @@ -196,4 +197,15 @@ public interface IssueProjectCategoryDictService extends BaseService editSecondCategory(SecondCategoryFormDTO formDTO); + + /** + * 客户分类列表 + * 按客户查询已有一级二级分类列表,升序排列,全部查询,不涉及分页 + * + * @param customerId + * @return java.util.List + * @Author zhangyong + * @Date 16:30 2021-03-23 + **/ + List customerCategoryList(String customerId); } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java index 56463a8854..516ee31de3 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java @@ -22,7 +22,6 @@ 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.constant.NumConstant; -import com.epmet.commons.tools.enums.CommonOperateTypeEnum; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; @@ -33,10 +32,7 @@ import com.epmet.dao.IssueProjectCategoryDictDao; import com.epmet.dao.IssueProjectRelationDao; import com.epmet.dto.*; import com.epmet.dto.form.*; -import com.epmet.dto.result.CustomerCategoryListResultDTO; -import com.epmet.dto.result.ProjectCategoryDTOResultDTO; -import com.epmet.dto.result.ProjectIssueCategoryResultDTO; -import com.epmet.dto.result.ProjectIssueDTOResultDTO; +import com.epmet.dto.result.*; import com.epmet.entity.IssueProjectCategoryDictEntity; import com.epmet.entity.IssueProjectTagDictEntity; import com.epmet.feign.GovProjectOpenFeignClient; @@ -430,4 +426,27 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl(); } + + @Override + public List customerCategoryList(String customerId) { + List parentCategoryDict = baseDao.selectListAllCategoryDict(customerId, NumConstant.ZERO_STR); + List childrenCategoryDict = baseDao.selectListAllCategoryDict(customerId, NumConstant.ONE_STR); + + for (CustomerCategoryResultDTO p : parentCategoryDict) { + List children = new ArrayList<>(); + for (CustomerCategoryResultDTO c : childrenCategoryDict) { + if (p.getCategoryId().equals(c.getPid())) { + CustomerCategoryResultDTO dto = new CustomerCategoryResultDTO(); + dto.setCategoryId(c.getCategoryId()); + dto.setCategoryName(c.getCategoryName()); + dto.setSort(c.getSort()); + dto.setIsDisable(c.getIsDisable()); + dto.setPid(c.getPid()); + children.add(dto); + } + } + p.setChildren(children); + } + return parentCategoryDict; + } } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml index 52fc76e925..2dea34a9fd 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml @@ -188,4 +188,24 @@ AND id != #{id} + + From abbba792a9e60b999f52a91751b9ca21e60127c0 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 23 Mar 2021 17:15:27 +0800 Subject: [PATCH 225/375] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=87=AA=E6=B5=8B?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IssueProjectCategoryDictController.java | 6 +++-- .../com/epmet/dao/IssueProjectTagDictDao.java | 7 +++++ .../IssueProjectCategoryDictServiceImpl.java | 26 +++++++++++++------ .../resources/mapper/IssueCategoryDao.xml | 4 +-- .../mapper/IssueProjectCategoryDictDao.xml | 19 +++++++++----- .../mapper/IssueProjectTagDictDao.xml | 13 ++++++++++ .../epmet/dto/form/DelCategoryFormDTO.java | 5 ++++ .../dto/form/IsDisableCategoryFormDTO.java | 13 ++++++++++ .../resources/mapper/ProjectCategoryDao.xml | 4 +-- 9 files changed, 76 insertions(+), 21 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java index 7f1e1f3e7b..df85854df5 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java @@ -158,8 +158,9 @@ public class IssueProjectCategoryDictController { * @Author sun **/ @PostMapping("isdisablecategory") - public Result isDisableCategory(@RequestBody IsDisableCategoryFormDTO formDTO) { + public Result isDisableCategory(@LoginUser TokenDto tokenDto, @RequestBody IsDisableCategoryFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO, IsDisableCategoryFormDTO.IsDisableCategory.class); + formDTO.setUserId(tokenDto.getUserId()); if(!ModuleConstants.ID_ENABLE.equals(formDTO.getType())&&!ModuleConstants.IS_DISABLE.equals(formDTO.getType())){ throw new RuntimeException("参数错误,操作类型值错误!"); } @@ -174,8 +175,9 @@ public class IssueProjectCategoryDictController { * @Author sun **/ @PostMapping("delcategory") - public Result delCategory(@RequestBody DelCategoryFormDTO formDTO) { + public Result delCategory(@LoginUser TokenDto tokenDto, @RequestBody DelCategoryFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO, DelCategoryFormDTO.DelCategory.class); + formDTO.setUserId(tokenDto.getUserId()); issueProjectCategoryDictService.delCategory(formDTO); return new Result(); } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectTagDictDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectTagDictDao.java index 2d14833f4a..9fa8ef840d 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectTagDictDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectTagDictDao.java @@ -18,6 +18,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.form.IsDisableCategoryFormDTO; import com.epmet.dto.form.IssueTagFormDTO; import com.epmet.dto.result.IssueCategoryTagResultDTO; import com.epmet.entity.IssueProjectTagDictEntity; @@ -102,4 +103,10 @@ public interface IssueProjectTagDictDao extends BaseDao selectTagsByCustomerIdAndTagIds(@Param("customerId") String customerId,@Param("tagIds")List tagIds); + + /** + * 批量修改标签的启用、禁用状态 + * @author sun + */ + int updateCustomerTag(IsDisableCategoryFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java index 516ee31de3..006568d0e2 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java @@ -30,6 +30,7 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.dao.IssueCategoryDao; import com.epmet.dao.IssueProjectCategoryDictDao; import com.epmet.dao.IssueProjectRelationDao; +import com.epmet.dao.IssueProjectTagDictDao; import com.epmet.dto.*; import com.epmet.dto.form.*; import com.epmet.dto.result.*; @@ -77,6 +78,8 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl page(Map params) { @@ -243,25 +246,32 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl categoryList = new ArrayList<>(); //待修改的二级分类Id汇总 List secondList = new ArrayList<>(); - if("1".equals(dto.getCategoryType())){ + if ("1".equals(dto.getCategoryType())) { //2-1.查询子类信息 - List subList = baseDao.selectSubCustomerCategoryDict(formDTO.getCustomerId(),formDTO.getCategoryId()); - secondList = subList.stream().map(sub->sub.getId()).collect(Collectors.toList()); + List subList = baseDao.selectSubCustomerCategoryDict(formDTO.getCustomerId(), formDTO.getCategoryId()); + secondList = subList.stream().map(sub -> sub.getId()).collect(Collectors.toList()); categoryList.add(formDTO.getCategoryId()); - }else { + } else { secondList.add(formDTO.getCategoryId()); } categoryList.addAll(secondList); formDTO.setCategoryList(categoryList); + formDTO.setSecondCategorylist(secondList); //3.修改标签、分类表数据状态 - if(baseDao.updateCustomerCategory(formDTO)%s,分类Id->%s", formDTO.getCustomerId(), formDTO.getCategoryId())); throw new RuntimeException("分类信息修改失败!"); } + //修改吧二级分类下默认的标签数据 + if (issueProjectTagDictDao.updateCustomerTag(formDTO) < NumConstant.ONE) { + logger.error(String.format("修改标签信息状态失败,客户Id->%s,分类Id->%s", formDTO.getCustomerId(), formDTO.getCategoryId())); + throw new RuntimeException("分类、标签信息修改失败!"); + } //4.修改缓存中标签状态 todo - } + } /** * @Description 分类删除 @@ -281,7 +291,7 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl issueList = issueCategoryDao.selectIssueList(formDTO); //已使用,不允许删除 - if (null != issueList || issueList.size() > NumConstant.ZERO) { + if (null != issueList && issueList.size() > NumConstant.ZERO) { throw new RenException(EpmetErrorCode.CUSTOMER_CATEGORY.getCode(), EpmetErrorCode.CUSTOMER_CATEGORY.getMsg()); } //2-2.判断项目有无使用 @@ -289,7 +299,7 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl NumConstant.ZERO) { + if (null != resultList.getData() && resultList.getData().size() > NumConstant.ZERO) { throw new RenException(EpmetErrorCode.CUSTOMER_CATEGORY.getCode(), EpmetErrorCode.CUSTOMER_CATEGORY.getMsg()); } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml index d5fc89045e..159debdd32 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml @@ -63,10 +63,10 @@ FROM issue_category WHERE del_flag = '0' AND customer_id = #{customerId} - + AND category_pids = #{categoryId} - + AND category_id = #{categoryId} diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml index 2dea34a9fd..6cfbb5f164 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml @@ -135,25 +135,29 @@ WHERE del_flag = '0' AND customer_id = #{customerId} - AND pid = #{categoryId} + AND pid = #{pid} UPDATE issue_project_category_dict - SET del_flag = '1' + SET del_flag = '1', + updated_by = #{userId}, + updated_time = NOW() WHERE customer_id = #{customerId} - - AND id = #{categoryId} + + AND id = #{categoryId} OR pid = #{categoryId} - - AND pid = #{categoryId} + + AND id = #{categoryId} UPDATE issue_project_category_dict - SET is_disable = #{type} + SET is_disable = #{type}, + updated_by = #{userId}, + updated_time = NOW() WHERE customer_id = #{customerId} @@ -161,6 +165,7 @@ + + + + UPDATE issue_project_tag_dict + SET is_disable = #{type}, + updated_by = #{userId}, + updated_time = NOW() + WHERE + customer_id = #{customerId} + + category_id = #{ids} + + + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/DelCategoryFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/DelCategoryFormDTO.java index c1fa3252c6..48ac7e6404 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/DelCategoryFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/DelCategoryFormDTO.java @@ -31,5 +31,10 @@ public class DelCategoryFormDTO implements Serializable { */ private String level; + /** + * token中用户 + */ + private String userId; + } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IsDisableCategoryFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IsDisableCategoryFormDTO.java index e259fd81a9..ccd91a49c5 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IsDisableCategoryFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IsDisableCategoryFormDTO.java @@ -31,6 +31,19 @@ public class IsDisableCategoryFormDTO implements Serializable { @NotBlank(message = "是否启用类型不能为空",groups = {IsDisableCategory.class}) private String type; + /** + * 一类、二类分类Id集合 + */ private List categoryList; + /** + * 二类分类Id集合 + */ + private List secondCategorylist; + + /** + * token中用户 + */ + private String userId; + } diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectCategoryDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectCategoryDao.xml index bb6a148e90..30033c620e 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectCategoryDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectCategoryDao.xml @@ -19,10 +19,10 @@ FROM project_category WHERE del_flag = '0' AND customer_id = #{customerId} - + AND category_pids = #{categoryId} - + AND category_id = #{categoryId} From 03c1760144b88c2270664f766aeaf7701645a5e8 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 23 Mar 2021 17:55:33 +0800 Subject: [PATCH 226/375] =?UTF-8?q?=E6=9B=BF=E6=8D=A2feign=E7=9A=84client?= =?UTF-8?q?=E7=AB=AF-=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-auth/src/main/resources/bootstrap.yml | 2 +- .../main/java/com/epmet/commons/tools/feign/FeignConfig.java | 2 +- .../data-aggregator-server/src/main/resources/bootstrap.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-auth/src/main/resources/bootstrap.yml b/epmet-auth/src/main/resources/bootstrap.yml index edab1bde4e..b7cc83fd9c 100644 --- a/epmet-auth/src/main/resources/bootstrap.yml +++ b/epmet-auth/src/main/resources/bootstrap.yml @@ -71,7 +71,7 @@ feign: config: default: loggerLevel: BASIC - httpclient: + okhttp: enabled: true hystrix: diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/FeignConfig.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/FeignConfig.java index f7ae3265d0..c68dbc2913 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/FeignConfig.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/FeignConfig.java @@ -53,6 +53,6 @@ public class FeignConfig implements RequestInterceptor { @Bean Logger.Level feignLoggerLevel() { - return Logger.Level.FULL;//控制台会输出debug日志 + return Logger.Level.BASIC;//控制台会输出debug日志 } } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/bootstrap.yml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/bootstrap.yml index 55e3265590..50e01db7ee 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/bootstrap.yml +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/bootstrap.yml @@ -127,7 +127,7 @@ feign: config: default: loggerLevel: BASIC - httpclient: + okhttp: enabled: true hystrix: From 3cd831408cc1d5ec8d82f99b08acda997ba52173 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 23 Mar 2021 18:02:48 +0800 Subject: [PATCH 227/375] =?UTF-8?q?=E6=9B=BF=E6=8D=A2feign=E7=9A=84client?= =?UTF-8?q?=E7=AB=AF=E4=BD=BF=E7=94=A8okhttp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-admin/epmet-admin-server/src/main/resources/bootstrap.yml | 2 +- epmet-gateway/src/main/resources/bootstrap.yml | 2 +- .../data-report-server/src/main/resources/bootstrap.yml | 2 +- .../data-statistical-server/src/main/resources/bootstrap.yml | 2 +- .../epmet-activiti-server/src/main/resources/bootstrap.yml | 2 +- .../common-service-server/src/main/resources/bootstrap.yml | 2 +- .../epmet-demo-server/src/main/resources/bootstrap.yml | 2 +- .../epmet-ext/epmet-ext-server/src/main/resources/bootstrap.yml | 2 +- .../epmet-heart-server/src/main/resources/bootstrap.yml | 2 +- .../epmet-job/epmet-job-server/src/main/resources/bootstrap.yml | 2 +- .../epmet-message-server/src/main/resources/bootstrap.yml | 2 +- .../epmet-oss/epmet-oss-server/src/main/resources/bootstrap.yml | 2 +- .../epmet-point-server/src/main/resources/bootstrap.yml | 2 +- .../epmet-third-server/src/main/resources/bootstrap.yml | 2 +- .../gov-access-server/src/main/resources/bootstrap.yml | 2 +- .../gov-grid/gov-grid-server/src/main/resources/bootstrap.yml | 2 +- .../gov-issue/gov-issue-server/src/main/resources/bootstrap.yml | 2 +- .../gov-mine/gov-mine-server/src/main/resources/bootstrap.yml | 2 +- .../gov-org/gov-org-server/src/main/resources/bootstrap.yml | 2 +- .../gov-project-server/src/main/resources/bootstrap.yml | 2 +- .../gov-voice/gov-voice-server/src/main/resources/bootstrap.yml | 2 +- .../oper-access-server/src/main/resources/bootstrap.yml | 2 +- .../oper-crm/oper-crm-server/src/main/resources/bootstrap.yml | 2 +- .../oper-customize-server/src/main/resources/bootstrap.yml | 2 +- .../resi-group-server/src/main/resources/bootstrap.yml | 2 +- .../resi-guide-server/src/main/resources/bootstrap.yml | 2 +- .../resi-hall/resi-hall-server/src/main/resources/bootstrap.yml | 2 +- .../resi-home/resi-home-server/src/main/resources/bootstrap.yml | 2 +- .../resi-mine/resi-mine-server/src/main/resources/bootstrap.yml | 2 +- .../resi-partymember-server/src/main/resources/bootstrap.yml | 2 +- .../resi-voice-server/src/main/resources/bootstrap.yml | 2 +- .../epmet-openapi-adv-server/src/main/resources/bootstrap.yml | 2 +- .../epmet-openapi-scan/src/main/resources/bootstrap.yml | 2 +- epmet-user/epmet-user-server/src/main/resources/bootstrap.yml | 2 +- 34 files changed, 34 insertions(+), 34 deletions(-) diff --git a/epmet-admin/epmet-admin-server/src/main/resources/bootstrap.yml b/epmet-admin/epmet-admin-server/src/main/resources/bootstrap.yml index 152e65a3e0..89f42ed404 100644 --- a/epmet-admin/epmet-admin-server/src/main/resources/bootstrap.yml +++ b/epmet-admin/epmet-admin-server/src/main/resources/bootstrap.yml @@ -113,7 +113,7 @@ feign: config: default: loggerLevel: BASIC - httpclient: + okhttp: enabled: true diff --git a/epmet-gateway/src/main/resources/bootstrap.yml b/epmet-gateway/src/main/resources/bootstrap.yml index 7a6c236128..201573688e 100644 --- a/epmet-gateway/src/main/resources/bootstrap.yml +++ b/epmet-gateway/src/main/resources/bootstrap.yml @@ -419,7 +419,7 @@ feign: config: default: loggerLevel: BASIC - httpclient: + okhttp: enabled: true hystrix: diff --git a/epmet-module/data-report/data-report-server/src/main/resources/bootstrap.yml b/epmet-module/data-report/data-report-server/src/main/resources/bootstrap.yml index 4b220e0c72..3ecb0ec3d1 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/bootstrap.yml +++ b/epmet-module/data-report/data-report-server/src/main/resources/bootstrap.yml @@ -118,7 +118,7 @@ feign: config: default: loggerLevel: BASIC - httpclient: + okhttp: enabled: true hystrix: diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml index bc14f070f8..f94ee99777 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml @@ -99,7 +99,7 @@ feign: config: default: loggerLevel: BASIC - httpclient: + okhttp: enabled: true hystrix: diff --git a/epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/bootstrap.yml index 110490c3af..811f0c352b 100644 --- a/epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-activiti/epmet-activiti-server/src/main/resources/bootstrap.yml @@ -93,7 +93,7 @@ feign: config: default: loggerLevel: BASIC - httpclient: + okhttp: enabled: true hystrix: diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-common-service/common-service-server/src/main/resources/bootstrap.yml index 8348460f3f..ff4ec82dcf 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-common-service/common-service-server/src/main/resources/bootstrap.yml @@ -100,7 +100,7 @@ feign: config: default: loggerLevel: BASIC - httpclient: + okhttp: enabled: true hystrix: diff --git a/epmet-module/epmet-demo/epmet-demo-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-demo/epmet-demo-server/src/main/resources/bootstrap.yml index e131231414..b9cf8dd559 100644 --- a/epmet-module/epmet-demo/epmet-demo-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-demo/epmet-demo-server/src/main/resources/bootstrap.yml @@ -83,7 +83,7 @@ feign: config: default: loggerLevel: BASIC - httpclient: + okhttp: enabled: true hystrix: diff --git a/epmet-module/epmet-ext/epmet-ext-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-ext/epmet-ext-server/src/main/resources/bootstrap.yml index 7a067d1606..1ed5a4306d 100644 --- a/epmet-module/epmet-ext/epmet-ext-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-ext/epmet-ext-server/src/main/resources/bootstrap.yml @@ -81,7 +81,7 @@ feign: config: default: loggerLevel: BASIC - httpclient: + okhttp: enabled: true hystrix: diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/bootstrap.yml index 2cd6e68458..8fe49b4ea0 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/bootstrap.yml @@ -99,7 +99,7 @@ feign: config: default: loggerLevel: BASIC - httpclient: + okhttp: enabled: true hystrix: diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml index 85974efb60..20fc7cb138 100644 --- a/epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml @@ -100,7 +100,7 @@ feign: config: default: loggerLevel: FULL - httpclient: + okhttp: enabled: true logging: diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-message/epmet-message-server/src/main/resources/bootstrap.yml index b361be7236..03945c0ebf 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-message/epmet-message-server/src/main/resources/bootstrap.yml @@ -101,7 +101,7 @@ feign: config: default: loggerLevel: BASIC - httpclient: + okhttp: enabled: true hystrix: diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-oss/epmet-oss-server/src/main/resources/bootstrap.yml index 5b6b4b9e75..3bfe0d68bc 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/resources/bootstrap.yml @@ -111,7 +111,7 @@ feign: config: default: loggerLevel: BASIC - httpclient: + okhttp: enabled: true hystrix: diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-point/epmet-point-server/src/main/resources/bootstrap.yml index a6233bb7a3..08cae6a575 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-point/epmet-point-server/src/main/resources/bootstrap.yml @@ -99,7 +99,7 @@ feign: config: default: loggerLevel: BASIC - httpclient: + okhttp: enabled: true hystrix: diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/bootstrap.yml index 0606e7f123..70ea9ad34a 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/bootstrap.yml @@ -81,7 +81,7 @@ feign: config: default: loggerLevel: BASIC - httpclient: + okhttp: enabled: true hystrix: diff --git a/epmet-module/gov-access/gov-access-server/src/main/resources/bootstrap.yml b/epmet-module/gov-access/gov-access-server/src/main/resources/bootstrap.yml index c8fe1196c9..d2038e569e 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/resources/bootstrap.yml +++ b/epmet-module/gov-access/gov-access-server/src/main/resources/bootstrap.yml @@ -100,7 +100,7 @@ feign: config: default: loggerLevel: BASIC - httpclient: + okhttp: enabled: true hystrix: diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/resources/bootstrap.yml b/epmet-module/gov-grid/gov-grid-server/src/main/resources/bootstrap.yml index 241ae97b26..4afc1b94e4 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/resources/bootstrap.yml +++ b/epmet-module/gov-grid/gov-grid-server/src/main/resources/bootstrap.yml @@ -57,7 +57,7 @@ feign: config: default: loggerLevel: BASIC - httpclient: + okhttp: enabled: true hystrix: diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/bootstrap.yml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/bootstrap.yml index 06974a6810..f1b74c03df 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/bootstrap.yml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/bootstrap.yml @@ -89,7 +89,7 @@ feign: config: default: loggerLevel: BASIC - httpclient: + okhttp: enabled: true hystrix: diff --git a/epmet-module/gov-mine/gov-mine-server/src/main/resources/bootstrap.yml b/epmet-module/gov-mine/gov-mine-server/src/main/resources/bootstrap.yml index 6c3a83e1f1..1cfa2f121e 100644 --- a/epmet-module/gov-mine/gov-mine-server/src/main/resources/bootstrap.yml +++ b/epmet-module/gov-mine/gov-mine-server/src/main/resources/bootstrap.yml @@ -81,7 +81,7 @@ feign: config: default: loggerLevel: BASIC - httpclient: + okhttp: enabled: true hystrix: diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/bootstrap.yml b/epmet-module/gov-org/gov-org-server/src/main/resources/bootstrap.yml index 0a9653fd28..8baed16dd6 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/bootstrap.yml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/bootstrap.yml @@ -113,7 +113,7 @@ feign: config: default: loggerLevel: BASIC - httpclient: + okhttp: enabled: true hystrix: diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/bootstrap.yml b/epmet-module/gov-project/gov-project-server/src/main/resources/bootstrap.yml index 2db2f15416..74f392af96 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/bootstrap.yml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/bootstrap.yml @@ -89,7 +89,7 @@ feign: config: default: loggerLevel: BASIC - httpclient: + okhttp: enabled: true hystrix: diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/bootstrap.yml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/bootstrap.yml index c570e30147..8b8c4bdb45 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/bootstrap.yml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/bootstrap.yml @@ -89,7 +89,7 @@ feign: config: default: loggerLevel: BASIC - httpclient: + okhttp: enabled: true hystrix: diff --git a/epmet-module/oper-access/oper-access-server/src/main/resources/bootstrap.yml b/epmet-module/oper-access/oper-access-server/src/main/resources/bootstrap.yml index 15ccaab5b1..f7bad85d13 100644 --- a/epmet-module/oper-access/oper-access-server/src/main/resources/bootstrap.yml +++ b/epmet-module/oper-access/oper-access-server/src/main/resources/bootstrap.yml @@ -100,7 +100,7 @@ feign: config: default: loggerLevel: BASIC - httpclient: + okhttp: enabled: true hystrix: diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/resources/bootstrap.yml b/epmet-module/oper-crm/oper-crm-server/src/main/resources/bootstrap.yml index f8760dbee8..3d0b42162e 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/resources/bootstrap.yml +++ b/epmet-module/oper-crm/oper-crm-server/src/main/resources/bootstrap.yml @@ -106,7 +106,7 @@ feign: config: default: loggerLevel: BASIC - httpclient: + okhttp: enabled: true hystrix: diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/bootstrap.yml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/bootstrap.yml index 360e2ad6e2..f9ee219699 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/resources/bootstrap.yml +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/bootstrap.yml @@ -100,7 +100,7 @@ feign: config: default: loggerLevel: BASIC - httpclient: + okhttp: enabled: true hystrix: diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/bootstrap.yml b/epmet-module/resi-group/resi-group-server/src/main/resources/bootstrap.yml index 6823a772e7..35cade577d 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/bootstrap.yml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/bootstrap.yml @@ -100,7 +100,7 @@ feign: config: default: loggerLevel: BASIC - httpclient: + okhttp: enabled: true hystrix: diff --git a/epmet-module/resi-guide/resi-guide-server/src/main/resources/bootstrap.yml b/epmet-module/resi-guide/resi-guide-server/src/main/resources/bootstrap.yml index 9be4ac049f..a8a75e8d97 100644 --- a/epmet-module/resi-guide/resi-guide-server/src/main/resources/bootstrap.yml +++ b/epmet-module/resi-guide/resi-guide-server/src/main/resources/bootstrap.yml @@ -101,7 +101,7 @@ feign: config: default: loggerLevel: BASIC - httpclient: + okhttp: enabled: true hystrix: diff --git a/epmet-module/resi-hall/resi-hall-server/src/main/resources/bootstrap.yml b/epmet-module/resi-hall/resi-hall-server/src/main/resources/bootstrap.yml index 09b4ba2437..19a4ef53b8 100644 --- a/epmet-module/resi-hall/resi-hall-server/src/main/resources/bootstrap.yml +++ b/epmet-module/resi-hall/resi-hall-server/src/main/resources/bootstrap.yml @@ -57,7 +57,7 @@ feign: config: default: loggerLevel: BASIC - httpclient: + okhttp: enabled: true hystrix: diff --git a/epmet-module/resi-home/resi-home-server/src/main/resources/bootstrap.yml b/epmet-module/resi-home/resi-home-server/src/main/resources/bootstrap.yml index 76f5542795..72ede48632 100644 --- a/epmet-module/resi-home/resi-home-server/src/main/resources/bootstrap.yml +++ b/epmet-module/resi-home/resi-home-server/src/main/resources/bootstrap.yml @@ -56,7 +56,7 @@ feign: config: default: loggerLevel: BASIC - httpclient: + okhttp: enabled: true hystrix: diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/resources/bootstrap.yml b/epmet-module/resi-mine/resi-mine-server/src/main/resources/bootstrap.yml index 48dc370737..7257f2ea6f 100644 --- a/epmet-module/resi-mine/resi-mine-server/src/main/resources/bootstrap.yml +++ b/epmet-module/resi-mine/resi-mine-server/src/main/resources/bootstrap.yml @@ -84,7 +84,7 @@ feign: config: default: loggerLevel: BASIC - httpclient: + okhttp: enabled: true hystrix: diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/bootstrap.yml b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/bootstrap.yml index 4577b0cae3..0978c177e1 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/bootstrap.yml +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/bootstrap.yml @@ -100,7 +100,7 @@ feign: config: default: loggerLevel: BASIC - httpclient: + okhttp: enabled: true hystrix: diff --git a/epmet-module/resi-voice/resi-voice-server/src/main/resources/bootstrap.yml b/epmet-module/resi-voice/resi-voice-server/src/main/resources/bootstrap.yml index b1bca8e761..9d398946ba 100644 --- a/epmet-module/resi-voice/resi-voice-server/src/main/resources/bootstrap.yml +++ b/epmet-module/resi-voice/resi-voice-server/src/main/resources/bootstrap.yml @@ -52,7 +52,7 @@ feign: config: default: loggerLevel: BASIC - httpclient: + okhttp: enabled: true hystrix: diff --git a/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/resources/bootstrap.yml b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/resources/bootstrap.yml index 3a3726f148..0bd40dcca7 100644 --- a/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/resources/bootstrap.yml +++ b/epmet-openapi/epmet-openapi-adv/epmet-openapi-adv-server/src/main/resources/bootstrap.yml @@ -113,7 +113,7 @@ feign: config: default: loggerLevel: BASIC - httpclient: + okhttp: enabled: true diff --git a/epmet-openapi/epmet-openapi-scan/src/main/resources/bootstrap.yml b/epmet-openapi/epmet-openapi-scan/src/main/resources/bootstrap.yml index 0c5c04d86e..0aa0583c97 100644 --- a/epmet-openapi/epmet-openapi-scan/src/main/resources/bootstrap.yml +++ b/epmet-openapi/epmet-openapi-scan/src/main/resources/bootstrap.yml @@ -55,7 +55,7 @@ feign: config: default: loggerLevel: BASIC - httpclient: + okhttp: enabled: true diff --git a/epmet-user/epmet-user-server/src/main/resources/bootstrap.yml b/epmet-user/epmet-user-server/src/main/resources/bootstrap.yml index 0ff8f5dcc1..bb127328eb 100644 --- a/epmet-user/epmet-user-server/src/main/resources/bootstrap.yml +++ b/epmet-user/epmet-user-server/src/main/resources/bootstrap.yml @@ -113,7 +113,7 @@ feign: config: default: loggerLevel: BASIC - httpclient: + okhttp: enabled: true From ca2ef72f1598003d3413bd2ed900c16abdffd059 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 23 Mar 2021 18:27:04 +0800 Subject: [PATCH 228/375] =?UTF-8?q?=E5=9E=83=E5=9C=BE=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E6=B8=85=E7=90=86-=E6=B3=A8=E9=87=8A=E7=9A=84=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E5=B7=B2=E7=BB=8F=E6=8C=AA=E5=88=B0=E5=85=B6=E4=BB=96?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E9=87=8C=EF=BC=8C=E6=97=A0=E9=9C=80=E5=9C=A8?= =?UTF-8?q?=E8=BF=99=E6=94=BE=E7=9D=80=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/UserAccessServiceImpl.java | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/impl/UserAccessServiceImpl.java b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/impl/UserAccessServiceImpl.java index 3aea2fc5ee..1b1aa4c53d 100644 --- a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/impl/UserAccessServiceImpl.java +++ b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/service/impl/UserAccessServiceImpl.java @@ -3,7 +3,6 @@ package com.epmet.service.impl; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; -import com.epmet.constant.StrangerResiGuideConstant; import com.epmet.dto.form.EnterGridFormDTO; import com.epmet.dto.form.UserEnterGridFormDTO; import com.epmet.dto.result.UserInfoOnEnterGridResultDTO; @@ -38,26 +37,6 @@ public class UserAccessServiceImpl implements UserAccessService { userInfoParams.setGridId(formDTO.getGridId()); Result userInfoResult = epmetUserFeignClient.getUserInfoAndRoles(userInfoParams); - if(userInfoResult.success()){ - //2:调用epmet-user服务查询数据 新建网格记录数据 - /*VisitedFormDTO visitedFormDTO = new VisitedFormDTO(); - visitedFormDTO.setGridId(userInfoParams.getGridId()); - visitedFormDTO.setCustomerId(userInfoParams.getCustomerId()); - visitedFormDTO.setUserId(userInfoParams.getUserId()); - if(null != userInfoResult.getData().getUserRoleList() && userInfoResult.getData().getUserRoleList().size() > 0){ - visitedFormDTO.setIsReg(NumConstant.ONE_STR); - }else{ - visitedFormDTO.setIsReg(NumConstant.ZERO_STR); - } - Result re = epmetUserFeignClient.saveVisitedRecord(visitedFormDTO); - if (!re.success()) { - log.warn(StrangerResiGuideConstant.EPMET_USER_EXCEPTION); - }*/ - }else{ - //getUserInfoAndRoles调用失败 - log.warn(StrangerResiGuideConstant.EPMET_USER_EXCEPTION); - } - return userInfoResult; } } From 17d4db86d5310cc143ebe2bf293b55dafe9cd330 Mon Sep 17 00:00:00 2001 From: wangchao Date: Tue, 23 Mar 2021 18:56:22 +0800 Subject: [PATCH 229/375] =?UTF-8?q?=E2=91=A0=E4=BF=AE=E6=94=B9=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E6=A0=87=E7=AD=BE=E7=9A=84=E6=8E=92=E5=BA=8F=E6=96=B9?= =?UTF-8?q?=E6=B3=95=20=E2=91=A1=E4=BF=AE=E6=94=B9=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E6=97=B6=E6=9F=A5=E8=AF=A2=E4=B8=BAnull?= =?UTF-8?q?=E6=97=B6=E7=9A=84=E8=A1=A5=E5=81=BF=E6=96=B9=E6=B3=95=20?= =?UTF-8?q?=E2=91=A2=E6=96=B0=E5=A2=9E=E6=89=B9=E9=87=8F=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=BA=8C=E7=BA=A7=E5=88=86=E7=B1=BB=E4=B8=8B=E7=9A=84=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E5=9C=A8=E7=BC=93=E5=AD=98=E4=B8=AD=E7=9A=84"?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E7=A6=81=E7=94=A8"=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/commons/tools/redis/RedisUtils.java | 12 ++ .../com/epmet/dao/IssueProjectTagDictDao.java | 33 +++++- .../epmet/redis/IssueProjectTagDictRedis.java | 106 ++++++++++++++---- .../IssueProjectCategoryDictServiceImpl.java | 7 +- .../mapper/IssueProjectTagDictDao.xml | 106 +++++++++++++----- 5 files changed, 210 insertions(+), 54 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisUtils.java index 2fcabf5d57..309cb9192e 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisUtils.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisUtils.java @@ -357,6 +357,18 @@ public class RedisUtils { return typedTuples; } + public Set zReverseRange(String key, long start, long end, Class clazz) { + Set objects = redisTemplate.opsForZSet().reverseRange(key, start, end); + if(CollectionUtils.isEmpty(objects)) return null; + return objects.stream().map(o->{ + try { + T target = clazz.newInstance(); + BeanUtils.copyProperties(o, target); + return target; + }catch (Exception e){throw new RenException("convert error");} + }).collect(Collectors.toSet()); + } + /** * @Description 标签使用数量缓存更新 * @param key diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectTagDictDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectTagDictDao.java index 9fa8ef840d..8439b7d940 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectTagDictDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectTagDictDao.java @@ -92,10 +92,41 @@ public interface IssueProjectTagDictDao extends BaseDao selectTagByCategory(@Param("categories") List categories,@Param("customerId") String customerId,@Param("isDefault")String isDefault); + List selectTagByCategory(@Param("categories") List categories,@Param("customerId") String customerId,@Param("targetCustomerId") String targetCustomerId); + + /** + * @Description 查询客户下的标签数量 + * @param customerId + * @return int + * @author wangc + * @date 2021.03.23 16:51 + */ + int selectCountByCustomerId(@Param("customerId") String customerId); + + /** + * @Description 查询客户下自定义标签 + * @param customerId + * @return java.util.List + * @author wangc + * @date 2021.03.23 16:56 + */ + List selectCustomizedByCustomerId(@Param("customerId") String customerId); + + /** + * @Description 根据传入的二级分类Id查询默认标签 + * 当categories为空时,查询全部默认分类的标签,排序规则:先按照二级分类的上级分类的Sort排序(asc),然后按照二级分类的Sort排序(asc),然后按照标签名拼音排序 + * 当categories不为空时,按照传入的二级分类的顺序排序,然后按照标签名拼音排序 + * @param customerId + * @param categories + * @return java.util.List + * @author wangc + * @date 2021.03.23 15:19 + */ + List selectDefault(@Param("customerId") String customerId,@Param("categories") List categories); /** * @Description 根据客户Id和标签Id集合查询标签的基础信息(标签名、标签码,标签所属分类) + * 不管标签是否被禁用,都可以更新热度,因此这个查询不能加是否禁用的限制 * @param customerId * @param tagIds * @return java.util.List diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java index 33896d5b16..8424fa7ec4 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java @@ -29,6 +29,7 @@ import com.epmet.dto.result.IssueCategoryTagResultDTO; import com.epmet.entity.IssueProjectCategoryDictEntity; import com.epmet.entity.IssueProjectTagDictEntity; import com.epmet.service.IssueProjectCategoryDictService; +import com.epmet.service.IssueProjectTagDictService; import com.epmet.utils.ModuleConstants; import com.fasterxml.jackson.databind.ObjectMapper; import lombok.extern.slf4j.Slf4j; @@ -65,6 +66,8 @@ public class IssueProjectTagDictRedis { private IssueProjectCategoryDictDao categoryDictDao; @Autowired private IssueProjectCategoryDictService categoryDictService; + @Autowired + private IssueProjectTagDictService tagDictService; public void delete(Object[] ids) { } @@ -101,12 +104,10 @@ public class IssueProjectTagDictRedis { boolean ifOtherOnly = null == otherCategory ? false : (!CollectionUtils.isEmpty(category) && category.size() == NumConstant.ONE && category.contains(otherCategory.getId()) ? true : false); Map> result = new HashMap<>(); - - List _default = poolDao.selectTagByCategory(ifOtherOnly || CollectionUtils.isEmpty(category) ? null : category, customerId, NumConstant.ZERO_STR);//默认 + //传入的categories不会只包含"其他"这个分类,因为情况下ifOtherOnly为true,直接传入null + List _default = poolDao.selectDefault(customerId,ifOtherOnly ? null : category); if(!CollectionUtils.isEmpty(_default)){ - result.put(ModuleConstants.DEFAULT_TAG_CATEGORY_NAME,_default.stream().map(o -> { - IssueCategoryTagResultDTO tag = ConvertUtils.sourceToTarget(o,IssueCategoryTagResultDTO.class); - tag.setName(o.getTagName()); return tag;}).collect(Collectors.toList())); + result.put(ModuleConstants.DEFAULT_TAG_CATEGORY_NAME,_default); }else log.error("there is no default tag data in database , customerId : {}",customerId); @@ -127,16 +128,19 @@ public class IssueProjectTagDictRedis { result.put(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME,customizedResult); } - //默认、自定义标签,只要有一个是空就触发补偿 - //不信任缓存数据 - if(!CollectionUtils.isEmpty(result) && !CollectionUtils.isEmpty(result.get(ModuleConstants.DEFAULT_TAG_CATEGORY_NAME)) + + //默认、自定义标签,只要有一个是空就触发补偿 + //不信任缓存数据 + if(!CollectionUtils.isEmpty(result) && !CollectionUtils.isEmpty(result.get(ModuleConstants.DEFAULT_TAG_CATEGORY_NAME)) && !CollectionUtils.isEmpty(result.get(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME))) return result; + + log.warn("fetch customer govern tag cache blankly,customerId:{},now begin compensation...", customerId); - Map> compensate = compensate(customerId, category, ifOtherOnly); + Map> compensate = compensate(customerId, category, ifOtherOnly,result); if (CollectionUtils.isEmpty(compensate)) { log.error("compensation failure or there is no tag data in database!!"); @@ -235,7 +239,7 @@ public class IssueProjectTagDictRedis { log.warn("fetch customer govern tag cache blankly,customerId:{},now begin compensation...", customerId); - Map> compensate = compensate(customerId, category, ifOtherOnly); + Map> compensate = compensate(customerId, category, ifOtherOnly,null); if (CollectionUtils.isEmpty(compensate)) { log.error("compensation failure or there is no tag data in database!!"); @@ -249,10 +253,7 @@ public class IssueProjectTagDictRedis { /** - * @Description category为空,则补偿全部,返回默认标签和自定义标签,补偿全部 - * category仅包含"其他"这个分类的Id时,返回同上,补偿全部 - * category不为空且不只有"其他"这个分类的Id时,则返回并补偿集合中的类别标签以及自定义标签 - * 默认标签不按照热度排序,自定义标签按照热度排序 + * @Description 如果之前查询的结果为空,说明默认与自定义都没有 * * * @param customerId @@ -261,17 +262,38 @@ public class IssueProjectTagDictRedis { * @author wangc * @date 2020.12.10 09:34 */ - public Map> compensate(String customerId,List category,boolean ifOtherOnly){ - + public Map> compensate(String customerId,List category,boolean ifOtherOnly,Map> preResult){ - List db = poolDao.selectTagByCategory(ifOtherOnly || CollectionUtils.isEmpty(category) ? null : category, customerId, null); + List db = new LinkedList<>(); - if(CollectionUtils.isEmpty(db) && (ifOtherOnly || CollectionUtils.isEmpty(category))){ + if(CollectionUtils.isEmpty(preResult) || CollectionUtils.isEmpty(preResult.get(ModuleConstants.DEFAULT_TAG_CATEGORY_NAME))){ CategoryTagInitFormDTO customerIdParam = new CategoryTagInitFormDTO(); customerIdParam.setCustomerId(customerId); - categoryDictService.init(customerIdParam); - db = poolDao.selectTagByCategory(ifOtherOnly || CollectionUtils.isEmpty(category) ? null : category, customerId, null); + if(ifOtherOnly || CollectionUtils.isEmpty(category)) { + //补偿全部默认标签 + categoryDictService.init(customerIdParam); + db.addAll(poolDao.selectTagListByCustomer(customerId)); + }else{ + if(NumConstant.ZERO <= poolDao.selectCountByCustomerId(customerId)){ + categoryDictService.init(customerIdParam); + }else{ + //只插入category中的标签 + tagDictService.insertBatch(poolDao.selectTagByCategory(category,"default",customerId)); + db.addAll(poolDao.selectTagsByCustomerIdAndTagIds(customerId,category)); + } + } + } + + if(CollectionUtils.isEmpty(preResult) || CollectionUtils.isEmpty(preResult.get(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME))){ + //先去数据库查询自定义,为空则是最终结果,不为空则补偿 + List customizedTags = poolDao.selectCustomizedByCustomerId(customerId); + if(!CollectionUtils.isEmpty(customizedTags)){ + db.addAll(customizedTags); + } } + + + // key -> redisKey // value -> [key : score ; value : object] Map>> fulfilled = new HashMap<>(); @@ -310,9 +332,12 @@ public class IssueProjectTagDictRedis { Map> result = new HashMap<>(); //默认标签:按照分类排序 Mapper返回的查询结果是有序的 - result.put(ModuleConstants.DEFAULT_TAG_CATEGORY_NAME,CollectionUtils.isEmpty(db) ? null : db.stream().filter(o -> !StringUtils.equals(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME,o.getCategoryId())).map(entity -> { - IssueCategoryTagResultDTO tag = ConvertUtils.sourceToTarget(entity,IssueCategoryTagResultDTO.class); - tag.setName(entity.getTagName()); return tag;}).collect(Collectors.toList())); + //result.put(ModuleConstants.DEFAULT_TAG_CATEGORY_NAME,CollectionUtils.isEmpty(db) ? null : db.stream().filter(o -> !StringUtils.equals(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME,o.getCategoryId())).map(entity -> { + // IssueCategoryTagResultDTO tag = ConvertUtils.sourceToTarget(entity,IssueCategoryTagResultDTO.class); + // tag.setName(entity.getTagName()); return tag;}).collect(Collectors.toList())); + result.put(ModuleConstants.DEFAULT_TAG_CATEGORY_NAME,poolDao.selectDefault(customerId,ifOtherOnly ? null : category)); + + //自定义标签:按照热度排序 sorted(Comparator.comparing(IssueProjectTagDictEntity :: getIssueUseCount).reversed()) result.put(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME,CollectionUtils.isEmpty(db) ? null : db.stream().filter(o -> StringUtils.equals(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME,o.getCategoryId())).sorted(Comparator.comparing(IssueProjectTagDictEntity :: getIssueUseCount).reversed()).map(entity -> { IssueCategoryTagResultDTO tag = ConvertUtils.sourceToTarget(entity,IssueCategoryTagResultDTO.class); @@ -388,7 +413,42 @@ public class IssueProjectTagDictRedis { * @date 2021.03.22 16:20 */ public void updateTagAvailabilityBySecondCategoryIds(String customerId,ListsecondCategoryIds,String availableFlag){ + if(CollectionUtils.isEmpty(secondCategoryIds)) return; + secondCategoryIds.forEach(cid -> { + String key = GovIssueRedisKeys.getGovernmentTagKey(customerId, cid); + + Set> tagTuples = + redisUtils.zReverseRangeWithScores(key, NumConstant.ZERO_L, (long) (NumConstant.ONE_NEG)); + + if(!CollectionUtils.isEmpty(tagTuples)){ + Map> heatMap = new HashMap<>(); + tagTuples.forEach(tuple -> { + Set queue = heatMap.get(tuple.getValue()); + if((CollectionUtils.isEmpty(queue))) queue = new HashSet<>(); + IssueCategoryTagResultDTO ele = parseObject(tuple.getValue(), IssueCategoryTagResultDTO.class); + ele.setIsDisable(availableFlag); + queue.add(ele); + heatMap.put((Double) tuple.getValue(),queue); + }); + List customizedResult = new LinkedList<>(); + heatMap.keySet().stream().sorted(Comparator.reverseOrder()).collect(Collectors.toList()).forEach(count -> { + customizedResult.addAll(heatMap.get(count)); + }); + + redisUtils.delete(key); + redisTemplate.executePipelined((RedisCallback) connection -> { + heatMap.forEach((score,set) -> { + set.forEach(o -> { + connection.zSetCommands().zIncrBy(redisTemplate.getKeySerializer().serialize(key), + score , + redisTemplate.getValueSerializer().serialize(o)); + }); + }); + return null; + }); + } + }); } public T parseObject(Object o,Class clazz){ diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java index 006568d0e2..5bdf0a58fe 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java @@ -40,6 +40,7 @@ import com.epmet.feign.GovProjectOpenFeignClient; import com.epmet.feign.OperCrmOpenFeignClient; import com.epmet.project.dto.result.ProjectCategoryDictResultDTO; import com.epmet.redis.IssueProjectCategoryDictRedis; +import com.epmet.redis.IssueProjectTagDictRedis; import com.epmet.service.IssueProjectCategoryDictService; import com.epmet.service.IssueProjectTagDictService; import org.apache.commons.collections4.CollectionUtils; @@ -80,6 +81,8 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl page(Map params) { @@ -269,8 +272,8 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl%s,分类Id->%s", formDTO.getCustomerId(), formDTO.getCategoryId())); throw new RuntimeException("分类、标签信息修改失败!"); } - //4.修改缓存中标签状态 todo - + //4.修改缓存中标签状态 + dictRedis.updateTagAvailabilityBySecondCategoryIds(formDTO.getCustomerId(),formDTO.getSecondCategorylist(),formDTO.getType()); } /** diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml index e141bba4b1..487dd5b466 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml @@ -88,37 +88,87 @@ + + + + + + From 23c3c414c48afcede89f43ce0d28e3c8a73ec433 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 23 Mar 2021 22:51:59 +0800 Subject: [PATCH 230/375] =?UTF-8?q?=E5=9B=A0=E4=B8=BA=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E4=B8=8D=E4=B8=80=E8=87=B4=E5=AF=BC=E8=87=B4=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/UserWechatDao.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/UserWechatDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/UserWechatDao.xml index 4c2adabf2f..1ec439f398 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/UserWechatDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/UserWechatDao.xml @@ -59,12 +59,7 @@ SELECT - CUSTOMER_ID, - GRID_ID, - CATEGORY_ID, - CATEGORY_PIDS + CUSTOMER_ID, + GRID_ID, + ISSUE_ID, + CATEGORY_ID, + CATEGORY_PIDS, + CATEGORY_CODE FROM issue_category WHERE DEL_FLAG = '0' AND ISSUE_ID = #{issueId} From 5905f69f4afec5df3fe1f857a4d73ef70378cdec Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 24 Mar 2021 11:22:14 +0800 Subject: [PATCH 233/375] =?UTF-8?q?=E4=B8=8D=E4=BB=8E=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E5=8F=96=20=E4=BA=86=E5=9B=A0=E4=B8=BA=E9=BA=BB=E7=83=A6=20?= =?UTF-8?q?=E4=B8=8D=E8=A7=81=E5=BE=97=E6=95=88=E7=8E=87=E9=AB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/ResiGroupServiceImpl.java | 49 +++---------------- 1 file changed, 8 insertions(+), 41 deletions(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java index a6bb7833fc..ae929c6de9 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java @@ -17,7 +17,6 @@ package com.epmet.modules.group.service.impl; -import cn.hutool.core.bean.BeanUtil; import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -26,18 +25,18 @@ import com.epmet.commons.tools.constant.*; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.redis.RedisKeys; -import com.epmet.commons.tools.redis.RedisUtils; import com.epmet.commons.tools.scan.param.ImgScanParamDTO; import com.epmet.commons.tools.scan.param.ImgTaskDTO; import com.epmet.commons.tools.scan.param.TextScanParamDTO; import com.epmet.commons.tools.scan.param.TextTaskDTO; import com.epmet.commons.tools.scan.result.SyncScanResult; import com.epmet.commons.tools.security.user.LoginUserUtil; -import com.epmet.commons.tools.utils.*; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.utils.ScanContentUtils; import com.epmet.constant.ReadFlagConstant; import com.epmet.dto.form.*; -import com.epmet.dto.result.UserBaseInfoResultDTO; import com.epmet.dto.result.UserResiInfoResultDTO; import com.epmet.dto.result.UserRoleResultDTO; import com.epmet.feign.EpmetMessageOpenFeignClient; @@ -146,9 +145,6 @@ public class ResiGroupServiceImpl extends BaseServiceImpl page(Map params) { @@ -1006,38 +1000,11 @@ public class ResiGroupServiceImpl extends BaseServiceImpl recommendGroupList = baseDao.selectListRecommendList(formDTO); recommendGroupList.forEach(dto -> { - ResiGroupMemberDTO groupMemberDTO = baseDao.selectGroupLeader(dto.getGroupId()); - if (groupMemberDTO == null) { - logger.error("recommendedList 组长信息不存在,groupId:{}", dto.getGroupId()); - return; - } - //获取居民缓存key - Map map = redisUtils.hGetAll(RedisKeys.getResiUserKey(groupMemberDTO.getCustomerUserId())); - UserBaseInfoResultDTO userInfo = null; - if (null != map && !map.isEmpty()) { - //缓存中有数据,直接返回 - userInfo = BeanUtil.mapToBean(map, UserBaseInfoResultDTO.class, true); - } - if (userInfo == null) { - logger.error("recommendedList 用户基础信息不存在,customerUserId:{}", groupMemberDTO.getCustomerUserId()); - Result groupLeaderUserInfo = this.getGroupLeaderUserInfo(dto.getGroupId()); - - if (groupLeaderUserInfo.success() && null != groupLeaderUserInfo.getData()) { - dto.setLeaderName(groupLeaderUserInfo.getData().getShowName()); - } else { - logger.error("组长注册信息查询失败,msg:{},groupId:{}", groupLeaderUserInfo.getMsg(), dto.getGroupId()); - } + Result groupLeaderUserInfo = this.getGroupLeaderUserInfo(dto.getGroupId()); + if (groupLeaderUserInfo.success() && null != groupLeaderUserInfo.getData()) { + dto.setLeaderName(groupLeaderUserInfo.getData().getShowName()); } else { - String gender = null; - if (NumConstant.ONE_STR.equals(userInfo.getGender())) { - gender = "先生"; - } else if (NumConstant.TWO_STR.equals(userInfo.getGender())) { - gender = "女士"; - } else { - gender = "先生/女士"; - } - String leaderName = userInfo.getStreet().concat(StrConstant.HYPHEN).concat(userInfo.getSurname()).concat(gender); - dto.setLeaderName(leaderName); + logger.error("组长注册信息查询失败,msg:{},groupId:{}", groupLeaderUserInfo.getMsg(), dto.getGroupId()); } }); return recommendGroupList; From 88ac6d948fa7cc2c56191450046a096e9e7a244c Mon Sep 17 00:00:00 2001 From: wangchao Date: Wed, 24 Mar 2021 14:32:05 +0800 Subject: [PATCH 234/375] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=BC=95=E7=94=A8?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E6=9B=B4=E6=96=B0=E6=97=B6=E7=9A=84=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/ProjectTagsServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTagsServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTagsServiceImpl.java index 4154c9bd24..87edc5e00b 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTagsServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTagsServiceImpl.java @@ -41,6 +41,7 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import java.util.Arrays; +import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -142,8 +143,9 @@ public class ProjectTagsServiceImpl extends BaseServiceImpl replaceNews = new LinkedList<>(newIds); differentSet.setPlus(newIds.removeAll(orientIds) ? newIds : null); - differentSet.setMinus(orientIds.removeAll(newIds) ? orientIds : null); + differentSet.setMinus(orientIds.removeAll(replaceNews) ? orientIds : null); } Result result = issueClient.updateCitations(differentSet); if(!result.success()) throw new RenException(result.getInternalMsg()); From 12a5d2243505d7ac87b49a0f6989d4b121f4df24 Mon Sep 17 00:00:00 2001 From: wangchao Date: Wed, 24 Mar 2021 15:02:54 +0800 Subject: [PATCH 235/375] =?UTF-8?q?=E7=AD=9B=E9=80=89=E7=AC=A6=E5=90=88?= =?UTF-8?q?=E9=9A=BE=E7=82=B9=E8=B5=8C=E7=82=B9=E7=9A=84=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?sql=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extract/FactOriginProjectMainDailyDao.xml | 32 ++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) 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 index 89ba03036c..675cce9c31 100644 --- 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 @@ -395,23 +395,25 @@ LEFT JOIN ( - SELECT - - project.ID AS projectId, - IF(project.project_status = 'closed',period.handled_date,NOW()) AS finishDate - - FROM fact_origin_project_main_daily project LEFT JOIN fact_origin_project_org_period_daily period - ON project.ID = period.project_id AND period.del_flag = '0' AND period.customer_id = #{customerId} - AND period.operation = 'close' - WHERE project.customer_id = #{customerId} AND project.del_flag = '0' - ) projectFinishDate ON projectFinishDate.projectId = period.project_id - - WHERE - period.del_flag = '0' + SELECT + project.ID AS projectId, + IFNULL(period.handled_date,NOW()) AS finishDate + FROM + fact_origin_project_main_daily project + LEFT JOIN fact_origin_project_org_period_daily period ON project.ID = period.project_id + AND period.del_flag = '0' AND period.customer_id = #{customerId} - AND TIMESTAMPDIFF( DAY, period.informed_date, projectFinishDate.finishDate) > #{thresholdValue} - ) + AND period.operation = 'close' + WHERE + project.customer_id = #{customerId} + AND project.del_flag = '0' + ) projectFinishDate ON projectFinishDate.projectId = period.project_id + WHERE + period.del_flag = '0' + AND period.customer_id = #{customerId} + AND TIMESTAMPDIFF( DAY, period.informed_date, IFNULL(period.handled_date,projectFinishDate.finishDate)) > #{thresholdValue} + ) From 2a6bf3cf8eb59a6b2c0f3da3303b5e895a3abd14 Mon Sep 17 00:00:00 2001 From: wangchao Date: Wed, 24 Mar 2021 15:07:33 +0800 Subject: [PATCH 236/375] =?UTF-8?q?=E9=9A=BE=E7=82=B9=E8=B5=8C=E7=82=B9?= =?UTF-8?q?=E4=B8=8D=E7=94=A8=E5=8D=95=E7=8B=AC=E6=9B=B4=E6=96=B0dataEndTi?= =?UTF-8?q?me?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/impl/ScreenDifficultyDataServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenDifficultyDataServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenDifficultyDataServiceImpl.java index 66873e1b6d..f263b332fc 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenDifficultyDataServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenDifficultyDataServiceImpl.java @@ -66,7 +66,7 @@ public class ScreenDifficultyDataServiceImpl extends BaseServiceImpl Date: Wed, 24 Mar 2021 15:16:26 +0800 Subject: [PATCH 237/375] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9AApiService?= =?UTF-8?q?=E5=9F=BA=E7=B1=BB=E4=B8=AD=E7=9A=84=E4=B8=80=E4=BA=9B=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E7=9A=84=E5=BC=82=E5=B8=B8=E6=96=87=E6=A1=88=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=E6=94=BE=E5=BC=80=E4=BA=86=E8=B0=83?= =?UTF-8?q?=E7=94=A8=E7=BD=91=E6=A0=BC=E5=8C=96=E5=B9=B3=E5=8F=B0=E7=9A=84?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=EF=BC=8C=E5=BC=80=E5=A7=8B=E6=AD=A3=E5=BC=8F?= =?UTF-8?q?=E8=B0=83=E7=94=A8=20=E8=B0=83=E9=80=9A=E4=BA=86=E5=AF=B9?= =?UTF-8?q?=E7=BD=91=E6=A0=BC=E5=8C=96=E5=B9=B3=E5=8F=B0=E7=9A=84=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E4=B8=8A=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/apiservice/ApiService.java | 21 ++++++++++--------- .../epmet/apiservice/impl/DemoApiService.java | 6 ++---- .../impl/LuzhouGridPlatformApiService.java | 21 ++++++++++++------- 3 files changed, 26 insertions(+), 22 deletions(-) diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java index 7aff23fd7a..ef54d00d93 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java @@ -1,12 +1,12 @@ package com.epmet.apiservice; +import com.alibaba.fastjson.JSON; +import com.epmet.apiservice.result.LZGridPlatformBaseResult; import com.epmet.dto.result.ProjectAssistResult; import com.epmet.commons.tools.exception.RenException; -import com.epmet.commons.tools.redis.RedisKeys; import com.epmet.commons.tools.utils.HttpClientManager; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.SpringContextUtils; -import com.epmet.constant.ThirdPlatformActions; import com.epmet.dao.ThirdplatformActionDao; import com.epmet.dao.ThirdplatformCustomerRegisterDao; import com.epmet.dao.ThirdplatformDao; @@ -15,8 +15,6 @@ import com.epmet.dto.form.TPFDemoFormDTO; import com.epmet.entity.ThirdplatformActionEntity; import com.epmet.entity.ThirdplatformCustomerRegisterEntity; import com.epmet.entity.ThirdplatformEntity; -import org.apache.commons.lang3.StringUtils; -import org.springframework.data.redis.core.RedisTemplate; import java.util.HashMap; import java.util.Map; @@ -77,7 +75,8 @@ public abstract class ApiService { if (result.success()) { throw new RenException("请求第三方平台,获取AccessToken失败。"); } - judgeResultSuccess(result.getData()); + LZGridPlatformBaseResult platformResult = JSON.parseObject(result.getData(), LZGridPlatformBaseResult.class); + judgeResultSuccess(platformResult); return result.getData(); } @@ -110,12 +109,14 @@ public abstract class ApiService { headers); if (result == null) { - throw new RenException("请求第三方平台,获取AccessToken失败。result为null"); + throw new RenException("请求第三方平台,发送Post请求失败。result为null"); } - if (result.success()) { - throw new RenException("请求第三方平台,获取AccessToken失败。"); + if (!result.success()) { + throw new RenException("请求第三方平台,发送Post请求失败。错误信息:" + result.getMsg()); } - judgeResultSuccess(result.getData()); + + LZGridPlatformBaseResult platformResult = JSON.parseObject(result.getData(), LZGridPlatformBaseResult.class); + judgeResultSuccess(platformResult); return result.getData(); } @@ -165,5 +166,5 @@ public abstract class ApiService { * @author wxz * @date 2021.03.22 10:32 */ - public abstract void judgeResultSuccess(String stringData); + public abstract void judgeResultSuccess(LZGridPlatformBaseResult result); } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/DemoApiService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/DemoApiService.java index 1a1e00cd4e..63f718a0d5 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/DemoApiService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/DemoApiService.java @@ -1,6 +1,7 @@ package com.epmet.apiservice.impl; import com.epmet.apiservice.ApiService; +import com.epmet.apiservice.result.LZGridPlatformBaseResult; import com.epmet.dto.result.ProjectAssistResult; import com.epmet.dto.form.ProjectApplyAssistFormDTO; import com.epmet.feign.OperCrmOpenFeignClient; @@ -17,9 +18,6 @@ public class DemoApiService extends ApiService { Logger logger = LoggerFactory.getLogger(DemoApiService.class); - @Autowired - private OperCrmOpenFeignClient operCrmOpenFeignClient; - @Override public String getAccessToken(String platformId) { return null; @@ -32,7 +30,7 @@ public class DemoApiService extends ApiService { } @Override - public void judgeResultSuccess(String stringData) { + public void judgeResultSuccess(LZGridPlatformBaseResult result) { } } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java index 026b40654d..25586f743a 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java @@ -45,14 +45,19 @@ public class LuzhouGridPlatformApiService extends ApiService { params.put("appKey", platformKey); params.put("appSecret", platformSecret); Result result = HttpClientManager.getInstance().sendGet(baseUrl.concat(actionEntity.getApiUrl()), params); + if (result == null) { throw new RenException("请求第三方平台,获取AccessToken失败。result为null"); } + if (!result.success()) { throw new RenException("请求第三方平台,获取AccessToken失败。"); } - judgeResultSuccess(result.getData()); - token = result.getData(); + + LZGridPlatformBaseResult platformResult = JSON.parseObject(result.getData(), LZGridPlatformBaseResult.class); + judgeResultSuccess(platformResult); + + token = platformResult.getResult(); rt.opsForValue().set(RedisKeys.getThirdPlatformAccessTokenKey(platformId), token); } return token; @@ -63,28 +68,28 @@ public class LuzhouGridPlatformApiService extends ApiService { String platformId = formDTO.getPlatformId(); // 正式调用第三方平台 - //String result1 = sendPostRequest(platformId, ThirdPlatformActions.PROJECT_ASSIST, "{}", null); + String argsStr = JSON.toJSONString(formDTO); + String result = sendPostRequest(platformId, ThirdPlatformActions.PROJECT_ASSIST, argsStr, null); // 开发阶段临时写死 - String result = "{\"eventId\":\"test-task-id\"}"; + //String result = "{\"eventId\":\"test-task-id\"}"; ProjectAssistResult projectAssistResult = new ProjectAssistResult(); if (!StringUtils.isBlank(result)) { // 此处要经过一系列业务处理,将第三方平台返回的数据进行解析,等处理最后转换成ProjectAssistResult类型,返回。ProjectAssistResult这个类型是 // 所有apiService的projectAssist方法返回值的统一类型,是我们的epmet-cloud所需要的数据的实体, // 所有apiService都要想办法转化成这个类型。 - LZGridPlatformProjectAssistResult lzResult = JSON.parseObject(result, LZGridPlatformProjectAssistResult.class); + LZGridPlatformBaseResult lzResult = JSON.parseObject(result, LZGridPlatformBaseResult.class); // 此处设置为第三方系统返回的唯一id - projectAssistResult.setTaskId(lzResult.getEventId()); + projectAssistResult.setTaskId(lzResult.getResult()); } System.out.println("泸州网格化平台项目协助发送成功"); return projectAssistResult; } @Override - public void judgeResultSuccess(String stringData) { + public void judgeResultSuccess(LZGridPlatformBaseResult result) { //LZGridPlatformBaseResult; - LZGridPlatformBaseResult result = JSON.parseObject(stringData, LZGridPlatformBaseResult.class); if (!"200".equalsIgnoreCase(result.getCode())) { throw new RenException("泸州网格化平台:返回失败结果,错误码:" + result.getCode()); } From e1dfc04a5c2316c4885ab86c66c181193b3f66d6 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Wed, 24 Mar 2021 15:25:29 +0800 Subject: [PATCH 238/375] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=8F=91=E9=80=81?= =?UTF-8?q?=E5=88=B0=E7=AC=AC=E4=B8=89=E6=96=B9=E5=B9=B3=E5=8F=B0=20detail?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../feign/EpmetThirdOpenFeignClient.java | 2 +- .../EpmetThirdOpenFeignClientFallback.java | 2 +- .../epmet/controller/ProjectController.java | 4 +- .../com/epmet/constant/ProjectConstant.java | 2 +- .../epmet/controller/ProjectController.java | 5 + .../service/impl/ProjectServiceImpl.java | 107 ++++++++++++++++-- .../group/feign/ResiGroupOpenFeignClient.java | 9 ++ .../ResiGroupOpenFeignClientFallback.java | 10 ++ 8 files changed, 124 insertions(+), 17 deletions(-) diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/EpmetThirdOpenFeignClient.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/EpmetThirdOpenFeignClient.java index 0e2b93e4d3..9497f1bed8 100644 --- a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/EpmetThirdOpenFeignClient.java +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/EpmetThirdOpenFeignClient.java @@ -36,6 +36,6 @@ public interface EpmetThirdOpenFeignClient { * @date 2021/3/18 11:08 */ @PostMapping("third/project/apply-assist") - Result applyAssist(@RequestBody ProjectApplyAssistFormDTO formDTO); + Result applyAssist(@RequestBody ProjectApplyAssistFormDTO formDTO); } diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/fallback/EpmetThirdOpenFeignClientFallback.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/fallback/EpmetThirdOpenFeignClientFallback.java index 10abcf6992..05c0d52fd7 100644 --- a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/fallback/EpmetThirdOpenFeignClientFallback.java +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/fallback/EpmetThirdOpenFeignClientFallback.java @@ -32,7 +32,7 @@ public class EpmetThirdOpenFeignClientFallback implements EpmetThirdOpenFeignCli * @date 2021/3/18 11:08 */ @Override - public Result applyAssist(ProjectApplyAssistFormDTO formDTO) { + public Result applyAssist(ProjectApplyAssistFormDTO formDTO) { return ModuleUtils.feignConError(ServiceConstant.EPMET_THIRD_SERVER, "applyAssist", formDTO); } } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ProjectController.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ProjectController.java index 0b32b9c2dd..699f70ec34 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ProjectController.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ProjectController.java @@ -44,10 +44,10 @@ public class ProjectController { * @date 2021.03.15 21:13 */ @PostMapping("apply-assist") - public Result applyAssist(@RequestBody ProjectApplyAssistFormDTO formDTO) { + public Result applyAssist(@RequestBody ProjectApplyAssistFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO); ProjectAssistResult projectAssistResult = projectService.applyAssist(formDTO); - return new Result().ok(projectAssistResult); + return new Result().ok(projectAssistResult); } } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/constant/ProjectConstant.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/constant/ProjectConstant.java index 6bae43e57b..4a8696fa01 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/constant/ProjectConstant.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/constant/ProjectConstant.java @@ -159,5 +159,5 @@ public interface ProjectConstant { String NOT_EXIST_PROJECT = "未查询带此项目信息......"; - String EXTERNAL_SYSTEM = "external_system"; + String EXTERNAL_SYSTEM = "third_platform_project_send"; } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java index 05fe6c04b4..60257a5e4d 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java @@ -217,4 +217,9 @@ public class ProjectController { } return new Result<>(); } + @PostMapping("platformcallback") + public Result platformCallBack(@RequestBody PlatformCallBackFormDTO formDTO) { + projectService.platformCallBack(formDTO); + return new Result(); + } } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index 63d3dacc1d..73c293d828 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -45,9 +45,14 @@ import com.epmet.entity.*; import com.epmet.feign.*; import com.epmet.redis.ProjectRedis; import com.epmet.resi.group.constant.TopicConstant; +import com.epmet.resi.group.dto.topic.ResiTopicDTO; +import com.epmet.resi.group.feign.ResiGroupOpenFeignClient; import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO; import com.epmet.service.*; import com.github.pagehelper.PageHelper; +import com.google.common.base.Joiner; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import org.apache.commons.collections4.CollectionUtils; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.ListUtils; @@ -115,6 +120,10 @@ public class ProjectServiceImpl extends BaseServiceImpl imageList = formDTO.getInternalFile().stream().filter(fileDTO -> TopicConstant.IMAGE.equals(fileDTO.getType())).map(FileDTO::getUrl).collect(Collectors.toList()); @@ -2089,13 +2103,6 @@ public class ProjectServiceImpl extends BaseServiceImpl relatedPersonnel = projectRelatedPersonnelService.getPersonnelListByProjectId(formDTO.getProjectId()); CustomerGridFormDTO customerGridFormDTO = new CustomerGridFormDTO(); customerGridFormDTO.setGridId(relatedPersonnel.get(0).getGridId()); - Result gridResult = govOrgOpenFeignClient.getCustomerGridByGridId(customerGridFormDTO); - if (!gridResult.success()) { - throw new RenException(gridResult.getCode(), gridResult.getMsg()); - } - applyAssistFormDTO.setLatitude(gridResult.getData().getLatitude()); - applyAssistFormDTO.setLongitude(gridResult.getData().getLongitude()); - //获取议题详情 IssueDetailFormDTO issueDetailFormDTO = new IssueDetailFormDTO(); issueDetailFormDTO.setIssueId(projectEntity.getOriginId()); @@ -2103,18 +2110,44 @@ public class ProjectServiceImpl extends BaseServiceImpl topic = resiGroupOpenFeignClient.getTopicById(issueDetail.getData().getTopicInfo().getTopicId()); + if (!topic.success()) { + throw new RenException(topic.getCode(), topic.getMsg()); + } + applyAssistFormDTO.setLatitude(topic.getData().getDimension()); + applyAssistFormDTO.setLongitude(topic.getData().getLongitude()); + applyAssistFormDTO.setProvince(topic.getData().getProvince()); + applyAssistFormDTO.setCity(topic.getData().getCity()); + applyAssistFormDTO.setArea(topic.getData().getArea()); ProjectDetailDTO projectDetailDTO = ConvertUtils.sourceToTarget(issueDetail.getData(), ProjectDetailDTO.class); - projectDetailDTO = ConvertUtils.sourceToTarget(issueDetail.getData().getTopicInfo(), ProjectDetailDTO.class); + projectDetailDTO.setTopicContent(issueDetail.getData().getTopicInfo().getTopicContent()); + projectDetailDTO.setTopicPublisher(issueDetail.getData().getTopicInfo().getTopicPublisher()); + projectDetailDTO.setTopicPublisherMobile(issueDetail.getData().getTopicInfo().getTopicPublisherMobile()); + projectDetailDTO.setTopicPublishTime(issueDetail.getData().getTopicInfo().getTopicPublishTime()); + projectDetailDTO.setPhotoList(issueDetail.getData().getTopicInfo().getPhotoList()); projectDetailDTO.setPublicReply(formDTO.getPublicReply()); projectDetailDTO.setInternalRemark(formDTO.getInternalRemark()); - applyAssistFormDTO.setDetail(projectDetailDTO.toString()); + //项目详情 + ProjectDetailFromDTO projectDetailFromDTO = new ProjectDetailFromDTO(); + projectDetailFromDTO.setUserId(formDTO.getUserId()); + projectDetailFromDTO.setProjectId(formDTO.getProjectId()); + projectDetailFromDTO.setCustomerId(projectStaff.getCustomerId()); + ProjectDetailResultDTO projectDetailResultDTO = getProjectDetail(projectDetailFromDTO); + + //项目进展 + ProcessListV2FormDTO processListV2FormDTO = new ProcessListV2FormDTO(); + processListV2FormDTO.setProjectId(formDTO.getProjectId()); + List processList = projectTraceService.processListV2(processListV2FormDTO); + + applyAssistFormDTO.setDetail(getDetail(projectDetailDTO, projectDetailResultDTO, processList)); applyAssistFormDTO.setDetailAddress(projectDetailDTO.getBelongsGridName()); - Result result = epmetThirdOpenFeignClient.applyAssist(applyAssistFormDTO); + applyAssistFormDTO.setSource("党建引领"); + applyAssistFormDTO.setNotifyUrl("/gov/project/project/platformcallback"); + Result result = epmetThirdOpenFeignClient.applyAssist(applyAssistFormDTO); if (!result.success()) { throw new RenException(result.getCode(), result.getMsg()); } - applyAssistFormDTO.setSource("党建引领"); - ProjectAssistResult assistResult = (ProjectAssistResult)result.getData(); + ProjectAssistResult assistResult = result.getData(); //发送到外部系统 end //结果存入project_sub_process表 @@ -2202,4 +2235,54 @@ public class ProjectServiceImpl extends BaseServiceImpl processList) { + String detail = ""; + detail = detail.concat("项目来源\n"); + if (null == sourceDTO.getTopicContent()) { + sourceDTO.setTopicContent(""); + } + + if (CollectionUtils.isEmpty(sourceDTO.getPhotoList())) { + sourceDTO.setPhotoList(new ArrayList<>()); + } + String source = "议题标题:" + sourceDTO.getIssueTitle() + "\n" + + "针对话题\n" + (null == sourceDTO.getTopicContent()?"":sourceDTO.getTopicContent()) + "\n" + + "话题图片\n" + Joiner.on(StrConstant.COMMA).join(sourceDTO.getPhotoList()) + "\n" + + "建议采用如下处理方式\n" + sourceDTO.getIssueSuggestion() + "\n" + + "所属网格:" + sourceDTO.getBelongsGridName() + "\n" + + "话题发表人:" + sourceDTO.getTopicPublisher() + sourceDTO.getTopicPublisherMobile() + "\n" + + "议题发表人:" + sourceDTO.getIssueInitiator() + sourceDTO.getIssuePublisherMobile() + "\n" + + "话题发表时间:" + DateUtils.formatTimestamp(sourceDTO.getTopicPublishTime(), DateUtils.DATE_TIME_PATTERN); + detail = detail.concat(source); + detail = detail.concat("\n项目详情\n"); + detail = "项目标题:" +projectDetail.getProjectTitle() + "\n" + + "项目方案::\n" + projectDetail.getPublicReply() + "\n" + + "内部备注:\n" + projectDetail.getInternalRemark() + "\n" + + "当前处理部门:\n"; + for (ProjectDetailResultDTO.DepartmentNameListBean item : projectDetail.getDepartmentList()) { + String department = item.getDepartmentName() + "(" + Joiner.on(StrConstant.COMMA).join(item.getStaffList()) + ")\n"; + detail = detail + department; + } + detail = detail.concat("\n处理进展\n"); + for (ProcessListV2ResultDTO item : processList) { + String process = "【" + item.getProcessName() + "】\n" + + DateUtils.formatTimestamp(item.getProcessTime(), DateUtils.DATE_TIME_PATTERN) + "\n" + + "处理部门:" + item.getProcessName() + "\n" + + "说明:" + item.getPublicReply() + "\n"; + //TODO 上传图片 + detail = detail + process; + } + + System.out.println(detail); + return detail; + + } + + private String toJson(Object object) { + GsonBuilder gsonBuilder = new GsonBuilder(); + gsonBuilder.setPrettyPrinting(); + Gson gson = gsonBuilder.create(); + return gson.toJson(object); + } + } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java index 3c8a358f1c..fd0d8f7613 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java @@ -198,4 +198,13 @@ public interface ResiGroupOpenFeignClient { @GetMapping("resi/group/topic/querytopicinfobyissueid/{issueId}") Result queryTopicInfoByIssueId(@PathVariable("issueId")String issueId); + + /** + * @param + * @return + * @Author sun + * @Description 根据话题Id查询话题信息 + **/ + @PostMapping("/resi/group/topic/gettopicbyid/{topicId}") + Result getTopicById(@PathVariable("topicId") String topicId); } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/fallback/ResiGroupOpenFeignClientFallback.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/fallback/ResiGroupOpenFeignClientFallback.java index 881569ea10..397a56a077 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/fallback/ResiGroupOpenFeignClientFallback.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/fallback/ResiGroupOpenFeignClientFallback.java @@ -139,4 +139,14 @@ public class ResiGroupOpenFeignClientFallback implements ResiGroupOpenFeignClien public Result queryTopicInfoByIssueId(String issueId) { return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "queryTopicInfoByIssueId", issueId); } + + /** + * @param topicId@return + * @Author sun + * @Description 根据话题Id查询话题信息 + **/ + @Override + public Result getTopicById(String topicId) { + return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "getTopicById", topicId); + } } From 686d42b4cde1fcab525f7e6e15e6f181ab4c2477 Mon Sep 17 00:00:00 2001 From: wxz Date: Wed, 24 Mar 2021 15:52:03 +0800 Subject: [PATCH 239/375] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=201.?= =?UTF-8?q?=E7=AC=AC=E4=B8=89=E6=96=B9=E5=B9=B3=E5=8F=B0=E6=8E=A5=E5=85=A5?= =?UTF-8?q?=EF=BC=8CAccessToken=E7=BC=93=E5=AD=98=E5=8A=A8=E4=BD=9C?= =?UTF-8?q?=E4=BB=8E=E5=85=B7=E4=BD=93=E7=9A=84=E5=AD=90=E7=B1=BB=E6=8F=90?= =?UTF-8?q?=E5=8F=96=E5=88=B0=E4=BA=86ApiService=E4=B8=AD=EF=BC=8C?= =?UTF-8?q?=E5=AD=90=E7=B1=BB=E5=8F=AA=E9=9C=80=E8=A6=81=E8=B0=83=E7=94=A8?= =?UTF-8?q?ApiService=E6=8F=90=E4=BE=9B=E7=9A=84addAccessTokenToCache()/ge?= =?UTF-8?q?tAccessTokenFromCache()=E6=96=B9=E6=B3=95=E5=8D=B3=E5=8F=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/apiservice/ApiService.java | 43 +++++++++++++++++++ .../impl/LuzhouGridPlatformApiService.java | 5 +-- 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java index ef54d00d93..89bb8f8e24 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java @@ -2,6 +2,7 @@ package com.epmet.apiservice; import com.alibaba.fastjson.JSON; import com.epmet.apiservice.result.LZGridPlatformBaseResult; +import com.epmet.commons.tools.redis.RedisKeys; import com.epmet.dto.result.ProjectAssistResult; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.utils.HttpClientManager; @@ -15,6 +16,7 @@ import com.epmet.dto.form.TPFDemoFormDTO; import com.epmet.entity.ThirdplatformActionEntity; import com.epmet.entity.ThirdplatformCustomerRegisterEntity; import com.epmet.entity.ThirdplatformEntity; +import org.springframework.data.redis.core.RedisTemplate; import java.util.HashMap; import java.util.Map; @@ -116,6 +118,14 @@ public abstract class ApiService { } LZGridPlatformBaseResult platformResult = JSON.parseObject(result.getData(), LZGridPlatformBaseResult.class); + + // token过期重试逻辑,先不加 + //if ("402".equals(platformResult.getCode())) { + // // 如果token过期 + // deleteAccessTokenFromCache(platformId); + // getAccessToken(platformId); + // return sendPostRequest(platformId, action, jsonString, headers); + //} judgeResultSuccess(platformResult); return result.getData(); } @@ -128,6 +138,39 @@ public abstract class ApiService { */ public abstract String getAccessToken(String platformId); + /** + * @Description 从缓存中删除AccessToken + * @return + * @author wxz + * @date 2021.03.24 15:35 + */ + protected void deleteAccessTokenFromCache(String platformId) { + RedisTemplate stringRedisTemplate = SpringContextUtils.getBean("redisTemplate", RedisTemplate.class); + stringRedisTemplate.delete(RedisKeys.getThirdPlatformAccessTokenKey(platformId)); + } + + /** + * @Description 添加AccessToken到缓存 + * @return + * @author wxz + * @date 2021.03.24 15:32 + */ + protected void addAccessTokenToCache(String platformId, String accessToken) { + RedisTemplate stringRedisTemplate = SpringContextUtils.getBean("redisTemplate", RedisTemplate.class); + stringRedisTemplate.opsForValue().set(RedisKeys.getThirdPlatformAccessTokenKey(platformId), accessToken); + } + + /** + * @Description 从缓存中取token + * @return + * @author wxz + * @date 2021.03.24 15:40 + */ + protected String getAccessTokenFromCache(String platformId) { + RedisTemplate stringRedisTemplate = SpringContextUtils.getBean("redisTemplate", RedisTemplate.class); + return stringRedisTemplate.opsForValue().get(platformId); + } + /** * @Description 判断客户是否注册了指定的平台,如果没有注册,则抛出异常 * @return diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java index 25586f743a..5a903a6b08 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java @@ -30,8 +30,7 @@ public class LuzhouGridPlatformApiService extends ApiService { @Override public String getAccessToken(String platformId) { - RedisTemplate rt = SpringContextUtils.getBean("redisTemplate", RedisTemplate.class); - String token = rt.opsForValue().get(RedisKeys.getThirdPlatformAccessTokenKey(platformId)); + String token = getAccessTokenFromCache(platformId); if (StringUtils.isBlank(token)) { ThirdplatformEntity thirdplatform = SpringContextUtils.getBean(ThirdplatformDao.class).selectById(platformId); ThirdplatformActionEntity actionEntity = SpringContextUtils.getBean(ThirdplatformActionDao.class) @@ -58,7 +57,7 @@ public class LuzhouGridPlatformApiService extends ApiService { judgeResultSuccess(platformResult); token = platformResult.getResult(); - rt.opsForValue().set(RedisKeys.getThirdPlatformAccessTokenKey(platformId), token); + addAccessTokenToCache(platformId, token); } return token; } From 9fdb382b74bbbecbce294a31b572a73433963bfb Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 24 Mar 2021 16:02:29 +0800 Subject: [PATCH 240/375] =?UTF-8?q?pc=E8=BF=90=E8=90=A5=E7=AB=AFtoken?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AE=A2=E6=88=B7Id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/service/impl/GovWebServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-auth/src/main/java/com/epmet/service/impl/GovWebServiceImpl.java b/epmet-auth/src/main/java/com/epmet/service/impl/GovWebServiceImpl.java index bf0689b2b7..8575a8e244 100644 --- a/epmet-auth/src/main/java/com/epmet/service/impl/GovWebServiceImpl.java +++ b/epmet-auth/src/main/java/com/epmet/service/impl/GovWebServiceImpl.java @@ -106,6 +106,7 @@ public class GovWebServiceImpl implements GovWebService { logger.info("app:" + formDTO.getApp() + ";client:" + formDTO.getClient() + ";userId:" + userId + ";生成token[" + token + "]"); int expire = jwtTokenProperties.getExpire(); TokenDto tokenDto = new TokenDto(); + tokenDto.setCustomerId(formDTO.getCustomerId()); tokenDto.setApp(formDTO.getApp()); tokenDto.setClient(formDTO.getClient()); tokenDto.setUserId(userId); From 05a567258e60f659c012ee4c1b8bd22686c4f38a Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 24 Mar 2021 16:18:51 +0800 Subject: [PATCH 241/375] =?UTF-8?q?=E9=9A=BE=E7=82=B9=E5=A0=B5=E7=82=B9?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extract/FactOriginProjectMainDailyDao.xml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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 index 675cce9c31..b9608e9ee3 100644 --- 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 @@ -335,6 +335,7 @@ gridInfo.allParentIds FROM fact_origin_project_main_daily project + LEFT JOIN ( SELECT grid.ID AS dimGridId, @@ -368,7 +369,9 @@ grid.DEL_FLAG = '0' AND grid.CUSTOMER_ID = #{customerId} ) gridInfo ON project.GRID_ID = gridInfo.dimGridId + LEFT JOIN ( SELECT PROJECT_ID, COUNT( DISTINCT ORG_ID ) AS reOrg FROM fact_origin_project_org_period_daily WHERE DEL_FLAG = '0' AND CUSTOMER_ID = #{customerId} GROUP BY PROJECT_ID ) relation ON project.ID = relation.PROJECT_ID + LEFT JOIN ( SELECT PROJECT_ID, @@ -387,14 +390,15 @@ AND project.CUSTOMER_ID = #{customerId} AND project.ID IN ( - + SELECT DISTINCT period.project_id FROM fact_origin_project_org_period_daily period LEFT JOIN ( - + + SELECT project.ID AS projectId, IFNULL(period.handled_date,NOW()) AS finishDate @@ -571,4 +575,4 @@ - \ No newline at end of file + From 9f8e27e61b5fbff4dd211643fb28e0165a879095 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Wed, 24 Mar 2021 16:25:50 +0800 Subject: [PATCH 242/375] =?UTF-8?q?=E6=B3=A8=E9=87=8A=E7=BB=B4=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/IssueProjectCategoryDictServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java index 5bdf0a58fe..6a21d19c46 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java @@ -345,7 +345,7 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl Date: Wed, 24 Mar 2021 17:16:03 +0800 Subject: [PATCH 243/375] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E3=80=81=E6=A0=87=E7=AD=BE=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E9=97=AE=E9=A2=98=E4=B8=8D=E6=94=BE=E5=9C=A8=E6=96=B0?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E5=88=9B=E5=BB=BA=E8=BF=87=E7=A8=8B=E4=B8=AD?= =?UTF-8?q?=20=E5=B5=8C=E5=85=A5=E5=85=B7=E4=BD=93=E7=9A=84=E4=B8=9A?= =?UTF-8?q?=E5=8A=A1=E9=80=BB=E8=BE=91=E4=B8=AD=EF=BC=8C=E9=99=8D=E4=BD=8E?= =?UTF-8?q?=E6=96=B0=E5=AE=A2=E6=88=B7=E5=88=9D=E5=A7=8B=E5=8C=96=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=E5=8E=8B=E5=8A=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IssueProjectCategoryDictServiceImpl.java | 59 ++++++++++--------- .../impl/IssueProjectTagDictServiceImpl.java | 24 +++++++- 2 files changed, 52 insertions(+), 31 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java index 6a21d19c46..d78c3a3458 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java @@ -31,7 +31,10 @@ import com.epmet.dao.IssueCategoryDao; import com.epmet.dao.IssueProjectCategoryDictDao; import com.epmet.dao.IssueProjectRelationDao; import com.epmet.dao.IssueProjectTagDictDao; -import com.epmet.dto.*; +import com.epmet.dto.IssueCategoryDTO; +import com.epmet.dto.IssueDTO; +import com.epmet.dto.IssueProjectCategoryDictDTO; +import com.epmet.dto.ProjectCategoryDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.entity.IssueProjectCategoryDictEntity; @@ -145,6 +148,18 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl categoryList(String customerId) { List resultList = baseDao.selectCustomerCategoryList(customerId); + //2021.3.24 sun 客户初始化分类标签的接口不想加到新客户创建的程序里,因此加到这里 在标签列表的查询方法中也有关于初始化分类标签的逻辑 + try { + if(CollectionUtils.isEmpty(resultList)){ + CategoryTagInitFormDTO dto = new CategoryTagInitFormDTO(); + dto.setCustomerId(customerId); + init(dto); + resultList = baseDao.selectCustomerCategoryList(customerId); + } + } catch (Exception e) { + logger.error("客户初始化分类、标签失败,客户Id->"+customerId, e); + } + //end return resultList; } @@ -201,35 +216,21 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl customerIdList = new ArrayList<>(); - if(StringUtils.isBlank(formDTO.getCustomerId())){ - Result> resultList = operCrmOpenFeignClient.getAllCustomerList(); - if(!resultList.success()){ - throw new RuntimeException("crm库获取有效客户列表失败!"); - } - customerIdList = resultList.getData().stream().map(cu->cu.getId()).collect(Collectors.toList()); - }else { - customerIdList.add(formDTO.getCustomerId()); + List list = baseDao.selectCategoryListByCustomer(formDTO.getCustomerId()); + if (CollectionUtils.isEmpty(list)) { + //分类初始化 + List categoryList = baseDao.selectCategoryListByCustomer("default"); + categoryList.forEach(item -> { + item.setCustomerId(formDTO.getCustomerId()); + }); + this.insertBatch(categoryList); + //标签初始化 + List tagList = issueProjectTagDictService.getTagListByCustomer("default"); + tagList.forEach(item -> { + item.setCustomerId(formDTO.getCustomerId()); + }); + issueProjectTagDictService.insertBatch(tagList); } - //end sun - customerIdList.forEach(cu->{ - List list = baseDao.selectCategoryListByCustomer(cu); - if (CollectionUtils.isEmpty(list)) { - //分类初始化 - List categoryList = baseDao.selectCategoryListByCustomer("default"); - categoryList.forEach(item -> { - item.setCustomerId(cu); - }); - this.insertBatch(categoryList); - //标签初始化 - List tagList = issueProjectTagDictService.getTagListByCustomer("default"); - tagList.forEach(item -> { - item.setCustomerId(cu); - }); - issueProjectTagDictService.insertBatch(tagList); - } - }); } /** diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectTagDictServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectTagDictServiceImpl.java index 5919990477..ee06f971d3 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectTagDictServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectTagDictServiceImpl.java @@ -20,25 +20,28 @@ package com.epmet.service.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.constant.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.constant.GovIssueRedisKeys; import com.epmet.dao.IssueProjectTagDictDao; import com.epmet.dto.IssueProjectTagDictDTO; +import com.epmet.dto.form.CategoryTagInitFormDTO; import com.epmet.dto.form.TagDifferentSetFormDTO; import com.epmet.dto.form.TagListFormDTO; import com.epmet.dto.result.IssueCategoryTagResultDTO; -import com.epmet.dto.result.IssueProjectTagsResultDTO; import com.epmet.dto.result.TagListResultDTO; import com.epmet.entity.IssueProjectTagDictEntity; import com.epmet.redis.IssueProjectTagDictRedis; +import com.epmet.service.IssueProjectCategoryDictService; import com.epmet.service.IssueProjectTagDictService; import com.epmet.utils.ModuleConstants; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -55,8 +58,11 @@ import java.util.stream.Collectors; @Service public class IssueProjectTagDictServiceImpl extends BaseServiceImpl implements IssueProjectTagDictService { + private static Logger logger = LoggerFactory.getLogger(IssueProjectTagDictServiceImpl.class); @Autowired private IssueProjectTagDictRedis issueProjectTagDictRedis; + @Autowired + private IssueProjectCategoryDictService issueProjectCategoryDictService; @Override public PageData page(Map params) { @@ -125,6 +131,20 @@ public class IssueProjectTagDictServiceImpl extends BaseServiceImpl> map = issueProjectTagDictRedis.getDefaultTagsSortedByCategoryAndCustomizedTagsOrderByRank(tokenDto.getCustomerId(), formDTO.getCategoryIdList()); result.setDefaulted(map.get(ModuleConstants.DEFAULT_TAG_CATEGORY_NAME)); + //2021.3.24 sun 客户初始化分类标签的接口不想加到新客户创建的程序里,因此加到这里 在分类列表的查询方法中也有关于初始化分类标签的逻辑 + try { + if(CollectionUtils.isEmpty(result.getDefaulted())){ + CategoryTagInitFormDTO dto = new CategoryTagInitFormDTO(); + dto.setCustomerId(tokenDto.getCustomerId()); + issueProjectCategoryDictService.init(dto); + Map> map1 = issueProjectTagDictRedis.getDefaultTagsSortedByCategoryAndCustomizedTagsOrderByRank(tokenDto.getCustomerId(), + formDTO.getCategoryIdList()); + result.setDefaulted(map1.get(ModuleConstants.DEFAULT_TAG_CATEGORY_NAME)); + } + } catch (Exception e) { + logger.error("客户初始化分类、标签失败,客户Id->"+tokenDto.getCustomerId(), e); + } + //end List list = map.get(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME); if (CollectionUtils.isNotEmpty(list)) { result.setCustomized(list.stream().limit(NumConstant.TEN).collect(Collectors.toList())); From 2d761725a91d4f73dcfb65de2e89fcc18dd405dd Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Wed, 24 Mar 2021 17:38:36 +0800 Subject: [PATCH 244/375] =?UTF-8?q?PC=E7=AB=AF=20=E6=AF=8F=E4=B8=AA?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=9A=84=E8=8F=9C=E5=8D=95=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=EF=BC=8C=E4=B8=8D=E6=94=BE=E5=85=A5=E7=BC=93=E5=AD=98=EF=BC=8C?= =?UTF-8?q?=E6=AF=8F=E6=AC=A1=E7=99=BB=E9=99=86=E9=87=8D=E6=96=B0=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/impl/GovMenuServiceImpl.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovMenuServiceImpl.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovMenuServiceImpl.java index 1f16ad89e9..4e4c142b55 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovMenuServiceImpl.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovMenuServiceImpl.java @@ -187,14 +187,15 @@ public class GovMenuServiceImpl extends BaseServiceImpl getUserMenuNavList(TokenDto tokenDto) { - List menuList = govMenuRedis.getUserMenuNavList(tokenDto.getCustomerId(), tokenDto.getApp(), tokenDto.getClient()); - if(menuList == null){ - menuList = getCustomerMenuList(tokenDto.getCustomerId(), MenuTypeEnum.MENU.value()); - - govMenuRedis.setUserMenuNavList(tokenDto.getCustomerId(), tokenDto.getApp(), tokenDto.getClient(), menuList); - } - - return menuList; +// List menuList = govMenuRedis.getUserMenuNavList(tokenDto.getCustomerId(), tokenDto.getApp(), tokenDto.getClient()); +// if(menuList == null){ +// menuList = getCustomerMenuList(tokenDto.getCustomerId(), MenuTypeEnum.MENU.value()); +// +// govMenuRedis.setUserMenuNavList(tokenDto.getCustomerId(), tokenDto.getApp(), tokenDto.getClient(), menuList); +// } + // PC端 每个客户的菜单信息,不放入缓存,每次登陆重新查询。 + // 或者 你可以选择,在给每个客户 配置可见菜单的时候, 在saveCustomerMenu方法中,增加更新缓存的逻辑 + return getCustomerMenuList(tokenDto.getCustomerId(), MenuTypeEnum.MENU.value()); } /** From b107907a67cb3e34b470489fd518b79b9faf704b Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 24 Mar 2021 18:13:20 +0800 Subject: [PATCH 245/375] =?UTF-8?q?resi-group=20=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E6=B3=A8=E5=86=8C=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF=E4=BB=8E?= =?UTF-8?q?=E7=BC=93=E5=AD=98=E4=B8=AD=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/security/user/LoginUserUtil.java | 12 ++++++ .../screen/ScreenDifficultyDataEntity.java | 2 +- ...FactOriginProjectMainDailyServiceImpl.java | 3 +- ...srootsGovernDataAbsorptionServiceImpl.java | 6 +-- .../service/impl/ResiGroupServiceImpl.java | 11 +++--- .../java/com/epmet/constant/UserConstant.java | 12 ++++++ .../com/epmet/redis/UserResiInfoRedis.java | 14 +------ .../service/impl/UserResiInfoServiceImpl.java | 37 +++++++++++++++---- 8 files changed, 67 insertions(+), 30 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/user/LoginUserUtil.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/user/LoginUserUtil.java index 088a26eb73..bb322aad2d 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/user/LoginUserUtil.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/user/LoginUserUtil.java @@ -34,6 +34,18 @@ public class LoginUserUtil { return userId; } + /** + * 查询登录用户的客户Id + * @return + */ + public String getCurrentCustomerId() { + HttpServletRequest request = HttpContextUtils.getHttpServletRequest(); + if (request == null) { + return null; + } + return request.getHeader(AppClientConstant.CUSTOMER_ID); + } + /** * 登录用户的App头信息 * @return diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenDifficultyDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenDifficultyDataEntity.java index f8f7595adf..04c252172e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenDifficultyDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenDifficultyDataEntity.java @@ -61,7 +61,7 @@ public class ScreenDifficultyDataEntity extends BaseEpmetEntity { private String orgName; /** - * 事件原Id + * 事件原Id(项目Id) */ private String eventId; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java index 1a51ba5690..7f9d220602 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java @@ -248,6 +248,7 @@ public class FactOriginProjectMainDailyServiceImpl extends BaseServiceImpl * @author wangc @@ -422,4 +423,4 @@ public class FactOriginProjectMainDailyServiceImpl extends BaseServiceImpl projectSourceMap = factOriginProjectMainDailyService.getNewProject(param.getCustomerId(),projectIds); - Map> imgMap = - topicService.getTopicImgs(projectSourceMap); + Map> imgMap = topicService.getTopicImgs(projectSourceMap); Map contentMap = topicService.getTopicContent(projectSourceMap); @@ -183,8 +182,9 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr diff.setDataEndTime(DateUtils.getBeforeNDay(NumConstant.ONE)); }); List imgList = new LinkedList<>(); - imgMap.values().forEach(list -> {imgList.addAll(list);}); + imgMap.values().forEach(imgList::addAll); + //立案后会有 一个process 如果没有则说明是垃圾数据 如果有其他方式立项的项目则需要考虑下兼容 difficulties.removeIf( diff -> StringUtils.isBlank(diff.getLatestOperateDesc())); screenDifficultyDataService.dataClean(param.getCustomerId(),difficulties,imgList); diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java index ae929c6de9..72e61b1406 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java @@ -337,17 +337,18 @@ public class ResiGroupServiceImpl extends BaseServiceImpl getGroupLeaderUserInfo(String groupId) { + String customerId = loginUserUtil.getCurrentCustomerId(); //群主名称需要调用feign查询 - ResiGroupEntity resiGroupEntity = baseDao.selectById(groupId); - if (null == resiGroupEntity) { - return new Result<>(); - } +// ResiGroupEntity resiGroupEntity = baseDao.selectById(groupId); +// if (null == resiGroupEntity) { +// return new Result<>(); +// } ResiGroupMemberDTO groupMemberDTO = baseDao.selectGroupLeader(groupId); if (null == groupMemberDTO) { return new Result<>(); } UserResiInfoFormDTO resiUserInfoFormDTO = new UserResiInfoFormDTO(); - resiUserInfoFormDTO.setCustomerId(resiGroupEntity.getCustomerId()); + resiUserInfoFormDTO.setCustomerId(customerId); resiUserInfoFormDTO.setUserId(groupMemberDTO.getCustomerUserId()); return epmetUserFeignClient.getUserResiInfoDTO(resiUserInfoFormDTO); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/constant/UserConstant.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/constant/UserConstant.java index 2214369866..1e91d3cb14 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/constant/UserConstant.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/constant/UserConstant.java @@ -85,4 +85,16 @@ public interface UserConstant { * user_wechat表更新数据失败 */ String UPDATE_USER_WECHAT = "更新用户微信信息失败"; + /** + * 先生 + */ + String MAN = "先生"; + /** + * 女士 + */ + String WOMAN = "女士"; + /** + * 先生/女士 + */ + String MAN_WOMAN = "先生/女士"; } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserResiInfoRedis.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserResiInfoRedis.java index 1ce33a14da..d4fd65f10d 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserResiInfoRedis.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserResiInfoRedis.java @@ -33,18 +33,6 @@ public class UserResiInfoRedis { @Autowired private RedisUtils redisUtils; - public void delete(Object[] ids) { - - } - - public void set(){ - - } - - public String get(String id){ - return null; - } - public void setUserResiMobileCode(String userId, String mobile, String verificationCode){ String key = RedisKeys.getResiRegisterMobileCodeKey(userId, mobile, verificationCode); //手机验证码放入缓存中 有效时间30分钟 @@ -61,4 +49,4 @@ public class UserResiInfoRedis { redisUtils.deleteByPattern(key); } -} \ No newline at end of file +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java index e5e7678835..a217a5dae1 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java @@ -24,18 +24,15 @@ import com.epmet.common.token.util.UserUtil; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.EpmetRoleKeyConstant; import com.epmet.commons.tools.constant.FieldConstant; -import com.epmet.commons.tools.constant.MqConstant; import com.epmet.commons.tools.constant.NumConstant; -import com.epmet.commons.tools.dto.form.mq.MqBaseMsgDTO; -import com.epmet.commons.tools.dto.form.mq.eventmsg.BasePointEventMsg; -import com.epmet.commons.tools.enums.EventEnum; +import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; 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.utils.Result; -import com.epmet.commons.tools.utils.SendMqMsgUtils; import com.epmet.constant.SmsTemplateConstant; +import com.epmet.constant.UserConstant; import com.epmet.constant.UserRoleConstant; import com.epmet.dao.UserCustomerDao; import com.epmet.dao.UserResiInfoDao; @@ -46,6 +43,7 @@ import com.epmet.dto.UserRoleDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.IssueInitiatorResultDTO; import com.epmet.dto.result.SendVerificationCodeResultDTO; +import com.epmet.dto.result.UserBaseInfoResultDTO; import com.epmet.dto.result.UserResiInfoResultDTO; import com.epmet.entity.UserBaseInfoEntity; import com.epmet.entity.UserResiInfoEntity; @@ -163,8 +161,33 @@ public class UserResiInfoServiceImpl extends BaseServiceImpl getUserResiInfoDTO(UserResiInfoFormDTO userResiInfoFormDTO) { - UserResiInfoResultDTO userResiInfoDTO = baseDao.selectUserResiInfoDTO(userResiInfoFormDTO); - return new Result().ok(userResiInfoDTO); + //先查缓存 否则查询数据库 这个方法里有 + UserBaseInfoResultDTO userBaseInfoResultDTO = userBaseInfoService.queryUserBaseInfoFromCache(userResiInfoFormDTO.getUserId()); + if (userBaseInfoResultDTO != null){ + UserResiInfoResultDTO resultDTO = new UserResiInfoResultDTO(); + resultDTO.setUserId(userBaseInfoResultDTO.getUserId()); + resultDTO.setRegMobile(userBaseInfoResultDTO.getMobile()); + resultDTO.setSurname(userBaseInfoResultDTO.getSurname()); + resultDTO.setName(userBaseInfoResultDTO.getName()); + resultDTO.setStreet(userBaseInfoResultDTO.getStreet()); + resultDTO.setDistrict(userBaseInfoResultDTO.getDistrict()); + resultDTO.setBuildingAddress(userBaseInfoResultDTO.getBuildingAddress()); + resultDTO.setNickName(userBaseInfoResultDTO.getNickname()); + + String gender = null; + if (NumConstant.ONE_STR.equals(userBaseInfoResultDTO.getGender())) { + gender = UserConstant.MAN; + } else if (NumConstant.TWO_STR.equals(userBaseInfoResultDTO.getGender())) { + gender = UserConstant.WOMAN; + } else { + gender = UserConstant.MAN_WOMAN; + } + String leaderName = userBaseInfoResultDTO.getStreet().concat(StrConstant.HYPHEN).concat(userBaseInfoResultDTO.getSurname()).concat(gender); + resultDTO.setShowName(leaderName); + resultDTO.setHeadPhoto(userBaseInfoResultDTO.getHeadImgUrl()); + return new Result().ok(resultDTO); + } + return new Result().ok(null); } /** From 45efc712475d79df3db9067d87ad7ebd9b323ae1 Mon Sep 17 00:00:00 2001 From: wxz Date: Thu, 25 Mar 2021 09:56:41 +0800 Subject: [PATCH 246/375] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=201.?= =?UTF-8?q?=E5=86=85=E9=83=A8=E8=AE=A4=E8=AF=81=E5=BD=93=E4=B8=AD=E6=94=BE?= =?UTF-8?q?=E5=BC=80=E7=AC=AC=E4=B8=89=E6=96=B9=E5=B9=B3=E5=8F=B0=E5=9B=9E?= =?UTF-8?q?=E8=B0=83=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-gateway/src/main/resources/bootstrap.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-gateway/src/main/resources/bootstrap.yml b/epmet-gateway/src/main/resources/bootstrap.yml index 7a6c236128..56e5bfbbc1 100644 --- a/epmet-gateway/src/main/resources/bootstrap.yml +++ b/epmet-gateway/src/main/resources/bootstrap.yml @@ -461,6 +461,7 @@ epmet: # 内部认证url白名单(在白名单中的,就不会再校验登录了) internalAuthUrlsWhiteList: - /epmetuser/customerstaff/customerlist + - /gov/project/project/platformcallback # 外部应用认证,使用AccessToken等头进行认证 externalOpenUrls: From fb61e356cfa67a78abdaefbdddba2819498c575d Mon Sep 17 00:00:00 2001 From: wxz Date: Thu, 25 Mar 2021 10:18:07 +0800 Subject: [PATCH 247/375] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=201.?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=94=B3=E8=AF=B7=E5=8D=8F=E5=8A=A9=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=EF=BC=8C=E8=B0=83=E7=94=A8=E7=AC=AC=E4=B8=89=E6=96=B9?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E5=A2=9E=E5=8A=A0notifyUrl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java index 5a903a6b08..de5522b547 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java @@ -66,6 +66,8 @@ public class LuzhouGridPlatformApiService extends ApiService { public ProjectAssistResult projectAssist(ProjectApplyAssistFormDTO formDTO) { String platformId = formDTO.getPlatformId(); + formDTO.setNotifyUrl("https://epmet-dev.elinkservice.cn/api/gov/project/project/platformcallback"); + // 正式调用第三方平台 String argsStr = JSON.toJSONString(formDTO); String result = sendPostRequest(platformId, ThirdPlatformActions.PROJECT_ASSIST, argsStr, null); From 05d5fa1174d0d5760c05a2892ae55110e7fb8d32 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 25 Mar 2021 11:04:47 +0800 Subject: [PATCH 248/375] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=AF=B9=E6=8E=A5txt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/test/java/resources/数据对接.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 epmet-module/data-statistical/data-statistical-server/src/test/java/resources/数据对接.txt diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/resources/数据对接.txt b/epmet-module/data-statistical/data-statistical-server/src/test/java/resources/数据对接.txt new file mode 100644 index 0000000000..7d03dd36f8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/test/java/resources/数据对接.txt @@ -0,0 +1,12 @@ +截止到2021-03-25数据对接外部客户: +1、市北党建 +2、安宁e家 +3、大美孔村街道 +4、e锦水街道(没有自己的大屏) +5、微笑榆山街道(没有自己的大屏) +产品自己的客户上线的大屏: +1、城阳 +2、临沂龙湾社区 +3、平阴县 +孔村、锦水、榆山这三个街道的数据上报时间要早于平阴县计算的时间,目前已经按天上报和按月上报的,让孔村、榆山、锦水调整到2点前推送了。 + From 70d8669fdf7f82e039cbe816553498faf9e7fcd6 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 25 Mar 2021 11:11:35 +0800 Subject: [PATCH 249/375] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/screen/ScreenCustomerGridDTO.java | 2 + .../result/CategoryProjectResultDTO.java | 56 ++++++ .../com/epmet/controller/DemoController.java | 10 + .../screen/ScreenCustomerGridDao.java | 9 + .../ScreenProjectCategoryGridDailyDao.java | 12 ++ .../ScreenProjectCategoryOrgDailyDao.java | 26 +++ .../screen/ScreenCustomerGridService.java | 10 + .../impl/ScreenCustomerGridServiceImpl.java | 13 ++ ...eenProjectCategoryOrgDailyServiceImpl.java | 182 +++++++++++++++++- .../screen/ScreenCustomerGridDao.xml | 13 ++ .../ScreenProjectCategoryGridDailyDao.xml | 30 +++ .../ScreenProjectCategoryOrgDailyDao.xml | 53 +++++ 12 files changed, 408 insertions(+), 8 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/CategoryProjectResultDTO.java diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenCustomerGridDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenCustomerGridDTO.java index ee7863d40b..65e98b940b 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenCustomerGridDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenCustomerGridDTO.java @@ -112,5 +112,7 @@ public class ScreenCustomerGridDTO implements Serializable { * 所有上级ID,用英文逗号分开 */ private String allParentIds; + private String pid; + private String pids; } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/CategoryProjectResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/CategoryProjectResultDTO.java new file mode 100644 index 0000000000..2ed95c1a35 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/CategoryProjectResultDTO.java @@ -0,0 +1,56 @@ +package com.epmet.dto.screen.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/3/23 下午2:38 + * @DESC + */ +@Data +public class CategoryProjectResultDTO implements Serializable { + + private static final long serialVersionUID = -5774330825880917524L; + + private String pid; + private String pids; + + /** + * 组织ID + */ + private String orgId; + + /** + * 客户ID + */ + private String customerId; + + /** + * 分类码 + */ + private String categoryCode; + + /** + * 项目总数 + */ + private Integer projectTotal; + + /** + * 分类级别 + */ + private Integer level; + + /** + * 日期ID + */ + private String dateId; + + /** + * 组织级别 + */ + private String orgType; + + private Boolean status = false; +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java index 720b3d9a23..9259e12463 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java @@ -859,4 +859,14 @@ public class DemoController { originProjectCategoryDailyService.extractProjectCategory(formDTO); return new Result(); } + + @Autowired + private ScreenProjectCategoryOrgDailyService screenProjectCategoryOrgDailyService; + + @PostMapping("orgdaily") + public Result orgDaily(@RequestParam("customerId")String customerId,@RequestParam("dateId")String dateId){ + screenProjectCategoryOrgDailyService.extractProjectCategoryOrgData(customerId,dateId); + return new Result(); + } + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java index c06e189d7c..1d5099bc67 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java @@ -194,4 +194,13 @@ public interface ScreenCustomerGridDao extends BaseDao * @date 2021/1/28 下午3:18 */ List selectGridInfoByCustomerId(@Param("customerId") String customerId); + + /** + * @Description 查询直属网格信息 + * @Param customerId + * @Param level + * @author zxc + * @date 2021/3/23 下午4:03 + */ + List selectBelongGridInfo(@Param("customerId") String customerId,@Param("level") String level); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.java index 5b96c10067..bad0a291bf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.java @@ -18,10 +18,13 @@ package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screen.result.CategoryProjectResultDTO; import com.epmet.entity.evaluationindex.screen.ScreenProjectCategoryGridDailyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.util.List; + /** * 项目(事件)分类按网格_按天统计 * @@ -39,4 +42,13 @@ public interface ScreenProjectCategoryGridDailyDao extends BaseDao selectCategoryInfo(@Param("customerId") String customerId,@Param("dateId") String dateId,@Param("level")String level,@Param("gridIds")List gridIds); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.java index c87d8bec0f..9f55340594 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.java @@ -18,10 +18,14 @@ package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screen.result.CategoryProjectResultDTO; import com.epmet.entity.evaluationindex.screen.ScreenProjectCategoryOrgDailyEntity; +import com.sun.org.apache.xpath.internal.operations.Bool; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.util.List; + /** * 项目(事件)分类按组织_按天统计 * @@ -39,4 +43,26 @@ public interface ScreenProjectCategoryOrgDailyDao extends BaseDao selectOrgCategoryInfo(@Param("customerId") String customerId, @Param("dateId") String dateId,@Param("level")String level); + + /** + * @Description 查询组织分类信息【多客户】 + * @Param customerId + * @Param dateId + * @Param level + * @Param existsStatus 父客户是否存在 + * @author zxc + * @date 2021/3/24 下午2:48 + */ + List selectOrgCategoryMoreCustomerInfo(@Param("customerIds")List customerIds, @Param("dateId") String dateId, + @Param("level")String level, @Param("customerId")String customerId, @Param("existsStatus")Boolean existsStatus); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenCustomerGridService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenCustomerGridService.java index 3d2fc7a15a..ef39e1b781 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenCustomerGridService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenCustomerGridService.java @@ -19,6 +19,7 @@ package com.epmet.service.evaluationindex.screen; import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.extract.form.*; import com.epmet.dto.extract.result.GridInfoResultDTO; import com.epmet.dto.indexcollect.form.CustomerBizOrgFormDTO; @@ -92,4 +93,13 @@ public interface ScreenCustomerGridService extends BaseService selectBelongGridInfo(String customerId,String level); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerGridServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerGridServiceImpl.java index 6655be0a08..67dae90b1c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerGridServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerGridServiceImpl.java @@ -24,6 +24,7 @@ import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.DataSourceConstant; import com.epmet.constant.OrgSourceTypeConstant; import com.epmet.dao.evaluationindex.screen.ScreenCustomerGridDao; +import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.extract.form.*; import com.epmet.dto.extract.result.GridInfoResultDTO; import com.epmet.dto.indexcollect.form.CustomerBizOrgFormDTO; @@ -166,4 +167,16 @@ public class ScreenCustomerGridServiceImpl extends BaseServiceImpl selectBelongGridInfo(String customerId, String level) { + return baseDao.selectBelongGridInfo(customerId, level); + } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java index c9af2a289c..4fced8e2ee 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java @@ -26,14 +26,22 @@ import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.constant.DataSourceConstant; +import com.epmet.constant.ScreenConstant; +import com.epmet.dao.evaluationindex.screen.ScreenProjectCategoryGridDailyDao; import com.epmet.dao.evaluationindex.screen.ScreenProjectCategoryOrgDailyDao; +import com.epmet.dto.ScreenCustomerGridDTO; +import com.epmet.dto.extract.result.CustomerAgencyInfoResultDTO; import com.epmet.dto.screen.ScreenProjectCategoryOrgDailyDTO; +import com.epmet.dto.screen.result.CategoryProjectResultDTO; import com.epmet.dto.screencoll.ScreenCollFormDTO; import com.epmet.entity.crm.CustomerRelationEntity; import com.epmet.entity.evaluationindex.screen.ScreenProjectCategoryOrgDailyEntity; import com.epmet.service.crm.CustomerRelationService; +import com.epmet.service.evaluationindex.screen.ScreenCustomerAgencyService; +import com.epmet.service.evaluationindex.screen.ScreenCustomerGridService; import com.epmet.service.evaluationindex.screen.ScreenProjectCategoryOrgDailyService; import com.google.common.collect.Lists; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.ListUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -45,6 +53,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; /** * 项目(事件)分类按组织_按天统计 @@ -54,10 +63,17 @@ import java.util.Map; */ @Service @DataSource(DataSourceConstant.EVALUATION_INDEX) +@Slf4j public class ScreenProjectCategoryOrgDailyServiceImpl extends BaseServiceImpl implements ScreenProjectCategoryOrgDailyService { @Autowired private CustomerRelationService relationService; + @Autowired + private ScreenCustomerAgencyService agencyService; + @Autowired + private ScreenProjectCategoryGridDailyDao gridDailyDao; + @Autowired + private ScreenCustomerGridService gridService; @Override public PageData page(Map params) { @@ -147,15 +163,15 @@ public class ScreenProjectCategoryOrgDailyServiceImpl extends BaseServiceImpl needInsert = new ArrayList<>(); // 先查询有无子客户 List relationInfo = relationService.selectSubCustomer(customerId); if (CollectionUtils.isEmpty(relationInfo)){ - needInsert = disposeOneCustomer(customerId, dateId); + // 单客户 + disposeOneCustomer(customerId, dateId); }else { - needInsert = disposeMoreCustomer(customerId,dateId,relationInfo); + // 多客户 + disposeMoreCustomer(customerId,dateId,relationInfo); } - deleteAndInsert(customerId,dateId,needInsert); } /** @@ -165,9 +181,75 @@ public class ScreenProjectCategoryOrgDailyServiceImpl extends BaseServiceImpl disposeOneCustomer(String customerId, String dateId){ + private void disposeOneCustomer(String customerId, String dateId){ + List agencyIdList = agencyService.selectAllAgencyId(customerId); + if (!CollectionUtils.isEmpty(agencyIdList)){ + // 根据组织级别分组 + Map> groupByLevel = agencyIdList.stream().collect(Collectors.groupingBy(CustomerAgencyInfoResultDTO::getLevel)); + if (groupByLevel.containsKey(ScreenConstant.COMMUNITY)){ + // 社区级别 + disposeOneCustomerSub(ScreenConstant.COMMUNITY,true,customerId,dateId); + } + if (groupByLevel.containsKey(ScreenConstant.STREET)){ + // 街道级别 + disposeOneCustomerSub(ScreenConstant.STREET,false,customerId,dateId); + } + if (groupByLevel.containsKey(ScreenConstant.DISTRICT)){ + // 区级 + disposeOneCustomerSub(ScreenConstant.DISTRICT,false,customerId,dateId); + } + if (groupByLevel.containsKey(ScreenConstant.CITY)){ + // 市级 + disposeOneCustomerSub(ScreenConstant.CITY,false,customerId,dateId); + } + if (groupByLevel.containsKey(ScreenConstant.PROVINCE)){ + // 省级 + disposeOneCustomerSub(ScreenConstant.PROVINCE,false,customerId,dateId); + } + } + } - return new ArrayList<>(); + /** + * @Description 单客户处理 + * @Param level + * @Param isGrid + * @Param customerId + * @Param dateId + * @author zxc + * @date 2021/3/25 上午10:44 + */ + public void disposeOneCustomerSub(String level, Boolean isGrid, String customerId, String dateId){ + List result = new ArrayList<>(); + if (isGrid){ + // 是社区级别 + List categoryInfos = gridDailyDao.selectCategoryInfo(customerId, dateId,null,null); + if (!CollectionUtils.isEmpty(categoryInfos)){ + result = ConvertUtils.sourceToTarget(categoryInfos, ScreenProjectCategoryOrgDailyEntity.class); + } + }else { + List categoryProjectResultDTOS = baseDao.selectOrgCategoryInfo(customerId, dateId, level); + List belongGridInfos = gridService.selectBelongGridInfo(customerId, level); + if (!CollectionUtils.isEmpty(belongGridInfos)){ + // 存在直属网格 + List gridIds = belongGridInfos.stream().map(m -> m.getGridId()).collect(Collectors.toList()); + List categoryProjectGrid = gridDailyDao.selectCategoryInfo(customerId, dateId, level, gridIds); + if (!CollectionUtils.isEmpty(categoryProjectGrid)){ + categoryProjectResultDTOS.forEach(agency -> { + categoryProjectGrid.forEach(grid -> { + if (agency.getOrgId().equals(grid.getOrgId()) && agency.getCategoryCode().equals(grid.getCategoryCode())){ + agency.setProjectTotal(agency.getProjectTotal() + grid.getProjectTotal()); + grid.setStatus(true); + } + }); + }); + Map> groupByStatus = categoryProjectGrid.stream().collect(Collectors.groupingBy(CategoryProjectResultDTO::getStatus)); + List categoryProjectResultDTOS1 = groupByStatus.get(false); + if (!CollectionUtils.isEmpty(categoryProjectResultDTOS1)) categoryProjectResultDTOS.addAll(categoryProjectResultDTOS1); + } + } + result = ConvertUtils.sourceToTarget(categoryProjectResultDTOS,ScreenProjectCategoryOrgDailyEntity.class); + } + deleteAndInsert(customerId,dateId,result); } /** @@ -178,9 +260,93 @@ public class ScreenProjectCategoryOrgDailyServiceImpl extends BaseServiceImpl disposeMoreCustomer(String customerId, String dateId,List relationInfo){ + private void disposeMoreCustomer(String customerId, String dateId,List relationInfo){ + List agencyIdList = agencyService.selectAllAgencyId(customerId); + if (!CollectionUtils.isEmpty(agencyIdList)){ + // 根据组织级别分组 + Map> groupByLevel = agencyIdList.stream().collect(Collectors.groupingBy(CustomerAgencyInfoResultDTO::getLevel)); + if (groupByLevel.containsKey(ScreenConstant.COMMUNITY)){ + // 社区级别 + disposeMoreCustomerSub(ScreenConstant.COMMUNITY,true,customerId,dateId,relationInfo); + } + if (groupByLevel.containsKey(ScreenConstant.STREET)){ + // 街道级别 + disposeMoreCustomerSub(ScreenConstant.STREET,false,customerId,dateId,relationInfo); + } + if (groupByLevel.containsKey(ScreenConstant.DISTRICT)){ + // 区级 + disposeMoreCustomerSub(ScreenConstant.DISTRICT,false,customerId,dateId,relationInfo); + } + if (groupByLevel.containsKey(ScreenConstant.CITY)){ + // 市级 + disposeMoreCustomerSub(ScreenConstant.CITY,false,customerId,dateId,relationInfo); + } + if (groupByLevel.containsKey(ScreenConstant.PROVINCE)){ + // 省级 + disposeMoreCustomerSub(ScreenConstant.PROVINCE,false,customerId,dateId,relationInfo); + } + } + } - return new ArrayList<>(); + private void disposeMoreCustomerSub(String level,Boolean isGrid,String customerId, String dateId, List relationInfo){ + List result = new ArrayList<>(); + if (isGrid){ + List categoryInfos = gridDailyDao.selectCategoryInfo(customerId, dateId,null,null); + if (!CollectionUtils.isEmpty(categoryInfos)){ + result = ConvertUtils.sourceToTarget(categoryInfos, ScreenProjectCategoryOrgDailyEntity.class); + } + }else { + List categoryProjectResultDTOS = baseDao.selectOrgCategoryInfo(customerId, dateId, level); + List belongGridInfos = gridService.selectBelongGridInfo(customerId, level); + if (!CollectionUtils.isEmpty(belongGridInfos)){ + // 存在直属网格 + List gridIds = belongGridInfos.stream().map(m -> m.getGridId()).collect(Collectors.toList()); + List categoryProjectGrid = gridDailyDao.selectCategoryInfo(customerId, dateId, level, gridIds); + if (!CollectionUtils.isEmpty(categoryProjectGrid)){ + categoryProjectResultDTOS.forEach(agency -> { + categoryProjectGrid.forEach(grid -> { + if (agency.getOrgId().equals(grid.getOrgId()) && agency.getCategoryCode().equals(grid.getCategoryCode())){ + agency.setProjectTotal(agency.getProjectTotal() + grid.getProjectTotal()); + grid.setStatus(true); + } + }); + }); + Map> groupByStatus = categoryProjectGrid.stream().collect(Collectors.groupingBy(CategoryProjectResultDTO::getStatus)); + List categoryProjectResultDTOS1 = groupByStatus.get(false); + categoryProjectResultDTOS.addAll(categoryProjectResultDTOS1); + } + } + result = ConvertUtils.sourceToTarget(categoryProjectResultDTOS,ScreenProjectCategoryOrgDailyEntity.class); + if (ScreenConstant.DISTRICT.equals(level)){ + // 子级客户ID + List customerIds = relationInfo.stream().map(m -> m.getCustomerId()).collect(Collectors.toList()); + // 父客户存在的分类 + List categoryProjectExists = baseDao.selectOrgCategoryMoreCustomerInfo(customerIds, dateId, level, customerId, true); + if (!CollectionUtils.isEmpty(categoryProjectExists)){ + result.forEach(r -> { + categoryProjectExists.forEach(c -> { + if (r.getCategoryCode().equals(c.getCategoryCode())){ + r.setProjectTotal(r.getProjectTotal() + c.getProjectTotal()); + c.setStatus(true); + } + }); + }); + Map> groupByStatus = categoryProjectExists.stream().collect(Collectors.groupingBy(CategoryProjectResultDTO::getStatus)); + List categoryProjectFalse = groupByStatus.get(false); + if (!CollectionUtils.isEmpty(categoryProjectFalse)){ + List f = ConvertUtils.sourceToTarget(categoryProjectFalse, ScreenProjectCategoryOrgDailyEntity.class); + result.addAll(f); + } + } + // 父客户不存在的分类 + List categoryProjectNotExists = baseDao.selectOrgCategoryMoreCustomerInfo(customerIds, dateId, level, customerId, false); + if (!CollectionUtils.isEmpty(categoryProjectNotExists)){ + List notExists = ConvertUtils.sourceToTarget(categoryProjectNotExists, ScreenProjectCategoryOrgDailyEntity.class); + result.addAll(notExists); + } + } + } + deleteAndInsert(customerId,dateId,result); } /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerGridDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerGridDao.xml index c6ad68ca8b..e5d0c1a183 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerGridDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerGridDao.xml @@ -359,4 +359,17 @@ AND cg.CUSTOMER_ID = #{customerId} + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.xml index e79da541d9..4bf7ba8edf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.xml @@ -10,5 +10,35 @@ limit 1000 + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.xml index 20c4452e69..98b4eb7248 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.xml @@ -9,4 +9,57 @@ limit 1000 + + + + + + \ No newline at end of file From f00eccabbe51e4d849baa014cc45f5a9a8355f87 Mon Sep 17 00:00:00 2001 From: wangchao Date: Thu, 25 Mar 2021 14:58:13 +0800 Subject: [PATCH 250/375] =?UTF-8?q?=E9=9A=BE=E7=82=B9=E8=B5=8C=E7=82=B9?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/controller/DemoController.java | 4 ++-- .../ScreenGrassrootsGovernDataAbsorptionServiceImpl.java | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java index 4bb409b6eb..7d2cf24432 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java @@ -806,14 +806,14 @@ public class DemoController { return new Result(); } - /*@Autowired + @Autowired private ScreenGrassrootsGovernDataAbsorptionService ndddYhjfService; @PostMapping("diff") public Result diff(@RequestBody ScreenCentralZoneDataFormDTO param){ ndddYhjfService.difficultyDataHub(param); return new Result(); - }*/ + } @Autowired private ScreenProjectSettleService screenProjectSettleService; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java index 05ab26289b..ebb8c7fad5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java @@ -155,10 +155,12 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr //最近一次操作 Map latestOperationMap = projectProcessService.getLatestOperation(projectIds,param.getCustomerId()); //图片 - List projectSourceMap = factOriginProjectMainDailyService.getNewProject(param.getCustomerId(),projectIds); + List projectSourceMap = difficulties.stream().map(diff->{ + ProjectSourceMapFormDTO map = new ProjectSourceMapFormDTO();map.setProjectId(diff.getEventId());map.setSourceId(diff.getEventImgUrl());return map; + }).collect(Collectors.toList()); + //factOriginProjectMainDailyService.getNewProject(param.getCustomerId(),projectIds); - Map> imgMap = - topicService.getTopicImgs(projectSourceMap); + Map> imgMap = topicService.getTopicImgs(projectSourceMap); Map contentMap = topicService.getTopicContent(projectSourceMap); From abedb8acff58b6bcd0a64ffa96648fb87a82238f Mon Sep 17 00:00:00 2001 From: wangchao Date: Thu, 25 Mar 2021 15:07:51 +0800 Subject: [PATCH 251/375] =?UTF-8?q?=E6=A0=87=E7=AD=BE=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=97=B6=E7=9A=84=E8=A1=A5=E5=81=BF=E6=9C=BA=E5=88=B6=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/IssueProjectTagDictDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml index 487dd5b466..d23b67ac1d 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml @@ -117,7 +117,7 @@ IS_DEFAULT, (IFNULL(ISSUE_USE_COUNT,0) + IFNULL(PROJECT_USE_COUNT,0)) AS issueUseCount, IS_DISABLE - FROM ISSUE_PROJECT_CATEGORY_DICT + FROM ISSUE_PROJECT_TAG_DICT WHERE DEL_FLAG = '0' AND CUSTOMER_ID = #{customerId} AND IS_DEFAULT = '0' From 291c469c7ba439ea87db72da0ec3103e6fc98ba3 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 25 Mar 2021 15:16:18 +0800 Subject: [PATCH 252/375] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...creenProjectCategoryOrgDailyServiceImpl.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java index 4fced8e2ee..8dbbe72d73 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryOrgDailyServiceImpl.java @@ -156,6 +156,7 @@ public class ScreenProjectCategoryOrgDailyServiceImpl extends BaseServiceImpl relationInfo){ List result = new ArrayList<>(); if (isGrid){ + // community级别走这 List categoryInfos = gridDailyDao.selectCategoryInfo(customerId, dateId,null,null); if (!CollectionUtils.isEmpty(categoryInfos)){ result = ConvertUtils.sourceToTarget(categoryInfos, ScreenProjectCategoryOrgDailyEntity.class); From 43b9772fd96dcf9efdab92a82e219d0c7dc1a925 Mon Sep 17 00:00:00 2001 From: wangchao Date: Thu, 25 Mar 2021 15:22:46 +0800 Subject: [PATCH 253/375] =?UTF-8?q?=E6=A0=87=E7=AD=BE=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=97=B6=E7=9A=84=E8=A1=A5=E5=81=BF=E6=9C=BA=E5=88=B6=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/IssueProjectTagDictDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml index d23b67ac1d..ca8b48d0c7 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectTagDictDao.xml @@ -113,7 +113,7 @@ SELECT ID, TAG_NAME, - IFNULL(tag.CATEGORY_ID,'customize') AS categoryId, + IFNULL(CATEGORY_ID,'customize') AS categoryId, IS_DEFAULT, (IFNULL(ISSUE_USE_COUNT,0) + IFNULL(PROJECT_USE_COUNT,0)) AS issueUseCount, IS_DISABLE From 6ebfdb1e87811d481b93a9c6cc57464b86f3bca8 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 25 Mar 2021 15:24:23 +0800 Subject: [PATCH 254/375] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=B7=9F=E8=B8=AA-?= =?UTF-8?q?=E5=BE=85=E5=A4=84=E7=90=86=E5=88=97=E8=A1=A8=E6=8E=92=E5=BA=8F?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98=EF=BC=8C=E5=B8=A6=E5=A5=87?= =?UTF-8?q?=E5=B3=B0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-project-server/src/main/resources/mapper/ProjectDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml index c47def3cc0..50f8bc6433 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml @@ -38,7 +38,7 @@ GROUP BY ps.PROJECT_ID) psp ON p.ID = psp.PROJECT_ID WHERE p.DEL_FLAG = '0' AND p.status = 'pending' - ORDER BY p.CREATED_TIME ASC + ORDER BY psp.created_time, p.created_time ASC LIMIT #{pageNo}, #{pageSize} From fd06b6f0239c6ede6b7b93914cfc6893c8849782 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Fri, 26 Mar 2021 10:00:38 +0800 Subject: [PATCH 271/375] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E7=AE=A1=E7=90=86=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dao/IssueProjectCategoryDictDao.java | 3 ++- .../impl/IssueProjectCategoryDictServiceImpl.java | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java index d85eaa3295..296e6ab41d 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java @@ -29,6 +29,7 @@ import com.epmet.project.dto.result.ProjectCategoryDictResultDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.util.LinkedList; import java.util.List; /** @@ -155,5 +156,5 @@ public interface IssueProjectCategoryDictDao extends BaseDao selectListAllCategoryDict(@Param("customerId") String customerId, @Param("pid") String pid); + LinkedList selectListAllCategoryDict(@Param("customerId") String customerId, @Param("pid") String pid); } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java index d59598a4c1..223137d692 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java @@ -54,10 +54,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.stream.Collectors; /** @@ -394,6 +391,9 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl customerCategoryList(String customerId) { - List parentCategoryDict = baseDao.selectListAllCategoryDict(customerId, NumConstant.ZERO_STR); - List childrenCategoryDict = baseDao.selectListAllCategoryDict(customerId, NumConstant.ONE_STR); + LinkedList parentCategoryDict = baseDao.selectListAllCategoryDict(customerId, NumConstant.ZERO_STR); + LinkedList childrenCategoryDict = baseDao.selectListAllCategoryDict(customerId, NumConstant.ONE_STR); for (CustomerCategoryResultDTO p : parentCategoryDict) { List children = new ArrayList<>(); From 9feb6da7a5c3a5d8498679f0ce56a56cd4c1c91d Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Fri, 26 Mar 2021 10:04:03 +0800 Subject: [PATCH 272/375] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E4=B8=8B=20=E6=9C=80=E5=A4=A7=E7=9A=84=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E7=BC=96=E7=A0=81=EF=BC=8C=E6=8E=A5=E5=8F=A3=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dao/IssueProjectCategoryDictDao.java | 2 +- .../src/main/resources/mapper/IssueProjectCategoryDictDao.xml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java index 296e6ab41d..a6478d987f 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java @@ -117,7 +117,7 @@ public interface IssueProjectCategoryDictDao extends BaseDao + From d1418c4b5359bf4a1e57a267781808e3dded01d4 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Fri, 26 Mar 2021 14:28:13 +0800 Subject: [PATCH 280/375] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=8F=91=E9=80=81?= =?UTF-8?q?=E5=88=B0=E7=AC=AC=E4=B8=89=E6=96=B9=E5=B9=B3=E5=8F=B0=20?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/ProjectSubProcessDao.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSubProcessDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSubProcessDao.xml index 5625f08d60..3e98453d09 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSubProcessDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSubProcessDao.xml @@ -86,7 +86,6 @@ @@ -164,10 +168,10 @@ - AND CREATED_TIME DATE_SUB( #{targetDate}, INTERVAL - 1 DAY ) + and DATE_FORMAT(CREATED_TIME,"%Y-%m-%d") DATE_FORMAT(#{targetDate},"%Y-%m-%d") - AND CREATED_TIME CURDATE( ) + and DATE_FORMAT(CREATED_TIME,"%Y-%m-%d") DATE_FORMAT(DATE_SUB( CURDATE( ), INTERVAL 1 DAY ),"%Y-%m-%d") @@ -190,10 +194,10 @@ - AND urole.CREATED_TIME =]]> #{targetDate} AND urole.CREATED_TIME DATE_SUB( #{targetDate}, INTERVAL - 1 DAY) + and DATE_FORMAT(urole.CREATED_TIME,"%Y-%m-%d") = DATE_FORMAT(#{targetDate},"%Y-%m-%d") - AND urole.CREATED_TIME CURDATE( ) AND urole.CREATED_TIME =]]> DATE_SUB( CURDATE( ), INTERVAL 1 DAY ) + and DATE_FORMAT(urole.CREATED_TIME,"%Y-%m-%d") = DATE_FORMAT(DATE_SUB( CURDATE( ), INTERVAL 1 DAY ),"%Y-%m-%d") @@ -221,10 +225,10 @@ - AND urole.CREATED_TIME DATE_SUB( #{targetDate}, INTERVAL - 1 DAY ) + and DATE_FORMAT( urole.CREATED_TIME,"%Y-%m-%d") DATE_FORMAT(#{targetDate},"%Y-%m-%d") - AND urole.CREATED_TIME CURDATE( ) + and DATE_FORMAT(urole.CREATED_TIME,"%Y-%m-%d") DATE_FORMAT(DATE_SUB( CURDATE( ), INTERVAL 1 DAY ),"%Y-%m-%d") AND erole.ROLE_NAME = '党员' @@ -261,10 +265,10 @@ - AND urole.CREATED_TIME =]]> #{targetDate} AND urole.CREATED_TIME DATE_SUB( #{targetDate}, INTERVAL - 1 DAY) + and DATE_FORMAT(urole.CREATED_TIME,"%Y-%m-%d")=DATE_FORMAT(#{targetDate},"%Y-%m-%d") - AND urole.CREATED_TIME CURDATE( ) AND urole.CREATED_TIME =]]> DATE_SUB( CURDATE( ), INTERVAL 1 DAY ) + and DATE_FORMAT(urole.CREATED_TIME,"%Y-%m-%d")=DATE_FORMAT(DATE_SUB( CURDATE( ), INTERVAL 1 DAY ),"%Y-%m-%d") AND erole.ROLE_NAME = '热心居民' @@ -290,10 +294,10 @@ - AND urole.CREATED_TIME DATE_SUB( #{targetDate}, INTERVAL - 1 DAY ) + and DATE_FORMAT(urole.CREATED_TIME,"%Y-%m-%d") DATE_FORMAT(#{targetDate},"%Y-%m-%d") - AND urole.CREATED_TIME CURDATE( ) + and DATE_FORMAT(urole.CREATED_TIME,"%Y-%m-%d") DATE_FORMAT(DATE_SUB( CURDATE( ), INTERVAL 1 DAY ),"%Y-%m-%d") AND erole.ROLE_NAME = '热心居民'; @@ -332,8 +336,8 @@ - - AND CREATED_TIME =]]> #{startDate} AND CREATED_TIME DATE_SUB( #{endDate}, INTERVAL - 1 DAY) + AND CREATED_TIME =]]> DATE_FORMAT(#{startDate},"%Y-%m-%d") + AND CREATED_TIME DATE_FORMAT(#{endDate},"%Y-%m-%d") @@ -368,10 +372,8 @@ - - - AND CREATED_TIME =]]> #{startDate} AND CREATED_TIME DATE_SUB( #{endDate}, INTERVAL - 1 DAY) - + AND CREATED_TIME =]]> DATE_FORMAT(#{startDate},"%Y-%m-%d") + AND CREATED_TIME DATE_FORMAT(#{endDate},"%Y-%m-%d") @@ -394,9 +396,8 @@ - - - AND urole.CREATED_TIME =]]> #{startDate} AND urole.CREATED_TIME DATE_SUB( #{endDate}, INTERVAL - 1 DAY) + AND urole.CREATED_TIME =]]> DATE_FORMAT(#{startDate},"%Y-%m-%d") + AND urole.CREATED_TIME DATE_FORMAT(#{endDate},"%Y-%m-%d") AND erole.ROLE_NAME = '党员' @@ -423,7 +424,8 @@ - AND urole.CREATED_TIME =]]> #{startDate} AND urole.CREATED_TIME DATE_SUB( #{endDate}, INTERVAL - 1 DAY) + AND urole.CREATED_TIME =]]> DATE_FORMAT(#{startDate},"%Y-%m-%d") + AND urole.CREATED_TIME DATE_FORMAT(#{endDate},"%Y-%m-%d") AND erole.ROLE_NAME = '热心居民' From 77aeed3fbc6fc6904cdd9571aa7a61a47b44fd76 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 29 Mar 2021 13:29:26 +0800 Subject: [PATCH 291/375] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extract/todata/impl/FactOriginExtractServiceImpl.java | 2 +- .../todata/impl/FactOriginProjectLogDailyServiceImpl.java | 5 ++--- .../extract/todata/impl/ProjectExtractServiceImpl.java | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginExtractServiceImpl.java index f44eef01de..089be0c513 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginExtractServiceImpl.java @@ -198,7 +198,7 @@ public class FactOriginExtractServiceImpl implements FactOriginExtractService { try { projectExtractService.extractProjectPeriodData(paramNew); } catch (Exception e) { - log.error("抽取【项目数据】发生异常,参数:" + JSON.toJSONString(paramNew), e); + log.error("抽取【项目耗时数据】发生异常,参数:" + JSON.toJSONString(paramNew), e); } } else { try { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectLogDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectLogDailyServiceImpl.java index 641b7efa03..b710d08af5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectLogDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectLogDailyServiceImpl.java @@ -30,7 +30,6 @@ import com.epmet.dao.evaluationindex.extract.FactOriginProjectLogDailyDao; import com.epmet.dao.evaluationindex.extract.FactOriginProjectOrgPeriodDailyDao; import com.epmet.dto.extract.FactOriginProjectLogDailyDTO; import com.epmet.dto.extract.result.*; -import com.epmet.dto.screen.ScreenProjectDataDTO; import com.epmet.entity.evaluationindex.extract.FactOriginProjectLogDailyEntity; import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectLogDailyService; import org.apache.commons.lang3.StringUtils; @@ -236,6 +235,7 @@ public class FactOriginProjectLogDailyServiceImpl extends BaseServiceImpl projectsHandledByAgency = baseDao.selectProjectIdHandledByAgency(customerId, dimId); Map efficiencyMap = new HashMap<>(); + List projects = new LinkedList<>(); if (!CollectionUtils.isEmpty(projectsHandledByAgency)) { Map> agencyProjectsMap = new HashMap<>(); @@ -249,10 +249,9 @@ public class FactOriginProjectLogDailyServiceImpl extends BaseServiceImpl projects = new LinkedList<>(); - agencyProjectsMap.forEach((key,value) -> {projects.addAll(value);}); //2.结案项目的总耗时 List costTimes = baseDao.selectProjectCostTime(projects); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java index cbbaee19c9..8f1985b6be 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java @@ -104,6 +104,7 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { closeProjects.forEach(close -> finishOrgList.stream().filter(finish -> close.getId().equals(finish.getProjectId())).forEach(dto -> { String[] orgIds = dto.getPIdPath().split(StrConstant.COLON); String org = ""; + //取最短的ordIds中最后一个 则为最高级的那个orgIds if (orgIds.length > NumConstant.ONE) { org = orgIds[orgIds.length - 1]; } else { From af6daf48afb6b1f22d77324950956a36313c2b3d Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 29 Mar 2021 13:32:30 +0800 Subject: [PATCH 292/375] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E8=BF=90=E8=90=A5?= =?UTF-8?q?=E7=AB=AF=E6=96=B0=E5=A2=9E=E5=88=86=E7=B1=BB=20=E5=B0=8F?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E6=9F=A5=E8=AF=A2=E4=B8=8D=E5=88=B0=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/redis/IssueProjectTagDictRedis.java | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java index 3eeefd9afe..5cfb9a1c5c 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java @@ -100,7 +100,9 @@ public class IssueProjectTagDictRedis { throw new RenException("customerId can not be null when obtain govern tags."); } + //查询客户的“其他"分类的Id IssueProjectCategoryDictEntity otherCategory = categoryDictDao.selectSingleByCustomerIdAndCategoryNameAndCategoryType(customerId, ModuleConstants.CATEGORY_NAME_OTHERS, null); + //判断入参是否是只有一个分类Id并且是"其他"的Id boolean ifOtherOnly = null == otherCategory ? false : (!CollectionUtils.isEmpty(category) && category.size() == NumConstant.ONE && category.contains(otherCategory.getId()) ? true : false); Map> result = new HashMap<>(); @@ -348,13 +350,22 @@ public class IssueProjectTagDictRedis { //result.put(ModuleConstants.DEFAULT_TAG_CATEGORY_NAME,CollectionUtils.isEmpty(db) ? null : db.stream().filter(o -> !StringUtils.equals(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME,o.getCategoryId())).map(entity -> { // IssueCategoryTagResultDTO tag = ConvertUtils.sourceToTarget(entity,IssueCategoryTagResultDTO.class); // tag.setName(entity.getTagName()); return tag;}).collect(Collectors.toList())); - result.put(ModuleConstants.DEFAULT_TAG_CATEGORY_NAME,poolDao.selectDefault(customerId,ifOtherOnly ? null : category)); - + if (!CollectionUtils.isEmpty(preResult) && !CollectionUtils.isEmpty(preResult.get(ModuleConstants.DEFAULT_TAG_CATEGORY_NAME))) { + result.put(ModuleConstants.DEFAULT_TAG_CATEGORY_NAME, preResult.get(ModuleConstants.DEFAULT_TAG_CATEGORY_NAME)); + } else { + result.put(ModuleConstants.DEFAULT_TAG_CATEGORY_NAME, poolDao.selectDefault(customerId, ifOtherOnly ? null : category)); + } //自定义标签:按照热度排序 sorted(Comparator.comparing(IssueProjectTagDictEntity :: getIssueUseCount).reversed()) - result.put(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME,CollectionUtils.isEmpty(db) ? null : db.stream().filter(o -> StringUtils.equals(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME,o.getCategoryId())).sorted(Comparator.comparing(IssueProjectTagDictEntity :: getIssueUseCount).reversed()).map(entity -> { - IssueCategoryTagResultDTO tag = ConvertUtils.sourceToTarget(entity,IssueCategoryTagResultDTO.class); - tag.setName(entity.getTagName());return tag;}).collect(Collectors.toList())); + if (!CollectionUtils.isEmpty(preResult) && !CollectionUtils.isEmpty(preResult.get(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME))) { + result.put(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME, preResult.get(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME)); + } else { + result.put(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME, CollectionUtils.isEmpty(db) ? null : db.stream().filter(o -> StringUtils.equals(ModuleConstants.CUSTOMIZED_TAG_CATEGORY_NAME, o.getCategoryId())).sorted(Comparator.comparing(IssueProjectTagDictEntity::getIssueUseCount).reversed()).map(entity -> { + IssueCategoryTagResultDTO tag = ConvertUtils.sourceToTarget(entity, IssueCategoryTagResultDTO.class); + tag.setName(entity.getTagName()); + return tag; + }).collect(Collectors.toList())); + } return result; } From 73d392866466000a07f7165a68b5bc4804eec9d9 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 29 Mar 2021 17:18:29 +0800 Subject: [PATCH 293/375] =?UTF-8?q?=E5=85=9A=E5=BB=BA=E5=A3=B0=E9=9F=B3-?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0Pdf?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/controller/OssController.java | 42 +++++++++++++------ .../java/com/epmet/utils/ModuleConstant.java | 4 ++ .../epmet/dto/form/DraftContentFromDTO.java | 11 +++-- 3 files changed, 42 insertions(+), 15 deletions(-) diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java index 1559d4160b..34a94378ec 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java @@ -205,25 +205,43 @@ public class OssController { return ossService.uploadImg(file, null); } + /** + * desc: 党建声音模块 上传图片(2M)或附件(5M) + * + * @param file + * @return com.epmet.commons.tools.utils.Result + * @author LiuJanJun + * @date 2021/3/29 4:56 下午 + */ @PostMapping("article/upload") public Result uploadArticleImg(@RequestParam("file") MultipartFile file) { - // 校验文件类型 - if (!MediaType.IMAGE_PNG_VALUE.equals(file.getContentType()) && !MediaType.IMAGE_JPEG_VALUE.equals(file.getContentType()) - && !ModuleConstant.FILE_CONTENT_TYPE_JPG.equals(file.getContentType()) ) { - log.error("uploadArticleImg file type:{} is not support 2 upload",file.getContentType() == null? null:file.getContentType()); + // 校验文件类型 图片或pdf + if (!MediaType.IMAGE_PNG_VALUE.equals(file.getContentType()) + && !MediaType.IMAGE_JPEG_VALUE.equals(file.getContentType()) + && !ModuleConstant.FILE_CONTENT_TYPE_JPG.equals(file.getContentType()) + && !ModuleConstant.FILE_CONTENT_TYPE_PDF.equals(file.getContentType())) { + log.error("uploadArticleImg file type:{} is not support 2 upload", file.getContentType()); throw new RenException(EpmetErrorCode.OPER_UPLOAD_FILE_TYPE_ERROR.getCode() , EpmetErrorCode.OPER_UPLOAD_FILE_TYPE_ERROR.getMsg()); } - - // 校验文件体积,不超过2m - long maxSize = 2 * 1024 * 1024; - long size = file.getSize(); - if (size > maxSize) { - throw new RenException(EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getCode() - , EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getMsg()); + if (ModuleConstant.FILE_CONTENT_TYPE_PDF.equals(file.getContentType())) { + // 校验文件体积,不超过2m + long maxSize = 5 * 1024 * 1024; + long size = file.getSize(); + if (size > maxSize) { + throw new RenException(EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getCode() + , EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getMsg()); + } + } else { + // 校验文件体积,不超过2m + long maxSize = 2 * 1024 * 1024; + long size = file.getSize(); + if (size > maxSize) { + throw new RenException(EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getCode() + , EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getMsg()); + } } - return ossService.uploadImg(file, null); } diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/utils/ModuleConstant.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/utils/ModuleConstant.java index a89b14fbd1..07a11d9ed7 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/utils/ModuleConstant.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/utils/ModuleConstant.java @@ -26,6 +26,10 @@ public interface ModuleConstant extends Constant { * jpg文件类型 */ String FILE_CONTENT_TYPE_JPG = "image/jpg"; + /** + * pdf文件类型 + */ + String FILE_CONTENT_TYPE_PDF = "application/pdf"; /** * 项目附件-允许上传的文件类型 diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftContentFromDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftContentFromDTO.java index 7df78525c0..d85f17cf7c 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftContentFromDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftContentFromDTO.java @@ -67,14 +67,19 @@ public class DraftContentFromDTO implements Serializable { */ private String draftContentId; /** - * 内容 + * 内容 当为非文字时,存放oss链接地址 */ @Length(max = 1000, message = "每段文字最长为1000个字") private String content; /** - * 内容类型 图片:img;文字:text + * 内容类型 图片:img;文字:text;附件:attachment */ private String contentType; + + /** + * 附件名称 + */ + private String attachmentName; } -} \ No newline at end of file +} From 1fb901c1a791ba2ab6ba4f83a327261988cbc557 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 29 Mar 2021 17:47:35 +0800 Subject: [PATCH 294/375] =?UTF-8?q?ext=E6=96=B0=E5=A2=9Eapi:=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E5=BD=93=E5=89=8D=E5=AE=A2=E6=88=B7=E4=B8=8B=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E7=AB=AF=E8=A7=92=E8=89=B2=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/CustomerRoleResultDTO.java | 21 +++++++++++++ .../epmet/controller/OpenUpController.java | 13 ++++++++ .../java/com/epmet/service/OpenUpService.java | 9 ++++++ .../epmet/service/impl/OpenUpServiceImpl.java | 17 ++++++++++ .../epmet/dto/result/RoleInfoResultDTO.java | 2 ++ .../epmet/feign/EpmetUserOpenFeignClient.java | 10 ++++++ .../EpmetUserOpenFeignClientFallback.java | 13 ++++++++ .../controller/GovStaffRoleController.java | 12 +++++++ .../epmet/service/GovStaffRoleService.java | 10 ++++++ .../service/impl/GovStaffRoleServiceImpl.java | 31 ++++++++++++++++--- 10 files changed, 133 insertions(+), 5 deletions(-) create mode 100644 epmet-module/epmet-ext/epmet-ext-client/src/main/java/com/epmet/dto/result/CustomerRoleResultDTO.java diff --git a/epmet-module/epmet-ext/epmet-ext-client/src/main/java/com/epmet/dto/result/CustomerRoleResultDTO.java b/epmet-module/epmet-ext/epmet-ext-client/src/main/java/com/epmet/dto/result/CustomerRoleResultDTO.java new file mode 100644 index 0000000000..a8fe59a2f8 --- /dev/null +++ b/epmet-module/epmet-ext/epmet-ext-client/src/main/java/com/epmet/dto/result/CustomerRoleResultDTO.java @@ -0,0 +1,21 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 描述一下 + * + * @author yinzuomei@elink-cn.com + * @date 2021/3/29 15:26 + */ +@Data +public class CustomerRoleResultDTO implements Serializable { + private static final long serialVersionUID = 4933114432141586045L; + + private String roleName; + private String roleKey; + private String roleId; + private Boolean fullTimeOnly; +} diff --git a/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/controller/OpenUpController.java b/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/controller/OpenUpController.java index 4fd89b0dbc..c0535b648b 100644 --- a/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/controller/OpenUpController.java +++ b/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/controller/OpenUpController.java @@ -147,5 +147,18 @@ public class OpenUpController { ValidatorUtils.validateEntity(formDTO); return new Result().ok(openUpService.queryStaffPermissionV2(formDTO)); } + + /** + * @return + * @param formDTO 客户id + * @author yinzuomei + * @description 010、获取当前客户下-工作端角色列表 + * @Date 2021/3/29 15:25 + **/ + @PostMapping("govrolelist") + public Result> queryCustomerGovRoleList(@RequestBody CustomerInfoQueryFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO); + return new Result>().ok(openUpService.queryCustomerGovRoleList(formDTO.getCustomerId())); + } } diff --git a/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/service/OpenUpService.java b/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/service/OpenUpService.java index 6fbe32afe6..8047ec9f8c 100644 --- a/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/service/OpenUpService.java +++ b/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/service/OpenUpService.java @@ -62,4 +62,13 @@ public interface OpenUpService { * @Date 2021/2/3 20:59 **/ StaffPermissionResultDTO queryStaffPermissionV2(StaffPermissionFormDTO formDTO); + + /** + * @return java.util.List + * @param customerId + * @author yinzuomei + * @description 010、获取当前客户下-工作端角色列表 + * @Date 2021/3/29 15:27 + **/ + List queryCustomerGovRoleList(String customerId); } diff --git a/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/service/impl/OpenUpServiceImpl.java b/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/service/impl/OpenUpServiceImpl.java index 43f50a34c9..0f6cb365b3 100644 --- a/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/service/impl/OpenUpServiceImpl.java +++ b/epmet-module/epmet-ext/epmet-ext-server/src/main/java/com/epmet/service/impl/OpenUpServiceImpl.java @@ -210,4 +210,21 @@ public class OpenUpServiceImpl implements OpenUpService { return resultDTO; } + /** + * @param customerId + * @return java.util.List + * @author yinzuomei + * @description 010、获取当前客户下-工作端角色列表 + * @Date 2021/3/29 15:27 + **/ + @Override + public List queryCustomerGovRoleList(String customerId) { + Result> userRes = epmetUserOpenFeignClient.queryCustomerGovRoleList(customerId); + if (!userRes.success() || CollectionUtils.isEmpty(userRes.getData())) { + log.error(String.format("获取当前客户下,工作端角色列表失败,customerId:%s", customerId)); + return new ArrayList<>(); + } + return ConvertUtils.sourceToTarget(userRes.getData(), CustomerRoleResultDTO.class); + } + } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/RoleInfoResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/RoleInfoResultDTO.java index c2378a87a5..81498e5586 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/RoleInfoResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/RoleInfoResultDTO.java @@ -29,4 +29,6 @@ public class RoleInfoResultDTO implements Serializable{ * */ @JsonInclude(JsonInclude.Include.NON_NULL) private Boolean fullTimeOnly = false; + + private String roleKey; } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java index d48703ffb4..3332aec3a1 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java @@ -486,4 +486,14 @@ public interface EpmetUserOpenFeignClient { */ @PostMapping(value = "/epmetuser/user/saveuserinfo") Result saveUserInfo(@RequestBody UserInfoFormDTO formDTO); + + /** + * @return com.epmet.commons.tools.utils.Result> + * @param customerId + * @author yinzuomei + * @description 获取当前客户下-工作端角色列表 + * @Date 2021/3/29 15:35 + **/ + @GetMapping(value = "/epmetuser/govstaffrole/querycustomergovrolelist/{customerId}") + Result> queryCustomerGovRoleList(@PathVariable("customerId")String customerId); } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java index 195f1a0c38..c1944b43a3 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java @@ -337,8 +337,21 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "saveUserInfo", formDTO); } + /** + * @param customerId + * @return com.epmet.commons.tools.utils.Result> + * @author yinzuomei + * @description 获取当前客户下-工作端角色列表 + * @Date 2021/3/29 15:35 + **/ + @Override + public Result> queryCustomerGovRoleList(String customerId) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "queryCustomerGovRoleList", customerId); + } + @Override public Result initGovStaffRolesForCustomer(String customerId) { return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "initGovStaffRolesForCustomer", customerId); } + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GovStaffRoleController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GovStaffRoleController.java index 40cab6cb5a..37df7c9140 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GovStaffRoleController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GovStaffRoleController.java @@ -9,6 +9,7 @@ import com.epmet.dto.form.GovStaffRoleFormDTO; import com.epmet.dto.result.GovStaffRoleResultDTO; import com.epmet.dto.result.GovStaffRoleTemplateDTO; import com.epmet.dto.result.ResiGovRoleListResultDTO; +import com.epmet.dto.result.RoleInfoResultDTO; import com.epmet.service.GovStaffRoleService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.CollectionUtils; @@ -112,4 +113,15 @@ public class GovStaffRoleController { return new Result>().ok(roles); } + /** + * @return com.epmet.commons.tools.utils.Result> + * @param customerId + * @author yinzuomei + * @description 获取当前客户下-工作端角色列表 + * @Date 2021/3/29 15:37 + **/ + @GetMapping("querycustomergovrolelist/{customerId}") + Result> queryCustomerGovRoleList(@PathVariable("customerId") String customerId){ + return new Result>().ok(govStaffRoleService.queryCustomerGovRoleList(customerId)); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GovStaffRoleService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GovStaffRoleService.java index 346fad61b2..6ee17905c2 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GovStaffRoleService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GovStaffRoleService.java @@ -23,6 +23,7 @@ import com.epmet.dto.GovStaffRoleDTO; import com.epmet.dto.result.GovStaffRoleResultDTO; import com.epmet.dto.result.GovStaffRoleTemplateDTO; import com.epmet.dto.result.ResiGovRoleListResultDTO; +import com.epmet.dto.result.RoleInfoResultDTO; import com.epmet.entity.GovStaffRoleEntity; import java.util.List; @@ -140,4 +141,13 @@ public interface GovStaffRoleService extends BaseService { void saveSortOrder(List roleIdList); List listRolesByRoleKey(String roleKey); + + /** + * @return java.util.List + * @param customerId + * @author yinzuomei + * @description 获取当前客户下-工作端角色列表 + * @Date 2021/3/29 15:37 + **/ + List queryCustomerGovRoleList(String customerId); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GovStaffRoleServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GovStaffRoleServiceImpl.java index 16c6a375e2..15a8b10483 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GovStaffRoleServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GovStaffRoleServiceImpl.java @@ -20,20 +20,17 @@ package com.epmet.service.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.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.Result; import com.epmet.dao.GovStaffRoleDao; import com.epmet.dao.GovStaffRoleTemplateDao; import com.epmet.dao.RoleDao; import com.epmet.dto.GovStaffRoleDTO; import com.epmet.dto.form.InitDefaultOperationsFormDTO; -import com.epmet.dto.result.GovStaffRoleResultDTO; -import com.epmet.dto.result.GovStaffRoleTemplateDTO; -import com.epmet.dto.result.ResiGovRoleListResultDTO; -import com.epmet.dto.result.ResiGovRoleResultDTO; +import com.epmet.dto.result.*; import com.epmet.entity.GovStaffRoleEntity; import com.epmet.feign.GovAccessFeignClient; import com.epmet.redis.GovStaffRoleRedis; @@ -242,4 +239,28 @@ public class GovStaffRoleServiceImpl extends BaseServiceImpl listRolesByRoleKey(String roleKey) { return govStaffRoleDao.listRolesByRoleKey(roleKey); } + + /** + * @param customerId + * @return java.util.List + * @author yinzuomei + * @description 获取当前客户下-工作端角色列表 + * @Date 2021/3/29 15:37 + **/ + @Override + public List queryCustomerGovRoleList(String customerId) { + List resultList=new ArrayList<>(); + GovStaffRoleDTO govStaffRoleDTO=new GovStaffRoleDTO(); + govStaffRoleDTO.setCustomerId(customerId); + List roleList = this.getGovStaffRoleList(govStaffRoleDTO); + roleList.forEach(role->{ + RoleInfoResultDTO resultDTO=new RoleInfoResultDTO(); + resultDTO.setFullTimeOnly(role.getFullTimeOnly()); + resultDTO.setRoleId(role.getId()); + resultDTO.setRoleName(role.getRoleName()); + resultDTO.setRoleKey(role.getRoleKey()); + resultList.add(resultDTO); + }); + return resultList; + } } \ No newline at end of file From 5ba2a90b36bdb6c3401ca7bc57a4ce9df3474048 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 29 Mar 2021 17:52:10 +0800 Subject: [PATCH 295/375] =?UTF-8?q?=E5=85=9A=E5=BB=BA=E5=A3=B0=E9=9F=B3-?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E6=B7=BB=E5=8A=A0Pdf=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/ArticleContentDTO.java | 16 +++++++++++++--- .../main/java/com/epmet/dto/DraftContentDTO.java | 7 ++++--- .../com/epmet/dto/form/DraftContentFromDTO.java | 6 +++--- .../epmet/dto/result/GovArticleContentDTO.java | 7 ++++++- .../com/epmet/dto/result/GovDraftContentDTO.java | 7 ++++++- .../com/epmet/entity/ArticleContentEntity.java | 10 ++++++---- .../com/epmet/entity/DraftContentEntity.java | 10 ++++++---- .../resources/db/migration/V0.0.3__addpdf.sql | 6 ++++++ .../src/main/resources/mapper/ArticleDao.xml | 7 +++++-- 9 files changed, 55 insertions(+), 21 deletions(-) create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.3__addpdf.sql diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ArticleContentDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ArticleContentDTO.java index 88aa05b3a8..a8269648f3 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ArticleContentDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ArticleContentDTO.java @@ -17,9 +17,10 @@ package com.epmet.dto; +import lombok.Data; + import java.io.Serializable; import java.util.Date; -import lombok.Data; /** @@ -54,10 +55,19 @@ public class ArticleContentDTO implements Serializable { private String content; /** - * 内容类型 图片:img;文字:text + * 内容类型 图片:img;文字:text;文件:file */ private String contentType; + /** + * desc: 请描述类的业务用途 + * + * @param null + * @return + * @author LiuJanJun + * @date 2021/3/29 5:42 下午 + */ + /** * 审核状态 通过:pass;失败:fail;审核中:auditing */ @@ -103,4 +113,4 @@ public class ArticleContentDTO implements Serializable { */ private Date updatedTime; -} \ No newline at end of file +} diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/DraftContentDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/DraftContentDTO.java index b0699b4c59..ee29b969c7 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/DraftContentDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/DraftContentDTO.java @@ -17,9 +17,10 @@ package com.epmet.dto; +import lombok.Data; + import java.io.Serializable; import java.util.Date; -import lombok.Data; /** @@ -54,7 +55,7 @@ public class DraftContentDTO implements Serializable { private String content; /** - * 内容类型 图片:img;文字:text + * 内容类型 图片:img;文字:text;文件:file */ private String contentType; @@ -103,4 +104,4 @@ public class DraftContentDTO implements Serializable { */ private Date updatedTime; -} \ No newline at end of file +} diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftContentFromDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftContentFromDTO.java index d85f17cf7c..09c6818ac2 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftContentFromDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftContentFromDTO.java @@ -73,13 +73,13 @@ public class DraftContentFromDTO implements Serializable { private String content; /** - * 内容类型 图片:img;文字:text;附件:attachment + * 内容类型 图片:img;文字:text;文件:file */ private String contentType; /** - * 附件名称 + * 文件名称 */ - private String attachmentName; + private String fileName; } } diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GovArticleContentDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GovArticleContentDTO.java index dbb98d9d3d..18844917ea 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GovArticleContentDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GovArticleContentDTO.java @@ -14,10 +14,15 @@ import java.io.Serializable; public class GovArticleContentDTO implements Serializable { private static final long serialVersionUID = 1519014754254863006L; /** - * 内容类型,图片:img;文字:text + * 内容类型,图片:img;文字:text; 文件:file */ private String contentType; + /** + * 文件名称 + */ + private String fileName; + /** * 内容 */ diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GovDraftContentDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GovDraftContentDTO.java index 4b4ae98c07..c575c4a561 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GovDraftContentDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GovDraftContentDTO.java @@ -15,10 +15,15 @@ public class GovDraftContentDTO implements Serializable { private static final long serialVersionUID = 5653062658148122552L; /** - * 内容类型,图片:img;文字:text + * 内容类型 图片:img;文字:text;文件:file */ private String contentType; + /** + * 文件名称 + */ + private String fileName; + /** * 内容 */ diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/ArticleContentEntity.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/ArticleContentEntity.java index f4a961b974..29661c7350 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/ArticleContentEntity.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/ArticleContentEntity.java @@ -18,13 +18,10 @@ package com.epmet.entity; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.Date; - /** * 文章内容表 * @@ -54,10 +51,15 @@ public class ArticleContentEntity extends BaseEpmetEntity { private String content; /** - * 内容类型 图片:img;文字:text + * 内容类型 图片:img;文字:text;文件:file */ private String contentType; + /** + * 文件名称 + */ + private String fileName; + /** * 审核状态 通过:pass;失败:fail;审核中:auditing */ diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/DraftContentEntity.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/DraftContentEntity.java index a5ab64db0e..15a7ba4e76 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/DraftContentEntity.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/DraftContentEntity.java @@ -18,13 +18,10 @@ package com.epmet.entity; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.Date; - /** * 草稿内容表 * @@ -54,7 +51,7 @@ public class DraftContentEntity extends BaseEpmetEntity { private String content; /** - * 内容类型 图片:img;文字:text + * 内容类型 图片:img;文字:text;文件:file */ private String contentType; @@ -73,4 +70,9 @@ public class DraftContentEntity extends BaseEpmetEntity { */ private Integer orderNum; + /** + * 文件名称 + */ + private String fileName; + } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.3__addpdf.sql b/epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.3__addpdf.sql new file mode 100644 index 0000000000..51189752dd --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.3__addpdf.sql @@ -0,0 +1,6 @@ +ALTER TABLE `epmet_gov_voice`.`draft_content` + MODIFY COLUMN `CONTENT_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '内容类型 图片:img;文字:text;文件:file;' AFTER `CONTENT`, + ADD COLUMN `FILE_NAME` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名称' AFTER `CONTENT_TYPE`; +ALTER TABLE `epmet_gov_voice`.`article_content` + MODIFY COLUMN `CONTENT_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '内容类型 图片:img;文字:text;文件:file;' AFTER `CONTENT`, + ADD COLUMN `FILE_NAME` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名称' AFTER `CONTENT_TYPE`; diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml index f4d41ffa88..97be456470 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml @@ -25,7 +25,8 @@ - \ No newline at end of file + From e110eda3057ebd7c06995874b42da83af5da5555 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 29 Mar 2021 18:02:39 +0800 Subject: [PATCH 296/375] =?UTF-8?q?=E5=85=9A=E5=BB=BA=E5=A3=B0=E9=9F=B3-?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E6=B7=BB=E5=8A=A0Pdf=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/result/DraftContentDetailDTO.java | 7 ++++++- .../src/main/resources/mapper/DraftDao.xml | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftContentDetailDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftContentDetailDTO.java index d468ffb81a..21fce8fd5d 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftContentDetailDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftContentDetailDTO.java @@ -24,10 +24,15 @@ public class DraftContentDetailDTO implements Serializable { private String content; /** - * 内容类型 图片:img;文字:text + * 内容类型 图片:img;文字:text;文件:file */ private String contentType; + /** + * 文件名称 + */ + private String fileName; + /** * 内容序号 */ diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml index 823e936884..483c05319e 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml @@ -28,6 +28,7 @@ dc.ID, dc.CONTENT, dc.CONTENT_TYPE, + dc.FILE_NAME, dc.ORDER_NUM, (case when dc.AUDIT_STATUS is null then "" @@ -190,4 +191,4 @@ where id=#{draftId,jdbcType=VARCHAR} - \ No newline at end of file + From 88728eddda9badb205e318176cf7ff464cccf477 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 30 Mar 2021 09:05:44 +0800 Subject: [PATCH 297/375] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E7=94=9F=E6=88=90?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/resigroup/ResiTopicCommentDTO.java | 5 +- .../resigroup/ResiTopicCommentEntity.java | 5 +- .../group/dto/member/ExitGroupRecordDTO.java | 97 +++++++++++++++++ .../member/GroupLeaderTransferRecordDTO.java | 97 +++++++++++++++++ .../group/dto/topic/ResiTopicCommentDTO.java | 5 +- .../entity/ResiTopicCommentEntity.java | 5 +- .../controller/ExitGroupRecordController.java | 40 +++++++ .../GroupLeaderTransferRecordController.java | 40 +++++++ .../member/dao/ExitGroupRecordDao.java | 33 ++++++ .../dao/GroupLeaderTransferRecordDao.java | 33 ++++++ .../member/entity/ExitGroupRecordEntity.java | 63 +++++++++++ .../GroupLeaderTransferRecordEntity.java | 63 +++++++++++ .../service/ExitGroupRecordService.java | 95 +++++++++++++++++ .../GroupLeaderTransferRecordService.java | 95 +++++++++++++++++ .../impl/ExitGroupRecordServiceImpl.java | 99 +++++++++++++++++ .../GroupLeaderTransferRecordServiceImpl.java | 100 ++++++++++++++++++ .../V0.0.12__group_leader_transfer_record.sql | 15 +++ .../migration/V0.0.13__exit_group_record.sql | 15 +++ .../mapper/member/ExitGroupRecordDao.xml | 8 ++ .../member/GroupLeaderTransferRecordDao.xml | 8 ++ 20 files changed, 909 insertions(+), 12 deletions(-) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/ExitGroupRecordDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/GroupLeaderTransferRecordDTO.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/controller/ExitGroupRecordController.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/controller/GroupLeaderTransferRecordController.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/ExitGroupRecordDao.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/GroupLeaderTransferRecordDao.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/entity/ExitGroupRecordEntity.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/entity/GroupLeaderTransferRecordEntity.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/ExitGroupRecordService.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/GroupLeaderTransferRecordService.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/ExitGroupRecordServiceImpl.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/GroupLeaderTransferRecordServiceImpl.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.12__group_leader_transfer_record.sql create mode 100644 epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.13__exit_group_record.sql create mode 100644 epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/ExitGroupRecordDao.xml create mode 100644 epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/GroupLeaderTransferRecordDao.xml diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/resigroup/ResiTopicCommentDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/resigroup/ResiTopicCommentDTO.java index b84e9d8f10..149ecb2089 100644 --- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/resigroup/ResiTopicCommentDTO.java +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/resigroup/ResiTopicCommentDTO.java @@ -17,9 +17,10 @@ package com.epmet.dataaggre.dto.resigroup; +import lombok.Data; + import java.io.Serializable; import java.util.Date; -import lombok.Data; /** @@ -49,7 +50,7 @@ public class ResiTopicCommentDTO implements Serializable { private String topicId; /** - * 评论状态 + * 评论状态:讨论中:discussing;已屏蔽 :hidden */ private String status; diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/resigroup/ResiTopicCommentEntity.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/resigroup/ResiTopicCommentEntity.java index ff12b3fb1a..18ceec8a1b 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/resigroup/ResiTopicCommentEntity.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/resigroup/ResiTopicCommentEntity.java @@ -18,13 +18,10 @@ package com.epmet.dataaggre.entity.resigroup; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.Date; - /** * 话题评论表 * @@ -49,7 +46,7 @@ public class ResiTopicCommentEntity extends BaseEpmetEntity { private String topicId; /** - * 评论状态 + * 评论状态:讨论中:discussing;已屏蔽 :hidden */ private String status; diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/ExitGroupRecordDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/ExitGroupRecordDTO.java new file mode 100644 index 0000000000..ad0cc7e1ef --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/ExitGroupRecordDTO.java @@ -0,0 +1,97 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.resi.group.dto.member; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 退群记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-29 + */ +@Data +public class ExitGroupRecordDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 小组id + */ + private String groupId; + + /** + * 组成员用户id + */ + private String memberUserId; + + /** + * 屏蔽他的话题及评论 yes:屏蔽 no:不屏蔽 + */ + private String shieldFlag; + + /** + * 0:组长移除; + */ + private String leaveType; + + /** + * 删除标识 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 当前操作人id + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/GroupLeaderTransferRecordDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/GroupLeaderTransferRecordDTO.java new file mode 100644 index 0000000000..7bd1e2a490 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/GroupLeaderTransferRecordDTO.java @@ -0,0 +1,97 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.resi.group.dto.member; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 组长身份转让记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-29 + */ +@Data +public class GroupLeaderTransferRecordDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 小组id + */ + private String groupId; + + /** + * 原组长userId + */ + private String originalLeader; + + /** + * 新组长userId + */ + private String newLeader; + + /** + * 组长自主转让resi,工作人员转让gov + */ + private String type; + + /** + * 删除标识 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 当前操作人id即组长id + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/ResiTopicCommentDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/ResiTopicCommentDTO.java index bfe36f8c40..82cf7f5653 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/ResiTopicCommentDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/ResiTopicCommentDTO.java @@ -17,9 +17,10 @@ package com.epmet.resi.group.dto.topic; +import lombok.Data; + import java.io.Serializable; import java.util.Date; -import lombok.Data; /** @@ -49,7 +50,7 @@ public class ResiTopicCommentDTO implements Serializable { private String topicId; /** - * 评论状态 + * 评论状态:讨论中:discussing;已屏蔽 :hidden */ private String status; diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/comment/entity/ResiTopicCommentEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/comment/entity/ResiTopicCommentEntity.java index 040f966e2d..37c991d8db 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/comment/entity/ResiTopicCommentEntity.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/comment/entity/ResiTopicCommentEntity.java @@ -18,13 +18,10 @@ package com.epmet.modules.comment.entity; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.Date; - /** * 话题评论表 * @@ -49,7 +46,7 @@ public class ResiTopicCommentEntity extends BaseEpmetEntity { private String topicId; /** - * 评论状态 + * 评论状态:讨论中:discussing;已屏蔽 :hidden */ private String status; diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/controller/ExitGroupRecordController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/controller/ExitGroupRecordController.java new file mode 100644 index 0000000000..065ca72efe --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/controller/ExitGroupRecordController.java @@ -0,0 +1,40 @@ +/** + * 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.modules.member.controller; + +import com.epmet.modules.member.service.ExitGroupRecordService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + + +/** + * 退群记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-29 + */ +@RestController +@RequestMapping("exitgroup") +public class ExitGroupRecordController { + + @Autowired + private ExitGroupRecordService exitGroupRecordService; + + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/controller/GroupLeaderTransferRecordController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/controller/GroupLeaderTransferRecordController.java new file mode 100644 index 0000000000..ef22370022 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/controller/GroupLeaderTransferRecordController.java @@ -0,0 +1,40 @@ +/** + * 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.modules.member.controller; + +import com.epmet.modules.member.service.GroupLeaderTransferRecordService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + + +/** + * 组长身份转让记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-29 + */ +@RestController +@RequestMapping("leadertransfer") +public class GroupLeaderTransferRecordController { + + @Autowired + private GroupLeaderTransferRecordService groupLeaderTransferRecordService; + + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/ExitGroupRecordDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/ExitGroupRecordDao.java new file mode 100644 index 0000000000..8169ded9f5 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/ExitGroupRecordDao.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.modules.member.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.modules.member.entity.ExitGroupRecordEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 退群记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-29 + */ +@Mapper +public interface ExitGroupRecordDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/GroupLeaderTransferRecordDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/GroupLeaderTransferRecordDao.java new file mode 100644 index 0000000000..aa9b14bc0a --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/GroupLeaderTransferRecordDao.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.modules.member.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.modules.member.entity.GroupLeaderTransferRecordEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 组长身份转让记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-29 + */ +@Mapper +public interface GroupLeaderTransferRecordDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/entity/ExitGroupRecordEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/entity/ExitGroupRecordEntity.java new file mode 100644 index 0000000000..2af81275a9 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/entity/ExitGroupRecordEntity.java @@ -0,0 +1,63 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.modules.member.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 退群记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-29 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("exit_group_record") +public class ExitGroupRecordEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 小组id + */ + private String groupId; + + /** + * 组成员用户id + */ + private String memberUserId; + + /** + * 屏蔽他的话题及评论 yes:屏蔽 no:不屏蔽 + */ + private String shieldFlag; + + /** + * 0:组长移除; + */ + private String leaveType; + +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/entity/GroupLeaderTransferRecordEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/entity/GroupLeaderTransferRecordEntity.java new file mode 100644 index 0000000000..652ac30046 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/entity/GroupLeaderTransferRecordEntity.java @@ -0,0 +1,63 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.modules.member.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 组长身份转让记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-29 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("group_leader_transfer_record") +public class GroupLeaderTransferRecordEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 小组id + */ + private String groupId; + + /** + * 原组长userId + */ + private String originalLeader; + + /** + * 新组长userId + */ + private String newLeader; + + /** + * 组长自主转让resi,工作人员转让gov + */ + private String type; + +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/ExitGroupRecordService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/ExitGroupRecordService.java new file mode 100644 index 0000000000..b87212ba9f --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/ExitGroupRecordService.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.modules.member.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.modules.member.entity.ExitGroupRecordEntity; +import com.epmet.resi.group.dto.member.ExitGroupRecordDTO; + +import java.util.List; +import java.util.Map; + +/** + * 退群记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-29 + */ +public interface ExitGroupRecordService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-03-29 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-03-29 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return ExitGroupRecordDTO + * @author generator + * @date 2021-03-29 + */ + ExitGroupRecordDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-03-29 + */ + void save(ExitGroupRecordDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-03-29 + */ + void update(ExitGroupRecordDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-03-29 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/GroupLeaderTransferRecordService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/GroupLeaderTransferRecordService.java new file mode 100644 index 0000000000..641ca57fc4 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/GroupLeaderTransferRecordService.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.modules.member.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.modules.member.entity.GroupLeaderTransferRecordEntity; +import com.epmet.resi.group.dto.member.GroupLeaderTransferRecordDTO; + +import java.util.List; +import java.util.Map; + +/** + * 组长身份转让记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-29 + */ +public interface GroupLeaderTransferRecordService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-03-29 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-03-29 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return GroupLeaderTransferRecordDTO + * @author generator + * @date 2021-03-29 + */ + GroupLeaderTransferRecordDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-03-29 + */ + void save(GroupLeaderTransferRecordDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-03-29 + */ + void update(GroupLeaderTransferRecordDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-03-29 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/ExitGroupRecordServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/ExitGroupRecordServiceImpl.java new file mode 100644 index 0000000000..181efcdbfc --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/ExitGroupRecordServiceImpl.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.modules.member.service.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.modules.member.dao.ExitGroupRecordDao; +import com.epmet.modules.member.entity.ExitGroupRecordEntity; +import com.epmet.modules.member.service.ExitGroupRecordService; +import com.epmet.resi.group.dto.member.ExitGroupRecordDTO; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 退群记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-29 + */ +@Service +public class ExitGroupRecordServiceImpl extends BaseServiceImpl implements ExitGroupRecordService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, ExitGroupRecordDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, ExitGroupRecordDTO.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 ExitGroupRecordDTO get(String id) { + ExitGroupRecordEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ExitGroupRecordDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ExitGroupRecordDTO dto) { + ExitGroupRecordEntity entity = ConvertUtils.sourceToTarget(dto, ExitGroupRecordEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ExitGroupRecordDTO dto) { + ExitGroupRecordEntity entity = ConvertUtils.sourceToTarget(dto, ExitGroupRecordEntity.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/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/GroupLeaderTransferRecordServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/GroupLeaderTransferRecordServiceImpl.java new file mode 100644 index 0000000000..e0ce962528 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/GroupLeaderTransferRecordServiceImpl.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.modules.member.service.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.modules.member.dao.GroupLeaderTransferRecordDao; +import com.epmet.modules.member.entity.GroupLeaderTransferRecordEntity; +import com.epmet.modules.member.service.GroupLeaderTransferRecordService; +import com.epmet.resi.group.dto.member.GroupLeaderTransferRecordDTO; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 组长身份转让记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-29 + */ +@Service +public class GroupLeaderTransferRecordServiceImpl extends BaseServiceImpl implements GroupLeaderTransferRecordService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, GroupLeaderTransferRecordDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, GroupLeaderTransferRecordDTO.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 GroupLeaderTransferRecordDTO get(String id) { + GroupLeaderTransferRecordEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, GroupLeaderTransferRecordDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(GroupLeaderTransferRecordDTO dto) { + GroupLeaderTransferRecordEntity entity = ConvertUtils.sourceToTarget(dto, GroupLeaderTransferRecordEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(GroupLeaderTransferRecordDTO dto) { + GroupLeaderTransferRecordEntity entity = ConvertUtils.sourceToTarget(dto, GroupLeaderTransferRecordEntity.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/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.12__group_leader_transfer_record.sql b/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.12__group_leader_transfer_record.sql new file mode 100644 index 0000000000..f1bcfb11c9 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.12__group_leader_transfer_record.sql @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS `group_leader_transfer_record`; +CREATE TABLE `group_leader_transfer_record` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', + `GROUP_ID` varchar(64) NOT NULL COMMENT '小组id', + `ORIGINAL_LEADER` varchar(64) NOT NULL COMMENT '原组长userId', + `NEW_LEADER` varchar(64) NOT NULL COMMENT '新组长userId', + `TYPE` varchar(32) NOT NULL COMMENT '组长自主转让resi,工作人员转让gov', + `DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识', + `REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '当前操作人id即组长id', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='组长身份转让记录表'; \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.13__exit_group_record.sql b/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.13__exit_group_record.sql new file mode 100644 index 0000000000..fb717c4237 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.13__exit_group_record.sql @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS `exit_group_record`; +CREATE TABLE `exit_group_record` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', + `GROUP_ID` varchar(64) NOT NULL COMMENT '小组id', + `MEMBER_USER_ID` varchar(64) NOT NULL COMMENT '组成员用户id', + `SHIELD_FLAG` varchar(3) NOT NULL COMMENT '屏蔽他的话题及评论 yes:屏蔽 no:不屏蔽', + `LEAVE_TYPE` varchar(2) NOT NULL COMMENT '0:组长移除;', + `DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识', + `REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '当前操作人id', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='退群记录表'; \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/ExitGroupRecordDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/ExitGroupRecordDao.xml new file mode 100644 index 0000000000..12f50ce380 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/ExitGroupRecordDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/GroupLeaderTransferRecordDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/GroupLeaderTransferRecordDao.xml new file mode 100644 index 0000000000..b8a5334e28 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/GroupLeaderTransferRecordDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file From d2f9bdd5cc8f0bae76c9d37b41d51627849cc55a Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 30 Mar 2021 09:11:03 +0800 Subject: [PATCH 298/375] ossController --- .../src/main/java/com/epmet/controller/OssController.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java index 34a94378ec..863ce98a09 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java @@ -14,6 +14,7 @@ import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.redis.RedisUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AliyunGroup; @@ -62,6 +63,8 @@ public class OssController { private OssService ossService; @Autowired private ParamsRemoteService paramsRemoteService; + @Autowired + private RedisUtils redisUtils; private final static String KEY = ModuleConstant.CLOUD_STORAGE_CONFIG_KEY; @@ -226,13 +229,14 @@ public class OssController { , EpmetErrorCode.OPER_UPLOAD_FILE_TYPE_ERROR.getMsg()); } if (ModuleConstant.FILE_CONTENT_TYPE_PDF.equals(file.getContentType())) { - // 校验文件体积,不超过2m + // 校验文件体积,不超过5m long maxSize = 5 * 1024 * 1024; long size = file.getSize(); if (size > maxSize) { throw new RenException(EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getCode() , EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getMsg()); } + //todo 获取url 缓存半小时 删除时获取并调用删除方法 } else { // 校验文件体积,不超过2m long maxSize = 2 * 1024 * 1024; From 306d979b440e74f6e7256e3d5a626a4e9f39a83f Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 30 Mar 2021 09:44:25 +0800 Subject: [PATCH 299/375] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/CustomerProjectCategoryDictServiceImpl.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/CustomerProjectCategoryDictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/CustomerProjectCategoryDictServiceImpl.java index b610fa9c6c..97a8a560f5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/CustomerProjectCategoryDictServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/CustomerProjectCategoryDictServiceImpl.java @@ -29,6 +29,7 @@ import com.epmet.entity.stats.CustomerProjectCategoryDictEntity; import com.epmet.service.stats.CustomerProjectCategoryDictService; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -67,17 +68,19 @@ public class CustomerProjectCategoryDictServiceImpl extends BaseServiceImpl { CustomerProjectCategoryDictEntity entity=baseDao.selectByCustomerIdAndId(updatedEntity.getCustomerId(),updatedEntity.getId()); - if(null!=entity){ + if (null != entity) { entity.setCategoryCode(updatedEntity.getCategoryCode()); entity.setCategoryName(updatedEntity.getCategoryName()); entity.setParentCategoryCode(updatedEntity.getParentCategoryCode()); - entity.setLevel(Integer.valueOf(updatedEntity.getCategoryType())); + if (StringUtils.isNotBlank(updatedEntity.getCategoryType())) { + entity.setLevel(Integer.valueOf(updatedEntity.getCategoryType())); + } entity.setSort(updatedEntity.getSort()); entity.setIsDisable(updatedEntity.getIsDisable()); entity.setOriginCreatedTime(updatedEntity.getCreatedTime()); entity.setOriginUpdatedTime(updatedEntity.getUpdatedTime()); + baseDao.updateById(entity); } - baseDao.updateById(entity); }); } From f14d04ba77e4b0e56791393995ac0baafd04228f Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 30 Mar 2021 09:50:03 +0800 Subject: [PATCH 300/375] =?UTF-8?q?=E5=A4=A7=E6=A6=82=E6=98=AF=E7=9D=A1?= =?UTF-8?q?=E7=9D=80=E4=BA=86=E5=90=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dataaggre/service/resigroup/ResiGroupService.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/resigroup/ResiGroupService.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/resigroup/ResiGroupService.java index 1e15dce4fa..0b3b4d1891 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/resigroup/ResiGroupService.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/resigroup/ResiGroupService.java @@ -1,7 +1,6 @@ package com.epmet.dataaggre.service.resigroup; import com.epmet.dataaggre.dto.resigroup.ResiTopicDTO; -import org.apache.ibatis.annotations.Param; import java.util.List; @@ -10,5 +9,5 @@ import java.util.List; * @DateTime 2020/12/25 上午9:21 */ public interface ResiGroupService { - List selectTopicInfoByIds(@Param("topicIds") List topicIds); + List selectTopicInfoByIds(List topicIds); } From 40fb288fc0ed60aea81d1ec8afc0985c7afa0965 Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 30 Mar 2021 09:58:49 +0800 Subject: [PATCH 301/375] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E5=AF=B9?= =?UTF-8?q?=E5=A4=96=E5=BC=80=E6=94=BEapi=EF=BC=8C=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E8=AE=A4=E8=AF=81=E5=8D=B3=E5=8F=AF=E8=AE=BF=E9=97=AE=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-gateway/src/main/resources/bootstrap.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/epmet-gateway/src/main/resources/bootstrap.yml b/epmet-gateway/src/main/resources/bootstrap.yml index 201573688e..d78d225cda 100644 --- a/epmet-gateway/src/main/resources/bootstrap.yml +++ b/epmet-gateway/src/main/resources/bootstrap.yml @@ -457,6 +457,9 @@ epmet: - /gov/project/** - /resi/home/** - /data/report/** + - /epmet/ext/** + - /data/stats/** + - /data/aggregator/** # 内部认证url白名单(在白名单中的,就不会再校验登录了) internalAuthUrlsWhiteList: From c589a9d00e00b39ab92181263a6a88d77f45e5e5 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Tue, 30 Mar 2021 10:06:31 +0800 Subject: [PATCH 302/375] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E5=AD=97=E5=85=B8=E8=A1=A8=EF=BC=8C=E6=A0=B9?= =?UTF-8?q?=E6=8D=AEid+customerId=E8=81=94=E5=90=88=E4=B8=BB=E9=94=AE?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dao/IssueProjectCategoryDictDao.java | 10 ++++++ .../IssueProjectCategoryDictServiceImpl.java | 6 ++-- .../mapper/IssueProjectCategoryDictDao.xml | 33 +++++++++++++++++++ 3 files changed, 47 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java index a6478d987f..ff49f564b1 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java @@ -157,4 +157,14 @@ public interface IssueProjectCategoryDictDao extends BaseDao selectListAllCategoryDict(@Param("customerId") String customerId, @Param("pid") String pid); + + /** + * 根据 主键+customerId 修改议题项目分类字典 + * + * @param entity + * @return int + * @Author zhangyong + * @Date 09:53 2021-03-30 + **/ + int updateIssueProjectCategoryDict(IssueProjectCategoryDictEntity entity); } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java index 9dd3f3ac23..62d39412c3 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java @@ -355,10 +355,11 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl(); } @@ -419,10 +420,11 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl(); } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml index f9bc6b4b97..3a29df5f14 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml @@ -212,4 +212,37 @@ ORDER BY SORT, CATEGORY_CODE ASC + + + UPDATE issue_project_category_dict + SET + + PID = #{pid}, + + + PIDS = #{pids}, + + + PARENT_CATEGORY_CODE = #{parentCategoryCode}, + + + CATEGORY_CODE = #{categoryCode}, + + + CATEGORY_NAME = #{categoryName}, + + + CATEGORY_TYPE = #{categoryType}, + + + + SORT = #{sort}, + + + IS_DISABLE = #{isDisable}, + + UPDATED_TIME = NOW() + WHERE + customer_id = #{customerId} AND id = #{id} AND DEL_FLAG = '0' + From 83c152008fd51ce6bbfcbd032059cb695aead2a1 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 30 Mar 2021 10:12:42 +0800 Subject: [PATCH 303/375] =?UTF-8?q?oss=E8=BF=94=E5=9B=9Edomain=E5=9F=9F?= =?UTF-8?q?=E5=90=8D=E7=94=A8=E4=BA=8E=E6=9B=BF=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/commons/tools/redis/RedisKeys.java | 12 ++++++++++++ .../epmet/dto/result/UploadImgResultDTO.java | 6 ++++++ .../cloud/AbstractCloudStorageService.java | 12 +++++++++++- .../cloud/AliyunCloudStorageService.java | 19 ++++++++++++++++++- .../com/epmet/controller/OssController.java | 11 +++++++++++ .../epmet/service/impl/OssServiceImpl.java | 8 +++++++- 6 files changed, 65 insertions(+), 3 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java index faee6de155..716e22a223 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java @@ -386,4 +386,16 @@ public class RedisKeys { public static String getResiUserBadgeKey(String customerId, String userId) { return rootPrefix.concat("badge:user:").concat(customerId).concat(":").concat(StringUtils.isBlank(userId) ? "*" : userId); } + + /** + * desc: 根据文件路径获取oss 文件缓存key + * + * @param path + * @return java.lang.String + * @author LiuJanJun + * @date 2021/3/30 9:56 上午 + */ + public static String getOssFileKey(String path) { + return rootPrefix.concat("oss:temp:").concat(path); + } } diff --git a/epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/dto/result/UploadImgResultDTO.java b/epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/dto/result/UploadImgResultDTO.java index b93b58bb39..cbd2797bfb 100644 --- a/epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/dto/result/UploadImgResultDTO.java +++ b/epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/dto/result/UploadImgResultDTO.java @@ -1,5 +1,6 @@ package com.epmet.dto.result; +import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; @@ -12,4 +13,9 @@ import java.io.Serializable; @Data public class UploadImgResultDTO implements Serializable { private String url; + /** + * 域名 + */ + @JsonIgnore + private String domain; } diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/AbstractCloudStorageService.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/AbstractCloudStorageService.java index 0eabc11add..383312c312 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/AbstractCloudStorageService.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/AbstractCloudStorageService.java @@ -25,7 +25,17 @@ import java.util.UUID; public abstract class AbstractCloudStorageService { /** 云存储配置信息 */ CloudStorageConfig config; - + /** + * desc: 获取oss域名 + * + * @param privacy + * @return java.lang.String + * @author LiuJanJun + * @date 2021/3/30 10:05 上午 + */ + public String getOssDomain(String privacy){ + return null; + }; /** * 文件路径 * @param prefix 前缀 diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/AliyunCloudStorageService.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/AliyunCloudStorageService.java index 472609fbcd..6f29e056df 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/AliyunCloudStorageService.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/AliyunCloudStorageService.java @@ -36,7 +36,7 @@ public class AliyunCloudStorageService extends AbstractCloudStorageService { * @author wxz * @date 2021.01.04 13:49 */ - private CloudStorageConfig.AliyunCloudStorageConfigProps getPropsByprivacyType(String privacyType) { + public CloudStorageConfig.AliyunCloudStorageConfigProps getPropsByprivacyType(String privacyType) { if (PrivacyType.INTERNAL.equalsIgnoreCase(privacyType)) { return config.getAliyun().getInternal(); } else { @@ -44,6 +44,23 @@ public class AliyunCloudStorageService extends AbstractCloudStorageService { } } + /** + * desc: 获取oss域名 + * + * @param privacy + * @return java.lang.String + * @author LiuJanJun + * @date 2021/3/30 10:05 上午 + */ + @Override + public String getOssDomain(String privacy) { + if (PrivacyType.INTERNAL.equalsIgnoreCase(privacy)) { + return config.getAliyun().getInternal().getAliyunDomain(); + } else { + return config.getAliyun().getExternal().getAliyunDomain(); + } + } + @Override public String upload(byte[] data, String path, String privacyType) { return upload(new ByteArrayInputStream(data), path, privacyType); diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java index 863ce98a09..2673461209 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java @@ -11,9 +11,11 @@ package com.epmet.controller; import com.epmet.cloud.CloudStorageConfig; import com.epmet.cloud.OssFactory; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.redis.RedisKeys; import com.epmet.commons.tools.redis.RedisUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; @@ -33,6 +35,7 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.apache.commons.io.FilenameUtils; +import org.apache.commons.lang3.StringUtils; import org.apache.http.entity.ContentType; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; @@ -246,6 +249,14 @@ public class OssController { , EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getMsg()); } } + Result result = ossService.uploadImg(file, null); + if (result != null && result.success() ){ + UploadImgResultDTO data = result.getData(); + if ( data!= null && StringUtils.isNotBlank(data.getUrl())){ + String path = data.getUrl().replace(data.getUrl(), StrConstant.EPMETY_STR); + redisUtils.set(RedisKeys.getOssFileKey(path),path,RedisUtils.MINUTE_THIRTY_EXPIRE); + } + } return ossService.uploadImg(file, null); } diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java index 3effd64fb8..5a5a74ba37 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java @@ -10,6 +10,7 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.cloud.AbstractCloudStorageService; import com.epmet.cloud.OssFactory; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.Constant; @@ -56,8 +57,11 @@ public class OssServiceImpl extends BaseServiceImpl implement //上传文件 String extension = FilenameUtils.getExtension(file.getOriginalFilename()); String url = null; + String ossDomain = null; try { - url = OssFactory.build().uploadSuffix(file.getBytes(), extension, privacy); + AbstractCloudStorageService storageService = OssFactory.build(); + url = storageService.uploadSuffix(file.getBytes(), extension, privacy); + ossDomain = storageService.getOssDomain(privacy); } catch (IOException e) { e.printStackTrace(); logger.error("图片上传异常"); @@ -67,10 +71,12 @@ public class OssServiceImpl extends BaseServiceImpl implement //保存文件信息 OssEntity ossEntity = new OssEntity(); ossEntity.setUrl(url); + baseDao.insert(ossEntity); //文件信息 UploadImgResultDTO dto = new UploadImgResultDTO(); dto.setUrl(url); + dto.setDomain(ossDomain); return new Result().ok(dto); } From 6b6f0ce09280ed27dd0f022d8f99a5f3758bc700 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 30 Mar 2021 10:26:59 +0800 Subject: [PATCH 304/375] =?UTF-8?q?=E6=96=87=E7=AB=A0=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E8=BF=94=E5=9B=9Efilename?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/result/ArticleContentResultDTO.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/ArticleContentResultDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/ArticleContentResultDTO.java index 9b12f89213..38222f8295 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/ArticleContentResultDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/ArticleContentResultDTO.java @@ -15,7 +15,7 @@ public class ArticleContentResultDTO implements Serializable { private static final long serialVersionUID = 2853197212163051558L; /** - * 内容类型(图片:img;文字:text) + * 内容类型(图片:img;文字:text;文件:file) * */ private String contentType; @@ -23,4 +23,9 @@ public class ArticleContentResultDTO implements Serializable { * 内容 * */ private String content; + + /** + * 文件名称 + * */ + private String fileName; } From 6dea3eeff5ff626d4ed65c375efda20eb3cd3135 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 30 Mar 2021 10:56:39 +0800 Subject: [PATCH 305/375] =?UTF-8?q?=E8=AF=9D=E9=A2=98=E8=AF=84=E8=AE=BA?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=B7=BB=E5=8A=A0=E6=9D=A1=E4=BB=B6and=20`ST?= =?UTF-8?q?ATUS`=3D'discussing'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/topic/ResiTopicCommentDao.xml | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicCommentDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicCommentDao.xml index 87f46e1efc..3dc42e00a4 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicCommentDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicCommentDao.xml @@ -54,20 +54,20 @@ From 2a20d01b90367b4a77af6bd0f44bd4f196f08e68 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 30 Mar 2021 13:28:18 +0800 Subject: [PATCH 309/375] =?UTF-8?q?=E8=BD=AC=E8=AE=A9=E7=BB=84=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3v1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../group/dto/member/form/ConfirmTransferFormDTO.java | 4 +++- .../GroupLeaderTransferRecordController.java | 1 + .../impl/GroupLeaderTransferRecordServiceImpl.java | 10 ++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/form/ConfirmTransferFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/form/ConfirmTransferFormDTO.java index 9bda15a783..3fd80cd64c 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/form/ConfirmTransferFormDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/form/ConfirmTransferFormDTO.java @@ -24,7 +24,9 @@ public class ConfirmTransferFormDTO implements Serializable { @NotBlank(message = "type不能为空:自主转让resi,工作人员转让gov") private String type; + /**************************以上是需要前端传入的参数*******************************************************/ @NotBlank(message = "tokenDto中获取customerId为空") private String customerId; - + @NotBlank(message = "tokenDto中获取userId为空") + private String currentUserId; } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/controller/GroupLeaderTransferRecordController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/controller/GroupLeaderTransferRecordController.java index 55d18521f5..98376bb68e 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/controller/GroupLeaderTransferRecordController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/controller/GroupLeaderTransferRecordController.java @@ -53,6 +53,7 @@ public class GroupLeaderTransferRecordController { @PostMapping("confirmtransfer") public Result confirmTransfer(@LoginUser TokenDto tokenDto, @RequestBody ConfirmTransferFormDTO formDTO){ formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setCurrentUserId(tokenDto.getUserId()); ValidatorUtils.validateEntity(formDTO); groupLeaderTransferRecordService.confirmTransfer(formDTO); return new Result(); diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/GroupLeaderTransferRecordServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/GroupLeaderTransferRecordServiceImpl.java index 6134be2cf2..7b4564a41d 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/GroupLeaderTransferRecordServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/GroupLeaderTransferRecordServiceImpl.java @@ -21,6 +21,8 @@ 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.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.dto.form.UserMessageFormDTO; @@ -128,6 +130,14 @@ public class GroupLeaderTransferRecordServiceImpl extends BaseServiceImpl Date: Tue, 30 Mar 2021 13:39:38 +0800 Subject: [PATCH 310/375] =?UTF-8?q?=20=E8=AF=84=E4=BB=B7=E5=91=A8=E6=9C=9F?= =?UTF-8?q?=E5=86=85=E8=A2=AB=E5=90=B9=E5=93=A8=E4=B8=94=E8=A2=AB=E5=8A=9E?= =?UTF-8?q?=E7=BB=93=E7=9A=84=E9=A1=B9=E7=9B=AE=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extract/FactOriginProjectLogDailyDao.xml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) 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 index 2db8a97d58..0fe89ad0e9 100644 --- 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 @@ -198,15 +198,22 @@ COUNT(DISTINCT log.PROJECT_ID) AS count FROM fact_origin_project_log_daily log - LEFT JOIN fact_origin_project_main_daily project ON log.PROJECT_ID = project.ID AND project.DEL_FLAG = '0' AND project.CUSTOMER_ID = #{customerId} WHERE log.DEL_FLAG = '0' - AND project.PROJECT_STATUS LIKE 'close%' AND log.CUSTOMER_ID = #{customerId} AND log.IS_ACTIVE = '0' - AND log.MONTH_ID = #{dimId} + AND EXISTS ( + select id from fact_origin_project_log_daily where del_flag = '0' + and customer_id = #{customerId} and month_id = #{dimId} + and action_code like 'close%' + + + AGENCY_ID = #{agencyId} + + ) + log.AGENCY_ID = #{agencyId} From b135bda98a9671c5495ff35cd15a67a531158693 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 30 Mar 2021 13:59:43 +0800 Subject: [PATCH 311/375] =?UTF-8?q?=E8=BD=AC=E8=AE=A9=E7=BB=84=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3v2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/GroupLeaderTransferRecordServiceImpl.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/GroupLeaderTransferRecordServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/GroupLeaderTransferRecordServiceImpl.java index 7b4564a41d..bf557430a9 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/GroupLeaderTransferRecordServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/GroupLeaderTransferRecordServiceImpl.java @@ -130,6 +130,10 @@ public class GroupLeaderTransferRecordServiceImpl extends BaseServiceImpl Date: Tue, 30 Mar 2021 14:06:13 +0800 Subject: [PATCH 312/375] =?UTF-8?q?=E6=96=87=E7=AB=A0=E5=86=85=E5=AE=B9=20?= =?UTF-8?q?=E5=A6=82=E6=9E=9C=E4=B8=BA=E6=96=87=E4=BB=B6=20=E5=88=99?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=E6=96=87=E4=BB=B6=E5=90=8D=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/ArticleServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java index e95a7dadf8..d00baf70d3 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java @@ -460,7 +460,7 @@ public class ArticleServiceImpl extends BaseServiceImpl Date: Tue, 30 Mar 2021 14:35:42 +0800 Subject: [PATCH 313/375] =?UTF-8?q?=E8=BF=94=E5=9B=9E=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-gateway/src/main/resources/bootstrap.yml | 2 ++ .../gov-voice-server/src/main/resources/mapper/DraftDao.xml | 1 + 2 files changed, 3 insertions(+) diff --git a/epmet-gateway/src/main/resources/bootstrap.yml b/epmet-gateway/src/main/resources/bootstrap.yml index 201573688e..7d762a9d49 100644 --- a/epmet-gateway/src/main/resources/bootstrap.yml +++ b/epmet-gateway/src/main/resources/bootstrap.yml @@ -457,6 +457,8 @@ epmet: - /gov/project/** - /resi/home/** - /data/report/** + - /gov/voice/** + - /resi/voice/** # 内部认证url白名单(在白名单中的,就不会再校验登录了) internalAuthUrlsWhiteList: diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml index 483c05319e..a6675ddb4e 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml @@ -166,6 +166,7 @@ SELECT dc.CONTENT_TYPE, dc.CONTENT, + dc.FILE_NAME, dc.AUDIT_STATUS, dc.AUDIT_REASON FROM From c0ec3f3a36018c80d95878fc699dda433a8586d8 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 30 Mar 2021 14:52:53 +0800 Subject: [PATCH 314/375] =?UTF-8?q?=E8=BF=94=E5=9B=9E=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-voice-server/src/main/resources/mapper/ArticleDao.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml index 97be456470..924f52a59f 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/ArticleDao.xml @@ -276,6 +276,7 @@ + From c67d86d16d431cfab72135fde23263b52ab7d8d6 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Tue, 30 Mar 2021 15:29:54 +0800 Subject: [PATCH 315/375] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=85=9A=E5=BB=BA?= =?UTF-8?q?=E5=A3=B0=E9=9F=B3=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/form/RemoveFileFormDTO.java | 16 ++++++++ .../epmet/dto/result/RemoveFileResultDTO.java | 16 ++++++++ .../cloud/AbstractCloudStorageService.java | 9 ++++ .../cloud/AliyunCloudStorageService.java | 15 +++++++ .../cloud/FastDFSCloudStorageService.java | 13 ++++++ .../epmet/cloud/LocalCloudStorageService.java | 13 ++++++ .../cloud/QcloudCloudStorageService.java | 13 ++++++ .../epmet/cloud/QiniuCloudStorageService.java | 13 ++++++ .../com/epmet/controller/OssController.java | 9 ++++ .../src/main/java/com/epmet/dao/OssDao.java | 4 +- .../java/com/epmet/service/OssService.java | 10 +++++ .../epmet/service/impl/OssServiceImpl.java | 41 +++++++++++++++++++ .../src/main/resources/mapper/SysOssDao.xml | 6 +++ 13 files changed, 177 insertions(+), 1 deletion(-) create mode 100644 epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/dto/form/RemoveFileFormDTO.java create mode 100644 epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/dto/result/RemoveFileResultDTO.java diff --git a/epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/dto/form/RemoveFileFormDTO.java b/epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/dto/form/RemoveFileFormDTO.java new file mode 100644 index 0000000000..7f01fc9936 --- /dev/null +++ b/epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/dto/form/RemoveFileFormDTO.java @@ -0,0 +1,16 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author zhaoqifeng + * @dscription + * @date 2021/3/30 9:51 + */ +@Data +public class RemoveFileFormDTO implements Serializable { + private static final long serialVersionUID = 3889369412733647229L; + private String url; +} diff --git a/epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/dto/result/RemoveFileResultDTO.java b/epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/dto/result/RemoveFileResultDTO.java new file mode 100644 index 0000000000..e8a39a8a96 --- /dev/null +++ b/epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/dto/result/RemoveFileResultDTO.java @@ -0,0 +1,16 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author zhaoqifeng + * @dscription + * @date 2021/3/30 9:52 + */ +@Data +public class RemoveFileResultDTO implements Serializable { + private static final long serialVersionUID = 6509372741520843201L; + private Boolean delSuccess; +} diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/AbstractCloudStorageService.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/AbstractCloudStorageService.java index 383312c312..8cd699e5e9 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/AbstractCloudStorageService.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/AbstractCloudStorageService.java @@ -107,4 +107,13 @@ public abstract class AbstractCloudStorageService { */ public abstract void down(String privacyType) throws IOException; + /** + * 文件删除 + * @author zhaoqifeng + * @date 2021/3/30 11:05 + * @param objectName + * @return boolean + */ + public abstract boolean delete(String objectName); + } diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/AliyunCloudStorageService.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/AliyunCloudStorageService.java index 6f29e056df..c8d30d1c7d 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/AliyunCloudStorageService.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/AliyunCloudStorageService.java @@ -81,6 +81,21 @@ public class AliyunCloudStorageService extends AbstractCloudStorageService { return props.getAliyunDomain() + "/" + path; } + @Override + public boolean delete(String objectName) { + CloudStorageConfig.AliyunCloudStorageConfigProps props = getPropsByprivacyType(null); + OSSClient client = new OSSClient(props.getAliyunEndPoint(), props.getAliyunAccessKeyId(), + props.getAliyunAccessKeySecret()); + try { + client.deleteObject(props.getAliyunBucketName(), props.getAliyunPrefix() + objectName); + client.shutdown(); + } catch (Exception e){ + return false; + } + + return true; + } + @Override public String uploadSuffix(byte[] data, String suffix, String privacyType) { CloudStorageConfig.AliyunCloudStorageConfigProps props = getPropsByprivacyType(privacyType); diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/FastDFSCloudStorageService.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/FastDFSCloudStorageService.java index b5493c02b2..41ceb4024e 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/FastDFSCloudStorageService.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/FastDFSCloudStorageService.java @@ -65,4 +65,17 @@ public class FastDFSCloudStorageService extends AbstractCloudStorageService { public void down(String privacyType) throws IOException { } + + /** + * 文件删除 + * + * @param objectName + * @return boolean + * @author zhaoqifeng + * @date 2021/3/30 11:05 + */ + @Override + public boolean delete(String objectName) { + return false; + } } diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/LocalCloudStorageService.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/LocalCloudStorageService.java index 8143edaa0b..76968ff118 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/LocalCloudStorageService.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/LocalCloudStorageService.java @@ -58,4 +58,17 @@ public class LocalCloudStorageService extends AbstractCloudStorageService { public void down(String privacyType) throws IOException { } + + /** + * 文件删除 + * + * @param objectName + * @return boolean + * @author zhaoqifeng + * @date 2021/3/30 11:05 + */ + @Override + public boolean delete(String objectName) { + return false; + } } diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/QcloudCloudStorageService.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/QcloudCloudStorageService.java index 80c5e494f4..5b91aa84c0 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/QcloudCloudStorageService.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/QcloudCloudStorageService.java @@ -88,4 +88,17 @@ public class QcloudCloudStorageService extends AbstractCloudStorageService { public void down(String privacyType) throws IOException { } + + /** + * 文件删除 + * + * @param objectName + * @return boolean + * @author zhaoqifeng + * @date 2021/3/30 11:05 + */ + @Override + public boolean delete(String objectName) { + return false; + } } diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/QiniuCloudStorageService.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/QiniuCloudStorageService.java index 16515203dd..3b2035c89e 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/QiniuCloudStorageService.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/QiniuCloudStorageService.java @@ -82,4 +82,17 @@ public class QiniuCloudStorageService extends AbstractCloudStorageService { public void down(String privacyType) throws IOException { } + + /** + * 文件删除 + * + * @param objectName + * @return boolean + * @author zhaoqifeng + * @date 2021/3/30 11:05 + */ + @Override + public boolean delete(String objectName) { + return false; + } } diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java index 2673461209..53c8befb84 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java @@ -23,6 +23,8 @@ import com.epmet.commons.tools.validator.group.AliyunGroup; import com.epmet.commons.tools.validator.group.QcloudGroup; import com.epmet.commons.tools.validator.group.QiniuGroup; import com.epmet.dto.UploadDTO; +import com.epmet.dto.form.RemoveFileFormDTO; +import com.epmet.dto.result.RemoveFileResultDTO; import com.epmet.dto.result.UploadImgResultDTO; import com.epmet.entity.OssEntity; import com.epmet.enums.OssTypeEnum; @@ -354,4 +356,11 @@ public class OssController { return ossService.uploadVoice(file); } + @PostMapping("article/remove/file") + public Result articleRemoveFile(@RequestBody RemoveFileFormDTO formDTO) { + RemoveFileResultDTO resultDTO = new RemoveFileResultDTO(); + resultDTO.setDelSuccess(ossService.articleRemoveFile(formDTO)); + return new Result().ok(resultDTO); + } + } diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/dao/OssDao.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/dao/OssDao.java index 79f8b14823..0be20abd16 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/dao/OssDao.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/dao/OssDao.java @@ -11,6 +11,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.entity.OssEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * 文件上传 @@ -19,5 +20,6 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface OssDao extends BaseDao { - + OssEntity selectByUrl(@Param("url") String url); + void deleteDataById(@Param("id") String id); } diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/OssService.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/OssService.java index 3253f78527..4f4171df0e 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/OssService.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/OssService.java @@ -11,6 +11,7 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.form.RemoveFileFormDTO; import com.epmet.dto.result.UploadImgResultDTO; import com.epmet.entity.OssEntity; import org.springframework.web.multipart.MultipartFile; @@ -35,4 +36,13 @@ public interface OssService extends BaseService { Result uploadVariedFile(MultipartFile file); Result uploadVoice(MultipartFile file); + + /** + * 删除附件 + * @author zhaoqifeng + * @date 2021/3/30 9:55 + * @param formDTO + * @return boolean + */ + boolean articleRemoveFile(RemoveFileFormDTO formDTO); } diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java index 5a5a74ba37..f1f236e7e6 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java @@ -14,11 +14,16 @@ import com.epmet.cloud.AbstractCloudStorageService; import com.epmet.cloud.OssFactory; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.Constant; +import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.redis.RedisKeys; +import com.epmet.commons.tools.redis.RedisUtils; +import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.constants.PrivacyType; import com.epmet.dao.OssDao; +import com.epmet.dto.form.RemoveFileFormDTO; import com.epmet.dto.result.UploadImgResultDTO; import com.epmet.entity.OssEntity; import com.epmet.exception.ModuleErrorCode; @@ -26,15 +31,22 @@ import com.epmet.service.OssService; import org.apache.commons.io.FilenameUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.web.multipart.MultipartFile; import java.io.IOException; +import java.util.Date; import java.util.Map; +import java.util.Objects; @Service public class OssServiceImpl extends BaseServiceImpl implements OssService { private static final Logger logger = LoggerFactory.getLogger(OssServiceImpl.class); + + @Autowired + private RedisUtils redisUtils; + @Override public PageData page(Map params) { IPage page = baseDao.selectPage( @@ -161,6 +173,7 @@ public class OssServiceImpl extends BaseServiceImpl implement } //保存文件信息 OssEntity ossEntity = new OssEntity(); + ossEntity.setUrl(url); baseDao.insert(ossEntity); //文件信息 @@ -169,4 +182,32 @@ public class OssServiceImpl extends BaseServiceImpl implement return new Result().ok(dto); } + /** + * 删除附件 + * + * @return boolean + * @author zhaoqifeng + * @date 2021/3/30 9:55 + * @param formDTO + */ + @Override + public boolean articleRemoveFile(RemoveFileFormDTO formDTO) { + String[] strings = formDTO.getUrl().split(StrConstant.SEPARATOR); + String fileName = strings[strings.length - 1]; + OssEntity entity = baseDao.selectByUrl(formDTO.getUrl()); + long thirty = 30*60*1000; + Date now = new Date(); + long time = now.getTime() - entity.getCreatedTime().getTime(); + if (time > thirty) { + return false; + } + baseDao.deleteDataById(entity.getId()); + String dateStr = DateUtils.format(entity.getCreatedTime(), DateUtils.DATE_PATTERN_YYYYMMDD); + fileName = StrConstant.SEPARATOR + dateStr + StrConstant.SEPARATOR + fileName; + String key = RedisKeys.getOssFileKey(formDTO.getUrl()); + redisUtils.delete(key); + return Objects.requireNonNull(OssFactory.build()).delete(fileName); + } + + } diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/resources/mapper/SysOssDao.xml b/epmet-module/epmet-oss/epmet-oss-server/src/main/resources/mapper/SysOssDao.xml index 2531640cb1..a7489f514b 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/resources/mapper/SysOssDao.xml +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/resources/mapper/SysOssDao.xml @@ -2,5 +2,11 @@ + + delete from sys_oss where id = #{id} + + From 74bbe6258be06a6f7b87f27b98467aa09ca58804 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 30 Mar 2021 15:34:56 +0800 Subject: [PATCH 316/375] =?UTF-8?q?=E5=B0=8F=E7=BB=84=E6=88=90=E5=91=98?= =?UTF-8?q?=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/feign/GovIssueOpenFeignClient.java | 8 ++ .../GovIssueOpenFeignClientFallBack.java | 5 + .../IssueApplicationController.java | 10 ++ .../com/epmet/dao/IssueApplicationDao.java | 8 ++ .../service/IssueApplicationService.java | 7 + .../impl/IssueApplicationServiceImpl.java | 11 ++ .../resources/mapper/IssueApplicationDao.xml | 14 ++ .../dto/group/form/ExitGroupFormDTO.java | 43 +++++++ .../group/controller/ExitGroupController.java | 48 +++++++ .../group/service/ExitGroupService.java | 18 +++ .../service/impl/ExitGroupServiceImpl.java | 120 ++++++++++++++++++ .../member/dao/GroupMemeberOperationDao.java | 6 + .../member/dao/ResiGroupMemberDao.java | 6 + .../topic/dao/ResiTopicCommentDao.java | 13 ++ .../epmet/modules/topic/dao/ResiTopicDao.java | 12 ++ .../member/GroupMemeberOperationDao.xml | 15 +++ .../mapper/member/ResiGroupMemberDao.xml | 13 ++ .../mapper/topic/ResiTopicCommentDao.xml | 27 ++++ .../resources/mapper/topic/ResiTopicDao.xml | 26 ++++ 19 files changed, 410 insertions(+) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/ExitGroupFormDTO.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ExitGroupController.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ExitGroupService.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ExitGroupServiceImpl.java diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java index f5d2786c93..f1768a23fd 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java @@ -244,4 +244,12 @@ public interface GovIssueOpenFeignClient { @PostMapping("/gov/issue/issue/detail") Result queryIssueDetail(@RequestBody IssueDetailFormDTO formDTO); + + /** + * @param topicIdList + * @Description 查询当前未成为议题的话题但是提交了转议题申请的 + * @author sun + */ + @PostMapping("/gov/issue/issueapplication/notissuetotopicids") + Result> notIssueToTopicIds(@RequestBody List topicIdList); } diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java index 84b1220993..53f22684a1 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java @@ -211,4 +211,9 @@ public class GovIssueOpenFeignClientFallBack implements GovIssueOpenFeignClient public Result queryIssueDetail(IssueDetailFormDTO formDTO) { return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "detail", formDTO); } + + @Override + public Result> notIssueToTopicIds(List topicIdList) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "notIssueToTopicIds", topicIdList); + } } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueApplicationController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueApplicationController.java index 63f5af6117..575b75a56b 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueApplicationController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueApplicationController.java @@ -164,4 +164,14 @@ public class IssueApplicationController { ValidatorUtils.validateEntity(fomrDTO, PageFormDTO.AddUserInternalGroup.class); return new Result>().ok(issueApplicationService.queryUserPubAuditingIssues(fomrDTO)); } + + /** + * @param topicIdList + * @Description 查询当前未成为议题的话题但是提交了转议题申请的 + * @author sun + */ + @PostMapping("notissuetotopicids") + public Result> notIssueToTopicIds(@RequestBody List topicIdList) { + return new Result>().ok(issueApplicationService.notIssueToTopicIds(topicIdList)); + } } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueApplicationDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueApplicationDao.java index 38ec62c1d6..33296076b6 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueApplicationDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueApplicationDao.java @@ -66,4 +66,12 @@ public interface IssueApplicationDao extends BaseDao { List selectUserPubAuditingIssues(UserPubAuditingIssueFormDTO formDTO); List selectByTopicId(@Param("topicId") String topicId); + + /** + * @param topicIdList + * @Description 查询当前未成为议题的话题但是提交了转议题申请的 + * @author sun + */ + List selectTopicIdList(@Param("topicIdList") List topicIdList); + } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueApplicationService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueApplicationService.java index 6c2df1b318..aecc10b0b5 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueApplicationService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueApplicationService.java @@ -143,4 +143,11 @@ public interface IssueApplicationService extends BaseService queryUserPubAuditingIssues(UserPubAuditingIssueFormDTO fomrDTO); + + /** + * @param topicIdList + * @Description 查询当前未成为议题的话题但是提交了转议题申请的 + * @author sun + */ + List notIssueToTopicIds(List topicIdList); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationServiceImpl.java index 71e62d3e1f..a699e58a61 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationServiceImpl.java @@ -175,4 +175,15 @@ public class IssueApplicationServiceImpl extends BaseServiceImpl notIssueToTopicIds(List topicIdList) { + List idList = baseDao.selectTopicIdList(topicIdList); + return idList; + } + } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationDao.xml index 3d94af1c56..2820a43019 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationDao.xml @@ -72,4 +72,18 @@ AND TOPIC_ID = #{topicId} ORDER BY CREATED_TIME DESC + + + \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/ExitGroupFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/ExitGroupFormDTO.java new file mode 100644 index 0000000000..0c10e60de1 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/ExitGroupFormDTO.java @@ -0,0 +1,43 @@ +package com.epmet.resi.group.dto.group.form; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @author sun + * @Description 删除组员-接口入参 + */ +@NoArgsConstructor +@Data +public class ExitGroupFormDTO implements Serializable { + + private static final long serialVersionUID = 9033824126731443502L; + /** + * 屏蔽突然的话题及评论,勾选:yes;不勾选:no + */ + @NotBlank(message = "是否屏蔽话题及评论不能为空") + private String shieldFlag; + /** + * 组成员用户id + */ + @NotBlank(message = "被删除用户Id不能为空") + private String userId; + /** + * 小组ID + */ + @NotBlank(message = "小组Id不能为空") + private String groupId; + + /** + * 客户Id + */ + private String customerId; + + /** + * OPERATE_USER_ID操作人id + */ + private String operateUserId; +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ExitGroupController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ExitGroupController.java new file mode 100644 index 0000000000..9f58b1eba7 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ExitGroupController.java @@ -0,0 +1,48 @@ +package com.epmet.modules.group.controller; + +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.modules.group.service.ExitGroupService; +import com.epmet.resi.group.dto.group.form.ExitGroupFormDTO; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author sun + * @dscription + */ +@Slf4j +@RestController +@RequestMapping("exitgroup") +public class ExitGroupController { + @Autowired + private ExitGroupService exitGroupService; + + + /** + * @param formDTO + * @Description 删除组员 + * @author sun + * 如果shieldFlag=yes, 则将讨论中的话题并且不存在正在审核的议题申请的置为已屏蔽 + * 不要忘了插入:exit_group_record + */ + @PostMapping("removemember") + public Result removeMember(@LoginUser TokenDto tokenDto, @RequestBody ExitGroupFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO); + if(!"".equals(formDTO.getShieldFlag())&&!"".equals(formDTO.getShieldFlag())){ + throw new RenException("参数错误,是否屏蔽历史话题参数值错误"); + } + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setOperateUserId(tokenDto.getUserId()); + exitGroupService.removeMember(formDTO); + return new Result(); + } + +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ExitGroupService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ExitGroupService.java new file mode 100644 index 0000000000..af8b7f30c7 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/ExitGroupService.java @@ -0,0 +1,18 @@ +package com.epmet.modules.group.service; + +import com.epmet.resi.group.dto.group.form.ExitGroupFormDTO; + +/** + * @author sun + * @dscription + */ +public interface ExitGroupService { + + /** + * @param formDTO + * @Description 删除组员 + * @author sun + */ + void removeMember(ExitGroupFormDTO formDTO); + +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ExitGroupServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ExitGroupServiceImpl.java new file mode 100644 index 0000000000..0b8392a927 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ExitGroupServiceImpl.java @@ -0,0 +1,120 @@ +package com.epmet.modules.group.service.impl; + +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.utils.Result; +import com.epmet.feign.GovIssueOpenFeignClient; +import com.epmet.modules.group.service.ExitGroupService; +import com.epmet.modules.member.dao.ExitGroupRecordDao; +import com.epmet.modules.member.dao.GroupMemeberOperationDao; +import com.epmet.modules.member.dao.ResiGroupMemberDao; +import com.epmet.modules.member.entity.ExitGroupRecordEntity; +import com.epmet.modules.topic.dao.ResiTopicCommentDao; +import com.epmet.modules.topic.dao.ResiTopicDao; +import com.epmet.modules.topic.entity.ResiTopicEntity; +import com.epmet.resi.group.dto.group.form.ExitGroupFormDTO; +import com.epmet.resi.group.dto.member.GroupMemeberOperationDTO; +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 java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +/** + * @author sun + * @dscription + */ +@Slf4j +@Service +public class ExitGroupServiceImpl implements ExitGroupService { + + @Autowired + private ResiGroupMemberDao resiGroupMemberDao; + @Autowired + private GroupMemeberOperationDao groupMemeberOperationDao; + @Autowired + private ExitGroupRecordDao exitGroupRecordDao; + @Autowired + private ResiTopicDao resiTopicDao; + @Autowired + private GovIssueOpenFeignClient govIssueOpenFeignClient; + @Autowired + private ResiTopicCommentDao resiTopicCommentDao; + + /** + * @param formDTO + * @Description 删除组员 + * @author sun + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void removeMember(ExitGroupFormDTO formDTO) { + //1.校验被删除人员是否是当前小组内成员 + int num = resiGroupMemberDao.checkUserInGroup(formDTO.getUserId(), formDTO.getGroupId()); + if (num < NumConstant.ONE) { + throw new RenException("当前待删除人员不是本小组成员"); + } + + //2.判断是否屏蔽本小组内历史话题 + List delIdList = new ArrayList<>(); + if ("yes".equals(formDTO.getShieldFlag())) { + //2-1.查询当前被删除人员发表过的话题还未成为议题的并且只是谈论中的数据 + List topicIdList = resiTopicDao.selectIdList(formDTO.getGroupId(), formDTO.getUserId()); + //2-2.查询当前未成为议题的话题但是提交了转议题申请的话题 + if (!CollectionUtils.isEmpty(topicIdList)) { + Result> listResult = govIssueOpenFeignClient.notIssueToTopicIds(topicIdList); + if (!listResult.success()) { + throw new RenException(listResult.getInternalMsg()); + } + //获取只是单纯的话题既没有被转成议题又不存在转议题申请待审核数据 + delIdList = topicIdList.stream().filter(o -> !listResult.getData().contains(o)).collect(Collectors.toList()); + } + //2-3.屏蔽这些单纯的话题 + if (delIdList.size() > NumConstant.ZERO) { + resiTopicDao.upTopicList(delIdList, formDTO.getOperateUserId()); + } + } + + //3.判断是否屏蔽本小组内历史评论 + if ("yes".equals(formDTO.getShieldFlag())) { + //3-1.查询别人的话题但自己评论过的话题Id + List commetTopicList = resiTopicCommentDao.selectTopicIds(formDTO.getGroupId(), formDTO.getUserId()); + delIdList.addAll(commetTopicList); + //3-2.本小组内屏蔽自己创建的话题发表过的评论以及别人发表的话题自己评论过的评论 + if (delIdList.size() > NumConstant.ZERO) { + resiTopicCommentDao.upTopicCommentList(delIdList, formDTO.getOperateUserId()); + } + } + + //4.修改组成员出入群记录表数据状态、删除组成员关系表数据、新增退群记录表数据 + //4-1.修改组成员出入群记录表数据状态 + GroupMemeberOperationDTO operationDTO = new GroupMemeberOperationDTO(); + operationDTO.setGroupId(formDTO.getGroupId()); + operationDTO.setCustomerUserId(formDTO.getUserId()); + operationDTO.setOperateUserId(formDTO.getOperateUserId()); + if (groupMemeberOperationDao.upByGroupAndUserId(operationDTO) < NumConstant.ONE) { + throw new RenException(String.format("修改组成员出入群记录表数据失败,小组Id【%s】被修改人Id【%s】", formDTO.getGroupId(), formDTO.getUserId())); + } + //4-2.删除组成员关系表数据并修改状态 + if (resiGroupMemberDao.delByGroupAndUserId(formDTO.getGroupId(), formDTO.getUserId()) < NumConstant.ONE) { + throw new RenException(String.format("删除组成员关系表数据操作失败,小组Id【%s】被修改人Id【%s】", formDTO.getGroupId(), formDTO.getUserId())); + } + //4-3.新增退群记录表数据 + ExitGroupRecordEntity entity = new ExitGroupRecordEntity(); + entity.setCustomerId(formDTO.getCustomerId()); + entity.setGroupId(formDTO.getGroupId()); + entity.setMemberUserId(formDTO.getUserId()); + entity.setShieldFlag(formDTO.getShieldFlag()); + entity.setLeaveType("0"); + if (exitGroupRecordDao.insert(entity) < NumConstant.ONE) { + throw new RenException(String.format("新增退群记录表数据操作失败,小组Id【%s】被修改人Id【%s】", formDTO.getGroupId(), formDTO.getUserId())); + } + + } + + +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/GroupMemeberOperationDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/GroupMemeberOperationDao.java index 49ecf7fbbe..bf0f443668 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/GroupMemeberOperationDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/GroupMemeberOperationDao.java @@ -59,4 +59,10 @@ public interface GroupMemeberOperationDao extends BaseDao { * @date 2020/12/18 下午4:33 */ Integer checkUserInGroup(@Param("userId")String userId,@Param("groupId")String groupId); + + /** + * @Description 修改组成员数据状态 + * @author sun + */ + int delByGroupAndUserId(@Param("groupId")String groupId, @Param("userId")String userId); } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicCommentDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicCommentDao.java index 57ef0adc97..efa950684b 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicCommentDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicCommentDao.java @@ -67,4 +67,17 @@ public interface ResiTopicCommentDao extends BaseDao { * @date 2020/12/23 上午11:09 */ Integer selectCommentCountByUserId(@Param("userId") String userId); + + /** + * @Description 查询本小组内自己评论过的别人发表的话题Id集合 + * @author sun + */ + List selectTopicIds(@Param("groupId") String groupId, @Param("userId") String userId); + + /** + * @Description 屏蔽自己发表的话题且自己评论过的评论 + * @author sun + */ + void upTopicCommentList(@Param("delIdList") List delIdList, @Param("userId") String userId); + } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicDao.java index ebbab2046a..abc817659d 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicDao.java @@ -212,4 +212,16 @@ public interface ResiTopicDao extends BaseDao { String selectCustomerIdByTopicId(@Param("topicId")String topicId); ResiTopicDTO selectByIssueId(@Param("issueId") String issueId); + + /** + * @Description 查询当前小组里被删除人员创建的话题还未转为议题并且是讨论中的话题数据 + * @author sun + */ + List selectIdList(@Param("groupId") String groupId, @Param("userId") String userId); + + /** + * @Description 批量修改话题状态 + * @author sun + */ + int upTopicList(@Param("delIdList") List delIdList, @Param("userId") String userId); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/GroupMemeberOperationDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/GroupMemeberOperationDao.xml index c47f80f4d3..cd7d33e5ca 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/GroupMemeberOperationDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/GroupMemeberOperationDao.xml @@ -39,4 +39,19 @@ AND GROUP_ID = #{groupId} AND OPERATE_STATUS = 'under_auditting' + + + UPDATE group_memeber_operation + SET operate_status = 'removed', + operate_user_id = #{operateUserId}, + updated_by = #{operateUserId}, + updated_time = NOW() + WHERE + group_id = #{groupId} + AND customer_user_id = #{customerUserId} + ORDER BY + created_time DESC + LIMIT 1 + + diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/ResiGroupMemberDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/ResiGroupMemberDao.xml index ea34d4a39c..013e384ec9 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/ResiGroupMemberDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/ResiGroupMemberDao.xml @@ -164,4 +164,17 @@ AND RESI_GROUP_ID = #{groupId} AND `STATUS` = 'approved' + + + UPDATE resi_group_member + SET del_flag = '1', + status = 'removed' + WHERE + resi_group_id = #{groupId} + AND customer_user_id = #{userId} + ORDER BY + created_time DESC + LIMIT 1 + + diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicCommentDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicCommentDao.xml index 3dc42e00a4..7fe318b292 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicCommentDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicCommentDao.xml @@ -97,4 +97,31 @@ AND CREATED_BY = #{userId} + + + + UPDATE resi_topic_comment + SET `status` = 'hidden', + updated_by = #{userId}, + updated_time = NOW() + WHERE + del_flag = '0' + + topic_id = #{topicId} + + + diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml index e1e57899c9..183169ab08 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml @@ -570,5 +570,31 @@ where rt.DEL_FLAG='0' and rt.ISSUE_ID=#{issueId} + + + + + UPDATE resi_topic + SET status = 'hidden', + updated_by = #{userId}, + updated_time = NOW() + WHERE + del_flag = '0' + + id = #{id} + + + From 456e63b954896c4d80522817e2eb81aa0c2bd006 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 30 Mar 2021 15:45:41 +0800 Subject: [PATCH 317/375] =?UTF-8?q?=E5=8F=AF=E8=83=9C=E4=BB=BB=E7=BB=84?= =?UTF-8?q?=E9=95=BF-=E7=BB=84=E5=91=98=E5=88=97=E8=A1=A8(=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E7=AB=AF=E9=80=9A=E7=94=A8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/commons/tools/redis/RedisUtils.java | 11 ++++ .../dataaggre/constant/GroupConstant.java | 4 ++ .../epmetuser/result/UserInfosResultDTO.java | 21 +++++++ .../resigroup/form/CandidateListFormDTO.java | 35 ++++++++++++ .../result/CandidateListResultDTO.java | 57 +++++++++++++++++++ .../controller/ResiGroupController.java | 29 ++++++++++ .../dao/epmetuser/UserBaseInfoDao.java | 14 ++++- .../dataaggre/dao/resigroup/ResiGroupDao.java | 12 ++++ .../epmet/dataaggre/redis/ResiGroupRedis.java | 47 +++++++++++++++ .../service/epmetuser/EpmetUserService.java | 13 +++++ .../epmetuser/impl/EpmetUserServiceImpl.java | 19 +++++++ .../service/resigroup/ResiGroupService.java | 10 ++++ .../resigroup/impl/ResiGroupServiceImpl.java | 52 +++++++++++++++++ .../mapper/epmetuser/UserBaseInfoDao.xml | 19 +++++++ .../mapper/resigroup/ResiGroupDao.xml | 12 ++++ 15 files changed, 354 insertions(+), 1 deletion(-) create mode 100644 epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/UserInfosResultDTO.java create mode 100644 epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/resigroup/form/CandidateListFormDTO.java create mode 100644 epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/resigroup/result/CandidateListResultDTO.java create mode 100644 epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/redis/ResiGroupRedis.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisUtils.java index 72a6db9b10..b18e48c389 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisUtils.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisUtils.java @@ -206,6 +206,17 @@ public class RedisUtils { }).collect(Collectors.toList()); } + /** + * @Description 获取缓存List + * @Param key + * @author zxc + * @date 2021/3/30 下午3:33 + */ + public List getListLrange(String key){ + List range = redisTemplate.opsForList().range(key, 0, -1); + return range; + } + /** * @Description Redis lrem : * 根据参数 count 的值,移除列表中与参数 value 相等的元素 diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/constant/GroupConstant.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/constant/GroupConstant.java index ba879a3fee..928115a08f 100644 --- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/constant/GroupConstant.java +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/constant/GroupConstant.java @@ -5,4 +5,8 @@ package com.epmet.dataaggre.constant; * @DateTime 2020/12/25 上午10:55 */ public interface GroupConstant { + + String BADGE_ICON = "badgeIcon"; + + String BADGE_KEY = "epmet:badge:user:"; } diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/UserInfosResultDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/UserInfosResultDTO.java new file mode 100644 index 0000000000..19bfd88186 --- /dev/null +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/UserInfosResultDTO.java @@ -0,0 +1,21 @@ +package com.epmet.dataaggre.dto.epmetuser.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/3/30 上午11:04 + * @DESC + */ +@Data +public class UserInfosResultDTO implements Serializable { + + private static final long serialVersionUID = 7129564173128153335L; + + private String userId; + private String userShowName; + private String headPhoto; + +} diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/resigroup/form/CandidateListFormDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/resigroup/form/CandidateListFormDTO.java new file mode 100644 index 0000000000..60113c8ed1 --- /dev/null +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/resigroup/form/CandidateListFormDTO.java @@ -0,0 +1,35 @@ +package com.epmet.dataaggre.dto.resigroup.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/3/30 上午9:34 + * @DESC + */ +@Data +public class CandidateListFormDTO implements Serializable { + + private static final long serialVersionUID = 6184071611057671961L; + + public interface CandidateListForm{} + + /** + * 小组ID + */ + @NotBlank(message = "小组ID不能为空",groups = CandidateListForm.class) + private String groupId; + + @NotNull(message = "pageNo不能为空",groups = CandidateListForm.class) + private Integer pageNo; + + @NotNull(message = "pageSize不能为空",groups = CandidateListForm.class) + private Integer pageSize; + + private String customerId; + +} diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/resigroup/result/CandidateListResultDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/resigroup/result/CandidateListResultDTO.java new file mode 100644 index 0000000000..100c94f58d --- /dev/null +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/resigroup/result/CandidateListResultDTO.java @@ -0,0 +1,57 @@ +package com.epmet.dataaggre.dto.resigroup.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2021/3/30 上午9:15 + * @DESC + */ +@Data +public class CandidateListResultDTO implements Serializable { + + private static final long serialVersionUID = 4720936429310456924L; + + /** + * resi_group_member.id: 成员id + */ + private String memberId; + + /** + * 组员的用户id + */ + private String userId; + + /** + * 成员头像 + */ + private String headPhoto; + + /** + * 成员的显示名称 + */ + private String userShowName; + + /** + * 徽章Url集合 + */ + private String leaderFlag; + + /** + * leader群主,member成员 + */ + private List badgeList; + + public CandidateListResultDTO() { + this.memberId = ""; + this.userId = ""; + this.headPhoto = ""; + this.userShowName = ""; + this.leaderFlag = ""; + this.badgeList = new ArrayList<>(); + } +} diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/ResiGroupController.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/ResiGroupController.java index 984db9af9f..259b22cff0 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/ResiGroupController.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/ResiGroupController.java @@ -1,8 +1,20 @@ package com.epmet.dataaggre.controller; +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.dataaggre.dto.resigroup.form.CandidateListFormDTO; +import com.epmet.dataaggre.dto.resigroup.result.CandidateListResultDTO; +import com.epmet.dataaggre.service.resigroup.ResiGroupService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.util.List; + /** * @Author zxc * @DateTime 2020/12/25 上午9:45 @@ -10,4 +22,21 @@ import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("resigroup") public class ResiGroupController { + + @Autowired + private ResiGroupService resiGroupService; + + /** + * @Description 可胜任组长-组员列表(工作端通用) + * @Param formDTO + * @author zxc + * @date 2021/3/30 上午9:45 + */ + @PostMapping("candidatelist") + public Result> candidateList(@RequestBody CandidateListFormDTO formDTO, @LoginUser TokenDto tokenDto){ + ValidatorUtils.validateEntity(formDTO, CandidateListFormDTO.CandidateListForm.class); + formDTO.setCustomerId(tokenDto.getCustomerId()); + return new Result>().ok(resiGroupService.candidateList(formDTO)); + } + } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/UserBaseInfoDao.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/UserBaseInfoDao.java index f7ced8b6f0..9932cffea5 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/UserBaseInfoDao.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/UserBaseInfoDao.java @@ -18,8 +18,12 @@ package com.epmet.dataaggre.dao.epmetuser; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dataaggre.dto.epmetuser.result.UserInfosResultDTO; import com.epmet.dataaggre.entity.epmetuser.UserBaseInfoEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 用户基础信息 @@ -29,5 +33,13 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface UserBaseInfoDao extends BaseDao { - + + /** + * @Description 根据UserIds查询 + * @Param userIds + * @author zxc + * @date 2021/3/30 上午11:07 + */ + List selectUserInfosByUserIds(@Param("userIds") List userIds); + } \ No newline at end of file diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/resigroup/ResiGroupDao.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/resigroup/ResiGroupDao.java index 1658a05ad9..f297a4f82f 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/resigroup/ResiGroupDao.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/resigroup/ResiGroupDao.java @@ -18,8 +18,12 @@ package com.epmet.dataaggre.dao.resigroup; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dataaggre.dto.resigroup.result.CandidateListResultDTO; import com.epmet.dataaggre.entity.resigroup.ResiGroupEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 群组信息表 @@ -29,5 +33,13 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ResiGroupDao extends BaseDao { + + /** + * @Description 根据小组ID查询组员信息身份【不包括组长】 + * @Param groupId + * @author zxc + * @date 2021/3/30 上午10:13 + */ + List candidateList(@Param("groupId")String groupId); } \ No newline at end of file diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/redis/ResiGroupRedis.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/redis/ResiGroupRedis.java new file mode 100644 index 0000000000..3efbd220d4 --- /dev/null +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/redis/ResiGroupRedis.java @@ -0,0 +1,47 @@ +package com.epmet.dataaggre.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import com.epmet.dataaggre.constant.GroupConstant; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.springframework.util.CollectionUtils; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * @Author zxc + * @DateTime 2021/3/30 下午1:39 + * @DESC + */ +@Component +@Slf4j +public class ResiGroupRedis { + + @Autowired + private RedisUtils redisUtils; + + /** + * @Description 获取用户徽章 + * @Param customerId + * @Param userId + * @author zxc + * @date 2021/3/30 下午3:33 + */ + public List getBadgeInfoByUserId(String customerId,String userId){ + String key = GroupConstant.BADGE_KEY+customerId+":"+userId; + List result = redisUtils.getListLrange(key); + if (!CollectionUtils.isEmpty(result)){ + List icons = new ArrayList<>(); + for (Object o : result) { + Map map = (Map) o; + icons.add(map.get(GroupConstant.BADGE_ICON)); + } + return icons; + } + return new ArrayList<>(); + } + +} diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/EpmetUserService.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/EpmetUserService.java index fc3acacff7..cf6e79f549 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/EpmetUserService.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/EpmetUserService.java @@ -1,8 +1,21 @@ package com.epmet.dataaggre.service.epmetuser; +import com.epmet.dataaggre.dto.epmetuser.result.UserInfosResultDTO; + +import java.util.List; + /** * @Author zxc * @DateTime 2020/12/25 上午9:20 */ public interface EpmetUserService { + + /** + * @Description 根据UserIds查询 + * @Param userIds + * @author zxc + * @date 2021/3/30 上午11:07 + */ + List selectUserInfosByUserIds(List userIds); + } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java index a992809a17..964dc4b9ca 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java @@ -2,10 +2,15 @@ package com.epmet.dataaggre.service.epmetuser.impl; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.dataaggre.constant.DataSourceConstant; +import com.epmet.dataaggre.dao.epmetuser.UserBaseInfoDao; +import com.epmet.dataaggre.dto.epmetuser.result.UserInfosResultDTO; import com.epmet.dataaggre.service.epmetuser.EpmetUserService; 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/12/25 上午9:21 @@ -14,4 +19,18 @@ import org.springframework.stereotype.Service; @DataSource(DataSourceConstant.EPMET_USER) @Slf4j public class EpmetUserServiceImpl implements EpmetUserService { + + @Autowired + private UserBaseInfoDao userBaseInfoDao; + + /** + * @Description 根据UserIds查询 + * @Param userIds + * @author zxc + * @date 2021/3/30 上午11:07 + */ + @Override + public List selectUserInfosByUserIds(List userIds) { + return userBaseInfoDao.selectUserInfosByUserIds(userIds); + } } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/resigroup/ResiGroupService.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/resigroup/ResiGroupService.java index 0b3b4d1891..5b163c4f5d 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/resigroup/ResiGroupService.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/resigroup/ResiGroupService.java @@ -1,6 +1,9 @@ package com.epmet.dataaggre.service.resigroup; import com.epmet.dataaggre.dto.resigroup.ResiTopicDTO; +import com.epmet.dataaggre.dto.resigroup.form.CandidateListFormDTO; +import com.epmet.dataaggre.dto.resigroup.result.CandidateListResultDTO; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -9,5 +12,12 @@ import java.util.List; * @DateTime 2020/12/25 上午9:21 */ public interface ResiGroupService { + /** + * @Description 可胜任组长-组员列表(工作端通用) + * @Param formDTO + * @author zxc + * @date 2021/3/30 上午9:45 + */ + List candidateList(CandidateListFormDTO formDTO); List selectTopicInfoByIds(List topicIds); } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/resigroup/impl/ResiGroupServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/resigroup/impl/ResiGroupServiceImpl.java index 931c13ffbb..41ead995ab 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/resigroup/impl/ResiGroupServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/resigroup/impl/ResiGroupServiceImpl.java @@ -2,14 +2,25 @@ package com.epmet.dataaggre.service.resigroup.impl; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.dataaggre.constant.DataSourceConstant; +import com.epmet.dataaggre.dao.resigroup.ResiGroupDao; import com.epmet.dataaggre.dao.resigroup.ResiTopicDao; +import com.epmet.dataaggre.dto.epmetuser.result.UserInfosResultDTO; import com.epmet.dataaggre.dto.resigroup.ResiTopicDTO; +import com.epmet.dataaggre.dto.resigroup.form.CandidateListFormDTO; +import com.epmet.dataaggre.dto.resigroup.result.CandidateListResultDTO; +import com.epmet.dataaggre.redis.ResiGroupRedis; +import com.epmet.dataaggre.service.epmetuser.EpmetUserService; import com.epmet.dataaggre.service.resigroup.ResiGroupService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; +import java.util.ArrayList; import java.util.List; +import java.util.stream.Collectors; /** * @Author zxc @@ -21,9 +32,50 @@ import java.util.List; public class ResiGroupServiceImpl implements ResiGroupService { @Autowired private ResiTopicDao resiTopicDao; + @Autowired + private ResiGroupDao resiGroupDao; + @Autowired + private EpmetUserService epmetUserService; + @Autowired + private ResiGroupRedis resiGroupRedis; @Override public List selectTopicInfoByIds(List topicIds) { return resiTopicDao.selectTopicInfoByIds(topicIds); } + + /** + * @Description 可胜任组长-组员列表(工作端通用) + * @Param formDTO + * @author zxc + * @date 2021/3/30 上午9:45 + */ + @Override + public List candidateList(CandidateListFormDTO formDTO) { + // 根据小组ID查询组员信息身份【不包括组长自己】 + PageInfo pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> resiGroupDao.candidateList(formDTO.getGroupId())); + List result = pageInfo.getList(); + // 没有直接返回空集合 + if (CollectionUtils.isEmpty(result)){ + return new ArrayList<>(); + } + // 获取userIds + List userIds = result.stream().map(m -> m.getUserId()).collect(Collectors.toList()); + // 查询用户信息【名字 头像】 + List userInfos = epmetUserService.selectUserInfosByUserIds(userIds); + result.forEach(r -> { + if (!CollectionUtils.isEmpty(userInfos)){ + userInfos.forEach(u -> { + if (r.getUserId().equals(u.getUserId())){ + r.setHeadPhoto(u.getHeadPhoto()); + r.setUserShowName(u.getUserShowName()); + } + }); + } + // 徽章赋值 + List badgeInfo = resiGroupRedis.getBadgeInfoByUserId(formDTO.getCustomerId(), r.getUserId()); + r.setBadgeList(null==badgeInfo ? new ArrayList<>() : badgeInfo); + }); + return result; + } } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/UserBaseInfoDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/UserBaseInfoDao.xml index 72039e24cd..6f0e5223d5 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/UserBaseInfoDao.xml +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/UserBaseInfoDao.xml @@ -3,4 +3,23 @@ + + \ No newline at end of file diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/resigroup/ResiGroupDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/resigroup/ResiGroupDao.xml index d2c9e20e2d..8a350ceec9 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/resigroup/ResiGroupDao.xml +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/resigroup/ResiGroupDao.xml @@ -3,4 +3,16 @@ + + \ No newline at end of file From bb2238013cccd0e3e1a6d789d9641dc0c8f23ff9 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 30 Mar 2021 15:50:53 +0800 Subject: [PATCH 318/375] =?UTF-8?q?=E8=BF=94=E5=9B=9E=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/DraftContentDao.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftContentDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftContentDao.xml index 906a248e3c..cd90573da5 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftContentDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftContentDao.xml @@ -9,6 +9,7 @@ CUSTOMER_ID, CONTENT, CONTENT_TYPE, + FILE_NAME, AUDIT_STATUS, AUDIT_REASON, ORDER_NUM @@ -28,7 +29,8 @@ SELECT ID, CONTENT, - CONTENT_TYPE + CONTENT_TYPE, + FILE_NAME FROM DRAFT_CONTENT WHERE @@ -41,4 +43,4 @@ DELETE FROM draft_content WHERE DRAFT_ID = #{draftId,jdbcType=VARCHAR} - \ No newline at end of file + From 33c23917987f59906878455323ab3d6db2686df3 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 30 Mar 2021 15:52:12 +0800 Subject: [PATCH 319/375] =?UTF-8?q?oss=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/cloud/AbstractCloudStorageService.java | 2 +- .../main/java/com/epmet/cloud/AliyunCloudStorageService.java | 4 ++-- .../src/main/java/com/epmet/service/impl/OssServiceImpl.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/AbstractCloudStorageService.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/AbstractCloudStorageService.java index 8cd699e5e9..74a38551d0 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/AbstractCloudStorageService.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/AbstractCloudStorageService.java @@ -114,6 +114,6 @@ public abstract class AbstractCloudStorageService { * @param objectName * @return boolean */ - public abstract boolean delete(String objectName); + public abstract boolean delete(String objectName, String privacyType); } diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/AliyunCloudStorageService.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/AliyunCloudStorageService.java index c8d30d1c7d..4938319ecd 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/AliyunCloudStorageService.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/AliyunCloudStorageService.java @@ -82,8 +82,8 @@ public class AliyunCloudStorageService extends AbstractCloudStorageService { } @Override - public boolean delete(String objectName) { - CloudStorageConfig.AliyunCloudStorageConfigProps props = getPropsByprivacyType(null); + public boolean delete(String objectName,String privacyType) { + CloudStorageConfig.AliyunCloudStorageConfigProps props = getPropsByprivacyType(privacyType); OSSClient client = new OSSClient(props.getAliyunEndPoint(), props.getAliyunAccessKeyId(), props.getAliyunAccessKeySecret()); try { diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java index f1f236e7e6..8cced9932a 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java @@ -206,7 +206,7 @@ public class OssServiceImpl extends BaseServiceImpl implement fileName = StrConstant.SEPARATOR + dateStr + StrConstant.SEPARATOR + fileName; String key = RedisKeys.getOssFileKey(formDTO.getUrl()); redisUtils.delete(key); - return Objects.requireNonNull(OssFactory.build()).delete(fileName); + return Objects.requireNonNull(OssFactory.build()).delete(fileName,null); } From 7a28485378ccbaa75e00c199ec3ea41d4025c0b1 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 30 Mar 2021 16:03:22 +0800 Subject: [PATCH 320/375] =?UTF-8?q?oss=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/cloud/FastDFSCloudStorageService.java | 3 ++- .../main/java/com/epmet/cloud/LocalCloudStorageService.java | 3 ++- .../main/java/com/epmet/cloud/QcloudCloudStorageService.java | 3 ++- .../main/java/com/epmet/cloud/QiniuCloudStorageService.java | 3 ++- .../src/main/java/com/epmet/service/impl/OssServiceImpl.java | 3 +++ 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/FastDFSCloudStorageService.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/FastDFSCloudStorageService.java index 41ceb4024e..08a591e86d 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/FastDFSCloudStorageService.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/FastDFSCloudStorageService.java @@ -70,12 +70,13 @@ public class FastDFSCloudStorageService extends AbstractCloudStorageService { * 文件删除 * * @param objectName + * @param privacyType * @return boolean * @author zhaoqifeng * @date 2021/3/30 11:05 */ @Override - public boolean delete(String objectName) { + public boolean delete(String objectName, String privacyType) { return false; } } diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/LocalCloudStorageService.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/LocalCloudStorageService.java index 76968ff118..7317bbd780 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/LocalCloudStorageService.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/LocalCloudStorageService.java @@ -63,12 +63,13 @@ public class LocalCloudStorageService extends AbstractCloudStorageService { * 文件删除 * * @param objectName + * @param privacyType * @return boolean * @author zhaoqifeng * @date 2021/3/30 11:05 */ @Override - public boolean delete(String objectName) { + public boolean delete(String objectName, String privacyType) { return false; } } diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/QcloudCloudStorageService.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/QcloudCloudStorageService.java index 5b91aa84c0..5d657ba318 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/QcloudCloudStorageService.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/QcloudCloudStorageService.java @@ -93,12 +93,13 @@ public class QcloudCloudStorageService extends AbstractCloudStorageService { * 文件删除 * * @param objectName + * @param privacyType * @return boolean * @author zhaoqifeng * @date 2021/3/30 11:05 */ @Override - public boolean delete(String objectName) { + public boolean delete(String objectName, String privacyType) { return false; } } diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/QiniuCloudStorageService.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/QiniuCloudStorageService.java index 3b2035c89e..2fe73cddeb 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/QiniuCloudStorageService.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/cloud/QiniuCloudStorageService.java @@ -87,12 +87,13 @@ public class QiniuCloudStorageService extends AbstractCloudStorageService { * 文件删除 * * @param objectName + * @param privacyType * @return boolean * @author zhaoqifeng * @date 2021/3/30 11:05 */ @Override - public boolean delete(String objectName) { + public boolean delete(String objectName, String privacyType) { return false; } } diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java index 8cced9932a..03e30b4da3 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java @@ -8,6 +8,7 @@ package com.epmet.service.impl; +import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.cloud.AbstractCloudStorageService; @@ -192,6 +193,7 @@ public class OssServiceImpl extends BaseServiceImpl implement */ @Override public boolean articleRemoveFile(RemoveFileFormDTO formDTO) { + logger.info("articleRemoveFile param:{}", JSON.toJSONString(formDTO)); String[] strings = formDTO.getUrl().split(StrConstant.SEPARATOR); String fileName = strings[strings.length - 1]; OssEntity entity = baseDao.selectByUrl(formDTO.getUrl()); @@ -206,6 +208,7 @@ public class OssServiceImpl extends BaseServiceImpl implement fileName = StrConstant.SEPARATOR + dateStr + StrConstant.SEPARATOR + fileName; String key = RedisKeys.getOssFileKey(formDTO.getUrl()); redisUtils.delete(key); + logger.info("articleRemoveFile oss delete fileName:{}", JSON.toJSONString(fileName)); return Objects.requireNonNull(OssFactory.build()).delete(fileName,null); } From e05295ae676c6e6b1cff2a1bc9207d7a2e4d8a52 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 30 Mar 2021 16:29:40 +0800 Subject: [PATCH 321/375] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=87=AA=E6=B5=8B?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/modules/group/controller/ExitGroupController.java | 2 +- .../modules/group/service/impl/ExitGroupServiceImpl.java | 2 +- .../java/com/epmet/modules/topic/dao/ResiTopicCommentDao.java | 2 +- .../main/resources/mapper/member/GroupMemeberOperationDao.xml | 1 + .../src/main/resources/mapper/member/ResiGroupMemberDao.xml | 1 + .../src/main/resources/mapper/topic/ResiTopicCommentDao.xml | 4 +++- .../src/main/resources/mapper/topic/ResiTopicDao.xml | 3 ++- 7 files changed, 10 insertions(+), 5 deletions(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ExitGroupController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ExitGroupController.java index 9f58b1eba7..a987253c0d 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ExitGroupController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ExitGroupController.java @@ -36,7 +36,7 @@ public class ExitGroupController { @PostMapping("removemember") public Result removeMember(@LoginUser TokenDto tokenDto, @RequestBody ExitGroupFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO); - if(!"".equals(formDTO.getShieldFlag())&&!"".equals(formDTO.getShieldFlag())){ + if(!"yes".equals(formDTO.getShieldFlag())&&!"no".equals(formDTO.getShieldFlag())){ throw new RenException("参数错误,是否屏蔽历史话题参数值错误"); } formDTO.setCustomerId(tokenDto.getCustomerId()); diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ExitGroupServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ExitGroupServiceImpl.java index 0b8392a927..4116d6907c 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ExitGroupServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ExitGroupServiceImpl.java @@ -86,7 +86,7 @@ public class ExitGroupServiceImpl implements ExitGroupService { delIdList.addAll(commetTopicList); //3-2.本小组内屏蔽自己创建的话题发表过的评论以及别人发表的话题自己评论过的评论 if (delIdList.size() > NumConstant.ZERO) { - resiTopicCommentDao.upTopicCommentList(delIdList, formDTO.getOperateUserId()); + resiTopicCommentDao.upTopicCommentList(delIdList, formDTO.getUserId(), formDTO.getOperateUserId()); } } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicCommentDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicCommentDao.java index efa950684b..36b7513617 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicCommentDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicCommentDao.java @@ -78,6 +78,6 @@ public interface ResiTopicCommentDao extends BaseDao { * @Description 屏蔽自己发表的话题且自己评论过的评论 * @author sun */ - void upTopicCommentList(@Param("delIdList") List delIdList, @Param("userId") String userId); + void upTopicCommentList(@Param("delIdList") List delIdList, @Param("userId") String userId, @Param("operateUserId") String operateUserId); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/GroupMemeberOperationDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/GroupMemeberOperationDao.xml index cd7d33e5ca..4389897bff 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/GroupMemeberOperationDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/GroupMemeberOperationDao.xml @@ -40,6 +40,7 @@ AND OPERATE_STATUS = 'under_auditting' + UPDATE group_memeber_operation SET operate_status = 'removed', diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/ResiGroupMemberDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/ResiGroupMemberDao.xml index 013e384ec9..6fb5735ffe 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/ResiGroupMemberDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/ResiGroupMemberDao.xml @@ -165,6 +165,7 @@ AND `STATUS` = 'approved' + UPDATE resi_group_member SET del_flag = '1', diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicCommentDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicCommentDao.xml index 7fe318b292..21a0456e9f 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicCommentDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicCommentDao.xml @@ -112,13 +112,15 @@ AND re.created_by = #{userId} + UPDATE resi_topic_comment SET `status` = 'hidden', - updated_by = #{userId}, + updated_by = #{operateUserId}, updated_time = NOW() WHERE del_flag = '0' + AND created_by = #{userId} topic_id = #{topicId} diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml index 183169ab08..63f7f951b3 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml @@ -571,6 +571,7 @@ and rt.ISSUE_ID=#{issueId} + + + + \ No newline at end of file From b310170a70aebd3494a65c3adbf7f21b85d9f0e9 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Thu, 1 Apr 2021 09:34:12 +0800 Subject: [PATCH 345/375] =?UTF-8?q?=E5=AE=9A=E5=88=B6=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E5=88=97=E8=A1=A8=20=E6=B7=BB=E5=8A=A0=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/form/FunctionCustomizedListFormDTO.java | 2 +- .../src/main/resources/mapper/FunctionCustomizedDao.xml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/FunctionCustomizedListFormDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/FunctionCustomizedListFormDTO.java index 2c6e3c037a..7fac3528a4 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/FunctionCustomizedListFormDTO.java +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/FunctionCustomizedListFormDTO.java @@ -54,6 +54,6 @@ public class FunctionCustomizedListFormDTO implements Serializable { /** * 页容量,默认20页 */ - @Min(value = 1, message = "每页条数必须大于必须大于0") + @Min(value = 1, message = "每页条数必须大于0") private Integer pageSize; } diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/FunctionCustomizedDao.xml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/FunctionCustomizedDao.xml index a9840f4e42..1e304190cf 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/FunctionCustomizedDao.xml +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/FunctionCustomizedDao.xml @@ -69,6 +69,7 @@ AND cu.FROM_APP = #{fromApp} ORDER BY cu.FROM_APP, f.CREATED_TIME DESC + LIMIT #{pageNo}, #{pageSize} From 5b7705296be7e733b31fc7304173af3e1947387b Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 1 Apr 2021 09:42:41 +0800 Subject: [PATCH 346/375] =?UTF-8?q?=E5=8F=AF=E8=83=9C=E4=BB=BB=E7=BB=84?= =?UTF-8?q?=E9=95=BF-=E7=BB=84=E5=91=98=E5=88=97=E8=A1=A8(=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E7=AB=AF=E9=80=9A=E7=94=A8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dataaggre/dao/epmetuser/UserBaseInfoDao.java | 6 +++--- .../dataaggre/service/epmetuser/EpmetUserService.java | 6 +++--- .../service/epmetuser/impl/EpmetUserServiceImpl.java | 8 ++++---- .../service/resigroup/impl/ResiGroupServiceImpl.java | 2 +- .../main/resources/mapper/epmetuser/UserBaseInfoDao.xml | 6 +++++- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/UserBaseInfoDao.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/UserBaseInfoDao.java index cea40d3a53..805657fc11 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/UserBaseInfoDao.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/UserBaseInfoDao.java @@ -43,11 +43,11 @@ public interface UserBaseInfoDao extends BaseDao { List selectUserInfosByUserIds(@Param("userIds") List userIds); /** - * @Description 查询客户下是党员/热心居民的userId - * @Param customerId + * @Description 查询是党员/热心居民的userId + * @Param userIds * @author zxc * @date 2021/4/1 上午9:08 */ - List selectUserIdByCustomerId(@Param("customerId") String customerId); + List selectUserIdByCustomerId(@Param("userIds") List userIds); } \ No newline at end of file diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/EpmetUserService.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/EpmetUserService.java index 0ccffa3d04..d6e03f7f40 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/EpmetUserService.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/EpmetUserService.java @@ -19,11 +19,11 @@ public interface EpmetUserService { List selectUserInfosByUserIds(List userIds); /** - * @Description 查询客户下是党员/热心居民的userId - * @Param customerId + * @Description 查询是党员/热心居民的userId + * @Param userIds * @author zxc * @date 2021/4/1 上午9:08 */ - List selectUserIdByCustomerId(String customerId); + List selectUserIdByCustomerId(List userIds); } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java index 6d8e9ebe55..2dac9b0ccd 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java @@ -35,13 +35,13 @@ public class EpmetUserServiceImpl implements EpmetUserService { } /** - * @Description 查询客户下是党员/热心居民的userId - * @Param customerId + * @Description 查询是党员/热心居民的userId + * @Param userIds * @author zxc * @date 2021/4/1 上午9:08 */ @Override - public List selectUserIdByCustomerId(String customerId) { - return userBaseInfoDao.selectUserIdByCustomerId(customerId); + public List selectUserIdByCustomerId(List userIds) { + return userBaseInfoDao.selectUserIdByCustomerId(userIds); } } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/resigroup/impl/ResiGroupServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/resigroup/impl/ResiGroupServiceImpl.java index 5fa82d981c..5e5c727555 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/resigroup/impl/ResiGroupServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/resigroup/impl/ResiGroupServiceImpl.java @@ -76,7 +76,7 @@ public class ResiGroupServiceImpl implements ResiGroupService { List badgeInfo = resiGroupRedis.getBadgeInfoByUserId(formDTO.getCustomerId(), r.getUserId()); r.setBadgeList(null==badgeInfo ? new ArrayList<>() : badgeInfo); }); - List showUsers = epmetUserService.selectUserIdByCustomerId(formDTO.getCustomerId()); + List showUsers = epmetUserService.selectUserIdByCustomerId(userIds); if (CollectionUtils.isEmpty(showUsers)){ return new ArrayList<>(); } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/UserBaseInfoDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/UserBaseInfoDao.xml index 4c75e51e50..489908227d 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/UserBaseInfoDao.xml +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/UserBaseInfoDao.xml @@ -31,6 +31,10 @@ LEFT JOIN user_role ur ON ur.ROLE_ID = er.ID WHERE ur.DEL_FLAG = 0 AND (er.ROLE_KEY = 'warmhearted' OR er.ROLE_KEY = 'partymember') - AND CUSTOMER_ID = #{customerId} + AND ( + + ur.USER_ID = #{userId} + + ) \ No newline at end of file From d305c08aa5aefab94a4b2052be769cfed9e3a6d2 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 1 Apr 2021 10:01:45 +0800 Subject: [PATCH 347/375] =?UTF-8?q?=E5=B9=B3=E9=98=B4=E6=95=B0=E6=8D=AEbug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcal/impl/IndexCalculateStreetServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java index 552efefa9d..8c0bcf7484 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java @@ -893,8 +893,9 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ subAvgResultDTOS.forEach(sub -> { finalScore.set(finalScore.get().add(sub.getScore())); }); - BigDecimal divide = finalScore.get().divide(new BigDecimal(subAvgResultDTOS.size())); + BigDecimal divide = finalScore.get().divide(new BigDecimal(subAvgResultDTOS.size()),NumConstant.SIX,BigDecimal.ROUND_HALF_UP); subAvgScores.forEach(s -> { + // 孔村单独处理 if (s.getAgencyId().equals("1234085031077498881")){ s.setScore(divide); } From 82a23663c12735615d3eb4904c4b2591ea79ec47 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 1 Apr 2021 10:49:06 +0800 Subject: [PATCH 348/375] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extract/toscreen/impl/PublicPartExtractServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java index aa8c4728dc..92bb8def5d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java @@ -103,12 +103,12 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService { //获取议题月份增量 List issueTotal = factIssueGridMonthlyService.getIssueIncCountAndTotalByMonthId(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(issueTotal)) { - log.error("抽取【公众参与-人均议题】,获取议题增量为空,customerId:{}", formDTO.getCustomerId()); + log.error("抽取【公众参与-人均议题】,获取议题增量为空,customerId:{},monthId:{}", formDTO.getCustomerId(),formDTO.getMonthId()); return; } List userCountList = factRegUserGridMonthlyService.selectGridUserCount(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(userCountList)) { - log.error("抽取【公众参与-人均议题】,获取注册用户数为空,customerId:{}", formDTO.getCustomerId()); + log.error("抽取【公众参与-人均议题】,获取注册用户数为空,customerId:{},monthId:{}", formDTO.getCustomerId(),formDTO.getMonthId()); return; } Map userCountMap = userCountList.stream().collect(Collectors.toMap(GridUserCountResultDTO::getOrgId, o -> o)); @@ -143,7 +143,7 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService { //获取每个网格的应表决人数 List memberCountList = factOriginGroupMainDailyService.selectDistinctGroupMemberCount(formDTO.getCustomerId(), ProjectConstant.AGENCY_ID); if (CollectionUtils.isEmpty(memberCountList)) { - log.warn("抽取【公众参与-人均议题】,获取应表决人数为空,customerId:{}", formDTO.getCustomerId()); + log.warn("抽取【公众参与-人均议题】,获取应表决人数为空,customerId:{},monthId:{}", formDTO.getCustomerId(),formDTO.getMonthId()); return; } gridMemberCount = memberCountList.stream().collect(Collectors.toMap(GridGroupUserCountResultDTO::getOrgId, o -> o.getMemberCount())); From 863f625f2758b3f0309c6afda85d29d534257019 Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 1 Apr 2021 13:51:09 +0800 Subject: [PATCH 349/375] =?UTF-8?q?=E5=A4=84=E7=90=86=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=9F=BA=E7=A1=80=E4=BF=A1=E6=81=AF=20=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/UserBaseInfoServiceImpl.java | 5 ++++- .../service/impl/UserResiInfoServiceImpl.java | 21 ++++++++++--------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java index e779487861..f3a77c85fe 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java @@ -17,6 +17,7 @@ package com.epmet.service.impl; +import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; @@ -150,7 +151,9 @@ public class UserBaseInfoServiceImpl extends BaseServiceImpl().ok(resultDTO); } From 1760665358e0b7c951826550cf3161ad3e6e3da8 Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 1 Apr 2021 13:59:01 +0800 Subject: [PATCH 350/375] =?UTF-8?q?=E5=A4=84=E7=90=86=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=9F=BA=E7=A1=80=E4=BF=A1=E6=81=AF=20=E6=8A=A5=E9=94=99,?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E9=BB=98=E8=AE=A4=E7=A9=BA=E5=AD=97=E7=AC=A6?= =?UTF-8?q?=E4=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/UserResiInfoServiceImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java index 31285ed293..4221d063f9 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java @@ -173,6 +173,7 @@ public class UserResiInfoServiceImpl extends BaseServiceImpl().ok(resultDTO); } From f6edba2b8339cd3d2eaf53050f36130191eee597 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 1 Apr 2021 14:22:42 +0800 Subject: [PATCH 351/375] =?UTF-8?q?=E5=B0=8F=E7=BB=84=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E7=94=9F=E6=88=90=E4=BA=8C=E7=BB=B4=E7=A0=81=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/ResiGroupServiceImpl.java | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java index 72e61b1406..4ee54bcd43 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java @@ -80,6 +80,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.support.TransactionSynchronizationAdapter; +import org.springframework.transaction.support.TransactionSynchronizationManager; import org.springframework.util.CollectionUtils; import java.text.SimpleDateFormat; @@ -570,16 +572,21 @@ public class ResiGroupServiceImpl extends BaseServiceImpl Date: Thu, 1 Apr 2021 14:49:05 +0800 Subject: [PATCH 352/375] =?UTF-8?q?=E5=A4=96=E6=8C=82=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=BF=94=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/ExtUserInfoResultDTO.java | 25 +++++++++++++++++++ .../service/impl/UserBaseInfoServiceImpl.java | 5 ++++ 2 files changed, 30 insertions(+) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ExtUserInfoResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ExtUserInfoResultDTO.java index 01f9ee8cf8..21beb87aed 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ExtUserInfoResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ExtUserInfoResultDTO.java @@ -90,6 +90,31 @@ public class ExtUserInfoResultDTO implements Serializable { */ private String gender = ""; + /** + * 街道 + */ + private String street; + + /** + * 小区名称 + */ + private String district; + + /** + * 楼栋单元 + */ + private String buildingAddress; + + /** + * 身份证号 + */ + private String idNum; + + /** + * 显示昵称 xx网格-y先生/女士 + * */ + private String showName; + /** * 用户角色列表 diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java index f3a77c85fe..42a5152325 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java @@ -377,6 +377,11 @@ public class UserBaseInfoServiceImpl extends BaseServiceImpl list = userWechatDao.selectByUserId(param.getUserId()); From 638461aea70fde3aa409867592b475609f772876 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 1 Apr 2021 15:39:22 +0800 Subject: [PATCH 353/375] =?UTF-8?q?=E8=BF=94=E5=8F=82=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/result/ExtUserInfoResultDTO.java | 6 ------ .../com/epmet/service/impl/UserBaseInfoServiceImpl.java | 1 - 2 files changed, 7 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ExtUserInfoResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ExtUserInfoResultDTO.java index 21beb87aed..23f9075d15 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ExtUserInfoResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ExtUserInfoResultDTO.java @@ -110,12 +110,6 @@ public class ExtUserInfoResultDTO implements Serializable { */ private String idNum; - /** - * 显示昵称 xx网格-y先生/女士 - * */ - private String showName; - - /** * 用户角色列表 * */ diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java index 42a5152325..c93e6fd99c 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java @@ -381,7 +381,6 @@ public class UserBaseInfoServiceImpl extends BaseServiceImpl list = userWechatDao.selectByUserId(param.getUserId()); From ec577333bf4ae247e37ef029d00547c6d7da6fd2 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 1 Apr 2021 17:27:56 +0800 Subject: [PATCH 354/375] =?UTF-8?q?httpclient=E8=AF=BB=E5=8F=96=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=B6=85=E6=97=B6=E6=97=B6=E9=97=B4=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/commons/tools/utils/HttpClientManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java index ab38563025..74809f9d30 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java @@ -65,7 +65,7 @@ public class HttpClientManager { // 连接超时时间,毫秒 private static int connectionTimeout = 5000; // 读取数据超时时间,毫秒 - private static int soTimeout = 20000; + private static int soTimeout = 45000; private static String HEADER_CONTENT_TYPE = "Content-Type"; private static String HEADER_APPLICATION_JSON = "application/json;charset=utf-8"; private static String UTF8 = "utf-8"; From 90575798dcdbaca57983c4895f2a50c39ff2a097 Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 2 Apr 2021 14:34:43 +0800 Subject: [PATCH 355/375] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E7=AC=AC=E4=B8=89?= =?UTF-8?q?=E6=96=B9token=E9=87=8D=E8=AF=952=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/apiservice/ApiService.java | 4 ++++ .../impl/LuzhouGridPlatformApiService.java | 24 ++++++++----------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java index 9980f5dbc5..f1b01dbc96 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java @@ -31,6 +31,10 @@ import java.util.concurrent.TimeUnit; * 此抽象类中定义方法的具体返回类型,所有子类都要统一使用,在具体实现中做转换。若是不需要返回,返回null即可。 */ public abstract class ApiService { + /** + * 重试次数 + */ + protected final int RETRY_TIME = 3; /** * @Description 判断该客户是否注册了该平台 diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java index d3b39f4f47..52dce2bc30 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java @@ -3,36 +3,32 @@ package com.epmet.apiservice.impl; import com.alibaba.fastjson.JSON; import com.epmet.apiservice.ApiService; import com.epmet.apiservice.result.LZGridPlatformBaseResult; -import com.epmet.apiservice.result.LZGridPlatformProjectAssistResult; -import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.RenException; -import com.epmet.commons.tools.redis.RedisKeys; import com.epmet.commons.tools.utils.HttpClientManager; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.SpringContextUtils; import com.epmet.constant.ThirdPlatformActions; import com.epmet.dao.ThirdplatformActionDao; import com.epmet.dao.ThirdplatformDao; +import com.epmet.dto.form.ProjectApplyAssistFormDTO; import com.epmet.dto.form.UploadFileFormDTO; import com.epmet.dto.result.ProjectAssistResult; -import com.epmet.dto.form.ProjectApplyAssistFormDTO; import com.epmet.dto.result.UploadFileResultDTO; import com.epmet.entity.ThirdplatformActionEntity; import com.epmet.entity.ThirdplatformEntity; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.io.FileUtils; -import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; -import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Component; import java.io.File; import java.util.HashMap; -import java.util.Objects; import java.util.concurrent.TimeUnit; /** * 泸州网格化平台ApiService */ +@Slf4j @Component("luzhouGridPlatformApiService") public class LuzhouGridPlatformApiService extends ApiService { @@ -51,13 +47,13 @@ public class LuzhouGridPlatformApiService extends ApiService { HashMap params = new HashMap<>(); params.put("appKey", platformKey); params.put("appSecret", platformSecret); - Result result = HttpClientManager.getInstance().sendGet(baseUrl.concat(actionEntity.getApiUrl()), params); - - if (result == null) { - throw new RenException("请求第三方平台,获取AccessToken失败。result为null"); - } + Result result = null; + int tryTime = 0; + do { + result = HttpClientManager.getInstance().sendGet(baseUrl.concat(actionEntity.getApiUrl()), params); + } while ((result == null || !result.success()) && super.RETRY_TIME Date: Fri, 2 Apr 2021 14:41:53 +0800 Subject: [PATCH 356/375] =?UTF-8?q?=E8=A7=A3=E5=86=B3sql=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E5=86=B2=E7=AA=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...V0.0.7__add_category_tag.sql => V0.0.11__add_category_tag.sql} | 0 ...V0.0.8__add_category_tag.sql => V0.0.12__add_category_tag.sql} | 0 ...11__alter_category_tag.sql => V0.0.13__alter_category_tag.sql} | 0 ...category_tag_field.sql => V0.0.14__del_category_tag_field.sql} | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/{V0.0.7__add_category_tag.sql => V0.0.11__add_category_tag.sql} (100%) rename epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/{V0.0.8__add_category_tag.sql => V0.0.12__add_category_tag.sql} (100%) rename epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/{V0.0.11__alter_category_tag.sql => V0.0.13__alter_category_tag.sql} (100%) rename epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/{V0.0.12__del_category_tag_field.sql => V0.0.14__del_category_tag_field.sql} (100%) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.7__add_category_tag.sql b/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.11__add_category_tag.sql similarity index 100% rename from epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.7__add_category_tag.sql rename to epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.11__add_category_tag.sql diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.8__add_category_tag.sql b/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.12__add_category_tag.sql similarity index 100% rename from epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.8__add_category_tag.sql rename to epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.12__add_category_tag.sql diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.11__alter_category_tag.sql b/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.13__alter_category_tag.sql similarity index 100% rename from epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.11__alter_category_tag.sql rename to epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.13__alter_category_tag.sql diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.12__del_category_tag_field.sql b/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.14__del_category_tag_field.sql similarity index 100% rename from epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.12__del_category_tag_field.sql rename to epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.14__del_category_tag_field.sql From 894dc584b30ba3a3cfacdabc60c60379721e7b36 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 2 Apr 2021 14:48:57 +0800 Subject: [PATCH 357/375] =?UTF-8?q?=E8=A7=A3=E5=86=B3sql=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E5=86=B2=E7=AA=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...{V0.0.5__add_category_tag.sql => V0.0.7__add_category_tag.sql} | 0 ...0.7__alter_category_tag.sql => V0.0.8__alter_category_tag.sql} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/{V0.0.5__add_category_tag.sql => V0.0.7__add_category_tag.sql} (100%) rename epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/{V0.0.7__alter_category_tag.sql => V0.0.8__alter_category_tag.sql} (100%) diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.5__add_category_tag.sql b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.7__add_category_tag.sql similarity index 100% rename from epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.5__add_category_tag.sql rename to epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.7__add_category_tag.sql diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.7__alter_category_tag.sql b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.8__alter_category_tag.sql similarity index 100% rename from epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.7__alter_category_tag.sql rename to epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.8__alter_category_tag.sql From 0d83b40532c343b36a333b259404aa66eac2a8d1 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 2 Apr 2021 16:15:41 +0800 Subject: [PATCH 358/375] =?UTF-8?q?=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extract/toscreen/impl/ScreenExtractServiceImpl.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java index e145f3e1bf..9cdd394e67 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java @@ -67,6 +67,8 @@ public class ScreenExtractServiceImpl implements ScreenExtractService { private ScreenProjectSettleService screenProjectSettleService; @Autowired private ScreenProjectCategoryGridDailyService projectCategoryGridDailyService; + @Autowired + private ScreenProjectCategoryOrgDailyService projectCategoryOrgDailyService; /** * @param extractOriginFormDTO @@ -209,6 +211,12 @@ public class ScreenExtractServiceImpl implements ScreenExtractService { }catch(Exception e){ log.error("按天统计:网格内各个分类下的项目总数,customerId为:"+customerId+"dateId为:"+dateId, e); } + // 按天统计:组织内各个分类下的项目总数 + try{ + projectCategoryOrgDailyService.extractProjectCategoryOrgData(customerId,dateId); + }catch(Exception e){ + log.error("按天统计:组织内各个分类下的项目总数,customerId为:"+customerId+"dateId为:"+dateId, e); + } log.info("===== extractDaily method end ======"); } From 7fd52560d56c7ee17b5f662d8aca68f7b61e0973 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Fri, 2 Apr 2021 17:50:02 +0800 Subject: [PATCH 359/375] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=8F=91=E9=80=81?= =?UTF-8?q?=E5=88=B0=E7=AC=AC=E4=B8=89=E6=96=B9=E5=B9=B3=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/ProjectServiceImpl.java | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index 49ce81b9c5..bebf4654b5 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -2219,6 +2219,7 @@ public class ProjectServiceImpl extends BaseServiceImpl Date: Tue, 6 Apr 2021 09:08:08 +0800 Subject: [PATCH 360/375] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=88=86=E7=B1=BBbug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/ScreenProjectCategoryGridDailyDao.xml | 4 +++- .../screen/ScreenProjectCategoryOrgDailyDao.xml | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.xml index 4bf7ba8edf..ba818db4ef 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryGridDailyDao.xml @@ -31,9 +31,11 @@ AND sca.`LEVEL` = #{level} + AND( - AND sg.GRID_ID = #{gridId} + sg.GRID_ID = #{gridId} + ) AND sg.CUSTOMER_ID = #{customerId} AND sg.DATE_ID = #{dateId} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.xml index 98b4eb7248..07b8d2f5b8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.xml @@ -48,7 +48,8 @@ WHERE 1=1 AND od.DEL_FLAG = '0' AND ( - od.CUSTOMER_ID = #{id} + + od.CUSTOMER_ID = #{id} ) From 8d10c15bcb146524111ab1a239dc97bad9cfe522 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 6 Apr 2021 09:55:34 +0800 Subject: [PATCH 361/375] =?UTF-8?q?=E8=B0=83=E7=94=A8=E7=AC=AC=E4=B8=89?= =?UTF-8?q?=E6=96=B9=E6=89=93=E5=8D=B0=E6=97=A5=E5=BF=97=EF=BC=9B=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E5=9B=9E=E8=B0=83=E5=9C=B0=E5=9D=80=20=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/apiservice/ApiService.java | 19 +++++++++++-------- .../impl/LuzhouGridPlatformApiService.java | 11 ++++++++++- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java index f1b01dbc96..36117287e1 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/ApiService.java @@ -2,10 +2,8 @@ package com.epmet.apiservice; import com.alibaba.fastjson.JSON; import com.epmet.apiservice.result.LZGridPlatformBaseResult; -import com.epmet.dto.form.UploadFileFormDTO; -import com.epmet.commons.tools.redis.RedisKeys; -import com.epmet.dto.result.ProjectAssistResult; import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.redis.RedisKeys; import com.epmet.commons.tools.utils.HttpClientManager; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.SpringContextUtils; @@ -14,10 +12,13 @@ import com.epmet.dao.ThirdplatformCustomerRegisterDao; import com.epmet.dao.ThirdplatformDao; import com.epmet.dto.form.ProjectApplyAssistFormDTO; import com.epmet.dto.form.TPFDemoFormDTO; +import com.epmet.dto.form.UploadFileFormDTO; +import com.epmet.dto.result.ProjectAssistResult; import com.epmet.dto.result.UploadFileResultDTO; import com.epmet.entity.ThirdplatformActionEntity; import com.epmet.entity.ThirdplatformCustomerRegisterEntity; import com.epmet.entity.ThirdplatformEntity; +import lombok.extern.slf4j.Slf4j; import org.springframework.data.redis.core.RedisTemplate; import java.io.File; @@ -30,6 +31,7 @@ import java.util.concurrent.TimeUnit; * 每一个具体平台的ApiService都是该抽象类的子类,选择性实现抽象类中的某些需要实现方法,提供具体业务逻辑 * 此抽象类中定义方法的具体返回类型,所有子类都要统一使用,在具体实现中做转换。若是不需要返回,返回null即可。 */ +@Slf4j public abstract class ApiService { /** * 重试次数 @@ -73,12 +75,12 @@ public abstract class ApiService { // 填充access token到头当中 headers.put("X-Access-Token", accessToken); - + log.info("apiService sendGetRequest param:{},headers:{}",params,headers); Result result = HttpClientManager.getInstance().sendGet(thirdplatform.getBaseUrl().concat(actionEntity.getApiUrl()), thirdplatform.getBaseUrl().startsWith("https://"), params, headers); - + log.info("apiService sendGetRequest result:{}",JSON.toJSONString(result)); if (result == null) { throw new RenException("请求第三方平台,获取AccessToken失败。result为null"); } @@ -113,11 +115,12 @@ public abstract class ApiService { // 填充access token到头当中 headers.put("X-Access-Token", accessToken); + log.info("apiService sendPostRequest param:{},headers:{}",jsonString,headers); Result result = HttpClientManager.getInstance().sendPost(thirdplatform.getBaseUrl().concat(actionEntity.getApiUrl()), thirdplatform.getBaseUrl().startsWith("https://"), jsonString, headers); - + log.info("apiService sendPostRequest result:{}",JSON.toJSONString(result)); if (result == null) { throw new RenException("请求第三方平台,发送Post请求失败。result为null"); } @@ -142,13 +145,13 @@ public abstract class ApiService { // 填充access token到头当中 headers.put("X-Access-Token", accessToken); - + log.info("apiService sendPostRequestToUploadFile fileName:{}",headers); Result result = HttpClientManager.getInstance().uploadFile(thirdplatform.getBaseUrl().concat(actionEntity.getApiUrl()), thirdplatform.getBaseUrl().startsWith("https://"), file, fileName, headers); - + log.info("apiService sendPostRequestToUploadFile result:{}",JSON.toJSONString(result)); if (result == null) { throw new RenException("请求第三方平台,发送Post请求失败。result为null"); } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java index 52dce2bc30..abbaad2255 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/LuzhouGridPlatformApiService.java @@ -3,6 +3,7 @@ package com.epmet.apiservice.impl; import com.alibaba.fastjson.JSON; import com.epmet.apiservice.ApiService; import com.epmet.apiservice.result.LZGridPlatformBaseResult; +import com.epmet.commons.tools.enums.EnvEnum; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.utils.HttpClientManager; import com.epmet.commons.tools.utils.Result; @@ -69,8 +70,16 @@ public class LuzhouGridPlatformApiService extends ApiService { @Override public ProjectAssistResult projectAssist(ProjectApplyAssistFormDTO formDTO) { String platformId = formDTO.getPlatformId(); + //开发环境由测试环境转发 所以 开发和本地 都使用测试环境地址 + //todo 项目回调地址 仍需要从参数中获取 + EnvEnum currentEnv = EnvEnum.getCurrentEnv(); + if (EnvEnum.PROD.getCode().equals(currentEnv.getCode())) { + formDTO.setNotifyUrl(EnvEnum.PROD.getUrl().concat("gov/project/project/platformcallback")); + } else { + formDTO.setNotifyUrl(EnvEnum.TEST.getUrl().concat("gov/project/project/platformcallback")); + } + - formDTO.setNotifyUrl("https://epmet-dev.elinkservice.cn/api/gov/project/project/platformcallback"); // 正式调用第三方平台 String argsStr = JSON.toJSONString(formDTO); From 1c47e0779aa4f0dedb90a1b405bee733f82994fb Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 6 Apr 2021 11:12:50 +0800 Subject: [PATCH 362/375] =?UTF-8?q?setCacheUserInfoWithIssue=20=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/ResiTopicServiceImpl.java | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java index fafbef7b2e..c5b81bde52 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java @@ -1190,15 +1190,17 @@ public class ResiTopicServiceImpl extends BaseServiceImpl Date: Tue, 6 Apr 2021 12:54:29 +0800 Subject: [PATCH 363/375] =?UTF-8?q?ResiGroupMemberRedis.get=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../member/dao/ResiGroupMemberDao.java | 10 ++++++++++ .../member/redis/ResiGroupMemberRedis.java | 19 +++++++++++++++---- .../service/ResiGroupMemberService.java | 10 ++++++++++ .../impl/ResiGroupMemberServiceImpl.java | 13 +++++++++++++ .../mapper/member/ResiGroupMemberDao.xml | 13 +++++++++++++ 5 files changed, 61 insertions(+), 4 deletions(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/ResiGroupMemberDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/ResiGroupMemberDao.java index b3cf2cd38f..6b2df49d00 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/ResiGroupMemberDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/ResiGroupMemberDao.java @@ -134,4 +134,14 @@ public interface ResiGroupMemberDao extends BaseDao { * @author sun */ int delByGroupAndUserId(@Param("groupId")String groupId, @Param("userId")String userId); + + /** + * @return java.util.List + * @param groupId + * @param userId + * @author yinzuomei + * @description 查询当前用户被移出群的记录,按创建时间降序 + * @Date 2021/4/6 12:50 + **/ + List queryMemberRemovedRecs(@Param("groupId")String groupId, @Param("userId")String userId); } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/redis/ResiGroupMemberRedis.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/redis/ResiGroupMemberRedis.java index 6786ea2e81..f3d5f52942 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/redis/ResiGroupMemberRedis.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/redis/ResiGroupMemberRedis.java @@ -19,7 +19,6 @@ package com.epmet.modules.member.redis; import cn.hutool.core.bean.BeanUtil; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.redis.RedisUtils; import com.epmet.commons.tools.utils.ConvertUtils; @@ -32,10 +31,10 @@ import com.epmet.modules.feign.EpmetUserFeignClient; import com.epmet.modules.group.service.ResiGroupService; import com.epmet.modules.member.service.ResiGroupMemberService; import com.epmet.modules.utils.ModuleConstant; -import com.epmet.resi.group.constant.TopicConstant; import com.epmet.resi.group.dto.member.ResiGroupMemberDTO; import com.epmet.resi.group.dto.member.ResiGroupMemberInfoRedisDTO; import com.epmet.resi.group.dto.member.result.ResiGroupMemberInfoRedisResultDTO; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -99,11 +98,23 @@ public class ResiGroupMemberRedis { (ResiGroupMemberInfoRedisDTO) redisUtils.get(ResiGroupRedisKeys.getResiGroupMemberInfoKey(groupId,userId)); //如果缓存中没有该成员数据 if(null == memberCache || StringUtils.isBlank(memberCache.getUserId())){ - Map param = new HashMap<>(); + /*Map param = new HashMap<>(); param.put(TopicConstant.CUSTOMER_USER_ID,userId); param.put(TopicConstant.RESI_GROUP_ID,groupId); param.put(FieldConstant.DEL_FLAG, NumConstant.ZERO_STR); - List memberList = memberService.list(param); + List memberList = memberService.list(param);*/ + List memberList=new ArrayList<>(); + ResiGroupMemberDTO resiGroupMemberDTO=memberService.getResiGroupMember(groupId,userId); + if (null == resiGroupMemberDTO) { + //查询组员被移除的记录 + List delMemberList = memberService.queryMemberRemovedRecs(groupId, userId); + if (CollectionUtils.isNotEmpty(delMemberList)) { + logger.warn(String.format("groupId=%s,userId=%s,组员已被删除", groupId, userId)); + memberList.add(delMemberList.get(NumConstant.ZERO)); + } + }else{ + memberList.add(resiGroupMemberDTO); + } if(null != memberList && memberList.size() >= 1){ if(memberList.size() > 1) { memberList.sort(Comparator.comparing(ResiGroupMemberDTO::getCreatedTime, Collections.reverseOrder())); diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/ResiGroupMemberService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/ResiGroupMemberService.java index 522be90e6a..5a9563141b 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/ResiGroupMemberService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/ResiGroupMemberService.java @@ -215,4 +215,14 @@ public interface ResiGroupMemberService extends BaseService + * @param groupId + * @param userId + * @author yinzuomei + * @description 查询当前用户被移出群的记录,按创建时间降序 + * @Date 2021/4/6 12:48 + **/ + List queryMemberRemovedRecs(String groupId, String userId); } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/ResiGroupMemberServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/ResiGroupMemberServiceImpl.java index c566a5ec94..7fd7e48259 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/ResiGroupMemberServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/ResiGroupMemberServiceImpl.java @@ -326,6 +326,19 @@ public class ResiGroupMemberServiceImpl extends BaseServiceImpl + * @author yinzuomei + * @description 查询当前用户被移出群的记录,按创建时间降序 + * @Date 2021/4/6 12:48 + **/ + @Override + public List queryMemberRemovedRecs(String groupId, String userId) { + return baseDao.queryMemberRemovedRecs(groupId,userId); + } + /** * @param groupMemberListFormDTO * @return com.epmet.commons.tools.utils.Result diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/ResiGroupMemberDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/ResiGroupMemberDao.xml index 6fb5735ffe..183de49bad 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/ResiGroupMemberDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/ResiGroupMemberDao.xml @@ -178,4 +178,17 @@ LIMIT 1 + From 0441b84afa14fc427405250f8632249f3379fd8d Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 6 Apr 2021 13:07:48 +0800 Subject: [PATCH 364/375] =?UTF-8?q?=E8=AF=84=E8=AE=BA=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ResiTopicCommentServiceImpl.java | 20 ++++++++++--------- .../service/impl/ResiTopicServiceImpl.java | 20 ++++++++++--------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicCommentServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicCommentServiceImpl.java index ed76255ad1..f7c7f95d0e 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicCommentServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicCommentServiceImpl.java @@ -391,15 +391,17 @@ public class ResiTopicCommentServiceImpl extends BaseServiceImpl Date: Tue, 6 Apr 2021 14:18:51 +0800 Subject: [PATCH 365/375] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=8F=91=E9=80=81?= =?UTF-8?q?=E5=88=B0=E7=AC=AC=E4=B8=89=E6=96=B9=E5=B9=B3=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/ProjectServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index bebf4654b5..251e86ec57 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -2181,12 +2181,12 @@ public class ProjectServiceImpl extends BaseServiceImpl issueDetail = govIssueOpenFeignClient.votingissuedetail(issueDetailFormDTO); - if (!issueDetail.success()) { + if (!issueDetail.success() || null == issueDetail.getData()) { throw new RenException(issueDetail.getCode(), issueDetail.getMsg()); } //获取话题详情 Result topic = resiGroupOpenFeignClient.getTopicById(issueDetail.getData().getTopicInfo().getTopicId()); - if (!topic.success()) { + if (!topic.success() || null == topic.getData()) { throw new RenException(topic.getCode(), topic.getMsg()); } applyAssistFormDTO.setLatitude(topic.getData().getDimension()); @@ -2198,7 +2198,7 @@ public class ProjectServiceImpl extends BaseServiceImpl topicAttachment = resiGroupOpenFeignClient.topicAttachmentList(topicAttachmentFormDTO); - if (!topicAttachment.success()) { + if (!topicAttachment.success() || null == topicAttachment.getData()) { throw new RenException(topicAttachment.getCode(), topicAttachment.getMsg()); } if (CollectionUtils.isNotEmpty(issueDetail.getData().getTopicInfo().getPhotoList())) { From e1bbddcde29aad05b3020a0c5b1291dc104575c3 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 7 Apr 2021 13:50:29 +0800 Subject: [PATCH 366/375] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/{V0.0.8__platform.sql => V0.0.10__platform.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/{V0.0.8__platform.sql => V0.0.10__platform.sql} (100%) diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.8__platform.sql b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.10__platform.sql similarity index 100% rename from epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.8__platform.sql rename to epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.10__platform.sql From 19e8c3e9e8211949fc44935d3a369467bfd6b23c Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 7 Apr 2021 17:22:22 +0800 Subject: [PATCH 367/375] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/plugins/form/VoluntaryServiceTrendFormDTO.java | 2 +- .../java/com/epmet/plugins/form/WorkRecordRankFormDTO.java | 2 +- .../plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java | 3 ++- .../resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml | 2 ++ 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/form/VoluntaryServiceTrendFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/form/VoluntaryServiceTrendFormDTO.java index 63fdbc4571..037c0d895a 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/form/VoluntaryServiceTrendFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/form/VoluntaryServiceTrendFormDTO.java @@ -18,7 +18,7 @@ public class VoluntaryServiceTrendFormDTO { @NotBlank(message = "agencyId不能为空") private String agencyId; - @NotBlank(message = "目前只有平阴在传,默认赋值:370124") + // @NotBlank(message = "目前只有平阴在传,默认赋值:370124") private String areaCode; @NotBlank(message = "customerId不能为空") diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/form/WorkRecordRankFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/form/WorkRecordRankFormDTO.java index a4e5e0b9f4..7460a1a9ed 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/form/WorkRecordRankFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/plugins/form/WorkRecordRankFormDTO.java @@ -36,6 +36,6 @@ public class WorkRecordRankFormDTO implements Serializable { @NotBlank(message = "customerId不能为空") private String customerId; - @NotBlank(message = "areaCode不能为空,目前只有平阴在传,默认赋值:370124") + // @NotBlank(message = "areaCode不能为空,目前只有平阴在传,默认赋值:370124") private String areaCode; } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java index d55fbf927a..c6d37bc8a3 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java @@ -253,8 +253,9 @@ public class ScreenWorkRecordOrgDailyServiceImpl extends BaseServiceImpl monthIdList = com.epmet.commons.tools.utils.DateUtils.getMonthIdList(formDTO.getEndMonthId(), NumConstant.ELEVEN); - // log.info(JSON.toJSONString(monthIdList)); + log.info(JSON.toJSONString(monthIdList)); AgencyInfoDTO agencyInfoDTO = agencyService.getAgencyInfoDTO(formDTO.getAreaCode(), formDTO.getAgencyId()); List orgIds = new ArrayList<>(); diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml index 9bbe13d732..6a87be93da 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml @@ -28,6 +28,7 @@ AND sw.month_id >= #{startMonth} AND sw.month_id #{endMonth} AND wrd.data_type = #{dataType} + and sw.CUSTOMER_ID=#{customerId} GROUP BY sw.month_id,sw.meeting_code ORDER BY @@ -43,6 +44,7 @@ FROM screen_work_record_org_monthly m WHERE m.DEL_FLAG = '0' + and m.CUSTOMER_ID=#{customerId} AND m.TYPE_CODE =( SELECT dict.RESOURCE_CODE From d22fc97262aaa1813880a5b449bea79665f1d257 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 7 Apr 2021 17:50:13 +0800 Subject: [PATCH 368/375] =?UTF-8?q?=E8=A7=A3=E5=86=B3--6=E3=80=81=E3=80=90?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=97=A5=E5=BF=97=E3=80=91=E6=94=AF=E9=83=A8?= =?UTF-8?q?=E5=BB=BA=E8=AE=BE=E3=80=81=E8=81=94=E5=BB=BA=E5=85=B1=E5=BB=BA?= =?UTF-8?q?=E8=BF=9112=E6=9C=88=E8=B6=8B=E5=8A=BF=E5=9B=BE--=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=BF=94=E5=9B=9E=E6=A8=AA=E5=9D=90=E6=A0=87=E5=8C=85?= =?UTF-8?q?=E5=90=AB=E5=BD=93=E5=89=8D=E6=9C=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ScreenWorkRecordOrgDailyServiceImpl.java | 2 +- .../com/epmet/datareport/utils/DateUtils.java | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java index c6d37bc8a3..74bba067cd 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java @@ -205,7 +205,7 @@ public class ScreenWorkRecordOrgDailyServiceImpl extends BaseServiceImpl map = dateUtils.getXpro(); + Map map = dateUtils.getXproSub(); resultDTO.setXAxis(map.values().stream().collect(Collectors.toList())); List monthIdList = map.keySet().stream().collect(Collectors.toList()); diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/utils/DateUtils.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/utils/DateUtils.java index 62356ad9f5..bfc46d03bd 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/utils/DateUtils.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/utils/DateUtils.java @@ -75,6 +75,21 @@ public class DateUtils { return result; } + public Map getXproSub(){ + Map xAxis = new HashMap<>(); + LocalDate today = LocalDate.now(); + + for(int i = NumConstant.TWELVE;i > NumConstant.ZERO; i--){ + LocalDate localDate = today.minusMonths(i); + String s = localDate.getMonth().getValue() + "月"; + xAxis.put(localDate.format(fmt),s); + } + Map result = Maps.newLinkedHashMap(); + xAxis.entrySet().stream().sorted(Map.Entry.comparingByKey()) + .forEachOrdered((e -> result.put(e.getKey(),e.getValue()))); + return result; + } + public Map getXproEndMonth(String monthId){ Map xAxis = new HashMap<>(); for(int i=NumConstant.ZERO;i <= NumConstant.ELEVEN; i++){ From fef02103bae4756ad46b55382fd3916712bc4b38 Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 7 Apr 2021 18:05:06 +0800 Subject: [PATCH 369/375] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=A1=A8=E6=8F=8F?= =?UTF-8?q?=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/db/migration/V0.0.13__addPlatformDDLS.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/db/migration/V0.0.13__addPlatformDDLS.sql b/epmet-module/epmet-third/epmet-third-server/src/main/resources/db/migration/V0.0.13__addPlatformDDLS.sql index c8dfb5e614..9cbbcb3c89 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/resources/db/migration/V0.0.13__addPlatformDDLS.sql +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/db/migration/V0.0.13__addPlatformDDLS.sql @@ -13,7 +13,7 @@ CREATE TABLE `thirdplatform` ( `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', PRIMARY KEY (`ID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='平台列表'; CREATE TABLE `thirdplatform_customer_action` ( @@ -44,7 +44,7 @@ CREATE TABLE `thirdplatform_customer_register` ( `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', PRIMARY KEY (`ID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='客户接入的平台列表'; CREATE TABLE `thirdplatform_action` ( `ID` varchar(64) NOT NULL, @@ -58,4 +58,4 @@ CREATE TABLE `thirdplatform_action` ( `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', PRIMARY KEY (`ID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 \ No newline at end of file +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='平台功能列表' From fd08a6f32bafddd29399d01c7495fb1c9509de7a Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 8 Apr 2021 11:27:37 +0800 Subject: [PATCH 370/375] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ScreenWorkRecordOrgDailyServiceImpl.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java index 74bba067cd..09336cf37f 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java @@ -210,12 +210,15 @@ public class ScreenWorkRecordOrgDailyServiceImpl extends BaseServiceImpl monthIdList = map.keySet().stream().collect(Collectors.toList()); //3-1.查询当前组织及所有下级过去12个月份某项数据所有资源的统计数据 - DateTimeFormatter fmt = DateTimeFormatter.ofPattern("yyyyMM"); - LocalDate today = LocalDate.now(); - formDTO.setStartMonth(today.minusMonths(NumConstant.THIRTEEN).format(fmt)); - formDTO.setEndMonth(today.minusMonths(NumConstant.ONE).format(fmt)); + formDTO.setStartMonth(monthIdList.get(NumConstant.ZERO)); + formDTO.setEndMonth(monthIdList.get(NumConstant.ELEVEN)); List list = screenWorkRecordOrgMonthlyDao.selectMonthList(formDTO); + /*log.info("legendList:"+ JSON.toJSONString(legendList,true)); + log.info("xAxis:"+JSON.toJSONString(resultDTO.getXAxis(),true)); + log.info("monthIdList:"+JSON.toJSONString(monthIdList,true)); + log.info("startMonth:"+formDTO.getStartMonth()+";endMonth="+formDTO.getEndMonth());*/ + //3-2.遍历封装数据并返回 LinkedList seriesList = new LinkedList<>(); //按资源类型封装每一个资源类型对应的过去12个月的汇总数据,某个月份没有数据的补0 From 74bab40993b6e7a13a5c54e493b08767d86cce67 Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 8 Apr 2021 17:11:46 +0800 Subject: [PATCH 371/375] =?UTF-8?q?=E6=97=A5=E5=BF=97=E7=BA=A7=E5=88=AB?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java b/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java index d6921d0b8f..8a87bf935b 100644 --- a/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java +++ b/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java @@ -400,7 +400,7 @@ public class ThirdLoginServiceImpl implements ThirdLoginService { //0、验证码是否正确 String rightSmsCode = captchaRedis.getSmsCode(formDTO.getMobile()); if (!formDTO.getSmsCode().equals(rightSmsCode)) { - logger.error(String.format("验证码错误code[%s],msg[%s]",EpmetErrorCode.MOBILE_CODE_ERROR.getCode(),EpmetErrorCode.MOBILE_CODE_ERROR.getMsg())); + logger.warn(String.format("验证码错误code[%s],msg[%s]",EpmetErrorCode.MOBILE_CODE_ERROR.getCode(),EpmetErrorCode.MOBILE_CODE_ERROR.getMsg())); throw new RenException(EpmetErrorCode.MOBILE_CODE_ERROR.getCode()); } //1.根据appId查询对应客户Id From fcd2092c7317778fedbc19e629dc8f6df781d72d Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 8 Apr 2021 17:33:12 +0800 Subject: [PATCH 372/375] =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=EF=BC=8C=E5=BD=93=E5=89=8D=E7=94=A8=E6=88=B7=EF=BC=8C=E5=9C=A8?= =?UTF-8?q?=E5=BD=93=E5=89=8D=E5=AE=A2=E6=88=B7=E4=B8=8B=E8=AE=BF=E9=97=AE?= =?UTF-8?q?=E8=BF=87=E7=9A=84=E7=BD=91=E6=A0=BCbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/modules/feign/EpmetUserFeignClient.java | 7 ++----- .../feign/fallback/EpmetUserFeignClientFallBack.java | 4 ++-- .../modules/grid/controller/ResiMineGridController.java | 2 +- .../epmet/modules/grid/service/ResiMineGridService.java | 2 +- .../modules/grid/service/impl/ResiMineGridServiceImpl.java | 4 ++-- .../java/com/epmet/controller/GridLatestController.java | 4 ++-- .../src/main/java/com/epmet/dao/GridLatestDao.java | 2 +- .../src/main/java/com/epmet/service/GridLatestService.java | 2 +- .../java/com/epmet/service/impl/GridLatestServiceImpl.java | 4 ++-- .../src/main/resources/mapper/GridLatestDao.xml | 1 + 10 files changed, 15 insertions(+), 17 deletions(-) diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/feign/EpmetUserFeignClient.java b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/feign/EpmetUserFeignClient.java index 985b869cc8..1f09936352 100644 --- a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/feign/EpmetUserFeignClient.java +++ b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/feign/EpmetUserFeignClient.java @@ -11,10 +11,7 @@ import com.epmet.modules.feign.fallback.EpmetUserFeignClientFallBack; import com.epmet.resi.mine.dto.from.MyResiUserInfoFormDTO; import com.epmet.resi.mine.dto.result.MyResiUserInfoResultDTO; import org.springframework.cloud.openfeign.FeignClient; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.*; import java.util.List; @@ -64,7 +61,7 @@ public interface EpmetUserFeignClient { * @Author sun **/ @PostMapping(value = "epmetuser/gridlatest/getgridsbyuserid/{userId}") - Result> getGridsByUserId(@PathVariable("userId") String userId); + Result> getGridsByUserId(@PathVariable("userId") String userId,@RequestParam("customerId") String customerId); /** * @Description 居民端获取个人信息 diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/feign/fallback/EpmetUserFeignClientFallBack.java b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/feign/fallback/EpmetUserFeignClientFallBack.java index d4e41a1bf7..781cf39d24 100644 --- a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/feign/fallback/EpmetUserFeignClientFallBack.java +++ b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/feign/fallback/EpmetUserFeignClientFallBack.java @@ -72,8 +72,8 @@ public class EpmetUserFeignClientFallBack implements EpmetUserFeignClient { * @Author sun **/ @Override - public Result> getGridsByUserId(String userId) { - return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getGridsByUserId", userId); + public Result> getGridsByUserId(String userId,String customerId) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getGridsByUserId", userId,customerId); } /** diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/grid/controller/ResiMineGridController.java b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/grid/controller/ResiMineGridController.java index 7ea7b24f3d..606d4d9d44 100644 --- a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/grid/controller/ResiMineGridController.java +++ b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/grid/controller/ResiMineGridController.java @@ -45,7 +45,7 @@ public class ResiMineGridController { **/ @PostMapping("allgrids") public Result> allGrids(@LoginUser TokenDto tokenDto){ - return resiMineGridService.allGrids(tokenDto.getUserId()); + return resiMineGridService.allGrids(tokenDto.getUserId(),tokenDto.getCustomerId()); } /** diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/grid/service/ResiMineGridService.java b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/grid/service/ResiMineGridService.java index e6d8a70398..994f21fa31 100644 --- a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/grid/service/ResiMineGridService.java +++ b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/grid/service/ResiMineGridService.java @@ -29,7 +29,7 @@ public interface ResiMineGridService { * @Description 获取用户访问过的所有网格列表 * @Author sun **/ - Result> allGrids(String userId); + Result> allGrids(String userId,String customerId); /** * @return diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/grid/service/impl/ResiMineGridServiceImpl.java b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/grid/service/impl/ResiMineGridServiceImpl.java index 455b7c0cbf..de5e28a457 100644 --- a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/grid/service/impl/ResiMineGridServiceImpl.java +++ b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/grid/service/impl/ResiMineGridServiceImpl.java @@ -76,10 +76,10 @@ public class ResiMineGridServiceImpl implements ResiMineGridService { * @Author sun **/ @Override - public Result> allGrids(String userId) { + public Result> allGrids(String userId,String customerId) { Result> result = new Result>(); //1:调用epmet-user服务,根据用户Id查询用户访问过的网格列表Id集合 - Result> resultGridIds = epmetUserFeignClient.getGridsByUserId(userId); + Result> resultGridIds = epmetUserFeignClient.getGridsByUserId(userId,customerId); if (!resultGridIds.success()) { throw new RenException(ModuleConstant.SELECT_EXCEPTION); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GridLatestController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GridLatestController.java index ba8fd626ce..c470d793a9 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GridLatestController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GridLatestController.java @@ -114,8 +114,8 @@ public class GridLatestController { * @Author sun **/ @PostMapping("getgridsbyuserid/{userId}") - public Result> getGridsByUserId(@PathVariable("userId") String userId){ - return gridLatestService.getGridsByUserId(userId); + public Result> getGridsByUserId(@PathVariable("userId") String userId,@RequestParam("customerId") String customerId){ + return gridLatestService.getGridsByUserId(userId,customerId); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/GridLatestDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/GridLatestDao.java index 84450fc6f1..979ac85a5f 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/GridLatestDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/GridLatestDao.java @@ -55,7 +55,7 @@ public interface GridLatestDao extends BaseDao { * @Description 根据用户Id查询用户访问过的网格列表Id集合 * @Author sun **/ - List selectAllGridsByUserId(@Param("userId") String userId); + List selectAllGridsByUserId(@Param("userId") String userId,@Param("customerId") String customerId); /** * @Description 查询一个客户下的所有用户:注册居民、陌生人 diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GridLatestService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GridLatestService.java index 1395099c22..e9ff239d1e 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GridLatestService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GridLatestService.java @@ -121,7 +121,7 @@ public interface GridLatestService extends BaseService { * @Description 根据用户Id查询用户访问过的网格列表Id集合 * @Author sun **/ - Result> getGridsByUserId(String userId); + Result> getGridsByUserId(String userId,String customerId); /** * @Description 查询客户下所有用户包括陌生人 diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java index c18e91c05d..e25a4600eb 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java @@ -176,8 +176,8 @@ public class GridLatestServiceImpl extends BaseServiceImpl> getGridsByUserId(String userId) { - List gridList = baseDao.selectAllGridsByUserId(userId); + public Result> getGridsByUserId(String userId,String customerId) { + List gridList = baseDao.selectAllGridsByUserId(userId,customerId); return new Result>().ok(gridList); } diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/GridLatestDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/GridLatestDao.xml index 52887827e6..911c243bc8 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/GridLatestDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/GridLatestDao.xml @@ -80,6 +80,7 @@ WHERE del_flag = '0' AND customer_user_id = #{userId} + AND CUSTOMER_ID = #{customerId} ORDER BY latest_time DESC From 894dd33d5d94f5984c99973a627c3ba8bb9dda16 Mon Sep 17 00:00:00 2001 From: wxz Date: Fri, 9 Apr 2021 09:57:24 +0800 Subject: [PATCH 373/375] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E6=A0=A1=E9=AA=8C=EF=BC=8C=E6=89=93=E5=8D=B0error?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E6=89=93=E5=8D=B0warn?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/commons/tools/aspect/BaseRequestLogAspect.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/BaseRequestLogAspect.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/BaseRequestLogAspect.java index 4b3496ee36..38a70d6582 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/BaseRequestLogAspect.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/BaseRequestLogAspect.java @@ -77,7 +77,7 @@ public abstract class BaseRequestLogAspect { return result; } catch (ValidateException e) { result = handleValidateException(e); - resultErrorLog(transactionSerial, getExecPeriod(startTime), result, e.getMsg(), ExceptionUtils.getErrorStackTrace(e)); + resultWarnLog(transactionSerial, getExecPeriod(startTime), result, e.getMsg(), ExceptionUtils.getErrorStackTrace(e)); } catch (DuplicateKeyException e) { result = handlerDuplicateKeyException(e); resultErrorLog(transactionSerial, getExecPeriod(startTime), result, e.getMessage(), ExceptionUtils.getErrorStackTrace(e)); From 6ceb2eca4927f3844e145e4ee7b9e8db5feb453e Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Fri, 9 Apr 2021 14:30:56 +0800 Subject: [PATCH 374/375] =?UTF-8?q?=E7=AC=AC=E4=B8=89=E6=96=B9=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0-=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/ThirdPlatformDTO.java | 57 +++++++++ .../com/epmet/dto/form/CustomerFormDTO.java | 18 +++ .../epmet/dto/form/PlatformNameFormDTO.java | 15 +++ .../dto/form/PlatformRegisterFormDTO.java | 29 +++++ .../dto/form/PlatformUnregisterFormDTO.java | 27 ++++ .../controller/ThirdPlatformController.java | 118 +++++++++++++++++- .../dao/ThirdplatformCustomerRegisterDao.java | 26 +++- .../java/com/epmet/dao/ThirdplatformDao.java | 47 ++++++- .../epmet/service/ThirdPlatformService.java | 80 +++++++++++- .../impl/ThirdPlatformServiceImpl.java | 65 +++++++++- .../ThirdplatformCustomerRegisterDao.xml | 42 ++++++- .../resources/mapper/ThirdplatformDao.xml | 67 +++++++++- 12 files changed, 576 insertions(+), 15 deletions(-) create mode 100644 epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/ThirdPlatformDTO.java create mode 100644 epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/CustomerFormDTO.java create mode 100644 epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/PlatformNameFormDTO.java create mode 100644 epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/PlatformRegisterFormDTO.java create mode 100644 epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/PlatformUnregisterFormDTO.java diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/ThirdPlatformDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/ThirdPlatformDTO.java new file mode 100644 index 0000000000..7a8efc43cd --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/ThirdPlatformDTO.java @@ -0,0 +1,57 @@ +package com.epmet.dto; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @auther: zhangyong + * @date: 2021-04-08 17:27 + */ +@Data +public class ThirdPlatformDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 平台名称 + */ + @NotBlank(message = "平台名称 不能为空") + private String platformName; + + /** + * 平台唯一KEY + */ + @NotBlank(message = "平台唯一KEY 不能为空") + private String platformKey; + + /** + * 平台秘钥 + */ + @NotBlank(message = "平台秘钥 不能为空") + private String platformSecret; + + /** + * apiservice + */ + @NotBlank(message = "apiservice 不能为空") + private String apiService; + + /** + * 基础url + */ + @NotBlank(message = "基础url 不能为空") + private String baseUrl; + + /** + * icon + */ + @NotBlank(message = "icon 不能为空") + private String icon; +} diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/CustomerFormDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/CustomerFormDTO.java new file mode 100644 index 0000000000..d2defb259d --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/CustomerFormDTO.java @@ -0,0 +1,18 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * 客户 共用入参 + **/ +@Data +public class CustomerFormDTO { + + /** + * 客户id + **/ + @NotBlank(message = "客户id 不能为空") + private String customerId; +} diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/PlatformNameFormDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/PlatformNameFormDTO.java new file mode 100644 index 0000000000..2fe4f8ed45 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/PlatformNameFormDTO.java @@ -0,0 +1,15 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +@Data +public class PlatformNameFormDTO { + + /** + * 平台名称,用于模糊搜索 + **/ + @NotBlank(message = "平台名称 不能为空") + private String platformName; +} diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/PlatformRegisterFormDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/PlatformRegisterFormDTO.java new file mode 100644 index 0000000000..9f7afda3ae --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/PlatformRegisterFormDTO.java @@ -0,0 +1,29 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.util.List; + +/** + * 第三方平台-新增客户接入的第三方平台 + * + * @auther: zhangyong + * @date: 2021-04-08 17:27 + */ +@Data +public class PlatformRegisterFormDTO { + + /** + * 客户id + */ + @NotBlank(message = "客户id 不能为空") + private String customerId; + + /** + * 平台id列表 + */ + @NotNull(message = "平台id列表 不能为空") + private List platformIdList; +} diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/PlatformUnregisterFormDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/PlatformUnregisterFormDTO.java new file mode 100644 index 0000000000..04cc64ae77 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/PlatformUnregisterFormDTO.java @@ -0,0 +1,27 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * 解除客户接入的平台 + * + * @auther: zhangyong + * @date: 2021-04-08 17:27 + */ +@Data +public class PlatformUnregisterFormDTO { + + /** + * 客户id + */ + @NotBlank(message = "客户id 不能为空") + private String customerId; + + /** + * 平台ID + */ + @NotBlank(message = "平台ID 不能为空") + private String platformId; +} diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ThirdPlatformController.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ThirdPlatformController.java index f0bdb4d5ab..1ddf6cbc40 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ThirdPlatformController.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ThirdPlatformController.java @@ -1,11 +1,14 @@ package com.epmet.controller; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.dto.form.SaveOrUpdateCustSelPlatformFormDTO; -import com.epmet.dto.form.ThirdPlatformFormDTO; +import com.epmet.dto.ThirdPlatformDTO; +import com.epmet.dto.form.*; import com.epmet.dto.result.ThirdplatformResultDTO; import com.epmet.service.ThirdPlatformService; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -89,4 +92,115 @@ public class ThirdPlatformController { thirdPlatformService.saveOrUpdateSelectedPlatformInfo(input.getCustomerId(), input.getActionKey(), input.getPlatforms()); return new Result(); } + + /** + * 第三方平台-平台列表模糊查询 + * + * @param formsDTO + * @return com.epmet.commons.tools.utils.Result> + * @Author zhangyong + * @Date 17:13 2021-04-08 + **/ + @PostMapping("list-platforms") + public Result> listPlatforms(@RequestBody PlatformNameFormDTO formsDTO) { + ValidatorUtils.validateEntity(formsDTO); + return new Result>().ok(thirdPlatformService.listPlatforms(formsDTO.getPlatformName())); + } + + /** + * 第三方平台-修改平台 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 17:31 2021-04-08 + **/ + @PostMapping("update-platform") + public Result updatePlatform(@RequestBody ThirdPlatformDTO formDTO) { + ValidatorUtils.validateEntity(formDTO); + if (StringUtils.isBlank(formDTO.getId())) { + throw new RenException("主键不能为空"); + } + thirdPlatformService.updatePlatform(formDTO); + return new Result(); + } + + /** + * 第三方平台-新增平台 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 17:31 2021-04-08 + **/ + @PostMapping("add-platform") + public Result addPlatform(@RequestBody ThirdPlatformDTO formDTO) { + ValidatorUtils.validateEntity(formDTO); + return new Result().ok(thirdPlatformService.addPlatform(formDTO)); + } + + /** + * 第三方平台-客户可接入的平台列表 + * 注:该客户还没有注册的平台列表。从thirdplatform表中找该客户没注册的(不在thirdplatform_customer_register中,或者在其中,但是del_flag为1的)返回 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result> + * @Author zhangyong + * @Date 09:46 2021-04-09 + **/ + @PostMapping("customer/registrable-platform-list") + public Result> registrablePlatformList(@RequestBody CustomerFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO); + return new Result>().ok(thirdPlatformService.listRegistrablePlatform(formDTO)); + } + + /** + * 第三方平台-客户已经接入的平台列表 + * 注:在thirdplatform_customer_register中的记录 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result> + * @Author zhangyong + * @Date 09:46 2021-04-09 + **/ + @PostMapping("customer/registered-platform-list") + public Result> registeredPlatformList(@RequestBody CustomerFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO); + return new Result>().ok(thirdPlatformService.listRegisteredPlatform(formDTO)); + } + + /** + * 第三方平台-解除客户接入的平台 + * 注:单个解除thirdplatform_customer_register表del_flag状态置为1 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 09:46 2021-04-09 + **/ + @PostMapping("customer/unregister-platform") + public Result unregisterPlatform(@RequestBody PlatformUnregisterFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO); + thirdPlatformService.unregisterPlatformCustomer(formDTO); + return new Result(); + } + + /** + * 第三方平台-新增客户接入的第三方平台 + * 注:新增该客户要接入的第三方平台。thirdplatform_customer_register表新增数据。customized_xxx默认从thirdplatform表取过来 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:34 2021-04-09 + **/ + @PostMapping("customer/register-platform") + public Result registerPlatform(@RequestBody PlatformRegisterFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO); + if (formDTO.getPlatformIdList().size() == NumConstant.ZERO) { + throw new RenException("formDTO.getPlatformIdList().size() == 0;平台id列表不能为空"); + } + thirdPlatformService.registerThirdPlatformCustomer(formDTO); + return new Result(); + } } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformCustomerRegisterDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformCustomerRegisterDao.java index cbae094292..3dc3001baf 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformCustomerRegisterDao.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformCustomerRegisterDao.java @@ -18,7 +18,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.dto.result.ThirdplatformResultDTO; +import com.epmet.dto.form.PlatformUnregisterFormDTO; import com.epmet.entity.ThirdplatformCustomerRegisterEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -26,7 +26,7 @@ import org.apache.ibatis.annotations.Param; import java.util.List; /** - * + * * * @author generator generator@elink-cn.com * @since v1.0.0 2021-03-15 @@ -35,4 +35,24 @@ import java.util.List; public interface ThirdplatformCustomerRegisterDao extends BaseDao { ThirdplatformCustomerRegisterEntity getByCustomerIdAndPlatformId(@Param("customerId") String customerId, @Param("platformId") String platformId); -} \ No newline at end of file + + /** + * 批量新增 + * @param list + * @return int + * @Author zhangyong + * @Date 11:05 2021-04-09 + **/ + int batchInsertThirdplatformCustomerRegister(@Param("list") List list); + + /** + * 第三方平台-解除客户接入的平台 + * 注:单个解除.thirdplatform_customer_register表del_flag状态置为1 + * + * @param formDTO + * @return void + * @Author zhangyong + * @Date 10:15 2021-04-09 + **/ + void unregisterPlatformCustomer(PlatformUnregisterFormDTO formDTO); +} diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformDao.java index 8b5e7840cc..74b53823b3 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformDao.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ThirdplatformDao.java @@ -18,6 +18,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.ThirdPlatformDTO; import com.epmet.dto.result.ThirdplatformResultDTO; import com.epmet.entity.ThirdplatformEntity; import org.apache.ibatis.annotations.Mapper; @@ -26,7 +27,7 @@ import org.apache.ibatis.annotations.Param; import java.util.List; /** - * + * * * @author generator generator@elink-cn.com * @since v1.0.0 2021-03-15 @@ -43,4 +44,46 @@ public interface ThirdplatformDao extends BaseDao { List listAvailablePlatformsByCustomerAndAction(@Param("customerId") String customerId, @Param("actionKey") String actionKey); List listSelectableByCustomerAndActionGroup(@Param("customerId") String customerId, @Param("actionKey") String actionKey); -} \ No newline at end of file + + /** + * 第三方平台-平台列表模糊查询 + * + * @param platformName 平台名称,用于模糊搜索 + * @return java.util.List + * @Author zhangyong + * @Date 17:14 2021-04-08 + **/ + List selectListPlatforms(@Param("platformName") String platformName); + + /** + * 第三方平台-客户可接入的平台列表 + * 注:该客户还没有注册的平台列表。从thirdplatform表中找该客户没注册的(不在thirdplatform_customer_register中,或者在其中,但是del_flag为1的)返回 + * + * @param customerId + * @return java.util.List + * @Author zhangyong + * @Date 09:47 2021-04-09 + **/ + List selectListRegistrablePlatform(@Param("customerId") String customerId); + + /** + * 第三方平台-客户已经接入的平台列表 + * 注:在thirdplatform_customer_register中的记录 + * + * @param customerId + * @return java.util.List + * @Author zhangyong + * @Date 09:47 2021-04-09 + **/ + List selectListRegisteredPlatform(@Param("customerId") String customerId); + + /** + * 查询第三方平台 + * + * @param platformIds + * @return java.util.List + * @Author zhangyong + * @Date 10:51 2021-04-09 + **/ + List selectListThirdPlatform(@Param("platformIds") List platformIds); +} diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ThirdPlatformService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ThirdPlatformService.java index 9a0042f6e7..570ce04d49 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ThirdPlatformService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/ThirdPlatformService.java @@ -1,6 +1,10 @@ package com.epmet.service; +import com.epmet.dto.ThirdPlatformDTO; +import com.epmet.dto.form.CustomerFormDTO; import com.epmet.dto.form.ThirdPlatformFormDTO; +import com.epmet.dto.form.PlatformRegisterFormDTO; +import com.epmet.dto.form.PlatformUnregisterFormDTO; import com.epmet.dto.result.ThirdplatformResultDTO; import java.util.List; @@ -22,4 +26,78 @@ public interface ThirdPlatformService { void updateCustomizePlatformInfo(ThirdPlatformFormDTO input); void saveOrUpdateSelectedPlatformInfo(String customerId, String actionKey, List platforms); -} \ No newline at end of file + + /** + * 第三方平台-平台列表模糊查询 + * + * @param platformName 平台名称,用于模糊搜索 + * @return java.util.List + * @Author zhangyong + * @Date 17:14 2021-04-08 + **/ + List listPlatforms(String platformName); + + /** + * 第三方平台-修改平台 + * + * @param formDTO + * @return void + * @Author zhangyong + * @Date 17:43 2021-04-08 + **/ + void updatePlatform(ThirdPlatformDTO formDTO); + + /** + * 第三方平台-新增平台 + * + * @param formDTO + * @return com.epmet.dto.ThirdPlatformDTO + * @Author zhangyong + * @Date 17:43 2021-04-08 + **/ + ThirdPlatformDTO addPlatform(ThirdPlatformDTO formDTO); + + /** + * 第三方平台-客户可接入的平台列表 + * 注:该客户还没有注册的平台列表。从thirdplatform表中找该客户没注册的(不在thirdplatform_customer_register中,或者在其中,但是del_flag为1的)返回 + * + * @param formDTO + * @return java.util.List + * @Author zhangyong + * @Date 09:47 2021-04-09 + **/ + List listRegistrablePlatform(CustomerFormDTO formDTO); + + /** + * 第三方平台-客户已经接入的平台列表 + * 注:在thirdplatform_customer_register中的记录 + * + * @param formDTO + * @return java.util.List + * @Author zhangyong + * @Date 09:47 2021-04-09 + **/ + List listRegisteredPlatform(CustomerFormDTO formDTO); + + /** + * 第三方平台-解除客户接入的平台 + * 注:单个解除.thirdplatform_customer_register表del_flag状态置为1 + * + * @param formDTO + * @return void + * @Author zhangyong + * @Date 10:15 2021-04-09 + **/ + void unregisterPlatformCustomer(PlatformUnregisterFormDTO formDTO); + + /** + * 第三方平台-新增客户接入的第三方平台 + * 注:新增该客户要接入的第三方平台。thirdplatform_customer_register表新增数据。customized_xxx默认从thirdplatform表取过来 + * + * @param formDTO + * @return void + * @Author zhangyong + * @Date 10:15 2021-04-09 + **/ + void registerThirdPlatformCustomer(PlatformRegisterFormDTO formDTO); +} diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ThirdPlatformServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ThirdPlatformServiceImpl.java index 7e92c34223..3d6393e17e 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ThirdPlatformServiceImpl.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ThirdPlatformServiceImpl.java @@ -2,24 +2,27 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.dao.ThirdplatformCustomerActionDao; import com.epmet.dao.ThirdplatformCustomerRegisterDao; import com.epmet.dao.ThirdplatformDao; +import com.epmet.dto.ThirdPlatformDTO; +import com.epmet.dto.form.CustomerFormDTO; import com.epmet.dto.form.ThirdPlatformFormDTO; +import com.epmet.dto.form.PlatformRegisterFormDTO; +import com.epmet.dto.form.PlatformUnregisterFormDTO; import com.epmet.dto.result.ThirdplatformResultDTO; -import com.epmet.entity.ThirdplatformActionEntity; import com.epmet.entity.ThirdplatformCustomerActionEntity; import com.epmet.entity.ThirdplatformCustomerRegisterEntity; +import com.epmet.entity.ThirdplatformEntity; import com.epmet.service.ThirdPlatformService; -import jodd.util.CollectionUtil; 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.stream.Collectors; @Service public class ThirdPlatformServiceImpl implements ThirdPlatformService { @@ -105,4 +108,56 @@ public class ThirdPlatformServiceImpl implements ThirdPlatformService { entity.setCustomizedPlatformIcon(platformFormDTO.getIcon()); thirdplatformCustomerRegisterDao.update(entity, conditions); } + + @Override + public List listPlatforms(String platformName) { + return thirdplatformDao.selectListPlatforms(platformName); + } + + @Override + public void updatePlatform(ThirdPlatformDTO formDTO) { + ThirdplatformEntity entity = ConvertUtils.sourceToTarget(formDTO, ThirdplatformEntity.class); + thirdplatformDao.updateById(entity); + } + + @Override + public ThirdPlatformDTO addPlatform(ThirdPlatformDTO formDTO) { + ThirdplatformEntity entity = ConvertUtils.sourceToTarget(formDTO, ThirdplatformEntity.class); + thirdplatformDao.insert(entity); + formDTO.setId(entity.getId()); + return formDTO; + } + + @Override + public List listRegistrablePlatform(CustomerFormDTO formDTO) { + return thirdplatformDao.selectListRegistrablePlatform(formDTO.getCustomerId()); + } + + @Override + public List listRegisteredPlatform(CustomerFormDTO formDTO) { + return thirdplatformDao.selectListRegisteredPlatform(formDTO.getCustomerId()); + } + + @Override + public void unregisterPlatformCustomer(PlatformUnregisterFormDTO formDTO) { + thirdplatformCustomerRegisterDao.unregisterPlatformCustomer(formDTO); + } + + @Override + public void registerThirdPlatformCustomer(PlatformRegisterFormDTO formDTO) { + List entityList = new ArrayList<>(); + + List thirdPlatforms = thirdplatformDao.selectListThirdPlatform(formDTO.getPlatformIdList()); + for (ThirdPlatformDTO dto : thirdPlatforms) { + ThirdplatformCustomerRegisterEntity entity = new ThirdplatformCustomerRegisterEntity(); + entity.setCustomerId(formDTO.getCustomerId()); + entity.setPlatformId(dto.getId()); + entity.setCustomizedPlatformName(dto.getPlatformName()); + entity.setCustomizedPlatformIcon(dto.getIcon()); + entityList.add(entity); + } + if (entityList.size() > NumConstant.ZERO) { + thirdplatformCustomerRegisterDao.batchInsertThirdplatformCustomerRegister(entityList); + } + } } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformCustomerRegisterDao.xml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformCustomerRegisterDao.xml index e4cdddc98d..9ab368a8bc 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformCustomerRegisterDao.xml +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformCustomerRegisterDao.xml @@ -35,4 +35,44 @@ and PLATFORM_ID = #{platformId} and DEL_FLAG = 0 - \ No newline at end of file + + + insert into thirdplatform_customer_register + ( + ID, + CUSTOMER_ID, + PLATFORM_ID, + CUSTOMIZED_PLATFORM_NAME, + CUSTOMIZED_PLATFORM_ICON, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{item.customerId}, + #{item.platformId}, + #{item.customizedPlatformName}, + #{item.customizedPlatformIcon}, + '0', + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + + UPDATE thirdplatform_customer_register + SET DEL_FLAG = '1' + WHERE + DEL_FLAG = '0' + AND CUSTOMER_ID = #{customerId} AND PLATFORM_ID = #{platformId} + + diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformDao.xml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformDao.xml index beec9ed36d..e27f550f11 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformDao.xml +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/ThirdplatformDao.xml @@ -87,4 +87,69 @@ and ta.ACTION_KEY = #{actionKey} and tcr.DEL_FLAG = 0 - \ No newline at end of file + + + + + + + + + From eeee230cb086cb0f365f03687f312127d2c995d6 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 12 Apr 2021 09:34:02 +0800 Subject: [PATCH 375/375] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/AreaCodeServiceImpl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java index 5e865cfc44..f34ff30605 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java @@ -593,6 +593,7 @@ public class AreaCodeServiceImpl extends BaseServiceImpl list = childDao.selectByPCodeAndName(formDTO.getParentAreaCode().trim(), formDTO.getName().trim()); if (CollUtil.isNotEmpty(list)) { throw new RenException("name已存在");