| | |
| | | clearPlcRequestFields(deviceConfig, serializer); |
| | | return buildResult(deviceConfig, "scanOnce", false, "MES写区未提供玻璃ID", null); |
| | | } |
| | | // 读取MES尺寸数据:mesWidth=表宽,mesHeight=长 |
| | | // 读取MES尺寸数据:mesWidth=宽,mesHeight=长 |
| | | Integer rawWidth = parseInteger(mesData.get("mesWidth")); |
| | | Integer rawHeight = parseInteger(mesData.get("mesHeight")); |
| | | Integer workLine = parseInteger(mesData.get("workLine")); |
| | |
| | | saveScannedGlassId(params, glassId); |
| | | |
| | | Integer intervalMs = config != null ? config.getScanIntervalMs() : null; |
| | | String msg = String.format("玻璃[%s] 尺寸[表宽:%s x 长:%s] 已接收,workLine=%s,扫描间隔=%s", |
| | | String msg = String.format("玻璃[%s] 尺寸[宽:%s x 长:%s] 已接收,workLine=%s,扫描间隔=%s", |
| | | glassId, |
| | | rawWidth != null ? rawWidth + "mm" : "-", |
| | | rawHeight != null ? rawHeight + "mm" : "-", |
| | |
| | | private GlassInfo buildGlassInfo(String glassId, Integer width, Integer height, Integer workLine) { |
| | | GlassInfo glassInfo = new GlassInfo(); |
| | | glassInfo.setGlassId(glassId.trim()); |
| | | // mesWidth=表宽 -> glassWidth, mesHeight=长 -> glassLength |
| | | // mesWidth=宽 -> glassWidth, mesHeight=长 -> glassLength |
| | | if (width != null) { |
| | | glassInfo.setGlassWidth(width); |
| | | } |