From 98463b39a29d509961c650aa018ada22c6c6368a Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 8 Dec 2020 14:12:27 +0800 Subject: [PATCH 001/119] =?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 002/119] =?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 003/119] =?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 004/119] =?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 005/119] =?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 006/119] =?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 007/119] =?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 008/119] =?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 009/119] =?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 010/119] =?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 011/119] =?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 012/119] =?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 013/119] =?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 014/119] =?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 015/119] =?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 016/119] =?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 017/119] =?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 018/119] =?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 019/119] =?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 020/119] =?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 021/119] =?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 022/119] =?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 023/119] =?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 024/119] =?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 026/119] =?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 027/119] =?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 028/119] =?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 029/119] =?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 030/119] =?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 031/119] =?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 032/119] =?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 033/119] =?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 034/119] =?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 035/119] =?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 036/119] =?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 037/119] =?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 038/119] =?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 039/119] =?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 040/119] =?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 041/119] =?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 047/119] =?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 048/119] =?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 049/119] =?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 050/119] =?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 051/119] =?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 - * - FROM ( - - SELECT - - * - - FROM issue_project_category_dict - WHERE DEL_FLAG = '0' - AND CUSTOMER_ID = #{customerId} - - id = #{id} - - UNION - SELECT - - * - - FROM issue_project_category_dict outter - WHERE outter.DEL_FLAG = '0' - AND outter.CUSTOMER_ID = 'default' + a.ID, + IF(a.CATEGORY_TYPE = '2',concat(b.CATEGORY_NAME,'-',a.CATEGORY_NAME),a.CATEGORY_NAME) as categoryName + FROM issue_project_category_dict a + LEFT JOIN issue_project_category_dict b on a.pid = b.id and a.customer_id = b.customer_id + WHERE a.DEL_FLAG = '0' + AND a.CUSTOMER_ID = #{customerId} - outter.id = #{id} + a.id = #{id} - AND NOT EXISTS ( - SELECT * FROM issue_project_category_dict WHERE del_flag = '0' AND - customer_id = #{customerId} and id = outter.id - ) - ) temp - order by temp.category_type,temp.sort + order by a.category_type,a.sort \ 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 13:49:40 +0800 Subject: [PATCH 055/119] =?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 5be7fdea0ea1b3b73a653ff3faceddc6c5c503cd Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 19 Mar 2021 17:03:41 +0800 Subject: [PATCH 056/119] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=88=86=E7=B1=BBdb=E8=B0=83=E6=95=B4=E5=BC=95=E8=B5=B7?= =?UTF-8?q?=E7=9A=84=E4=BB=A3=E7=A0=81=E9=80=BB=E8=BE=91=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/dto/form/IssueTagsFormDTO.java | 5 +++++ .../com/epmet/dao/IssueProjectCategoryDictDao.java | 2 +- .../epmet/service/impl/IssueCategoryServiceImpl.java | 2 ++ .../impl/IssueProjectCategoryDictServiceImpl.java | 2 +- .../com/epmet/service/impl/IssueTagsServiceImpl.java | 2 ++ .../src/main/java/com/epmet/utils/ModuleConstants.java | 8 ++++++++ .../resources/mapper/IssueProjectCategoryDictDao.xml | 2 ++ .../src/main/resources/mapper/IssueTagsDao.xml | 3 ++- .../epmet/dto/result/ProjectCategoryDTOResultDTO.java | 10 ++++++++++ .../epmet/service/impl/ProjectCategoryServiceImpl.java | 2 ++ 10 files changed, 35 insertions(+), 3 deletions(-) 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 8cb89dc4d7..908edfba19 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,6 +43,11 @@ 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/dao/IssueProjectCategoryDictDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueProjectCategoryDictDao.java index 28e1522491..770c10cb99 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 @@ -37,7 +37,7 @@ import java.util.List; public interface IssueProjectCategoryDictDao extends BaseDao { /** - * @Description 客户分类列表查询,按分类升序排列 + * @Description 客户分类列表查询,按分类升序排列,查询未被禁用的 * @Author sun **/ List selectCustomerCategoryList(@Param("customerId") String customerId); 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 724d256e34..2ca1c6a005 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 @@ -208,6 +208,8 @@ public class IssueCategoryServiceImpl extends BaseServiceImpl { if (ca.getId().equals(cl.getId())) { entity.setCategoryPids(cl.getPids()); + entity.setCategoryCode(cl.getCategoryCode()); + entity.setIsDisable(cl.getIsDisable()); } }); entityList.add(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 6b8f05d845..86b6cb1305 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 @@ -123,7 +123,7 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl 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 a4b49c3ba996f1d6b099bc3594e0b24a5dd6f5d2 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 22 Mar 2021 10:31:05 +0800 Subject: [PATCH 057/119] =?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 11:04:13 +0800 Subject: [PATCH 058/119] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E5=AD=97=E5=85=B8=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 --- .../com/epmet/controller/DimController.java | 8 +- .../issue/IssueProjectCategoryDictDao.java | 39 ++++++++ .../stats/CustomerProjectCategoryDictDao.java | 39 ++++++++ .../stats/FactOrginProjectCategoryDao.java | 33 +++++++ .../issue/IssueProjectCategoryDictEntity.java | 83 ++++++++++++++++ .../CustomerProjectCategoryDictEntity.java | 95 ++++++++++++++++++ .../stats/FactOrginProjectCategoryEntity.java | 63 ++++++++++++ .../IssueProjectCategoryDictService.java | 37 +++++++ .../IssueProjectCategoryDictServiceImpl.java | 36 +++++++ .../com/epmet/service/StatsDimService.java | 2 + .../service/impl/StatsDimServiceImpl.java | 51 ++++++++++ .../CustomerProjectCategoryDictService.java | 45 +++++++++ .../FactOrginProjectCategoryService.java | 31 ++++++ ...ustomerProjectCategoryDictServiceImpl.java | 97 +++++++++++++++++++ .../FactOrginProjectCategoryServiceImpl.java | 35 +++++++ .../issue/IssueProjectCategoryDictDao.xml | 44 +++++++++ .../stats/CustomerProjectCategoryDictDao.xml | 41 ++++++++ .../stats/FactOrginProjectCategoryDao.xml | 8 ++ 18 files changed, 786 insertions(+), 1 deletion(-) create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/issue/IssueProjectCategoryDictDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/CustomerProjectCategoryDictDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactOrginProjectCategoryDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/issue/IssueProjectCategoryDictEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/CustomerProjectCategoryDictEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactOrginProjectCategoryEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/IssueProjectCategoryDictService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/impl/IssueProjectCategoryDictServiceImpl.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/CustomerProjectCategoryDictService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactOrginProjectCategoryService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/CustomerProjectCategoryDictServiceImpl.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactOrginProjectCategoryServiceImpl.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/issue/IssueProjectCategoryDictDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/CustomerProjectCategoryDictDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactOrginProjectCategoryDao.xml diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DimController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DimController.java index 3e2a78b716..68dedbd4a0 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DimController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DimController.java @@ -1,7 +1,6 @@ package com.epmet.controller; import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.AgencySubDeptTreeDto; import com.epmet.dto.AgencySubTreeDto; import com.epmet.dto.stats.form.CustomerIdAndDateIdFormDTO; @@ -105,6 +104,13 @@ public class DimController { } catch (Exception e) { logger.error("初始化按周维度失败:", e); } + //项目分类字典维度 初始化 每天晚上凌晨10分执行 + try { + statsDimService.customerInitProjectCategory(); + logger.info("初始化项目分类成功"); + } catch (Exception e) { + logger.error("初始化项目分类失败:", e); + } return new Result(); } 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 new file mode 100644 index 0000000000..9cc59cf996 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/issue/IssueProjectCategoryDictDao.java @@ -0,0 +1,39 @@ +/** + * 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.issue; + +import com.epmet.entity.issue.IssueProjectCategoryDictEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.Date; +import java.util.List; + +/** + * 议题项目分类字典 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ +@Mapper +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 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 new file mode 100644 index 0000000000..fd0cdd6eb2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/CustomerProjectCategoryDictDao.java @@ -0,0 +1,39 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.CustomerProjectCategoryDictEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 客户项目分类字典表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-19 + */ +@Mapper +public interface CustomerProjectCategoryDictDao extends BaseDao { + + CustomerProjectCategoryDictEntity getLatestProjectCategory(); + + CustomerProjectCategoryDictEntity getLatestUpdatedEntity(); + + CustomerProjectCategoryDictEntity selectByCustomerIdAndId(@Param("customerId") String customerId, @Param("categoryId") String categoryId); +} \ No newline at end of file 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/stats/FactOrginProjectCategoryDao.java new file mode 100644 index 0000000000..789dc926bb --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactOrginProjectCategoryDao.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.stats; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.stats.FactOrginProjectCategoryEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 项目所属分类表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-19 + */ +@Mapper +public interface FactOrginProjectCategoryDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/issue/IssueProjectCategoryDictEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/issue/IssueProjectCategoryDictEntity.java new file mode 100644 index 0000000000..67c82fee00 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/issue/IssueProjectCategoryDictEntity.java @@ -0,0 +1,83 @@ +/** + * 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.issue; + +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 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; + + /** + * 上级分类编码 + */ + private String parentCategoryCode; + + /** + * 分类编码,分类编码+customer_id唯一 + */ + private String categoryCode; + + /** + * 分类名称 + */ + private String categoryName; + + /** + * 分类类别1,2,3,4.... + */ + private String categoryType; + + /** + * 排序 + */ + private Integer sort; + + /** + * 是否禁用(enable:启用 disable:禁用) + */ + private String isDisable; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/CustomerProjectCategoryDictEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/CustomerProjectCategoryDictEntity.java new file mode 100644 index 0000000000..82afefb88c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/CustomerProjectCategoryDictEntity.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.entity.stats; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 客户项目分类字典表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-19 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("customer_project_category_dict") +public class CustomerProjectCategoryDictEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 外部客户:external;内部客户:internal + */ + private String customerType; + + /** + * 客户自己的分类编码 + */ + private String categoryCode; + + /** + * 客户自己的分类名称 + */ + private String categoryName; + + /** + * 父类分类编码,如果是一级分类,此列赋值为0 + */ + private String parentCategoryCode; + + /** + * 分类等级:1、2....;产品只有2级分类 + */ + private Integer level; + + /** + * 排序 + */ + private Integer sort; + + /** + * 是否禁用(enable:启用 disable:禁用) + */ + private String isDisable; + + /** + * 对应e世通中的分类编码,没有此列为空 + */ + private String epmetCategoryCode; + + /** + * 创建时间 + */ + private Date originCreatedTime; + /** + * 修改时间 + */ + private Date originUpdatedTime; + + private String categoryId; +} 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/stats/FactOrginProjectCategoryEntity.java new file mode 100644 index 0000000000..294bdfd92e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/FactOrginProjectCategoryEntity.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.entity.stats; + +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-19 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_orgin_project_category") +public class FactOrginProjectCategoryEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 项目id + */ + private String projectId; + + /** + * 分类编码 + */ + private String categoryCode; + + /** + * 所属父类分类编码 + */ + private String parentCategoryCode; + + /** + * 分类等级:1、2....;产品目前只有2级分类 + */ + private Integer level; + +} 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 new file mode 100644 index 0000000000..3067657abb --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/IssueProjectCategoryDictService.java @@ -0,0 +1,37 @@ +/** + * 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.Issue; + +import com.epmet.entity.issue.IssueProjectCategoryDictEntity; + +import java.util.Date; +import java.util.List; + +/** + * 议题项目分类字典 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-12-08 + */ + +public interface IssueProjectCategoryDictService{ + + List listInsertCategoies(Date start, Date end); + + List listByUpdatedTime(Date start, Date end); +} \ No newline at end of file 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 new file mode 100644 index 0000000000..98c18ec1fc --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/impl/IssueProjectCategoryDictServiceImpl.java @@ -0,0 +1,36 @@ +package com.epmet.service.Issue.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +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.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.List; + +/** + * 描述一下 + * + * @author yinzuomei@elink-cn.com + * @date 2021/3/19 15:29 + */ +@Service +@DataSource(DataSourceConstant.GOV_ISSUE) +public class IssueProjectCategoryDictServiceImpl implements IssueProjectCategoryDictService { + @Autowired + private IssueProjectCategoryDictDao issueProjectCategoryDictDao; + + @Override + public List listInsertCategoies(Date start, Date end) { + return issueProjectCategoryDictDao.listInsertCategoies(start, end); + } + + @Override + public List listByUpdatedTime(Date start, Date end) { + return issueProjectCategoryDictDao.listByUpdatedTime(start, end); + } + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsDimService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsDimService.java index 1e2f05991b..0bdac4cb04 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsDimService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/StatsDimService.java @@ -10,4 +10,6 @@ public interface StatsDimService { void initCustomerDim(); void initDepartmentDim(); + + void customerInitProjectCategory(); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsDimServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsDimServiceImpl.java index 6338145260..09db5e717d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsDimServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsDimServiceImpl.java @@ -3,10 +3,12 @@ package com.epmet.service.impl; import com.epmet.constant.RobotConstant; import com.epmet.dto.org.result.CustomerAreaCodeResultDTO; import com.epmet.entity.crm.CustomerEntity; +import com.epmet.entity.issue.IssueProjectCategoryDictEntity; import com.epmet.entity.org.CustomerAgencyEntity; import com.epmet.entity.org.CustomerDepartmentEntity; import com.epmet.entity.org.CustomerGridEntity; import com.epmet.entity.stats.*; +import com.epmet.service.Issue.IssueProjectCategoryDictService; import com.epmet.service.StatsDimService; import com.epmet.service.crm.CustomerService; import com.epmet.service.org.CustomerAgencyService; @@ -52,6 +54,12 @@ public class StatsDimServiceImpl implements StatsDimService { @Autowired private DimDepartmentService dimDepartmentService; + @Autowired + private CustomerProjectCategoryDictService projectCategoryDictService; + + @Autowired + private IssueProjectCategoryDictService issueProjectCategoryDictService; + @Override public void initGridDim() { List newDimGrids = getNewDimGrids(); @@ -264,4 +272,47 @@ public class StatsDimServiceImpl implements StatsDimService { } return new ArrayList<>(); } + + /** + * @return void + * @author yinzuomei + * @description 初始化项目分类字典表 + * @Date 2021/3/19 15:44 + **/ + @Override + public void customerInitProjectCategory() { + Date now = new Date(); + List insertCategoies = listInsertCategoies(); + List updateCategoies = listUpdateCategoies(now); + projectCategoryDictService.initProjectCategory(insertCategoies,updateCategoies); + } + + /** + * @author yinzuomei + * @description 构造需要插入的分类字典 + * @Date 2021/3/19 15:52 + **/ + private List listInsertCategoies() { + CustomerProjectCategoryDictEntity lastInsertProjectCategory = projectCategoryDictService.getLatestProjectCategory(); + Date now = new Date(); + Date lastInitTime = null; + if (null != lastInsertProjectCategory) { + lastInitTime = lastInsertProjectCategory.getOriginCreatedTime(); + } + return issueProjectCategoryDictService.listInsertCategoies(lastInitTime, now); + } + + /** + * @param initTime + * @author yinzuomei + * @description + * @Date 2021/3/19 15:55 + **/ + private List listUpdateCategoies(Date initTime) { + CustomerProjectCategoryDictEntity lastUpdated = projectCategoryDictService.getLatestUpdatedEntity(); + if (lastUpdated != null) { + return issueProjectCategoryDictService.listByUpdatedTime(lastUpdated.getOriginUpdatedTime(), initTime); + } + return new ArrayList<>(); + } } 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 new file mode 100644 index 0000000000..36861d7b35 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/CustomerProjectCategoryDictService.java @@ -0,0 +1,45 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.issue.IssueProjectCategoryDictEntity; +import com.epmet.entity.stats.CustomerProjectCategoryDictEntity; + +import java.util.List; + +/** + * 客户项目分类字典表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-19 + */ +public interface CustomerProjectCategoryDictService extends BaseService { + + void initProjectCategory(List insertCategoies, + List updateCategoies); + + /** + * @author yinzuomei + * @description 获取内部客户最近一次初始记录 + * @Date 2021/3/19 14:57 + **/ + CustomerProjectCategoryDictEntity getLatestProjectCategory(); + + CustomerProjectCategoryDictEntity getLatestUpdatedEntity(); +} \ No newline at end of file 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/stats/FactOrginProjectCategoryService.java new file mode 100644 index 0000000000..1d3a614ead --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactOrginProjectCategoryService.java @@ -0,0 +1,31 @@ +/** + * 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.stats; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.stats.FactOrginProjectCategoryEntity; + +/** + * 项目所属分类表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-19 + */ +public interface FactOrginProjectCategoryService extends BaseService { + +} \ No newline at end of file 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 new file mode 100644 index 0000000000..e81c8568ed --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/CustomerProjectCategoryDictServiceImpl.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.service.stats.impl; + +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.stats.CustomerProjectCategoryDictDao; +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.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +/** + * 客户项目分类字典表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-19 + */ +@Slf4j +@DataSource(DataSourceConstant.EVALUATION_INDEX) +@Service +public class CustomerProjectCategoryDictServiceImpl extends BaseServiceImpl implements CustomerProjectCategoryDictService { + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX) + @Transactional(rollbackFor = Exception.class) + @Override + public void initProjectCategory(List insertCategoies, List updateCategoies) { + log.info(String.format("=============需要插入的条数=%s,更新的条数=%s",insertCategoies.size(),updateCategoies.size())); + insertCategoies.forEach(insertEntity -> { + CustomerProjectCategoryDictEntity entityInsert=new CustomerProjectCategoryDictEntity(); + entityInsert.setCustomerId(insertEntity.getCustomerId()); + entityInsert.setCustomerType("internal"); + entityInsert.setCategoryCode(insertEntity.getCategoryCode()); + entityInsert.setCategoryName(insertEntity.getCategoryName()); + entityInsert.setParentCategoryCode(insertEntity.getParentCategoryCode()); + entityInsert.setLevel(Integer.valueOf(insertEntity.getCategoryType())); + entityInsert.setSort(insertEntity.getSort()); + entityInsert.setIsDisable(insertEntity.getIsDisable()); + entityInsert.setOriginCreatedTime(insertEntity.getCreatedTime()); + entityInsert.setOriginUpdatedTime(insertEntity.getUpdatedTime()); + entityInsert.setCategoryId(insertEntity.getId()); + baseDao.insert(entityInsert); + }); + updateCategoies.forEach(updatedEntity -> { + CustomerProjectCategoryDictEntity entity=baseDao.selectByCustomerIdAndId(updatedEntity.getCustomerId(),updatedEntity.getId()); + if(null!=entity){ + entity.setCategoryCode(updatedEntity.getCategoryCode()); + entity.setCategoryName(updatedEntity.getCategoryName()); + entity.setParentCategoryCode(updatedEntity.getParentCategoryCode()); + 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); + }); + } + + /** + * @author yinzuomei + * @description 获取内部客户最近一次初始记录 + * @Date 2021/3/19 14:57 + **/ + @DataSource(value = DataSourceConstant.EVALUATION_INDEX) + @Override + public CustomerProjectCategoryDictEntity getLatestProjectCategory() { + return baseDao.getLatestProjectCategory(); + } + + @DataSource(value = DataSourceConstant.EVALUATION_INDEX) + @Override + public CustomerProjectCategoryDictEntity getLatestUpdatedEntity() { + return baseDao.getLatestUpdatedEntity(); + } + +} \ No newline at end of file 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/stats/impl/FactOrginProjectCategoryServiceImpl.java new file mode 100644 index 0000000000..c2190ca008 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactOrginProjectCategoryServiceImpl.java @@ -0,0 +1,35 @@ +/** + * 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.stats.impl; + +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 org.springframework.stereotype.Service; + +/** + * 项目所属分类表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-03-19 + */ +@Service +public class FactOrginProjectCategoryServiceImpl extends BaseServiceImpl implements FactOrginProjectCategoryService { + +} \ 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 new file mode 100644 index 0000000000..a1207ecd06 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/issue/IssueProjectCategoryDictDao.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + \ 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 059/119] =?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 f449c114660ba9acefc3fd11fac8ad8f63e14008 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 22 Mar 2021 14:14:20 +0800 Subject: [PATCH 060/119] =?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 d9aa8777872046597baf9ca9fe2daa4320204852 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 22 Mar 2021 15:41:26 +0800 Subject: [PATCH 061/119] =?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 062/119] =?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 57888660664522e35eda80903a548170044d3f6d Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Mon, 22 Mar 2021 16:40:37 +0800 Subject: [PATCH 063/119] =?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 064/119] =?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 8bbbbc2610e567508520612c9036b1d9cec19283 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 22 Mar 2021 17:06:30 +0800 Subject: [PATCH 065/119] =?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 066/119] =?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 067/119] =?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 068/119] =?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:58:41 +0800 Subject: [PATCH 069/119] =?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 070/119] =?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 6581047b40ae2508e2792fdd2167a045d533856b Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 23 Mar 2021 10:21:28 +0800 Subject: [PATCH 071/119] =?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 072/119] =?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 073/119] =?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 074/119] =?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 075/119] =?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 076/119] =?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 077/119] =?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 078/119] =?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 079/119] =?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 080/119] =?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 081/119] =?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 082/119] =?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 083/119] =?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 084/119] =?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 085/119] =?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 086/119] =?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 087/119] =?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 088/119] =?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 089/119] =?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 090/119] =?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 091/119] =?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 @@ + + + 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 abedb8acff58b6bcd0a64ffa96648fb87a82238f Mon Sep 17 00:00:00 2001 From: wangchao Date: Thu, 25 Mar 2021 15:07:51 +0800 Subject: [PATCH 097/119] =?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 098/119] =?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 099/119] =?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 100/119] =?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 108/119] =?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 109/119] =?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 + + + 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' +