7 changed files with 163 additions and 94 deletions
@ -0,0 +1,20 @@ |
|||||
|
package com.win.module.mes.enums; |
||||
|
|
||||
|
public class MesConfigKeys { |
||||
|
/**是否开启齐套检查*/ |
||||
|
public static final String PRE_START_CHECK_ON="mes_pre_start_check_on"; |
||||
|
/**是否顺序生产:开启时只能按顺序进行工单开工,关闭时可以任意选择一个工单开工*/ |
||||
|
public static final String STRICT_ON_SEQUENCE="mes_strict_on_sequence"; |
||||
|
/**工位校验开关-是否设备校验*/ |
||||
|
public static final String CHECK_EQUIPMENT_ON="mes_check_equipment_on"; |
||||
|
/**工位校验开关-是否物料校验*/ |
||||
|
public static final String CHECK_MATERIAL_ON="mes_check_material_on"; |
||||
|
/**工位校验开关-是否技能校验*/ |
||||
|
public static final String CHECK_ABILITY_ON="mes_check_ability_on"; |
||||
|
/**工位校验开关-是否步骤校验*/ |
||||
|
public static final String CHECK_STEPS_ON="mes_check_steps_on"; |
||||
|
/**工位校验开关-是否岗位校验*/ |
||||
|
public static final String CHECK_POST_ON="mes_check_post_on"; |
||||
|
/**是否允许工序多次报工*/ |
||||
|
public static final String ALLOW_MUTI_REPORT_PROCESS="mes_allow_muti_report_process"; |
||||
|
} |
@ -0,0 +1,34 @@ |
|||||
|
package com.win.module.mes.config; |
||||
|
|
||||
|
import com.win.module.infra.api.config.ConfigApi; |
||||
|
import com.win.module.infra.vo.ConfigInfoVO; |
||||
|
import com.win.module.system.util.StringUtils; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import javax.annotation.Resource; |
||||
|
|
||||
|
|
||||
|
@Service |
||||
|
public class InfaConfigUtil { |
||||
|
@Resource |
||||
|
private ConfigApi apiConfigApi; |
||||
|
public Boolean getBooleanValue(String key,Boolean defaulValue){ |
||||
|
return Boolean.valueOf(getStringValue(key,String.valueOf(defaulValue))); |
||||
|
} |
||||
|
|
||||
|
public String getStringValue(String key,String defaulValue){ |
||||
|
ConfigInfoVO configInfoVO = apiConfigApi.queryConfigInfoByKey(key); |
||||
|
if(StringUtils.isNull(configInfoVO)){ |
||||
|
return defaulValue; |
||||
|
}else{ |
||||
|
if (StringUtils.isNull(configInfoVO.getValue())){ |
||||
|
return defaulValue; |
||||
|
}else{ |
||||
|
return configInfoVO.getValue(); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
public Integer getIntegerValue(String key,Integer defaulValue){ |
||||
|
return Integer.valueOf(getStringValue(key,String.valueOf(defaulValue))); |
||||
|
} |
||||
|
} |
@ -1,21 +0,0 @@ |
|||||
package com.win.module.mes.config; |
|
||||
|
|
||||
public class MesBaseConfig { |
|
||||
/** |
|
||||
* MES工作流中的通用配置项 |
|
||||
* */ |
|
||||
//是否开工检查
|
|
||||
public static final Boolean PRE_START_CHECK_ON=true; |
|
||||
//是否顺序生产:开启时只能按顺序进行工单开工,关闭时可以任意选择一个工单开工
|
|
||||
public static final Boolean STRICT_ON_SEQUENCE=true; |
|
||||
//工位校验开关-是否设备校验
|
|
||||
public static final Boolean CHECK_EQUIPMENT_ON=true; |
|
||||
//工位校验开关-是否物料校验
|
|
||||
public static final Boolean CHECK_MATERIAL_ON=true; |
|
||||
//工位校验开关-是否技能校验
|
|
||||
public static final Boolean CHECK_ABILITY_ON=true; |
|
||||
//工位校验开关-是否步骤校验
|
|
||||
public static final Boolean CHECK_STEPS_ON=true; |
|
||||
//工位校验开关-是否岗位校验
|
|
||||
public static final Boolean CHECK_POST_ON=true; |
|
||||
} |
|
Loading…
Reference in new issue