From 874dd8d939b4ae61efbb799855c9ddf328722972 Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期三, 25 十二月 2024 18:08:08 +0800
Subject: [PATCH] Merge branch 'master' of http://dlindusit.com:53929/r/iailab-plat

---
 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/service/impl/StScheduleRecordServiceImpl.java |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

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 ac33fbc..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,18 +1,24 @@
 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;
+import com.iailab.framework.common.util.object.ConvertUtils;
 import com.iailab.module.model.mcs.sche.dao.StScheduleRecordDao;
+import com.iailab.module.model.mcs.sche.entity.StScheduleRecordDetailEntity;
 import com.iailab.module.model.mcs.sche.entity.StScheduleRecordEntity;
 import com.iailab.module.model.mcs.sche.service.StScheduleRecordDetailService;
 import com.iailab.module.model.mcs.sche.service.StScheduleRecordService;
+import com.iailab.module.model.mcs.sche.vo.StScheduleRecordDetailRespVO;
 import com.iailab.module.model.mcs.sche.vo.StScheduleRecordPageReqVO;
+import com.iailab.module.model.mcs.sche.vo.StScheduleRecordRespVO;
 import com.iailab.module.model.mdk.vo.ScheduleResultVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.Date;
+import java.util.List;
 import java.util.UUID;
 
 /**
@@ -33,6 +39,15 @@
     }
 
     @Override
+    public StScheduleRecordRespVO getInfo(String id) {
+        StScheduleRecordEntity entity = baseDao.selectById(id);
+        StScheduleRecordRespVO respVO = ConvertUtils.sourceToTarget(entity, StScheduleRecordRespVO.class);
+        List<StScheduleRecordDetailEntity> list = stScheduleRecordDetailService.getByRecordId(id);
+        respVO.setDetailList(ConvertUtils.sourceToTarget(list, StScheduleRecordDetailRespVO.class));
+        return respVO;
+    }
+
+    @Override
     @DSTransactional(rollbackFor = Exception.class)
     public void create(ScheduleResultVO resultVO) {
         StScheduleRecordEntity entity = new StScheduleRecordEntity();
@@ -41,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);
     }

--
Gitblit v1.9.3