上传自由模型代码
This commit is contained in:
parent
3ac8502545
commit
95e577a8ee
@ -116,6 +116,11 @@
|
||||
<en><![CDATA[Process.Framework]]></en>
|
||||
<big5><![CDATA[流程架构]]></big5>
|
||||
</item>
|
||||
<item key="freedom.allmethod">
|
||||
<cn><![CDATA[自由模型]]></cn>
|
||||
<en><![CDATA[freedom.AllMethod]]></en>
|
||||
<big5><![CDATA[自由模型]]></big5>
|
||||
</item>
|
||||
<item key="process">
|
||||
<cn><![CDATA[流程制度]]></cn>
|
||||
<en><![CDATA[Process]]></en>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -3050,9 +3050,9 @@ public class CoEPALController {
|
||||
* @return
|
||||
*/
|
||||
@Mapping("com.actionsoft.apps.coe.pal_processlevel_create_method_list")
|
||||
public String getPalProcessLevelCreateMethodList(UserContext me, String category, String methodId) {
|
||||
public String getPalProcessLevelCreateMethodList(UserContext me, String category, String methodId , String fileId) {
|
||||
CoeProcessLevelWeb web = new CoeProcessLevelWeb(me);
|
||||
return web.getPalProcessLevelCreateMethodList(category, methodId);
|
||||
return web.getPalProcessLevelCreateMethodList(category, methodId,fileId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -2609,6 +2609,9 @@ public class CoeProcessLevelWeb extends ActionWeb {
|
||||
plLevel = plModel.getLevel();
|
||||
plOrderIndex = plModel.getOrderIndex();
|
||||
methodId = plModel.getMethodId();
|
||||
if ("freedom.allmethod".equals(methodId)){
|
||||
macroLibraries.put("classification", I18nRes.findValue(CoEConstant.APP_ID, methodId));
|
||||
}
|
||||
for (int i = 0, methodSize = methodModels.size(); i < methodSize; i++) {
|
||||
PALMethodModel palMethodModel = methodModels.get(i);
|
||||
String appId = palMethodModel.getId();
|
||||
@ -8342,7 +8345,7 @@ public class CoeProcessLevelWeb extends ActionWeb {
|
||||
* @param methodId
|
||||
* @return
|
||||
*/
|
||||
public String getPalProcessLevelCreateMethodList(String category, String methodId) {
|
||||
public String getPalProcessLevelCreateMethodList(String category, String methodId, String fileId) {
|
||||
ResponseObject ro = ResponseObject.newOkResponse();
|
||||
JSONArray fileArr = new JSONArray();// 文件类模型,可以画图
|
||||
JSONArray folderArr = new JSONArray();// 文件夹类模型,作为文件夹
|
||||
@ -8378,16 +8381,29 @@ public class CoeProcessLevelWeb extends ActionWeb {
|
||||
methodObj.put("categoryName", I18nRes.findValue(CoEConstant.APP_ID, c));
|
||||
methodObj.put("method", model.getId());
|
||||
methodObj.put("methodName", I18nRes.findValue(CoEConstant.APP_ID, model.getId()));
|
||||
if (model.getSchema().contains("架构KPI图")) {
|
||||
if (!"freedom.allmethod".equals(model.getId())){
|
||||
if (model.getSchema().contains("架构KPI图")){
|
||||
methodObj.put("methodName", "架构KPI图");
|
||||
}
|
||||
if (model.getSchema().contains("角色图")) {
|
||||
if (model.getSchema().contains("角色图")){
|
||||
methodObj.put("methodName", "角色图");
|
||||
}
|
||||
}
|
||||
// System.out.println(c+"对应的"+ PALMethodManager.getInstance().havingCreateMethodPerm(category, methodId, "process", model.getId()));
|
||||
|
||||
//流程入口允许新建表单图和制度图 by金鹏
|
||||
if (category.equals("process") && model.getSchema().contains("表单图")) {
|
||||
if (model.getId().equals("freedom.allmethod")) {
|
||||
if (StringUtils.isBlank(fileId)){
|
||||
methodObj.put("havingCreatePerm", false);
|
||||
}else {
|
||||
String property = SDK.getAppAPI().getProperty(CoEConstant.APP_ID, "freedom.file");
|
||||
if (StringUtils.isNotBlank(property)&&property.contains(fileId)){
|
||||
methodObj.put("havingCreatePerm", true);
|
||||
}else {
|
||||
methodObj.put("havingCreatePerm", false);
|
||||
}
|
||||
}
|
||||
}else if (category.equals("process") && model.getSchema().contains("表单图")) {
|
||||
methodObj.put("havingCreatePerm", true);
|
||||
} else if (category.equals("process") && model.getSchema().contains("制度")) {
|
||||
methodObj.put("havingCreatePerm", true);
|
||||
|
||||
@ -1564,6 +1564,7 @@
|
||||
<cmd-bean name="com.actionsoft.apps.coe.pal_processlevel_create_method_list">
|
||||
<param name="category"/>
|
||||
<param name="methodId"/>
|
||||
<param name="fileId"/>
|
||||
</cmd-bean>
|
||||
<cmd-bean name="com.actionsoft.apps.coe.pal_processlevel_folder_create_save">
|
||||
<param name="wsId"/>
|
||||
|
||||
@ -0,0 +1,27 @@
|
||||
package com.awspaas.user.apps.coe.method.process.freedom.listener;
|
||||
|
||||
import com.actionsoft.apps.coe.pal.pal.method.extend.MethodAppManager;
|
||||
import com.actionsoft.apps.listener.AppListener;
|
||||
import com.actionsoft.apps.resource.AppContext;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @Author: yuandongqiang
|
||||
* @Date: 2025/6/4
|
||||
* @Description:
|
||||
*/
|
||||
public class StartListener implements AppListener {
|
||||
@Override
|
||||
public boolean before(AppContext appContext) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(AppContext appContext) {
|
||||
this.initMethod(appContext);
|
||||
}
|
||||
private void initMethod(AppContext appContext){
|
||||
MethodAppManager.register("freedom.allmethod", appContext, "freedom.allmethod", "自由流程建模方法");
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package com.awspaas.user.apps.coe.method.process.freedom.plugin;
|
||||
|
||||
import com.actionsoft.apps.listener.PluginListener;
|
||||
import com.actionsoft.apps.resource.AppContext;
|
||||
import com.actionsoft.apps.resource.plugin.profile.AWSPluginProfile;
|
||||
import com.actionsoft.apps.resource.plugin.profile.AppExtensionProfile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
*
|
||||
* @Author: yuandongqiang
|
||||
* @Date: 2025/6/4
|
||||
* @Description: 插件
|
||||
*/
|
||||
public class Plugins implements PluginListener {
|
||||
@Override
|
||||
public List<AWSPluginProfile> register(AppContext appContext) {
|
||||
List<AWSPluginProfile> list = new ArrayList<AWSPluginProfile>();
|
||||
// PAL应用扩展点
|
||||
Map<String, Object> params1 = new HashMap<String, Object>();
|
||||
params1.put("title", "自由模型建模方法");
|
||||
params1.put("icon", "");
|
||||
params1.put("desc", "自由模型建模方法");
|
||||
params1.put("methodId", "freedom.allmethod");
|
||||
params1.put("deletedClass", "");
|
||||
list.add(new AppExtensionProfile("PAL流程资产库->自由模型建模方法", "aslp://com.actionsoft.apps.coe.pal/registerMethodApp", params1));
|
||||
return list;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user