Forráskód Böngészése

Merge branch 'fix/脚本和数据字典查询返回内容修改' into 'develop'

【流程】【门户】【内容管理】脚本查询返回内容修改

See merge request o2oa/o2oa!1489
o2null 5 éve
szülő
commit
c891c5c2f5

+ 33 - 3
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/script/ActionGetScriptNestedImported.java

@@ -9,7 +9,6 @@ import javax.servlet.http.HttpServletRequest;
 import com.x.base.core.container.EntityManagerContainer;
 import com.x.base.core.container.factory.EntityManagerContainerFactory;
 import com.x.base.core.project.annotation.FieldDescribe;
-import com.x.base.core.project.cache.ApplicationCache;
 import com.x.base.core.project.cache.Cache;
 import com.x.base.core.project.cache.CacheManager;
 import com.x.base.core.project.gson.GsonPropertyObject;
@@ -19,8 +18,6 @@ import com.x.cms.assemble.control.Business;
 import com.x.cms.core.entity.AppInfo;
 import com.x.cms.core.entity.element.Script;
 
-import net.sf.ehcache.Element;
-
 class ActionGetScriptNestedImported extends BaseAction {
 
 //	private static Logger logger = LoggerFactory.getLogger(ScriptAction.class);
@@ -63,6 +60,9 @@ class ActionGetScriptNestedImported extends BaseAction {
 					wrap = new Wo();
 					wrap.setImportedList(imported);
 					wrap.setText(buffer.toString());
+					wrap.setAppId(appInfo.getId());
+					wrap.setAppName(appInfo.getAppName());
+					wrap.setAppAlias(appInfo.getAppAlias());
 					CacheManager.put(cacheCategory, cacheKey, wrap );
 				}
 			} catch (Throwable th) {
@@ -95,6 +95,12 @@ class ActionGetScriptNestedImported extends BaseAction {
 
 		private List<String> importedList;
 
+		private String appId;
+
+		private String appName;
+
+		private String appAlias;
+
 		public List<String> getImportedList() {
 			return importedList;
 		}
@@ -110,5 +116,29 @@ class ActionGetScriptNestedImported extends BaseAction {
 		public void setText(String text) {
 			this.text = text;
 		}
+
+		public String getAppId() {
+			return appId;
+		}
+
+		public void setAppId(String appId) {
+			this.appId = appId;
+		}
+
+		public String getAppName() {
+			return appName;
+		}
+
+		public void setAppName(String appName) {
+			this.appName = appName;
+		}
+
+		public String getAppAlias() {
+			return appAlias;
+		}
+
+		public void setAppAlias(String appAlias) {
+			this.appAlias = appAlias;
+		}
 	}
 }

+ 22 - 0
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/script/ActionGetWithAppAndName.java

@@ -45,6 +45,8 @@ class ActionGetWithAppAndName extends BaseAction {
 				if (StringUtils.isNotEmpty(id)) {
 					Script script = emc.find(id, Script.class);
 					wrap = Wo.copier.copy( script );
+					wrap.setAppName(appInfo.getAppName());
+					wrap.setAppAlias(appInfo.getAppAlias());
 				} else {
 					throw new Exception("[getWithAppWithName]script not existed with name or alias : " + name + ".");
 				}
@@ -77,6 +79,10 @@ class ActionGetWithAppAndName extends BaseAction {
 		private Boolean validated;
 		
 		private String appId;
+
+		private String appName;
+
+		private String appAlias;
 		
 		private String text;
 		
@@ -193,5 +199,21 @@ class ActionGetWithAppAndName extends BaseAction {
 		public void setText(String text) {
 			this.text = text;
 		}
+
+		public String getAppName() {
+			return appName;
+		}
+
+		public void setAppName(String appName) {
+			this.appName = appName;
+		}
+
+		public String getAppAlias() {
+			return appAlias;
+		}
+
+		public void setAppAlias(String appAlias) {
+			this.appAlias = appAlias;
+		}
 	}
 }

+ 26 - 0
o2server/x_portal_assemble_surface/src/main/java/com/x/portal/assemble/surface/jaxrs/script/ActionGetImported.java

@@ -3,6 +3,7 @@ package com.x.portal.assemble.surface.jaxrs.script;
 import java.util.ArrayList;
 import java.util.List;
 
+import com.x.base.core.project.annotation.FieldDescribe;
 import org.apache.commons.lang3.StringUtils;
 
 import com.x.base.core.container.EntityManagerContainer;
@@ -59,6 +60,9 @@ class ActionGetImported extends BaseAction {
 				}
 				wo.setImportedList(imported);
 				wo.setText(buffer.toString());
+				wo.setPortal(portal.getId());
+				wo.setPortalName(portal.getName());
+				wo.setPortalAlias(portal.getAlias());
 				CacheManager.put(cache, cacheKey, wo);
 			}
 			result.setData(wo);
@@ -82,6 +86,28 @@ class ActionGetImported extends BaseAction {
 		public void setImportedList(List<String> importedList) {
 			this.importedList = importedList;
 		}
+
+		@FieldDescribe("门户应用名称.")
+		private String portalName;
+
+		@FieldDescribe("门户应用别名.")
+		private String portalAlias;
+
+		public String getPortalName() {
+			return portalName;
+		}
+
+		public void setPortalName(String portalName) {
+			this.portalName = portalName;
+		}
+
+		public String getPortalAlias() {
+			return portalAlias;
+		}
+
+		public void setPortalAlias(String portalAlias) {
+			this.portalAlias = portalAlias;
+		}
 	}
 
 }

+ 35 - 0
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/script/ActionGetImported.java

@@ -59,6 +59,9 @@ class ActionGetImported extends BaseAction {
 				}
 				wo.setImportedList(imported);
 				wo.setText(sb.toString());
+				wo.setApplication(application.getId());
+				wo.setAppName(application.getName());
+				wo.setAppAlias(application.getAlias());
 				CacheManager.put(cacheCategory, cacheKey, wo);
 			}
 			result.setData(wo);
@@ -76,6 +79,15 @@ class ActionGetImported extends BaseAction {
 		@FieldDescribe("应用脚本")
 		private List<String> importedList;
 
+		@FieldDescribe("脚本所属应用.")
+		private String application;
+
+		@FieldDescribe("应用名称.")
+		private String appName;
+
+		@FieldDescribe("应用别名.")
+		private String appAlias;
+
 		public List<String> getImportedList() {
 			return importedList;
 		}
@@ -92,6 +104,29 @@ class ActionGetImported extends BaseAction {
 			this.text = text;
 		}
 
+		public String getApplication() {
+			return application;
+		}
+
+		public void setApplication(String application) {
+			this.application = application;
+		}
+
+		public String getAppName() {
+			return appName;
+		}
+
+		public void setAppName(String appName) {
+			this.appName = appName;
+		}
+
+		public String getAppAlias() {
+			return appAlias;
+		}
+
+		public void setAppAlias(String appAlias) {
+			this.appAlias = appAlias;
+		}
 	}
 
 }