From 8a6b19bf5c50ebb54e965645a9366f6cfea02351 Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期三, 25 十二月 2024 15:03:44 +0800 Subject: [PATCH] 调度记录查看 --- iailab-module-model/iailab-module-model-biz/db/mysql.sql | 5 ++++- iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/entity/StScheduleRecordEntity.java | 10 ++++++++++ iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/vo/StScheduleRecordRespVO.java | 6 ++++++ iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/vo/ScheduleResultVO.java | 5 +++++ iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/schedule/impl/ScheduleModelHandlerImpl.java | 3 ++- iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/service/impl/StScheduleRecordServiceImpl.java | 3 +++ 6 files changed, 30 insertions(+), 2 deletions(-) diff --git a/iailab-module-model/iailab-module-model-biz/db/mysql.sql b/iailab-module-model/iailab-module-model-biz/db/mysql.sql index 1381cea..0d9da47 100644 --- a/iailab-module-model/iailab-module-model-biz/db/mysql.sql +++ b/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; \ No newline at end of file +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; \ No newline at end of file diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/entity/StScheduleRecordEntity.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/entity/StScheduleRecordEntity.java index 82e5c46..4566dcd 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/entity/StScheduleRecordEntity.java +++ b/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; + } \ No newline at end of file diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/service/impl/StScheduleRecordServiceImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/service/impl/StScheduleRecordServiceImpl.java index 58479dd..dd844be 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/service/impl/StScheduleRecordServiceImpl.java +++ b/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); } diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/vo/StScheduleRecordRespVO.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/vo/StScheduleRecordRespVO.java index 7889a5b..b6a59aa 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/vo/StScheduleRecordRespVO.java +++ b/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; } \ No newline at end of file diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/schedule/impl/ScheduleModelHandlerImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/schedule/impl/ScheduleModelHandlerImpl.java index 70a3172..104d7d1 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/schedule/impl/ScheduleModelHandlerImpl.java +++ b/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()); diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/vo/ScheduleResultVO.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/vo/ScheduleResultVO.java index 36b14f7..6023030 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/vo/ScheduleResultVO.java +++ b/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; -- Gitblit v1.9.3