/** 列表查询积分管理 */ public String execute() throws Exception { String where = " where 1=1 "; // if (s_name!=null && s_name.trim().length()!=0) { // where += " and " + Integral.COL_name +" like '%" + s_name.trim()+"%'"; // } List list = Server.getInstance() .getMemberService() .findAllIntegralForPageinfo(where, " ORDER BY ID ", pageinfo); pageinfo = (PageInfo) list.remove(0); listIntegral = list; if (pageinfo.getTotalrow() > 0 && listIntegral.size() == 0) { pageinfo.setPagenum(1); list = Server.getInstance() .getMemberService() .findAllIntegralForPageinfo(where, " ORDER BY ID ", pageinfo); pageinfo = (PageInfo) list.remove(0); listIntegral = list; } for (Integral integral : listIntegral) { if (integral.getAgenttype() == 5) { // 会员 this.integral = integral; } } return SUCCESS; }
/** 列表查询投诉建议表 */ public String execute() throws Exception { String where = " where 1=1 "; // if (s_name!=null && s_name.trim().length()!=0) { // where += " and " + Tousu.COL_name +" like '%" + s_name.trim()+"%'"; // } List list = Server.getInstance() .getMemberService() .findAllTousuForPageinfo(where, " ORDER BY ID ", pageinfo); pageinfo = (PageInfo) list.remove(0); listTousu = list; if (pageinfo.getTotalrow() > 0 && listTousu.size() == 0) { pageinfo.setPagenum(1); list = Server.getInstance() .getMemberService() .findAllTousuForPageinfo(where, " ORDER BY ID ", pageinfo); pageinfo = (PageInfo) list.remove(0); listTousu = list; } return SUCCESS; }
/** 转向到汽车修改页面 */ public String toedit() throws Exception { listCity = Server.getInstance() .getHotelService() .findAllCity(" where 1=1 and " + City.COL_language + " =0", "", -1, 0); cars = Server.getInstance().getCarService().findCars(cars.getId()); return EDIT; }
/** 转向到汽车添加页面 */ public String toadd() throws Exception { listCity = Server.getInstance() .getHotelService() .findAllCity(" where 1=1 and " + City.COL_language + " =0", "", -1, 0); listCarstore = Server.getInstance().getCarService().findAllCarstore(" where 1=1 ", "", -1, 0); return EDIT; }
/** 添加租车订单 */ public String add() throws Exception { Server.getInstance().getCarService().createCarorder(carorder); carorder.setCode(Server.getInstance().getServiceCenter().getCarOrderCode(carorder)); Server.getInstance().getCarService().updateCarorderIgnoreNull(carorder); return LIST; }
/** 编辑积分管理 */ public String edit() throws Exception { HttpServletRequest request = ServletActionContext.getRequest(); String where = " where 1=1 "; List list = Server.getInstance() .getMemberService() .findAllIntegralForPageinfo(where, " ORDER BY ID ", pageinfo); pageinfo = (PageInfo) list.remove(0); listIntegral = list; if (pageinfo.getTotalrow() > 0 && listIntegral.size() == 0) { pageinfo.setPagenum(1); list = Server.getInstance() .getMemberService() .findAllIntegralForPageinfo(where, " ORDER BY ID ", pageinfo); pageinfo = (PageInfo) list.remove(0); listIntegral = list; } int register = Integer.valueOf(converNull(request.getParameter("register5"), "0")); int punish = Integer.valueOf(converNull(request.getParameter("punish5"), "0")); int backorder = Integer.valueOf(converNull(request.getParameter("backorder5"), "0")); int weborder = Integer.valueOf(converNull(request.getParameter("weborder5"), "0")); for (Integral integral : listIntegral) { long type = integral.getAgenttype(); System.out.println(request.getParameter("aircoeft" + type)); float aircoeft = Float.valueOf(converNull(request.getParameter("aircoeft" + type), "0")); // float hotelcoeft=Float.valueOf(converNull(request.getParameter("hotelcoeft"+type),"0")); // float travelcoeft=Float.valueOf(converNull(request.getParameter("travelcoeft"+type),"0")); // float // carrentalcoeft=Float.valueOf(converNull(request.getParameter("carrentalcoeft"+type),"0")); // float // rechargecoeft=Float.valueOf(converNull(request.getParameter("rechargecoeft"+type),"0")); integral.setAircoeft(aircoeft); // integral.setHotelcoeft(hotelcoeft); // integral.setTravelcoeft(travelcoeft); // integral.setCarrentalcoeft(carrentalcoeft); // integral.setRechargecoeft(rechargecoeft); integral.setRegisterscore(register); integral.setPunishscore(punish); integral.setBackorderscore(backorder); integral.setWeborderscore(weborder); Server.getInstance().getMemberService().updateIntegralIgnoreNull(integral); } return this.execute(); }
/** 添加汽车 */ public String add() throws Exception { cars.setCreatetime(new Timestamp(System.currentTimeMillis())); cars.setCreateuser(getLoginUser().getLoginname()); // cars.setMarkettime(dateToTimestamp(c_markettime)); Server.getInstance().getCarService().createCars(cars); return LIST; }
/** * 添加消息反馈信息 * * @return 赵晓晓 */ public void getreturnmessage() { try { // 获得投诉内容 tousu.setComment(content); // 获得添加时间 tousu.setCreatetime(new Timestamp(System.currentTimeMillis())); // 获得登录人编号从session中获得 HttpSession session = ServletActionContext.getRequest().getSession(); Customeruser customer = new Customeruser(); customer = (Customeruser) session.getAttribute("loginuser"); Long id = customer.getId(); tousu.setUsername(id.toString()); // 获得代理编号 Customeragent customeragent = new Customeragent(); customeragent = (Customeragent) session.getAttribute("loginagent"); Long Agentid = customeragent.getId(); tousu.setDainame(Agentid.toString()); Server.getInstance().getMemberService().createTousu(tousu); System.out.println("添加投诉信息成功!"); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); System.out.println("添加失败!"); } }
/** 添加投诉建议表 */ public String add() throws Exception { tousu.setCreatetime(new Timestamp(System.currentTimeMillis())); tousu.setStarttime(dateToTimestamp(s_starttime)); tousu.setHappentime(dateToTimestamp(s_happentime)); Server.getInstance().getMemberService().createTousu(tousu); return LIST; }
/** 审核租车订单 */ public String check() throws Exception { carorder = Server.getInstance().getCarService().findCarorder(carorder.getId()); if (orderstate == 5) { // 取消订单 if (carorder.getWaicode() != null && carorder.getWaicode().length() > 0 && !carorder.getWaicode().equals("NOCODE")) { String code = Server.getInstance().getYiHaiCarService().cancelorder(carorder.getWaicode()); if (code.equals("OK")) { // 取消成功 carorder.setState(5); } } } carorder.setState(orderstate); Server.getInstance().getCarService().updateCarorderIgnoreNull(carorder); return LIST; }
/** 查询消息反馈信息列表 赵晓晓 */ public String showfklist() { String where = " where 1=1 "; StringBuilder sb = new StringBuilder(""); if (begintime != null && !begintime.equals("") && endtime != null && !endtime.equals("")) { sb.append(" and C_CREATETIME between '" + begintime + "' and '" + endtime + "'"); } List list = Server.getInstance() .getMemberService() .findAllTousuForPageinfo(where + sb, " ORDER BY ID ", pageinfo); pageinfo = (PageInfo) list.remove(0); fankuilist = list; if (pageinfo.getTotalrow() > 0 && fankuilist.size() == 0) { pageinfo.setPagenum(1); list = Server.getInstance() .getMemberService() .findAllTousuForPageinfo(where + sb, " ORDER BY ID ", pageinfo); pageinfo = (PageInfo) list.remove(0); fankuilist = list; } return "showfklist"; }
public String car_new() throws Exception { String where = " where 1=1 "; if (getLoginUser().getAgentid() != 46) { where += " AND " + Carorder.COL_carid + " =" + getLoginUser().getAgentid(); } System.out.println("where=" + where); List list = Server.getInstance() .getCarService() .findAllCarorderForPageinfo(where, " ORDER BY ID DESC ", pageinfo); pageinfo = (PageInfo) list.remove(0); listCarorder = list; if (pageinfo.getTotalrow() > 0 && listCarorder.size() == 0) { pageinfo.setPagenum(1); list = Server.getInstance() .getCarService() .findAllCarorderForPageinfo(where, " ORDER BY ID DESC ", pageinfo); pageinfo = (PageInfo) list.remove(0); listCarorder = list; } return "car_new"; }
/** 列表查询汽车 */ public String execute() throws Exception { // 查询所有的城市 listCity = Server.getInstance() .getHotelService() .findAllCity( " where 1=1 and " + City.COL_type + " =2", "ORDER BY " + City.COL_sort, -1, 0); String where = " where 1=1 "; if (s_name != null && s_name.trim().length() != 0) { where += " and " + Cars.COL_name + " like '%" + s_name.trim() + "%'"; } if (C_ScityId > 0) { where += " and " + Cars.COL_cityid + " ='" + C_ScityId + "'"; } List list = Server.getInstance() .getCarService() .findAllCarsForPageinfo(where, " ORDER BY ID DESC", pageinfo); pageinfo = (PageInfo) list.remove(0); listCars = list; if (pageinfo.getTotalrow() > 0 && listCars.size() == 0) { pageinfo.setPagenum(1); list = Server.getInstance() .getCarService() .findAllCarsForPageinfo(where, " ORDER BY ID DESC", pageinfo); pageinfo = (PageInfo) list.remove(0); listCars = list; } return SUCCESS; }
/** * 批量操作 * * @return * @throws Exception */ public String batch() throws Exception { if (selectid != null && selectid.length > 0) { switch (opt) { case 1: // delete for (int i : selectid) { Server.getInstance().getCarService().deleteCarorder(i); } break; default: break; } } return LIST; }
/** 在线租车 */ public String book_car() throws Exception { Carorder carorder = new Carorder(); carorder.setLinkname(linkname); carorder.setLinktell(linktel); carorder.setLinkmail(s_dizhi); carorder.setSpecreq(s_desc); carorder.setCode(cartype); carorder.setManyday(Integer.parseInt(s_num)); carorder.setSdate(s_day); carorder.setCarname(car_name); carorder.setProperty(qu_typw); // 取车类型 carorder.setCarcode(car_num); // 大小 carorder.setPretime(new Timestamp(System.currentTimeMillis())); carorder.setMemberid(getLoginUser().getId()); carorder.setCarid(getLoginUser().getAgentid()); Server.getInstance().getCarService().createCarorder(carorder); return this.car_new(); }
/** 删除租车订单 */ public String delete() throws Exception { Server.getInstance().getCarService().deleteCarorder(carorder.getId()); return LIST; }
/** 编辑租车订单 */ public String edit() throws Exception { Server.getInstance().getCarService().updateCarorderIgnoreNull(carorder); return LIST; }
/** * 添加国际机票国家 */ public String add()throws Exception{ Server.getInstance().getInterticketService().createFcountry(fcountry); return LIST; }
/** * 编辑国际机票国家 */ public String edit()throws Exception{ Server.getInstance().getInterticketService().updateFcountryIgnoreNull(fcountry); return LIST; }
/** 转向到租车订单审核页面 */ public String tocheck() throws Exception { carorder = Server.getInstance().getCarService().findCarorder(carorder.getId()); return CHECK; }
public String toinfo() throws Exception { carorder = Server.getInstance().getCarService().findCarorder(carorder.getId()); return "info"; }
/** 编辑汽车 */ public String edit() throws Exception { // cars.setMarkettime(dateToTimestamp(c_markettime)); Server.getInstance().getCarService().updateCarsIgnoreNull(cars); return LIST; }
/** * 编辑国际机票行程 */ public String edit()throws Exception{ Server.getInstance().getInterticketService().updateFflightIgnoreNull(fflight); return LIST; }
/** * 添加国际机票行程 */ public String add()throws Exception{ Server.getInstance().getInterticketService().createFflight(fflight); return LIST; }
/** * 转向到国际机票行程审核页面 */ public String tocheck()throws Exception{ fflight = Server.getInstance().getInterticketService().findFflight(fflight.getId()); return CHECK; }
/** * 转向到国际机票行程修改页面 */ public String toedit()throws Exception{ fflight = Server.getInstance().getInterticketService().findFflight(fflight.getId()); return EDIT; }
/** * 删除国际机票行程 */ public String delete()throws Exception{ Server.getInstance().getInterticketService().deleteFflight(fflight.getId()); return LIST; }
/** 审核汽车 */ public String check() throws Exception { Server.getInstance().getCarService().updateCarsIgnoreNull(cars); return LIST; }
/** 列表查询租车订单 */ public String execute() throws Exception { // 查询所有的城市 listCities = Server.getInstance() .getHotelService() .findAllCity( " where 1=1 and " + City.COL_type + " =2", "ORDER BY " + City.COL_sort, -1, 0); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); /*if(h_prestarttime == null) { h_prestarttime = sdf.format(new Date()) ; } if(h_preendtime == null) { h_preendtime = sdf.format(new Date()) ; }*/ String where = " where 1=1 "; List<Sysconfig> listsys = Server.getInstance() .getSystemService() .findAllSysconfig(" where 1=1 and " + Sysconfig.COL_name + " ='agentid'", "", -1, 0); if (getLoginUser().getAgentid() == 46) { // 龙泰得员工 longtype = 0; where += " "; if (h_angent > 0) { // where += " and " + Carorder.COL_memberid + " in ( select " + Customeruser.COL_id + " from " + Customeruser.TABLE + " where 1=1 and " + Customeruser.COL_agentid + " =" + h_angent + ")"; } listCustomeragent = Server.getInstance() .getMemberService() .findAllCustomeragent(" WHERE 1=1 ", " ORDER BY ID DESC ", -1, 0); } else { longtype = 1; where += " and " + Carorder.COL_memberid + " in ( select " + Customeruser.COL_id + " from " + Customeruser.TABLE + " where 1=1 and " + Customeruser.COL_agentid + " =" + getLoginUser().getAgentid() + ")"; listCustomeragent = Server.getInstance() .getMemberService() .findAllCustomeragent( " WHERE 1=1 AND " + Customeragent.COL_parentid + " =" + getLoginUser().getAgentid(), " ORDER BY ID DESC ", -1, 0); } if (s_name != null && s_name.trim().length() != 0) { where += " and " + Carorder.COL_carname + " like '%" + s_name.trim() + "%'"; } if (c_username != null && c_username.trim().length() != 0) { where += " and " + Carorder.COL_linkname + " like '%" + c_username.trim() + "%'"; } if (ordercode != null && ordercode.trim().length() != 0) { where += " and " + Carorder.COL_code + " like '%" + ordercode.trim() + "%'"; } if (s_type > 0) { where += " and " + Carorder.COL_property + " ='" + s_type + "'"; } if (C_ScityId > 0) { where += " and " + Carorder.COL_scityid + " ='" + C_ScityId + "'"; } if (C_EcityId > 0) { where += " and " + Carorder.COL_endcityid + " ='" + C_EcityId + "'"; } if (h_prestarttime != null && h_prestarttime.length() != 0) { where += " AND " + Carorder.COL_pretime + ">=" + "CONVERT(datetime, '" + h_prestarttime + " 00:00:00')"; } if (h_preendtime != null && h_preendtime.length() != 0) { where += " AND " + Hotelorder.COL_pretime + "<=" + "CONVERT(datetime, '" + h_preendtime + " 23:59:59')"; } System.out.println("where=" + where); List list = Server.getInstance() .getCarService() .findAllCarorderForPageinfo(where, " ORDER BY ID DESC ", pageinfo); pageinfo = (PageInfo) list.remove(0); listCarorder = list; if (pageinfo.getTotalrow() > 0 && listCarorder.size() == 0) { pageinfo.setPagenum(1); list = Server.getInstance() .getCarService() .findAllCarorderForPageinfo(where, " ORDER BY ID DESC ", pageinfo); pageinfo = (PageInfo) list.remove(0); listCarorder = list; } return SUCCESS; }
/** 转向到租车订单修改页面 */ public String toedit() throws Exception { carorder = Server.getInstance().getCarService().findCarorder(carorder.getId()); return EDIT; }