|
|
|
@ -16,13 +16,16 @@ import net.sf.json.JSONArray;
|
|
|
|
|
import net.sf.json.JSONObject;
|
|
|
|
|
|
|
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
|
|
import org.apache.log4j.Logger;
|
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.ui.ModelMap;
|
|
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
|
|
|
|
import com.base.BaseController;
|
|
|
|
@ -140,7 +143,7 @@ public class DataModelController extends BaseController{
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/oracle/{name}/extract", method= RequestMethod.POST)
|
|
|
|
|
public void oracleExtract(HttpServletRequest res,
|
|
|
|
|
HttpServletResponse req, String name) throws Exception {
|
|
|
|
|
HttpServletResponse req,@PathVariable String name) throws Exception {
|
|
|
|
|
res.setCharacterEncoding("UTF-8");
|
|
|
|
|
System.out.println("------extract-------");
|
|
|
|
|
System.out.println(name);
|
|
|
|
@ -201,8 +204,7 @@ public class DataModelController extends BaseController{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/volume/{name}/move", method= RequestMethod.POST)
|
|
|
|
|
// @ResponseBody
|
|
|
|
|
public void volumeMove(HttpServletRequest res, HttpServletResponse req, String name,
|
|
|
|
|
public void volumeMove(HttpServletRequest res, HttpServletResponse req,@PathVariable String name,
|
|
|
|
|
FolderNode selectNode, DataInfoEntity selectItems) throws Exception {
|
|
|
|
|
res.setCharacterEncoding("UTF-8");
|
|
|
|
|
System.out.println("get Request");
|
|
|
|
@ -266,21 +268,23 @@ public class DataModelController extends BaseController{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/oracle/{id}/delete", method= RequestMethod.POST)
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public void oracleDelete(int id) throws Exception {
|
|
|
|
|
public void oracleDelete(HttpServletRequest request, HttpServletResponse response,@PathVariable String id) throws Exception {
|
|
|
|
|
log.debug("----------deleteOracleInfo----------------");
|
|
|
|
|
mySqlService.deleteMySql(id);
|
|
|
|
|
Integer num = Integer.valueOf(id);
|
|
|
|
|
mySqlService.deleteMySql(num);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/oracle/{id}/insert", method= RequestMethod.POST)
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public void oracleInsert(GatherOracleInfo oracle) throws Exception {
|
|
|
|
|
public void oracleInsert(@PathVariable String id, @RequestBody GatherOracleInfo oracle) throws Exception {
|
|
|
|
|
log.debug("----------insertOracleInfo----------------");
|
|
|
|
|
oracle.setId(Integer.valueOf(id));
|
|
|
|
|
mySqlService.insertOracle(oracle);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/oracle/{id}/update", method= RequestMethod.POST)
|
|
|
|
|
public void oracleUpdate(@RequestBody GatherOracleInfo oracle) throws Exception {
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public void oracleUpdate(@PathVariable("id") String id, @RequestBody GatherOracleInfo oracle) throws Exception {
|
|
|
|
|
log.debug("----------updateOracleInfo-----------------------");
|
|
|
|
|
log.debug(oracle);
|
|
|
|
|
mySqlService.updateOracle(oracle);
|
|
|
|
@ -294,17 +298,19 @@ public class DataModelController extends BaseController{
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/task/transfer/delete", method= RequestMethod.POST)
|
|
|
|
|
@RequestMapping(value="/task/transfer/{id}/delete", method= RequestMethod.POST)
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public Object taskTransferDelete(DataInfoEntityMoveTmp move) throws Exception {
|
|
|
|
|
log.debug("----------/task/transfer/delete-----------------------");
|
|
|
|
|
int result = moveDataService.delete(move);
|
|
|
|
|
public Object taskTransferDelete(@PathVariable String id) throws Exception {
|
|
|
|
|
log.debug("----------/task/transfer/{id}/delete-----------------------");
|
|
|
|
|
DataInfoEntityMoveTmp move = new DataInfoEntityMoveTmp();
|
|
|
|
|
move.setId(Integer.valueOf(id));
|
|
|
|
|
int result = moveDataService.delete(move );
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/task/transfer/save", method= RequestMethod.POST)
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public Object taskTransferSave(DataInfoEntity move) throws Exception {
|
|
|
|
|
public Object taskTransferSave(@RequestBody DataInfoEntity move) throws Exception {
|
|
|
|
|
log.debug("---------/task/transfer/save-----------------------");
|
|
|
|
|
int result = dfs.save(move);
|
|
|
|
|
return result;
|
|
|
|
|