| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.iailab.framework.common.util.date.DateUtils; |
| | | import com.iailab.module.model.mcs.pre.dao.MmItemResultDao; |
| | | import com.iailab.module.model.mcs.pre.entity.MmItemOutputEntity; |
| | | import com.iailab.module.model.mcs.pre.entity.MmItemResultEntity; |
| | | import com.iailab.module.model.mcs.pre.entity.MmItemResultJsonEntity; |
| | | import com.iailab.module.model.mcs.pre.service.MmItemResultService; |
| | |
| | | }); |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | | public void savePredictValue(Map<MmItemOutputEntity, Double> predictDoubleValues, Date predictTime) { |
| | | for (Map.Entry<MmItemOutputEntity, Double> entry : predictDoubleValues.entrySet()) { |
| | | MmItemResultJsonEntity resultJson = new MmItemResultJsonEntity(); |
| | | resultJson.setId(UUID.randomUUID().toString()); |
| | | resultJson.setOutputid(entry.getKey().getId()); |
| | | resultJson.setPredicttime(predictTime); |
| | | resultJson.setCumulant(String.valueOf(entry.getValue())); |
| | | Map<String, Object> map4 = new HashMap(2); |
| | | map4.put("TABLENAME", "T_MM_ITEM_RESULT_JSON"); |
| | | map4.put("entity", resultJson); |
| | | mmItemResultDao.savePredictJsonValue(map4); |
| | | } |
| | | } |
| | | } |