潘志宝
2024-12-25 8a6b19bf5c50ebb54e965645a9366f6cfea02351
调度记录查看
已修改6个文件
32 ■■■■■ 文件已修改
iailab-module-model/iailab-module-model-biz/db/mysql.sql 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/entity/StScheduleRecordEntity.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/service/impl/StScheduleRecordServiceImpl.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/vo/StScheduleRecordRespVO.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/schedule/impl/ScheduleModelHandlerImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/vo/ScheduleResultVO.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-model/iailab-module-model-biz/db/mysql.sql
@@ -878,4 +878,7 @@
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;
alter table t_st_schedule_scheme add column `mpkprojectid` varchar(36) DEFAULT NULL;
alter table t_st_schedule_record add column `result_code` varchar(10) DEFAULT NULL;
alter table t_st_schedule_record add column `result_data` varchar(1000) DEFAULT NULL;
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/entity/StScheduleRecordEntity.java
@@ -49,4 +49,14 @@
     */
    private Date createTime;
    /**
     * 结果code
     */
    private String resultCode;
    /**
     * 结果数据
     */
    private String resultData;
}
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/service/impl/StScheduleRecordServiceImpl.java
@@ -1,5 +1,6 @@
package com.iailab.module.model.mcs.sche.service.impl;
import com.alibaba.fastjson.JSON;
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
import com.iailab.framework.common.pojo.PageResult;
import com.iailab.framework.common.service.impl.BaseServiceImpl;
@@ -55,6 +56,8 @@
        entity.setSchemeId(resultVO.getSchemeId());
        entity.setScheduleTime(resultVO.getScheduleTime());
        entity.setModelId(resultVO.getModelId());
        entity.setResultCode(resultVO.getResultCode());
        entity.setResultData(JSON.toJSONString(resultVO.getResult()));
        baseDao.insert(entity);
        stScheduleRecordDetailService.create(entity.getId(), resultVO);
    }
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/vo/StScheduleRecordRespVO.java
@@ -35,6 +35,12 @@
    @Schema(description = "创建时间")
    private Date createTime;
    @Schema(description = "结果状态")
    private String resultCode;
    @Schema(description = "结果数据")
    private String resultData;
    @Schema(description = "详情")
    private List<StScheduleRecordDetailRespVO> detailList;
}
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/schedule/impl/ScheduleModelHandlerImpl.java
@@ -103,13 +103,14 @@
                throw new RuntimeException("模型结果异常:" + modelResult);
            }
            modelResult = (HashMap<String, Object>) modelResult.get(CommonConstant.MDK_RESULT);
            String statusCode = modelResult.get(CommonConstant.MDK_STATUS_CODE).toString();
            //打印结果
            JSONObject jsonObjResult = new JSONObject();
            jsonObjResult.put("result", modelResult);
            log.info(String.valueOf(jsonObjResult));
            //5.返回调度结果
            scheduleResult.setResultCode(statusCode);
            scheduleResult.setResult(modelResult);
            scheduleResult.setModelId(modelId);
            scheduleResult.setSchemeId(scheduleScheme.getId());
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/vo/ScheduleResultVO.java
@@ -42,6 +42,11 @@
    private Date scheduleTime;
    /**
     * resultCode
     */
    private String resultCode;
    /**
     * 模型结果
     */
    private Map<String, Object> result;