Exemplo n.º 1
0
  @SuppressWarnings("unchecked")
  @RequestMapping(
      value = "/door/pieceworks/{door_id}",
      method = {RequestMethod.GET, RequestMethod.POST})
  @ResponseBody
  public Object getPieceworks(@PathVariable Long door_id) {

    Door door = (Door) baseService.getObject(Door.class, door_id);
    List<PieceworkEntity> pieceworkEntities = door.getPieceworkEntities();
    List<PieceworkWebBean> webBeans = new ArrayList<PieceworkWebBean>();
    for (PieceworkEntity _entity : pieceworkEntities) {
      PieceworkWebBean webBean = new PieceworkWebBean(_entity);
      webBeans.add(webBean);
    }
    return webBeans;
  }
Exemplo n.º 2
0
  @SuppressWarnings("unchecked")
  @RequestMapping(
      value = "/door/materials/{door_id}",
      method = {RequestMethod.GET, RequestMethod.POST})
  @ResponseBody
  public Object getMaterials(@PathVariable Long door_id) {

    Door door = (Door) baseService.getObject(Door.class, door_id);
    List<MaterialUsageEntity> usageEntities = door.getMaterials();
    List<MaterialUsageWebBean> webBeans = new ArrayList<MaterialUsageWebBean>();
    for (MaterialUsageEntity _entity : usageEntities) {
      MaterialUsageWebBean webBean = new MaterialUsageWebBean(_entity);
      webBeans.add(webBean);
    }
    return webBeans;
  }