From a440ec3bfaa1363f5841100b8948d852971a2eb1 Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期二, 10 十二月 2024 13:19:58 +0800
Subject: [PATCH] MmPredictAlarmConfigService

---
 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/admin/MmPredictItemController.java |   17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/admin/MmPredictItemController.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/admin/MmPredictItemController.java
index 6b3c57b..8c080f8 100644
--- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/admin/MmPredictItemController.java
+++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/admin/MmPredictItemController.java
@@ -1,16 +1,15 @@
 package com.iailab.module.model.mcs.pre.controller.admin;
 
+import cn.hutool.core.io.FileUtil;
 import com.baomidou.dynamic.datasource.annotation.DSTransactional;
 import com.iailab.framework.common.pojo.CommonResult;
 import com.iailab.framework.common.pojo.PageResult;
 import com.iailab.module.model.common.enums.CommonConstant;
 import com.iailab.module.model.mcs.pre.dto.MmPredictItemDTO;
-import com.iailab.module.model.mcs.pre.entity.MmPredictItemEntity;
 import com.iailab.module.model.mcs.pre.service.MmPredictItemService;
-import com.iailab.module.model.mcs.pre.vo.CountItemtypeVO;
-import com.iailab.module.model.mcs.pre.vo.MmPredictItemPageReqVO;
-import com.iailab.module.model.mcs.pre.vo.MmPredictItemRespVO;
+import com.iailab.module.model.mcs.pre.vo.*;
 import com.iailab.module.model.mpk.common.utils.IAILModelUtil;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -20,9 +19,7 @@
 
 import javax.annotation.security.PermitAll;
 import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 import static com.iailab.framework.common.pojo.CommonResult.success;
 
@@ -30,6 +27,7 @@
  * @author PanZhibao
  * @date 2021年04月26日 14:42
  */
+@Slf4j
 @RestController
 @RequestMapping("/model/pre/item")
 public class MmPredictItemController {
@@ -54,8 +52,8 @@
     }
 
     @GetMapping("/list")
-    public CommonResult<List<MmPredictItemEntity>> list() {
-        List<MmPredictItemEntity> list = mmPredictItemService.list();
+    public CommonResult<List<MmPredictItemRespVO>> list(@RequestParam Map<String, Object> params) {
+        List<MmPredictItemRespVO> list = mmPredictItemService.list(params);
         return success(list);
     }
 
@@ -118,6 +116,7 @@
     @PostMapping("/upload-model")
     public CommonResult<Map<String, Object>> uploadModel(@RequestParam("file") MultipartFile file) throws Exception {
         String uploadDir = modelPath + file.getOriginalFilename();
+        FileUtil.mkParentDirs(uploadDir);
         file.transferTo(new File(uploadDir));
         Map<String, Object> result = iAILModelUtil.parseModel(uploadDir);
         result.put("originalFilename", file.getOriginalFilename().replace(CommonConstant.MDK_SUFFIX, ""));

--
Gitblit v1.9.3