/**
  * easyui AJAX请求数据
  *
  * @param request
  * @param response
  * @param dataGrid
  * @param user
  */
 @RequestMapping(params = "datagrid")
 public void datagrid(
     TbOrderTrackingEntity tbOrderTracking,
     HttpServletRequest request,
     HttpServletResponse response,
     DataGrid dataGrid) {
   CriteriaQuery cq = new CriteriaQuery(TbOrderTrackingEntity.class, dataGrid);
   // 查询条件组装器
   org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, tbOrderTracking);
   // System.out.println("tbOrderTrackIng:"+tbOrderTracking.getId());
   if (null != tbOrderTracking.getOrderId()
       && !"".equals(tbOrderTracking.getOrderId())
       && null != tbOrderTracking.getOrderId().getId()) {
     cq.createAlias("orderId", "tbOrders");
     cq.eq("orderId.id", tbOrderTracking.getOrderId().getId());
     cq.add();
   }
   this.tbOrderTrackingService.getDataGridReturn(cq, true);
   TagUtil.datagrid(response, dataGrid);
 }
Example #2
0
 /**
  * 创建 alias
  *
  * @param entitys 规则 entitys 为a.b.c 这种将会创建 alias a和alias b而不会创建c 因为这样更加容易传值
  */
 public void judgecreateAlias(String entitys) {
   String[] aliass = entitys.split("\\.");
   for (int i = 0; i < aliass.length - 1; i++) {
     createAlias(aliass[i], aliass[i]);
   }
 }