package cn.ksource.web.controller.business.pages.incident;
|
|
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 cn.ksource.web.service.message.MessageService;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Controller;
|
import org.springframework.ui.Model;
|
import org.springframework.web.bind.annotation.PathVariable;
|
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_SERVCE_CATEGORY;
|
import cn.ksource.beans.SC_WORKFLOW_INCIDENT;
|
import cn.ksource.beans.WORKFLOW_BASE;
|
import cn.ksource.core.page.PageInfo;
|
import cn.ksource.core.util.ConvertUtil;
|
import cn.ksource.core.util.DateUtil;
|
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.SysInfo;
|
import cn.ksource.core.web.SysInfoMsg;
|
import cn.ksource.core.web.WebUtil;
|
import cn.ksource.web.Constants;
|
import cn.ksource.web.facade.customermanage.CustomerManageFacade;
|
import cn.ksource.web.facade.incident.IncidentFacade;
|
import cn.ksource.web.facade.order.OrderFacade;
|
import cn.ksource.web.service.DataDictionaryService;
|
/**
|
* 日常运维--事件管理控制器
|
* @note:
|
* @version
|
* @author sxj
|
* @date June 28, 2016 10:35:44 AM
|
*/
|
@Controller
|
@RequestMapping("/business/pages/incident")
|
public class IncidentController {
|
|
@Autowired
|
private IncidentFacade incidentFacade;
|
|
@Autowired
|
private MessageService messageService;
|
|
@Autowired
|
private DataDictionaryService dataDictionaryService;
|
|
@Autowired
|
private OrderFacade orderFacade;
|
|
@Resource
|
private CustomerManageFacade customerFacade;
|
|
/**
|
* 服务台创建事件页面
|
* @param request
|
* @param response
|
* @return
|
*/
|
@RequestMapping(value="addIncidentForDesk", method=RequestMethod.GET)
|
public ModelAndView addIncidentForService(HttpServletRequest request, HttpServletResponse response) {
|
ModelAndView view = new ModelAndView("/business/pages/incident/addIncidentForDesk");
|
|
//查询事件类型数据字典
|
List<Map> types = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.INCIDENT_TYPE);
|
//取得事件类型的第一条数据
|
if(null!=types && types.size()>0) {
|
Map type = types.get(0);
|
view.addObject("typeId", type.get("DATAKEY"));
|
view.addObject("typeName", type.get("DATAVALUE"));
|
}
|
//查询申报方式数据字典
|
List<Map> ways = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.INCIDENT_APPLY_TYPE);
|
//取得申报方式的第一条数据
|
if(null!=ways && ways.size()>0) {
|
Map way = ways.get(0);
|
view.addObject("wayId", way.get("DATAKEY"));
|
view.addObject("wayName", way.get("DATAVALUE"));
|
}
|
//查询事件来源数据字典
|
List<Map> froms = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.INCIDENT_SOURCE);
|
//取得事件来源的第一条数据
|
if(null!=froms && froms.size()>0) {
|
Map from = froms.get(0);
|
view.addObject("fromId", from.get("DATAKEY"));
|
view.addObject("fromName", from.get("DATAVALUE"));
|
}
|
|
//查询事件优先级
|
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("types", types);
|
view.addObject("ways", ways);
|
view.addObject("froms", froms);
|
|
//客户列表
|
List<Map> cusList = incidentFacade.getCustomerList();
|
view.addObject("customers", cusList);
|
Long currentTime = DateUtil.getCurrentDate14();
|
view.addObject("start_time", currentTime);
|
|
//定义参数Map
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
params.put("userId", WebUtil.getLoginedUserId(request));
|
params.put("type","1");
|
Map map = incidentFacade.getOrderNum(params);
|
view.addObject("data", map);
|
return view;
|
}
|
|
/**
|
* 通过服务目录查询所有的分配人员
|
*/
|
@RequestMapping("users.html")
|
public ModelAndView queryUsers(HttpServletRequest request,HttpServletResponse response) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/users");
|
//查询所有的服务目录指定人员,所有客服人员,所有远程技术支持人员,所有一线技术支持,所有二线技术支持,所有三线技术支持
|
String serviceListId = request.getParameter("serivceListId");
|
|
String flowId = request.getParameter("flowId");
|
|
String customerId = request.getParameter("customerId");
|
|
Map users = new HashMap();
|
if(StringUtil.notEmpty(serviceListId) && serviceListId.split("-").length==3 && StringUtil.notEmpty(customerId)) {
|
users = incidentFacade.users(serviceListId.split("-")[2],flowId,customerId);
|
}
|
modelAndView.addObject("user", users);
|
return modelAndView;
|
}
|
|
/**
|
* 跳转到关联设备信息页面
|
*/
|
@RequestMapping("linkDevice.html")
|
public ModelAndView linkDevice(HttpServletRequest request) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/linkDevice");
|
String ciIds = request.getParameter("ciIds");
|
|
String customerid = request.getParameter("customerid");
|
String subCustomerId = request.getParameter("subCustomerId");
|
String subCustomerName = incidentFacade.getCustomerName(customerid,subCustomerId);
|
modelAndView.addObject("subCustomerName", subCustomerName);
|
modelAndView.addObject("ciIds", ciIds);
|
return modelAndView;
|
}
|
|
|
/**
|
* 跳转到处理事件的关联工单页面
|
*/
|
@RequestMapping("dealLinkDevice.html")
|
public ModelAndView dealLinkDevice(HttpServletRequest request) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/dealLinkDevice");
|
String flowId = request.getParameter("flowId");
|
List<Map> devices = incidentFacade.queryDevices(flowId);
|
if(null!=devices && devices.size()>0) {
|
StringBuilder builder = new StringBuilder();
|
for(Map device : devices) {
|
String ciId = ConvertUtil.obj2StrBlank(device.get("ID"));
|
builder.append(ciId).append("-");
|
}
|
builder.deleteCharAt(builder.length()-1);
|
String ciIds = builder.toString();
|
modelAndView.addObject("ciIds", ciIds);
|
}
|
|
WORKFLOW_BASE base = new WORKFLOW_BASE(flowId).getInstanceById();
|
modelAndView.addObject("customerid", base.getCustomer_id());
|
modelAndView.addObject("subCustomerId", base.getSub_customer_id());
|
|
return modelAndView;
|
}
|
|
|
|
/**
|
* 查询关联设备
|
*/
|
@RequestMapping("deviceList.html")
|
public ModelAndView deviceList(HttpServletRequest request) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/deviceList");
|
|
|
List devices = incidentFacade.queryLinkDevice(request);
|
modelAndView.addObject("devices", devices);
|
return modelAndView;
|
}
|
|
/**
|
* 查询关联工单
|
*/
|
@RequestMapping("linkOrder.html")
|
public ModelAndView linkOrder(HttpServletRequest request) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/linkOrder");
|
|
List<Map> list=new ArrayList<Map>();
|
for(String key : Constants.mapWORKFLOW_BASE_BUSINESS_TYPE.keySet()){
|
Map map=new HashMap();
|
map.put("id",key);
|
map.put("text",Constants.mapWORKFLOW_BASE_BUSINESS_TYPE.get(key));
|
list.add(map);
|
}
|
modelAndView.addObject("businessTypes", list);
|
|
return modelAndView;
|
}
|
|
|
/**
|
* 查询关联工单
|
*/
|
@RequestMapping("orderList.html")
|
public ModelAndView orderList(HttpServletRequest request) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/orderList");
|
List orders = incidentFacade.queryLinkOrder(request);
|
modelAndView.addObject("orders", orders);
|
return modelAndView;
|
}
|
|
|
/**
|
* 服务台创建事件提交
|
* @param request
|
* @param response
|
* @return
|
*/
|
@RequestMapping(value="addIncidentForDesk.html", method=RequestMethod.POST)
|
public ModelAndView addIncidentForDeskSubmit(HttpServletRequest request, HttpServletResponse response,SC_WORKFLOW_INCIDENT sc_workflow_incident) {
|
Map map = incidentFacade.saveIncident(request,sc_workflow_incident);
|
String result = ConvertUtil.obj2StrBlank(map.get("result"));
|
String nouser = ConvertUtil.obj2StrBlank(map.get("nouser"));
|
String incidentId = ConvertUtil.obj2StrBlank(map.get("incidentId"));
|
|
SysInfoMsg msg = (SysInfoMsg)map.get("msg");
|
String type = request.getParameter("type");
|
if(result.equals("1")) {
|
if(type.equals("1")) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/success");
|
modelAndView.addObject("type", type);
|
modelAndView.addObject("incidentId", incidentId);
|
modelAndView.addObject("sysInfo", "Success");
|
modelAndView.addObject("message", "操作成功");
|
modelAndView.addObject("info", msg);
|
return modelAndView;
|
} else if (type.equals("2")) {
|
ModelAndView modelAndView = new ModelAndView("redirect:/business/pages/incident/endTask.html?incidentId="+incidentId);
|
return modelAndView;
|
} else if (type.equals("3")) {
|
ModelAndView modelAndView = new ModelAndView("redirect:/business/pages/incident/closeReason.html?incidentId="+incidentId);
|
return modelAndView;
|
}
|
}else{
|
if(nouser.equals("1")){
|
return WebUtil.sysInfoPage(request, "分派的组/角色下没有人员",
|
"",
|
SysInfo.Error,"");
|
}else{
|
return WebUtil.sysInfoPage(request, "操作失败!",
|
"",
|
SysInfo.Error,"");
|
}
|
}
|
return null;
|
}
|
|
/**
|
* 跳转到填写结局方案页面
|
*/
|
@RequestMapping(value="endTask.html",method=RequestMethod.GET)
|
public ModelAndView endTask(HttpServletRequest request,HttpServletResponse response) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/endTask");
|
|
//查询解决方式数据字典
|
List ways = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.RESOLVE_WAY);
|
modelAndView.addObject("ways", ways);
|
|
return modelAndView;
|
}
|
|
/**
|
* 结果方案提交
|
*/
|
@RequestMapping(value="endTask.html",method=RequestMethod.POST)
|
public ModelAndView doEndTask(HttpServletRequest request,HttpServletResponse response) {
|
incidentFacade.doEndTask(request);
|
String orderId = request.getParameter("incidentId");
|
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/rechange");
|
modelAndView.addObject("orderId", orderId);
|
modelAndView.addObject("bustype", Constants.WORKFLOW_BASE_BUSINESS_TYPE_INCIDENT);
|
|
return modelAndView;
|
}
|
|
/**
|
* 跳转到填写结局方案页面
|
*/
|
@RequestMapping(value="rechange.html",method=RequestMethod.GET)
|
public ModelAndView rechange(HttpServletRequest request,HttpServletResponse response) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/rechange");
|
|
|
return modelAndView;
|
}
|
|
/**
|
* 结果方案提交
|
*/
|
@RequestMapping(value="rechange.html",method=RequestMethod.POST)
|
public ModelAndView rechangesubmit(HttpServletRequest request,HttpServletResponse response) {
|
return WebUtil.sysInfoPage(request, "操作成功!",
|
"window.top.hideDialog('6');",
|
SysInfo.Success,"/business/pages/incident/myIncident.html",null);
|
|
|
}
|
|
|
|
/**
|
* 跳转到关闭原因界面
|
*/
|
@RequestMapping("closeReason.html")
|
public ModelAndView closeReason(HttpServletRequest request,HttpServletResponse response) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/closeReason");
|
//查询关闭原因数据字典
|
List reasons = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.CLOSE_REASON);
|
modelAndView.addObject("reasons", reasons);
|
return modelAndView;
|
}
|
|
|
/**
|
* 关闭事件提交
|
*/
|
@RequestMapping(value="closeReason.html",method=RequestMethod.POST)
|
public ModelAndView doCloseReason(HttpServletRequest request,HttpServletResponse response) {
|
incidentFacade.doCloseReason(request);
|
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/success");
|
modelAndView.addObject("type", 1);
|
modelAndView.addObject("sysInfo", "Success");
|
modelAndView.addObject("message", "操作成功");
|
return modelAndView;
|
|
}
|
|
|
/**
|
* 选择重复事件
|
*/
|
@RequestMapping("selectIncident.html")
|
public ModelAndView selectIncident(HttpServletRequest request,HttpServletResponse response) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/selectIncident");
|
|
String incidentId = request.getParameter("incidentId");
|
|
modelAndView.addObject("incidentId", incidentId);
|
return modelAndView;
|
}
|
|
/**
|
* 所有事件页面
|
* @param request
|
* @param response
|
* @return
|
*/
|
@RequestMapping(value="incidentList.html", method=RequestMethod.GET)
|
public ModelAndView incidentList(HttpServletRequest request, HttpServletResponse response) {
|
ModelAndView view = new ModelAndView("/business/pages/incident/incidentList");
|
|
//查询工单数量,通过类型判断查询那种类型的数量
|
Map msgCount = incidentFacade.queryIncidentCount(request);
|
|
System.out.println(JsonUtil.map2Json(msgCount));
|
|
view.addObject("c", msgCount);
|
|
|
//查询事件类型数据字典
|
List types = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.INCIDENT_TYPE);
|
|
view.addObject("types", types);
|
//查询该加盟商的事件优先级
|
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);
|
//客户列表
|
List<Map> cusList = incidentFacade.getCustomerList();
|
view.addObject("customers", cusList);
|
|
//定义参数Map
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
params.put("userId", WebUtil.getLoginedUserId(request));
|
params.put("type","1");
|
Map map = incidentFacade.getOrderNum(params);
|
view.addObject("data", map);
|
return view;
|
}
|
|
|
|
/**
|
* 查询工单列表
|
*/
|
@RequestMapping(value="incidentData.html",method=RequestMethod.POST)
|
public ModelAndView qdata(HttpServletRequest request,PageInfo pageInfo) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/incidentData");
|
//定义参数Map
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
PageInfo info = incidentFacade.queryIncidentOrderList(pageInfo,params);
|
modelAndView.addObject("orderList", info);
|
return modelAndView;
|
}
|
|
|
|
/**
|
* 查询工单总数量
|
*/
|
@RequestMapping(value="incidentCount.html",method=RequestMethod.POST)
|
public void qcount(HttpServletRequest request,HttpServletResponse response) {
|
//定义参数Map
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
int count = incidentFacade.queryIncidentOrderCount(params);
|
WebUtil.write(response, String.valueOf(count));
|
}
|
|
/**
|
* 跳转到我的事件列表
|
*/
|
@RequestMapping("myIncident.html")
|
public ModelAndView myIncident(HttpServletRequest request) {
|
ModelAndView view = new ModelAndView("/business/pages/incident/myIncident");
|
|
Map num = orderFacade.queryOrderCountByCate(request, Constants.WORKFLOW_BASE_BUSINESS_TYPE_INCIDENT.toString());
|
|
view.addObject("num", num);
|
|
|
//查询事件类型数据字典
|
List types = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.INCIDENT_TYPE);
|
|
view.addObject("types", types);
|
//查询该加盟商的事件优先级
|
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);
|
//客户列表
|
List<Map> cusList = incidentFacade.getCustomerList();
|
view.addObject("customers", cusList);
|
|
//定义参数Map
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
params.put("userId", WebUtil.getLoginedUserId(request));
|
params.put("type","2");
|
Map map = incidentFacade.getOrderNum(params);
|
|
view.addObject("data", map);
|
return view;
|
}
|
|
|
/**
|
* 查询我的事件列表
|
*/
|
@RequestMapping("myIncidentData.html")
|
public ModelAndView myIncidentData(HttpServletRequest request,PageInfo pageInfo) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/myIncidentData");
|
//定义参数Map
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
params.put("userId", WebUtil.getLoginedUserId(request));
|
PageInfo info = incidentFacade.queryMyIncidentData(pageInfo,params);
|
modelAndView.addObject("orders", info);
|
return modelAndView;
|
}
|
|
/**
|
* 查询我的事件数量
|
*/
|
@RequestMapping("myIncidentCount.html")
|
public void myIncidentCount(HttpServletRequest request,HttpServletResponse response) {
|
//定义参数Map
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
params.put("userId", WebUtil.getLoginedUserId(request));
|
int count = incidentFacade.queryMyIncidentCount(params);
|
WebUtil.write(response, String.valueOf(count));
|
}
|
|
/**
|
* 所有工单池
|
*/
|
@RequestMapping("incidentpool.html")
|
public ModelAndView incidentpool(HttpServletRequest request,HttpServletResponse response) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/incidentpool");
|
//查询工单数量,通过类型判断查询那种类型的数量
|
Map msgCount = incidentFacade.queryincidentpoolCount(request);
|
|
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);
|
//客户列表
|
List<Map> cusList = incidentFacade.getCustomerList();
|
modelAndView.addObject("customers", cusList);
|
|
//定义参数Map
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
params.put("type","1");
|
Map map = incidentFacade.getOrderNum(params);
|
|
modelAndView.addObject("data", map);
|
|
return modelAndView;
|
}
|
|
|
/**
|
* 查询工单池数据
|
*/
|
@RequestMapping("incidentpoolData.html")
|
public ModelAndView incidentpoolData(HttpServletRequest request,PageInfo pageInfo) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/incidentpoolData");
|
//定义参数Map
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
PageInfo orderList = incidentFacade.incidentpoolData(pageInfo,params);
|
|
modelAndView.addObject("orders", orderList);
|
return modelAndView;
|
}
|
|
/**
|
* 查询工单池数据
|
*/
|
@RequestMapping("incidentpoolCount.html")
|
public void incidentpoolCount(HttpServletRequest request,HttpServletResponse response) {
|
//定义参数Map
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
int count = incidentFacade.incidentpoolCount(params);
|
WebUtil.write(response, String.valueOf(count));
|
}
|
|
/**
|
* 跳转到我的工单池页面
|
*/
|
@RequestMapping("myincidentpool.html")
|
public ModelAndView myincidentpool(HttpServletRequest request,HttpServletResponse response) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/myincidentpool");
|
String type = request.getParameter("type");
|
//查询工单数量,通过类型判断查询那种类型的数量
|
Map msgCount = incidentFacade.querymyincidentpoolCount(request);
|
|
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);
|
if(key.equals(type)) {
|
map.put("checked", 1);
|
} else {
|
map.put("checked", 2);
|
}
|
ways.add(map);
|
}
|
modelAndView.addObject("types", ways);
|
//客户列表
|
List<Map> cusList = incidentFacade.getCustomerList();
|
modelAndView.addObject("customers", cusList);
|
|
//定义参数Map
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
params.put("userId", WebUtil.getLoginedUserId(request));
|
params.put("type","2");
|
Map map = incidentFacade.getOrderNum(params);
|
modelAndView.addObject("data", map);
|
return modelAndView;
|
}
|
|
/**
|
* 查询我的工单池数据
|
*/
|
@RequestMapping("myincidentpoolData.html")
|
public ModelAndView myincidentpoolData(HttpServletRequest request,PageInfo pageInfo) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/myincidentpoolData");
|
//定义参数Map
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
params.put("userId", WebUtil.getLoginedUserId(request));
|
PageInfo orderList = incidentFacade.myincidentpoolData(pageInfo,params);
|
|
modelAndView.addObject("orders", orderList);
|
return modelAndView;
|
}
|
|
/**
|
* 查询我的工单池数据
|
*/
|
@RequestMapping("myincidentpoolCount.html")
|
public void myincidentpoolCount(HttpServletRequest request,HttpServletResponse response) {
|
//定义参数Map
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
params.put("userId", WebUtil.getLoginedUserId(request));
|
int count = incidentFacade.myincidentpoolCount(params);
|
WebUtil.write(response, String.valueOf(count));
|
}
|
|
|
/**
|
* 跳转到事件流转记录页面
|
*/
|
@RequestMapping("lcRecord.html")
|
public ModelAndView lczRecord(HttpServletRequest request) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/lcRecord");
|
String flowId = request.getParameter("flowId");
|
List<Map> lzs = incidentFacade.incidentLzRecord(flowId);
|
modelAndView.addObject("lzs", lzs);
|
return modelAndView;
|
}
|
|
|
/**
|
* 跳转到工单处理页面
|
* @param request
|
* @return
|
*/
|
@RequestMapping("incidentDeal.html")
|
public ModelAndView incidentDeal(HttpServletRequest request) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/incidentDeal");
|
|
//查询事件基本信息
|
String orderId = request.getParameter("orderId");
|
String flowId = request.getParameter("flowId");
|
|
//通过工单编号查询工单基本信息
|
Map baseMsg = incidentFacade.queryIncidentBaseMsg(orderId);
|
|
modelAndView.addObject("baseMsg", baseMsg);
|
modelAndView.addObject("orderId", orderId);
|
modelAndView.addObject("flowId", flowId);
|
|
|
//List<Map> lzs = incidentFacade.incidentLzRecord(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(150));
|
double a2 = NumberUtil.mul(ConvertUtil.obj2Double(request_answer_time), ConvertUtil.obj2Double(60));
|
|
double xyWidth = NumberUtil.div(a1, a2);
|
if(xyWidth>150) {
|
xyWidth = 150;
|
baseMsg.put("ANSWER_TIMEOUT", 1);
|
}
|
baseMsg.put("xyWidth", xyWidth);
|
} else {
|
baseMsg.put("xyWidth", 150);
|
}
|
|
|
|
//处理超时操作
|
//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(150));
|
double a2 = NumberUtil.mul(ConvertUtil.obj2Double(request_deal_time), ConvertUtil.obj2Double(3600));
|
|
double jjWidth = NumberUtil.div(a1, a2);
|
if(jjWidth>150) {
|
jjWidth = 150;
|
baseMsg.put("DEAL_TIMEOUT", 1);
|
}
|
baseMsg.put("jjWidth", jjWidth);
|
} else {
|
baseMsg.put("jjWidth", 150);
|
}
|
|
|
//modelAndView.addObject("lzs", lzs);
|
return modelAndView;
|
}
|
|
/**
|
* 工单确认
|
*/
|
@RequestMapping("orderConfirm.html")
|
public ModelAndView orderConfirm(HttpServletRequest request,HttpServletResponse response) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/orderConfirm");
|
String incidentId = request.getParameter("incidentId");
|
Map incident = new SC_WORKFLOW_INCIDENT(incidentId).getBeanMapById();
|
modelAndView.addObject("incident", incident);
|
return modelAndView;
|
}
|
|
/**
|
* 执行工单确认
|
*/
|
@RequestMapping("doConfirm.html")
|
public void doConfirm(HttpServletRequest request,HttpServletResponse response) {
|
|
String result = incidentFacade.doOrderConfirm(request);
|
WebUtil.write(response, result);
|
}
|
|
|
/**
|
* 查询事件基本信息
|
*/
|
@RequestMapping("incidentBaseMsg.html")
|
public ModelAndView incidentBaseMsg(HttpServletRequest request) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/incidentBaseMsg");
|
String orderId = request.getParameter("orderId");
|
//通过工单编号查询工单基本信息
|
Map baseMsg = incidentFacade.queryIncidentBaseMsg(orderId);
|
|
modelAndView.addObject("baseMsg", baseMsg);
|
return modelAndView;
|
}
|
|
/**
|
* 跳转编辑事件基本信息页面
|
*/
|
@RequestMapping("editIncident.html")
|
public ModelAndView editIncident(HttpServletRequest request,HttpServletResponse response) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/editIncident");
|
String id = request.getParameter("id");
|
Map baseMsg = incidentFacade.queryIncidentBaseMsg(id);
|
|
//查询事件类型数据字典
|
List types = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.INCIDENT_TYPE);
|
//查询申报方式数据字典
|
List ways = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.INCIDENT_APPLY_TYPE);
|
//查询事件来源数据字典
|
List froms = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.INCIDENT_SOURCE);
|
|
|
//查询事件优先级
|
List<Map> eventPri = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.EVENT_PRI);
|
modelAndView.addObject("eventPri", eventPri);
|
//查询事件影响度数据字典
|
List<Map> eventDg = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.EVENT_EFFECT_DG);
|
modelAndView.addObject("eventDg", eventDg);
|
|
|
//查询该加盟商的事件影响力
|
|
modelAndView.addObject("types", types);
|
modelAndView.addObject("ways", ways);
|
modelAndView.addObject("froms", froms);
|
|
modelAndView.addObject("baseMsg", baseMsg);
|
|
return modelAndView;
|
}
|
|
/**
|
* 执行事件基本信息操作功能
|
*/
|
@RequestMapping(value="updateIncident.html",method=RequestMethod.POST)
|
public ModelAndView updateIncident(HttpServletRequest request,HttpServletResponse response,SC_WORKFLOW_INCIDENT incident) {
|
String id = request.getParameter("id");
|
String result = incidentFacade.updateIncidentMsg(request,incident);
|
return WebUtil.sysInfoPage(request, "操作成功!",
|
"window.top.location.reload(true);",
|
SysInfo.Success,"");
|
}
|
|
|
|
/**
|
* 查询事件处理记录
|
*/
|
@RequestMapping("dealRecord.html")
|
public ModelAndView dealRecord(HttpServletRequest request,HttpServletResponse response) {
|
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/dealRecord");
|
|
return modelAndView;
|
}
|
|
/**
|
* 查询事件处理记录
|
*/
|
@RequestMapping("recordData.html")
|
public ModelAndView queryRecord(HttpServletRequest request,HttpServletResponse response) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/recordData");
|
String flowId = request.getParameter("flowId");
|
List records = new ArrayList();
|
if(StringUtil.notEmpty(flowId)) {
|
records = incidentFacade.queryDealRecord(flowId);
|
System.out.println(JsonUtil.list2Json(records));
|
modelAndView.addObject("records",records);
|
}
|
|
String userId = WebUtil.getLoginedUserId(request);
|
modelAndView.addObject("userId", userId);
|
|
return modelAndView;
|
}
|
|
|
|
/**
|
* 添加事件处理记录
|
*/
|
@RequestMapping(value="addRecord.html",method=RequestMethod.GET)
|
public ModelAndView addRecord(HttpServletRequest request) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/addRecord");
|
|
String recordId = request.getParameter("recordId");
|
|
Map record = new HashMap();
|
if(StringUtil.notEmpty(recordId)) {
|
record = incidentFacade.queryRecord(recordId);
|
String deal_content=ConvertUtil.obj2StrBlank(record.get("DEAL_CONTENT"));
|
record.put("DEAL_CONTENT",deal_content.replace("增加记录:",""));
|
}
|
|
modelAndView.addObject("record", record);
|
return modelAndView;
|
}
|
|
|
/**
|
* 保存处理记录
|
*/
|
@RequestMapping(value="addRecord.html",method=RequestMethod.POST)
|
public ModelAndView saveRecord(HttpServletRequest request,HttpServletResponse response) {
|
String recordId = request.getParameter("recordId");
|
if(StringUtil.notEmpty(recordId)) {
|
//更新操作
|
boolean result = incidentFacade.updateRecord(request);
|
} else {
|
//新增操作
|
boolean result = incidentFacade.saveRecord(request);
|
}
|
return WebUtil.sysInfoPage(request, "操作成功!",
|
"window.top.document.getElementById('recordIframe').contentWindow.queryRecord();window.top.hideDialog('0');",
|
SysInfo.Success,"");
|
}
|
|
|
/**
|
* 删除处理记录
|
*/
|
@RequestMapping("delRecord.html")
|
public void delRecord(HttpServletRequest request,HttpServletResponse response) {
|
boolean result = incidentFacade.deleteRecord(request);
|
String flag = "1";
|
if(!result) {
|
flag = "2";
|
}
|
WebUtil.write(response, flag);
|
}
|
|
/**
|
* 查询关联设备
|
*/
|
@RequestMapping("devices.html")
|
public ModelAndView devices(HttpServletRequest request,HttpServletResponse response) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/devices");
|
|
//查询关联设备
|
String orderId = request.getParameter("orderId");
|
String flowId = request.getParameter("flowId");
|
|
List devices = incidentFacade.queryDevices(flowId);
|
modelAndView.addObject("devices", devices);
|
|
modelAndView.addObject("orderId", orderId);
|
modelAndView.addObject("flowId", flowId);
|
String type=request.getParameter("type");
|
if(StringUtil.notEmpty(type)){
|
modelAndView.addObject("type",type);
|
}
|
return modelAndView;
|
}
|
|
/**
|
* 保存关联设备
|
*/
|
@RequestMapping("saveLinkDevices.html")
|
public void saveLinkDevices(HttpServletRequest request,HttpServletResponse response) {
|
String deviceIds = request.getParameter("deviceIds");
|
boolean result = false;
|
if(StringUtil.notEmpty(deviceIds)) {
|
String flowId = request.getParameter("flowId");
|
result = incidentFacade.addLinkDeivces(flowId, deviceIds.split(","));
|
}
|
WebUtil.write(response, result?"1":"2");
|
|
}
|
|
/**
|
* 删除关联设备
|
*/
|
@RequestMapping("delLinkDevice.html")
|
public void delLinkDevice(HttpServletRequest request,HttpServletResponse response) {
|
String linkId = request.getParameter("linkId");
|
boolean result = incidentFacade.deleteLinkDevices(linkId);
|
String flag = "1";
|
if(!result) {
|
flag = "2";
|
}
|
WebUtil.write(response, flag);
|
}
|
|
|
/**
|
* 查询关联工单
|
*/
|
@RequestMapping("orders.html")
|
public ModelAndView orders(HttpServletRequest request,HttpServletResponse response) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/orders");
|
//查询关联工单
|
String flowId = request.getParameter("flowId");
|
List orders = incidentFacade.queryOrders(flowId);
|
modelAndView.addObject("orders", orders);
|
modelAndView.addObject("flowId", flowId);
|
modelAndView.addObject("userId", WebUtil.getLoginedUserId(request));
|
return modelAndView;
|
}
|
|
|
/**
|
* 跳转到关联工单界面
|
*/
|
@RequestMapping("dealLinkOrder.html")
|
public ModelAndView dealLinkOrder(HttpServletRequest request,HttpServletResponse response) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/dealLinkOrder");
|
|
String flowId = request.getParameter("flowId");
|
WORKFLOW_BASE base = new WORKFLOW_BASE(flowId).getInstanceById();
|
|
modelAndView.addObject("customerId", base.getCustomer_id());
|
modelAndView.addObject("orderId", base.getBusiness_id());
|
|
|
List<Map> orders = incidentFacade.queryOrders(flowId);
|
if(null!=orders && orders.size()>0) {
|
StringBuilder builder = new StringBuilder();
|
for(Map order : orders) {
|
String businessId = ConvertUtil.obj2StrBlank(order.get("ID"));
|
builder.append(businessId).append("-");
|
}
|
builder.deleteCharAt(builder.length()-1);
|
String orderIds = builder.toString();
|
modelAndView.addObject("orderIds", orderIds);
|
}
|
|
List<Map> list=new ArrayList<Map>();
|
for(String key : Constants.mapWORKFLOW_BASE_BUSINESS_TYPE.keySet()){
|
Map map=new HashMap();
|
map.put("id",key);
|
map.put("text",Constants.mapWORKFLOW_BASE_BUSINESS_TYPE.get(key));
|
list.add(map);
|
}
|
modelAndView.addObject("businessTypes", list);
|
modelAndView.addObject("flowId", flowId);
|
return modelAndView;
|
}
|
|
|
|
/**
|
* 删除关联设备
|
*/
|
@RequestMapping("delLinkOrder.html")
|
public void delLinkOrder(HttpServletRequest request,HttpServletResponse response) {
|
String linkId = request.getParameter("linkId");
|
boolean result = incidentFacade.deleteLinkOrder(linkId);
|
String flag = "1";
|
if(!result) {
|
flag = "2";
|
}
|
WebUtil.write(response, flag);
|
}
|
|
/**
|
* 跳转到文档附件页面
|
*/
|
@RequestMapping("files.html")
|
public ModelAndView files(HttpServletRequest request,HttpServletResponse response) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/files");
|
|
//获取当前登录人ID
|
String userId = WebUtil.getLoginedUserId(request);
|
modelAndView.addObject("userId", userId);
|
return modelAndView;
|
}
|
|
/**
|
* 查询文档附件
|
*/
|
@RequestMapping("filesData.html")
|
public ModelAndView filesData(HttpServletRequest request) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/incidentFilesData");
|
//查询所有的文档附件
|
String flowId = request.getParameter("flowId");
|
List files = incidentFacade.queryFiles(flowId);
|
modelAndView.addObject("files", files);
|
String userId = WebUtil.getLoginedUserId(request);
|
modelAndView.addObject("userId", userId);
|
return modelAndView;
|
}
|
|
|
|
/**
|
* 删除附件
|
*/
|
@RequestMapping("delFile.html")
|
public void delFile(HttpServletRequest request,HttpServletResponse response) {
|
String fileId = request.getParameter("fileId");
|
boolean result = incidentFacade.deleteFile(fileId);
|
String flag = "1";
|
if(!result) {
|
flag = "2";
|
}
|
WebUtil.write(response, flag);
|
}
|
|
/**
|
* 添加关联工单
|
*/
|
@RequestMapping("saveLinkOrders.html")
|
public void saveLinkOrders(HttpServletRequest request,HttpServletResponse response) {
|
String orderIds = request.getParameter("orderIds");
|
boolean result = false;
|
if(StringUtil.notEmpty(orderIds)) {
|
String flowId = request.getParameter("flowId");
|
result = incidentFacade.saveLinkOrders(flowId, orderIds.split(","),request);
|
}
|
WebUtil.write(response, result?"1":"2");
|
}
|
|
|
|
|
/**
|
* 跳转到订单查看页面
|
*/
|
@RequestMapping("incidentDetail.html")
|
public ModelAndView incidentDetail(HttpServletRequest request,HttpServletResponse response) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/incidentDetail");
|
|
|
|
//查询事件基本信息
|
String orderId = request.getParameter("orderId");
|
String flowId = request.getParameter("flowId");
|
|
messageService.doReadMessage(orderId, WebUtil.getUserId(request));
|
|
if(StringUtil.notEmpty(orderId) && !StringUtil.notEmpty(flowId)) {
|
SC_WORKFLOW_INCIDENT incident = new SC_WORKFLOW_INCIDENT(orderId).getInstanceById();
|
flowId = incident.getFlow_id();
|
}
|
|
|
|
//通过工单编号查询工单基本信息
|
Map baseMsg = incidentFacade.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(150));
|
double a2 = NumberUtil.mul(ConvertUtil.obj2Double(request_answer_time), ConvertUtil.obj2Double(60));
|
|
double xyWidth = NumberUtil.div(a1, a2);
|
if(xyWidth>150) {
|
xyWidth = 150;
|
baseMsg.put("ANSWER_TIMEOUT", 1);
|
}
|
baseMsg.put("xyWidth", xyWidth);
|
} else {
|
baseMsg.put("xyWidth", 150);
|
}
|
|
|
|
//处理超时操作
|
//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(150));
|
double a2 = NumberUtil.mul(ConvertUtil.obj2Double(request_deal_time), ConvertUtil.obj2Double(3600));
|
|
double jjWidth = NumberUtil.div(a1, a2);
|
if(jjWidth>150) {
|
jjWidth = 150;
|
baseMsg.put("DEAL_TIMEOUT", 1);
|
}
|
baseMsg.put("jjWidth", jjWidth);
|
} else {
|
baseMsg.put("jjWidth", 150);
|
}
|
|
|
|
/*List<Map> lzs = incidentFacade.incidentLzRecord(flowId);
|
modelAndView.addObject("lzs", lzs);*/
|
|
return modelAndView;
|
}
|
|
/**
|
* 查看流转记录
|
*/
|
@RequestMapping("viewLcRecord.html")
|
public ModelAndView viewLcRecord(HttpServletRequest request) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/viewLcRecord");
|
String flowId = request.getParameter("flowId");
|
List<Map> lzs = incidentFacade.incidentLzRecord(flowId);
|
modelAndView.addObject("lzs", lzs);
|
return modelAndView;
|
}
|
|
|
/**
|
* 查看处理记录
|
*/
|
@RequestMapping("viewRecord.html")
|
public ModelAndView viewRecord(HttpServletRequest request,HttpServletResponse response) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/viewRecord");
|
String flowId = request.getParameter("flowId");
|
List records = new ArrayList();
|
if(StringUtil.notEmpty(flowId)) {
|
records = incidentFacade.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("/business/pages/incident/viewDevice");
|
//查询关联设备
|
String orderId = request.getParameter("orderId");
|
String flowId = request.getParameter("flowId");
|
List devices = incidentFacade.queryDevices(flowId);
|
modelAndView.addObject("devices", devices);
|
return modelAndView;
|
}
|
|
|
/**
|
* 查看关联工单
|
*/
|
@RequestMapping("viewOrder.html")
|
public ModelAndView viewOrder(HttpServletRequest request,HttpServletResponse response) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/viewOrder");
|
|
//查询关联工单
|
String flowId = request.getParameter("flowId");
|
List orders = incidentFacade.queryOrders(flowId);
|
modelAndView.addObject("orders", orders);
|
return modelAndView;
|
}
|
|
|
/**
|
* 查询关联附件
|
*/
|
@RequestMapping("viewFile.html")
|
public ModelAndView viewFile(HttpServletRequest request,HttpServletResponse response) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/viewFile");
|
//查询所有的文档附件
|
String flowId = request.getParameter("flowId");
|
List files = incidentFacade.queryFiles(flowId);
|
modelAndView.addObject("files", files);
|
return modelAndView;
|
}
|
|
/**
|
* 分派任务
|
*/
|
@RequestMapping("dispatchTask.html")
|
public ModelAndView dispatchTask(HttpServletRequest request,HttpServletResponse response) {
|
Map map = incidentFacade.saveDispatchTask(request);
|
|
String result = ConvertUtil.obj2StrBlank(map.get("result"));
|
String nouser = ConvertUtil.obj2StrBlank(map.get("nouser"));
|
|
if(result.equals("1")) {
|
SysInfoMsg msg = (SysInfoMsg)map.get("msg");
|
return WebUtil.sysInfoPage(request, "操作成功!",
|
"",
|
SysInfo.Success,"/business/pages/incident/myIncident.html",msg);
|
} else {
|
if(nouser.equals("1")){
|
return WebUtil.sysInfoPage(request, "分派的组下没有人员",
|
"",
|
SysInfo.Error,"");
|
}else{
|
return WebUtil.sysInfoPage(request, "操作失败!",
|
"",
|
SysInfo.Error,"");
|
}
|
|
}
|
|
}
|
|
|
/**
|
* 关闭任务
|
*/
|
@RequestMapping(value="closeTask.html",method=RequestMethod.GET)
|
public ModelAndView closeTask(HttpServletRequest request,HttpServletResponse response) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/closeTask");
|
return modelAndView;
|
}
|
|
/**
|
* 执行关闭任务
|
*/
|
@RequestMapping(value="closeTask.html",method=RequestMethod.POST)
|
public ModelAndView doCloseTask(HttpServletRequest request,HttpServletResponse response) {
|
incidentFacade.doCloseTask(request);
|
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/success");
|
modelAndView.addObject("type", 1);
|
modelAndView.addObject("sysInfo", "SUCCESS");
|
return modelAndView;
|
}
|
|
|
/**
|
* 跳转到工程师添加事件页面
|
*/
|
@RequestMapping("engineerAddIncident.html")
|
public ModelAndView engineerAddIncident(HttpServletRequest request) {
|
ModelAndView view = new ModelAndView("/business/pages/incident/engineerAddIncident");
|
String orderId=request.getParameter("orderId");
|
if(StringUtil.notEmpty(orderId)) {
|
view.addObject("info", incidentFacade.getemplate(orderId));
|
}else {
|
Map map= new HashMap();
|
map.put("happen_time",DateUtil.getCurrentDate14());
|
view.addObject("info",map);
|
}
|
String repair = request.getParameter("repair");
|
if(StringUtil.notEmpty(repair)){
|
Map info=new HashMap();
|
info=incidentFacade.getRepair(repair);
|
view.addObject("info", info);
|
}
|
//查询事件类型数据字典
|
List<Map> types = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.INCIDENT_TYPE);
|
//取得事件类型的第一条数据
|
if(null!=types && types.size()>0) {
|
Map type = types.get(0);
|
view.addObject("typeId", type.get("DATAKEY"));
|
view.addObject("typeName", type.get("DATAVALUE"));
|
}
|
//查询申报方式数据字典
|
List<Map> ways = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.INCIDENT_APPLY_TYPE);
|
//取得申报方式的第一条数据
|
if(null!=ways && ways.size()>0) {
|
Map way = ways.get(0);
|
view.addObject("wayId", way.get("DATAKEY"));
|
view.addObject("wayName", way.get("DATAVALUE"));
|
}
|
//查询事件来源数据字典
|
List<Map> froms = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.INCIDENT_SOURCE);
|
//取得事件来源的第一条数据
|
if(null!=froms && froms.size()>0) {
|
Map from = froms.get(0);
|
view.addObject("fromId", from.get("DATAKEY"));
|
view.addObject("fromName", from.get("DATAVALUE"));
|
}
|
//事件来源为一键报修
|
if(!StringUtil.isEmpty(repair)){
|
view.addObject("fromId", Constants.INCIDENT_SOURCE_REPAIR_KEY);
|
view.addObject("fromName", Constants.INCIDENT_SOURCE_REPAIR_VALUE);
|
}
|
|
//客户列表
|
List<Map> cusList = incidentFacade.getCustomerList();
|
view.addObject("customers", cusList);
|
//查询事件优先级
|
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("types", types);
|
view.addObject("ways", ways);
|
view.addObject("froms", froms);
|
|
//定义参数Map
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
params.put("userId", WebUtil.getLoginedUserId(request));
|
params.put("type","2");
|
Map map = incidentFacade.getOrderNum(params);
|
view.addObject("data", map);
|
|
return view;
|
}
|
|
/**
|
* 工程师保存事件
|
*/
|
@RequestMapping("engineerSaveIncident.html")
|
public ModelAndView engineerSaveIncident(HttpServletRequest request,HttpServletResponse response,SC_WORKFLOW_INCIDENT sc_workflow_incident) {
|
Map map = incidentFacade.saveEngineerIncident(request,sc_workflow_incident);
|
|
String result = ConvertUtil.obj2StrBlank(map.get("result"));
|
String nouser = ConvertUtil.obj2StrBlank(map.get("nouser"));
|
|
if(result.equals("1")) {
|
SysInfoMsg msg = (SysInfoMsg)map.get("msg");
|
return WebUtil.sysInfoPage(request, "操作成功!",
|
"",
|
SysInfo.Success,"/business/pages/incident/myIncident.html",msg);
|
} else {
|
if(nouser.equals("1")){
|
return WebUtil.sysInfoPage(request, "服务台角色下没有人员",
|
"",
|
SysInfo.Error,"");
|
}else{
|
return WebUtil.sysInfoPage(request, "操作失败!",
|
"",
|
SysInfo.Error,"");
|
}
|
}
|
}
|
|
|
/**
|
* 工单完成时的事件处理报告
|
*/
|
@RequestMapping("finishReport.html")
|
public ModelAndView wcReport(HttpServletRequest request) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/finishReport");
|
String orderId = request.getParameter("orderId");
|
Map report = incidentFacade.queryWcReport(orderId);
|
//项目编号
|
String CUSTOMER_ID =ConvertUtil.obj2Str(report.get("CUSTOMER_ID"));
|
if(StringUtil.notEmpty(CUSTOMER_ID)){
|
SC_PARTNER_CUSTOMER_INFO customer_INFO=new SC_PARTNER_CUSTOMER_INFO(CUSTOMER_ID).getInstanceById();
|
report.put("customer_code", customer_INFO.getCustomer_code());
|
}
|
String FIRST_CATEGORY_ID=ConvertUtil.obj2Str(report.get("FIRST_CATEGORY_ID"));
|
if(StringUtil.notEmpty(FIRST_CATEGORY_ID)){
|
SC_SERVCE_CATEGORY sc_SERVCE_CATEGORY =new SC_SERVCE_CATEGORY(FIRST_CATEGORY_ID).getInstanceById();
|
report.put("FIRST_CATEGORY_CODE", sc_SERVCE_CATEGORY.getCategory_code());
|
}
|
String SECOND_CATEGORY_ID=ConvertUtil.obj2Str(report.get("SECOND_CATEGORY_ID"));
|
if(StringUtil.notEmpty(SECOND_CATEGORY_ID)){
|
SC_SERVCE_CATEGORY sc_SERVCE_CATEGORY =new SC_SERVCE_CATEGORY(SECOND_CATEGORY_ID).getInstanceById();
|
report.put("SECOND_CATEGORY_CODE", sc_SERVCE_CATEGORY.getCategory_code());
|
}
|
String THIRD_CATEGORY_ID=ConvertUtil.obj2Str(report.get("THIRD_CATEGORY_ID"));
|
if(StringUtil.notEmpty(THIRD_CATEGORY_ID)){
|
SC_SERVCE_CATEGORY sc_SERVCE_CATEGORY =new SC_SERVCE_CATEGORY(THIRD_CATEGORY_ID).getInstanceById();
|
report.put("THIRD_CATEGORY_CODE", sc_SERVCE_CATEGORY.getCategory_code());
|
}
|
modelAndView.addObject("report", report);
|
return modelAndView;
|
}
|
|
|
/**
|
* 工单关闭时的事件处理报告
|
*/
|
@RequestMapping("closeReport.html")
|
public ModelAndView closeReport(HttpServletRequest request) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/closeReport");
|
String orderId = request.getParameter("orderId");
|
Map report = incidentFacade.queryCloseReport(orderId);
|
modelAndView.addObject("report", report);
|
return modelAndView;
|
}
|
|
/**
|
* 待响应列表页面
|
* @param request
|
* @param response
|
* @return
|
*/
|
@RequestMapping(value="incidentNodeList.html", method=RequestMethod.GET)
|
public ModelAndView incidentNodeList(HttpServletRequest request, HttpServletResponse response) {
|
ModelAndView view = new ModelAndView("/business/pages/incident/incidentNodeList");
|
//查询工单数量,通过类型判断查询那种类型的数量
|
Map msgCount = incidentFacade.queryincidentNodeCount(request);
|
|
System.out.println(JsonUtil.map2Json(msgCount));
|
|
view.addObject("c", msgCount);
|
//查询事件来源类型数据字典
|
List sources = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.INCIDENT_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);
|
|
//客户列表
|
List<Map> cusList = incidentFacade.getCustomerList();
|
view.addObject("customers", cusList);
|
|
//定义参数Map
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
params.put("userId", WebUtil.getLoginedUserId(request));
|
params.put("type","1");
|
Map map = incidentFacade.getOrderNum(params);
|
view.addObject("data", map);
|
|
return view;
|
}
|
|
|
/**
|
* 查询工单列表数据
|
*/
|
@RequestMapping(value="incidentNodeData.html",method=RequestMethod.POST)
|
public ModelAndView incidentNodeData(HttpServletRequest request,PageInfo pageInfo) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/incidentNodeData");
|
//定义参数Map
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
PageInfo list = incidentFacade.queryincidentOrderNodeList(pageInfo,params);
|
modelAndView.addObject("orderList", list);
|
return modelAndView;
|
}
|
|
|
|
/**
|
* 查询工单总数量
|
*/
|
@RequestMapping(value="incidentNodeCount.html",method=RequestMethod.POST)
|
public void incidentNodeCount(HttpServletRequest request,HttpServletResponse response) {
|
//定义参数Map
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
int count = incidentFacade.queryincidentOrderNodeCount(params);
|
WebUtil.write(response, String.valueOf(count));
|
}
|
|
/**
|
* 待响应列表页面
|
* @param request
|
* @param response
|
* @return
|
*/
|
@RequestMapping(value="incidentJxzList.html", method=RequestMethod.GET)
|
public ModelAndView incidentJxzList(HttpServletRequest request, HttpServletResponse response) {
|
ModelAndView view = new ModelAndView("/business/pages/incident/incidentJxzList");
|
//查询工单数量,通过类型判断查询那种类型的数量
|
Map msgCount = incidentFacade.queryincidentJxzNodeCount(request);
|
|
System.out.println(JsonUtil.map2Json(msgCount));
|
|
view.addObject("c", msgCount);
|
//查询事件来源数据字典
|
List sources = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.INCIDENT_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);
|
|
//客户列表
|
List<Map> cusList = incidentFacade.getCustomerList();
|
view.addObject("customers", cusList);
|
|
//定义参数Map
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
params.put("userId", WebUtil.getLoginedUserId(request));
|
params.put("type","1");
|
Map map = incidentFacade.getOrderNum(params);
|
view.addObject("data", map);
|
return view;
|
}
|
|
|
|
/**
|
* 查询进行中工单列表数据
|
*/
|
@RequestMapping(value="incidentJxzData.html",method=RequestMethod.POST)
|
public ModelAndView incidentJxzData(HttpServletRequest request,PageInfo pageInfo) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/incidentJxzData");
|
//定义参数Map
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
PageInfo list = incidentFacade.queryincidentJxzList(pageInfo,params);
|
modelAndView.addObject("orderList", list);
|
return modelAndView;
|
}
|
|
|
|
/**
|
* 查询进行中工单总数量
|
*/
|
@RequestMapping(value="incidentJxzCount.html",method=RequestMethod.POST)
|
public void incidentJxzCount(HttpServletRequest request,HttpServletResponse response) {
|
//定义参数Map
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
int count = incidentFacade.queryincidentJxzCount(params);
|
WebUtil.write(response, String.valueOf(count));
|
}
|
|
/**
|
* 已超时列表页面
|
* @param request
|
* @param response
|
* @return
|
*/
|
@RequestMapping(value="incidentTimeoutList.html", method=RequestMethod.GET)
|
public ModelAndView incidentTimeoutList(HttpServletRequest request, HttpServletResponse response) {
|
ModelAndView view = new ModelAndView("/business/pages/incident/incidentTimeoutList");
|
//查询工单数量,通过类型判断查询那种类型的数量
|
Map msgCount = incidentFacade.queryincidentTimeoutNodeCount(request);
|
|
System.out.println(JsonUtil.map2Json(msgCount));
|
|
view.addObject("c", msgCount);
|
//查询问题类型数据字典
|
List sources = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.INCIDENT_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);
|
//客户列表
|
List<Map> cusList = incidentFacade.getCustomerList();
|
view.addObject("customers", cusList);
|
|
//定义参数Map
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
params.put("userId", WebUtil.getLoginedUserId(request));
|
params.put("type","1");
|
Map map = incidentFacade.getOrderNum(params);
|
view.addObject("data", map);
|
|
return view;
|
}
|
|
/**
|
* 已超时工单列表数据
|
*/
|
@RequestMapping(value="incidentTimeoutData.html",method=RequestMethod.POST)
|
public ModelAndView incidentTimeoutData(HttpServletRequest request,PageInfo pageInfo) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/incidentTimeoutData");
|
//定义参数Map
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
PageInfo list = incidentFacade.queryincidentTimeoutList(pageInfo,params);
|
modelAndView.addObject("orderList", list);
|
return modelAndView;
|
}
|
|
|
|
/**
|
* 查询已超时工单总数量
|
*/
|
@RequestMapping(value="incidentTimeoutCount.html",method=RequestMethod.POST)
|
public void incidentTimeoutCount(HttpServletRequest request,HttpServletResponse response) {
|
//定义参数Map
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
int count = incidentFacade.queryincidentTimeoutCount(params);
|
WebUtil.write(response, String.valueOf(count));
|
}
|
|
/**
|
* 问题待响应列表页面
|
* @param request
|
* @param response
|
* @return
|
*/
|
@RequestMapping(value="{type}/incidentEndList.html", method=RequestMethod.GET)
|
public ModelAndView incidentEndList(HttpServletRequest request, HttpServletResponse response,@PathVariable(value="type") String type) {
|
ModelAndView view = new ModelAndView("/business/pages/incident/incidentEndList");
|
//查询问题类型数据字典
|
List sources = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.INCIDENT_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", type);
|
//客户列表
|
List<Map> cusList = incidentFacade.getCustomerList();
|
view.addObject("customers", cusList);
|
|
//定义参数Map
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
params.put("userId", WebUtil.getLoginedUserId(request));
|
params.put("type","1");
|
Map map = incidentFacade.getOrderNum(params);
|
view.addObject("data", map);
|
return view;
|
}
|
|
|
|
/**
|
* 查询问题工单列表数据
|
*/
|
@RequestMapping(value="incidentEndData.html",method=RequestMethod.POST)
|
public ModelAndView incidentEndData(HttpServletRequest request,PageInfo pageInfo) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/incidentEndData");
|
//定义参数Map
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
String type = request.getParameter("type");
|
params.put("type", type);
|
PageInfo list = incidentFacade.queryincidentEndList(pageInfo,params);
|
modelAndView.addObject("orderList", list);
|
modelAndView.addObject("type", type);
|
return modelAndView;
|
}
|
|
|
|
/**
|
* 查询问题工单总数量
|
*/
|
@RequestMapping(value="incidentEndCount.html",method=RequestMethod.POST)
|
public void incidentEndCount(HttpServletRequest request,HttpServletResponse response) {
|
//定义参数Map
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
String type = request.getParameter("type");
|
params.put("type", type);
|
int count = incidentFacade.queryincidentEndCount(params);
|
WebUtil.write(response, String.valueOf(count));
|
}
|
|
/**
|
* 已超时列表页面
|
* @param request
|
* @param response
|
* @return
|
*/
|
@RequestMapping(value="myincidentTimeoutList.html", method=RequestMethod.GET)
|
public ModelAndView myincidentTimeoutList(HttpServletRequest request, HttpServletResponse response) {
|
ModelAndView view = new ModelAndView("/business/pages/incident/myincidentTimeoutList");
|
//查询工单数量,通过类型判断查询那种类型的数量
|
Map msgCount = incidentFacade.querymyincidentTimeoutNodeCount(request);
|
|
System.out.println(JsonUtil.map2Json(msgCount));
|
|
view.addObject("c", msgCount);
|
//查询事件来源数据字典
|
List sources = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.INCIDENT_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);
|
//客户列表
|
List<Map> cusList = incidentFacade.getCustomerList();
|
view.addObject("customers", cusList);
|
|
//定义参数Map
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
params.put("userId", WebUtil.getLoginedUserId(request));
|
params.put("type","2");
|
Map map = incidentFacade.getOrderNum(params);
|
view.addObject("data", map);
|
return view;
|
}
|
|
/**
|
* 已超时工单列表数据
|
*/
|
@RequestMapping(value="myincidentTimeoutData.html",method=RequestMethod.POST)
|
public ModelAndView myincidentTimeoutData(HttpServletRequest request,PageInfo pageInfo) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/myincidentTimeoutData");
|
//定义参数Map
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
params.put("userId", WebUtil.getLoginedUserId(request));
|
PageInfo list = incidentFacade.querymyincidentTimeoutList(pageInfo,params);
|
modelAndView.addObject("orderList", list);
|
return modelAndView;
|
}
|
|
|
|
/**
|
* 查询已超时工单总数量
|
*/
|
@RequestMapping(value="myincidentTimeoutCount.html",method=RequestMethod.POST)
|
public void myincidentTimeoutCount(HttpServletRequest request,HttpServletResponse response) {
|
//定义参数Map
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
params.put("userId", WebUtil.getLoginedUserId(request));
|
int count = incidentFacade.querymyincidentTimeoutCount(params);
|
WebUtil.write(response, String.valueOf(count));
|
}
|
|
/**
|
* 问题待响应列表页面
|
* @param request
|
* @param response
|
* @return
|
*/
|
@RequestMapping(value="{type}/myincidentNodeList.html")
|
public ModelAndView myquestionNodeList(HttpServletRequest request, HttpServletResponse response,@PathVariable(value="type") String type) {
|
ModelAndView view = new ModelAndView("/business/pages/incident/myincidentNodeList");
|
//定义参数Map
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
params.put("userId", WebUtil.getLoginedUserId(request));
|
params.put("type", type);
|
//查询工单数量,通过类型判断查询那种类型的数量
|
Map msgCount = incidentFacade.querymyincidentNodeCount(params);
|
|
System.out.println(JsonUtil.map2Json(msgCount));
|
|
view.addObject("c", msgCount);
|
//查询事件来源数据字典
|
List sources = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.INCIDENT_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", type);
|
//客户列表
|
List<Map> cusList = incidentFacade.getCustomerList();
|
view.addObject("customers", cusList);
|
|
|
params.put("type","2");
|
Map map = incidentFacade.getOrderNum(params);
|
view.addObject("data", map);
|
return view;
|
}
|
|
|
|
/**
|
* 查询问题工单列表数据
|
*/
|
@RequestMapping(value="myincidentNodeData.html",method=RequestMethod.POST)
|
public ModelAndView myquestionNodeData(HttpServletRequest request,PageInfo pageInfo) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/myincidentNodeData");
|
//定义参数Map
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
params.put("userId", WebUtil.getLoginedUserId(request));
|
PageInfo list = incidentFacade.querymyincidentOrderNodeList(pageInfo,params);
|
modelAndView.addObject("orderList", list);
|
modelAndView.addObject("type", params.get("type"));
|
return modelAndView;
|
}
|
|
|
|
/**
|
* 查询问题工单总数量
|
*/
|
@RequestMapping(value="myincidentNodeCount.html",method=RequestMethod.POST)
|
public void myquestionNodeCount(HttpServletRequest request,HttpServletResponse response) {
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
params.put("userId", WebUtil.getLoginedUserId(request));
|
int count = incidentFacade.querymyincidentOrderNodeCount(params);
|
WebUtil.write(response, String.valueOf(count));
|
}
|
|
|
/**
|
* 问题待响应列表页面
|
* @param request
|
* @param response
|
* @return
|
*/
|
@RequestMapping("{type}/myincidentEndList.html")
|
public ModelAndView myquestionEndList(HttpServletRequest request, HttpServletResponse response,@PathVariable(value="type") String type) {
|
ModelAndView view = new ModelAndView("/business/pages/incident/myincidentEndList");
|
//查询问题类型数据字典
|
List sources = dataDictionaryService.getDataDictionaryByCategoryKey(Constants.INCIDENT_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", type);
|
//客户列表
|
List<Map> cusList = incidentFacade.getCustomerList();
|
view.addObject("customers", cusList);
|
|
//定义参数Map
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
params.put("userId", WebUtil.getLoginedUserId(request));
|
params.put("type","2");
|
Map map = incidentFacade.getOrderNum(params);
|
view.addObject("data", map);
|
return view;
|
}
|
|
|
|
/**
|
* 查询问题工单列表数据
|
*/
|
@RequestMapping(value="myincidentEndData.html",method=RequestMethod.POST)
|
public ModelAndView myquestionEndData(HttpServletRequest request,PageInfo pageInfo) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/myincidentEndData");
|
//定义参数Map
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
params.put("userId", WebUtil.getLoginedUserId(request));
|
PageInfo list = incidentFacade.querymyincidentEndList(pageInfo,params);
|
modelAndView.addObject("orderList", list);
|
modelAndView.addObject("type", params.get("type"));
|
return modelAndView;
|
}
|
|
|
|
/**
|
* 查询问题工单总数量
|
*/
|
@RequestMapping(value="myincidentEndCount.html",method=RequestMethod.POST)
|
public void myincidentEndCount(HttpServletRequest request,HttpServletResponse response) {
|
//定义参数Map
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
params.put("userId", WebUtil.getLoginedUserId(request));
|
int count = incidentFacade.querymyincidentEndCount(params);
|
WebUtil.write(response, String.valueOf(count));
|
}
|
|
/**
|
* 取得节点各状态数量
|
*/
|
@RequestMapping(value="getordernum.html",method=RequestMethod.POST)
|
public void getordernum(HttpServletRequest request,HttpServletResponse response) {
|
//定义参数Map
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
params.put("userId", WebUtil.getLoginedUserId(request));
|
Map map = incidentFacade.getOrderNum(params);
|
WebUtil.write(response, JsonUtil.map2Json(map));
|
}
|
|
/**
|
* 分配人员
|
*/
|
@RequestMapping("usersAssign.html")
|
public ModelAndView queryUser(HttpServletRequest request,HttpServletResponse response) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/usersAssign");
|
String curnodeId = request.getParameter("curnodeId");
|
String flowId = request.getParameter("flowId");
|
List<Map> nodeList = incidentFacade.getFlueNode(request);
|
modelAndView.addObject("nodeList", nodeList);
|
modelAndView.addObject("curnodeId", curnodeId);
|
return modelAndView;
|
}
|
|
/**
|
* 查询所有的分配人员
|
*/
|
@RequestMapping("selectTab.html")
|
public ModelAndView selectTab(HttpServletRequest request,HttpServletResponse response) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/selectTab");
|
List<Map> groupList = incidentFacade.getGroupUser(request);
|
modelAndView.addObject("groupList", groupList);
|
return modelAndView;
|
}
|
|
/**
|
* 查询所有的分配人员
|
*/
|
@RequestMapping("selectDealer.html")
|
public ModelAndView selectDealer(HttpServletRequest request,HttpServletResponse response) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/selectDealer");
|
List<Map> groupList = incidentFacade.getGroupUser(request);
|
modelAndView.addObject("groupList", groupList);
|
return modelAndView;
|
}
|
|
/**
|
* 查询角色
|
*/
|
@RequestMapping("selectGroup.html")
|
public ModelAndView selectGroup(HttpServletRequest request,HttpServletResponse response) {
|
ModelAndView modelAndView = new ModelAndView("/business/pages/incident/selectGroup");
|
List<Map> groupList = incidentFacade.getGroupUser(request);
|
modelAndView.addObject("groupList", groupList);
|
return modelAndView;
|
}
|
|
/**
|
* 通过项目编号,联系人联系方式查询联系人的信息
|
*/
|
@RequestMapping("queryContactInfo.html")
|
public void queryContactInfo(HttpServletRequest request,HttpServletResponse response) {
|
Map info = incidentFacade.queryContactInfo(request);
|
WebUtil.write(response, JsonUtil.map2Json(info));
|
}
|
/**
|
* 通过项目编号,联系人联系人姓名查询联系人的信息
|
*/
|
@RequestMapping("queryContactNameInfo.html")
|
public void queryContactNameInfo(HttpServletRequest request,HttpServletResponse response) {
|
Map param=ParamsMapUtil.getParameterMap(request);
|
Map info = incidentFacade.queryContactNameInfo(param);
|
WebUtil.write(response, JsonUtil.map2Json(info));
|
}
|
|
|
/**
|
* 事件服务台首页(我的)
|
* @param model
|
* @param request
|
* @param response
|
* @return
|
*/
|
@RequestMapping(value="myIncidentIndex.html")
|
public String myIncidentIndex(Model model,HttpServletRequest request,HttpServletResponse response){
|
List<Map> cusList = customerFacade.getCusList();
|
model.addAttribute("cusList", cusList);
|
model.addAttribute("userId", WebUtil.getUserId(request));
|
//定义参数Map
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
params.put("userId", WebUtil.getLoginedUserId(request));
|
params.put("type","2");
|
Map map = incidentFacade.getOrderNum(params);
|
|
model.addAttribute("data", map);
|
return "/business/pages/incident/myIncidentIndex";
|
}
|
|
|
@RequestMapping(value="myIncidentIndexLoad.html")
|
public String incidentUserIndexLoad(Model model,HttpServletRequest request,HttpServletResponse response){
|
Map<String, String> params = ParamsMapUtil.getParameterMap(request);
|
params.put("userId", WebUtil.getUserId(request));
|
//工单池问题数量
|
int poolCount = incidentFacade.myincidentpoolCount(params);
|
//待处理问题数量
|
params.put("type","1");
|
int pendingCount = incidentFacade.querymyincidentOrderNodeCount(params);
|
//进行中问题数量
|
params.put("type","2");
|
int inHandCount = incidentFacade.querymyincidentOrderNodeCount(params);
|
//已处理
|
params.put("type","3");
|
int processedCount = incidentFacade.querymyincidentOrderNodeCount (params);
|
model.addAttribute("poolCount",poolCount);
|
model.addAttribute("pendingCount",pendingCount);
|
model.addAttribute("inHandCount",inHandCount);
|
model.addAttribute("processedCount",processedCount);
|
return "/business/pages/incident/myIncidentIndexLoad";
|
}
|
|
/**
|
* 查询最近一月事件影响度分析
|
* @param request
|
* @param response
|
*/
|
@RequestMapping(value="getIncidentEffectPieChart.html")
|
public void getIncidentEffectPieChart(HttpServletRequest request,HttpServletResponse response){
|
Map<String, String> params = ParamsMapUtil.getParameterMap(request);
|
Map info = incidentFacade.getLastMonthIncidentEffect(params);
|
//System.out.println("json--------------------------"+JsonUtil.map2Json(info));
|
WebUtil.write(response, JsonUtil.map2Json(info));
|
}
|
|
/**
|
* 查询最近一月事件数量
|
* @param request
|
* @param response
|
*/
|
@RequestMapping(value="getIncidentSumLineChart.html")
|
public void getIncidentSumLineChart(HttpServletRequest request,HttpServletResponse response){
|
Map<String, String> params = ParamsMapUtil.getParameterMap(request);
|
Map info = incidentFacade.getLastMonthIncidentCount(params);
|
WebUtil.write(response, JsonUtil.map2Json(info));
|
}
|
|
/**
|
* 查询最近一月事件级别分析
|
* @param request
|
* @param response
|
*/
|
@RequestMapping(value="getIncidentLvPieChart.html")
|
public void getIncidentLvPieChart(HttpServletRequest request,HttpServletResponse response){
|
Map<String, String> params = ParamsMapUtil.getParameterMap(request);
|
Map info = incidentFacade.getLastMonthIncidentLv(params);
|
WebUtil.write(response, JsonUtil.map2Json(info));
|
}
|
|
|
/**
|
* 查询最近一月事件优先级分析
|
* @param request
|
* @param response
|
*/
|
@RequestMapping(value="getIncidentPriPieChart.html")
|
public void getIncidentPriPieChart(HttpServletRequest request,HttpServletResponse response){
|
Map<String, String> params = ParamsMapUtil.getParameterMap(request);
|
Map info = incidentFacade.getLastMonthIncidentPri(params);
|
WebUtil.write(response, JsonUtil.map2Json(info));
|
}
|
|
|
/**
|
* 查询最近一月服务目录事件数量
|
* @param request
|
* @param response
|
*/
|
@RequestMapping(value="getIncidentServerLineChart.html")
|
public void getIncidentServerLineChart(HttpServletRequest request,HttpServletResponse response){
|
Map<String, String> params = ParamsMapUtil.getParameterMap(request);
|
Map info = incidentFacade.getLastMonthIncidentServer(params);
|
WebUtil.write(response, JsonUtil.map2Json(info));
|
}
|
|
|
/**
|
* 事件服务台首页
|
* @param model
|
* @param request
|
* @param response
|
* @return
|
*/
|
@RequestMapping(value="incidentIndex.html")
|
public String incidentIndex(Model model,HttpServletRequest request,HttpServletResponse response){
|
List<Map> cusList = customerFacade.getCusList();
|
model.addAttribute("cusList", cusList);
|
//定义参数Map
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
params.put("type","1");
|
Map map = incidentFacade.getOrderNum(params);
|
|
model.addAttribute("data", map);
|
return "/business/pages/incident/incidentIndex";
|
}
|
|
|
@RequestMapping(value="incidentIndexLoad.html")
|
public String incidentIndexLoad(Model model,HttpServletRequest request,HttpServletResponse response){
|
Map<String, String> params = ParamsMapUtil.getParameterMap(request);
|
//工单池数量
|
int poolCount = incidentFacade.incidentpoolCount(params);
|
//待处理数量
|
int pendingCount = incidentFacade.queryincidentOrderNodeCount(params);
|
//进行中数量
|
int inHandCount = incidentFacade.queryincidentJxzCount(params);
|
//已处理
|
int timeoutCount = incidentFacade.queryincidentTimeoutCount(params);
|
model.addAttribute("poolCount",poolCount);
|
model.addAttribute("pendingCount",pendingCount);
|
model.addAttribute("inHandCount",inHandCount);
|
model.addAttribute("timeoutCount",timeoutCount);
|
return "/business/pages/incident/incidentIndexLoad";
|
}
|
}
|