//HealthPost healthPost = healthPostService.findById(postId);
StringBuilder sb = new StringBuilder();
List<HealthExtensionWorker> healthWorkers = healthPostService.getHealthWorkersForHealthPost(postId, rows, page, sb);
List<HealthWorkerDTO> healthWorkerDTOs = new ArrayList<HealthWorkerDTO>();
for (HealthExtensionWorker healthWorker : healthWorkers) {
HealthWorkerDTO hDTO = new HealthWorkerDTO();
hDTO.setWorkerId(healthWorker.getWorkerId());
hDTO.setFullName(healthWorker.getFullName());
hDTO.setPhoneNumber(healthWorker.getPhoneNumber());
hDTO.setPostId(postId);
hDTO.setSex(healthWorker.getSex());
healthWorkerDTOs.add(hDTO);
}
response.setPage(String.valueOf(page));
response.setRows(healthWorkerDTOs);
response.setTotal(sb.toString());