diff --git a/.project b/.project
index c9ff485b..766e275f 100644
--- a/.project
+++ b/.project
@@ -37,5 +37,6 @@
org.eclipse.wst.common.project.facet.core.nature
org.eclipse.jdt.core.javanature
org.eclipse.wst.jsdt.core.jsNature
+ com.sysdeo.eclipse.tomcat.tomcatnature
diff --git a/WebContent/WEB-INF/config/config.properties b/WebContent/WEB-INF/config/config.properties
index 676e5527..c9d94dc3 100644
--- a/WebContent/WEB-INF/config/config.properties
+++ b/WebContent/WEB-INF/config/config.properties
@@ -17,6 +17,7 @@ jdbc.mysql.password=root
gather-user-name=system
# 密码
gather-user-password=oracle
+
#
gather-port=1521
#
@@ -40,11 +41,15 @@ jdbc.minEvictableIdleTimeMillis=300000
#
#==============================================================================================================
table-suffix=_20152016
-extract-log-localtion=/home/log/
+extract-log-localtion=/home/web_manage/log/
gather-tablespace-name=TS_TTSSS
+
gather-tablespace-path=
gather-table-user-password=
kubeMasterUrl=http://192.168.191.23:8080/
+
collect-user-name=system
collect-password=oracle
collect-service-name=orcl
+
+gfs_control_ip=192.168.191.23
\ No newline at end of file
diff --git a/WebContent/WEB-INF/config/log4j-config.xml b/WebContent/WEB-INF/config/log4j-config.xml
index 55b0cb0f..801540e5 100644
--- a/WebContent/WEB-INF/config/log4j-config.xml
+++ b/WebContent/WEB-INF/config/log4j-config.xml
@@ -8,17 +8,25 @@
+
+
+
+
-
+
+
+
+
+
diff --git a/WebContent/WEB-INF/config/mybatis-applicationConfig.xml b/WebContent/WEB-INF/config/mybatis-applicationConfig.xml
index 4bb8e731..ae09a182 100644
--- a/WebContent/WEB-INF/config/mybatis-applicationConfig.xml
+++ b/WebContent/WEB-INF/config/mybatis-applicationConfig.xml
@@ -18,5 +18,6 @@
+
\ No newline at end of file
diff --git a/src/com/base/BaseController.java b/src/com/base/BaseController.java
index 88ef5f48..804f833a 100644
--- a/src/com/base/BaseController.java
+++ b/src/com/base/BaseController.java
@@ -45,6 +45,7 @@ public class BaseController {
System.out.println("URI"+request.getRequestURI());
request.setAttribute("ex", ex);
System.err.println("BaseController --exp " + ex);
+ new CustomException("base_code_", ex);
// 根据不同错误转向不同页面
if(ex instanceof CustomException) {
CustomException cuse = (CustomException) ex;
diff --git a/src/com/base/Custom4exception.java b/src/com/base/Custom4exception.java
index a5bc8540..0e109c86 100644
--- a/src/com/base/Custom4exception.java
+++ b/src/com/base/Custom4exception.java
@@ -27,8 +27,11 @@ public class Custom4exception {
public final static String threadVolume_Thread_Except = "3001001002";
/**
- * 抽取汇总
+ * 抽取汇总--的-获取抽取动作异常
*/
public final static String threadVolume_Oracle_Except = "3002001002";
+ /** * SQL执行错误 */
+ public final static String OracleSQL_Except = "3002001002";
+
}
diff --git a/src/com/base/CustomException.java b/src/com/base/CustomException.java
index 08b75248..e40f5697 100644
--- a/src/com/base/CustomException.java
+++ b/src/com/base/CustomException.java
@@ -4,6 +4,9 @@ package com.base;
import org.apache.log4j.Logger;
+import com.platform.controller.DataModelController;
+import com.platform.utils.Configs;
+
/**
* <一句话功能简述>
* <功能详细描述>
@@ -16,7 +19,7 @@ import org.apache.log4j.Logger;
public class CustomException extends Exception {
/** log4j */
- public static Logger log = Logger.getRootLogger();
+ public static Logger log = Configs.DAILY_ROLLING_LOGGER;
/** 自定义异常信息-错误信息 */
private String msg;
@@ -44,7 +47,6 @@ public class CustomException extends Exception {
public CustomException(String code,Exception e,Object... obj) {
super(code);
StringBuffer sbuf= new StringBuffer();
- sbuf.append(msg);
this.code = code;
sbuf.append(code);
sbuf.append("\r\n");
@@ -56,6 +58,8 @@ public class CustomException extends Exception {
}
// 记录原始的异常
if (null != e) {
+ sbuf.append(e.getMessage());
+ sbuf.append("\r\n");
StackTraceElement[] array = e.getStackTrace();
cause = e.getCause();
for (StackTraceElement stackTraceElement : array) {
@@ -68,6 +72,7 @@ public class CustomException extends Exception {
Object[] array = obj;
sbuf.append("Object[] size : ");
sbuf.append(array.length);
+ sbuf.append("\r\n");
int forSize = 0;
if (Constant.CustomException_log_object_size < array.length) {
forSize = Constant.CustomException_log_object_size;
@@ -89,7 +94,7 @@ public class CustomException extends Exception {
sbuf.append("\r\n");
// 是否 写入 文件
- log.error(sbuf.toString());
+ log.debug(sbuf.toString());
}
/**
diff --git a/src/com/base/i18n.properties b/src/com/base/i18n.properties
index e69de29b..eee66963 100644
--- a/src/com/base/i18n.properties
+++ b/src/com/base/i18n.properties
@@ -0,0 +1,4 @@
+3001001001=ThreadVolume\u7C7B\u67E5\u8BE2 volume\u5F02\u5E38
+3001001002=ThreadVolume\u7C7B\u7EBF\u7A0B\u4F11\u7720\u5F02\u5E38
+3002001002= \u62BD\u53D6\u6C47\u603B--\u7684-\u83B7\u53D6\u62BD\u53D6\u52A8\u4F5C\u5F02\u5E38
+3002001002=SQL\u6267\u884C\u9519\u8BEF
\ No newline at end of file
diff --git a/src/com/dao/mapper/VolumeMapper.xml b/src/com/dao/mapper/VolumeMapper.xml
new file mode 100644
index 00000000..29f0a59b
--- /dev/null
+++ b/src/com/dao/mapper/VolumeMapper.xml
@@ -0,0 +1,95 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ UPDATE
+ volume_info
+
+
+
+ name= #{name},
+
+
+ ip= #{ip},
+
+
+ path= #{path},
+
+
+ mark= #{mark},
+
+
+
+
+ id = #{id}
+
+
+
+
+ INSERT INTO
+ volume_info(
+
+
+ name,
+
+
+ ip,
+
+
+ path,
+
+
+ mark,
+
+
+ )
+ VALUES(
+
+
+ #{name},
+
+
+ #{ip},
+
+
+ #{path},
+
+
+ #{mark},
+
+
+ )
+
+
+
+ DELETE FROM
+ volume_info
+ WHERE
+ name = #{name}
+
+
+
\ No newline at end of file
diff --git a/src/com/dao/mapper/data-details-mapper.xml b/src/com/dao/mapper/data-details-mapper.xml
index 217885ca..61071bd0 100644
--- a/src/com/dao/mapper/data-details-mapper.xml
+++ b/src/com/dao/mapper/data-details-mapper.xml
@@ -44,11 +44,16 @@ PUBLIC "-//ibatis.apache.org//DTD Mapper 3.0//EN"
jdbcType="VARCHAR" />
+
AND data_details.data_type=#{dataType}
+
+ AND data_details.mark=#{mark}
+
AND
data_details.submitted_batch=#{submittedBatch}
@@ -80,7 +85,7 @@ PUBLIC "-//ibatis.apache.org//DTD Mapper 3.0//EN"
+
+
+
diff --git a/src/com/platform/controller/DataModelController.java b/src/com/platform/controller/DataModelController.java
index 418ed466..528aa89a 100644
--- a/src/com/platform/controller/DataModelController.java
+++ b/src/com/platform/controller/DataModelController.java
@@ -11,8 +11,6 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import net.sf.json.JSONObject;
-
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
@@ -27,45 +25,48 @@ import org.springframework.web.bind.annotation.ResponseBody;
import com.base.BaseController;
import com.platform.entities.DataInfoEntity;
import com.platform.entities.DataInfoEntityMoveTmp;
-import com.platform.entities.FolderNode;
import com.platform.entities.GatherOracleInfo;
import com.platform.entities.PagerOptions;
import com.platform.entities.VolumeEntity;
+import com.platform.entities.oracleForm;
import com.platform.entities.volumeMoveForm;
import com.platform.service.DataInfoService;
import com.platform.service.ICodeService;
import com.platform.service.IGfsService;
+import com.platform.service.ILogRead;
import com.platform.service.IMoveDataService;
import com.platform.service.IMySqlService;
import com.platform.service.IOracleExtractService;
import com.platform.service.OracleStatusService;
-import com.platform.utils.Bean2MapUtils;
import com.platform.utils.Configs;
import com.platform.utils.UtilsHelper;
@Controller
-public class DataModelController extends BaseController{
-
- public static Logger log = Logger.getLogger(DataModelController.class);
-
+public class DataModelController extends BaseController {
+
+ public static Logger log = Configs.DAILY_ROLLING_LOGGER;
+
@Resource(name = "dataInfoService")
private DataInfoService dfs;
-
+
@Resource(name = "gfsService")
private IGfsService gfsService;
-
+
@Resource(name = "mySqlService")
private IMySqlService mySqlService;
-
+
@Resource(name = "OracleExtract")
private IOracleExtractService OracleExtract;
-
+
@Resource(name = "moveDataService")
private IMoveDataService moveDataService;
-
+
@Resource(name = "codeService")
private ICodeService codeService;
-
+
+ @Resource(name = "logReadService")
+ private ILogRead logReadService;
+
public void setDfsImp(DataInfoService dfs) {
this.dfs = dfs;
}
@@ -92,12 +93,14 @@ public class DataModelController extends BaseController{
.append("}").toString());
PagerOptions pagerOptions = (PagerOptions) UtilsHelper
.newObjAndSetAttrsByClass(PagerOptions.class, params);
-
+ //冷热区查询字段mark
+ pagerOptions.setMark(pagerOptions.getVolumeType());
return dfs.getPagerTableData(pagerOptions);
}
- @RequestMapping(value="/delete/data", method= RequestMethod.POST)
- public void deleteData(HttpServletRequest res, HttpServletResponse req) throws Exception {
+ @RequestMapping(value = "/delete/data", method = RequestMethod.POST)
+ public void deleteData(HttpServletRequest res, HttpServletResponse req)
+ throws Exception {
res.setCharacterEncoding("UTF-8");
Map paramMap = res.getParameterMap();
String[] data = paramMap.get("data");
@@ -106,13 +109,14 @@ public class DataModelController extends BaseController{
}
@RequestMapping("/connectOracle")
- public void connectOracle(HttpServletRequest res, HttpServletResponse req) throws UnsupportedEncodingException {
+ public void connectOracle(HttpServletRequest res, HttpServletResponse req)
+ throws UnsupportedEncodingException {
res.setCharacterEncoding("UTF-8");
Map paramMap = res.getParameterMap();
String[] oraclesName = paramMap.get("oracleName");
if (oraclesName != null)
for (String rcName : oraclesName) {
- Configs.CONSOLE_LOGGER.info("连接成功\t" + rcName);
+ Configs.CONSOLE_LOGGER.info("执行连接\t" + rcName);
new OracleStatusService().connectToOracle(rcName);
}
req.setStatus(200);
@@ -134,211 +138,163 @@ public class DataModelController extends BaseController{
req.setStatus(200);
}
- @RequestMapping(value="/oracle/{name}/extract", method= RequestMethod.POST)
- public void oracleExtract(HttpServletRequest res,
- HttpServletResponse req,@PathVariable String name) throws Exception {
+ @RequestMapping(value = "/oracle/{name}/extract", method = RequestMethod.POST)
+ public void oracleExtract(HttpServletRequest res, HttpServletResponse req,
+ @RequestBody oracleForm form) throws Exception {
+ Configs.CONSOLE_LOGGER.error("/oracle/{name}/extract");
res.setCharacterEncoding("UTF-8");
- System.out.println("------extract-------");
- System.out.println(name);
- Map paramMap = res.getParameterMap();
- //汇总库 对象信息--带有tableName-
- String[] nodes = paramMap.get("target");
- Map map = null;
- for (String string : nodes) {
- JSONObject jsonobject = JSONObject.fromObject(string);
- map = jsonobject;
- System.out.println(map);
- }
-
- // 采集库对象--(多个采集库抽取到1个汇总库的1个tableName下)
- String[] inneed = paramMap.get("inneed");
- List