Browse Source

Merge remote-tracking branch 'origin/dev_personal_center' into dev_temp

# Conflicts:
#	epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java
dev_shibei_match
yinzuomei 5 years ago
parent
commit
5c4c707802
  1. 4
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueDTO.java
  2. 3
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java
  3. 11
      epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml
  4. 8
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectDTO.java
  5. 11
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java
  6. 13
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java
  7. 10
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java
  8. 3
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java
  9. 41
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java
  10. 30
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/CustomerPageFormDTO.java
  11. 26
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/ParticipatedTopicUnitResultDTO.java
  12. 11
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java
  13. 7
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/fallback/ResiGroupOpenFeignClientFallback.java
  14. 13
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java
  15. 9
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicDao.java
  16. 9
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java
  17. 27
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java
  18. 21
      epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml
  19. 50
      epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/person/service/impl/IssueServiceImpl.java

4
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueDTO.java

@ -154,4 +154,8 @@ public class IssueDTO implements Serializable {
*/ */
private Long closedTimeStamp; private Long closedTimeStamp;
/**
* 议题转项目后-对应的项目id
*/
private String projectId;
} }

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

@ -7,9 +7,6 @@ import com.epmet.dto.form.MyPartIssuesFormDTO;
import com.epmet.dto.form.MyPubIssuesAuditingFormDTO; import com.epmet.dto.form.MyPubIssuesAuditingFormDTO;
import com.epmet.dto.result.MyPartIssuesResultDTO; import com.epmet.dto.result.MyPartIssuesResultDTO;
import com.epmet.dto.result.MyPubIssuesAuditingResultDTO; import com.epmet.dto.result.MyPubIssuesAuditingResultDTO;
import org.springframework.cloud.openfeign.FeignClient;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.feign.fallback.GovIssueOpenFeignClientFallBack; import com.epmet.feign.fallback.GovIssueOpenFeignClientFallBack;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;

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

@ -399,20 +399,23 @@
SELECT SELECT
i.*, i.*,
UNIX_TIMESTAMP(i.CLOSED_TIME) AS closedTimeStamp, UNIX_TIMESTAMP(i.CLOSED_TIME) AS closedTimeStamp,
UNIX_TIMESTAMP(i.SHIFTED_TIME) AS shiftedTimeStamp UNIX_TIMESTAMP(i.SHIFTED_TIME) AS shiftedTimeStamp,
m.PROJECT_ID
FROM FROM
issue i issue i
left join issue_project_relation m
on(i.id=m.ISSUE_ID and m.del_flag='0')
WHERE WHERE
i.DEL_FLAG = '0' i.DEL_FLAG = '0'
AND i.CREATED_BY = #{userId} AND i.CREATED_BY = #{userId}
<if test ='null != issueStatus and "" != issueStatus'> <if test ='null != issueStatus and "" != issueStatus'>
and i.ISSUE_STATUS=#{issueStatus} and i.ISSUE_STATUS=#{issueStatus}
</if> </if>
<if test ='"shift_project" == issueStatus'> <if test="issueStatus == 'shift_project'">
ORDER BY ORDER BY
i.SHIFTED_TIME DESC m.CREATED_TIME DESC
</if> </if>
<if test ='"closed" == issueStatus'> <if test="issueStatus == 'closed'">
ORDER BY ORDER BY
i.CLOSED_TIME DESC i.CLOSED_TIME DESC
</if> </if>

8
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/ProjectDTO.java

@ -17,9 +17,11 @@
package com.epmet.dto; package com.epmet.dto;
import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import lombok.Data; import java.util.List;
/** /**
@ -113,4 +115,8 @@ public class ProjectDTO implements Serializable {
*/ */
private Date updatedTime; private Date updatedTime;
/**
* 当前处理部门名称列表
*/
private List<String> currentDepartmentNameList;
} }

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

@ -22,6 +22,7 @@ import java.util.List;
* @author yinzuomei@elink-cn.com * @author yinzuomei@elink-cn.com
* @date 2020/6/4 13:32 * @date 2020/6/4 13:32
*/ */
// @FeignClient(name = ServiceConstant.GOV_PROJECT_SERVER, fallback = GovProjectOpenFeignClientFallback.class,url = "localhost:8102")
@FeignClient(name = ServiceConstant.GOV_PROJECT_SERVER, fallback = GovProjectOpenFeignClientFallback.class) @FeignClient(name = ServiceConstant.GOV_PROJECT_SERVER, fallback = GovProjectOpenFeignClientFallback.class)
public interface GovProjectOpenFeignClient { public interface GovProjectOpenFeignClient {
/** /**
@ -53,4 +54,14 @@ public interface GovProjectOpenFeignClient {
*/ */
@PostMapping("gov/project/project/issuetoprojectlist") @PostMapping("gov/project/project/issuetoprojectlist")
Result<List<MyPartProjectsResultDTO>> issueToProjectList(MyPartProjectsFormDTO formDTO); Result<List<MyPartProjectsResultDTO>> issueToProjectList(MyPartProjectsFormDTO formDTO);
/**
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.ProjectDTO>>
* @param projectIds 项目id数组
* @author yinzuomei
* @description 根据项目id查询项目基本信息
* @Date 2020/11/11 17:40
**/
@PostMapping("gov/project/project/queryprojectinfobyids")
Result<List<ProjectDTO>> queryProjectInfoByIds(@RequestBody List<String> projectIds);
} }

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

@ -9,7 +9,6 @@ import com.epmet.dto.form.ProjectListFromDTO;
import com.epmet.dto.result.MyPartProjectsResultDTO; import com.epmet.dto.result.MyPartProjectsResultDTO;
import com.epmet.dto.result.PendProjectListResultDTO; import com.epmet.dto.result.PendProjectListResultDTO;
import com.epmet.dto.result.ProcessAndCurrentDeptResultDTO; import com.epmet.dto.result.ProcessAndCurrentDeptResultDTO;
import com.epmet.dto.result.ProcesslistResultDTO;
import com.epmet.feign.GovProjectOpenFeignClient; import com.epmet.feign.GovProjectOpenFeignClient;
import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO; import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@ -51,4 +50,16 @@ public class GovProjectOpenFeignClientFallback implements GovProjectOpenFeignCli
public Result<List<MyPartProjectsResultDTO>> issueToProjectList(MyPartProjectsFormDTO formDTO) { public Result<List<MyPartProjectsResultDTO>> issueToProjectList(MyPartProjectsFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "issueToProjectList", formDTO); return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "issueToProjectList", formDTO);
} }
/**
* @param projectIds 项目id数组
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.dto.ProjectDTO>>
* @author yinzuomei
* @description 根据项目id查询项目基本信息
* @Date 2020/11/11 17:40
**/
@Override
public Result<List<ProjectDTO>> queryProjectInfoByIds(List<String> projectIds) {
return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "queryProjectInfoByIds", projectIds);
}
} }

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

@ -17,18 +17,14 @@
package com.epmet.controller; package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.annotation.RequirePermission;
import com.epmet.commons.tools.enums.RequirePermissionEnum;
import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils; import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.ProjectDTO; import com.epmet.dto.ProjectDTO;
import com.epmet.dto.form.LatestListFormDTO; import com.epmet.dto.form.LatestListFormDTO;
import com.epmet.dto.form.ProjectListFromDTO; import com.epmet.dto.form.ProjectListFromDTO;
@ -192,4 +188,8 @@ public class ProjectController {
return new Result<List<MyPartProjectsResultDTO>>().ok(projectService.issueToProjectList(formDTO)); return new Result<List<MyPartProjectsResultDTO>>().ok(projectService.issueToProjectList(formDTO));
} }
@PostMapping("queryprojectinfobyids")
public Result<List<ProjectDTO>> queryProjectInfoByIds(@RequestBody List<String> projectIds){
return new Result<List<ProjectDTO>>().ok(projectService.queryProjectInfoByIds(projectIds));
}
} }

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

@ -19,7 +19,6 @@ package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.dto.ProjectDTO; import com.epmet.dto.ProjectDTO;
import com.epmet.dto.form.*; import com.epmet.dto.form.*;
import com.epmet.dto.result.*; import com.epmet.dto.result.*;
@ -224,4 +223,6 @@ public interface ProjectService extends BaseService<ProjectEntity> {
* @Description 根据议题Id集合查询对应的项目信息 * @Description 根据议题Id集合查询对应的项目信息
**/ **/
List<MyPartProjectsResultDTO> issueToProjectList(MyPartProjectsFormDTO formDTO); List<MyPartProjectsResultDTO> issueToProjectList(MyPartProjectsFormDTO formDTO);
List<ProjectDTO> queryProjectInfoByIds(List<String> projectIds);
} }

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

@ -688,6 +688,18 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
return detentionDays.getData().get(NumConstant.ZERO).getDetentionDays(); return detentionDays.getData().get(NumConstant.ZERO).getDetentionDays();
} }
/**
* @param formDTO
* @return
* @Author sun
* @Description 获取客户下已结案项目列表按结案时间倒序(结案时间结案说明处理部门)
**/
@Override
public List<LatestListResultDTO> getClosedProjectList(LatestListFormDTO formDTO) {
return baseDao.selectClosedProjectList(formDTO);
}
/** /**
* @param formDTO * @param formDTO
* @return * @return
@ -842,18 +854,6 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
return issueProjectResultDTO; return issueProjectResultDTO;
} }
/**
* @param formDTO
* @return
* @Author sun
* @Description 获取客户下已结案项目列表按结案时间倒序(结案时间结案说明处理部门)
**/
@Override
public List<LatestListResultDTO> getClosedProjectList(LatestListFormDTO formDTO) {
return baseDao.selectClosedProjectList(formDTO);
}
@Override @Override
public void response(ProjectResponseFormDTO formDTO) { public void response(ProjectResponseFormDTO formDTO) {
//公开回复内容审核 //公开回复内容审核
@ -1388,4 +1388,21 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
return list; return list;
} }
@Override
public List<ProjectDTO> queryProjectInfoByIds(List<String> projectIds) {
List<ProjectEntity> entityList=baseDao.selectBatchIds(projectIds);
List<ProjectDTO> projectDTOList=ConvertUtils.sourceToTarget(entityList, ProjectDTO.class);
//2.使用已有方法查询项目当前处理部门信息
projectDTOList.forEach(l -> {
if (ProjectConstant.CLOSED.equals(l.getStatus())) {
l.setCurrentDepartmentNameList(new ArrayList<String>());
} else {
ProjectDTO dto = new ProjectDTO();
dto.setId(l.getId());
l.setCurrentDepartmentNameList(baseDao.selectDepartmentNameList(dto));
}
});
return projectDTOList;
}
} }

30
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/CustomerPageFormDTO.java

@ -0,0 +1,30 @@
package com.epmet.resi.group.dto.topic.form;
import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Description 客户Id 用户Id 分页
* @ClassName CustomerPageFormDTO
* @Auth wangc
* @Date 2020-11-11 23:15
*/
@Data
public class CustomerPageFormDTO implements Serializable {
private static final long serialVersionUID = 8678047078015445193L;
@NotBlank(message = "客户Id不能为空")
private String customerId;
@NotBlank(message = "用户Id不能为空")
private String userId;
@Min(1)
private Integer pageNo;
@Min(1)
private Integer pageSize;
}

26
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/ParticipatedTopicUnitResultDTO.java

@ -0,0 +1,26 @@
package com.epmet.resi.group.dto.topic.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Description 个人中心 参与过的话题返参DTO
* @ClassName ParticipatedTopicUnitResultDTO
* @Auth wangc
* @Date 2020-11-11 23:00
*/
@Data
public class ParticipatedTopicUnitResultDTO implements Serializable {
private static final long serialVersionUID = 1392205563783715932L;
private String topicId;
private String topicReleaseGridName;
private String topicContent;
private Long releaseTime;
private String topicReleaseGroupName;
}

11
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java

@ -4,7 +4,9 @@ import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.resi.group.dto.group.form.GroupInfoFormDTO; import com.epmet.resi.group.dto.group.form.GroupInfoFormDTO;
import com.epmet.resi.group.dto.group.result.GroupInfoResultDTO; import com.epmet.resi.group.dto.group.result.GroupInfoResultDTO;
import com.epmet.resi.group.dto.topic.form.CustomerPageFormDTO;
import com.epmet.resi.group.dto.topic.result.IssueGridResultDTO; import com.epmet.resi.group.dto.topic.result.IssueGridResultDTO;
import com.epmet.resi.group.dto.topic.result.ParticipatedTopicUnitResultDTO;
import com.epmet.resi.group.feign.fallback.ResiGroupOpenFeignClientFallback; import com.epmet.resi.group.feign.fallback.ResiGroupOpenFeignClientFallback;
import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO; import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
@ -75,4 +77,13 @@ public interface ResiGroupOpenFeignClient {
@PostMapping("/resi/group/group/gov-audit-edit") @PostMapping("/resi/group/group/gov-audit-edit")
Result govAuditEdit(@RequestBody GroupEditionAuditFormDTO param); Result govAuditEdit(@RequestBody GroupEditionAuditFormDTO param);
/**
* @Description 个人中心-我参与过的话题
* @param param
* @return java.util.List<com.epmet.resi.group.dto.topic.result.ParticipatedTopicUnitResultDTO>
* @author wangc
* @date 2020.11.11 23:20
*/
@PostMapping("resi/group/topic/my-part-topics")
Result<List<ParticipatedTopicUnitResultDTO>> myPartTopics(@RequestBody CustomerPageFormDTO param);
} }

7
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/fallback/ResiGroupOpenFeignClientFallback.java

@ -13,7 +13,9 @@ import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.resi.group.dto.group.form.GroupInfoFormDTO; import com.epmet.resi.group.dto.group.form.GroupInfoFormDTO;
import com.epmet.resi.group.dto.group.result.GroupInfoResultDTO; import com.epmet.resi.group.dto.group.result.GroupInfoResultDTO;
import com.epmet.resi.group.dto.topic.form.CustomerPageFormDTO;
import com.epmet.resi.group.dto.topic.result.IssueGridResultDTO; import com.epmet.resi.group.dto.topic.result.IssueGridResultDTO;
import com.epmet.resi.group.dto.topic.result.ParticipatedTopicUnitResultDTO;
import com.epmet.resi.group.feign.ResiGroupOpenFeignClient; import com.epmet.resi.group.feign.ResiGroupOpenFeignClient;
import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO; import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@ -53,4 +55,9 @@ public class ResiGroupOpenFeignClientFallback implements ResiGroupOpenFeignClien
return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "selectGroupInfo", groupInfoFormDTO); return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "selectGroupInfo", groupInfoFormDTO);
} }
@Override
public Result<List<ParticipatedTopicUnitResultDTO>> myPartTopics(CustomerPageFormDTO param) {
return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "myPartTopics", param);
}
} }

13
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java

@ -272,5 +272,18 @@ public class ResiTopicController {
return new Result().ok(myTopics); return new Result().ok(myTopics);
} }
/**
* @Description 个人中心-我参与过的话题
* @param param
* @return java.util.List<com.epmet.resi.group.dto.topic.result.ParticipatedTopicUnitResultDTO>
* @author wangc
* @date 2020.11.11 23:20
*/
@PostMapping("my-part-topics")
public Result<List<ParticipatedTopicUnitResultDTO>> myPartTopics(@RequestBody CustomerPageFormDTO param){
ValidatorUtils.validateEntity(param);
return new Result<List<ParticipatedTopicUnitResultDTO>>().ok(topicService.getParticipatedTopics(param));
}
} }

9
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicDao.java

@ -161,4 +161,13 @@ public interface ResiTopicDao extends BaseDao<ResiTopicEntity> {
*/ */
List<IssueGridResultDTO> selectIssueList(@Param("topicList") List<String> topicList); List<IssueGridResultDTO> selectIssueList(@Param("topicList") List<String> topicList);
/**
* @Description 查询我参与过的话题
* @param customerId
* @param userId
* @return java.util.List<com.epmet.resi.group.dto.topic.result.ParticipatedTopicUnitResultDTO>
* @author wangc
* @date 2020.11.11 23:08
*/
List<ParticipatedTopicUnitResultDTO> selectParticipatedTopics(@Param("customerId") String customerId,@Param("userId") String userId);
} }

9
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java

@ -271,4 +271,13 @@ public interface ResiTopicService extends BaseService<ResiTopicEntity> {
* @date 2020.11.10 15:03 * @date 2020.11.10 15:03
*/ */
List<MyTopicsResultDTO> listMyTopics(String customerId, String userId, Integer pageNo, Integer pageSize); List<MyTopicsResultDTO> listMyTopics(String customerId, String userId, Integer pageNo, Integer pageSize);
/**
* @Description 个人中心-我参与过的话题
* @param param
* @return java.util.List<com.epmet.resi.group.dto.topic.result.ParticipatedTopicUnitResultDTO>
* @author wangc
* @date 2020.11.11 23:20
*/
List<ParticipatedTopicUnitResultDTO> getParticipatedTopics(CustomerPageFormDTO param);
} }

27
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java

@ -84,6 +84,7 @@ import com.epmet.resi.group.dto.topic.form.CheckTopicPublisherFormDTO;
import com.epmet.resi.group.dto.topic.form.GovTopicIssueInfoFormDTO; import com.epmet.resi.group.dto.topic.form.GovTopicIssueInfoFormDTO;
import com.epmet.resi.group.dto.topic.result.*; import com.epmet.resi.group.dto.topic.result.*;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
@ -1413,6 +1414,32 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
return myTopics; return myTopics;
} }
/**
* @Description 个人中心-我参与过的话题
* @param param
* @return java.util.List<com.epmet.resi.group.dto.topic.result.ParticipatedTopicUnitResultDTO>
* @author wangc
* @date 2020.11.11 23:20
*/
@Override
public List<ParticipatedTopicUnitResultDTO> getParticipatedTopics(CustomerPageFormDTO param) {
PageInfo<ParticipatedTopicUnitResultDTO> page =
PageHelper.startPage(Optional.ofNullable(param.getPageNo()).orElse(NumConstant.ONE),
Optional.ofNullable(param.getPageSize()).orElse(NumConstant.ONE)).doSelectPageInfo(() ->
baseDao.selectParticipatedTopics(param.getCustomerId(),param.getUserId()));
List<ParticipatedTopicUnitResultDTO> result = page.getList();
if(CollectionUtils.isEmpty(result)) return Collections.EMPTY_LIST;
Result<List<OrgInfoResultDTO>> gridR = govOrgOpenFeignClient.selectOrgInfo(
new OrgInfoFormDTO(OrgInfoConstant.GRID,result.stream().map(ParticipatedTopicUnitResultDTO :: getTopicReleaseGridName).distinct().collect(Collectors.toList())));
if(gridR.success() && !CollectionUtils.isEmpty(gridR.getData())){
return result.stream().flatMap(topic -> gridR.getData().stream() .filter(grid -> StringUtils.equals(grid.getOrgId(),topic.getTopicReleaseGridName())).map(orgInfo -> {
topic.setTopicReleaseGridName(orgInfo.getOrgId());
return topic;
})).collect(Collectors.toList());
} return Collections.EMPTY_LIST;
}
} }

21
epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml

@ -474,5 +474,26 @@
</foreach> </foreach>
</select> </select>
<!-- 查询我参与过的话题 -->
<select id="selectParticipatedTopics" resultType="com.epmet.resi.group.dto.topic.result.ParticipatedTopicUnitResultDTO">
SELECT
topic.id AS topicId,
topic.topic_content,
UNIX_TIMESTAMP(topic.created_time) AS releaseTime,
groupp.group_name AS topicReleaseGroupName,
groupp.grid_id AS topicReleaseGridName
FROM
resi_topic topic LEFT JOIN resi_group groupp ON topic.group_id = groupp.ID AND groupp.del_flag = '0' AND groupp.customer_id = #{customerId}
WHERE
topic.del_flag = '0'
AND
topic.id IN (
SELECT DISTINCT topic_id FROM resi_topic_comment WHERE
del_flag = '0' AND created_by = #{userId}
)
AND topic.created_by <![CDATA[ <> ]]> #{userId}
ORDER BY topic.created_time desc
</select>
</mapper> </mapper>

50
epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/person/service/impl/IssueServiceImpl.java

@ -7,6 +7,7 @@ import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.IssueOpenConstant; import com.epmet.constant.IssueOpenConstant;
import com.epmet.constant.OrgInfoConstant; import com.epmet.constant.OrgInfoConstant;
import com.epmet.dto.IssueDTO; import com.epmet.dto.IssueDTO;
import com.epmet.dto.ProjectDTO;
import com.epmet.dto.form.MyPartIssuesFormDTO; import com.epmet.dto.form.MyPartIssuesFormDTO;
import com.epmet.dto.form.MyPubIssuesAuditingFormDTO; import com.epmet.dto.form.MyPubIssuesAuditingFormDTO;
import com.epmet.dto.form.OrgInfoFormDTO; import com.epmet.dto.form.OrgInfoFormDTO;
@ -151,13 +152,56 @@ public class IssueServiceImpl implements IssueService {
/** /**
* @param formDTO * @param formDTO
* @author yinzuomei * @author yinzuomei
* @description 个人中心-我发起的议题列表-已转项目 * @description 个人中心-我发起的议题列表-已转项目 按照转项目时间排序
* @Date 2020/11/11 13:35 * @Date 2020/11/11 13:35
**/ **/
@Override @Override
public List<MyPubIssuesShiftProjectResultDTO> getMyPubIssuesShiftProject(MyPubIssuesAuditingFormDTO formDTO) { public List<MyPubIssuesShiftProjectResultDTO> getMyPubIssuesShiftProject(MyPubIssuesAuditingFormDTO formDTO) {
//todo //查询我发起的议题,并且 已转项目
return null; formDTO.setIssueStatus(IssueOpenConstant.ISSUE_SHIFT_PROJECT);
Result<List<IssueDTO>> issueResult=issueOpenFeignClient.getMyPubIssues(formDTO);
if(null==issueResult||CollectionUtils.isEmpty(issueResult.getData())){
return new ArrayList<>();
}
//议题来源话题id集合
List<String> topicIds=new ArrayList<>();
List<String> projectIds=new ArrayList<>();
issueResult.getData().forEach(issueDTO ->{
if(IssueOpenConstant.SOURCE_TYPE_RT.equals(issueDTO.getSourceType())&& StringUtils.isNotBlank(issueDTO.getSourceId())){
topicIds.add(issueDTO.getSourceId());
projectIds.add(issueDTO.getProjectId());
}
} );
//查询网格名称
Result<List<OrgInfoResultDTO>> gridNameList = govOrgOpenFeignClient.selectOrgInfo(new OrgInfoFormDTO(OrgInfoConstant.GRID, issueResult.getData().stream().map(m -> m.getGridId()).collect(Collectors.toList())));
if (!gridNameList.success()){
logger.error("查询议题来源网格名称失败......");
}
//查询话题来源小组名称
Result<List<GroupInfoResultDTO>> groupNameList = resiGroupOpenFeignClient.selectGroupInfo(new GroupInfoFormDTO(topicIds));
if (!groupNameList.success()){
logger.error("查询议题来源小组名称失败......");
}
//查询项目基本信息
Result<List<ProjectDTO>> projectRes=govProjectOpenFeignClient.queryProjectInfoByIds(projectIds);
if(!projectRes.success()){
logger.error("查询项目信息失败......");
}
List<MyPubIssuesShiftProjectResultDTO> list=new ArrayList<>();
for(IssueDTO issueDTO:issueResult.getData()){
MyPubIssuesShiftProjectResultDTO resultDTO=new MyPubIssuesShiftProjectResultDTO();
resultDTO.setProjectId(issueDTO.getProjectId());
gridNameList.getData().stream().filter(o -> issueDTO.getGridId().equals(o.getOrgId())).forEach(o -> resultDTO.setTopicReleaseGridName(o.getOrgName()));
groupNameList.getData().stream().filter(g -> issueDTO.getSourceId().equals(g.getTopicId())).forEach(g -> resultDTO.setTopicReleaseGroupName(g.getTopicGroupName()));
resultDTO.setShiftProjectTime(issueDTO.getShiftedTimeStamp());
projectRes.getData().stream().filter(p->issueDTO.getProjectId().equals(p.getId())).forEach(projectDTO -> resultDTO.setProjectTitle(projectDTO.getTitle()));
//当前处理部门名称列表
projectRes.getData().stream().filter(p->issueDTO.getProjectId().equals(p.getId())).forEach(projectDTO -> resultDTO.setDepartmentNameList(projectDTO.getCurrentDepartmentNameList()));
list.add(resultDTO);
}
return list;
} }
/** /**

Loading…
Cancel
Save