Browse Source

党群议事UI变更设计

master
zhaoqifeng 4 years ago
parent
commit
e000b43a21
  1. 4
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java
  2. 5
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java
  3. 6
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java
  4. 9
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java
  5. 9
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java
  6. 44
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java
  7. 16
      epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml
  8. 0
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ShiftProjectListFromDTO.java
  9. 32
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/PendingResultDTO.java
  10. 53
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ResolvedResultDTO.java
  11. 53
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/UnResolvedResultDTO.java
  12. 31
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java
  13. 39
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java
  14. 37
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java
  15. 33
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java
  16. 27
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java
  17. 47
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java
  18. 62
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml
  19. 36
      epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/controller/IssueController.java
  20. 30
      epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/IssueService.java
  21. 107
      epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java

4
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java

@ -336,4 +336,8 @@ public interface GovIssueOpenFeignClient {
*/
@PostMapping(value = "/gov/issue/issueprojectcategorydict/getprojectcategory")
Result<List<ProjectCategoryDisPoseResultDTO>> getProjectCategory(@RequestBody List<ProjectCategoryDisPoseResultDTO> list);
@PostMapping("/gov/issue/issue/unresolvedlist")
Result<List<UnResolvedResultDTO>> getUnresolvedList(@RequestBody ShiftProjectListFromDTO formDTO);
}

5
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java

@ -276,4 +276,9 @@ public class GovIssueOpenFeignClientFallBack implements GovIssueOpenFeignClient
public Result<List<ProjectCategoryDisPoseResultDTO>> getProjectCategory(List<ProjectCategoryDisPoseResultDTO> list) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "getProjectCategory", list);
}
@Override
public Result<List<UnResolvedResultDTO>> getUnresolvedList(ShiftProjectListFromDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "getUnresolvedList", formDTO);
}
}

6
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java

@ -278,5 +278,11 @@ public class IssueController {
return new Result<List<CanEvaluateProjectCountBatchResultDTO>>().ok(issueService.canEvaluateProjectCountBatch(issueIds));
}
@PostMapping("unresolvedlist")
public Result<List<UnResolvedResultDTO>> getUnresolvedList(@RequestBody ShiftProjectListFromDTO formDTO){
return new Result<List<UnResolvedResultDTO>>().ok(issueService.getUnResolvedList(formDTO));
}
}

9
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java

@ -216,4 +216,13 @@ public interface IssueDao extends BaseDao<IssueEntity> {
* @Date 2020/12/25 14:12
**/
List<GridVotingIssueCountResultDTO> selectIssueRedDot(@Param("gridIdList") List<String> gridIdList);
/**
* 无需解决列表
* @author zhaoqifeng
* @date 2021/7/27 16:52
* @param gridId
* @return java.util.List<com.epmet.dto.result.UnResolvedResultDTO>
*/
List<UnResolvedResultDTO> selectUnResolvedList(@Param("gridId") String gridId);
}

9
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java

@ -341,4 +341,13 @@ public interface IssueService extends BaseService<IssueEntity> {
* @date 2021/5/11 4:50 下午
*/
List<CanEvaluateProjectCountBatchResultDTO> canEvaluateProjectCountBatch(List<String> issueIds);
/**
* 无需解决解决列表
* @author zhaoqifeng
* @date 2021/7/27 16:58
* @param fromDTO
* @return java.util.List<com.epmet.dto.result.UnResolvedResultDTO>
*/
List<UnResolvedResultDTO> getUnResolvedList(ShiftProjectListFromDTO fromDTO);
}

44
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java

@ -127,6 +127,8 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
private IssueVoteDetailDao issueVoteDetailDao;
@Autowired
private EpmetMessageOpenFeignClient messageOpenFeignClient;
@Autowired
private GovProjectOpenFeignClient govProjectOpenFeignClient;
@Value("${openapi.scan.server.url}")
@ -1507,4 +1509,46 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
return result;
}
/**
* 无需解决解决列表
*
* @param fromDTO
* @return java.util.List<com.epmet.dto.result.UnResolvedResultDTO>
* @author zhaoqifeng
* @date 2021/7/27 16:58
*/
@Override
public List<UnResolvedResultDTO> getUnResolvedList(ShiftProjectListFromDTO fromDTO) {
List<UnResolvedResultDTO> resultList = new ArrayList<>();
List<UnResolvedResultDTO> issueList = baseDao.selectUnResolvedList(fromDTO.getGridId());
if (CollectionUtils.isNotEmpty(issueList)) {
resultList.addAll(issueList);
}
List<UnResolvedResultDTO> projectList = govProjectOpenFeignClient.getUnResolvedList(fromDTO).getData();
if (CollectionUtils.isNotEmpty(projectList)) {
resultList.addAll(projectList);
}
if (CollectionUtils.isNotEmpty(resultList)) {
resultList = resultList.stream().sorted(Comparator.comparing(UnResolvedResultDTO::getClosedTime).reversed()).collect(Collectors.toList());
int fromIndex = (fromDTO.getPageNo() - NumConstant.ONE) * fromDTO.getPageSize();
int toIndex = fromDTO.getPageNo() * fromDTO.getPageSize();
if (fromIndex >= resultList.size()) {
return new ArrayList<>();
}
if (toIndex > resultList.size()) {
toIndex = resultList.size();
}
resultList = resultList.subList(fromIndex, toIndex);
}
return resultList;
}
public static void main(String[] args) {
List<String> list = new ArrayList<>();
list.add("1");
list.add("2");
list.add("3");
System.out.println(list.subList(0, 3));
}
}

16
epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml

@ -235,6 +235,7 @@
DEL_FLAG = '0'
AND GRID_ID = #{gridId}
AND ISSUE_STATUS = 'closed'
AND RESOLVE_TYPE = 'resolved'
ORDER BY
created_time DESC
LIMIT #{pageNo},
@ -561,4 +562,19 @@
GROUP BY
temp.gridId
</select>
<select id="selectUnResolvedList" resultType="com.epmet.dto.result.UnResolvedResultDTO">
SELECT
ID AS issueId,
IFNULL(ISSUE_TITLE,'') AS issueTitle,
IFNULL(CLOSE_REASON,'') AS solution,
UNIX_TIMESTAMP( CLOSED_TIME ) AS closedTime,
SOURCE_ID AS sourceId
FROM
issue
WHERE
DEL_FLAG = '0'
AND GRID_ID = #{gridId}
AND ISSUE_STATUS = 'closed'
AND RESOLVE_TYPE = 'unresolved'
</select>
</mapper>

0
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ShiftProjectListFromDTO.java → epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ShiftProjectListFromDTO.java

32
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/PendingResultDTO.java

@ -0,0 +1,32 @@
package com.epmet.dto.result;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
/**
* @author zhaoqifeng
* @dscription
* @date 2021/7/27 10:47
*/
@NoArgsConstructor
@Data
public class PendingResultDTO implements Serializable {
private static final long serialVersionUID = 2545519820222637112L;
private String issueId;
private String issueTitle;
private Long issueShiftedTime;
private String topicContent;
private List<String> currentHandleDepartMent;
private List<String> topicVoices;
private List<String> topicImgs;
@JsonIgnore
private String sourceId;
@JsonIgnore
private String projectId;
}

53
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ResolvedResultDTO.java

@ -0,0 +1,53 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @author zhaoqifeng
* @dscription
* @date 2021/7/27 13:55
*/
@Data
public class ResolvedResultDTO implements Serializable {
private static final long serialVersionUID = -6670213622289052352L;
/**
* 议题Id
*/
private String issueId;
/**
* 议题标题
*/
private String issueTitle;
/**
* 转成项目时间
*/
private Long closedTime;
/**
* 结案说明
*/
private String publicReply;
/**
* 来源id
*/
private String sourceId;
/**
* 话题图片
*/
private List<String> topicImgs;
/**
* 话题语音
*/
private List<String> topicVoices;
/**
* 话题内容
*/
private String topicContent;
}

53
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/UnResolvedResultDTO.java

@ -0,0 +1,53 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @author zhaoqifeng
* @dscription
* @date 2021/7/27 10:31
*/
@Data
public class UnResolvedResultDTO implements Serializable {
private static final long serialVersionUID = 3654271828450408782L;
/**
* 议题Id
*/
private String issueId;
/**
* 议题标题
*/
private String issueTitle;
/**
* 转成项目时间
*/
private Long closedTime;
/**
* 结案说明
*/
private String solution;
/**
* 来源id
*/
private String sourceId;
/**
* 话题图片
*/
private List<String> topicImgs;
/**
* 话题语音
*/
private List<String> topicVoices;
/**
* 话题内容
*/
private String topicContent;
}

31
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java

@ -92,4 +92,35 @@ public interface GovProjectOpenFeignClient {
*/
@PostMapping("gov/project/project/patrolproject")
Result<Integer> selectPatrolProject(@RequestBody PatrolProjectFormDTO formDTO);
/**
* 获取待处理列表
* @author zhaoqifeng
* @date 2021/7/27 14:55
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.PendingResultDTO>>
*/
@PostMapping("gov/project/project/pendinglist")
Result<List<PendingResultDTO>> getPendingList(@RequestBody ShiftProjectListFromDTO formDTO);
/**
* 已解决项目列表
* @author zhaoqifeng
* @date 2021/7/27 14:55
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.ResolvedResultDTO>>
*/
@PostMapping("gov/project/project/resolvedlist")
Result<List<ResolvedResultDTO>> getResolvedList(@RequestBody ShiftProjectListFromDTO formDTO);
/**
* 无需解决项目列表
* @author zhaoqifeng
* @date 2021/7/27 14:55
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.UnResolvedResultDTO>>
*/
@PostMapping("gov/project/project/unresolvedlist")
Result<List<UnResolvedResultDTO>> getUnResolvedList(@RequestBody ShiftProjectListFromDTO formDTO);
}

39
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java

@ -80,4 +80,43 @@ public class GovProjectOpenFeignClientFallback implements GovProjectOpenFeignCli
public Result<Integer> selectPatrolProject(PatrolProjectFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "selectPatrolProject", formDTO);
}
/**
* 获取待处理列表
*
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.dto.result.PendingResultDTO>>
* @author zhaoqifeng
* @date 2021/7/27 14:55
*/
@Override
public Result<List<PendingResultDTO>> getPendingList(ShiftProjectListFromDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "getPendingList", formDTO);
}
/**
* 已解决项目列表
*
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.dto.result.ResolvedResultDTO>>
* @author zhaoqifeng
* @date 2021/7/27 14:55
*/
@Override
public Result<List<ResolvedResultDTO>> getResolvedList(ShiftProjectListFromDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "getResolvedList", formDTO);
}
/**
* 无需解决项目列表
*
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.dto.result.UnResolvedResultDTO>>
* @author zhaoqifeng
* @date 2021/7/27 14:55
*/
@Override
public Result<List<UnResolvedResultDTO>> getUnResolvedList(ShiftProjectListFromDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "getUnResolvedList", formDTO);
}
}

37
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java

@ -234,4 +234,41 @@ public class ProjectController {
return new Result<Integer>().ok(projectService.selectPatrolProject(formDTO));
}
/**
* 获取待处理列表
* @author zhaoqifeng
* @date 2021/7/27 14:55
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.PendingResultDTO>>
*/
@PostMapping("pendinglist")
public Result<List<PendingResultDTO>> getPendingList(@RequestBody ShiftProjectListFromDTO formDTO){
return new Result<List<PendingResultDTO>>().ok(projectService.getPendingList(formDTO));
}
/**
* 已解决项目列表
* @author zhaoqifeng
* @date 2021/7/27 14:55
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.ResolvedResultDTO>>
*/
@PostMapping("resolvedlist")
public Result<List<ResolvedResultDTO>> getResolvedList(@RequestBody ShiftProjectListFromDTO formDTO){
return new Result<List<ResolvedResultDTO>>().ok(projectService.getResolvedListByGrid(formDTO));
}
/**
* 无需解决项目列表
* @author zhaoqifeng
* @date 2021/7/27 14:55
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.UnResolvedResultDTO>>
*/
@PostMapping("unresolvedlist")
public Result<List<UnResolvedResultDTO>> getUnResolvedList(@RequestBody ShiftProjectListFromDTO formDTO){
return new Result<List<UnResolvedResultDTO>>().ok(projectService.getUnResolvedListByGrid(formDTO));
}
}

33
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java

@ -173,4 +173,37 @@ public interface ProjectDao extends BaseDao<ProjectEntity> {
* @date 2021/7/1 10:16 上午
*/
Integer selectPatrolProject(PatrolProjectFormDTO formDTO);
/**
* 获取党建声音处理中列表
* @author zhaoqifeng
* @date 2021/7/27 10:28
* @param gridId
* @param pageNo
* @param pageSize
* @return java.util.List<com.epmet.dto.result.ShiftProjectListResultDTO>
*/
List<PendingResultDTO> selectPendingListByGrid(@Param("gridId")String gridId, @Param("pageNo") Integer pageNo,
@Param("pageSize") Integer pageSize);
/**
* 获取党建声音已结案列表
* @author zhaoqifeng
* @date 2021/7/27 10:28
* @param gridId
* @param pageNo
* @param pageSize
* @return java.util.List<com.epmet.dto.result.ShiftProjectListResultDTO>
*/
List<ResolvedResultDTO> selectResolvedListByGrid(@Param("gridId")String gridId, @Param("pageNo") Integer pageNo,
@Param("pageSize") Integer pageSize);
/**
* 无需解决列表
* @author zhaoqifeng
* @date 2021/7/27 14:38
* @param gridId
* @return java.util.List<com.epmet.dto.result.UnResolvedResultDTO>
*/
List<UnResolvedResultDTO> selectUnResolvedListByGrid(@Param("gridId")String gridId);
}

27
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java

@ -303,4 +303,31 @@ public interface ProjectService extends BaseService<ProjectEntity> {
* @date 2021/7/1 10:16 上午
*/
Integer selectPatrolProject(PatrolProjectFormDTO formDTO);
/**
* 获取待处理列表
* @author zhaoqifeng
* @date 2021/7/27 14:18
* @param fromDTO
* @return java.util.List<com.epmet.dto.result.PendingResultDTO>
*/
List<PendingResultDTO> getPendingList(ShiftProjectListFromDTO fromDTO);
/**
* 已解决项目列表
* @author zhaoqifeng
* @date 2021/7/27 14:36
* @param fromDTO
* @return java.util.List<com.epmet.dto.result.ResolvedResultDTO>
*/
List<ResolvedResultDTO> getResolvedListByGrid(ShiftProjectListFromDTO fromDTO);
/**
* 无需解决项目列表
* @author zhaoqifeng
* @date 2021/7/27 14:40
* @param fromDTO
* @return java.util.List<com.epmet.dto.result.UnResolvedResultDTO>
*/
List<UnResolvedResultDTO> getUnResolvedListByGrid(ShiftProjectListFromDTO fromDTO);
}

47
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java

@ -2706,4 +2706,51 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
return baseDao.selectPatrolProject(formDTO);
}
/**
* 获取待处理列表
*
* @param fromDTO
* @return java.util.List<com.epmet.dto.result.PendingResultDTO>
* @author zhaoqifeng
* @date 2021/7/27 14:18
*/
@Override
public List<PendingResultDTO> getPendingList(ShiftProjectListFromDTO fromDTO) {
int pageIndex = (fromDTO.getPageNo() - NumConstant.ONE) * fromDTO.getPageSize();
List<PendingResultDTO> list = baseDao.selectPendingListByGrid(fromDTO.getGridId(), pageIndex, fromDTO.getPageSize());
list.forEach(item -> {
ProjectDTO dto = new ProjectDTO();
dto.setId(item.getProjectId());
item.setCurrentHandleDepartMent(baseDao.selectDepartmentNameList(dto));
});
return list;
}
/**
* 已解决项目列表
*
* @param fromDTO
* @return java.util.List<com.epmet.dto.result.ResolvedResultDTO>
* @author zhaoqifeng
* @date 2021/7/27 14:36
*/
@Override
public List<ResolvedResultDTO> getResolvedListByGrid(ShiftProjectListFromDTO fromDTO) {
int pageIndex = (fromDTO.getPageNo() - NumConstant.ONE) * fromDTO.getPageSize();
return baseDao.selectResolvedListByGrid(fromDTO.getGridId(), pageIndex, fromDTO.getPageSize());
}
/**
* 无需解决项目列表
*
* @param fromDTO
* @return java.util.List<com.epmet.dto.result.ResolvedResultDTO>
* @author zhaoqifeng
* @date 2021/7/27 14:40
*/
@Override
public List<UnResolvedResultDTO> getUnResolvedListByGrid(ShiftProjectListFromDTO fromDTO) {
return baseDao.selectUnResolvedListByGrid(fromDTO.getGridId());
}
}

62
epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml

@ -316,5 +316,67 @@
AND ORIGIN = 'agency'
AND CREATED_BY = #{userId}
</select>
<select id="selectPendingListByGrid" resultType="com.epmet.dto.result.PendingResultDTO">
SELECT
a.ID AS projectId,
a.ORIGIN_ID AS issueId,
a.TITLE AS issueTitle,
UNIX_TIMESTAMP(a.CREATED_TIME) AS issueShiftedTime,
b.SOURCE_ID AS sourceId
FROM
project a
INNER JOIN project_related_personnel b ON a.ID = b.PROJECT_ID
AND b.SOURCE_TYPE = 'topic'
AND b.GRID_ID = #{gridId}
WHERE
a.DEL_FLAG = '0'
AND a.`STATUS` = 'pending'
AND a.ORIGIN = 'issue'
ORDER BY a.CREATED_TIME DESC
LIMIT #{pageNo}, #{pageSize}
</select>
<select id="selectResolvedListByGrid" resultType="com.epmet.dto.result.ResolvedResultDTO">
SELECT
a.ORIGIN_ID AS issueId,
a.TITLE AS issueTitle,
c.PUBLIC_REPLY AS publicReply,
UNIX_TIMESTAMP(a.UPDATED_TIME) AS closedTime,
b.SOURCE_ID AS sourceId
FROM
project a
INNER JOIN project_related_personnel b ON a.ID = b.PROJECT_ID
AND b.SOURCE_TYPE = 'topic'
AND b.GRID_ID = #{gridId}
LEFT JOIN project_process c ON a.ID = c.PROJECT_ID
AND c.OPERATION = 'close'
WHERE
a.DEL_FLAG = '0'
AND a.`STATUS` = 'closed'
AND a.ORIGIN = 'issue'
AND a.CLOSED_STATUS = 'resolved'
ORDER BY a.UPDATED_TIME DESC
LIMIT #{pageNo}, #{pageSize}
</select>
<select id="selectUnResolvedListByGrid" resultType="com.epmet.dto.result.UnResolvedResultDTO">
SELECT
a.ORIGIN_ID AS issueId,
a.TITLE AS issueTitle,
c.PUBLIC_REPLY AS solution,
UNIX_TIMESTAMP(a.UPDATED_TIME) AS closedTime,
b.SOURCE_ID AS sourceId
FROM
project a
INNER JOIN project_related_personnel b ON a.ID = b.PROJECT_ID
AND b.SOURCE_TYPE = 'topic'
AND b.GRID_ID = #{gridId}
LEFT JOIN project_process c ON a.ID = c.PROJECT_ID
AND c.OPERATION = 'close'
WHERE
a.DEL_FLAG = '0'
AND a.`STATUS` = 'closed'
AND a.ORIGIN = 'issue'
AND a.CLOSED_STATUS = 'unresolved'
ORDER BY a.UPDATED_TIME DESC
</select>
</mapper>

36
epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/controller/IssueController.java

@ -235,5 +235,41 @@ public class IssueController {
PublishSuggestionResultDTO resultDTO=issueService.publisSuggestion(formDTO);
return new Result<PublishSuggestionResultDTO>().ok(resultDTO);
}
/**
* 处理中列表
* @author zhaoqifeng
* @date 2021/7/27 17:50
* @param fromDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.PendingResultDTO>>
*/
@PostMapping("processing")
public Result<List<PendingResultDTO>> processingList(@RequestBody ShiftProjectListFromDTO fromDTO){
return new Result<List<PendingResultDTO>>().ok(issueService.getProcessing(fromDTO));
}
/**
* 已结案列表
* @author zhaoqifeng
* @date 2021/7/27 17:50
* @param fromDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.ResolvedResultDTO>>
*/
@PostMapping("closedproject")
public Result<List<ResolvedResultDTO>> closedProject(@RequestBody ShiftProjectListFromDTO fromDTO){
return new Result<List<ResolvedResultDTO>>().ok(issueService.getClosedProjectList(fromDTO));
}
/**
* 无需解决列表
* @author zhaoqifeng
* @date 2021/7/27 17:50
* @param fromDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.UnResolvedResultDTO>>
*/
@PostMapping("unreslovedlist")
public Result<List<UnResolvedResultDTO>> unResolvedList(@RequestBody ShiftProjectListFromDTO fromDTO){
return new Result<List<UnResolvedResultDTO>>().ok(issueService.getUnResolvedList(fromDTO));
}
}

30
epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/IssueService.java

@ -127,4 +127,34 @@ public interface IssueService {
* @date 2021.05.19 10:52
*/
List<ClosedIssueListResultDTO> getClosedList(CommonIssueListFormDTO issueListFormDTO);
/**
* 处理中项目列表
* @author zhaoqifeng
* @date 2021/7/26 17:46
* @param formDTO
* @return java.util.List<com.epmet.dto.result.ShiftProjectListResultDTO>
*/
List<PendingResultDTO> getProcessing(ShiftProjectListFromDTO formDTO);
/**
* 已结案项目列表
* @author zhaoqifeng
* @date 2021/7/27 15:51
* @param formDTO
* @return java.util.List<com.epmet.dto.result.ResolvedResultDTO>
*/
List<ResolvedResultDTO> getClosedProjectList(ShiftProjectListFromDTO formDTO);
/**
* 无需解决项目议题列表
* @author zhaoqifeng
* @date 2021/7/27 17:45
* @param formDTO
* @return java.util.List<com.epmet.dto.result.UnResolvedResultDTO>
*/
List<UnResolvedResultDTO> getUnResolvedList(ShiftProjectListFromDTO formDTO);
}

107
epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java

@ -54,6 +54,8 @@ public class IssueServiceImpl implements IssueService {
private LoginUserUtil loginUserUtil;
@Autowired
private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
@Autowired
private GovProjectOpenFeignClient govProjectOpenFeignClient;
@Autowired
private ResiGroupOpenFeignClient resiGroupOpenFeignClient;
@ -468,4 +470,109 @@ public class IssueServiceImpl implements IssueService {
return issueList;
}
/**
* 处理中项目列表
*
* @param formDTO
* @return java.util.List<com.epmet.dto.result.ShiftProjectListResultDTO>
* @author zhaoqifeng
* @date 2021/7/26 17:46
*/
@Override
public List<PendingResultDTO> getProcessing(ShiftProjectListFromDTO formDTO) {
List<PendingResultDTO> resultList = govProjectOpenFeignClient.getPendingList(formDTO).getData();
if (org.apache.commons.collections4.CollectionUtils.isEmpty(resultList)) {
return new ArrayList<>();
}
List<String> topicIds = resultList.stream().map(PendingResultDTO::getSourceId).collect(Collectors.toList());
TopicDetailBatchFormDTO form = new TopicDetailBatchFormDTO();
form.setTopicIdList(topicIds);
Result<List<ResiTopicDetailResultDTO>> topicDetailsResult = resiGroupOpenFeignClient.listTopicDetailsByIds(form);
if (!topicDetailsResult.success()) {
logger.error("调用resi-group批量查询详情失败");
} else {
List<ResiTopicDetailResultDTO> topicDetails = topicDetailsResult.getData();
HashMap<String, ResiTopicDetailResultDTO> rtm = convertTopicDetailList2Map(topicDetails);
resultList.forEach(vi -> {
ResiTopicDetailResultDTO rr = rtm.get(vi.getSourceId());
vi.setTopicImgs(rr == null ? new ArrayList<>() : rr.getTopicImgs());
vi.setTopicVoices(rr == null ? new ArrayList<>() : rr.getTopicImgs());
vi.setTopicContent(rr == null ? "" : rr.getTopicContent());
});
}
return resultList;
}
/**
* 已结案项目列表
*
* @param formDTO
* @return java.util.List<com.epmet.dto.result.ResolvedResultDTO>
* @author zhaoqifeng
* @date 2021/7/27 15:51
*/
@Override
public List<ResolvedResultDTO> getClosedProjectList(ShiftProjectListFromDTO formDTO) {
List<ResolvedResultDTO> resultList = govProjectOpenFeignClient.getResolvedList(formDTO).getData();
if (org.apache.commons.collections4.CollectionUtils.isEmpty(resultList)) {
return new ArrayList<>();
}
List<String> topicIds = resultList.stream().map(ResolvedResultDTO::getSourceId).collect(Collectors.toList());
TopicDetailBatchFormDTO form = new TopicDetailBatchFormDTO();
form.setTopicIdList(topicIds);
Result<List<ResiTopicDetailResultDTO>> topicDetailsResult = resiGroupOpenFeignClient.listTopicDetailsByIds(form);
if (!topicDetailsResult.success()) {
logger.error("调用resi-group批量查询详情失败");
} else {
List<ResiTopicDetailResultDTO> topicDetails = topicDetailsResult.getData();
HashMap<String, ResiTopicDetailResultDTO> rtm = convertTopicDetailList2Map(topicDetails);
resultList.forEach(vi -> {
ResiTopicDetailResultDTO rr = rtm.get(vi.getSourceId());
vi.setTopicImgs(rr == null ? new ArrayList<>() : rr.getTopicImgs());
vi.setTopicVoices(rr == null ? new ArrayList<>() : rr.getTopicImgs());
vi.setTopicContent(rr == null ? "" : rr.getTopicContent());
});
}
return resultList;
}
/**
* 无需解决项目议题列表
*
* @param formDTO
* @return java.util.List<com.epmet.dto.result.UnResolvedResultDTO>
* @author zhaoqifeng
* @date 2021/7/27 17:45
*/
@Override
public List<UnResolvedResultDTO> getUnResolvedList(ShiftProjectListFromDTO formDTO) {
List<UnResolvedResultDTO> resultList = govIssueOpenFeignClient.getUnresolvedList(formDTO).getData();
if (org.apache.commons.collections4.CollectionUtils.isEmpty(resultList)) {
return new ArrayList<>();
}
List<String> topicIds = resultList.stream().map(UnResolvedResultDTO::getSourceId).collect(Collectors.toList());
TopicDetailBatchFormDTO form = new TopicDetailBatchFormDTO();
form.setTopicIdList(topicIds);
Result<List<ResiTopicDetailResultDTO>> topicDetailsResult = resiGroupOpenFeignClient.listTopicDetailsByIds(form);
if (!topicDetailsResult.success()) {
logger.error("调用resi-group批量查询详情失败");
} else {
List<ResiTopicDetailResultDTO> topicDetails = topicDetailsResult.getData();
HashMap<String, ResiTopicDetailResultDTO> rtm = convertTopicDetailList2Map(topicDetails);
resultList.forEach(vi -> {
ResiTopicDetailResultDTO rr = rtm.get(vi.getSourceId());
vi.setTopicImgs(rr == null ? new ArrayList<>() : rr.getTopicImgs());
vi.setTopicVoices(rr == null ? new ArrayList<>() : rr.getTopicImgs());
vi.setTopicContent(rr == null ? "" : rr.getTopicContent());
});
}
return resultList;
}
}

Loading…
Cancel
Save