📄 tseradviseraccessaction.java.svn-base
字号:
/*
* $Workfile: TserAdviserAction.java$
* Copyright (c) 2007 Jama, International.
* All rights reserved.
* Creator Fan
* Last Changed by: $Author: Fan$
* On: $Date: 2007-8-30 上午09:48:37$
* $Revision: 1$
*/
package com.jama.rcrm.service.web;
import static com.jama.rcrm.service.ServiceConstants.RESULT_ARRANGE;
import static com.jama.rcrm.service.ServiceConstants.RESULT_FULL;
import static com.jama.rcrm.service.ServiceConstants.RESULT_OTHERWISE;
import static com.jama.rcrm.service.ServiceConstants.RESULT_PART;
import static com.jama.rcrm.service.ServiceConstants.RESULT_STRING;
import static com.jama.rcrm.service.ServiceConstants.DEFAULT;
import static com.jama.rcrm.service.ServiceConstants.APPROVE_APPROVE;
import static com.jama.rcrm.service.ServiceConstants.APPROVE_BASIC;
import static com.jama.rcrm.service.ServiceConstants.APPROVE_NOT;
import static com.jama.rcrm.service.ServiceConstants.APPROVE_STRIGN;
import static com.jama.rcrm.service.ServiceConstants.APPROVE_VERY;
import static com.jama.rcrm.service.ServiceConstants.STATUS_AEND;
import static com.jama.rcrm.service.ServiceConstants.STATUS_END;
import static com.jama.rcrm.service.ServiceConstants.STATUS_ING;
import static com.jama.rcrm.service.ServiceConstants.STATUS_NO;
import static com.jama.rcrm.service.ServiceConstants.STATUS_ONE;
import static com.jama.rcrm.service.ServiceConstants.STATUS_QEND;
import static com.jama.rcrm.service.ServiceConstants.STATUS_STRING;
import static com.jama.rcrm.service.ServiceConstants.STATUS_TWO;
import static com.jama.rcrm.service.ServiceConstants.STATUS_YES;
import static com.jama.rcrm.service.ServiceConstants.TIME_BASIC;
import static com.jama.rcrm.service.ServiceConstants.TIME_BETIMES;
import static com.jama.rcrm.service.ServiceConstants.TIME_NOTBETIMES;
import static com.jama.rcrm.service.ServiceConstants.TIME_STRING;
import static com.jama.rcrm.service.ServiceConstants.USERRECEIVE_APPROVE;
import static com.jama.rcrm.service.ServiceConstants.USERRECEIVE_BASIC;
import static com.jama.rcrm.service.ServiceConstants.USERRECEIVE_NOT;
import static com.jama.rcrm.service.ServiceConstants.USERRECEIVE_STRIGN;
import static com.jama.rcrm.service.ServiceConstants.USERRECEIVE_VERY;
import static com.jama.rcrm.service.ServiceConstants.WORKER_APPROVE;
import static com.jama.rcrm.service.ServiceConstants.WORKER_BASIC;
import static com.jama.rcrm.service.ServiceConstants.WORKER_NOT;
import static com.jama.rcrm.service.ServiceConstants.WORKER_STRIGN;
import static com.jama.rcrm.service.ServiceConstants.WORKER_VERY;
import static com.jama.rcrm.service.ServiceConstants.ADVISEMODE_ACCESS;
import static com.jama.rcrm.service.ServiceConstants.ADVISEMODE_LETTER;
import static com.jama.rcrm.service.ServiceConstants.ADVISEMODE_STRING;
import static com.jama.rcrm.service.ServiceConstants.ADVISEMODE_TELEPHONE;
import static com.jama.rcrm.service.ServiceConstants.MULTIMEDIAFLAG_NO;
import static com.jama.rcrm.service.ServiceConstants.MULTIMEDIAFLAG_STRING;
import static com.jama.rcrm.service.ServiceConstants.MULTIMEDIAFLAG_YES;
import static com.jama.rcrm.service.ServiceConstants.GRADE_COMMON;
import static com.jama.rcrm.service.ServiceConstants.GRADE_EXIGENCE;
import static com.jama.rcrm.service.ServiceConstants.GRADE_STRING;
import static com.jama.rcrm.service.ServiceConstants.GRADE_URGENT;
import static com.jama.rcrm.service.ServiceConstants.ANSWERFLAG_NO;
import static com.jama.rcrm.service.ServiceConstants.ANSWERFLAG_STRING;
import static com.jama.rcrm.service.ServiceConstants.ANSWERFLAG_YES;
import static com.jama.rcrm.service.ServiceConstants.LIVINGFLAGE_NO;
import static com.jama.rcrm.service.ServiceConstants.LIVINGFLAGE_STRIGN;
import static com.jama.rcrm.service.ServiceConstants.LIVINGFLAGE_YES;
import static com.jama.rcrm.service.ServiceConstants.STATUS_NEW;
import static com.jama.rcrm.service.ServiceConstants.DEFAULT_STRING;
import static com.jama.rcrm.service.ServiceConstants.STRINFO;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import com.jama.common.BeanFactory;
import com.jama.common.base.BaseDispatchAction;
import com.jama.common.base.BaseOptionDTO;
import com.jama.common.exception.BaseAppException;
import com.jama.common.exception.ErrorCode;
import com.jama.common.exception.WebException;
import com.jama.common.taglib.GridModel;
import com.jama.common.taglib.QueryInfo;
import com.jama.common.taglib.TableHeadInfo;
import com.jama.common.util.DateUtil;
import com.jama.rcrm.common.BeanNameConstants;
import com.jama.rcrm.service.business.CustomDisposeService;
import com.jama.rcrm.service.business.TserAdviseService;
import com.jama.rcrm.service.business.dto.TserAdviseAccessDto;
import com.jama.rcrm.service.web.form.TserAdviseAccessForm;
public class TserAdviserAccessAction extends BaseDispatchAction
{
private QueryInfo queryInfo; //分页对象
private GridModel gridModel; //列表显示对象
/**
* 取出需要修改的回访记录
* @param mapping
* @param form
* @param request
* @param response
* @return
*/
public ActionForward tomodifyTserAdviserAccess(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
{
checkUserPermission(getMenuId(request), PERMISSION_WRITE, request);
String id=request.getParameter("id");
TserAdviseAccessForm tserform=new TserAdviseAccessForm();
if(id!=null)
{
try
{
TserAdviseService tseradviseService = (TserAdviseService)BeanFactory.getBeanByName(BeanNameConstants.TSERADVIS_SERVICE);
TserAdviseAccessDto dto=tseradviseService.findTserAdviseInfoByGuid(id);
if(dto!=null)
{
BeanUtils.copyProperties(tserform,dto);
this.initPageData(request, form);
request.setAttribute("tserAdviseAccessForm", tserform);
}
else
{
throw new WebException(ErrorCode.ERROR_RCRM_WEB_SERVICE_VIEWUPDATE_CUSTOMERACCESS,new Exception());
}
return mapping.findForward("ToAccess");
}
catch (BaseAppException bae)
{
throw bae;
}
catch (Exception e)
{
throw new WebException(ErrorCode.ERROR_RCRM_WEB_SERVICE_VIEWUPDATE_CUSTOMERACCESS, e);
}
}
else
{
throw new WebException(ErrorCode.ERROR_RCRM_WEB_SERVICE_VIEWUPDATE_CUSTOMERACCESS,new Exception());
}
}
/**
* 取出需要修改的投诉信息
* @param mapping
* @param form
* @param request
* @param response
* @return
*/
public ActionForward tomodifyTserAdviser(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
{
checkUserPermission(getMenuId(request), PERMISSION_WRITE, request);
String id=request.getParameter("id");
TserAdviseAccessForm tserform=new TserAdviseAccessForm();
if(id!=null)
{
try
{
TserAdviseService tseradviseService = (TserAdviseService)BeanFactory.getBeanByName(BeanNameConstants.TSERADVIS_SERVICE);
TserAdviseAccessDto dto=tseradviseService.findTserAdviseInfoByGuid(id);
if(dto!=null)
{
CustomDisposeService customdisposeService=(CustomDisposeService) BeanFactory.getBeanByName("customDisposeService");
dto.setUpdateProcess(customdisposeService.findChildTask(dto.getAdviseGuid()));
BeanUtils.copyProperties(tserform,dto);
if(dto.isUpdateProcess())
{
tserform.setUpProcesstrs(STRINFO);
}
else
{
tserform.setUpProcesstrs("");
}
this.initAddData(request);
this.initProcessDate(request);
request.setAttribute("tserAdviseAccessForm", tserform);
}
else
{
throw new WebException(ErrorCode.ERROR_RCRM_WEB_SERVICE_VIEWUPDATE_CUSTOMERACCESS,new Exception());
}
return mapping.findForward("toModify");
}
catch (BaseAppException bae)
{
throw bae;
}
catch (Exception e)
{
throw new WebException(ErrorCode.ERROR_RCRM_WEB_SERVICE_VIEWUPDATE_CUSTOMERACCESS, e);
}
}
else
{
throw new WebException(ErrorCode.ERROR_RCRM_WEB_SERVICE_VIEWUPDATE_CUSTOMERACCESS,new Exception());
}
}
/**
* 初始化投诉登记页面
* @param mapping
* @param form
* @param request
* @param response
* @return
*/
public ActionForward toAddTserAdviser(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
{
try{
checkUserPermission(getMenuId(request), PERMISSION_WRITE, request);
TserAdviseAccessForm tserform=new TserAdviseAccessForm();
this.initAddData(request);
String nowDate=DateUtil.formatDate2NC(DateUtil.getNow());
tserform.setUserName(this.getUserName(request));
tserform.setCurrentDateS(nowDate);
request.setAttribute("tserAdviseAccessForm", tserform);
return mapping.findForward("add");
}
catch (BaseAppException bae)
{
throw bae;
}
catch (Exception e)
{
throw new WebException(ErrorCode.ERROR_RCRM_WEB_SERVICE_TSERADVISE_INITREGISTER, e);
}
}
/**
* 历史投诉的详细查询
* @param mapping
* @param form
* @param request
* @param response
* @return
*/
public ActionForward toFindListOfAll(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
{
try
{
checkUserPermission(getMenuId(request), PERMISSION_WRITE, request);
String cusName=request.getParameter("cusName");
String telPhone=request.getParameter("telPhone");
String startDate=request.getParameter("startDate");
String endDate=request.getParameter("endDate");
String urlparameter="?method=toFindListOfAll";
this.initTserGridMode1(request, urlparameter);
TserAdviseService tseradviseService = (TserAdviseService)BeanFactory.getBeanByName(BeanNameConstants.TSERADVIS_SERVICE);
List tsaacList = tseradviseService.findListOfAll(queryInfo, cusName, telPhone, startDate, endDate);
gridModel.setDataList(tsaacList);
saveToken(request);
List msgStatusListOfAll=this.initProcessDateOflistfind();
request.setAttribute("cusName", cusName);
request.setAttribute("telPhone", telPhone);
request.setAttribute("startDate", startDate);
request.setAttribute("endDate", endDate);
request.setAttribute("gridModel", gridModel);
request.setAttribute("msgStatusListOfAll",msgStatusListOfAll);
return mapping.findForward("toViewPageOfAll");
}
catch (BaseAppException bae)
{
throw bae;
}
catch (Exception e)
{
throw new WebException(ErrorCode.ERROR_RCRM_WEB_SERVICE_VICE_ALLTSERADVISELIST, e);
}
}
/**
* 分页显示所有投诉记录(历史投诉列表)
* @param mapping
* @param form
* @param request
* @param response
* @return
*/
public ActionForward toListOfAll(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
{
try
{
checkUserPermission(getMenuId(request), PERMISSION_WRITE, request);
String findprocess=request.getParameter("process");
String urlparameter="?method=toListOfAll";
this.initTserGridMode1(request, urlparameter);
TserAdviseService tseradviseService = (TserAdviseService)BeanFactory.getBeanByName(BeanNameConstants.TSERADVIS_SERVICE);
List tsaacList = tseradviseService.findAllTserAdviseList(queryInfo,findprocess);
gridModel.setDataList(tsaacList);
saveToken(request);
List msgStatusListOfAll=this.initProcessDateOflistfind();
if(findprocess==null||findprocess.length()<1)
{
findprocess="-1";
}
request.setAttribute("process", findprocess);
request.setAttribute("gridModel", gridModel);
request.setAttribute("msgStatusListOfAll",msgStatusListOfAll);
return mapping.findForward("toViewPageOfAll");
}
catch (BaseAppException bae)
{
throw bae;
}
catch (Exception e)
{
throw new WebException(ErrorCode.ERROR_RCRM_WEB_SERVICE_VICE_ALLTSERADVISELIST, e);
}
}
/**
* 分页显示使用没有回访的投诉记录
* @param mapping
* @param form
* @param request
* @param response
* @return
*/
public ActionForward toList(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
{
try
{
checkUserPermission(getMenuId(request), PERMISSION_WRITE, request);
String urlparameter="?method=toList";
this.initTserGridMode1(request, urlparameter);
TserAdviseService tseradviseService = (TserAdviseService)BeanFactory.getBeanByName(BeanNameConstants.TSERADVIS_SERVICE);
List tsaacList = tseradviseService.findAllTserAdviseAccessByPage(queryInfo);
gridModel.setDataList(tsaacList);
request.setAttribute("gridModel", gridModel);
saveToken(request);
return mapping.findForward("toViewPage");
}
catch (BaseAppException bae)
{
throw bae;
}
catch (Exception e)
{
throw new WebException(ErrorCode.ERROR_RCRM_WEB_SERVICE_LIST_CUSTOMERACCESS, e);
}
}
/**
* 分页显示所有没有归档的投诉记录(投诉登记显示列表)
* @param mapping
* @param form
* @param request
* @param response
* @return
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -