zxc 3 years ago
parent
commit
28e317b39f
  1. 4
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java
  2. 2
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java
  3. 7
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java

4
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java

@ -359,8 +359,8 @@ public class ProjectController {
* @date 2022/5/18 10:03
*/
@PostMapping("satisfaction-evaluation-list")
public Result<List<SatisfactionEvaluationListResultDTO>> satisfactionEvaluationList(@RequestBody SatisfactionEvaluationListFormDTO formDTO){
public Result<PageData> satisfactionEvaluationList(@RequestBody SatisfactionEvaluationListFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, SatisfactionEvaluationListFormDTO.SatisfactionEvaluationListForm.class);
return new Result<List<SatisfactionEvaluationListResultDTO>>().ok(projectService.satisfactionEvaluationList(formDTO));
return new Result<PageData>().ok(projectService.satisfactionEvaluationList(formDTO));
}
}

2
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java

@ -382,6 +382,6 @@ public interface ProjectService extends BaseService<ProjectEntity> {
* @author zxc
* @date 2022/5/18 10:03
*/
List<SatisfactionEvaluationListResultDTO> satisfactionEvaluationList(SatisfactionEvaluationListFormDTO formDTO);
PageData satisfactionEvaluationList(SatisfactionEvaluationListFormDTO formDTO);
}

7
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java

@ -3239,7 +3239,8 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
* @date 2022/5/18 10:03
*/
@Override
public List<SatisfactionEvaluationListResultDTO> satisfactionEvaluationList(SatisfactionEvaluationListFormDTO formDTO) {
public PageData<SatisfactionEvaluationListResultDTO> satisfactionEvaluationList(SatisfactionEvaluationListFormDTO formDTO) {
PageData<SatisfactionEvaluationListResultDTO> data = new PageData<>(new ArrayList<>(),NumConstant.ZERO);
PageInfo<SatisfactionEvaluationListResultDTO> pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> satisfactionDetailDao.satisfactionEvaluationList(formDTO.getProjectId()));
List<SatisfactionEvaluationListResultDTO> result = pageInfo.getList();
if (CollectionUtils.isNotEmpty(result)){
@ -3248,8 +3249,10 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
throw new EpmetException("查询user信息失败...");
}
listResult.getData().forEach(u -> result.stream().filter(r -> r.getUserId().equals(u.getUserId())).forEach(r -> r.setEvaluationUser(u.getRealName())));
data.setList(result);
data.setTotal(Integer.valueOf(String.valueOf(pageInfo.getTotal())));
}
return result;
return data;
}
/**

Loading…
Cancel
Save