Browse Source

Merge branch 'dev' of https://gitlink.org.cn/ci4s/ci4sManagement-cloud into dev

dev-active_learn
somunslotus 10 months ago
parent
commit
6892f53b1b
5 changed files with 18 additions and 10 deletions
  1. +3
    -0
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/ModelsService.java
  2. +2
    -0
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/NewDatasetService.java
  3. +1
    -0
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ModelsServiceImpl.java
  4. +1
    -1
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/NewDatasetServiceImpl.java
  5. +11
    -9
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/WorkspaceServiceImpl.java

+ 3
- 0
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/ModelsService.java View File

@@ -120,4 +120,7 @@ public interface ModelsService {
String praise(Integer id) throws Exception; String praise(Integer id) throws Exception;


String unpraise(Integer id) throws Exception; String unpraise(Integer id) throws Exception;

List<ModelsVo> convert(List<Map<String, Object>> lst, String modelTopic, String modelTagName, String modelTypeName);

} }

+ 2
- 0
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/NewDatasetService.java View File

@@ -42,4 +42,6 @@ public interface NewDatasetService {
Map<String, Object> getVersionsCompare(QueryModelMetricsVo querydatasetVo) throws Exception; Map<String, Object> getVersionsCompare(QueryModelMetricsVo querydatasetVo) throws Exception;


String newCreateVersionFromLabelStudio(LabelDatasetVersionVo datasetVo) throws Exception; String newCreateVersionFromLabelStudio(LabelDatasetVersionVo datasetVo) throws Exception;

List<NewDatasetVo> convert(List<Map<String, Object>> lst, String datasetTopic, String datasetTagName, String datasetTypeName);
} }

+ 1
- 0
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ModelsServiceImpl.java View File

@@ -1249,6 +1249,7 @@ public class ModelsServiceImpl implements ModelsService {
return "取消点赞成功"; return "取消点赞成功";
} }


@Override
public List<ModelsVo> convert(List<Map<String, Object>> lst, String modelTopic, String modelTagName, String modelTypeName) { public List<ModelsVo> convert(List<Map<String, Object>> lst, String modelTopic, String modelTagName, String modelTypeName) {
if (lst != null && lst.size() > 0) { if (lst != null && lst.size() > 0) {
List<ModelsVo> result = new ArrayList<>(); List<ModelsVo> result = new ArrayList<>();


+ 1
- 1
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/NewDatasetServiceImpl.java View File

@@ -610,7 +610,7 @@ public class NewDatasetServiceImpl implements NewDatasetService {


} }


@Override
public List<NewDatasetVo> convert(List<Map<String, Object>> lst, String datasetTopic, String datasetTagName, String datasetTypeName) { public List<NewDatasetVo> convert(List<Map<String, Object>> lst, String datasetTopic, String datasetTagName, String datasetTypeName) {
if (lst != null && lst.size() > 0) { if (lst != null && lst.size() > 0) {
List<NewDatasetVo> result = new ArrayList<>(); List<NewDatasetVo> result = new ArrayList<>();


+ 11
- 9
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/WorkspaceServiceImpl.java View File

@@ -3,12 +3,12 @@ package com.ruoyi.platform.service.impl;
import com.ruoyi.common.security.utils.SecurityUtils; import com.ruoyi.common.security.utils.SecurityUtils;
import com.ruoyi.platform.domain.*; import com.ruoyi.platform.domain.*;
import com.ruoyi.platform.mapper.*; import com.ruoyi.platform.mapper.*;
import com.ruoyi.platform.service.ExperimentInsService;
import com.ruoyi.platform.service.GitService;
import com.ruoyi.platform.service.WorkspaceService;
import com.ruoyi.platform.service.*;
import com.ruoyi.platform.utils.JacksonUtil; import com.ruoyi.platform.utils.JacksonUtil;
import com.ruoyi.platform.utils.JsonUtils; import com.ruoyi.platform.utils.JsonUtils;
import com.ruoyi.platform.utils.NewHttpUtils; import com.ruoyi.platform.utils.NewHttpUtils;
import com.ruoyi.platform.vo.ModelsVo;
import com.ruoyi.platform.vo.NewDatasetVo;
import com.ruoyi.system.api.constant.Constant; import com.ruoyi.system.api.constant.Constant;
import com.ruoyi.system.api.model.LoginUser; import com.ruoyi.system.api.model.LoginUser;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
@@ -32,16 +32,16 @@ public class WorkspaceServiceImpl implements WorkspaceService {
@Resource @Resource
private ExperimentInsService experimentInsService; private ExperimentInsService experimentInsService;
@Resource @Resource
private ModelsDao modelsDao;
@Resource
private DatasetDao datasetDao;
@Resource
private ImageDao imageDao; private ImageDao imageDao;
@Resource @Resource
private ComponentDao componentDao; private ComponentDao componentDao;
@Resource @Resource
private GitService gitService; private GitService gitService;
@Resource @Resource
private NewDatasetService newDatasetService;
@Resource
private ModelsService modelsService;
@Resource
private NewHttpUtils httpUtils; private NewHttpUtils httpUtils;


@Value("${git.endpoint}") @Value("${git.endpoint}")
@@ -114,13 +114,15 @@ public class WorkspaceServiceImpl implements WorkspaceService {
String req = httpUtils.sendGetWithToken(url, null, token); String req = httpUtils.sendGetWithToken(url, null, token);
Map<String, Object> stringObjectMap = JacksonUtil.parseJSONStr2Map(req); Map<String, Object> stringObjectMap = JacksonUtil.parseJSONStr2Map(req);
List<Map<String, Object>> projects = (List<Map<String, Object>>) stringObjectMap.get("projects"); List<Map<String, Object>> projects = (List<Map<String, Object>>) stringObjectMap.get("projects");
assetCountMap.put("dataset", projects.size());
List<NewDatasetVo> collect1 = newDatasetService.convert(projects, Constant.Topic_Dataset, null, null);
assetCountMap.put("dataset", collect1.size());


url = gitendpoint + "/api/users/" + userInfo.get("login") + "/projects.json?category=manage"; url = gitendpoint + "/api/users/" + userInfo.get("login") + "/projects.json?category=manage";
req = httpUtils.sendGetWithToken(url, null, token); req = httpUtils.sendGetWithToken(url, null, token);
stringObjectMap = JacksonUtil.parseJSONStr2Map(req); stringObjectMap = JacksonUtil.parseJSONStr2Map(req);
projects = (List<Map<String, Object>>) stringObjectMap.get("projects"); projects = (List<Map<String, Object>>) stringObjectMap.get("projects");
assetCountMap.put("model", projects.size());
List<ModelsVo> collect2 = modelsService.convert(projects, Constant.Topic_model, null, null);
assetCountMap.put("model", collect2.size());
} }


// 镜像 // 镜像


Loading…
Cancel
Save