Examples of IOrderDAO


Examples of com.lgx8.gateway.dao.IOrderDao

    //获得查询的条件
    String qtype = request.getParameter("qtype");
    //计算查询开始数据下标

    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IOrderDao orderDao = (IOrderDao) ac.getBean("orderDao");
   
    IOrderService orderService = (IOrderService) ac.getBean("orderService");
   
    if("1".equals(hidden) || Integer.parseInt(hidden) == 1)
    {
      if(query!=null && !("").equals(query))
      {
        String[] q1 = qtype.split(",");
        String[] q2 = query.split(",");
        Map<String,Object> map = new HashMap<String, Object>();
        for(int i=0;i<q2.length;i++)
        {
          String[] q22 = q2[i].split("#");
          map.put(q22[0], q22.length > 1?q22[1]:"");
        }
       
        for(int i=0;i<q1.length;i++)
        {
          String q = q1[i].split(":")[0];
          String d = q1[i].split(":").length>1?q1[i].split(":")[1]:"";
          if("date".equals(d) && !"".equals(d))
          {
            String d1 = map.get(q).toString().split("&")[0];
            String d2 = map.get(q).toString().split("&").length >1?map.get(q).toString().split("&")[1]:"";
            hql += " and " + q + " >= str_to_date('"+d1+"','%Y-%m-%d %H:%i:%s')";
            hql += "".equals(d2)?"":" and " + q + " <= str_to_date('"+d2+"','%Y-%m-%d %H:%i:%s')";
          }else if(!"".equals(map.get(q)))
          {
            hql += " and " + q + " like '%"+map.get(q)+"%'";
          }
         
        }
      }
     
      hql += " order by o.id desc";
     
      PageList list = orderDao.findByPage4Report(hql, new Object[]{}, Integer.parseInt(page), Integer.parseInt(maxResult));
      //当前页数设置
      pageInfo.put("page", page);
      //当前页数设置
      pageInfo.put("size", maxResult);
      //总搜索数据量设置
View Full Code Here

Examples of com.lgx8.gateway.dao.IOrderDao

  protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    String orderId = request.getParameter("orderid");
    String remark = request.getParameter("remark");
   
    ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
    IOrderDao orderDao = (IOrderDao)ac.getBean("orderDao");
   
    Orders o = orderDao.findOrders(StrUtil.parseLong(orderId));
    o.setRemark(remark);
    orderDao.updateOrders(o);
   
     
        PrintWriter out = response.getWriter();
        out.println("1");
  }
View Full Code Here

Examples of org.libreplan.business.orders.daos.IOrderDAO

                    return false;
                }
            }
        }
        // not exist assigned task
        IOrderDAO orderDAO = Registry.getOrderDAO();
        return (orderDAO.loadOrderAvoidingProxyFor(this))
                .isFinishedAdvance();
    }
View Full Code Here

Examples of org.libreplan.business.orders.daos.IOrderDAO

    }

    @AssertTrue(message = "project name is already being used")
    public boolean isProjectUniqueNameConstraint() {

        IOrderDAO orderDAO = Registry.getOrderDAO();

        if (isNewObject()) {
            return !orderDAO.existsByNameAnotherTransaction(getName());
        } else {
            try {
                Order o = orderDAO.findByNameAnotherTransaction(getName());
                return o.getId().equals(getId());
            } catch (InstanceNotFoundException e) {
                return true;
            }
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.