| | |
| | | @Autowired |
| | | private StationOperateProcessUtils stationOperateProcessUtils; |
| | | |
| | | private static final String CRN_OUT_REQUIRE_STATION_OUT_ENABLE_CONFIG = "crnOutRequireStationOutEnable"; |
| | | |
| | | public synchronized void crnIoExecute() { |
| | | Object systemConfigMapObj = redisUtil.get(RedisKeyType.SYSTEM_CONFIG_MAP.key); |
| | | if (systemConfigMapObj != null) { |
| | |
| | | continue; |
| | | } |
| | | |
| | | if (!stationProtocol.isOutEnable()) { |
| | | if (isRequireOutboundStationOutEnable() && !stationProtocol.isOutEnable()) { |
| | | News.taskInfo(wrkMast.getWrkNo(), "放货站点:{} 没有可出信号", stationObjModel.getStationId()); |
| | | continue; |
| | | } |
| | |
| | | continue; |
| | | } |
| | | |
| | | if (!stationProtocol.isOutEnable()) { |
| | | if (isRequireOutboundStationOutEnable() && !stationProtocol.isOutEnable()) { |
| | | News.taskInfo(wrkMast.getWrkNo(), "放货站点:{} 没有可出信号", stationObjModel.getStationId()); |
| | | continue; |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | private boolean isRequireOutboundStationOutEnable() { |
| | | return getSystemConfigBoolean(CRN_OUT_REQUIRE_STATION_OUT_ENABLE_CONFIG, true); |
| | | } |
| | | |
| | | private boolean getSystemConfigBoolean(String code, boolean defaultValue) { |
| | | Object systemConfigMapObj = redisUtil.get(RedisKeyType.SYSTEM_CONFIG_MAP.key); |
| | | if (!(systemConfigMapObj instanceof Map)) { |
| | | return defaultValue; |
| | | } |
| | | try { |
| | | Object value = ((Map<?, ?>) systemConfigMapObj).get(code); |
| | | if (value == null) { |
| | | return defaultValue; |
| | | } |
| | | String text = String.valueOf(value).trim(); |
| | | if ("Y".equalsIgnoreCase(text) || "true".equalsIgnoreCase(text) || "1".equals(text)) { |
| | | return true; |
| | | } |
| | | if ("N".equalsIgnoreCase(text) || "false".equalsIgnoreCase(text) || "0".equals(text)) { |
| | | return false; |
| | | } |
| | | } catch (Exception ignore) { |
| | | } |
| | | return defaultValue; |
| | | } |
| | | |
| | | private synchronized boolean crnExecuteLocTransfer(BasCrnp basCrnp, CrnThread crnThread) { |
| | | CrnProtocol crnProtocol = crnThread.getStatus(); |
| | | if(crnProtocol == null){ |