From 7b291d619aa70e5bb33f2b1caabe7f4b0bd003d9 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Fri, 10 Jun 2022 17:28:15 +0800
Subject: [PATCH] 制证数据更新

---
 src/main/java/org/springblade/modules/FTP/FtpUtil.java |   40 +++++++++++++++++++++++++++++-----------
 1 files changed, 29 insertions(+), 11 deletions(-)

diff --git a/src/main/java/org/springblade/modules/FTP/FtpUtil.java b/src/main/java/org/springblade/modules/FTP/FtpUtil.java
index b539771..85eba10 100644
--- a/src/main/java/org/springblade/modules/FTP/FtpUtil.java
+++ b/src/main/java/org/springblade/modules/FTP/FtpUtil.java
@@ -350,34 +350,52 @@
 	public static void sqlFileUpload(String obj){
 		String json1 = JSON.toJSONString(obj);
 		String response1 = String.valueOf((new Date()).getTime());
-		OutJson.createJsonFile(json1, localPath, "nsql"+response1);
+		OutJson.createJsonFile(json1, localPath, "nq"+response1);
 		FileInputStream in1 = null;
 		try {
-			in1 = new FileInputStream(new File(localPath + "nsql"+response1+".json"));
+			in1 = new FileInputStream(new File(localPath + "nq"+response1+".json"));
 		} catch (FileNotFoundException e) {
 			e.printStackTrace();
 		}
-		FtpUtil.uploadFile(ftpHost, ftpPort, ftpUserNameOut, ftpPasswordOut, ftpPath, "/",  "nsql"+response1+".json", in1);
-		MysqlCenlint.deletess("nsql"+response1+".json");
+		FtpUtil.uploadFile(ftpHost, ftpPort, ftpUserNameOut, ftpPasswordOut, ftpPath, "/",  "nq"+response1+".json", in1);
+		MysqlCenlint.deletess("nq"+response1+".json");
+	}
+
+	/**
+	 * 执行sql 上传,推送审查结果,json 命名用户id相同的文件名称一致
+	 * @param obj sql
+	 * @param id 用户id
+	 */
+	public static void sqlFileUploadUserExamine(String obj,String id){
+		String json1 = JSON.toJSONString(obj);
+		OutJson.createJsonFile(json1, localPath, "nq"+id);
+		FileInputStream in1 = null;
+		try {
+			in1 = new FileInputStream(new File(localPath + "nq"+id+".json"));
+		} catch (FileNotFoundException e) {
+			e.printStackTrace();
+		}
+		FtpUtil.uploadFile(ftpHost, ftpPort, ftpUserNameOut, ftpPasswordOut, ftpPath, "/",  "nq"+id+".json", in1);
+		MysqlCenlint.deletess("nq"+id+".json");
 	}
 
 	/**
 	 * 执行 对象数据(用户,报名对象信息等) 上传
 	 * @param obj 对象信息
+	 * @param uuid
 	 */
-	public static void objectFileUpload(Object obj){
+	public static void objectFileUpload(Object obj,String uuid){
 		String json1 = JSON.toJSONString(obj);
-		String response1 = String.valueOf((new Date()).getTime());
-		OutJson.createJsonFile(json1, localPath, "n"+response1);
+		OutJson.createJsonFile(json1, localPath, "ni"+uuid);
 		FileInputStream in1 = null;
 		try {
-			in1 = new FileInputStream(new File(localPath + "n"+response1+".json"));
+			in1 = new FileInputStream(new File(localPath + "ni"+uuid+".json"));
 		} catch (FileNotFoundException e) {
 			e.printStackTrace();
 		}
-		FtpUtil.uploadFile(ftpHost, ftpPort, ftpUserNameOut, ftpPasswordOut, ftpPath, "/",  "n"+response1+".json", in1);
+		FtpUtil.uploadFile(ftpHost, ftpPort, ftpUserNameOut, ftpPasswordOut, ftpPath, "/",  "ni"+uuid+".json", in1);
 		System.out.println("用户新增,向外网推送数据结束.................");
-		MysqlCenlint.deletess("n"+response1+".json");
+		MysqlCenlint.deletess("ni"+uuid+".json");
 	}
 
 
@@ -419,7 +437,7 @@
 
 	/**
 	 * 向外网发送保安员证编号位数数据
-	 * @param map1
+	 * @param obj
 	 */
 	public static void objectFileUploadSecurityNumberCount(Object obj){
 		String json1 = JSON.toJSONString(obj);

--
Gitblit v1.9.3