| | |
| | | List<TemperingGlassInfo> layoutId = temperingAgoService.selectLayoutId(); |
| | | //进炉中的玻璃 |
| | | if (!layoutId.isEmpty()) { |
| | | List<TemperingGlassInfo> intoGlass = temperingAgoService.selectIntoGlass(layoutId.get(0)); |
| | | jsonObject.append("intoGlass", intoGlass); |
| | | //进炉中的第二个版图 |
| | | if (layoutId.size() > 1) { |
| | | List<TemperingGlassInfo> intoGlass2 = temperingAgoService.selectIntoGlass(layoutId.get(1)); |
| | | jsonObject.append("intoGlass2", intoGlass2); |
| | | for (int i = 0; i < layoutId.size(); i++) { |
| | | List<TemperingGlassInfo> intoGlass = temperingAgoService.selectIntoGlass(layoutId.get(i)); |
| | | jsonObject.append("intoGlass" + (i + 1), intoGlass); |
| | | } |
| | | // List<TemperingGlassInfo> intoGlass = temperingAgoService.selectIntoGlass(layoutId.get(0)); |
| | | // jsonObject.append("intoGlass", intoGlass); |
| | | // //进炉中的第二个版图 |
| | | // if (layoutId.size() > 1) { |
| | | // List<TemperingGlassInfo> intoGlass2 = temperingAgoService.selectIntoGlass(layoutId.get(1)); |
| | | // jsonObject.append("intoGlass2", intoGlass2); |
| | | // } |
| | | |
| | | } |
| | | //出炉后的玻璃 |
| | | List<TemperingGlassInfo> outGlass = temperingAgoService.selectOutGlass(); |
| | |
| | | if (outGlass != null) { |
| | | jsonObject.append("overGlass", overGlass); |
| | | } |
| | | //当前钢化工程的拿走数据 |
| | | LambdaQueryWrapper<TemperingGlassInfo> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.select(TemperingGlassInfo::getEngineerId) |
| | | .lt(TemperingGlassInfo::getState, Const.TEMPERING_END) |
| | | .groupBy(TemperingGlassInfo::getEngineerId); |
| | | |
| | | List<String> engineerIds = temperingAgoService.list(queryWrapper) |
| | | .stream() |
| | | .map(TemperingGlassInfo::getEngineerId) |
| | | .distinct() |
| | | .collect(Collectors.toList()); |
| | | |
| | | List<Damage> temperingTakeGlassInfos = damageService.list( |
| | | new LambdaQueryWrapper<Damage>() |
| | | .in(Damage::getEngineerId, engineerIds) |
| | | .eq(Damage::getType, Const.GLASS_STATE_TAKE) |
| | | .orderByAsc(Damage::getId) |
| | | ); |
| | | |
| | | |
| | | jsonObject.append("temperingTakeGlassInfos", temperingTakeGlassInfos); |
| | | |
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("temperingGlass"); |
| | | if (sendwServer != null) { |