zhuguifei
2026-03-10 58402bd5e762361363a0f7d7907153c77dbb819f
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
package com.shlanbao.tzsc.plugin.controller;
 
import java.util.List;
 
import com.shlanbao.tzsc.utils.tools.Mes2DASParams;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
 
import com.shlanbao.tzsc.base.controller.BaseController;
import com.shlanbao.tzsc.base.model.Combobox;
import com.shlanbao.tzsc.init.BaseParams;
import com.shlanbao.tzsc.pms.md.matparam.beans.MatParamBean;
import com.shlanbao.tzsc.utils.params.ComboboxType;
/**
 * 公共下拉框数据控制器
 * @author Leejean
 * @create 2014年11月18日上午9:11:28
 */
@Controller
@RequestMapping("/plugin/combobox")
public class LoadComboboxController extends BaseController {
    /**
     * 加载下拉框
     * @author Leejean
     * @create 2014年11月27日上午10:38:43
     * @param type 类型
     * @param setAll 是否设置【全部】选项
     * @return
     */
    @ResponseBody
    @RequestMapping("/load")
    public List<Combobox> loadShift(String type,boolean setAll){
        try {
            if(type.equalsIgnoreCase(ComboboxType.SHIFT)){
                return BaseParams.getShiftCombobox(setAll);
            }
            if(type.equalsIgnoreCase(ComboboxType.TEAM)){
                return BaseParams.getTeamCombobox(setAll);
            }
            if(type.equalsIgnoreCase(ComboboxType.WORKSHOP)){
                return BaseParams.getWorkShopCombobox(setAll);
            }
            if(type.equalsIgnoreCase(ComboboxType.MATPROD)){
                return BaseParams.getMatProdCombobox(setAll);
            }
            if(type.equalsIgnoreCase(ComboboxType.MATGRP)){
                return BaseParams.getMatGrpCombobox(setAll);
            }
            if(type.equalsIgnoreCase(ComboboxType.MATTYPE)){
                return BaseParams.getMatTypeCombobox(setAll);
            }
            if(type.equalsIgnoreCase(ComboboxType.UNIT)){
                return BaseParams.getUnitCombobox(setAll);
            }
            if(type.equalsIgnoreCase(ComboboxType.MATFILTER)){
                return BaseParams.getMatFilterCombobox(setAll);
            }
            if(type.equalsIgnoreCase(ComboboxType.FLFILTER)){
                return BaseParams.getFlFilterCombobox(setAll);
            }
            if(type.equalsIgnoreCase(ComboboxType.EQPCATEGORY)){
                return BaseParams.getEqpCategoryCombobox(setAll);
            }
            if(type.equalsIgnoreCase(ComboboxType.EQPTYPE)){
                return BaseParams.getEqpTypesCombobox(setAll);
            }
            if(type.equalsIgnoreCase(ComboboxType.ALLEQPS)){
                return BaseParams.getAllEqpsCombobox(setAll);
            }
            if(type.equalsIgnoreCase(ComboboxType.ALLROLLERS)){
                return BaseParams.getAllRollersCombobox(setAll);
            }
            if(type.equalsIgnoreCase(ComboboxType.ALLPACKERS)){
                return BaseParams.getAllPackersCombobox(setAll);
            }
            if(type.equalsIgnoreCase(ComboboxType.ALLBOXERS)){
                return BaseParams.getAllBoxersCombobox(setAll);
            }
            if(type.equalsIgnoreCase(ComboboxType.ALLFILTERS)){
                return BaseParams.getAllFiltersCombobox(setAll);
            }
            if(type.equalsIgnoreCase(ComboboxType.ALLTRANSM)){
                return BaseParams.getAllTransmCombobox(setAll);
            }
 
            return Mes2DASParams.queryCombobox(type);
 
 
        } catch (Exception e) {
            log.error("获取"+type+"下拉框数据异常", e);
        }
        return null;
    }
 
 
    @ResponseBody
    @RequestMapping("/loadMdMatParam")
    public List<MatParamBean> getAllMatParams(){
        try {
            List<MatParamBean> lit= BaseParams.getAllMdMatParam();
            return lit;
        } catch (Exception e) {
            log.error("获取辅料数据异常", e);
        }
        return null;
    }
 
}