cy
2022-06-21 129904537f66509f97b285e7eb4f42b3dc349dd0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
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));
    }
    
    
 
}