/** 查询二级营销案审核列表 创建日期:2013-11-1下午4:58:48 修改日期: 作者:zhanglu TODO return */ public HandlerResult queryReservationMarketSecondAuditList(HandlerRequestContext context) { HandlerResult result = HandlerResult.newInstance(); HttpServletRequest request = context.getRequest(); Map<String, String> param = BeanUtil.getMapFromRequest(request); LoginRequestBean loginReqBean = (LoginRequestBean) request.getAttribute("reqParams"); UserInfoBean userInfoBean = SSOUtil.checkSSOState(loginReqBean, request).getUserInfoBean(); String city = userInfoBean.getUserAreaCode(); try { Page page = reservationMarketSecondService.queryReservationMarketSecondAuditList(param); List<ReservationMarketSecondBean> reservationSecondlist = (List<ReservationMarketSecondBean>) page.getRecords(); List<ReservationMarketSecondBean> newList = new ArrayList<ReservationMarketSecondBean>(); if (reservationSecondlist != null && reservationSecondlist.size() > 0) { for (int i = 0; i < reservationSecondlist.size(); i++) { ReservationMarketSecondBean rmsbean = (ReservationMarketSecondBean) reservationSecondlist.get(i); String verifySate = rmsbean.getVerifyState(); if ("0".equals(verifySate)) { String auditAlink = "待审核<a href='javascript:component.updateListView(1);' title='点击审核通过'><img src='../../../resource/img/toggle_enabled.gif'/></a>"; auditAlink += "<a href='javascript:component.updateListView(2);' title='点击审核不通过'><img src='../../../resource/img/toggle_disabled.gif'/></a>"; rmsbean.setLinkOper(auditAlink); } else if ("1".equals(verifySate)) { String auditAlink = "审核通过<a href='javascript:component.updateListView(2)' title='点击审核不通过'><img src='../../../resource/img/toggle_disabled.gif'/></a>"; rmsbean.setLinkOper(auditAlink); } else if ("2".equals(verifySate)) { String auditAlink = "审核不通过<a href='javascript:component.updateListView(1)' title='点击审核通过'><img src='../../../resource/img/toggle_enabled.gif'/></a>"; rmsbean.setLinkOper(auditAlink); } String viewOper = "<a href='javascript:component.viewOper(\"" + rmsbean.getMarketSecondPkId() + "\",\"" + rmsbean.getMarketFirstName() + "\")'; title='点击查看详细信息'>预览</a>"; rmsbean.setViewOper(viewOper); newList.add(rmsbean); } page.setRecords(newList); } result.setRetObj(page); result.setRetCode(IResultCode.SYS_SUCCESS); } catch (Exception e) { e.printStackTrace(); result.setRetCode(IResultCode.SYS_FAILED); } return result; }
/** * 品牌查询 * * @param context brandName,brandNum,jb * @return * @author zhangel */ public HandlerResult queryBrandList(HandlerRequestContext context) { HandlerResult result = HandlerResult.newInstance(); HttpServletRequest request = context.getRequest(); Map<String, String> param = BeanUtil.getMapFromRequest(request); try { Page page = brandService.queryBrandList(param); result.setRetObj(page); result.setRetCode(IResultCode.SYS_SUCCESS); } catch (Exception e) { result.setRetCode(IResultCode.SYS_FAILED); } return result; }
/** * 省级、地市审核列表 创建日期:2013-12-17下午7:57:59 修改日期: 作者:zhanglu * * @param: * @return:HandlerResult */ public HandlerResult queryMarketSecondForVerify(HandlerRequestContext context) { HandlerResult result = HandlerResult.newInstance(); HttpServletRequest request = context.getRequest(); Map<String, String> param = BeanUtil.getMapFromRequest(request); LoginRequestBean loginReqBean = (LoginRequestBean) request.getAttribute("reqParams"); UserInfoBean userInfoBean = SSOUtil.checkSSOState(loginReqBean, request).getUserInfoBean(); String city = userInfoBean.getUserAreaCode(); if (StringUtil.isNull(city)) { // city = userInfoBean.getUserAreaCode(); } if ("0".equals(city)) { // 0 为江苏省 city = ""; param.put("proManager", "1"); } else { param.put("cityManager", "1"); } // param.put("city", city); String channelNum = userInfoBean.getChannelNum(); if (channelNum != null && !"".equals(channelNum)) { // 掌厅 if ("02".equals(channelNum)) { channelNum = "5"; } // 网厅 if ("01".equals(channelNum)) { channelNum = "4"; } // 短厅 if ("03".equals(channelNum)) { channelNum = "6"; } // 全渠道 if ("0".equals(channelNum)) { channelNum = param.get("channalData"); } param.put("channalData", channelNum); } try { Page page = reservationMarketSecondService.queryMarketForAudit(param); result.setRetObj(page); result.setRetCode(IResultCode.SYS_SUCCESS); result.setSysCode(SystemCodeConstants.QUERY_INFO_SUCCEED); } catch (Exception e) { e.printStackTrace(); result.setRetCode(IResultCode.SYS_FAILED); result.setSysCode(SystemCodeConstants.QUERY_INFO_ERROR); } return result; }
/** * 更改方案状态 创建日期:2013-11-29下午4:30:25 修改日期: 作者:zhanglu * * @param: * @return:HandlerResult */ public HandlerResult changeState(HandlerRequestContext context) { HandlerResult result = HandlerResult.newInstance(); HttpServletRequest request = context.getRequest(); Map<String, String> param = BeanUtil.getMapFromRequest(request); try { floorPlanService.changeState(param); result.setRetCode(IResultCode.SYS_SUCCESS); result.setSysCode(SystemCodeConstants.UPDATE_INFO_SUCCEED); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); result.setRetCode(IResultCode.SYS_FAILED); result.setSysCode(SystemCodeConstants.UPDATE_INFO_FAILED); } return result; }
/** 根据一级预约营销案查询二级 创建日期:2013-10-25下午5:51:20 修改日期: 作者:zhanglu TODO return */ public HandlerResult queryReservationMarketSecondList(HandlerRequestContext context) { HandlerResult result = HandlerResult.newInstance(); HttpServletRequest request = context.getRequest(); Map<String, String> param = BeanUtil.getMapFromRequest(request); LoginRequestBean loginReqBean = (LoginRequestBean) request.getAttribute("reqParams"); UserInfoBean userInfoBean = SSOUtil.checkSSOState(loginReqBean, request).getUserInfoBean(); String city = userInfoBean.getUserAreaCode(); param.put("city", city); // 查询有效的,即未删除的营销案 param.put("state", "1"); try { Page page = reservationMarketSecondService.queryReservationMarketSecondList(param); List<ReservationMarketSecondBean> reservationSecondlist = (List<ReservationMarketSecondBean>) page.getRecords(); List<ReservationMarketSecondBean> newList = new ArrayList<ReservationMarketSecondBean>(); if (reservationSecondlist != null && reservationSecondlist.size() > 0) { for (int i = 0; i < reservationSecondlist.size(); i++) { ReservationMarketSecondBean rmsbean = (ReservationMarketSecondBean) reservationSecondlist.get(i); String isViewList = rmsbean.getIsListView(); if ("0".equals(isViewList)) { String isViewAlink = "<a href='javascript:component.updateListView();' title='点击更新为在列表中展示'>未展示<img src='../../../resource/img/toggle_enabled.gif'/></a>"; rmsbean.setLinkOper(isViewAlink); } else { String isViewAlink = "<a href='javascript:component.updateListView()' title='点击更新为在列表中不展示'>展示<img src='../../../resource/img/toggle_disabled.gif'/></a>"; rmsbean.setLinkOper(isViewAlink); } newList.add(rmsbean); } page.setRecords(newList); } result.setRetObj(page); result.setRetCode(IResultCode.SYS_SUCCESS); } catch (Exception e) { e.printStackTrace(); result.setRetCode(IResultCode.SYS_FAILED); } return result; }
/** * 查询楼层方案信息 创建日期:2013-11-26下午4:10:12 修改日期: 作者:zhanglu * * @param: * @return:HandlerResult */ public HandlerResult queryFloorPlan(HandlerRequestContext context) { HandlerResult result = HandlerResult.newInstance(); HttpServletRequest request = context.getRequest(); Map<String, String> param = BeanUtil.getMapFromRequest(request); LoginRequestBean loginReqBean = (LoginRequestBean) request.getAttribute("reqParams"); UserInfoBean userInfoBean = SSOUtil.checkSSOState(loginReqBean, request).getUserInfoBean(); if (!"0".equals(userInfoBean.getUserAreaCode())) { param.put("userAreaCode", userInfoBean.getUserAreaCode()); } try { Page page = floorPlanService.queryFloorPlan(param); result.setRetObj(page); result.setRetCode(IResultCode.SYS_SUCCESS); result.setSysCode(SystemCodeConstants.QUERY_INFO_SUCCEED); } catch (Exception e) { // TODO: handle exception e.printStackTrace(); result.setRetCode(IResultCode.SYS_FAILED); result.setSysCode(SystemCodeConstants.QUERY_INFO_FAILED); } return result; }