package cn.ksource.web.controller.uc;
|
|
import java.util.ArrayList;
|
import java.util.HashMap;
|
import java.util.List;
|
import java.util.Map;
|
|
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.web.bind.annotation.RequestMapping;
|
import org.springframework.web.servlet.ModelAndView;
|
|
import cn.ksource.core.page.PageInfo;
|
import cn.ksource.core.util.ParamsMapUtil;
|
import cn.ksource.core.web.WebUtil;
|
import cn.ksource.web.Constants;
|
import cn.ksource.web.facade.uc.order.UcOrderFacade;
|
/**
|
* 用户中心--工单管理控制器
|
* @note:
|
* @version
|
* @author sxj
|
* @date July 18, 2016 10:35:44 AM
|
*/
|
@Controller
|
@RequestMapping("/uc/ucorder")
|
public class UcOrderController {
|
|
@Autowired
|
private UcOrderFacade ucOrderFacade;
|
|
/**
|
* 跳转到所有工单页面
|
*/
|
@RequestMapping("ucordersList.html")
|
public ModelAndView orderPool(HttpServletRequest request,HttpServletResponse response) {
|
ModelAndView modelAndView = new ModelAndView("/uc/allorder/ucordersList");
|
//查询工单类型
|
Map<String, String> state = Constants.mapWORKFLOW_BASE_BUSINESS_TYPE;
|
List ways = new ArrayList();
|
for (Map.Entry<String, String> entry : state.entrySet()) {
|
String key = entry.getKey();
|
String value = entry.getValue();
|
Map map = new HashMap();
|
map.put("typeId", key);
|
map.put("typeName", value);
|
ways.add(map);
|
}
|
modelAndView.addObject("types", ways);
|
return modelAndView;
|
}
|
|
|
/**
|
* 所有工单数据
|
*/
|
@RequestMapping("ucordersListData.html")
|
public ModelAndView orderPoolData(HttpServletRequest request,PageInfo pageInfo) {
|
ModelAndView modelAndView = new ModelAndView("/uc/allorder/ucordersListData");
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
String cusId = WebUtil.getWebLoginUserCusId(request);
|
params.put("cusId", cusId);
|
PageInfo orders = ucOrderFacade.ordersListData(pageInfo,params);
|
modelAndView.addObject("orders", orders);
|
return modelAndView;
|
}
|
|
|
/**
|
* 所有工单数量
|
*/
|
@RequestMapping("ucordersListCount.html")
|
public void orderPoolCount(HttpServletRequest request,HttpServletResponse response) {
|
Map<String,String> params = ParamsMapUtil.getParameterMap(request);
|
String cusId = WebUtil.getWebLoginUserCusId(request);
|
params.put("cusId", cusId);
|
int count = ucOrderFacade.ordersListCount(params);
|
WebUtil.write(response, String.valueOf(count));
|
}
|
|
|
|
}
|