diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/result/IssueProgressResultDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/result/IssueProgressResultDTO.java index 722ba728..d7207e46 100644 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/result/IssueProgressResultDTO.java +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/result/IssueProgressResultDTO.java @@ -52,4 +52,9 @@ public class IssueProgressResultDTO implements Serializable { * 来源社群 */ private String groupName; + + /** + * 事件ID + */ + private String eventId; } diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/result/ItemHandleProgressResultDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/result/ItemHandleProgressResultDTO.java index a0a90c95..d4f0d083 100644 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/result/ItemHandleProgressResultDTO.java +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/result/ItemHandleProgressResultDTO.java @@ -36,6 +36,10 @@ public class ItemHandleProgressResultDTO implements Serializable { * 操作人部门 */ private String handlerDept; + /** + * 议题ID + */ + private String issueId; /** * 吹哨部门 diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/pom.xml b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/pom.xml new file mode 100644 index 00000000..3e7ce03e --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/pom.xml @@ -0,0 +1,110 @@ + + + + epdc-events + com.esua.epdc + 1.0.0 + + 4.0.0 + + epdc-events-maintain + 事件维护模块 + jar + + + + com.esua.epdc + epdc-events-client + 1.0.0 + + + com.esua.epdc + epdc-commons-tools + 1.0.0 + + + com.esua.epdc + epdc-commons-mybatis + ${project.version} + + + com.esua.epdc + epdc-commons-api-version-control + ${project.version} + + + org.projectlombok + lombok + provided + + + org.springframework.boot + spring-boot-autoconfigure + compile + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework + spring-context-support + + + org.apache.rocketmq + rocketmq-spring-boot-starter + + + + + ${project.artifactId} + + + org.apache.maven.plugins + maven-surefire-plugin + + true + + + + org.apache.maven.plugins + maven-deploy-plugin + + true + + + + com.spotify + dockerfile-maven-plugin + + + + ${project.basedir}/src/main/java + + + + true + ${basedir}/src/main/resources + + application.yml + **/*.properties + logback-spring.xml + registry.conf + mapper/**/*.xml + + + + ${basedir}/src/main/resources + + **/application*.yml + **/*.properties + logback-spring.xml + registry.conf + + + + + + diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/events/controller/MaintainEpdcEventsController.java b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/events/controller/MaintainEpdcEventsController.java new file mode 100644 index 00000000..8e2149e2 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/events/controller/MaintainEpdcEventsController.java @@ -0,0 +1,46 @@ +package com.elink.esua.epdc.maintain.modules.events.controller; + +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.maintain.modules.events.dto.EpdcEventsSummaryDTO; +import com.elink.esua.epdc.maintain.modules.events.service.MaintainEpdcEventsService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.Map; + +/** + * @author Liuchuang + */ +@RestController +@RequestMapping("maintainevents") +public class MaintainEpdcEventsController { + + @Autowired + private MaintainEpdcEventsService maintainEpdcEventsService; + + /** + * @Description 事件列表 + * @Author songyunpeng + * @Date 2021/1/18 + * @Param [params] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + **/ + @GetMapping("pageEvents") + public Result> pageEvents(@RequestParam Map params){ + PageData page = maintainEpdcEventsService.listOfEvents(params); + return new Result>().ok(page); + } + + /** + * @Description 删除事件 + * @Author songyunpeng + * @Date 2021/1/18 + * @Param [eventsId] + * @return com.elink.esua.epdc.commons.tools.utils.Result + **/ + @DeleteMapping("deleteEvents") + public Result deleteEvents(@RequestBody String[] ids){ + return maintainEpdcEventsService.deleteEvents(ids[0]); + } +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/events/dao/MaintainEpdcEventsDao.java b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/events/dao/MaintainEpdcEventsDao.java new file mode 100644 index 00000000..03339ca8 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/events/dao/MaintainEpdcEventsDao.java @@ -0,0 +1,24 @@ +package com.elink.esua.epdc.maintain.modules.events.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.maintain.modules.events.dto.EpdcEventsSummaryDTO; +import com.elink.esua.epdc.maintain.modules.events.entity.MaintainEpdcEventsEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; +import java.util.Map; + +/** + * @author Liuchuang + */ +@Mapper +public interface MaintainEpdcEventsDao extends BaseDao { + /** + * @Description 事件列表 + * @Author songyunpeng + * @Date 2021/1/18 + * @Param [params] + * @return java.util.List + **/ + List selectListOfEvents(Map params); +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/events/dto/EpdcEventsSummaryDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/events/dto/EpdcEventsSummaryDTO.java new file mode 100644 index 00000000..0f30dad9 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/events/dto/EpdcEventsSummaryDTO.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.elink.esua.epdc.maintain.modules.events.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * + * + * @author Mark sunlightcs@gmail.com + * @since v1.0.0 2019-09-04 + */ +@Data +public class EpdcEventsSummaryDTO implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 事件ID + */ + private String id; + /** + * 用户昵称 + */ + private String nickName; + /** + * 事件内容 + */ + private String eventContent; + /** + * 提交时间 + */ + private Date createdTime; + /** + * 议题数量 + */ + private Integer issueCount; + /** + * 事件内容 + */ + private String eventState; + + +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/events/entity/MaintainEpdcEventsEntity.java b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/events/entity/MaintainEpdcEventsEntity.java new file mode 100644 index 00000000..c93a42f9 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/events/entity/MaintainEpdcEventsEntity.java @@ -0,0 +1,135 @@ +package com.elink.esua.epdc.maintain.modules.events.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * @author Liuchuang + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_events") +public class MaintainEpdcEventsEntity extends BaseEpdcEntity { + private static final long serialVersionUID = 7460394882047700143L; + + /** + * 事件ID + */ + private String id; + /** + * 用户ID + */ + private String userId; + /** + * 用户昵称 + */ + private String nickName; + /** + * 用户头像 + */ + private String userFace; + /** + * 党员标识 0:否,1:是 + */ + private String isPartyMember; + /** + * 手机号 + */ + private String mobile; + /** + * 议题内容 + */ + private String eventContent; + + /** + * 父所有部门ID + */ + private String parentDeptIds; + /** + * 父所有部门 + */ + private String parentDeptNames; + /** + * 所有部门ID + */ + private String allDeptIds; + /** + * 所有部门 + */ + private String allDeptNames; + /** + * 网格 + */ + private String grid; + /** + * 网格ID + */ + private Long gridId; + /** + * 议题位置地址 + */ + private String issueAddress; + /** + * 议题分类编码 + */ + private String categoryCode; + /** + * 议题位置纬度 + */ + private Double issueLatitude; + /** + * 议题位置经度 + */ + private Double issueLongitude; + /** + * 事件状态 0-待审核,2-驳回,4-审核通过 + */ + private Integer eventState; + /** + * 意见 + */ + private String advice; + /** + * 点赞次数 + */ + private Integer approveNum; + /** + * 踩次数 + */ + private Integer opposeNum; + /** + * 评论数 + */ + private Integer commentNum; + /** + * 浏览数 + */ + private Integer browseNum; + + /** + * 社群ID + */ + private String groupId; + + /** + * 社群名称 + */ + private String groupName; + + /** + * 话题ID + */ + private String topicId; + + /** + * 一级分类编码 + */ + private String firstCategoryCode; + + /** + * 分类全称 + */ + private String categoryFullName; +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/events/service/MaintainEpdcEventsService.java b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/events/service/MaintainEpdcEventsService.java new file mode 100644 index 00000000..9dfedcfe --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/events/service/MaintainEpdcEventsService.java @@ -0,0 +1,33 @@ +package com.elink.esua.epdc.maintain.modules.events.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.maintain.modules.events.dto.EpdcEventsSummaryDTO; +import com.elink.esua.epdc.maintain.modules.events.entity.MaintainEpdcEventsEntity; + +import java.util.Map; + +/** + * @author Liuchuang + */ +public interface MaintainEpdcEventsService extends BaseService { + + /** + * @Description 事件列表 + * @Author songyunpeng + * @Date 2021/1/18 + * @Param [params] + * @return com.elink.esua.epdc.commons.tools.page.PageData + **/ + PageData listOfEvents(Map params); + + /** + * @Description 删除事件 + * @Author songyunpeng + * @Date 2021/1/18 + * @Param [eventsId] + * @return com.elink.esua.epdc.commons.tools.utils.Result + **/ + Result deleteEvents(String eventsId); +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/events/service/impl/MaintainEpdcEventsServiceImpl.java b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/events/service/impl/MaintainEpdcEventsServiceImpl.java new file mode 100644 index 00000000..67cfb01a --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/events/service/impl/MaintainEpdcEventsServiceImpl.java @@ -0,0 +1,52 @@ +package com.elink.esua.epdc.maintain.modules.events.service.impl; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.maintain.modules.events.dao.MaintainEpdcEventsDao; +import com.elink.esua.epdc.maintain.modules.events.dto.EpdcEventsSummaryDTO; +import com.elink.esua.epdc.maintain.modules.events.entity.MaintainEpdcEventsEntity; +import com.elink.esua.epdc.maintain.modules.events.service.MaintainEpdcEventsService; +import com.elink.esua.epdc.maintain.modules.issue.dao.MaintainEpdcIssueDao; +import com.elink.esua.epdc.maintain.modules.issue.entity.MaintainEpdcIssueEntity; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author Liuchuang + */ +@Service +public class MaintainEpdcEventsServiceImpl extends BaseServiceImpl implements MaintainEpdcEventsService { + + @Autowired + private MaintainEpdcEventsDao maintainEpdcEventsDao; + + @Autowired + private MaintainEpdcIssueDao maintainEpdcIssueDao; + + + @Override + public PageData listOfEvents(Map params) { + IPage page = getPage(params); + List list = baseDao.selectListOfEvents(params); + return new PageData<>(list, page.getTotal()); + } + + + @Override + public Result deleteEvents(String eventsId) { + Map params = new HashMap<>(); + params.put("EVENT_ID",eventsId); + List issueSummaryEntities = maintainEpdcIssueDao.selectByMap(params); + if(issueSummaryEntities!=null && issueSummaryEntities.size()>0){ + return new Result().error("该事件下存在议题,请先删除对应议题"); + } + return new Result().ok(baseDao.deleteById(eventsId)); + } + +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/issue/controller/MaintainEpdcIssueController.java b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/issue/controller/MaintainEpdcIssueController.java new file mode 100644 index 00000000..de67d654 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/issue/controller/MaintainEpdcIssueController.java @@ -0,0 +1,57 @@ +package com.elink.esua.epdc.maintain.modules.issue.controller; + +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.issue.result.IssueProgressResultDTO; +import com.elink.esua.epdc.maintain.modules.issue.dto.IssueSummaryDTO; +import com.elink.esua.epdc.maintain.modules.issue.service.MaintainEpdcIssueService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.Map; + +@RestController +@RequestMapping("maintainissue") +public class MaintainEpdcIssueController { + + @Autowired + private MaintainEpdcIssueService maintainEpdcIssueService; + + /** + * @Description 事件对应的议题列表 + * @Author songyunpeng + * @Date 2021/1/18 + * @Param [params] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + **/ + @GetMapping("pageIssues") + public Result> pageIssues(@RequestParam Map params){ + PageData page = maintainEpdcIssueService.listOfIssues(params); + return new Result>().ok(page); + } + + /** + * @Description 议题对应的处理流程列表 + * @Author songyunpeng + * @Date 2021/1/18 + * @Param [params] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + **/ + @GetMapping("pageIssuesHandle") + public Result> pageIssuesHandle(@RequestParam Map params){ + PageData page = maintainEpdcIssueService.listOfIssuesHandle(params); + return new Result>().ok(page); + } + + /** + * @Description 删除议题 + * @Author songyunpeng + * @Date 2021/1/18 + * @Param [eventsId] + * @return com.elink.esua.epdc.commons.tools.utils.Result + **/ + @DeleteMapping("deleteIssues") + public Result deleteIssues(@RequestBody String[] ids){ + return maintainEpdcIssueService.deleteIssue(ids[0]); + } +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/issue/dao/IssueSummaryHandleDao.java b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/issue/dao/IssueSummaryHandleDao.java new file mode 100644 index 00000000..baf6738d --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/issue/dao/IssueSummaryHandleDao.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.elink.esua.epdc.maintain.modules.issue.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.dto.issue.result.IssueProgressResultDTO; +import com.elink.esua.epdc.maintain.modules.issue.entity.IssueSummaryHandleEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; +import java.util.Map; + +/** + * 议题处理表 议题处理表 + * + * @author yujintao yujintao@elink-cn.com + * @since v1.0.0 2019-09-05 + */ +@Mapper +public interface IssueSummaryHandleDao extends BaseDao { + + /** + * @Description 议题处理流程 + * @Author songyunpeng + * @Date 2021/1/18 + * @Param [params] + * @return java.util.List + **/ + List selectListOfIssuesHandle(Map params); +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/issue/dao/MaintainEpdcIssueDao.java b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/issue/dao/MaintainEpdcIssueDao.java new file mode 100644 index 00000000..ce733308 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/issue/dao/MaintainEpdcIssueDao.java @@ -0,0 +1,24 @@ +package com.elink.esua.epdc.maintain.modules.issue.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.maintain.modules.issue.dto.IssueSummaryDTO; +import com.elink.esua.epdc.maintain.modules.issue.entity.MaintainEpdcIssueEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; +import java.util.Map; + +/** + * @author Liuchuang + */ +@Mapper +public interface MaintainEpdcIssueDao extends BaseDao { + /** + * @Description 议题列表 + * @Author songyunpeng + * @Date 2021/1/18 + * @Param [params] + * @return java.util.List + **/ + List selectListOfIssues(Map params); +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/issue/dto/IssueSummaryDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/issue/dto/IssueSummaryDTO.java new file mode 100644 index 00000000..17c315a3 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/issue/dto/IssueSummaryDTO.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.elink.esua.epdc.maintain.modules.issue.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 议题表 议题表 + * + * @author yujintao yujintao@elink-cn.com + * @since v1.0.0 2019-09-05 + */ +@Data +public class IssueSummaryDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID + */ + private String id; + + /** + * 用户昵称 + */ + private String nickName; + + /** + * 议题内容 + */ + private String issueContent; + /** + * 提交时间 + */ + private Date createdTime; + /** + * 项目数量 + */ + private Integer itemCount; + + + + +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/issue/entity/IssueSummaryHandleEntity.java b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/issue/entity/IssueSummaryHandleEntity.java new file mode 100644 index 00000000..b13cddde --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/issue/entity/IssueSummaryHandleEntity.java @@ -0,0 +1,72 @@ +/** + * 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.elink.esua.epdc.maintain.modules.issue.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 议题处理表 议题处理表 + * + * @author yujintao yujintao@elink-cn.com + * @since v1.0.0 2019-09-05 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_issue_handle") +public class IssueSummaryHandleEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 议题ID + */ + private String issueId; + + /** + * 状态 0-审核通过,1-反馈,2-关闭 + */ + private Integer state; + + /** + * 意见 + */ + private String advice; + + /** + * 操作人部门ID + */ + private long handlerDeptId; + /** + * 操作人部门 + */ + private String handlerDept; + + /** + * 操作人联系方式 + */ + private String mobile; + + /** + * 来源社群 + */ + private String groupName; + +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/issue/entity/MaintainEpdcIssueEntity.java b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/issue/entity/MaintainEpdcIssueEntity.java new file mode 100644 index 00000000..58650c49 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/issue/entity/MaintainEpdcIssueEntity.java @@ -0,0 +1,139 @@ +package com.elink.esua.epdc.maintain.modules.issue.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * @author Liuchuang + */ +@Data +@EqualsAndHashCode(callSuper = false) +@TableName("epdc_issue") +public class MaintainEpdcIssueEntity extends BaseEpdcEntity { + private static final long serialVersionUID = -3024955873619986266L; + + /** + * 事件ID + */ + private String eventId; + + /** + * 用户ID + */ + private String userId; + + /** + * 用户昵称 + */ + private String nickName; + + /** + * 用户头像 + */ + private String userFace; + + /** + * 党员标识 0:否,1:是 + */ + private String isPartyMember; + + /** + * 手机号 + */ + private String mobile; + + /** + * 议题内容 + */ + private String issueContent; + + /** + * 发布时间 + */ + private Date distributeTime; + + /** + * 父所有部门ID + */ + private String parentDeptIds; + /** + * 父所有部门 + */ + private String parentDeptNames; + /** + * 所有部门ID + */ + private String allDeptIds; + /** + * 所有部门 + */ + private String allDeptNames; + + /** + * 网格 + */ + private String grid; + + /** + * 网格ID + */ + private Long gridId; + + /** + * 议题位置地址 + */ + private String issueAddress; + + /** + * 议题分类编码 + */ + private String categoryCode; + + /** + * 议题位置纬度 + */ + private Double issueLatitude; + + /** + * 议题位置经度 + */ + private Double issueLongitude; + + /** + * 议题状态 0-审核通过,2-已关闭,4-已转项目 + */ + private Integer issueState; + + /** + * 社群ID + */ + private String groupId; + + /** + * 社群名称 + */ + private String groupName; + + /** + * 话题ID + */ + private String topicId; + /** + * 一级分类编码 + */ + private String firstCategoryCode; + + /** + * 分类全称 + */ + private String categoryFullName; + + /** + * 议题编号 + */ + private String issueCode; +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/issue/service/MaintainEpdcIssueService.java b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/issue/service/MaintainEpdcIssueService.java new file mode 100644 index 00000000..459b62db --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/issue/service/MaintainEpdcIssueService.java @@ -0,0 +1,41 @@ +package com.elink.esua.epdc.maintain.modules.issue.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.issue.result.IssueProgressResultDTO; +import com.elink.esua.epdc.maintain.modules.issue.dto.IssueSummaryDTO; +import com.elink.esua.epdc.maintain.modules.issue.entity.MaintainEpdcIssueEntity; + +import java.util.Map; + +/** + * @author Liuchuang + */ +public interface MaintainEpdcIssueService extends BaseService { + /** + * @Description 议题列表 + * @Author songyunpeng + * @Date 2021/1/18 + * @Param [params] + * @return com.elink.esua.epdc.commons.tools.page.PageData + **/ + PageData listOfIssues(Map params); + + /** + * @Description 议题处理流程 + * @Author songyunpeng + * @Date 2021/1/18 + * @Param [params] + * @return com.elink.esua.epdc.commons.tools.page.PageData + **/ + PageData listOfIssuesHandle(Map params); + /** + * @Description 删除议题 + * @Author songyunpeng + * @Date 2021/1/18 + * @Param [eventsId] + * @return com.elink.esua.epdc.commons.tools.utils.Result + **/ + Result deleteIssue(String issueId); +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/issue/service/impl/MaintainEpdcIssueServiceImpl.java b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/issue/service/impl/MaintainEpdcIssueServiceImpl.java new file mode 100644 index 00000000..76a4a432 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/issue/service/impl/MaintainEpdcIssueServiceImpl.java @@ -0,0 +1,74 @@ +package com.elink.esua.epdc.maintain.modules.issue.service.impl; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.issue.result.IssueProgressResultDTO; +import com.elink.esua.epdc.maintain.modules.issue.dao.IssueSummaryHandleDao; +import com.elink.esua.epdc.maintain.modules.issue.dao.MaintainEpdcIssueDao; +import com.elink.esua.epdc.maintain.modules.issue.dto.IssueSummaryDTO; +import com.elink.esua.epdc.maintain.modules.issue.entity.IssueSummaryHandleEntity; +import com.elink.esua.epdc.maintain.modules.issue.entity.MaintainEpdcIssueEntity; +import com.elink.esua.epdc.maintain.modules.issue.service.MaintainEpdcIssueService; +import com.elink.esua.epdc.maintain.modules.item.dao.MaintainEpdcItemDao; +import com.elink.esua.epdc.maintain.modules.item.entity.MaintainEpdcItemEntity; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * @author Liuchuang + */ +@Service +public class MaintainEpdcIssueServiceImpl extends BaseServiceImpl implements MaintainEpdcIssueService { + + @Autowired + private MaintainEpdcIssueDao maintainEpdcIssueDao; + @Autowired + private MaintainEpdcItemDao maintainEpdcItemDao; + @Autowired + private IssueSummaryHandleDao issueSummaryHandleDao; + + @Override + public PageData listOfIssues(Map params) { + IPage page = getPage(params); + List list = maintainEpdcIssueDao.selectListOfIssues(params); + return new PageData<>(list, page.getTotal()); + } + + + @Override + public PageData listOfIssuesHandle(Map params) { + IPage page = getPage(params); + List list = issueSummaryHandleDao.selectListOfIssuesHandle(params); + return new PageData<>(list, page.getTotal()); + } + + @Override + public Result deleteIssue(String issueId) { + Map params = new HashMap<>(); + params.put("ISSUE_ID",issueId); + List itemSummaryEntities = maintainEpdcItemDao.selectByMap(params); + if(itemSummaryEntities!=null && itemSummaryEntities.size()>0){ + return new Result().error("该议题下存在项目,请先删除对应项目"); + } + maintainEpdcIssueDao.deleteById(issueId); + //删除议题处理流程表 + Map params2 = new HashMap<>(); + params2.put("ISSUE_ID",issueId); + List issueSummaryHandleEntities = issueSummaryHandleDao.selectByMap(params2); + if(issueSummaryHandleEntities.size()!=0){ + List ids = issueSummaryHandleEntities.stream().map(BaseEpdcEntity::getId).collect(Collectors.toList()); + //删除项目处理流程表 + issueSummaryHandleDao.deleteBatchIds(ids); + } + return new Result(); + } + +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/item/controller/MaintainEpdcItemController.java b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/item/controller/MaintainEpdcItemController.java new file mode 100644 index 00000000..c10d7696 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/item/controller/MaintainEpdcItemController.java @@ -0,0 +1,61 @@ +package com.elink.esua.epdc.maintain.modules.item.controller; + +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.item.result.ItemHandleProgressResultDTO; +import com.elink.esua.epdc.maintain.modules.item.dto.ItemSummaryDTO; +import com.elink.esua.epdc.maintain.modules.item.service.MaintainEpdcItemService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.Map; + +/** + * @author Liuchuang + */ +@RestController +@RequestMapping("maintainitem") +public class MaintainEpdcItemController { + + @Autowired + private MaintainEpdcItemService maintainEpdcItemService; + + /** + * @Description 议题对应的项目列表 + * @Author songyunpeng + * @Date 2021/1/18 + * @Param [params] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + **/ + @GetMapping("pageItems") + public Result> pageItems(@RequestParam Map params){ + PageData page = maintainEpdcItemService.listOfItems(params); + return new Result>().ok(page); + } + + /** + * @Description 项目对应的流程处理列表 + * @Author songyunpeng + * @Date 2021/1/18 + * @Param [params] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + **/ + @GetMapping("pageItemsHandle") + public Result> pageItemsHandle(@RequestParam Map params){ + PageData page = maintainEpdcItemService.listOfItemsHandle(params); + return new Result>().ok(page); + } + + /** + * @Description 删除项目 + * @Author songyunpeng + * @Date 2021/1/18 + * @Param [eventsId] + * @return com.elink.esua.epdc.commons.tools.utils.Result + **/ + @DeleteMapping("deleteItems") + public Result deleteItems(@RequestBody String[] ids){ + return maintainEpdcItemService.deleteItem(ids[0]); + } + +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/item/dao/ItemSummaryDeptDao.java b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/item/dao/ItemSummaryDeptDao.java new file mode 100644 index 00000000..90c25a7b --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/item/dao/ItemSummaryDeptDao.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.elink.esua.epdc.maintain.modules.item.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.maintain.modules.item.entity.ItemSummaryDeptEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 项目部门关系表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-09-10 + */ +@Mapper +public interface ItemSummaryDeptDao extends BaseDao { + +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/item/dao/ItemSummaryHandleProcessDao.java b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/item/dao/ItemSummaryHandleProcessDao.java new file mode 100644 index 00000000..02d76d7a --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/item/dao/ItemSummaryHandleProcessDao.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.elink.esua.epdc.maintain.modules.item.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.dto.item.result.ItemHandleProgressResultDTO; +import com.elink.esua.epdc.maintain.modules.item.entity.ItemSummaryHandleProcessEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; +import java.util.Map; + +/** + * 项目处理流程表 项目处理流程表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-09-06 + */ +@Mapper +public interface ItemSummaryHandleProcessDao extends BaseDao { + + /** + * @Description 项目处理流程 + * @Author songyunpeng + * @Date 2021/1/18 + * @Param [params] + * @return java.util.List + **/ + List selectListOfItemsHandle(Map params); +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/item/dao/MaintainEpdcItemDao.java b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/item/dao/MaintainEpdcItemDao.java new file mode 100644 index 00000000..2488ab8e --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/item/dao/MaintainEpdcItemDao.java @@ -0,0 +1,42 @@ +package com.elink.esua.epdc.maintain.modules.item.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.maintain.modules.item.dto.ItemSummaryDTO; +import com.elink.esua.epdc.maintain.modules.item.entity.MaintainEpdcItemEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +/** + * @author Liuchuang + */ +@Mapper +public interface MaintainEpdcItemDao extends BaseDao { + + /** + * @Description 项目列表 + * @Author songyunpeng + * @Date 2021/1/18 + * @Param [params] + * @return java.util.List + **/ + List selectListOfItem(Map params); + /** + * @Description 删除项目部门关系表 + * @Author songyunpeng + * @Date 2021/3/5 + * @Param [itemId] + * @return void + **/ + void deleteItemDeptByItemId(@Param("itemId") String itemId); + /** + * @Description 删除部门评价表 + * @Author songyunpeng + * @Date 2021/3/5 + * @Param [itemId] + * @return void + **/ + void deleteItemEvaluateByItemId(String itemId); +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/item/dto/ItemSummaryDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/item/dto/ItemSummaryDTO.java new file mode 100644 index 00000000..75270e79 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/item/dto/ItemSummaryDTO.java @@ -0,0 +1,69 @@ +/** + * 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.elink.esua.epdc.maintain.modules.item.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * 项目表 项目表 + * + * @author yujintao yujintao@elink-cn.com + * @since v1.0.0 2019-09-04 + */ +@Data +public class ItemSummaryDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID + */ + private String id; + + /** + * 用户昵称 + */ + private String nickName; + + /** + * 用户头像 + */ + private String userFace; + /** + * 手机号 + */ + private String mobile; + + /** + * 项目内容 + */ + private String itemContent; + + /** + * 提交时间 + */ + private Date createdTime; + + /** + * 事件ID + */ + private String eventId; +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/item/entity/ItemSummaryDeptEntity.java b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/item/entity/ItemSummaryDeptEntity.java new file mode 100644 index 00000000..e7387d6e --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/item/entity/ItemSummaryDeptEntity.java @@ -0,0 +1,60 @@ +/** + * 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.elink.esua.epdc.maintain.modules.item.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 项目部门关系表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-09-10 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_item_dept") +public class ItemSummaryDeptEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 项目ID + */ + private String itemId; + + /** + * 部门ID + */ + private Long deptId; + /** + * 部门名称 + */ + private String deptName; + /** + * 操作人部门ID + */ + private Long createdDeptId; + /** + * 项目处理表ID + */ + private String itemHandleId; + +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/item/entity/ItemSummaryHandleProcessEntity.java b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/item/entity/ItemSummaryHandleProcessEntity.java new file mode 100644 index 00000000..770b3ddf --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/item/entity/ItemSummaryHandleProcessEntity.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.elink.esua.epdc.maintain.modules.item.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 项目处理流程表 项目处理流程表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-09-06 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_item_handle_process") +public class ItemSummaryHandleProcessEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 项目ID + */ + private String itemId; + + /** + * 状态 0-待网格长处理,5-待社区处理,10-待街道党建办处理,15-待街道处理,20-待区直部门处理,25-处理,30-关闭,35-结案 + */ + private Integer state; + + /** + * 处理意见 + */ + private String handleAdvice; + + /** + * 处理意见(外部) + */ + private String outHandleAdvice; + + /** + * 操作人部门ID + */ + private long handlerDeptId; + + /** + * 操作人部门 + */ + private String handlerDept; + +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/item/entity/MaintainEpdcItemEntity.java b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/item/entity/MaintainEpdcItemEntity.java new file mode 100644 index 00000000..9482d48c --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/item/entity/MaintainEpdcItemEntity.java @@ -0,0 +1,182 @@ +package com.elink.esua.epdc.maintain.modules.item.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * @author Liuchuang + */ +@Data +@EqualsAndHashCode(callSuper = false) +@TableName("epdc_item") +public class MaintainEpdcItemEntity extends BaseEpdcEntity { + private static final long serialVersionUID = 8116615354798453854L; + + /** + * 事件ID + */ + private String eventId; + + /** + * 议题ID + */ + private String issueId; + + /** + * 用户ID + */ + private String userId; + + /** + * 用户昵称 + */ + private String nickName; + + /** + * 用户头像 + */ + private String userFace; + + /** + * 党员标识 0:否,1:是 + */ + private String isPartyMember; + + /** + * 议题内容 + */ + private String itemContent; + + /** + * 发布时间 + */ + private Date distributeTime; + + /** + * 父所有部门ID + */ + private String parentDeptIds; + /** + * 父所有部门 + */ + private String parentDeptNames; + /** + * 所有部门ID + */ + private String allDeptIds; + /** + * 所有部门 + */ + private String allDeptNames; + + /** + * 网格 + */ + private String grid; + + /** + * 网格ID + */ + private Long gridId; + + /** + * 议题位置地址 + */ + private String issueAddress; + + /** + * 议题分类编码 + */ + private String categoryCode; + + /** + * 议题位置纬度 + */ + private Double issueLatitude; + + /** + * 议题位置经度 + */ + private Double issueLongitude; + + /** + * 满意度评价得分 + */ + private Integer evaluationScore; + /** + * 满意度评价内容 + */ + private String evaluationContent; + /** + * 满意度评价时间 + */ + private Date evaluationTime; + + /** + * 项目状态 0-处理中,5-已关闭,10-已结案 + */ + private Integer itemState; + + /** + * 手机号 + */ + private String mobile; + + /** + * 社群ID + */ + private String groupId; + + /** + * 社群名称 + */ + private String groupName; + + /** + * 最后一次处理时间 + */ + private Date lastHandleTime; + + /** + * 话题ID + */ + private String topicId; + /** + * 一级分类编码 + */ + private String firstCategoryCode; + + /** + * 分类全称 + */ + private String categoryFullName; + + /** + * 项目编号 + */ + private String itemCode; + + /** + * 置顶标识:0-否,1-是 + */ + private String topFlag; + + /** + * 置顶时间 + */ + private String topTime; + + /** + * 置顶人ID + */ + private String topUserId; + + /** + * 置顶人 + */ + private String topUserName; +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/item/service/MaintainEpdcItemService.java b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/item/service/MaintainEpdcItemService.java new file mode 100644 index 00000000..5a463100 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/item/service/MaintainEpdcItemService.java @@ -0,0 +1,43 @@ +package com.elink.esua.epdc.maintain.modules.item.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.item.result.ItemHandleProgressResultDTO; +import com.elink.esua.epdc.maintain.modules.item.dto.ItemSummaryDTO; +import com.elink.esua.epdc.maintain.modules.item.entity.MaintainEpdcItemEntity; + +import java.util.Map; + +/** + * @author Liuchuang + */ +public interface MaintainEpdcItemService extends BaseService { + /** + * @Description 项目列表 + * @Author songyunpeng + * @Date 2021/1/18 + * @Param [params] + * @return com.elink.esua.epdc.commons.tools.page.PageData + **/ + PageData listOfItems(Map params); + + /** + * @Description 项目对应的议题处理流程 + * @Author songyunpeng + * @Date 2021/1/18 + * @Param [params] + * @return com.elink.esua.epdc.commons.tools.page.PageData + **/ + PageData listOfItemsHandle(Map params); + + + /** + * @Description 删除项目 + * @Author songyunpeng + * @Date 2021/1/18 + * @Param [eventsId] + * @return com.elink.esua.epdc.commons.tools.utils.Result + **/ + Result deleteItem(String itemId); +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/item/service/impl/MaintainEpdcItemServiceImpl.java b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/item/service/impl/MaintainEpdcItemServiceImpl.java new file mode 100644 index 00000000..3cbabf4d --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/java/com/elink/esua/epdc/maintain/modules/item/service/impl/MaintainEpdcItemServiceImpl.java @@ -0,0 +1,73 @@ +package com.elink.esua.epdc.maintain.modules.item.service.impl; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.item.result.ItemHandleProgressResultDTO; +import com.elink.esua.epdc.maintain.modules.item.dao.ItemSummaryHandleProcessDao; +import com.elink.esua.epdc.maintain.modules.item.dao.MaintainEpdcItemDao; +import com.elink.esua.epdc.maintain.modules.item.dto.ItemSummaryDTO; +import com.elink.esua.epdc.maintain.modules.item.entity.ItemSummaryHandleProcessEntity; +import com.elink.esua.epdc.maintain.modules.item.entity.MaintainEpdcItemEntity; +import com.elink.esua.epdc.maintain.modules.item.service.MaintainEpdcItemService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * @author Liuchuang + */ +@Service +public class MaintainEpdcItemServiceImpl extends BaseServiceImpl implements MaintainEpdcItemService { + + @Autowired + private MaintainEpdcItemDao maintainEpdcItemDao; + + + @Autowired + private ItemSummaryHandleProcessDao itemSummaryHandleProcessDao; + + @Override + public PageData listOfItems(Map params) { + IPage page = getPage(params); + List list = maintainEpdcItemDao.selectListOfItem(params); + return new PageData<>(list, page.getTotal()); + } + + @Override + public PageData listOfItemsHandle(Map params) { + IPage page = getPage(params); + List list = itemSummaryHandleProcessDao.selectListOfItemsHandle(params); + return new PageData<>(list, page.getTotal()); + } + + @Override + @Transactional + public Result deleteItem(String itemId) { + maintainEpdcItemDao.deleteById(itemId); + /* 删除项目流程,流程对应部门表 项目部门评价表 */ + //获取项目处理流程 + Map params = new HashMap<>(); + params.put("ITEM_ID",itemId); + List itemSummaryHandleProcessEntities = itemSummaryHandleProcessDao.selectByMap(params); + if(itemSummaryHandleProcessEntities.size()!=0){ + List ids = itemSummaryHandleProcessEntities.stream().map(BaseEpdcEntity::getId).collect(Collectors.toList()); + //删除项目处理流程表 + itemSummaryHandleProcessDao.deleteBatchIds(ids); + } + //删除流程对应部门表 + baseDao.deleteItemDeptByItemId(itemId); + //删除部门评价表 + baseDao.deleteItemEvaluateByItemId(itemId); + return new Result(); + } + + +} diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/resources/application.yml b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/resources/application.yml new file mode 100644 index 00000000..320469f8 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/resources/application.yml @@ -0,0 +1,20 @@ +mybatis-plus: + mapper-locations: classpath*:/mapper/**/*.xml + #实体扫描,多个package用逗号或者分号分隔 + typeAliasesPackage: com.elink.esua.epdc.maintain.modules.*.entity + global-config: + #数据库相关配置 + db-config: + #主键类型 AUTO:"数据库ID自增", INPUT:"用户输入ID", ID_WORKER:"全局唯一ID (数字类型唯一ID)", UUID:"全局唯一ID UUID"; + id-type: UUID + #字段策略 IGNORED:"忽略判断",NOT_NULL:"非 NULL 判断"),NOT_EMPTY:"非空判断" + field-strategy: NOT_NULL + #驼峰下划线转换 + column-underline: true + banner: false + #原生配置 + configuration: + map-underscore-to-camel-case: true + cache-enabled: false + call-setters-on-nulls: true + jdbc-type-for-null: 'null' \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/resources/mapper/events/MaintainEpdcEventsDao.xml b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/resources/mapper/events/MaintainEpdcEventsDao.xml new file mode 100644 index 00000000..34fccd8b --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/resources/mapper/events/MaintainEpdcEventsDao.xml @@ -0,0 +1,22 @@ + + + + + + diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/resources/mapper/issue/IssueSummaryHandleDao.xml b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/resources/mapper/issue/IssueSummaryHandleDao.xml new file mode 100644 index 00000000..18634095 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/resources/mapper/issue/IssueSummaryHandleDao.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/resources/mapper/issue/MaintainEpdcIssueDao.xml b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/resources/mapper/issue/MaintainEpdcIssueDao.xml new file mode 100644 index 00000000..246cf840 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/resources/mapper/issue/MaintainEpdcIssueDao.xml @@ -0,0 +1,22 @@ + + + + + + diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/resources/mapper/item/ItemSummaryDeptDao.xml b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/resources/mapper/item/ItemSummaryDeptDao.xml new file mode 100644 index 00000000..211f3b5d --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/resources/mapper/item/ItemSummaryDeptDao.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/resources/mapper/item/ItemSummaryHandleProcessDao.xml b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/resources/mapper/item/ItemSummaryHandleProcessDao.xml new file mode 100644 index 00000000..d2b427df --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/resources/mapper/item/ItemSummaryHandleProcessDao.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/resources/mapper/item/MaintainEpdcItemDao.xml b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/resources/mapper/item/MaintainEpdcItemDao.xml new file mode 100644 index 00000000..69a8462d --- /dev/null +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-maintain/src/main/resources/mapper/item/MaintainEpdcItemDao.xml @@ -0,0 +1,28 @@ + + + + + + update epdc_item_dept set DEL_FLAG = '1',UPDATED_TIME = now() where ITEM_ID = #{itemId} + + + update epdc_item_evaluate_dept set DEL_FLAG = '1',UPDATED_TIME = now() where ITEM_ID = #{itemId} + + + diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/pom.xml b/esua-epdc/epdc-module/epdc-events/epdc-events-server/pom.xml index 0ccf1df1..b36a34ce 100644 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/pom.xml +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/pom.xml @@ -86,6 +86,13 @@ rocketmq-spring-boot-starter 2.0.2 + + + com.esua.epdc + epdc-events-maintain + 1.0.0 + + diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/application.yml b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/application.yml index 459b80f5..0bc50381 100644 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/application.yml +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/application.yml @@ -68,7 +68,7 @@ management: show-details: ALWAYS mybatis-plus: - mapper-locations: classpath:/mapper/**/*.xml + mapper-locations: classpath*:/mapper/**/*.xml #实体扫描,多个package用逗号或者分号分隔 typeAliasesPackage: com.elink.esua.epdc.modules.*.entity global-config: diff --git a/esua-epdc/epdc-module/epdc-events/pom.xml b/esua-epdc/epdc-module/epdc-events/pom.xml index 7a601fac..ef1674f9 100644 --- a/esua-epdc/epdc-module/epdc-events/pom.xml +++ b/esua-epdc/epdc-module/epdc-events/pom.xml @@ -14,6 +14,7 @@ epdc-events-client epdc-events-server + epdc-events-maintain