| | |
| | | |
| | | PredictResultVO predictResult = new PredictResultVO(); |
| | | for (ItemVO predictItem : predictItemList) { |
| | | if (!predictItem.getStatus().equals(ItemStatus.STATUS1)) { |
| | | if (!predictItem.getStatus().equals(ItemStatus.STATUS1.getCode())) { |
| | | continue; |
| | | } |
| | | try { |
| | | PredictItemHandler predictItemHandler = (PredictItemHandler)predictItemFactory.create(predictItem.getId()); |
| | | PredictItemHandler predictItemHandler = predictItemFactory.create(predictItem.getId()); |
| | | Instant start = Instant.now(); |
| | | try { |
| | | predictResult = predictItemHandler.predict(predictTime, predictItem); |
| | |
| | | Long drtSave = Duration.between(end, endSave).getSeconds(); |
| | | log.info(MessageFormat.format("预测项:{0},保存时间:{1}秒", predictItem.getItemName(), |
| | | drtSave)); |
| | | |
| | | result.put(predictItem.getItemNo(), predictResult); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error(MessageFormat.format("预测项编号:{0},预测项名称:{1},预测失败:{2} 预测时刻:{3}", |