Examples of SgwtRestFetchResponseBase


Examples of com.swinarta.sunflower.server.model.SgwtRestFetchResponseBase

      SgwtRestErrorResponse resp1 = new SgwtRestErrorResponse(-1);
      resp1.addError("exception", e.getMessage());
      return resp1;       
    }
   
    SgwtRestFetchResponseBase ret = new SgwtRestFetchResponseBase(resp);
    return ret;
  }
View Full Code Here

Examples of com.swinarta.sunflower.server.model.SgwtRestFetchResponseBase

      SgwtRestErrorResponse resp1 = new SgwtRestErrorResponse(-1);
      resp1.addError("exception", e.getMessage());
      return resp1;       
    }
   
    SgwtRestFetchResponseBase ret = new SgwtRestFetchResponseBase(resp);
    return ret;

  }
View Full Code Here

Examples of com.swinarta.sunflower.server.model.SgwtRestFetchResponseBase

      PurchasingOrderDetail pod = coreManager.get(PurchasingOrderDetail.class, id);
      coreManager.remove(pod);
      return new SgwtRestDeleteResponse(id);
    }   
   
    SgwtRestFetchResponseBase ret = new SgwtRestFetchResponseBase(resp);
   
    return ret;
   

  }
View Full Code Here

Examples of com.swinarta.sunflower.server.model.SgwtRestFetchResponseBase

    this.coreManager = coreManager;
  }

  @Get("json")
  public SgwtRestResponseBase getRepresent(){
    SgwtRestFetchResponseBase resp = null;
    Integer retId = RequestUtil.getInteger(getQuery().getValues("retId"));
   
    List<ReturnToSupplierDetail> details = coreManager.getReturnToSupplierDetails(retId);
   
    List<DisplayReturnToSupplierDetail> resultList = new ArrayList<DisplayReturnToSupplierDetail>();
   
    for (ReturnToSupplierDetail retDetail : details) {
     
      ProductMeasurement productMeasurement = null;
     
      if(retDetail.getProduct().getProductMeasurement() != null && !retDetail.getProduct().getProductMeasurement().isEmpty()){
        productMeasurement = retDetail.getProduct().getProductMeasurement().iterator().next();
      }
           
      DisplayReturnToSupplierDetail det = mapper.map(retDetail, DisplayReturnToSupplierDetail.class);
      if(retDetail.getReturnToSupplier().getStatus().equals(Status.COMPLETED)){
        det.setCostPrice(retDetail.getCostPriceOnCompleted());
      }else{
        det.setCostPrice(retDetail.getProduct().getBuying().getCostPrice());
      }
           
      if(productMeasurement != null){
        det.getProduct().setProductMeasurement(mapper.map(productMeasurement, DisplayProductMeasurement.class));
      }
           
      resultList.add(det);
    }
   
    resp = new SgwtRestFetchResponseBase(resultList);
   
    return resp;

  }
View Full Code Here

Examples of com.swinarta.sunflower.server.model.SgwtRestFetchResponseBase

      SgwtRestErrorResponse resp1 = new SgwtRestErrorResponse(-1);
      resp1.addError("exception", e.getMessage());
      return resp1;       
    }

    SgwtRestFetchResponseBase ret = new SgwtRestFetchResponseBase(resp);
   
    return ret;
 
  }
View Full Code Here

Examples of com.swinarta.sunflower.server.model.SgwtRestFetchResponseBase

  @Get("json")
  public SgwtRestResponseBase getRepresent(){
    List<Store> stores = (List<Store>)coreManager.getAllStore();
    ResultList<Store> list = new ResultList<Store>(stores);
    SgwtRestFetchResponseBase ret = new SgwtRestFetchResponseBase(list);       
    return ret;
 
View Full Code Here

Examples of com.swinarta.sunflower.server.model.SgwtRestFetchResponseBase

      displayResultList.setStartRow(productResult.getStartRow());
      displayResultList.setEndRow(productResult.getEndRow());
     
    }
   
    SgwtRestFetchResponseBase ret = new SgwtRestFetchResponseBase(displayResultList);   
    return ret;
       
  }
View Full Code Here

Examples of com.swinarta.sunflower.server.model.SgwtRestFetchResponseBase

      SgwtRestErrorResponse resp3 = new SgwtRestErrorResponse(-1);
      resp3.addError("exeption", e.getMessage());
      return resp3;
    }
   
    SgwtRestFetchResponseBase ret = new SgwtRestFetchResponseBase(resp);
    return ret;

  }
View Full Code Here

Examples of com.swinarta.sunflower.server.model.SgwtRestFetchResponseBase

        dts.setCount((Long) objs[2]);
        summ.add(dts);
      }
    }
   
    SgwtRestFetchResponseBase ret = new SgwtRestFetchResponseBase(summ);
    return ret;   
  }
View Full Code Here

Examples of com.swinarta.sunflower.server.model.SgwtRestFetchResponseBase

   
    Integer storeId = Integer.parseInt(properties.getProperty("curr.store.id"));
       
    Store s = coreManager.get(Store.class, storeId);
   
    SgwtRestFetchResponseBase ret = new SgwtRestFetchResponseBase(s);
       
    return ret;
   
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.