Browse Source

详情

master
zxc 5 years ago
parent
commit
4e029a3c4f
  1. 24
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ApplicationDetailFormDTO.java
  2. 24
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ApplicationHistoryFormDTO.java
  3. 43
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ApplicationListFormDTO.java
  4. 54
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ApplicationDetailResultDTO.java
  5. 41
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ApplicationHistoryResultDTO.java
  6. 48
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ApplicationListResultDTO.java
  7. 50
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/TopicInfoResultDTO.java
  8. 42
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java
  9. 23
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java
  10. 39
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueApplicationController.java
  11. 11
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueApplicationDao.java
  12. 30
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueApplicationService.java
  13. 40
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationServiceImpl.java
  14. 11
      epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationDao.xml
  15. 48
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/ApplicationDetailCopyResultDTO.java
  16. 8
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/ApplicationDetailResultDTO.java
  17. 5
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/TopicInfoResultDTO.java
  18. 12
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/GroupIssueController.java
  19. 8
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupDao.java
  20. 6
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/GroupIssueService.java
  21. 87
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/GroupIssueServiceImpl.java
  22. 25
      epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml

24
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ApplicationDetailFormDTO.java

@ -0,0 +1,24 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/11/17 10:10 上午
*/
@Data
public class ApplicationDetailFormDTO implements Serializable {
private static final long serialVersionUID = -1123940740606412101L;
public interface ApplicationDetail{}
/**
* 申请详情在列表接口返参里有
*/
@NotBlank(message = "issueApplicationId不能为空",groups = {ApplicationDetail.class})
private String issueApplicationId;
}

24
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ApplicationHistoryFormDTO.java

@ -0,0 +1,24 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/11/17 10:10 上午
*/
@Data
public class ApplicationHistoryFormDTO implements Serializable {
private static final long serialVersionUID = -1123940740606412101L;
public interface ApplicationHistory{}
/**
* 申请详情在列表接口返参里有
*/
@NotBlank(message = "issueApplicationId不能为空",groups = {ApplicationHistory.class})
private String issueApplicationId;
}

43
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ApplicationListFormDTO.java

@ -0,0 +1,43 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/11/17 10:26 上午
*/
@Data
public class ApplicationListFormDTO implements Serializable {
private static final long serialVersionUID = -7535577263406351310L;
public interface ApplicationList{}
/**
* 小组id
*/
@NotBlank(message = "小组id不能为空",groups = {ApplicationList.class})
private String groupId;
/**
* under_auditing:审核中,rejected:驳回
*/
@NotBlank(message = "审核状态不能为空",groups = {ApplicationList.class})
private String applyStatus;
/**
* 页码
*/
@NotNull(message = "页码不能为空",groups = {ApplicationList.class})
private Integer pageNo;
/**
* 每页数量
*/
@NotNull(message = "每页数量不能为空",groups = {ApplicationList.class})
private Integer pageSize;
}

54
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ApplicationDetailResultDTO.java

@ -0,0 +1,54 @@
package com.epmet.dto.result;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/11/17 10:12 上午
*/
@Data
public class ApplicationDetailResultDTO implements Serializable {
private static final long serialVersionUID = 1121268898544759693L;
/**
* 申请ID
*/
private String issueApplicationId;
/**
* 议题标题
*/
private String issueTitle;
/**
* 所属网格名称
*/
private String gridName;
/**
* 议题发起人
*/
private String issuePublisher;
/**
* 话题相关信息
*/
private TopicInfoResultDTO topicInfo;
private String gridId;
private String topicId;
private String userId;
public ApplicationDetailResultDTO() {
this.issueTitle = "";
this.gridName = "";
this.issuePublisher = "";
this.topicInfo = new TopicInfoResultDTO();
}
}

41
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ApplicationHistoryResultDTO.java

@ -0,0 +1,41 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/11/17 10:21 上午
*/
@Data
public class ApplicationHistoryResultDTO implements Serializable {
private static final long serialVersionUID = 3235513565728092491L;
/**
* 审核历史表id
*/
private String historyId;
/**
* under_auditing:待审核 approved:已通过 rejected:已驳回
*/
private String actionType;
/**
* 操作时间戳
*/
private Long operateTime;
/**
* 驳回理由或者审核通过理由
*/
private String reason;
/**
* 工作人员姓名居民端不展示此列
*/
private String staffName;
}

48
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ApplicationListResultDTO.java

@ -0,0 +1,48 @@
package com.epmet.dto.result;
import com.epmet.commons.tools.constant.NumConstant;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/11/17 10:31 上午
*/
@Data
public class ApplicationListResultDTO implements Serializable {
private static final long serialVersionUID = -4042091778432048631L;
/**
* 申请id
*/
private String issueApplicationId;
/**
* 议题标题
*/
private String issueTitle;
/**
* 建议
*/
private String suggestion;
/**
* 对应issue_application.UPDATED_TIME 对应的秒级时间戳
*/
private Long time;
/**
* 审核状态under_auditing:审核中,approved:通过rejected:驳回
*/
private String applyStatus;
public ApplicationListResultDTO() {
this.issueTitle = "";
this.suggestion = "";
this.time = NumConstant.ZERO_L;
this.applyStatus = "";
}
}

50
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/TopicInfoResultDTO.java

@ -0,0 +1,50 @@
package com.epmet.dto.result;
import com.epmet.commons.tools.constant.NumConstant;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* @Author zxc
* @DateTime 2020/11/17 10:14 上午
*/
@Data
public class TopicInfoResultDTO implements Serializable {
private static final long serialVersionUID = -3445869627210569553L;
/**
* 话题id
*/
private String topicId;
/**
* 话题发表人昵称
*/
private String publishedUser;
/**
* 话题发表时间戳
*/
private Long publishedTime;
/**
* 话题内容
*/
private String topicContent;
/**
* 话题图片集合
*/
private List<String> topicImgs;
public TopicInfoResultDTO() {
this.publishedUser = "";
this.publishedTime = NumConstant.ZERO_L;
this.topicContent = "";
this.topicImgs = new ArrayList<>();
}
}

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

@ -1,5 +1,14 @@
package com.epmet.feign;
import com.epmet.commons.tools.utils.Result;
import com.epmet.resi.group.dto.group.form.ApplicationDetailFormDTO;
import com.epmet.resi.group.dto.group.form.ApplicationHistoryFormDTO;
import com.epmet.resi.group.dto.group.form.ApplicationListFormDTO;
import com.epmet.resi.group.dto.group.result.ApplicationDetailResultDTO;
import com.epmet.resi.group.dto.group.result.ApplicationHistoryResultDTO;
import com.epmet.resi.group.dto.group.result.ApplicationListResultDTO;
import org.springframework.cloud.openfeign.FeignClient;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.IssueDTO;
@ -14,6 +23,10 @@ import com.epmet.dto.form.IssueAppQueryFormDTO;
import com.epmet.dto.form.UserIssueSuggestionFormDTO;
import com.epmet.dto.result.SaveIssueSuggestionResultDTO;
import com.epmet.feign.fallback.GovIssueOpenFeignClientFallBack;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
import com.epmet.resi.mine.dto.from.MyShiftIssueTopicsFormDTO;
import com.epmet.resi.mine.dto.result.MyShiftIssueTopicsResultDTO;
import org.springframework.cloud.openfeign.FeignClient;
@ -43,6 +56,35 @@ import java.util.List;
// @FeignClient(name = ServiceConstant.GOV_ISSUE_SERVER, fallback = GovIssueOpenFeignClientFallBack.class,url = "localhost:8101")
public interface GovIssueOpenFeignClient {
/**
* @Description 待审核||已驳回 申请详情
* @Param applicationDetailFormDTO
* @author zxc
* @date 2020/11/17 10:45 上午
*/
@PostMapping("/gov/issue/issueapplication/applicationdetail")
Result<ApplicationDetailResultDTO> applicationDetail(@RequestBody ApplicationDetailFormDTO applicationDetailFormDTO);
/**
* @Description 话题转议题申请详情- 审核历史查询
* @Param applicationHistoryFormDTO
* @author zxc
* @date 2020/11/17 10:45 上午
*/
@PostMapping("/gov/issue/issueapplication/applicationhistory")
Result<ApplicationHistoryResultDTO> applicationHistory(@RequestBody ApplicationHistoryFormDTO applicationHistoryFormDTO);
/**
* @Description 待审核||已驳回 申请列表
* @Param applicationListFormDTO
* @author zxc
* @date 2020/11/17 10:45 上午
*/
@PostMapping("/gov/issue/issueapplication/applicationlist")
Result<List<ApplicationListResultDTO>> applicationList(@RequestBody ApplicationListFormDTO applicationListFormDTO);
/**
* @Description 个人中心-我参与的议题列表
* @Param myPartIssuesFormDTO

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

@ -1,5 +1,8 @@
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.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
@ -17,6 +20,12 @@ import com.epmet.dto.form.IssueAppQueryFormDTO;
import com.epmet.dto.form.UserIssueSuggestionFormDTO;
import com.epmet.dto.result.SaveIssueSuggestionResultDTO;
import com.epmet.feign.GovIssueOpenFeignClient;
import com.epmet.resi.group.dto.group.form.ApplicationDetailFormDTO;
import com.epmet.resi.group.dto.group.form.ApplicationHistoryFormDTO;
import com.epmet.resi.group.dto.group.form.ApplicationListFormDTO;
import com.epmet.resi.group.dto.group.result.ApplicationDetailResultDTO;
import com.epmet.resi.group.dto.group.result.ApplicationHistoryResultDTO;
import com.epmet.resi.group.dto.group.result.ApplicationListResultDTO;
import com.epmet.resi.mine.dto.from.MyShiftIssueTopicsFormDTO;
import com.epmet.resi.mine.dto.result.MyShiftIssueTopicsResultDTO;
import com.epmet.resi.group.dto.group.form.AllIssueFormDTO;
@ -35,6 +44,20 @@ import java.util.List;
*/
@Component
public class GovIssueOpenFeignClientFallBack implements GovIssueOpenFeignClient {
@Override
public Result<ApplicationDetailResultDTO> applicationDetail(ApplicationDetailFormDTO applicationDetailFormDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER,"applicationDetail",applicationDetailFormDTO);
}
@Override
public Result<ApplicationHistoryResultDTO> applicationHistory(ApplicationHistoryFormDTO applicationHistoryFormDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER,"applicationHistory",applicationHistoryFormDTO);
}
@Override
public Result<List<ApplicationListResultDTO>> applicationList(ApplicationListFormDTO applicationListFormDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER,"applicationList",applicationListFormDTO);
}
@Override
public Result<List<MyPartIssuesResultDTO>> myPartIssues(MyPartIssuesFormDTO myPartIssuesFormDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER,"myPartIssues",myPartIssuesFormDTO);

39
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueApplicationController.java

@ -26,6 +26,12 @@ import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.IssueApplicationDTO;
import com.epmet.dto.form.IssueAppQueryFormDTO;
import com.epmet.resi.group.dto.group.form.ApplicationDetailFormDTO;
import com.epmet.resi.group.dto.group.form.ApplicationHistoryFormDTO;
import com.epmet.resi.group.dto.group.form.ApplicationListFormDTO;
import com.epmet.resi.group.dto.group.result.ApplicationDetailResultDTO;
import com.epmet.resi.group.dto.group.result.ApplicationHistoryResultDTO;
import com.epmet.resi.group.dto.group.result.ApplicationListResultDTO;
import com.epmet.service.IssueApplicationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -83,6 +89,39 @@ public class IssueApplicationController {
return new Result();
}
/**
* @Description 待审核||已驳回 申请详情
* @Param applicationDetailFormDTO
* @author zxc
* @date 2020/11/17 10:45 上午
*/
@PostMapping("applicationdetail")
public Result<ApplicationDetailResultDTO> applicationDetail(@RequestBody ApplicationDetailFormDTO applicationDetailFormDTO){
return new Result<ApplicationDetailResultDTO>().ok(issueApplicationService.applicationDetail(applicationDetailFormDTO));
}
/**
* @Description 话题转议题申请详情- 审核历史查询
* @Param applicationHistoryFormDTO
* @author zxc
* @date 2020/11/17 10:45 上午
*/
@PostMapping("applicationhistory")
public Result<ApplicationHistoryResultDTO> applicationHistory(@RequestBody ApplicationHistoryFormDTO applicationHistoryFormDTO){
return new Result<ApplicationHistoryResultDTO>().ok(issueApplicationService.applicationHistory(applicationHistoryFormDTO));
}
/**
* @Description 待审核||已驳回 申请列表
* @Param applicationListFormDTO
* @author zxc
* @date 2020/11/17 10:45 上午
*/
@PostMapping("applicationlist")
public Result<List<ApplicationListResultDTO>> applicationList(@RequestBody ApplicationListFormDTO applicationListFormDTO){
return new Result<List<ApplicationListResultDTO>>().ok(issueApplicationService.applicationList(applicationListFormDTO));
}
/**
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.IssueApplicationDTO>>
* @param formDTO

11
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueApplicationDao.java

@ -21,6 +21,8 @@ import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.IssueApplicationDTO;
import com.epmet.dto.form.IssueAppQueryFormDTO;
import com.epmet.entity.IssueApplicationEntity;
import com.epmet.resi.group.dto.group.form.ApplicationDetailFormDTO;
import com.epmet.resi.group.dto.group.result.ApplicationDetailResultDTO;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@ -34,6 +36,15 @@ import java.util.List;
@Mapper
public interface IssueApplicationDao extends BaseDao<IssueApplicationEntity> {
/**
* @Description 待审核||已驳回 申请详情
* @Param applicationDetailFormDTO
* @author zxc
* @date 2020/11/17 10:45 上午
*/
ApplicationDetailResultDTO applicationDetail(ApplicationDetailFormDTO applicationDetailFormDTO);
/**
* @param formDTO
* @author yinzuomei

30
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueApplicationService.java

@ -22,6 +22,12 @@ import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.IssueApplicationDTO;
import com.epmet.dto.form.IssueAppQueryFormDTO;
import com.epmet.entity.IssueApplicationEntity;
import com.epmet.resi.group.dto.group.form.ApplicationDetailFormDTO;
import com.epmet.resi.group.dto.group.form.ApplicationHistoryFormDTO;
import com.epmet.resi.group.dto.group.form.ApplicationListFormDTO;
import com.epmet.resi.group.dto.group.result.ApplicationDetailResultDTO;
import com.epmet.resi.group.dto.group.result.ApplicationHistoryResultDTO;
import com.epmet.resi.group.dto.group.result.ApplicationListResultDTO;
import java.util.List;
import java.util.Map;
@ -94,6 +100,30 @@ public interface IssueApplicationService extends BaseService<IssueApplicationEnt
*/
void delete(String[] ids);
/**
* @Description 待审核||已驳回 申请详情
* @Param applicationDetailFormDTO
* @author zxc
* @date 2020/11/17 10:45 上午
*/
ApplicationDetailResultDTO applicationDetail(ApplicationDetailFormDTO applicationDetailFormDTO);
/**
* @Description 话题转议题申请详情- 审核历史查询
* @Param applicationHistoryFormDTO
* @author zxc
* @date 2020/11/17 10:45 上午
*/
ApplicationHistoryResultDTO applicationHistory(ApplicationHistoryFormDTO applicationHistoryFormDTO);
/**
* @Description 待审核||已驳回 申请列表
* @Param applicationListFormDTO
* @author zxc
* @date 2020/11/17 10:45 上午
*/
List<ApplicationListResultDTO> applicationList(ApplicationListFormDTO applicationListFormDTO);
/**
* @return java.util.List<com.epmet.dto.IssueApplicationDTO>
* @param formDTO

40
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationServiceImpl.java

@ -27,6 +27,12 @@ import com.epmet.dao.IssueApplicationDao;
import com.epmet.dto.IssueApplicationDTO;
import com.epmet.dto.form.IssueAppQueryFormDTO;
import com.epmet.entity.IssueApplicationEntity;
import com.epmet.resi.group.dto.group.form.ApplicationDetailFormDTO;
import com.epmet.resi.group.dto.group.form.ApplicationHistoryFormDTO;
import com.epmet.resi.group.dto.group.form.ApplicationListFormDTO;
import com.epmet.resi.group.dto.group.result.ApplicationDetailResultDTO;
import com.epmet.resi.group.dto.group.result.ApplicationHistoryResultDTO;
import com.epmet.resi.group.dto.group.result.ApplicationListResultDTO;
import com.epmet.service.IssueApplicationService;
import com.github.pagehelper.PageHelper;
import org.apache.commons.lang3.StringUtils;
@ -111,4 +117,38 @@ public class IssueApplicationServiceImpl extends BaseServiceImpl<IssueApplicatio
return baseDao.selectList(formDTO);
}
/**
* @Description 待审核||已驳回 申请详情
* @Param applicationDetailFormDTO
* @author zxc
* @date 2020/11/17 10:45 上午
*/
@Override
public ApplicationDetailResultDTO applicationDetail(ApplicationDetailFormDTO applicationDetailFormDTO) {
ApplicationDetailResultDTO applicationDetailResultDTO = baseDao.applicationDetail(applicationDetailFormDTO);
return applicationDetailResultDTO;
}
/**
* @Description 话题转议题申请详情- 审核历史查询
* @Param applicationHistoryFormDTO
* @author zxc
* @date 2020/11/17 10:45 上午
*/
@Override
public ApplicationHistoryResultDTO applicationHistory(ApplicationHistoryFormDTO applicationHistoryFormDTO) {
return null;
}
/**
* @Description 待审核||已驳回 申请列表
* @Param applicationListFormDTO
* @author zxc
* @date 2020/11/17 10:45 上午
*/
@Override
public List<ApplicationListResultDTO> applicationList(ApplicationListFormDTO applicationListFormDTO) {
return null;
}
}

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

@ -3,6 +3,17 @@
<mapper namespace="com.epmet.dao.IssueApplicationDao">
<select id="applicationDetail" resultType="com.epmet.resi.group.dto.group.result.ApplicationDetailResultDTO">
SELECT
ID AS issueApplicationId,
ISSUE_TITLE,
GRID_ID,
topic_id,
CREATED_BY AS userId
FROM issue_application
WHERE DEL_FLAG = '0'
AND ID = #{issueApplicationId}
</select>
<!-- 分页按条件查询issue_application -->
<select id="selectList" resultType="com.epmet.dto.IssueApplicationDTO" parameterType="com.epmet.dto.form.IssueAppQueryFormDTO">
SELECT

48
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/ApplicationDetailCopyResultDTO.java

@ -0,0 +1,48 @@
package com.epmet.resi.group.dto.group.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/11/17 10:12 上午
*/
@Data
public class ApplicationDetailCopyResultDTO implements Serializable {
private static final long serialVersionUID = 1121268898544759693L;
/**
* 申请ID
*/
private String issueApplicationId;
/**
* 议题标题
*/
private String issueTitle;
/**
* 所属网格名称
*/
private String gridName;
/**
* 议题发起人
*/
private String issuePublisher;
/**
* 话题相关信息
*/
private TopicInfoResultDTO topicInfo;
public ApplicationDetailCopyResultDTO() {
this.issueApplicationId = "";
this.issueTitle = "";
this.gridName = "";
this.issuePublisher = "";
this.topicInfo = new TopicInfoResultDTO();
}
}

8
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/ApplicationDetailResultDTO.java

@ -1,5 +1,6 @@
package com.epmet.resi.group.dto.group.result;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.io.Serializable;
@ -38,7 +39,14 @@ public class ApplicationDetailResultDTO implements Serializable {
*/
private TopicInfoResultDTO topicInfo;
private String gridId;
private String topicId;
private String userId;
public ApplicationDetailResultDTO() {
this.issueApplicationId = "";
this.issueTitle = "";
this.gridName = "";
this.issuePublisher = "";

5
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/TopicInfoResultDTO.java

@ -1,6 +1,7 @@
package com.epmet.resi.group.dto.group.result;
import com.epmet.commons.tools.constant.NumConstant;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.io.Serializable;
@ -41,7 +42,11 @@ public class TopicInfoResultDTO implements Serializable {
*/
private List<String> topicImgs;
@JsonIgnore
private String topicUserId;
public TopicInfoResultDTO() {
this.topicId = "";
this.publishedUser = "";
this.publishedTime = NumConstant.ZERO_L;
this.topicContent = "";

12
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/GroupIssueController.java

@ -7,6 +7,10 @@ import com.epmet.resi.group.dto.group.form.AllIssueFormDTO;
import com.epmet.resi.group.dto.group.form.ApplicationDetailFormDTO;
import com.epmet.resi.group.dto.group.form.ApplicationHistoryFormDTO;
import com.epmet.resi.group.dto.group.form.ApplicationListFormDTO;
import com.epmet.resi.group.dto.group.result.ApplicationDetailCopyResultDTO;
import com.epmet.resi.group.dto.group.result.ApplicationDetailResultDTO;
import com.epmet.resi.group.dto.group.result.ApplicationHistoryResultDTO;
import com.epmet.resi.group.dto.group.result.ApplicationListResultDTO;
import com.epmet.resi.group.dto.group.result.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@ -36,9 +40,9 @@ public class GroupIssueController {
* @date 2020/11/17 10:45 上午
*/
@PostMapping("applicationdetail")
public Result<ApplicationDetailResultDTO> applicationDetail(@RequestBody ApplicationDetailFormDTO applicationDetailFormDTO){
public Result<ApplicationDetailCopyResultDTO> applicationDetail(@RequestBody ApplicationDetailFormDTO applicationDetailFormDTO){
ValidatorUtils.validateEntity(applicationDetailFormDTO, ApplicationDetailFormDTO.ApplicationDetail.class);
return new Result<ApplicationDetailResultDTO>().ok(groupIssueService.applicationDetail(applicationDetailFormDTO));
return new Result<ApplicationDetailCopyResultDTO>().ok(groupIssueService.applicationDetail(applicationDetailFormDTO));
}
/**
@ -64,11 +68,11 @@ public class GroupIssueController {
ValidatorUtils.validateEntity(applicationListFormDTO, ApplicationListFormDTO.ApplicationList.class);
return new Result<List<ApplicationListResultDTO>>().ok(groupIssueService.applicationList(applicationListFormDTO));
}
/**
* 表决中列表
* @author zhaoqifeng
* @date 2020/11/17 13:52
* @date 2020/11/17 13:52
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.resi.group.dto.group.result.VotingListResultDTO>>
*/

8
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupDao.java

@ -189,6 +189,14 @@ public interface ResiGroupDao extends BaseDao<ResiGroupEntity> {
**/
List<ResiGroupDTO> selectGroupListByGridIds(@Param("gridIds") List<String> gridIds);
/**
* @Description 查询话题信息
* @Param topicId
* @author zxc
* @date 2020/11/17 2:10 下午
*/
TopicInfoResultDTO selectTopicInfo(@Param("topicId") String topicId);
/**
* @Description 查询话题所属小组名
* @Param groupInfoFormDTO

6
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/GroupIssueService.java

@ -4,6 +4,10 @@ import com.epmet.resi.group.dto.group.form.AllIssueFormDTO;
import com.epmet.resi.group.dto.group.form.ApplicationDetailFormDTO;
import com.epmet.resi.group.dto.group.form.ApplicationHistoryFormDTO;
import com.epmet.resi.group.dto.group.form.ApplicationListFormDTO;
import com.epmet.resi.group.dto.group.result.ApplicationDetailCopyResultDTO;
import com.epmet.resi.group.dto.group.result.ApplicationDetailResultDTO;
import com.epmet.resi.group.dto.group.result.ApplicationHistoryResultDTO;
import com.epmet.resi.group.dto.group.result.ApplicationListResultDTO;
import com.epmet.resi.group.dto.group.result.*;
import java.util.List;
@ -21,7 +25,7 @@ public interface GroupIssueService {
* @author zxc
* @date 2020/11/17 10:45 上午
*/
ApplicationDetailResultDTO applicationDetail(ApplicationDetailFormDTO applicationDetailFormDTO);
ApplicationDetailCopyResultDTO applicationDetail(ApplicationDetailFormDTO applicationDetailFormDTO);
/**
* @Description 话题转议题申请详情- 审核历史查询

87
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/GroupIssueServiceImpl.java

@ -1,5 +1,14 @@
package com.epmet.modules.group.service.impl;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.result.AllGridsByUserIdResultDTO;
import com.epmet.dto.result.UserBaseInfoResultDTO;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.feign.GovIssueOpenFeignClient;
import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.modules.group.dao.ResiGroupDao;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
@ -15,6 +24,8 @@ import com.epmet.resi.group.dto.group.form.ApplicationListFormDTO;
import com.epmet.resi.group.dto.group.result.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -30,6 +41,18 @@ import java.util.List;
@Service
public class GroupIssueServiceImpl implements GroupIssueService {
@Autowired
private GovIssueOpenFeignClient govIssueOpenFeignClient;
@Autowired
private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
@Autowired
private GovOrgOpenFeignClient govOrgOpenFeignClient;
@Autowired
private ResiGroupDao resiGroupDao;
@Autowired
private ResiTopicService resiTopicService;
@Autowired
@ -42,8 +65,68 @@ public class GroupIssueServiceImpl implements GroupIssueService {
* @date 2020/11/17 10:45 上午
*/
@Override
public ApplicationDetailResultDTO applicationDetail(ApplicationDetailFormDTO applicationDetailFormDTO) {
return null;
public ApplicationDetailCopyResultDTO applicationDetail(ApplicationDetailFormDTO applicationDetailFormDTO) {
Result<ApplicationDetailResultDTO> result = govIssueOpenFeignClient.applicationDetail(applicationDetailFormDTO);
if (!result.success()){
throw new RenException("查询待审核||已驳回申请详情失败......");
}
if (null==result.getData()){
return new ApplicationDetailCopyResultDTO();
}
List<String> userIds = new ArrayList<>();
ApplicationDetailResultDTO data = result.getData();
userIds.add(data.getUserId());
TopicInfoResultDTO topicInfoResultDTO = resiGroupDao.selectTopicInfo(data.getTopicId());
userIds.add(topicInfoResultDTO.getTopicUserId());
Result<List<UserBaseInfoResultDTO>> listResult = epmetUserOpenFeignClient.queryUserBaseInfo(userIds);
if (!listResult.success()){
throw new RenException("查询话题创建者,议题创建者失败......");
}
listResult.getData().forEach(user -> {
if (user.getUserId().equals(data.getUserId())){
data.setIssuePublisher(user.getDistrict().concat("-").concat(user.getSurname()).concat(getMrOrMs(user.getGender())));
}
if (user.getUserId().equals(topicInfoResultDTO.getTopicUserId())){
topicInfoResultDTO.setPublishedUser(user.getDistrict().concat("-").concat(user.getSurname()).concat(getMrOrMs(user.getGender())));
}
});
List<String> gridIds = new ArrayList<>();
gridIds.add(data.getGridId());
Result<List<AllGridsByUserIdResultDTO>> gridListByGridIds = govOrgOpenFeignClient.getGridListByGridIds(gridIds);
if (!gridListByGridIds.success()){
throw new RenException("查询议题所属网格名称失败......");
}
gridListByGridIds.getData().forEach(grid -> {
if (grid.getGridId().equals(data.getGridId())){
data.setGridName(grid.getGridName());
}
});
data.setTopicInfo(topicInfoResultDTO);
return ConvertUtils.sourceToTarget(data,ApplicationDetailCopyResultDTO.class);
}
/**
* @Description 获取 先生/女士
* @Param gender
* @author zxc
* @date 2020/11/17 2:40 下午
*/
public String getMrOrMs(String gender){
if (StringUtils.isEmpty(gender)){
return "先生/女士";
}
String result;
switch (gender){
case "1":
result = "先生";
case "2":
result = "女士";
case "0":
result = "先生/女士";
default:
result = "先生/女士";
}
return result;
}
/**

25
epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml

@ -413,4 +413,29 @@
</foreach>
</select>
<!-- 查询话题信息 -->
<resultMap id="selectTopicInfoMap" type="com.epmet.resi.group.dto.group.result.TopicInfoResultDTO">
<result property="publishedTime" column="publishedTime"/>
<result property="topicContent" column="topicContent"/>
<result property="topicId" column="topicId"/>
<result property="topicUserId" column="topicUserId"/>
<collection property="topicImgs" ofType="java.lang.String">
<result column="imgUrl"/>
<result column="id"/>
</collection>
</resultMap>
<select id="selectTopicInfo" resultMap="selectTopicInfoMap">
SELECT
rt.ID AS topicId,
rt.CREATED_BY AS topicUserId,
UNIX_TIMESTAMP(rt.CREATED_TIME) AS publishedTime,
rt.TOPIC_CONTENT as topicContent,
ta.ATTACHMENT_URL AS imgUrl
FROM resi_topic rt
LEFT JOIN resi_topic_attachment ta ON ta.TOPIC_ID = rt.ID
WHERE rt.DEL_FLAG = '0'
AND ta.DEL_FLAG = '0'
AND rt.ID = #{topicId}
</select>
</mapper>

Loading…
Cancel
Save