Browse Source

预报方案

ZhuDeKang 2 tháng trước cách đây
mục cha
commit
a06adae3ae

+ 33 - 0
ruoyi-admin/src/test/java/com/ruoyi/FeatureCollectionRaw.java

@@ -0,0 +1,33 @@
+package com.ruoyi;
+
+import java.util.List;
+
+public class FeatureCollectionRaw {
+    private String type;
+    private List<FeatureWithRawJson> features;
+    
+    // 构造方法
+    public FeatureCollectionRaw() {}
+    
+    public FeatureCollectionRaw(String type, List<FeatureWithRawJson> features) {
+        this.type = type;
+        this.features = features;
+    }
+    
+    // Getter和Setter方法
+    public String getType() {
+        return type;
+    }
+    
+    public void setType(String type) {
+        this.type = type;
+    }
+    
+    public List<FeatureWithRawJson> getFeatures() {
+        return features;
+    }
+    
+    public void setFeatures(List<FeatureWithRawJson> features) {
+        this.features = features;
+    }
+}

+ 50 - 0
ruoyi-admin/src/test/java/com/ruoyi/FeatureWithRawJson.java

@@ -0,0 +1,50 @@
+package com.ruoyi;
+
+public class FeatureWithRawJson {
+    private String type;
+    private String geometry;    // 存储geometry的JSON字符串
+    private String properties;  // 存储properties的JSON字符串
+    
+    // 构造方法
+    public FeatureWithRawJson() {}
+    
+    public FeatureWithRawJson(String type, String geometry, String properties) {
+        this.type = type;
+        this.geometry = geometry;
+        this.properties = properties;
+    }
+    
+    // Getter和Setter方法
+    public String getType() {
+        return type;
+    }
+    
+    public void setType(String type) {
+        this.type = type;
+    }
+    
+    public String getGeometry() {
+        return geometry;
+    }
+    
+    public void setGeometry(String geometry) {
+        this.geometry = geometry;
+    }
+    
+    public String getProperties() {
+        return properties;
+    }
+    
+    public void setProperties(String properties) {
+        this.properties = properties;
+    }
+    
+    @Override
+    public String toString() {
+        return "FeatureWithRawJson{" +
+                "type='" + type + '\'' +
+                ", geometry='" + geometry + '\'' +
+                ", properties='" + properties + '\'' +
+                '}';
+    }
+}

+ 98 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/controller/MdForecastDataController.java

@@ -0,0 +1,98 @@
+package com.ruoyi.interfaces.controller;
+
+import java.util.List;
+
+import com.ruoyi.interfaces.domain.MdForecastData;
+import com.ruoyi.interfaces.service.IMdForecastDataService;
+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.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 模型预报结果Controller
+ * 
+ * @author ruoyi
+ * @date 2025-11-07
+ */
+@RestController
+@RequestMapping("/forecast/data")
+public class MdForecastDataController extends BaseController
+{
+    @Autowired
+    private IMdForecastDataService mdForecastDataService;
+
+    /**
+     * 查询模型预报结果列表
+     */
+    @GetMapping("/list")
+    public AjaxResult list(MdForecastData mdForecastData)
+    {
+        startPage();
+        List<MdForecastData> list = mdForecastDataService.selectMdForecastDataList(mdForecastData);
+        return success(list);
+    }
+
+    /**
+     * 导出模型预报结果列表
+     */
+    @Log(title = "模型预报结果", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(MdForecastData mdForecastData)
+    {
+        List<MdForecastData> list = mdForecastDataService.selectMdForecastDataList(mdForecastData);
+        ExcelUtil<MdForecastData> util = new ExcelUtil<MdForecastData>(MdForecastData.class);
+        return util.exportExcel(list, "模型预报结果数据");
+    }
+
+    /**
+     * 获取模型预报结果详细信息
+     */
+    @GetMapping(value = "/{planId}")
+    public AjaxResult getInfo(@PathVariable("planId") Long planId)
+    {
+        return AjaxResult.success(mdForecastDataService.selectMdForecastDataByPlanId(planId));
+    }
+
+    /**
+     * 新增模型预报结果
+     */
+    @Log(title = "模型预报结果", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody MdForecastData mdForecastData)
+    {
+        return toAjax(mdForecastDataService.insertMdForecastData(mdForecastData));
+    }
+
+    /**
+     * 修改模型预报结果
+     */
+    @Log(title = "模型预报结果", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody MdForecastData mdForecastData)
+    {
+        return toAjax(mdForecastDataService.updateMdForecastData(mdForecastData));
+    }
+
+    /**
+     * 删除模型预报结果
+     */
+    @Log(title = "模型预报结果", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{planIds}")
+    public AjaxResult remove(@PathVariable Long[] planIds)
+    {
+        return toAjax(mdForecastDataService.deleteMdForecastDataByPlanIds(planIds));
+    }
+}

+ 98 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/controller/MdForecastPlanController.java

@@ -0,0 +1,98 @@
+package com.ruoyi.interfaces.controller;
+
+import java.util.List;
+
+import com.ruoyi.interfaces.domain.MdForecastPlan;
+import com.ruoyi.interfaces.service.IMdForecastPlanService;
+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.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 模型预报方案Controller
+ * 
+ * @author ruoyi
+ * @date 2025-11-07
+ */
+@RestController
+@RequestMapping("/forecast/plan")
+public class MdForecastPlanController extends BaseController
+{
+    @Autowired
+    private IMdForecastPlanService mdForecastPlanService;
+
+    /**
+     * 查询模型预报方案列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo list(MdForecastPlan mdForecastPlan)
+    {
+        startPage();
+        List<MdForecastPlan> list = mdForecastPlanService.selectMdForecastPlanList(mdForecastPlan);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出模型预报方案列表
+     */
+    @Log(title = "模型预报方案", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(MdForecastPlan mdForecastPlan)
+    {
+        List<MdForecastPlan> list = mdForecastPlanService.selectMdForecastPlanList(mdForecastPlan);
+        ExcelUtil<MdForecastPlan> util = new ExcelUtil<MdForecastPlan>(MdForecastPlan.class);
+        return util.exportExcel(list, "模型预报方案数据");
+    }
+
+    /**
+     * 获取模型预报方案详细信息
+     */
+    @GetMapping(value = "/{planId}")
+    public AjaxResult getInfo(@PathVariable("planId") Long planId)
+    {
+        return AjaxResult.success(mdForecastPlanService.selectMdForecastPlanByPlanId(planId));
+    }
+
+    /**
+     * 新增模型预报方案
+     */
+    @Log(title = "模型预报方案", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody MdForecastPlan mdForecastPlan)
+    {
+        return toAjax(mdForecastPlanService.insertMdForecastPlan(mdForecastPlan));
+    }
+
+    /**
+     * 修改模型预报方案
+     */
+    @Log(title = "模型预报方案", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody MdForecastPlan mdForecastPlan)
+    {
+        return toAjax(mdForecastPlanService.updateMdForecastPlan(mdForecastPlan));
+    }
+
+    /**
+     * 删除模型预报方案
+     */
+    @Log(title = "模型预报方案", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{planIds}")
+    public AjaxResult remove(@PathVariable Long[] planIds)
+    {
+        return toAjax(mdForecastPlanService.deleteMdForecastPlanByPlanIds(planIds));
+    }
+}

+ 82 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/domain/MdForecastData.java

@@ -0,0 +1,82 @@
+package com.ruoyi.interfaces.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 模型预报结果对象 md_forecast_data
+ * 
+ * @author ruoyi
+ * @date 2025-11-07
+ */
+public class MdForecastData extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 方案id */
+    private Long planId;
+
+    private String geometry;
+
+    private String properties;
+    private Map<String,Object> propertiesMap;
+
+    public Map<String, Object> getPropertiesMap() {
+        return propertiesMap;
+    }
+
+    public void setPropertiesMap(Map<String, Object> propertiesMap) {
+        this.propertiesMap = propertiesMap;
+    }
+
+    public void setPlanId(Long planId)
+    {
+        this.planId = planId;
+    }
+
+    public Long getPlanId() 
+    {
+        return planId;
+    }
+    public void setGeometry(String geometry) 
+    {
+        this.geometry = geometry;
+    }
+
+    public String getGeometry() 
+    {
+        return geometry;
+    }
+    public void setProperties(String properties) 
+    {
+        this.properties = properties;
+    }
+
+    public String getProperties() 
+    {
+        return properties;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("planId", getPlanId())
+            .append("geometry", getGeometry())
+            .append("properties", getProperties())
+            .toString();
+    }
+
+    public MdForecastData(Long planId, String geometry, String properties) {
+        this.planId = planId;
+        this.geometry = geometry;
+        this.properties = properties;
+    }
+
+    public MdForecastData() {
+    }
+}

+ 113 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/domain/MdForecastPlan.java

@@ -0,0 +1,113 @@
+package com.ruoyi.interfaces.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.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 模型预报方案对象 md_forecast_plan
+ * 
+ * @author ruoyi
+ * @date 2025-11-07
+ */
+public class MdForecastPlan extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 方案id */
+    private Long planId;
+
+    /** 模型id */
+    @Excel(name = "模型id")
+    private String mdid;
+
+    /** 方案名称 */
+    @Excel(name = "方案名称")
+    private String planName;
+
+    /** 预报开始时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "预报开始时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date beginTime;
+
+    /** 预报结束时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "预报结束时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date endTime;
+
+    /** 预报依据时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "预报依据时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date basedTime;
+
+    public void setPlanId(Long planId) 
+    {
+        this.planId = planId;
+    }
+
+    public Long getPlanId() 
+    {
+        return planId;
+    }
+    public void setMdid(String mdid) 
+    {
+        this.mdid = mdid;
+    }
+
+    public String getMdid() 
+    {
+        return mdid;
+    }
+    public void setPlanName(String planName) 
+    {
+        this.planName = planName;
+    }
+
+    public String getPlanName() 
+    {
+        return planName;
+    }
+    public void setBeginTime(Date beginTime) 
+    {
+        this.beginTime = beginTime;
+    }
+
+    public Date getBeginTime() 
+    {
+        return beginTime;
+    }
+    public void setEndTime(Date endTime) 
+    {
+        this.endTime = endTime;
+    }
+
+    public Date getEndTime() 
+    {
+        return endTime;
+    }
+    public void setBasedTime(Date basedTime) 
+    {
+        this.basedTime = basedTime;
+    }
+
+    public Date getBasedTime() 
+    {
+        return basedTime;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("planId", getPlanId())
+            .append("mdid", getMdid())
+            .append("planName", getPlanName())
+            .append("remark", getRemark())
+            .append("beginTime", getBeginTime())
+            .append("endTime", getEndTime())
+            .append("basedTime", getBasedTime())
+            .toString();
+    }
+}

+ 65 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/mapper/MdForecastDataMapper.java

@@ -0,0 +1,65 @@
+package com.ruoyi.interfaces.mapper;
+
+import com.ruoyi.common.annotation.DataSource;
+import com.ruoyi.common.enums.DataSourceType;
+import com.ruoyi.interfaces.domain.MdForecastData;
+
+import java.util.List;
+
+/**
+ * 模型预报结果Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2025-11-07
+ */
+@DataSource(DataSourceType.SLAVE)
+public interface MdForecastDataMapper 
+{
+    /**
+     * 查询模型预报结果
+     * 
+     * @param planId 模型预报结果主键
+     * @return 模型预报结果
+     */
+    public MdForecastData selectMdForecastDataByPlanId(Long planId);
+
+    /**
+     * 查询模型预报结果列表
+     * 
+     * @param mdForecastData 模型预报结果
+     * @return 模型预报结果集合
+     */
+    public List<MdForecastData> selectMdForecastDataList(MdForecastData mdForecastData);
+
+    /**
+     * 新增模型预报结果
+     * 
+     * @param mdForecastData 模型预报结果
+     * @return 结果
+     */
+    public int insertMdForecastData(MdForecastData mdForecastData);
+
+    /**
+     * 修改模型预报结果
+     * 
+     * @param mdForecastData 模型预报结果
+     * @return 结果
+     */
+    public int updateMdForecastData(MdForecastData mdForecastData);
+
+    /**
+     * 删除模型预报结果
+     * 
+     * @param planId 模型预报结果主键
+     * @return 结果
+     */
+    public int deleteMdForecastDataByPlanId(Long planId);
+
+    /**
+     * 批量删除模型预报结果
+     * 
+     * @param planIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteMdForecastDataByPlanIds(Long[] planIds);
+}

+ 65 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/mapper/MdForecastPlanMapper.java

@@ -0,0 +1,65 @@
+package com.ruoyi.interfaces.mapper;
+
+import com.ruoyi.common.annotation.DataSource;
+import com.ruoyi.common.enums.DataSourceType;
+import com.ruoyi.interfaces.domain.MdForecastPlan;
+
+import java.util.List;
+
+/**
+ * 模型预报方案Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2025-11-07
+ */
+@DataSource(DataSourceType.SLAVE)
+public interface MdForecastPlanMapper 
+{
+    /**
+     * 查询模型预报方案
+     * 
+     * @param planId 模型预报方案主键
+     * @return 模型预报方案
+     */
+    public MdForecastPlan selectMdForecastPlanByPlanId(Long planId);
+
+    /**
+     * 查询模型预报方案列表
+     * 
+     * @param mdForecastPlan 模型预报方案
+     * @return 模型预报方案集合
+     */
+    public List<MdForecastPlan> selectMdForecastPlanList(MdForecastPlan mdForecastPlan);
+
+    /**
+     * 新增模型预报方案
+     * 
+     * @param mdForecastPlan 模型预报方案
+     * @return 结果
+     */
+    public int insertMdForecastPlan(MdForecastPlan mdForecastPlan);
+
+    /**
+     * 修改模型预报方案
+     * 
+     * @param mdForecastPlan 模型预报方案
+     * @return 结果
+     */
+    public int updateMdForecastPlan(MdForecastPlan mdForecastPlan);
+
+    /**
+     * 删除模型预报方案
+     * 
+     * @param planId 模型预报方案主键
+     * @return 结果
+     */
+    public int deleteMdForecastPlanByPlanId(Long planId);
+
+    /**
+     * 批量删除模型预报方案
+     * 
+     * @param planIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteMdForecastPlanByPlanIds(Long[] planIds);
+}

+ 62 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/IMdForecastDataService.java

@@ -0,0 +1,62 @@
+package com.ruoyi.interfaces.service;
+
+import com.ruoyi.interfaces.domain.MdForecastData;
+
+import java.util.List;
+
+/**
+ * 模型预报结果Service接口
+ * 
+ * @author ruoyi
+ * @date 2025-11-07
+ */
+public interface IMdForecastDataService 
+{
+    /**
+     * 查询模型预报结果
+     * 
+     * @param planId 模型预报结果主键
+     * @return 模型预报结果
+     */
+    public MdForecastData selectMdForecastDataByPlanId(Long planId);
+
+    /**
+     * 查询模型预报结果列表
+     * 
+     * @param mdForecastData 模型预报结果
+     * @return 模型预报结果集合
+     */
+    public List<MdForecastData> selectMdForecastDataList(MdForecastData mdForecastData);
+
+    /**
+     * 新增模型预报结果
+     * 
+     * @param mdForecastData 模型预报结果
+     * @return 结果
+     */
+    public int insertMdForecastData(MdForecastData mdForecastData);
+
+    /**
+     * 修改模型预报结果
+     * 
+     * @param mdForecastData 模型预报结果
+     * @return 结果
+     */
+    public int updateMdForecastData(MdForecastData mdForecastData);
+
+    /**
+     * 批量删除模型预报结果
+     * 
+     * @param planIds 需要删除的模型预报结果主键集合
+     * @return 结果
+     */
+    public int deleteMdForecastDataByPlanIds(Long[] planIds);
+
+    /**
+     * 删除模型预报结果信息
+     * 
+     * @param planId 模型预报结果主键
+     * @return 结果
+     */
+    public int deleteMdForecastDataByPlanId(Long planId);
+}

+ 62 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/IMdForecastPlanService.java

@@ -0,0 +1,62 @@
+package com.ruoyi.interfaces.service;
+
+import com.ruoyi.interfaces.domain.MdForecastPlan;
+
+import java.util.List;
+
+/**
+ * 模型预报方案Service接口
+ * 
+ * @author ruoyi
+ * @date 2025-11-07
+ */
+public interface IMdForecastPlanService 
+{
+    /**
+     * 查询模型预报方案
+     * 
+     * @param planId 模型预报方案主键
+     * @return 模型预报方案
+     */
+    public MdForecastPlan selectMdForecastPlanByPlanId(Long planId);
+
+    /**
+     * 查询模型预报方案列表
+     * 
+     * @param mdForecastPlan 模型预报方案
+     * @return 模型预报方案集合
+     */
+    public List<MdForecastPlan> selectMdForecastPlanList(MdForecastPlan mdForecastPlan);
+
+    /**
+     * 新增模型预报方案
+     * 
+     * @param mdForecastPlan 模型预报方案
+     * @return 结果
+     */
+    public int insertMdForecastPlan(MdForecastPlan mdForecastPlan);
+
+    /**
+     * 修改模型预报方案
+     * 
+     * @param mdForecastPlan 模型预报方案
+     * @return 结果
+     */
+    public int updateMdForecastPlan(MdForecastPlan mdForecastPlan);
+
+    /**
+     * 批量删除模型预报方案
+     * 
+     * @param planIds 需要删除的模型预报方案主键集合
+     * @return 结果
+     */
+    public int deleteMdForecastPlanByPlanIds(Long[] planIds);
+
+    /**
+     * 删除模型预报方案信息
+     * 
+     * @param planId 模型预报方案主键
+     * @return 结果
+     */
+    public int deleteMdForecastPlanByPlanId(Long planId);
+}

+ 103 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/impl/MdForecastDataServiceImpl.java

@@ -0,0 +1,103 @@
+package com.ruoyi.interfaces.service.impl;
+
+import java.util.List;
+import java.util.Map;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.ruoyi.interfaces.domain.MdForecastData;
+import com.ruoyi.interfaces.mapper.MdForecastDataMapper;
+import com.ruoyi.interfaces.service.IMdForecastDataService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * 模型预报结果Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2025-11-07
+ */
+@Service
+public class MdForecastDataServiceImpl implements IMdForecastDataService {
+    @Autowired
+    private MdForecastDataMapper mdForecastDataMapper;
+
+    /**
+     * 查询模型预报结果
+     *
+     * @param planId 模型预报结果主键
+     * @return 模型预报结果
+     */
+    @Override
+    public MdForecastData selectMdForecastDataByPlanId(Long planId) {
+        return mdForecastDataMapper.selectMdForecastDataByPlanId(planId);
+    }
+
+    /**
+     * 查询模型预报结果列表
+     *
+     * @param mdForecastData 模型预报结果
+     * @return 模型预报结果
+     */
+    @Override
+    public List<MdForecastData> selectMdForecastDataList(MdForecastData mdForecastData) {
+        List<MdForecastData> mdForecastData1 = mdForecastDataMapper.selectMdForecastDataList(mdForecastData);
+        ObjectMapper objectMapper = new ObjectMapper();
+
+        for (MdForecastData item : mdForecastData1) {// 解析JSON到Map
+            try {
+                item.setPropertiesMap(objectMapper.readValue(item.getProperties(),
+                        new TypeReference<Map<String, Object>>() {
+                        }));
+            } catch (JsonProcessingException e) {
+                System.out.println("预报参数解析失败:" + item.toString());
+            }
+        }
+        return mdForecastData1;
+    }
+
+    /**
+     * 新增模型预报结果
+     *
+     * @param mdForecastData 模型预报结果
+     * @return 结果
+     */
+    @Override
+    public int insertMdForecastData(MdForecastData mdForecastData) {
+        return mdForecastDataMapper.insertMdForecastData(mdForecastData);
+    }
+
+    /**
+     * 修改模型预报结果
+     *
+     * @param mdForecastData 模型预报结果
+     * @return 结果
+     */
+    @Override
+    public int updateMdForecastData(MdForecastData mdForecastData) {
+        return mdForecastDataMapper.updateMdForecastData(mdForecastData);
+    }
+
+    /**
+     * 批量删除模型预报结果
+     *
+     * @param planIds 需要删除的模型预报结果主键
+     * @return 结果
+     */
+    @Override
+    public int deleteMdForecastDataByPlanIds(Long[] planIds) {
+        return mdForecastDataMapper.deleteMdForecastDataByPlanIds(planIds);
+    }
+
+    /**
+     * 删除模型预报结果信息
+     *
+     * @param planId 模型预报结果主键
+     * @return 结果
+     */
+    @Override
+    public int deleteMdForecastDataByPlanId(Long planId) {
+        return mdForecastDataMapper.deleteMdForecastDataByPlanId(planId);
+    }
+}

+ 94 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/impl/MdForecastPlanServiceImpl.java

@@ -0,0 +1,94 @@
+package com.ruoyi.interfaces.service.impl;
+
+import java.util.List;
+
+import com.ruoyi.interfaces.domain.MdForecastPlan;
+import com.ruoyi.interfaces.mapper.MdForecastPlanMapper;
+import com.ruoyi.interfaces.service.IMdForecastPlanService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * 模型预报方案Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2025-11-07
+ */
+@Service
+public class MdForecastPlanServiceImpl implements IMdForecastPlanService
+{
+    @Autowired
+    private MdForecastPlanMapper mdForecastPlanMapper;
+
+    /**
+     * 查询模型预报方案
+     * 
+     * @param planId 模型预报方案主键
+     * @return 模型预报方案
+     */
+    @Override
+    public MdForecastPlan selectMdForecastPlanByPlanId(Long planId)
+    {
+        return mdForecastPlanMapper.selectMdForecastPlanByPlanId(planId);
+    }
+
+    /**
+     * 查询模型预报方案列表
+     * 
+     * @param mdForecastPlan 模型预报方案
+     * @return 模型预报方案
+     */
+    @Override
+    public List<MdForecastPlan> selectMdForecastPlanList(MdForecastPlan mdForecastPlan)
+    {
+        return mdForecastPlanMapper.selectMdForecastPlanList(mdForecastPlan);
+    }
+
+    /**
+     * 新增模型预报方案
+     * 
+     * @param mdForecastPlan 模型预报方案
+     * @return 结果
+     */
+    @Override
+    public int insertMdForecastPlan(MdForecastPlan mdForecastPlan)
+    {
+        return mdForecastPlanMapper.insertMdForecastPlan(mdForecastPlan);
+    }
+
+    /**
+     * 修改模型预报方案
+     * 
+     * @param mdForecastPlan 模型预报方案
+     * @return 结果
+     */
+    @Override
+    public int updateMdForecastPlan(MdForecastPlan mdForecastPlan)
+    {
+        return mdForecastPlanMapper.updateMdForecastPlan(mdForecastPlan);
+    }
+
+    /**
+     * 批量删除模型预报方案
+     * 
+     * @param planIds 需要删除的模型预报方案主键
+     * @return 结果
+     */
+    @Override
+    public int deleteMdForecastPlanByPlanIds(Long[] planIds)
+    {
+        return mdForecastPlanMapper.deleteMdForecastPlanByPlanIds(planIds);
+    }
+
+    /**
+     * 删除模型预报方案信息
+     * 
+     * @param planId 模型预报方案主键
+     * @return 结果
+     */
+    @Override
+    public int deleteMdForecastPlanByPlanId(Long planId)
+    {
+        return mdForecastPlanMapper.deleteMdForecastPlanByPlanId(planId);
+    }
+}

+ 64 - 0
ruoyi-api-patform/src/main/resources/mapper/interfaces/MdForecastDataMapper.xml

@@ -0,0 +1,64 @@
+<?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.ruoyi.interfaces.mapper.MdForecastDataMapper">
+
+    <resultMap type="com.ruoyi.interfaces.domain.MdForecastData" id="MdForecastDataResult">
+        <result property="planId"    column="plan_id"    />
+        <result property="geometry"    column="geometry"    />
+        <result property="properties"    column="properties"    />
+    </resultMap>
+
+    <sql id="selectMdForecastDataVo">
+        select plan_id, geometry, properties from md_forecast_data
+    </sql>
+
+    <select id="selectMdForecastDataList" parameterType="com.ruoyi.interfaces.domain.MdForecastData" resultMap="MdForecastDataResult">
+        <include refid="selectMdForecastDataVo"/>
+        <where>
+            <if test="planId != null  and planId != ''"> and plan_id = #{planId}</if>
+            <if test="geometry != null  and geometry != ''"> and geometry = #{geometry}</if>
+            <if test="properties != null  and properties != ''"> and properties = #{properties}</if>
+        </where>
+    </select>
+
+    <select id="selectMdForecastDataByPlanId" parameterType="Long" resultMap="MdForecastDataResult">
+        <include refid="selectMdForecastDataVo"/>
+        where plan_id = #{planId}
+    </select>
+
+    <insert id="insertMdForecastData" parameterType="com.ruoyi.interfaces.domain.MdForecastData" useGeneratedKeys="true" keyProperty="planId">
+        insert into md_forecast_data
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="planId != null">plan_id,</if>
+            <if test="geometry != null">geometry,</if>
+            <if test="properties != null">properties,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="planId != null">#{planId},</if>
+            <if test="geometry != null">#{geometry},</if>
+            <if test="properties != null">#{properties},</if>
+        </trim>
+    </insert>
+
+    <update id="updateMdForecastData" parameterType="com.ruoyi.interfaces.domain.MdForecastData">
+        update md_forecast_data
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="geometry != null">geometry = #{geometry},</if>
+            <if test="properties != null">properties = #{properties},</if>
+        </trim>
+        where plan_id = #{planId}
+    </update>
+
+    <delete id="deleteMdForecastDataByPlanId" parameterType="Long">
+        delete from md_forecast_data where plan_id = #{planId}
+    </delete>
+
+    <delete id="deleteMdForecastDataByPlanIds" parameterType="String">
+        delete from md_forecast_data where plan_id in
+        <foreach item="planId" collection="array" open="(" separator="," close=")">
+            #{planId}
+        </foreach>
+    </delete>
+</mapper>

+ 80 - 0
ruoyi-api-patform/src/main/resources/mapper/interfaces/MdForecastPlanMapper.xml

@@ -0,0 +1,80 @@
+<?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.ruoyi.interfaces.mapper.MdForecastPlanMapper">
+
+    <resultMap type="com.ruoyi.interfaces.domain.MdForecastPlan" id="MdForecastPlanResult">
+        <result property="planId"    column="plan_id"    />
+        <result property="mdid"    column="mdid"    />
+        <result property="planName"    column="plan_name"    />
+        <result property="remark"    column="remark"    />
+        <result property="beginTime"    column="begin_time"    />
+        <result property="endTime"    column="end_time"    />
+        <result property="basedTime"    column="based_time"    />
+    </resultMap>
+
+    <sql id="selectMdForecastPlanVo">
+        select plan_id, mdid, plan_name, remark, begin_time, end_time, based_time from md_forecast_plan
+    </sql>
+
+    <select id="selectMdForecastPlanList" parameterType="com.ruoyi.interfaces.domain.MdForecastPlan" resultMap="MdForecastPlanResult">
+        <include refid="selectMdForecastPlanVo"/>
+        <where>
+            <if test="mdid != null  and mdid != ''"> and mdid = #{mdid}</if>
+            <if test="planName != null  and planName != ''"> and plan_name like concat('%', #{planName}, '%')</if>
+            <if test="beginTime != null "> and begin_time = #{beginTime}</if>
+            <if test="endTime != null "> and end_time = #{endTime}</if>
+            <if test="basedTime != null "> and based_time = #{basedTime}</if>
+        </where>
+    </select>
+
+    <select id="selectMdForecastPlanByPlanId" parameterType="Long" resultMap="MdForecastPlanResult">
+        <include refid="selectMdForecastPlanVo"/>
+        where plan_id = #{planId}
+    </select>
+
+    <insert id="insertMdForecastPlan" parameterType="com.ruoyi.interfaces.domain.MdForecastPlan" useGeneratedKeys="true" keyProperty="planId">
+        insert into md_forecast_plan
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="mdid != null">mdid,</if>
+            <if test="planName != null">plan_name,</if>
+            <if test="remark != null">remark,</if>
+            <if test="beginTime != null">begin_time,</if>
+            <if test="endTime != null">end_time,</if>
+            <if test="basedTime != null">based_time,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="mdid != null">#{mdid},</if>
+            <if test="planName != null">#{planName},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="beginTime != null">#{beginTime},</if>
+            <if test="endTime != null">#{endTime},</if>
+            <if test="basedTime != null">#{basedTime},</if>
+        </trim>
+    </insert>
+
+    <update id="updateMdForecastPlan" parameterType="com.ruoyi.interfaces.domain.MdForecastPlan">
+        update md_forecast_plan
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="mdid != null">mdid = #{mdid},</if>
+            <if test="planName != null">plan_name = #{planName},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="beginTime != null">begin_time = #{beginTime},</if>
+            <if test="endTime != null">end_time = #{endTime},</if>
+            <if test="basedTime != null">based_time = #{basedTime},</if>
+        </trim>
+        where plan_id = #{planId}
+    </update>
+
+    <delete id="deleteMdForecastPlanByPlanId" parameterType="Long">
+        delete from md_forecast_plan where plan_id = #{planId}
+    </delete>
+
+    <delete id="deleteMdForecastPlanByPlanIds" parameterType="String">
+        delete from md_forecast_plan where plan_id in
+        <foreach item="planId" collection="array" open="(" separator="," close=")">
+            #{planId}
+        </foreach>
+    </delete>
+</mapper>

+ 2 - 2
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java

@@ -253,9 +253,9 @@ public class SysRoleServiceImpl implements ISysRoleService
     @Transactional
     public int insertRole(SysRole role)
     {
-        role.setRoleKey(sm4Util.encrypt(role.getRoleKey()));
+        role.setRoleKey(sm4Util.encrypt(role.getRoleKey()));//数据加密
         // 新增角色信息
-        role.sign();
+        role.sign();//数据签名
         roleMapper.insertRole(role);
         return insertRoleMenu(role);
     }