68 changed files with 1237 additions and 57 deletions
@ -0,0 +1,29 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import com.epmet.dto.result.LatestListResultDTO; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 获取客户网格下已转项目切项目已结案的议题列表-接口入参 |
|||
* @Author sun |
|||
*/ |
|||
@Data |
|||
public class ClosedProjectIssueListFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 2599592072265715951L; |
|||
|
|||
/** |
|||
* 查询条件对象 |
|||
*/ |
|||
private LatestListFormDTO latestListForm; |
|||
|
|||
/** |
|||
* 客户下已结案项目列表 |
|||
*/ |
|||
private List<LatestListResultDTO> latestListResult; |
|||
|
|||
|
|||
} |
@ -0,0 +1,31 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 党建园地-获取最新议题列表-接口入参 |
|||
* @Author sun |
|||
*/ |
|||
@Data |
|||
public class LatestIssueListFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -2170063271034172650L; |
|||
|
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
@NotBlank(message = "客户id不能为空") |
|||
private String customerId; |
|||
/** |
|||
* 网格Id |
|||
*/ |
|||
@NotBlank(message = "网格Id不能为空") |
|||
private String gridId; |
|||
/** |
|||
* 客户定制化显示几条,传入几条 |
|||
*/ |
|||
private Integer pageSize = 3; |
|||
} |
@ -0,0 +1,36 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 党建园地-获取最新议题列表-接口入参 |
|||
* @Author sun |
|||
*/ |
|||
@Data |
|||
public class LatestIssueListResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 9130115335145168458L; |
|||
|
|||
/** |
|||
* 议题id |
|||
*/ |
|||
private String issueId = ""; |
|||
/** |
|||
* 议题标题 |
|||
*/ |
|||
private String issueTitle = ""; |
|||
/** |
|||
* 议题发起人:XX路-XX先生 |
|||
*/ |
|||
private String issuePublisherName = ""; |
|||
/** |
|||
* 话题内容 |
|||
*/ |
|||
private String topicContent = ""; |
|||
/** |
|||
* 表达态度总人数 |
|||
*/ |
|||
private Integer votedCount = 0; |
|||
} |
@ -0,0 +1,41 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.Min; |
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 党建园地-结案项目-接口入参 |
|||
* @Author sun |
|||
*/ |
|||
@Data |
|||
public class LatestListFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 4859779755214502427L; |
|||
|
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
@NotBlank(message = "客户Id不能为空") |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 网格Id |
|||
*/ |
|||
@NotBlank(message = "网格Id不能为空") |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 请求页面 |
|||
*/ |
|||
@Min(1) |
|||
private Integer pageNo; |
|||
|
|||
/** |
|||
* 每页多少条数据 |
|||
*/ |
|||
private Integer pageSize = 3; |
|||
|
|||
} |
|||
|
@ -0,0 +1,42 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description 党建园地-结案项目-接口返参 |
|||
* @Author sun |
|||
*/ |
|||
@Data |
|||
public class LatestListResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 5957826616179876849L; |
|||
|
|||
/** |
|||
* 议题id |
|||
*/ |
|||
private String issueId = ""; |
|||
/** |
|||
* 议题标题 |
|||
*/ |
|||
private String issueTitle = ""; |
|||
/** |
|||
* 项目id |
|||
*/ |
|||
private String projectId = ""; |
|||
/** |
|||
* 结案说明 |
|||
*/ |
|||
private String publicReply = ""; |
|||
/** |
|||
* 结案人名称、实名显示 |
|||
*/ |
|||
private String closeUserName = ""; |
|||
/** |
|||
* 结案人Id |
|||
*/ |
|||
private String closeUserId = ""; |
|||
|
|||
} |
@ -0,0 +1,26 @@ |
|||
package com.epmet.feign; |
|||
|
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.feign.fallback.OperAccessFeignClientFallback; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
|
|||
/** |
|||
* @Description 运营端权限模块 |
|||
* @Author yinzuomei |
|||
* @Date 2020/5/21 15:17 |
|||
*/ |
|||
//, url = "http://localhost:8093"
|
|||
@FeignClient(name = ServiceConstant.OPER_ACCESS_SERVER, fallback = OperAccessFeignClientFallback.class) |
|||
public interface OperAccessFeignClient { |
|||
/** |
|||
* @param |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @Author yinzuomei |
|||
* @Description 清空运营人员权限信息、菜单信息 |
|||
* @Date 2020/5/21 17:08 |
|||
**/ |
|||
@GetMapping("/oper/access/menu/clearoperuseraccess") |
|||
Result clearOperUserAccess(); |
|||
} |
@ -0,0 +1,22 @@ |
|||
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.feign.OperAccessFeignClient; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* @Description 运营端权限模块 |
|||
* @Author yinzuomei |
|||
* @Date 2020/5/21 15:47 |
|||
*/ |
|||
@Component |
|||
public class OperAccessFeignClientFallback implements OperAccessFeignClient { |
|||
@Override |
|||
public Result clearOperUserAccess() { |
|||
return ModuleUtils.feignConError(ServiceConstant.OPER_ACCESS_SERVER, "clearOperUserAccess"); |
|||
|
|||
} |
|||
} |
|||
|
@ -0,0 +1,32 @@ |
|||
package com.epmet.resi.group.dto.group.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/5/21 15:39 |
|||
*/ |
|||
@Data |
|||
public class RecommendedListFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -4205042052361059952L; |
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
/** |
|||
* 网格ID |
|||
*/ |
|||
private String gridId; |
|||
/** |
|||
* 用户ID |
|||
*/ |
|||
private String userId; |
|||
/** |
|||
* 客户定制化显示几条,传入几条 |
|||
*/ |
|||
private Integer pageSize; |
|||
} |
@ -0,0 +1,40 @@ |
|||
package com.epmet.resi.group.dto.group.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/5/21 15:41 |
|||
*/ |
|||
@Data |
|||
public class RecommendedListResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -8909027543795476302L; |
|||
/** |
|||
* 小组id |
|||
*/ |
|||
private String groupId; |
|||
/** |
|||
* 小组名称 |
|||
*/ |
|||
private String groupName; |
|||
/** |
|||
* 小组头像 |
|||
*/ |
|||
private String groupHeadPhoto; |
|||
/** |
|||
* 总成员数 |
|||
*/ |
|||
private String totalMember; |
|||
/** |
|||
* 党员总数 |
|||
*/ |
|||
private String totalPartyMember; |
|||
/** |
|||
* 组长名 |
|||
*/ |
|||
private String leaderName; |
|||
} |
@ -0,0 +1,18 @@ |
|||
package com.epmet.constant; |
|||
|
|||
/** |
|||
* @dscription 党建园地-项目Constant |
|||
* @author sun |
|||
*/ |
|||
public interface ProjectConstant { |
|||
|
|||
/** |
|||
* 调用gov-project服务,查询项目数据失败 |
|||
*/ |
|||
String SELECT_PROJECT_EXCEPTION = "获取项目数据失败"; |
|||
/** |
|||
* 调用gov-issue服务,查询议题数据失败 |
|||
*/ |
|||
String SELECT_ISSUE_EXCEPTION = "获取议题数据失败"; |
|||
|
|||
} |
@ -0,0 +1,40 @@ |
|||
package com.epmet.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.resi.group.dto.group.form.RecommendedListFormDTO; |
|||
import com.epmet.resi.group.dto.group.result.RecommendedListResultDTO; |
|||
import com.epmet.service.GroupService; |
|||
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; |
|||
|
|||
/** |
|||
* @dscription 党建园地-小组Controller |
|||
* @author sun |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("group") |
|||
public class GroupController { |
|||
|
|||
@Autowired |
|||
private GroupService groupService; |
|||
|
|||
/** |
|||
* 党建园地-推荐小组 |
|||
* |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.resi.group.dto.group.result.RecommendedListResultDTO>> |
|||
* @author zhaoqifeng |
|||
* @date 2020/5/21 15:50 |
|||
*/ |
|||
@PostMapping("recommendedlist") |
|||
public Result<List<RecommendedListResultDTO>> recommendedList(@LoginUser TokenDto tokenDto, @RequestBody RecommendedListFormDTO formDTO) { |
|||
return new Result<List<RecommendedListResultDTO>>().ok(groupService.recommendedList(tokenDto, formDTO)); |
|||
} |
|||
} |
@ -0,0 +1,41 @@ |
|||
package com.epmet.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.dto.form.LatestIssueListFormDTO; |
|||
import com.epmet.dto.result.LatestIssueListResultDTO; |
|||
import com.epmet.service.IssueService; |
|||
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; |
|||
|
|||
/** |
|||
* @dscription 党建园地-议题Controller |
|||
* @author sun |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("issue") |
|||
public class IssueController { |
|||
|
|||
@Autowired |
|||
private IssueService issueService; |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @return |
|||
* @Author sun |
|||
* @Description 党建园地-最新议题 |
|||
**/ |
|||
@PostMapping("latestlist") |
|||
public Result<List<LatestIssueListResultDTO>> latestList(@LoginUser TokenDto tokenDTO, @RequestBody LatestIssueListFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO); |
|||
return new Result<List<LatestIssueListResultDTO>>().ok(issueService.latestList(formDTO)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,42 @@ |
|||
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.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.dto.form.LatestListFormDTO; |
|||
import com.epmet.dto.result.LatestListResultDTO; |
|||
import com.epmet.service.ProjectService; |
|||
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; |
|||
|
|||
/** |
|||
* @dscription 党建园地-项目Controller |
|||
* @author sun |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("project") |
|||
public class ProjectController { |
|||
|
|||
@Autowired |
|||
private ProjectService projectService; |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @return |
|||
* @Author sun |
|||
* @Description 党建园地-结案项目 |
|||
**/ |
|||
@PostMapping("latestlist") |
|||
public Result<List<LatestListResultDTO>> latestList(@LoginUser TokenDto tokenDTO, @RequestBody LatestListFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO); |
|||
return new Result<List<LatestListResultDTO>>().ok(projectService.latestList(formDTO)); |
|||
} |
|||
} |
@ -1,28 +0,0 @@ |
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.dto.DemoTestFormDTO; |
|||
import org.slf4j.Logger; |
|||
import org.slf4j.LoggerFactory; |
|||
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; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/5/21 10:24 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("/") |
|||
public class ResiHomeController { |
|||
private static final Logger logger = LoggerFactory.getLogger(ResiHomeController.class); |
|||
@PostMapping("test") |
|||
public Result test(@RequestBody DemoTestFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO); |
|||
logger.info(String.format("请求成功客户id[%s],网格id[%s]",formDTO.getCustomerId(),formDTO.getGridId())); |
|||
return new Result().ok("resi-home-server请求成功"); |
|||
} |
|||
} |
@ -0,0 +1,31 @@ |
|||
package com.epmet.feign; |
|||
|
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.feign.fallback.ResiGroupFeignClientFallBack; |
|||
import com.epmet.resi.group.dto.group.form.RecommendedListFormDTO; |
|||
import com.epmet.resi.group.dto.group.result.RecommendedListResultDTO; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/4/17 15:24 |
|||
*/ |
|||
@FeignClient(name = ServiceConstant.RESI_GROUP_SERVER, fallback = ResiGroupFeignClientFallBack.class) |
|||
public interface ResiGroupFeignClient { |
|||
|
|||
/** |
|||
* 党建园地-推荐小组 |
|||
* @author zhaoqifeng |
|||
* @date 2020/5/21 15:50 |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.resi.group.dto.group.result.RecommendedListResultDTO>> |
|||
*/ |
|||
@PostMapping("/resi/group/group/recommendedlist") |
|||
Result<List<RecommendedListResultDTO>> recommendedList(@RequestBody RecommendedListFormDTO formDTO); |
|||
} |
@ -0,0 +1,25 @@ |
|||
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.feign.ResiGroupFeignClient; |
|||
import com.epmet.resi.group.dto.group.form.*; |
|||
import com.epmet.resi.group.dto.group.result.*; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/4/17 15:27 |
|||
*/ |
|||
@Component |
|||
public class ResiGroupFeignClientFallBack implements ResiGroupFeignClient { |
|||
|
|||
@Override |
|||
public Result<List<RecommendedListResultDTO>> recommendedList(RecommendedListFormDTO formDTO) { |
|||
return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "recommendedList", formDTO); |
|||
} |
|||
} |
@ -0,0 +1,23 @@ |
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.resi.group.dto.group.form.RecommendedListFormDTO; |
|||
import com.epmet.resi.group.dto.group.result.RecommendedListResultDTO; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @dscription 党建园地-小组Service |
|||
* @author sun |
|||
*/ |
|||
public interface GroupService { |
|||
/** |
|||
* 党建园地-推荐小组 |
|||
* @author zhaoqifeng |
|||
* @date 2020/5/21 16:35 |
|||
* @param tokenDto |
|||
* @param formDTO |
|||
* @return java.util.List<com.epmet.resi.group.dto.group.result.RecommendedListResultDTO> |
|||
*/ |
|||
List<RecommendedListResultDTO> recommendedList(TokenDto tokenDto, RecommendedListFormDTO formDTO); |
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.dto.form.LatestIssueListFormDTO; |
|||
import com.epmet.dto.result.LatestIssueListResultDTO; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @dscription 党建园地-议题Service |
|||
* @author sun |
|||
*/ |
|||
public interface IssueService { |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @return |
|||
* @Author sun |
|||
* @Description 党建园地-最新议题 |
|||
**/ |
|||
List<LatestIssueListResultDTO> latestList(LatestIssueListFormDTO formDTO); |
|||
|
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.dto.form.LatestListFormDTO; |
|||
import com.epmet.dto.result.LatestListResultDTO; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @dscription 党建园地-项目Service |
|||
* @author sun |
|||
*/ |
|||
public interface ProjectService { |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @return |
|||
* @Author sun |
|||
* @Description 党建园地-结案项目 |
|||
**/ |
|||
List<LatestListResultDTO> latestList(LatestListFormDTO formDTO); |
|||
} |
@ -0,0 +1,26 @@ |
|||
package com.epmet.service.impl; |
|||
|
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.feign.ResiGroupFeignClient; |
|||
import com.epmet.resi.group.dto.group.form.RecommendedListFormDTO; |
|||
import com.epmet.resi.group.dto.group.result.RecommendedListResultDTO; |
|||
import com.epmet.service.GroupService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @dscription 党建园地-小组ServiceImpl |
|||
* @author sun |
|||
*/ |
|||
@Service |
|||
public class GroupServiceImpl implements GroupService { |
|||
@Autowired |
|||
ResiGroupFeignClient resiGroupFeignClient; |
|||
@Override |
|||
public List<RecommendedListResultDTO> recommendedList(TokenDto tokenDto, RecommendedListFormDTO formDTO) { |
|||
formDTO.setUserId(tokenDto.getUserId()); |
|||
return resiGroupFeignClient.recommendedList(formDTO).getData(); |
|||
} |
|||
} |
@ -0,0 +1,35 @@ |
|||
package com.epmet.service.impl; |
|||
|
|||
import com.epmet.dto.form.LatestIssueListFormDTO; |
|||
import com.epmet.dto.result.LatestIssueListResultDTO; |
|||
import com.epmet.feign.GovIssueFeignClient; |
|||
import com.epmet.service.IssueService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @dscription 党建园地-议题ServiceImpl |
|||
* @author sun |
|||
*/ |
|||
@Service |
|||
public class IssueServiceImpl implements IssueService { |
|||
|
|||
@Autowired |
|||
private GovIssueFeignClient govIssueFeignClient; |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @return |
|||
* @Author sun |
|||
* @Description 党建园地-最新议题 |
|||
**/ |
|||
@Override |
|||
public List<LatestIssueListResultDTO> latestList(LatestIssueListFormDTO formDTO) { |
|||
//1:调用gov-issue服务,查询客户网格下最新议题列表
|
|||
|
|||
return null; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,57 @@ |
|||
package com.epmet.service.impl; |
|||
|
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.constant.ProjectConstant; |
|||
import com.epmet.dto.form.ClosedProjectIssueListFormDTO; |
|||
import com.epmet.dto.form.LatestListFormDTO; |
|||
import com.epmet.dto.result.LatestListResultDTO; |
|||
import com.epmet.feign.GovIssueFeignClient; |
|||
import com.epmet.feign.GovProjectFeignClient; |
|||
import com.epmet.service.ProjectService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @dscription 党建园地-项目ServiceImpl |
|||
* @author sun |
|||
*/ |
|||
@Service |
|||
public class ProjectServiceImpl implements ProjectService { |
|||
|
|||
@Autowired |
|||
private GovProjectFeignClient govProjectFeignClient; |
|||
@Autowired |
|||
private GovIssueFeignClient govIssueFeignClient; |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @return |
|||
* @Author sun |
|||
* @Description 党建园地-结案项目 |
|||
**/ |
|||
@Override |
|||
public List<LatestListResultDTO> latestList(LatestListFormDTO formDTO) { |
|||
//1:调用gov-project服务,查询客户已结案项目列表
|
|||
Result<List<LatestListResultDTO>> listResult = govProjectFeignClient.getClosedProjectList(formDTO); |
|||
if (!listResult.success()){ |
|||
throw new RenException(ProjectConstant.SELECT_PROJECT_EXCEPTION); |
|||
} |
|||
if (null == listResult.getData()){ |
|||
return new ArrayList<>(); |
|||
} |
|||
//2:调用gov-issue服务,获取客户网格下已转项目且项目已结案的议题列表
|
|||
ClosedProjectIssueListFormDTO closedProjectIssueListFormDTO = new ClosedProjectIssueListFormDTO(); |
|||
closedProjectIssueListFormDTO.setLatestListForm(formDTO); |
|||
closedProjectIssueListFormDTO.setLatestListResult(listResult.getData()); |
|||
Result<List<LatestListResultDTO>> resultList = govIssueFeignClient.getClosedProjectIssueList(closedProjectIssueListFormDTO); |
|||
if (!resultList.success() || null == resultList.getData()) { |
|||
throw new RenException(ProjectConstant.SELECT_ISSUE_EXCEPTION); |
|||
} |
|||
return resultList.getData(); |
|||
} |
|||
|
|||
} |
Loading…
Reference in new issue