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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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/279] =?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 + select tcr.id, + customer_id, + platform_id, + del_flag, + revision, + created_by, + created_time, + updated_by, + updated_time + from thirdplatform_customer_register tcr + where CUSTOMER_ID = #{customerId} + 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 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 342715a9f9e4d8fb175efe9f39d2677b1ef47d8e Mon Sep 17 00:00:00 2001 From: wangchao Date: Tue, 16 Mar 2021 13:58:40 +0800 Subject: [PATCH 057/279] =?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 cb6c0078ac0c314797d567125b593d0743dc3a94 Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 16 Mar 2021 15:44:26 +0800 Subject: [PATCH 058/279] =?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 47a41ed1fc1b91f792f0c81655cd06612eb3e52d Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 16 Mar 2021 16:47:32 +0800 Subject: [PATCH 059/279] =?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 060/279] =?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 061/279] =?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 062/279] =?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 41e26e774a2573954984f75fa31c856754e810b5 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Wed, 17 Mar 2021 10:13:39 +0800 Subject: [PATCH 063/279] =?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 064/279] =?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 f1fc9d552b205a6a0dd661835217085ea6928518 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Wed, 17 Mar 2021 16:31:01 +0800 Subject: [PATCH 065/279] =?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 066/279] =?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 067/279] =?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 068/279] =?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 069/279] =?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 1d16f90d3e437d1dcfdf50f1b4e7697dbcf4d382 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 18 Mar 2021 15:06:39 +0800 Subject: [PATCH 070/279] =?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 071/279] =?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 072/279] =?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 073/279] =?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 48f093e704b668011829c8533187af7e6b4a8a23 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 18 Mar 2021 16:23:53 +0800 Subject: [PATCH 074/279] =?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 077/279] =?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 078/279] =?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 079/279] =?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 080/279] =?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 081/279] =?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 082/279] =?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 083/279] =?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 084/279] =?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 087/279] =?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 088/279] =?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 089/279] =?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 090/279] =?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 091/279] =?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 092/279] =?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 093/279] =?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 094/279] =?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 095/279] =?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 097/279] =?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 098/279] =?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 099/279] =?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 100/279] =?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 101/279] =?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 102/279] =?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 103/279] =?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 104/279] =?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 105/279] =?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 106/279] =?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 107/279] =?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 108/279] =?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 109/279] =?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 94acbdfc31d3f410a710ca2ad5c4e6dfceb4f1b0 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 22 Mar 2021 17:28:23 +0800 Subject: [PATCH 110/279] =?UTF-8?q?=E5=88=86=E7=B1=BB=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/exception/EpmetErrorCode.java | 4 +- .../IssueProjectCategoryDictController.java | 9 ++-- .../java/com/epmet/dao/IssueCategoryDao.java | 7 +++ .../dao/IssueProjectCategoryDictDao.java | 15 ++++++ .../IssueProjectCategoryDictService.java | 3 +- .../IssueProjectCategoryDictServiceImpl.java | 52 ++++++++++++++++--- .../resources/mapper/IssueCategoryDao.xml | 14 +++++ .../mapper/IssueProjectCategoryDictDao.xml | 25 +++++++++ .../epmet/dto/form/DelCategoryFormDTO.java | 35 +++++++++++++ .../feign/GovProjectOpenFeignClient.java | 9 ++++ .../GovProjectOpenFeignClientFallback.java | 7 +++ .../controller/ProjectCategoryController.java | 11 ++++ .../com/epmet/dao/ProjectCategoryDao.java | 8 +++ .../epmet/service/ProjectCategoryService.java | 8 +++ .../impl/ProjectCategoryServiceImpl.java | 11 ++++ .../resources/mapper/ProjectCategoryDao.xml | 14 +++++ 16 files changed, 221 insertions(+), 11 deletions(-) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/DelCategoryFormDTO.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 d771565080..fa03a32618 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 @@ -144,7 +144,9 @@ public enum EpmetErrorCode { TOPIC_SHIFTED_TO_ISSUE_UNDER_AUDITING(9004,"当前话题正在转议题审核"), TOPIC_ALREADY_SHIFTED_TO_ISSUE(9005,"该话题已被转为议题,请勿重复操作"), TOPIC_IS_HIDDEN(9006,"该话题已被屏蔽,请先解除屏蔽"), - TOPIC_IS_CLOSED(9008,"该话题已关闭,无法转为议题"); + TOPIC_IS_CLOSED(9008,"该话题已关闭,无法转为议题"), + + CUSTOMER_CATEGORY(9101,"分类已使用,不允许删除"); private int code; private String msg; 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 cbd7c63190..484636d73f 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.DelCategoryFormDTO; import com.epmet.dto.form.IssueProjectCategoryDictListFormDTO; import com.epmet.dto.form.ProjectSaveCategoryFormDTO; import com.epmet.dto.result.CustomerCategoryListResultDTO; @@ -160,12 +161,14 @@ public class IssueProjectCategoryDictController { /** * @param formDTO * @return - * @Description 分类删除 + * @Description 分类删除【存在客户在使用时不允许删除】 * @Author sun **/ @PostMapping("delcategory") - public Result delCategory(@RequestBody ProjectSaveCategoryFormDTO formDTO) { - return new Result().ok(issueProjectCategoryDictService.delCategory(formDTO)); + public Result delCategory(@RequestBody DelCategoryFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, DelCategoryFormDTO.DelCategory.class); + issueProjectCategoryDictService.delCategory(formDTO); + return new Result(); } /** 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 c263ec1ddb..650e4ac227 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 @@ -19,6 +19,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.IssueCategoryDTO; +import com.epmet.dto.form.DelCategoryFormDTO; import com.epmet.dto.form.ProjectCategoryTagListFormDTO; import com.epmet.dto.result.IssueCategoryTagResultDTO; import com.epmet.dto.result.ProjectCategoryTagResultDTO; @@ -65,4 +66,10 @@ public interface IssueCategoryDao extends BaseDao { * @Author sun **/ void delByIssueId(@Param("issueId") String issueId); + + /** + * @Description 查询客户分类有没有被议题使用 + * @Author sun + **/ + List selectIssueList(DelCategoryFormDTO 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 1524bc1fc0..45ec49e689 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.DelCategoryFormDTO; import com.epmet.dto.form.IssueProjectCategoryDictListFormDTO; import com.epmet.dto.result.CustomerCategoryListResultDTO; import com.epmet.entity.IssueProjectCategoryDictEntity; @@ -87,4 +88,18 @@ public interface IssueProjectCategoryDictDao extends BaseDao selectListCategoryDict(@Param("customerId") String customerId, @Param("pid") String pid); + + /** + * 查询客户某个分类信息 + * @author sun + */ + IssueProjectCategoryDictDTO selectByCustomerId(@Param("customerId") String customerId, @Param("categoryId") String categoryId); + + /** + * 删除一级或二级分类,二级分类下默认有的标签不作处理 + * @author sun + */ + int delCategory(DelCategoryFormDTO 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 24e824ffff..067c0a059d 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.DelCategoryFormDTO; import com.epmet.dto.form.IssueProjectCategoryDictListFormDTO; import com.epmet.dto.form.ProjectSaveCategoryFormDTO; import com.epmet.dto.result.CustomerCategoryListResultDTO; @@ -142,7 +143,7 @@ public interface IssueProjectCategoryDictService extends BaseService implements IssueProjectCategoryDictService { + private static Logger logger = LoggerFactory.getLogger(IssueProjectCategoryDictServiceImpl.class); @Autowired private IssueProjectCategoryDictRedis issueProjectCategoryDictRedis; @Autowired @@ -69,6 +76,11 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl page(Map params) { IPage page = baseDao.selectPage( @@ -215,11 +227,39 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl issueList = issueCategoryDao.selectIssueList(formDTO); + //已使用,不允许删除 + if (null != issueList || issueList.size() > NumConstant.ZERO) { + throw new RenException(EpmetErrorCode.CUSTOMER_CATEGORY.getCode(), EpmetErrorCode.CUSTOMER_CATEGORY.getMsg()); + } + //2-2.判断项目有无使用 + Result> resultList = govProjectOpenFeignClient.getProjectCategoryList(formDTO); + if (!resultList.success()) { + throw new RenException(resultList.getCode(), resultList.getMsg()); + } + if (null != resultList.getData() || resultList.getData().size() > NumConstant.ZERO) { + throw new RenException(EpmetErrorCode.CUSTOMER_CATEGORY.getCode(), EpmetErrorCode.CUSTOMER_CATEGORY.getMsg()); + } + + //3.分类未被使用,则删除一级、二级分类,二级分类下默认有的标签不作处理 + if (baseDao.delCategory(formDTO) < NumConstant.ONE) { + logger.error(String.format("分类删除失败,客户Id->%s,分类Id->%s", formDTO.getCustomerId(), formDTO.getCategoryId())); + throw new RuntimeException("分类删除失败!"); + } + } @Override 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 ef271342d3..d5fc89045e 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 @@ -57,6 +57,20 @@ AND ISSUE_ID = #{issueId} + + 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 111/279] =?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 27dcd06da9b1cdebd8c0bd65154b7cf15f2fee4f Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 22 Mar 2021 17:48:03 +0800 Subject: [PATCH 112/279] =?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 113/279] =?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 114/279] =?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 115/279] =?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 116/279] =?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 117/279] =?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 c6e4dbcbd5420082f006e411d62879da569de138 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Tue, 23 Mar 2021 09:58:19 +0800 Subject: [PATCH 118/279] =?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 119/279] =?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 120/279] =?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 c779d674bc3c2b82d09b7e18362c882fbc958d40 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 23 Mar 2021 10:53:30 +0800 Subject: [PATCH 121/279] =?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 122/279] =?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 123/279] =?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 124/279] =?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 125/279] =?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 126/279] =?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 127/279] =?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 128/279] =?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 129/279] =?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 130/279] =?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 131/279] =?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 132/279] =?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 25f34e8c976f51162b4ff418a570153493e3c7e1 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 23 Mar 2021 16:11:44 +0800 Subject: [PATCH 133/279] =?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 134/279] =?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 135/279] =?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 136/279] =?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 17d4db86d5310cc143ebe2bf293b55dafe9cd330 Mon Sep 17 00:00:00 2001 From: wangchao Date: Tue, 23 Mar 2021 18:56:22 +0800 Subject: [PATCH 137/279] =?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 8aea84d02d2a87c25a18db54d9896addf28b9356 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 24 Mar 2021 10:25:07 +0800 Subject: [PATCH 138/279] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E8=AE=AE=E9=A2=98?= =?UTF-8?q?=E8=BD=AC=E9=A1=B9=E7=9B=AEbug=E9=97=AE=E9=A2=98?= 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 e50f3944eb..e51d824913 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 @@ -1023,6 +1023,7 @@ public class ProjectServiceImpl extends BaseServiceImpl Date: Wed, 24 Mar 2021 11:19:30 +0800 Subject: [PATCH 139/279] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E8=A1=A8=E6=B7=BB=E5=8A=A0=E5=AD=97=E6=AE=B5=20sql=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/IssueCategoryDao.xml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 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 159debdd32..f1027a6759 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 @@ -48,10 +48,12 @@ - \ 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 146/279] =?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 147/279] =?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 148/279] =?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 149/279] =?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 150/279] =?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 151/279] =?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 152/279] =?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 153/279] =?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 154/279] =?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 155/279] =?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 156/279] =?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 157/279] =?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 158/279] =?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 175/279] =?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 176/279] =?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 184/279] =?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 195/279] =?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 196/279] =?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 197/279] =?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 198/279] =?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 199/279] =?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 200/279] =?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 201/279] =?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 202/279] 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 203/279] =?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 204/279] =?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 205/279] =?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 206/279] =?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 207/279] =?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 208/279] =?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 209/279] =?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 213/279] =?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 214/279] =?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 215/279] =?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 216/279] =?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 217/279] =?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 218/279] =?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 219/279] =?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 220/279] =?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 221/279] =?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 222/279] =?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 223/279] =?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 224/279] =?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 225/279] =?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 249/279] =?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 250/279] =?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 251/279] =?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 252/279] =?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 253/279] =?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 254/279] =?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 255/279] =?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 256/279] =?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 257/279] =?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 258/279] =?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 259/279] =?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 260/279] =?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 261/279] =?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 262/279] =?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 263/279] =?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 264/279] =?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 265/279] =?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 266/279] =?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 267/279] =?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 268/279] =?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 269/279] =?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 270/279] =?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 271/279] =?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 272/279] =?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 273/279] =?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 274/279] =?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 275/279] =?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 276/279] =?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 277/279] =?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 278/279] =?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 279/279] =?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已存在");