package cn.ksource.web.controller.uc;
|
|
import java.util.ArrayList;
|
import java.util.HashMap;
|
import java.util.List;
|
import java.util.Map;
|
|
import javax.annotation.Resource;
|
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletResponse;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Controller;
|
import org.springframework.ui.Model;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.servlet.ModelAndView;
|
|
import cn.ksource.core.page.PageInfo;
|
import cn.ksource.core.util.JsonUtil;
|
import cn.ksource.core.util.ParamsMapUtil;
|
import cn.ksource.core.util.StringUtil;
|
import cn.ksource.core.web.WebUtil;
|
import cn.ksource.web.Constants;
|
import cn.ksource.web.facade.uc.order.UcQuestionFacade;
|
import cn.ksource.web.service.DataDictionaryService;
|
/**
|
* 用户中心--问题管理控制器
|
* @note:
|
* @version
|
* @author sxj
|
* @date July 15, 2016 10:35:44 AM
|
*/
|
@Controller
|
@RequestMapping("/uc/ucquestion")
|
public class UcQuestionController {
|
|
@Resource(name="ucQuestionFacade")
|
private UcQuestionFacade ucQuestionFacade;
|
|
@Autowired
|
private DataDictionaryService dataDictionaryService;
|
|
/**
|
* 问题列表页面
|
* @param request
|
* @param response
|
* @return
|
*/
|
@RequestMapping(value="ucquestionList.html", method=RequestMethod.GET)
|
public ModelAndView questionList(HttpServletRequest request, HttpServletResponse response) {
|
ModelAndView view = new ModelAndView("/uc/question/ucquestionList");
|
String cusId = WebUtil.getWebLoginUserCusId(request);
|
|
//查询工单数量,通过类型判断查询那种类型的数量
|
Map msgCount = ucQuestionFacade.queryQuestionCount(cusId);
|
|
System.out.println(JsonUtil.map2Json(msgCount));
|
|
view.addObject("c", msgCount);
|
//查询问题类型数据字典
|
List sources = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.QUESTION_SOURCE);
|
|
view.addObject("sources", sources);
|
|
//查询该加盟商的事件优先级
|
List<Map> eventPri = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.EVENT_PRI);
|
view.addObject("eventPri", eventPri);
|
//查询事件影响度数据字典
|
List<Map> eventDg = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.EVENT_EFFECT_DG);
|
view.addObject("eventDg", eventDg);
|
|
|
return view;
|
}
|
|
|
|
/**
|
* 查询问题工单列表数据
|
*/
|
@RequestMapping(value="ucquestionData.html",method=RequestMethod.POST)
|
public ModelAndView questionData(HttpServletRequest request,PageInfo pageInfo) {
|
ModelAndView modelAndView = new ModelAndView("/uc/question/ucquestionData");
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
String cusId = WebUtil.getWebLoginUserCusId(request);
|
params.put("cusId", cusId);
|
PageInfo list = ucQuestionFacade.queryQuestionOrderList(pageInfo,params);
|
modelAndView.addObject("orderList", list);
|
return modelAndView;
|
}
|
|
|
|
/**
|
* 查询问题工单总数量
|
*/
|
@RequestMapping(value="ucquestionCount.html",method=RequestMethod.POST)
|
public void questionCount(HttpServletRequest request,HttpServletResponse response) {
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
String cusId = WebUtil.getWebLoginUserCusId(request);
|
params.put("cusId", cusId);
|
int count = ucQuestionFacade.queryQuestionOrderCount(params);
|
WebUtil.write(response, String.valueOf(count));
|
}
|
|
/**
|
* 跳转到订单查看页面
|
*/
|
@RequestMapping("ucquestionDetail.html")
|
public ModelAndView incidentDetail(HttpServletRequest request,HttpServletResponse response) {
|
ModelAndView modelAndView = new ModelAndView("/uc/question/ucquestionDetail");
|
|
//查询问题基本信息
|
String orderId = request.getParameter("orderId");
|
String flowId = request.getParameter("flowId");
|
|
//通过工单编号查询工单基本信息
|
Map baseMsg = ucQuestionFacade.queryQuestionBaseMsg(orderId);
|
|
modelAndView.addObject("baseMsg", baseMsg);
|
modelAndView.addObject("orderId", orderId);
|
modelAndView.addObject("flowId", flowId);
|
|
return modelAndView;
|
}
|
|
/**
|
* 问题处理服务报告
|
* @param request
|
* @return
|
*/
|
@RequestMapping("ucquestionInfo.html")
|
public ModelAndView QuestionInfo(HttpServletRequest request){
|
ModelAndView view = new ModelAndView("/uc/question/ucquestionInfo");
|
Map map=ucQuestionFacade.questionInfo(request);
|
view.addObject("questionMap", map.get("questionMap"));
|
view.addObject("orderList", map.get("orderList"));
|
view.addObject("ciList", map.get("ciList"));
|
view.addObject("fileList", map.get("fileList"));
|
return view;
|
}
|
|
/**
|
* 问题服务台首页
|
* @param model
|
* @param request
|
* @param response
|
* @return
|
*/
|
@RequestMapping(value="ucQuestionManageIndex.html")
|
public String ucQuestionManageIndex(Model model,HttpServletRequest request,HttpServletResponse response){
|
String cusId = WebUtil.getWebLoginUserCusId(request);
|
if(StringUtil.isNotBlank(cusId)){
|
model.addAttribute("cusId", cusId);
|
}
|
return "/uc/question/ucQuestionManageIndex";
|
}
|
|
/**
|
* 问题服务台首页明细加载
|
* @param model
|
* @param request
|
* @param response
|
* @return
|
*/
|
@RequestMapping(value="ucQuestionManageIndexLoad.html")
|
public String questionManageIndexLoad(Model model,HttpServletRequest request,HttpServletResponse response){
|
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
String cusId = WebUtil.getWebLoginUserCusId(request);
|
params.put("cusId", cusId);
|
//工单池问题数量
|
int poolCount = ucQuestionFacade.questionpoolCount(params);
|
//待处理问题数量
|
int pendingCount = ucQuestionFacade.queryQuestionOrderNodeCount(params);
|
//进行中问题数量
|
int inHandCount = ucQuestionFacade.queryQuestionJxzCount (params);
|
//已挂起
|
params.put("type", "6");
|
int sleepCount = ucQuestionFacade.queryQuestionEndCount (params);
|
|
model.addAttribute("poolCount",poolCount);
|
model.addAttribute("pendingCount",pendingCount);
|
model.addAttribute("inHandCount",inHandCount);
|
model.addAttribute("sleepCount",sleepCount);
|
return "/uc/question/ucQuestionManageIndexLoad";
|
}
|
|
|
/**
|
* 查询最近一月问题数量
|
* @param request
|
* @param response
|
*/
|
@RequestMapping(value="getQuestionSumLineChart.html")
|
public void getQuestionSumLineChart(HttpServletRequest request,HttpServletResponse response){
|
Map info = ucQuestionFacade.getLastMonthQuestionCount(request);
|
WebUtil.write(response, JsonUtil.map2Json(info));
|
}
|
/**
|
* 查询最近一月问题级别分析
|
* @param request
|
* @param response
|
*/
|
@RequestMapping(value="getQuestionLvPieChart.html")
|
public void getQuestionLvPieChart(HttpServletRequest request,HttpServletResponse response){
|
Map info = ucQuestionFacade.getLastMonthQuestionLv(request);
|
WebUtil.write(response, JsonUtil.map2Json(info));
|
}
|
|
/**
|
* 查询最近一月问题优先级分析
|
* @param request
|
* @param response
|
*/
|
@RequestMapping(value="getQuestionPriPieChart.html")
|
public void getQuestionPriPieChart(HttpServletRequest request,HttpServletResponse response){
|
Map info = ucQuestionFacade.getLastMonthQuestionPri(request);
|
WebUtil.write(response, JsonUtil.map2Json(info));
|
}
|
|
/**
|
* 查询最近一月问题影响度分析
|
* @param request
|
* @param response
|
*/
|
@RequestMapping(value="getQuestionEffectPieChart.html")
|
public void getQuestionEffectPieChart(HttpServletRequest request,HttpServletResponse response){
|
Map info = ucQuestionFacade.getLastMonthQuestionEffect(request);
|
//System.out.println("json--------------------------"+JsonUtil.map2Json(info));
|
WebUtil.write(response, JsonUtil.map2Json(info));
|
}
|
|
/**
|
* 查询最近一月服务目录问题数量
|
* @param request
|
* @param response
|
*/
|
@RequestMapping(value="getQuestionServerLineChart.html")
|
public void getQuestionServerLineChart(HttpServletRequest request,HttpServletResponse response){
|
Map info = ucQuestionFacade.getLastMonthQuestionServer(request);
|
WebUtil.write(response, JsonUtil.map2Json(info));
|
}
|
|
/**
|
* 问题待响应列表页面
|
* @param request
|
* @param response
|
* @return
|
*/
|
@RequestMapping(value="ucquestionNodeList.html", method=RequestMethod.GET)
|
public ModelAndView questionDxyList(HttpServletRequest request, HttpServletResponse response) {
|
ModelAndView view = new ModelAndView("/uc/question/ucquestionNodeList");
|
String cusId = WebUtil.getWebLoginUserCusId(request);
|
//查询工单数量,通过类型判断查询那种类型的数量
|
Map msgCount = ucQuestionFacade.queryQuestionNodeCount(cusId);
|
|
System.out.println(JsonUtil.map2Json(msgCount));
|
|
view.addObject("c", msgCount);
|
//查询问题类型数据字典
|
List sources = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.QUESTION_SOURCE);
|
|
view.addObject("sources", sources);
|
|
//查询该加盟商的事件优先级
|
List<Map> eventPri = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.EVENT_PRI);
|
view.addObject("eventPri", eventPri);
|
//查询事件影响度数据字典
|
List<Map> eventDg = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.EVENT_EFFECT_DG);
|
view.addObject("eventDg", eventDg);
|
|
return view;
|
}
|
|
|
|
/**
|
* 查询问题工单列表数据
|
*/
|
@RequestMapping(value="ucquestionNodeData.html",method=RequestMethod.POST)
|
public ModelAndView questionDxyData(HttpServletRequest request,PageInfo pageInfo) {
|
ModelAndView modelAndView = new ModelAndView("/uc/question/ucquestionNodeData");
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
String cusId = WebUtil.getWebLoginUserCusId(request);
|
params.put("cusId", cusId);
|
PageInfo list = ucQuestionFacade.queryQuestionOrderNodeList(pageInfo,params);
|
modelAndView.addObject("orderList", list);
|
return modelAndView;
|
}
|
|
|
|
/**
|
* 查询问题工单总数量
|
*/
|
@RequestMapping(value="ucquestionNodeCount.html",method=RequestMethod.POST)
|
public void questionDxyCount(HttpServletRequest request,HttpServletResponse response) {
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
String cusId = WebUtil.getWebLoginUserCusId(request);
|
params.put("cusId", cusId);
|
int count = ucQuestionFacade.queryQuestionOrderNodeCount(params);
|
WebUtil.write(response, String.valueOf(count));
|
}
|
|
/**
|
* 问题待响应列表页面
|
* @param request
|
* @param response
|
* @return
|
*/
|
@RequestMapping(value="ucquestionJxzList.html", method=RequestMethod.GET)
|
public ModelAndView questionJxzList(HttpServletRequest request, HttpServletResponse response) {
|
ModelAndView view = new ModelAndView("/uc/question/ucquestionJxzList");
|
String cusId = WebUtil.getWebLoginUserCusId(request);
|
//查询工单数量,通过类型判断查询那种类型的数量
|
Map msgCount = ucQuestionFacade.queryQuestionJxzNodeCount(cusId);
|
|
System.out.println(JsonUtil.map2Json(msgCount));
|
|
view.addObject("c", msgCount);
|
//查询问题类型数据字典
|
List sources = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.QUESTION_SOURCE);
|
|
view.addObject("sources", sources);
|
|
//查询该加盟商的事件优先级
|
List<Map> eventPri = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.EVENT_PRI);
|
view.addObject("eventPri", eventPri);
|
//查询事件影响度数据字典
|
List<Map> eventDg = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.EVENT_EFFECT_DG);
|
view.addObject("eventDg", eventDg);
|
|
return view;
|
}
|
|
|
|
/**
|
* 查询问题工单列表数据
|
*/
|
@RequestMapping(value="ucquestionJxzData.html",method=RequestMethod.POST)
|
public ModelAndView questionJxzData(HttpServletRequest request,PageInfo pageInfo) {
|
ModelAndView modelAndView = new ModelAndView("/uc/question/ucquestionJxzData");
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
String cusId = WebUtil.getWebLoginUserCusId(request);
|
params.put("cusId", cusId);
|
PageInfo list = ucQuestionFacade.queryQuestionJxzList(pageInfo,params);
|
modelAndView.addObject("orderList", list);
|
return modelAndView;
|
}
|
|
|
|
/**
|
* 查询问题工单总数量
|
*/
|
@RequestMapping(value="ucquestionJxzCount.html",method=RequestMethod.POST)
|
public void questionJxzCount(HttpServletRequest request,HttpServletResponse response) {
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
String cusId = WebUtil.getWebLoginUserCusId(request);
|
params.put("cusId", cusId);
|
int count = ucQuestionFacade.queryQuestionJxzCount(params);
|
WebUtil.write(response, String.valueOf(count));
|
}
|
|
/**
|
* 问题待响应列表页面
|
* @param request
|
* @param response
|
* @return
|
*/
|
@RequestMapping(value="ucquestionEndList.html", method=RequestMethod.GET)
|
public ModelAndView questionEndList(HttpServletRequest request, HttpServletResponse response) {
|
ModelAndView view = new ModelAndView("/uc/question/ucquestionEndList");
|
//查询问题类型数据字典
|
List sources = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.QUESTION_SOURCE);
|
|
view.addObject("sources", sources);
|
|
//查询该加盟商的事件优先级
|
List<Map> eventPri = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.EVENT_PRI);
|
view.addObject("eventPri", eventPri);
|
//查询事件影响度数据字典
|
List<Map> eventDg = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.EVENT_EFFECT_DG);
|
view.addObject("eventDg", eventDg);
|
view.addObject("type", request.getParameter("type"));
|
|
return view;
|
}
|
|
|
|
/**
|
* 查询问题工单列表数据
|
*/
|
@RequestMapping(value="ucquestionEndData.html",method=RequestMethod.POST)
|
public ModelAndView questionEndData(HttpServletRequest request,PageInfo pageInfo) {
|
ModelAndView modelAndView = new ModelAndView("/uc/question/ucquestionEndData");
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
String cusId = WebUtil.getWebLoginUserCusId(request);
|
params.put("cusId", cusId);
|
PageInfo list = ucQuestionFacade.queryQuestionEndList(pageInfo,params);
|
modelAndView.addObject("orderList", list);
|
modelAndView.addObject("type", request.getParameter("type"));
|
return modelAndView;
|
}
|
|
|
|
/**
|
* 查询问题工单总数量
|
*/
|
@RequestMapping(value="ucquestionEndCount.html",method=RequestMethod.POST)
|
public void questionEndCount(HttpServletRequest request,HttpServletResponse response) {
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
String cusId = WebUtil.getWebLoginUserCusId(request);
|
params.put("cusId", cusId);
|
int count = ucQuestionFacade.queryQuestionEndCount(params);
|
WebUtil.write(response, String.valueOf(count));
|
}
|
|
/**
|
* 所有工单池
|
*/
|
@RequestMapping("ucquestionpool.html")
|
public ModelAndView orderpool(HttpServletRequest request,HttpServletResponse response) {
|
ModelAndView modelAndView = new ModelAndView("/uc/question/ucquestionpool");
|
String cusId = WebUtil.getWebLoginUserCusId(request);
|
//查询工单数量,通过类型判断查询那种类型的数量
|
Map msgCount = ucQuestionFacade.queryQuestionpoolCount(cusId);
|
|
System.out.println(JsonUtil.map2Json(msgCount));
|
|
modelAndView.addObject("c", msgCount);
|
//查询工单类型
|
Map<String, String> state = Constants.mapWORKFLOW_BASE_BUSINESS_TYPE;
|
List ways = new ArrayList();
|
for (Map.Entry<String, String> entry : state.entrySet()) {
|
String key = entry.getKey();
|
String value = entry.getValue();
|
Map map = new HashMap();
|
map.put("typeId", key);
|
map.put("typeName", value);
|
ways.add(map);
|
}
|
modelAndView.addObject("types", ways);
|
|
return modelAndView;
|
}
|
|
|
/**
|
* 查询我的工单池数据
|
*/
|
@RequestMapping("ucquestionpoolData.html")
|
public ModelAndView questionpoolData(HttpServletRequest request,PageInfo pageInfo) {
|
ModelAndView modelAndView = new ModelAndView("/uc/question/ucquestionPoolData");
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
String cusId = WebUtil.getWebLoginUserCusId(request);
|
params.put("cusId", cusId);
|
PageInfo orderList = ucQuestionFacade.questionpoolData(pageInfo,params);
|
|
modelAndView.addObject("orders", orderList);
|
return modelAndView;
|
}
|
|
/**
|
* 查询我的工单池数据
|
*/
|
@RequestMapping("ucquestionpoolCount.html")
|
public void questionpoolCount(HttpServletRequest request,HttpServletResponse response) {
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
String cusId = WebUtil.getWebLoginUserCusId(request);
|
params.put("cusId", cusId);
|
int count = ucQuestionFacade.questionpoolCount(params);
|
WebUtil.write(response, String.valueOf(count));
|
}
|
|
|
}
|