解决角色模型重复新建问题/解决数据属性默认显示undefined/PAL打包
This commit is contained in:
parent
5406729607
commit
4f46851301
Binary file not shown.
@ -886,13 +886,25 @@ public class DesignerRelationShapeWeb extends ActionWeb {
|
||||
for (int i = 0; i < objects.size(); i++) {
|
||||
JSONObject jsonObject = objects.getJSONObject(i);
|
||||
String isParent = jsonObject.getString("isParent");
|
||||
|
||||
|
||||
if (isParent != null) {
|
||||
|
||||
if (isParent.equals("false")) {
|
||||
RowMap isPublishRowMap = DBSql.getMap("SELECT ISPUBLISH FROM APP_ACT_COE_PAL_REPOSITORY WHERE PLNAME=? AND ISUSE=?", jsonObject.getString("name"), 1);
|
||||
if(isPublishRowMap.getString("ISPUBLISH").equals("0")){
|
||||
//过滤废止数据
|
||||
RowMap rowMap=DBSql.getMap("SELECT * FROM APP_ACT_COE_PAL_REPOSITORY WHERE PLNAME=? AND ISSTOP=? AND ISUSE=?",jsonObject.getString("name"),1,1);
|
||||
if(rowMap!=null){
|
||||
RowMap rowMap = DBSql.getMap("SELECT ISSTOP FROM APP_ACT_COE_PAL_REPOSITORY WHERE PLNAME=? AND ISUSE=?", jsonObject.getString("name"), 1);
|
||||
String isstop=rowMap.getString("ISSTOP");
|
||||
if (isstop.equals("1")) {
|
||||
continue;
|
||||
}else{
|
||||
jsonObject.put("nocheck", false);
|
||||
jsonArr_new.add(jsonObject);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
jsonObject.put("nocheck", true);
|
||||
jsonArr_new.add(jsonObject);
|
||||
@ -903,7 +915,25 @@ public class DesignerRelationShapeWeb extends ActionWeb {
|
||||
}
|
||||
|
||||
}
|
||||
macroLibraries.put("treeData", treeJson);
|
||||
macroLibraries.put("treeData", jsonArr_new.toString());
|
||||
}else if(attrId.equals("lead_process") || attrId.equals("rear_process")){//前置属性、后置属性
|
||||
for (int i = 0; i < objects.size(); i++) {
|
||||
JSONObject jsonObject = objects.getJSONObject(i);
|
||||
String isParent = jsonObject.getString("isParent");
|
||||
if (isParent != null) {
|
||||
if (isParent.equals("true")) {
|
||||
jsonObject.put("nocheck", true);
|
||||
jsonArr_new.add(jsonObject);
|
||||
}else{
|
||||
jsonObject.put("nocheck", false);
|
||||
jsonArr_new.add(jsonObject);
|
||||
}
|
||||
} else {
|
||||
jsonObject.put("nocheck", true);
|
||||
jsonArr_new.add(jsonObject);
|
||||
}
|
||||
}
|
||||
macroLibraries.put("treeData", jsonArr_new.toString());
|
||||
}else{
|
||||
macroLibraries.put("treeData", treeJson);
|
||||
}
|
||||
@ -1246,19 +1276,71 @@ public class DesignerRelationShapeWeb extends ActionWeb {
|
||||
PALRepositoryModel model = PALRepositoryCache.getCache().get(id);
|
||||
if (model != null) {
|
||||
|
||||
RowMap stoprowMap=DBSql.getMap("SELECT ISSTOP FROM APP_ACT_COE_PAL_REPOSITORY WHERE PLNAME=? AND ISUSE=?", name,1);
|
||||
if(stoprowMap.getString("ISSTOP").equals("0")){
|
||||
//如果为相关文件 未发布不可选中
|
||||
if(attrId.equals("R_relevant_flies")){
|
||||
RowMap rowMap=DBSql.getMap("SELECT * FROM APP_ACT_COE_PAL_REPOSITORY WHERE PLNAME=? AND ISPUBLISH=? AND ISUSE=?", name,1,1);
|
||||
/*RowMap rowMap=DBSql.getMap("SELECT * FROM APP_ACT_COE_PAL_REPOSITORY WHERE PLNAME=? AND ISPUBLISH=? AND ISUSE=?", name,1,1);
|
||||
if(isParent.equals("true")){
|
||||
node.put("nocheck", true);
|
||||
result.add(node);
|
||||
}else if(isParent.equals("false") && rowMap!=null){
|
||||
node.put("nocheck", false);
|
||||
}*/
|
||||
|
||||
RowMap rowMap=DBSql.getMap("SELECT ISPUBLISH FROM APP_ACT_COE_PAL_REPOSITORY WHERE PLNAME=? AND ISUSE=?", name,1);
|
||||
if(isParent.equals("true")){
|
||||
node.put("nocheck", true);
|
||||
result.add(node);
|
||||
}else if(isParent.equals("false")){
|
||||
if(rowMap.getString("ISPUBLISH").equals("1")) {
|
||||
node.put("nocheck", false);
|
||||
result.add(node);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if(attrId.equals("R_relevant_flies")){
|
||||
//如果为支持文件
|
||||
if(attrId.equals("support_files")){
|
||||
RowMap rowMap=DBSql.getMap("SELECT ISPUBLISH FROM APP_ACT_COE_PAL_REPOSITORY WHERE PLNAME=? AND ISUSE=?", name,1);
|
||||
if(isParent.equals("true")){
|
||||
node.put("nocheck", true);
|
||||
result.add(node);
|
||||
}else if(isParent.equals("false")){
|
||||
if(rowMap.getString("ISPUBLISH").equals("0")) {
|
||||
node.put("nocheck", false);
|
||||
result.add(node);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} else if (attrId.equals("lead_process") || attrId.equals("rear_process")) {
|
||||
if(isParent.equals("true")) {
|
||||
node.put("nocheck", true);
|
||||
result.add(node);
|
||||
}else{
|
||||
node.put("nocheck", false);
|
||||
result.add(node);
|
||||
}
|
||||
}else{
|
||||
String methodId = node.getString("plMethodId");
|
||||
if ("control.kpi".equals(methodId) && methodScope.equals(methodId)) {
|
||||
//根据ID去查 是否有关联管流程
|
||||
String tmpId = node.getString("id");
|
||||
String sql = "select FILEID from APP_ACT_COE_PAL_SHAPE_RLAT where ATTRID='Process_performance_metrics' and RELATIONFILEID='%s'";
|
||||
String reId = DBSql.getString(String.format(sql, tmpId));
|
||||
//还要判断是不是当前流程
|
||||
if (!reId.isEmpty() && !ruuid.equals(reId)) {
|
||||
continue;
|
||||
}
|
||||
result.add(node);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
/*if(attrId.equals("R_relevant_flies")){
|
||||
if(isPublish.equals("true") && isStop.equals("false")){
|
||||
result.add(node);
|
||||
}
|
||||
@ -1280,7 +1362,7 @@ public class DesignerRelationShapeWeb extends ActionWeb {
|
||||
|
||||
result.add(node);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -596,6 +596,7 @@ public class CoeDesignerWeb extends ActionWeb {
|
||||
object.put("name", attrModel.getNewTitle());
|
||||
object.put("readonly", attrModel.getReadonly());
|
||||
object.put("type", attrModel.getType());
|
||||
|
||||
object.put("desc", attrModel.getDesc()==null ? "" : attrModel.getDesc());
|
||||
object.put("isRequired", attrModel.getIsRequired());
|
||||
attrDefineObj.put(attrModel.getKey(), object);
|
||||
|
||||
@ -2377,6 +2377,7 @@ public class CoeProcessLevelUtil {
|
||||
*/
|
||||
public static String getLastPublishTaskIdByModelId(String repositoryId) {
|
||||
String sql = "SELECT pl.TASKID FROM APP_ACT_COE_PAL_PUBLISH p, APP_ACT_COE_PAL_PUBLISH_LIST pl WHERE pl.pid = p.id AND pl.palrepositoryid = ? ORDER BY publishdate DESC";
|
||||
//String sql="SELECT TASKID FROM BO_ACT_COE_PUBLISH_N where PUBLISHFILEID=?";
|
||||
String taskId = DBSql.getObject(sql, new RowMapper<String>() {
|
||||
@Override
|
||||
public String mapRow(ResultSet rs, int arg1) throws SQLException {
|
||||
|
||||
@ -594,6 +594,7 @@ function autoAjaxWaitFn() {
|
||||
}
|
||||
|
||||
function autoajax(ro) {
|
||||
debugger;
|
||||
if(relationType == 'file') {// 前后置流程
|
||||
closeProcessSearchDialog();
|
||||
$('#processSearchData').empty();
|
||||
|
||||
@ -987,7 +987,6 @@ function openRelationDialog(obj, callback) {
|
||||
methodName="新建绩效模型";
|
||||
}
|
||||
if(title=="支持文件" || method=="control.kpi"){
|
||||
|
||||
//根据角色
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
@ -1000,7 +999,6 @@ function openRelationDialog(obj, callback) {
|
||||
},
|
||||
success: function (msg) {
|
||||
if (msg.data.result == "ok") {
|
||||
|
||||
var relationDlg = parent.FrmDialog.open({
|
||||
title: title,
|
||||
width:710,
|
||||
|
||||
@ -3476,7 +3476,6 @@ function openRelationDig(obj,value) {
|
||||
+ "&relationShapeIds=" + relationShapeIds
|
||||
+ "&relationFileIds=" + relationFileIds
|
||||
+ "&ruuid=" + ruuid);
|
||||
debugger;
|
||||
if(methodId=="org.role"){
|
||||
//根据角色
|
||||
$.ajax({
|
||||
@ -3525,6 +3524,7 @@ function openRelationDig(obj,value) {
|
||||
{
|
||||
text : '刷新',
|
||||
cls : "yellow",
|
||||
|
||||
handler : function() {
|
||||
// 刷新页面
|
||||
document.getElementById("attr_content_iframe_relevance_shapes").contentWindow.location.reload(true);
|
||||
@ -3544,10 +3544,10 @@ function openRelationDig(obj,value) {
|
||||
methodId:methodId
|
||||
},
|
||||
success : function(msg) {
|
||||
|
||||
if (msg.data.result == "ok") {
|
||||
window.top.$.simpleAlert("请勿重复新建角色模型!!!");
|
||||
}else{
|
||||
|
||||
//跳转角色
|
||||
$.ajax({
|
||||
type : "POST",
|
||||
@ -3562,6 +3562,8 @@ function openRelationDig(obj,value) {
|
||||
},
|
||||
success : function(msg) {
|
||||
if (msg.result == "ok") {
|
||||
//关闭新建按钮
|
||||
$(".dlg-button button").eq(2).hide();
|
||||
window.open("./w?uuid=" + msg.data.uuid+"&teamId="+$('#teamId').val()
|
||||
+ "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&sid=" + encodeURIComponent($('#sid').val()));
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user