Bladeren bron

//物理模型

wyj0522 2 maanden geleden
bovenliggende
commit
8f62f43349
71 gewijzigde bestanden met toevoegingen van 2549 en 2904 verwijderingen
  1. 12 1
      fdapfe-admin/pom.xml
  2. 4 4
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/controller/DataController.java
  3. 4 3
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/controller/FaultPhysicalModelController.java
  4. 17 3
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/controller/FormulasController.java
  5. 26 25
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/controller/ModelDataGenController.java
  6. 0 104
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/controller/PhyNoiseDataGenController.java
  7. 0 104
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/controller/TestDataGenController.java
  8. 29 0
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/domain/BasePO.java
  9. 37 48
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/domain/Data.java
  10. 2 41
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/domain/EvaluationIndicator.java
  11. 0 60
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/domain/FaultDiagnosisModel.java
  12. 23 68
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/domain/FaultPhysicalModel.java
  13. 3 92
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/domain/FdAlgorithm.java
  14. 29 43
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/domain/Formulas.java
  15. 88 0
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/domain/ModelDataGen.java
  16. 0 144
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/domain/PhyModelDataGen.java
  17. 0 158
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/domain/PhyNoiseDataGen.java
  18. 0 158
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/domain/TestDataGen.java
  19. 2 48
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/mapper/DataMapper.java
  20. 2 48
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/mapper/FaultPhysicalModelMapper.java
  21. 3 47
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/mapper/FormulasMapper.java
  22. 16 0
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/mapper/ModelDataGenMapper.java
  23. 0 61
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/mapper/PhyModelDataGenMapper.java
  24. 0 61
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/mapper/PhyNoiseDataGenMapper.java
  25. 0 61
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/mapper/TestDataGenMapper.java
  26. 6 15
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/IDataService.java
  27. 5 12
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/IFaultPhysicalModelService.java
  28. 5 12
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/IFormulasService.java
  29. 37 0
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/IModelDataGenService.java
  30. 0 61
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/IPhyModelDataGenService.java
  31. 0 61
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/IPhyNoiseDataGenService.java
  32. 0 61
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/ITestDataGenService.java
  33. 55 26
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/impl/DataServiceImpl.java
  34. 36 28
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/impl/FaultPhysicalModelServiceImpl.java
  35. 3 1
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/impl/FdAlgorithmServiceImpl.java
  36. 79 18
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/impl/FormulasServiceImpl.java
  37. 255 0
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/impl/ModelDataGenServiceImpl.java
  38. 0 96
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/impl/PhyModelDataGenServiceImpl.java
  39. 0 96
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/impl/PhyNoiseDataGenServiceImpl.java
  40. 0 96
      fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/impl/TestDataGenServiceImpl.java
  41. 76 0
      fdapfe-admin/src/main/java/com/cn/fdapfe/models/controller/ProcedureController.java
  42. 45 12
      fdapfe-admin/src/main/java/com/cn/fdapfe/web/controller/common/CommonController.java
  43. 2 1
      fdapfe-admin/src/main/java/com/cn/fdapfe/web/controller/system/SysProfileController.java
  44. 20 8
      fdapfe-admin/src/main/resources/application.yml
  45. 13 8
      fdapfe-admin/src/main/resources/mapper/data/DataMapper.xml
  46. 29 0
      fdapfe-admin/src/main/resources/mapper/dataGen/ModelDataGenMapper.xml
  47. 0 103
      fdapfe-admin/src/main/resources/mapper/dataGen/PhyModelDataGenMapper.xml
  48. 0 108
      fdapfe-admin/src/main/resources/mapper/dataGen/PhyNoiseDataGenMapper.xml
  49. 0 108
      fdapfe-admin/src/main/resources/mapper/dataGen/TestDataGenMapper.xml
  50. 8 64
      fdapfe-admin/src/main/resources/mapper/eval/FormulasMapper.xml
  51. 10 76
      fdapfe-admin/src/main/resources/mapper/model/FaultPhysicalModelMapper.xml
  52. 8 1
      fdapfe-common/pom.xml
  53. 54 11
      fdapfe-common/src/main/java/com/cn/fdapfe/common/utils/file/FileUploadUtils.java
  54. 11 11
      fdapfe-common/src/main/java/com/cn/fdapfe/common/utils/file/FileUtils.java
  55. 0 132
      fdapfe-framework/src/main/java/com/cn/fdapfe/framework/config/MyBatisConfig.java
  56. 59 0
      fdapfe-framework/src/main/java/com/cn/fdapfe/framework/config/properties/MybatisPlusConfig.java
  57. 7 7
      fdapfe-system/pom.xml
  58. 1 1
      fdapfe-ui/package.json
  59. 5 5
      fdapfe-ui/src/api/dataGen/phyModel.js
  60. 8 0
      fdapfe-ui/src/api/eval/formulas.js
  61. 16 6
      fdapfe-ui/src/components/FileUpload/index.vue
  62. 1 2
      fdapfe-ui/src/main.js
  63. 53 22
      fdapfe-ui/src/views/data/data/index.vue
  64. 307 0
      fdapfe-ui/src/views/dataGen/form.vue
  65. 336 0
      fdapfe-ui/src/views/dataGen/index.vue
  66. 275 0
      fdapfe-ui/src/views/eval/formulas/form.vue
  67. 128 85
      fdapfe-ui/src/views/eval/formulas/index.vue
  68. 0 0
      fdapfe-ui/src/views/model/faultDiagnosis/form.vue
  69. 175 0
      fdapfe-ui/src/views/model/faultPhysical/form.vue
  70. 107 166
      fdapfe-ui/src/views/model/faultPhysical/index.vue
  71. 17 2
      pom.xml

+ 12 - 1
fdapfe-admin/pom.xml

@@ -17,6 +17,14 @@
 
     <dependencies>
 
+        <dependency>
+            <groupId>com.cn.fdapfe</groupId>
+            <artifactId>fdapfe-common</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-boot-starter</artifactId>
+        </dependency>
         <!-- spring-boot-devtools -->
         <dependency>
             <groupId>org.springframework.boot</groupId>
@@ -60,7 +68,10 @@
             <groupId>com.cn.fdapfe</groupId>
             <artifactId>fdapfe-generator</artifactId>
         </dependency>
-
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+        </dependency>
     </dependencies>
 
     <build>

+ 4 - 4
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/controller/DataController.java

@@ -1,9 +1,9 @@
 package com.cn.fdapfe.biz.controller;
 
 import java.util.List;
+import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
 import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.PutMapping;
@@ -31,7 +31,7 @@ import com.cn.fdapfe.common.core.page.TableDataInfo;
 @RequestMapping("/data/data")
 public class DataController extends BaseController
 {
-    @Autowired
+    @Resource
     private IDataService dataService;
 
     /**
@@ -64,7 +64,7 @@ public class DataController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('data:data:query')")
     @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
+    public AjaxResult getInfo(@PathVariable("id") String id)
     {
         return success(dataService.selectDataById(id));
     }
@@ -97,7 +97,7 @@ public class DataController extends BaseController
     @PreAuthorize("@ss.hasPermi('data:data:remove')")
     @Log(title = "数据管理", businessType = BusinessType.DELETE)
 	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
+    public AjaxResult remove(@PathVariable String[] ids)
     {
         return toAjax(dataService.deleteDataByIds(ids));
     }

+ 4 - 3
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/controller/FaultPhysicalModelController.java

@@ -1,6 +1,7 @@
 package com.cn.fdapfe.biz.controller;
 
 import java.util.List;
+import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
 
 import com.cn.fdapfe.biz.domain.Data;
@@ -33,7 +34,7 @@ import com.cn.fdapfe.common.core.page.TableDataInfo;
 @RequestMapping("/model/faultPhysical")
 public class FaultPhysicalModelController extends BaseController
 {
-    @Autowired
+    @Resource
     private IFaultPhysicalModelService faultPhysicalModelService;
 
     /**
@@ -66,7 +67,7 @@ public class FaultPhysicalModelController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('model:faultPhysical:query')")
     @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
+    public AjaxResult getInfo(@PathVariable("id") String id)
     {
         return success(faultPhysicalModelService.selectFaultPhysicalModelById(id));
     }
@@ -99,7 +100,7 @@ public class FaultPhysicalModelController extends BaseController
     @PreAuthorize("@ss.hasPermi('model:faultPhysical:remove')")
     @Log(title = "故障物理模型管理", businessType = BusinessType.DELETE)
 	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
+    public AjaxResult remove(@PathVariable String[] ids)
     {
         return toAjax(faultPhysicalModelService.deleteFaultPhysicalModelByIds(ids));
     }

+ 17 - 3
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/controller/FormulasController.java

@@ -1,6 +1,7 @@
 package com.cn.fdapfe.biz.controller;
 
 import java.util.List;
+import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -31,7 +32,7 @@ import com.cn.fdapfe.common.core.page.TableDataInfo;
 @RequestMapping("/eval/formulas")
 public class FormulasController extends BaseController
 {
-    @Autowired
+    @Resource
     private IFormulasService formulasService;
 
     /**
@@ -64,7 +65,7 @@ public class FormulasController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('eval:formulas:query')")
     @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
+    public AjaxResult getInfo(@PathVariable("id") String id)
     {
         return success(formulasService.selectFormulasById(id));
     }
@@ -97,8 +98,21 @@ public class FormulasController extends BaseController
     @PreAuthorize("@ss.hasPermi('eval:formulas:remove')")
     @Log(title = "公式管理管理", businessType = BusinessType.DELETE)
 	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
+    public AjaxResult remove(@PathVariable String[] ids)
     {
         return toAjax(formulasService.deleteFormulasByIds(ids));
     }
+
+    /**
+     * 查看已维护公式
+     * @param formulas
+     * @return
+     */
+    @PreAuthorize("@ss.hasPermi('eval:formulas:info')")
+    @Log(title = "公式管理管理", businessType = BusinessType.DELETE)
+    @GetMapping("/infoList")
+    public List<Formulas> findInfoList(Formulas formulas)
+    {
+        return formulasService.selectFormulasList(formulas);
+    }
 }

+ 26 - 25
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/controller/PhyModelDataGenController.java → fdapfe-admin/src/main/java/com/cn/fdapfe/biz/controller/ModelDataGenController.java

@@ -2,6 +2,10 @@ package com.cn.fdapfe.biz.controller;
 
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
+
+import com.cn.fdapfe.biz.domain.ModelDataGen;
+import com.cn.fdapfe.biz.service.IModelDataGenService;
+import com.cn.fdapfe.common.utils.poi.ExcelUtil;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -16,9 +20,6 @@ import com.cn.fdapfe.common.annotation.Log;
 import com.cn.fdapfe.common.core.controller.BaseController;
 import com.cn.fdapfe.common.core.domain.AjaxResult;
 import com.cn.fdapfe.common.enums.BusinessType;
-import com.cn.fdapfe.biz.domain.PhyModelDataGen;
-import com.cn.fdapfe.biz.service.IPhyModelDataGenService;
-import com.cn.fdapfe.common.utils.poi.ExcelUtil;
 import com.cn.fdapfe.common.core.page.TableDataInfo;
 
 /**
@@ -28,77 +29,77 @@ import com.cn.fdapfe.common.core.page.TableDataInfo;
  * @date 2025-03-07
  */
 @RestController
-@RequestMapping("/dataGen/phyModel")
-public class PhyModelDataGenController extends BaseController
+@RequestMapping("/dataGen")
+public class ModelDataGenController extends BaseController
 {
     @Autowired
-    private IPhyModelDataGenService phyModelDataGenService;
+    private IModelDataGenService service;
 
     /**
      * 查询物理模型数据生成管理列表
      */
-    @PreAuthorize("@ss.hasPermi('dataGen:phyModel:list')")
+    @PreAuthorize("@ss.hasPermi('dataGen:list')")
     @GetMapping("/list")
-    public TableDataInfo list(PhyModelDataGen phyModelDataGen)
+    public TableDataInfo list(ModelDataGen modelDataGen)
     {
         startPage();
-        List<PhyModelDataGen> list = phyModelDataGenService.selectPhyModelDataGenList(phyModelDataGen);
+        List<ModelDataGen> list = service.selectList(modelDataGen);
         return getDataTable(list);
     }
 
     /**
      * 导出物理模型数据生成管理列表
      */
-    @PreAuthorize("@ss.hasPermi('dataGen:phyModel:export')")
+    @PreAuthorize("@ss.hasPermi('dataGen:export')")
     @Log(title = "物理模型数据生成管理", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    public void export(HttpServletResponse response, PhyModelDataGen phyModelDataGen)
+    public void export(HttpServletResponse response, ModelDataGen modelDataGen)
     {
-        List<PhyModelDataGen> list = phyModelDataGenService.selectPhyModelDataGenList(phyModelDataGen);
-        ExcelUtil<PhyModelDataGen> util = new ExcelUtil<PhyModelDataGen>(PhyModelDataGen.class);
+        List<ModelDataGen> list = service.selectList(modelDataGen);
+        ExcelUtil<ModelDataGen> util = new ExcelUtil<ModelDataGen>(ModelDataGen.class);
         util.exportExcel(response, list, "物理模型数据生成管理数据");
     }
 
     /**
      * 获取物理模型数据生成管理详细信息
      */
-    @PreAuthorize("@ss.hasPermi('dataGen:phyModel:query')")
+    @PreAuthorize("@ss.hasPermi('dataGen:query')")
     @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
+    public AjaxResult getInfo(@PathVariable("id") String id)
     {
-        return success(phyModelDataGenService.selectPhyModelDataGenById(id));
+        return success(service.selectOne(id));
     }
 
     /**
      * 新增物理模型数据生成管理
      */
-    @PreAuthorize("@ss.hasPermi('dataGen:phyModel:add')")
+    @PreAuthorize("@ss.hasPermi('dataGen:add')")
     @Log(title = "物理模型数据生成管理", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody PhyModelDataGen phyModelDataGen)
+    public AjaxResult add(@RequestBody ModelDataGen modelDataGen)
     {
-        return toAjax(phyModelDataGenService.insertPhyModelDataGen(phyModelDataGen));
+        return toAjax(service.add(modelDataGen));
     }
 
     /**
      * 修改物理模型数据生成管理
      */
-    @PreAuthorize("@ss.hasPermi('dataGen:phyModel:edit')")
+    @PreAuthorize("@ss.hasPermi('dataGen:edit')")
     @Log(title = "物理模型数据生成管理", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody PhyModelDataGen phyModelDataGen)
+    public AjaxResult edit(@RequestBody ModelDataGen modelDataGen)
     {
-        return toAjax(phyModelDataGenService.updatePhyModelDataGen(phyModelDataGen));
+        return toAjax(service.update(modelDataGen));
     }
 
     /**
      * 删除物理模型数据生成管理
      */
-    @PreAuthorize("@ss.hasPermi('dataGen:phyModel:remove')")
+    @PreAuthorize("@ss.hasPermi('dataGen:remove')")
     @Log(title = "物理模型数据生成管理", businessType = BusinessType.DELETE)
 	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
+    public AjaxResult remove(@PathVariable String[] ids)
     {
-        return toAjax(phyModelDataGenService.deletePhyModelDataGenByIds(ids));
+        return toAjax(service.delete(ids));
     }
 }

+ 0 - 104
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/controller/PhyNoiseDataGenController.java

@@ -1,104 +0,0 @@
-package com.cn.fdapfe.biz.controller;
-
-import java.util.List;
-import javax.servlet.http.HttpServletResponse;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.cn.fdapfe.common.annotation.Log;
-import com.cn.fdapfe.common.core.controller.BaseController;
-import com.cn.fdapfe.common.core.domain.AjaxResult;
-import com.cn.fdapfe.common.enums.BusinessType;
-import com.cn.fdapfe.biz.domain.PhyNoiseDataGen;
-import com.cn.fdapfe.biz.service.IPhyNoiseDataGenService;
-import com.cn.fdapfe.common.utils.poi.ExcelUtil;
-import com.cn.fdapfe.common.core.page.TableDataInfo;
-
-/**
- * 噪声数据生成管理Controller
- * 
- * @author Allen
- * @date 2025-03-07
- */
-@RestController
-@RequestMapping("/dataGen/phyNoise")
-public class PhyNoiseDataGenController extends BaseController
-{
-    @Autowired
-    private IPhyNoiseDataGenService phyNoiseDataGenService;
-
-    /**
-     * 查询噪声数据生成管理列表
-     */
-    @PreAuthorize("@ss.hasPermi('dataGen:phyNoise:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(PhyNoiseDataGen phyNoiseDataGen)
-    {
-        startPage();
-        List<PhyNoiseDataGen> list = phyNoiseDataGenService.selectPhyNoiseDataGenList(phyNoiseDataGen);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出噪声数据生成管理列表
-     */
-    @PreAuthorize("@ss.hasPermi('dataGen:phyNoise:export')")
-    @Log(title = "噪声数据生成管理", businessType = BusinessType.EXPORT)
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, PhyNoiseDataGen phyNoiseDataGen)
-    {
-        List<PhyNoiseDataGen> list = phyNoiseDataGenService.selectPhyNoiseDataGenList(phyNoiseDataGen);
-        ExcelUtil<PhyNoiseDataGen> util = new ExcelUtil<PhyNoiseDataGen>(PhyNoiseDataGen.class);
-        util.exportExcel(response, list, "噪声数据生成管理数据");
-    }
-
-    /**
-     * 获取噪声数据生成管理详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('dataGen:phyNoise:query')")
-    @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
-    {
-        return success(phyNoiseDataGenService.selectPhyNoiseDataGenById(id));
-    }
-
-    /**
-     * 新增噪声数据生成管理
-     */
-    @PreAuthorize("@ss.hasPermi('dataGen:phyNoise:add')")
-    @Log(title = "噪声数据生成管理", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody PhyNoiseDataGen phyNoiseDataGen)
-    {
-        return toAjax(phyNoiseDataGenService.insertPhyNoiseDataGen(phyNoiseDataGen));
-    }
-
-    /**
-     * 修改噪声数据生成管理
-     */
-    @PreAuthorize("@ss.hasPermi('dataGen:phyNoise:edit')")
-    @Log(title = "噪声数据生成管理", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody PhyNoiseDataGen phyNoiseDataGen)
-    {
-        return toAjax(phyNoiseDataGenService.updatePhyNoiseDataGen(phyNoiseDataGen));
-    }
-
-    /**
-     * 删除噪声数据生成管理
-     */
-    @PreAuthorize("@ss.hasPermi('dataGen:phyNoise:remove')")
-    @Log(title = "噪声数据生成管理", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
-    {
-        return toAjax(phyNoiseDataGenService.deletePhyNoiseDataGenByIds(ids));
-    }
-}

+ 0 - 104
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/controller/TestDataGenController.java

@@ -1,104 +0,0 @@
-package com.cn.fdapfe.biz.controller;
-
-import java.util.List;
-import javax.servlet.http.HttpServletResponse;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import com.cn.fdapfe.common.annotation.Log;
-import com.cn.fdapfe.common.core.controller.BaseController;
-import com.cn.fdapfe.common.core.domain.AjaxResult;
-import com.cn.fdapfe.common.enums.BusinessType;
-import com.cn.fdapfe.biz.domain.TestDataGen;
-import com.cn.fdapfe.biz.service.ITestDataGenService;
-import com.cn.fdapfe.common.utils.poi.ExcelUtil;
-import com.cn.fdapfe.common.core.page.TableDataInfo;
-
-/**
- * 测试数据生成管理Controller
- * 
- * @author Allen
- * @date 2025-03-07
- */
-@RestController
-@RequestMapping("/dataGen/test")
-public class TestDataGenController extends BaseController
-{
-    @Autowired
-    private ITestDataGenService testDataGenService;
-
-    /**
-     * 查询测试数据生成管理列表
-     */
-    @PreAuthorize("@ss.hasPermi('dataGen:test:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(TestDataGen testDataGen)
-    {
-        startPage();
-        List<TestDataGen> list = testDataGenService.selectTestDataGenList(testDataGen);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出测试数据生成管理列表
-     */
-    @PreAuthorize("@ss.hasPermi('dataGen:test:export')")
-    @Log(title = "测试数据生成管理", businessType = BusinessType.EXPORT)
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, TestDataGen testDataGen)
-    {
-        List<TestDataGen> list = testDataGenService.selectTestDataGenList(testDataGen);
-        ExcelUtil<TestDataGen> util = new ExcelUtil<TestDataGen>(TestDataGen.class);
-        util.exportExcel(response, list, "测试数据生成管理数据");
-    }
-
-    /**
-     * 获取测试数据生成管理详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('dataGen:test:query')")
-    @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
-    {
-        return success(testDataGenService.selectTestDataGenById(id));
-    }
-
-    /**
-     * 新增测试数据生成管理
-     */
-    @PreAuthorize("@ss.hasPermi('dataGen:test:add')")
-    @Log(title = "测试数据生成管理", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody TestDataGen testDataGen)
-    {
-        return toAjax(testDataGenService.insertTestDataGen(testDataGen));
-    }
-
-    /**
-     * 修改测试数据生成管理
-     */
-    @PreAuthorize("@ss.hasPermi('dataGen:test:edit')")
-    @Log(title = "测试数据生成管理", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody TestDataGen testDataGen)
-    {
-        return toAjax(testDataGenService.updateTestDataGen(testDataGen));
-    }
-
-    /**
-     * 删除测试数据生成管理
-     */
-    @PreAuthorize("@ss.hasPermi('dataGen:test:remove')")
-    @Log(title = "测试数据生成管理", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
-    {
-        return toAjax(testDataGenService.deleteTestDataGenByIds(ids));
-    }
-}

+ 29 - 0
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/domain/BasePO.java

@@ -0,0 +1,29 @@
+package com.cn.fdapfe.biz.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+public class BasePO implements Serializable {
+
+    /** 创建者 */
+    private String createBy;
+
+    /** 创建时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+
+    /** 更新者 */
+    private String updateBy;
+
+    /** 更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date updateTime;
+
+    /** 备注 */
+    private String remark;
+
+}

+ 37 - 48
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/domain/Data.java

@@ -1,84 +1,73 @@
 package com.cn.fdapfe.biz.domain;
 
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.cn.fdapfe.common.annotation.Excel;
 import com.cn.fdapfe.common.core.domain.BaseEntity;
 
+import java.io.Serializable;
+
 /**
  * 数据管理对象 biz_data
  * 
  * @author Allem
  * @date 2025-03-07
  */
-public class Data extends BaseEntity
+@Getter
+@Setter
+@ToString
+@TableName("biz_data")
+public class Data extends BasePO
 {
+    @TableField(exist = false)
     private static final long serialVersionUID = 1L;
 
     /** 序号 */
-    private Long id;
+    @TableField(value ="id")
+    @Excel(name = "主键ID")
+    private String id;
 
     /** 数据名称 */
+    @TableField(value ="name")
     @Excel(name = "数据名称")
     private String name;
 
     /** 数据类型(0物理模型数据,1实际数据,2噪声数据,3训练/验证数据) */
+    @TableField(value ="type")
     @Excel(name = "数据类型", readConverterExp = "0=物理模型数据,1实际数据,2噪声数据,3训练/验证数据")
     private String type;
 
     /** 文件路径 */
     @Excel(name = "文件路径")
+    @TableField(value ="file_path")
     private String filePath;
 
-    public void setId(Long id) 
-    {
-        this.id = id;
-    }
+    @Excel(name = "文件名称")
+    @TableField(value ="file_name")
+    private String fileName;
+
+    @Excel(name = "文件大小")
+    @TableField(value ="file_size")
+    private String fileSize;
 
-    public Long getId() 
-    {
-        return id;
-    }
-    public void setName(String name) 
-    {
-        this.name = name;
-    }
+    @Excel(name = "文件字节大小")
+    @TableField(value ="file_size_bytes")
+    private String fileSizeBytes;
 
-    public String getName() 
-    {
-        return name;
-    }
-    public void setType(String type) 
-    {
-        this.type = type;
-    }
+    @Excel(name = "文件后缀")
+    @TableField(value ="file_suffix")
+    private String fileSuffix;
 
-    public String getType() 
-    {
-        return type;
-    }
-    public void setFilePath(String filePath) 
-    {
-        this.filePath = filePath;
-    }
+    @Excel(name = "下载地址")
+    @TableField(value ="url")
+    private String url;
 
-    public String getFilePath() 
-    {
-        return filePath;
-    }
 
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("name", getName())
-            .append("type", getType())
-            .append("filePath", getFilePath())
-            .append("remark", getRemark())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .toString();
-    }
 }

+ 2 - 41
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/domain/EvaluationIndicator.java

@@ -1,5 +1,6 @@
 package com.cn.fdapfe.biz.domain;
 
+import lombok.Data;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.cn.fdapfe.common.annotation.Excel;
@@ -11,6 +12,7 @@ import com.cn.fdapfe.common.core.domain.BaseEntity;
  * @author Allen
  * @date 2025-03-07
  */
+@Data
 public class EvaluationIndicator extends BaseEntity
 {
     private static final long serialVersionUID = 1L;
@@ -26,45 +28,4 @@ public class EvaluationIndicator extends BaseEntity
     @Excel(name = "评估体系参数")
     private String bizParams;
 
-    public void setId(Long id) 
-    {
-        this.id = id;
-    }
-
-    public Long getId() 
-    {
-        return id;
-    }
-    public void setName(String name) 
-    {
-        this.name = name;
-    }
-
-    public String getName() 
-    {
-        return name;
-    }
-    public void setBizParams(String bizParams) 
-    {
-        this.bizParams = bizParams;
-    }
-
-    public String getBizParams() 
-    {
-        return bizParams;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("name", getName())
-            .append("bizParams", getBizParams())
-            .append("remark", getRemark())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .toString();
-    }
 }

+ 0 - 60
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/domain/FaultDiagnosisModel.java

@@ -34,65 +34,5 @@ public class FaultDiagnosisModel extends BaseEntity
     @Excel(name = "故障模型参数参数")
     private String bizParams;
 
-    public void setId(Long id) 
-    {
-        this.id = id;
-    }
 
-    public Long getId() 
-    {
-        return id;
-    }
-    public void setName(String name) 
-    {
-        this.name = name;
-    }
-
-    public String getName() 
-    {
-        return name;
-    }
-    public void setType(String type) 
-    {
-        this.type = type;
-    }
-
-    public String getType() 
-    {
-        return type;
-    }
-    public void setPath(String path) 
-    {
-        this.path = path;
-    }
-
-    public String getPath() 
-    {
-        return path;
-    }
-    public void setBizParams(String bizParams) 
-    {
-        this.bizParams = bizParams;
-    }
-
-    public String getBizParams() 
-    {
-        return bizParams;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("name", getName())
-            .append("type", getType())
-            .append("path", getPath())
-            .append("bizParams", getBizParams())
-            .append("remark", getRemark())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .toString();
-    }
 }

+ 23 - 68
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/domain/FaultPhysicalModel.java

@@ -1,5 +1,9 @@
 package com.cn.fdapfe.biz.domain;
 
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.cn.fdapfe.common.annotation.Excel;
@@ -11,88 +15,39 @@ import com.cn.fdapfe.common.core.domain.BaseEntity;
  * @author Allen
  * @date 2025-03-07
  */
-public class FaultPhysicalModel extends BaseEntity
+@Data
+@TableName("biz_fault_model_t")
+public class FaultPhysicalModel extends BasePO
 {
+    @TableField(exist = false)
     private static final long serialVersionUID = 1L;
 
-    /** 序号 */
-    private Long id;
+    /** 物理模型ID */
+    @TableId(value = "model_id")
+    @Excel(name = "公式ID")
+    private String modelId;
 
     /** 故障模型名称 */
     @Excel(name = "故障模型名称")
-    private String name;
+    @TableField(value ="model_name")
+    private String modelName;
 
     /** 故障模型类型 */
     @Excel(name = "故障模型类型")
-    private String type;
+    @TableField(value ="model_type")
+    private String modelType;
 
     /** 故障模型接口地址 */
     @Excel(name = "故障模型接口地址")
-    private String path;
+    @TableField(value ="model_path")
+    private String modelPath;
 
     /** 故障模型参数参数 */
     @Excel(name = "故障模型参数参数")
-    private String bizParams;
+    @TableField(value ="model_data_params")
+    private String modelDataParams;
+    @Excel(name = "故障归属")
+    @TableField(value ="model_attribution")
+    private String modelAttribution;
 
-    public void setId(Long id) 
-    {
-        this.id = id;
-    }
-
-    public Long getId() 
-    {
-        return id;
-    }
-    public void setName(String name) 
-    {
-        this.name = name;
-    }
-
-    public String getName() 
-    {
-        return name;
-    }
-    public void setType(String type) 
-    {
-        this.type = type;
-    }
-
-    public String getType() 
-    {
-        return type;
-    }
-    public void setPath(String path) 
-    {
-        this.path = path;
-    }
-
-    public String getPath() 
-    {
-        return path;
-    }
-    public void setBizParams(String bizParams) 
-    {
-        this.bizParams = bizParams;
-    }
-
-    public String getBizParams() 
-    {
-        return bizParams;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("name", getName())
-            .append("type", getType())
-            .append("path", getPath())
-            .append("bizParams", getBizParams())
-            .append("remark", getRemark())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .toString();
-    }
 }

+ 3 - 92
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/domain/FdAlgorithm.java

@@ -2,6 +2,7 @@ package com.cn.fdapfe.biz.domain;
 
 import java.util.Date;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.cn.fdapfe.common.annotation.Excel;
@@ -13,8 +14,10 @@ import com.cn.fdapfe.common.core.domain.BaseEntity;
  * @author Allen
  * @date 2025-03-07
  */
+@Data
 public class FdAlgorithm extends BaseEntity
 {
+
     private static final long serialVersionUID = 1L;
 
     /** 序号 */
@@ -49,96 +52,4 @@ public class FdAlgorithm extends BaseEntity
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date endTime;
-
-    public void setId(Long id) 
-    {
-        this.id = id;
-    }
-
-    public Long getId() 
-    {
-        return id;
-    }
-    public void setName(String name) 
-    {
-        this.name = name;
-    }
-
-    public String getName() 
-    {
-        return name;
-    }
-    public void setModelId(String modelId) 
-    {
-        this.modelId = modelId;
-    }
-
-    public String getModelId() 
-    {
-        return modelId;
-    }
-    public void setDataId(Long dataId) 
-    {
-        this.dataId = dataId;
-    }
-
-    public Long getDataId() 
-    {
-        return dataId;
-    }
-    public void setTruthLabels(String truthLabels) 
-    {
-        this.truthLabels = truthLabels;
-    }
-
-    public String getTruthLabels() 
-    {
-        return truthLabels;
-    }
-    public void setTestLabels(String testLabels) 
-    {
-        this.testLabels = testLabels;
-    }
-
-    public String getTestLabels() 
-    {
-        return testLabels;
-    }
-    public void setStartTime(Date startTime) 
-    {
-        this.startTime = startTime;
-    }
-
-    public Date getStartTime() 
-    {
-        return startTime;
-    }
-    public void setEndTime(Date endTime) 
-    {
-        this.endTime = endTime;
-    }
-
-    public Date getEndTime() 
-    {
-        return endTime;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("name", getName())
-            .append("modelId", getModelId())
-            .append("dataId", getDataId())
-            .append("truthLabels", getTruthLabels())
-            .append("testLabels", getTestLabels())
-            .append("remark", getRemark())
-            .append("startTime", getStartTime())
-            .append("endTime", getEndTime())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .toString();
-    }
 }

+ 29 - 43
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/domain/Formulas.java

@@ -1,5 +1,9 @@
 package com.cn.fdapfe.biz.domain;
 
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.cn.fdapfe.common.annotation.Excel;
@@ -11,60 +15,42 @@ import com.cn.fdapfe.common.core.domain.BaseEntity;
  * @author ruoyi
  * @date 2025-03-07
  */
-public class Formulas extends BaseEntity
+@Data
+@TableName("biz_formula_t")
+public class Formulas extends BasePO
 {
+    @TableField(exist = false)
     private static final long serialVersionUID = 1L;
 
     /** 序号 */
-    private Long id;
+    @Excel(name = "公式ID")
+    @TableId(value = "formula_id")
+    private String formulaId;
 
     /** 公式名称 */
     @Excel(name = "公式名称")
-    private String name;
+    @TableField(value ="formula_name")
+    private String formulaName;
 
+    @Excel(name = "原始公式")
+    @TableField(value ="original_formula")
+    private String originalFormula;
     /** 公式 */
-    @Excel(name = "公式")
-    private String formulas;
-
-    public void setId(Long id) 
-    {
-        this.id = id;
-    }
+    @Excel(name = "公式简称")
+    @TableField(value ="formula_short_name")
+    private String formulaShortName;
+    /** 公式名称 */
+    @Excel(name = "公式存储过程")
+    @TableField(value ="formula_stored_procedure")
+    private String formulaStoredProcedure;
 
-    public Long getId() 
-    {
-        return id;
-    }
-    public void setName(String name) 
-    {
-        this.name = name;
-    }
+    /**\
+     * 所属指标,0-一级指标,1-二级指标,3-三级指标
+     */
+    @Excel(name = "所属指标")
+    @TableField(value ="formula_indicator")
+    private String formulaIndicator;
 
-    public String getName() 
-    {
-        return name;
-    }
-    public void setFormulas(String formulas) 
-    {
-        this.formulas = formulas;
-    }
 
-    public String getFormulas() 
-    {
-        return formulas;
-    }
 
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("name", getName())
-            .append("formulas", getFormulas())
-            .append("remark", getRemark())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .toString();
-    }
 }

+ 88 - 0
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/domain/ModelDataGen.java

@@ -0,0 +1,88 @@
+package com.cn.fdapfe.biz.domain;
+
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.cn.fdapfe.common.annotation.Excel;
+import com.cn.fdapfe.common.core.domain.BaseEntity;
+
+/**
+ * 噪声数据生成管理对象 biz_phy_noise_data_gen
+ * 
+ * @author Allen
+ * @date 2025-03-07
+ */
+@Data
+@TableName("biz_data_gen_model")
+public class ModelDataGen extends BasePO
+{
+    @TableField(exist = false)
+    private static final long serialVersionUID = 1L;
+
+    /** 序号 */
+    @TableId(value = "data_gen_id")
+    @Excel(name = "数据生成名称")
+    private String dataGenId;
+
+    /** 数据生成名称 */
+    @Excel(name = "数据生成名称")
+    @TableField(value ="data_gen_name")
+    private String dataGenName;
+
+    /** 数据生成模型 */
+    @Excel(name = "数据生成模型")
+    @TableField(value ="model_id")
+    private String modelId;
+
+    /** 参数 */
+    @Excel(name = "参数")
+    @TableField(value ="biz_params")
+    private String bizParams;
+
+    @Excel(name = "原始数据ids")
+    @TableField(value ="original_data_ids")
+    private String originalDataIds;
+
+    @Excel(name = "生成后数据id")
+    @TableField(value ="generated_data_id")
+    private String generatedDataId;
+
+    @Excel(name = "数据ID")
+    @TableField(value ="data_id")
+    private String dataId;
+
+    /** 状态 */
+    @Excel(name = "状态")
+    @TableField(value ="status")
+    private String status;
+
+    /** 开始时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
+    @TableField(value ="start_time")
+    private Date startTime;
+
+    /** 结束时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
+    @TableField(value ="end_time")
+    private Date endTime;
+
+    @TableField(exist = false)
+    private String modelName;
+    @TableField(exist = false)
+    private String modelPath;
+    @TableField(exist = false)
+    private String modelType;
+    @TableField(exist = false)
+    private String outputPath;
+    @TableField(exist = false)
+    private String newFileName;
+
+}

+ 0 - 144
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/domain/PhyModelDataGen.java

@@ -1,144 +0,0 @@
-package com.cn.fdapfe.biz.domain;
-
-import java.util.Date;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import com.cn.fdapfe.common.annotation.Excel;
-import com.cn.fdapfe.common.core.domain.BaseEntity;
-
-/**
- * 物理模型数据生成管理对象 biz_phy_model_data_gen
- * 
- * @author Allen
- * @date 2025-03-07
- */
-public class PhyModelDataGen extends BaseEntity
-{
-    private static final long serialVersionUID = 1L;
-
-    /** 序号 */
-    private Long id;
-
-    /** 数据生成名称 */
-    @Excel(name = "数据生成名称")
-    private String name;
-
-    /** 数据生成模型 */
-    @Excel(name = "数据生成模型")
-    private Long modelId;
-
-    /** 参数 */
-    @Excel(name = "参数")
-    private String bizParams;
-
-    /** 数据id */
-    @Excel(name = "数据id")
-    private Long dataId;
-
-    /** 状态 */
-    @Excel(name = "状态")
-    private String status;
-
-    /** 开始时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
-    private Date startTime;
-
-    /** 结束时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
-    private Date endTime;
-
-    public void setId(Long id) 
-    {
-        this.id = id;
-    }
-
-    public Long getId() 
-    {
-        return id;
-    }
-    public void setName(String name) 
-    {
-        this.name = name;
-    }
-
-    public String getName() 
-    {
-        return name;
-    }
-    public void setModelId(Long modelId) 
-    {
-        this.modelId = modelId;
-    }
-
-    public Long getModelId() 
-    {
-        return modelId;
-    }
-    public void setBizParams(String bizParams) 
-    {
-        this.bizParams = bizParams;
-    }
-
-    public String getBizParams() 
-    {
-        return bizParams;
-    }
-    public void setDataId(Long dataId) 
-    {
-        this.dataId = dataId;
-    }
-
-    public Long getDataId() 
-    {
-        return dataId;
-    }
-    public void setStatus(String status) 
-    {
-        this.status = status;
-    }
-
-    public String getStatus() 
-    {
-        return status;
-    }
-    public void setStartTime(Date startTime) 
-    {
-        this.startTime = startTime;
-    }
-
-    public Date getStartTime() 
-    {
-        return startTime;
-    }
-    public void setEndTime(Date endTime) 
-    {
-        this.endTime = endTime;
-    }
-
-    public Date getEndTime() 
-    {
-        return endTime;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("name", getName())
-            .append("modelId", getModelId())
-            .append("bizParams", getBizParams())
-            .append("dataId", getDataId())
-            .append("status", getStatus())
-            .append("startTime", getStartTime())
-            .append("endTime", getEndTime())
-            .append("remark", getRemark())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .toString();
-    }
-}

+ 0 - 158
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/domain/PhyNoiseDataGen.java

@@ -1,158 +0,0 @@
-package com.cn.fdapfe.biz.domain;
-
-import java.util.Date;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import com.cn.fdapfe.common.annotation.Excel;
-import com.cn.fdapfe.common.core.domain.BaseEntity;
-
-/**
- * 噪声数据生成管理对象 biz_phy_noise_data_gen
- * 
- * @author Allen
- * @date 2025-03-07
- */
-public class PhyNoiseDataGen extends BaseEntity
-{
-    private static final long serialVersionUID = 1L;
-
-    /** 序号 */
-    private Long id;
-
-    /** 数据生成名称 */
-    @Excel(name = "数据生成名称")
-    private String name;
-
-    /** 数据生成模型 */
-    @Excel(name = "数据生成模型")
-    private Long modelId;
-
-    /** 参数 */
-    @Excel(name = "参数")
-    private String bizParams;
-
-    /** 原始数据id */
-    @Excel(name = "原始数据id")
-    private Long originalDataId;
-
-    /** 生成后数据id */
-    @Excel(name = "生成后数据id")
-    private Long generatedDataId;
-
-    /** 状态 */
-    @Excel(name = "状态")
-    private String status;
-
-    /** 开始时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
-    private Date startTime;
-
-    /** 结束时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
-    private Date endTime;
-
-    public void setId(Long id) 
-    {
-        this.id = id;
-    }
-
-    public Long getId() 
-    {
-        return id;
-    }
-    public void setName(String name) 
-    {
-        this.name = name;
-    }
-
-    public String getName() 
-    {
-        return name;
-    }
-    public void setModelId(Long modelId) 
-    {
-        this.modelId = modelId;
-    }
-
-    public Long getModelId() 
-    {
-        return modelId;
-    }
-    public void setBizParams(String bizParams) 
-    {
-        this.bizParams = bizParams;
-    }
-
-    public String getBizParams() 
-    {
-        return bizParams;
-    }
-    public void setOriginalDataId(Long originalDataId) 
-    {
-        this.originalDataId = originalDataId;
-    }
-
-    public Long getOriginalDataId() 
-    {
-        return originalDataId;
-    }
-    public void setGeneratedDataId(Long generatedDataId) 
-    {
-        this.generatedDataId = generatedDataId;
-    }
-
-    public Long getGeneratedDataId() 
-    {
-        return generatedDataId;
-    }
-    public void setStatus(String status) 
-    {
-        this.status = status;
-    }
-
-    public String getStatus() 
-    {
-        return status;
-    }
-    public void setStartTime(Date startTime) 
-    {
-        this.startTime = startTime;
-    }
-
-    public Date getStartTime() 
-    {
-        return startTime;
-    }
-    public void setEndTime(Date endTime) 
-    {
-        this.endTime = endTime;
-    }
-
-    public Date getEndTime() 
-    {
-        return endTime;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("name", getName())
-            .append("modelId", getModelId())
-            .append("bizParams", getBizParams())
-            .append("originalDataId", getOriginalDataId())
-            .append("generatedDataId", getGeneratedDataId())
-            .append("status", getStatus())
-            .append("startTime", getStartTime())
-            .append("endTime", getEndTime())
-            .append("remark", getRemark())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .toString();
-    }
-}

+ 0 - 158
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/domain/TestDataGen.java

@@ -1,158 +0,0 @@
-package com.cn.fdapfe.biz.domain;
-
-import java.util.Date;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import com.cn.fdapfe.common.annotation.Excel;
-import com.cn.fdapfe.common.core.domain.BaseEntity;
-
-/**
- * 测试数据生成管理对象 biz_test_data_gen
- * 
- * @author Allen
- * @date 2025-03-07
- */
-public class TestDataGen extends BaseEntity
-{
-    private static final long serialVersionUID = 1L;
-
-    /** 序号 */
-    private Long id;
-
-    /** 数据生成名称 */
-    @Excel(name = "数据生成名称")
-    private String name;
-
-    /** 数据生成模型 */
-    @Excel(name = "数据生成模型")
-    private Long modelId;
-
-    /** 参数 */
-    @Excel(name = "参数")
-    private String bizParams;
-
-    /** 原始数据ids */
-    @Excel(name = "原始数据ids")
-    private String originalDataIds;
-
-    /** 生成后数据id */
-    @Excel(name = "生成后数据id")
-    private Long generatedDataId;
-
-    /** 状态 */
-    @Excel(name = "状态")
-    private String status;
-
-    /** 开始时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
-    private Date startTime;
-
-    /** 结束时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
-    private Date endTime;
-
-    public void setId(Long id) 
-    {
-        this.id = id;
-    }
-
-    public Long getId() 
-    {
-        return id;
-    }
-    public void setName(String name) 
-    {
-        this.name = name;
-    }
-
-    public String getName() 
-    {
-        return name;
-    }
-    public void setModelId(Long modelId) 
-    {
-        this.modelId = modelId;
-    }
-
-    public Long getModelId() 
-    {
-        return modelId;
-    }
-    public void setBizParams(String bizParams) 
-    {
-        this.bizParams = bizParams;
-    }
-
-    public String getBizParams() 
-    {
-        return bizParams;
-    }
-    public void setOriginalDataIds(String originalDataIds) 
-    {
-        this.originalDataIds = originalDataIds;
-    }
-
-    public String getOriginalDataIds() 
-    {
-        return originalDataIds;
-    }
-    public void setGeneratedDataId(Long generatedDataId) 
-    {
-        this.generatedDataId = generatedDataId;
-    }
-
-    public Long getGeneratedDataId() 
-    {
-        return generatedDataId;
-    }
-    public void setStatus(String status) 
-    {
-        this.status = status;
-    }
-
-    public String getStatus() 
-    {
-        return status;
-    }
-    public void setStartTime(Date startTime) 
-    {
-        this.startTime = startTime;
-    }
-
-    public Date getStartTime() 
-    {
-        return startTime;
-    }
-    public void setEndTime(Date endTime) 
-    {
-        this.endTime = endTime;
-    }
-
-    public Date getEndTime() 
-    {
-        return endTime;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("name", getName())
-            .append("modelId", getModelId())
-            .append("bizParams", getBizParams())
-            .append("originalDataIds", getOriginalDataIds())
-            .append("generatedDataId", getGeneratedDataId())
-            .append("status", getStatus())
-            .append("startTime", getStartTime())
-            .append("endTime", getEndTime())
-            .append("remark", getRemark())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .toString();
-    }
-}

+ 2 - 48
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/mapper/DataMapper.java

@@ -3,6 +3,7 @@ package com.cn.fdapfe.biz.mapper;
 import java.util.List;
 import java.util.Map;
 
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.cn.fdapfe.biz.domain.Data;
 
 /**
@@ -11,54 +12,7 @@ import com.cn.fdapfe.biz.domain.Data;
  * @author Allem
  * @date 2025-03-07
  */
-public interface DataMapper 
+public interface DataMapper extends BaseMapper<Data>
 {
-    /**
-     * 查询数据管理
-     * 
-     * @param id 数据管理主键
-     * @return 数据管理
-     */
-    public Data selectDataById(Long id);
 
-    /**
-     * 查询数据管理列表
-     * 
-     * @param data 数据管理
-     * @return 数据管理集合
-     */
-    public List<Data> selectDataList(Data data);
-
-    /**
-     * 新增数据管理
-     * 
-     * @param data 数据管理
-     * @return 结果
-     */
-    public int insertData(Data data);
-
-    /**
-     * 修改数据管理
-     * 
-     * @param data 数据管理
-     * @return 结果
-     */
-    public int updateData(Data data);
-
-    /**
-     * 删除数据管理
-     * 
-     * @param id 数据管理主键
-     * @return 结果
-     */
-    public int deleteDataById(Long id);
-
-    /**
-     * 批量删除数据管理
-     * 
-     * @param ids 需要删除的数据主键集合
-     * @return 结果
-     */
-    public int deleteDataByIds(Long[] ids);
-    public List<Map<String,Object>> getOptions();
 }

+ 2 - 48
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/mapper/FaultPhysicalModelMapper.java

@@ -3,6 +3,7 @@ package com.cn.fdapfe.biz.mapper;
 import java.util.List;
 import java.util.Map;
 
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.cn.fdapfe.biz.domain.FaultPhysicalModel;
 
 /**
@@ -11,55 +12,8 @@ import com.cn.fdapfe.biz.domain.FaultPhysicalModel;
  * @author Allen
  * @date 2025-03-07
  */
-public interface FaultPhysicalModelMapper 
+public interface FaultPhysicalModelMapper extends BaseMapper<FaultPhysicalModel>
 {
-    /**
-     * 查询故障物理模型管理
-     * 
-     * @param id 故障物理模型管理主键
-     * @return 故障物理模型管理
-     */
-    public FaultPhysicalModel selectFaultPhysicalModelById(Long id);
-
-    /**
-     * 查询故障物理模型管理列表
-     * 
-     * @param faultPhysicalModel 故障物理模型管理
-     * @return 故障物理模型管理集合
-     */
-    public List<FaultPhysicalModel> selectFaultPhysicalModelList(FaultPhysicalModel faultPhysicalModel);
-
-    /**
-     * 新增故障物理模型管理
-     * 
-     * @param faultPhysicalModel 故障物理模型管理
-     * @return 结果
-     */
-    public int insertFaultPhysicalModel(FaultPhysicalModel faultPhysicalModel);
-
-    /**
-     * 修改故障物理模型管理
-     * 
-     * @param faultPhysicalModel 故障物理模型管理
-     * @return 结果
-     */
-    public int updateFaultPhysicalModel(FaultPhysicalModel faultPhysicalModel);
-
-    /**
-     * 删除故障物理模型管理
-     * 
-     * @param id 故障物理模型管理主键
-     * @return 结果
-     */
-    public int deleteFaultPhysicalModelById(Long id);
-
-    /**
-     * 批量删除故障物理模型管理
-     * 
-     * @param ids 需要删除的数据主键集合
-     * @return 结果
-     */
-    public int deleteFaultPhysicalModelByIds(Long[] ids);
 
     public List<Map<String,Object>> getOptions();
 }

+ 3 - 47
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/mapper/FormulasMapper.java

@@ -1,6 +1,8 @@
 package com.cn.fdapfe.biz.mapper;
 
 import java.util.List;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.cn.fdapfe.biz.domain.Formulas;
 
 /**
@@ -9,53 +11,7 @@ import com.cn.fdapfe.biz.domain.Formulas;
  * @author ruoyi
  * @date 2025-03-07
  */
-public interface FormulasMapper 
+public interface FormulasMapper extends BaseMapper<Formulas>
 {
-    /**
-     * 查询公式管理管理
-     * 
-     * @param id 公式管理管理主键
-     * @return 公式管理管理
-     */
-    public Formulas selectFormulasById(Long id);
-
-    /**
-     * 查询公式管理管理列表
-     * 
-     * @param formulas 公式管理管理
-     * @return 公式管理管理集合
-     */
-    public List<Formulas> selectFormulasList(Formulas formulas);
-
-    /**
-     * 新增公式管理管理
-     * 
-     * @param formulas 公式管理管理
-     * @return 结果
-     */
-    public int insertFormulas(Formulas formulas);
-
-    /**
-     * 修改公式管理管理
-     * 
-     * @param formulas 公式管理管理
-     * @return 结果
-     */
-    public int updateFormulas(Formulas formulas);
-
-    /**
-     * 删除公式管理管理
-     * 
-     * @param id 公式管理管理主键
-     * @return 结果
-     */
-    public int deleteFormulasById(Long id);
 
-    /**
-     * 批量删除公式管理管理
-     * 
-     * @param ids 需要删除的数据主键集合
-     * @return 结果
-     */
-    public int deleteFormulasByIds(Long[] ids);
 }

+ 16 - 0
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/mapper/ModelDataGenMapper.java

@@ -0,0 +1,16 @@
+package com.cn.fdapfe.biz.mapper;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.cn.fdapfe.biz.domain.ModelDataGen;
+
+/**
+ * 物理模型数据生成管理Mapper接口
+ * 
+ * @author Allen
+ * @date 2025-03-07
+ */
+public interface ModelDataGenMapper extends BaseMapper<ModelDataGen>
+{
+
+}

+ 0 - 61
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/mapper/PhyModelDataGenMapper.java

@@ -1,61 +0,0 @@
-package com.cn.fdapfe.biz.mapper;
-
-import java.util.List;
-import com.cn.fdapfe.biz.domain.PhyModelDataGen;
-
-/**
- * 物理模型数据生成管理Mapper接口
- * 
- * @author Allen
- * @date 2025-03-07
- */
-public interface PhyModelDataGenMapper 
-{
-    /**
-     * 查询物理模型数据生成管理
-     * 
-     * @param id 物理模型数据生成管理主键
-     * @return 物理模型数据生成管理
-     */
-    public PhyModelDataGen selectPhyModelDataGenById(Long id);
-
-    /**
-     * 查询物理模型数据生成管理列表
-     * 
-     * @param phyModelDataGen 物理模型数据生成管理
-     * @return 物理模型数据生成管理集合
-     */
-    public List<PhyModelDataGen> selectPhyModelDataGenList(PhyModelDataGen phyModelDataGen);
-
-    /**
-     * 新增物理模型数据生成管理
-     * 
-     * @param phyModelDataGen 物理模型数据生成管理
-     * @return 结果
-     */
-    public int insertPhyModelDataGen(PhyModelDataGen phyModelDataGen);
-
-    /**
-     * 修改物理模型数据生成管理
-     * 
-     * @param phyModelDataGen 物理模型数据生成管理
-     * @return 结果
-     */
-    public int updatePhyModelDataGen(PhyModelDataGen phyModelDataGen);
-
-    /**
-     * 删除物理模型数据生成管理
-     * 
-     * @param id 物理模型数据生成管理主键
-     * @return 结果
-     */
-    public int deletePhyModelDataGenById(Long id);
-
-    /**
-     * 批量删除物理模型数据生成管理
-     * 
-     * @param ids 需要删除的数据主键集合
-     * @return 结果
-     */
-    public int deletePhyModelDataGenByIds(Long[] ids);
-}

+ 0 - 61
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/mapper/PhyNoiseDataGenMapper.java

@@ -1,61 +0,0 @@
-package com.cn.fdapfe.biz.mapper;
-
-import java.util.List;
-import com.cn.fdapfe.biz.domain.PhyNoiseDataGen;
-
-/**
- * 噪声数据生成管理Mapper接口
- * 
- * @author Allen
- * @date 2025-03-07
- */
-public interface PhyNoiseDataGenMapper 
-{
-    /**
-     * 查询噪声数据生成管理
-     * 
-     * @param id 噪声数据生成管理主键
-     * @return 噪声数据生成管理
-     */
-    public PhyNoiseDataGen selectPhyNoiseDataGenById(Long id);
-
-    /**
-     * 查询噪声数据生成管理列表
-     * 
-     * @param phyNoiseDataGen 噪声数据生成管理
-     * @return 噪声数据生成管理集合
-     */
-    public List<PhyNoiseDataGen> selectPhyNoiseDataGenList(PhyNoiseDataGen phyNoiseDataGen);
-
-    /**
-     * 新增噪声数据生成管理
-     * 
-     * @param phyNoiseDataGen 噪声数据生成管理
-     * @return 结果
-     */
-    public int insertPhyNoiseDataGen(PhyNoiseDataGen phyNoiseDataGen);
-
-    /**
-     * 修改噪声数据生成管理
-     * 
-     * @param phyNoiseDataGen 噪声数据生成管理
-     * @return 结果
-     */
-    public int updatePhyNoiseDataGen(PhyNoiseDataGen phyNoiseDataGen);
-
-    /**
-     * 删除噪声数据生成管理
-     * 
-     * @param id 噪声数据生成管理主键
-     * @return 结果
-     */
-    public int deletePhyNoiseDataGenById(Long id);
-
-    /**
-     * 批量删除噪声数据生成管理
-     * 
-     * @param ids 需要删除的数据主键集合
-     * @return 结果
-     */
-    public int deletePhyNoiseDataGenByIds(Long[] ids);
-}

+ 0 - 61
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/mapper/TestDataGenMapper.java

@@ -1,61 +0,0 @@
-package com.cn.fdapfe.biz.mapper;
-
-import java.util.List;
-import com.cn.fdapfe.biz.domain.TestDataGen;
-
-/**
- * 测试数据生成管理Mapper接口
- * 
- * @author Allen
- * @date 2025-03-07
- */
-public interface TestDataGenMapper 
-{
-    /**
-     * 查询测试数据生成管理
-     * 
-     * @param id 测试数据生成管理主键
-     * @return 测试数据生成管理
-     */
-    public TestDataGen selectTestDataGenById(Long id);
-
-    /**
-     * 查询测试数据生成管理列表
-     * 
-     * @param testDataGen 测试数据生成管理
-     * @return 测试数据生成管理集合
-     */
-    public List<TestDataGen> selectTestDataGenList(TestDataGen testDataGen);
-
-    /**
-     * 新增测试数据生成管理
-     * 
-     * @param testDataGen 测试数据生成管理
-     * @return 结果
-     */
-    public int insertTestDataGen(TestDataGen testDataGen);
-
-    /**
-     * 修改测试数据生成管理
-     * 
-     * @param testDataGen 测试数据生成管理
-     * @return 结果
-     */
-    public int updateTestDataGen(TestDataGen testDataGen);
-
-    /**
-     * 删除测试数据生成管理
-     * 
-     * @param id 测试数据生成管理主键
-     * @return 结果
-     */
-    public int deleteTestDataGenById(Long id);
-
-    /**
-     * 批量删除测试数据生成管理
-     * 
-     * @param ids 需要删除的数据主键集合
-     * @return 结果
-     */
-    public int deleteTestDataGenByIds(Long[] ids);
-}

+ 6 - 15
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/IDataService.java

@@ -1,10 +1,8 @@
 package com.cn.fdapfe.biz.service;
 
 import java.util.List;
-import java.util.Map;
 
 import com.cn.fdapfe.biz.domain.Data;
-import com.cn.fdapfe.common.core.domain.AjaxResult;
 
 /**
  * 数据管理Service接口
@@ -20,7 +18,7 @@ public interface IDataService
      * @param id 数据管理主键
      * @return 数据管理
      */
-    public Data selectDataById(Long id);
+     Data selectDataById(String id);
 
     /**
      * 查询数据管理列表
@@ -28,7 +26,7 @@ public interface IDataService
      * @param data 数据管理
      * @return 数据管理集合
      */
-    public List<Data> selectDataList(Data data);
+     List<Data> selectDataList(Data data);
 
     /**
      * 新增数据管理
@@ -36,7 +34,7 @@ public interface IDataService
      * @param data 数据管理
      * @return 结果
      */
-    public int insertData(Data data);
+     int insertData(Data data);
 
     /**
      * 修改数据管理
@@ -44,7 +42,7 @@ public interface IDataService
      * @param data 数据管理
      * @return 结果
      */
-    public int updateData(Data data);
+     int updateData(Data data);
 
     /**
      * 批量删除数据管理
@@ -52,16 +50,9 @@ public interface IDataService
      * @param ids 需要删除的数据管理主键集合
      * @return 结果
      */
-    public int deleteDataByIds(Long[] ids);
+     int deleteDataByIds(String[] ids);
 
-    /**
-     * 删除数据管理信息
-     * 
-     * @param id 数据管理主键
-     * @return 结果
-     */
-    public int deleteDataById(Long id);
 
-    List<Map<String,Object>> getOptions();
+    List<Data> getOptions();
 
 }

+ 5 - 12
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/IFaultPhysicalModelService.java

@@ -19,7 +19,7 @@ public interface IFaultPhysicalModelService
      * @param id 故障物理模型管理主键
      * @return 故障物理模型管理
      */
-    public FaultPhysicalModel selectFaultPhysicalModelById(Long id);
+     FaultPhysicalModel selectFaultPhysicalModelById(String id);
 
     /**
      * 查询故障物理模型管理列表
@@ -27,7 +27,7 @@ public interface IFaultPhysicalModelService
      * @param faultPhysicalModel 故障物理模型管理
      * @return 故障物理模型管理集合
      */
-    public List<FaultPhysicalModel> selectFaultPhysicalModelList(FaultPhysicalModel faultPhysicalModel);
+     List<FaultPhysicalModel> selectFaultPhysicalModelList(FaultPhysicalModel faultPhysicalModel);
 
     /**
      * 新增故障物理模型管理
@@ -35,7 +35,7 @@ public interface IFaultPhysicalModelService
      * @param faultPhysicalModel 故障物理模型管理
      * @return 结果
      */
-    public int insertFaultPhysicalModel(FaultPhysicalModel faultPhysicalModel);
+     int insertFaultPhysicalModel(FaultPhysicalModel faultPhysicalModel);
 
     /**
      * 修改故障物理模型管理
@@ -43,7 +43,7 @@ public interface IFaultPhysicalModelService
      * @param faultPhysicalModel 故障物理模型管理
      * @return 结果
      */
-    public int updateFaultPhysicalModel(FaultPhysicalModel faultPhysicalModel);
+     int updateFaultPhysicalModel(FaultPhysicalModel faultPhysicalModel);
 
     /**
      * 批量删除故障物理模型管理
@@ -51,15 +51,8 @@ public interface IFaultPhysicalModelService
      * @param ids 需要删除的故障物理模型管理主键集合
      * @return 结果
      */
-    public int deleteFaultPhysicalModelByIds(Long[] ids);
+     int deleteFaultPhysicalModelByIds(String[] ids);
 
-    /**
-     * 删除故障物理模型管理信息
-     * 
-     * @param id 故障物理模型管理主键
-     * @return 结果
-     */
-    public int deleteFaultPhysicalModelById(Long id);
 
     List<Map<String,Object>> getOptions();
 }

+ 5 - 12
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/IFormulasService.java

@@ -17,7 +17,7 @@ public interface IFormulasService
      * @param id 公式管理管理主键
      * @return 公式管理管理
      */
-    public Formulas selectFormulasById(Long id);
+     Formulas selectFormulasById(String id);
 
     /**
      * 查询公式管理管理列表
@@ -25,7 +25,7 @@ public interface IFormulasService
      * @param formulas 公式管理管理
      * @return 公式管理管理集合
      */
-    public List<Formulas> selectFormulasList(Formulas formulas);
+     List<Formulas> selectFormulasList(Formulas formulas);
 
     /**
      * 新增公式管理管理
@@ -33,7 +33,7 @@ public interface IFormulasService
      * @param formulas 公式管理管理
      * @return 结果
      */
-    public int insertFormulas(Formulas formulas);
+     int insertFormulas(Formulas formulas);
 
     /**
      * 修改公式管理管理
@@ -41,7 +41,7 @@ public interface IFormulasService
      * @param formulas 公式管理管理
      * @return 结果
      */
-    public int updateFormulas(Formulas formulas);
+     int updateFormulas(Formulas formulas);
 
     /**
      * 批量删除公式管理管理
@@ -49,13 +49,6 @@ public interface IFormulasService
      * @param ids 需要删除的公式管理管理主键集合
      * @return 结果
      */
-    public int deleteFormulasByIds(Long[] ids);
+     int deleteFormulasByIds(String[] ids);
 
-    /**
-     * 删除公式管理管理信息
-     * 
-     * @param id 公式管理管理主键
-     * @return 结果
-     */
-    public int deleteFormulasById(Long id);
 }

+ 37 - 0
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/IModelDataGenService.java

@@ -0,0 +1,37 @@
+package com.cn.fdapfe.biz.service;
+
+import java.util.List;
+
+import com.cn.fdapfe.biz.domain.ModelDataGen;
+
+/**
+ * 物理模型数据生成管理Service接口
+ * 
+ * @author Allen
+ * @date 2025-03-07
+ */
+public interface IModelDataGenService
+{
+    /**
+     * 查询物理模型数据生成管理列表
+     */
+    List<ModelDataGen> selectList(ModelDataGen modelDataGen);
+    /**
+     * 获取物理模型数据生成管理详细信息
+     */
+    ModelDataGen selectOne(String id);
+    /**
+     * 新增物理模型数据生成管理
+     */
+    int add(ModelDataGen modelDataGen);
+    /**
+     * 修改物理模型数据生成管理
+     */
+    int update(ModelDataGen modelDataGen);
+    /**
+     * 删除物理模型数据生成管理
+     */
+    int delete(String[] ids);
+
+
+}

+ 0 - 61
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/IPhyModelDataGenService.java

@@ -1,61 +0,0 @@
-package com.cn.fdapfe.biz.service;
-
-import java.util.List;
-import com.cn.fdapfe.biz.domain.PhyModelDataGen;
-
-/**
- * 物理模型数据生成管理Service接口
- * 
- * @author Allen
- * @date 2025-03-07
- */
-public interface IPhyModelDataGenService 
-{
-    /**
-     * 查询物理模型数据生成管理
-     * 
-     * @param id 物理模型数据生成管理主键
-     * @return 物理模型数据生成管理
-     */
-    public PhyModelDataGen selectPhyModelDataGenById(Long id);
-
-    /**
-     * 查询物理模型数据生成管理列表
-     * 
-     * @param phyModelDataGen 物理模型数据生成管理
-     * @return 物理模型数据生成管理集合
-     */
-    public List<PhyModelDataGen> selectPhyModelDataGenList(PhyModelDataGen phyModelDataGen);
-
-    /**
-     * 新增物理模型数据生成管理
-     * 
-     * @param phyModelDataGen 物理模型数据生成管理
-     * @return 结果
-     */
-    public int insertPhyModelDataGen(PhyModelDataGen phyModelDataGen);
-
-    /**
-     * 修改物理模型数据生成管理
-     * 
-     * @param phyModelDataGen 物理模型数据生成管理
-     * @return 结果
-     */
-    public int updatePhyModelDataGen(PhyModelDataGen phyModelDataGen);
-
-    /**
-     * 批量删除物理模型数据生成管理
-     * 
-     * @param ids 需要删除的物理模型数据生成管理主键集合
-     * @return 结果
-     */
-    public int deletePhyModelDataGenByIds(Long[] ids);
-
-    /**
-     * 删除物理模型数据生成管理信息
-     * 
-     * @param id 物理模型数据生成管理主键
-     * @return 结果
-     */
-    public int deletePhyModelDataGenById(Long id);
-}

+ 0 - 61
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/IPhyNoiseDataGenService.java

@@ -1,61 +0,0 @@
-package com.cn.fdapfe.biz.service;
-
-import java.util.List;
-import com.cn.fdapfe.biz.domain.PhyNoiseDataGen;
-
-/**
- * 噪声数据生成管理Service接口
- * 
- * @author Allen
- * @date 2025-03-07
- */
-public interface IPhyNoiseDataGenService 
-{
-    /**
-     * 查询噪声数据生成管理
-     * 
-     * @param id 噪声数据生成管理主键
-     * @return 噪声数据生成管理
-     */
-    public PhyNoiseDataGen selectPhyNoiseDataGenById(Long id);
-
-    /**
-     * 查询噪声数据生成管理列表
-     * 
-     * @param phyNoiseDataGen 噪声数据生成管理
-     * @return 噪声数据生成管理集合
-     */
-    public List<PhyNoiseDataGen> selectPhyNoiseDataGenList(PhyNoiseDataGen phyNoiseDataGen);
-
-    /**
-     * 新增噪声数据生成管理
-     * 
-     * @param phyNoiseDataGen 噪声数据生成管理
-     * @return 结果
-     */
-    public int insertPhyNoiseDataGen(PhyNoiseDataGen phyNoiseDataGen);
-
-    /**
-     * 修改噪声数据生成管理
-     * 
-     * @param phyNoiseDataGen 噪声数据生成管理
-     * @return 结果
-     */
-    public int updatePhyNoiseDataGen(PhyNoiseDataGen phyNoiseDataGen);
-
-    /**
-     * 批量删除噪声数据生成管理
-     * 
-     * @param ids 需要删除的噪声数据生成管理主键集合
-     * @return 结果
-     */
-    public int deletePhyNoiseDataGenByIds(Long[] ids);
-
-    /**
-     * 删除噪声数据生成管理信息
-     * 
-     * @param id 噪声数据生成管理主键
-     * @return 结果
-     */
-    public int deletePhyNoiseDataGenById(Long id);
-}

+ 0 - 61
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/ITestDataGenService.java

@@ -1,61 +0,0 @@
-package com.cn.fdapfe.biz.service;
-
-import java.util.List;
-import com.cn.fdapfe.biz.domain.TestDataGen;
-
-/**
- * 测试数据生成管理Service接口
- * 
- * @author Allen
- * @date 2025-03-07
- */
-public interface ITestDataGenService 
-{
-    /**
-     * 查询测试数据生成管理
-     * 
-     * @param id 测试数据生成管理主键
-     * @return 测试数据生成管理
-     */
-    public TestDataGen selectTestDataGenById(Long id);
-
-    /**
-     * 查询测试数据生成管理列表
-     * 
-     * @param testDataGen 测试数据生成管理
-     * @return 测试数据生成管理集合
-     */
-    public List<TestDataGen> selectTestDataGenList(TestDataGen testDataGen);
-
-    /**
-     * 新增测试数据生成管理
-     * 
-     * @param testDataGen 测试数据生成管理
-     * @return 结果
-     */
-    public int insertTestDataGen(TestDataGen testDataGen);
-
-    /**
-     * 修改测试数据生成管理
-     * 
-     * @param testDataGen 测试数据生成管理
-     * @return 结果
-     */
-    public int updateTestDataGen(TestDataGen testDataGen);
-
-    /**
-     * 批量删除测试数据生成管理
-     * 
-     * @param ids 需要删除的测试数据生成管理主键集合
-     * @return 结果
-     */
-    public int deleteTestDataGenByIds(Long[] ids);
-
-    /**
-     * 删除测试数据生成管理信息
-     * 
-     * @param id 测试数据生成管理主键
-     * @return 结果
-     */
-    public int deleteTestDataGenById(Long id);
-}

+ 55 - 26
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/impl/DataServiceImpl.java

@@ -1,15 +1,25 @@
 package com.cn.fdapfe.biz.service.impl;
 
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Arrays;
 import java.util.List;
-import java.util.Map;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.cn.fdapfe.common.annotation.RepeatSubmit;
 import com.cn.fdapfe.common.utils.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
+import com.cn.fdapfe.common.utils.SecurityUtils;
+import com.cn.fdapfe.common.utils.StringUtils;
+import com.cn.fdapfe.common.utils.uuid.UUID;
 import org.springframework.stereotype.Service;
 import com.cn.fdapfe.biz.mapper.DataMapper;
 import com.cn.fdapfe.biz.domain.Data;
 import com.cn.fdapfe.biz.service.IDataService;
 
+import javax.annotation.Resource;
+
 /**
  * 数据管理Service业务层处理
  * 
@@ -17,9 +27,9 @@ import com.cn.fdapfe.biz.service.IDataService;
  * @date 2025-03-07
  */
 @Service
-public class DataServiceImpl implements IDataService 
+public class DataServiceImpl implements IDataService
 {
-    @Autowired
+    @Resource
     private DataMapper dataMapper;
 
     /**
@@ -29,11 +39,12 @@ public class DataServiceImpl implements IDataService
      * @return 数据管理
      */
     @Override
-    public Data selectDataById(Long id)
+    public Data selectDataById(String id)
     {
-        return dataMapper.selectDataById(id);
+        return dataMapper.selectById(id);
     }
 
+
     /**
      * 查询数据管理列表
      * 
@@ -43,7 +54,11 @@ public class DataServiceImpl implements IDataService
     @Override
     public List<Data> selectDataList(Data data)
     {
-        return dataMapper.selectDataList(data);
+        QueryWrapper<Data> wrapper = new QueryWrapper<>();
+        wrapper.lambda().eq(StringUtils.isNotEmpty(data.getId()),Data::getId, data.getId())
+                .eq(StringUtils.isNotEmpty(data.getName()),Data::getName, data.getName())
+                .eq(StringUtils.isNotEmpty(data.getType()),Data::getType, data.getType());
+        return dataMapper.selectList(wrapper);
     }
 
     /**
@@ -52,11 +67,14 @@ public class DataServiceImpl implements IDataService
      * @param data 数据管理
      * @return 结果
      */
+    @RepeatSubmit
     @Override
     public int insertData(Data data)
     {
         data.setCreateTime(DateUtils.getNowDate());
-        return dataMapper.insertData(data);
+        data.setUpdateBy(SecurityUtils.getUsername());
+        data.setId(UUID.randomUUID().toString());
+        return dataMapper.insert(data);
     }
 
     /**
@@ -65,11 +83,13 @@ public class DataServiceImpl implements IDataService
      * @param data 数据管理
      * @return 结果
      */
+    @RepeatSubmit
     @Override
     public int updateData(Data data)
     {
+        data.setUpdateBy(SecurityUtils.getUsername());
         data.setUpdateTime(DateUtils.getNowDate());
-        return dataMapper.updateData(data);
+        return dataMapper.updateById(data);
     }
 
     /**
@@ -78,26 +98,35 @@ public class DataServiceImpl implements IDataService
      * @param ids 需要删除的数据管理主键
      * @return 结果
      */
-    @Override
-    public int deleteDataByIds(Long[] ids)
-    {
-        return dataMapper.deleteDataByIds(ids);
-    }
+    public int deleteDataByIds(String[] ids) {
+        if (ids == null || ids.length == 0) {
+            return 0;
+        }
 
-    /**
-     * 删除数据管理信息
-     * 
-     * @param id 数据管理主键
-     * @return 结果
-     */
-    @Override
-    public int deleteDataById(Long id)
-    {
-        return dataMapper.deleteDataById(id);
+        for (String id : ids) {
+            // 根据 id 查询数据获取 filePath
+            Data entity = dataMapper.selectById(id);
+            if (entity != null) {
+                String filePath = entity.getFilePath();
+                if (filePath != null && !filePath.isEmpty()) {
+                    try {
+                        Path path = Paths.get(filePath).resolve(entity.getFileName());
+                        if (Files.exists(path)) {
+                            Files.delete(path);
+                        }
+                    } catch (IOException e) {
+                        // 记录日志,可根据实际情况使用日志框架
+                        System.err.println("删除文件失败,文件路径: " + filePath + ", 错误信息: " + e.getMessage());
+                    }
+                }
+            }
+        }
+
+        return ids.length == 1 ? dataMapper.deleteById(ids[0]) : dataMapper.deleteBatchIds(Arrays.asList(ids));
     }
 
     @Override
-    public List<Map<String, Object>> getOptions() {
-        return dataMapper.getOptions();
+    public List<Data> getOptions() {
+        return dataMapper.selectList(null);
     }
 }

+ 36 - 28
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/impl/FaultPhysicalModelServiceImpl.java

@@ -1,15 +1,24 @@
 package com.cn.fdapfe.biz.service.impl;
 
+import java.lang.reflect.Array;
+import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
 import com.cn.fdapfe.common.utils.DateUtils;
+import com.cn.fdapfe.common.utils.SecurityUtils;
+import com.cn.fdapfe.common.utils.uuid.UUID;
+import jdk.nashorn.internal.ir.annotations.Reference;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.cn.fdapfe.biz.mapper.FaultPhysicalModelMapper;
 import com.cn.fdapfe.biz.domain.FaultPhysicalModel;
 import com.cn.fdapfe.biz.service.IFaultPhysicalModelService;
 
+import javax.annotation.Resource;
+
 /**
  * 故障物理模型管理Service业务层处理
  * 
@@ -19,7 +28,7 @@ import com.cn.fdapfe.biz.service.IFaultPhysicalModelService;
 @Service
 public class FaultPhysicalModelServiceImpl implements IFaultPhysicalModelService 
 {
-    @Autowired
+    @Resource
     private FaultPhysicalModelMapper faultPhysicalModelMapper;
 
     /**
@@ -29,47 +38,58 @@ public class FaultPhysicalModelServiceImpl implements IFaultPhysicalModelService
      * @return 故障物理模型管理
      */
     @Override
-    public FaultPhysicalModel selectFaultPhysicalModelById(Long id)
+    public FaultPhysicalModel selectFaultPhysicalModelById(String id)
     {
-        return faultPhysicalModelMapper.selectFaultPhysicalModelById(id);
+        return faultPhysicalModelMapper.selectById(id);
     }
 
     /**
      * 查询故障物理模型管理列表
      * 
-     * @param faultPhysicalModel 故障物理模型管理
+     * @param po 故障物理模型管理
      * @return 故障物理模型管理
      */
     @Override
-    public List<FaultPhysicalModel> selectFaultPhysicalModelList(FaultPhysicalModel faultPhysicalModel)
+    public List<FaultPhysicalModel> selectFaultPhysicalModelList(FaultPhysicalModel po)
     {
-        return faultPhysicalModelMapper.selectFaultPhysicalModelList(faultPhysicalModel);
+        QueryWrapper<FaultPhysicalModel> wrapper = new QueryWrapper<>();
+        wrapper.lambda().like(StringUtils.isNotEmpty(po.getModelName()), FaultPhysicalModel::getModelName, po.getModelName())
+                .eq(StringUtils.isNotEmpty(po.getModelType()), FaultPhysicalModel::getModelType, po.getModelType())
+                .like(StringUtils.isNotEmpty(po.getModelPath()), FaultPhysicalModel::getModelPath, po.getModelPath())
+                .eq(StringUtils.isNotEmpty(po.getModelAttribution()),FaultPhysicalModel::getModelAttribution,po.getModelAttribution())
+                .orderByDesc(FaultPhysicalModel::getCreateBy);
+        return faultPhysicalModelMapper.selectList(wrapper);
     }
 
     /**
      * 新增故障物理模型管理
      * 
-     * @param faultPhysicalModel 故障物理模型管理
+     * @param po 故障物理模型管理
      * @return 结果
      */
     @Override
-    public int insertFaultPhysicalModel(FaultPhysicalModel faultPhysicalModel)
+    public int insertFaultPhysicalModel(FaultPhysicalModel po)
     {
-        faultPhysicalModel.setCreateTime(DateUtils.getNowDate());
-        return faultPhysicalModelMapper.insertFaultPhysicalModel(faultPhysicalModel);
+        po.setCreateTime(DateUtils.getNowDate());
+        po.setCreateBy(SecurityUtils.getUsername());
+        po.setModelId(UUID.randomUUID().toString());
+        return faultPhysicalModelMapper.insert(po);
     }
 
     /**
      * 修改故障物理模型管理
      * 
-     * @param faultPhysicalModel 故障物理模型管理
+     * @param po 故障物理模型管理
      * @return 结果
      */
     @Override
-    public int updateFaultPhysicalModel(FaultPhysicalModel faultPhysicalModel)
+    public int updateFaultPhysicalModel(FaultPhysicalModel po)
     {
-        faultPhysicalModel.setUpdateTime(DateUtils.getNowDate());
-        return faultPhysicalModelMapper.updateFaultPhysicalModel(faultPhysicalModel);
+        po.setUpdateTime(DateUtils.getNowDate());
+        po.setUpdateBy(SecurityUtils.getUsername());
+        FaultPhysicalModel byId = faultPhysicalModelMapper.selectById(po.getModelId());
+
+        return byId==null ?insertFaultPhysicalModel(po): faultPhysicalModelMapper.updateById(po);
     }
 
     /**
@@ -79,21 +99,9 @@ public class FaultPhysicalModelServiceImpl implements IFaultPhysicalModelService
      * @return 结果
      */
     @Override
-    public int deleteFaultPhysicalModelByIds(Long[] ids)
-    {
-        return faultPhysicalModelMapper.deleteFaultPhysicalModelByIds(ids);
-    }
-
-    /**
-     * 删除故障物理模型管理信息
-     * 
-     * @param id 故障物理模型管理主键
-     * @return 结果
-     */
-    @Override
-    public int deleteFaultPhysicalModelById(Long id)
+    public int deleteFaultPhysicalModelByIds(String[] ids)
     {
-        return faultPhysicalModelMapper.deleteFaultPhysicalModelById(id);
+        return ids!=null && ids.length == 1 ? faultPhysicalModelMapper.deleteById(ids[0]) : faultPhysicalModelMapper.deleteBatchIds(Arrays.asList(ids));
     }
 
     @Override

+ 3 - 1
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/impl/FdAlgorithmServiceImpl.java

@@ -13,6 +13,8 @@ import com.cn.fdapfe.biz.mapper.FdAlgorithmMapper;
 import com.cn.fdapfe.biz.domain.FdAlgorithm;
 import com.cn.fdapfe.biz.service.IFdAlgorithmService;
 
+import javax.annotation.Resource;
+
 /**
  * 故障诊断算法功能验证Service业务层处理
  * 
@@ -22,7 +24,7 @@ import com.cn.fdapfe.biz.service.IFdAlgorithmService;
 @Service
 public class FdAlgorithmServiceImpl implements IFdAlgorithmService 
 {
-    @Autowired
+    @Resource
     private FdAlgorithmMapper fdAlgorithmMapper;
 
     /**

+ 79 - 18
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/impl/FormulasServiceImpl.java

@@ -1,13 +1,21 @@
 package com.cn.fdapfe.biz.service.impl;
 
-import java.util.List;
+import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
 import com.cn.fdapfe.common.utils.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
+import com.cn.fdapfe.common.utils.SecurityUtils;
+import com.cn.fdapfe.common.utils.uuid.UUID;
 import org.springframework.stereotype.Service;
 import com.cn.fdapfe.biz.mapper.FormulasMapper;
 import com.cn.fdapfe.biz.domain.Formulas;
 import com.cn.fdapfe.biz.service.IFormulasService;
 
+import javax.annotation.Resource;
+
 /**
  * 公式管理管理Service业务层处理
  * 
@@ -17,7 +25,10 @@ import com.cn.fdapfe.biz.service.IFormulasService;
 @Service
 public class FormulasServiceImpl implements IFormulasService 
 {
-    @Autowired
+
+    // 匹配公式中的参数(支持字母、希腊字母α、下划线)
+    private static final Pattern PARAM_PATTERN = Pattern.compile("[αA-Za-z_$]+");
+    @Resource
     private FormulasMapper formulasMapper;
 
     /**
@@ -27,9 +38,9 @@ public class FormulasServiceImpl implements IFormulasService
      * @return 公式管理管理
      */
     @Override
-    public Formulas selectFormulasById(Long id)
+    public Formulas selectFormulasById(String id)
     {
-        return formulasMapper.selectFormulasById(id);
+        return formulasMapper.selectById(id);
     }
 
     /**
@@ -41,7 +52,22 @@ public class FormulasServiceImpl implements IFormulasService
     @Override
     public List<Formulas> selectFormulasList(Formulas formulas)
     {
-        return formulasMapper.selectFormulasList(formulas);
+
+        QueryWrapper<Formulas> wrapper = new QueryWrapper<>();
+        wrapper.eq(StringUtils.isNotEmpty(formulas.getFormulaId()),"formula_id",formulas.getFormulaId())
+                .eq(StringUtils.isNotEmpty(formulas.getFormulaIndicator()),"formula_indicator",formulas.getFormulaIndicator())
+                .like(StringUtils.isNotEmpty(formulas.getFormulaName()),"formula_name",formulas.getFormulaName())
+                .or()
+                .like(StringUtils.isNotEmpty(formulas.getFormulaName()),"formula_short_name",formulas.getFormulaName())
+                .like(StringUtils.isNotEmpty(formulas.getCreateBy()),"create_by",formulas.getCreateBy())
+                .like(StringUtils.isNotEmpty(formulas.getUpdateBy()),"update_by",formulas.getUpdateBy());
+        if(formulas.getCreateTime()!=null){
+            wrapper.ge("create_time",formulas.getCreateTime());
+        }
+        if(formulas.getUpdateTime()!=null){
+            wrapper.le("update_time",formulas.getUpdateTime());
+        }
+        return formulasMapper.selectList(wrapper);
     }
 
     /**
@@ -54,7 +80,11 @@ public class FormulasServiceImpl implements IFormulasService
     public int insertFormulas(Formulas formulas)
     {
         formulas.setCreateTime(DateUtils.getNowDate());
-        return formulasMapper.insertFormulas(formulas);
+        formulas.setUpdateBy(SecurityUtils.getUsername());
+        formulas.setFormulaId(UUID.randomUUID().toString());
+        String generate = generate(formulas.getFormulaShortName(), formulas.getOriginalFormula());
+        formulas.setFormulaStoredProcedure(generate);
+        return formulasMapper.insert(formulas);
     }
 
     /**
@@ -67,7 +97,9 @@ public class FormulasServiceImpl implements IFormulasService
     public int updateFormulas(Formulas formulas)
     {
         formulas.setUpdateTime(DateUtils.getNowDate());
-        return formulasMapper.updateFormulas(formulas);
+        Formulas byId = formulasMapper.selectById(formulas.getFormulaId());
+
+        return byId==null ? insertFormulas(formulas): formulasMapper.updateById(formulas);
     }
 
     /**
@@ -77,20 +109,49 @@ public class FormulasServiceImpl implements IFormulasService
      * @return 结果
      */
     @Override
-    public int deleteFormulasByIds(Long[] ids)
+    public int deleteFormulasByIds(String[] ids)
     {
-        return formulasMapper.deleteFormulasByIds(ids);
+        return ids!=null && ids.length == 1 ? formulasMapper.deleteById(ids[0]): formulasMapper.deleteBatchIds(Arrays.asList(ids));
     }
 
     /**
-     * 删除公式管理管理信息
-     * 
-     * @param id 公式管理管理主键
-     * @return 结果
+     * 根据公式生成存储过程
+     * @param procName
+     * @param expression
+     * @return
      */
-    @Override
-    public int deleteFormulasById(Long id)
-    {
-        return formulasMapper.deleteFormulasById(id);
+    public static String generate(String procName, String expression) {
+        // 1. 解析公式中的参数(去重)
+        Set<String> params = new HashSet<>();
+        Matcher matcher = PARAM_PATTERN.matcher(expression);
+        while (matcher.find()) {
+            params.add(matcher.group());
+        }
+        // 转换为列表并排序(保证顺序一致)
+        List<String> paramList = new ArrayList<>(params);
+
+        // 2. 处理公式中的幂运算(α^2 → POW(α, 2))
+        String sqlExpr = expression.replaceAll("([αA-Za-z_$]+)\\^([\\d.]+)", "POW($1, $2)");
+
+        // 3. 组装参数声明(所有解析出的参数为输入,添加默认输出参数 result)
+        StringBuilder paramsSql = new StringBuilder();
+        for (int i = 0; i < paramList.size(); i++) {
+            String param = paramList.get(i);
+            paramsSql.append(param).append(" DOUBLE");
+            if (i != paramList.size() - 1) {
+                paramsSql.append(", ");
+            }
+        }
+        // 添加输出参数(默认名为 result,可自定义)
+        paramsSql.append(", result DOUBLE OUT");
+
+        // 4. 生成存储过程 SQL
+        return "DELIMITER //\n" +
+                "CREATE PROCEDURE " + procName + "(" + paramsSql + ")\n" +
+                "BEGIN\n" +
+                "    SET result = " + sqlExpr + ";\n" +
+                "END //\n" +
+                "DELIMITER ;";
     }
+
 }

+ 255 - 0
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/impl/ModelDataGenServiceImpl.java

@@ -0,0 +1,255 @@
+package com.cn.fdapfe.biz.service.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.cn.fdapfe.biz.domain.Data;
+import com.cn.fdapfe.biz.service.IDataService;
+import com.cn.fdapfe.web.controller.common.CommonController;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+import com.cn.fdapfe.biz.domain.ModelDataGen;
+import com.cn.fdapfe.biz.mapper.ModelDataGenMapper;
+import com.cn.fdapfe.biz.service.IModelDataGenService;
+import com.cn.fdapfe.common.utils.DateUtils;
+import com.cn.fdapfe.common.utils.SecurityUtils;
+import org.springframework.stereotype.Service;
+import javax.annotation.Resource;
+import java.io.*;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.StandardCopyOption;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+/**
+ * 物理模型数据生成管理Service业务层处理
+ *
+ * @author Allen
+ * @date 2025-03-07
+ */
+@Service
+public class ModelDataGenServiceImpl implements IModelDataGenService {
+    private static final Logger logger = LoggerFactory.getLogger(ModelDataGenServiceImpl.class);
+
+    @Resource
+    private ModelDataGenMapper mapper;
+    @Resource
+    private IDataService dataService;
+
+    @Resource
+    private CommonController commonController;
+
+    @Override
+    public List<ModelDataGen> selectList(ModelDataGen po) {
+        QueryWrapper<ModelDataGen> wrapper = buildQueryWrapper(po);
+        wrapper.orderByDesc("create_time");
+        return mapper.selectList(wrapper);
+    }
+
+    @Override
+    public ModelDataGen selectOne(String id) {
+        QueryWrapper<ModelDataGen> wrapper = new QueryWrapper<>();
+        wrapper.lambda().eq(ModelDataGen::getDataGenId, id);
+        return mapper.selectOne(wrapper);
+    }
+    /**
+     * 将指定目录下的指定文件拷贝、重命名并移动到目标文件夹
+     * @param sourceDirectory 源文件所在的目录
+     * @param sourceFileName 源文件的名称
+     * @param targetDirectory 目标文件夹
+     * @param newFileName 重命名后的新文件名
+     * @throws IOException 如果文件操作过程中出现 I/O 错误
+     */
+    public static String copyRenameAndMoveFile(String sourceDirectory, String sourceFileName,
+                                             String targetDirectory, String newFileName) throws IOException {
+        // 构建源文件的路径
+        Path sourcePath = Paths.get(sourceDirectory, sourceFileName);
+        // 构建目标文件的路径
+        Path targetPath = Paths.get(targetDirectory, newFileName);
+
+        // 检查源文件是否存在
+        if (Files.exists(sourcePath)) {
+            // 创建目标文件夹(如果不存在)
+            Files.createDirectories(targetPath.getParent());
+            // 拷贝文件并使用新的文件名
+            Files.copy(sourcePath, targetPath, StandardCopyOption.REPLACE_EXISTING);
+            // 可以选择删除源文件以实现移动效果
+             Files.delete(sourcePath);
+
+        } else {
+            System.out.println("源文件不存在: " + sourcePath);
+        }
+        return targetPath.toString();
+    }
+
+
+    @Override
+    public int add(ModelDataGen po) {
+            Data data = new Data();
+            data.setType("0");
+            data.setFileSuffix("csv");
+        if(Objects.equals(po.getModelType(), "2")){
+            try {
+                // 远程启动大模型生成数据
+                String path = new File(po.getModelPath()).getParent();
+                writeToTxt(path + File.separator + "input" + File.separator + "input.txt", po.getBizParams());
+                startExe(po.getModelPath());
+                //处理模型生成文件
+                String sourceDirectory = path + File.separator + "output";
+                String sourceFileName = "output.csv";
+                String targetDirectory = po.getOutputPath();
+                String newFileName = po.getNewFileName();
+                //生成文件处理后的新文件路径
+                String newFilePath = copyRenameAndMoveFile(sourceDirectory, sourceFileName, targetDirectory, newFileName);
+                data.setName(newFileName);
+                data.setFileName(newFileName);
+                data.setFilePath(newFilePath);
+                dataService.insertData(data);
+            } catch (Exception e) {
+                logger.error("启动大模型或写入参数时出错", e);
+                return 0;
+            }
+        }else{
+            ObjectMapper objectMapper = new ObjectMapper();
+            try {
+                List<Map<String, Object>> objectList = objectMapper.readValue(po.getBizParams(),
+                        new TypeReference<List<Map<String, Object>>>() {});
+                for (Map<String, Object> jsonMap : objectList) {
+                    String apiPath = extractLastPart(po.getModelPath(),"/");
+                    String jsonString = JSON.toJSONString(jsonMap);
+                    if (Objects.equals(apiPath, "zssc")) {
+                        String filePath = (String) jsonMap.get("noise_data_file");
+                        data.setFilePath(filePath);
+                        data.setFileName(extractLastPart(filePath,"\\"));
+                        data.setName(extractLastPart(filePath,"\\"));
+                    }else if(Objects.equals(apiPath, "cssc")) {
+                        String filePath = (String) jsonMap.get("test_data_file");
+                        data.setFilePath(filePath);
+                        data.setFileName(extractLastPart(filePath,"\\"));
+                        data.setName(extractLastPart(filePath,"\\"));
+                    }
+                    boolean request = sendPostRequest(po.getModelPath(), jsonString);
+                    if(request){
+                        dataService.insertData(data);
+                    }
+                }
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+//
+        }
+        ModelDataGen one = selectOne(po.getDataGenId());
+        po.setCreateTime(DateUtils.getNowDate());
+        po.setCreateBy(SecurityUtils.getUsername());
+        return one != null ? update(po) : mapper.insert(po);
+    }
+
+    public static String extractLastPart(String url,String dom) {
+        int lastSlashIndex = url.lastIndexOf(dom);
+        if (lastSlashIndex != -1 && lastSlashIndex < url.length() - 1) {
+            return url.substring(lastSlashIndex + 1);
+        }
+        return "";
+    }
+    @Override
+    public int update(ModelDataGen po) {
+        ModelDataGen one = selectOne(po.getDataGenId());
+        setCreateInfo(po);
+        return one != null ? mapper.updateById(po) : mapper.insert(po);
+    }
+
+    @Override
+    public int delete(String[] ids) {
+        if (ids == null || ids.length == 0) {
+            return 0;
+        }
+        return ids.length == 1 ? mapper.deleteById(ids[0]) : mapper.deleteBatchIds(Arrays.asList(ids));
+    }
+
+    public static void startExe(String exePath) throws IOException, InterruptedException {
+        ProcessBuilder processBuilder = new ProcessBuilder(exePath);
+        Process process = processBuilder.start();
+        int exitCode = process.waitFor();
+        logger.info("程序退出码: {}", exitCode);
+    }
+
+    public static void writeToTxt(String filePath, String content) throws IOException {
+        try (FileWriter writer = new FileWriter(filePath, false)) {
+            writer.write("");
+            writer.write(content);
+            writer.flush();
+        }
+    }
+
+    public static boolean sendPostRequest(String apiUrl, String jsonBody) throws IOException {
+        URL url = new URL(apiUrl);
+        HttpURLConnection connection = (HttpURLConnection) url.openConnection();
+        connection.setRequestMethod("POST");
+        // 显式指定UTF-8编码
+        connection.setRequestProperty("Content-Type", "application/json; charset=UTF-8");
+        connection.setDoOutput(true);
+
+        byte[] requestBody = jsonBody.getBytes(StandardCharsets.UTF_8);
+        connection.setRequestProperty("Content-Length", String.valueOf(requestBody.length));
+
+        try (DataOutputStream outputStream = new DataOutputStream(connection.getOutputStream())) {
+            // 使用UTF-8编码写入字节
+            outputStream.write(requestBody);
+            outputStream.flush();
+        }
+
+        int responseCode = connection.getResponseCode();
+        StringBuilder response = new StringBuilder();
+        try (BufferedReader reader = new BufferedReader(
+                // 显式指定UTF-8读取响应
+                new InputStreamReader(
+                        responseCode >= 200 && responseCode < 300 ?
+                                connection.getInputStream() : connection.getErrorStream(),
+                        StandardCharsets.UTF_8
+                )
+        )) {
+            String line;
+            while ((line = reader.readLine()) != null) {
+                response.append(line);
+            }
+        }
+        logger.info("API 请求响应: {}", response);
+        // 判断响应状态码是否在200 - 299之间
+        return responseCode >= 200 && responseCode < 300;
+    }
+
+    private QueryWrapper<ModelDataGen> buildQueryWrapper(ModelDataGen po) {
+        QueryWrapper<ModelDataGen> wrapper = new QueryWrapper<>();
+        wrapper.like(StringUtils.isNotEmpty(po.getDataGenName()), "data_gen_name", po.getDataGenName())
+                .eq(StringUtils.isNotEmpty(po.getModelId()), "model_id", po.getModelId())
+                .eq(StringUtils.isNotEmpty(po.getStatus()), "status", po.getStatus())
+                .eq(StringUtils.isNotEmpty(po.getDataGenId()), "data_gen_id", po.getDataGenId())
+                .eq(StringUtils.isNotEmpty(po.getCreateBy()), "create_by", po.getCreateBy());
+        if (po.getStartTime() != null) {
+            wrapper.ge("start_time", po.getStartTime());
+        }
+        if (po.getEndTime() != null) {
+            wrapper.le("end_time", po.getEndTime());
+        }
+        return wrapper;
+    }
+
+    private void setUpdateInfo(ModelDataGen po) {
+        po.setUpdateBy(SecurityUtils.getUsername());
+        po.setUpdateTime(DateUtils.getNowDate());
+    }
+
+    private void setCreateInfo(ModelDataGen po) {
+        po.setCreateTime(DateUtils.getNowDate());
+        po.setCreateBy(SecurityUtils.getUsername());
+    }
+}

+ 0 - 96
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/impl/PhyModelDataGenServiceImpl.java

@@ -1,96 +0,0 @@
-package com.cn.fdapfe.biz.service.impl;
-
-import java.util.List;
-import com.cn.fdapfe.common.utils.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.cn.fdapfe.biz.mapper.PhyModelDataGenMapper;
-import com.cn.fdapfe.biz.domain.PhyModelDataGen;
-import com.cn.fdapfe.biz.service.IPhyModelDataGenService;
-
-/**
- * 物理模型数据生成管理Service业务层处理
- * 
- * @author Allen
- * @date 2025-03-07
- */
-@Service
-public class PhyModelDataGenServiceImpl implements IPhyModelDataGenService 
-{
-    @Autowired
-    private PhyModelDataGenMapper phyModelDataGenMapper;
-
-    /**
-     * 查询物理模型数据生成管理
-     * 
-     * @param id 物理模型数据生成管理主键
-     * @return 物理模型数据生成管理
-     */
-    @Override
-    public PhyModelDataGen selectPhyModelDataGenById(Long id)
-    {
-        return phyModelDataGenMapper.selectPhyModelDataGenById(id);
-    }
-
-    /**
-     * 查询物理模型数据生成管理列表
-     * 
-     * @param phyModelDataGen 物理模型数据生成管理
-     * @return 物理模型数据生成管理
-     */
-    @Override
-    public List<PhyModelDataGen> selectPhyModelDataGenList(PhyModelDataGen phyModelDataGen)
-    {
-        return phyModelDataGenMapper.selectPhyModelDataGenList(phyModelDataGen);
-    }
-
-    /**
-     * 新增物理模型数据生成管理
-     * 
-     * @param phyModelDataGen 物理模型数据生成管理
-     * @return 结果
-     */
-    @Override
-    public int insertPhyModelDataGen(PhyModelDataGen phyModelDataGen)
-    {
-        phyModelDataGen.setCreateTime(DateUtils.getNowDate());
-        return phyModelDataGenMapper.insertPhyModelDataGen(phyModelDataGen);
-    }
-
-    /**
-     * 修改物理模型数据生成管理
-     * 
-     * @param phyModelDataGen 物理模型数据生成管理
-     * @return 结果
-     */
-    @Override
-    public int updatePhyModelDataGen(PhyModelDataGen phyModelDataGen)
-    {
-        phyModelDataGen.setUpdateTime(DateUtils.getNowDate());
-        return phyModelDataGenMapper.updatePhyModelDataGen(phyModelDataGen);
-    }
-
-    /**
-     * 批量删除物理模型数据生成管理
-     * 
-     * @param ids 需要删除的物理模型数据生成管理主键
-     * @return 结果
-     */
-    @Override
-    public int deletePhyModelDataGenByIds(Long[] ids)
-    {
-        return phyModelDataGenMapper.deletePhyModelDataGenByIds(ids);
-    }
-
-    /**
-     * 删除物理模型数据生成管理信息
-     * 
-     * @param id 物理模型数据生成管理主键
-     * @return 结果
-     */
-    @Override
-    public int deletePhyModelDataGenById(Long id)
-    {
-        return phyModelDataGenMapper.deletePhyModelDataGenById(id);
-    }
-}

+ 0 - 96
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/impl/PhyNoiseDataGenServiceImpl.java

@@ -1,96 +0,0 @@
-package com.cn.fdapfe.biz.service.impl;
-
-import java.util.List;
-import com.cn.fdapfe.common.utils.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.cn.fdapfe.biz.mapper.PhyNoiseDataGenMapper;
-import com.cn.fdapfe.biz.domain.PhyNoiseDataGen;
-import com.cn.fdapfe.biz.service.IPhyNoiseDataGenService;
-
-/**
- * 噪声数据生成管理Service业务层处理
- * 
- * @author Allen
- * @date 2025-03-07
- */
-@Service
-public class PhyNoiseDataGenServiceImpl implements IPhyNoiseDataGenService 
-{
-    @Autowired
-    private PhyNoiseDataGenMapper phyNoiseDataGenMapper;
-
-    /**
-     * 查询噪声数据生成管理
-     * 
-     * @param id 噪声数据生成管理主键
-     * @return 噪声数据生成管理
-     */
-    @Override
-    public PhyNoiseDataGen selectPhyNoiseDataGenById(Long id)
-    {
-        return phyNoiseDataGenMapper.selectPhyNoiseDataGenById(id);
-    }
-
-    /**
-     * 查询噪声数据生成管理列表
-     * 
-     * @param phyNoiseDataGen 噪声数据生成管理
-     * @return 噪声数据生成管理
-     */
-    @Override
-    public List<PhyNoiseDataGen> selectPhyNoiseDataGenList(PhyNoiseDataGen phyNoiseDataGen)
-    {
-        return phyNoiseDataGenMapper.selectPhyNoiseDataGenList(phyNoiseDataGen);
-    }
-
-    /**
-     * 新增噪声数据生成管理
-     * 
-     * @param phyNoiseDataGen 噪声数据生成管理
-     * @return 结果
-     */
-    @Override
-    public int insertPhyNoiseDataGen(PhyNoiseDataGen phyNoiseDataGen)
-    {
-        phyNoiseDataGen.setCreateTime(DateUtils.getNowDate());
-        return phyNoiseDataGenMapper.insertPhyNoiseDataGen(phyNoiseDataGen);
-    }
-
-    /**
-     * 修改噪声数据生成管理
-     * 
-     * @param phyNoiseDataGen 噪声数据生成管理
-     * @return 结果
-     */
-    @Override
-    public int updatePhyNoiseDataGen(PhyNoiseDataGen phyNoiseDataGen)
-    {
-        phyNoiseDataGen.setUpdateTime(DateUtils.getNowDate());
-        return phyNoiseDataGenMapper.updatePhyNoiseDataGen(phyNoiseDataGen);
-    }
-
-    /**
-     * 批量删除噪声数据生成管理
-     * 
-     * @param ids 需要删除的噪声数据生成管理主键
-     * @return 结果
-     */
-    @Override
-    public int deletePhyNoiseDataGenByIds(Long[] ids)
-    {
-        return phyNoiseDataGenMapper.deletePhyNoiseDataGenByIds(ids);
-    }
-
-    /**
-     * 删除噪声数据生成管理信息
-     * 
-     * @param id 噪声数据生成管理主键
-     * @return 结果
-     */
-    @Override
-    public int deletePhyNoiseDataGenById(Long id)
-    {
-        return phyNoiseDataGenMapper.deletePhyNoiseDataGenById(id);
-    }
-}

+ 0 - 96
fdapfe-admin/src/main/java/com/cn/fdapfe/biz/service/impl/TestDataGenServiceImpl.java

@@ -1,96 +0,0 @@
-package com.cn.fdapfe.biz.service.impl;
-
-import java.util.List;
-import com.cn.fdapfe.common.utils.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.cn.fdapfe.biz.mapper.TestDataGenMapper;
-import com.cn.fdapfe.biz.domain.TestDataGen;
-import com.cn.fdapfe.biz.service.ITestDataGenService;
-
-/**
- * 测试数据生成管理Service业务层处理
- * 
- * @author Allen
- * @date 2025-03-07
- */
-@Service
-public class TestDataGenServiceImpl implements ITestDataGenService 
-{
-    @Autowired
-    private TestDataGenMapper testDataGenMapper;
-
-    /**
-     * 查询测试数据生成管理
-     * 
-     * @param id 测试数据生成管理主键
-     * @return 测试数据生成管理
-     */
-    @Override
-    public TestDataGen selectTestDataGenById(Long id)
-    {
-        return testDataGenMapper.selectTestDataGenById(id);
-    }
-
-    /**
-     * 查询测试数据生成管理列表
-     * 
-     * @param testDataGen 测试数据生成管理
-     * @return 测试数据生成管理
-     */
-    @Override
-    public List<TestDataGen> selectTestDataGenList(TestDataGen testDataGen)
-    {
-        return testDataGenMapper.selectTestDataGenList(testDataGen);
-    }
-
-    /**
-     * 新增测试数据生成管理
-     * 
-     * @param testDataGen 测试数据生成管理
-     * @return 结果
-     */
-    @Override
-    public int insertTestDataGen(TestDataGen testDataGen)
-    {
-        testDataGen.setCreateTime(DateUtils.getNowDate());
-        return testDataGenMapper.insertTestDataGen(testDataGen);
-    }
-
-    /**
-     * 修改测试数据生成管理
-     * 
-     * @param testDataGen 测试数据生成管理
-     * @return 结果
-     */
-    @Override
-    public int updateTestDataGen(TestDataGen testDataGen)
-    {
-        testDataGen.setUpdateTime(DateUtils.getNowDate());
-        return testDataGenMapper.updateTestDataGen(testDataGen);
-    }
-
-    /**
-     * 批量删除测试数据生成管理
-     * 
-     * @param ids 需要删除的测试数据生成管理主键
-     * @return 结果
-     */
-    @Override
-    public int deleteTestDataGenByIds(Long[] ids)
-    {
-        return testDataGenMapper.deleteTestDataGenByIds(ids);
-    }
-
-    /**
-     * 删除测试数据生成管理信息
-     * 
-     * @param id 测试数据生成管理主键
-     * @return 结果
-     */
-    @Override
-    public int deleteTestDataGenById(Long id)
-    {
-        return testDataGenMapper.deleteTestDataGenById(id);
-    }
-}

+ 76 - 0
fdapfe-admin/src/main/java/com/cn/fdapfe/models/controller/ProcedureController.java

@@ -0,0 +1,76 @@
+package com.cn.fdapfe.models.controller;
+
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+@RestController
+@RequestMapping("/api")
+public class ProcedureController {
+
+    public static void main(String[] args) {
+//         模拟调试数据:测试 Fα 分数公式
+//        String procName = "calculate_f_score";
+//        String expression = "((α^2 + 1) * (TP/(TP+FN)) * (TN/(TN+FP))) / (α^2 * ((TP/(TP+FN)) + (TN/(TN+FP)))))";
+//
+//        // 生成存储过程 SQL
+//        String spSql = generate(procName, expression);
+//
+//        // 输出结果
+//        System.out.println("生成的存储过程 SQL:");
+//        System.out.println(spSql);
+//
+//        // 测试另一个公式:准确率公式(包含 TP, TN, FP, FN)
+        String accExpression = "max(TP/(TP+FP))";
+        String accProcName = "calculate_accuracy";
+        String accSpSql = generate(accProcName, accExpression);
+        System.out.println("\n\n生成的准确率存储过程 SQL:");
+        System.out.println(accSpSql);
+    }
+
+
+    // 匹配公式中的参数(支持字母、希腊字母α、下划线)
+    private static final Pattern PARAM_PATTERN = Pattern.compile("[αA-Za-z_$]+");
+    @PostMapping("Procedure")
+    public static String generate(String procName, String expression) {
+        // 1. 解析公式中的参数(去重)
+        Set<String> params = new HashSet<>();
+        Matcher matcher = PARAM_PATTERN.matcher(expression);
+        while (matcher.find()) {
+            params.add(matcher.group());
+        }
+        // 转换为列表并排序(保证顺序一致)
+        List<String> paramList = new ArrayList<>(params);
+
+        // 2. 处理公式中的幂运算(α^2 → POW(α, 2))
+        String sqlExpr = expression.replaceAll("([αA-Za-z_$]+)\\^([\\d.]+)", "POW($1, $2)");
+
+        // 3. 组装参数声明(所有解析出的参数为输入,添加默认输出参数 result)
+        StringBuilder paramsSql = new StringBuilder();
+        for (int i = 0; i < paramList.size(); i++) {
+            String param = paramList.get(i);
+            paramsSql.append(param).append(" DOUBLE");
+            if (i != paramList.size() - 1) {
+                paramsSql.append(", ");
+            }
+        }
+        // 添加输出参数(默认名为 result,可自定义)
+        paramsSql.append(", result DOUBLE OUT");
+
+        // 4. 生成存储过程 SQL
+        return "DELIMITER //\n" +
+                "CREATE PROCEDURE " + procName + "(" + paramsSql + ")\n" +
+                "BEGIN\n" +
+                "    SET result = " + sqlExpr + ";\n" +
+                "END //\n" +
+                "DELIMITER ;";
+    }
+    }
+

+ 45 - 12
fdapfe-admin/src/main/java/com/cn/fdapfe/web/controller/common/CommonController.java

@@ -2,16 +2,14 @@ package com.cn.fdapfe.web.controller.common;
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.MediaType;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 import com.cn.fdapfe.common.config.RuoYiConfig;
 import com.cn.fdapfe.common.constant.Constants;
@@ -69,6 +67,41 @@ public class CommonController
         }
     }
 
+    /**
+     * 自定义上传路径的单个文件上传
+     * @param file  文件
+     * @param customPath 上传目标路径
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/customUpload")
+    public AjaxResult customUploadFile(@RequestParam("file") MultipartFile file, @RequestParam(value = "customPath", required = false) String customPath) throws Exception {
+        try {
+            // 如果没有传递自定义路径,使用默认路径
+            String filePath = customPath != null ? customPath : RuoYiConfig.getUploadPath();
+            // 上传并返回新文件名称
+            Map upload = FileUploadUtils.upload(filePath, file);
+            String infoPath = (String) upload.get("infoPath");
+            String fileName = (String) upload.get("fileName");
+            String filelocalPath = (String) upload.get("filelocalPath");
+            String fileSize = (String) upload.get("fileSize"); //文件大小
+            String fileSizeBytes = (String) upload.get("fileSizeBytes"); //文件字节大小
+            String fileSuffix = (String) upload.get("fileSuffix"); //文件后缀
+            ServerConfig serverConfig = new ServerConfig();
+            String url = serverConfig.getUrl() + infoPath;
+            AjaxResult ajax = AjaxResult.success();
+            ajax.put("url", url);
+            ajax.put("filelocalPath", filelocalPath);
+            ajax.put("fileSize", fileSize);
+            ajax.put("fileSizeBytes", fileSizeBytes);
+            ajax.put("fileSuffix", fileSuffix);
+            ajax.put("fileName", fileName);
+            ajax.put("originalFilename", file.getOriginalFilename());
+            return ajax;
+        } catch (Exception e) {
+            return AjaxResult.error(e.getMessage());
+        }
+    }
     /**
      * 通用上传请求(单个)
      */
@@ -80,12 +113,12 @@ public class CommonController
             // 上传文件路径
             String filePath = RuoYiConfig.getUploadPath();
             // 上传并返回新文件名称
-            String fileName = FileUploadUtils.upload(filePath, file);
-            String url = serverConfig.getUrl() + fileName;
+            Map upload = FileUploadUtils.upload(filePath, file);
+            String url = serverConfig.getUrl() + upload.get("infoPath");
             AjaxResult ajax = AjaxResult.success();
             ajax.put("url", url);
-            ajax.put("fileName", fileName);
-            ajax.put("newFileName", FileUtils.getName(fileName));
+            ajax.put("fileName", upload.get("infoPath"));
+            ajax.put("newFileName", upload.get("fileName"));
             ajax.put("originalFilename", file.getOriginalFilename());
             return ajax;
         }
@@ -112,11 +145,11 @@ public class CommonController
             for (MultipartFile file : files)
             {
                 // 上传并返回新文件名称
-                String fileName = FileUploadUtils.upload(filePath, file);
-                String url = serverConfig.getUrl() + fileName;
+                Map upload = FileUploadUtils.upload(filePath, file);
+                String url = serverConfig.getUrl() + upload.get("infoPath");
                 urls.add(url);
-                fileNames.add(fileName);
-                newFileNames.add(FileUtils.getName(fileName));
+                fileNames.add((String) upload.get("infoPath"));
+                newFileNames.add(FileUtils.getName((String) upload.get("infoPath")));
                 originalFilenames.add(file.getOriginalFilename());
             }
             AjaxResult ajax = AjaxResult.success();

+ 2 - 1
fdapfe-admin/src/main/java/com/cn/fdapfe/web/controller/system/SysProfileController.java

@@ -124,7 +124,8 @@ public class SysProfileController extends BaseController
         if (!file.isEmpty())
         {
             LoginUser loginUser = getLoginUser();
-            String avatar = FileUploadUtils.upload(RuoYiConfig.getAvatarPath(), file, MimeTypeUtils.IMAGE_EXTENSION);
+            Map upload = FileUploadUtils.upload(RuoYiConfig.getAvatarPath(), file, MimeTypeUtils.IMAGE_EXTENSION);
+            String avatar = (String) upload.get("infoPath");
             if (userService.updateUserAvatar(loginUser.getUsername(), avatar))
             {
                 AjaxResult ajax = AjaxResult.success();

+ 20 - 8
fdapfe-admin/src/main/resources/application.yml

@@ -101,14 +101,26 @@ token:
   expireTime: 30
 
 # MyBatis配置
-mybatis:
-  # 搜索指定包别名
-  typeAliasesPackage: com.cn.fdapfe.**.domain
-  # 配置mapper的扫描,找到所有的mapper.xml映射文件
-  mapperLocations: classpath*:mapper/**/*Mapper.xml
-  # 加载全局的配置文件
-  configLocation: classpath:mybatis/mybatis-config.xml
-
+#mybatis:
+#  # 搜索指定包别名
+#  typeAliasesPackage: com.cn.fdapfe.**.domain
+#  # 配置mapper的扫描,找到所有的mapper.xml映射文件
+#  mapperLocations: classpath*:mapper/**/*Mapper.xml
+#  # 加载全局的配置文件
+#  configLocation: classpath:mybatis/mybatis-config.xml
+mybatis-plus:
+  mapper-locations: classpath*:mapper/**/*.xml
+  type-aliases-package: com.cn.fdapfe.**.domain
+  global-config:
+    db-config:
+      id-type: assign_uuid
+  configuration:
+    # hump show
+    map-underscore-to-camel-case: true
+    # add sql log
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+    jdbc-type-for-null: null
+    cache-enabled: false
 # PageHelper分页插件
 pagehelper:
   helperDialect: mysql

+ 13 - 8
fdapfe-admin/src/main/resources/mapper/data/DataMapper.xml

@@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.cn.fdapfe.biz.mapper.DataMapper">
     
-    <resultMap type="Data" id="DataResult">
+    <resultMap type="com.cn.fdapfe.biz.domain.Data" id="DataResult" >
         <result property="id"    column="id"    />
         <result property="name"    column="name"    />
         <result property="type"    column="type"    />
@@ -14,13 +14,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="createTime"    column="create_time"    />
         <result property="updateBy"    column="update_by"    />
         <result property="updateTime"    column="update_time"    />
+        <result property="fileName"    column="file_name"    />
+        <result property="fileSize"    column="file_size"    />
+        <result property="fileSizeBytes"    column="file_size_bytes"    />
+        <result property="fileSuffix"    column="file_suffix"    />
+        <result property="url"    column="url"    />
     </resultMap>
 
     <sql id="selectDataVo">
-        select id, name, type, file_path, remark, create_by, create_time, update_by, update_time from biz_data
+        select id, name, type, file_path, remark, create_by, create_time, update_by, update_time ,file_name , file_size , file_size_bytes , file_suffix ,url from biz_data
     </sql>
 
-    <select id="selectDataList" parameterType="Data" resultMap="DataResult">
+    <select id="selectDataList"  resultMap="DataResult">
         <include refid="selectDataVo"/>
         <where>  
             <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
@@ -28,12 +33,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
     </select>
     
-    <select id="selectDataById" parameterType="Long" resultMap="DataResult">
+    <select id="selectDataById"  resultMap="DataResult">
         <include refid="selectDataVo"/>
         where id = #{id}
     </select>
 
-    <insert id="insertData" parameterType="Data" useGeneratedKeys="true" keyProperty="id">
+    <insert id="insertData"  useGeneratedKeys="true" keyProperty="id">
         insert into biz_data
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="name != null">name,</if>
@@ -57,7 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
          </trim>
     </insert>
 
-    <update id="updateData" parameterType="Data">
+    <update id="updateData">
         update biz_data
         <trim prefix="SET" suffixOverrides=",">
             <if test="name != null">name = #{name},</if>
@@ -72,11 +77,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where id = #{id}
     </update>
 
-    <delete id="deleteDataById" parameterType="Long">
+    <delete id="deleteDataById" >
         delete from biz_data where id = #{id}
     </delete>
 
-    <delete id="deleteDataByIds" parameterType="String">
+    <delete id="deleteDataByIds">
         delete from biz_data where id in 
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}

+ 29 - 0
fdapfe-admin/src/main/resources/mapper/dataGen/ModelDataGenMapper.xml

@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.cn.fdapfe.biz.mapper.ModelDataGenMapper">
+    
+    <resultMap type="com.cn.fdapfe.biz.domain.ModelDataGen" id="PhyModelDataGenResult">
+        <result property="dataGenId"    column="data_gen_id"    />
+        <result property="dataGenName"    column="data_gen_name"    />
+        <result property="modelId"    column="model_id"    />
+        <result property="bizParams"    column="biz_params"    />
+        <result property="dataId"    column="data_id"    />
+        <result property="status"    column="status"    />
+        <result property="startTime"    column="start_time"    />
+        <result property="originalDataIds"    column="original_data_ids"    />
+        <result property="generatedDataId"    column="generated_data_id"    />
+        <result property="endTime"    column="end_time"    />
+        <result property="remark"    column="remark"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+<!--    <select id="selectList" resultMap="PhyModelDataGenResult">-->
+<!--        SELECT * FROM biz_data_gen_model LIFT JOIN -->
+<!--    </select>-->
+
+</mapper>

+ 0 - 103
fdapfe-admin/src/main/resources/mapper/dataGen/PhyModelDataGenMapper.xml

@@ -1,103 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.cn.fdapfe.biz.mapper.PhyModelDataGenMapper">
-    
-    <resultMap type="PhyModelDataGen" id="PhyModelDataGenResult">
-        <result property="id"    column="id"    />
-        <result property="name"    column="name"    />
-        <result property="modelId"    column="model_id"    />
-        <result property="bizParams"    column="biz_params"    />
-        <result property="dataId"    column="data_id"    />
-        <result property="status"    column="status"    />
-        <result property="startTime"    column="start_time"    />
-        <result property="endTime"    column="end_time"    />
-        <result property="remark"    column="remark"    />
-        <result property="createBy"    column="create_by"    />
-        <result property="createTime"    column="create_time"    />
-        <result property="updateBy"    column="update_by"    />
-        <result property="updateTime"    column="update_time"    />
-    </resultMap>
-
-    <sql id="selectPhyModelDataGenVo">
-        select id, name, model_id, biz_params, data_id, status, start_time, end_time, remark, create_by, create_time, update_by, update_time from biz_phy_model_data_gen
-    </sql>
-
-    <select id="selectPhyModelDataGenList" parameterType="PhyModelDataGen" resultMap="PhyModelDataGenResult">
-        <include refid="selectPhyModelDataGenVo"/>
-        <where>  
-            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
-            <if test="status != null  and status != ''"> and status = #{status}</if>
-            <if test="startTime != null "> and start_time = #{startTime}</if>
-            <if test="endTime != null "> and end_time = #{endTime}</if>
-        </where>
-    </select>
-    
-    <select id="selectPhyModelDataGenById" parameterType="Long" resultMap="PhyModelDataGenResult">
-        <include refid="selectPhyModelDataGenVo"/>
-        where id = #{id}
-    </select>
-
-    <insert id="insertPhyModelDataGen" parameterType="PhyModelDataGen" useGeneratedKeys="true" keyProperty="id">
-        insert into biz_phy_model_data_gen
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="name != null">name,</if>
-            <if test="modelId != null">model_id,</if>
-            <if test="bizParams != null">biz_params,</if>
-            <if test="dataId != null">data_id,</if>
-            <if test="status != null">status,</if>
-            <if test="startTime != null">start_time,</if>
-            <if test="endTime != null">end_time,</if>
-            <if test="remark != null">remark,</if>
-            <if test="createBy != null">create_by,</if>
-            <if test="createTime != null">create_time,</if>
-            <if test="updateBy != null">update_by,</if>
-            <if test="updateTime != null">update_time,</if>
-         </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="name != null">#{name},</if>
-            <if test="modelId != null">#{modelId},</if>
-            <if test="bizParams != null">#{bizParams},</if>
-            <if test="dataId != null">#{dataId},</if>
-            <if test="status != null">#{status},</if>
-            <if test="startTime != null">#{startTime},</if>
-            <if test="endTime != null">#{endTime},</if>
-            <if test="remark != null">#{remark},</if>
-            <if test="createBy != null">#{createBy},</if>
-            <if test="createTime != null">#{createTime},</if>
-            <if test="updateBy != null">#{updateBy},</if>
-            <if test="updateTime != null">#{updateTime},</if>
-         </trim>
-    </insert>
-
-    <update id="updatePhyModelDataGen" parameterType="PhyModelDataGen">
-        update biz_phy_model_data_gen
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="name != null">name = #{name},</if>
-            <if test="modelId != null">model_id = #{modelId},</if>
-            <if test="bizParams != null">biz_params = #{bizParams},</if>
-            <if test="dataId != null">data_id = #{dataId},</if>
-            <if test="status != null">status = #{status},</if>
-            <if test="startTime != null">start_time = #{startTime},</if>
-            <if test="endTime != null">end_time = #{endTime},</if>
-            <if test="remark != null">remark = #{remark},</if>
-            <if test="createBy != null">create_by = #{createBy},</if>
-            <if test="createTime != null">create_time = #{createTime},</if>
-            <if test="updateBy != null">update_by = #{updateBy},</if>
-            <if test="updateTime != null">update_time = #{updateTime},</if>
-        </trim>
-        where id = #{id}
-    </update>
-
-    <delete id="deletePhyModelDataGenById" parameterType="Long">
-        delete from biz_phy_model_data_gen where id = #{id}
-    </delete>
-
-    <delete id="deletePhyModelDataGenByIds" parameterType="String">
-        delete from biz_phy_model_data_gen where id in 
-        <foreach item="id" collection="array" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </delete>
-</mapper>

+ 0 - 108
fdapfe-admin/src/main/resources/mapper/dataGen/PhyNoiseDataGenMapper.xml

@@ -1,108 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.cn.fdapfe.biz.mapper.PhyNoiseDataGenMapper">
-    
-    <resultMap type="PhyNoiseDataGen" id="PhyNoiseDataGenResult">
-        <result property="id"    column="id"    />
-        <result property="name"    column="name"    />
-        <result property="modelId"    column="model_id"    />
-        <result property="bizParams"    column="biz_params"    />
-        <result property="originalDataId"    column="original_data_id"    />
-        <result property="generatedDataId"    column="generated_data_id"    />
-        <result property="status"    column="status"    />
-        <result property="startTime"    column="start_time"    />
-        <result property="endTime"    column="end_time"    />
-        <result property="remark"    column="remark"    />
-        <result property="createBy"    column="create_by"    />
-        <result property="createTime"    column="create_time"    />
-        <result property="updateBy"    column="update_by"    />
-        <result property="updateTime"    column="update_time"    />
-    </resultMap>
-
-    <sql id="selectPhyNoiseDataGenVo">
-        select id, name, model_id, biz_params, original_data_id, generated_data_id, status, start_time, end_time, remark, create_by, create_time, update_by, update_time from biz_phy_noise_data_gen
-    </sql>
-
-    <select id="selectPhyNoiseDataGenList" parameterType="PhyNoiseDataGen" resultMap="PhyNoiseDataGenResult">
-        <include refid="selectPhyNoiseDataGenVo"/>
-        <where>  
-            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
-            <if test="bizParams != null  and bizParams != ''"> and biz_params = #{bizParams}</if>
-            <if test="status != null  and status != ''"> and status = #{status}</if>
-            <if test="startTime != null "> and start_time = #{startTime}</if>
-            <if test="endTime != null "> and end_time = #{endTime}</if>
-        </where>
-    </select>
-    
-    <select id="selectPhyNoiseDataGenById" parameterType="Long" resultMap="PhyNoiseDataGenResult">
-        <include refid="selectPhyNoiseDataGenVo"/>
-        where id = #{id}
-    </select>
-
-    <insert id="insertPhyNoiseDataGen" parameterType="PhyNoiseDataGen" useGeneratedKeys="true" keyProperty="id">
-        insert into biz_phy_noise_data_gen
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="name != null">name,</if>
-            <if test="modelId != null">model_id,</if>
-            <if test="bizParams != null">biz_params,</if>
-            <if test="originalDataId != null">original_data_id,</if>
-            <if test="generatedDataId != null">generated_data_id,</if>
-            <if test="status != null">status,</if>
-            <if test="startTime != null">start_time,</if>
-            <if test="endTime != null">end_time,</if>
-            <if test="remark != null">remark,</if>
-            <if test="createBy != null">create_by,</if>
-            <if test="createTime != null">create_time,</if>
-            <if test="updateBy != null">update_by,</if>
-            <if test="updateTime != null">update_time,</if>
-         </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="name != null">#{name},</if>
-            <if test="modelId != null">#{modelId},</if>
-            <if test="bizParams != null">#{bizParams},</if>
-            <if test="originalDataId != null">#{originalDataId},</if>
-            <if test="generatedDataId != null">#{generatedDataId},</if>
-            <if test="status != null">#{status},</if>
-            <if test="startTime != null">#{startTime},</if>
-            <if test="endTime != null">#{endTime},</if>
-            <if test="remark != null">#{remark},</if>
-            <if test="createBy != null">#{createBy},</if>
-            <if test="createTime != null">#{createTime},</if>
-            <if test="updateBy != null">#{updateBy},</if>
-            <if test="updateTime != null">#{updateTime},</if>
-         </trim>
-    </insert>
-
-    <update id="updatePhyNoiseDataGen" parameterType="PhyNoiseDataGen">
-        update biz_phy_noise_data_gen
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="name != null">name = #{name},</if>
-            <if test="modelId != null">model_id = #{modelId},</if>
-            <if test="bizParams != null">biz_params = #{bizParams},</if>
-            <if test="originalDataId != null">original_data_id = #{originalDataId},</if>
-            <if test="generatedDataId != null">generated_data_id = #{generatedDataId},</if>
-            <if test="status != null">status = #{status},</if>
-            <if test="startTime != null">start_time = #{startTime},</if>
-            <if test="endTime != null">end_time = #{endTime},</if>
-            <if test="remark != null">remark = #{remark},</if>
-            <if test="createBy != null">create_by = #{createBy},</if>
-            <if test="createTime != null">create_time = #{createTime},</if>
-            <if test="updateBy != null">update_by = #{updateBy},</if>
-            <if test="updateTime != null">update_time = #{updateTime},</if>
-        </trim>
-        where id = #{id}
-    </update>
-
-    <delete id="deletePhyNoiseDataGenById" parameterType="Long">
-        delete from biz_phy_noise_data_gen where id = #{id}
-    </delete>
-
-    <delete id="deletePhyNoiseDataGenByIds" parameterType="String">
-        delete from biz_phy_noise_data_gen where id in 
-        <foreach item="id" collection="array" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </delete>
-</mapper>

+ 0 - 108
fdapfe-admin/src/main/resources/mapper/dataGen/TestDataGenMapper.xml

@@ -1,108 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.cn.fdapfe.biz.mapper.TestDataGenMapper">
-    
-    <resultMap type="TestDataGen" id="TestDataGenResult">
-        <result property="id"    column="id"    />
-        <result property="name"    column="name"    />
-        <result property="modelId"    column="model_id"    />
-        <result property="bizParams"    column="biz_params"    />
-        <result property="originalDataIds"    column="original_data_ids"    />
-        <result property="generatedDataId"    column="generated_data_id"    />
-        <result property="status"    column="status"    />
-        <result property="startTime"    column="start_time"    />
-        <result property="endTime"    column="end_time"    />
-        <result property="remark"    column="remark"    />
-        <result property="createBy"    column="create_by"    />
-        <result property="createTime"    column="create_time"    />
-        <result property="updateBy"    column="update_by"    />
-        <result property="updateTime"    column="update_time"    />
-    </resultMap>
-
-    <sql id="selectTestDataGenVo">
-        select id, name, model_id, biz_params, original_data_ids, generated_data_id, status, start_time, end_time, remark, create_by, create_time, update_by, update_time from biz_test_data_gen
-    </sql>
-
-    <select id="selectTestDataGenList" parameterType="TestDataGen" resultMap="TestDataGenResult">
-        <include refid="selectTestDataGenVo"/>
-        <where>  
-            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
-            <if test="bizParams != null  and bizParams != ''"> and biz_params = #{bizParams}</if>
-            <if test="status != null  and status != ''"> and status = #{status}</if>
-            <if test="startTime != null "> and start_time = #{startTime}</if>
-            <if test="endTime != null "> and end_time = #{endTime}</if>
-        </where>
-    </select>
-    
-    <select id="selectTestDataGenById" parameterType="Long" resultMap="TestDataGenResult">
-        <include refid="selectTestDataGenVo"/>
-        where id = #{id}
-    </select>
-
-    <insert id="insertTestDataGen" parameterType="TestDataGen" useGeneratedKeys="true" keyProperty="id">
-        insert into biz_test_data_gen
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="name != null">name,</if>
-            <if test="modelId != null">model_id,</if>
-            <if test="bizParams != null">biz_params,</if>
-            <if test="originalDataIds != null">original_data_ids,</if>
-            <if test="generatedDataId != null">generated_data_id,</if>
-            <if test="status != null">status,</if>
-            <if test="startTime != null">start_time,</if>
-            <if test="endTime != null">end_time,</if>
-            <if test="remark != null">remark,</if>
-            <if test="createBy != null">create_by,</if>
-            <if test="createTime != null">create_time,</if>
-            <if test="updateBy != null">update_by,</if>
-            <if test="updateTime != null">update_time,</if>
-         </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="name != null">#{name},</if>
-            <if test="modelId != null">#{modelId},</if>
-            <if test="bizParams != null">#{bizParams},</if>
-            <if test="originalDataIds != null">#{originalDataIds},</if>
-            <if test="generatedDataId != null">#{generatedDataId},</if>
-            <if test="status != null">#{status},</if>
-            <if test="startTime != null">#{startTime},</if>
-            <if test="endTime != null">#{endTime},</if>
-            <if test="remark != null">#{remark},</if>
-            <if test="createBy != null">#{createBy},</if>
-            <if test="createTime != null">#{createTime},</if>
-            <if test="updateBy != null">#{updateBy},</if>
-            <if test="updateTime != null">#{updateTime},</if>
-         </trim>
-    </insert>
-
-    <update id="updateTestDataGen" parameterType="TestDataGen">
-        update biz_test_data_gen
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="name != null">name = #{name},</if>
-            <if test="modelId != null">model_id = #{modelId},</if>
-            <if test="bizParams != null">biz_params = #{bizParams},</if>
-            <if test="originalDataIds != null">original_data_ids = #{originalDataIds},</if>
-            <if test="generatedDataId != null">generated_data_id = #{generatedDataId},</if>
-            <if test="status != null">status = #{status},</if>
-            <if test="startTime != null">start_time = #{startTime},</if>
-            <if test="endTime != null">end_time = #{endTime},</if>
-            <if test="remark != null">remark = #{remark},</if>
-            <if test="createBy != null">create_by = #{createBy},</if>
-            <if test="createTime != null">create_time = #{createTime},</if>
-            <if test="updateBy != null">update_by = #{updateBy},</if>
-            <if test="updateTime != null">update_time = #{updateTime},</if>
-        </trim>
-        where id = #{id}
-    </update>
-
-    <delete id="deleteTestDataGenById" parameterType="Long">
-        delete from biz_test_data_gen where id = #{id}
-    </delete>
-
-    <delete id="deleteTestDataGenByIds" parameterType="String">
-        delete from biz_test_data_gen where id in 
-        <foreach item="id" collection="array" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </delete>
-</mapper>

+ 8 - 64
fdapfe-admin/src/main/resources/mapper/eval/FormulasMapper.xml

@@ -4,10 +4,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.cn.fdapfe.biz.mapper.FormulasMapper">
     
-    <resultMap type="Formulas" id="FormulasResult">
-        <result property="id"    column="id"    />
-        <result property="name"    column="name"    />
-        <result property="formulas"    column="formulas"    />
+    <resultMap type="com.cn.fdapfe.biz.domain.Formulas" id="FormulasResult">
+        <result property="formulaId"    column="formula_id"    />
+        <result property="formulaName"    column="formula_name"    />
+        <result property="formulaShortName"    column="formula_short_name"    />
+        <result property="formulaStoredProcedure"    column="formula_stored_procedure"    />
+        <result property="originalFormula"    column="original_formula"    />
+        <result property="formulaIndicator"    column="formula_indicator"    />
         <result property="remark"    column="remark"    />
         <result property="createBy"    column="create_by"    />
         <result property="createTime"    column="create_time"    />
@@ -16,66 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectFormulasVo">
-        select id, name, formulas, remark, create_by, create_time, update_by, update_time from biz_formulas
+        select formula_id, formula_name, formula_short_name,formula_stored_procedure, original_formula,formula_indicator,remark, create_by, create_time, update_by, update_time from biz_formula_t
     </sql>
 
-    <select id="selectFormulasList" parameterType="Formulas" resultMap="FormulasResult">
-        <include refid="selectFormulasVo"/>
-        <where>  
-            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
-            <if test="formulas != null  and formulas != ''"> and formulas = #{formulas}</if>
-        </where>
-    </select>
-    
-    <select id="selectFormulasById" parameterType="Long" resultMap="FormulasResult">
-        <include refid="selectFormulasVo"/>
-        where id = #{id}
-    </select>
-
-    <insert id="insertFormulas" parameterType="Formulas" useGeneratedKeys="true" keyProperty="id">
-        insert into biz_formulas
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="name != null">name,</if>
-            <if test="formulas != null">formulas,</if>
-            <if test="remark != null">remark,</if>
-            <if test="createBy != null">create_by,</if>
-            <if test="createTime != null">create_time,</if>
-            <if test="updateBy != null">update_by,</if>
-            <if test="updateTime != null">update_time,</if>
-         </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="name != null">#{name},</if>
-            <if test="formulas != null">#{formulas},</if>
-            <if test="remark != null">#{remark},</if>
-            <if test="createBy != null">#{createBy},</if>
-            <if test="createTime != null">#{createTime},</if>
-            <if test="updateBy != null">#{updateBy},</if>
-            <if test="updateTime != null">#{updateTime},</if>
-         </trim>
-    </insert>
-
-    <update id="updateFormulas" parameterType="Formulas">
-        update biz_formulas
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="name != null">name = #{name},</if>
-            <if test="formulas != null">formulas = #{formulas},</if>
-            <if test="remark != null">remark = #{remark},</if>
-            <if test="createBy != null">create_by = #{createBy},</if>
-            <if test="createTime != null">create_time = #{createTime},</if>
-            <if test="updateBy != null">update_by = #{updateBy},</if>
-            <if test="updateTime != null">update_time = #{updateTime},</if>
-        </trim>
-        where id = #{id}
-    </update>
-
-    <delete id="deleteFormulasById" parameterType="Long">
-        delete from biz_formulas where id = #{id}
-    </delete>
-
-    <delete id="deleteFormulasByIds" parameterType="String">
-        delete from biz_formulas where id in 
-        <foreach item="id" collection="array" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </delete>
 </mapper>

+ 10 - 76
fdapfe-admin/src/main/resources/mapper/model/FaultPhysicalModelMapper.xml

@@ -4,12 +4,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.cn.fdapfe.biz.mapper.FaultPhysicalModelMapper">
     
-    <resultMap type="FaultPhysicalModel" id="FaultPhysicalModelResult">
-        <result property="id"    column="id"    />
-        <result property="name"    column="name"    />
-        <result property="type"    column="type"    />
-        <result property="path"    column="path"    />
-        <result property="bizParams"    column="biz_params"    />
+    <resultMap type="com.cn.fdapfe.biz.domain.FaultPhysicalModel" id="FaultPhysicalModelResult">
+        <result property="modelId"    column="model_id"    />
+        <result property="modelName"    column="model_name"    />
+        <result property="modelType"    column="model_type"    />
+        <result property="modelPath"    column="model_path"    />
+        <result property="modelAttribution"    column="model_attribution"    />
+        <result property="modelDataParams"    column="model_data_params"    />
         <result property="remark"    column="remark"    />
         <result property="createBy"    column="create_by"    />
         <result property="createTime"    column="create_time"    />
@@ -18,78 +19,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectFaultPhysicalModelVo">
-        select id, name, type, path, biz_params, remark, create_by, create_time, update_by, update_time from biz_fault_physical_model
+        select model_id, model_name, model_type, model_path, model_data_params, remark, create_by, create_time, update_by, update_time,model_attribution from biz_fault_physical_model
     </sql>
 
-    <select id="selectFaultPhysicalModelList" parameterType="FaultPhysicalModel" resultMap="FaultPhysicalModelResult">
-        <include refid="selectFaultPhysicalModelVo"/>
-        <where>  
-            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
-            <if test="type != null  and type != ''"> and type = #{type}</if>
-            <if test="path != null  and path != ''"> and path = #{path}</if>
-            <if test="remark != null  and remark != ''"> and remark = #{remark}</if>
-        </where>
-    </select>
-    
-    <select id="selectFaultPhysicalModelById" parameterType="Long" resultMap="FaultPhysicalModelResult">
-        <include refid="selectFaultPhysicalModelVo"/>
-        where id = #{id}
-    </select>
-
-    <insert id="insertFaultPhysicalModel" parameterType="FaultPhysicalModel" useGeneratedKeys="true" keyProperty="id">
-        insert into biz_fault_physical_model
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="name != null">name,</if>
-            <if test="type != null">type,</if>
-            <if test="path != null">path,</if>
-            <if test="bizParams != null">biz_params,</if>
-            <if test="remark != null">remark,</if>
-            <if test="createBy != null">create_by,</if>
-            <if test="createTime != null">create_time,</if>
-            <if test="updateBy != null">update_by,</if>
-            <if test="updateTime != null">update_time,</if>
-         </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="name != null">#{name},</if>
-            <if test="type != null">#{type},</if>
-            <if test="path != null">#{path},</if>
-            <if test="bizParams != null">#{bizParams},</if>
-            <if test="remark != null">#{remark},</if>
-            <if test="createBy != null">#{createBy},</if>
-            <if test="createTime != null">#{createTime},</if>
-            <if test="updateBy != null">#{updateBy},</if>
-            <if test="updateTime != null">#{updateTime},</if>
-         </trim>
-    </insert>
-
-    <update id="updateFaultPhysicalModel" parameterType="FaultPhysicalModel">
-        update biz_fault_physical_model
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="name != null">name = #{name},</if>
-            <if test="type != null">type = #{type},</if>
-            <if test="path != null">path = #{path},</if>
-            <if test="bizParams != null">biz_params = #{bizParams},</if>
-            <if test="remark != null">remark = #{remark},</if>
-            <if test="createBy != null">create_by = #{createBy},</if>
-            <if test="createTime != null">create_time = #{createTime},</if>
-            <if test="updateBy != null">update_by = #{updateBy},</if>
-            <if test="updateTime != null">update_time = #{updateTime},</if>
-        </trim>
-        where id = #{id}
-    </update>
-
-    <delete id="deleteFaultPhysicalModelById" parameterType="Long">
-        delete from biz_fault_physical_model where id = #{id}
-    </delete>
-
-    <delete id="deleteFaultPhysicalModelByIds" parameterType="String">
-        delete from biz_fault_physical_model where id in 
-        <foreach item="id" collection="array" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </delete>
 
-    <select id="getOptions" resultType="map">
-        select id,name from biz_fault_physical_model order by id desc
+    <select id="getOptions" resultMap="FaultPhysicalModelResult">
+        select * from biz_fault_model_t order by create_time desc
     </select>
 </mapper>

+ 8 - 1
fdapfe-common/pom.xml

@@ -123,7 +123,14 @@
             <groupId>javax.servlet</groupId>
             <artifactId>javax.servlet-api</artifactId>
         </dependency>
-
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+        </dependency>
     </dependencies>
 
 </project>

+ 54 - 11
fdapfe-common/src/main/java/com/cn/fdapfe/common/utils/file/FileUploadUtils.java

@@ -2,7 +2,10 @@ package com.cn.fdapfe.common.utils.file;
 
 import java.io.File;
 import java.io.IOException;
+import java.text.DecimalFormat;
 import java.nio.file.Paths;
+import java.util.HashMap;
+import java.util.Map;
 import java.util.Objects;
 import org.apache.commons.io.FilenameUtils;
 import org.springframework.web.multipart.MultipartFile;
@@ -54,7 +57,7 @@ public class FileUploadUtils
      * @return 文件名称
      * @throws Exception
      */
-    public static final String upload(MultipartFile file) throws IOException
+    public static final Map upload(MultipartFile file) throws IOException
     {
         try
         {
@@ -74,7 +77,7 @@ public class FileUploadUtils
      * @return 文件名称
      * @throws IOException
      */
-    public static final String upload(String baseDir, MultipartFile file) throws IOException
+    public static final Map upload(String baseDir, MultipartFile file) throws IOException
     {
         try
         {
@@ -98,25 +101,52 @@ public class FileUploadUtils
      * @throws IOException 比如读写文件出错时
      * @throws InvalidExtensionException 文件校验异常
      */
-    public static final String upload(String baseDir, MultipartFile file, String[] allowedExtension)
+    private static final DecimalFormat FILE_SIZE_FORMAT = new DecimalFormat("0.00");
+
+    public static final Map upload(String baseDir, MultipartFile file, String[] allowedExtension)
             throws FileSizeLimitExceededException, IOException, FileNameLengthLimitExceededException,
-            InvalidExtensionException
-    {
+            InvalidExtensionException {
         int fileNamelength = Objects.requireNonNull(file.getOriginalFilename()).length();
-        if (fileNamelength > FileUploadUtils.DEFAULT_FILE_NAME_LENGTH)
-        {
+        if (fileNamelength > FileUploadUtils.DEFAULT_FILE_NAME_LENGTH) {
             throw new FileNameLengthLimitExceededException(FileUploadUtils.DEFAULT_FILE_NAME_LENGTH);
         }
 
         assertAllowed(file, allowedExtension);
 
         String fileName = extractFilename(file);
+        long fileSizeBytes = file.getSize(); // 原始字节大小
+
+        // 转换为可读的文件大小(KB/MB)
+        String fileSize = formatFileSize(fileSizeBytes);
 
         String absPath = getAbsoluteFile(baseDir, fileName).getAbsolutePath();
         file.transferTo(Paths.get(absPath));
-        return getPathFileName(baseDir, fileName);
+
+        Map<String, Object> resultMap = getPathFileName(baseDir, fileName);
+        resultMap.put("fileSize", fileSize);         // 转换后的可读大小(KB/MB)
+        resultMap.put("fileSizeBytes", String.valueOf(fileSizeBytes)); // 保留原始字节大小(可选)
+        resultMap.put("fileSuffix", getExtension(file));   //文件后缀
+        return resultMap;
     }
 
+    /**
+     * 将字节大小转换为 KB/MB 格式(保留两位小数)
+     * @param size 字节大小
+     * @return 格式化后的字符串(如 "1.23MB" 或 "456.78KB")
+     */
+    private static String formatFileSize(long size) {
+        if (size < 1024) {
+            return size + "B";
+        } else if (size < 1024 * 1024) {
+            double kb = size / 1024.0;
+            return FILE_SIZE_FORMAT.format(kb) + "KB";
+        } else {
+            double mb = size / (1024.0 * 1024);
+            return FILE_SIZE_FORMAT.format(mb) + "MB";
+        }
+    }
+
+
     /**
      * 编码文件名
      */
@@ -140,11 +170,24 @@ public class FileUploadUtils
         return desc;
     }
 
-    public static final String getPathFileName(String uploadDir, String fileName) throws IOException
-    {
+    public static final Map getPathFileName(String uploadDir, String fileName) throws IOException {
+        // 查找最后一个斜杠的位置(处理可能的多级目录)
+        int lastSlashIndex = fileName.lastIndexOf('/');
+        String datePath = fileName.substring(0, lastSlashIndex);
+        if (lastSlashIndex != -1) {
+            uploadDir = uploadDir + File.separator + datePath.replace('/', File.separatorChar);
+            fileName = fileName.substring(lastSlashIndex + 1);
+        }
+
         int dirLastIndex = RuoYiConfig.getProfile().length() + 1;
         String currentDir = StringUtils.substring(uploadDir, dirLastIndex);
-        return Constants.RESOURCE_PREFIX + "/" + currentDir + "/" + fileName;
+        String infoPath = Constants.RESOURCE_PREFIX + "//" + datePath+ currentDir + "/" + fileName;
+
+        HashMap<String, String> fileInfoMap = new HashMap<>();
+        fileInfoMap.put("fileName", fileName);          // 文件名称(不带路径)
+        fileInfoMap.put("filelocalPath", uploadDir);      // 本地存储路径(带目录)
+        fileInfoMap.put("infoPath",  infoPath);          // 访问路径
+        return fileInfoMap;
     }
 
     /**

+ 11 - 11
fdapfe-common/src/main/java/com/cn/fdapfe/common/utils/file/FileUtils.java

@@ -9,6 +9,7 @@ import java.io.OutputStream;
 import java.io.UnsupportedEncodingException;
 import java.net.URLEncoder;
 import java.nio.charset.StandardCharsets;
+import java.util.Map;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import org.apache.commons.io.IOUtils;
@@ -84,23 +85,22 @@ public class FileUtils
      * @return 目标文件
      * @throws IOException IO异常
      */
-    public static String writeBytes(byte[] data, String uploadDir) throws IOException
-    {
+    public static String writeBytes(byte[] data, String uploadDir) throws IOException {
         FileOutputStream fos = null;
         String pathName = "";
-        try
-        {
-            String extension = getFileExtendName(data);
-            pathName = DateUtils.datePath() + "/" + IdUtils.fastUUID() + "." + extension;
-            File file = FileUploadUtils.getAbsoluteFile(uploadDir, pathName);
+        try {
+            String extension = getFileExtendName(data); // 确保这个方法返回文件后缀(如 "csv")
+            String fileName = DateUtils.datePath() + "/" + IdUtils.fastUUID() + "." + extension;
+            File file = FileUploadUtils.getAbsoluteFile(uploadDir, fileName);
             fos = new FileOutputStream(file);
             fos.write(data);
-        }
-        finally
-        {
+
+            // 获取路径信息(假设你需要返回访问路径,即之前的 infoPath)
+            Map<String, String> pathMap = FileUploadUtils.getPathFileName(uploadDir, fileName);
+            return pathMap.get("infoPath"); // 返回字符串类型的路径
+        } finally {
             IOUtils.close(fos);
         }
-        return FileUploadUtils.getPathFileName(uploadDir, pathName);
     }
 
     /**

+ 0 - 132
fdapfe-framework/src/main/java/com/cn/fdapfe/framework/config/MyBatisConfig.java

@@ -1,132 +0,0 @@
-package com.cn.fdapfe.framework.config;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import javax.sql.DataSource;
-import org.apache.ibatis.io.VFS;
-import org.apache.ibatis.session.SqlSessionFactory;
-import org.mybatis.spring.SqlSessionFactoryBean;
-import org.mybatis.spring.boot.autoconfigure.SpringBootVFS;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.core.env.Environment;
-import org.springframework.core.io.DefaultResourceLoader;
-import org.springframework.core.io.Resource;
-import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
-import org.springframework.core.io.support.ResourcePatternResolver;
-import org.springframework.core.type.classreading.CachingMetadataReaderFactory;
-import org.springframework.core.type.classreading.MetadataReader;
-import org.springframework.core.type.classreading.MetadataReaderFactory;
-import org.springframework.util.ClassUtils;
-import com.cn.fdapfe.common.utils.StringUtils;
-
-/**
- * Mybatis支持*匹配扫描包
- * 
- * @author ruoyi
- */
-@Configuration
-public class MyBatisConfig
-{
-    @Autowired
-    private Environment env;
-
-    static final String DEFAULT_RESOURCE_PATTERN = "**/*.class";
-
-    public static String setTypeAliasesPackage(String typeAliasesPackage)
-    {
-        ResourcePatternResolver resolver = (ResourcePatternResolver) new PathMatchingResourcePatternResolver();
-        MetadataReaderFactory metadataReaderFactory = new CachingMetadataReaderFactory(resolver);
-        List<String> allResult = new ArrayList<String>();
-        try
-        {
-            for (String aliasesPackage : typeAliasesPackage.split(","))
-            {
-                List<String> result = new ArrayList<String>();
-                aliasesPackage = ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX
-                        + ClassUtils.convertClassNameToResourcePath(aliasesPackage.trim()) + "/" + DEFAULT_RESOURCE_PATTERN;
-                Resource[] resources = resolver.getResources(aliasesPackage);
-                if (resources != null && resources.length > 0)
-                {
-                    MetadataReader metadataReader = null;
-                    for (Resource resource : resources)
-                    {
-                        if (resource.isReadable())
-                        {
-                            metadataReader = metadataReaderFactory.getMetadataReader(resource);
-                            try
-                            {
-                                result.add(Class.forName(metadataReader.getClassMetadata().getClassName()).getPackage().getName());
-                            }
-                            catch (ClassNotFoundException e)
-                            {
-                                e.printStackTrace();
-                            }
-                        }
-                    }
-                }
-                if (result.size() > 0)
-                {
-                    HashSet<String> hashResult = new HashSet<String>(result);
-                    allResult.addAll(hashResult);
-                }
-            }
-            if (allResult.size() > 0)
-            {
-                typeAliasesPackage = String.join(",", (String[]) allResult.toArray(new String[0]));
-            }
-            else
-            {
-                throw new RuntimeException("mybatis typeAliasesPackage 路径扫描错误,参数typeAliasesPackage:" + typeAliasesPackage + "未找到任何包");
-            }
-        }
-        catch (IOException e)
-        {
-            e.printStackTrace();
-        }
-        return typeAliasesPackage;
-    }
-
-    public Resource[] resolveMapperLocations(String[] mapperLocations)
-    {
-        ResourcePatternResolver resourceResolver = new PathMatchingResourcePatternResolver();
-        List<Resource> resources = new ArrayList<Resource>();
-        if (mapperLocations != null)
-        {
-            for (String mapperLocation : mapperLocations)
-            {
-                try
-                {
-                    Resource[] mappers = resourceResolver.getResources(mapperLocation);
-                    resources.addAll(Arrays.asList(mappers));
-                }
-                catch (IOException e)
-                {
-                    // ignore
-                }
-            }
-        }
-        return resources.toArray(new Resource[resources.size()]);
-    }
-
-    @Bean
-    public SqlSessionFactory sqlSessionFactory(DataSource dataSource) throws Exception
-    {
-        String typeAliasesPackage = env.getProperty("mybatis.typeAliasesPackage");
-        String mapperLocations = env.getProperty("mybatis.mapperLocations");
-        String configLocation = env.getProperty("mybatis.configLocation");
-        typeAliasesPackage = setTypeAliasesPackage(typeAliasesPackage);
-        VFS.addImplClass(SpringBootVFS.class);
-
-        final SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean();
-        sessionFactory.setDataSource(dataSource);
-        sessionFactory.setTypeAliasesPackage(typeAliasesPackage);
-        sessionFactory.setMapperLocations(resolveMapperLocations(StringUtils.split(mapperLocations, ",")));
-        sessionFactory.setConfigLocation(new DefaultResourceLoader().getResource(configLocation));
-        return sessionFactory.getObject();
-    }
-}

+ 59 - 0
fdapfe-framework/src/main/java/com/cn/fdapfe/framework/config/properties/MybatisPlusConfig.java

@@ -0,0 +1,59 @@
+package com.cn.fdapfe.framework.config.properties;
+
+
+
+import com.baomidou.mybatisplus.annotation.DbType;
+import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
+import com.baomidou.mybatisplus.extension.plugins.inner.BlockAttackInnerInterceptor;
+import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor;
+import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+@EnableTransactionManagement(proxyTargetClass = true)
+@Configuration
+public class MybatisPlusConfig {
+
+    @Bean
+    public MybatisPlusInterceptor mybatisPlusInterceptor()
+    {
+        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
+        // 分页插件
+        interceptor.addInnerInterceptor(paginationInnerInterceptor());
+        // 乐观锁插件
+        interceptor.addInnerInterceptor(optimisticLockerInnerInterceptor());
+        // 阻断插件
+        interceptor.addInnerInterceptor(blockAttackInnerInterceptor());
+        return interceptor;
+    }
+
+    /**
+     * 分页插件,自动识别数据库类型 https://baomidou.com/guide/interceptor-pagination.html
+     */
+    public PaginationInnerInterceptor paginationInnerInterceptor()
+    {
+        PaginationInnerInterceptor paginationInnerInterceptor = new PaginationInnerInterceptor();
+        // 设置数据库类型为mysql
+        paginationInnerInterceptor.setDbType(DbType.MYSQL);
+        // 设置最大单页限制数量,默认 500 条,-1 不受限制
+        paginationInnerInterceptor.setMaxLimit(-1L);
+        return paginationInnerInterceptor;
+    }
+
+    /**
+     * 乐观锁插件 https://baomidou.com/guide/interceptor-optimistic-locker.html
+     */
+    public OptimisticLockerInnerInterceptor optimisticLockerInnerInterceptor()
+    {
+        return new OptimisticLockerInnerInterceptor();
+    }
+
+    /**
+     * 如果是对全表的删除或更新操作,就会终止该操作 https://baomidou.com/guide/interceptor-block-attack.html
+     */
+    public BlockAttackInnerInterceptor blockAttackInnerInterceptor()
+    {
+        return new BlockAttackInnerInterceptor();
+    }
+}

+ 7 - 7
fdapfe-system/pom.xml

@@ -14,15 +14,15 @@
     <description>
         system系统模块
     </description>
+        <dependencies>
+            <!-- 通用工具-->
+            <dependency>
+                <groupId>com.cn.fdapfe</groupId>
+                <artifactId>fdapfe-common</artifactId>
+            </dependency>
 
-    <dependencies>
 
-        <!-- 通用工具-->
-        <dependency>
-            <groupId>com.cn.fdapfe</groupId>
-            <artifactId>fdapfe-common</artifactId>
-        </dependency>
+        </dependencies>
 
-    </dependencies>
 
 </project>

+ 1 - 1
fdapfe-ui/package.json

@@ -90,4 +90,4 @@
     "> 1%",
     "last 2 versions"
   ]
-}
+}

+ 5 - 5
fdapfe-ui/src/api/dataGen/phyModel.js

@@ -3,7 +3,7 @@ import request from "@/utils/request";
 // 查询物理模型数据生成管理列表
 export function listPhyModel(query) {
   return request({
-    url: "/dataGen/phyModel/list",
+    url: "/dataGen/list",
     method: "get",
     params: query,
   });
@@ -20,7 +20,7 @@ export function getPhyModel(id) {
 // 新增物理模型数据生成管理
 export function addPhyModel(data) {
   return request({
-    url: "/dataGen/phyModel",
+    url: "/dataGen",
     method: "post",
     data: data,
   });
@@ -29,7 +29,7 @@ export function addPhyModel(data) {
 // 修改物理模型数据生成管理
 export function updatePhyModel(data) {
   return request({
-    url: "/dataGen/phyModel",
+    url: "/dataGen",
     method: "put",
     data: data,
   });
@@ -38,7 +38,7 @@ export function updatePhyModel(data) {
 // 删除物理模型数据生成管理
 export function delPhyModel(id) {
   return request({
-    url: "/dataGen/phyModel/" + id,
+    url: "/dataGen/" + id,
     method: "delete",
   });
 }
@@ -46,7 +46,7 @@ export function delPhyModel(id) {
 // 物理模型数据生成getOptions
 export function getPhyModelOptions() {
   return request({
-    url: "/dataGen/phyModel/getOptions",
+    url: "/dataGen/getOptions",
     method: "get",
   });
 }

+ 8 - 0
fdapfe-ui/src/api/eval/formulas.js

@@ -9,6 +9,14 @@ export function listFormulas(query) {
   })
 }
 
+export function findInfoList(query) {
+  return request({
+    url: '/eval/formulas/infoList',
+    method: 'get',
+    params: query
+  })
+}
+
 // 查询公式管理管理详细
 export function getFormulas(id) {
   return request({

+ 16 - 6
fdapfe-ui/src/components/FileUpload/index.vue

@@ -11,6 +11,7 @@
       :on-success="handleUploadSuccess"
       :show-file-list="false"
       :headers="headers"
+      :data="{ customPath: customPath }"
       class="upload-file-uploader"
       ref="fileUpload"
     >
@@ -52,6 +53,10 @@ export default {
       type: Number,
       default: 5,
     },
+    customPath:{
+      type: String,
+      default: '',
+    },
     // 大小限制(MB)
     fileSize: {
       type: Number,
@@ -70,10 +75,12 @@ export default {
   },
   data() {
     return {
+
       number: 0,
       uploadList: [],
       baseUrl: process.env.VUE_APP_BASE_API,
-      uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传文件服务器地址
+      customPath: '',
+      uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/customUpload", // 上传文件服务器地址
       headers: {
         Authorization: "Bearer " + getToken(),
       },
@@ -153,7 +160,7 @@ export default {
     handleUploadSuccess(res, file) {
       if (res.code === 200) {
         this.uploadList.push({ name: res.fileName, url: res.fileName });
-        this.uploadedSuccessfully();
+        this.uploadedSuccessfully(res);
       } else {
         this.number--;
         this.$modal.closeLoading();
@@ -168,22 +175,25 @@ export default {
       this.$emit("input", this.listToString(this.fileList));
     },
     // 上传结束处理
-    uploadedSuccessfully() {
+    uploadedSuccessfully(res) {
       if (this.number > 0 && this.uploadList.length === this.number) {
         this.fileList = this.fileList.concat(this.uploadList);
         this.uploadList = [];
         this.number = 0;
+        this.$emit('child-event', res)
         this.$emit("input", this.listToString(this.fileList));
         this.$modal.closeLoading();
       }
     },
     // 获取文件名称
     getFileName(name) {
+      // 替换连续的斜杠为单个斜杠
+      const normalizedName = name.replace(/\/+/g, '/');
       // 如果是url那么取最后的名字 如果不是直接返回
-      if (name.lastIndexOf("/") > -1) {
-        return name.slice(name.lastIndexOf("/") + 1);
+      if (normalizedName.lastIndexOf("/") > -1) {
+        return normalizedName.slice(normalizedName.lastIndexOf("/") + 1);
       } else {
-        return name;
+        return normalizedName;
       }
     },
     // 对象转成指定字符串分隔

+ 1 - 2
fdapfe-ui/src/main.js

@@ -4,7 +4,6 @@ import Cookies from 'js-cookie'
 
 import Element from 'element-ui'
 import './assets/styles/element-variables.scss'
-
 import '@/assets/styles/index.scss' // global css
 import '@/assets/styles/ruoyi.scss' // ruoyi css
 import App from './App'
@@ -67,7 +66,7 @@ DictData.install()
  * If you don't want to use mock-server
  * you want to use MockJs for mock api
  * you can execute: mockXHR()
- *
+ *dsadg
  * Currently MockJs will be used in the production environment,
  * please remove it before going online! ! !
  */

+ 53 - 22
fdapfe-ui/src/views/data/data/index.vue

@@ -103,14 +103,17 @@
       @selection-change="handleSelectionChange"
     >
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="序号" align="center" prop="id" />
+
       <el-table-column label="数据名称" align="center" prop="name" />
+      <el-table-column label="文件名称" align="center" prop="fileName" />
       <el-table-column label="数据类型" align="center" prop="type">
         <template slot-scope="scope">
           <dict-tag :options="dict.type.data_type" :value="scope.row.type" />
         </template>
       </el-table-column>
       <el-table-column label="文件路径" align="center" prop="filePath" />
+      <el-table-column label="文件大小" align="center" prop="fileSize" />
+      <el-table-column label="上传时间" align="center" prop="createTime" />
       <el-table-column label="说明" align="center" prop="remark" />
       <el-table-column
         label="操作"
@@ -148,7 +151,7 @@
 
     <!-- 添加或修改数据管理对话框 -->
     <el-dialog
-      :title="title"
+      :title="option==='add'?'新增数据管理':'编辑数据库管理'"
       :visible.sync="open"
       width="500px"
       :close-on-click-modal="false"
@@ -158,6 +161,9 @@
         <el-form-item label="数据名称" prop="name">
           <el-input v-model="form.name" placeholder="请输入数据名称" />
         </el-form-item>
+        <el-form-item label="上传地址" prop="name">
+          <el-input v-model="customPath" placeholder="请输入数据名称" />
+        </el-form-item>
         <el-form-item label="数据类型" prop="type">
           <el-select v-model="form.type" placeholder="请选择数据类型">
             <el-option
@@ -168,8 +174,11 @@
             ></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="文件路径" prop="filePath">
-          <file-upload v-model="form.filePath" :fileType="uploadFileType" />
+        <el-form-item v-if="option==='add'" label="文件路径" prop="filePath">
+          <file-upload  :fileType="uploadFileType" :customPath="customPath"  @child-event="handleChildData"/>
+        </el-form-item>
+        <el-form-item v-else label="文件路径" prop="filePath">
+          {{form.filePath}}\{{form.fileName}}
         </el-form-item>
         <el-form-item label="说明" prop="remark">
           <el-input
@@ -201,6 +210,8 @@ export default {
   dicts: ["data_type"],
   data() {
     return {
+      option:'add',
+      customPath:'', //上传文件的指定路径
       // 遮罩层
       loading: true,
       // 选中数组
@@ -227,7 +238,21 @@ export default {
         type: null,
       },
       // 表单参数
-      form: {},
+      form: {
+        id: '',
+        name: '',
+        type: '',
+        filePath: '',
+        remark: '',
+        createBy: '',
+        createTime: '',
+        updateBy: '',
+        updateTime: '',
+        fileSuffix:'',
+        fileSizeBytes:'',
+        fileSize:'',
+        fileName:''
+      },
       // 表单校验
       rules: {},
       uploadFileType: ["csv", "xls", "xlsx"],
@@ -237,6 +262,14 @@ export default {
     this.getList();
   },
   methods: {
+    handleChildData(datas){
+      this.form.filePath= datas.filelocalPath;
+      this.form.fileName = datas.fileName;
+      this.form.fileSize = datas.fileSize;
+      this.form.fileSizeBytes = datas.fileSizeBytes;
+      this.form.fileSuffix = datas.fileSuffix;
+      this.form.url = datas.url;
+    },
     /** 查询数据管理列表 */
     getList() {
       this.loading = true;
@@ -254,15 +287,15 @@ export default {
     // 表单重置
     reset() {
       this.form = {
-        id: null,
-        name: null,
-        type: null,
-        filePath: null,
-        remark: null,
-        createBy: null,
-        createTime: null,
-        updateBy: null,
-        updateTime: null,
+        id: '',
+        name: '',
+        type: '',
+        filePath: '',
+        remark: '',
+        createBy: '',
+        createTime: '',
+        updateBy: '',
+        updateTime: '',
       };
       this.resetForm("form");
     },
@@ -286,23 +319,21 @@ export default {
     handleAdd() {
       this.reset();
       this.open = true;
-      this.title = "添加数据管理";
+      this.option='add';
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
+      console.log('updata',row);
       this.reset();
-      const id = row.id || this.ids;
-      getData(id).then((response) => {
-        this.form = response.data;
+        this.form = row;
         this.open = true;
-        this.title = "修改数据管理";
-      });
+        this.option='edit';
     },
     /** 提交按钮 */
     submitForm() {
       this.$refs["form"].validate((valid) => {
         if (valid) {
-          if (this.form.id != null) {
+          if (this.form.id != null && this.form.id !== '') {
             updateData(this.form).then((response) => {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
@@ -322,7 +353,7 @@ export default {
     handleDelete(row) {
       const ids = row.id || this.ids;
       this.$modal
-        .confirm('是否确认删除数据管理编号为"' + ids + '"的数据项?')
+        .confirm('是否确认删除数据文件"' + row.fileName + '"?')
         .then(function () {
           return delData(ids);
         })

+ 307 - 0
fdapfe-ui/src/views/dataGen/form.vue

@@ -0,0 +1,307 @@
+<template>
+  <el-dialog
+    :title="title"
+    :visible.sync="dialogOpen"
+    width="1000px"
+    :close-on-click-modal="false"
+    append-to-body
+    @opened="initData"
+    @close="handleCancel"
+  >
+    <el-form ref="form" :model="formData" :rules="rules" label-width="130px">
+      <el-row>
+        <el-form-item label="数据生成名称" prop="dataGenName">
+          <el-input v-model="formData.dataGenName" placeholder="请输入数据生成名称" />
+        </el-form-item>
+      </el-row>
+
+      <el-row>
+        <el-form-item label="数据生成模型" prop="modelId">
+          <el-select
+            v-model="formData.modelId"
+            placeholder="请选择数据生成模型"
+            @change="onModelChange"
+          >
+            <el-option
+              v-for="item in faultPhysicalOptions"
+              :key="item.modelId"
+              :label="item.modelName"
+              :value="item.modelId"
+            />
+          </el-select>
+        </el-form-item>
+      </el-row>
+
+      <el-row>
+        <el-form-item v-if="formData.modelType === '2'" label="模型参数">
+          <el-input
+            v-model="formData.bizParams"
+            type="textarea"
+            placeholder="请输入模型参数(JSON格式)"
+          />
+        </el-form-item>
+
+        <el-form-item v-if="formData.modelType === '1'" label="模型参数">
+          <el-row :gutter="10">
+            <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="1" :offset="22">
+              <el-button
+                icon="el-icon-plus"
+                @click="addModelDataParams"
+                size="mini"
+                circle
+                title="添加参数组"
+              />
+            </el-col>
+          </el-row>
+
+          <el-collapse :gutter="20" v-for="(paramGroup, groupIndex) in modelDataParams" :key="groupIndex">
+            <el-collapse-item :title="'参数组' + (groupIndex + 1)" :name="groupIndex">
+              <el-row :xl="4" v-for="(value, key) in paramGroup" :key="key" :gutter="20">
+                <el-col >
+                  <el-form-item :label="key" :prop="`modelDataParams.${groupIndex}.${key}`">
+                    <el-input
+                      v-model="paramGroup[key]"
+                      :placeholder="'请输入' + key + '的值'"
+                      style="width: 200px;"
+                    />
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </el-collapse-item>
+          </el-collapse>
+        </el-form-item>
+      </el-row>
+
+      <el-row>
+<!--        <el-form-item v-if="formData.modelType !== '2'" label="基础数据" prop="dataId">-->
+<!--          <el-select v-model="formData.newFileName" placeholder="请选择基础数据">-->
+<!--            <el-option-->
+<!--              v-for="item in dataOptions"-->
+<!--              :key="item.id"-->
+<!--              :label="item.name"-->
+<!--              :value="item.id"-->
+<!--            />-->
+<!--          </el-select>-->
+<!--        </el-form-item>-->
+        <el-form-item v-if="formData.modelType === '2'" label="数据生成名称" prop="dataGenName">
+          <el-input v-model="formData.newFileName" placeholder="请输入数据生成名称" />
+        </el-form-item>
+      </el-row>
+      <el-row>
+        <el-form-item v-if="formData.modelType === '2'" label="数据生成目录" prop="dataGenName">
+          <el-input v-model="formData.outputPath" placeholder="数据生成目录" />
+        </el-form-item>
+      </el-row>
+
+      <el-row>
+        <el-form-item label="开始时间" prop="startTime">
+          <el-date-picker
+            clearable
+            v-model="formData.startTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="请选择开始时间"
+          />
+        </el-form-item>
+      </el-row>
+
+      <el-row>
+        <el-form-item label="结束时间" prop="endTime">
+          <el-date-picker
+            clearable
+            v-model="formData.endTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="请选择结束时间"
+          />
+        </el-form-item>
+      </el-row>
+
+      <el-row>
+        <el-form-item label="说明" prop="remark">
+          <el-input
+            v-model="formData.remark"
+            type="textarea"
+            placeholder="请输入说明内容"
+            rows="3"
+          />
+        </el-form-item>
+      </el-row>
+    </el-form>
+
+    <div slot="footer" class="dialog-footer">
+      <el-button type="primary" @click="handleSubmit">确 定</el-button>
+      <el-button @click="handleCancel">取 消</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+import { addPhyModel, updatePhyModel } from "@/api/dataGen/phyModel";
+import { getDataOptions } from "@/api/data/data";
+import { getFaultPhysicalOptions } from "@/api/model/faultPhysical";
+
+export default {
+  props: {
+    value: {
+      type: Boolean,
+      default: false
+    },
+    dataInfo: {
+      type: Object,
+      default: null
+    }
+  },
+  data() {
+    return {
+      modelDataParams: [], // 视图层显示的参数组数组
+      dataOptions: [],
+      faultPhysicalOptions: [],
+      formData: {
+        outputPath:null,
+        newFileName:null,
+        dataGenName: null,
+        modelId: null,
+        modelType: null,
+        dataId: null,
+        startTime: null,
+        endTime: null,
+        remark: null,
+        modelDataParams: [], // 提交用的参数组数组
+        modelPath: null,
+        modelName:null
+      },
+      rules: {
+        dataGenName: [{ required: true, message: "请输入数据生成名称", trigger: "blur" }],
+        modelId: [{ required: true, message: "请选择数据生成模型", trigger: "blur" }]
+      },
+      dialogOpen: false
+    };
+  },
+  model: {
+    prop: "value",
+    event: "input"
+  },
+  computed: {
+    title() {
+      return this.dataInfo?.id ? "修改物理模型数据生成" : "新增物理模型数据生成";
+    }
+  },
+  watch: {
+    value(newVal) {
+      this.dialogOpen = newVal;
+      if (newVal && this.dataInfo) {
+        this.initFormData();
+      }
+    }
+  },
+  methods: {
+
+    initData() {
+      this.loadOptions();
+      if (this.dataInfo) {
+        this.initFormData();
+      }
+    },
+
+    loadOptions() {
+      // 加载基础数据选项
+      getDataOptions().then(resp => {
+        this.dataOptions = resp.data || [];
+      });
+
+      // 加载模型选项
+      getFaultPhysicalOptions().then(resp => {
+        this.faultPhysicalOptions = resp.data || [];
+      });
+    },
+
+    initFormData() {
+      // 初始化表单数据
+      this.formData = {
+        ...this.dataInfo,
+        // 解析已有参数(如果是字符串格式)
+        modelDataParams: this.parseParams(this.dataInfo?.modelDataParams || "[]")
+      };
+      this.modelDataParams = [...this.formData.modelDataParams]; // 同步到视图数组
+    },
+
+    onModelChange() {
+      const selectedModel = this.faultPhysicalOptions.find(
+        item => item.modelId === this.formData.modelId
+      );
+      if (!selectedModel) return;
+      console.log('selectedModel',selectedModel)
+      this.formData.modelType = selectedModel.modelType;
+      this.formData.modelPath = selectedModel.modelPath;
+
+      if (selectedModel.modelType === "2") {
+        // 文本模式直接赋值
+        this.formData.bizParams = selectedModel.modelDataParams || "";
+        this.modelDataParams = []; // 清空数组模式
+      } else {
+        // 数组模式初始化参数组
+        const exampleParams = this.parseParams(selectedModel.modelDataParams || "[]");
+        this.modelDataParams = exampleParams.length ? exampleParams : [{}]; // 至少一个空参数组
+        this.formData.modelDataParams = [...this.modelDataParams]; // 同步到提交数据
+      }
+    },
+
+    addModelDataParams() {
+      // 创建新参数组,结构与最后一个参数组一致
+      const lastGroup = this.modelDataParams[this.modelDataParams.length - 1] || {};
+      const newGroup = Object.fromEntries(
+        Object.keys(lastGroup).map(key => [key, ""])
+      );
+      this.modelDataParams.push(newGroup);
+      this.formData.modelDataParams = [...this.modelDataParams]; // 同步到提交数据
+    },
+
+    parseParams(params) {
+      // 解析参数字符串为数组对象
+      try {
+        const parsed = JSON.parse(params);
+        return Array.isArray(parsed) ? parsed : [parsed]; // 确保返回数组
+      } catch (e) {
+        console.error("参数解析错误", e);
+        return [];
+      }
+    },
+
+    handleSubmit() {
+      this.$refs.form.validate(valid => {
+        if (!valid) return;
+
+        // 处理参数组数据(如果是数组模式则序列化为JSON)
+        if (this.formData.modelType !== "2") {
+          this.formData.modelDataParams = JSON.stringify(this.modelDataParams);
+          this.formData.bizParams = JSON.stringify(this.modelDataParams);
+        }
+
+        const api = this.formData.id ? updatePhyModel : addPhyModel;
+        api(this.formData).then(() => {
+          this.$message.success(this.formData.id ? "修改成功" : "新增成功");
+          this.handleCancel();
+        });
+      });
+    },
+
+    handleCancel() {
+      // 重置表单数据
+      this.formData = {
+        dataGenName: null,
+        modelId: null,
+        modelType: null,
+        dataId: null,
+        startTime: null,
+        endTime: null,
+        remark: null,
+        modelDataParams: [],
+        modelPath: null
+      };
+      this.modelDataParams = [];
+      this.$emit("input", false);
+    }
+  }
+};
+</script>

+ 336 - 0
fdapfe-ui/src/views/dataGen/index.vue

@@ -0,0 +1,336 @@
+<template>
+  <div class="app-container">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="100px"
+    >
+      <el-form-item label="数据生成名称" prop="name">
+        <el-input
+          v-model="queryParams.name"
+          placeholder="请输入数据生成名称"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="开始时间" prop="startTime">
+        <el-date-picker
+          clearable
+          v-model="queryParams.startTime"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="请选择开始时间"
+        >
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="结束时间" prop="endTime">
+        <el-date-picker
+          clearable
+          v-model="queryParams.endTime"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="请选择结束时间"
+        >
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+        >搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['dataGen:phyModel:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['dataGen:phyModel:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['dataGen:phyModel:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['dataGen:phyModel:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar
+        :showSearch.sync="showSearch"
+        @queryTable="getList"
+      ></right-toolbar>
+    </el-row>
+
+    <el-table
+      v-loading="loading"
+      :data="phyModelList"
+      @selection-change="handleSelectionChange"
+    >
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="数据生成名称" align="center" prop="dataGenName" />
+      <el-table-column label="数据生成模型" align="center" prop="modelName" />
+      <el-table-column label="参数" align="center" prop="bizParams" />
+      <el-table-column label="数据" align="center" prop="dataId" />
+      <el-table-column label="状态" align="center" prop="status" />
+      <el-table-column
+        label="开始时间"
+        align="center"
+        prop="startTime"
+        width="180"
+      >
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.startTime, "{y}-{m}-{d}") }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="结束时间"
+        align="center"
+        prop="endTime"
+        width="180"
+      >
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.endTime, "{y}-{m}-{d}") }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="说明" align="center" prop="remark" />
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+      >
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['dataGen:phyModel:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['dataGen:phyModel:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <FormDialog
+      v-model="open"
+      :data-info="form"
+      :data-options="dataOptions"
+      :fault-physical-options="faultPhysicalOptions"
+      @input="getList"
+    />
+  </div>
+</template>
+
+<script>
+import {
+  listPhyModel,
+  getPhyModel,
+  delPhyModel,
+  addPhyModel,
+  updatePhyModel,
+} from "@/api/dataGen/phyModel";
+
+
+import FormDialog from './form.vue';
+
+export default {
+  name: "PhyModel",
+  components: {
+    FormDialog
+  },
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 物理模型数据生成管理表格数据
+      phyModelList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        name: null,
+        status: null,
+        startTime: null,
+        endTime: null,
+      },
+      // 表单参数
+      form: {
+        dataGenId: '',
+        dataGenName: '',
+        modelId: '',
+        bizParams: '',
+        dataId: '',
+        status: '',
+        originalDataIds:'',
+        generatedDataId:'',
+        startTime: '',
+        endTime: '',
+        remark: '',
+        createBy: '',
+        createTime: '',
+        updateBy: '',
+        updateTime: '',
+      },
+      // 数据Optipons
+      dataOptions: [],
+      faultPhysicalOptions: [],
+    };
+  },
+  created() {
+    this.getList();
+    this.getOption();
+  },
+  methods: {
+    /** 查询物理模型数据生成管理列表 */
+    getList() {
+      this.loading = true;
+      listPhyModel(this.queryParams).then((response) => {
+        this.phyModelList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        name: null,
+        modelId: null,
+        bizParams: null,
+        dataId: null,
+        status: null,
+        startTime: null,
+        endTime: null,
+        remark: null,
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null,
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map((item) => item.id);
+      this.single = selection.length !== 1;
+      this.multiple = !selection.length;
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加物理模型数据生成管理";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids;
+      getPhyModel(id).then((response) => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改物理模型数据生成管理";
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal
+        .confirm(
+          '是否确认删除物理模型数据生成管理编号为"' + ids + '"的数据项?'
+        )
+        .then(function () {
+          return delPhyModel(ids);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download(
+        "dataGen/phyModel/export",
+        {
+          ...this.queryParams,
+        },
+        `phyModel_${new Date().getTime()}.xlsx`
+      );
+    },
+  }
+};
+</script>

+ 275 - 0
fdapfe-ui/src/views/eval/formulas/form.vue

@@ -0,0 +1,275 @@
+<template>
+  <el-dialog :title="title" :visible.sync="dialogOpen" width="650px" :close-on-click-modal="true" append-to-body @opened="initData" @close="handleCancel">
+    <el-descriptions v-if="options === 'info'" :column="1" border>
+      <el-descriptions-item label="公式名称" label-class-name="my-label" content-class-name="my-content">{{formData.formulaName}}</el-descriptions-item>
+      <el-descriptions-item label="公式简称">{{formData.formulaShortName}}</el-descriptions-item>
+      <el-descriptions-item label="所属指标">{{formData.formulaIndicator}}</el-descriptions-item>
+      <el-descriptions-item label="原始公式">{{formData.originalFormula}}</el-descriptions-item>
+      <el-descriptions-item label="说明">{{formData.remark}}</el-descriptions-item>
+    </el-descriptions>
+    <div v-else-if="options!== 'info'" class="warning">
+      <el-form ref="form" :model="formData" :rules="rules" label-width="80px">
+        <el-form-item label="公式名称" prop="formulaName">
+          <el-input v-model="formData.formulaName" placeholder="请输入公式名称" />
+        </el-form-item>
+        <el-form-item label="公式简称" prop="formulaShortName">
+          <el-input v-model="formData.formulaShortName" placeholder="请输入公式简称" />
+        </el-form-item>
+        <el-form-item label="所属指标" prop="formulaIndicator">
+          <el-select v-model="formData.formulaIndicator" placeholder="请选择所属指标">
+            <el-option
+              v-for="item in formulaIndicator"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <!-- 公式组装区域(支持手动输入+参数选择) -->
+        <el-form-item label="表达式" prop="originalFormula">
+          <div class="formula-builder" >
+            <!-- 参数选择快捷按钮 -->
+            <div class="param-buttons">
+              <el-button
+                v-for="param in availableParams"
+                :key="param.formulaId"
+                @click="insertParam(param)"
+                type="primary"
+                size="small"
+                style="margin-right: 5px;"
+              >
+                {{ param.formulaShortName }}
+              </el-button>
+              <!-- 常用运算符 -->
+              <el-button @click="insertSymbol('^')" type="success" size="small">^</el-button>
+              <el-button @click="insertSymbol('*')" type="warning" size="small">*</el-button>
+              <el-button @click="insertSymbol('/')" type="danger" size="small">/</el-button>
+              <el-button @click="insertSymbol('(')" size="small">(</el-button>
+              <el-button @click="insertSymbol(')')" size="small">)</el-button>
+            </div>
+            <!-- 公式输入框 -->
+            <el-input
+              v-model="formData.originalFormula"
+              type="textarea"
+              placeholder="请输入公式(支持 α^2 表示平方,使用括号分组)"
+              @change="checkParentheses"
+              rows="3"
+              :class="{ 'is-error':!isBalanced }"
+            ></el-input>
+            <div v-if="!isBalanced" class="error-message">括号不匹配,请检查!</div>
+          </div>
+        </el-form-item>
+        <el-form-item label="说明" prop="remark">
+          <el-input
+            v-model="formData.remark"
+            type="textarea"
+            maxlength="300"
+          ></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="handleSubmit">确 定</el-button>
+        <el-button @click="handleCancel">取 消</el-button>
+      </div>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+import { findInfoList, addFormulas, updateFormulas } from "@/api/eval/formulas";
+
+export default {
+  props: {
+    value: {
+      type: Boolean,
+      default: false
+    },
+    options: {
+      type: String,
+      default: 'add'
+    },
+    dataInfo: {
+      type: Object,
+      default: null
+    }
+  },
+  data() {
+    return {
+      availableParams: ['TP', 'TN', 'FP', 'FN'],
+      formulaIndicator:[
+        {'label': '一级指标','value' : '0'},
+        {'label': '二级指标','value' : '1'},
+        {'label': '三级指标','value' : '2'},
+      ],
+      formData: {
+        formulaId: '',
+        formulaName: '',
+        originalFormula: '',
+        formulaShortName: '',
+        formulaIndicator:'',
+        formulaStoredProcedure: '',
+        remark: ''
+      },
+      rules: {
+        formulaName: [
+          { required: true, message: '请输入公式名称', trigger: 'blur' }
+        ],
+        formulaShortName:[
+          { required: true, message: '请输入公式简称', trigger: 'blur' }
+        ],
+        originalFormula: [
+          { required: true, message: '请输入公式表达式', trigger: 'blur' }
+        ],
+        formulaIndicator:[
+          { required: true, message: '请选择归属指标', trigger: 'blur' }
+        ]
+      },
+      procedureCode: null, // 生成的存储过程代码(可选显示)
+      dialogOpen: false, // 本地缓存 open 状态
+      isBalanced: true // 记录括号是否匹配的状态
+    };
+  },
+  model: {
+    prop: 'value',
+    event: 'input'
+  },
+  watch: {
+    value(newVal) {
+      this.dialogOpen = newVal;
+    }
+  },
+  computed: {
+    // 自动提取公式中的参数(正则匹配字母、希腊字母等)
+    paramList() {
+      const regex = /[αA-Za-z_$]+/g; // 匹配参数(支持希腊字母α,字母,下划线)
+      const params = this.formData.originalFormula.match(regex) || [];
+      // 去重并排除非可用参数
+      return [...new Set(params)].filter(p => this.availableParams.includes(p));
+    },
+    title() {
+      if (this.options === 'add') {
+        return '新增算法公式';
+      }
+      if (this.options === 'edit') {
+        return '修改算法公式';
+      }
+      if (this.options === 'info') {
+        return '查看算法公式详情';
+      }
+    },
+    styles() {
+      let style = {};
+      if (this.minHeight) {
+        style.minHeight = `${this.minHeight}px`;
+      }
+      if (this.height) {
+        style.height = `${this.height}px`;
+      }
+      return style;
+    }
+  },
+  methods: {
+    initData() {
+      if (this.options!== 'add') {
+        this.formData = { ...this.dataInfo };
+      }
+      findInfoList().then(res => {
+        console.log('参数输出',res)
+        this.availableParams = { ...res,...this.availableParams};
+      })
+    },
+    // 插入参数到公式输入框
+    insertParam(param) {
+      this.formData.originalFormula = this.formData.originalFormula + param.originalFormula;
+      this.checkParentheses();
+    },
+    // 插入运算符或符号
+    insertSymbol(symbol) {
+      this.formData.originalFormula = this.formData.originalFormula + symbol;
+      this.checkParentheses();
+    },
+    // 检查括号是否匹配
+    isParenthesesBalanced(formula) {
+      let stack = [];
+      for (let i = 0; i < formula.length; i++) {
+        let char = formula[i];
+        if (char === '(') {
+          stack.push(char);
+        } else if (char === ')') {
+          if (stack.length === 0) {
+            return false;
+          }
+          stack.pop();
+        }
+      }
+      return stack.length === 0;
+    },
+    // 检查括号并更新状态
+    checkParentheses() {
+      this.isBalanced = this.isParenthesesBalanced(this.formData.originalFormula);
+    },
+    // 提交表单
+    handleSubmit() {
+      this.$refs["form"].validate(valid => {
+        if (valid && this.isBalanced) {
+          if (this.formData.formulaId) {
+            updateFormulas(this.formData).then(response => {
+              this.$message.success("修改成功");
+              this.handleCancel()
+            });
+          } else {
+            addFormulas(this.formData).then(response => {
+              this.$message.success("新增成功");
+              this.handleCancel()
+            });
+          }
+        }
+      });
+    },
+    // 关闭弹窗
+    handleCancel() {
+      // 重置表单数据
+      this.formData = {
+        formulaId: '',
+        formulaName: '',
+        originalFormula: '',
+        formulaShortName: '',
+        formulaStoredProcedure: '',
+        remark: ''
+      };
+      this.procedureCode = null;
+      this.isBalanced = true;
+      this.$emit('input', false);
+    }
+  }
+};
+</script>
+
+<style scoped>
+.formula-builder {
+  margin-bottom: 20px;
+}
+
+.param-buttons {
+  margin-bottom: 10px;
+}
+
+.param-list {
+  display: flex;
+  flex-wrap: wrap;
+  gap: 5px;
+  padding: 8px;
+  border: 1px solid #e4e7ed;
+  border-radius: 4px;
+}
+
+.is-error {
+  border-color: red;
+}
+
+.error-message {
+  color: red;
+  font-size: 12px;
+  margin-top: 5px;
+}
+</style>

+ 128 - 85
fdapfe-ui/src/views/eval/formulas/index.vue

@@ -1,14 +1,24 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="公式名称" prop="name">
+      <el-form-item label="公式名称" prop="formulaName">
         <el-input
-          v-model="queryParams.name"
+          v-model="queryParams.formulaName"
           placeholder="请输入公式名称"
           clearable
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item label="所属指标" prop="formulaIndicator">
+        <el-select v-model="queryParams.formulaIndicator" placeholder="请选择所属指标">
+          <el-option
+            v-for="item in formulaIndicator"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value">
+          </el-option>
+        </el-select>
+      </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -33,7 +43,7 @@
           icon="el-icon-edit"
           size="mini"
           :disabled="single"
-          @click="handleUpdate"
+          @click="handleUpdate(null)"
           v-hasPermi="['eval:formulas:edit']"
         >修改</el-button>
       </el-col>
@@ -63,30 +73,49 @@
 
     <el-table v-loading="loading" :data="formulasList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="序号" align="center" prop="id" />
-      <el-table-column label="公式名称" align="center" prop="name" />
-      <el-table-column label="公式" align="center" prop="formulas" />
-      <el-table-column label="说明" align="center" prop="remark" />
+      <el-table-column label="公式名称" align="center" prop="formulaName" />
+      <el-table-column label="公式简称" align="center" prop="formulaShortName" />
+      <el-table-column label="所属指标" align="center" prop="formulaIndicator" >
+        <template slot-scope="scope">
+          {{scope.row.formulaIndicator==='0'? '一级指标':scope.row.formulaIndicator==='1'?'二级指标':'三级指标'}}
+        </template>
+      </el-table-column>
+      <el-table-column label="原始公式" align="center" prop="originalFormula" />
+      <el-table-column label="说明" align="center" prop="remark" >
+        <template slot-scope="scope">
+          <el-tooltip class="item" effect="dark" :content="scope.row.remark" placement="top-start">
+            <span>{{scope.row.remark}}</span>
+          </el-tooltip>
+        </template>
+      </el-table-column>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
-          <el-button
+          <el-link
             size="mini"
-            type="text"
+            type="primary"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['eval:formulas:edit']"
-          >修改</el-button>
-          <el-button
+          >修改</el-link>
+          |
+          <el-link
             size="mini"
-            type="text"
+            type="warning"
+            icon="el-icon-view"
+            @click="infoDataShow(scope.row)"
+          >详情</el-link>
+          |
+          <el-link
+            size="mini"
+            type="danger"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['eval:formulas:remove']"
-          >删除</el-button>
+          >删除</el-link>
         </template>
       </el-table-column>
     </el-table>
-    
+
     <pagination
       v-show="total>0"
       :total="total"
@@ -95,40 +124,40 @@
       @pagination="getList"
     />
 
-    <!-- 添加或修改公式管理管理对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" :close-on-click-modal="false" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="公式名称" prop="name">
-          <el-input v-model="form.name" placeholder="请输入公式名称" />
-        </el-form-item>
-        <el-form-item label="公式" prop="formulas">
-          <el-input v-model="form.formulas" type="textarea" placeholder="请输入内容" />
-        </el-form-item>
-        <el-form-item label="说明" prop="remark">
-          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
-        <el-button @click="cancel">取 消</el-button>
-      </div>
-    </el-dialog>
+    <FormDialog
+      v-model="open"
+      :data-info="currentRow"
+      :availableParams="availableParams"
+      :options="options"
+      @input="getList"
+    />
   </div>
 </template>
 
 <script>
 import { listFormulas, getFormulas, delFormulas, addFormulas, updateFormulas } from "@/api/eval/formulas";
+import FormDialog from './form.vue';
 
 export default {
   name: "Formulas",
+  components: {
+    FormDialog
+  },
   data() {
     return {
+      formulaIndicator:[
+        {'label': '一级指标','value' : '0'},
+        {'label': '二级指标','value' : '1'},
+        {'label': '三级指标','value' : '2'},
+      ],
+      currentRow: {},
       // 遮罩层
       loading: true,
       // 选中数组
       ids: [],
       // 非单个禁用
       single: true,
+      options: 'add',
       // 非多个禁用
       multiple: true,
       // 显示搜索条件
@@ -143,16 +172,34 @@ export default {
       open: false,
       // 查询参数
       queryParams: {
+        formulaIndicator:'',
         pageNum: 1,
         pageSize: 10,
-        name: null,
+        formulaName: null,
         formulas: null,
       },
       // 表单参数
-      form: {},
+      formData: {
+        formulaId: '',
+        formulaName: '',
+        originalFormula: '',
+        formulaShortName: '',
+        formulaStoredProcedure: '',
+        remark: ''
+      },
       // 表单校验
       rules: {
-      }
+        name: [
+          { required: true, message: '公式名称不能为空', trigger: 'blur' }
+        ],
+        formulas: [
+          { required: true, message: '公式内容不能为空', trigger: 'blur' }
+        ]
+      },
+      // 新增:存储过程代码
+      procedureCode: "",
+      // 新增:可用参数列表
+      availableParams: ['α', 'Precision', 'Recall', 'TP', 'TN', 'FP', 'FN']
     };
   },
   created() {
@@ -168,24 +215,22 @@ export default {
         this.loading = false;
       });
     },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
-    },
     // 表单重置
     reset() {
-      this.form = {
-        id: null,
-        name: null,
-        formulas: null,
-        remark: null,
-        createBy: null,
-        createTime: null,
-        updateBy: null,
-        updateTime: null
+      this.formData = {
+        formulaId: '',
+        formulaName: '',
+        originalFormula: '',
+        formulaShortName: '',
+        formulaStoredProcedure: '',
+        remark: '',
+        createBy: '',
+        createTime: '',
+        updateBy: '',
+        updateTime: ''
       };
-      this.resetForm("form");
+      this.resetForm("formData");
+      this.procedureCode = "";
     },
     /** 搜索按钮操作 */
     handleQuery() {
@@ -199,62 +244,60 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id)
-      this.single = selection.length!==1
-      this.multiple = !selection.length
+      this.ids = selection.map(item => item.formulaId);
+      this.single = selection.length !== 1;
+      this.multiple = !selection.length;
     },
     /** 新增按钮操作 */
     handleAdd() {
       this.reset();
       this.open = true;
-      this.title = "添加公式管理管理";
+      this.options = "add";
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
-      const id = row.id || this.ids
-      getFormulas(id).then(response => {
-        this.form = response.data;
-        this.open = true;
-        this.title = "修改公式管理管理";
-      });
-    },
-    /** 提交按钮 */
-    submitForm() {
-      this.$refs["form"].validate(valid => {
-        if (valid) {
-          if (this.form.id != null) {
-            updateFormulas(this.form).then(response => {
-              this.$modal.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addFormulas(this.form).then(response => {
-              this.$modal.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
-          }
+      this.open = true;
+      this.options = "edit";
+      if (row) {
+        this.currentRow = Object.assign({}, row);
+      } else if (this.ids.length === 1) {
+        const selectedRow = this.formulasList.find(item => item.formulaId === this.ids[0]);
+        if (selectedRow) {
+          this.currentRow = Object.assign({}, selectedRow);
         }
-      });
+      }
+    },
+    /**
+     * 查看详情
+     */
+    infoDataShow(row) {
+      this.options = 'info';
+      this.currentRow = Object.assign({}, row);
+      this.open = true;
     },
     /** 删除按钮操作 */
     handleDelete(row) {
-      const ids = row.id || this.ids;
-      this.$modal.confirm('是否确认删除公式管理管理编号为"' + ids + '"的数据项?').then(function() {
+      const ids = row.formulaId || this.ids;
+      this.$confirm('是否确认删除公式管理管理编号为"' + ids + '"的数据项?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
         return delFormulas(ids);
       }).then(() => {
         this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
+        this.$message.success("删除成功");
+      }).catch(() => {
+      });
     },
     /** 导出按钮操作 */
     handleExport() {
+      // 假设 download 方法已在全局或当前组件中定义
       this.download('eval/formulas/export', {
         ...this.queryParams
-      }, `formulas_${new Date().getTime()}.xlsx`)
-    }
+      }, `formulas_${new Date().getTime()}.xlsx`);
+    },
   }
 };
 </script>

+ 0 - 0
fdapfe-ui/src/views/model/faultDiagnosis/form.vue


+ 175 - 0
fdapfe-ui/src/views/model/faultPhysical/form.vue

@@ -0,0 +1,175 @@
+<template>
+  <el-dialog
+    :title="title"
+    :visible.sync="dialogOpen"
+    width="700px"
+    append-to-body
+    @opened="initData"
+    @close="handleCancel"
+  >
+
+    <el-descriptions v-if="options === 'info'" :column="1" border>
+      <el-descriptions-item label="故障模型名称" label-class-name="my-label" content-class-name="my-content">{{formData.formulaName}}</el-descriptions-item>
+      <el-descriptions-item label="故障模型类型">
+        <dict-tag
+          :options="dict.type.biz_model_type"
+          :value="formData.modelType"
+        />
+      </el-descriptions-item>
+      <el-descriptions-item label="故障模型接口地址">{{formData.modelPath}}</el-descriptions-item>
+      <el-descriptions-item label="故障模型参数参数">{{formData.modelDataParams}}</el-descriptions-item>
+      <el-descriptions-item label="说明">{{formData.remark}}</el-descriptions-item>
+    </el-descriptions>
+    <el-form v-else ref="formData" :model="formData" :rules="rules" label-width="130px">
+      <el-form-item label="故障模型名称" prop="modelName">
+        <el-input v-model="formData.modelName" placeholder="请输入故障模型名称"/>
+      </el-form-item>
+      <el-form-item label="故障模型类型" prop="modelType">
+        <el-select
+          v-model="formData.modelType"
+          placeholder="请选择故障模型类型"
+          clearable
+        >
+          <el-option
+            v-for="dict in dict.type.biz_model_type"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="故障模型接口地址" prop="modelPath">
+        <el-input v-model="formData.modelPath" placeholder="请输入故障模型接口地址"/>
+      </el-form-item>
+      <el-form-item label="故障模型参数参数" prop="modelDataParams">
+        <el-input
+          v-model="formData.modelDataParams"
+          type="textarea"
+          placeholder="请输入内容"
+        />
+      </el-form-item>
+      <el-form-item label="备注" prop="remark">
+        <el-input
+          v-model="formData.remark"
+          type="textarea"
+          placeholder="请输入内容"
+        />
+      </el-form-item>
+    </el-form>
+    <div slot="footer" class="dialog-footer">
+      <el-button type="primary" @click="handleSubmit">确 定</el-button>
+      <el-button @click="handleCancel">取 消</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+import {
+  listFaultPhysical,
+  getFaultPhysical,
+  delFaultPhysical,
+  addFaultPhysical,
+  updateFaultPhysical,
+} from "@/api/model/faultPhysical";
+
+export default {
+  props: {
+    value: {
+      type: Boolean,
+      default: false
+    },
+    dataInfo: {
+      type: Object,
+      default: null
+    },
+    options: {
+      type: String,
+      default: 'add'
+    },
+  },
+  dicts: ["biz_model_type"],
+  data() {
+    return {
+      formData: {
+        modelId: null,
+        modelName: null,
+        modelType: null,
+        modelPath: null,
+        modelDataParams: null,
+        remark: null,
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null,
+        modelAttribution:null,
+      },
+      rules: {
+        modelName: [
+          {required: true, message: '请输入故障模型名称', trigger: 'blur'}
+        ],
+        modelType: [
+          {required: true, message: '请选择故障模型类型', trigger: 'blur'}
+        ]
+      },
+      dialogOpen: false
+    };
+  },
+  model: {
+    prop: 'value',
+    event: 'callback'
+  },
+
+  watch: {
+    value(newVal) {
+      this.dialogOpen = newVal;
+    }
+  },
+  computed: {
+    modelAtrtibution() {
+      return this.$route.query.modelAttribution;
+    },
+    title() {
+      if (this.options === 'add') {
+        return '添加故障物理模型管理';
+      }
+      if (this.options === 'edit') {
+        return '添加故障物理模型管理';
+      }
+      if (this.options === 'info') {
+        return '添加故障物理模型管理';
+      }
+    }
+  },
+  methods: {
+    initData() {
+      this.formData.modelAttribution= this.modelAtrtibution;
+      console.log(this.dataInfo)
+      if (this.options!== 'add') {
+        this.formData = { ...this.dataInfo };
+      }
+    },
+    handleSubmit() {
+      this.$refs["formData"].validate((valid) => {
+        if (valid) {
+          if (this.formData.modelId) {
+            updateFaultPhysical(this.formData).then((response) => {
+              this.$message.success("修改成功");
+              this.handleCancel();
+            });
+          } else {
+            addFaultPhysical(this.formData).then((response) => {
+              this.$message.success("新增成功");
+              this.handleCancel();
+            });
+          }
+        }
+      });
+    },
+    handleCancel() {
+      this.formData = {
+      };
+      this.$emit('callback', false);
+    }
+  }
+};
+</script>

+ 107 - 166
fdapfe-ui/src/views/model/faultPhysical/index.vue

@@ -10,7 +10,7 @@
     >
       <el-form-item label="故障模型名称" prop="name">
         <el-input
-          v-model="queryParams.name"
+          v-model="queryParams.modelName"
           placeholder="请输入故障模型名称"
           clearable
           @keyup.enter.native="handleQuery"
@@ -18,7 +18,7 @@
       </el-form-item>
       <el-form-item label="故障模型类型" prop="type">
         <el-select
-          v-model="queryParams.type"
+          v-model="queryParams.modelType"
           placeholder="请选择故障模型类型"
           clearable
         >
@@ -36,11 +36,9 @@
           icon="el-icon-search"
           size="mini"
           @click="handleQuery"
-          >搜索</el-button
-        >
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
-          >重置</el-button
-        >
+        >搜索
+        </el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
 
@@ -51,10 +49,10 @@
           plain
           icon="el-icon-plus"
           size="mini"
-          @click="handleAdd"
+          @click="handleViews(null,'add')"
           v-hasPermi="['model:faultPhysical:add']"
-          >新增</el-button
-        >
+        >新增
+        </el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -63,10 +61,10 @@
           icon="el-icon-edit"
           size="mini"
           :disabled="single"
-          @click="handleUpdate"
+          @click="handleViews(null,'edit')"
           v-hasPermi="['model:faultPhysical:edit']"
-          >修改</el-button
-        >
+        >修改
+        </el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -77,8 +75,8 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['model:faultPhysical:remove']"
-          >删除</el-button
-        >
+        >删除
+        </el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -88,8 +86,8 @@
           size="mini"
           @click="handleExport"
           v-hasPermi="['model:faultPhysical:export']"
-          >导出</el-button
-        >
+        >导出
+        </el-button>
       </el-col>
       <right-toolbar
         :showSearch.sync="showSearch"
@@ -102,46 +100,44 @@
       :data="faultPhysicalList"
       @selection-change="handleSelectionChange"
     >
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="序号" align="center" prop="id" />
-      <el-table-column label="故障模型名称" align="center" prop="name" />
-      <el-table-column label="故障模型类型" align="center" prop="type">
+      <el-table-column type="selection" width="55" align="center"/>
+      <el-table-column label="故障模型名称" align="center" prop="modelName"/>
+      <el-table-column label="故障模型类型" align="center" prop="modelType">
         <template slot-scope="scope">
           <dict-tag
             :options="dict.type.biz_model_type"
-            :value="scope.row.type"
+            :value="scope.row.modelType"
           />
         </template>
       </el-table-column>
-      <el-table-column label="故障模型接口地址" align="center" prop="path" />
-      <el-table-column
-        label="故障模型参数参数"
-        align="center"
-        prop="bizParams"
-      />
-      <el-table-column label="备注" align="center" prop="remark" />
-      <el-table-column
-        label="操作"
-        align="center"
-        class-name="small-padding fixed-width"
-      >
+      <el-table-column label="故障模型接口地址" align="center" prop="modelPath"/>
+      <el-table-column label="故障模型参数参数" align="center" prop="modelDataParams"/>
+      <el-table-column label="备注" align="center" prop="remark"/>
+      <el-table-column label="操作"  align="center" class-name="small-padding fixed-width" >
         <template slot-scope="scope">
-          <el-button
+          <el-link
             size="mini"
-            type="text"
+            type="primary"
             icon="el-icon-edit"
-            @click="handleUpdate(scope.row)"
+            @click="handleViews(scope.row,'edit')"
             v-hasPermi="['model:faultPhysical:edit']"
-            >修改</el-button
-          >
-          <el-button
+          >修改
+          </el-link>       |
+          <el-link
+            size="mini"
+            type="warning"
+            icon="el-icon-view"
+            @click="handleViews(scope.row,'info')"
+          >详情</el-link>
+          |
+          <el-link
             size="mini"
-            type="text"
+            type="danger"
             icon="el-icon-delete"
-            @click="handleDelete(scope.row)"
+            @click="handleViews(scope.row,'remove')"
             v-hasPermi="['model:faultPhysical:remove']"
-            >删除</el-button
-          >
+          >删除
+          </el-link>
         </template>
       </el-table-column>
     </el-table>
@@ -154,51 +150,12 @@
       @pagination="getList"
     />
 
-    <!-- 添加或修改故障物理模型管理对话框 -->
-    <el-dialog
-      :title="title"
-      :visible.sync="open"
-      width="700px"
-      :close-on-click-modal="false"
-      append-to-body
-    >
-      <el-form ref="form" :model="form" :rules="rules" label-width="130px">
-        <el-form-item label="故障模型名称" prop="name">
-          <el-input v-model="form.name" placeholder="请输入故障模型名称" />
-        </el-form-item>
-        <el-form-item label="故障模型类型" prop="type">
-          <el-select v-model="form.type" placeholder="请选择故障模型类型">
-            <el-option
-              v-for="dict in dict.type.biz_model_type"
-              :key="dict.value"
-              :label="dict.label"
-              :value="dict.value"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="故障模型接口地址" prop="path">
-          <el-input v-model="form.path" placeholder="请输入故障模型接口地址" />
-        </el-form-item>
-        <el-form-item label="故障模型参数参数" prop="bizParams">
-          <el-input
-            v-model="form.bizParams"
-            type="textarea"
-            placeholder="请输入内容"
-          />
-        </el-form-item>
-        <el-form-item label="备注" prop="remark">
-          <el-input
-            v-model="form.remark"
-            type="textarea"
-            placeholder="请输入内容"
-          />
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
-        <el-button @click="cancel">取 消</el-button>
-      </div>
-    </el-dialog>
+    <FaultPhysicalForm
+      v-model="dialogOpen"
+      :data-info="currentRow"
+      :options="options"
+      @callback="getList"
+    />
   </div>
 </template>
 
@@ -210,51 +167,53 @@ import {
   addFaultPhysical,
   updateFaultPhysical,
 } from "@/api/model/faultPhysical";
+import FaultPhysicalForm from './form.vue';
 
 export default {
   name: "FaultPhysical",
+  components: {
+    FaultPhysicalForm
+  },
   dicts: ["biz_model_type"],
   data() {
     return {
-      // 遮罩层
+      options: 'add',
       loading: true,
-      // 选中数组
       ids: [],
-      // 非单个禁用
       single: true,
-      // 非多个禁用
       multiple: true,
-      // 显示搜索条件
       showSearch: true,
-      // 总条数
       total: 0,
-      // 故障物理模型管理表格数据
       faultPhysicalList: [],
-      // 弹出层标题
-      title: "",
-      // 是否显示弹出层
-      open: false,
-      // 查询参数
+      currentRow:{},
+      dialogOpen: false,
       queryParams: {
         pageNum: 1,
         pageSize: 10,
-        name: null,
-        type: null,
-        path: null,
+        modelId: null,
+        modelName: null,
+        modelType:null,
+        modelPath: null,
         remark: null,
+        modelAttribution:null,
       },
-      // 表单参数
       form: {},
-      // 表单校验
       rules: {},
     };
   },
+  computed: {
+    modelAtrtibution() {
+      return this.$route.query.modelAttribution;
+    }
+  },
   created() {
     this.getList();
   },
   methods: {
-    /** 查询故障物理模型管理列表 */
+
     getList() {
+      this.queryParams.modelAttribution = this.modelAtrtibution;
+      this.currentRow={};
       this.loading = true;
       listFaultPhysical(this.queryParams).then((response) => {
         this.faultPhysicalList = response.rows;
@@ -262,19 +221,13 @@ export default {
         this.loading = false;
       });
     },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
-    },
-    // 表单重置
     reset() {
       this.form = {
-        id: null,
-        name: null,
-        type: null,
-        path: null,
-        bizParams: null,
+        modelId: null,
+        modelName: null,
+        modelType: null,
+        modelPath: null,
+        modelDataParams: null,
         remark: null,
         createBy: null,
         createTime: null,
@@ -283,73 +236,61 @@ export default {
       };
       this.resetForm("form");
     },
-    /** 搜索按钮操作 */
     handleQuery() {
       this.queryParams.pageNum = 1;
       this.getList();
     },
-    /** 重置按钮操作 */
     resetQuery() {
-      this.resetForm("queryForm");
+      this.queryParams={};
       this.handleQuery();
     },
-    // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map((item) => item.id);
+      this.ids = selection.map((item) => item.modelId);
       this.single = selection.length !== 1;
       this.multiple = !selection.length;
     },
-    /** 新增按钮操作 */
-    handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "添加故障物理模型管理";
-    },
-    /** 修改按钮操作 */
-    handleUpdate(row) {
-      this.reset();
-      const id = row.id || this.ids;
-      getFaultPhysical(id).then((response) => {
-        this.form = response.data;
-        this.open = true;
-        this.title = "修改故障物理模型管理";
-      });
-    },
-    /** 提交按钮 */
-    submitForm() {
-      this.$refs["form"].validate((valid) => {
-        if (valid) {
-          if (this.form.id != null) {
-            updateFaultPhysical(this.form).then((response) => {
-              this.$modal.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addFaultPhysical(this.form).then((response) => {
-              this.$modal.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
+    handleViews(row, option) {
+      switch (option) {
+        case 'add':
+          this.reset();
+          this.dialogOpen = true;
+          this.options = option;
+          break;
+        case 'edit':
+          this.reset();
+          this.dialogOpen = true;
+          if (row) {
+            this.currentRow = Object.assign({}, row);
+          } else if (this.ids.length === 1) {
+            const selectedRow = this.faultPhysicalList.find(item => item.modelId === this.ids[0]);
+            if (selectedRow) {
+              this.currentRow = Object.assign({}, selectedRow);
+            }
           }
-        }
-      });
+          this.options = option;
+          break;
+        case 'info':
+          this.reset();
+          this.dialogOpen = true;
+          this.currentRow = Object.assign({}, row);
+          this.options = option;
+          break;
+        case 'remove':
+          this.handleDelete(row);
+          break;
+      }
     },
-    /** 删除按钮操作 */
     handleDelete(row) {
-      const ids = row.id || this.ids;
+      const ids = row.modelId || this.ids;
       this.$modal
         .confirm('是否确认删除故障物理模型管理编号为"' + ids + '"的数据项?')
         .then(function () {
           return delFaultPhysical(ids);
-        })
-        .then(() => {
-          this.getList();
-          this.$modal.msgSuccess("删除成功");
-        })
-        .catch(() => {});
+        }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      })
     },
-    /** 导出按钮操作 */
     handleExport() {
       this.download(
         "model/faultPhysical/export",

+ 17 - 2
pom.xml

@@ -35,12 +35,18 @@
         <logback.version>1.2.13</logback.version>
         <spring-security.version>5.7.12</spring-security.version>
         <spring-framework.version>5.3.39</spring-framework.version>
+        <mybatis-plus-version>3.5.3.1</mybatis-plus-version>
+        <lombok-version>1.18.12</lombok-version>
     </properties>
 
     <!-- 依赖声明 -->
     <dependencyManagement>
         <dependencies>
-
+            <dependency>
+                <groupId>com.baomidou</groupId>
+                <artifactId>mybatis-plus-boot-starter</artifactId>
+                <version>${mybatis-plus-version}</version>
+            </dependency>
             <!-- 覆盖SpringFramework的依赖配置-->
             <dependency>
                 <groupId>org.springframework</groupId>
@@ -49,7 +55,16 @@
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
-
+            <dependency>
+                <groupId>org.projectlombok</groupId>
+                <artifactId>lombok</artifactId>
+                <version>${lombok-version}</version>
+            </dependency>
+            <dependency>
+                <groupId>com.github.jsqlparser</groupId>
+                <artifactId>jsqlparser</artifactId>
+                <version>4.6</version> <!-- 使用最新稳定版本 -->
+            </dependency>
             <!-- 覆盖SpringSecurity的依赖配置-->
             <dependency>
                 <groupId>org.springframework.security</groupId>