Browse Source

Merge branch 'dev_personal_center' of http://git.elinkit.com.cn:7070/r/epmet-cloud into dev_personal_center

master
wxz 5 years ago
parent
commit
a5890c17b3
  1. 30
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/constant/IssueOpenConstant.java
  2. 8
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/MyPubIssuesAuditingFormDTO.java
  3. 13
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java
  4. 6
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java
  5. 32
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java
  6. 15
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java
  7. 17
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java
  8. 15
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java
  9. 22
      epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml
  10. 46
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyPubIssuesClosedResultDTO.java
  11. 46
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyPubIssuesShiftProjectResultDTO.java
  12. 8
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java
  13. 5
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java
  14. 27
      epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/person/controller/IssueController.java
  15. 18
      epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/person/service/IssueService.java
  16. 37
      epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/person/service/impl/IssueServiceImpl.java

30
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/constant/IssueOpenConstant.java

@ -0,0 +1,30 @@
package com.epmet.constant;
/**
* 议题相关常亮其它服务可用
*
* @author yinzuomei@elink-cn.com
* @date 2020/11/11 14:10
*/
public interface IssueOpenConstant {
/**
* 议题状态-表决中
*/
String ISSUE_VOTING = "voting";
/**
* 议题状态-已转项目
*/
String ISSUE_SHIFT_PROJECT = "shift_project";
/**
* 议题状态-已关闭
*/
String ISSUE_CLOSED = "closed";
/**
* 议题解决类型-已解决
*/
String ISSUE_RESOLVED = "resolved";
/**
* 议题解决类型-未解决
*/
String ISSUE_UNRESOLVED = "unresolved";
}

8
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/MyPubIssuesAuditingFormDTO.java

@ -23,5 +23,13 @@ public class MyPubIssuesAuditingFormDTO implements Serializable {
@NotNull(message = "每页数量不能为空",groups = MyPubIssuesAuditing.class)
private Integer pageSize;
/**
* 拓展参数前端不传值内部传输用
*/
private String userId;
/**
* 拓展参数前端不传值内部传输用
*/
private String issueStatus;
}

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

@ -1,6 +1,8 @@
package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.IssueDTO;
import com.epmet.dto.form.MyPartIssuesFormDTO;
import com.epmet.dto.form.MyPubIssuesAuditingFormDTO;
import com.epmet.dto.result.MyPartIssuesResultDTO;
@ -9,6 +11,8 @@ import org.springframework.cloud.openfeign.FeignClient;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.feign.fallback.GovIssueOpenFeignClientFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@ -43,4 +47,13 @@ public interface GovIssueOpenFeignClient {
@PostMapping("/gov/issue/issue/mypubissuesauditing")
Result<List<MyPubIssuesAuditingResultDTO>> myPubIssuesAuditing(@RequestBody MyPubIssuesAuditingFormDTO myPubIssuesAuditingFormDTO);
/**
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.IssueDTO>>
* @param formDTO
* @author yinzuomei
* @description 查询我发起的议题可根据状态查询
* @Date 2020/11/11 14:13
**/
@PostMapping(value = "/gov/issue/issue/getmypubissues", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<List<IssueDTO>> getMyPubIssues(@RequestBody MyPubIssuesAuditingFormDTO formDTO);
}

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

@ -3,6 +3,7 @@ package com.epmet.feign.fallback;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.IssueDTO;
import com.epmet.dto.form.MyPartIssuesFormDTO;
import com.epmet.dto.form.MyPubIssuesAuditingFormDTO;
import com.epmet.dto.result.MyPartIssuesResultDTO;
@ -29,4 +30,9 @@ public class GovIssueOpenFeignClientFallBack implements GovIssueOpenFeignClient
public Result<List<MyPubIssuesAuditingResultDTO>> myPubIssuesAuditing(MyPubIssuesAuditingFormDTO myPubIssuesAuditingFormDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER,"myPubIssuesAuditing",myPubIssuesAuditingFormDTO);
}
@Override
public Result<List<IssueDTO>> getMyPubIssues(MyPubIssuesAuditingFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER,"getMyPubIssues",formDTO);
}
}

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

@ -1,29 +1,19 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.*;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.IssueDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.excel.IssueExcel;
import com.epmet.resi.group.dto.topic.form.TopicInfoFormDTO;
import com.epmet.service.IssueService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* @Description 居民端党群议事
@ -165,5 +155,17 @@ public class IssueController {
}
/**
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.IssueDTO>>
* @param formDTO
* @author yinzuomei
* @description 查询我发起的议题可根据状态查询
* @Date 2020/11/11 14:49
**/
@PostMapping("getmypubissues")
public Result<List<IssueDTO>> getMyPubIssues(@RequestBody MyPubIssuesAuditingFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO);
return new Result<List<IssueDTO>>().ok(issueService.getMyPubIssues(formDTO));
}
}

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

@ -152,4 +152,19 @@ public interface IssueDao extends BaseDao<IssueEntity> {
* @date 2020/11/11 9:24 上午
*/
List<MyPubIssuesAuditingResultDTO> myPubIssuesAuditing(@Param("userId")String userId);
/**
* @return java.util.List<com.epmet.dto.IssueDTO>
* @param pageNo
* @param pageSize
* @param userId 当前用户
* @param issueStatus 议题状态 表决中voting 已转项目shift_project 已关闭closed
* @author yinzuomei
* @description 查询我发起的议题可根据状态查询
* @Date 2020/11/11 15:11
**/
List<IssueDTO> selectMyPubIssues(@Param("pageNo") Integer pageNo,
@Param("pageSize") Integer pageSize,
@Param("userId") String userId,
@Param("issueStatus") String issueStatus);
}

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

@ -3,14 +3,6 @@ package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.IssueDTO;
import com.epmet.dto.form.CloseIssueFormDTO;
import com.epmet.dto.form.DepartmentStaffListFormDTO;
import com.epmet.dto.form.IssueDetailFormDTO;
import com.epmet.dto.form.IssueIdFormDTO;
import com.epmet.dto.result.DepartmentStaffListResultDTO;
import com.epmet.dto.result.GridIdResultDTO;
import com.epmet.dto.result.GridVotingIssueCountResultDTO;
import com.epmet.dto.result.IssueResultDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.dto.form.CommonIssueListFormDTO;
@ -234,4 +226,13 @@ public interface IssueService extends BaseService<IssueEntity> {
* @date 2020/11/11 9:24 上午
*/
List<MyPubIssuesAuditingResultDTO> myPubIssuesAuditing(MyPubIssuesAuditingFormDTO myPubIssuesAuditingFormDTO);
/**
* @return java.util.List<com.epmet.dto.IssueDTO>
* @param formDTO
* @author yinzuomei
* @description 查询我发起的议题可根据状态查询
* @Date 2020/11/11 14:57
**/
List<IssueDTO> getMyPubIssues(MyPubIssuesAuditingFormDTO formDTO);
}

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

@ -878,4 +878,19 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
return list;
}
/**
* @param formDTO
* @return java.util.List<com.epmet.dto.IssueDTO>
* @author yinzuomei
* @description 查询我发起的议题可根据状态查询
* @Date 2020/11/11 14:57
**/
@Override
public List<IssueDTO> getMyPubIssues(MyPubIssuesAuditingFormDTO formDTO) {
formDTO.setPageNo(null == formDTO.getPageNo() ? NumConstant.ZERO :
(formDTO.getPageNo() - NumConstant.ONE)*formDTO.getPageSize()
);
return baseDao.selectMyPubIssues(formDTO.getPageNo(),formDTO.getPageSize(),formDTO.getUserId(),formDTO.getIssueStatus());
}
}

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

@ -393,4 +393,26 @@
AND i.CREATED_BY = #{userId}
</select>
<!-- 查询我发起的议题(可根据状态查询)-->
<select id="selectMyPubIssues" parameterType="map" resultType="com.epmet.dto.IssueDTO">
SELECT
*
FROM
issue i
WHERE
i.DEL_FLAG = '0'
AND i.CREATED_BY = #{userId}
<if test ='null != issueStatus and "" != issueStatus'>
and i.ISSUE_STATUS=#{issueStatus}
</if>
<if test ='"shift_project" == issueStatus'>
ORDER BY
i.SHIFTED_TIME DESC
</if>
<if test ='"closed" == issueStatus'>
ORDER BY
i.CLOSED_TIME DESC
</if>
LIMIT #{pageNo}, #{pageSize}
</select>
</mapper>

46
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyPubIssuesClosedResultDTO.java

@ -0,0 +1,46 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* 个人中心-我发起的议题列表-已关闭返参DTO
*
* @author yinzuomei@elink-cn.com
* @date 2020/11/11 13:39
*/
@Data
public class MyPubIssuesClosedResultDTO implements Serializable {
private static final long serialVersionUID = -265465326846671555L;
/**
* 议题id
*/
private String issueId;
/**
* 议题标题
*/
private String issueTitle;
/**
* 建议
*/
private String suggestion;
/**
* 议题关闭时间时间戳
*/
private Long closedTime;
/**
* 话题发表于哪个组
*/
private String topicReleaseGroupName;
/**
* 话题发表于哪个网格
*/
private String topicReleaseGridName;
}

46
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyPubIssuesShiftProjectResultDTO.java

@ -0,0 +1,46 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 个人中心-我发起的议题列表-已转项目 返参DTO
*
* @author yinzuomei@elink-cn.com
* @date 2020/11/11 12:18
*/
@Data
public class MyPubIssuesShiftProjectResultDTO implements Serializable {
private static final long serialVersionUID = -7183751225506622772L;
/**
* 项目id
*/
private String projectId;
/**
* 话题发表网格id
*/
private String topicReleaseGridName;
/**
* 当前处理部门名称列表
*/
private List<String> departmentNameList;
/**
* 项目标题
*/
private String projectTitle;
/**
* 转项目时间时间戳
*/
private Long shiftProjectTime;
/**
* 话题发表于哪个组
*/
private String topicReleaseGroupName;
}

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

@ -1,18 +1,16 @@
package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.ProcessListFormDTO;
import com.epmet.dto.ProjectDTO;
import com.epmet.dto.form.ProcessListFormDTO;
import com.epmet.dto.form.ProjectListFromDTO;
import com.epmet.dto.result.MyPartProjectsResultDTO;
import com.epmet.dto.result.PendProjectListResultDTO;
import com.epmet.dto.result.ProcessAndCurrentDeptResultDTO;
import com.epmet.dto.result.ProcesslistResultDTO;
import com.epmet.feign.fallback.GovProjectOpenFeignClientFallback;
import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO;
import org.springframework.cloud.openfeign.FeignClient;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.feign.fallback.GovProjectOpenFeignClientFallback;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

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

@ -1,14 +1,13 @@
package com.epmet.resi.group.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.resi.group.dto.group.form.GroupInfoFormDTO;
import com.epmet.resi.group.dto.group.result.GroupInfoResultDTO;
import com.epmet.resi.group.dto.topic.result.IssueGridResultDTO;
import com.epmet.resi.group.feign.fallback.ResiGroupOpenFeignClientFallback;
import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO;
import org.springframework.cloud.openfeign.FeignClient;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.resi.group.feign.fallback.ResiGroupOpenFeignClientFallback;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

27
epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/person/controller/IssueController.java

@ -9,6 +9,8 @@ import com.epmet.dto.form.MyPubIssuesAuditingFormDTO;
import com.epmet.dto.result.MyPartIssuesResultDTO;
import com.epmet.dto.result.MyPartProjectsResultDTO;
import com.epmet.dto.result.MyPubIssuesAuditingResultDTO;
import com.epmet.dto.result.MyPubIssuesClosedResultDTO;
import com.epmet.dto.result.MyPubIssuesShiftProjectResultDTO;
import com.epmet.modules.person.service.IssueService;
import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO;
import org.springframework.beans.factory.annotation.Autowired;
@ -67,4 +69,29 @@ public class IssueController {
return new Result<List<MyPubIssuesAuditingResultDTO>>().ok(issueService.myPubIssuesAuditing(tokenDto,myPubIssuesAuditingFormDTO));
}
/**
* @param formDTO
* @author yinzuomei
* @description 个人中心-我发起的议题列表-已转项目
* @Date 2020/11/11 13:33
**/
@PostMapping("my-pub-issues/shift-project")
public Result<List<MyPubIssuesShiftProjectResultDTO>> getMyPubIssuesShiftProject(@RequestBody MyPubIssuesAuditingFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, MyPubIssuesAuditingFormDTO.MyPubIssuesAuditing.class);
formDTO.setUserId(loginUserUtil.getLoginUserId());
return new Result<List<MyPubIssuesShiftProjectResultDTO>>().ok(issueService.getMyPubIssuesShiftProject(formDTO));
}
/**
* @param formDTO
* @author yinzuomei
* @description 个人中心-我发起的议题列表-已关闭
* @Date 2020/11/11 13:39
**/
@PostMapping("my-pub-issues/closed")
public Result<List<MyPubIssuesClosedResultDTO>> getMyPubIssuesClosed(@RequestBody MyPubIssuesAuditingFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, MyPubIssuesAuditingFormDTO.MyPubIssuesAuditing.class);
formDTO.setUserId(loginUserUtil.getLoginUserId());
return new Result<List<MyPubIssuesClosedResultDTO>>().ok(issueService.getMyPubIssuesClosed(formDTO));
}
}

18
epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/person/service/IssueService.java

@ -5,6 +5,8 @@ import com.epmet.dto.form.MyPubIssuesAuditingFormDTO;
import com.epmet.dto.result.MyPartIssuesResultDTO;
import com.epmet.dto.result.MyPartProjectsResultDTO;
import com.epmet.dto.result.MyPubIssuesAuditingResultDTO;
import com.epmet.dto.result.MyPubIssuesClosedResultDTO;
import com.epmet.dto.result.MyPubIssuesShiftProjectResultDTO;
import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO;
import java.util.List;
@ -37,4 +39,20 @@ public interface IssueService {
* @date 2020/11/11 9:24 上午
*/
List<MyPubIssuesAuditingResultDTO> myPubIssuesAuditing(TokenDto tokenDto, MyPubIssuesAuditingFormDTO myPubIssuesAuditingFormDTO);
/**
* @param formDTO
* @author yinzuomei
* @description 个人中心-我发起的议题列表-已转项目
* @Date 2020/11/11 13:35
**/
List<MyPubIssuesShiftProjectResultDTO> getMyPubIssuesShiftProject(MyPubIssuesAuditingFormDTO formDTO);
/**
* @param formDTO
* @author yinzuomei
* @description 个人中心-我发起的议题列表-已关闭
* @Date 2020/11/11 13:48
**/
List<MyPubIssuesClosedResultDTO> getMyPubIssuesClosed(MyPubIssuesAuditingFormDTO formDTO);
}

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

@ -4,12 +4,11 @@ import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.IssueOpenConstant;
import com.epmet.dto.IssueDTO;
import com.epmet.dto.form.MyPartIssuesFormDTO;
import com.epmet.dto.form.MyPubIssuesAuditingFormDTO;
import com.epmet.dto.result.AllGridsByUserIdResultDTO;
import com.epmet.dto.result.MyPartIssuesResultDTO;
import com.epmet.dto.result.MyPartProjectsResultDTO;
import com.epmet.dto.result.MyPubIssuesAuditingResultDTO;
import com.epmet.dto.result.*;
import com.epmet.feign.GovIssueOpenFeignClient;
import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.feign.GovProjectOpenFeignClient;
@ -143,4 +142,34 @@ public class IssueServiceImpl implements IssueService {
}
return listResult.getData();
}
/**
* @param formDTO
* @author yinzuomei
* @description 个人中心-我发起的议题列表-已转项目
* @Date 2020/11/11 13:35
**/
@Override
public List<MyPubIssuesShiftProjectResultDTO> getMyPubIssuesShiftProject(MyPubIssuesAuditingFormDTO formDTO) {
//todo
return null;
}
/**
* @param formDTO
* @author yinzuomei
* @description 个人中心-我发起的议题列表-已关闭
* @Date 2020/11/11 13:48
**/
@Override
public List<MyPubIssuesClosedResultDTO> getMyPubIssuesClosed(MyPubIssuesAuditingFormDTO formDTO) {
//查询我发起的议题,并且 已关闭的
formDTO.setIssueStatus(IssueOpenConstant.ISSUE_CLOSED);
Result<List<IssueDTO>> issueResult=issueOpenFeignClient.getMyPubIssues(formDTO);
if(null==issueResult||CollectionUtils.isEmpty(issueResult.getData())){
return new ArrayList<>();
}
//todo
return null;
}
}

Loading…
Cancel
Save