Bladeren bron

Merge branch 'master' of http://39.98.38.2:13000/dumingliang/sh-model-platform

# Conflicts:
#	ruoyi-ui/src/views/shouye.vue
Hua 2 maanden geleden
bovenliggende
commit
e29f243662
48 gewijzigde bestanden met toevoegingen van 3825 en 440 verwijderingen
  1. 93 0
      ruoyi-admin/pom.xml
  2. 79 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/ShApiController.java
  3. 241 0
      ruoyi-admin/src/main/java/com/ruoyi/web/geo/CommonMethod.java
  4. 344 0
      ruoyi-admin/src/main/java/com/ruoyi/web/geo/EquiSurface2.java
  5. 208 0
      ruoyi-admin/src/main/java/com/ruoyi/web/geo/FeaureUtil.java
  6. 389 0
      ruoyi-admin/src/main/java/com/ruoyi/web/geo/GeoJSONUtil.java
  7. 124 0
      ruoyi-admin/src/main/java/com/ruoyi/web/geo/GeoVo.java
  8. 2 2
      ruoyi-admin/src/main/resources/application.yml
  9. 444 6
      ruoyi-admin/src/test/java/com/ruoyi/JasyptTest.java
  10. 296 136
      ruoyi-admin/src/test/java/com/ruoyi/TinyflowTest.java
  11. 55 0
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/controller/MdAppController.java
  12. 19 1
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/controller/PtServiceController.java
  13. 34 0
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/domain/MdAppFlowData.java
  14. 74 57
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/domain/MdModelInfo.java
  15. 1 1
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/domain/PtService.java
  16. 2 1
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/domain/SysMetaDatasource.java
  17. 15 0
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/mapper/MdAppMapper.java
  18. 7 0
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/IMdAppService.java
  19. 3 1
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/impl/MdAppFlowServiceImpl.java
  20. 24 0
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/impl/MdAppServiceImpl.java
  21. 18 0
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/impl/MdModelInfoServiceImpl.java
  22. 10 0
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/impl/PtServiceServiceImpl.java
  23. 2 0
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/tinyflow/TinyflowUtil.java
  24. 78 0
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/tinyflow/node/SaveNode.java
  25. 9 1
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/tinyflow/node/ServiceNode.java
  26. 22 0
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/tinyflow/parser/SaveNodeParser.java
  27. 2 0
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/tinyflow/parser/ServiceNodeParser.java
  28. 133 0
      ruoyi-api-patform/src/main/resources/mapper/interfaces/MdAppMapper.xml
  29. 3 1
      ruoyi-api-patform/src/main/resources/mapper/interfaces/MdModelInfoMapper.xml
  30. 9 7
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java
  31. 2 1
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java
  32. 6 1
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java
  33. 1 1
      ruoyi-common/src/main/java/com/ruoyi/common/utils/SecurityUtils.java
  34. 42 0
      ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUtils.java
  35. 3 6
      ruoyi-common/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java
  36. 1 1
      ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
  37. 215 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/StPptnR.java
  38. 548 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/StStbprpB.java
  39. 16 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java
  40. 39 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java
  41. 107 140
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java
  42. 3 2
      ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
  43. BIN
      ruoyi-ui/dist.zip
  44. BIN
      ruoyi-ui/src/assets/fonts/AlimamaDongFangDaKai-Regular.ttf
  45. 6 0
      ruoyi-ui/src/assets/fonts/font.css
  46. 1 0
      ruoyi-ui/src/main.js
  47. 1 1
      ruoyi-ui/src/router/index.js
  48. 94 73
      ruoyi-ui/src/views/shouye.vue

+ 93 - 0
ruoyi-admin/pom.xml

@@ -24,6 +24,99 @@
             <optional>true</optional> <!-- 表示依赖不会传递 -->
         </dependency>
 
+
+        <!--↓↓↓↓↓↓↓ 等值面插值依赖-->
+
+        <dependency>
+            <groupId>org.meteothink</groupId>
+            <artifactId>wContour</artifactId>
+            <version>1.7.1</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.googlecode.json-simple</groupId>
+            <artifactId>json-simple</artifactId>
+            <version>1.1.1</version>
+        </dependency>
+
+
+        <dependency>
+            <groupId>libs</groupId>
+            <artifactId>gt-api</artifactId>
+            <version>18.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt-main</artifactId>
+            <version>18.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt-referencing</artifactId>
+            <version>18.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt-opengis</artifactId>
+            <version>18.1</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt-shapefile</artifactId>
+            <version>18.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt-data</artifactId>
+            <version>18.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt-geojson</artifactId>
+            <version>18.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt-sample-data</artifactId>
+            <version>18.1</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt-epsg-hsql</artifactId>
+            <version>18.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt-property</artifactId>
+            <version>18.1</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.geotools</groupId>
+            <artifactId>gt-metadata</artifactId>
+            <version>18.1</version>
+        </dependency>
+        <dependency>
+            <groupId>wContour</groupId>
+            <artifactId>wContour</artifactId>
+            <version>1</version>
+        </dependency>
+        <dependency>
+            <groupId>jsr-275-1.0-beta</groupId>
+            <artifactId>jsr-275-1.0-beta</artifactId>
+            <version>2</version>
+        </dependency>
+        <dependency>
+            <groupId>com.vividsolutions</groupId>
+            <artifactId>jts-core</artifactId>
+            <version>1.14.0</version>
+        </dependency>
+
+        <!--↑↑↑↑↑ 等值面插值依赖-->
+
+
         <!-- swagger3 -->
         <dependency>
             <groupId>io.springfox</groupId>

+ 79 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/ShApiController.java

@@ -0,0 +1,79 @@
+package com.ruoyi.web.controller.common;
+
+
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.json.JSONUtils;
+import com.ruoyi.interfaces.mapper.MdAppMapper;
+import com.ruoyi.web.geo.CommonMethod;
+import com.ruoyi.web.geo.EquiSurface2;
+import com.ruoyi.web.geo.GeoVo;
+import com.ruoyi.system.domain.StPptnR;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+@RestController
+@RequestMapping("/sh-api")
+public class ShApiController {
+
+
+    @Autowired
+    private MdAppMapper mdAppMapper;
+
+    @PostMapping("/getPptnList")
+    public AjaxResult getPptnList(@RequestBody StPptnR stPptnR) {
+        List<StPptnR> stPptnRS = mdAppMapper.selectStPptnR(stPptnR);
+
+        return AjaxResult.success(stPptnRS);
+    }
+
+    @PostMapping("/getRain")
+    public AjaxResult getRainGeo(@RequestBody GeoVo vo) throws IOException {
+
+        CommonMethod cm = new CommonMethod();
+        List<StPptnR> stPptnRS = vo.getStPptnRS();
+
+        double[][] trainData = new double[stPptnRS.size()][3];
+        for (int i = 0; i < stPptnRS.size(); i++) {
+            double x = stPptnRS.get(i).getLgtd(),
+                    y = stPptnRS.get(i).getLttd(),
+                    v = stPptnRS.get(i).getDrp();
+            trainData[i][0] = x;
+            trainData[i][1] = y;
+            trainData[i][2] = v;
+        }
+
+        double[] dataInterval = vo.getDataInterval();
+
+        String boundryFile = "";
+        if ("0".equals(vo.getMapType())) {
+            boundryFile = "D:\\上海市\\shanghai.shp";
+        } else if ("1".equals(vo.getMapType())) {
+            boundryFile = "D:\\codes\\GISDemo\\GISDemo\\鄂尔多斯市6区县_84\\鄂尔多斯市6区县_84.shp";
+        } else if ("2".equals(vo.getMapType())) {
+            boundryFile = "D:\\codes\\GISDemo\\GISDemo\\鄂尔多斯市_裁剪84\\鄂尔多斯市_裁剪84.shp";
+        } else {
+            boundryFile = "D:\\上海市\\shanghai.shp";
+        }
+
+        int[] size = new int[]{100, 100};
+
+        boolean isclip = true;
+        String strJson = "";
+        strJson = EquiSurface2.calEquiSurface(trainData, dataInterval, size, boundryFile, isclip);
+
+        Map<String, Object> dataMap = null;
+        if (StringUtils.isNotEmpty(strJson)){
+            dataMap = JSONUtils.convertTaskDefinitionJsonMap(strJson);
+            dataMap.put("dataInterval",vo.getDataInterval());
+        }
+        return AjaxResult.success(dataMap);
+    }
+
+}

+ 241 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/geo/CommonMethod.java

@@ -0,0 +1,241 @@
+package com.ruoyi.web.geo;
+
+import java.io.*;
+
+public class CommonMethod {
+	/**
+	 * 获取文件内容
+	 * @param filePath
+	 * @return
+	 */
+	public String getFileContent(String filePath){
+		StringBuffer sb = new StringBuffer();
+		try {
+			String encoding="GBK";
+			File file=new File(filePath);
+			if(file.isFile() && file.exists()){ //判断文件是否存在
+				InputStreamReader read = new InputStreamReader(
+						new FileInputStream(file),encoding);//考虑到编码格式
+				BufferedReader bufferedReader = new BufferedReader(read);
+				String lineTxt = null;
+				while((lineTxt = bufferedReader.readLine()) != null){
+					sb.append(lineTxt);
+				}
+				read.close();
+			}
+			else{
+				System.out.println("找不到指定的文件");
+			}
+		}
+		catch (Exception e) {
+			System.out.println("读取文件内容出错");
+			e.printStackTrace();
+		}
+		return sb.toString();
+	}
+	public void append2File(String file, String content) {
+		FileWriter fw = null;
+
+		try {
+			//如果文件存在,则追加内容;如果文件不存在,则创建文件
+			File f = new File(file);
+			fw = new FileWriter(f, true);
+		}
+		catch (IOException e) {
+			e.printStackTrace();
+		}
+
+		PrintWriter pw = new PrintWriter(fw);
+		pw.println(content);
+		pw.flush();
+
+		try {
+			fw.flush();
+			pw.close();
+			fw.close();
+		}
+		catch (IOException e) {
+			e.printStackTrace();
+		}
+	}
+//	public JSONObject getUrl2JSON(String url) throws IOException, JSONException{
+//		JSONObject json = null;
+//		InputStream is = null;
+//		try {
+//			is = new URL(url).openStream();
+//			BufferedReader rd = new BufferedReader(new InputStreamReader(is, Charset.forName("UTF-8")));
+//		    StringBuilder sb = new StringBuilder();
+//		    int cp;
+//		    while ((cp = rd.read()) != -1) {
+//		        sb.append((char) cp);
+//		    }
+//		    json = new JSONObject(sb.toString());
+//		    is.close();
+//		} 
+//		catch (IOException e) {
+//			e.printStackTrace();
+//		}
+//		return json;
+//	}
+
+//	public JSONObject getUrlContent(String url) throws IOException, JSONException{
+//		JSONObject json = null;
+//		InputStream is = null;
+//		try {
+//			is = new URL(url).openStream();
+//			BufferedReader rd = new BufferedReader(new InputStreamReader(is, Charset.forName("UTF-8")));
+//		    StringBuilder sb = new StringBuilder();
+//		    int cp;
+//		    while ((cp = rd.read()) != -1) {
+//		        sb.append((char) cp);
+//		    }
+////			String strJson = sb.toString().substring(7,sb.toString().length()-2);
+//            String strJson = sb.toString();
+//            json = new JSONObject(strJson);
+//		    is.close();
+//		} 
+//		catch (IOException e) {
+//			e.printStackTrace();
+//		}
+//		return json;
+//	}
+//	public String[] getLonLatByName(String name){
+//		String[] lonlat = new String[]{"99","99"};
+//		String url = "http://api.tianditu.com/apiserver/ajaxproxy?proxyReqUrl=http://map.tianditu.com/query.shtml?postStr={'keyWord':'"+name+"','level':'3','mapBound':'29.88281,-23.56399,170.50781,53.54031','queryType':'7','start':'0','count':'1'}&type=query";
+//		String bdUrl = "http://api.map.baidu.com/?qt=gc&wd=%E6%96%B0%E7%AB%99%E5%8C%BA%E8%83%9C%E5%88%A9%E8%B7%AF89&cn=%E4%B8%AD%E5%9B%BD&fromproduct=jsapi&res=api&callback=lzugis&ak=DD279b2a90afdf0ae7a3796787a0742e";
+//		InputStream is = null;
+//		try {
+//			is = new URL(url).openStream();
+//			BufferedReader rd = new BufferedReader(new InputStreamReader(is, Charset.forName("UTF-8")));
+//		    StringBuilder sb = new StringBuilder();
+//		    int cp;
+//		    while ((cp = rd.read()) != -1) {
+//			    sb.append((char) cp);
+//			}
+//			String strJson = sb.toString().substring(19,sb.toString().length()-1);
+//		    JSONObject json = new JSONObject(strJson);
+//		    JSONArray arr = new JSONArray();
+//		    if(!json.isNull("pois")){
+//		    	arr = json.getJSONArray("pois");
+//		    	JSONObject poiinfo = (JSONObject) arr.get(0);
+//			    lonlat = poiinfo.get("lonlat").toString().split(" ");
+//			    is.close();
+//		    }
+//		}
+//		catch (IOException | JSONException e) {
+//	    	e.printStackTrace();
+//	    }
+//	    return lonlat;
+//	}
+
+	public double getAngleBy2Point(double x1,double y1,double x2,double y2){
+		double cosfi = 0, fi = 0, norm = 0;
+
+		double x3 = 180,y3 = y1<y2?y1:y2;
+		double dsx = x1 - x2;
+		double dsy = y1 - y2;
+		double dex = x2 - x3;
+		double dey = y2 - y3;
+
+		cosfi = dsx * dex + dsy * dey;
+		norm = (dsx * dsx + dsy * dsy) * (dex * dex + dey * dey);
+		cosfi /= Math.sqrt(norm);
+
+		if (cosfi >= 1.0) return 0;
+		if (cosfi <= -1.0) return Math.PI;
+		fi = Math.acos(cosfi);
+
+		double angle = 0;
+		if (180 * fi / Math.PI < 180){
+			angle = 180 * fi / Math.PI ;
+		}
+		else{
+			angle = 360 - 180 * fi / Math.PI;
+		}
+		if(y2<y1){
+			angle = 0-angle;
+		}
+		return angle;
+	}
+
+	/**
+	 * 将汉字转换为全拼
+	 *
+	 * @param src
+	 * @return
+	 */
+//	public String getPingYin(String src) {
+//		char[] t1 = null;
+//		t1 = src.toCharArray();
+//		String[] t2 = new String[t1.length];
+//		HanyuPinyinOutputFormat t3 = new HanyuPinyinOutputFormat();
+//
+//		t3.setCaseType(HanyuPinyinCaseType.LOWERCASE);
+//		t3.setToneType(HanyuPinyinToneType.WITHOUT_TONE);
+//		t3.setVCharType(HanyuPinyinVCharType.WITH_V);
+//		String t4 = "";
+//		int t0 = t1.length;
+//		try {
+//			for (int i = 0; i < t0; i++) {
+//				// 判断是否为汉字字符
+//				if (java.lang.Character.toString(t1[i]).matches(
+//						"[\\u4E00-\\u9FA5]+")) {
+//					t2 = PinyinHelper.toHanyuPinyinStringArray(t1[i], t3);
+//					t4 += t2[0];
+//				} else
+//					t4 += java.lang.Character.toString(t1[i]);
+//			}
+//			// System.out.println(t4);
+//			return t4;
+//		} catch (BadHanyuPinyinOutputFormatCombination e1) {
+//			e1.printStackTrace();
+//		}
+//		return t4;
+//	}
+
+	/**
+	 * 返回中文的首字母
+	 *
+	 * @param str
+	 * @return
+	 */
+//	public String getPinYinHeadChar(String str) {
+//		String convert = "";
+//		for (int j = 0; j < str.length(); j++) {
+//			char word = str.charAt(j);
+//			String[] pinyinArray = PinyinHelper.toHanyuPinyinStringArray(word);
+//			if (pinyinArray != null) {
+//				convert += pinyinArray[0].charAt(0);
+//			} else {
+//				convert += word;
+//			}
+//		}
+//		return convert;
+//	}
+
+	/**
+	 * 将字符串转移为ASCII码
+	 *
+	 * @param cnStr
+	 * @return
+	 */
+//	public String getCnASCII(String cnStr) {
+//		StringBuffer strBuf = new StringBuffer();
+//		byte[] bGBK = cnStr.getBytes();
+//		for (int i = 0; i < bGBK.length; i++) {
+//			strBuf.append(Integer.toHexString(bGBK[i] & 0xff));
+//		}
+//		return strBuf.toString();
+//	}
+//
+//	public static void main(String[] args) {
+//		CommonMethod cm = new CommonMethod();
+//        String url = "http://www.sojson.com/open/api/weather/json.shtml?city=北京";
+//        try {
+//            JSONObject json = cm.getUrlContent(url);
+//            System.out.println(json);
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        }
+//    }
+}

+ 344 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/geo/EquiSurface2.java

@@ -0,0 +1,344 @@
+package com.ruoyi.web.geo;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.vividsolutions.jts.geom.Geometry;
+import org.geotools.data.DataUtilities;
+import org.geotools.data.collection.ListFeatureCollection;
+import org.geotools.data.shapefile.ShapefileDataStore;
+import org.geotools.data.simple.SimpleFeatureCollection;
+import org.geotools.data.simple.SimpleFeatureIterator;
+import org.geotools.data.simple.SimpleFeatureSource;
+import org.geotools.feature.FeatureCollection;
+import org.geotools.feature.FeatureIterator;
+import org.geotools.feature.SchemaException;
+import org.geotools.feature.simple.SimpleFeatureBuilder;
+import org.geotools.geojson.feature.FeatureJSON;
+import org.opengis.feature.simple.SimpleFeature;
+import org.opengis.feature.simple.SimpleFeatureType;
+import wcontour.Contour;
+import wcontour.Interpolate;
+import wcontour.global.Border;
+import wcontour.global.PointD;
+import wcontour.global.PolyLine;
+import wcontour.global.Polygon;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.StringWriter;
+import java.nio.charset.Charset;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Created by admin on 2017/8/29.
+ */
+public class EquiSurface2 {
+    /**
+     * ɵ ֵ
+     *
+     * @param trainData    ѵ
+     * @param dataInterval ݼ
+     * @param size         С
+     * @param boundryFile
+     * @param isclip       Ƿ ü
+     * @return
+     */
+    public static String calEquiSurface(double[][] trainData,
+                                 double[] dataInterval,
+                                 int[] size,
+                                 String boundryFile,
+                                 boolean isclip) {
+        String geojsonpogylon = "";
+        try {
+            double _undefData = -9999.0;
+            SimpleFeatureCollection polygonCollection = null;
+            List<PolyLine> cPolylineList = new ArrayList<PolyLine>();
+            List<Polygon> cPolygonList = new ArrayList<Polygon>();
+
+            int width = size[0],
+                    height = size[1];
+            double[] _X = new double[width];
+            double[] _Y = new double[height];
+
+            File file = new File(boundryFile);
+            ShapefileDataStore shpDataStore = null;
+
+            shpDataStore = new ShapefileDataStore(file.toURL());
+            //   ñ
+            Charset charset = Charset.forName("GBK");
+            shpDataStore.setCharset(charset);
+            String typeName = shpDataStore.getTypeNames()[0];
+            SimpleFeatureSource featureSource = null;
+            featureSource = shpDataStore.getFeatureSource(typeName);
+            SimpleFeatureCollection fc = featureSource.getFeatures();
+
+            double minX = fc.getBounds().getMinX();
+            double minY = fc.getBounds().getMinY();
+            double maxX = fc.getBounds().getMaxX();
+            double maxY = fc.getBounds().getMaxY();
+
+            Interpolate.createGridXY_Num(minX, minY, maxX, maxY, _X, _Y);
+            double[][] _gridData = new double[width][height];
+
+            int nc = dataInterval.length;
+
+            _gridData = Interpolate.interpolation_IDW_Neighbor(trainData,
+                    _X, _Y, 12, _undefData);// IDW  ֵ
+
+            int[][] S1 = new int[_gridData.length][_gridData[0].length];
+            List<Border> _borders = Contour.tracingBorders(_gridData, _X, _Y,
+                    S1, _undefData);
+
+            cPolylineList = Contour.tracingContourLines(_gridData, _X, _Y, nc,
+                    dataInterval, _undefData, _borders, S1);//    ɵ ֵ
+
+            cPolylineList = Contour.smoothLines(cPolylineList);// ƽ
+
+            cPolygonList = Contour.tracingPolygons(_gridData, cPolylineList,
+                    _borders, dataInterval);
+
+            geojsonpogylon = getPolygonGeoJson(cPolygonList);
+
+            if (isclip) {
+                polygonCollection = GeoJSONUtil.readGeoJsonByString(geojsonpogylon);
+                SimpleFeatureCollection sm = clipPolygonFeatureCollection(fc, polygonCollection);
+                FeatureCollection featureCollection = sm;
+                FeatureJSON featureJSON = new FeatureJSON();
+                StringWriter writer = new StringWriter();
+                featureJSON.writeFeatureCollection(featureCollection, writer);
+                geojsonpogylon = writer.toString();
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return geojsonpogylon;
+    }
+
+    private static SimpleFeatureCollection clipPolygonFeatureCollection(FeatureCollection fc,
+                                                                 SimpleFeatureCollection gs) throws SchemaException {
+        SimpleFeatureCollection simpleFeatureCollection = null;
+        SimpleFeatureType TYPE = DataUtilities.createType("polygons",
+                "the_geom:MultiPolygon,lvalue:double,hvalue:double");
+        List<SimpleFeature> list = new ArrayList<>();
+        SimpleFeatureIterator contourFeatureIterator = gs.features();
+        FeatureIterator dataFeatureIterator = fc.features();
+        while (dataFeatureIterator.hasNext()) {
+            SimpleFeature dataFeature = (SimpleFeature) dataFeatureIterator.next();
+            Geometry dataGeometry = (Geometry) dataFeature.getDefaultGeometry();
+            contourFeatureIterator = gs.features();
+            while (contourFeatureIterator.hasNext()) {
+                SimpleFeature contourFeature = contourFeatureIterator.next();
+                Geometry contourGeometry = (Geometry) contourFeature.getDefaultGeometry();
+                Double lv = (Double) contourFeature.getProperty("lvalue").getValue();
+                Double hv = (Double) contourFeature.getProperty("hvalue").getValue();
+                if (dataGeometry.getGeometryType() == "MultiPolygon") {
+                    for (int i = 0; i < dataGeometry.getNumGeometries(); i++) {
+                        Geometry geom = dataGeometry.getGeometryN(i);
+                        if (geom.intersects(contourGeometry)) {
+                            Geometry geo = geom.intersection(contourGeometry);
+                            SimpleFeatureBuilder featureBuilder = new SimpleFeatureBuilder(TYPE);
+                            featureBuilder.add(geo);
+                            featureBuilder.add(lv);
+                            featureBuilder.add(hv);
+                            SimpleFeature feature = featureBuilder.buildFeature(null);
+                            list.add(feature);
+
+                        }
+                    }
+
+                } else {
+                    if (dataGeometry.intersects(contourGeometry)) {
+                        Geometry geo = dataGeometry.intersection(contourGeometry);
+                        SimpleFeatureBuilder featureBuilder = new SimpleFeatureBuilder(TYPE);
+                        featureBuilder.add(geo);
+                        featureBuilder.add(lv);
+                        featureBuilder.add(hv);
+                        SimpleFeature feature = featureBuilder.buildFeature(null);
+                        list.add(feature);
+
+                    }
+
+                }
+
+            }
+        }
+
+        contourFeatureIterator.close();
+        dataFeatureIterator.close();
+        simpleFeatureCollection = new ListFeatureCollection(TYPE, list);
+
+        return simpleFeatureCollection;
+    }
+
+    private String getPolygonGeoJson(FeatureCollection fc) {
+        FeatureJSON fjson = new FeatureJSON();
+        StringBuffer sb = new StringBuffer();
+        try {
+            sb.append("{\"type\": \"FeatureCollection\",\"features\": ");
+            FeatureIterator itertor = fc.features();
+            List<String> list = new ArrayList<String>();
+            while (itertor.hasNext()) {
+                SimpleFeature feature = (SimpleFeature) itertor.next();
+                StringWriter writer = new StringWriter();
+                fjson.writeFeature(feature, writer);
+                list.add(writer.toString());
+            }
+            itertor.close();
+            sb.append(list.toString());
+            sb.append("}");
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return sb.toString();
+    }
+
+    private static String getPolygonGeoJson(List<Polygon> cPolygonList) {
+        String geo = null;
+        String geometry = " { \"type\":\"Feature\",\"geometry\":";
+        String properties = ",\"properties\":{ \"hvalue\":";
+
+        String head = "{\"type\": \"FeatureCollection\"," + "\"features\": [";
+        String end = "  ] }";
+        if (cPolygonList == null || cPolygonList.size() == 0) {
+            return null;
+        }
+        try {
+            for (Polygon pPolygon : cPolygonList) {
+
+                List<Object> ptsTotal = new ArrayList<Object>();
+                List<Object> pts = new ArrayList<Object>();
+
+                PolyLine pline = pPolygon.OutLine;
+
+                for (PointD ptD : pline.PointList) {
+                    List<Double> pt = new ArrayList<Double>();
+                    pt.add(ptD.X);
+                    pt.add(ptD.Y);
+                    pts.add(pt);
+                }
+
+                ptsTotal.add(pts);
+
+                if (pPolygon.HasHoles()) {
+                    for (PolyLine cptLine : pPolygon.HoleLines) {
+                        List<Object> cpts = new ArrayList<Object>();
+                        for (PointD ccptD : cptLine.PointList) {
+                            List<Double> pt = new ArrayList<Double>();
+                            pt.add(ccptD.X);
+                            pt.add(ccptD.Y);
+                            cpts.add(pt);
+                        }
+                        if (cpts.size() > 0) {
+                            ptsTotal.add(cpts);
+                        }
+                    }
+                }
+
+                JSONObject js = new JSONObject();
+                js.put("type", "Polygon");
+                js.put("coordinates", ptsTotal);
+                double hv = pPolygon.HighValue;
+                double lv = pPolygon.LowValue;
+
+                if (hv == lv) {
+                    if (pPolygon.IsClockWise) {
+                        if (!pPolygon.IsHighCenter) {
+                            hv = hv - 0.1;
+                            lv = lv - 0.1;
+                        }
+
+                    } else {
+                        if (!pPolygon.IsHighCenter) {
+                            hv = hv - 0.1;
+                            lv = lv - 0.1;
+                        }
+                    }
+                } else {
+                    if (!pPolygon.IsClockWise) {
+                        lv = lv + 0.1;
+                    } else {
+                        if (pPolygon.IsHighCenter) {
+                            hv = hv - 0.1;
+                        }
+                    }
+
+                }
+
+                geo = geometry + js.toString() + properties + hv
+                        + ", \"lvalue\":" + lv + "} }" + "," + geo;
+
+            }
+            if (geo.contains(",")) {
+                geo = geo.substring(0, geo.lastIndexOf(","));
+            }
+
+            geo = head + geo + end;
+        } catch (Exception e) {
+            e.printStackTrace();
+            return geo;
+        }
+        return geo;
+    }
+
+    public static void main(String[] args) throws IOException {
+        long start = System.currentTimeMillis();
+
+        EquiSurface2 equiSurface = new EquiSurface2();
+        CommonMethod cm = new CommonMethod();
+        String pathToFile = "D:\\codes\\GISDemo\\数据\\降雨数据.json";
+        // 读取文件内容到字符串
+        String jsonContent = new String(Files.readAllBytes(Paths.get(pathToFile)));
+
+        // 创建JSONObject
+        JSONObject jsonObject = JSONObject.parseObject(jsonContent);
+
+        // 获取JSONArray
+        JSONArray jsonArray = jsonObject.getJSONArray("data");
+
+        double[][] trainData = new double[jsonArray.size()][3];
+        for (int i = 0; i < jsonArray.size(); i++) {
+            try {
+                double x = Double.parseDouble(jsonArray.getJSONObject(i).get("LGTD").toString()),
+                        y = Double.parseDouble(jsonArray.getJSONObject(i).get("LTTD").toString()),
+                        v = Double.parseDouble(jsonArray.getJSONObject(i).get("DRP").toString() == "" ? "0"
+                                : jsonArray.getJSONObject(i).get("DRP").toString());
+//            System.out.println("v=======" + v);
+                trainData[i][0] = x;
+                trainData[i][1] = y;
+                trainData[i][2] = v;
+            } catch (Exception e) {
+                System.out.println("错误数据:" + jsonArray.getJSONObject(i).toString());
+                continue;
+            }
+
+        }
+//        for (int i = 0; i < 100; i++) {
+//            double x = bounds[0] + new Random().nextDouble() * (bounds[2] - bounds[0]),
+//                    y = bounds[1] + new Random().nextDouble() * (bounds[3] - bounds[1]),
+//                    v = 0 + new Random().nextDouble() * (45 - 0);
+////            System.out.println("v=======" + v);
+//            trainData[0][i] = x;
+//            trainData[1][i] = y;
+//            trainData[2][i] = v;
+//        }
+
+        double[] dataInterval = new double[]{0, 10, 25, 50, 100, 250};
+
+        String boundryFile = "D:\\codes\\GISDemo\\数据\\LiuYuBianJie\\LiuYuBianJie2.shp";
+
+        int[] size = new int[]{100, 100};
+
+        boolean isclip = true;
+        try {
+            String strJson = equiSurface.calEquiSurface(trainData, dataInterval, size, boundryFile, isclip);
+            String strFile = "d:/china1.json";
+            cm.append2File(strFile, strJson);
+            System.out.println(strFile + "" + (System.currentTimeMillis() - start) + "ms");
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+}

+ 208 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/geo/FeaureUtil.java

@@ -0,0 +1,208 @@
+package com.ruoyi.web.geo;
+
+import com.vividsolutions.jts.geom.LineString;
+import com.vividsolutions.jts.geom.MultiPolygon;
+import com.vividsolutions.jts.geom.Point;
+import com.vividsolutions.jts.geom.Polygon;
+import org.geotools.data.FeatureSource;
+import org.geotools.data.collection.CollectionFeatureSource;
+import org.geotools.data.collection.ListFeatureCollection;
+import org.geotools.data.simple.SimpleFeatureCollection;
+import org.geotools.feature.simple.SimpleFeatureBuilder;
+import org.geotools.feature.simple.SimpleFeatureTypeBuilder;
+import org.geotools.referencing.CRS;
+import org.geotools.referencing.crs.DefaultGeographicCRS;
+import org.opengis.feature.simple.SimpleFeature;
+import org.opengis.feature.simple.SimpleFeatureType;
+
+import java.util.List;
+import java.util.Map;
+
+public class FeaureUtil {
+
+    public FeaureUtil() {
+    }
+
+    public static String feildsStatic = null;
+
+    /**
+     * 根据字段 创建表头
+     *
+     * @param layerName 名称
+     * @param feilds    以逗号分隔的每个里面  名称和类型以冒号分隔<br> 有三个很重要  1:crs 4326和3857两种 2.几何类型 Point,LineString,Polygon三种   3:属性 属性可无 类型有 String,int,double,float,boolean    <br>格式如下  "crs:4326,the_geom:Point,name:String"
+     * @return
+     */
+    public static SimpleFeatureType creatSimpleFeatureType(String layerName, String feilds) {
+        SimpleFeatureType type = null;
+
+        SimpleFeatureTypeBuilder b = new SimpleFeatureTypeBuilder();
+        String tmp = null;
+        b.setName(layerName);
+        try {
+            String[] feildsArray = null;
+            if (feilds != null && feilds.contains(",")) {
+                feildsArray = feilds.split(",");
+                for (String s : feildsArray) {
+                    String[] keyValues = null;
+                    if (s != null && s.contains(":")) {
+                        keyValues = s.split(":");
+                        String key = keyValues[0];
+                        String value = keyValues[1];
+                        if (key.equals("crs")) {
+                            if (value.equals("4326")) {
+                                b.setCRS(CRS.decode("EPSG:4326", true));
+                            } else if (value.equals("3857")) {
+                                b.setCRS(CRS.decode("EPSG:3857", true));
+                            }
+                        } else {
+
+                            if (value.equals("String")) {
+                                b.add(key, String.class);
+                            }
+                            if (value.equals("int")) {
+                                b.add(key, Integer.class);
+                            }
+                            if (value.equals("double")) {
+                                b.add(key, Double.class);
+                            }
+                            if (value.equals("float")) {
+                                b.add(key, Float.class);
+                            }
+                            if (value.equals("boolean")) {
+                                b.add(key, Boolean.class);
+                            }
+                            if (value.equals("Point")) {
+                                b.add(key, Point.class);
+                            }
+                            if (value.equals("LineString")) {
+                                b.add(key, LineString.class);
+                            }
+                            if (value.equals("Polygon")) {
+                                b.add(key, Polygon.class);
+                            }
+                            if (value.equals("MultiPolygon")) {
+                                b.add(key, MultiPolygon.class);
+                            }
+
+                            if (tmp != null) {
+                                tmp = tmp + "," + key;
+                            } else {
+                                tmp = key;
+                            }
+                        }
+                    }
+                }
+                type = b.buildFeatureType();
+                feildsStatic = tmp;
+            }
+
+        } catch (Exception e) {
+            e.printStackTrace();
+            return type;
+        }
+        if (!feilds.contains("crs")) {
+            b.setCRS(DefaultGeographicCRS.WGS84);
+        }
+        return type;
+
+    }
+
+    /**
+     * 创建要素集合
+     *
+     * @param featureType 要素类型
+     * @param values      值   List<Map<String,Object>> values
+     * @return
+     */
+    public static SimpleFeatureCollection creatSimpleFeature(SimpleFeatureType featureType, List<Map<String, Object>> values) {
+        SimpleFeatureBuilder builder = new SimpleFeatureBuilder(featureType);
+        ListFeatureCollection collection = null;
+        SimpleFeature feature = null;
+        String[] feildsArray = null;
+        try {
+            if (feildsStatic != null && feildsStatic.contains(",")) {
+                feildsArray = feildsStatic.split(",");
+                if (values != null && values.size() > 0) {
+                    collection = new ListFeatureCollection(featureType);
+                    for (int i = 0; i < values.size(); i++) {
+                        Map<String, Object> value = values.get(i);
+                        for (String key : feildsArray) {
+                            if (value.containsKey(key)) {
+                                builder.add(value.get(key));
+                            }
+
+                        }
+                        feature = builder.buildFeature("fid." + i);
+                        collection.add(feature);
+                    }
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            return collection;
+        }
+        return collection;
+    }
+
+
+    /**
+     * 创建要素集合  根据字段和值
+     *
+     * @param layerName 名称
+     * @param feilds    以逗号分隔的每个里面  名称和类型以冒号分隔<br> 有三个很重要  1:crs 4326和3857两种 2.几何类型 Point,LineString,Polygon三种   3:属性 属性可无 类型有 String,int,double,float,boolean    <br>格式如下  "crs:4326,the_geom:Point,name:String"
+     * @param values    值   List<Map<String,Object>> values
+     * @return
+     */
+    public static SimpleFeatureCollection creatSimpleFeatureByFeilds(String layerName, String feilds, List<Map<String, Object>> values) {
+        SimpleFeatureType featureType = creatSimpleFeatureType(layerName, feilds);
+        if (featureType == null) {
+            return null;
+        }
+        SimpleFeatureBuilder builder = new SimpleFeatureBuilder(featureType);
+        ListFeatureCollection collection = null;
+        SimpleFeature feature = null;
+        String[] feildsArray = null;
+        try {
+            if (feildsStatic != null && feildsStatic.contains(",")) {
+                feildsArray = feildsStatic.split(",");
+                if (values != null && values.size() > 0) {
+                    collection = new ListFeatureCollection(featureType);
+                    for (int i = 0; i < values.size(); i++) {
+                        Map<String, Object> value = values.get(i);
+                        for (String key : feildsArray) {
+                            if (value.containsKey(key)) {
+                                builder.add(value.get(key));
+                            }
+
+                        }
+                        feature = builder.buildFeature("fid." + i);
+                        collection.add(feature);
+                    }
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            return collection;
+        }
+        return collection;
+    }
+
+    /**
+     * 根据要素集合 创建数据源
+     *
+     * @param collection 要素集合
+     * @return 数据源
+     */
+    public static FeatureSource creatFeatureSourceByCollection(SimpleFeatureCollection collection) {
+        FeatureSource source = null;
+        try {
+            source = new CollectionFeatureSource(collection);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return source;
+        }
+        return source;
+    }
+
+
+}

+ 389 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/geo/GeoJSONUtil.java

@@ -0,0 +1,389 @@
+package com.ruoyi.web.geo;
+
+import org.geotools.data.DataStore;
+import org.geotools.data.DataStoreFinder;
+import org.geotools.data.FeatureSource;
+import org.geotools.data.collection.CollectionFeatureSource;
+import org.geotools.data.simple.SimpleFeatureCollection;
+import org.geotools.geojson.GeoJSON;
+import org.geotools.geojson.feature.FeatureJSON;
+import org.json.simple.JSONArray;
+import org.json.simple.JSONObject;
+import org.json.simple.parser.JSONParser;
+
+import java.io.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * GeoJSON 文件读取工具
+ *
+ * @author luanhaiyang
+ * @version 1.0, 2015-4-21
+ * @since 1.0, 2015-4-21
+ */
+public class GeoJSONUtil {
+
+    /**
+     * json转成 geojson
+     *
+     * @param json    json 例如 [{'name':"fd"},{'name':"fd"}]
+     * @param lonStr  经度字段的key
+     * @param latStr  纬度字段的key
+     * @param geoType 1点类型 2线类型 3面类型
+     * @return
+     */
+    public static String jsonToGeoJson(String json, String lonStr,
+                                       String latStr, int geoType) {
+
+        String returnStr = null;
+        String type1 = "Point";
+        String type2 = "LineString";
+        String type3 = "Polygon";
+        Map<String, Object> mapFeatureCollection = new HashMap<String, Object>();
+        List<Map<String, Object>> features = new ArrayList<Map<String, Object>>();
+
+        Map<String, Object> mapFeature = new HashMap<String, Object>();
+        Map<String, Object> mapGeometry = new HashMap<String, Object>();
+        Map<String, Object> mapProperties = new HashMap<String, Object>();
+        List<Double> coordinates = new ArrayList<Double>();
+        // 开始拼装
+        mapFeatureCollection.put("type", "FeatureCollection");
+        mapFeatureCollection.put("features", features);
+        try {
+            // (json, ArrayList.class);
+            Object jo = new JSONParser().parse(json);
+            if (jo instanceof JSONArray) {
+                JSONArray jsonarr = (JSONArray) jo;
+                for (int i = 0; i < jsonarr.size(); i++) {
+                    Object js = (JSONObject) jsonarr.get(i);
+                    if (js instanceof Map) {
+                        mapProperties = (Map<String, Object>) js;
+                        // 单个要素
+                        mapFeature = new HashMap<String, Object>();
+                        mapGeometry = new HashMap<String, Object>();
+                        coordinates = new ArrayList<Double>();
+                        // 属性
+                        mapProperties.put("type", "Feature");
+                        // 几何
+                        if (geoType == 1) {
+                            mapGeometry.put("type", type1);
+                            if (mapProperties.containsKey(lonStr)
+                                    && mapProperties.containsKey(latStr)) {
+                                coordinates.add(Double
+                                        .parseDouble(mapProperties.get(lonStr)
+                                                .toString()));
+                                coordinates.add(Double
+                                        .parseDouble(mapProperties.get(latStr)
+                                                .toString()));
+                            }
+                        }
+                        if (geoType == 2) {
+                            mapGeometry.put("type", type2);
+                        }
+                        if (geoType == 3) {
+                            mapGeometry.put("type", type3);
+                        }
+
+                        mapGeometry.put("coordinates", coordinates);
+                        // 要素
+                        mapFeature.put("type", "Feature");
+                        mapFeature.put("geometry", mapGeometry);
+                        mapFeature.put("properties", mapProperties);
+
+                        // 存放
+                        features.add(mapFeature);
+                    }
+
+                }
+            }
+            returnStr = JSONObject.toJSONString(mapFeatureCollection);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return returnStr;
+        }
+
+        return returnStr;
+
+    }
+
+    /**
+     * 读取GeoJSON文件 返回 SimpleFeatureCollection 要素集合
+     *
+     * @param geojsonFilePah GeoJSON文件所在路径
+     * @return SimpleFeatureCollection 要素集合
+     */
+    public static SimpleFeatureCollection readGeoJsonByFeatureJSON(
+            String geojsonFilePah) {
+        FileInputStream fis = null;
+        SimpleFeatureCollection fs = null;
+        try {
+            fis = new FileInputStream(geojsonFilePah);
+            // geojson读取工具
+            FeatureJSON fjson = new FeatureJSON();
+            // 获取要素集合
+            fs = (SimpleFeatureCollection) fjson.readFeatureCollection(fis);
+
+        } catch (IOException e) {
+            e.printStackTrace();
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            if (fis != null) {
+                try {
+                    fis.close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+
+        }
+        return fs;
+
+    }
+
+    /**
+     * 读取GeoJSON文件 返回 FeatureSource 要素集合
+     *
+     * @param geojsonFilePah GeoJSON文件所在路径
+     * @return SimpleFeatureCollection 要素集合
+     */
+    public static FeatureSource readGeoJsonByGeojsonToFeatureSource(
+            String geojsonFilePah) {
+        FileInputStream fis = null;
+        @SuppressWarnings("rawtypes")
+        FeatureSource fss = null;
+        try {
+            fis = new FileInputStream(geojsonFilePah);
+            // geojson读取工具
+            FeatureJSON fjson = new FeatureJSON();
+            // 获取要素集合
+            SimpleFeatureCollection fs = (SimpleFeatureCollection) fjson.readFeatureCollection(fis);
+            fss = creatFeatureSourceByCollection(fs);
+        } catch (IOException e) {
+            e.printStackTrace();
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            if (fis != null) {
+                try {
+                    fis.close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+
+        }
+        return fss;
+
+    }
+
+    /**
+     * 根据要素集合 创建数据源
+     *
+     * @param collection 要素集合
+     * @return 数据源
+     */
+    public static FeatureSource creatFeatureSourceByCollection(SimpleFeatureCollection collection) {
+        FeatureSource source = null;
+        try {
+            source = new CollectionFeatureSource(collection);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return source;
+        }
+        return source;
+    }
+
+    /**
+     * 读取GeoJSON字符串 返回 SimpleFeatureCollection 要素集合
+     *
+     * @param geojson GeoJSON字符串
+     * @return SimpleFeatureCollection 要素集合
+     */
+    public static SimpleFeatureCollection readGeoJsonByString(String geojson) {
+        ByteArrayInputStream bis = null;
+        SimpleFeatureCollection fs = null;
+        try {
+            // 字符串流
+            bis = new ByteArrayInputStream(geojson.getBytes());
+            // geojson读取工具
+            FeatureJSON fjson = new FeatureJSON();
+            // 获取要素集合
+            fs = (SimpleFeatureCollection) fjson.readFeatureCollection(bis);
+
+        } catch (IOException e) {
+            e.printStackTrace();
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            if (bis != null) {
+                try {
+                    bis.close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+
+        }
+        return fs;
+
+    }
+
+
+    /**
+     * 15.0才生效 读取GeoJSON文件 返回 DataStore
+     *
+     * @param path GeoJSON文件所在路径
+     * @return DataStore
+     */
+    public static DataStore readeGeoJSON(String path) {
+        DataStore dataStore = null;
+        File file = new File(path);
+        Map<String, String> connectionParams = new HashMap<String, String>();
+        connectionParams.put("DriverName", "GeoJSON");
+        connectionParams.put("DatasourceName", file.getAbsolutePath());
+        try {
+            dataStore = DataStoreFinder.getDataStore(connectionParams);
+        } catch (IOException e) {
+            e.printStackTrace();
+            return dataStore;
+        }
+        return dataStore;
+
+    }
+
+    /**
+     * 把要素集合写成geojson文件到本地
+     *
+     * @param path     本地路径 d:/1.geojson
+     * @param features 要素集合
+     * @param cs       编码 例如utf-8
+     */
+    public static void SimpleFeatureCollectionToGeoJSON(String path,
+                                                        SimpleFeatureCollection features, String cs) {
+        final StringWriter sw = new StringWriter();
+        try {
+            GeoJSON.write(features, sw);
+            toFileByCS(new File(path), sw.getBuffer().toString(), cs);
+        } catch (IOException e) {
+            e.printStackTrace();
+            FeatureJSON fj = new FeatureJSON();
+            try {
+                fj.writeFeatureCollection(features, sw);
+                toFileByCS(new File(path), sw.getBuffer().toString(), cs);
+            } catch (IOException e1) {
+                e1.printStackTrace();
+            }
+        }
+    }
+
+    /**
+     * 根据编码 把字符串写入文件
+     *
+     * @param saveFile 路径
+     * @param content  内容
+     * @param cs       编码
+     */
+    public static void toFileByCS(File saveFile, String content, String cs) {
+        File parent = saveFile.getParentFile();
+        if (!parent.exists()) {
+            parent.mkdirs();
+        }
+        PrintWriter out = null;
+        FileOutputStream fos = null;
+        OutputStreamWriter osw = null;
+        try {
+            fos = new FileOutputStream(saveFile);
+            if (cs.equals("")) {
+                osw = new OutputStreamWriter(fos);
+            } else {
+                osw = new OutputStreamWriter(fos, cs);
+            }
+            out = new PrintWriter(osw);
+            out.print(content);
+            out.flush();
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            if (out != null) {
+                out.close();
+            }
+            if (fos != null) {
+                try {
+                    fos.close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+            if (osw != null) {
+                try {
+                    osw.close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+    }
+
+    /**
+     * 把文件读成字符串
+     *
+     * @param path     路径
+     * @param encoding 编码
+     * @return
+     * @throws Exception
+     */
+    public static String readerFileToStrings(String path, String encoding)
+            throws Exception {
+        FileInputStream input = null;
+        InputStreamReader insreader = null;
+        BufferedReader bin = null;
+        File flie = null;
+        StringBuffer returnStr = null;
+        try {
+            flie = new File(path);
+            returnStr = new StringBuffer();
+            if (flie.exists() && flie.canRead()) {
+                input = new FileInputStream(flie);
+                if (encoding.equals("")) {
+                    insreader = new InputStreamReader(input);
+                } else {
+                    insreader = new InputStreamReader(input, encoding);
+                }
+
+                bin = new BufferedReader(insreader);
+
+                String line;
+                while ((line = bin.readLine()) != null) {
+                    returnStr.append(line);
+                }
+                bin.close();
+                insreader.close();
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            System.err.println("err!");
+        } finally {
+            if (bin != null) {
+                try {
+                    bin.close();
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+            if (insreader != null) {
+                try {
+                    insreader.close();
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+        return returnStr.toString();
+    }
+
+}

+ 124 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/geo/GeoVo.java

@@ -0,0 +1,124 @@
+package com.ruoyi.web.geo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.core.domain.BaseEntity;
+import com.ruoyi.system.domain.StPptnR;
+
+import java.util.Date;
+import java.util.List;
+
+public class GeoVo extends BaseEntity {
+    /**
+     * 开始时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date begintime;
+    /**
+     * 结束时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date endtime;
+    private double[] dataInterval;
+    /**
+     * 0 全省
+     * 1 北部区
+     * 2 东北部区
+     */
+    private String mapType;
+    private Date tmString;
+
+    private String source;
+    private String bsnm;
+    private String stcd;
+    private String smallRiver;
+
+    private List<StPptnR> stPptnRS;
+
+    public List<StPptnR> getStPptnRS() {
+        return stPptnRS;
+    }
+
+    public void setStPptnRS(List<StPptnR> stPptnRS) {
+        this.stPptnRS = stPptnRS;
+    }
+
+    public String getMapType() {
+        return mapType;
+    }
+
+    public void setMapType(String mapType) {
+        this.mapType = mapType;
+    }
+
+    public double[] getDataInterval() {
+        return dataInterval;
+    }
+
+    public void setDataInterval(double[] dataInterval) {
+        this.dataInterval = dataInterval;
+    }
+
+    public String getSmallRiver() {
+        return smallRiver;
+    }
+
+    public void setSmallRiver(String smallRiver) {
+        this.smallRiver = smallRiver;
+    }
+
+    public Date getTmString() {
+        return tmString;
+    }
+
+    public void setTmString(Date tmString) {
+        this.tmString = tmString;
+    }
+
+    public String getSource() {
+        return source;
+    }
+
+    public void setSource(String source) {
+        this.source = source;
+    }
+
+    public String getBsnm() {
+        return bsnm;
+    }
+
+    public void setBsnm(String bsnm) {
+        this.bsnm = bsnm;
+    }
+
+    public String getStcd() {
+        return stcd;
+    }
+
+    public void setStcd(String stcd) {
+        this.stcd = stcd;
+    }
+
+    public GeoVo(Date begintime, Date endtime) {
+        this.begintime = begintime;
+        this.endtime = endtime;
+    }
+
+    public GeoVo() {
+    }
+
+    public Date getBegintime() {
+        return begintime;
+    }
+
+    public void setBegintime(Date begintime) {
+        this.begintime = begintime;
+    }
+
+    public Date getEndtime() {
+        return endtime;
+    }
+
+    public void setEndtime(Date endtime) {
+        this.endtime = endtime;
+    }
+}

+ 2 - 2
ruoyi-admin/src/main/resources/application.yml

@@ -65,9 +65,9 @@ spring:
   servlet:
     multipart:
       # 单个文件大小
-      max-file-size: 10MB
+      max-file-size: 200MB
       # 设置总上传的文件大小
-      max-request-size: 20MB
+      max-request-size: 200MB
   # 服务模块
   devtools:
     restart:

+ 444 - 6
ruoyi-admin/src/test/java/com/ruoyi/JasyptTest.java

@@ -4,6 +4,7 @@ import com.ruoyi.common.core.domain.entity.SysDept;
 import com.ruoyi.common.core.domain.entity.SysRole;
 import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.utils.SM4Util;
+import com.ruoyi.common.utils.file.FileUtils;
 import com.ruoyi.interfaces.domain.MdModelInfo;
 import com.ruoyi.interfaces.domain.PtService;
 import com.ruoyi.interfaces.domain.SysMetaDatasource;
@@ -12,15 +13,20 @@ import com.ruoyi.interfaces.mapper.PtServiceMapper;
 import com.ruoyi.interfaces.mapper.SysMetaDatasourceMapper;
 import com.ruoyi.interfaces.service.ISysMetaDatasourceService;
 import com.ruoyi.interfaces.service.PtServiceService;
+import com.ruoyi.interfaces.service.impl.MdModelInfoServiceImpl;
 import com.ruoyi.system.mapper.SysDeptMapper;
 import com.ruoyi.system.mapper.SysRoleMapper;
 import com.ruoyi.system.mapper.SysUserMapper;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.test.context.junit4.SpringRunner;
 
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
 import java.util.List;
 
 import static org.junit.jupiter.api.Assertions.assertNotNull;
@@ -29,7 +35,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
 @SpringBootTest(classes = RuoYiApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
 @RunWith(SpringRunner.class)
 public class JasyptTest {
-
+    private static final Logger log = LoggerFactory.getLogger(MdModelInfoServiceImpl.class);
     @Autowired
     private SM4Util sm4Util;
 
@@ -49,24 +55,456 @@ public class JasyptTest {
 
 
     @Test
-    public void test() {
+    public void test() throws IOException {
+String s = "{\n" +
+        "  \"nodes\": [\n" +
+        "    {\n" +
+        "      \"id\": \"1\",\n" +
+        "      \"type\": \"startNode\",\n" +
+        "      \"initialized\": false,\n" +
+        "      \"position\": {\n" +
+        "        \"x\": -600,\n" +
+        "        \"y\": -300\n" +
+        "      },\n" +
+        "      \"data\": {\n" +
+        "        \"label\": \"开始\",\n" +
+        "        \"parameters\": [\n" +
+        "          {\n" +
+        "            \"name\": \"beginTm\",\n" +
+        "            \"dataType\": \"string\",\n" +
+        "            \"refType\": \"input\"\n" +
+        "          }\n" +
+        "        ],\n" +
+        "        \"loading\": false,\n" +
+        "        \"isSuccess\": true,\n" +
+        "        \"isFail\": false\n" +
+        "      }\n" +
+        "    },\n" +
+        "    {\n" +
+        "      \"id\": \"2\",\n" +
+        "      \"type\": \"endNode\",\n" +
+        "      \"initialized\": false,\n" +
+        "      \"position\": {\n" +
+        "        \"x\": 885,\n" +
+        "        \"y\": 90\n" +
+        "      },\n" +
+        "      \"data\": {\n" +
+        "        \"label\": \"结束\",\n" +
+        "        \"outputDefs\": [\n" +
+        "          {\n" +
+        "            \"name\": \"data\",\n" +
+        "            \"dataType\": \"array\",\n" +
+        "            \"refType\": \"ref\",\n" +
+        "            \"ref\": \"1763516549902862.data\"\n" +
+        "          }\n" +
+        "        ]\n" +
+        "      }\n" +
+        "    },\n" +
+        "    {\n" +
+        "      \"id\": \"1763515700772804\",\n" +
+        "      \"type\": \"serviceNode\",\n" +
+        "      \"initialized\": false,\n" +
+        "      \"position\": {\n" +
+        "        \"x\": -240,\n" +
+        "        \"y\": -135\n" +
+        "      },\n" +
+        "      \"data\": {\n" +
+        "        \"id\": \"2ae45987679c46248a95bc14432844b1\",\n" +
+        "        \"pid\": \"56d0db1d-27fe-4a9c-9060-c1429f3d2c8d\",\n" +
+        "        \"label\": \"获取雨量数据列表\",\n" +
+        "        \"nodeType\": \"SERVICE\",\n" +
+        "\n" +
+        "        \"appId\":123,\n" +
+        "\n" +
+        "        \"service\": {\n" +
+        "          \"srvId\": \"2ae45987679c46248a95bc14432844b1\",\n" +
+        "          \"mdid\": \"56d0db1d-27fe-4a9c-9060-c1429f3d2c8d\",\n" +
+        "          \"cateCode\": \"\",\n" +
+        "          \"name\": \"获取雨量数据列表\",\n" +
+        "          \"intro\": \"获取雨量数据\",\n" +
+        "          \"serviceSource\": null,\n" +
+        "          \"serviceDept\": null,\n" +
+        "          \"manageName\": null,\n" +
+        "          \"developUnit\": null,\n" +
+        "          \"developContacter\": null,\n" +
+        "          \"maintainUnit\": null,\n" +
+        "          \"maintainContacer\": null,\n" +
+        "          \"upCycl\": null,\n" +
+        "          \"openCndtn\": null,\n" +
+        "          \"adName\": null,\n" +
+        "          \"dataField\": null,\n" +
+        "          \"dataRange\": null,\n" +
+        "          \"userId\": \"1\",\n" +
+        "          \"status\": null,\n" +
+        "          \"note\": null,\n" +
+        "          \"type\": \"HTTP\",\n" +
+        "          \"url\": \"/sh-api/getPptnList\",\n" +
+        "          \"rqtype\": \"POST\",\n" +
+        "          \"rptype\": \"1\",\n" +
+        "          \"rpcontent\": \"{\\\"msg\\\":\\\"操作成功\\\",\\\"code\\\":200,\\\"data\\\":[{\\\"stcd\\\":\\\"1111111\\\",\\\"stnm\\\":null,\\\"tm\\\":\\\"2025-11-18 16:29:32\\\",\\\"drp\\\":0.0,\\\"intv\\\":1.0,\\\"pdr\\\":null,\\\"dyp\\\":null,\\\"wth\\\":\\\"\\\",\\\"tmy\\\":null,\\\"lgtd\\\":1.0,\\\"lttd\\\":1.0},{\\\"stcd\\\":\\\"1111111\\\",\\\"stnm\\\":null,\\\"tm\\\":\\\"2025-11-18 16:29:32\\\",\\\"drp\\\":0.0,\\\"intv\\\":1.0,\\\"pdr\\\":null,\\\"dyp\\\":null,\\\"wth\\\":\\\"\\\",\\\"tmy\\\":null,\\\"lgtd\\\":1.0,\\\"lttd\\\":1.0},{\\\"stcd\\\":\\\"1111111\\\",\\\"stnm\\\":null,\\\"tm\\\":\\\"2025-11-18 16:29:32\\\",\\\"drp\\\":0.0,\\\"intv\\\":1.0,\\\"pdr\\\":null,\\\"dyp\\\":null,\\\"wth\\\":\\\"\\\",\\\"tmy\\\":null,\\\"lgtd\\\":1.0,\\\"lttd\\\":1.0},{\\\"stcd\\\":\\\"1111111\\\",\\\"stnm\\\":null,\\\"tm\\\":\\\"2025-11-18 16:29:32\\\",\\\"drp\\\":0.0,\\\"intv\\\":1.0,\\\"pdr\\\":null,\\\"dyp\\\":null,\\\"wth\\\":\\\"\\\",\\\"tmy\\\":null,\\\"lgtd\\\":1.0,\\\"lttd\\\":1.0}]}\",\n" +
+        "          \"proxyAddress\": null,\n" +
+        "          \"proxyPath\": \"\",\n" +
+        "          \"gatewayId\": \"f9d56764047a49ea957163e87f3492dc\",\n" +
+        "          \"example\": \"\",\n" +
+        "          \"cnt\": 0,\n" +
+        "          \"viewNum\": 0,\n" +
+        "          \"applyNum\": 0,\n" +
+        "          \"dataNum\": 0,\n" +
+        "          \"tm\": \"2025-11-18\",\n" +
+        "          \"uptm\": \"2025-11-18\",\n" +
+        "          \"rlstm\": \"2025-11-18\",\n" +
+        "          \"releaseTime\": \"2025-11-18\",\n" +
+        "          \"attentionId\": null,\n" +
+        "          \"params\": [\n" +
+        "            {\n" +
+        "              \"srvId\": \"2ae45987679c46248a95bc14432844b1\",\n" +
+        "              \"paramCode\": \"beginTm\",\n" +
+        "              \"paramName\": \"开始时间\",\n" +
+        "              \"paramType\": \"string\",\n" +
+        "              \"paramValue\": \"\",\n" +
+        "              \"paramFormat\": null,\n" +
+        "              \"paramNote\": null,\n" +
+        "              \"sort\": 0,\n" +
+        "              \"paramObject\": \"\"\n" +
+        "            },\n" +
+        "            {\n" +
+        "              \"srvId\": \"2ae45987679c46248a95bc14432844b1\",\n" +
+        "              \"paramCode\": \"endTm\",\n" +
+        "              \"paramName\": \"结束时间\",\n" +
+        "              \"paramType\": \"string\",\n" +
+        "              \"paramValue\": null,\n" +
+        "              \"paramFormat\": null,\n" +
+        "              \"paramNote\": null,\n" +
+        "              \"sort\": 1,\n" +
+        "              \"paramObject\": null\n" +
+        "            }\n" +
+        "          ],\n" +
+        "          \"state\": \"1\",\n" +
+        "          \"sort\": null,\n" +
+        "          \"audit\": \"0\",\n" +
+        "          \"auditBy\": null,\n" +
+        "          \"auditRemark\": null,\n" +
+        "          \"auditTime\": null,\n" +
+        "          \"publish\": \"0\",\n" +
+        "          \"publishBy\": null,\n" +
+        "          \"publishTime\": null,\n" +
+        "          \"senState\": null,\n" +
+        "          \"dataSignature\": \"3045022067c584d2219e519ea682b2d48062f3042b1ed7b72ca485153d8cb9c99b6f30a9022100c565ca82582ad864210782988f9043a815e9778f55a9836d2fcba5cd424bf3f4\"\n" +
+        "        },\n" +
+        "        \"parameters\": [\n" +
+        "          {\n" +
+        "            \"name\": \"beginTm\",\n" +
+        "            \"ref\": \"1.beginTm\",\n" +
+        "            \"dataType\": \"string\",\n" +
+        "            \"refType\": \"ref\"\n" +
+        "          },\n" +
+        "          {\n" +
+        "            \"name\": \"endTm\",\n" +
+        "            \"ref\": \"1.beginTm\",\n" +
+        "            \"dataType\": \"string\",\n" +
+        "            \"refType\": \"ref\"\n" +
+        "          }\n" +
+        "        ],\n" +
+        "        \"loading\": false,\n" +
+        "        \"isSuccess\": true,\n" +
+        "        \"isFail\": false\n" +
+        "      }\n" +
+        "    },\n" +
+        "    {\n" +
+        "      \"id\": \"1763516549902862\",\n" +
+        "      \"type\": \"serviceNode\",\n" +
+        "      \"initialized\": false,\n" +
+        "      \"position\": {\n" +
+        "        \"x\": 150,\n" +
+        "        \"y\": -60\n" +
+        "      },\n" +
+        "      \"data\": {\n" +
+        "        \"id\": \"c48bb6d3a73f41a19d0eccb33fe34424\",\n" +
+        "        \"pid\": \"56d0db1d-27fe-4a9c-9060-c1429f3d2c8d\",\n" +
+        "        \"label\": \"等值面数据计算\",\n" +
+        "        \"nodeType\": \"SERVICE\",\n" +
+        "        \"service\": {\n" +
+        "          \"srvId\": \"c48bb6d3a73f41a19d0eccb33fe34424\",\n" +
+        "          \"mdid\": \"56d0db1d-27fe-4a9c-9060-c1429f3d2c8d\",\n" +
+        "          \"cateCode\": \"\",\n" +
+        "          \"name\": \"等值面数据计算\",\n" +
+        "          \"intro\": \"\",\n" +
+        "          \"serviceSource\": null,\n" +
+        "          \"serviceDept\": null,\n" +
+        "          \"manageName\": null,\n" +
+        "          \"developUnit\": null,\n" +
+        "          \"developContacter\": null,\n" +
+        "          \"maintainUnit\": null,\n" +
+        "          \"maintainContacer\": null,\n" +
+        "          \"upCycl\": null,\n" +
+        "          \"openCndtn\": null,\n" +
+        "          \"adName\": null,\n" +
+        "          \"dataField\": null,\n" +
+        "          \"dataRange\": null,\n" +
+        "          \"userId\": \"1\",\n" +
+        "          \"status\": null,\n" +
+        "          \"note\": null,\n" +
+        "          \"type\": \"HTTP\",\n" +
+        "          \"url\": \"/sh-api/getRain\",\n" +
+        "          \"rqtype\": \"POST\",\n" +
+        "          \"rptype\": \"1\",\n" +
+        "          \"rpcontent\": \"{\\n    \\\"msg\\\": \\\"操作成功\\\",\\n    \\\"code\\\": 200,\\n    \\\"data\\\": {\\n        \\\"features\\\": [\\n            {\\n                \\\"type\\\": \\\"Feature\\\",\\n                \\\"geometry\\\": {\\n                    \\\"type\\\": \\\"MultiPolygon\\\",\\n                    \\\"coordinates\\\": [\\n                        [\\n                            [\\n                                [\\n                                    106.739,\\n                                    39.8614\\n                                ]\\n                            ]\\n                        ]\\n                    ]\\n                },\\n                \\\"properties\\\": {\\n                    \\\"lvalue\\\": 0.4,\\n                    \\\"hvalue\\\": 0.4\\n                },\\n                \\\"id\\\": \\\"fid-69939b06_19a96366106_-7e6d\\\"\\n            }\\n        ],\\n        \\\"type\\\": \\\"FeatureCollection\\\"\\n    }\\n}\",\n" +
+        "          \"proxyAddress\": null,\n" +
+        "          \"proxyPath\": \"\",\n" +
+        "          \"gatewayId\": \"f9d56764047a49ea957163e87f3492dc\",\n" +
+        "          \"example\": \"\",\n" +
+        "          \"cnt\": 0,\n" +
+        "          \"viewNum\": 0,\n" +
+        "          \"applyNum\": 0,\n" +
+        "          \"dataNum\": 0,\n" +
+        "          \"tm\": \"2025-11-18\",\n" +
+        "          \"uptm\": \"2025-11-18\",\n" +
+        "          \"rlstm\": \"2025-11-18\",\n" +
+        "          \"releaseTime\": \"2025-11-18\",\n" +
+        "          \"attentionId\": null,\n" +
+        "          \"params\": null,\n" +
+        "          \"state\": \"1\",\n" +
+        "          \"sort\": 2,\n" +
+        "          \"audit\": \"0\",\n" +
+        "          \"auditBy\": null,\n" +
+        "          \"auditRemark\": null,\n" +
+        "          \"auditTime\": null,\n" +
+        "          \"publish\": \"0\",\n" +
+        "          \"publishBy\": null,\n" +
+        "          \"publishTime\": null,\n" +
+        "          \"senState\": null,\n" +
+        "          \"dataSignature\": \"3044022072b3deb5ac7987334ca811e4099f74b56987e21fec2f0fac7639d3d71a449f570220218fe9b942f5a20733988f2225b0096c50b84e127948601c9ecd79ee720791c2\"\n" +
+        "        }\n" +
+        "      }\n" +
+        "    },\n" +
+        "    {\n" +
+        "      \"id\": \"1763608793434362\",\n" +
+        "      \"type\": \"saveNode\",\n" +
+        "      \"initialized\": false,\n" +
+        "      \"position\": {\n" +
+        "        \"x\": 570,\n" +
+        "        \"y\": 30\n" +
+        "      },\n" +
+        "      \"data\": {\n" +
+        "        \"label\": \"存储节点\",\n" +
+        "        \"nodeType\": \"tool\",\n" +
+        "\n" +
+        "        \"appId\":123,\n" +
+        "\n" +
+        "        \"value\": \"存储节点\"\n" +
+        "      }\n" +
+        "    }\n" +
+        "  ],\n" +
+        "  \"edges\": [\n" +
+        "    {\n" +
+        "      \"id\": \"vueflow__edge-1-1763515700772804\",\n" +
+        "      \"type\": \"default\",\n" +
+        "      \"source\": \"1\",\n" +
+        "      \"target\": \"1763515700772804\",\n" +
+        "      \"sourceHandle\": null,\n" +
+        "      \"targetHandle\": null,\n" +
+        "      \"data\": {},\n" +
+        "      \"label\": \"\",\n" +
+        "      \"style\": {\n" +
+        "        \"stroke\": \"#79bbff\",\n" +
+        "        \"strokeWidth\": 2,\n" +
+        "        \"type\": \"bezier\",\n" +
+        "        \"fill\": \"none\"\n" +
+        "      },\n" +
+        "      \"markerEnd\": {\n" +
+        "        \"type\": \"arrow\",\n" +
+        "        \"color\": \"#79bbff\",\n" +
+        "        \"width\": 15,\n" +
+        "        \"height\": 15\n" +
+        "      },\n" +
+        "      \"sourceX\": -388.32869182527065,\n" +
+        "      \"sourceY\": -270.06712341308594,\n" +
+        "      \"targetX\": -242.99760034195967,\n" +
+        "      \"targetY\": -85.79632097846783\n" +
+        "    },\n" +
+        "    {\n" +
+        "      \"id\": \"vueflow__edge-1763515700772804-1763516549902862\",\n" +
+        "      \"type\": \"default\",\n" +
+        "      \"source\": \"1763515700772804\",\n" +
+        "      \"target\": \"1763516549902862\",\n" +
+        "      \"sourceHandle\": null,\n" +
+        "      \"targetHandle\": null,\n" +
+        "      \"data\": {},\n" +
+        "      \"label\": \"\",\n" +
+        "      \"style\": {\n" +
+        "        \"stroke\": \"#79bbff\",\n" +
+        "        \"strokeWidth\": 2,\n" +
+        "        \"type\": \"bezier\",\n" +
+        "        \"fill\": \"none\"\n" +
+        "      },\n" +
+        "      \"markerEnd\": {\n" +
+        "        \"type\": \"arrow\",\n" +
+        "        \"color\": \"#79bbff\",\n" +
+        "        \"width\": 15,\n" +
+        "        \"height\": 15\n" +
+        "      },\n" +
+        "      \"sourceX\": 9.61110267965904,\n" +
+        "      \"sourceY\": -85.79632097846783,\n" +
+        "      \"targetX\": 147.00239965804033,\n" +
+        "      \"targetY\": -10.79632097846784\n" +
+        "    },\n" +
+        "    {\n" +
+        "      \"id\": \"vueflow__edge-1763516549902862-1763608793434362\",\n" +
+        "      \"type\": \"default\",\n" +
+        "      \"source\": \"1763516549902862\",\n" +
+        "      \"target\": \"1763608793434362\",\n" +
+        "      \"sourceHandle\": null,\n" +
+        "      \"targetHandle\": null,\n" +
+        "      \"data\": {},\n" +
+        "      \"label\": \"\",\n" +
+        "      \"style\": {\n" +
+        "        \"stroke\": \"#79bbff\",\n" +
+        "        \"strokeWidth\": 2,\n" +
+        "        \"type\": \"bezier\",\n" +
+        "        \"fill\": \"none\"\n" +
+        "      },\n" +
+        "      \"markerEnd\": {\n" +
+        "        \"type\": \"arrow\",\n" +
+        "        \"color\": \"#79bbff\",\n" +
+        "        \"width\": 15,\n" +
+        "        \"height\": 15\n" +
+        "      },\n" +
+        "      \"sourceX\": 399.61110267965904,\n" +
+        "      \"sourceY\": -10.79632097846784,\n" +
+        "      \"targetX\": 567.0020866090777,\n" +
+        "      \"targetY\": 59.932854453569774\n" +
+        "    },\n" +
+        "    {\n" +
+        "      \"id\": \"vueflow__edge-1763608793434362-2\",\n" +
+        "      \"type\": \"default\",\n" +
+        "      \"source\": \"1763608793434362\",\n" +
+        "      \"target\": \"2\",\n" +
+        "      \"sourceHandle\": null,\n" +
+        "      \"targetHandle\": null,\n" +
+        "      \"data\": {},\n" +
+        "      \"label\": \"\",\n" +
+        "      \"style\": {\n" +
+        "        \"stroke\": \"#79bbff\",\n" +
+        "        \"strokeWidth\": 2,\n" +
+        "        \"type\": \"bezier\",\n" +
+        "        \"fill\": \"none\"\n" +
+        "      },\n" +
+        "      \"markerEnd\": {\n" +
+        "        \"type\": \"arrow\",\n" +
+        "        \"color\": \"#79bbff\",\n" +
+        "        \"width\": 15,\n" +
+        "        \"height\": 15\n" +
+        "      },\n" +
+        "      \"sourceX\": 781.67129017445,\n" +
+        "      \"sourceY\": 59.932854453569774,\n" +
+        "      \"targetX\": 882.0023193359375,\n" +
+        "      \"targetY\": 119.932861328125\n" +
+        "    }\n" +
+        "  ],\n" +
+        "  \"position\": [\n" +
+        "    335.5230568199554,\n" +
+        "    402.6419012459621\n" +
+        "  ],\n" +
+        "  \"zoom\": 0.7798800184586985,\n" +
+        "  \"viewport\": {\n" +
+        "    \"x\": 335.5230568199554,\n" +
+        "    \"y\": 402.6419012459621,\n" +
+        "    \"zoom\": 0.7798800184586985\n" +
+        "  }\n" +
+        "}";
+        String s1 = FileUtils.writeImportBytes(s.getBytes(StandardCharsets.UTF_8), "json");
+
+        System.out.println(s1);
 
 
-        //System.out.println(sm4Util.encrypt("Gw#$1601"));
 /*
-
         List<MdModelInfo> mdModelInfos = modelMapper.selectMdModelInfoList(new MdModelInfo());
         mdModelInfos.forEach(p -> {
             p.sign();
-            modelMapper.updateMdModelInfo(p);
+            boolean b = p.verifySignature();
+            if (b){
+                log.info("MdModelInfo 验签成功"+p.toString());
+            }else {
+                log.error("验签失败:"+p.toString());
+            }
+
         });
 
+
         List<PtService> ptServices = ptServiceMapper.selectAllColumns(new PtService());
         ptServices.forEach(p->{
             p.sign();
-            ptServiceMapper.updateByPrimaryKeySelective(p);
+            boolean b = p.verifySignature();
+            if (b){
+                log.info("PtService 验签成功"+p.toString());
+            }else {
+                log.error("验签失败:"+p.toString());
+            }
+        });
+
+
+        List<SysMetaDatasource> sysMetaDatasources = datasourceMapper.selectSysMetaDatasourceList(new SysMetaDatasource());
+        sysMetaDatasources.forEach(p -> {
+            p.sign();
+            boolean b = p.verifySignature();
+            if (b){
+                log.info("SysMetaDatasource 验签成功"+p.toString());
+            }else {
+                log.error("验签失败:"+p.toString());
+            }
+        });
+
+
+        List<SysRole> sysRoles = roleMapper.selectRoleList(new SysRole());
+        sysRoles.forEach(p -> {
+            p.sign();
+            boolean b = p.verifySignature();
+            if (b){
+                log.info("SysRole 验签成功"+p.toString());
+            }else {
+                log.error("验签失败:"+p.toString());
+            }
         });
 
+        List<SysDept> sysDepts = deptMapper.selectDeptList(new SysDept());
+        sysDepts.forEach(p -> {
+            p.sign();
+            boolean b = p.verifySignature();
+            if (b){
+                log.info("SysDept 验签成功"+p.toString());
+            }else {
+                log.error("验签失败:"+p.toString());
+            }
+        });*/
+
+       /* List<SysUser> sysUsers = userService.selectUserList(new SysUser());
+        sysUsers.forEach(p -> {
+            //p.setEmail(sm4Util.encrypt(p.getEmail()));
+            p.sign();
+            boolean b = p.verifySignature();
+            if (b){
+                log.info("SysUser 验签成功"+p.toString());
+            }else {
+                log.error("验签失败:"+p.toString());
+            }
+*//*            //System.out.println(p.getEmail());
+            System.out.println(p.getDataSignature());*//*
+        });*/
+
+
+
+
+
+        //System.out.println(sm4Util.encrypt("Gw#$1601"));
+/*
+
+        List<MdModelInfo> mdModelInfos = modelMapper.selectMdModelInfoList(new MdModelInfo());
+        mdModelInfos.forEach(p -> {
+            p.sign();
+            modelMapper.updateMdModelInfo(p);
+        });
+
+
 
         List<SysMetaDatasource> sysMetaDatasources = datasourceMapper.selectSysMetaDatasourceList(new SysMetaDatasource());
         sysMetaDatasources.forEach(p -> {

+ 296 - 136
ruoyi-admin/src/test/java/com/ruoyi/TinyflowTest.java

@@ -1,4 +1,3 @@
-/*
 package com.ruoyi;
 
 import com.agentsflex.core.chain.Chain;
@@ -20,12 +19,18 @@ import com.ruoyi.model.dpp.dal.dataobject.etl.DppEtlTaskDO;
 import com.ruoyi.model.etl.mapper.DppEtlTaskMapper;
 import dev.tinyflow.core.Tinyflow;
 import org.junit.jupiter.api.Test;
+import org.junit.runner.RunWith;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
 
 import javax.annotation.Resource;
 import java.util.HashMap;
 import java.util.Map;
 
+
+@SpringBootTest(classes = RuoYiApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
+@RunWith(SpringRunner.class)
 public class TinyflowTest {
 
     //    static String data1 = "";
@@ -35,56 +40,64 @@ public class TinyflowTest {
             "        {\n" +
             "            \"id\": \"1\",\n" +
             "            \"type\": \"startNode\",\n" +
+            "            \"initialized\": false,\n" +
+            "            \"position\": {\n" +
+            "                \"x\": -600,\n" +
+            "                \"y\": -300\n" +
+            "            },\n" +
             "            \"data\": {\n" +
-            "                \"title\": \"开始节点\",\n" +
-            "                \"description\": \"开始定义输入参数\",\n" +
-            "                \"expand\": true,\n" +
+            "                \"label\": \"开始\",\n" +
             "                \"parameters\": [\n" +
             "                    {\n" +
-            "                        \"name\": \"year\",\n" +
-            "                        \"dataType\": \"String\",\n" +
-            "                        \"refType\": \"input\",\n" +
-            "                        \"required\": true,\n" +
-            "                        \"description\": \"第一个输入参数\"\n" +
-            "                    },\n" +
-            "                    {\n" +
-            "                        \"name\": \"inputParam2\",\n" +
-            "                        \"dataType\": \"Number\",\n" +
-            "                        \"refType\": \"input\",\n" +
-            "                        \"required\": false,\n" +
-            "                        \"description\": \"第二个输入参数\",\n" +
-            "                        \"defaultValue\": 100\n" +
+            "                        \"name\": \"beginTm\",\n" +
+            "                        \"dataType\": \"string\",\n" +
+            "                        \"refType\": \"input\"\n" +
             "                    }\n" +
-            "                ]\n" +
-            "            },\n" +
-            "            \"position\": {\n" +
-            "                \"x\": 150,\n" +
-            "                \"y\": 25\n" +
-            "            },\n" +
-            "            \"measured\": {\n" +
-            "                \"width\": 306,\n" +
-            "                \"height\": 209\n" +
-            "            },\n" +
-            "            \"selected\": false\n" +
+            "                ],\n" +
+            "                \"loading\": false,\n" +
+            "                \"isSuccess\": true,\n" +
+            "                \"isFail\": false\n" +
+            "            }\n" +
             "        },\n" +
             "        {\n" +
             "            \"id\": \"2\",\n" +
+            "            \"type\": \"endNode\",\n" +
+            "            \"initialized\": false,\n" +
+            "            \"position\": {\n" +
+            "                \"x\": 495,\n" +
+            "                \"y\": 15\n" +
+            "            },\n" +
             "            \"data\": {\n" +
-            "                \"title\": \"服务节点\",\n" +
-            "                \"parameters\": [\n" +
+            "                \"label\": \"结束\",\n" +
+            "                \"outputDefs\": [\n" +
             "                    {\n" +
-            "                        \"name\": \"year\",\n" +
-            "                        \"dataType\": \"String\",\n" +
-            "                        \"ref\": \"1.year\",\n" +
-            "                        \"refType\": \"ref\"\n" +
+            "                        \"name\": \"data\",\n" +
+            "                        \"dataType\": \"array\",\n" +
+            "                        \"refType\": \"ref\",\n" +
+            "                        \"ref\": \"1763516549902862.data\"\n" +
             "                    }\n" +
-            "                ],\n" +
+            "                ]\n" +
+            "            }\n" +
+            "        },\n" +
+            "        {\n" +
+            "            \"id\": \"1763515700772804\",\n" +
+            "            \"type\": \"serviceNode\",\n" +
+            "            \"initialized\": false,\n" +
+            "            \"position\": {\n" +
+            "                \"x\": -240,\n" +
+            "                \"y\": -135\n" +
+            "            },\n" +
+            "            \"data\": {\n" +
+            "                \"id\": \"2ae45987679c46248a95bc14432844b1\",\n" +
+            "                \"pid\": \"56d0db1d-27fe-4a9c-9060-c1429f3d2c8d\",\n" +
+            "                \"label\": \"获取雨量数据列表\",\n" +
+            "                \"nodeType\": \"SERVICE\",\n" +
             "                \"service\": {\n" +
-            "                    \"srvId\": \"634ae1e0ee78e00bd609b85514961373\",\n" +
-            "                    \"mdid\": \"e4dc50dd-c4a9-4639-b43e-62e48314a7e0\",\n" +
-            "                    \"cateCode\": \"S\",\n" +
-            "                    \"name\": \"获取台风信息列表\",\n" +
-            "                    \"intro\": \"获取有台风的编号及名称\",\n" +
+            "                    \"srvId\": \"2ae45987679c46248a95bc14432844b1\",\n" +
+            "                    \"mdid\": \"56d0db1d-27fe-4a9c-9060-c1429f3d2c8d\",\n" +
+            "                    \"cateCode\": \"\",\n" +
+            "                    \"name\": \"获取雨量数据列表\",\n" +
+            "                    \"intro\": \"获取雨量数据\",\n" +
             "                    \"serviceSource\": null,\n" +
             "                    \"serviceDept\": null,\n" +
             "                    \"manageName\": null,\n" +
@@ -97,122 +110,292 @@ public class TinyflowTest {
             "                    \"adName\": null,\n" +
             "                    \"dataField\": null,\n" +
             "                    \"dataRange\": null,\n" +
-            "                    \"userId\": null,\n" +
+            "                    \"userId\": \"1\",\n" +
             "                    \"status\": null,\n" +
             "                    \"note\": null,\n" +
             "                    \"type\": \"HTTP\",\n" +
-            "                    \"url\": \"http://49.4.2.185:2111/RiverStrongAPI2.0/StormSurgeForecast/Typhoon/GetInfos\",\n" +
+            "                    \"url\": \"/sh-api/getPptnList\",\n" +
             "                    \"rqtype\": \"POST\",\n" +
             "                    \"rptype\": \"1\",\n" +
-            "                    \"rpcontent\": \"{\\n  \\\"data\\\": [\\n        {\\n            \\\"typhoonId\\\": \\\"202317\\\",\\n            \\\"typhoonName\\\": \\\"杰拉华\\\",\\n           \\\"test\\\": \\\"1123\\\"\\n        },\\n        {\\n            \\\"typhoonId\\\": \\\"202316\\\",\\n            \\\"typhoonName\\\": \\\"三巴\\\",\\n           \\\"test\\\": \\\"1123\\\"\\n           \\n        }\\n    ],\\n    \\\"succeeded\\\": true,\\n    \\\"statusCode\\\": 200,\\n    \\\"remark\\\": \\\"获取该年台风信息成功\\\"\\n}\",\n" +
+            "                    \"rpcontent\": \"{\\\"msg\\\":\\\"操作成功\\\",\\\"code\\\":200,\\\"data\\\":[{\\\"stcd\\\":\\\"1111111\\\",\\\"stnm\\\":null,\\\"tm\\\":\\\"2025-11-18 16:29:32\\\",\\\"drp\\\":0.0,\\\"intv\\\":1.0,\\\"pdr\\\":null,\\\"dyp\\\":null,\\\"wth\\\":\\\"\\\",\\\"tmy\\\":null,\\\"lgtd\\\":1.0,\\\"lttd\\\":1.0},{\\\"stcd\\\":\\\"1111111\\\",\\\"stnm\\\":null,\\\"tm\\\":\\\"2025-11-18 16:29:32\\\",\\\"drp\\\":0.0,\\\"intv\\\":1.0,\\\"pdr\\\":null,\\\"dyp\\\":null,\\\"wth\\\":\\\"\\\",\\\"tmy\\\":null,\\\"lgtd\\\":1.0,\\\"lttd\\\":1.0},{\\\"stcd\\\":\\\"1111111\\\",\\\"stnm\\\":null,\\\"tm\\\":\\\"2025-11-18 16:29:32\\\",\\\"drp\\\":0.0,\\\"intv\\\":1.0,\\\"pdr\\\":null,\\\"dyp\\\":null,\\\"wth\\\":\\\"\\\",\\\"tmy\\\":null,\\\"lgtd\\\":1.0,\\\"lttd\\\":1.0},{\\\"stcd\\\":\\\"1111111\\\",\\\"stnm\\\":null,\\\"tm\\\":\\\"2025-11-18 16:29:32\\\",\\\"drp\\\":0.0,\\\"intv\\\":1.0,\\\"pdr\\\":null,\\\"dyp\\\":null,\\\"wth\\\":\\\"\\\",\\\"tmy\\\":null,\\\"lgtd\\\":1.0,\\\"lttd\\\":1.0}]}\",\n" +
             "                    \"proxyAddress\": null,\n" +
-            "                    \"proxyPath\": null,\n" +
+            "                    \"proxyPath\": \"\",\n" +
+            "                    \"gatewayId\": \"f9d56764047a49ea957163e87f3492dc\",\n" +
             "                    \"example\": \"\",\n" +
-            "                    \"cnt\": null,\n" +
+            "                    \"cnt\": 0,\n" +
             "                    \"viewNum\": 0,\n" +
-            "                    \"applyNum\": null,\n" +
-            "                    \"dataNum\": null,\n" +
-            "                    \"tm\": null,\n" +
-            "                    \"uptm\": null,\n" +
-            "                    \"rlstm\": null,\n" +
-            "                    \"releaseTime\": null,\n" +
+            "                    \"applyNum\": 0,\n" +
+            "                    \"dataNum\": 0,\n" +
+            "                    \"tm\": \"2025-11-18\",\n" +
+            "                    \"uptm\": \"2025-11-18\",\n" +
+            "                    \"rlstm\": \"2025-11-18\",\n" +
+            "                    \"releaseTime\": \"2025-11-18\",\n" +
             "                    \"attentionId\": null,\n" +
             "                    \"params\": [\n" +
             "                        {\n" +
-            "                            \"srvId\": \"634ae1e0ee78e00bd609b85514961373\",\n" +
-            "                            \"paramCode\": \"year\",\n" +
-            "                            \"paramName\": \"年份\",\n" +
-            "                            \"paramType\": \"int\",\n" +
-            "                            \"paramValue\": \"2023\",\n" +
+            "                            \"srvId\": \"2ae45987679c46248a95bc14432844b1\",\n" +
+            "                            \"paramCode\": \"beginTm\",\n" +
+            "                            \"paramName\": \"开始时间\",\n" +
+            "                            \"paramType\": \"string\",\n" +
+            "                            \"paramValue\": \"\",\n" +
             "                            \"paramFormat\": null,\n" +
-            "                            \"paramNote\": \"\",\n" +
+            "                            \"paramNote\": null,\n" +
             "                            \"sort\": 0,\n" +
-            "                            \"paramObject\": 2023\n" +
+            "                            \"paramObject\": \"\"\n" +
+            "                        },\n" +
+            "                        {\n" +
+            "                            \"srvId\": \"2ae45987679c46248a95bc14432844b1\",\n" +
+            "                            \"paramCode\": \"endTm\",\n" +
+            "                            \"paramName\": \"结束时间\",\n" +
+            "                            \"paramType\": \"string\",\n" +
+            "                            \"paramValue\": null,\n" +
+            "                            \"paramFormat\": null,\n" +
+            "                            \"paramNote\": null,\n" +
+            "                            \"sort\": 1,\n" +
+            "                            \"paramObject\": null\n" +
             "                        }\n" +
             "                    ],\n" +
+            "                    \"state\": \"1\",\n" +
             "                    \"sort\": null,\n" +
-            "                    \"audit\": null\n" +
-            "                }\n" +
-            "            },\n" +
+            "                    \"audit\": \"0\",\n" +
+            "                    \"auditBy\": null,\n" +
+            "                    \"auditRemark\": null,\n" +
+            "                    \"auditTime\": null,\n" +
+            "                    \"publish\": \"0\",\n" +
+            "                    \"publishBy\": null,\n" +
+            "                    \"publishTime\": null,\n" +
+            "                    \"senState\": null,\n" +
+            "                    \"dataSignature\": \"3045022067c584d2219e519ea682b2d48062f3042b1ed7b72ca485153d8cb9c99b6f30a9022100c565ca82582ad864210782988f9043a815e9778f55a9836d2fcba5cd424bf3f4\"\n" +
+            "                },\n" +
+            "                \"parameters\": [\n" +
+            "                    {\n" +
+            "                        \"name\": \"beginTm\",\n" +
+            "                        \"ref\": \"1.beginTm\",\n" +
+            "                        \"dataType\": \"string\",\n" +
+            "                        \"refType\": \"ref\"\n" +
+            "                    },\n" +
+            "                    {\n" +
+            "                        \"name\": \"endTm\",\n" +
+            "                        \"ref\": \"1.beginTm\",\n" +
+            "                        \"dataType\": \"string\",\n" +
+            "                        \"refType\": \"ref\"\n" +
+            "                    }\n" +
+            "                ],\n" +
+            "                \"loading\": false,\n" +
+            "                \"isSuccess\": true,\n" +
+            "                \"isFail\": false\n" +
+            "            }\n" +
+            "        },\n" +
+            "        {\n" +
+            "            \"id\": \"1763516549902862\",\n" +
             "            \"type\": \"serviceNode\",\n" +
+            "            \"initialized\": false,\n" +
             "            \"position\": {\n" +
-            "                \"x\": 600,\n" +
-            "                \"y\": 50\n" +
-            "            },\n" +
-            "            \"measured\": {\n" +
-            "                \"width\": 334,\n" +
-            "                \"height\": 687\n" +
+            "                \"x\": 150,\n" +
+            "                \"y\": -60\n" +
             "            },\n" +
-            "            \"selected\": false\n" +
-            "        },\n" +
-            "        {\n" +
-            "            \"id\": \"3\",\n" +
-            "            \"type\": \"endNode\",\n" +
             "            \"data\": {\n" +
-            "                \"title\": \"结束节点\",\n" +
-            "                \"description\": \"结束定义输出参数\",\n" +
-            "                \"expand\": true,\n" +
-            "                \"outputDefs\": [\n" +
+            "                \"id\": \"c48bb6d3a73f41a19d0eccb33fe34424\",\n" +
+            "                \"pid\": \"56d0db1d-27fe-4a9c-9060-c1429f3d2c8d\",\n" +
+            "                \"label\": \"等值面数据计算\",\n" +
+            "                \"nodeType\": \"SERVICE\",\n" +
+            "                \"service\": {\n" +
+            "                    \"srvId\": \"c48bb6d3a73f41a19d0eccb33fe34424\",\n" +
+            "                    \"mdid\": \"56d0db1d-27fe-4a9c-9060-c1429f3d2c8d\",\n" +
+            "                    \"cateCode\": \"\",\n" +
+            "                    \"name\": \"等值面数据计算\",\n" +
+            "                    \"intro\": \"\",\n" +
+            "                    \"serviceSource\": null,\n" +
+            "                    \"serviceDept\": null,\n" +
+            "                    \"manageName\": null,\n" +
+            "                    \"developUnit\": null,\n" +
+            "                    \"developContacter\": null,\n" +
+            "                    \"maintainUnit\": null,\n" +
+            "                    \"maintainContacer\": null,\n" +
+            "                    \"upCycl\": null,\n" +
+            "                    \"openCndtn\": null,\n" +
+            "                    \"adName\": null,\n" +
+            "                    \"dataField\": null,\n" +
+            "                    \"dataRange\": null,\n" +
+            "                    \"userId\": \"1\",\n" +
+            "                    \"status\": null,\n" +
+            "                    \"note\": null,\n" +
+            "                    \"type\": \"HTTP\",\n" +
+            "                    \"url\": \"/sh-api/getRain\",\n" +
+            "                    \"rqtype\": \"POST\",\n" +
+            "                    \"rptype\": \"1\",\n" +
+            "                    \"rpcontent\": \"{\\n    \\\"msg\\\": \\\"操作成功\\\",\\n    \\\"code\\\": 200,\\n    \\\"data\\\": {\\n        \\\"features\\\": [\\n            {\\n                \\\"type\\\": \\\"Feature\\\",\\n                \\\"geometry\\\": {\\n                    \\\"type\\\": \\\"MultiPolygon\\\",\\n                    \\\"coordinates\\\": [\\n                        [\\n                            [\\n                                [\\n                                    106.739,\\n                                    39.8614\\n                                ]\\n                            ]\\n                        ]\\n                    ]\\n                },\\n                \\\"properties\\\": {\\n                    \\\"lvalue\\\": 0.4,\\n                    \\\"hvalue\\\": 0.4\\n                },\\n                \\\"id\\\": \\\"fid-69939b06_19a96366106_-7e6d\\\"\\n            }\\n        ],\\n        \\\"type\\\": \\\"FeatureCollection\\\"\\n    }\\n}\",\n" +
+            "                    \"proxyAddress\": null,\n" +
+            "                    \"proxyPath\": \"\",\n" +
+            "                    \"gatewayId\": \"f9d56764047a49ea957163e87f3492dc\",\n" +
+            "                    \"example\": \"\",\n" +
+            "                    \"cnt\": 0,\n" +
+            "                    \"viewNum\": 0,\n" +
+            "                    \"applyNum\": 0,\n" +
+            "                    \"dataNum\": 0,\n" +
+            "                    \"tm\": \"2025-11-18\",\n" +
+            "                    \"uptm\": \"2025-11-18\",\n" +
+            "                    \"rlstm\": \"2025-11-18\",\n" +
+            "                    \"releaseTime\": \"2025-11-18\",\n" +
+            "                    \"attentionId\": null,\n" +
+            "                    \"params\": [\n" +
+            "                        {\n" +
+            "                            \"srvId\": \"c48bb6d3a73f41a19d0eccb33fe34424\",\n" +
+            "                            \"paramCode\": \"stPptnRS\",\n" +
+            "                            \"paramName\": \"降雨量数据列表\",\n" +
+            "                            \"paramType\": \"array\",\n" +
+            "                            \"paramValue\": null,\n" +
+            "                            \"paramFormat\": null,\n" +
+            "                            \"paramNote\": null,\n" +
+            "                            \"sort\": 0,\n" +
+            "                            \"paramObject\": null\n" +
+            "                        },\n" +
+            "                        {\n" +
+            "                            \"srvId\": \"c48bb6d3a73f41a19d0eccb33fe34424\",\n" +
+            "                            \"paramCode\": \"dataInterval\",\n" +
+            "                            \"paramName\": \"等级列表\",\n" +
+            "                            \"paramType\": \"array\",\n" +
+            "                            \"paramValue\": null,\n" +
+            "                            \"paramFormat\": null,\n" +
+            "                            \"paramNote\": null,\n" +
+            "                            \"sort\": 1,\n" +
+            "                            \"paramObject\": null\n" +
+            "                        }\n" +
+            "                    ],\n" +
+            "                    \"state\": \"1\",\n" +
+            "                    \"sort\": null,\n" +
+            "                    \"audit\": \"0\",\n" +
+            "                    \"auditBy\": null,\n" +
+            "                    \"auditRemark\": null,\n" +
+            "                    \"auditTime\": null,\n" +
+            "                    \"publish\": \"0\",\n" +
+            "                    \"publishBy\": null,\n" +
+            "                    \"publishTime\": null,\n" +
+            "                    \"senState\": null,\n" +
+            "                    \"dataSignature\": \"3044022072b3deb5ac7987334ca811e4099f74b56987e21fec2f0fac7639d3d71a449f570220218fe9b942f5a20733988f2225b0096c50b84e127948601c9ecd79ee720791c2\"\n" +
+            "                },\n" +
+            "                \"parameters\": [\n" +
             "                    {\n" +
-            "                        \"name\": \"data\",\n" +
-            "                        \"dataType\": \"Object\",\n" +
-            "                        \"ref\": \"2.result\",\n" +
+            "                        \"name\": \"stPptnRS\",\n" +
+            "                        \"ref\": \"1763515700772804.data\",\n" +
+            "                        \"dataType\": \"array\",\n" +
             "                        \"refType\": \"ref\"\n" +
+            "                    },\n" +
+            "                    {\n" +
+            "                        \"name\": \"dataInterval\",\n" +
+            "                        \"value\": \"[0,1,2,3,4,5]\",\n" +
+            "                        \"dataType\": \"array\",\n" +
+            "                        \"refType\": \"input\"\n" +
             "                    }\n" +
             "                ]\n" +
-            "            },\n" +
-            "            \"position\": {\n" +
-            "                \"x\": 994,\n" +
-            "                \"y\": 218\n" +
-            "            },\n" +
-            "            \"measured\": {\n" +
-            "                \"width\": 334,\n" +
-            "                \"height\": 209\n" +
-            "            },\n" +
-            "            \"selected\": false,\n" +
-            "            \"dragging\": false\n" +
+            "            }\n" +
             "        }\n" +
             "    ],\n" +
             "    \"edges\": [\n" +
             "        {\n" +
+            "            \"id\": \"vueflow__edge-1-1763515700772804\",\n" +
+            "            \"type\": \"default\",\n" +
+            "            \"source\": \"1\",\n" +
+            "            \"target\": \"1763515700772804\",\n" +
+            "            \"sourceHandle\": null,\n" +
+            "            \"targetHandle\": null,\n" +
+            "            \"data\": {},\n" +
+            "            \"label\": \"\",\n" +
+            "            \"style\": {\n" +
+            "                \"stroke\": \"#79bbff\",\n" +
+            "                \"strokeWidth\": 2,\n" +
+            "                \"type\": \"bezier\",\n" +
+            "                \"fill\": \"none\"\n" +
+            "            },\n" +
             "            \"markerEnd\": {\n" +
-            "                \"type\": \"arrowclosed\",\n" +
-            "                \"width\": 20,\n" +
-            "                \"height\": 20\n" +
+            "                \"type\": \"arrow\",\n" +
+            "                \"color\": \"#79bbff\",\n" +
+            "                \"width\": 15,\n" +
+            "                \"height\": 15\n" +
             "            },\n" +
-            "            \"source\": \"1\",\n" +
-            "            \"target\": \"2\",\n" +
-            "            \"id\": \"xy-edge__1-2\"\n" +
+            "            \"sourceX\": -362.24219512939453,\n" +
+            "            \"sourceY\": -266.32291412353516,\n" +
+            "            \"targetX\": -242.9947829012957,\n" +
+            "            \"targetY\": -84.27862047636737\n" +
+            "        },\n" +
+            "        {\n" +
+            "            \"id\": \"vueflow__edge-1763515700772804-1763516549902862\",\n" +
+            "            \"type\": \"default\",\n" +
+            "            \"source\": \"1763515700772804\",\n" +
+            "            \"target\": \"1763516549902862\",\n" +
+            "            \"sourceHandle\": null,\n" +
+            "            \"targetHandle\": null,\n" +
+            "            \"data\": {},\n" +
+            "            \"label\": \"\",\n" +
+            "            \"style\": {\n" +
+            "                \"stroke\": \"#79bbff\",\n" +
+            "                \"strokeWidth\": 2,\n" +
+            "                \"type\": \"bezier\",\n" +
+            "                \"fill\": \"none\"\n" +
+            "            },\n" +
+            "            \"markerEnd\": {\n" +
+            "                \"type\": \"arrow\",\n" +
+            "                \"color\": \"#79bbff\",\n" +
+            "                \"width\": 15,\n" +
+            "                \"height\": 15\n" +
+            "            },\n" +
+            "            \"sourceX\": 40.44016452250668,\n" +
+            "            \"sourceY\": -84.27862047636737,\n" +
+            "            \"targetX\": 147.0052170987043,\n" +
+            "            \"targetY\": -9.27865960748769\n" +
             "        },\n" +
             "        {\n" +
+            "            \"id\": \"vueflow__edge-1763516549902862-2\",\n" +
+            "            \"type\": \"default\",\n" +
+            "            \"source\": \"1763516549902862\",\n" +
+            "            \"target\": \"2\",\n" +
+            "            \"sourceHandle\": null,\n" +
+            "            \"targetHandle\": null,\n" +
+            "            \"data\": {},\n" +
+            "            \"label\": \"\",\n" +
+            "            \"style\": {\n" +
+            "                \"stroke\": \"#79bbff\",\n" +
+            "                \"strokeWidth\": 2,\n" +
+            "                \"type\": \"bezier\",\n" +
+            "                \"fill\": \"none\"\n" +
+            "            },\n" +
             "            \"markerEnd\": {\n" +
-            "                \"type\": \"arrowclosed\",\n" +
-            "                \"width\": 20,\n" +
-            "                \"height\": 20\n" +
+            "                \"type\": \"arrow\",\n" +
+            "                \"color\": \"#79bbff\",\n" +
+            "                \"width\": 15,\n" +
+            "                \"height\": 15\n" +
             "            },\n" +
-            "            \"source\": \"2\",\n" +
-            "            \"target\": \"3\",\n" +
-            "            \"id\": \"xy-edge__2-3\"\n" +
+            "            \"sourceX\": 430.44000799802535,\n" +
+            "            \"sourceY\": -9.27865960748769,\n" +
+            "            \"targetX\": 492.0052490234375,\n" +
+            "            \"targetY\": 48.67706298828125\n" +
             "        }\n" +
             "    ],\n" +
+            "    \"position\": [\n" +
+            "        53.67420396862019,\n" +
+            "        328.82464236271346\n" +
+            "    ],\n" +
+            "    \"zoom\": 1.5597600369173974,\n" +
             "    \"viewport\": {\n" +
-            "        \"x\": 250,\n" +
-            "        \"y\": 100,\n" +
-            "        \"zoom\": 1\n" +
+            "        \"x\": 53.67420396862019,\n" +
+            "        \"y\": 328.82464236271346,\n" +
+            "        \"zoom\": 1.5597600369173974\n" +
             "    }\n" +
             "}";
 
-    public static void main(String[] args) {
-        */
-/*System.out.println(data1);
+    @Test
+    public void test1(){
+
+    //public static void main(String[] args) {
+System.out.println(data1);
         Tinyflow tinyflow = new Tinyflow(data1);
         tinyflow.getChainParser().addNodeParser("printNode",new PrintNodeParser());
         tinyflow.getChainParser().addNodeParser("serviceNode",new ServiceNodeParser());
 //        tinyflow.setLlmProvider(id -> OpenAILlm.of(""));
 
         Map<String, Object> variables = new HashMap<>();
-        variables.put("year", "2024");
-        variables.put("inputParam2", 2);
+        variables.put("beginTm", "2024");
+        //variables.put("inputParam2", 2);
 
         Chain chain = tinyflow.toChain();
         chain.addEventListener(new ChainEventListener() {
@@ -230,16 +413,16 @@ public class TinyflowTest {
             }
         });
 
-        chain.addOutputListener(new ChainOutputListener() {
+/*        chain.addOutputListener(new ChainOutputListener() {
             @Override
             public void onOutput(Chain chain, ChainNode node, Object outputMessage) {
                 System.out.println("outputMessage: " + outputMessage);
             }
-        });
+        });*/
 
         Map<String, Object> result = chain.executeForResult(variables);
 
-        System.out.println("result:" + result);*//*
+        System.out.println("result:" + result);
 
 //        TestService testService = new TestService();
 //        System.out.println(testService.helloTest());
@@ -247,27 +430,4 @@ public class TinyflowTest {
 
     }
 
-    @Resource
-    private  DppEtlTaskMapper  dppEtlTaskMapper ;
-
-    @Test
-    public void testSelectJoinPage() {
-
-        MPJLambdaWrapper<DppEtlTaskDO> wrapper = new MPJLambdaWrapper<>();
-        // 添加简单的查询条件
-        wrapper.eq(DppEtlTaskDO::getDelFlag, "0");
-
-        try {
-            IPage<DppEtlTaskDO> result = dppEtlTaskMapper.selectJoinPage(
-                    new Page<>(1, 10),
-                    DppEtlTaskDO.class,
-                    wrapper
-            );
-            System.out.println("查询成功,结果数量:" + result.getRecords().size());
-        } catch (Exception e) {
-            System.out.println("查询失败:" + e.getMessage());
-            e.printStackTrace();
-        }
-    }
 }
-*/

+ 55 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/controller/MdAppController.java

@@ -2,6 +2,11 @@ package com.ruoyi.interfaces.controller;
 
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
+
+import com.ruoyi.interfaces.domain.MdAppFlowData;
+import com.ruoyi.interfaces.mapper.MdAppMapper;
+import com.ruoyi.system.domain.StPptnR;
+import com.ruoyi.system.domain.StStbprpB;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -20,6 +25,7 @@ import com.ruoyi.interfaces.domain.MdApp;
 import com.ruoyi.interfaces.service.IMdAppService;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.common.core.page.TableDataInfo;
+import org.springframework.web.multipart.MultipartFile;
 
 /**
  * 模型应用Controller
@@ -97,4 +103,53 @@ public class MdAppController extends BaseController
     {
         return toAjax(mdAppService.deleteMdAppByAppIds(appIds));
     }
+
+
+    @GetMapping("/getMdAppFlowDataList")
+    public AjaxResult getMdAppFlowDataList(MdAppFlowData data){
+        return success(mdAppService.selectMdAppFlowDataList(data));
+    }
+    @GetMapping("/getAppData")
+    public AjaxResult getAppData(MdAppFlowData data){
+        return success(mdAppService.getAppData(data));
+    }
+
+
+
+
+    @Autowired
+    private MdAppMapper mdAppMapper;
+
+    /**
+     * 导入数据
+     * @param file
+     * @param updateSupport
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/importData")
+    public AjaxResult importData(MultipartFile file) throws Exception
+    {
+        ExcelUtil<StPptnR> util = new ExcelUtil<StPptnR>(StPptnR.class);
+        List<StPptnR> userList = util.importExcel(file.getInputStream());
+        userList.forEach(mdAppMapper::importStPptnR);
+        return AjaxResult.success("");
+    }
+
+
+    /**
+     * 导入数据
+     * @param file
+     * @param
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/importStat")
+    public AjaxResult importStat(MultipartFile file) throws Exception
+    {
+        ExcelUtil<StStbprpB> util = new ExcelUtil<StStbprpB>(StStbprpB.class);
+        List<StStbprpB> userList = util.importExcel(file.getInputStream());
+        userList.forEach(mdAppMapper::importStStbprpB);
+        return AjaxResult.success("");
+    }
 }

+ 19 - 1
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/controller/PtServiceController.java

@@ -146,7 +146,12 @@ public class PtServiceController extends BaseController {
         ptService.setUrl(url);
         ptService.setExample(url + "?accessToken='值'");
         Map<String, Object> map = new HashMap<>(3);
-
+        boolean b = ptService.verifySignature();
+        if (b){
+            log.info("ptService 验签成功");
+        }else {
+            log.error("ptService 验签失败:"+ptService.toString());
+        }
         ptService.setDevelopContacter(sm4Util.decrypt(ptService.getDevelopContacter()));
         ptService.setMaintainContacer(sm4Util.decrypt(ptService.getMaintainContacer()));
         ptService.setAdName(sm4Util.decrypt(ptService.getAdName()));
@@ -162,6 +167,13 @@ public class PtServiceController extends BaseController {
     @RequestMapping(value = "/get/{srvId}")
     public AjaxResult getById(@PathVariable String srvId) {
         PtService ptService = ptServiceMapper.selectByPrimaryKey(srvId);
+
+        boolean b = ptService.verifySignature();
+        if (b){
+            log.info("ptService 验签成功");
+        }else {
+            log.error("ptService 验签失败:"+ptService.toString());
+        }
         ptService.setDevelopContacter(sm4Util.decrypt(ptService.getDevelopContacter()));
         ptService.setMaintainContacer(sm4Util.decrypt(ptService.getMaintainContacer()));
         ptService.setAdName(sm4Util.decrypt(ptService.getAdName()));
@@ -209,6 +221,12 @@ public class PtServiceController extends BaseController {
         service.setStatus("1");
         List<PtService> list = ptServiceMapper.selectAllPublic(ptServicePage.getData());
         list.forEach(p -> {
+            boolean b = p.verifySignature();
+            if (b){
+                log.info("ptService 验签成功");
+            }else {
+                log.error("ptService 验签失败:"+p.toString());
+            }
             p.setDevelopContacter(sm4Util.decrypt(p.getDevelopContacter()));
             p.setMaintainContacer(sm4Util.decrypt(p.getMaintainContacer()));
             p.setAdName(sm4Util.decrypt(p.getAdName()));

+ 34 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/domain/MdAppFlowData.java

@@ -0,0 +1,34 @@
+package com.ruoyi.interfaces.domain;
+
+import com.ruoyi.common.core.domain.BaseEntity;
+import lombok.Data;
+
+import java.util.Date;
+
+
+/**
+ * 应用流程结果
+ */
+@Data
+public class MdAppFlowData extends BaseEntity {
+    /**
+     * id
+     */
+    private String dataId;
+    /**
+     * 名称
+     */
+    private String dataName;
+    /**
+     * 流程id
+     */
+    private Integer appId;
+    /**
+     * 数据文件地址
+     */
+    private String filePath;
+    /**
+     * 存放时间长度(天)
+     */
+    private Integer timeLength;
+}

+ 74 - 57
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/domain/MdModelInfo.java

@@ -416,7 +416,8 @@ public class MdModelInfo extends BaseEntity {
      * 验证数据完整性
      */
     public boolean verifySignature() {
-        return SignUtil.verifySign(
+
+        return  SignUtil.verifySign(dataSignature,
                 mdid,
                 name,
                 enname,
@@ -993,64 +994,80 @@ public class MdModelInfo extends BaseEntity {
         return regUser;
     }
 
+
     @Override
     public String toString() {
-        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
-                .append("mdid", getMdid())
-                .append("name", getName())
-                .append("enname", getEnname())
-                .append("cateid", getCateid())
-                .append("devlang", getDevlang())
-                .append("version", getVersion())
-                .append("intro", getIntro())
-                .append("type", getType())
-                .append("tags", getTags())
-                .append("author", getAuthor())
-                .append("ispublic", getIspublic())
-                .append("isapproved", getIsapproved())
-                .append("status", getStatus())
-                .append("classname", getClassname())
-                .append("mdRunCmd", getMdRunCmd())
-                .append("mdUrl", getMdUrl())
-                .append("mdAuth", getMdAuth())
-                .append("mdHeader", getMdHeader())
-                .append("mdSecret", getMdSecret())
-                .append("mdUnit", getMdUnit())
-                .append("mdContact", getMdContact())
-                .append("devUnit", getDevUnit())
-                .append("devContact", getDevContact())
-                .append("whFlag", getWhFlag())
-                .append("whUrl", getWhUrl())
-                .append("whMethod", getWhMethod())
-                .append("whAuth", getWhAuth())
-                .append("whHeader", getWhHeader())
-                .append("whSecret", getWhSecret())
-                .append("envOs", getEnvOs())
-                .append("evnArmX86", getEvnArmX86())
-                .append("envCpu", getEnvCpu())
-                .append("envGpuType", getEnvGpuType())
-                .append("envGpuNum", getEnvGpuNum())
-                .append("envGpuMem", getEnvGpuMem())
-                .append("envDisk", getEnvDisk())
-                .append("envMem", getEnvMem())
-                .append("deployIp", getDeployIp())
-                .append("deployDir", getDeployDir())
-                .append("deployPort", getDeployPort())
-                .append("deployNote", getDeployNote())
-                .append("mdInName", getMdInName())
-                .append("mdInFile", getMdInFile())
-                .append("mdInNote", getMdInNote())
-                .append("mdOutName", getMdOutName())
-                .append("mdOutFile", getMdOutFile())
-                .append("mdOutNote", getMdOutNote())
-                .append("mirrorImageName", getMirrorImageName())
-                .append("mirrorImageUrl", getMirrorImageUrl())
-                .append("mirrorImageDesc", getMirrorImageDesc())
-                .append("mdAuthUrl", getMdAuthUrl())
-                .append("createby", getCreateby())
-                .append("modifyby", getModifyby())
-                .append("regUser", getRegUser())
-                .toString();
+        return "MdModelInfo{" +
+                "mdid='" + mdid + '\'' +
+                ", name='" + name + '\'' +
+                ", enname='" + enname + '\'' +
+                ", cateid='" + cateid + '\'' +
+                ", devlang='" + devlang + '\'' +
+                ", version='" + version + '\'' +
+                ", intro='" + intro + '\'' +
+                ", type='" + type + '\'' +
+                ", tags='" + tags + '\'' +
+                ", kind='" + kind + '\'' +
+                ", purpose='" + purpose + '\'' +
+                ", israte=" + israte +
+                ", weight=" + weight +
+                ", devkind='" + devkind + '\'' +
+                ", author='" + author + '\'' +
+                ", ispublic=" + ispublic +
+                ", isapproved=" + isapproved +
+                ", status=" + status +
+                ", classname='" + classname + '\'' +
+                ", mdRunCmd='" + mdRunCmd + '\'' +
+                ", mdUrl='" + mdUrl + '\'' +
+                ", mdAuth='" + mdAuth + '\'' +
+                ", mdHeader='" + mdHeader + '\'' +
+                ", mdSecret='" + mdSecret + '\'' +
+                ", mdUnit='" + mdUnit + '\'' +
+                ", mdContact='" + mdContact + '\'' +
+                ", devUnit='" + devUnit + '\'' +
+                ", devContact='" + devContact + '\'' +
+                ", whFlag=" + whFlag +
+                ", whUrl='" + whUrl + '\'' +
+                ", whMethod='" + whMethod + '\'' +
+                ", whAuth='" + whAuth + '\'' +
+                ", whHeader='" + whHeader + '\'' +
+                ", whSecret='" + whSecret + '\'' +
+                ", envOs='" + envOs + '\'' +
+                ", evnArmX86='" + evnArmX86 + '\'' +
+                ", envCpu=" + envCpu +
+                ", envGpuType='" + envGpuType + '\'' +
+                ", envGpuNum=" + envGpuNum +
+                ", envGpuMem=" + envGpuMem +
+                ", envDisk=" + envDisk +
+                ", envMem=" + envMem +
+                ", deployIp='" + deployIp + '\'' +
+                ", deployDir='" + deployDir + '\'' +
+                ", deployPort='" + deployPort + '\'' +
+                ", deployNote='" + deployNote + '\'' +
+                ", mdInName='" + mdInName + '\'' +
+                ", mdInFile='" + mdInFile + '\'' +
+                ", mdInNote='" + mdInNote + '\'' +
+                ", mdOutName='" + mdOutName + '\'' +
+                ", mdOutFile='" + mdOutFile + '\'' +
+                ", mdOutNote='" + mdOutNote + '\'' +
+                ", mirrorImageName='" + mirrorImageName + '\'' +
+                ", mirrorImageUrl='" + mirrorImageUrl + '\'' +
+                ", mirrorImageDesc='" + mirrorImageDesc + '\'' +
+                ", mdAuthUrl='" + mdAuthUrl + '\'' +
+                ", modifyby=" + modifyby +
+                ", createby=" + createby +
+                ", regUser='" + regUser + '\'' +
+                ", sort=" + sort +
+                ", audit='" + audit + '\'' +
+                ", auditBy='" + auditBy + '\'' +
+                ", auditTime=" + auditTime +
+                ", auditRemark='" + auditRemark + '\'' +
+                ", publish='" + publish + '\'' +
+                ", publishBy='" + publishBy + '\'' +
+                ", publishTime=" + publishTime +
+                ", mdFileId=" + mdFileId +
+                ", dataSignature='" + dataSignature + '\'' +
+                '}';
     }
 
     public MdModelInfo(String mdid, String name, String enname, String cateid, String devlang, String version, String intro, String type, String tags, String author, Integer ispublic, Integer isapproved, Integer status, String classname, String mdRunCmd, String mdUrl, String mdAuth, String mdHeader, String mdSecret, String mdUnit, String mdContact, String devUnit, String devContact, Integer whFlag, String whUrl, String whMethod, String whAuth, String whHeader, String whSecret, String envOs, String evnArmX86, Integer envCpu, String envGpuType, Integer envGpuNum, Integer envGpuMem, Integer envDisk, Integer envMem, String deployIp, String deployDir, String deployPort, String deployNote, String mdInName, String mdInFile, String mdInNote, String mdOutName, String mdOutFile, String mdOutNote, String mirrorImageName, String mirrorImageUrl, String mirrorImageDesc, String mdAuthUrl, Date modifyby, Date createby, String regUser) {

+ 1 - 1
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/domain/PtService.java

@@ -171,7 +171,7 @@ public class PtService implements Serializable {
      * 验证数据完整性
      */
     public boolean verifySignature() {
-        return SignUtil.verifySign(
+        return SignUtil.verifySign(dataSignature,
                 srvId,
                 developContacter,
                 maintainContacer,

+ 2 - 1
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/domain/SysMetaDatasource.java

@@ -79,7 +79,7 @@ public class SysMetaDatasource extends BaseEntity
      * 验证数据完整性
      */
     public boolean verifySignature() {
-        return SignUtil.verifySign(
+        return SignUtil.verifySign(dataSignature,
                 String.valueOf(dsCode),
                 String.valueOf(dsType),
                 dsIp,
@@ -206,6 +206,7 @@ public class SysMetaDatasource extends BaseEntity
             .append("dsUser", getDsUser())
             .append("dsPass", getDsPass())
             .append("dsNode", getDsNode())
+                .append("dataSignature", getDataSignature())
             .toString();
     }
 }

+ 15 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/mapper/MdAppMapper.java

@@ -5,6 +5,9 @@ import java.util.List;
 import com.ruoyi.common.annotation.DataSource;
 import com.ruoyi.common.enums.DataSourceType;
 import com.ruoyi.interfaces.domain.MdApp;
+import com.ruoyi.interfaces.domain.MdAppFlowData;
+import com.ruoyi.system.domain.StPptnR;
+import com.ruoyi.system.domain.StStbprpB;
 import org.apache.ibatis.annotations.Mapper;
 
 /**
@@ -64,4 +67,16 @@ public interface MdAppMapper
      * @return 结果
      */
     public int deleteMdAppByAppIds(Long[] appIds);
+
+    public int insertMdAppFlowData(MdAppFlowData mdAppFlowData);
+
+    void importStPptnR(StPptnR stPptnR);
+
+    void importStStbprpB(StStbprpB stStbprpB);
+
+    List<MdAppFlowData> selectMdAppFlowDataList(MdAppFlowData data);
+
+    MdAppFlowData selectMdAppFlowDataById(MdAppFlowData data);
+
+    List<StPptnR> selectStPptnR(StPptnR stPptnR);
 }

+ 7 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/IMdAppService.java

@@ -1,7 +1,10 @@
 package com.ruoyi.interfaces.service;
 
 import java.util.List;
+import java.util.Map;
+
 import com.ruoyi.interfaces.domain.MdApp;
+import com.ruoyi.interfaces.domain.MdAppFlowData;
 
 /**
  * 模型应用Service接口
@@ -58,4 +61,8 @@ public interface IMdAppService
      * @return 结果
      */
     public int deleteMdAppByAppId(Long appId);
+
+    List<MdAppFlowData> selectMdAppFlowDataList(MdAppFlowData data);
+
+    Object getAppData(MdAppFlowData data);
 }

+ 3 - 1
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/impl/MdAppFlowServiceImpl.java

@@ -184,7 +184,9 @@ public class MdAppFlowServiceImpl implements IMdAppFlowService {
             }
         });
 
-        return chain.executeForResult(appFlow.getParams());
+        Map<String, Object> params = appFlow.getParams();
+        params.put("appId",appFlow.getAppId());
+        return chain.executeForResult(params);
     }
 
     @Override

+ 24 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/impl/MdAppServiceImpl.java

@@ -1,8 +1,15 @@
 package com.ruoyi.interfaces.service.impl;
 
+import java.io.File;
+import java.util.Collections;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.file.FileUtils;
+import com.ruoyi.common.utils.json.JSONUtils;
+import com.ruoyi.interfaces.domain.MdAppFlowData;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.interfaces.mapper.MdAppMapper;
@@ -87,4 +94,21 @@ public class MdAppServiceImpl implements IMdAppService {
     public int deleteMdAppByAppId(Long appId) {
         return mdAppMapper.deleteMdAppByAppId(appId);
     }
+
+    @Override
+    public List<MdAppFlowData> selectMdAppFlowDataList(MdAppFlowData data) {
+
+        return mdAppMapper.selectMdAppFlowDataList(data);
+    }
+
+    @Override
+    public Object getAppData(MdAppFlowData data) {
+        MdAppFlowData mdAppFlowData = mdAppMapper.selectMdAppFlowDataById(data);
+        String profilePath = FileUtils.getProfilePath(mdAppFlowData.getFilePath());
+        String jsonString = FileUtils.readJsonFileToString(profilePath);
+        Object o = JSONUtils.parseObject(jsonString, Object.class);
+
+
+        return o;
+    }
 }

+ 18 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/impl/MdModelInfoServiceImpl.java

@@ -4,6 +4,7 @@ import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.SM4Util;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.uuid.IdUtils;
+import com.ruoyi.interfaces.controller.PtServiceController;
 import com.ruoyi.interfaces.domain.MdModelInfo;
 import com.ruoyi.interfaces.domain.PtService;
 import com.ruoyi.interfaces.domain.vo.MdModelSetRelaVo;
@@ -11,6 +12,8 @@ import com.ruoyi.interfaces.mapper.MdModelInfoMapper;
 import com.ruoyi.interfaces.service.IMdModelFileService;
 import com.ruoyi.interfaces.service.IMdModelInfoService;
 import com.ruoyi.interfaces.service.PtServiceService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -24,6 +27,8 @@ import java.util.List;
  */
 @Service
 public class MdModelInfoServiceImpl implements IMdModelInfoService {
+
+    private static final Logger log = LoggerFactory.getLogger(MdModelInfoServiceImpl.class);
     @Autowired
     private MdModelInfoMapper mdModelInfoMapper;
 
@@ -42,7 +47,14 @@ public class MdModelInfoServiceImpl implements IMdModelInfoService {
     @Override
     public MdModelInfo selectMdModelInfoByMdid(String mdid) {
         MdModelInfo mdModelInfo = mdModelInfoMapper.selectMdModelInfoByMdid(mdid);
+
         if (StringUtils.isNotNull(mdModelInfo)) {
+            boolean b = mdModelInfo.verifySignature();
+            if (b){
+                log.info("验签成功");
+            }else {
+                log.error("验签失败:"+mdModelInfo.toString());
+            }
             mdModelInfo.setEnname(sm4Util.decrypt(mdModelInfo.getEnname()));
             mdModelInfo.setMdContact(sm4Util.decrypt(mdModelInfo.getMdContact()));
             mdModelInfo.setDevUnit(sm4Util.decrypt(mdModelInfo.getDevUnit()));
@@ -61,6 +73,12 @@ public class MdModelInfoServiceImpl implements IMdModelInfoService {
     public List<MdModelInfo> selectMdModelInfoList(MdModelInfo mdModelInfo) {
         List<MdModelInfo> mdModelInfos = mdModelInfoMapper.selectMdModelInfoList(mdModelInfo);
         mdModelInfos.forEach(p -> {
+            boolean b = p.verifySignature();
+            if (b){
+                log.info("mdModelInfo 验签成功");
+            }else {
+                log.error("mdModelInfo 验签失败:"+p.toString());
+            }
             p.setEnname(sm4Util.decrypt(p.getEnname()));
             p.setMdContact(sm4Util.decrypt(p.getMdContact()));
             p.setDevUnit(sm4Util.decrypt(p.getDevUnit()));

+ 10 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/impl/PtServiceServiceImpl.java

@@ -15,6 +15,8 @@ import com.ruoyi.interfaces.service.GatewayRoutesService;
 import com.ruoyi.interfaces.service.IMdModelInfoService;
 import com.ruoyi.interfaces.service.PtServiceService;
 import org.apache.commons.collections4.CollectionUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -31,6 +33,8 @@ import java.util.Map;
 @Service
 public class PtServiceServiceImpl extends ServiceImpl<PtServiceMapper, PtService> implements PtServiceService {
 
+    private static final Logger log = LoggerFactory.getLogger(PtServiceServiceImpl.class);
+
     private final PtServiceMapper ptServiceMapper;
 
     private final RedisOperator redisOperator;
@@ -116,6 +120,12 @@ public class PtServiceServiceImpl extends ServiceImpl<PtServiceMapper, PtService
     public MdModelInfoVo modelService(MdModelInfoVo par) {
         MdModelInfoVo mdModelInfoVo = ptServiceMapper.selectModelService(par);
         if (StringUtils.isNotNull(mdModelInfoVo)) {
+            boolean b = mdModelInfoVo.verifySignature();
+            if (b){
+                log.info("mdModelInfoVo 验签成功");
+            }else {
+                log.error("mdModelInfoVo 验签失败:"+mdModelInfoVo.toString());
+            }
             mdModelInfoVo.setMdContact(sm4Util.decrypt(mdModelInfoVo.getMdContact()));
             mdModelInfoVo.setEnname(sm4Util.decrypt(mdModelInfoVo.getEnname()));
             mdModelInfoVo.setDevUnit(sm4Util.decrypt(mdModelInfoVo.getDevUnit()));

+ 2 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/tinyflow/TinyflowUtil.java

@@ -2,6 +2,7 @@ package com.ruoyi.interfaces.tinyflow;
 
 import com.ruoyi.interfaces.tinyflow.parser.PrintNodeParser;
 import com.ruoyi.interfaces.tinyflow.parser.SQLNodeParser;
+import com.ruoyi.interfaces.tinyflow.parser.SaveNodeParser;
 import com.ruoyi.interfaces.tinyflow.parser.ServiceNodeParser;
 import dev.tinyflow.core.Tinyflow;
 
@@ -11,6 +12,7 @@ public class TinyflowUtil {
         tinyflow.getChainParser().addNodeParser("printNode",new PrintNodeParser());
         tinyflow.getChainParser().addNodeParser("serviceNode",new ServiceNodeParser());
         tinyflow.getChainParser().addNodeParser("SQLNodeParser",new SQLNodeParser());
+        tinyflow.getChainParser().addNodeParser("saveNode",new SaveNodeParser());
         return tinyflow;
     }
 }

+ 78 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/tinyflow/node/SaveNode.java

@@ -0,0 +1,78 @@
+package com.ruoyi.interfaces.tinyflow.node;
+
+import com.agentsflex.core.chain.Chain;
+import com.agentsflex.core.chain.Parameter;
+import com.agentsflex.core.chain.node.BaseNode;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.ExceptionUtil;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.file.FileUtils;
+import com.ruoyi.common.utils.json.JSONUtils;
+import com.ruoyi.common.utils.spring.SpringUtils;
+import com.ruoyi.common.utils.uuid.IdUtils;
+import com.ruoyi.interfaces.domain.MdAppFlowData;
+import com.ruoyi.interfaces.mapper.MdAppMapper;
+import com.ruoyi.interfaces.service.GatewayRoutesService;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class SaveNode extends BaseNode {
+
+    private Integer appId;
+
+    public Integer getAppId() {
+        return appId;
+    }
+
+    public void setAppId(Integer appId) {
+        this.appId = appId;
+    }
+
+    @Override
+    protected Map<String, Object> execute(Chain chain) {
+        MdAppMapper mdAppMapper = SpringUtils.getBean(MdAppMapper.class);
+        System.out.println("保存节点");
+        System.out.println("保存节点");
+        System.out.println("保存节点");
+        System.out.println("保存节点");
+        System.out.println("保存节点");
+
+
+        Map<String, Object> map = new HashMap<>();
+
+        Map<String, Object> parameterValues = chain.getParameterValues(this); //获取参数
+
+
+
+        Object data = parameterValues.get("data");
+        Object name = parameterValues.get("name");
+        Integer timeIenth = (Integer)parameterValues.get("timeIenth");
+
+        MdAppFlowData mdAppFlowData = new MdAppFlowData();
+        mdAppFlowData.setDataId(IdUtils.fastUUID());
+        mdAppFlowData.setDataName(name.toString());
+        mdAppFlowData.setAppId(appId);
+        mdAppFlowData.setTimeLength(timeIenth);
+        mdAppFlowData.setCreateTime(DateUtils.getNowDate());
+        if (StringUtils.isNotNull(data)){
+            String json = JSONUtils.toJson(data);
+            try {
+                mdAppFlowData.setFilePath(FileUtils.writeImportBytes(json.getBytes(StandardCharsets.UTF_8), "json"));
+
+            } catch (IOException e) {
+                map.put("code","500");
+                map.put("msg", ExceptionUtil.getExceptionMessage(e));
+                return map;
+            }
+        }
+        mdAppMapper.insertMdAppFlowData(mdAppFlowData);
+        map.put("code","200");
+        map.put("msg","保存成功");
+        return map;
+    }
+}

+ 9 - 1
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/tinyflow/node/ServiceNode.java

@@ -7,8 +7,12 @@ import com.ruoyi.common.config.RuoYiConfig;
 import com.ruoyi.common.utils.JsonUtils;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.http.HttpUtils;
+import com.ruoyi.common.utils.spring.SpringUtils;
+import com.ruoyi.interfaces.domain.GatewayRoutes;
 import com.ruoyi.interfaces.domain.PtService;
 import com.ruoyi.interfaces.domain.PtServiceParam;
+import com.ruoyi.interfaces.service.GatewayRoutesService;
+import org.springframework.beans.factory.annotation.Autowired;
 
 import java.io.IOException;
 import java.util.Collections;
@@ -20,6 +24,7 @@ public class ServiceNode extends BaseNode {
     private PtService ptService;
 
 
+
     public PtService getPtService() {
         return ptService;
     }
@@ -31,8 +36,11 @@ public class ServiceNode extends BaseNode {
     @Override
     protected Map<String, Object> execute(Chain chain) {
 
+        GatewayRoutesService gatewayRoutesService = SpringUtils.getBean(GatewayRoutesService.class);
         Map<String, Object> map = new HashMap<>();
-        String url = RuoYiConfig.getGatewayUrl() + ptService.getProxyPath() + ptService.getUrl();
+        GatewayRoutes gatewayRoutes = gatewayRoutesService.getById(ptService.getGatewayId());
+        String url = RuoYiConfig.getGatewayUrl() + gatewayRoutes.getPredicates() + ptService.getUrl();
+        //String url = RuoYiConfig.getGatewayUrl() + ptService.getProxyPath() + ptService.getUrl();
         System.out.println("url:" + url);
         Map<String, Object> parameterValues = chain.getParameterValues(this); //获取参数
         List<PtServiceParam> params = ptService.getParams();

+ 22 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/tinyflow/parser/SaveNodeParser.java

@@ -0,0 +1,22 @@
+package com.ruoyi.interfaces.tinyflow.parser;
+
+import com.agentsflex.core.chain.node.BaseNode;
+import com.alibaba.fastjson.JSONObject;
+import com.ruoyi.interfaces.domain.PtService;
+import com.ruoyi.interfaces.tinyflow.node.SaveNode;
+import dev.tinyflow.core.Tinyflow;
+import dev.tinyflow.core.parser.BaseNodeParser;
+
+public class SaveNodeParser  extends BaseNodeParser {
+    @Override
+    protected BaseNode doParse(JSONObject root, JSONObject data, Tinyflow tinyflow) {
+        SaveNode saveNode = new SaveNode();
+        if (data != null) {
+           saveNode.setId(data.getString("id"));
+           saveNode.setName(data.getString("name"));
+           saveNode.setDescription(data.getString("description"));
+           saveNode.setAppId(data.getObject("appId", Integer.class));
+        }
+        return saveNode;
+    }
+}

+ 2 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/tinyflow/parser/ServiceNodeParser.java

@@ -3,6 +3,7 @@ package com.ruoyi.interfaces.tinyflow.parser;
 import com.agentsflex.core.chain.node.BaseNode;
 import com.alibaba.fastjson.JSONObject;
 import com.ruoyi.interfaces.domain.PtService;
+import com.ruoyi.interfaces.service.GatewayRoutesService;
 import com.ruoyi.interfaces.tinyflow.node.ServiceNode;
 import dev.tinyflow.core.Tinyflow;
 import dev.tinyflow.core.parser.BaseNodeParser;
@@ -16,6 +17,7 @@ public class ServiceNodeParser extends BaseNodeParser {
             serviceNode.setName(data.getString("name"));
             serviceNode.setDescription(data.getString("description"));
             serviceNode.setPtService(data.getObject("service", PtService.class));
+            //serviceNode.setGatewayRoutesService(data.getObject("gatewayRoutesService", GatewayRoutesService.class));
         }
         return serviceNode;
     }

+ 133 - 0
ruoyi-api-patform/src/main/resources/mapper/interfaces/MdAppMapper.xml

@@ -34,6 +34,42 @@
         <include refid="selectMdAppVo"/>
         where APP_ID = #{appId}
     </select>
+    <select id="selectMdAppFlowDataList" resultType="com.ruoyi.interfaces.domain.MdAppFlowData">
+        select DATA_ID,
+        DATA_NAME,
+                   APP_ID,
+            CREATE_TIME,
+            FILE_PATH,
+            TIME_LENGTH
+        from MD_APP_FLOW_DATA
+        <where>
+            <if test="appId != null  and appId != ''"> and APP_ID = #{appId}</if>
+        </where>
+        order by CREATE_TIME desc
+    </select>
+    <select id="selectMdAppFlowDataById" resultType="com.ruoyi.interfaces.domain.MdAppFlowData">
+        select DATA_ID,
+               DATA_NAME,
+               APP_ID,
+               CREATE_TIME,
+               FILE_PATH,
+               TIME_LENGTH
+        from MD_APP_FLOW_DATA
+        where DATA_ID = #{dataId}
+    </select>
+    <select id="selectStPptnR" resultType="com.ruoyi.system.domain.StPptnR">
+        select t.stcd,
+               t.drp,
+               s.lgtd,
+               s.lttd
+        from (select stcd, sum(drp) drp
+              from st_pptn_r
+              where tm &gt;= #{beginTm}
+                and tm &lt;= #{endTm}
+                AND drp IS NOT null
+              group by stcd) t
+                 LEFT JOIN st_stbprp_b s ON t.stcd = s.stcd
+    </select>
 
     <insert id="insertMdApp" parameterType="com.ruoyi.interfaces.domain.MdApp" useGeneratedKeys="true" keyProperty="appId">
         insert into md_app
@@ -54,6 +90,103 @@
             <if test="createTime != null">#{createTime},</if>
         </trim>
     </insert>
+    <insert id="insertMdAppFlowData">
+        insert into MD_APP_FLOW_DATA
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="dataId != null ">DATA_ID,</if>
+            <if test="dataName != null ">DATA_NAME,</if>
+            <if test="appId != null ">APP_ID,</if>
+            <if test="createTime != null ">CREATE_TIME,</if>
+            <if test="filePath != null ">FILE_PATH,</if>
+            <if test="timeLength != null ">TIME_LENGTH,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="dataId != null">#{dataId},</if>
+            <if test="dataName != null">#{dataName},</if>
+            <if test="appId != null">#{appId},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="filePath != null">#{filePath},</if>
+            <if test="timeLength != null">#{timeLength},</if>
+        </trim>
+    </insert>
+    <insert id="importStPptnR">
+        INSERT into st_Pptn_r
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            stcd,
+            tm,
+            drp,
+            intv,
+            pdr,
+            dyp,
+            wth,
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            #{stcd,jdbcType=VARCHAR} ,
+            #{tm,jdbcType=TIMESTAMP} ,
+            #{drp,jdbcType=DOUBLE} ,
+            #{intv,jdbcType=DOUBLE} ,
+            #{pdr,jdbcType=DOUBLE} ,
+            #{dyp,jdbcType=DOUBLE} ,
+            #{wth,jdbcType=VARCHAR} ,
+        </trim>
+    </insert>
+    <insert id="importStStbprpB">
+        insert into st_stbprp_b
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="stcd != null and stcd != ''">stcd,</if>
+            <if test="stnm != null">stnm,</if>
+            <if test="rvnm != null">rvnm,</if>
+            <if test="hnnm != null">hnnm,</if>
+            <if test="bsnm != null">bsnm,</if>
+            <if test="lgtd != null">lgtd,</if>
+            <if test="lttd != null">lttd,</if>
+            <if test="stlc != null">stlc,</if>
+            <if test="addvcd != null">addvcd,</if>
+            <if test="dtmnm != null">dtmnm,</if>
+            <if test="dtmel != null">dtmel,</if>
+            <if test="dtpr != null">dtpr,</if>
+            <if test="sttp != null">sttp,</if>
+            <if test="esstym != null">esstym,</if>
+            <if test="bgfrym != null">bgfrym,</if>
+            <if test="atcunit != null">atcunit,</if>
+            <if test="stbk != null">stbk,</if>
+            <if test="stazt != null">stazt,</if>
+            <if test="dstrvm != null">dstrvm,</if>
+            <if test="drna != null">drna,</if>
+            <if test="phcd != null">phcd,</if>
+            <if test="usfl != null">usfl,</if>
+            <if test="comments != null">comments,</if>
+            <if test="moditime != null">moditime,</if>
+            <if test="locality != null and locality != ''">locality,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="stcd != null and stcd != ''">#{stcd},</if>
+            <if test="stnm != null">#{stnm},</if>
+            <if test="rvnm != null">#{rvnm},</if>
+            <if test="hnnm != null">#{hnnm},</if>
+            <if test="bsnm != null">#{bsnm},</if>
+            <if test="lgtd != null">#{lgtd},</if>
+            <if test="lttd != null">#{lttd},</if>
+            <if test="stlc != null">#{stlc},</if>
+            <if test="addvcd != null">#{addvcd},</if>
+            <if test="dtmnm != null">#{dtmnm},</if>
+            <if test="dtmel != null">#{dtmel},</if>
+            <if test="dtpr != null">#{dtpr},</if>
+            <if test="sttp != null">#{sttp},</if>
+            <if test="esstym != null">#{esstym},</if>
+            <if test="bgfrym != null">#{bgfrym},</if>
+            <if test="atcunit != null">#{atcunit},</if>
+            <if test="stbk != null">#{stbk},</if>
+            <if test="stazt != null">#{stazt},</if>
+            <if test="dstrvm != null">#{dstrvm},</if>
+            <if test="drna != null">#{drna},</if>
+            <if test="phcd != null">#{phcd},</if>
+            <if test="usfl != null">#{usfl},</if>
+            <if test="comments != null">#{comments},</if>
+            <if test="moditime != null">#{moditime},</if>
+            <if test="locality != null and locality != ''">#{locality},</if>
+        </trim>
+    </insert>
 
     <update id="updateMdApp" parameterType="com.ruoyi.interfaces.domain.MdApp">
         update md_app

+ 3 - 1
ruoyi-api-patform/src/main/resources/mapper/interfaces/MdModelInfoMapper.xml

@@ -73,6 +73,7 @@
         <result property="publishBy" column="PUBLISH_BY"/>
         <result property="publishTime" column="PUBLISH_TIME"/>
         <result property="mdFileId" column="md_File_Id"/>
+        <result property="dataSignature" column="data_Signature"/>
     </resultMap>
 
     <sql id="selectMdModelInfoVo">
@@ -144,6 +145,7 @@
                PUBLISH_BY,
                PUBLISH_TIME
                    ,md_File_Id
+        ,data_Signature
         from md_model_info
     </sql>
 
@@ -308,7 +310,7 @@
             <if test="regUser != null">REG_USER,</if>
             <if test="sort != null">SORT,</if>
             <if test="audit != null">"AUDIT",</if>
-            <if test="dataSignature != null">dataSignature,</if>
+            <if test="dataSignature != null">data_Signature,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="mdid != null">#{mdid},</if>

+ 9 - 7
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java

@@ -63,6 +63,12 @@ public class SysDept extends BaseEntity
      */
     private String dataSignature;
 
+    /**
+     * 自动设置签名
+     */
+    public void sign() {
+        this.dataSignature = generateSignature();
+    }
     /**
      * 生成数据签名 - 自定义哪些字段参与签名
      */
@@ -80,7 +86,7 @@ public class SysDept extends BaseEntity
      * 验证数据完整性
      */
     public boolean verifySignature() {
-        return SignUtil.verifySign(
+        return SignUtil.verifySign(dataSignature,
                 String.valueOf(deptId),
                 String.valueOf(parentId),
                 phone,
@@ -88,12 +94,7 @@ public class SysDept extends BaseEntity
         );
     }
 
-    /**
-     * 自动设置签名
-     */
-    public void sign() {
-        this.dataSignature = generateSignature();
-    }
+
 
     public String getDataSignature() {
         return dataSignature;
@@ -246,6 +247,7 @@ public class SysDept extends BaseEntity
             .append("createTime", getCreateTime())
             .append("updateBy", getUpdateBy())
             .append("updateTime", getUpdateTime())
+                .append("dataSignature", getDataSignature())
             .toString();
     }
 }

+ 2 - 1
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java

@@ -88,7 +88,7 @@ public class SysRole extends BaseEntity
      * 验证数据完整性
      */
     public boolean verifySignature() {
-        return SignUtil.verifySign(
+        return SignUtil.verifySign(dataSignature,
                 String.valueOf(roleId),
                 String.valueOf(roleKey),
                 dataScope
@@ -283,6 +283,7 @@ public class SysRole extends BaseEntity
             .append("updateBy", getUpdateBy())
             .append("updateTime", getUpdateTime())
             .append("remark", getRemark())
+                .append("dataSignature", getDataSignature())
             .toString();
     }
 }

+ 6 - 1
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java

@@ -112,6 +112,8 @@ public class SysUser extends BaseEntity
         return SignUtil.generateSign(
                 String.valueOf(deptId),
                 String.valueOf(userId),
+                userName,
+                password,
                 phonenumber,
                 email
         );
@@ -121,9 +123,11 @@ public class SysUser extends BaseEntity
      * 验证数据完整性
      */
     public boolean verifySignature() {
-        return SignUtil.verifySign(
+        return SignUtil.verifySign(dataSignature,
                 String.valueOf(deptId),
                 String.valueOf(userId),
+                userName,
+                password,
                 phonenumber,
                 email
         );
@@ -385,6 +389,7 @@ public class SysUser extends BaseEntity
             .append("updateTime", getUpdateTime())
             .append("remark", getRemark())
             .append("dept", getDept())
+            .append("dataSignature", getDataSignature())
             .toString();
     }
 }

+ 1 - 1
ruoyi-common/src/main/java/com/ruoyi/common/utils/SecurityUtils.java

@@ -95,7 +95,7 @@ public class SecurityUtils
     private static final String SM3_SECRET = "your-sm3-secret-key";
 
     /**
-     * 生成BCryptPasswordEncoder密码
+     * 生成密码
      *
      * @param password 密码
      * @return 加密字符串

+ 42 - 0
ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUtils.java

@@ -9,6 +9,8 @@ import java.io.OutputStream;
 import java.io.UnsupportedEncodingException;
 import java.net.URLEncoder;
 import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
@@ -67,6 +69,32 @@ public class FileUtils {
         return writeBytes(data, RuoYiConfig.getImportPath());
     }
 
+    public static String writeImportBytes(byte[] data,String extension) throws IOException {
+        return writeBytes(data,extension, RuoYiConfig.getImportPath());
+    }
+    /**
+     * 写数据到文件中
+     *
+     * @param data      数据
+     * @param uploadDir 目标文件
+     * @return 目标文件
+     * @throws IOException IO异常
+     */
+    public static String writeBytes(byte[] data,String extension, String uploadDir) throws IOException {
+        FileOutputStream fos = null;
+        String pathName = "";
+        try {
+            pathName = DateUtils.datePath() + "/" + IdUtils.fastUUID() + "." + extension;
+            File file = FileUploadUtils.getAbsoluteFile(uploadDir, pathName);
+            fos = new FileOutputStream(file);
+            fos.write(data);
+        } finally {
+            IOUtils.close(fos);
+        }
+        return FileUploadUtils.getPathFileName(uploadDir, pathName);
+    }
+
+
     /**
      * 写数据到文件中
      *
@@ -256,4 +284,18 @@ public class FileUtils {
     public static String getProfilePath(String filePath) {
         return RuoYiConfig.getProfile() + filePath.replace("/profile", "");
     }
+
+    /**
+     * 获取json文件中的数据
+     * @param filePath
+     * @return
+     */
+    public static String readJsonFileToString(String filePath){
+        try {
+            return new String(Files.readAllBytes(Paths.get(filePath)), StandardCharsets.UTF_8);
+        } catch (IOException e) {
+            return null;
+        }
+    }
+
 }

+ 3 - 6
ruoyi-common/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java

@@ -335,16 +335,13 @@ public class HttpUtils {
     }
 
     public static HashMap<String, String> sendBodyPost(String url, Object body, HashMap<String, String> headers) throws IOException {
-        log.info("post方法, url=" + url );
-        log.info("post方法, url=" + url );
-        log.info("post方法, url=" + url );
-        log.info("post方法, url=" + url );
-        log.info("post方法, url=" + url );
-        log.info("post方法, url=" + url );
         log.info("post方法, url=" + url );
         log.info("post方法, url=" + url );
         log.info("post方法, url=" + url );
         String bodyJson = JsonUtils.objectToJson(body);
+        log.info("post方法, body=" + bodyJson );
+        log.info("post方法, body=" + bodyJson );
+        log.info("post方法, body=" + bodyJson );
         return sendBodyPostTest(url, bodyJson, headers);
     }
 

+ 1 - 1
ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java

@@ -146,7 +146,7 @@ public class SecurityConfig {
                 .authorizeHttpRequests((requests) -> {
                     permitAllUrl.getUrls().forEach(url -> requests.antMatchers(url).permitAll());
                     // 对于登录login 注册register 验证码captchaImage 允许匿名访问
-                    requests.antMatchers("/login", "/register", "/captchaImage").permitAll()
+                    requests.antMatchers("/login", "/register", "/captchaImage","/sh-api/**").permitAll()
                             // 静态资源,可匿名访问
                             .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
                             .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()

+ 215 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/StPptnR.java

@@ -0,0 +1,215 @@
+package com.ruoyi.system.domain;
+
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+
+import java.util.Date;
+import java.util.Objects;
+
+/**
+ * ST_PPTN_R 实时雨量数据表
+ */
+public class StPptnR {
+    /**
+     * 测站编码
+     */
+    @Excel(name = "测站编码")
+    private String stcd;
+    @Excel(name = "测站名称")
+    private String stnm;
+    /**
+     * 时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date tm;
+    /**
+     * 时段降雨量
+     */
+    @Excel(name = "时段降雨量")
+    private Double drp;
+    /**
+     * 时段长
+     */
+    @Excel(name = "时段长")
+    private Double intv;
+    /**
+     * 降水历时
+     */
+    @Excel(name = "降水历时")
+    private Double pdr;
+    /**
+     * 日降水量
+     */
+    @Excel(name = "日降水量")
+    private Double dyp;
+    /**
+     * 天气状况
+     */
+    @Excel(name = "天气状况")
+    private String wth;
+
+    /**
+     * 月时间
+     */
+    private String tmy;
+
+    /**
+     * 经度
+     */
+    private Double lgtd;
+    /**
+     * 维度
+     */
+    private Double lttd;
+
+    @Excel(name = "时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date beginTm;
+    @Excel(name = "时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date endTm;
+
+    public Date getEndTm() {
+        return endTm;
+    }
+
+    public void setEndTm(Date endTm) {
+        this.endTm = endTm;
+    }
+
+    public Date getBeginTm() {
+        return beginTm;
+    }
+
+    public void setBeginTm(Date beginTm) {
+        this.beginTm = beginTm;
+    }
+
+    public Double getLttd() {
+        return lttd;
+    }
+
+    public void setLttd(Double lttd) {
+        this.lttd = lttd;
+    }
+
+    public Double getLgtd() {
+        return lgtd;
+    }
+
+    public void setLgtd(Double lgtd) {
+        this.lgtd = lgtd;
+    }
+
+    @Override
+    public String toString() {
+        return "StPptnR{" +
+                "stcd='" + stcd + '\'' +
+                ", tm=" + tm +
+                ", drp=" + drp +
+                ", intv=" + intv +
+                ", pdr=" + pdr +
+                ", dyp=" + dyp +
+                ", wth='" + wth + '\'' +
+                ", tmy='" + tmy + '\'' +
+                '}';
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof StPptnR)) return false;
+        StPptnR stPptnR = (StPptnR) o;
+        return Objects.equals(getStcd(), stPptnR.getStcd()) && Objects.equals(getTm(), stPptnR.getTm()) && Objects.equals(getDrp(), stPptnR.getDrp()) && Objects.equals(getIntv(), stPptnR.getIntv()) && Objects.equals(getPdr(), stPptnR.getPdr()) && Objects.equals(getDyp(), stPptnR.getDyp()) && Objects.equals(getWth(), stPptnR.getWth());
+    }
+
+    public String getStnm() {
+        return stnm;
+    }
+
+    public void setStnm(String stnm) {
+        this.stnm = stnm;
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(getStcd(), getTm(), getDrp(), getIntv(), getPdr(), getDyp(), getWth());
+    }
+
+    public String getTmy() {
+        return tmy;
+    }
+
+    public void setTmy(String tmy) {
+        this.tmy = tmy;
+    }
+
+    public String getStcd() {
+        return stcd;
+    }
+
+    public void setStcd(String stcd) {
+        this.stcd = stcd;
+    }
+
+    public Date getTm() {
+        return tm;
+    }
+
+    public void setTm(Date tm) {
+        this.tm = tm;
+    }
+
+    public Double getDrp() {
+        return drp;
+    }
+
+    public void setDrp(Double drp) {
+        this.drp = drp;
+    }
+
+    public Double getIntv() {
+        return intv;
+    }
+
+    public void setIntv(Double intv) {
+        this.intv = intv;
+    }
+
+    public Double getPdr() {
+        return pdr;
+    }
+
+    public void setPdr(Double pdr) {
+        this.pdr = pdr;
+    }
+
+    public Double getDyp() {
+        return dyp;
+    }
+
+    public void setDyp(Double dyp) {
+        this.dyp = dyp;
+    }
+
+    public String getWth() {
+        return wth;
+    }
+
+    public void setWth(String wth) {
+        this.wth = wth;
+    }
+
+    public StPptnR(String stcd, Date tm, Double drp, Double intv, Double pdr, Double dyp, String wth) {
+        this.stcd = stcd;
+        this.tm = tm;
+        this.drp = drp;
+        this.intv = intv;
+        this.pdr = pdr;
+        this.dyp = dyp;
+        this.wth = wth;
+    }
+
+    public StPptnR() {
+    }
+}

+ 548 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/StStbprpB.java

@@ -0,0 +1,548 @@
+package com.ruoyi.system.domain;
+
+import java.util.Date;
+import java.util.List;
+
+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;
+
+/**
+ * 【请填写功能名称】对象 st_stbprp_b
+ *
+ * @author ruoyi
+ * @date 2021-12-02
+ */
+public class StStbprpB extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    private String repairReportId;
+
+    /**
+     * 测站编码
+     */
+    @Excel(name = "测站编码")
+    private String stcd;
+
+    /**
+     * 测站名称
+     */
+    @Excel(name = "测站名称")
+    private String stnm;
+
+
+    /**
+     * 报汛系统中  信息管理部门
+     */
+    private String unitcodenm;
+
+
+    /**
+     * 河流名称
+     */
+    @Excel(name = "河流名称")
+    private String rvnm;
+
+    /**
+     * 水系名称
+     */
+    @Excel(name = "水系名称")
+    private String hnnm;
+
+    /**
+     * 流域名称
+     */
+    @Excel(name = "流域名称")
+    private String bsnm;
+
+    /**
+     * 经度
+     */
+    @Excel(name = "经度")
+    private Double lgtd;
+
+    /**
+     * 纬度
+     */
+    @Excel(name = "纬度")
+    private Double lttd;
+
+    /**
+     * 站址
+     */
+    @Excel(name = "站址")
+    private String stlc;
+
+    /**
+     * 行政区划代码
+     */
+    @Excel(name = "行政区划代码")
+    private String addvcd;
+
+    /**
+     * 基面名称
+     */
+    @Excel(name = "基面名称")
+    private String dtmnm;
+
+    /**
+     * 基面高程
+     */
+    @Excel(name = "基面高程")
+    private Double dtmel;
+
+    /**
+     * 基面修正值
+     */
+    @Excel(name = "基面修正值")
+    private Double dtpr;
+
+    /**
+     * 站类
+     */
+    @Excel(name = "站类")
+    private String sttp;
+    private String sttpnm;
+
+    /**
+     * 报讯等级
+     */
+    @Excel(name = "报讯等级")
+    private String frgrd;
+    /**
+     * 建站年月
+     */
+    @Excel(name = "建站年月")
+    private String esstym;
+
+    /**
+     * 始报年月
+     */
+    @Excel(name = "始报年月")
+    private String bgfrym;
+
+    /**
+     * 隶属行业单位
+     */
+    @Excel(name = "隶属行业单位")
+    private String atcunit;
+
+
+    /**
+     * 报汛系统中  信息管理部门代码
+     */
+    @Excel(name = "信息管理单位",dictType="ot_Report_assignment_unit")
+    private String unitcode;
+
+
+    /**
+     * 信息管理单位 《系统中未采用》
+     */
+    //@Excel(name = "信息管理单位")
+    private String admauth;
+
+    /**
+     * 测站案别
+     */
+    @Excel(name = "测站案别")
+    private String stbk;
+
+    /**
+     * 测站方位
+     */
+    @Excel(name = "测站方位")
+    private Long stazt;
+
+    /**
+     * 至河口距离
+     */
+    @Excel(name = "至河口距离")
+    private Double dstrvm;
+
+    /**
+     * 集水面积
+     */
+    @Excel(name = "集水面积")
+    private Long drna;
+
+    /**
+     * 拼音码
+     */
+    @Excel(name = "拼音码")
+    private String phcd;
+
+    /**
+     * 启用标志
+     */
+    @Excel(name = "启用标志")
+    private String usfl;
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    private String comments;
+
+    /**
+     * 时间戳
+     */
+    @Excel(name = "时间戳",dateFormat="yyyy-MM-dd HH:mm:ss")
+    private Date moditime;
+
+    /**
+     * 交换管理单位 《系统中没有采用》
+     */
+    //@Excel(name = "交换管理单位")
+    private String locality;
+
+    /**
+     * 报汛系统中  交换管理部门代码
+     */
+    //@Excel(name = "交换管理信息",dictType="SYS_DEPT")
+    private Long admauthcode;
+
+    /**
+     * 导入导出交换管理信息字典使用
+     */
+    @Excel(name = "交换管理信息",dictType="SYS_DEPT")
+    private String admauthcodeDict;
+
+
+    /**
+     * ----------------查询新增参数
+     */
+    private String teamId;
+    /**
+     * ----------------查询新增参数\
+     * 报汛等级
+     */
+    private String dengJi;
+
+    public String getAdmauthcodeDict() {
+        return admauthcodeDict;
+    }
+
+    public void setAdmauthcodeDict(String admauthcodeDict) {
+        this.admauthcodeDict = admauthcodeDict;
+    }
+
+    public String getRepairReportId() {
+        return repairReportId;
+    }
+
+    public void setRepairReportId(String repairReportId) {
+        this.repairReportId = repairReportId;
+    }
+
+    public String getDengJi() {
+        return dengJi;
+    }
+
+    public void setDengJi(String dengJi) {
+        this.dengJi = dengJi;
+    }
+
+    public String getTeamId() {
+        return teamId;
+    }
+
+    public void setTeamId(String teamId) {
+        this.teamId = teamId;
+    }
+
+
+    public String getUnitcode() {
+        return unitcode;
+    }
+
+    public void setUnitcode(String unitcode) {
+        this.unitcode = unitcode;
+    }
+
+    public String getUnitcodenm() {
+        return unitcodenm;
+    }
+
+    public void setUnitcodenm(String unitcodenm) {
+        this.unitcodenm = unitcodenm;
+    }
+
+    public Long getAdmauthcode() {
+        return admauthcode;
+    }
+
+    public void setAdmauthcode(Long admauthcode) {
+        this.admauthcode = admauthcode;
+    }
+
+    public static long getSerialVersionUID() {
+        return serialVersionUID;
+    }
+
+    public String getSttpnm() {
+        return sttpnm;
+    }
+
+    public void setSttpnm(String sttpnm) {
+        this.sttpnm = sttpnm;
+    }
+
+    public void setStcd(String stcd) {
+        this.stcd = stcd;
+    }
+
+    public String getStcd() {
+        return stcd;
+    }
+
+    public void setStnm(String stnm) {
+        this.stnm = stnm;
+    }
+
+    public String getStnm() {
+        return stnm;
+    }
+
+    public void setRvnm(String rvnm) {
+        this.rvnm = rvnm;
+    }
+
+    public String getRvnm() {
+        return rvnm;
+    }
+
+    public void setHnnm(String hnnm) {
+        this.hnnm = hnnm;
+    }
+
+    public String getHnnm() {
+        return hnnm;
+    }
+
+    public void setBsnm(String bsnm) {
+        this.bsnm = bsnm;
+    }
+
+    public String getBsnm() {
+        return bsnm;
+    }
+
+    public void setLgtd(Double lgtd) {
+        this.lgtd = lgtd;
+    }
+
+    public Double getLgtd() {
+        return lgtd;
+    }
+
+    public void setLttd(Double lttd) {
+        this.lttd = lttd;
+    }
+
+    public Double getLttd() {
+        return lttd;
+    }
+
+    public void setStlc(String stlc) {
+        this.stlc = stlc;
+    }
+
+    public String getStlc() {
+        return stlc;
+    }
+
+    public void setAddvcd(String addvcd) {
+        this.addvcd = addvcd;
+    }
+
+    public String getAddvcd() {
+        return addvcd;
+    }
+
+    public void setDtmnm(String dtmnm) {
+        this.dtmnm = dtmnm;
+    }
+
+    public String getDtmnm() {
+        return dtmnm;
+    }
+
+    public void setDtmel(Double dtmel) {
+        this.dtmel = dtmel;
+    }
+
+    public Double getDtmel() {
+        return dtmel;
+    }
+
+    public void setDtpr(Double dtpr) {
+        this.dtpr = dtpr;
+    }
+
+    public Double getDtpr() {
+        return dtpr;
+    }
+
+    public void setSttp(String sttp) {
+        this.sttp = sttp;
+    }
+
+    public String getSttp() {
+        return sttp;
+    }
+
+    public String getFrgrd() {
+        return frgrd;
+    }
+
+    public void setFrgrd(String frgrd) {
+        this.frgrd = frgrd;
+    }
+
+    public void setEsstym(String esstym) {
+        this.esstym = esstym;
+    }
+
+    public String getEsstym() {
+        return esstym;
+    }
+
+    public void setBgfrym(String bgfrym) {
+        this.bgfrym = bgfrym;
+    }
+
+    public String getBgfrym() {
+        return bgfrym;
+    }
+
+    public void setAtcunit(String atcunit) {
+        this.atcunit = atcunit;
+    }
+
+    public String getAtcunit() {
+        return atcunit;
+    }
+
+    public void setAdmauth(String admauth) {
+        this.admauth = admauth;
+    }
+
+    public String getAdmauth() {
+        return admauth;
+    }
+
+    public void setStbk(String stbk) {
+        this.stbk = stbk;
+    }
+
+    public String getStbk() {
+        return stbk;
+    }
+
+    public void setStazt(Long stazt) {
+        this.stazt = stazt;
+    }
+
+    public Long getStazt() {
+        return stazt;
+    }
+
+    public void setDstrvm(Double dstrvm) {
+        this.dstrvm = dstrvm;
+    }
+
+    public Double getDstrvm() {
+        return dstrvm;
+    }
+
+    public void setDrna(Long drna) {
+        this.drna = drna;
+    }
+
+    public Long getDrna() {
+        return drna;
+    }
+
+    public void setPhcd(String phcd) {
+        this.phcd = phcd;
+    }
+
+    public String getPhcd() {
+        return phcd;
+    }
+
+    public void setUsfl(String usfl) {
+        this.usfl = usfl;
+    }
+
+    public String getUsfl() {
+        return usfl;
+    }
+
+    public void setComments(String comments) {
+        this.comments = comments;
+    }
+
+    public String getComments() {
+        return comments;
+    }
+
+    public void setModitime(Date moditime) {
+        this.moditime = moditime;
+    }
+
+    public Date getModitime() {
+        return moditime;
+    }
+
+    public void setLocality(String locality) {
+        this.locality = locality;
+    }
+
+    public String getLocality() {
+        return locality;
+    }
+
+    @Override
+    public String toString() {
+        return "StStbprpB{" +
+                "repairReportId='" + repairReportId + '\'' +
+                ", stcd='" + stcd + '\'' +
+                ", stnm='" + stnm + '\'' +
+                ", unitcodenm='" + unitcodenm + '\'' +
+                ", rvnm='" + rvnm + '\'' +
+                ", hnnm='" + hnnm + '\'' +
+                ", bsnm='" + bsnm + '\'' +
+                ", lgtd=" + lgtd +
+                ", lttd=" + lttd +
+                ", stlc='" + stlc + '\'' +
+                ", addvcd='" + addvcd + '\'' +
+                ", dtmnm='" + dtmnm + '\'' +
+                ", dtmel=" + dtmel +
+                ", dtpr=" + dtpr +
+                ", sttp='" + sttp + '\'' +
+                ", sttpnm='" + sttpnm + '\'' +
+                ", frgrd='" + frgrd + '\'' +
+                ", esstym='" + esstym + '\'' +
+                ", bgfrym='" + bgfrym + '\'' +
+                ", atcunit='" + atcunit + '\'' +
+                ", unitcode='" + unitcode + '\'' +
+                ", admauth='" + admauth + '\'' +
+                ", stbk='" + stbk + '\'' +
+                ", stazt=" + stazt +
+                ", dstrvm=" + dstrvm +
+                ", drna=" + drna +
+                ", phcd='" + phcd + '\'' +
+                ", usfl='" + usfl + '\'' +
+                ", comments='" + comments + '\'' +
+                ", moditime=" + moditime +
+                ", locality='" + locality + '\'' +
+                ", admauthcode=" + admauthcode +
+                ", admauthcodeDict='" + admauthcodeDict + '\'' +
+                ", teamId='" + teamId + '\'' +
+                ", dengJi='" + dengJi + '\'' +
+                '}';
+    }
+}

+ 16 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java

@@ -6,6 +6,8 @@ import java.util.List;
 import java.util.stream.Collectors;
 
 import com.ruoyi.common.utils.SM4Util;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.common.annotation.DataScope;
@@ -30,6 +32,8 @@ import com.ruoyi.system.service.ISysDeptService;
  */
 @Service
 public class SysDeptServiceImpl implements ISysDeptService {
+
+    private static final Logger log = LoggerFactory.getLogger(SysDeptServiceImpl.class);
     @Autowired
     private SysDeptMapper deptMapper;
 
@@ -50,6 +54,12 @@ public class SysDeptServiceImpl implements ISysDeptService {
     public List<SysDept> selectDeptList(SysDept dept) {
         List<SysDept> sysDepts = deptMapper.selectDeptList(dept);
         sysDepts.forEach(p -> {
+            boolean b = p.verifySignature();
+            if (b){
+                log.info("SysDept 验签成功");
+            }else {
+                log.error("SysDept 验签失败:"+p.toString());
+            }
             p.setPhone(sm4Util.decrypt(p.getPhone()));
 
         });
@@ -125,6 +135,12 @@ public class SysDeptServiceImpl implements ISysDeptService {
     @Override
     public SysDept selectDeptById(Long deptId) {
         SysDept sysDept = deptMapper.selectDeptById(deptId);
+        boolean b = sysDept.verifySignature();
+        if (b){
+            log.info("SysDept 验签成功");
+        }else {
+            log.error("SysDept 验签失败:"+sysDept.toString());
+        }
         sysDept.setPhone(sm4Util.decrypt(sysDept.getPhone()));
         return sysDept;
     }

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

@@ -7,6 +7,8 @@ import java.util.List;
 import java.util.Set;
 
 import com.ruoyi.common.utils.SM4Util;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -34,6 +36,7 @@ import com.ruoyi.system.service.ISysRoleService;
  */
 @Service
 public class SysRoleServiceImpl implements ISysRoleService {
+    private static final Logger log = LoggerFactory.getLogger(SysRoleServiceImpl.class);
     @Autowired
     private SysRoleMapper roleMapper;
 
@@ -61,6 +64,12 @@ public class SysRoleServiceImpl implements ISysRoleService {
     public List<SysRole> selectRoleList(SysRole role) {
         List<SysRole> sysRoles = roleMapper.selectRoleList(role);
         sysRoles.forEach(p -> {
+            boolean b = p.verifySignature();
+            if (b){
+                log.info("SysRole 验签成功");
+            }else {
+                log.error("SysRole 验签失败:"+p.toString());
+            }
             p.setRoleKey(sm4Util.decrypt(p.getRoleKey()));
         });
         return sysRoles;
@@ -76,6 +85,12 @@ public class SysRoleServiceImpl implements ISysRoleService {
     public List<SysRole> selectRolesByUserId(Long userId) {
         List<SysRole> userRoles = roleMapper.selectRolePermissionByUserId(userId);
         userRoles.forEach(p -> {
+            boolean b = p.verifySignature();
+            if (b){
+                log.info("SysRole 验签成功");
+            }else {
+                log.error("SysRole 验签失败:"+p.toString());
+            }
             p.setRoleKey(sm4Util.decrypt(p.getRoleKey()));
         });
         List<SysRole> roles = selectRoleAll();
@@ -100,6 +115,12 @@ public class SysRoleServiceImpl implements ISysRoleService {
     public Set<String> selectRolePermissionByUserId(Long userId) {
         List<SysRole> perms = roleMapper.selectRolePermissionByUserId(userId);
         perms.forEach(p -> {
+            boolean b = p.verifySignature();
+            if (b){
+                log.info("SysRole 验签成功");
+            }else {
+                log.error("SysRole 验签失败:"+p.toString());
+            }
             p.setRoleKey(sm4Util.decrypt(p.getRoleKey()));
         });
         Set<String> permsSet = new HashSet<>();
@@ -142,6 +163,12 @@ public class SysRoleServiceImpl implements ISysRoleService {
     public SysRole selectRoleById(Long roleId) {
         SysRole sysRole = roleMapper.selectRoleById(roleId);
         if (StringUtils.isNotNull(sysRole)) {
+            boolean b = sysRole.verifySignature();
+            if (b){
+                log.info("SysRole 验签成功");
+            }else {
+                log.error("SysRole 验签失败:"+sysRole.toString());
+            }
             sysRole.setRoleKey(sm4Util.decrypt(sysRole.getRoleKey()));
         }
         return sysRole;
@@ -158,6 +185,12 @@ public class SysRoleServiceImpl implements ISysRoleService {
         Long roleId = StringUtils.isNull(role.getRoleId()) ? -1L : role.getRoleId();
         SysRole info = roleMapper.checkRoleNameUnique(role.getRoleName());
         if (StringUtils.isNotNull(info)){
+            boolean b = info.verifySignature();
+            if (b){
+                log.info("SysRole 验签成功");
+            }else {
+                log.error("SysRole 验签失败:"+info.toString());
+            }
             info.setRoleKey(sm4Util.decrypt(info.getRoleKey()));
         }
         if (StringUtils.isNotNull(info) && info.getRoleId().longValue() != roleId.longValue()) {
@@ -177,6 +210,12 @@ public class SysRoleServiceImpl implements ISysRoleService {
         Long roleId = StringUtils.isNull(role.getRoleId()) ? -1L : role.getRoleId();
         SysRole info = roleMapper.checkRoleKeyUnique(role.getRoleKey());
         if (StringUtils.isNotNull(info)){
+            boolean b = info.verifySignature();
+            if (b){
+                log.info("SysRole 验签成功");
+            }else {
+                log.error("SysRole 验签失败:"+info.toString());
+            }
             info.setRoleKey(sm4Util.decrypt(info.getRoleKey()));
         }
         if (StringUtils.isNotNull(info) && info.getRoleId().longValue() != roleId.longValue()) {

+ 107 - 140
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java

@@ -31,12 +31,11 @@ import java.util.stream.Collectors;
 
 /**
  * 用户 业务层处理
- * 
+ *
  * @author ruoyi
  */
 @Service
-public class SysUserServiceImpl implements ISysUserService
-{
+public class SysUserServiceImpl implements ISysUserService {
     private static final Logger log = LoggerFactory.getLogger(SysUserServiceImpl.class);
 
     @Autowired
@@ -68,16 +67,21 @@ public class SysUserServiceImpl implements ISysUserService
 
     /**
      * 根据条件分页查询用户列表
-     * 
+     *
      * @param user 用户信息
      * @return 用户信息集合信息
      */
     @Override
     @DataScope(deptAlias = "d", userAlias = "u")
-    public List<SysUser> selectUserList(SysUser user)
-    {
+    public List<SysUser> selectUserList(SysUser user) {
         List<SysUser> sysUsers = userMapper.selectUserList(user);
-        sysUsers.forEach(p->{
+        sysUsers.forEach(p -> {
+            boolean b = p.verifySignature();
+            if (b) {
+                log.info("SysUser 验签成功");
+            } else {
+                log.error("SysUser 验签失败:" + p.toString());
+            }
             p.setPhonenumber(sm4Util.decrypt(p.getPhonenumber()));
             p.setEmail(sm4Util.decrypt(p.getEmail()));
         });
@@ -87,16 +91,21 @@ public class SysUserServiceImpl implements ISysUserService
 
     /**
      * 根据条件分页查询已分配用户角色列表
-     * 
+     *
      * @param user 用户信息
      * @return 用户信息集合信息
      */
     @Override
     @DataScope(deptAlias = "d", userAlias = "u")
-    public List<SysUser> selectAllocatedList(SysUser user)
-    {
+    public List<SysUser> selectAllocatedList(SysUser user) {
         List<SysUser> sysUsers = userMapper.selectAllocatedList(user);
-        sysUsers.forEach(p->{
+        sysUsers.forEach(p -> {
+            boolean b = p.verifySignature();
+            if (b) {
+                log.info("SysUser 验签成功");
+            } else {
+                log.error("SysUser 验签失败:" + p.toString());
+            }
             p.setPhonenumber(sm4Util.decrypt(p.getPhonenumber()));
             p.setEmail(sm4Util.decrypt(p.getEmail()));
         });
@@ -106,56 +115,60 @@ public class SysUserServiceImpl implements ISysUserService
 
     /**
      * 根据条件分页查询未分配用户角色列表
-     * 
+     *
      * @param user 用户信息
      * @return 用户信息集合信息
      */
     @Override
     @DataScope(deptAlias = "d", userAlias = "u")
-    public List<SysUser> selectUnallocatedList(SysUser user)
-    {
+    public List<SysUser> selectUnallocatedList(SysUser user) {
         return userMapper.selectUnallocatedList(user);
     }
 
     /**
      * 通过用户名查询用户
-     * 
+     *
      * @param userName 用户名
      * @return 用户对象信息
      */
     @Override
-    public SysUser selectUserByUserName(String userName)
-    {
+    public SysUser selectUserByUserName(String userName) {
         return userMapper.selectUserByUserName(userName);
     }
 
     /**
      * 通过用户ID查询用户
-     * 
+     *
      * @param userId 用户ID
      * @return 用户对象信息
      */
     @Override
-    public SysUser selectUserById(Long userId)
-    {
+    public SysUser selectUserById(Long userId) {
         SysUser sysUser = userMapper.selectUserById(userId);
-        sysUser.setPhonenumber(sm4Util.decrypt(sysUser.getPhonenumber()));
-        sysUser.setEmail(sm4Util.decrypt(sysUser.getEmail()));
+        if (StringUtils.isNotNull(sysUser)) {
+            boolean b = sysUser.verifySignature();
+            if (b) {
+                log.info("SysUser 验签成功");
+            } else {
+                log.error("SysUser 验签失败:" + sysUser.toString());
+            }
+            sysUser.setPhonenumber(sm4Util.decrypt(sysUser.getPhonenumber()));
+            sysUser.setEmail(sm4Util.decrypt(sysUser.getEmail()));
+        }
+
         return sysUser;
     }
 
     /**
      * 查询用户所属角色组
-     * 
+     *
      * @param userName 用户名
      * @return 结果
      */
     @Override
-    public String selectUserRoleGroup(String userName)
-    {
+    public String selectUserRoleGroup(String userName) {
         List<SysRole> list = roleMapper.selectRolesByUserName(userName);
-        if (CollectionUtils.isEmpty(list))
-        {
+        if (CollectionUtils.isEmpty(list)) {
             return StringUtils.EMPTY;
         }
         return list.stream().map(SysRole::getRoleName).collect(Collectors.joining(","));
@@ -163,16 +176,14 @@ public class SysUserServiceImpl implements ISysUserService
 
     /**
      * 查询用户所属岗位组
-     * 
+     *
      * @param userName 用户名
      * @return 结果
      */
     @Override
-    public String selectUserPostGroup(String userName)
-    {
+    public String selectUserPostGroup(String userName) {
         List<SysPost> list = postMapper.selectPostsByUserName(userName);
-        if (CollectionUtils.isEmpty(list))
-        {
+        if (CollectionUtils.isEmpty(list)) {
             return StringUtils.EMPTY;
         }
         return list.stream().map(SysPost::getPostName).collect(Collectors.joining(","));
@@ -180,17 +191,15 @@ public class SysUserServiceImpl implements ISysUserService
 
     /**
      * 校验用户名称是否唯一
-     * 
+     *
      * @param user 用户信息
      * @return 结果
      */
     @Override
-    public boolean checkUserNameUnique(SysUser user)
-    {
+    public boolean checkUserNameUnique(SysUser user) {
         Long userId = StringUtils.isNull(user.getUserId()) ? -1L : user.getUserId();
         SysUser info = userMapper.checkUserNameUnique(user.getUserName());
-        if (StringUtils.isNotNull(info) && info.getUserId().longValue() != userId.longValue())
-        {
+        if (StringUtils.isNotNull(info) && info.getUserId().longValue() != userId.longValue()) {
             return UserConstants.NOT_UNIQUE;
         }
         return UserConstants.UNIQUE;
@@ -203,12 +212,10 @@ public class SysUserServiceImpl implements ISysUserService
      * @return
      */
     @Override
-    public boolean checkPhoneUnique(SysUser user)
-    {
+    public boolean checkPhoneUnique(SysUser user) {
         Long userId = StringUtils.isNull(user.getUserId()) ? -1L : user.getUserId();
         SysUser info = userMapper.checkPhoneUnique(user.getPhonenumber());
-        if (StringUtils.isNotNull(info) && info.getUserId().longValue() != userId.longValue())
-        {
+        if (StringUtils.isNotNull(info) && info.getUserId().longValue() != userId.longValue()) {
             return UserConstants.NOT_UNIQUE;
         }
         return UserConstants.UNIQUE;
@@ -221,12 +228,10 @@ public class SysUserServiceImpl implements ISysUserService
      * @return
      */
     @Override
-    public boolean checkEmailUnique(SysUser user)
-    {
+    public boolean checkEmailUnique(SysUser user) {
         Long userId = StringUtils.isNull(user.getUserId()) ? -1L : user.getUserId();
         SysUser info = userMapper.checkEmailUnique(user.getEmail());
-        if (StringUtils.isNotNull(info) && info.getUserId().longValue() != userId.longValue())
-        {
+        if (StringUtils.isNotNull(info) && info.getUserId().longValue() != userId.longValue()) {
             return UserConstants.NOT_UNIQUE;
         }
         return UserConstants.UNIQUE;
@@ -234,33 +239,28 @@ public class SysUserServiceImpl implements ISysUserService
 
     /**
      * 校验用户是否允许操作
-     * 
+     *
      * @param user 用户信息
      */
     @Override
-    public void checkUserAllowed(SysUser user)
-    {
-        if (StringUtils.isNotNull(user.getUserId()) && user.isAdmin())
-        {
+    public void checkUserAllowed(SysUser user) {
+        if (StringUtils.isNotNull(user.getUserId()) && user.isAdmin()) {
             throw new ServiceException("不允许操作超级管理员用户");
         }
     }
 
     /**
      * 校验用户是否有数据权限
-     * 
+     *
      * @param userId 用户id
      */
     @Override
-    public void checkUserDataScope(Long userId)
-    {
-        if (!SysUser.isAdmin(SecurityUtils.getUserId()))
-        {
+    public void checkUserDataScope(Long userId) {
+        if (!SysUser.isAdmin(SecurityUtils.getUserId())) {
             SysUser user = new SysUser();
             user.setUserId(userId);
             List<SysUser> users = SpringUtils.getAopProxy(this).selectUserList(user);
-            if (StringUtils.isEmpty(users))
-            {
+            if (StringUtils.isEmpty(users)) {
                 throw new ServiceException("没有权限访问用户数据!");
             }
         }
@@ -268,14 +268,13 @@ public class SysUserServiceImpl implements ISysUserService
 
     /**
      * 新增保存用户信息
-     * 
+     *
      * @param user 用户信息
      * @return 结果
      */
     @Override
     @Transactional
-    public int insertUser(SysUser user)
-    {
+    public int insertUser(SysUser user) {
         user.sign();
         // 新增用户信息
         int rows = userMapper.insertUser(user);
@@ -288,27 +287,25 @@ public class SysUserServiceImpl implements ISysUserService
 
     /**
      * 注册用户信息
-     * 
+     *
      * @param user 用户信息
      * @return 结果
      */
     @Override
-    public boolean registerUser(SysUser user)
-    {
+    public boolean registerUser(SysUser user) {
         user.sign();
         return userMapper.insertUser(user) > 0;
     }
 
     /**
      * 修改保存用户信息
-     * 
+     *
      * @param user 用户信息
      * @return 结果
      */
     @Override
     @Transactional
-    public int updateUser(SysUser user)
-    {
+    public int updateUser(SysUser user) {
         Long userId = user.getUserId();
         // 删除用户与角色关联
         userRoleMapper.deleteUserRoleByUserId(userId);
@@ -324,107 +321,97 @@ public class SysUserServiceImpl implements ISysUserService
 
     /**
      * 用户授权角色
-     * 
-     * @param userId 用户ID
+     *
+     * @param userId  用户ID
      * @param roleIds 角色组
      */
     @Override
     @Transactional
-    public void insertUserAuth(Long userId, Long[] roleIds)
-    {
+    public void insertUserAuth(Long userId, Long[] roleIds) {
         userRoleMapper.deleteUserRoleByUserId(userId);
         insertUserRole(userId, roleIds);
     }
 
     /**
      * 修改用户状态
-     * 
+     *
      * @param user 用户信息
      * @return 结果
      */
     @Override
-    public int updateUserStatus(SysUser user)
-    {
+    public int updateUserStatus(SysUser user) {
         user.sign();
         return userMapper.updateUser(user);
     }
 
     /**
      * 修改用户基本信息
-     * 
+     *
      * @param user 用户信息
      * @return 结果
      */
     @Override
-    public int updateUserProfile(SysUser user)
-    {
+    public int updateUserProfile(SysUser user) {
         user.sign();
         return userMapper.updateUser(user);
     }
 
     /**
      * 修改用户头像
-     * 
+     *
      * @param userName 用户名
-     * @param avatar 头像地址
+     * @param avatar   头像地址
      * @return 结果
      */
     @Override
-    public boolean updateUserAvatar(String userName, String avatar)
-    {
+    public boolean updateUserAvatar(String userName, String avatar) {
         return userMapper.updateUserAvatar(userName, avatar) > 0;
     }
 
     /**
      * 重置用户密码
-     * 
+     *
      * @param user 用户信息
      * @return 结果
      */
     @Override
-    public int resetPwd(SysUser user)
-    {
+    public int resetPwd(SysUser user) {
         user.sign();
         return userMapper.updateUser(user);
     }
 
     /**
      * 重置用户密码
-     * 
+     *
      * @param userName 用户名
      * @param password 密码
      * @return 结果
      */
     @Override
-    public int resetUserPwd(String userName, String password)
-    {
+    public int resetUserPwd(String userName, String password) {
         return userMapper.resetUserPwd(userName, password);
     }
 
     /**
      * 新增用户角色信息
-     * 
+     *
      * @param user 用户对象
      */
-    public void insertUserRole(SysUser user)
-    {
+    public void insertUserRole(SysUser user) {
         this.insertUserRole(user.getUserId(), user.getRoleIds());
     }
 
     /**
      * 新增用户岗位信息
-     * 
+     *
      * @param user 用户对象
      */
-    public void insertUserPost(SysUser user)
-    {
+    public void insertUserPost(SysUser user) {
         Long[] posts = user.getPostIds();
-        if (StringUtils.isNotEmpty(posts))
-        {
+        if (StringUtils.isNotEmpty(posts)) {
             // 新增用户与岗位管理
             List<SysUserPost> list = new ArrayList<SysUserPost>(posts.length);
-            for (Long postId : posts)
-            {
+            for (Long postId : posts) {
                 SysUserPost up = new SysUserPost();
                 up.setUserId(user.getUserId());
                 up.setPostId(postId);
@@ -436,18 +423,15 @@ public class SysUserServiceImpl implements ISysUserService
 
     /**
      * 新增用户角色信息
-     * 
-     * @param userId 用户ID
+     *
+     * @param userId  用户ID
      * @param roleIds 角色组
      */
-    public void insertUserRole(Long userId, Long[] roleIds)
-    {
-        if (StringUtils.isNotEmpty(roleIds))
-        {
+    public void insertUserRole(Long userId, Long[] roleIds) {
+        if (StringUtils.isNotEmpty(roleIds)) {
             // 新增用户与角色管理
             List<SysUserRole> list = new ArrayList<SysUserRole>(roleIds.length);
-            for (Long roleId : roleIds)
-            {
+            for (Long roleId : roleIds) {
                 SysUserRole ur = new SysUserRole();
                 ur.setUserId(userId);
                 ur.setRoleId(roleId);
@@ -459,14 +443,13 @@ public class SysUserServiceImpl implements ISysUserService
 
     /**
      * 通过用户ID删除用户
-     * 
+     *
      * @param userId 用户ID
      * @return 结果
      */
     @Override
     @Transactional
-    public int deleteUserById(Long userId)
-    {
+    public int deleteUserById(Long userId) {
         // 删除用户与角色关联
         userRoleMapper.deleteUserRoleByUserId(userId);
         // 删除用户与岗位表
@@ -476,16 +459,14 @@ public class SysUserServiceImpl implements ISysUserService
 
     /**
      * 批量删除用户信息
-     * 
+     *
      * @param userIds 需要删除的用户ID
      * @return 结果
      */
     @Override
     @Transactional
-    public int deleteUserByIds(Long[] userIds)
-    {
-        for (Long userId : userIds)
-        {
+    public int deleteUserByIds(Long[] userIds) {
+        for (Long userId : userIds) {
             checkUserAllowed(new SysUser(userId));
             checkUserDataScope(userId);
         }
@@ -498,43 +479,36 @@ public class SysUserServiceImpl implements ISysUserService
 
     /**
      * 导入用户数据
-     * 
-     * @param userList 用户数据列表
+     *
+     * @param userList        用户数据列表
      * @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据
-     * @param operName 操作用户
+     * @param operName        操作用户
      * @return 结果
      */
     @Override
-    public String importUser(List<SysUser> userList, Boolean isUpdateSupport, String operName)
-    {
-        if (StringUtils.isNull(userList) || userList.size() == 0)
-        {
+    public String importUser(List<SysUser> userList, Boolean isUpdateSupport, String operName) {
+        if (StringUtils.isNull(userList) || userList.size() == 0) {
             throw new ServiceException("导入用户数据不能为空!");
         }
         int successNum = 0;
         int failureNum = 0;
         StringBuilder successMsg = new StringBuilder();
         StringBuilder failureMsg = new StringBuilder();
-        for (SysUser user : userList)
-        {
-            try
-            {
+        for (SysUser user : userList) {
+            try {
                 // 验证是否存在这个用户
                 SysUser u = userMapper.selectUserByUserName(user.getUserName());
-                if (StringUtils.isNull(u))
-                {
+                if (StringUtils.isNull(u)) {
                     BeanValidators.validateWithException(validator, user);
                     deptService.checkDeptDataScope(user.getDeptId());
                     String password = configService.selectConfigByKey("sys.user.initPassword");
-                    user.setPassword(SecurityUtils.encryptPassword(sm4Util,password));
+                    user.setPassword(SecurityUtils.encryptPassword(sm4Util, password));
                     user.setCreateBy(operName);
                     user.sign();
                     userMapper.insertUser(user);
                     successNum++;
                     successMsg.append("<br/>" + successNum + "、账号 " + user.getUserName() + " 导入成功");
-                }
-                else if (isUpdateSupport)
-                {
+                } else if (isUpdateSupport) {
                     BeanValidators.validateWithException(validator, user);
                     checkUserAllowed(u);
                     checkUserDataScope(u.getUserId());
@@ -545,28 +519,21 @@ public class SysUserServiceImpl implements ISysUserService
                     userMapper.updateUser(user);
                     successNum++;
                     successMsg.append("<br/>" + successNum + "、账号 " + user.getUserName() + " 更新成功");
-                }
-                else
-                {
+                } else {
                     failureNum++;
                     failureMsg.append("<br/>" + failureNum + "、账号 " + user.getUserName() + " 已存在");
                 }
-            }
-            catch (Exception e)
-            {
+            } catch (Exception e) {
                 failureNum++;
                 String msg = "<br/>" + failureNum + "、账号 " + user.getUserName() + " 导入失败:";
                 failureMsg.append(msg + e.getMessage());
                 log.error(msg, e);
             }
         }
-        if (failureNum > 0)
-        {
+        if (failureNum > 0) {
             failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
             throw new ServiceException(failureMsg.toString());
-        }
-        else
-        {
+        } else {
             successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
         }
         return successMsg.toString();

+ 3 - 2
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -23,6 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="updateBy"     column="update_by"    />
         <result property="updateTime"   column="update_time"  />
         <result property="remark"       column="remark"       />
+        <result property="dataSignature"       column="data_Signature"       />
 		<result property="pwdUpdateTime"       column="pwd_update_time"       />
         <association property="dept"    javaType="SysDept"         resultMap="deptResult" />
         <collection  property="roles"   javaType="java.util.List"  resultMap="RoleResult" />
@@ -48,7 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 	
 	<sql id="selectUserVo">
-        select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,  u.pwd_update_time,
+        select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,u.data_Signature,  u.pwd_update_time,
         d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
         r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
         from sys_user u
@@ -58,7 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </sql>
     
     <select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
-		select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
+		select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader,u.data_Signature from sys_user u
 		left join sys_dept d on u.dept_id = d.dept_id
 		where u.del_flag = '0'
 		<if test="userId != null and userId != 0">

BIN
ruoyi-ui/dist.zip


BIN
ruoyi-ui/src/assets/fonts/AlimamaDongFangDaKai-Regular.ttf


+ 6 - 0
ruoyi-ui/src/assets/fonts/font.css

@@ -0,0 +1,6 @@
+@font-face {
+  font-family: 'DongFangDaKai';
+  src: url(AlimamaDongFangDaKai-Regular.ttf);
+  font-weight: normal;
+  font-style: normal
+}

+ 1 - 0
ruoyi-ui/src/main.js

@@ -4,6 +4,7 @@ import Cookies from "js-cookie";
 
 import ElementPlus from "element-plus";
 import "element-plus/dist/index.css";
+import "@/assets/fonts/font.css";
 import locale from "element-plus/es/locale/lang/zh-cn";
 
 import "@/assets/styles/index.scss"; // global css

+ 1 - 1
ruoyi-ui/src/router/index.js

@@ -65,7 +65,7 @@ export const constantRoutes = [
     {
         path: '',
         component: Layout,
-        redirect: '/datamonitor/monitorservice',
+        redirect: '/shouye',
         // children: [
         //     {
         //         path: '/index',

+ 94 - 73
ruoyi-ui/src/views/shouye.vue

@@ -5,100 +5,121 @@
     :interval="4000" 
     height="auto"
     arrow="always"
-    autoplay
-    >
-        <el-carousel-item style="height: 80vh">
-            <img style="height: 100%;width: 100%;"  src="@/assets/上海水务首页图片包/上海城区洪涝仿真模型.png" alt="">
-        </el-carousel-item>
-        <el-carousel-item style="height: 80vh">
-            <img style="height: 100%;width: 100%;"  src="@/assets/上海水务首页图片包/风暴潮模型.png" alt="">
-        </el-carousel-item>
-        <el-carousel-item style="height: 80vh">
-            <img style="height: 100%;width: 100%;"  src="@/assets/上海水务首页图片包/黄浦江水系水文分析预报数值模拟模型.png" alt="">
-        </el-carousel-item>
-        <el-carousel-item style="height: 80vh">
-            <img style="height: 100%;width: 100%;"  src="@/assets/上海水务首页图片包/内涝.jpg" alt="">
-        </el-carousel-item>
-        <el-carousel-item style="height: 80vh">
-            <img style="height: 100%;width: 100%;"  src="@/assets/上海水务首页图片包/上海城区洪涝仿真模型.png" alt="">
-        </el-carousel-item>
-        <el-carousel-item style="height: 80vh">
-            <img style="height: 100%;width: 100%;"  src="@/assets/上海水务首页图片包/苏州河水系水情预报模型.png" alt="">
-        </el-carousel-item>
-        <el-carousel-item style="height: 80vh">
-            <img style="height: 100%;width: 100%;"  src="@/assets/上海水务首页图片包/上海市中心城区排水系统模型.png" alt="">
-        </el-carousel-item>
-        <el-carousel-item style="height: 80vh">
-            <img style="height: 100%;width: 100%;"  src="@/assets/上海水务首页图片包/温带风暴潮预报模型.png" alt="">
-        </el-carousel-item>
+    autoplay>
+      <el-carousel-item style="height: 80vh">
+        <img style="height: 100%;width: 100%;" src="@/assets/上海水务首页图片包/上海城区洪涝仿真模型.png" alt="">
+      </el-carousel-item>
+      <el-carousel-item style="height: 80vh">
+        <img style="height: 100%;width: 100%;" src="@/assets/上海水务首页图片包/风暴潮模型.png" alt="">
+      </el-carousel-item>
+      <el-carousel-item style="height: 80vh">
+        <img style="height: 100%;width: 100%;" src="@/assets/上海水务首页图片包/黄浦江水系水文分析预报数值模拟模型.png"
+             alt="">
+      </el-carousel-item>
+      <el-carousel-item style="height: 80vh">
+        <img style="height: 100%;width: 100%;" src="@/assets/上海水务首页图片包/内涝.jpg" alt="">
+      </el-carousel-item>
+      <el-carousel-item style="height: 80vh">
+        <img style="height: 100%;width: 100%;" src="@/assets/上海水务首页图片包/上海城区洪涝仿真模型.png" alt="">
+      </el-carousel-item>
+      <el-carousel-item style="height: 80vh">
+        <img style="height: 100%;width: 100%;" src="@/assets/上海水务首页图片包/苏州河水系水情预报模型.png" alt="">
+      </el-carousel-item>
+      <el-carousel-item style="height: 80vh">
+        <img style="height: 100%;width: 100%;" src="@/assets/上海水务首页图片包/上海市中心城区排水系统模型.png" alt="">
+      </el-carousel-item>
+      <el-carousel-item style="height: 80vh">
+        <img style="height: 100%;width: 100%;" src="@/assets/上海水务首页图片包/温带风暴潮预报模型.png" alt="">
+      </el-carousel-item>
     </el-carousel>
+  </div>
+  <div style="position: absolute;height: 30vh;z-index: 100;top: 70%;width: 100%;">
+    <div style="display: flex;width: 98%;margin-left: 1%;">
+      <div style="width: 25vw;height: 29vh;margin-left: 1%;cursor: pointer;" class="back1"
+           @click="pushto('platform/componentReg')">
+        <div style="width: 100%;color: #dcecef;text-align: center;font-size: 1.5rem;margin-top:5%;">模型注册管理</div>
+        <img style="height: 80%;width: 80%;margin-left: 10%;margin-top: 2%;"
+             src="@/assets/上海水务首页图片包/模型注册.png" alt="">
+      </div>
+      <div style="width: 25vw;height: 29vh;margin-left: 1%;cursor: pointer;" class="back2"
+           @click="pushto('register/edtiModel')">
+        <div style="width: 100%;color: #dcecef;text-align: center;font-size: 1.5rem;margin-top:5%;">模型服务管理</div>
+        <img style="height: 80%;width: 80%;margin-left: 10%;margin-top: 2%;"
+             src="@/assets/上海水务首页图片包/模型服务管理.png" alt="">
+      </div>
+      <div style="width: 25vw;height: 29vh;margin-left: 1%;cursor: pointer;" class="back1"
+           @click="pushto('standardization/modelUsing')">
+        <div style="width: 100%;color: #dcecef;text-align: center;font-size: 1.5rem;margin-top:5%;">模型标准化开发</div>
+        <img style="height: 80%;width: 80%;margin-left: 10%;margin-top: 2%;"
+             src="@/assets/上海水务首页图片包/模型标准化.png" alt="">
+      </div>
+      <div style="width: 25vw;height: 29vh;margin-left: 1%;cursor: pointer;" class="back2"
+           @click="pushto('datamonitor/model_operation_monitoring')">
+        <div style="width: 100%;color: #dcecef;text-align: center;font-size: 1.5rem;margin-top:5%;">模型监控管理</div>
+        <img style="height: 80%;width: 80%;margin-left: 10%;margin-top: 2%;"
+             src="@/assets/上海水务首页图片包/模型监控.png" alt="">
+      </div>
+      <div style="width: 25vw;height: 29vh;margin-left: 1%;cursor: pointer;" class="back1"
+           @click="pushto('evaluate/score')">
+        <div style="width: 100%;color: #dcecef;text-align: center;font-size: 1.5rem;margin-top:5%;">模型评价管理</div>
+        <img style="height: 80%;width: 80%;margin-left: 10%;margin-top: 2%;"
+             src="@/assets/上海水务首页图片包/模型评价.png" alt="">
+      </div>
+
     </div>
-    <div style="position: absolute;height: 30vh;z-index: 100;top: 70%;width: 100%;">
-        <div style="display: flex;width: 98%;margin-left: 1%;"> 
-            <div style="width: 25vw;height: 29vh;margin-left: 1%;cursor: pointer;" class="back1" @click="pushto('platform/componentReg')">
-                <div style="width: 100%;color: #dcecef;text-align: center;font-size: 1.5rem;margin-top:5%;">模型注册管理</div>
-                <img style="height: 80%;width: 80%;margin-left: 10%;margin-top: 2%;"  src="@/assets/上海水务首页图片包/模型注册.png" alt="">
-            </div>
-            <div style="width: 25vw;height: 29vh;margin-left: 1%;cursor: pointer;" class="back2" @click="pushto('register/edtiModel')">
-                <div style="width: 100%;color: #dcecef;text-align: center;font-size: 1.5rem;margin-top:5%;">模型服务管理</div>
-                <img style="height: 80%;width: 80%;margin-left: 10%;margin-top: 2%;"  src="@/assets/上海水务首页图片包/模型服务管理.png" alt="">
-            </div>
-            <div style="width: 25vw;height: 29vh;margin-left: 1%;cursor: pointer;" class="back1" @click="pushto('standardization/modelUsing')">
-                <div style="width: 100%;color: #dcecef;text-align: center;font-size: 1.5rem;margin-top:5%;">模型标准化开发</div>
-                <img style="height: 80%;width: 80%;margin-left: 10%;margin-top: 2%;"  src="@/assets/上海水务首页图片包/模型标准化.png" alt="">
-            </div>
-            <div style="width: 25vw;height: 29vh;margin-left: 1%;cursor: pointer;" class="back2" @click="pushto('datamonitor/model_operation_monitoring')">
-                <div style="width: 100%;color: #dcecef;text-align: center;font-size: 1.5rem;margin-top:5%;">模型监控管理</div>
-                <img style="height: 80%;width: 80%;margin-left: 10%;margin-top: 2%;"  src="@/assets/上海水务首页图片包/模型监控.png" alt="">
-            </div>
-            <div style="width: 25vw;height: 29vh;margin-left: 1%;cursor: pointer;" class="back1" @click="pushto('evaluate/score')">
-                <div style="width: 100%;color: #dcecef;text-align: center;font-size: 1.5rem;margin-top:5%;">模型评价管理</div>
-                <img style="height: 80%;width: 80%;margin-left: 10%;margin-top: 2%;"  src="@/assets/上海水务首页图片包/模型评价.png" alt="">
-            </div>
-            
-        </div>
-    </div>
+  </div>
 </template>
 <script setup>
-import { useRouter } from 'vue-router'
+import {useRouter} from 'vue-router'
 
 const router = useRouter()
 const carouseData = [
-  { 
-    id: 1, 
-    url: new URL('@/assets/上海水务首页图片包/风暴潮.png', import.meta.url).href 
+  {
+    id: 1,
+    url: new URL('@/assets/上海水务首页图片包/风暴潮.png', import.meta.url).href
   },
-  { 
-    id: 2, 
-    url: new URL('@/assets/上海水务首页图片包/风暴潮.png', import.meta.url).href 
+  {
+    id: 2,
+    url: new URL('@/assets/上海水务首页图片包/风暴潮.png', import.meta.url).href
   },
-  { 
-    id: 3, 
-    url: new URL('@/assets/上海水务首页图片包/风暴潮.png', import.meta.url).href 
+  {
+    id: 3,
+    url: new URL('@/assets/上海水务首页图片包/风暴潮.png', import.meta.url).href
   },
 ]
-function pushto(routers){
-    router.push(routers);
+
+function pushto(routers) {
+  router.push(routers);
 }
 
 </script>
+<!--
+  //background-image:url('@/assets/上海水务首页图片包/浅蓝.png');
+  //background-repeat: no-repeat;
+  //background-position: center center;
+ -->
 <style scoped>
-.back1{
-    background-image:url('@/assets/上海水务首页图片包/浅蓝.png');
-    background-repeat: no-repeat;
-    background-position: center center;
+
+.back1 {
+  background: linear-gradient(45deg, rgba(142, 197, 252, 1.000) 0.000%, rgba(141, 211, 255, 1.000) 25.000%, rgba(161, 216, 255, 1.000) 50.000%, rgba(193, 210, 255, 1.000) 75.000%, rgba(224, 195, 255, 1.000) 100.000%);
+  border-radius: 8px;
+  box-shadow: 0 16px 48px 16px rgba(0, 0, 0, .08), 0 12px 32px rgba(0, 0, 0, .12), 0 8px 16px -8px rgba(0, 0, 0, .16);
+  transition: transform .2s ease-in;
 }
+
 .back1:hover {
   transform: translateY(-20px);
-  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
 }
-.back2{
-    background-image:url('@/assets/上海水务首页图片包/深蓝.png');
-    background-repeat: no-repeat;
-    background-position: center center;
+
+.back2 {
+  background-image: url('@/assets/上海水务首页图片包/深蓝.png');
+  background-repeat: no-repeat;
+  background-position: center center;
+  transition: transform .2s ease-in;
 }
+
 .back2:hover {
   transform: translateY(-20px);
-  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
+  box-shadow: 0 0 6px rgba(0, 0, 0, .12);
 }
 </style>