37 changed files with 1833 additions and 1 deletions
@ -0,0 +1,110 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" |
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|||
<parent> |
|||
<artifactId>epdc-events</artifactId> |
|||
<groupId>com.esua.epdc</groupId> |
|||
<version>1.0.0</version> |
|||
</parent> |
|||
<modelVersion>4.0.0</modelVersion> |
|||
|
|||
<artifactId>epdc-events-maintain</artifactId> |
|||
<description>事件维护模块</description> |
|||
<packaging>jar</packaging> |
|||
|
|||
<dependencies> |
|||
<dependency> |
|||
<groupId>com.esua.epdc</groupId> |
|||
<artifactId>epdc-events-client</artifactId> |
|||
<version>1.0.0</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.esua.epdc</groupId> |
|||
<artifactId>epdc-commons-tools</artifactId> |
|||
<version>1.0.0</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.esua.epdc</groupId> |
|||
<artifactId>epdc-commons-mybatis</artifactId> |
|||
<version>${project.version}</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.esua.epdc</groupId> |
|||
<artifactId>epdc-commons-api-version-control</artifactId> |
|||
<version>${project.version}</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.projectlombok</groupId> |
|||
<artifactId>lombok</artifactId> |
|||
<scope>provided</scope> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-autoconfigure</artifactId> |
|||
<scope>compile</scope> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-web</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework</groupId> |
|||
<artifactId>spring-context-support</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.apache.rocketmq</groupId> |
|||
<artifactId>rocketmq-spring-boot-starter</artifactId> |
|||
</dependency> |
|||
</dependencies> |
|||
|
|||
<build> |
|||
<finalName>${project.artifactId}</finalName> |
|||
<plugins> |
|||
<plugin> |
|||
<groupId>org.apache.maven.plugins</groupId> |
|||
<artifactId>maven-surefire-plugin</artifactId> |
|||
<configuration> |
|||
<skipTests>true</skipTests> |
|||
</configuration> |
|||
</plugin> |
|||
<plugin> |
|||
<groupId>org.apache.maven.plugins</groupId> |
|||
<artifactId>maven-deploy-plugin</artifactId> |
|||
<configuration> |
|||
<skip>true</skip> |
|||
</configuration> |
|||
</plugin> |
|||
<plugin> |
|||
<groupId>com.spotify</groupId> |
|||
<artifactId>dockerfile-maven-plugin</artifactId> |
|||
</plugin> |
|||
</plugins> |
|||
|
|||
<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory> |
|||
|
|||
<resources> |
|||
<resource> |
|||
<filtering>true</filtering> |
|||
<directory>${basedir}/src/main/resources</directory> |
|||
<includes> |
|||
<include>application.yml</include> |
|||
<include>**/*.properties</include> |
|||
<include>logback-spring.xml</include> |
|||
<include>registry.conf</include> |
|||
<include>mapper/**/*.xml</include> |
|||
</includes> |
|||
</resource> |
|||
<resource> |
|||
<directory>${basedir}/src/main/resources</directory> |
|||
<excludes> |
|||
<exclude>**/application*.yml</exclude> |
|||
<exclude>**/*.properties</exclude> |
|||
<exclude>logback-spring.xml</exclude> |
|||
<exclude>registry.conf</exclude> |
|||
</excludes> |
|||
</resource> |
|||
</resources> |
|||
</build> |
|||
|
|||
</project> |
@ -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<com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.events.EpdcEventsDTO>> |
|||
**/ |
|||
@GetMapping("pageEvents") |
|||
public Result<PageData<EpdcEventsSummaryDTO>> pageEvents(@RequestParam Map<String, Object> params){ |
|||
PageData<EpdcEventsSummaryDTO> page = maintainEpdcEventsService.listOfEvents(params); |
|||
return new Result<PageData<EpdcEventsSummaryDTO>>().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]); |
|||
} |
|||
} |
@ -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<MaintainEpdcEventsEntity> { |
|||
/** |
|||
* @Description 事件列表 |
|||
* @Author songyunpeng |
|||
* @Date 2021/1/18 |
|||
* @Param [params] |
|||
* @return java.util.List<com.elink.esua.epdc.dto.events.EpdcEventsDTO> |
|||
**/ |
|||
List<EpdcEventsSummaryDTO> selectListOfEvents(Map<String, Object> params); |
|||
} |
@ -0,0 +1,61 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
|
|||
} |
@ -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; |
|||
} |
@ -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<MaintainEpdcEventsEntity> { |
|||
|
|||
/** |
|||
* @Description 事件列表 |
|||
* @Author songyunpeng |
|||
* @Date 2021/1/18 |
|||
* @Param [params] |
|||
* @return com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.events.EpdcEventsDTO> |
|||
**/ |
|||
PageData<EpdcEventsSummaryDTO> listOfEvents(Map<String, Object> params); |
|||
|
|||
/** |
|||
* @Description 删除事件 |
|||
* @Author songyunpeng |
|||
* @Date 2021/1/18 |
|||
* @Param [eventsId] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
**/ |
|||
Result deleteEvents(String eventsId); |
|||
} |
@ -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<MaintainEpdcEventsDao, MaintainEpdcEventsEntity> implements MaintainEpdcEventsService { |
|||
|
|||
@Autowired |
|||
private MaintainEpdcEventsDao maintainEpdcEventsDao; |
|||
|
|||
@Autowired |
|||
private MaintainEpdcIssueDao maintainEpdcIssueDao; |
|||
|
|||
|
|||
@Override |
|||
public PageData<EpdcEventsSummaryDTO> listOfEvents(Map<String, Object> params) { |
|||
IPage<EpdcEventsSummaryDTO> page = getPage(params); |
|||
List<EpdcEventsSummaryDTO> list = baseDao.selectListOfEvents(params); |
|||
return new PageData<>(list, page.getTotal()); |
|||
} |
|||
|
|||
|
|||
@Override |
|||
public Result deleteEvents(String eventsId) { |
|||
Map<String,Object> params = new HashMap<>(); |
|||
params.put("EVENT_ID",eventsId); |
|||
List<MaintainEpdcIssueEntity> issueSummaryEntities = maintainEpdcIssueDao.selectByMap(params); |
|||
if(issueSummaryEntities!=null && issueSummaryEntities.size()>0){ |
|||
return new Result().error("该事件下存在议题,请先删除对应议题"); |
|||
} |
|||
return new Result().ok(baseDao.deleteById(eventsId)); |
|||
} |
|||
|
|||
} |
@ -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<com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.issue.IssueDTO>> |
|||
**/ |
|||
@GetMapping("pageIssues") |
|||
public Result<PageData<IssueSummaryDTO>> pageIssues(@RequestParam Map<String, Object> params){ |
|||
PageData<IssueSummaryDTO> page = maintainEpdcIssueService.listOfIssues(params); |
|||
return new Result<PageData<IssueSummaryDTO>>().ok(page); |
|||
} |
|||
|
|||
/** |
|||
* @Description 议题对应的处理流程列表 |
|||
* @Author songyunpeng |
|||
* @Date 2021/1/18 |
|||
* @Param [params] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.issue.IssueDTO>> |
|||
**/ |
|||
@GetMapping("pageIssuesHandle") |
|||
public Result<PageData<IssueProgressResultDTO>> pageIssuesHandle(@RequestParam Map<String, Object> params){ |
|||
PageData<IssueProgressResultDTO> page = maintainEpdcIssueService.listOfIssuesHandle(params); |
|||
return new Result<PageData<IssueProgressResultDTO>>().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]); |
|||
} |
|||
} |
@ -0,0 +1,45 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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<IssueSummaryHandleEntity> { |
|||
|
|||
/** |
|||
* @Description 议题处理流程 |
|||
* @Author songyunpeng |
|||
* @Date 2021/1/18 |
|||
* @Param [params] |
|||
* @return java.util.List<com.elink.esua.epdc.dto.issue.result.IssueProgressResultDTO> |
|||
**/ |
|||
List<IssueProgressResultDTO> selectListOfIssuesHandle(Map<String, Object> params); |
|||
} |
@ -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<MaintainEpdcIssueEntity> { |
|||
/** |
|||
* @Description 议题列表 |
|||
* @Author songyunpeng |
|||
* @Date 2021/1/18 |
|||
* @Param [params] |
|||
* @return java.util.List<com.elink.esua.epdc.dto.issue.IssueDTO> |
|||
**/ |
|||
List<IssueSummaryDTO> selectListOfIssues(Map<String, Object> params); |
|||
} |
@ -0,0 +1,63 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,72 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
} |
@ -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; |
|||
} |
@ -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<MaintainEpdcIssueEntity> { |
|||
/** |
|||
* @Description 议题列表 |
|||
* @Author songyunpeng |
|||
* @Date 2021/1/18 |
|||
* @Param [params] |
|||
* @return com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.issue.IssueDTO> |
|||
**/ |
|||
PageData<IssueSummaryDTO> listOfIssues(Map<String, Object> params); |
|||
|
|||
/** |
|||
* @Description 议题处理流程 |
|||
* @Author songyunpeng |
|||
* @Date 2021/1/18 |
|||
* @Param [params] |
|||
* @return com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.issue.result.IssueProgressResultDTO> |
|||
**/ |
|||
PageData<IssueProgressResultDTO> listOfIssuesHandle(Map<String, Object> params); |
|||
/** |
|||
* @Description 删除议题 |
|||
* @Author songyunpeng |
|||
* @Date 2021/1/18 |
|||
* @Param [eventsId] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
**/ |
|||
Result deleteIssue(String issueId); |
|||
} |
@ -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<MaintainEpdcIssueDao, MaintainEpdcIssueEntity> implements MaintainEpdcIssueService { |
|||
|
|||
@Autowired |
|||
private MaintainEpdcIssueDao maintainEpdcIssueDao; |
|||
@Autowired |
|||
private MaintainEpdcItemDao maintainEpdcItemDao; |
|||
@Autowired |
|||
private IssueSummaryHandleDao issueSummaryHandleDao; |
|||
|
|||
@Override |
|||
public PageData<IssueSummaryDTO> listOfIssues(Map<String, Object> params) { |
|||
IPage<IssueSummaryDTO> page = getPage(params); |
|||
List<IssueSummaryDTO> list = maintainEpdcIssueDao.selectListOfIssues(params); |
|||
return new PageData<>(list, page.getTotal()); |
|||
} |
|||
|
|||
|
|||
@Override |
|||
public PageData<IssueProgressResultDTO> listOfIssuesHandle(Map<String, Object> params) { |
|||
IPage<IssueProgressResultDTO> page = getPage(params); |
|||
List<IssueProgressResultDTO> list = issueSummaryHandleDao.selectListOfIssuesHandle(params); |
|||
return new PageData<>(list, page.getTotal()); |
|||
} |
|||
|
|||
@Override |
|||
public Result deleteIssue(String issueId) { |
|||
Map<String,Object> params = new HashMap<>(); |
|||
params.put("ISSUE_ID",issueId); |
|||
List<MaintainEpdcItemEntity> itemSummaryEntities = maintainEpdcItemDao.selectByMap(params); |
|||
if(itemSummaryEntities!=null && itemSummaryEntities.size()>0){ |
|||
return new Result().error("该议题下存在项目,请先删除对应项目"); |
|||
} |
|||
maintainEpdcIssueDao.deleteById(issueId); |
|||
//删除议题处理流程表
|
|||
Map<String,Object> params2 = new HashMap<>(); |
|||
params2.put("ISSUE_ID",issueId); |
|||
List<IssueSummaryHandleEntity> issueSummaryHandleEntities = issueSummaryHandleDao.selectByMap(params2); |
|||
if(issueSummaryHandleEntities.size()!=0){ |
|||
List<String> ids = issueSummaryHandleEntities.stream().map(BaseEpdcEntity::getId).collect(Collectors.toList()); |
|||
//删除项目处理流程表
|
|||
issueSummaryHandleDao.deleteBatchIds(ids); |
|||
} |
|||
return new Result(); |
|||
} |
|||
|
|||
} |
@ -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<com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.issue.IssueDTO>> |
|||
**/ |
|||
@GetMapping("pageItems") |
|||
public Result<PageData<ItemSummaryDTO>> pageItems(@RequestParam Map<String, Object> params){ |
|||
PageData<ItemSummaryDTO> page = maintainEpdcItemService.listOfItems(params); |
|||
return new Result<PageData<ItemSummaryDTO>>().ok(page); |
|||
} |
|||
|
|||
/** |
|||
* @Description 项目对应的流程处理列表 |
|||
* @Author songyunpeng |
|||
* @Date 2021/1/18 |
|||
* @Param [params] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.issue.IssueDTO>> |
|||
**/ |
|||
@GetMapping("pageItemsHandle") |
|||
public Result<PageData<ItemHandleProgressResultDTO>> pageItemsHandle(@RequestParam Map<String, Object> params){ |
|||
PageData<ItemHandleProgressResultDTO> page = maintainEpdcItemService.listOfItemsHandle(params); |
|||
return new Result<PageData<ItemHandleProgressResultDTO>>().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]); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,33 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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<ItemSummaryDeptEntity> { |
|||
|
|||
} |
@ -0,0 +1,45 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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<ItemSummaryHandleProcessEntity> { |
|||
|
|||
/** |
|||
* @Description 项目处理流程 |
|||
* @Author songyunpeng |
|||
* @Date 2021/1/18 |
|||
* @Param [params] |
|||
* @return java.util.List<com.elink.esua.epdc.dto.item.result.ItemHandleProgressResultDTO> |
|||
**/ |
|||
List<ItemHandleProgressResultDTO> selectListOfItemsHandle(Map<String, Object> params); |
|||
} |
@ -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<MaintainEpdcItemEntity> { |
|||
|
|||
/** |
|||
* @Description 项目列表 |
|||
* @Author songyunpeng |
|||
* @Date 2021/1/18 |
|||
* @Param [params] |
|||
* @return java.util.List<com.elink.esua.epdc.dto.issue.IssueDTO> |
|||
**/ |
|||
List<ItemSummaryDTO> selectListOfItem(Map<String, Object> 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); |
|||
} |
@ -0,0 +1,69 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
} |
@ -0,0 +1,60 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
} |
@ -0,0 +1,68 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
} |
@ -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; |
|||
} |
@ -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<MaintainEpdcItemEntity> { |
|||
/** |
|||
* @Description 项目列表 |
|||
* @Author songyunpeng |
|||
* @Date 2021/1/18 |
|||
* @Param [params] |
|||
* @return com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.summary.modules.events.dto.ItemSummaryDTO> |
|||
**/ |
|||
PageData<ItemSummaryDTO> listOfItems(Map<String, Object> params); |
|||
|
|||
/** |
|||
* @Description 项目对应的议题处理流程 |
|||
* @Author songyunpeng |
|||
* @Date 2021/1/18 |
|||
* @Param [params] |
|||
* @return com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.item.result.ItemHandleProgressResultDTO> |
|||
**/ |
|||
PageData<ItemHandleProgressResultDTO> listOfItemsHandle(Map<String, Object> params); |
|||
|
|||
|
|||
/** |
|||
* @Description 删除项目 |
|||
* @Author songyunpeng |
|||
* @Date 2021/1/18 |
|||
* @Param [eventsId] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
**/ |
|||
Result deleteItem(String itemId); |
|||
} |
@ -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<MaintainEpdcItemDao, MaintainEpdcItemEntity> implements MaintainEpdcItemService { |
|||
|
|||
@Autowired |
|||
private MaintainEpdcItemDao maintainEpdcItemDao; |
|||
|
|||
|
|||
@Autowired |
|||
private ItemSummaryHandleProcessDao itemSummaryHandleProcessDao; |
|||
|
|||
@Override |
|||
public PageData<ItemSummaryDTO> listOfItems(Map<String, Object> params) { |
|||
IPage<ItemSummaryDTO> page = getPage(params); |
|||
List<ItemSummaryDTO> list = maintainEpdcItemDao.selectListOfItem(params); |
|||
return new PageData<>(list, page.getTotal()); |
|||
} |
|||
|
|||
@Override |
|||
public PageData<ItemHandleProgressResultDTO> listOfItemsHandle(Map<String, Object> params) { |
|||
IPage<ItemHandleProgressResultDTO> page = getPage(params); |
|||
List<ItemHandleProgressResultDTO> list = itemSummaryHandleProcessDao.selectListOfItemsHandle(params); |
|||
return new PageData<>(list, page.getTotal()); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional |
|||
public Result deleteItem(String itemId) { |
|||
maintainEpdcItemDao.deleteById(itemId); |
|||
/* 删除项目流程,流程对应部门表 项目部门评价表 */ |
|||
//获取项目处理流程
|
|||
Map<String,Object> params = new HashMap<>(); |
|||
params.put("ITEM_ID",itemId); |
|||
List<ItemSummaryHandleProcessEntity> itemSummaryHandleProcessEntities = itemSummaryHandleProcessDao.selectByMap(params); |
|||
if(itemSummaryHandleProcessEntities.size()!=0){ |
|||
List<String> ids = itemSummaryHandleProcessEntities.stream().map(BaseEpdcEntity::getId).collect(Collectors.toList()); |
|||
//删除项目处理流程表
|
|||
itemSummaryHandleProcessDao.deleteBatchIds(ids); |
|||
} |
|||
//删除流程对应部门表
|
|||
baseDao.deleteItemDeptByItemId(itemId); |
|||
//删除部门评价表
|
|||
baseDao.deleteItemEvaluateByItemId(itemId); |
|||
return new Result(); |
|||
} |
|||
|
|||
|
|||
} |
@ -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' |
@ -0,0 +1,22 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.elink.esua.epdc.maintain.modules.events.dao.MaintainEpdcEventsDao"> |
|||
<select id="selectListOfEvents" resultType="com.elink.esua.epdc.maintain.modules.events.dto.EpdcEventsSummaryDTO"> |
|||
SELECT |
|||
temp.id, |
|||
temp.nick_Name AS nickName, |
|||
temp.event_content AS eventContent, |
|||
temp.CREATED_TIME AS createdTime, |
|||
(select count(1) from epdc_issue ei where ei.DEL_FLAG ='0' and ei.EVENT_ID = temp.ID)issueCount, |
|||
temp.EVENT_STATE |
|||
FROM |
|||
epdc_events temp |
|||
WHERE |
|||
temp.DEL_FLAG = '0' |
|||
<if test="eventContent != null and eventContent != ''"> |
|||
AND temp.event_content like concat('%', #{eventContent}, '%') |
|||
</if> |
|||
ORDER BY issueCount DESC,createdTime desc |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,35 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.elink.esua.epdc.maintain.modules.issue.dao.IssueSummaryHandleDao"> |
|||
|
|||
<resultMap id="issueProgressMap" type="com.elink.esua.epdc.dto.issue.result.IssueProgressResultDTO"> |
|||
<result property="id" column="ID"/> |
|||
<result property="state" column="STATE"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="advice" column="ADVICE"/> |
|||
<result property="handlerDept" column="HANDLER_DEPT"/> |
|||
<result property="mobile" column="MOBILE"/> |
|||
<result property="groupName" column="GROUP_NAME"/> |
|||
<result property="eventId" column="EVENT_ID"/> |
|||
</resultMap> |
|||
<select id="selectListOfIssuesHandle" resultMap="issueProgressMap"> |
|||
SELECT |
|||
hd.ID, |
|||
hd.STATE, |
|||
hd.CREATED_TIME, |
|||
hd.ADVICE, |
|||
hd.HANDLER_DEPT, |
|||
hd.MOBILE, |
|||
hd.GROUP_NAME, |
|||
ei.EVENT_ID |
|||
FROM |
|||
epdc_issue_handle hd |
|||
left join epdc_issue ei on ei.ID = hd.ISSUE_ID |
|||
WHERE |
|||
hd.DEL_FLAG = '0' and ei.DEL_FLAG = '0' |
|||
AND hd.ISSUE_ID = #{issueId} |
|||
ORDER BY |
|||
hd.CREATED_TIME DESC |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,22 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.elink.esua.epdc.maintain.modules.issue.dao.MaintainEpdcIssueDao"> |
|||
<select id="selectListOfIssues" resultType="com.elink.esua.epdc.maintain.modules.issue.dto.IssueSummaryDTO"> |
|||
SELECT |
|||
ei.id, |
|||
ei.nick_Name AS nickName, |
|||
ei.ISSUE_CONTENT AS issueContent, |
|||
ei.CREATED_TIME AS createdTime, |
|||
(select count(1) from epdc_item ei2 where ei2.DEL_FLAG ='0' and ei2.ISSUE_ID = ei.ID)itemCount, |
|||
ei.ISSUE_STATE |
|||
FROM |
|||
epdc_issue ei |
|||
WHERE |
|||
ei.DEL_FLAG = '0' and ei.EVENT_ID = #{eventId} |
|||
<if test="issueContent != null and issueContent != ''"> |
|||
AND ei.ISSUE_CONTENT like concat('%', #{issueContent}, '%') |
|||
</if> |
|||
ORDER BY itemCount DESC,createdTime desc |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,6 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.elink.esua.epdc.maintain.modules.item.dao.ItemSummaryDeptDao"> |
|||
|
|||
</mapper> |
@ -0,0 +1,30 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.elink.esua.epdc.maintain.modules.item.dao.ItemSummaryHandleProcessDao"> |
|||
<resultMap id="itemHandleMapByWork" type="com.elink.esua.epdc.dto.item.result.ItemHandleProgressResultDTO"> |
|||
<result property="id" column="ID"/> |
|||
<result property="createdTime" column="createdTime"/> |
|||
<result property="advice" column="advice"/> |
|||
<result property="handlerDept" column="handlerDept"/> |
|||
<result property="state" column="STATE"/> |
|||
<result property="issueId" column="ISSUE_ID"/> |
|||
</resultMap> |
|||
<select id="selectListOfItemsHandle" resultMap="itemHandleMapByWork"> |
|||
SELECT |
|||
hp.ID, |
|||
hp.CREATED_TIME AS createdTime, |
|||
hp.HANDLE_ADVICE AS advice, |
|||
hp.HANDLER_DEPT AS handlerDept, |
|||
hp.STATE, |
|||
ei.ISSUE_ID |
|||
FROM |
|||
epdc_item_handle_process hp |
|||
left join epdc_item ei on ei.ID = hp.ITEM_ID |
|||
WHERE |
|||
hp.DEL_FLAG = '0' and ei.DEL_FLAG = '0' |
|||
AND hp.ITEM_ID = #{itemId} |
|||
ORDER BY |
|||
createdTime DESC |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,28 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.elink.esua.epdc.maintain.modules.item.dao.MaintainEpdcItemDao"> |
|||
<update id="deleteItemDeptByItemId"> |
|||
update epdc_item_dept set DEL_FLAG = '1',UPDATED_TIME = now() where ITEM_ID = #{itemId} |
|||
</update> |
|||
<update id="deleteItemEvaluateByItemId"> |
|||
update epdc_item_evaluate_dept set DEL_FLAG = '1',UPDATED_TIME = now() where ITEM_ID = #{itemId} |
|||
</update> |
|||
<select id="selectListOfItem" resultType="com.elink.esua.epdc.maintain.modules.item.dto.ItemSummaryDTO"> |
|||
SELECT |
|||
ei.id, |
|||
ei.nick_Name AS nickName, |
|||
ei.ITEM_CONTENT AS itemContent, |
|||
ei.CREATED_TIME AS createdTime, |
|||
ei.ITEM_STATE, |
|||
ei.EVENT_ID |
|||
FROM |
|||
epdc_item ei |
|||
WHERE |
|||
ei.DEL_FLAG = '0' and ei.ISSUE_ID = #{issueId} |
|||
<if test="itemContent != null and itemContent != ''"> |
|||
AND ei.ITEM_CONTENT like concat('%', #{itemContent}, '%') |
|||
</if> |
|||
ORDER BY createdTime DESC |
|||
</select> |
|||
</mapper> |
Loading…
Reference in new issue