38 changed files with 736 additions and 26 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,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)); |
||||
|
} |
||||
|
} |
@ -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,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