|
@@ -1,10 +1,19 @@
|
|
|
package com.zskk.control;
|
|
|
|
|
|
+import java.io.BufferedReader;
|
|
|
+import java.io.File;
|
|
|
+import java.io.FileInputStream;
|
|
|
import java.io.IOException;
|
|
|
+import java.io.InputStreamReader;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
+
|
|
|
+import org.w3c.dom.NamedNodeMap;
|
|
|
+import org.w3c.dom.NodeList;
|
|
|
+
|
|
|
import com.jfinal.core.Controller;
|
|
|
import com.jfinal.kit.PropKit;
|
|
|
import com.jfinal.plugin.activerecord.ActiveRecordPlugin;
|
|
@@ -12,6 +21,8 @@ import com.jfinal.plugin.activerecord.Db;
|
|
|
import com.jfinal.plugin.activerecord.Record;
|
|
|
import com.jfinal.plugin.activerecord.dialect.SqlServerDialect;
|
|
|
import com.jfinal.plugin.druid.DruidPlugin;
|
|
|
+import com.zskk.tools.XmlHelper;
|
|
|
+
|
|
|
import okhttp3.FormBody;
|
|
|
import okhttp3.MediaType;
|
|
|
import okhttp3.OkHttpClient;
|
|
@@ -48,6 +59,27 @@ public class ViewController extends Controller {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public void tempmatch() {
|
|
|
+ String fileName2String ="";
|
|
|
+
|
|
|
+ List<String> files = new ArrayList<String>();
|
|
|
+ File file = new File("/home/zskk/CFIND_XML");
|
|
|
+ File[] tempList = file.listFiles();
|
|
|
+ for (int j = 0; j < tempList.length; j++) {
|
|
|
+ if (tempList[j].isFile()) {
|
|
|
+ files.add(tempList[j].toString());
|
|
|
+ //文件名,不包含路径
|
|
|
+ String fileName = tempList[j].getName();
|
|
|
+ fileName2String = fileName2String+fileName+"**";
|
|
|
+ }
|
|
|
+ if (tempList[j].isDirectory()) {
|
|
|
+ //这里就不递归了,
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ this.renderText(fileName2String);
|
|
|
+
|
|
|
+ }
|
|
|
public static DruidPlugin createConnectedDruidPlugin() {
|
|
|
|
|
|
return new DruidPlugin(PropKit.get("jdbcUrl_connected"), PropKit.get("user_connected"),PropKit.get("password_connected").trim());
|
|
@@ -88,5 +120,19 @@ public class ViewController extends Controller {
|
|
|
return daString;
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 日期字符串格式转换年月日时分秒
|
|
|
+ *
|
|
|
+ * @param dateStr
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ private String parseStringToDateTime() {
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+ Date date = new Date();
|
|
|
+ String daString = sdf.format(date);
|
|
|
+ return daString;
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
}
|