package com.shlanbao.tzsc.init;
|
|
import java.util.ArrayList;
|
import java.util.HashMap;
|
import java.util.List;
|
import java.util.Map;
|
|
import com.alibaba.fastjson.JSONArray;
|
import com.shlanbao.tzsc.base.mapping.MdEquipment;
|
import com.shlanbao.tzsc.base.model.Combobox;
|
import com.shlanbao.tzsc.pms.md.eqp.beans.EquipmentsBean;
|
import com.shlanbao.tzsc.pms.md.eqpcategory.beans.MdEqpCategoryBean;
|
import com.shlanbao.tzsc.pms.md.eqptype.beans.MdEqpTypeBean;
|
import com.shlanbao.tzsc.pms.md.fixCode.beans.FixCodeBean;
|
import com.shlanbao.tzsc.pms.md.mat.beans.MatBean;
|
import com.shlanbao.tzsc.pms.md.matgrp.beans.MatGrpBean;
|
import com.shlanbao.tzsc.pms.md.matparam.beans.MatParamBean;
|
import com.shlanbao.tzsc.pms.md.mattype.beans.MatTypeBean;
|
import com.shlanbao.tzsc.pms.md.shift.beans.ShiftBean;
|
import com.shlanbao.tzsc.pms.md.team.beans.TeamBean;
|
import com.shlanbao.tzsc.pms.md.unit.beans.UnitBean;
|
import com.shlanbao.tzsc.pms.md.workshop.beans.WorkShopBean;
|
import com.shlanbao.tzsc.pms.sys.role.beans.RoleBean;
|
import com.shlanbao.tzsc.utils.params.ComboboxType;
|
import com.shlanbao.tzsc.utils.tools.Mes2DASParams;
|
import com.shlanbao.tzsc.utils.tools.RedisUtil;
|
|
/**
|
* 基础参数类
|
* <li>@author Leejean
|
* <li>@create 2014-7-5下午09:22:47
|
* <li>存放项目运行过程中常用而不经常改变的基础参数
|
* <li>如:班次,班组,机组信息等
|
*/
|
public class BaseParams {
|
|
/**
|
* 车间
|
*/
|
private static List<Combobox> workShopCombobox = new ArrayList<Combobox>();
|
private static List<WorkShopBean> workShopLt = new ArrayList<WorkShopBean>();
|
|
|
/**
|
* 基础数据导入转换ID,name
|
* */
|
private static List<Map<String,String>> listSysEqpType = new ArrayList<Map<String,String>>();
|
|
|
/**
|
* wct 登录名对应的设备
|
*/
|
private static Map<String,List<MdEquipment>> wctEquMap=new HashMap<>();
|
|
public static Map<String, List<MdEquipment>> getWctEquMap() {
|
return wctEquMap;
|
}
|
|
public static void setWctEquMap(Map<String, List<MdEquipment>> wctEquMap) {
|
BaseParams.wctEquMap = wctEquMap;
|
}
|
|
/**
|
* 【功能说明】:辅料初始化
|
* @author wanchanghuang
|
* @time 2015年8月10日16:06:47
|
*
|
*/
|
private static List<MatParamBean> allMdMatParam = new ArrayList<MatParamBean>();
|
|
|
public static List<Map<String, String>> getListSysEqpType() {
|
return listSysEqpType;
|
}
|
|
public static void setListSysEqpType(List<Map<String, String>> listSysEqpType) {
|
BaseParams.listSysEqpType = listSysEqpType;
|
}
|
|
public static List<MatParamBean> getAllMdMatParam() {
|
return allMdMatParam;
|
}
|
|
public static void setAllMdMatParam(List<MatParamBean> allMdMatParam) {
|
BaseParams.allMdMatParam = allMdMatParam;
|
}
|
|
public static List<Combobox> getAllFiltersCombobox(boolean setAll) {
|
List<Combobox> allFiltersCombobox = JSONArray.parseArray(
|
(String) RedisUtil.getMapKey("baseParams","FILTERSCOMBO"),Combobox.class);
|
if(setAll){
|
return setAll(allFiltersCombobox);
|
}
|
return allFiltersCombobox;
|
}
|
|
|
public static List<Combobox> getEqpCategoryCombobox(boolean setAll) {
|
List<Combobox> eqpCategoryCombobox = JSONArray.parseArray(
|
(String) RedisUtil.getMapKey("baseParams","EQPCATEGORYCOMBO"),Combobox.class);
|
if(setAll){
|
return setAll(eqpCategoryCombobox);
|
}
|
return eqpCategoryCombobox;
|
}
|
|
public static List<Combobox> getAllEqpsCombobox(boolean setAll) {
|
List<Combobox> allEqpsCombobox = JSONArray.parseArray(
|
(String) RedisUtil.getMapKey("baseParams","ALLEQPSCOMBO"),Combobox.class);
|
if(setAll){
|
return setAll(allEqpsCombobox);
|
}
|
return allEqpsCombobox;
|
}
|
|
public static List<Combobox> getAllPackersCombobox(boolean setAll) {
|
List<Combobox> allPackersCombobox = JSONArray.parseArray(
|
(String) RedisUtil.getMapKey("baseParams","PACKERSCOMBO"),Combobox.class);
|
if(setAll){
|
return setAll(allPackersCombobox);
|
}
|
return allPackersCombobox;
|
}
|
|
|
public static List<Combobox> getAllRollersCombobox(boolean setAll) {
|
List<Combobox> allRollersCombobox = JSONArray.parseArray(
|
(String) RedisUtil.getMapKey("baseParams","ROLLERSCOMBO"),Combobox.class);
|
if(setAll){
|
return setAll(allRollersCombobox);
|
}
|
return allRollersCombobox;
|
}
|
|
|
public static List<Combobox> getAllBoxersCombobox(boolean setAll) {
|
List<Combobox> allBoxersCombobox = JSONArray.parseArray(
|
(String) RedisUtil.getMapKey("baseParams","BOXERSCOMBO"),Combobox.class);
|
if(setAll){
|
return setAll(allBoxersCombobox);
|
}
|
return allBoxersCombobox;
|
}
|
|
|
public static List<Combobox> getEqpTypesCombobox(boolean setAll) {
|
List<Combobox> eqpTypesCombobox = JSONArray.parseArray(
|
(String) RedisUtil.getMapKey("baseParams","EQPTYPECOMBO"),Combobox.class);
|
if(setAll){
|
return setAll(eqpTypesCombobox);
|
}
|
return eqpTypesCombobox;
|
}
|
|
public static List<Combobox> getUnitCombobox(boolean setAll) {
|
List<Combobox> unitCombobox = JSONArray.parseArray(
|
(String) RedisUtil.getMapKey("baseParams","UNITCOMBO"),Combobox.class);
|
if(setAll){
|
return setAll(unitCombobox);
|
}
|
return unitCombobox;
|
}
|
|
public static List<Combobox> getShiftCombobox(boolean setAll) {
|
List<Combobox> shiftCombobox = JSONArray.parseArray(
|
(String) RedisUtil.getMapKey("baseParams","SHIFTCOMBO"),Combobox.class);
|
if(setAll){
|
return setAll(shiftCombobox);
|
}
|
return shiftCombobox;
|
}
|
|
public static List<Combobox> getTeamCombobox(boolean setAll) {
|
List<Combobox> teamCombobox = JSONArray.parseArray(
|
(String) RedisUtil.getMapKey("baseParams","TEAMCOMBO"),Combobox.class);
|
if(setAll){
|
return setAll(teamCombobox);
|
}
|
return teamCombobox;
|
}
|
|
public static List<Combobox> getWorkShopCombobox(boolean setAll) {
|
if(setAll){
|
return setAll(workShopCombobox);
|
}
|
return workShopCombobox;
|
}
|
|
public static void setWorkShopCombobox(List<Combobox> workShopCombobox) {
|
BaseParams.workShopCombobox = workShopCombobox;
|
}
|
|
public static List<Combobox> getEqpTypesComboboxCombobox(boolean setAll) {
|
List<Combobox> eqpTypesCombobox = JSONArray.parseArray(
|
(String) RedisUtil.getMapKey("baseParams","EQPTYPECOMBO"),Combobox.class);
|
if(setAll){
|
return setAll(eqpTypesCombobox);
|
}
|
return eqpTypesCombobox;
|
}
|
|
public static List<Combobox> getMatProdCombobox(boolean setAll) {
|
List<Combobox> matProdCombobox = JSONArray.parseArray(
|
(String) RedisUtil.getMapKey("baseParams","MATPRODCOMBO"),Combobox.class);
|
if(setAll){
|
return setAll(matProdCombobox);
|
}
|
return matProdCombobox;
|
}
|
|
public static List<Combobox> getMatGrpCombobox(boolean setAll) {
|
List<Combobox> matGrpCombobox = JSONArray.parseArray(
|
(String) RedisUtil.getMapKey("baseParams","MATGRPCOMBO"),Combobox.class);
|
if(setAll){
|
return setAll(matGrpCombobox);
|
}
|
return matGrpCombobox;
|
}
|
|
public static List<Combobox> getMatTypeCombobox(boolean setAll) {
|
List<Combobox> matTypeCombobox = JSONArray.parseArray(
|
(String) RedisUtil.getMapKey("baseParams","MATTYPECOMBO"),Combobox.class);
|
if(setAll){
|
return setAll(matTypeCombobox);
|
}
|
return matTypeCombobox;
|
}
|
|
public static List<FixCodeBean> getListMdFixCode() {
|
List<FixCodeBean> listMdFixCode = JSONArray.parseArray(
|
(String) RedisUtil.getMapKey("baseParams","FIXCODES"),FixCodeBean.class);
|
return listMdFixCode;
|
}
|
|
public static List<RoleBean> getListRole() {
|
List<RoleBean> listRole = JSONArray.parseArray(
|
(String) RedisUtil.getMapKey("baseParams","ROLLERS"),RoleBean.class);
|
return listRole;
|
}
|
|
public static List<EquipmentsBean> getAllEquipments() {
|
List<EquipmentsBean> allEquipments = JSONArray.parseArray(
|
(String) RedisUtil.getMapKey("baseParams","ALLEQPS"),EquipmentsBean.class);
|
return allEquipments;
|
}
|
|
public static List<MdEqpTypeBean> getAllEqpTypes() {
|
List<MdEqpTypeBean> allEqpTypes = JSONArray.parseArray(
|
(String) RedisUtil.getMapKey("baseParams","EQPTYPE"),MdEqpTypeBean.class);
|
return allEqpTypes;
|
}
|
|
/**
|
* 添加[全部]选项
|
* @author Leejean
|
* @create 2014年12月2日上午8:45:53
|
* @param sourceList
|
* @return
|
*/
|
private static List<Combobox> setAll(List<Combobox> sourceList) {
|
List<Combobox> cb = new ArrayList<Combobox>(sourceList);
|
cb.add(0, new Combobox("", "全部"));
|
return cb;
|
}
|
|
public static List<Combobox> getMatFilterCombobox(boolean setAll) {
|
List<Combobox> matFilterCombobox = JSONArray.parseArray(
|
(String) RedisUtil.getMapKey("baseParams","MATFILTERCOMBO"),Combobox.class);
|
if(setAll){
|
return setAll(matFilterCombobox);
|
}
|
return matFilterCombobox;
|
}
|
|
public static List<Combobox> getFlFilterCombobox(boolean setAll) {
|
List<Combobox> flFilterCombobox = JSONArray.parseArray(
|
(String) RedisUtil.getMapKey("baseParams","FLFILTERCOMBO"),Combobox.class);
|
if(setAll){
|
return setAll(flFilterCombobox);
|
}
|
return flFilterCombobox;
|
}
|
|
public static List<ShiftBean> getShiftLt() {
|
List<ShiftBean> shiftLt = JSONArray.parseArray(
|
(String) RedisUtil.getMapKey("baseParams","SHIFT"),ShiftBean.class);
|
return shiftLt;
|
}
|
|
public static List<TeamBean> getTeamLt() {
|
List<TeamBean> teamLt = JSONArray.parseArray(
|
(String) RedisUtil.getMapKey("baseParams","TEAM"),TeamBean.class);
|
return teamLt;
|
}
|
|
public static List<WorkShopBean> getWorkShopLt() {
|
return workShopLt;
|
}
|
|
public static void setWorkShopLt(List<WorkShopBean> workShopLt) {
|
BaseParams.workShopLt = workShopLt;
|
}
|
|
public static List<MatBean> getMatProdLt() {
|
List<MatBean> matProdLt = JSONArray.parseArray(
|
(String) RedisUtil.getMapKey("baseParams","MATPROD"),MatBean.class);
|
return matProdLt;
|
}
|
|
public static List<MatBean> getMatFilterLt() {
|
List<MatBean> matFilterLt = JSONArray.parseArray(
|
(String) RedisUtil.getMapKey("baseParams","MATFILTER"),MatBean.class);
|
return matFilterLt;
|
}
|
|
public static List<MatGrpBean> getMatGrpLt() {
|
List<MatGrpBean> matGrpLt = JSONArray.parseArray(
|
(String) RedisUtil.getMapKey("baseParams","MATGRP"),MatGrpBean.class);
|
return matGrpLt;
|
}
|
|
public static List<MatTypeBean> getMatTypeLt() {
|
List<MatTypeBean> matTypeLt = JSONArray.parseArray(
|
(String) RedisUtil.getMapKey("baseParams","MATTYPE"),MatTypeBean.class);
|
return matTypeLt;
|
}
|
|
public static List<UnitBean> getUnitLt() {
|
List<UnitBean> unitLt = JSONArray.parseArray(
|
(String) RedisUtil.getMapKey("baseParams","UNIT"),UnitBean.class);
|
return unitLt;
|
}
|
|
public static List<MdEqpCategoryBean> getEqpCategoryLt() {
|
List<MdEqpCategoryBean> eqpCategoryLt = JSONArray.parseArray(
|
(String) RedisUtil.getMapKey("baseParams","EQPCATEGORY"),MdEqpCategoryBean.class);
|
return eqpCategoryLt;
|
}
|
|
|
public static List<EquipmentsBean> getAllPackersLt() {
|
List<EquipmentsBean> allPackersLt = JSONArray.parseArray(
|
(String) RedisUtil.getMapKey("baseParams","PACKERS"),EquipmentsBean.class);
|
return allPackersLt;
|
}
|
|
public static List<EquipmentsBean> getAllRollersLt() {
|
List<EquipmentsBean> allRollersLt = JSONArray.parseArray(
|
(String) RedisUtil.getMapKey("baseParams","ROLLERS"),EquipmentsBean.class);
|
return allRollersLt;
|
}
|
|
public static List<EquipmentsBean> getAllBoxersLt() {
|
List<EquipmentsBean> allBoxersLt = JSONArray.parseArray(
|
(String) RedisUtil.getMapKey("baseParams","BOXERS"),EquipmentsBean.class);
|
return allBoxersLt;
|
}
|
|
public static List<EquipmentsBean> getAllFiltersLt() {
|
List<EquipmentsBean> allFiltersLt = JSONArray.parseArray(
|
(String) RedisUtil.getMapKey("baseParams","FILTERS"),EquipmentsBean.class);
|
return allFiltersLt;
|
}
|
|
|
public static List<Combobox> getAllTransmCombobox(boolean setAll) {
|
List<Combobox> allTransmCombobox = JSONArray.parseArray(
|
(String) RedisUtil.getMapKey("baseParams","TRANSMCOMBO"),Combobox.class);
|
if(setAll){
|
return setAll(allTransmCombobox);
|
}
|
return allTransmCombobox;
|
}
|
|
|
public static List<EquipmentsBean> getAllTransmsLt(boolean setAll) {
|
List<EquipmentsBean> allTransmsLt = JSONArray.parseArray(
|
(String) RedisUtil.getMapKey("baseParams","TRANSM"),EquipmentsBean.class);
|
return allTransmsLt;
|
|
}
|
|
public static String LOCALADRESS = "";
|
|
|
|
|
}
|