diff --git a/.classpath b/.classpath
index 7e729e64..7155d58e 100644
--- a/.classpath
+++ b/.classpath
@@ -2,17 +2,17 @@
-
+
+
+
-
+
-
+
-
+
-
-
diff --git a/.project b/.project
index ded1f1a4..ed1fe4a2 100644
--- a/.project
+++ b/.project
@@ -25,6 +25,11 @@
+
+ com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder
+
+
+
org.eclipse.jem.workbench.JavaEMFNature
diff --git a/.settings/com.genuitec.eclipse.migration.prefs b/.settings/com.genuitec.eclipse.migration.prefs
new file mode 100644
index 00000000..e8679401
--- /dev/null
+++ b/.settings/com.genuitec.eclipse.migration.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+performed.operation.correct.unbound.jre=1.0
diff --git a/build/classes/.gitignore b/build/classes/.gitignore
new file mode 100644
index 00000000..67f303f0
--- /dev/null
+++ b/build/classes/.gitignore
@@ -0,0 +1,2 @@
+/com/
+/dataSystem.properties
diff --git a/build/classes/com/platform/controller/DataModelController.class b/build/classes/com/platform/controller/DataModelController.class
index 837dcfde..6d59835f 100644
Binary files a/build/classes/com/platform/controller/DataModelController.class and b/build/classes/com/platform/controller/DataModelController.class differ
diff --git a/build/classes/com/platform/controller/DefaultController.class b/build/classes/com/platform/controller/DefaultController.class
index 91940503..f975e29e 100644
Binary files a/build/classes/com/platform/controller/DefaultController.class and b/build/classes/com/platform/controller/DefaultController.class differ
diff --git a/build/classes/com/platform/entities/EncodedInfoEntity.class b/build/classes/com/platform/entities/EncodedInfoEntity.class
index ca2439bd..f920dc4d 100644
Binary files a/build/classes/com/platform/entities/EncodedInfoEntity.class and b/build/classes/com/platform/entities/EncodedInfoEntity.class differ
diff --git a/src/com/base/BaseController.java b/src/com/base/BaseController.java
new file mode 100644
index 00000000..8a6c02c2
--- /dev/null
+++ b/src/com/base/BaseController.java
@@ -0,0 +1,48 @@
+/**
+ * 文件名 : BaseController.java
+ * 版权 : XX科技有限公司。
+ * 描述 : <描述>
+ * 修改时间:2016年9月7日
+ * 修改内容:<修改内容>
+ */
+package com.base;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.web.bind.annotation.ExceptionHandler;
+
+/**
+ * <一句话功能简述>
+ * <功能详细描述>
+ * @author chen
+ * @version [版本号,2016年9月7日]
+ * @see [相关类/方法]
+ * @since [产品/模块版本]
+ */
+public class BaseController {
+
+ /**
+ * <一句话功能简述> 基于@ExceptionHandler异常处理----全局异常处理
+ * <功能详细描述>
+ * @param request
+ * @param ex 异常
+ * @return
+ * @see [类、类#方法、类#成员]
+ */
+ @ExceptionHandler
+ public String exp(HttpServletRequest request, Exception ex) {
+
+ request.setAttribute("ex", ex);
+ System.err.println("BaseController --exp ");
+ // 根据不同错误转向不同页面
+ if(ex instanceof CustomException) {
+ //TODO 从新封装json
+ System.err.println("BaseController --exp -- CustomException ");
+ return "error-business";
+ } else {
+ //TODO 其他错误则 调到指定页面
+
+ return "error";
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/com/base/Constant.java b/src/com/base/Constant.java
new file mode 100644
index 00000000..87bd657d
--- /dev/null
+++ b/src/com/base/Constant.java
@@ -0,0 +1,33 @@
+package com.base;
+
+import java.io.File;
+
+/**
+ * @描述 常量类
+ * @author chen
+ * @date 2016年8月30日
+ * @package com.base
+ */
+public class Constant {
+
+ /** 配置文件文件-dataSystem.properties */
+ public static String SYSTEM_PROPERTIES_FIEL_PATH = "/com/base/dataSystem.properties";
+
+ /** 国际话配置文件文件-i18n.properties */
+ public static String I18N_PROPERTIES_FIEL_PATH = "/com/base/i18n.properties";
+
+ /** 记录异常的文件-system_exception.txt-的位置-- */
+ public final static String SYSTEM_EXCEPTION_FILEPATH = "\\log\\system_exception.txt";
+
+
+ /** WritefileThread-线程睡眠时间--3000 */
+ public final static long THREAD_SLEEP_WRITEFILETHREAD = 3000;
+
+ /** 是否将异常写入文件 */
+ public final static String IS_WRITE_LOGFILE = "iswritelogfile";
+
+ /** CustomException记录报异常的对象的对象个数--10 */
+ public final static int CustomException_log_object_size = 10;
+
+
+}
diff --git a/src/com/base/Custom4exception.java b/src/com/base/Custom4exception.java
new file mode 100644
index 00000000..cfbab1e6
--- /dev/null
+++ b/src/com/base/Custom4exception.java
@@ -0,0 +1,41 @@
+package com.base;
+
+
+/**
+ * @描述 异常常量编码
+ * @author chen
+ * @date 2016年8月22日
+ * @package com.base
+ */
+public class Custom4exception {
+ //3003001001 : 第一位:标识异常, 第二到第四位:标识模块,第五道第七位:标识类别,第八道第十位标识具体异常
+ /** 3:异常
+ * 003:虚拟机模块
+ * 001:软件依赖虚拟机资源类别
+ * 001:启动异常
+ */
+ /** 虚拟机-资源-虚拟机VM启动异常 */
+ public final static String vbox_start_exp = "3003001001";
+
+ /** 虚拟机-资源-虚拟机VBoxManage.exe 不存在异常 */
+ public final static String vbox_exe_non_exist_exp = "3003001002";
+
+ /** 虚拟机-共享-设置共享文件夹中断异常 */
+ public final static String share_dir_interrupted_exp = "3003002001";
+
+ /** 数据管理-数据上报-中断或读写异常 */
+ public final static String data_manage_interrupted_exp = "3004001001";
+
+ /** 公共模块utils-xml类-xml非法异常 */
+ public final static String xml_field_Illega_exp = "3005001001";
+
+ /** 公共模块utils-xml类-document异常 */
+ public final static String xml_docu_exp = "3005001002";
+
+ /** 公共模块utils-xml类-读写异常 */
+ public final static String xml_io_exp = "3005001003";
+
+ /** 公共模块utils-oracle类-读写异常 */
+ public final static String oracle_io_exp = "3005002001";
+
+}
diff --git a/src/com/base/CustomException.java b/src/com/base/CustomException.java
new file mode 100644
index 00000000..f9c4192c
--- /dev/null
+++ b/src/com/base/CustomException.java
@@ -0,0 +1,112 @@
+package com.base;
+
+
+@SuppressWarnings("serial")
+public class CustomException extends Exception {
+
+ /** 自定义异常信息-错误信息 */
+ private String msg;
+
+ /** 操作对象 */
+ private Object[] objArray;
+
+ /** 异常 */
+ private Throwable cause;
+
+ static{
+ // 是否 启动 记录 异常的线程
+ if (Boolean.valueOf(Resource.getProperties().get(Constant.IS_WRITE_LOGFILE))) {
+ //启动 记录 异常的线程
+ WritefileThread wt = new WritefileThread();
+ wt.start();
+ }
+ }
+
+ public CustomException() {
+ super();
+ }
+
+ /**
+ * @功能 将异常记录进文件
+ * @param code 异常编码
+ * @param msg 自定义异常信息
+ * @param e
+ * @param obj
+ */
+ public CustomException(String code,Exception e,Object... obj) {
+ super(code);
+ StringBuffer sbuf= new StringBuffer();
+ sbuf.append(msg);
+
+ sbuf.append(code);
+ sbuf.append("\r\n");
+ msg = Resource.getProperties().get(code);
+ // 记录自定义的 异常
+ if (null != msg) {
+ sbuf.append(msg);
+ sbuf.append("\r\n");
+ }
+ // 记录原始的异常
+ if (null != e) {
+ StackTraceElement[] array = e.getStackTrace();
+ cause = e.getCause();
+ for (StackTraceElement stackTraceElement : array) {
+ sbuf.append(stackTraceElement.toString());
+ sbuf.append("\r\n");
+ }
+ }
+ //记录 出现异常时 当前的对象
+ if (null != obj) {
+ Object[] array = obj;
+ sbuf.append("Object[] size : ");
+ sbuf.append(array.length);
+ int forSize = 0;
+ if (Constant.CustomException_log_object_size < array.length) {
+ forSize = Constant.CustomException_log_object_size;
+ }
+ else {
+ forSize = array.length;
+ }
+ for (int i = 0; i < forSize; i++) {
+ sbuf.append(array[i]);
+ sbuf.append("\r\n");
+ }
+ sbuf.append("......");
+ sbuf.append("\r\n");
+ }
+ else {
+ sbuf.append("null");
+ sbuf.append("\r\n");
+ }
+
+ sbuf.append("\r\n");
+ // 是否 写入 文件
+ if (Boolean.valueOf(Resource.getProperties().get(Constant.IS_WRITE_LOGFILE))) {
+ WritefileThread.getStrArray().add(sbuf.toString());
+ }
+ }
+
+ /**
+ * @功能 获得msg
+ * @return msg
+ */
+ public String getMsg() {
+ return msg;
+ }
+
+ /**
+ * @功能 获得objArray
+ * @return objArray
+ */
+ public Object[] getObjArray() {
+ return objArray;
+ }
+
+ /**
+ * @功能 获得cause
+ * @return cause
+ */
+ public Throwable getCause() {
+ return cause;
+ }
+}
diff --git a/src/com/base/FileOperate.java b/src/com/base/FileOperate.java
new file mode 100644
index 00000000..718d3d4d
--- /dev/null
+++ b/src/com/base/FileOperate.java
@@ -0,0 +1,383 @@
+package com.base;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.RandomAccessFile;
+import java.nio.channels.FileLock;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Random;
+
+import javax.swing.filechooser.FileSystemView;
+
+/**
+ * @描述 文件操作
+ * @author chen
+ * @date 2016年8月8日
+ * @package com.utils
+ */
+public class FileOperate {
+ private final static String localDiskName = "本地磁盘";
+ private final static String enlocalDiskName = "Local Disk";
+ private final static String CD = "CD";
+ private final static String DVD = "DVD";
+ public static String usbPath = "";
+
+ /**
+ * @功能 获取全部的外部移动硬盘路径
+ *
+ * @return
+ */
+ public static List filterDiskPath() {
+ FileSystemView fileSystemView = FileSystemView.getFileSystemView();
+ List diskPathName = new ArrayList();
+ File[] roots = File.listRoots();
+ for (File file : roots) {
+ String diskName = fileSystemView.getSystemTypeDescription(file);// 获取磁盘的类型描述信息
+ if (diskName.startsWith(localDiskName) || diskName.startsWith(enlocalDiskName) || diskName.contains(CD)
+ || diskName.contains(CD) || diskName.contains(DVD)) // 当磁盘为可移动磁盘时{
+ continue;
+ diskPathName.add(file.getAbsolutePath());
+ }
+ return diskPathName;
+ }
+
+ /**
+ * @功能 创建文件夹
+ * @param path
+ * 上级目录
+ * @param dirName
+ * 待创建的目录
+ * @return
+ */
+ public static int createDir(String path, String dirName) {
+ File dirFile = new File(path + "\\" + dirName);
+ if (!dirFile.exists()) {
+ if (!dirFile.mkdirs()) {
+ System.out.println("目录不存在,创建失败!");
+ return 2;
+ }
+ return 1;
+ }
+ return 0;
+ }
+
+ /**
+ * @功能 检测数据文件是否完整
+ *
+ * @param path
+ * 文件绝对路径
+ * @return
+ */
+ public static boolean isFileExists(String path) {
+ File file = new File(path);
+ if (file.exists())
+ return true;
+ return false;
+ }
+
+ /**
+ * @功能 文件是否存在
+ *
+ * @param name
+ * 文件绝对路径
+ * @return
+ */
+ public static boolean file_dir_exist(String name) {
+
+ try {
+ File file = new File(name);
+ if (!file.exists()) {
+ return false;
+ // return true;
+ }
+ }
+ catch (Exception e) {
+ // TODO: handle exception
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * @功能 随机生成26以内的数字拼接的字符串(?什么用?)
+ * @param length
+ * 拼接次数
+ * @return
+ */
+ public static String getRandomString(int length) { // length表示生成字符串的长度
+ String base = "abcdefghijklmnopqrstuvwxyz";
+ Random random = new Random();
+ StringBuffer sb = new StringBuffer();
+ for (int i = 0; i < length; i++) {
+ int number = random.nextInt(base.length());
+ sb.append(base.charAt(number));
+ }
+ return sb.toString();
+ }
+
+ /**
+ * @功能 以字符串方式读取文件内容
+ * @param fiel_name
+ * 文件名
+ * @return 字符串
+ */
+ public static String read_fileToStr(String fiel_name) {
+ String str = "";
+ try {
+ File file = new File(fiel_name);
+ String lineTxt = "";
+ InputStreamReader read = new InputStreamReader(new FileInputStream(file), "gbk");// 考虑到编码格式
+ BufferedReader bufferedReader = new BufferedReader(read);
+ while ((lineTxt = bufferedReader.readLine()) != null) {
+ str = str + lineTxt;
+ }
+ bufferedReader.close();
+ read.close();
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ return "Exception";
+ }
+ return str;
+ }
+
+ /**
+ * @功能 读取文件路径的各级目录,以数组形式返回
+ * @param path_filename
+ * 文件或文件夹路径
+ * @return 数组
+ */
+ public static String get_filename_from_path(String path_filename) {
+ String[] strings = path_filename.split("\\\\");
+
+ return strings[strings.length - 1];
+ }
+
+ /**
+ * @功能 查找dirPath目录下的所有文件
+ * @param dirPath
+ * 目录
+ * @return 所有文件数组
+ */
+ public static List findAllFilenameFromPath(String dirPath) {
+ ArrayList fileAbsolutePaths = new ArrayList<>();
+ FileOperate.findFiles(dirPath, fileAbsolutePaths);
+ return fileAbsolutePaths;
+ }
+
+ /**
+ * @功能 删除目录下所有文件包含文件夹
+ * @param dirPath
+ * 目录
+ * @return
+ */
+ public static boolean delAllFileByDir(String dirPath) {
+ boolean flag = false;
+ File file = new File(dirPath);
+ // 判断目录或文件是否存在
+ if (!file.exists()) { // 不存在返回 false
+ return flag;
+ }
+ else {
+ // 判断是否为文件
+ if (file.isFile()) { // 为文件时调用删除文件方法
+ return deleteFile(dirPath);
+ }
+ else { // 为目录时调用删除目录方法
+ return deleteDirectory(dirPath);
+ }
+ }
+ }
+
+ /**
+ * @功能 写文件
+ * @param content
+ * 文件内容
+ * @param filePathName
+ * 文件绝对路径
+ */
+ public static void writeFile(List