| | |
| | | @Schema(description = "调度方案时间") |
| | | @NotNull(message="调度方案时间不能为空") |
| | | private Date scheduleTime; |
| | | |
| | | private String modelCode; |
| | | |
| | | private Map<String, Object> params; |
| | | } |
| | |
| | | INSERT INTO `iailab_plat_system`.`system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1629, 2, 'double[][]', '2', 'model_result_type', 0, '', '', '', '141', '2024-11-11 15:21:17', '141', '2024-11-11 15:21:17', b'0'); |
| | | |
| | | |
| | | alter table t_mm_item_output add column `result_name` varchar(50) DEFAULT NULL; |
| | | alter table t_mm_item_output add column `result_name` varchar(50) DEFAULT NULL; |
| | | |
| | | |
| | | alter table t_st_schedule_scheme add column `mpkprojectid` varchar(36) DEFAULT NULL; |
| | |
| | | resp.setScheduleTime(reqDTO.getScheduleTime()); |
| | | try { |
| | | log.info("调度计算开始: " + System.currentTimeMillis()); |
| | | ScheduleResultVO scheduleResult = scheduleModelHandler.doSchedule(reqDTO.getModelCode(), reqDTO.getScheduleTime()); |
| | | ScheduleResultVO scheduleResult = scheduleModelHandler.doSchedule(reqDTO.getScheduleCode(), reqDTO.getScheduleTime()); |
| | | resp.setResult(scheduleResult.getResult()); |
| | | log.info("预测计算结束: " + System.currentTimeMillis()); |
| | | } catch (Exception ex) { |
| | |
| | | * 备注 |
| | | */ |
| | | private String remark; |
| | | |
| | | /** |
| | | * 项目ID |
| | | */ |
| | | private String mpkprojectid; |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void update(StScheduleSchemeSaveReqVO createReqVO) { |
| | | StScheduleSchemeEntity entity = BeanUtils.toBean(createReqVO, StScheduleSchemeEntity.class); |
| | | public void update(StScheduleSchemeSaveReqVO updateReqVO) { |
| | | StScheduleSchemeEntity entity = BeanUtils.toBean(updateReqVO, StScheduleSchemeEntity.class); |
| | | baseDao.updateById(entity); |
| | | } |
| | | |
| | |
| | | @Schema(description = "状态(0正常 1停用)", example = "0") |
| | | private Integer status; |
| | | |
| | | |
| | | @Schema(description = "项目ID") |
| | | private String mpkprojectid; |
| | | } |
| | |
| | | public class StScheduleSchemeSaveReqVO { |
| | | |
| | | @Schema(description = "ID") |
| | | private Long id; |
| | | private String id; |
| | | |
| | | @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotNull(message = "编号不能为空") |
| | |
| | | |
| | | @Schema(description = "备注") |
| | | private String remark; |
| | | |
| | | @Schema(description = "项目ID") |
| | | private String mpkprojectid; |
| | | } |
| | |
| | | } |
| | | modelResult = (HashMap<String, Object>) modelResult.get(CommonConstant.MDK_RESULT); |
| | | //打印结果 |
| | | log.info("模型计算完成:modelId=" + modelId + modelResult); |
| | | log.info("预测模型计算完成:modelId=" + modelId + modelResult); |
| | | JSONObject jsonObjResult = new JSONObject(); |
| | | jsonObjResult.put("result", modelResult); |
| | | log.info(String.valueOf(jsonObjResult)); |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.iail.IAILMDK; |
| | | import com.iail.model.IAILModel; |
| | | import com.iailab.module.model.common.enums.CommonConstant; |
| | | import com.iailab.module.model.mcs.sche.entity.StScheduleModelEntity; |
| | | import com.iailab.module.model.mcs.sche.entity.StScheduleModelSettingEntity; |
| | | import com.iailab.module.model.mcs.sche.entity.StScheduleSchemeEntity; |
| | |
| | | import com.iailab.module.model.mdk.sample.dto.SampleData; |
| | | import com.iailab.module.model.mdk.schedule.ScheduleModelHandler; |
| | | import com.iailab.module.model.mdk.vo.ScheduleResultVO; |
| | | import com.iailab.module.model.mpk.common.utils.DllUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | |
| | | //IAILMDK.run |
| | | HashMap<String, Object> result = IAILMDK.run(newModelBean, param2Values); |
| | | /*HashMap<String, Object> modelResult = DllUtils.run(newModelBean, param2Values, predictModel.getMpkprojectid()); |
| | | if (!modelResult.containsKey(CommonConstant.MDK_STATUS_CODE) || !modelResult.containsKey(CommonConstant.MDK_RESULT) || |
| | | !modelResult.get(CommonConstant.MDK_STATUS_CODE).toString().equals(CommonConstant.MDK_STATUS_100)) { |
| | | throw new RuntimeException("模型结果异常:" + modelResult); |
| | | } |
| | | modelResult = (HashMap<String, Object>) modelResult.get(CommonConstant.MDK_RESULT);*/ |
| | | |
| | | //打印结果 |
| | | JSONObject jsonObjResult = new JSONObject(); |