Browse Source
# Conflicts: # epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java # epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/fallback/ResiGroupOpenFeignClientFallback.javadev_shibei_match
88 changed files with 1923 additions and 133 deletions
@ -0,0 +1,35 @@ |
|||||
|
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"; |
||||
|
|
||||
|
/** |
||||
|
* 议题来源类型 eg:resi_topic |
||||
|
*/ |
||||
|
String SOURCE_TYPE_RT="resi_topic"; |
||||
|
} |
@ -0,0 +1,38 @@ |
|||||
|
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/13 3:30 下午 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class MyShiftIssueTopicsFormDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = -3943178729586797400L; |
||||
|
|
||||
|
public interface MyShiftIssueTopics{} |
||||
|
|
||||
|
/** |
||||
|
* 页码 |
||||
|
*/ |
||||
|
@NotNull(message = "页码不能为空",groups = {MyShiftIssueTopics.class}) |
||||
|
private Integer pageNo; |
||||
|
|
||||
|
/** |
||||
|
* 每页数量 |
||||
|
*/ |
||||
|
@NotNull(message = "每页数量不能为空",groups = {MyShiftIssueTopics.class}) |
||||
|
private Integer pageSize; |
||||
|
|
||||
|
|
||||
|
@NotBlank(message = "客户ID不能为空",groups = {MyShiftIssueTopics.class}) |
||||
|
private String customerId; |
||||
|
|
||||
|
private String userId; |
||||
|
|
||||
|
} |
@ -0,0 +1,43 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2020/11/13 3:31 下午 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class MyShiftIssueTopicsResultDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = -703102629653169023L; |
||||
|
|
||||
|
/** |
||||
|
* 话题ID |
||||
|
*/ |
||||
|
private String topicId; |
||||
|
|
||||
|
/** |
||||
|
* 转议题时间 |
||||
|
*/ |
||||
|
private Long shiftIssueTime; |
||||
|
|
||||
|
/** |
||||
|
* 建议 |
||||
|
*/ |
||||
|
private String suggestion; |
||||
|
|
||||
|
/** |
||||
|
* 议题标题 |
||||
|
*/ |
||||
|
private String issueTitle; |
||||
|
|
||||
|
/** |
||||
|
* 话题发表网格名称 |
||||
|
*/ |
||||
|
private String releaseGridName; |
||||
|
|
||||
|
private String gridId; |
||||
|
|
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
|
||||
|
@Data |
||||
|
public class ProjectByCreateTopicUserFormDTO { |
||||
|
|
||||
|
public interface ListByUserGroup {} |
||||
|
|
||||
|
@NotBlank(message = "客户ID不能为空", groups = { ListByUserGroup.class }) |
||||
|
private String customerId; |
||||
|
|
||||
|
@NotBlank(message = "用户ID不能为空", groups = { ListByUserGroup.class }) |
||||
|
private String userId; |
||||
|
private Integer pageNo = 1; |
||||
|
private Integer pageSize = 10; |
||||
|
|
||||
|
} |
@ -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; |
||||
|
|
||||
|
} |
@ -0,0 +1,48 @@ |
|||||
|
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; |
||||
|
|
||||
|
private String issueId; |
||||
|
} |
@ -0,0 +1,18 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Data |
||||
|
public class ProjectOfCreateTopicUserResultDTO { |
||||
|
|
||||
|
private String topicId; |
||||
|
private String projectId; |
||||
|
private String gridId; |
||||
|
private Long shiftProjectTime; |
||||
|
private List<String> departmentNameList; |
||||
|
private String projectTitle; |
||||
|
private String releaseGridId; |
||||
|
|
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
ALTER TABLE `project_related_personnel` ADD COLUMN `SOURCE_TYPE` VARCHAR (32) CHARACTER |
||||
|
SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '来源类型(话题:topic 议题:issue)' AFTER `GRID_ID`, |
||||
|
ADD COLUMN `SOURCE_ID` VARCHAR (64) CHARACTER |
||||
|
SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '来源Id(话题或议题Id)' AFTER `SOURCE_TYPE`; |
||||
|
|
||||
|
-- 更改项目库的字符集 |
||||
|
alter table customer_project_parameter convert to character set utf8mb4 collate utf8mb4_general_ci; |
||||
|
alter table project convert to character set utf8mb4 collate utf8mb4_general_ci; |
||||
|
alter table project_org_relation convert to character set utf8mb4 collate utf8mb4_general_ci; |
||||
|
alter table project_process convert to character set utf8mb4 collate utf8mb4_general_ci; |
||||
|
alter table project_related_personnel convert to character set utf8mb4 collate utf8mb4_general_ci; |
||||
|
alter table project_satisfaction_detail convert to character set utf8mb4 collate utf8mb4_general_ci; |
||||
|
alter table project_satisfaction_statistics convert to character set utf8mb4 collate utf8mb4_general_ci; |
||||
|
alter table project_staff convert to character set utf8mb4 collate utf8mb4_general_ci; |
@ -0,0 +1,20 @@ |
|||||
|
package com.epmet.resi.group.dto.topic; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
|
||||
|
@Data |
||||
|
public class MyCreateTopicsFormDTO { |
||||
|
|
||||
|
@NotBlank(message = "客户id不能为空") |
||||
|
private String customerId; |
||||
|
|
||||
|
@NotBlank(message = "用户id不能为空") |
||||
|
private String userId; |
||||
|
|
||||
|
private Integer pageSize = 10; |
||||
|
|
||||
|
private Integer pageNo = 1; |
||||
|
|
||||
|
} |
@ -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; |
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
package com.epmet.resi.group.dto.topic.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2020/11/13 4:27 下午 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class TopicIdListFormDTO{ |
||||
|
|
||||
|
private String userId; |
||||
|
|
||||
|
} |
@ -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; |
||||
|
} |
@ -0,0 +1,13 @@ |
|||||
|
package com.epmet.resi.mine.dto.from; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
|
||||
|
@Data |
||||
|
public class MyCreateTopicsFormDTO { |
||||
|
@NotBlank(message = "客户id不能为空") |
||||
|
private String customerId; |
||||
|
private Integer pageNo = 1; |
||||
|
private Integer pageSize = 10; |
||||
|
} |
@ -0,0 +1,38 @@ |
|||||
|
package com.epmet.resi.mine.dto.from; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2020/11/13 3:30 下午 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class MyShiftIssueTopicsFormDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = -3943178729586797400L; |
||||
|
|
||||
|
public interface MyShiftIssueTopics{} |
||||
|
|
||||
|
/** |
||||
|
* 页码 |
||||
|
*/ |
||||
|
@NotNull(message = "页码不能为空",groups = {MyShiftIssueTopics.class}) |
||||
|
private Integer pageNo; |
||||
|
|
||||
|
/** |
||||
|
* 每页数量 |
||||
|
*/ |
||||
|
@NotNull(message = "每页数量不能为空",groups = {MyShiftIssueTopics.class}) |
||||
|
private Integer pageSize; |
||||
|
|
||||
|
|
||||
|
@NotBlank(message = "客户ID不能为空",groups = {MyShiftIssueTopics.class}) |
||||
|
private String customerId; |
||||
|
|
||||
|
private String userId; |
||||
|
|
||||
|
} |
@ -1,14 +1,14 @@ |
|||||
package com.epmet.resi.group.dto.topic; |
package com.epmet.resi.mine.dto.from; |
||||
|
|
||||
import lombok.Data; |
import lombok.Data; |
||||
|
|
||||
@Data |
@Data |
||||
public class MyTopicsFormDTO { |
public class MyShiftProjectTopicsFormDTO { |
||||
|
|
||||
private String customerId; |
private String customerId; |
||||
|
|
||||
private Integer pageSize = 10; |
|
||||
|
|
||||
private Integer pageNo = 1; |
private Integer pageNo = 1; |
||||
|
|
||||
|
private Integer pageSize = 10; |
||||
|
|
||||
} |
} |
@ -0,0 +1,13 @@ |
|||||
|
package com.epmet.resi.mine.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
@Data |
||||
|
public class MyCreateTopicsResultDTO { |
||||
|
private String topicId; |
||||
|
private Long releaseTime; |
||||
|
private String topicContent; |
||||
|
private String releaseGroupName; |
||||
|
private String releaseGridId; |
||||
|
private String releaseGridName; |
||||
|
} |
@ -0,0 +1,41 @@ |
|||||
|
package com.epmet.resi.mine.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2020/11/13 3:31 下午 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class MyShiftIssueTopicsResultDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = -703102629653169023L; |
||||
|
|
||||
|
/** |
||||
|
* 话题ID |
||||
|
*/ |
||||
|
private String topicId; |
||||
|
|
||||
|
/** |
||||
|
* 转议题时间 |
||||
|
*/ |
||||
|
private Long shiftIssueTime; |
||||
|
|
||||
|
/** |
||||
|
* 建议 |
||||
|
*/ |
||||
|
private String suggestion; |
||||
|
|
||||
|
/** |
||||
|
* 议题标题 |
||||
|
*/ |
||||
|
private String issueTitle; |
||||
|
|
||||
|
/** |
||||
|
* 话题发表网格名称 |
||||
|
*/ |
||||
|
private String releaseGridName; |
||||
|
|
||||
|
} |
@ -0,0 +1,15 @@ |
|||||
|
package com.epmet.resi.mine.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Data |
||||
|
public class MyShiftProjectTopicsResultDTO { |
||||
|
private String topicId; |
||||
|
private String gridId; |
||||
|
private Long shiftProjectTime; |
||||
|
private List<String> departmentNameList; |
||||
|
private String projectTitle; |
||||
|
private String releaseGridName; |
||||
|
} |
@ -0,0 +1,94 @@ |
|||||
|
package com.epmet.modules.person.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.annotation.LoginUser; |
||||
|
import com.epmet.commons.tools.security.dto.TokenDto; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.modules.person.service.TopicService; |
||||
|
import com.epmet.resi.group.dto.topic.form.CustomerPageFormDTO; |
||||
|
import com.epmet.resi.group.dto.topic.result.ParticipatedTopicUnitResultDTO; |
||||
|
import com.epmet.resi.group.feign.ResiGroupOpenFeignClient; |
||||
|
import com.epmet.resi.mine.dto.from.MyCreateTopicsFormDTO; |
||||
|
import com.epmet.resi.mine.dto.from.MyShiftIssueTopicsFormDTO; |
||||
|
import com.epmet.resi.mine.dto.from.MyShiftProjectTopicsFormDTO; |
||||
|
import com.epmet.resi.mine.dto.result.MyCreateTopicsResultDTO; |
||||
|
import com.epmet.resi.mine.dto.result.MyShiftIssueTopicsResultDTO; |
||||
|
import com.epmet.resi.mine.dto.result.MyShiftProjectTopicsResultDTO; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
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 java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Description 个人中心-话题 |
||||
|
* @ClassName TopicController |
||||
|
* @Auth wangc |
||||
|
* @Date 2020-11-12 14:33 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("topic") |
||||
|
public class TopicController { |
||||
|
|
||||
|
@Autowired |
||||
|
private ResiGroupOpenFeignClient groupFeign; |
||||
|
|
||||
|
@Autowired |
||||
|
private TopicService topicService; |
||||
|
|
||||
|
/** |
||||
|
* @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") |
||||
|
Result<List<ParticipatedTopicUnitResultDTO>> myPartTopics(@LoginUser TokenDto token , @RequestBody CustomerPageFormDTO param){ |
||||
|
param.setUserId(token.getUserId()); |
||||
|
ValidatorUtils.validateEntity(param); |
||||
|
return groupFeign.myPartTopics(param); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @Description 查询我的已转项目的话题列表 |
||||
|
* @return |
||||
|
* @author wxz |
||||
|
* @date 2020.11.13 10:13 |
||||
|
*/ |
||||
|
@PostMapping("my-shiftproject-topics") |
||||
|
public Result<List<MyShiftProjectTopicsResultDTO>> listMyShiftProjectTopics(@RequestBody MyShiftProjectTopicsFormDTO form, @LoginUser TokenDto tokenDto) { |
||||
|
ValidatorUtils.validateEntity(form); |
||||
|
List<MyShiftProjectTopicsResultDTO> topics = topicService.listMyShiftProjectTopics(tokenDto.getUserId(), form.getCustomerId(), form.getPageNo(), form.getPageSize()); |
||||
|
return new Result<List<MyShiftProjectTopicsResultDTO>>().ok(topics); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @Description 我创建的话题列表 |
||||
|
* @return |
||||
|
* @author wxz |
||||
|
* @date 2020.11.13 15:09 |
||||
|
*/ |
||||
|
@PostMapping("my-create-topics") |
||||
|
public Result<List<MyCreateTopicsResultDTO>> listMyCreateTopics(@RequestBody MyCreateTopicsFormDTO form, @LoginUser TokenDto tokenDto) { |
||||
|
ValidatorUtils.validateEntity(form); |
||||
|
List<MyCreateTopicsResultDTO> topics = topicService.listMyCreateTopics(form.getCustomerId(), tokenDto.getUserId(), form.getPageNo(), form.getPageSize()); |
||||
|
return new Result<List<MyCreateTopicsResultDTO>>().ok(topics); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @Description 个人中心-我发表的话题列表-已转议题列表 |
||||
|
* @Param tokenDto |
||||
|
* @Param myShiftIssueTopicsFormDTO |
||||
|
* @author zxc |
||||
|
* @date 2020/11/13 3:42 下午 |
||||
|
*/ |
||||
|
@PostMapping("my-shiftissue-topics") |
||||
|
public Result<List<MyShiftIssueTopicsResultDTO>> myShiftIssueTopics(@LoginUser TokenDto tokenDto, @RequestBody MyShiftIssueTopicsFormDTO myShiftIssueTopicsFormDTO){ |
||||
|
ValidatorUtils.validateEntity(myShiftIssueTopicsFormDTO, MyShiftIssueTopicsFormDTO.MyShiftIssueTopics.class); |
||||
|
return new Result<List<MyShiftIssueTopicsResultDTO>>().ok(topicService.myShiftIssueTopics(tokenDto,myShiftIssueTopicsFormDTO)); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,39 @@ |
|||||
|
package com.epmet.modules.person.service; |
||||
|
|
||||
|
import com.epmet.commons.tools.security.dto.TokenDto; |
||||
|
import com.epmet.resi.mine.dto.from.MyShiftIssueTopicsFormDTO; |
||||
|
import com.epmet.resi.mine.dto.result.MyCreateTopicsResultDTO; |
||||
|
import com.epmet.resi.mine.dto.result.MyShiftIssueTopicsResultDTO; |
||||
|
import com.epmet.resi.mine.dto.result.MyShiftProjectTopicsResultDTO; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 话题service |
||||
|
*/ |
||||
|
public interface TopicService { |
||||
|
/** |
||||
|
* @Description 列出我的已转项目的话题列表 |
||||
|
* @return |
||||
|
* @author wxz |
||||
|
* @date 2020.11.13 10:17 |
||||
|
*/ |
||||
|
List<MyShiftProjectTopicsResultDTO> listMyShiftProjectTopics(String userId, String customerId, Integer pageNo, Integer pageSize); |
||||
|
|
||||
|
/** |
||||
|
* @Description 我创建的话题列表 |
||||
|
* @return |
||||
|
* @author wxz |
||||
|
* @date 2020.11.13 15:00 |
||||
|
*/ |
||||
|
List<MyCreateTopicsResultDTO> listMyCreateTopics(String customerId, String userId, Integer pageNo, Integer pageSize); |
||||
|
|
||||
|
/** |
||||
|
* @Description 个人中心-我发表的话题列表-已转议题列表 |
||||
|
* @Param tokenDto |
||||
|
* @Param myShiftIssueTopicsResultDTO |
||||
|
* @author zxc |
||||
|
* @date 2020/11/13 3:42 下午 |
||||
|
*/ |
||||
|
List<MyShiftIssueTopicsResultDTO> myShiftIssueTopics(TokenDto tokenDto, MyShiftIssueTopicsFormDTO myShiftIssueTopicsFormDTO); |
||||
|
} |
@ -0,0 +1,112 @@ |
|||||
|
package com.epmet.modules.person.service.impl; |
||||
|
|
||||
|
import com.epmet.commons.tools.exception.RenException; |
||||
|
import com.epmet.commons.tools.security.dto.TokenDto; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.dto.form.ProjectByCreateTopicUserFormDTO; |
||||
|
import com.epmet.dto.result.AllGridsByUserIdResultDTO; |
||||
|
import com.epmet.dto.result.ProjectOfCreateTopicUserResultDTO; |
||||
|
import com.epmet.feign.GovIssueOpenFeignClient; |
||||
|
import com.epmet.feign.GovOrgOpenFeignClient; |
||||
|
import com.epmet.feign.GovProjectOpenFeignClient; |
||||
|
import com.epmet.modules.person.service.TopicService; |
||||
|
import com.epmet.resi.group.dto.topic.MyCreateTopicsFormDTO; |
||||
|
import com.epmet.resi.group.feign.ResiGroupOpenFeignClient; |
||||
|
import com.epmet.resi.mine.dto.from.MyShiftIssueTopicsFormDTO; |
||||
|
import com.epmet.resi.mine.dto.result.MyCreateTopicsResultDTO; |
||||
|
import com.epmet.resi.mine.dto.result.MyShiftIssueTopicsResultDTO; |
||||
|
import com.epmet.resi.mine.dto.result.MyShiftProjectTopicsResultDTO; |
||||
|
import org.slf4j.Logger; |
||||
|
import org.slf4j.LoggerFactory; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.util.CollectionUtils; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.HashMap; |
||||
|
import java.util.List; |
||||
|
import java.util.stream.Collectors; |
||||
|
|
||||
|
@Service |
||||
|
public class TopicServiceImpl implements TopicService { |
||||
|
|
||||
|
private static Logger logger = LoggerFactory.getLogger(TopicServiceImpl.class); |
||||
|
|
||||
|
@Autowired |
||||
|
private GovProjectOpenFeignClient govProjectOpenFeignClient; |
||||
|
|
||||
|
@Autowired |
||||
|
private GovOrgOpenFeignClient govOrgOpenFeignClient; |
||||
|
|
||||
|
@Autowired |
||||
|
private ResiGroupOpenFeignClient resiGroupOpenFeignClient; |
||||
|
|
||||
|
@Autowired |
||||
|
private GovIssueOpenFeignClient govIssueOpenFeignClient; |
||||
|
|
||||
|
@Override |
||||
|
public List<MyShiftProjectTopicsResultDTO> listMyShiftProjectTopics(String userId, String customerId, Integer pageNo, Integer pageSize) { |
||||
|
ProjectByCreateTopicUserFormDTO form = new ProjectByCreateTopicUserFormDTO(); |
||||
|
form.setCustomerId(customerId); |
||||
|
form.setUserId(userId); |
||||
|
form.setPageNo(pageNo); |
||||
|
form.setPageSize(pageSize); |
||||
|
Result<List<ProjectOfCreateTopicUserResultDTO>> result = govProjectOpenFeignClient.listProjectsByCreateTopicUserId(form); |
||||
|
if (!result.success()) { |
||||
|
throw new RenException(result.getCode(), result.getInternalMsg(), result.getMsg(), RenException.MessageMode.CODE_INTERNAL_EXTERNAL); |
||||
|
} |
||||
|
|
||||
|
List<ProjectOfCreateTopicUserResultDTO> projects = result.getData(); |
||||
|
|
||||
|
List<MyShiftProjectTopicsResultDTO> projectTopics = ConvertUtils.sourceToTarget(projects, MyShiftProjectTopicsResultDTO.class); |
||||
|
List<String> gridIds = projects.stream().map(p -> p.getGridId()).collect(Collectors.toList()); |
||||
|
|
||||
|
Result<List<AllGridsByUserIdResultDTO>> rst = govOrgOpenFeignClient.getGridListByGridIds(gridIds); |
||||
|
if (!rst.success()) { |
||||
|
logger.error("查询我创建的话题列表(已转议题),根据网格id查询网格名称失败, InternalMsg:{},Msg:{}", rst.getInternalMsg(), rst.getMsg()); |
||||
|
} else { |
||||
|
List<AllGridsByUserIdResultDTO> gridInfos = rst.getData(); |
||||
|
HashMap<String, String> gridIdAndNames = new HashMap<>(); |
||||
|
gridInfos.stream().forEach(g -> gridIdAndNames.put(g.getGridId(), g.getGridName())); |
||||
|
projectTopics.stream().forEach(pt -> pt.setReleaseGridName(gridIdAndNames.get(pt.getGridId()))); |
||||
|
} |
||||
|
|
||||
|
return projectTopics; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<MyCreateTopicsResultDTO> listMyCreateTopics(String customerId, String userId, Integer pageNo, Integer pageSize) { |
||||
|
MyCreateTopicsFormDTO form = new MyCreateTopicsFormDTO(); |
||||
|
form.setCustomerId(customerId); |
||||
|
form.setUserId(userId); |
||||
|
form.setPageNo(pageNo); |
||||
|
form.setPageSize(pageSize); |
||||
|
Result<List<com.epmet.resi.group.dto.topic.result.MyCreateTopicsResultDTO >> result = resiGroupOpenFeignClient.listMyCreateTopics(form); |
||||
|
if (!result.success()) { |
||||
|
throw new RenException(result.getCode(), result.getInternalMsg(), result.getMsg(), RenException.MessageMode.CODE_INTERNAL_EXTERNAL); |
||||
|
} |
||||
|
List<com.epmet.resi.group.dto.topic.result.MyCreateTopicsResultDTO > topics = result.getData(); |
||||
|
return ConvertUtils.sourceToTarget(topics, MyCreateTopicsResultDTO.class); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @Description 个人中心-我发表的话题列表-已转议题列表 |
||||
|
* @Param tokenDto |
||||
|
* @Param myShiftIssueTopicsResultDTO |
||||
|
* @author zxc |
||||
|
* @date 2020/11/13 3:42 下午 |
||||
|
*/ |
||||
|
@Override |
||||
|
public List<MyShiftIssueTopicsResultDTO> myShiftIssueTopics(TokenDto tokenDto, MyShiftIssueTopicsFormDTO myShiftIssueTopicsFormDTO) { |
||||
|
myShiftIssueTopicsFormDTO.setUserId(tokenDto.getUserId()); |
||||
|
Result<List<MyShiftIssueTopicsResultDTO>> listResult = govIssueOpenFeignClient.myShiftIssueTopics(myShiftIssueTopicsFormDTO); |
||||
|
if (!listResult.success()){ |
||||
|
throw new RenException("查询我发表的话题列表-已转议题列表失败......"); |
||||
|
} |
||||
|
if (CollectionUtils.isEmpty(listResult.getData())){ |
||||
|
return new ArrayList<>(); |
||||
|
} |
||||
|
return listResult.getData(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,26 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* 网格待审核徽章总数 |
||||
|
* |
||||
|
* @author yinzuomei@elink-cn.com |
||||
|
* @date 2020/11/12 15:39 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class GridAuditingBadgeCountResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 5685272249935546444L; |
||||
|
|
||||
|
/** |
||||
|
* 网格id |
||||
|
*/ |
||||
|
private String gridId; |
||||
|
|
||||
|
/** |
||||
|
* 待审核徽章申请单总数 |
||||
|
*/ |
||||
|
private Long count; |
||||
|
} |
@ -0,0 +1,44 @@ |
|||||
|
CREATE TABLE `user_advice` ( |
||||
|
`ID` varchar(64) NOT NULL COMMENT '主键', |
||||
|
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', |
||||
|
`CUSTOMER_NAME` varchar(64) NOT NULL COMMENT '客户名', |
||||
|
`AGENCY_ID` varchar(64) NOT NULL COMMENT '组织ID', |
||||
|
`AGENCY_PIDS` varchar(1024) NOT NULL COMMENT '组织PIDs', |
||||
|
`AGENCY_ALL_PARENT_NAME` varchar(1024) COMMENT '组织parent name', |
||||
|
`AGENCY_NAME` varchar(64) NOT NULL COMMENT '组织名', |
||||
|
`GRID_ID` varchar(64) NOT NULL COMMENT '网格ID', |
||||
|
`GRID_NAME` varchar(64) NOT NULL COMMENT '网格名', |
||||
|
`USER_ID` varchar(64) NOT NULL COMMENT 'userid', |
||||
|
`USER_NAME` varchar(32) NOT NULL COMMENT '用户姓名', |
||||
|
`REG_PHONE` varchar(32) NOT NULL COMMENT '用户注册手机号', |
||||
|
`ADVICE_CONTENT` varchar(500) NOT NULL COMMENT '建议描述', |
||||
|
`PHONE` varchar(32) DEFAULT NULL COMMENT '填写手机号', |
||||
|
`ADVICE_TIME` datetime NOT NULL COMMENT '建议时间', |
||||
|
`ADVICE_TYPE` varchar(32) DEFAULT NULL COMMENT '问题分类(gov政府software软件,逗号分隔)', |
||||
|
`REPLY_CONTENT` varchar(500) DEFAULT NULL COMMENT '回复内容', |
||||
|
`REPLY_USER_ID` varchar(64) DEFAULT NULL COMMENT '回复人id', |
||||
|
`REPLY_USER_NAME` varchar(32) DEFAULT NULL COMMENT '回复人姓名', |
||||
|
`REPLY_TIME` datetime DEFAULT NULL COMMENT '回复时间', |
||||
|
`GOV_CONTENT` varchar(500) DEFAULT NULL COMMENT '政府存证文字', |
||||
|
`DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标志', |
||||
|
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
||||
|
PRIMARY KEY (`ID`) |
||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户建议表'; |
||||
|
|
||||
|
CREATE TABLE `user_advice_img` ( |
||||
|
`ID` varchar(64) NOT NULL COMMENT '主键', |
||||
|
`ADVICE_ID` varchar(64) NOT NULL COMMENT '建议id', |
||||
|
`TYPE` varchar(10) NOT NULL COMMENT '图片类型,resi是用户上传的建议图片,oper是运营上传的代替政府回复的存证', |
||||
|
`IMG_URL` varchar(255) NOT NULL COMMENT '图片url', |
||||
|
`DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标志', |
||||
|
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
||||
|
PRIMARY KEY (`ID`) |
||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户建议图片'; |
Loading…
Reference in new issue