|
|
|
@ -66,6 +66,60 @@ module System{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$scope.checkSQLSERVER = () => {
|
|
|
|
|
/**
|
|
|
|
|
** 检查是否有默认标准表汇总库
|
|
|
|
|
**/
|
|
|
|
|
var answer = false;
|
|
|
|
|
for (var i = 0; i < ConfigsModel.oracleParam.length; ++i) {
|
|
|
|
|
if(ConfigsModel.oracleParam[i].type == 1){
|
|
|
|
|
answer = true
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(answer == false){
|
|
|
|
|
/**
|
|
|
|
|
提示没有配置标准表汇总库
|
|
|
|
|
**/
|
|
|
|
|
Configs.customAlert("提示", "操作失败:没有配置默认的标准表汇总库", '',null, 0, "error");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var selectedItems = [];
|
|
|
|
|
if($scope.tableData && $scope.tableData.length > 0){
|
|
|
|
|
for (var i = 0; i < $scope.tableData.length; ++i) {
|
|
|
|
|
var item = $scope.tableData[i];
|
|
|
|
|
if($scope.checkboxes.items[item.id]){
|
|
|
|
|
if(item.collection == '否'){
|
|
|
|
|
/*
|
|
|
|
|
**提示出现没有采集数据的信息系统
|
|
|
|
|
code
|
|
|
|
|
*/
|
|
|
|
|
Configs.customAlert("提示", "操作失败:选择的系统存在没有数据的系统", '',null, 0, "error");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
item["_key"] = item.areaCode + "-" + item.sysCode + "-" + item.dataVersion;
|
|
|
|
|
if(item.dataBaseType == 'ORACLE'){
|
|
|
|
|
Configs.customAlert("提示", "操作失败:ORACLE数据请在服务集群界面中抽取标准表!", '',null, 0, "error");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
selectedItems.push(item);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$http({
|
|
|
|
|
url: "/java/console/api/checkout/extractList",
|
|
|
|
|
method: "POST",
|
|
|
|
|
data: selectedItems
|
|
|
|
|
}).success((data, header, config, status) => {
|
|
|
|
|
//console.log(data);
|
|
|
|
|
|
|
|
|
|
}).error((data, header, config, status) => {
|
|
|
|
|
throw "请求失败"
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$scope.deleteRows = () =>{
|
|
|
|
|
var filter = [];
|
|
|
|
|
if($scope.tableData && $scope.tableData.length > 0){
|
|
|
|
@ -99,8 +153,9 @@ module System{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$scope.check = () => {
|
|
|
|
|
var sqlServerDB = [];
|
|
|
|
|
//var sqlServerDB = [];
|
|
|
|
|
var oracleDB = [];
|
|
|
|
|
var selectedItems = [];
|
|
|
|
|
/**
|
|
|
|
|
** 检查是否有默认标准表汇总库
|
|
|
|
|
**/
|
|
|
|
@ -132,25 +187,26 @@ module System{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
item["_key"] = item.areaCode + "-" + item.sysCode + "-" + item.dataVersion;
|
|
|
|
|
selectedItems.push(item);
|
|
|
|
|
if(item.dataBaseType == 'ORACLE'){
|
|
|
|
|
oracleDB.push(item);
|
|
|
|
|
}else{
|
|
|
|
|
sqlServerDB.push(item);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(oracleDB.length >= 0){
|
|
|
|
|
/*
|
|
|
|
|
此处需要检查数据是否已挂载、正在迁移。
|
|
|
|
|
*/
|
|
|
|
|
var exitedOracle = Kubernetes.checkForCreateOracle(DataModel.transferTasks, oracleDB);
|
|
|
|
|
var exitedSqlServer = Kubernetes.checkForCreateOracle(DataModel.transferTasks, sqlServerDB);
|
|
|
|
|
if(exitedSqlServer.length > 0 || exitedOracle.length > 0){
|
|
|
|
|
Configs.customAlert("提示", "操作失败: 正在迁移的数据不能执行校验操作!", '', null, 0, "error");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
/*
|
|
|
|
|
此处需要检查数据是否已挂载、正在迁移。
|
|
|
|
|
*/
|
|
|
|
|
var exited = Kubernetes.checkForCreateOracle(DataModel.transferTasks, selectedItems);
|
|
|
|
|
if(exited.length > 0 ){
|
|
|
|
|
Configs.customAlert("提示", "操作失败: 正在迁移的数据不能执行校验操作!", '', null, 0, "error");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
如果是Oracle数据,先启动oracle数据
|
|
|
|
|
*/
|
|
|
|
|
if(oracleDB.length >= 0){
|
|
|
|
|
angular.forEach(oracleDB, (item) =>{
|
|
|
|
|
Kubernetes.createRC({
|
|
|
|
|
name: item._key,
|
|
|
|
@ -164,13 +220,14 @@ module System{
|
|
|
|
|
districtName: item.districtName,
|
|
|
|
|
systemName: item.sysName,
|
|
|
|
|
id: item.dataId+"",
|
|
|
|
|
year: item.year
|
|
|
|
|
year: item.year,
|
|
|
|
|
checkoutFlag: item.checkoutFlag
|
|
|
|
|
},
|
|
|
|
|
path: item.dataPath+"app/",
|
|
|
|
|
path: item.path+"app/",
|
|
|
|
|
isTarget: "false",
|
|
|
|
|
isExtract: item.extractStatus
|
|
|
|
|
}, (rc) =>{
|
|
|
|
|
Kubernetes.connectOracle($http, $timeout, "/java/console/api/connectOracle", "create", rc, 0);
|
|
|
|
|
//Kubernetes.connectOracle($http, $timeout, "/java/console/api/connectOracle", "create", rc, 0);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
$timeout(() => {
|
|
|
|
@ -181,8 +238,9 @@ module System{
|
|
|
|
|
$http({
|
|
|
|
|
url: "/java/console/api/checkout/checkList",
|
|
|
|
|
method: "POST",
|
|
|
|
|
data: oracleDB
|
|
|
|
|
}).success((data, header, config, status) => {
|
|
|
|
|
data: selectedItems
|
|
|
|
|
}).success((data, header, config, status) => {
|
|
|
|
|
console.log(data);
|
|
|
|
|
/*$scope.tableData = data.data;
|
|
|
|
|
var result = [];
|
|
|
|
|
if($scope.y != 'all'){
|
|
|
|
|