diff --git a/com.actionsoft.apps.coe.pal.modelconvert/db/1.0/mysql.sql b/com.actionsoft.apps.coe.pal.modelconvert/db/1.0/mysql.sql
index a733cbcf..5df87442 100644
--- a/com.actionsoft.apps.coe.pal.modelconvert/db/1.0/mysql.sql
+++ b/com.actionsoft.apps.coe.pal.modelconvert/db/1.0/mysql.sql
@@ -1,17 +1,3 @@
-CREATE TABLE APP_ACT_COE_PAL_MC_HISTORY_RECORD (
- ID CHAR(36) NOT NULL,
- WSID CHAR(36) NOT NULL,
- SOURCEMETHOD VARCHAR(36) NOT NULL,
- TARGETMETHOD VARCHAR(36) NOT NULL,
- OPERATOR VARCHAR(36) NOT NULL,
- OPERATORTIME DATETIME NOT NULL,
- CONSTRAINT APP_ACT_COE_PAL_MODEL_CONVERT_HISTORY_RECORD_PK PRIMARY KEY (ID));
+CREATE TABLE APP_ACT_COE_PAL_MC_HISTORY_RECORD (ID CHAR(36) NOT NULL,WSID CHAR(36) NOT NULL,SOURCEMETHOD VARCHAR(36) NOT NULL,TARGETMETHOD VARCHAR(36) NOT NULL,OPERATOR VARCHAR(36) NOT NULL,OPERATORTIME DATETIME NOT NULL,CONSTRAINT APP_ACT_COE_PAL_MODEL_CONVERT_HISTORY_RECORD_PK PRIMARY KEY (ID));
-CREATE TABLE APP_ACT_COE_PAL_MC_HISTORY_RECORD_DETAIL (
- ID CHAR(36) NOT NULL,
- HISTORYRECORDID CHAR(36) NOT NULL,
- REPOSITORYID CHAR(36) NOT NULL,
- REPOSITORYNAME VARCHAR(255) NOT NULL,
- CONSTRAINT APP_ACT_COE_PAL_MC_HISTORY_RECORD_DETAIL_PK PRIMARY KEY (ID),
- CONSTRAINT APP_ACT_COE_PAL_MC_HISTORY_RECORD_DETAIL_FK FOREIGN KEY (HISTORYRECORDID) REFERENCES APP_ACT_COE_PAL_MC_HISTORY_RECORD(ID)
-);
+CREATE TABLE APP_ACT_COE_PAL_MC_HISTORY_RECORD_DETAIL (ID CHAR(36) NOT NULL,HISTORYRECORDID CHAR(36) NOT NULL,REPOSITORYID CHAR(36) NOT NULL,REPOSITORYNAME VARCHAR(255) NOT NULL,CONSTRAINT APP_ACT_COE_PAL_MC_HISTORY_RECORD_DETAIL_PK PRIMARY KEY (ID),CONSTRAINT APP_ACT_COE_PAL_MC_HISTORY_RECORD_DETAIL_FK FOREIGN KEY (HISTORYRECORDID) REFERENCES APP_ACT_COE_PAL_MC_HISTORY_RECORD(ID));
diff --git a/com.actionsoft.apps.coe.pal.modelconvert/db/1.0/oracle.sql b/com.actionsoft.apps.coe.pal.modelconvert/db/1.0/oracle.sql
new file mode 100644
index 00000000..458f6907
--- /dev/null
+++ b/com.actionsoft.apps.coe.pal.modelconvert/db/1.0/oracle.sql
@@ -0,0 +1,3 @@
+CREATE TABLE APP_ACT_COE_PAL_MC_HISTORY_RECORD (ID CHAR(36) NOT NULL,WSID CHAR(36) NOT NULL,SOURCEMETHOD NVARCHAR2(36) NOT NULL,TARGETMETHOD NVARCHAR2(36) NOT NULL,OPERATOR NVARCHAR2(36) NOT NULL,OPERATORTIME DATE NOT NULL,CONSTRAINT APP_ACT_COE_PAL_MODEL_CONVERT_HISTORY_RECORD_PK PRIMARY KEY (ID));
+
+CREATE TABLE APP_ACT_COE_PAL_MC_HISTORY_RECORD_DETAIL (ID CHAR(36) NOT NULL,HISTORYRECORDID CHAR(36) NOT NULL,REPOSITORYID CHAR(36) NOT NULL,REPOSITORYNAME NVARCHAR2(255) NOT NULL,CONSTRAINT APP_ACT_COE_PAL_MC_HISTORY_RECORD_DETAIL_PK PRIMARY KEY (ID),CONSTRAINT APP_ACT_COE_PAL_MC_HISTORY_RECORD_DETAIL_FK FOREIGN KEY (HISTORYRECORDID) REFERENCES APP_ACT_COE_PAL_MC_HISTORY_RECORD(ID));
diff --git a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/designer.ui.debug.js b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/designer.ui.debug.js
index cc61be1f..0f839769 100755
--- a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/designer.ui.debug.js
+++ b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/designer.ui.debug.js
@@ -513,9 +513,50 @@ var UI = {
if (item.length) {
$("#bar_list_page").dropdown("select", item);
}
+ } else if (menuId == "bar_list_file"){
+ // debugger;
+ if (methodId == "process.epc" && $("#bar_list_model_convert").length == 0){
+ $("#bar_list_file").append("
模型转换►
");
+ $("#bar_list_model_convert").append("FlowChart"+"BPMN");
+ $("#bar_list_model_convert > li").click(function () {
+ if ($("#saving_tip").text() != "已保存成功" && $("#saving_tip").text() != "保存成功" && $("#saving_tip").text() != "您的文件已经成功保存" && $("#saving_tip").text() != "") {
+ if (editable) {
+ $.simpleAlert('页面中有未保存的内容,请先保存');
+ return;
+ }
+ }
+ });
+ }
}
}
+ function modelConvertFn(targetMethod,duplicateName) {
+ $.simpleAlert('转换中', 'loading');
+ $.ajax({
+ type: "POST",
+ url: "./jd",
+ data: {
+ sid: sid,
+ cmd: "com.actionsoft.apps.coe.pal.handle_epc_to_flowchart",
+ repositoryId: ruuid,
+ sourceMethod: methodId,
+ targetMethod: targetMethod,
+ duplicateName: duplicateName
+ },
+ success: function (r,textStatus,jqXHR) {
+ $.simpleAlert("close");
+ if(r.result == 'ok' ) {
+ $.simpleAlert('转换成功', 'success');
+ }else {
+ $.simpleAlert(r.data.desc, 'error');
+ }
+ },
+ error: function (jqXHR,textStatus,errorThrown) {
+ $.simpleAlert(errorThrown, 'err');
+ }
+ });
+ }
+
function menuSelected(item) {
var action = item.attr("ac");
// 编辑菜单
@@ -662,6 +703,45 @@ var UI = {
UI.showFeedBack();
} else if (action == "getting_started") {
UI.gettingStart();
+ } else if (action == "modelConvert"){
+ var targetMethod = item.attr("methodId");
+ if (targetMethod == 'process.bpmn'){
+ $.simpleAlert('暂不支持转换BPMN', 'warning');
+ return;
+ }
+ $.simpleAlert('转换后同名校验中', 'loading');
+ $.ajax({
+ type: "POST",
+ url: "./jd",
+ data: {
+ sid: sid,
+ cmd: "com.actionsoft.apps.coe.pal.check_repository_name_exist",
+ repositoryId: ruuid,
+ targetMethod: targetMethod
+ },
+ success: function (r,textStatus,jqXHR) {
+ $.simpleAlert("close");
+ if(r.result == 'ok' ) {
+ if (r.data.duplicateName){
+ $.confirm({
+ title: '提示',
+ content: '文件【'+r.data.repositoryName+'】名称已存在,是否新建副本?',
+ onConfirm: function () {
+ modelConvertFn(targetMethod,r.data.duplicateName);
+ },
+ onCancel: function () {}
+ });
+ }else {
+ modelConvertFn(targetMethod,r.data.duplicateName);
+ }
+ }else {
+ $.simpleAlert(r.data.desc, 'error');
+ }
+ },
+ error: function (jqXHR,textStatus,errorThrown) {
+ $.simpleAlert(errorThrown, 'err');
+ }
+ });
}
}
$("#page_size_w").spinner({
diff --git a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/designer.ui.js b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/designer.ui.js
index a3892730..2fd424f2 100755
--- a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/designer.ui.js
+++ b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/designer.ui.js
@@ -573,9 +573,50 @@ var UI = {
if (item.length) {
$("#bar_list_page").dropdown("select", item);
}
+ } else if (menuId == "bar_list_file"){
+ // debugger;
+ if (methodId == "process.epc" && $("#bar_list_model_convert").length == 0){
+ $("#bar_list_file").append("模型转换►
");
+ $("#bar_list_model_convert").append("FlowChart"+"BPMN");
+ $("#bar_list_model_convert > li").click(function () {
+ if ($("#saving_tip").text() != "已保存成功" && $("#saving_tip").text() != "保存成功" && $("#saving_tip").text() != "您的文件已经成功保存" && $("#saving_tip").text() != "") {
+ if (editable) {
+ $.simpleAlert('页面中有未保存的内容,请先保存');
+ return;
+ }
+ }
+ });
+ }
}
}
+ function modelConvertFn(targetMethod,duplicateName) {
+ $.simpleAlert('转换中', 'loading');
+ $.ajax({
+ type: "POST",
+ url: "./jd",
+ data: {
+ sid: sid,
+ cmd: "com.actionsoft.apps.coe.pal.handle_epc_to_flowchart",
+ repositoryId: ruuid,
+ sourceMethod: methodId,
+ targetMethod: targetMethod,
+ duplicateName: duplicateName
+ },
+ success: function (r,textStatus,jqXHR) {
+ $.simpleAlert("close");
+ if(r.result == 'ok' ) {
+ $.simpleAlert('转换成功', 'success');
+ }else {
+ $.simpleAlert(r.data.desc, 'error');
+ }
+ },
+ error: function (jqXHR,textStatus,errorThrown) {
+ $.simpleAlert(errorThrown, 'err');
+ }
+ });
+ }
+
function menuSelected(item) {
var action = item.attr("ac");
// 编辑菜单
@@ -722,6 +763,45 @@ var UI = {
UI.showFeedBack();
} else if (action == "getting_started") {
UI.gettingStart();
+ } else if (action == "modelConvert"){
+ var targetMethod = item.attr("methodId");
+ if (targetMethod == 'process.bpmn'){
+ $.simpleAlert('暂不支持转换BPMN', 'warning');
+ return;
+ }
+ $.simpleAlert('转换后同名校验中', 'loading');
+ $.ajax({
+ type: "POST",
+ url: "./jd",
+ data: {
+ sid: sid,
+ cmd: "com.actionsoft.apps.coe.pal.check_repository_name_exist",
+ repositoryId: ruuid,
+ targetMethod: targetMethod
+ },
+ success: function (r,textStatus,jqXHR) {
+ $.simpleAlert("close");
+ if(r.result == 'ok' ) {
+ if (r.data.duplicateName){
+ $.confirm({
+ title: '提示',
+ content: '文件【'+r.data.repositoryName+'】名称已存在,是否新建副本?',
+ onConfirm: function () {
+ modelConvertFn(targetMethod,r.data.duplicateName);
+ },
+ onCancel: function () {}
+ });
+ }else {
+ modelConvertFn(targetMethod,r.data.duplicateName);
+ }
+ }else {
+ $.simpleAlert(r.data.desc, 'error');
+ }
+ },
+ error: function (jqXHR,textStatus,errorThrown) {
+ $.simpleAlert(errorThrown, 'err');
+ }
+ });
}
}
$("#page_size_w").spinner({