Package org.sis.ancmessaging.dto

Examples of org.sis.ancmessaging.dto.HealthWorkerDTO


 
  @RequestMapping(method = RequestMethod.GET)
  public String getMainPage(Model model) {
    List<HealthPost> healthPosts = healthPostService.getAll();
    model.addAttribute("healthPosts", healthPosts);
    HealthWorkerDTO healthWorkerDTO = new HealthWorkerDTO();
    model.addAttribute("healthWorkerDTO", healthWorkerDTO);
    return "healthworker";
  }
View Full Code Here


    //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());
View Full Code Here

  public @ResponseBody List<HealthWorkerDTO> fetchHealthWorkersAjax(@RequestParam("postId") int postId) {
    HealthPost healthPost = healthPostService.findById(postId);
    List<HealthExtensionWorker> healthWorkers = healthPost.getHealthWorkers();
    List<HealthWorkerDTO> healthWorkerDTO = new ArrayList<HealthWorkerDTO>();
    for (HealthExtensionWorker healthWorker : healthWorkers) {
      HealthWorkerDTO hDTO = new HealthWorkerDTO();
      hDTO.setWorkerId(healthWorker.getWorkerId());
      hDTO.setFullName(healthWorker.getFullName());
      hDTO.setPostId(postId);
      healthWorkerDTO.add(hDTO);
    }
   
    return healthWorkerDTO;
  }
View Full Code Here

TOP

Related Classes of org.sis.ancmessaging.dto.HealthWorkerDTO

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.