package cn.ksource.web.controller.uc; import java.io.File; import java.io.IOException; 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.beans.SC_PARTNER_CUSTOMER_INFO; import cn.ksource.beans.SC_WORKFLOW_INCIDENT; import cn.ksource.core.page.PageInfo; import cn.ksource.core.util.ConvertUtil; import cn.ksource.core.util.DateUtil; import cn.ksource.core.util.DownloadUtil; import cn.ksource.core.util.JsonUtil; import cn.ksource.core.util.NumberUtil; 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.UcIncidentFacade; import cn.ksource.web.service.DataDictionaryService; /** * 用户中心--事件管理控制器 * @note: * @version * @author sxj * @date July 15, 2016 10:35:44 AM */ @Controller @RequestMapping("/uc/ucincident") public class UcIncidentController { @Resource(name="ucIncidentFacade") private UcIncidentFacade ucIncidentFacade; @Autowired private DataDictionaryService dataDictionaryService; /** * 所有事件页面 * @param request * @param response * @return */ @RequestMapping(value="ucincidentList.html", method=RequestMethod.GET) public ModelAndView incidentList(HttpServletRequest request, HttpServletResponse response) { ModelAndView view = new ModelAndView("/uc/incident/ucincidentList"); String cusId = WebUtil.getWebLoginUserCusId(request); //查询工单数量,通过类型判断查询那种类型的数量 Map msgCount = ucIncidentFacade.queryIncidentCount(cusId); System.out.println(JsonUtil.map2Json(msgCount)); view.addObject("c", msgCount); //查询事件类型数据字典 List types = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.INCIDENT_TYPE); view.addObject("types", types); //查询该加盟商的事件优先级 List eventPri = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.EVENT_PRI); view.addObject("eventPri", eventPri); //查询事件影响度数据字典 List eventDg = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.EVENT_EFFECT_DG); view.addObject("eventDg", eventDg); return view; } /** * 跳转到服务目录 */ @RequestMapping("ucordersl.html") public ModelAndView serviceListTree(HttpServletRequest request,HttpServletResponse response) { ModelAndView view = new ModelAndView("/uc/incident/ucordersl"); String cusId = WebUtil.getWebLoginUserCusId(request); String sl = request.getParameter("sl"); Map trees = ucIncidentFacade.serviceListTree(cusId,sl); List tree = (List)trees.get("categoryList"); Map slMap = (Map)trees.get("slMap"); List checkSl = new ArrayList(); if(null!=slMap && slMap.size()>0) { for (Map.Entry entry : slMap.entrySet()) { String key = entry.getKey(); String value = entry.getValue(); Map map = new HashMap(); map.put("checkId", key); map.put("checkName", value); checkSl.add(map); } } view.addObject("trees", tree); view.addObject("checkSl", checkSl); return view; } /** * 查询工单列表 */ @RequestMapping(value="ucincidentData.html",method=RequestMethod.POST) public ModelAndView qdata(HttpServletRequest request,PageInfo pageInfo) { ModelAndView modelAndView = new ModelAndView("/uc/incident/ucincidentData"); Map params = ParamsMapUtil.getParameterMap(request); String cusId = WebUtil.getWebLoginUserCusId(request); params.put("cusId", cusId); PageInfo list = ucIncidentFacade.queryIncidentOrderList(pageInfo,params); modelAndView.addObject("orderList", list); return modelAndView; } /** * 查询工单总数量 */ @RequestMapping(value="ucincidentCount.html",method=RequestMethod.POST) public void qcount(HttpServletRequest request,HttpServletResponse response) { Map params = ParamsMapUtil.getParameterMap(request); String cusId = WebUtil.getWebLoginUserCusId(request); params.put("cusId", cusId); int count = ucIncidentFacade.queryIncidentOrderCount(params); WebUtil.write(response, String.valueOf(count)); } /** * 跳转到订单查看页面 */ @RequestMapping("ucincidentDetail.html") public ModelAndView incidentDetail(HttpServletRequest request,HttpServletResponse response) { ModelAndView modelAndView = new ModelAndView("/uc/incident/ucincidentDetail"); //查询事件基本信息 String orderId = request.getParameter("orderId"); String flowId = request.getParameter("flowId"); if(StringUtil.notEmpty(orderId) && !StringUtil.notEmpty(flowId)) { SC_WORKFLOW_INCIDENT incident = new SC_WORKFLOW_INCIDENT(orderId).getInstanceById(); flowId = incident.getFlow_id(); } //通过工单编号查询工单基本信息 Map baseMsg = ucIncidentFacade.queryIncidentBaseMsg(orderId); modelAndView.addObject("baseMsg", baseMsg); modelAndView.addObject("orderId", orderId); modelAndView.addObject("flowId", flowId); //查询要求响应时间和实际响应时间 long create_time = ConvertUtil.obj2Long(baseMsg.get("CREATE_TIME")); String answer_time = ConvertUtil.obj2StrBlank(baseMsg.get("ANSWER_TIME")); if(!StringUtil.notEmpty(answer_time)) { answer_time = DateUtil.getCurrentDate14().toString(); } String request_answer_time = ConvertUtil.obj2StrBlank(baseMsg.get("REQUEST_ANSWER_TIME")); String answer_timeout = ConvertUtil.obj2StrBlank(baseMsg.get("ANSWER_TIMEOUT")); //计算第一次响应时间和创建事件的事件差 将时间差转化为分钟 long seconds = DateUtil.getSecondsFormDate2Date(create_time, ConvertUtil.obj2Long(answer_time)); //将秒转化为分钟 double sjxysj = NumberUtil.div(ConvertUtil.obj2Double(seconds), ConvertUtil.obj2Double(60), 1); baseMsg.put("sjxysj", sjxysj); if(answer_timeout.equals("2")) { //计算时间走动长度 double a1 = NumberUtil.mul(ConvertUtil.obj2Double(seconds), ConvertUtil.obj2Double(250)); double a2 = NumberUtil.mul(ConvertUtil.obj2Double(request_answer_time), ConvertUtil.obj2Double(60)); double xyWidth = NumberUtil.div(a1, a2); if(xyWidth>250) { xyWidth = 250; baseMsg.put("ANSWER_TIMEOUT", 1); } baseMsg.put("xyWidth", xyWidth); } else { baseMsg.put("xyWidth", 250); } //处理超时操作 //1.判断当前工单有没有解决时间,如果有解决时间 说明已完成,如果没有解决时间 说明未完成 String resolveTime = ConvertUtil.obj2StrBlank(baseMsg.get("RESOLVE_TIME")); if(!StringUtil.notEmpty(resolveTime)) { resolveTime = DateUtil.getCurrentDate14().toString(); } //计算实际用了多长时间 String request_deal_time = ConvertUtil.obj2StrBlank(baseMsg.get("REQUEST_DEAL_TIME")); String deal_timeout = ConvertUtil.obj2StrBlank(baseMsg.get("DEAL_TIMEOUT")); //计算第解决时间和创建事件的事件差 将时间差转化为小时 long jjSeconds = DateUtil.getSecondsFormDate2Date(create_time, ConvertUtil.obj2Long(resolveTime)); //将秒转化为小时 double sjjjsj = NumberUtil.div(ConvertUtil.obj2Double(jjSeconds), ConvertUtil.obj2Double(3600), 2); baseMsg.put("sjjjsj", sjjjsj); if(deal_timeout.equals("2")) { //计算时间走动长度 double a1 = NumberUtil.mul(ConvertUtil.obj2Double(jjSeconds), ConvertUtil.obj2Double(250)); double a2 = NumberUtil.mul(ConvertUtil.obj2Double(request_deal_time), ConvertUtil.obj2Double(3600)); double jjWidth = NumberUtil.div(a1, a2); if(jjWidth>250) { jjWidth = 250; baseMsg.put("DEAL_TIMEOUT", 1); } baseMsg.put("jjWidth", jjWidth); } else { baseMsg.put("jjWidth", 250); } /*List lzs = incidentFacade.incidentLzRecord(flowId); modelAndView.addObject("lzs", lzs);*/ return modelAndView; } /** * 查看流转记录 */ @RequestMapping("viewLcRecord.html") public ModelAndView viewLcRecord(HttpServletRequest request) { ModelAndView modelAndView = new ModelAndView("/uc/incident/viewLcRecord"); String flowId = request.getParameter("flowId"); List lzs = ucIncidentFacade.incidentLzRecord(flowId); modelAndView.addObject("lzs", lzs); return modelAndView; } /** * 查看处理记录 */ @RequestMapping("viewRecord.html") public ModelAndView viewRecord(HttpServletRequest request,HttpServletResponse response) { ModelAndView modelAndView = new ModelAndView("/uc/incident/viewRecord"); String flowId = request.getParameter("flowId"); List records = new ArrayList(); if(StringUtil.notEmpty(flowId)) { records = ucIncidentFacade.queryDealRecord(flowId); System.out.println(JsonUtil.list2Json(records)); modelAndView.addObject("records",records); } return modelAndView; } /** * 查看关联设备 */ @RequestMapping("viewDevice.html") public ModelAndView viewDevice(HttpServletRequest request,HttpServletResponse response) { ModelAndView modelAndView = new ModelAndView("/uc/incident/viewDevice"); //查询关联设备 String orderId = request.getParameter("orderId"); String flowId = request.getParameter("flowId"); List devices = ucIncidentFacade.queryDevices(flowId); modelAndView.addObject("devices", devices); return modelAndView; } /** * 查看关联工单 */ @RequestMapping("viewOrder.html") public ModelAndView viewOrder(HttpServletRequest request,HttpServletResponse response) { ModelAndView modelAndView = new ModelAndView("/uc/incident/viewOrder"); //查询关联工单 String flowId = request.getParameter("flowId"); List orders = ucIncidentFacade.queryOrders(flowId); modelAndView.addObject("orders", orders); return modelAndView; } /** * 查询关联附件 */ @RequestMapping("viewFile.html") public ModelAndView viewFile(HttpServletRequest request,HttpServletResponse response) { ModelAndView modelAndView = new ModelAndView("/uc/incident/viewFile"); //查询所有的文档附件 String flowId = request.getParameter("flowId"); List files = ucIncidentFacade.queryFiles(flowId); modelAndView.addObject("files", files); return modelAndView; } /** * 工单完成时的事件处理报告 */ @RequestMapping("finishReport.html") public ModelAndView wcReport(HttpServletRequest request) { ModelAndView modelAndView = new ModelAndView("/uc/incident/finishReport"); String orderId = request.getParameter("orderId"); Map report = ucIncidentFacade.queryWcReport(orderId); modelAndView.addObject("report", report); return modelAndView; } /** * 工单关闭时的事件处理报告 */ @RequestMapping("closeReport.html") public ModelAndView closeReport(HttpServletRequest request) { ModelAndView modelAndView = new ModelAndView("/uc/incident/closeReport"); String orderId = request.getParameter("orderId"); Map report = ucIncidentFacade.queryCloseReport(orderId); modelAndView.addObject("report", report); return modelAndView; } /** * 下载文件 */ @RequestMapping("downloadFile.html") public void downloadFile(HttpServletRequest request,HttpServletResponse response) { String fileId = request.getParameter("fileId"); Map fileMsg = ucIncidentFacade.queryFileMsg(fileId); if(null!=fileMsg && fileMsg.size()>0) { String fileName = ConvertUtil.obj2StrBlank(fileMsg.get("FILE_NAME")); String filePath = ConvertUtil.obj2StrBlank(fileMsg.get("FILE_PATH")); String basePath = request.getSession().getServletContext().getRealPath(""); System.out.println("path------------------------>"+basePath+filePath); File file = new File(basePath+filePath); try { DownloadUtil.download(response, file, fileName, false); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } /** * 事件服务台首页 * @param model * @param request * @param response * @return */ @RequestMapping(value="ucIncidentManageIndex.html") public String ucIncidentManageIndex(Model model,HttpServletRequest request,HttpServletResponse response){ String cusId = WebUtil.getWebLoginUserCusId(request); if(StringUtil.isNotBlank(cusId)){ model.addAttribute("cusId", cusId); } return "/uc/incident/ucIncidentManageIndex"; } /** * 事件服务台首页明细加载 * @param model * @param request * @param response * @return */ @RequestMapping(value="ucIncidentManageIndexLoad.html") public String incidentManageIndexLoad(Model model,HttpServletRequest request,HttpServletResponse response){ String cusId = WebUtil.getWebLoginUserCusId(request); Map params = ParamsMapUtil.getParameterMap(request); params.put("cusId", cusId); //工单池数量 int poolCount = ucIncidentFacade.incidentpoolCount(params); //已超时 int timeoutCount = ucIncidentFacade.queryincidentTimeoutCount(params); //待处理数量 int pendingCount = ucIncidentFacade. queryincidentOrderNodeCount(params); //进行中数量 int inHandCount = ucIncidentFacade.queryincidentJxzCount(params); model.addAttribute("poolCount",poolCount); model.addAttribute("timeoutCount",timeoutCount); model.addAttribute("pendingCount",pendingCount); model.addAttribute("inHandCount",inHandCount); return "/uc/incident/ucIncidentManageIndexLoad"; } /** * 查询最近一月事件数量 * @param request * @param response */ @RequestMapping(value="getIncidentSumLineChart.html") public void getIncidentSumLineChart(HttpServletRequest request,HttpServletResponse response){ Map info = ucIncidentFacade.getLastMonthIncidentCount(request); WebUtil.write(response, JsonUtil.map2Json(info)); } /** * 查询最近一月事件级别分析 * @param request * @param response */ @RequestMapping(value="getIncidentLvPieChart.html") public void getIncidentLvPieChart(HttpServletRequest request,HttpServletResponse response){ Map info = ucIncidentFacade.getLastMonthIncidentLv(request); WebUtil.write(response, JsonUtil.map2Json(info)); } /** * 查询最近一月事件优先级分析 * @param request * @param response */ @RequestMapping(value="getIncidentPriPieChart.html") public void getIncidentPriPieChart(HttpServletRequest request,HttpServletResponse response){ Map info = ucIncidentFacade.getLastMonthIncidentPri(request); WebUtil.write(response, JsonUtil.map2Json(info)); } /** * 查询最近一月事件影响度分析 * @param request * @param response */ @RequestMapping(value="getIncidentEffectPieChart.html") public void getIncidentEffectPieChart(HttpServletRequest request,HttpServletResponse response){ Map info = ucIncidentFacade.getLastMonthIncidentEffect(request); //System.out.println("json--------------------------"+JsonUtil.map2Json(info)); WebUtil.write(response, JsonUtil.map2Json(info)); } /** * 查询最近一月服务目录事件数量 * @param request * @param response */ @RequestMapping(value="getIncidentServerLineChart.html") public void getIncidentServerLineChart(HttpServletRequest request,HttpServletResponse response){ Map info = ucIncidentFacade.getLastMonthIncidentServer(request); WebUtil.write(response, JsonUtil.map2Json(info)); } /** * 所有工单池 */ @RequestMapping("ucincidentpool.html") public ModelAndView incidentpool(HttpServletRequest request,HttpServletResponse response) { ModelAndView modelAndView = new ModelAndView("/uc/incident/ucincidentpool"); String cusId = WebUtil.getWebLoginUserCusId(request); //查询工单数量,通过类型判断查询那种类型的数量 Map msgCount = ucIncidentFacade.queryincidentpoolCount(cusId); System.out.println(JsonUtil.map2Json(msgCount)); modelAndView.addObject("c", msgCount); //查询工单类型 Map state = Constants.mapWORKFLOW_BASE_BUSINESS_TYPE; List ways = new ArrayList(); for (Map.Entry 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("ucincidentpoolData.html") public ModelAndView incidentpoolData(HttpServletRequest request,PageInfo pageInfo) { ModelAndView modelAndView = new ModelAndView("/uc/incident/ucincidentpoolData"); String cusId = WebUtil.getWebLoginUserCusId(request); Map params = ParamsMapUtil.getParameterMap(request); params.put("cusId", cusId); PageInfo orderList = ucIncidentFacade.incidentpoolData(pageInfo,params); modelAndView.addObject("orders", orderList); return modelAndView; } /** * 查询工单池数据 */ @RequestMapping("ucincidentpoolCount.html") public void incidentpoolCount(HttpServletRequest request,HttpServletResponse response) { String cusId = WebUtil.getWebLoginUserCusId(request); Map params = ParamsMapUtil.getParameterMap(request); params.put("cusId", cusId); int count = ucIncidentFacade.incidentpoolCount(params); WebUtil.write(response, String.valueOf(count)); } /** * 待响应列表页面 * @param request * @param response * @return */ @RequestMapping(value="ucincidentNodeList.html", method=RequestMethod.GET) public ModelAndView incidentNodeList(HttpServletRequest request, HttpServletResponse response) { ModelAndView view = new ModelAndView("/uc/incident/ucincidentNodeList"); String cusId = WebUtil.getWebLoginUserCusId(request); //查询工单数量,通过类型判断查询那种类型的数量 Map msgCount = ucIncidentFacade.queryincidentNodeCount(cusId); System.out.println(JsonUtil.map2Json(msgCount)); view.addObject("c", msgCount); //查询事件类型数据字典 List types = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.INCIDENT_TYPE); view.addObject("types", types); //查询该加盟商的事件优先级 List eventPri = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.EVENT_PRI); view.addObject("eventPri", eventPri); //查询事件影响度数据字典 List eventDg = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.EVENT_EFFECT_DG); view.addObject("eventDg", eventDg); return view; } /** * 查询工单列表数据 */ @RequestMapping(value="ucincidentNodeData.html",method=RequestMethod.POST) public ModelAndView incidentNodeData(HttpServletRequest request,PageInfo pageInfo) { ModelAndView modelAndView = new ModelAndView("/uc/incident/ucincidentNodeData"); String cusId = WebUtil.getWebLoginUserCusId(request); Map params = ParamsMapUtil.getParameterMap(request); params.put("cusId", cusId); PageInfo list = ucIncidentFacade.queryincidentOrderNodeList(pageInfo,params); modelAndView.addObject("orderList", list); return modelAndView; } /** * 查询工单总数量 */ @RequestMapping(value="ucincidentNodeCount.html",method=RequestMethod.POST) public void incidentNodeCount(HttpServletRequest request,HttpServletResponse response) { String cusId = WebUtil.getWebLoginUserCusId(request); Map params = ParamsMapUtil.getParameterMap(request); params.put("cusId", cusId); int count = ucIncidentFacade.queryincidentOrderNodeCount(params); WebUtil.write(response, String.valueOf(count)); } /** * 待响应列表页面 * @param request * @param response * @return */ @RequestMapping(value="ucincidentJxzList.html", method=RequestMethod.GET) public ModelAndView incidentJxzList(HttpServletRequest request, HttpServletResponse response) { ModelAndView view = new ModelAndView("/uc/incident/ucincidentJxzList"); String cusId = WebUtil.getWebLoginUserCusId(request); //查询工单数量,通过类型判断查询那种类型的数量 Map msgCount = ucIncidentFacade.queryincidentJxzNodeCount(cusId); System.out.println(JsonUtil.map2Json(msgCount)); view.addObject("c", msgCount); //查询事件类型数据字典 List types = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.INCIDENT_TYPE); view.addObject("types", types); //查询该加盟商的事件优先级 List eventPri = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.EVENT_PRI); view.addObject("eventPri", eventPri); //查询事件影响度数据字典 List eventDg = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.EVENT_EFFECT_DG); view.addObject("eventDg", eventDg); return view; } /** * 查询进行中工单列表数据 */ @RequestMapping(value="ucincidentJxzData.html",method=RequestMethod.POST) public ModelAndView incidentJxzData(HttpServletRequest request,PageInfo pageInfo) { ModelAndView modelAndView = new ModelAndView("/uc/incident/ucincidentJxzData"); String cusId = WebUtil.getWebLoginUserCusId(request); Map params = ParamsMapUtil.getParameterMap(request); params.put("cusId", cusId); PageInfo list = ucIncidentFacade.queryincidentJxzList(pageInfo,params); modelAndView.addObject("orderList", list); return modelAndView; } /** * 查询进行中工单总数量 */ @RequestMapping(value="ucincidentJxzCount.html",method=RequestMethod.POST) public void incidentJxzCount(HttpServletRequest request,HttpServletResponse response) { String cusId = WebUtil.getWebLoginUserCusId(request); Map params = ParamsMapUtil.getParameterMap(request); params.put("cusId", cusId); int count = ucIncidentFacade.queryincidentJxzCount(params); WebUtil.write(response, String.valueOf(count)); } /** * 已超时列表页面 * @param request * @param response * @return */ @RequestMapping(value="ucincidentTimeoutList.html", method=RequestMethod.GET) public ModelAndView incidentTimeoutList(HttpServletRequest request, HttpServletResponse response) { ModelAndView view = new ModelAndView("/uc/incident/ucincidentTimeoutList"); String cusId = WebUtil.getWebLoginUserCusId(request); //查询工单数量,通过类型判断查询那种类型的数量 Map msgCount = ucIncidentFacade.queryincidentTimeoutCount(cusId); System.out.println(JsonUtil.map2Json(msgCount)); view.addObject("c", msgCount); //查询事件类型数据字典 List types = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.INCIDENT_TYPE); view.addObject("types", types); //查询该加盟商的事件优先级 List eventPri = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.EVENT_PRI); view.addObject("eventPri", eventPri); //查询事件影响度数据字典 List eventDg = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.EVENT_EFFECT_DG); view.addObject("eventDg", eventDg); return view; } /** * 已超时工单列表数据 */ @RequestMapping(value="ucincidentTimeoutData.html",method=RequestMethod.POST) public ModelAndView incidentTimeoutData(HttpServletRequest request,PageInfo pageInfo) { ModelAndView modelAndView = new ModelAndView("/uc/incident/ucincidentTimeoutData"); String cusId = WebUtil.getWebLoginUserCusId(request); Map params = ParamsMapUtil.getParameterMap(request); params.put("cusId", cusId); PageInfo list = ucIncidentFacade.queryincidentTimeoutList(pageInfo,params); modelAndView.addObject("orderList", list); return modelAndView; } /** * 查询已超时工单总数量 */ @RequestMapping(value="ucincidentTimeoutCount.html",method=RequestMethod.POST) public void incidentTimeoutCount(HttpServletRequest request,HttpServletResponse response) { String cusId = WebUtil.getWebLoginUserCusId(request); Map params = ParamsMapUtil.getParameterMap(request); params.put("cusId", cusId); int count = ucIncidentFacade.queryincidentTimeoutCount(params); WebUtil.write(response, String.valueOf(count)); } /** * 问题待响应列表页面 * @param request * @param response * @return */ @RequestMapping(value="ucincidentEndList.html", method=RequestMethod.GET) public ModelAndView incidentEndList(HttpServletRequest request, HttpServletResponse response) { ModelAndView view = new ModelAndView("/uc/incident/ucincidentEndList"); //查询事件类型数据字典 List types = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.INCIDENT_TYPE); view.addObject("types", types); //查询该加盟商的事件优先级 List eventPri = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.EVENT_PRI); view.addObject("eventPri", eventPri); //查询事件影响度数据字典 List eventDg = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.EVENT_EFFECT_DG); view.addObject("eventDg", eventDg); view.addObject("type", request.getParameter("type")); return view; } /** * 查询问题工单列表数据 */ @RequestMapping(value="ucincidentEndData.html",method=RequestMethod.POST) public ModelAndView incidentEndData(HttpServletRequest request,PageInfo pageInfo) { ModelAndView modelAndView = new ModelAndView("/uc/incident/ucincidentEndData"); String cusId = WebUtil.getWebLoginUserCusId(request); Map params = ParamsMapUtil.getParameterMap(request); params.put("cusId", cusId); PageInfo list = ucIncidentFacade.queryincidentEndList(pageInfo,params); modelAndView.addObject("orderList", list); modelAndView.addObject("type", request.getParameter("type")); return modelAndView; } /** * 查询问题工单总数量 */ @RequestMapping(value="ucincidentEndCount.html",method=RequestMethod.POST) public void incidentEndCount(HttpServletRequest request,HttpServletResponse response) { String cusId = WebUtil.getWebLoginUserCusId(request); Map params = ParamsMapUtil.getParameterMap(request); params.put("cusId", cusId); int count = ucIncidentFacade.queryincidentEndCount(params); WebUtil.write(response, String.valueOf(count)); } /** * 跳转到当前客户的子客户页面 */ @RequestMapping("ucsubCus.html") public ModelAndView subCus(HttpServletRequest request,HttpServletResponse response) { ModelAndView modelAndView = new ModelAndView("/uc/incident/ucsubCus"); String customerId = WebUtil.getWebLoginUser(request).getCustomerId(); String subCustomerId = request.getParameter("subCustomerId"); Map result = ucIncidentFacade.querySubCus(customerId,subCustomerId); List customers = (List)result.get("subs"); List checkSl = (List)result.get("checks"); //查询当前客户 Map currCus = new SC_PARTNER_CUSTOMER_INFO(customerId).getBeanMapById(); if(subCustomerId.equals(customerId)){ currCus.put("checked", 1); Map map = new HashMap(); map.put("checkId", currCus.get("ID")); map.put("checkName", currCus.get("CUSTOMER_NAME")); checkSl.add(map); } modelAndView.addObject("customers", customers); modelAndView.addObject("checkSl", checkSl); modelAndView.addObject("currCus", currCus); return modelAndView; } }